From d51d10285f4c5fb75102a8bde387bb02bf44e5da Mon Sep 17 00:00:00 2001 From: LiRen-qiu <2914668598@qq.com> Date: Mon, 10 Feb 2025 21:45:53 +0800 Subject: [PATCH] =?UTF-8?q?Aside=E5=86=99=E5=A5=BD=E7=9A=84=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vuetest/.idea/.gitignore | 8 + vuetest/.idea/compiler.xml | 26 + vuetest/.idea/dataSources.xml | 19 + vuetest/.idea/encodings.xml | 6 + vuetest/.idea/jarRepositories.xml | 25 + vuetest/.idea/jsLibraryMappings.xml | 6 + vuetest/.idea/misc.xml | 13 + vuetest/.idea/modules.xml | 8 + vuetest/.idea/uiDesigner.xml | 124 + vuetest/.idea/vcs.xml | 6 + vuetest/.idea/vuetest.iml | 9 + vuetest/.vscode/settings.json | 4 + vuetest/node_modules/.bin/nanoid | 16 + vuetest/node_modules/.bin/nanoid.cmd | 17 + vuetest/node_modules/.bin/nanoid.ps1 | 28 + vuetest/node_modules/.bin/parser | 16 + vuetest/node_modules/.bin/parser.cmd | 17 + vuetest/node_modules/.bin/parser.ps1 | 28 + vuetest/node_modules/.package-lock.json | 306 + .../.vue-global-types/vue_3.3_false.d.ts | 132 + .../@babel/helper-string-parser/LICENSE | 22 + .../@babel/helper-string-parser/README.md | 19 + .../@babel/helper-string-parser/lib/index.js | 295 + .../helper-string-parser/lib/index.js.map | 1 + .../@babel/helper-string-parser/package.json | 31 + .../helper-validator-identifier/LICENSE | 22 + .../helper-validator-identifier/README.md | 19 + .../lib/identifier.js | 70 + .../lib/identifier.js.map | 1 + .../helper-validator-identifier/lib/index.js | 57 + .../lib/index.js.map | 1 + .../lib/keyword.js | 35 + .../lib/keyword.js.map | 1 + .../helper-validator-identifier/package.json | 31 + .../node_modules/@babel/parser/CHANGELOG.md | 1073 + vuetest/node_modules/@babel/parser/LICENSE | 19 + vuetest/node_modules/@babel/parser/README.md | 19 + .../@babel/parser/bin/babel-parser.js | 15 + vuetest/node_modules/@babel/parser/index.cjs | 5 + .../node_modules/@babel/parser/lib/index.js | 14214 +++++ .../@babel/parser/lib/index.js.map | 1 + .../node_modules/@babel/parser/package.json | 50 + .../@babel/parser/typings/babel-parser.d.ts | 267 + vuetest/node_modules/@babel/types/LICENSE | 22 + vuetest/node_modules/@babel/types/README.md | 19 + .../@babel/types/lib/asserts/assertNode.js | 16 + .../types/lib/asserts/assertNode.js.map | 1 + .../types/lib/asserts/generated/index.js | 1243 + .../types/lib/asserts/generated/index.js.map | 1 + .../types/lib/ast-types/generated/index.js | 3 + .../lib/ast-types/generated/index.js.map | 1 + .../lib/builders/flow/createFlowUnionType.js | 18 + .../builders/flow/createFlowUnionType.js.map | 1 + .../flow/createTypeAnnotationBasedOnTypeof.js | 31 + .../createTypeAnnotationBasedOnTypeof.js.map | 1 + .../types/lib/builders/generated/index.js | 2887 + .../types/lib/builders/generated/index.js.map | 1 + .../types/lib/builders/generated/uppercase.js | 1544 + .../lib/builders/generated/uppercase.js.map | 1 + .../@babel/types/lib/builders/productions.js | 12 + .../types/lib/builders/productions.js.map | 1 + .../types/lib/builders/react/buildChildren.js | 24 + .../lib/builders/react/buildChildren.js.map | 1 + .../builders/typescript/createTSUnionType.js | 22 + .../typescript/createTSUnionType.js.map | 1 + .../@babel/types/lib/builders/validateNode.js | 21 + .../types/lib/builders/validateNode.js.map | 1 + .../@babel/types/lib/clone/clone.js | 12 + .../@babel/types/lib/clone/clone.js.map | 1 + .../@babel/types/lib/clone/cloneDeep.js | 12 + .../@babel/types/lib/clone/cloneDeep.js.map | 1 + .../types/lib/clone/cloneDeepWithoutLoc.js | 12 + .../lib/clone/cloneDeepWithoutLoc.js.map | 1 + .../@babel/types/lib/clone/cloneNode.js | 107 + .../@babel/types/lib/clone/cloneNode.js.map | 1 + .../@babel/types/lib/clone/cloneWithoutLoc.js | 12 + .../types/lib/clone/cloneWithoutLoc.js.map | 1 + .../@babel/types/lib/comments/addComment.js | 15 + .../types/lib/comments/addComment.js.map | 1 + .../@babel/types/lib/comments/addComments.js | 22 + .../types/lib/comments/addComments.js.map | 1 + .../lib/comments/inheritInnerComments.js | 12 + .../lib/comments/inheritInnerComments.js.map | 1 + .../lib/comments/inheritLeadingComments.js | 12 + .../comments/inheritLeadingComments.js.map | 1 + .../lib/comments/inheritTrailingComments.js | 12 + .../comments/inheritTrailingComments.js.map | 1 + .../types/lib/comments/inheritsComments.js | 17 + .../lib/comments/inheritsComments.js.map | 1 + .../types/lib/comments/removeComments.js | 15 + .../types/lib/comments/removeComments.js.map | 1 + .../types/lib/constants/generated/index.js | 59 + .../lib/constants/generated/index.js.map | 1 + .../@babel/types/lib/constants/index.js | 31 + .../@babel/types/lib/constants/index.js.map | 1 + .../types/lib/converters/ensureBlock.js | 14 + .../types/lib/converters/ensureBlock.js.map | 1 + .../converters/gatherSequenceExpressions.js | 66 + .../gatherSequenceExpressions.js.map | 1 + .../lib/converters/toBindingIdentifierName.js | 14 + .../converters/toBindingIdentifierName.js.map | 1 + .../@babel/types/lib/converters/toBlock.js | 29 + .../types/lib/converters/toBlock.js.map | 1 + .../types/lib/converters/toComputedKey.js | 14 + .../types/lib/converters/toComputedKey.js.map | 1 + .../types/lib/converters/toExpression.js | 27 + .../types/lib/converters/toExpression.js.map | 1 + .../types/lib/converters/toIdentifier.js | 25 + .../types/lib/converters/toIdentifier.js.map | 1 + .../@babel/types/lib/converters/toKeyAlias.js | 38 + .../types/lib/converters/toKeyAlias.js.map | 1 + .../lib/converters/toSequenceExpression.js | 20 + .../converters/toSequenceExpression.js.map | 1 + .../types/lib/converters/toStatement.js | 39 + .../types/lib/converters/toStatement.js.map | 1 + .../types/lib/converters/valueToNode.js | 76 + .../types/lib/converters/valueToNode.js.map | 1 + .../@babel/types/lib/definitions/core.js | 1635 + .../@babel/types/lib/definitions/core.js.map | 1 + .../lib/definitions/deprecated-aliases.js | 11 + .../lib/definitions/deprecated-aliases.js.map | 1 + .../types/lib/definitions/experimental.js | 134 + .../types/lib/definitions/experimental.js.map | 1 + .../@babel/types/lib/definitions/flow.js | 495 + .../@babel/types/lib/definitions/flow.js.map | 1 + .../@babel/types/lib/definitions/index.js | 87 + .../@babel/types/lib/definitions/index.js.map | 1 + .../@babel/types/lib/definitions/jsx.js | 157 + .../@babel/types/lib/definitions/jsx.js.map | 1 + .../@babel/types/lib/definitions/misc.js | 33 + .../@babel/types/lib/definitions/misc.js.map | 1 + .../types/lib/definitions/placeholders.js | 27 + .../types/lib/definitions/placeholders.js.map | 1 + .../types/lib/definitions/typescript.js | 523 + .../types/lib/definitions/typescript.js.map | 1 + .../@babel/types/lib/definitions/utils.js | 270 + .../@babel/types/lib/definitions/utils.js.map | 1 + .../@babel/types/lib/index-legacy.d.ts | 2785 + .../node_modules/@babel/types/lib/index.d.ts | 3285 + .../node_modules/@babel/types/lib/index.js | 595 + .../@babel/types/lib/index.js.flow | 2639 + .../@babel/types/lib/index.js.map | 1 + .../modifications/appendToMemberExpression.js | 15 + .../appendToMemberExpression.js.map | 1 + .../flow/removeTypeDuplicates.js | 65 + .../flow/removeTypeDuplicates.js.map | 1 + .../types/lib/modifications/inherits.js | 28 + .../types/lib/modifications/inherits.js.map | 1 + .../prependToMemberExpression.js | 17 + .../prependToMemberExpression.js.map | 1 + .../lib/modifications/removeProperties.js | 24 + .../lib/modifications/removeProperties.js.map | 1 + .../lib/modifications/removePropertiesDeep.js | 14 + .../modifications/removePropertiesDeep.js.map | 1 + .../typescript/removeTypeDuplicates.js | 66 + .../typescript/removeTypeDuplicates.js.map | 1 + .../retrievers/getAssignmentIdentifiers.js | 48 + .../getAssignmentIdentifiers.js.map | 1 + .../lib/retrievers/getBindingIdentifiers.js | 102 + .../retrievers/getBindingIdentifiers.js.map | 1 + .../types/lib/retrievers/getFunctionName.js | 63 + .../lib/retrievers/getFunctionName.js.map | 1 + .../retrievers/getOuterBindingIdentifiers.js | 13 + .../getOuterBindingIdentifiers.js.map | 1 + .../@babel/types/lib/traverse/traverse.js | 50 + .../@babel/types/lib/traverse/traverse.js.map | 1 + .../@babel/types/lib/traverse/traverseFast.js | 26 + .../types/lib/traverse/traverseFast.js.map | 1 + .../types/lib/utils/deprecationWarning.js | 44 + .../types/lib/utils/deprecationWarning.js.map | 1 + .../@babel/types/lib/utils/inherit.js | 13 + .../@babel/types/lib/utils/inherit.js.map | 1 + .../react/cleanJSXElementLiteralChild.js | 40 + .../react/cleanJSXElementLiteralChild.js.map | 1 + .../@babel/types/lib/utils/shallowEqual.js | 17 + .../types/lib/utils/shallowEqual.js.map | 1 + .../validators/buildMatchMemberExpression.js | 13 + .../buildMatchMemberExpression.js.map | 1 + .../types/lib/validators/generated/index.js | 2769 + .../lib/validators/generated/index.js.map | 1 + .../@babel/types/lib/validators/is.js | 27 + .../@babel/types/lib/validators/is.js.map | 1 + .../@babel/types/lib/validators/isBinding.js | 27 + .../types/lib/validators/isBinding.js.map | 1 + .../types/lib/validators/isBlockScoped.js | 13 + .../types/lib/validators/isBlockScoped.js.map | 1 + .../types/lib/validators/isImmutable.js | 21 + .../types/lib/validators/isImmutable.js.map | 1 + .../@babel/types/lib/validators/isLet.js | 13 + .../@babel/types/lib/validators/isLet.js.map | 1 + .../@babel/types/lib/validators/isNode.js | 12 + .../@babel/types/lib/validators/isNode.js.map | 1 + .../types/lib/validators/isNodesEquivalent.js | 57 + .../lib/validators/isNodesEquivalent.js.map | 1 + .../types/lib/validators/isPlaceholderType.js | 19 + .../lib/validators/isPlaceholderType.js.map | 1 + .../types/lib/validators/isReferenced.js | 96 + .../types/lib/validators/isReferenced.js.map | 1 + .../@babel/types/lib/validators/isScope.js | 18 + .../types/lib/validators/isScope.js.map | 1 + .../lib/validators/isSpecifierDefault.js | 14 + .../lib/validators/isSpecifierDefault.js.map | 1 + .../@babel/types/lib/validators/isType.js | 22 + .../@babel/types/lib/validators/isType.js.map | 1 + .../lib/validators/isValidES3Identifier.js | 13 + .../validators/isValidES3Identifier.js.map | 1 + .../types/lib/validators/isValidIdentifier.js | 18 + .../lib/validators/isValidIdentifier.js.map | 1 + .../@babel/types/lib/validators/isVar.js | 15 + .../@babel/types/lib/validators/isVar.js.map | 1 + .../types/lib/validators/matchesPattern.js | 36 + .../lib/validators/matchesPattern.js.map | 1 + .../types/lib/validators/react/isCompatTag.js | 11 + .../lib/validators/react/isCompatTag.js.map | 1 + .../lib/validators/react/isReactComponent.js | 11 + .../validators/react/isReactComponent.js.map | 1 + .../@babel/types/lib/validators/validate.js | 42 + .../types/lib/validators/validate.js.map | 1 + .../node_modules/@babel/types/package.json | 39 + .../@element-plus/icons-vue/LICENSE | 21 + .../@element-plus/icons-vue/dist/global.cjs | 6966 ++ .../icons-vue/dist/global.iife.js | 6986 ++ .../icons-vue/dist/global.iife.min.js | 3 + .../@element-plus/icons-vue/dist/global.js | 7538 +++ .../icons-vue/dist/global.min.cjs | 3 + .../icons-vue/dist/global.min.js | 3 + .../@element-plus/icons-vue/dist/index.cjs | 6660 ++ .../icons-vue/dist/index.iife.js | 6680 ++ .../icons-vue/dist/index.iife.min.js | 3 + .../@element-plus/icons-vue/dist/index.js | 7227 +++ .../icons-vue/dist/index.min.cjs | 3 + .../@element-plus/icons-vue/dist/index.min.js | 3 + .../types/components/add-location.vue.d.ts | 2 + .../dist/types/components/aim.vue.d.ts | 2 + .../types/components/alarm-clock.vue.d.ts | 2 + .../dist/types/components/apple.vue.d.ts | 2 + .../types/components/arrow-down-bold.vue.d.ts | 2 + .../dist/types/components/arrow-down.vue.d.ts | 2 + .../types/components/arrow-left-bold.vue.d.ts | 2 + .../dist/types/components/arrow-left.vue.d.ts | 2 + .../components/arrow-right-bold.vue.d.ts | 2 + .../types/components/arrow-right.vue.d.ts | 2 + .../types/components/arrow-up-bold.vue.d.ts | 2 + .../dist/types/components/arrow-up.vue.d.ts | 2 + .../dist/types/components/avatar.vue.d.ts | 2 + .../dist/types/components/back.vue.d.ts | 2 + .../dist/types/components/baseball.vue.d.ts | 2 + .../dist/types/components/basketball.vue.d.ts | 2 + .../types/components/bell-filled.vue.d.ts | 2 + .../dist/types/components/bell.vue.d.ts | 2 + .../dist/types/components/bicycle.vue.d.ts | 2 + .../types/components/bottom-left.vue.d.ts | 2 + .../types/components/bottom-right.vue.d.ts | 2 + .../dist/types/components/bottom.vue.d.ts | 2 + .../dist/types/components/bowl.vue.d.ts | 2 + .../dist/types/components/box.vue.d.ts | 2 + .../dist/types/components/briefcase.vue.d.ts | 2 + .../types/components/brush-filled.vue.d.ts | 2 + .../dist/types/components/brush.vue.d.ts | 2 + .../dist/types/components/burger.vue.d.ts | 2 + .../dist/types/components/calendar.vue.d.ts | 2 + .../types/components/camera-filled.vue.d.ts | 2 + .../dist/types/components/camera.vue.d.ts | 2 + .../types/components/caret-bottom.vue.d.ts | 2 + .../dist/types/components/caret-left.vue.d.ts | 2 + .../types/components/caret-right.vue.d.ts | 2 + .../dist/types/components/caret-top.vue.d.ts | 2 + .../dist/types/components/cellphone.vue.d.ts | 2 + .../types/components/chat-dot-round.vue.d.ts | 2 + .../types/components/chat-dot-square.vue.d.ts | 2 + .../types/components/chat-line-round.vue.d.ts | 2 + .../components/chat-line-square.vue.d.ts | 2 + .../dist/types/components/chat-round.vue.d.ts | 2 + .../types/components/chat-square.vue.d.ts | 2 + .../dist/types/components/check.vue.d.ts | 2 + .../dist/types/components/checked.vue.d.ts | 2 + .../dist/types/components/cherry.vue.d.ts | 2 + .../dist/types/components/chicken.vue.d.ts | 2 + .../types/components/chrome-filled.vue.d.ts | 2 + .../components/circle-check-filled.vue.d.ts | 2 + .../types/components/circle-check.vue.d.ts | 2 + .../components/circle-close-filled.vue.d.ts | 2 + .../types/components/circle-close.vue.d.ts | 2 + .../components/circle-plus-filled.vue.d.ts | 2 + .../types/components/circle-plus.vue.d.ts | 2 + .../dist/types/components/clock.vue.d.ts | 2 + .../dist/types/components/close-bold.vue.d.ts | 2 + .../dist/types/components/close.vue.d.ts | 2 + .../dist/types/components/cloudy.vue.d.ts | 2 + .../dist/types/components/coffee-cup.vue.d.ts | 2 + .../dist/types/components/coffee.vue.d.ts | 2 + .../dist/types/components/coin.vue.d.ts | 2 + .../dist/types/components/cold-drink.vue.d.ts | 2 + .../types/components/collection-tag.vue.d.ts | 2 + .../dist/types/components/collection.vue.d.ts | 2 + .../dist/types/components/comment.vue.d.ts | 2 + .../dist/types/components/compass.vue.d.ts | 2 + .../dist/types/components/connection.vue.d.ts | 2 + .../dist/types/components/coordinate.vue.d.ts | 2 + .../types/components/copy-document.vue.d.ts | 2 + .../dist/types/components/cpu.vue.d.ts | 2 + .../types/components/credit-card.vue.d.ts | 2 + .../dist/types/components/crop.vue.d.ts | 2 + .../types/components/d-arrow-left.vue.d.ts | 2 + .../types/components/d-arrow-right.vue.d.ts | 2 + .../dist/types/components/d-caret.vue.d.ts | 2 + .../types/components/data-analysis.vue.d.ts | 2 + .../dist/types/components/data-board.vue.d.ts | 2 + .../dist/types/components/data-line.vue.d.ts | 2 + .../types/components/delete-filled.vue.d.ts | 2 + .../types/components/delete-location.vue.d.ts | 2 + .../dist/types/components/delete.vue.d.ts | 2 + .../dist/types/components/dessert.vue.d.ts | 2 + .../dist/types/components/discount.vue.d.ts | 2 + .../dist/types/components/dish-dot.vue.d.ts | 2 + .../dist/types/components/dish.vue.d.ts | 2 + .../types/components/document-add.vue.d.ts | 2 + .../components/document-checked.vue.d.ts | 2 + .../types/components/document-copy.vue.d.ts | 2 + .../types/components/document-delete.vue.d.ts | 2 + .../types/components/document-remove.vue.d.ts | 2 + .../dist/types/components/document.vue.d.ts | 2 + .../dist/types/components/download.vue.d.ts | 2 + .../dist/types/components/drizzling.vue.d.ts | 2 + .../dist/types/components/edit-pen.vue.d.ts | 2 + .../dist/types/components/edit.vue.d.ts | 2 + .../types/components/eleme-filled.vue.d.ts | 2 + .../dist/types/components/eleme.vue.d.ts | 2 + .../types/components/element-plus.vue.d.ts | 2 + .../dist/types/components/expand.vue.d.ts | 2 + .../dist/types/components/failed.vue.d.ts | 2 + .../dist/types/components/female.vue.d.ts | 2 + .../dist/types/components/files.vue.d.ts | 2 + .../dist/types/components/film.vue.d.ts | 2 + .../dist/types/components/filter.vue.d.ts | 2 + .../dist/types/components/finished.vue.d.ts | 2 + .../types/components/first-aid-kit.vue.d.ts | 2 + .../dist/types/components/flag.vue.d.ts | 2 + .../dist/types/components/fold.vue.d.ts | 2 + .../dist/types/components/folder-add.vue.d.ts | 2 + .../types/components/folder-checked.vue.d.ts | 2 + .../types/components/folder-delete.vue.d.ts | 2 + .../types/components/folder-opened.vue.d.ts | 2 + .../types/components/folder-remove.vue.d.ts | 2 + .../dist/types/components/folder.vue.d.ts | 2 + .../dist/types/components/food.vue.d.ts | 2 + .../dist/types/components/football.vue.d.ts | 2 + .../dist/types/components/fork-spoon.vue.d.ts | 2 + .../dist/types/components/fries.vue.d.ts | 2 + .../types/components/full-screen.vue.d.ts | 2 + .../types/components/goblet-full.vue.d.ts | 2 + .../components/goblet-square-full.vue.d.ts | 2 + .../types/components/goblet-square.vue.d.ts | 2 + .../dist/types/components/goblet.vue.d.ts | 2 + .../dist/types/components/gold-medal.vue.d.ts | 2 + .../types/components/goods-filled.vue.d.ts | 2 + .../dist/types/components/goods.vue.d.ts | 2 + .../dist/types/components/grape.vue.d.ts | 2 + .../dist/types/components/grid.vue.d.ts | 2 + .../dist/types/components/guide.vue.d.ts | 2 + .../dist/types/components/handbag.vue.d.ts | 2 + .../dist/types/components/headset.vue.d.ts | 2 + .../types/components/help-filled.vue.d.ts | 2 + .../dist/types/components/help.vue.d.ts | 2 + .../dist/types/components/hide.vue.d.ts | 2 + .../dist/types/components/histogram.vue.d.ts | 2 + .../types/components/home-filled.vue.d.ts | 2 + .../dist/types/components/hot-water.vue.d.ts | 2 + .../dist/types/components/house.vue.d.ts | 2 + .../types/components/ice-cream-round.vue.d.ts | 2 + .../components/ice-cream-square.vue.d.ts | 2 + .../dist/types/components/ice-cream.vue.d.ts | 2 + .../dist/types/components/ice-drink.vue.d.ts | 2 + .../dist/types/components/ice-tea.vue.d.ts | 2 + .../dist/types/components/index.d.ts | 293 + .../types/components/info-filled.vue.d.ts | 2 + .../dist/types/components/iphone.vue.d.ts | 2 + .../dist/types/components/key.vue.d.ts | 2 + .../dist/types/components/knife-fork.vue.d.ts | 2 + .../dist/types/components/lightning.vue.d.ts | 2 + .../dist/types/components/link.vue.d.ts | 2 + .../dist/types/components/list.vue.d.ts | 2 + .../dist/types/components/loading.vue.d.ts | 2 + .../types/components/location-filled.vue.d.ts | 2 + .../components/location-information.vue.d.ts | 2 + .../dist/types/components/location.vue.d.ts | 2 + .../dist/types/components/lock.vue.d.ts | 2 + .../dist/types/components/lollipop.vue.d.ts | 2 + .../types/components/magic-stick.vue.d.ts | 2 + .../dist/types/components/magnet.vue.d.ts | 2 + .../dist/types/components/male.vue.d.ts | 2 + .../dist/types/components/management.vue.d.ts | 2 + .../types/components/map-location.vue.d.ts | 2 + .../dist/types/components/medal.vue.d.ts | 2 + .../dist/types/components/memo.vue.d.ts | 2 + .../dist/types/components/menu.vue.d.ts | 2 + .../types/components/message-box.vue.d.ts | 2 + .../dist/types/components/message.vue.d.ts | 2 + .../dist/types/components/mic.vue.d.ts | 2 + .../dist/types/components/microphone.vue.d.ts | 2 + .../dist/types/components/milk-tea.vue.d.ts | 2 + .../dist/types/components/minus.vue.d.ts | 2 + .../dist/types/components/money.vue.d.ts | 2 + .../dist/types/components/monitor.vue.d.ts | 2 + .../dist/types/components/moon-night.vue.d.ts | 2 + .../dist/types/components/moon.vue.d.ts | 2 + .../types/components/more-filled.vue.d.ts | 2 + .../dist/types/components/more.vue.d.ts | 2 + .../types/components/mostly-cloudy.vue.d.ts | 2 + .../dist/types/components/mouse.vue.d.ts | 2 + .../dist/types/components/mug.vue.d.ts | 2 + .../components/mute-notification.vue.d.ts | 2 + .../dist/types/components/mute.vue.d.ts | 2 + .../dist/types/components/no-smoking.vue.d.ts | 2 + .../dist/types/components/notebook.vue.d.ts | 2 + .../types/components/notification.vue.d.ts | 2 + .../dist/types/components/odometer.vue.d.ts | 2 + .../types/components/office-building.vue.d.ts | 2 + .../dist/types/components/open.vue.d.ts | 2 + .../dist/types/components/operation.vue.d.ts | 2 + .../types/components/opportunity.vue.d.ts | 2 + .../dist/types/components/orange.vue.d.ts | 2 + .../dist/types/components/paperclip.vue.d.ts | 2 + .../types/components/partly-cloudy.vue.d.ts | 2 + .../dist/types/components/pear.vue.d.ts | 2 + .../types/components/phone-filled.vue.d.ts | 2 + .../dist/types/components/phone.vue.d.ts | 2 + .../types/components/picture-filled.vue.d.ts | 2 + .../types/components/picture-rounded.vue.d.ts | 2 + .../dist/types/components/picture.vue.d.ts | 2 + .../dist/types/components/pie-chart.vue.d.ts | 2 + .../dist/types/components/place.vue.d.ts | 2 + .../dist/types/components/platform.vue.d.ts | 2 + .../dist/types/components/plus.vue.d.ts | 2 + .../dist/types/components/pointer.vue.d.ts | 2 + .../dist/types/components/position.vue.d.ts | 2 + .../dist/types/components/postcard.vue.d.ts | 2 + .../dist/types/components/pouring.vue.d.ts | 2 + .../dist/types/components/present.vue.d.ts | 2 + .../dist/types/components/price-tag.vue.d.ts | 2 + .../dist/types/components/printer.vue.d.ts | 2 + .../dist/types/components/promotion.vue.d.ts | 2 + .../types/components/quartz-watch.vue.d.ts | 2 + .../types/components/question-filled.vue.d.ts | 2 + .../dist/types/components/rank.vue.d.ts | 2 + .../types/components/reading-lamp.vue.d.ts | 2 + .../dist/types/components/reading.vue.d.ts | 2 + .../types/components/refresh-left.vue.d.ts | 2 + .../types/components/refresh-right.vue.d.ts | 2 + .../dist/types/components/refresh.vue.d.ts | 2 + .../types/components/refrigerator.vue.d.ts | 2 + .../types/components/remove-filled.vue.d.ts | 2 + .../dist/types/components/remove.vue.d.ts | 2 + .../dist/types/components/right.vue.d.ts | 2 + .../components/scale-to-original.vue.d.ts | 2 + .../dist/types/components/school.vue.d.ts | 2 + .../dist/types/components/scissor.vue.d.ts | 2 + .../dist/types/components/search.vue.d.ts | 2 + .../dist/types/components/select.vue.d.ts | 2 + .../dist/types/components/sell.vue.d.ts | 2 + .../types/components/semi-select.vue.d.ts | 2 + .../dist/types/components/service.vue.d.ts | 2 + .../dist/types/components/set-up.vue.d.ts | 2 + .../dist/types/components/setting.vue.d.ts | 2 + .../dist/types/components/share.vue.d.ts | 2 + .../dist/types/components/ship.vue.d.ts | 2 + .../dist/types/components/shop.vue.d.ts | 2 + .../types/components/shopping-bag.vue.d.ts | 2 + .../components/shopping-cart-full.vue.d.ts | 2 + .../types/components/shopping-cart.vue.d.ts | 2 + .../components/shopping-trolley.vue.d.ts | 2 + .../dist/types/components/smoking.vue.d.ts | 2 + .../dist/types/components/soccer.vue.d.ts | 2 + .../dist/types/components/sold-out.vue.d.ts | 2 + .../dist/types/components/sort-down.vue.d.ts | 2 + .../dist/types/components/sort-up.vue.d.ts | 2 + .../dist/types/components/sort.vue.d.ts | 2 + .../dist/types/components/stamp.vue.d.ts | 2 + .../types/components/star-filled.vue.d.ts | 2 + .../dist/types/components/star.vue.d.ts | 2 + .../dist/types/components/stopwatch.vue.d.ts | 2 + .../types/components/success-filled.vue.d.ts | 2 + .../dist/types/components/sugar.vue.d.ts | 2 + .../types/components/suitcase-line.vue.d.ts | 2 + .../dist/types/components/suitcase.vue.d.ts | 2 + .../dist/types/components/sunny.vue.d.ts | 2 + .../dist/types/components/sunrise.vue.d.ts | 2 + .../dist/types/components/sunset.vue.d.ts | 2 + .../types/components/switch-button.vue.d.ts | 2 + .../types/components/switch-filled.vue.d.ts | 2 + .../dist/types/components/switch.vue.d.ts | 2 + .../types/components/takeaway-box.vue.d.ts | 2 + .../dist/types/components/ticket.vue.d.ts | 2 + .../dist/types/components/tickets.vue.d.ts | 2 + .../dist/types/components/timer.vue.d.ts | 2 + .../types/components/toilet-paper.vue.d.ts | 2 + .../dist/types/components/tools.vue.d.ts | 2 + .../dist/types/components/top-left.vue.d.ts | 2 + .../dist/types/components/top-right.vue.d.ts | 2 + .../dist/types/components/top.vue.d.ts | 2 + .../types/components/trend-charts.vue.d.ts | 2 + .../types/components/trophy-base.vue.d.ts | 2 + .../dist/types/components/trophy.vue.d.ts | 2 + .../dist/types/components/turn-off.vue.d.ts | 2 + .../dist/types/components/umbrella.vue.d.ts | 2 + .../dist/types/components/unlock.vue.d.ts | 2 + .../types/components/upload-filled.vue.d.ts | 2 + .../dist/types/components/upload.vue.d.ts | 2 + .../types/components/user-filled.vue.d.ts | 2 + .../dist/types/components/user.vue.d.ts | 2 + .../dist/types/components/van.vue.d.ts | 2 + .../components/video-camera-filled.vue.d.ts | 2 + .../types/components/video-camera.vue.d.ts | 2 + .../types/components/video-pause.vue.d.ts | 2 + .../dist/types/components/video-play.vue.d.ts | 2 + .../dist/types/components/view.vue.d.ts | 2 + .../types/components/wallet-filled.vue.d.ts | 2 + .../dist/types/components/wallet.vue.d.ts | 2 + .../components/warn-triangle-filled.vue.d.ts | 2 + .../types/components/warning-filled.vue.d.ts | 2 + .../dist/types/components/warning.vue.d.ts | 2 + .../dist/types/components/watch.vue.d.ts | 2 + .../dist/types/components/watermelon.vue.d.ts | 2 + .../dist/types/components/wind-power.vue.d.ts | 2 + .../dist/types/components/zoom-in.vue.d.ts | 2 + .../dist/types/components/zoom-out.vue.d.ts | 2 + .../icons-vue/dist/types/global.d.ts | 10 + .../icons-vue/dist/types/index.d.ts | 1 + .../@element-plus/icons-vue/package.json | 84 + .../@jridgewell/sourcemap-codec/LICENSE | 21 + .../@jridgewell/sourcemap-codec/README.md | 264 + .../sourcemap-codec/dist/sourcemap-codec.mjs | 424 + .../dist/sourcemap-codec.mjs.map | 1 + .../dist/sourcemap-codec.umd.js | 439 + .../dist/sourcemap-codec.umd.js.map | 1 + .../sourcemap-codec/dist/types/scopes.d.ts | 49 + .../dist/types/sourcemap-codec.d.ts | 8 + .../sourcemap-codec/dist/types/strings.d.ts | 15 + .../sourcemap-codec/dist/types/vlq.d.ts | 6 + .../@jridgewell/sourcemap-codec/package.json | 75 + .../node_modules/@vue/compiler-core/LICENSE | 21 + .../node_modules/@vue/compiler-core/README.md | 1 + .../compiler-core/dist/compiler-core.cjs.js | 6813 ++ .../dist/compiler-core.cjs.prod.js | 6690 ++ .../compiler-core/dist/compiler-core.d.ts | 1091 + .../dist/compiler-core.esm-bundler.js | 5790 ++ .../node_modules/@vue/compiler-core/index.js | 7 + .../@vue/compiler-core/package.json | 58 + .../node_modules/@vue/compiler-dom/LICENSE | 21 + .../node_modules/@vue/compiler-dom/README.md | 1 + .../compiler-dom/dist/compiler-dom.cjs.js | 928 + .../dist/compiler-dom.cjs.prod.js | 686 + .../@vue/compiler-dom/dist/compiler-dom.d.ts | 45 + .../dist/compiler-dom.esm-browser.js | 6597 ++ .../dist/compiler-dom.esm-browser.prod.js | 11 + .../dist/compiler-dom.esm-bundler.js | 687 + .../compiler-dom/dist/compiler-dom.global.js | 6761 ++ .../dist/compiler-dom.global.prod.js | 11 + .../node_modules/@vue/compiler-dom/index.js | 7 + .../@vue/compiler-dom/package.json | 57 + .../node_modules/@vue/compiler-sfc/LICENSE | 21 + .../node_modules/@vue/compiler-sfc/README.md | 80 + .../compiler-sfc/dist/compiler-sfc.cjs.js | 24970 ++++++++ .../@vue/compiler-sfc/dist/compiler-sfc.d.ts | 484 + .../dist/compiler-sfc.esm-browser.js | 53043 ++++++++++++++++ .../@vue/compiler-sfc/package.json | 67 + .../node_modules/@vue/compiler-ssr/LICENSE | 21 + .../node_modules/@vue/compiler-ssr/README.md | 1 + .../compiler-ssr/dist/compiler-ssr.cjs.js | 1404 + .../@vue/compiler-ssr/dist/compiler-ssr.d.ts | 4 + .../@vue/compiler-ssr/package.json | 34 + vuetest/node_modules/@vue/reactivity/LICENSE | 21 + .../node_modules/@vue/reactivity/README.md | 19 + .../@vue/reactivity/dist/reactivity.cjs.js | 1939 + .../reactivity/dist/reactivity.cjs.prod.js | 1789 + .../@vue/reactivity/dist/reactivity.d.ts | 754 + .../reactivity/dist/reactivity.esm-browser.js | 1938 + .../dist/reactivity.esm-browser.prod.js | 5 + .../reactivity/dist/reactivity.esm-bundler.js | 1896 + .../@vue/reactivity/dist/reactivity.global.js | 1994 + .../reactivity/dist/reactivity.global.prod.js | 5 + vuetest/node_modules/@vue/reactivity/index.js | 7 + .../node_modules/@vue/reactivity/package.json | 55 + .../node_modules/@vue/runtime-core/LICENSE | 21 + .../node_modules/@vue/runtime-core/README.md | 28 + .../runtime-core/dist/runtime-core.cjs.js | 8493 +++ .../dist/runtime-core.cjs.prod.js | 6654 ++ .../@vue/runtime-core/dist/runtime-core.d.ts | 1832 + .../dist/runtime-core.esm-bundler.js | 8419 +++ .../node_modules/@vue/runtime-core/index.js | 7 + .../@vue/runtime-core/package.json | 52 + vuetest/node_modules/@vue/runtime-dom/LICENSE | 21 + .../node_modules/@vue/runtime-dom/README.md | 13 + .../@vue/runtime-dom/dist/runtime-dom.cjs.js | 1820 + .../runtime-dom/dist/runtime-dom.cjs.prod.js | 1669 + .../@vue/runtime-dom/dist/runtime-dom.d.ts | 1395 + .../dist/runtime-dom.esm-browser.js | 12332 ++++ .../dist/runtime-dom.esm-browser.prod.js | 5 + .../dist/runtime-dom.esm-bundler.js | 1860 + .../runtime-dom/dist/runtime-dom.global.js | 12383 ++++ .../dist/runtime-dom.global.prod.js | 5 + .../node_modules/@vue/runtime-dom/index.js | 7 + .../@vue/runtime-dom/package.json | 60 + .../node_modules/@vue/server-renderer/LICENSE | 21 + .../@vue/server-renderer/README.md | 178 + .../dist/server-renderer.cjs.js | 1129 + .../dist/server-renderer.cjs.prod.js | 857 + .../server-renderer/dist/server-renderer.d.ts | 65 + .../dist/server-renderer.esm-browser.js | 8566 +++ .../dist/server-renderer.esm-browser.prod.js | 5 + .../dist/server-renderer.esm-bundler.js | 1224 + .../@vue/server-renderer/index.js | 7 + .../@vue/server-renderer/package.json | 55 + vuetest/node_modules/@vue/shared/LICENSE | 21 + vuetest/node_modules/@vue/shared/README.md | 3 + .../@vue/shared/dist/shared.cjs.js | 594 + .../@vue/shared/dist/shared.cjs.prod.js | 594 + .../node_modules/@vue/shared/dist/shared.d.ts | 328 + .../@vue/shared/dist/shared.esm-bundler.js | 519 + vuetest/node_modules/@vue/shared/index.js | 7 + vuetest/node_modules/@vue/shared/package.json | 47 + vuetest/node_modules/csstype/LICENSE | 19 + vuetest/node_modules/csstype/README.md | 277 + vuetest/node_modules/csstype/index.d.ts | 21297 +++++++ vuetest/node_modules/csstype/index.js.flow | 6612 ++ vuetest/node_modules/csstype/package.json | 66 + vuetest/node_modules/entities/LICENSE | 11 + vuetest/node_modules/entities/lib/decode.d.ts | 211 + .../node_modules/entities/lib/decode.d.ts.map | 1 + vuetest/node_modules/entities/lib/decode.js | 536 + .../node_modules/entities/lib/decode.js.map | 1 + .../entities/lib/decode_codepoint.d.ts | 19 + .../entities/lib/decode_codepoint.d.ts.map | 1 + .../entities/lib/decode_codepoint.js | 76 + .../entities/lib/decode_codepoint.js.map | 1 + vuetest/node_modules/entities/lib/encode.d.ts | 22 + .../node_modules/entities/lib/encode.d.ts.map | 1 + vuetest/node_modules/entities/lib/encode.js | 77 + .../node_modules/entities/lib/encode.js.map | 1 + vuetest/node_modules/entities/lib/escape.d.ts | 43 + .../node_modules/entities/lib/escape.d.ts.map | 1 + vuetest/node_modules/entities/lib/escape.js | 122 + .../node_modules/entities/lib/escape.js.map | 1 + .../node_modules/entities/lib/esm/decode.d.ts | 211 + .../entities/lib/esm/decode.d.ts.map | 1 + .../node_modules/entities/lib/esm/decode.js | 496 + .../entities/lib/esm/decode.js.map | 1 + .../entities/lib/esm/decode_codepoint.d.ts | 19 + .../lib/esm/decode_codepoint.d.ts.map | 1 + .../entities/lib/esm/decode_codepoint.js | 71 + .../entities/lib/esm/decode_codepoint.js.map | 1 + .../node_modules/entities/lib/esm/encode.d.ts | 22 + .../entities/lib/esm/encode.d.ts.map | 1 + .../node_modules/entities/lib/esm/encode.js | 69 + .../entities/lib/esm/encode.js.map | 1 + .../node_modules/entities/lib/esm/escape.d.ts | 43 + .../entities/lib/esm/escape.d.ts.map | 1 + .../node_modules/entities/lib/esm/escape.js | 116 + .../entities/lib/esm/escape.js.map | 1 + .../lib/esm/generated/decode-data-html.d.ts | 3 + .../esm/generated/decode-data-html.d.ts.map | 1 + .../lib/esm/generated/decode-data-html.js | 7 + .../lib/esm/generated/decode-data-html.js.map | 1 + .../lib/esm/generated/decode-data-xml.d.ts | 3 + .../esm/generated/decode-data-xml.d.ts.map | 1 + .../lib/esm/generated/decode-data-xml.js | 7 + .../lib/esm/generated/decode-data-xml.js.map | 1 + .../lib/esm/generated/encode-html.d.ts | 8 + .../lib/esm/generated/encode-html.d.ts.map | 1 + .../entities/lib/esm/generated/encode-html.js | 10 + .../lib/esm/generated/encode-html.js.map | 1 + .../node_modules/entities/lib/esm/index.d.ts | 96 + .../entities/lib/esm/index.d.ts.map | 1 + .../node_modules/entities/lib/esm/index.js | 99 + .../entities/lib/esm/index.js.map | 1 + .../entities/lib/esm/package.json | 1 + .../lib/generated/decode-data-html.d.ts | 3 + .../lib/generated/decode-data-html.d.ts.map | 1 + .../lib/generated/decode-data-html.js | 9 + .../lib/generated/decode-data-html.js.map | 1 + .../lib/generated/decode-data-xml.d.ts | 3 + .../lib/generated/decode-data-xml.d.ts.map | 1 + .../entities/lib/generated/decode-data-xml.js | 9 + .../lib/generated/decode-data-xml.js.map | 1 + .../entities/lib/generated/encode-html.d.ts | 8 + .../lib/generated/encode-html.d.ts.map | 1 + .../entities/lib/generated/encode-html.js | 12 + .../entities/lib/generated/encode-html.js.map | 1 + vuetest/node_modules/entities/lib/index.d.ts | 96 + .../node_modules/entities/lib/index.d.ts.map | 1 + vuetest/node_modules/entities/lib/index.js | 126 + .../node_modules/entities/lib/index.js.map | 1 + vuetest/node_modules/entities/package.json | 90 + vuetest/node_modules/entities/readme.md | 122 + .../node_modules/estree-walker/CHANGELOG.md | 92 + vuetest/node_modules/estree-walker/LICENSE | 7 + vuetest/node_modules/estree-walker/README.md | 48 + .../estree-walker/dist/esm/estree-walker.js | 333 + .../estree-walker/dist/esm/package.json | 1 + .../estree-walker/dist/umd/estree-walker.js | 344 + .../node_modules/estree-walker/package.json | 37 + .../node_modules/estree-walker/src/async.js | 118 + .../node_modules/estree-walker/src/index.js | 35 + .../estree-walker/src/package.json | 1 + .../node_modules/estree-walker/src/sync.js | 118 + .../node_modules/estree-walker/src/walker.js | 61 + .../estree-walker/types/async.d.ts | 53 + .../estree-walker/types/index.d.ts | 56 + .../estree-walker/types/sync.d.ts | 53 + .../estree-walker/types/tsconfig.tsbuildinfo | 345 + .../estree-walker/types/walker.d.ts | 37 + vuetest/node_modules/magic-string/LICENSE | 7 + vuetest/node_modules/magic-string/README.md | 324 + .../magic-string/dist/magic-string.cjs.d.ts | 289 + .../magic-string/dist/magic-string.cjs.js | 1575 + .../magic-string/dist/magic-string.cjs.js.map | 1 + .../magic-string/dist/magic-string.es.d.mts | 289 + .../magic-string/dist/magic-string.es.mjs | 1569 + .../magic-string/dist/magic-string.es.mjs.map | 1 + .../magic-string/dist/magic-string.umd.js | 1672 + .../magic-string/dist/magic-string.umd.js.map | 1 + .../node_modules/magic-string/package.json | 63 + .../node_modules/nanoid/.devcontainer.json | 23 + vuetest/node_modules/nanoid/LICENSE | 20 + vuetest/node_modules/nanoid/README.md | 554 + .../nanoid/async/index.browser.cjs | 69 + .../nanoid/async/index.browser.js | 69 + vuetest/node_modules/nanoid/async/index.cjs | 71 + vuetest/node_modules/nanoid/async/index.d.ts | 56 + vuetest/node_modules/nanoid/async/index.js | 71 + .../node_modules/nanoid/async/index.native.js | 57 + .../node_modules/nanoid/async/package.json | 12 + vuetest/node_modules/nanoid/bin/nanoid.cjs | 55 + vuetest/node_modules/nanoid/index.browser.cjs | 72 + vuetest/node_modules/nanoid/index.browser.js | 72 + vuetest/node_modules/nanoid/index.cjs | 85 + vuetest/node_modules/nanoid/index.d.cts | 91 + vuetest/node_modules/nanoid/index.d.ts | 91 + vuetest/node_modules/nanoid/index.js | 85 + vuetest/node_modules/nanoid/nanoid.js | 1 + .../node_modules/nanoid/non-secure/index.cjs | 34 + .../node_modules/nanoid/non-secure/index.d.ts | 33 + .../node_modules/nanoid/non-secure/index.js | 34 + .../nanoid/non-secure/package.json | 6 + vuetest/node_modules/nanoid/package.json | 88 + .../nanoid/url-alphabet/index.cjs | 7 + .../node_modules/nanoid/url-alphabet/index.js | 7 + .../nanoid/url-alphabet/package.json | 6 + vuetest/node_modules/picocolors/LICENSE | 15 + vuetest/node_modules/picocolors/README.md | 21 + vuetest/node_modules/picocolors/package.json | 25 + .../picocolors/picocolors.browser.js | 4 + .../node_modules/picocolors/picocolors.d.ts | 5 + vuetest/node_modules/picocolors/picocolors.js | 75 + vuetest/node_modules/picocolors/types.d.ts | 51 + vuetest/node_modules/postcss/LICENSE | 20 + vuetest/node_modules/postcss/README.md | 28 + vuetest/node_modules/postcss/lib/at-rule.d.ts | 140 + vuetest/node_modules/postcss/lib/at-rule.js | 25 + vuetest/node_modules/postcss/lib/comment.d.ts | 68 + vuetest/node_modules/postcss/lib/comment.js | 13 + .../node_modules/postcss/lib/container.d.ts | 483 + vuetest/node_modules/postcss/lib/container.js | 447 + .../postcss/lib/css-syntax-error.d.ts | 248 + .../postcss/lib/css-syntax-error.js | 133 + .../node_modules/postcss/lib/declaration.d.ts | 151 + .../node_modules/postcss/lib/declaration.js | 24 + .../node_modules/postcss/lib/document.d.ts | 69 + vuetest/node_modules/postcss/lib/document.js | 33 + .../node_modules/postcss/lib/fromJSON.d.ts | 9 + vuetest/node_modules/postcss/lib/fromJSON.js | 54 + vuetest/node_modules/postcss/lib/input.d.ts | 208 + vuetest/node_modules/postcss/lib/input.js | 251 + .../node_modules/postcss/lib/lazy-result.d.ts | 190 + .../node_modules/postcss/lib/lazy-result.js | 550 + vuetest/node_modules/postcss/lib/list.d.ts | 60 + vuetest/node_modules/postcss/lib/list.js | 58 + .../node_modules/postcss/lib/map-generator.js | 368 + .../postcss/lib/no-work-result.d.ts | 46 + .../postcss/lib/no-work-result.js | 138 + vuetest/node_modules/postcss/lib/node.d.ts | 541 + vuetest/node_modules/postcss/lib/node.js | 434 + vuetest/node_modules/postcss/lib/parse.d.ts | 9 + vuetest/node_modules/postcss/lib/parse.js | 42 + vuetest/node_modules/postcss/lib/parser.js | 609 + .../node_modules/postcss/lib/postcss.d.mts | 69 + vuetest/node_modules/postcss/lib/postcss.d.ts | 458 + vuetest/node_modules/postcss/lib/postcss.js | 101 + vuetest/node_modules/postcss/lib/postcss.mjs | 30 + .../postcss/lib/previous-map.d.ts | 81 + .../node_modules/postcss/lib/previous-map.js | 144 + .../node_modules/postcss/lib/processor.d.ts | 115 + vuetest/node_modules/postcss/lib/processor.js | 67 + vuetest/node_modules/postcss/lib/result.d.ts | 205 + vuetest/node_modules/postcss/lib/result.js | 42 + vuetest/node_modules/postcss/lib/root.d.ts | 87 + vuetest/node_modules/postcss/lib/root.js | 61 + vuetest/node_modules/postcss/lib/rule.d.ts | 126 + vuetest/node_modules/postcss/lib/rule.js | 27 + .../node_modules/postcss/lib/stringifier.d.ts | 46 + .../node_modules/postcss/lib/stringifier.js | 353 + .../node_modules/postcss/lib/stringify.d.ts | 9 + vuetest/node_modules/postcss/lib/stringify.js | 11 + vuetest/node_modules/postcss/lib/symbols.js | 5 + .../postcss/lib/terminal-highlight.js | 70 + vuetest/node_modules/postcss/lib/tokenize.js | 266 + vuetest/node_modules/postcss/lib/warn-once.js | 13 + vuetest/node_modules/postcss/lib/warning.d.ts | 147 + vuetest/node_modules/postcss/lib/warning.js | 37 + vuetest/node_modules/postcss/package.json | 88 + vuetest/node_modules/source-map-js/LICENSE | 28 + vuetest/node_modules/source-map-js/README.md | 765 + .../source-map-js/lib/array-set.js | 121 + .../source-map-js/lib/base64-vlq.js | 140 + .../node_modules/source-map-js/lib/base64.js | 67 + .../source-map-js/lib/binary-search.js | 111 + .../source-map-js/lib/mapping-list.js | 79 + .../source-map-js/lib/quick-sort.js | 132 + .../lib/source-map-consumer.d.ts | 1 + .../source-map-js/lib/source-map-consumer.js | 1188 + .../lib/source-map-generator.d.ts | 1 + .../source-map-js/lib/source-map-generator.js | 444 + .../source-map-js/lib/source-node.d.ts | 1 + .../source-map-js/lib/source-node.js | 413 + .../node_modules/source-map-js/lib/util.js | 594 + .../node_modules/source-map-js/package.json | 71 + .../source-map-js/source-map.d.ts | 104 + .../node_modules/source-map-js/source-map.js | 8 + vuetest/node_modules/vue/LICENSE | 21 + vuetest/node_modules/vue/README.md | 62 + .../vue/compiler-sfc/index.browser.js | 1 + .../vue/compiler-sfc/index.browser.mjs | 1 + .../node_modules/vue/compiler-sfc/index.d.mts | 1 + .../node_modules/vue/compiler-sfc/index.d.ts | 1 + .../node_modules/vue/compiler-sfc/index.js | 3 + .../node_modules/vue/compiler-sfc/index.mjs | 3 + .../vue/compiler-sfc/package.json | 4 + .../vue/compiler-sfc/register-ts.js | 3 + vuetest/node_modules/vue/dist/vue.cjs.js | 80 + vuetest/node_modules/vue/dist/vue.cjs.prod.js | 66 + vuetest/node_modules/vue/dist/vue.d.mts | 7 + vuetest/node_modules/vue/dist/vue.d.ts | 7 + .../node_modules/vue/dist/vue.esm-browser.js | 18216 ++++++ .../vue/dist/vue.esm-browser.prod.js | 9 + .../node_modules/vue/dist/vue.esm-bundler.js | 71 + vuetest/node_modules/vue/dist/vue.global.js | 18096 ++++++ .../node_modules/vue/dist/vue.global.prod.js | 9 + .../vue/dist/vue.runtime.esm-browser.js | 12355 ++++ .../vue/dist/vue.runtime.esm-browser.prod.js | 5 + .../vue/dist/vue.runtime.esm-bundler.js | 26 + .../vue/dist/vue.runtime.global.js | 12407 ++++ .../vue/dist/vue.runtime.global.prod.js | 5 + vuetest/node_modules/vue/index.js | 7 + vuetest/node_modules/vue/index.mjs | 1 + .../node_modules/vue/jsx-runtime/index.d.ts | 25 + vuetest/node_modules/vue/jsx-runtime/index.js | 15 + .../node_modules/vue/jsx-runtime/index.mjs | 12 + .../node_modules/vue/jsx-runtime/package.json | 5 + vuetest/node_modules/vue/jsx.d.ts | 22 + vuetest/node_modules/vue/package.json | 112 + .../vue/server-renderer/index.d.mts | 1 + .../vue/server-renderer/index.d.ts | 1 + .../node_modules/vue/server-renderer/index.js | 1 + .../vue/server-renderer/index.mjs | 1 + .../vue/server-renderer/package.json | 4 + vuetest/package-lock.json | 311 + vuetest/package.json | 5 + vuetest/springboot/.gitattributes | 2 + vuetest/springboot/.gitignore | 33 + vuetest/springboot/pom.xml | 154 + .../springboot/SpringbootApplication.java | 13 + .../example/springboot/config/CorsConfig.java | 31 + .../springboot/config/MybatisPlusConfig.java | 24 + .../springboot/config/SpringDocConfig.java | 18 + .../springboot/controller/UserController.java | 84 + .../com/example/springboot/entity/User.java | 126 + .../example/springboot/mapper/UserMapper.java | 16 + .../springboot/service/IUserService.java | 16 + .../service/impl/UserServiceImpl.java | 20 + .../springboot/utils/CodeGenerator.java | 39 + .../src/main/resources/application.yml | 26 + .../src/main/resources/mapper/UserMapper.xml | 5 + .../resources/templates/controller.java.vm | 87 + .../SpringbootApplicationTests.java | 13 + vuetest/vue1 | 1 + 885 files changed, 398610 insertions(+) create mode 100644 vuetest/.idea/.gitignore create mode 100644 vuetest/.idea/compiler.xml create mode 100644 vuetest/.idea/dataSources.xml create mode 100644 vuetest/.idea/encodings.xml create mode 100644 vuetest/.idea/jarRepositories.xml create mode 100644 vuetest/.idea/jsLibraryMappings.xml create mode 100644 vuetest/.idea/misc.xml create mode 100644 vuetest/.idea/modules.xml create mode 100644 vuetest/.idea/uiDesigner.xml create mode 100644 vuetest/.idea/vcs.xml create mode 100644 vuetest/.idea/vuetest.iml create mode 100644 vuetest/.vscode/settings.json create mode 100644 vuetest/node_modules/.bin/nanoid create mode 100644 vuetest/node_modules/.bin/nanoid.cmd create mode 100644 vuetest/node_modules/.bin/nanoid.ps1 create mode 100644 vuetest/node_modules/.bin/parser create mode 100644 vuetest/node_modules/.bin/parser.cmd create mode 100644 vuetest/node_modules/.bin/parser.ps1 create mode 100644 vuetest/node_modules/.package-lock.json create mode 100644 vuetest/node_modules/.vue-global-types/vue_3.3_false.d.ts create mode 100644 vuetest/node_modules/@babel/helper-string-parser/LICENSE create mode 100644 vuetest/node_modules/@babel/helper-string-parser/README.md create mode 100644 vuetest/node_modules/@babel/helper-string-parser/lib/index.js create mode 100644 vuetest/node_modules/@babel/helper-string-parser/lib/index.js.map create mode 100644 vuetest/node_modules/@babel/helper-string-parser/package.json create mode 100644 vuetest/node_modules/@babel/helper-validator-identifier/LICENSE create mode 100644 vuetest/node_modules/@babel/helper-validator-identifier/README.md create mode 100644 vuetest/node_modules/@babel/helper-validator-identifier/lib/identifier.js create mode 100644 vuetest/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map create mode 100644 vuetest/node_modules/@babel/helper-validator-identifier/lib/index.js create mode 100644 vuetest/node_modules/@babel/helper-validator-identifier/lib/index.js.map create mode 100644 vuetest/node_modules/@babel/helper-validator-identifier/lib/keyword.js create mode 100644 vuetest/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map create mode 100644 vuetest/node_modules/@babel/helper-validator-identifier/package.json create mode 100644 vuetest/node_modules/@babel/parser/CHANGELOG.md create mode 100644 vuetest/node_modules/@babel/parser/LICENSE create mode 100644 vuetest/node_modules/@babel/parser/README.md create mode 100644 vuetest/node_modules/@babel/parser/bin/babel-parser.js create mode 100644 vuetest/node_modules/@babel/parser/index.cjs create mode 100644 vuetest/node_modules/@babel/parser/lib/index.js create mode 100644 vuetest/node_modules/@babel/parser/lib/index.js.map create mode 100644 vuetest/node_modules/@babel/parser/package.json create mode 100644 vuetest/node_modules/@babel/parser/typings/babel-parser.d.ts create mode 100644 vuetest/node_modules/@babel/types/LICENSE create mode 100644 vuetest/node_modules/@babel/types/README.md create mode 100644 vuetest/node_modules/@babel/types/lib/asserts/assertNode.js create mode 100644 vuetest/node_modules/@babel/types/lib/asserts/assertNode.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/asserts/generated/index.js create mode 100644 vuetest/node_modules/@babel/types/lib/asserts/generated/index.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/ast-types/generated/index.js create mode 100644 vuetest/node_modules/@babel/types/lib/ast-types/generated/index.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js create mode 100644 vuetest/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js create mode 100644 vuetest/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/builders/generated/index.js create mode 100644 vuetest/node_modules/@babel/types/lib/builders/generated/index.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/builders/generated/uppercase.js create mode 100644 vuetest/node_modules/@babel/types/lib/builders/generated/uppercase.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/builders/productions.js create mode 100644 vuetest/node_modules/@babel/types/lib/builders/productions.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/builders/react/buildChildren.js create mode 100644 vuetest/node_modules/@babel/types/lib/builders/react/buildChildren.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js create mode 100644 vuetest/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/builders/validateNode.js create mode 100644 vuetest/node_modules/@babel/types/lib/builders/validateNode.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/clone/clone.js create mode 100644 vuetest/node_modules/@babel/types/lib/clone/clone.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/clone/cloneDeep.js create mode 100644 vuetest/node_modules/@babel/types/lib/clone/cloneDeep.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js create mode 100644 vuetest/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/clone/cloneNode.js create mode 100644 vuetest/node_modules/@babel/types/lib/clone/cloneNode.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js create mode 100644 vuetest/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/comments/addComment.js create mode 100644 vuetest/node_modules/@babel/types/lib/comments/addComment.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/comments/addComments.js create mode 100644 vuetest/node_modules/@babel/types/lib/comments/addComments.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/comments/inheritInnerComments.js create mode 100644 vuetest/node_modules/@babel/types/lib/comments/inheritInnerComments.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/comments/inheritLeadingComments.js create mode 100644 vuetest/node_modules/@babel/types/lib/comments/inheritLeadingComments.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/comments/inheritTrailingComments.js create mode 100644 vuetest/node_modules/@babel/types/lib/comments/inheritTrailingComments.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/comments/inheritsComments.js create mode 100644 vuetest/node_modules/@babel/types/lib/comments/inheritsComments.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/comments/removeComments.js create mode 100644 vuetest/node_modules/@babel/types/lib/comments/removeComments.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/constants/generated/index.js create mode 100644 vuetest/node_modules/@babel/types/lib/constants/generated/index.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/constants/index.js create mode 100644 vuetest/node_modules/@babel/types/lib/constants/index.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/converters/ensureBlock.js create mode 100644 vuetest/node_modules/@babel/types/lib/converters/ensureBlock.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js create mode 100644 vuetest/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js create mode 100644 vuetest/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/converters/toBlock.js create mode 100644 vuetest/node_modules/@babel/types/lib/converters/toBlock.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/converters/toComputedKey.js create mode 100644 vuetest/node_modules/@babel/types/lib/converters/toComputedKey.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/converters/toExpression.js create mode 100644 vuetest/node_modules/@babel/types/lib/converters/toExpression.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/converters/toIdentifier.js create mode 100644 vuetest/node_modules/@babel/types/lib/converters/toIdentifier.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/converters/toKeyAlias.js create mode 100644 vuetest/node_modules/@babel/types/lib/converters/toKeyAlias.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/converters/toSequenceExpression.js create mode 100644 vuetest/node_modules/@babel/types/lib/converters/toSequenceExpression.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/converters/toStatement.js create mode 100644 vuetest/node_modules/@babel/types/lib/converters/toStatement.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/converters/valueToNode.js create mode 100644 vuetest/node_modules/@babel/types/lib/converters/valueToNode.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/core.js create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/core.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/deprecated-aliases.js create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/deprecated-aliases.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/experimental.js create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/experimental.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/flow.js create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/flow.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/index.js create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/index.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/jsx.js create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/jsx.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/misc.js create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/misc.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/placeholders.js create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/placeholders.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/typescript.js create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/typescript.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/utils.js create mode 100644 vuetest/node_modules/@babel/types/lib/definitions/utils.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/index-legacy.d.ts create mode 100644 vuetest/node_modules/@babel/types/lib/index.d.ts create mode 100644 vuetest/node_modules/@babel/types/lib/index.js create mode 100644 vuetest/node_modules/@babel/types/lib/index.js.flow create mode 100644 vuetest/node_modules/@babel/types/lib/index.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js create mode 100644 vuetest/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js create mode 100644 vuetest/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/modifications/inherits.js create mode 100644 vuetest/node_modules/@babel/types/lib/modifications/inherits.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js create mode 100644 vuetest/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/modifications/removeProperties.js create mode 100644 vuetest/node_modules/@babel/types/lib/modifications/removeProperties.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js create mode 100644 vuetest/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js create mode 100644 vuetest/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js create mode 100644 vuetest/node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js create mode 100644 vuetest/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/retrievers/getFunctionName.js create mode 100644 vuetest/node_modules/@babel/types/lib/retrievers/getFunctionName.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js create mode 100644 vuetest/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/traverse/traverse.js create mode 100644 vuetest/node_modules/@babel/types/lib/traverse/traverse.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/traverse/traverseFast.js create mode 100644 vuetest/node_modules/@babel/types/lib/traverse/traverseFast.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/utils/deprecationWarning.js create mode 100644 vuetest/node_modules/@babel/types/lib/utils/deprecationWarning.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/utils/inherit.js create mode 100644 vuetest/node_modules/@babel/types/lib/utils/inherit.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js create mode 100644 vuetest/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/utils/shallowEqual.js create mode 100644 vuetest/node_modules/@babel/types/lib/utils/shallowEqual.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/generated/index.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/generated/index.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/is.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/is.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isBinding.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isBinding.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isBlockScoped.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isBlockScoped.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isImmutable.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isImmutable.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isLet.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isLet.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isNode.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isNode.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isNodesEquivalent.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isNodesEquivalent.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isPlaceholderType.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isReferenced.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isReferenced.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isScope.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isScope.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isSpecifierDefault.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isSpecifierDefault.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isType.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isType.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isValidES3Identifier.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isValidES3Identifier.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isValidIdentifier.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isVar.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/isVar.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/matchesPattern.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/matchesPattern.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/react/isCompatTag.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/react/isCompatTag.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/react/isReactComponent.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/react/isReactComponent.js.map create mode 100644 vuetest/node_modules/@babel/types/lib/validators/validate.js create mode 100644 vuetest/node_modules/@babel/types/lib/validators/validate.js.map create mode 100644 vuetest/node_modules/@babel/types/package.json create mode 100644 vuetest/node_modules/@element-plus/icons-vue/LICENSE create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/global.cjs create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/global.iife.js create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/global.iife.min.js create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/global.js create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/global.min.cjs create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/global.min.js create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/index.cjs create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/index.iife.js create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/index.iife.min.js create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/index.js create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/index.min.cjs create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/index.min.js create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/add-location.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/aim.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/alarm-clock.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/apple.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/arrow-down-bold.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/arrow-down.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/arrow-left-bold.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/arrow-left.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/arrow-right-bold.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/arrow-right.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/arrow-up-bold.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/arrow-up.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/avatar.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/back.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/baseball.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/basketball.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/bell-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/bell.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/bicycle.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/bottom-left.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/bottom-right.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/bottom.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/bowl.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/box.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/briefcase.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/brush-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/brush.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/burger.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/calendar.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/camera-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/camera.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/caret-bottom.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/caret-left.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/caret-right.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/caret-top.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/cellphone.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/chat-dot-round.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/chat-dot-square.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/chat-line-round.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/chat-line-square.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/chat-round.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/chat-square.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/check.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/checked.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/cherry.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/chicken.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/chrome-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/circle-check-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/circle-check.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/circle-close-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/circle-close.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/circle-plus-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/circle-plus.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/clock.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/close-bold.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/close.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/cloudy.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/coffee-cup.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/coffee.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/coin.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/cold-drink.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/collection-tag.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/collection.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/comment.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/compass.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/connection.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/coordinate.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/copy-document.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/cpu.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/credit-card.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/crop.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/d-arrow-left.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/d-arrow-right.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/d-caret.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/data-analysis.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/data-board.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/data-line.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/delete-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/delete-location.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/delete.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/dessert.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/discount.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/dish-dot.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/dish.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/document-add.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/document-checked.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/document-copy.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/document-delete.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/document-remove.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/document.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/download.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/drizzling.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/edit-pen.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/edit.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/eleme-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/eleme.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/element-plus.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/expand.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/failed.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/female.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/files.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/film.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/filter.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/finished.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/first-aid-kit.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/flag.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/fold.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/folder-add.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/folder-checked.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/folder-delete.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/folder-opened.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/folder-remove.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/folder.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/food.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/football.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/fork-spoon.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/fries.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/full-screen.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/goblet-full.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/goblet-square-full.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/goblet-square.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/goblet.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/gold-medal.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/goods-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/goods.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/grape.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/grid.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/guide.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/handbag.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/headset.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/help-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/help.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/hide.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/histogram.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/home-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/hot-water.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/house.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/ice-cream-round.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/ice-cream-square.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/ice-cream.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/ice-drink.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/ice-tea.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/index.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/info-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/iphone.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/key.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/knife-fork.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/lightning.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/link.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/list.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/loading.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/location-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/location-information.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/location.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/lock.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/lollipop.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/magic-stick.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/magnet.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/male.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/management.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/map-location.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/medal.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/memo.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/menu.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/message-box.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/message.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/mic.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/microphone.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/milk-tea.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/minus.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/money.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/monitor.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/moon-night.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/moon.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/more-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/more.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/mostly-cloudy.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/mouse.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/mug.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/mute-notification.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/mute.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/no-smoking.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/notebook.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/notification.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/odometer.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/office-building.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/open.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/operation.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/opportunity.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/orange.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/paperclip.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/partly-cloudy.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/pear.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/phone-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/phone.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/picture-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/picture-rounded.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/picture.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/pie-chart.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/place.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/platform.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/plus.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/pointer.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/position.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/postcard.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/pouring.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/present.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/price-tag.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/printer.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/promotion.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/quartz-watch.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/question-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/rank.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/reading-lamp.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/reading.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/refresh-left.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/refresh-right.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/refresh.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/refrigerator.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/remove-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/remove.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/right.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/scale-to-original.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/school.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/scissor.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/search.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/select.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/sell.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/semi-select.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/service.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/set-up.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/setting.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/share.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/ship.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/shop.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/shopping-bag.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/shopping-cart-full.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/shopping-cart.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/shopping-trolley.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/smoking.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/soccer.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/sold-out.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/sort-down.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/sort-up.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/sort.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/stamp.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/star-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/star.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/stopwatch.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/success-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/sugar.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/suitcase-line.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/suitcase.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/sunny.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/sunrise.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/sunset.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/switch-button.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/switch-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/switch.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/takeaway-box.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/ticket.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/tickets.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/timer.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/toilet-paper.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/tools.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/top-left.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/top-right.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/top.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/trend-charts.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/trophy-base.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/trophy.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/turn-off.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/umbrella.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/unlock.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/upload-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/upload.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/user-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/user.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/van.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/video-camera-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/video-camera.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/video-pause.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/video-play.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/view.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/wallet-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/wallet.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/warn-triangle-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/warning-filled.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/warning.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/watch.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/watermelon.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/wind-power.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/zoom-in.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/components/zoom-out.vue.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/global.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/dist/types/index.d.ts create mode 100644 vuetest/node_modules/@element-plus/icons-vue/package.json create mode 100644 vuetest/node_modules/@jridgewell/sourcemap-codec/LICENSE create mode 100644 vuetest/node_modules/@jridgewell/sourcemap-codec/README.md create mode 100644 vuetest/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs create mode 100644 vuetest/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map create mode 100644 vuetest/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js create mode 100644 vuetest/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map create mode 100644 vuetest/node_modules/@jridgewell/sourcemap-codec/dist/types/scopes.d.ts create mode 100644 vuetest/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts create mode 100644 vuetest/node_modules/@jridgewell/sourcemap-codec/dist/types/strings.d.ts create mode 100644 vuetest/node_modules/@jridgewell/sourcemap-codec/dist/types/vlq.d.ts create mode 100644 vuetest/node_modules/@jridgewell/sourcemap-codec/package.json create mode 100644 vuetest/node_modules/@vue/compiler-core/LICENSE create mode 100644 vuetest/node_modules/@vue/compiler-core/README.md create mode 100644 vuetest/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js create mode 100644 vuetest/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js create mode 100644 vuetest/node_modules/@vue/compiler-core/dist/compiler-core.d.ts create mode 100644 vuetest/node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js create mode 100644 vuetest/node_modules/@vue/compiler-core/index.js create mode 100644 vuetest/node_modules/@vue/compiler-core/package.json create mode 100644 vuetest/node_modules/@vue/compiler-dom/LICENSE create mode 100644 vuetest/node_modules/@vue/compiler-dom/README.md create mode 100644 vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js create mode 100644 vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js create mode 100644 vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts create mode 100644 vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js create mode 100644 vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js create mode 100644 vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js create mode 100644 vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.global.js create mode 100644 vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js create mode 100644 vuetest/node_modules/@vue/compiler-dom/index.js create mode 100644 vuetest/node_modules/@vue/compiler-dom/package.json create mode 100644 vuetest/node_modules/@vue/compiler-sfc/LICENSE create mode 100644 vuetest/node_modules/@vue/compiler-sfc/README.md create mode 100644 vuetest/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js create mode 100644 vuetest/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts create mode 100644 vuetest/node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js create mode 100644 vuetest/node_modules/@vue/compiler-sfc/package.json create mode 100644 vuetest/node_modules/@vue/compiler-ssr/LICENSE create mode 100644 vuetest/node_modules/@vue/compiler-ssr/README.md create mode 100644 vuetest/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js create mode 100644 vuetest/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts create mode 100644 vuetest/node_modules/@vue/compiler-ssr/package.json create mode 100644 vuetest/node_modules/@vue/reactivity/LICENSE create mode 100644 vuetest/node_modules/@vue/reactivity/README.md create mode 100644 vuetest/node_modules/@vue/reactivity/dist/reactivity.cjs.js create mode 100644 vuetest/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js create mode 100644 vuetest/node_modules/@vue/reactivity/dist/reactivity.d.ts create mode 100644 vuetest/node_modules/@vue/reactivity/dist/reactivity.esm-browser.js create mode 100644 vuetest/node_modules/@vue/reactivity/dist/reactivity.esm-browser.prod.js create mode 100644 vuetest/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js create mode 100644 vuetest/node_modules/@vue/reactivity/dist/reactivity.global.js create mode 100644 vuetest/node_modules/@vue/reactivity/dist/reactivity.global.prod.js create mode 100644 vuetest/node_modules/@vue/reactivity/index.js create mode 100644 vuetest/node_modules/@vue/reactivity/package.json create mode 100644 vuetest/node_modules/@vue/runtime-core/LICENSE create mode 100644 vuetest/node_modules/@vue/runtime-core/README.md create mode 100644 vuetest/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js create mode 100644 vuetest/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js create mode 100644 vuetest/node_modules/@vue/runtime-core/dist/runtime-core.d.ts create mode 100644 vuetest/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js create mode 100644 vuetest/node_modules/@vue/runtime-core/index.js create mode 100644 vuetest/node_modules/@vue/runtime-core/package.json create mode 100644 vuetest/node_modules/@vue/runtime-dom/LICENSE create mode 100644 vuetest/node_modules/@vue/runtime-dom/README.md create mode 100644 vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js create mode 100644 vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js create mode 100644 vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts create mode 100644 vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js create mode 100644 vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js create mode 100644 vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js create mode 100644 vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.global.js create mode 100644 vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js create mode 100644 vuetest/node_modules/@vue/runtime-dom/index.js create mode 100644 vuetest/node_modules/@vue/runtime-dom/package.json create mode 100644 vuetest/node_modules/@vue/server-renderer/LICENSE create mode 100644 vuetest/node_modules/@vue/server-renderer/README.md create mode 100644 vuetest/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js create mode 100644 vuetest/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js create mode 100644 vuetest/node_modules/@vue/server-renderer/dist/server-renderer.d.ts create mode 100644 vuetest/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.js create mode 100644 vuetest/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.prod.js create mode 100644 vuetest/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js create mode 100644 vuetest/node_modules/@vue/server-renderer/index.js create mode 100644 vuetest/node_modules/@vue/server-renderer/package.json create mode 100644 vuetest/node_modules/@vue/shared/LICENSE create mode 100644 vuetest/node_modules/@vue/shared/README.md create mode 100644 vuetest/node_modules/@vue/shared/dist/shared.cjs.js create mode 100644 vuetest/node_modules/@vue/shared/dist/shared.cjs.prod.js create mode 100644 vuetest/node_modules/@vue/shared/dist/shared.d.ts create mode 100644 vuetest/node_modules/@vue/shared/dist/shared.esm-bundler.js create mode 100644 vuetest/node_modules/@vue/shared/index.js create mode 100644 vuetest/node_modules/@vue/shared/package.json create mode 100644 vuetest/node_modules/csstype/LICENSE create mode 100644 vuetest/node_modules/csstype/README.md create mode 100644 vuetest/node_modules/csstype/index.d.ts create mode 100644 vuetest/node_modules/csstype/index.js.flow create mode 100644 vuetest/node_modules/csstype/package.json create mode 100644 vuetest/node_modules/entities/LICENSE create mode 100644 vuetest/node_modules/entities/lib/decode.d.ts create mode 100644 vuetest/node_modules/entities/lib/decode.d.ts.map create mode 100644 vuetest/node_modules/entities/lib/decode.js create mode 100644 vuetest/node_modules/entities/lib/decode.js.map create mode 100644 vuetest/node_modules/entities/lib/decode_codepoint.d.ts create mode 100644 vuetest/node_modules/entities/lib/decode_codepoint.d.ts.map create mode 100644 vuetest/node_modules/entities/lib/decode_codepoint.js create mode 100644 vuetest/node_modules/entities/lib/decode_codepoint.js.map create mode 100644 vuetest/node_modules/entities/lib/encode.d.ts create mode 100644 vuetest/node_modules/entities/lib/encode.d.ts.map create mode 100644 vuetest/node_modules/entities/lib/encode.js create mode 100644 vuetest/node_modules/entities/lib/encode.js.map create mode 100644 vuetest/node_modules/entities/lib/escape.d.ts create mode 100644 vuetest/node_modules/entities/lib/escape.d.ts.map create mode 100644 vuetest/node_modules/entities/lib/escape.js create mode 100644 vuetest/node_modules/entities/lib/escape.js.map create mode 100644 vuetest/node_modules/entities/lib/esm/decode.d.ts create mode 100644 vuetest/node_modules/entities/lib/esm/decode.d.ts.map create mode 100644 vuetest/node_modules/entities/lib/esm/decode.js create mode 100644 vuetest/node_modules/entities/lib/esm/decode.js.map create mode 100644 vuetest/node_modules/entities/lib/esm/decode_codepoint.d.ts create mode 100644 vuetest/node_modules/entities/lib/esm/decode_codepoint.d.ts.map create mode 100644 vuetest/node_modules/entities/lib/esm/decode_codepoint.js create mode 100644 vuetest/node_modules/entities/lib/esm/decode_codepoint.js.map create mode 100644 vuetest/node_modules/entities/lib/esm/encode.d.ts create mode 100644 vuetest/node_modules/entities/lib/esm/encode.d.ts.map create mode 100644 vuetest/node_modules/entities/lib/esm/encode.js create mode 100644 vuetest/node_modules/entities/lib/esm/encode.js.map create mode 100644 vuetest/node_modules/entities/lib/esm/escape.d.ts create mode 100644 vuetest/node_modules/entities/lib/esm/escape.d.ts.map create mode 100644 vuetest/node_modules/entities/lib/esm/escape.js create mode 100644 vuetest/node_modules/entities/lib/esm/escape.js.map create mode 100644 vuetest/node_modules/entities/lib/esm/generated/decode-data-html.d.ts create mode 100644 vuetest/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map create mode 100644 vuetest/node_modules/entities/lib/esm/generated/decode-data-html.js create mode 100644 vuetest/node_modules/entities/lib/esm/generated/decode-data-html.js.map create mode 100644 vuetest/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts create mode 100644 vuetest/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map create mode 100644 vuetest/node_modules/entities/lib/esm/generated/decode-data-xml.js create mode 100644 vuetest/node_modules/entities/lib/esm/generated/decode-data-xml.js.map create mode 100644 vuetest/node_modules/entities/lib/esm/generated/encode-html.d.ts create mode 100644 vuetest/node_modules/entities/lib/esm/generated/encode-html.d.ts.map create mode 100644 vuetest/node_modules/entities/lib/esm/generated/encode-html.js create mode 100644 vuetest/node_modules/entities/lib/esm/generated/encode-html.js.map create mode 100644 vuetest/node_modules/entities/lib/esm/index.d.ts create mode 100644 vuetest/node_modules/entities/lib/esm/index.d.ts.map create mode 100644 vuetest/node_modules/entities/lib/esm/index.js create mode 100644 vuetest/node_modules/entities/lib/esm/index.js.map create mode 100644 vuetest/node_modules/entities/lib/esm/package.json create mode 100644 vuetest/node_modules/entities/lib/generated/decode-data-html.d.ts create mode 100644 vuetest/node_modules/entities/lib/generated/decode-data-html.d.ts.map create mode 100644 vuetest/node_modules/entities/lib/generated/decode-data-html.js create mode 100644 vuetest/node_modules/entities/lib/generated/decode-data-html.js.map create mode 100644 vuetest/node_modules/entities/lib/generated/decode-data-xml.d.ts create mode 100644 vuetest/node_modules/entities/lib/generated/decode-data-xml.d.ts.map create mode 100644 vuetest/node_modules/entities/lib/generated/decode-data-xml.js create mode 100644 vuetest/node_modules/entities/lib/generated/decode-data-xml.js.map create mode 100644 vuetest/node_modules/entities/lib/generated/encode-html.d.ts create mode 100644 vuetest/node_modules/entities/lib/generated/encode-html.d.ts.map create mode 100644 vuetest/node_modules/entities/lib/generated/encode-html.js create mode 100644 vuetest/node_modules/entities/lib/generated/encode-html.js.map create mode 100644 vuetest/node_modules/entities/lib/index.d.ts create mode 100644 vuetest/node_modules/entities/lib/index.d.ts.map create mode 100644 vuetest/node_modules/entities/lib/index.js create mode 100644 vuetest/node_modules/entities/lib/index.js.map create mode 100644 vuetest/node_modules/entities/package.json create mode 100644 vuetest/node_modules/entities/readme.md create mode 100644 vuetest/node_modules/estree-walker/CHANGELOG.md create mode 100644 vuetest/node_modules/estree-walker/LICENSE create mode 100644 vuetest/node_modules/estree-walker/README.md create mode 100644 vuetest/node_modules/estree-walker/dist/esm/estree-walker.js create mode 100644 vuetest/node_modules/estree-walker/dist/esm/package.json create mode 100644 vuetest/node_modules/estree-walker/dist/umd/estree-walker.js create mode 100644 vuetest/node_modules/estree-walker/package.json create mode 100644 vuetest/node_modules/estree-walker/src/async.js create mode 100644 vuetest/node_modules/estree-walker/src/index.js create mode 100644 vuetest/node_modules/estree-walker/src/package.json create mode 100644 vuetest/node_modules/estree-walker/src/sync.js create mode 100644 vuetest/node_modules/estree-walker/src/walker.js create mode 100644 vuetest/node_modules/estree-walker/types/async.d.ts create mode 100644 vuetest/node_modules/estree-walker/types/index.d.ts create mode 100644 vuetest/node_modules/estree-walker/types/sync.d.ts create mode 100644 vuetest/node_modules/estree-walker/types/tsconfig.tsbuildinfo create mode 100644 vuetest/node_modules/estree-walker/types/walker.d.ts create mode 100644 vuetest/node_modules/magic-string/LICENSE create mode 100644 vuetest/node_modules/magic-string/README.md create mode 100644 vuetest/node_modules/magic-string/dist/magic-string.cjs.d.ts create mode 100644 vuetest/node_modules/magic-string/dist/magic-string.cjs.js create mode 100644 vuetest/node_modules/magic-string/dist/magic-string.cjs.js.map create mode 100644 vuetest/node_modules/magic-string/dist/magic-string.es.d.mts create mode 100644 vuetest/node_modules/magic-string/dist/magic-string.es.mjs create mode 100644 vuetest/node_modules/magic-string/dist/magic-string.es.mjs.map create mode 100644 vuetest/node_modules/magic-string/dist/magic-string.umd.js create mode 100644 vuetest/node_modules/magic-string/dist/magic-string.umd.js.map create mode 100644 vuetest/node_modules/magic-string/package.json create mode 100644 vuetest/node_modules/nanoid/.devcontainer.json create mode 100644 vuetest/node_modules/nanoid/LICENSE create mode 100644 vuetest/node_modules/nanoid/README.md create mode 100644 vuetest/node_modules/nanoid/async/index.browser.cjs create mode 100644 vuetest/node_modules/nanoid/async/index.browser.js create mode 100644 vuetest/node_modules/nanoid/async/index.cjs create mode 100644 vuetest/node_modules/nanoid/async/index.d.ts create mode 100644 vuetest/node_modules/nanoid/async/index.js create mode 100644 vuetest/node_modules/nanoid/async/index.native.js create mode 100644 vuetest/node_modules/nanoid/async/package.json create mode 100644 vuetest/node_modules/nanoid/bin/nanoid.cjs create mode 100644 vuetest/node_modules/nanoid/index.browser.cjs create mode 100644 vuetest/node_modules/nanoid/index.browser.js create mode 100644 vuetest/node_modules/nanoid/index.cjs create mode 100644 vuetest/node_modules/nanoid/index.d.cts create mode 100644 vuetest/node_modules/nanoid/index.d.ts create mode 100644 vuetest/node_modules/nanoid/index.js create mode 100644 vuetest/node_modules/nanoid/nanoid.js create mode 100644 vuetest/node_modules/nanoid/non-secure/index.cjs create mode 100644 vuetest/node_modules/nanoid/non-secure/index.d.ts create mode 100644 vuetest/node_modules/nanoid/non-secure/index.js create mode 100644 vuetest/node_modules/nanoid/non-secure/package.json create mode 100644 vuetest/node_modules/nanoid/package.json create mode 100644 vuetest/node_modules/nanoid/url-alphabet/index.cjs create mode 100644 vuetest/node_modules/nanoid/url-alphabet/index.js create mode 100644 vuetest/node_modules/nanoid/url-alphabet/package.json create mode 100644 vuetest/node_modules/picocolors/LICENSE create mode 100644 vuetest/node_modules/picocolors/README.md create mode 100644 vuetest/node_modules/picocolors/package.json create mode 100644 vuetest/node_modules/picocolors/picocolors.browser.js create mode 100644 vuetest/node_modules/picocolors/picocolors.d.ts create mode 100644 vuetest/node_modules/picocolors/picocolors.js create mode 100644 vuetest/node_modules/picocolors/types.d.ts create mode 100644 vuetest/node_modules/postcss/LICENSE create mode 100644 vuetest/node_modules/postcss/README.md create mode 100644 vuetest/node_modules/postcss/lib/at-rule.d.ts create mode 100644 vuetest/node_modules/postcss/lib/at-rule.js create mode 100644 vuetest/node_modules/postcss/lib/comment.d.ts create mode 100644 vuetest/node_modules/postcss/lib/comment.js create mode 100644 vuetest/node_modules/postcss/lib/container.d.ts create mode 100644 vuetest/node_modules/postcss/lib/container.js create mode 100644 vuetest/node_modules/postcss/lib/css-syntax-error.d.ts create mode 100644 vuetest/node_modules/postcss/lib/css-syntax-error.js create mode 100644 vuetest/node_modules/postcss/lib/declaration.d.ts create mode 100644 vuetest/node_modules/postcss/lib/declaration.js create mode 100644 vuetest/node_modules/postcss/lib/document.d.ts create mode 100644 vuetest/node_modules/postcss/lib/document.js create mode 100644 vuetest/node_modules/postcss/lib/fromJSON.d.ts create mode 100644 vuetest/node_modules/postcss/lib/fromJSON.js create mode 100644 vuetest/node_modules/postcss/lib/input.d.ts create mode 100644 vuetest/node_modules/postcss/lib/input.js create mode 100644 vuetest/node_modules/postcss/lib/lazy-result.d.ts create mode 100644 vuetest/node_modules/postcss/lib/lazy-result.js create mode 100644 vuetest/node_modules/postcss/lib/list.d.ts create mode 100644 vuetest/node_modules/postcss/lib/list.js create mode 100644 vuetest/node_modules/postcss/lib/map-generator.js create mode 100644 vuetest/node_modules/postcss/lib/no-work-result.d.ts create mode 100644 vuetest/node_modules/postcss/lib/no-work-result.js create mode 100644 vuetest/node_modules/postcss/lib/node.d.ts create mode 100644 vuetest/node_modules/postcss/lib/node.js create mode 100644 vuetest/node_modules/postcss/lib/parse.d.ts create mode 100644 vuetest/node_modules/postcss/lib/parse.js create mode 100644 vuetest/node_modules/postcss/lib/parser.js create mode 100644 vuetest/node_modules/postcss/lib/postcss.d.mts create mode 100644 vuetest/node_modules/postcss/lib/postcss.d.ts create mode 100644 vuetest/node_modules/postcss/lib/postcss.js create mode 100644 vuetest/node_modules/postcss/lib/postcss.mjs create mode 100644 vuetest/node_modules/postcss/lib/previous-map.d.ts create mode 100644 vuetest/node_modules/postcss/lib/previous-map.js create mode 100644 vuetest/node_modules/postcss/lib/processor.d.ts create mode 100644 vuetest/node_modules/postcss/lib/processor.js create mode 100644 vuetest/node_modules/postcss/lib/result.d.ts create mode 100644 vuetest/node_modules/postcss/lib/result.js create mode 100644 vuetest/node_modules/postcss/lib/root.d.ts create mode 100644 vuetest/node_modules/postcss/lib/root.js create mode 100644 vuetest/node_modules/postcss/lib/rule.d.ts create mode 100644 vuetest/node_modules/postcss/lib/rule.js create mode 100644 vuetest/node_modules/postcss/lib/stringifier.d.ts create mode 100644 vuetest/node_modules/postcss/lib/stringifier.js create mode 100644 vuetest/node_modules/postcss/lib/stringify.d.ts create mode 100644 vuetest/node_modules/postcss/lib/stringify.js create mode 100644 vuetest/node_modules/postcss/lib/symbols.js create mode 100644 vuetest/node_modules/postcss/lib/terminal-highlight.js create mode 100644 vuetest/node_modules/postcss/lib/tokenize.js create mode 100644 vuetest/node_modules/postcss/lib/warn-once.js create mode 100644 vuetest/node_modules/postcss/lib/warning.d.ts create mode 100644 vuetest/node_modules/postcss/lib/warning.js create mode 100644 vuetest/node_modules/postcss/package.json create mode 100644 vuetest/node_modules/source-map-js/LICENSE create mode 100644 vuetest/node_modules/source-map-js/README.md create mode 100644 vuetest/node_modules/source-map-js/lib/array-set.js create mode 100644 vuetest/node_modules/source-map-js/lib/base64-vlq.js create mode 100644 vuetest/node_modules/source-map-js/lib/base64.js create mode 100644 vuetest/node_modules/source-map-js/lib/binary-search.js create mode 100644 vuetest/node_modules/source-map-js/lib/mapping-list.js create mode 100644 vuetest/node_modules/source-map-js/lib/quick-sort.js create mode 100644 vuetest/node_modules/source-map-js/lib/source-map-consumer.d.ts create mode 100644 vuetest/node_modules/source-map-js/lib/source-map-consumer.js create mode 100644 vuetest/node_modules/source-map-js/lib/source-map-generator.d.ts create mode 100644 vuetest/node_modules/source-map-js/lib/source-map-generator.js create mode 100644 vuetest/node_modules/source-map-js/lib/source-node.d.ts create mode 100644 vuetest/node_modules/source-map-js/lib/source-node.js create mode 100644 vuetest/node_modules/source-map-js/lib/util.js create mode 100644 vuetest/node_modules/source-map-js/package.json create mode 100644 vuetest/node_modules/source-map-js/source-map.d.ts create mode 100644 vuetest/node_modules/source-map-js/source-map.js create mode 100644 vuetest/node_modules/vue/LICENSE create mode 100644 vuetest/node_modules/vue/README.md create mode 100644 vuetest/node_modules/vue/compiler-sfc/index.browser.js create mode 100644 vuetest/node_modules/vue/compiler-sfc/index.browser.mjs create mode 100644 vuetest/node_modules/vue/compiler-sfc/index.d.mts create mode 100644 vuetest/node_modules/vue/compiler-sfc/index.d.ts create mode 100644 vuetest/node_modules/vue/compiler-sfc/index.js create mode 100644 vuetest/node_modules/vue/compiler-sfc/index.mjs create mode 100644 vuetest/node_modules/vue/compiler-sfc/package.json create mode 100644 vuetest/node_modules/vue/compiler-sfc/register-ts.js create mode 100644 vuetest/node_modules/vue/dist/vue.cjs.js create mode 100644 vuetest/node_modules/vue/dist/vue.cjs.prod.js create mode 100644 vuetest/node_modules/vue/dist/vue.d.mts create mode 100644 vuetest/node_modules/vue/dist/vue.d.ts create mode 100644 vuetest/node_modules/vue/dist/vue.esm-browser.js create mode 100644 vuetest/node_modules/vue/dist/vue.esm-browser.prod.js create mode 100644 vuetest/node_modules/vue/dist/vue.esm-bundler.js create mode 100644 vuetest/node_modules/vue/dist/vue.global.js create mode 100644 vuetest/node_modules/vue/dist/vue.global.prod.js create mode 100644 vuetest/node_modules/vue/dist/vue.runtime.esm-browser.js create mode 100644 vuetest/node_modules/vue/dist/vue.runtime.esm-browser.prod.js create mode 100644 vuetest/node_modules/vue/dist/vue.runtime.esm-bundler.js create mode 100644 vuetest/node_modules/vue/dist/vue.runtime.global.js create mode 100644 vuetest/node_modules/vue/dist/vue.runtime.global.prod.js create mode 100644 vuetest/node_modules/vue/index.js create mode 100644 vuetest/node_modules/vue/index.mjs create mode 100644 vuetest/node_modules/vue/jsx-runtime/index.d.ts create mode 100644 vuetest/node_modules/vue/jsx-runtime/index.js create mode 100644 vuetest/node_modules/vue/jsx-runtime/index.mjs create mode 100644 vuetest/node_modules/vue/jsx-runtime/package.json create mode 100644 vuetest/node_modules/vue/jsx.d.ts create mode 100644 vuetest/node_modules/vue/package.json create mode 100644 vuetest/node_modules/vue/server-renderer/index.d.mts create mode 100644 vuetest/node_modules/vue/server-renderer/index.d.ts create mode 100644 vuetest/node_modules/vue/server-renderer/index.js create mode 100644 vuetest/node_modules/vue/server-renderer/index.mjs create mode 100644 vuetest/node_modules/vue/server-renderer/package.json create mode 100644 vuetest/package-lock.json create mode 100644 vuetest/package.json create mode 100644 vuetest/springboot/.gitattributes create mode 100644 vuetest/springboot/.gitignore create mode 100644 vuetest/springboot/pom.xml create mode 100644 vuetest/springboot/src/main/java/com/example/springboot/SpringbootApplication.java create mode 100644 vuetest/springboot/src/main/java/com/example/springboot/config/CorsConfig.java create mode 100644 vuetest/springboot/src/main/java/com/example/springboot/config/MybatisPlusConfig.java create mode 100644 vuetest/springboot/src/main/java/com/example/springboot/config/SpringDocConfig.java create mode 100644 vuetest/springboot/src/main/java/com/example/springboot/controller/UserController.java create mode 100644 vuetest/springboot/src/main/java/com/example/springboot/entity/User.java create mode 100644 vuetest/springboot/src/main/java/com/example/springboot/mapper/UserMapper.java create mode 100644 vuetest/springboot/src/main/java/com/example/springboot/service/IUserService.java create mode 100644 vuetest/springboot/src/main/java/com/example/springboot/service/impl/UserServiceImpl.java create mode 100644 vuetest/springboot/src/main/java/com/example/springboot/utils/CodeGenerator.java create mode 100644 vuetest/springboot/src/main/resources/application.yml create mode 100644 vuetest/springboot/src/main/resources/mapper/UserMapper.xml create mode 100644 vuetest/springboot/src/main/resources/templates/controller.java.vm create mode 100644 vuetest/springboot/src/test/java/com/example/springboot/SpringbootApplicationTests.java create mode 160000 vuetest/vue1 diff --git a/vuetest/.idea/.gitignore b/vuetest/.idea/.gitignore new file mode 100644 index 0000000..35410ca --- /dev/null +++ b/vuetest/.idea/.gitignore @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/vuetest/.idea/compiler.xml b/vuetest/.idea/compiler.xml new file mode 100644 index 0000000..fb73166 --- /dev/null +++ b/vuetest/.idea/compiler.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vuetest/.idea/dataSources.xml b/vuetest/.idea/dataSources.xml new file mode 100644 index 0000000..08f4004 --- /dev/null +++ b/vuetest/.idea/dataSources.xml @@ -0,0 +1,19 @@ + + + + + mysql.8 + true + true + $PROJECT_DIR$/springboot/src/main/resources/application.yml + com.mysql.cj.jdbc.Driver + jdbc:mysql://localhost:3306/hzk + + + + + + $ProjectFileDir$ + + + \ No newline at end of file diff --git a/vuetest/.idea/encodings.xml b/vuetest/.idea/encodings.xml new file mode 100644 index 0000000..6390bb1 --- /dev/null +++ b/vuetest/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vuetest/.idea/jarRepositories.xml b/vuetest/.idea/jarRepositories.xml new file mode 100644 index 0000000..7d4cd38 --- /dev/null +++ b/vuetest/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/vuetest/.idea/jsLibraryMappings.xml b/vuetest/.idea/jsLibraryMappings.xml new file mode 100644 index 0000000..a46b375 --- /dev/null +++ b/vuetest/.idea/jsLibraryMappings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vuetest/.idea/misc.xml b/vuetest/.idea/misc.xml new file mode 100644 index 0000000..8ccd18f --- /dev/null +++ b/vuetest/.idea/misc.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/vuetest/.idea/modules.xml b/vuetest/.idea/modules.xml new file mode 100644 index 0000000..5076f81 --- /dev/null +++ b/vuetest/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/vuetest/.idea/uiDesigner.xml b/vuetest/.idea/uiDesigner.xml new file mode 100644 index 0000000..2b63946 --- /dev/null +++ b/vuetest/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vuetest/.idea/vcs.xml b/vuetest/.idea/vcs.xml new file mode 100644 index 0000000..2456562 --- /dev/null +++ b/vuetest/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vuetest/.idea/vuetest.iml b/vuetest/.idea/vuetest.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/vuetest/.idea/vuetest.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/vuetest/.vscode/settings.json b/vuetest/.vscode/settings.json new file mode 100644 index 0000000..d53ecaf --- /dev/null +++ b/vuetest/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "java.compile.nullAnalysis.mode": "automatic", + "java.configuration.updateBuildConfiguration": "automatic" +} \ No newline at end of file diff --git a/vuetest/node_modules/.bin/nanoid b/vuetest/node_modules/.bin/nanoid new file mode 100644 index 0000000..46220bd --- /dev/null +++ b/vuetest/node_modules/.bin/nanoid @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../nanoid/bin/nanoid.cjs" "$@" +else + exec node "$basedir/../nanoid/bin/nanoid.cjs" "$@" +fi diff --git a/vuetest/node_modules/.bin/nanoid.cmd b/vuetest/node_modules/.bin/nanoid.cmd new file mode 100644 index 0000000..9c40107 --- /dev/null +++ b/vuetest/node_modules/.bin/nanoid.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\nanoid\bin\nanoid.cjs" %* diff --git a/vuetest/node_modules/.bin/nanoid.ps1 b/vuetest/node_modules/.bin/nanoid.ps1 new file mode 100644 index 0000000..d8a4d7a --- /dev/null +++ b/vuetest/node_modules/.bin/nanoid.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args + } else { + & "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args + } else { + & "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/vuetest/node_modules/.bin/parser b/vuetest/node_modules/.bin/parser new file mode 100644 index 0000000..7696ad4 --- /dev/null +++ b/vuetest/node_modules/.bin/parser @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../@babel/parser/bin/babel-parser.js" "$@" +else + exec node "$basedir/../@babel/parser/bin/babel-parser.js" "$@" +fi diff --git a/vuetest/node_modules/.bin/parser.cmd b/vuetest/node_modules/.bin/parser.cmd new file mode 100644 index 0000000..1ad5c81 --- /dev/null +++ b/vuetest/node_modules/.bin/parser.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@babel\parser\bin\babel-parser.js" %* diff --git a/vuetest/node_modules/.bin/parser.ps1 b/vuetest/node_modules/.bin/parser.ps1 new file mode 100644 index 0000000..8926517 --- /dev/null +++ b/vuetest/node_modules/.bin/parser.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args + } else { + & "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args + } else { + & "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/vuetest/node_modules/.package-lock.json b/vuetest/node_modules/.package-lock.json new file mode 100644 index 0000000..0d1c0ba --- /dev/null +++ b/vuetest/node_modules/.package-lock.json @@ -0,0 +1,306 @@ +{ + "name": "vuetest", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@babel/helper-string-parser": { + "version": "7.25.9", + "resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.25.9", + "resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.26.8", + "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.26.8.tgz", + "integrity": "sha512-TZIQ25pkSoaKEYYaHbbxkfL36GNsQ6iFiBbeuzAkLnXayKR1yP1zFe+NxuZWWsUyvt8icPU9CCq0sgWGXR1GEw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/types": "^7.26.8" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.26.8", + "resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.26.8.tgz", + "integrity": "sha512-eUuWapzEGWFEpHFxgEaBG8e3n6S8L3MSu0oda755rOfabWPnh0Our1AozNFVUxGFIhbKgd1ksprsoDGMinTOTA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@element-plus/icons-vue": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz", + "integrity": "sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==", + "license": "MIT", + "peerDependencies": { + "vue": "^3.2.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "license": "MIT", + "peer": true + }, + "node_modules/@vue/compiler-core": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.5.13.tgz", + "integrity": "sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/parser": "^7.25.3", + "@vue/shared": "3.5.13", + "entities": "^4.5.0", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.0" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.5.13.tgz", + "integrity": "sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@vue/compiler-core": "3.5.13", + "@vue/shared": "3.5.13" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.5.13.tgz", + "integrity": "sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/parser": "^7.25.3", + "@vue/compiler-core": "3.5.13", + "@vue/compiler-dom": "3.5.13", + "@vue/compiler-ssr": "3.5.13", + "@vue/shared": "3.5.13", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.11", + "postcss": "^8.4.48", + "source-map-js": "^1.2.0" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.5.13.tgz", + "integrity": "sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@vue/compiler-dom": "3.5.13", + "@vue/shared": "3.5.13" + } + }, + "node_modules/@vue/reactivity": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.5.13.tgz", + "integrity": "sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@vue/shared": "3.5.13" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.5.13.tgz", + "integrity": "sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@vue/reactivity": "3.5.13", + "@vue/shared": "3.5.13" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.5.13.tgz", + "integrity": "sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==", + "license": "MIT", + "peer": true, + "dependencies": { + "@vue/reactivity": "3.5.13", + "@vue/runtime-core": "3.5.13", + "@vue/shared": "3.5.13", + "csstype": "^3.1.3" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.5.13.tgz", + "integrity": "sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@vue/compiler-ssr": "3.5.13", + "@vue/shared": "3.5.13" + }, + "peerDependencies": { + "vue": "3.5.13" + } + }, + "node_modules/@vue/shared": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.5.13.tgz", + "integrity": "sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==", + "license": "MIT", + "peer": true + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "license": "MIT", + "peer": true + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "license": "MIT", + "peer": true + }, + "node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.8", + "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC", + "peer": true + }, + "node_modules/postcss": { + "version": "8.5.1", + "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.1.tgz", + "integrity": "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "nanoid": "^3.3.8", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/vue": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.13.tgz", + "integrity": "sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@vue/compiler-dom": "3.5.13", + "@vue/compiler-sfc": "3.5.13", + "@vue/runtime-dom": "3.5.13", + "@vue/server-renderer": "3.5.13", + "@vue/shared": "3.5.13" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + } + } +} diff --git a/vuetest/node_modules/.vue-global-types/vue_3.3_false.d.ts b/vuetest/node_modules/.vue-global-types/vue_3.3_false.d.ts new file mode 100644 index 0000000..98efa7e --- /dev/null +++ b/vuetest/node_modules/.vue-global-types/vue_3.3_false.d.ts @@ -0,0 +1,132 @@ +// @ts-nocheck +export {}; + +; declare module 'vue' { + export interface GlobalComponents { } + export interface GlobalDirectives { } +} +; declare global { + const __VLS_intrinsicElements: __VLS_IntrinsicElements; + const __VLS_directiveBindingRestFields: { instance: null, oldValue: null, modifiers: any, dir: any }; + const __VLS_unref: typeof import('vue').unref; + const __VLS_placeholder: any; + + const __VLS_nativeElements = { + ...{} as SVGElementTagNameMap, + ...{} as HTMLElementTagNameMap, + }; + + type __VLS_IntrinsicElements = import('vue/jsx-runtime').JSX.IntrinsicElements; + type __VLS_Element = import('vue/jsx-runtime').JSX.Element; + type __VLS_GlobalComponents = import('vue').GlobalComponents & Pick; + type __VLS_GlobalDirectives = import('vue').GlobalDirectives; + type __VLS_IsAny = 0 extends 1 & T ? true : false; + type __VLS_PickNotAny = __VLS_IsAny extends true ? B : A; + type __VLS_unknownDirective = (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void; + type __VLS_WithComponent = + N1 extends keyof LocalComponents ? N1 extends N0 ? Pick : { [K in N0]: LocalComponents[N1] } : + N2 extends keyof LocalComponents ? N2 extends N0 ? Pick : { [K in N0]: LocalComponents[N2] } : + N3 extends keyof LocalComponents ? N3 extends N0 ? Pick : { [K in N0]: LocalComponents[N3] } : + N1 extends keyof __VLS_GlobalComponents ? N1 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N1] } : + N2 extends keyof __VLS_GlobalComponents ? N2 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N2] } : + N3 extends keyof __VLS_GlobalComponents ? N3 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N3] } : + { [K in N0]: unknown }; + type __VLS_FunctionalComponentProps = + '__ctx' extends keyof __VLS_PickNotAny ? K extends { __ctx?: { props?: infer P } } ? NonNullable

: never + : T extends (props: infer P, ...args: any) => any ? P : + {}; + type __VLS_IsFunction = K extends keyof T + ? __VLS_IsAny extends false + ? unknown extends T[K] + ? false + : true + : false + : false; + type __VLS_NormalizeComponentEvent = ( + __VLS_IsFunction extends true + ? Props + : __VLS_IsFunction extends true + ? { [K in onEvent]?: Events[Event] } + : __VLS_IsFunction extends true + ? { [K in onEvent]?: Events[CamelizedEvent] } + : Props + ) & Record; + // fix https://github.com/vuejs/language-tools/issues/926 + type __VLS_UnionToIntersection = (U extends unknown ? (arg: U) => unknown : never) extends ((arg: infer P) => unknown) ? P : never; + type __VLS_OverloadUnionInner = U & T extends (...args: infer A) => infer R + ? U extends T + ? never + : __VLS_OverloadUnionInner & U & ((...args: A) => R)> | ((...args: A) => R) + : never; + type __VLS_OverloadUnion = Exclude< + __VLS_OverloadUnionInner<(() => never) & T>, + T extends () => never ? never : () => never + >; + type __VLS_ConstructorOverloads = __VLS_OverloadUnion extends infer F + ? F extends (event: infer E, ...args: infer A) => any + ? { [K in E & string]: (...args: A) => void; } + : never + : never; + type __VLS_NormalizeEmits = __VLS_PrettifyGlobal< + __VLS_UnionToIntersection< + __VLS_ConstructorOverloads & { + [K in keyof T]: T[K] extends any[] ? { (...args: T[K]): void } : never + } + > + >; + type __VLS_PrettifyGlobal = { [K in keyof T]: T[K]; } & {}; + type __VLS_PickFunctionalComponentCtx = NonNullable<__VLS_PickNotAny< + '__ctx' extends keyof __VLS_PickNotAny ? K extends { __ctx?: infer Ctx } ? Ctx : never : any + , T extends (props: any, ctx: infer Ctx) => any ? Ctx : any + >>; + type __VLS_UseTemplateRef = Readonly>; + + function __VLS_getVForSourceType(source: number): [number, number, number][]; + function __VLS_getVForSourceType(source: string): [string, number, number][]; + function __VLS_getVForSourceType(source: T): [ + item: T[number], + key: number, + index: number, + ][]; + function __VLS_getVForSourceType }>(source: T): [ + item: T extends { [Symbol.iterator](): Iterator } ? T1 : never, + key: number, + index: undefined, + ][]; + // #3845 + function __VLS_getVForSourceType }>(source: T): [ + item: number | (Exclude extends { [Symbol.iterator](): Iterator } ? T1 : never), + key: number, + index: undefined, + ][]; + function __VLS_getVForSourceType(source: T): [ + item: T[keyof T], + key: keyof T, + index: number, + ][]; + // @ts-ignore + function __VLS_getSlotParams(slot: T): Parameters<__VLS_PickNotAny, (...args: any[]) => any>>; + // @ts-ignore + function __VLS_getSlotParam(slot: T): Parameters<__VLS_PickNotAny, (...args: any[]) => any>>[0]; + function __VLS_asFunctionalDirective(dir: T): T extends import('vue').ObjectDirective + ? NonNullable + : T extends (...args: any) => any + ? T + : __VLS_unknownDirective; + function __VLS_withScope(ctx: T, scope: K): ctx is T & K; + function __VLS_makeOptional(t: T): { [K in keyof T]?: T[K] }; + function __VLS_asFunctionalComponent any ? InstanceType : unknown>(t: T, instance?: K): + T extends new (...args: any) => any + ? (props: (K extends { $props: infer Props } ? Props : any) & Record, ctx?: any) => __VLS_Element & { __ctx?: { + attrs?: any, + slots?: K extends { $slots: infer Slots } ? Slots : any, + emit?: K extends { $emit: infer Emit } ? Emit : any + } & { props?: (K extends { $props: infer Props } ? Props : any) & Record; expose?(exposed: K): void; } } + : T extends () => any ? (props: {}, ctx?: any) => ReturnType + : T extends (...args: any) => any ? T + : (_: {} & Record, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: {} & Record } }; + function __VLS_elementAsFunction(tag: T, endTag?: T): (_: T & Record) => void; + function __VLS_functionalComponentArgsRest any>(t: T): 2 extends Parameters['length'] ? [any] : []; + function __VLS_normalizeSlot(s: S): S extends () => infer R ? (props: {}) => R : S; + function __VLS_tryAsConstant(t: T): T; +} diff --git a/vuetest/node_modules/@babel/helper-string-parser/LICENSE b/vuetest/node_modules/@babel/helper-string-parser/LICENSE new file mode 100644 index 0000000..f31575e --- /dev/null +++ b/vuetest/node_modules/@babel/helper-string-parser/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +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. diff --git a/vuetest/node_modules/@babel/helper-string-parser/README.md b/vuetest/node_modules/@babel/helper-string-parser/README.md new file mode 100644 index 0000000..771b470 --- /dev/null +++ b/vuetest/node_modules/@babel/helper-string-parser/README.md @@ -0,0 +1,19 @@ +# @babel/helper-string-parser + +> A utility package to parse strings + +See our website [@babel/helper-string-parser](https://babeljs.io/docs/babel-helper-string-parser) for more information. + +## Install + +Using npm: + +```sh +npm install --save @babel/helper-string-parser +``` + +or using yarn: + +```sh +yarn add @babel/helper-string-parser +``` diff --git a/vuetest/node_modules/@babel/helper-string-parser/lib/index.js b/vuetest/node_modules/@babel/helper-string-parser/lib/index.js new file mode 100644 index 0000000..2d94115 --- /dev/null +++ b/vuetest/node_modules/@babel/helper-string-parser/lib/index.js @@ -0,0 +1,295 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.readCodePoint = readCodePoint; +exports.readInt = readInt; +exports.readStringContents = readStringContents; +var _isDigit = function isDigit(code) { + return code >= 48 && code <= 57; +}; +const forbiddenNumericSeparatorSiblings = { + decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]), + hex: new Set([46, 88, 95, 120]) +}; +const isAllowedNumericSeparatorSibling = { + bin: ch => ch === 48 || ch === 49, + oct: ch => ch >= 48 && ch <= 55, + dec: ch => ch >= 48 && ch <= 57, + hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102 +}; +function readStringContents(type, input, pos, lineStart, curLine, errors) { + const initialPos = pos; + const initialLineStart = lineStart; + const initialCurLine = curLine; + let out = ""; + let firstInvalidLoc = null; + let chunkStart = pos; + const { + length + } = input; + for (;;) { + if (pos >= length) { + errors.unterminated(initialPos, initialLineStart, initialCurLine); + out += input.slice(chunkStart, pos); + break; + } + const ch = input.charCodeAt(pos); + if (isStringEnd(type, ch, input, pos)) { + out += input.slice(chunkStart, pos); + break; + } + if (ch === 92) { + out += input.slice(chunkStart, pos); + const res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors); + if (res.ch === null && !firstInvalidLoc) { + firstInvalidLoc = { + pos, + lineStart, + curLine + }; + } else { + out += res.ch; + } + ({ + pos, + lineStart, + curLine + } = res); + chunkStart = pos; + } else if (ch === 8232 || ch === 8233) { + ++pos; + ++curLine; + lineStart = pos; + } else if (ch === 10 || ch === 13) { + if (type === "template") { + out += input.slice(chunkStart, pos) + "\n"; + ++pos; + if (ch === 13 && input.charCodeAt(pos) === 10) { + ++pos; + } + ++curLine; + chunkStart = lineStart = pos; + } else { + errors.unterminated(initialPos, initialLineStart, initialCurLine); + } + } else { + ++pos; + } + } + return { + pos, + str: out, + firstInvalidLoc, + lineStart, + curLine, + containsInvalid: !!firstInvalidLoc + }; +} +function isStringEnd(type, ch, input, pos) { + if (type === "template") { + return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123; + } + return ch === (type === "double" ? 34 : 39); +} +function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) { + const throwOnInvalid = !inTemplate; + pos++; + const res = ch => ({ + pos, + ch, + lineStart, + curLine + }); + const ch = input.charCodeAt(pos++); + switch (ch) { + case 110: + return res("\n"); + case 114: + return res("\r"); + case 120: + { + let code; + ({ + code, + pos + } = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors)); + return res(code === null ? null : String.fromCharCode(code)); + } + case 117: + { + let code; + ({ + code, + pos + } = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors)); + return res(code === null ? null : String.fromCodePoint(code)); + } + case 116: + return res("\t"); + case 98: + return res("\b"); + case 118: + return res("\u000b"); + case 102: + return res("\f"); + case 13: + if (input.charCodeAt(pos) === 10) { + ++pos; + } + case 10: + lineStart = pos; + ++curLine; + case 8232: + case 8233: + return res(""); + case 56: + case 57: + if (inTemplate) { + return res(null); + } else { + errors.strictNumericEscape(pos - 1, lineStart, curLine); + } + default: + if (ch >= 48 && ch <= 55) { + const startPos = pos - 1; + const match = /^[0-7]+/.exec(input.slice(startPos, pos + 2)); + let octalStr = match[0]; + let octal = parseInt(octalStr, 8); + if (octal > 255) { + octalStr = octalStr.slice(0, -1); + octal = parseInt(octalStr, 8); + } + pos += octalStr.length - 1; + const next = input.charCodeAt(pos); + if (octalStr !== "0" || next === 56 || next === 57) { + if (inTemplate) { + return res(null); + } else { + errors.strictNumericEscape(startPos, lineStart, curLine); + } + } + return res(String.fromCharCode(octal)); + } + return res(String.fromCharCode(ch)); + } +} +function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) { + const initialPos = pos; + let n; + ({ + n, + pos + } = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid)); + if (n === null) { + if (throwOnInvalid) { + errors.invalidEscapeSequence(initialPos, lineStart, curLine); + } else { + pos = initialPos - 1; + } + } + return { + code: n, + pos + }; +} +function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) { + const start = pos; + const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct; + const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin; + let invalid = false; + let total = 0; + for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) { + const code = input.charCodeAt(pos); + let val; + if (code === 95 && allowNumSeparator !== "bail") { + const prev = input.charCodeAt(pos - 1); + const next = input.charCodeAt(pos + 1); + if (!allowNumSeparator) { + if (bailOnError) return { + n: null, + pos + }; + errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine); + } else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) { + if (bailOnError) return { + n: null, + pos + }; + errors.unexpectedNumericSeparator(pos, lineStart, curLine); + } + ++pos; + continue; + } + if (code >= 97) { + val = code - 97 + 10; + } else if (code >= 65) { + val = code - 65 + 10; + } else if (_isDigit(code)) { + val = code - 48; + } else { + val = Infinity; + } + if (val >= radix) { + if (val <= 9 && bailOnError) { + return { + n: null, + pos + }; + } else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) { + val = 0; + } else if (forceLen) { + val = 0; + invalid = true; + } else { + break; + } + } + ++pos; + total = total * radix + val; + } + if (pos === start || len != null && pos - start !== len || invalid) { + return { + n: null, + pos + }; + } + return { + n: total, + pos + }; +} +function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) { + const ch = input.charCodeAt(pos); + let code; + if (ch === 123) { + ++pos; + ({ + code, + pos + } = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors)); + ++pos; + if (code !== null && code > 0x10ffff) { + if (throwOnInvalid) { + errors.invalidCodePoint(pos, lineStart, curLine); + } else { + return { + code: null, + pos + }; + } + } + } else { + ({ + code, + pos + } = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors)); + } + return { + code, + pos + }; +} + +//# sourceMappingURL=index.js.map diff --git a/vuetest/node_modules/@babel/helper-string-parser/lib/index.js.map b/vuetest/node_modules/@babel/helper-string-parser/lib/index.js.map new file mode 100644 index 0000000..cd50797 --- /dev/null +++ b/vuetest/node_modules/@babel/helper-string-parser/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["isDigit","code","forbiddenNumericSeparatorSiblings","decBinOct","Set","hex","isAllowedNumericSeparatorSibling","bin","ch","oct","dec","readStringContents","type","input","pos","lineStart","curLine","errors","initialPos","initialLineStart","initialCurLine","out","firstInvalidLoc","chunkStart","length","unterminated","slice","charCodeAt","isStringEnd","res","readEscapedChar","str","containsInvalid","inTemplate","throwOnInvalid","readHexChar","String","fromCharCode","readCodePoint","fromCodePoint","strictNumericEscape","startPos","match","exec","octalStr","octal","parseInt","next","len","forceLen","n","readInt","invalidEscapeSequence","radix","allowNumSeparator","bailOnError","start","forbiddenSiblings","isAllowedSibling","invalid","total","i","e","Infinity","val","prev","numericSeparatorInEscapeSequence","Number","isNaN","has","unexpectedNumericSeparator","_isDigit","invalidDigit","indexOf","invalidCodePoint"],"sources":["../src/index.ts"],"sourcesContent":["// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\n// The following character codes are forbidden from being\n// an immediate sibling of NumericLiteralSeparator _\nconst forbiddenNumericSeparatorSiblings = {\n decBinOct: new Set([\n charCodes.dot,\n charCodes.uppercaseB,\n charCodes.uppercaseE,\n charCodes.uppercaseO,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseB,\n charCodes.lowercaseE,\n charCodes.lowercaseO,\n ]),\n hex: new Set([\n charCodes.dot,\n charCodes.uppercaseX,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseX,\n ]),\n};\n\nconst isAllowedNumericSeparatorSibling = {\n // 0 - 1\n bin: (ch: number) => ch === charCodes.digit0 || ch === charCodes.digit1,\n\n // 0 - 7\n oct: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit7,\n\n // 0 - 9\n dec: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit9,\n\n // 0 - 9, A - F, a - f,\n hex: (ch: number) =>\n (ch >= charCodes.digit0 && ch <= charCodes.digit9) ||\n (ch >= charCodes.uppercaseA && ch <= charCodes.uppercaseF) ||\n (ch >= charCodes.lowercaseA && ch <= charCodes.lowercaseF),\n};\n\nexport type StringContentsErrorHandlers = EscapedCharErrorHandlers & {\n unterminated(\n initialPos: number,\n initialLineStart: number,\n initialCurLine: number,\n ): void;\n};\n\nexport function readStringContents(\n type: \"single\" | \"double\" | \"template\",\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n errors: StringContentsErrorHandlers,\n) {\n const initialPos = pos;\n const initialLineStart = lineStart;\n const initialCurLine = curLine;\n\n let out = \"\";\n let firstInvalidLoc = null;\n let chunkStart = pos;\n const { length } = input;\n for (;;) {\n if (pos >= length) {\n errors.unterminated(initialPos, initialLineStart, initialCurLine);\n out += input.slice(chunkStart, pos);\n break;\n }\n const ch = input.charCodeAt(pos);\n if (isStringEnd(type, ch, input, pos)) {\n out += input.slice(chunkStart, pos);\n break;\n }\n if (ch === charCodes.backslash) {\n out += input.slice(chunkStart, pos);\n const res = readEscapedChar(\n input,\n pos,\n lineStart,\n curLine,\n type === \"template\",\n errors,\n );\n if (res.ch === null && !firstInvalidLoc) {\n firstInvalidLoc = { pos, lineStart, curLine };\n } else {\n out += res.ch;\n }\n ({ pos, lineStart, curLine } = res);\n chunkStart = pos;\n } else if (\n ch === charCodes.lineSeparator ||\n ch === charCodes.paragraphSeparator\n ) {\n ++pos;\n ++curLine;\n lineStart = pos;\n } else if (ch === charCodes.lineFeed || ch === charCodes.carriageReturn) {\n if (type === \"template\") {\n out += input.slice(chunkStart, pos) + \"\\n\";\n ++pos;\n if (\n ch === charCodes.carriageReturn &&\n input.charCodeAt(pos) === charCodes.lineFeed\n ) {\n ++pos;\n }\n ++curLine;\n chunkStart = lineStart = pos;\n } else {\n errors.unterminated(initialPos, initialLineStart, initialCurLine);\n }\n } else {\n ++pos;\n }\n }\n return process.env.BABEL_8_BREAKING\n ? { pos, str: out, firstInvalidLoc, lineStart, curLine }\n : {\n pos,\n str: out,\n firstInvalidLoc,\n lineStart,\n curLine,\n containsInvalid: !!firstInvalidLoc,\n };\n}\n\nfunction isStringEnd(\n type: \"single\" | \"double\" | \"template\",\n ch: number,\n input: string,\n pos: number,\n) {\n if (type === \"template\") {\n return (\n ch === charCodes.graveAccent ||\n (ch === charCodes.dollarSign &&\n input.charCodeAt(pos + 1) === charCodes.leftCurlyBrace)\n );\n }\n return (\n ch === (type === \"double\" ? charCodes.quotationMark : charCodes.apostrophe)\n );\n}\n\ntype EscapedCharErrorHandlers = HexCharErrorHandlers &\n CodePointErrorHandlers & {\n strictNumericEscape(pos: number, lineStart: number, curLine: number): void;\n };\n\nfunction readEscapedChar(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n inTemplate: boolean,\n errors: EscapedCharErrorHandlers,\n) {\n const throwOnInvalid = !inTemplate;\n pos++; // skip '\\'\n\n const res = (ch: string | null) => ({ pos, ch, lineStart, curLine });\n\n const ch = input.charCodeAt(pos++);\n switch (ch) {\n case charCodes.lowercaseN:\n return res(\"\\n\");\n case charCodes.lowercaseR:\n return res(\"\\r\");\n case charCodes.lowercaseX: {\n let code;\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n 2,\n false,\n throwOnInvalid,\n errors,\n ));\n return res(code === null ? null : String.fromCharCode(code));\n }\n case charCodes.lowercaseU: {\n let code;\n ({ code, pos } = readCodePoint(\n input,\n pos,\n lineStart,\n curLine,\n throwOnInvalid,\n errors,\n ));\n return res(code === null ? null : String.fromCodePoint(code));\n }\n case charCodes.lowercaseT:\n return res(\"\\t\");\n case charCodes.lowercaseB:\n return res(\"\\b\");\n case charCodes.lowercaseV:\n return res(\"\\u000b\");\n case charCodes.lowercaseF:\n return res(\"\\f\");\n case charCodes.carriageReturn:\n if (input.charCodeAt(pos) === charCodes.lineFeed) {\n ++pos;\n }\n // fall through\n case charCodes.lineFeed:\n lineStart = pos;\n ++curLine;\n // fall through\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n return res(\"\");\n case charCodes.digit8:\n case charCodes.digit9:\n if (inTemplate) {\n return res(null);\n } else {\n errors.strictNumericEscape(pos - 1, lineStart, curLine);\n }\n // fall through\n default:\n if (ch >= charCodes.digit0 && ch <= charCodes.digit7) {\n const startPos = pos - 1;\n const match = /^[0-7]+/.exec(input.slice(startPos, pos + 2));\n\n let octalStr = match[0];\n\n let octal = parseInt(octalStr, 8);\n if (octal > 255) {\n octalStr = octalStr.slice(0, -1);\n octal = parseInt(octalStr, 8);\n }\n pos += octalStr.length - 1;\n const next = input.charCodeAt(pos);\n if (\n octalStr !== \"0\" ||\n next === charCodes.digit8 ||\n next === charCodes.digit9\n ) {\n if (inTemplate) {\n return res(null);\n } else {\n errors.strictNumericEscape(startPos, lineStart, curLine);\n }\n }\n\n return res(String.fromCharCode(octal));\n }\n\n return res(String.fromCharCode(ch));\n }\n}\n\ntype HexCharErrorHandlers = IntErrorHandlers & {\n invalidEscapeSequence(pos: number, lineStart: number, curLine: number): void;\n};\n\n// Used to read character escape sequences ('\\x', '\\u').\nfunction readHexChar(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n len: number,\n forceLen: boolean,\n throwOnInvalid: boolean,\n errors: HexCharErrorHandlers,\n) {\n const initialPos = pos;\n let n;\n ({ n, pos } = readInt(\n input,\n pos,\n lineStart,\n curLine,\n 16,\n len,\n forceLen,\n false,\n errors,\n /* bailOnError */ !throwOnInvalid,\n ));\n if (n === null) {\n if (throwOnInvalid) {\n errors.invalidEscapeSequence(initialPos, lineStart, curLine);\n } else {\n pos = initialPos - 1;\n }\n }\n return { code: n, pos };\n}\n\nexport type IntErrorHandlers = {\n numericSeparatorInEscapeSequence(\n pos: number,\n lineStart: number,\n curLine: number,\n ): void;\n unexpectedNumericSeparator(\n pos: number,\n lineStart: number,\n curLine: number,\n ): void;\n // It can return \"true\" to indicate that the error was handled\n // and the int parsing should continue.\n invalidDigit(\n pos: number,\n lineStart: number,\n curLine: number,\n radix: number,\n ): boolean;\n};\n\nexport function readInt(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n radix: number,\n len: number | undefined,\n forceLen: boolean,\n allowNumSeparator: boolean | \"bail\",\n errors: IntErrorHandlers,\n bailOnError: boolean,\n) {\n const start = pos;\n const forbiddenSiblings =\n radix === 16\n ? forbiddenNumericSeparatorSiblings.hex\n : forbiddenNumericSeparatorSiblings.decBinOct;\n const isAllowedSibling =\n radix === 16\n ? isAllowedNumericSeparatorSibling.hex\n : radix === 10\n ? isAllowedNumericSeparatorSibling.dec\n : radix === 8\n ? isAllowedNumericSeparatorSibling.oct\n : isAllowedNumericSeparatorSibling.bin;\n\n let invalid = false;\n let total = 0;\n\n for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {\n const code = input.charCodeAt(pos);\n let val;\n\n if (code === charCodes.underscore && allowNumSeparator !== \"bail\") {\n const prev = input.charCodeAt(pos - 1);\n const next = input.charCodeAt(pos + 1);\n\n if (!allowNumSeparator) {\n if (bailOnError) return { n: null, pos };\n errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);\n } else if (\n Number.isNaN(next) ||\n !isAllowedSibling(next) ||\n forbiddenSiblings.has(prev) ||\n forbiddenSiblings.has(next)\n ) {\n if (bailOnError) return { n: null, pos };\n errors.unexpectedNumericSeparator(pos, lineStart, curLine);\n }\n\n // Ignore this _ character\n ++pos;\n continue;\n }\n\n if (code >= charCodes.lowercaseA) {\n val = code - charCodes.lowercaseA + charCodes.lineFeed;\n } else if (code >= charCodes.uppercaseA) {\n val = code - charCodes.uppercaseA + charCodes.lineFeed;\n } else if (charCodes.isDigit(code)) {\n val = code - charCodes.digit0; // 0-9\n } else {\n val = Infinity;\n }\n if (val >= radix) {\n // If we found a digit which is too big, errors.invalidDigit can return true to avoid\n // breaking the loop (this is used for error recovery).\n if (val <= 9 && bailOnError) {\n return { n: null, pos };\n } else if (\n val <= 9 &&\n errors.invalidDigit(pos, lineStart, curLine, radix)\n ) {\n val = 0;\n } else if (forceLen) {\n val = 0;\n invalid = true;\n } else {\n break;\n }\n }\n ++pos;\n total = total * radix + val;\n }\n if (pos === start || (len != null && pos - start !== len) || invalid) {\n return { n: null, pos };\n }\n\n return { n: total, pos };\n}\n\nexport type CodePointErrorHandlers = HexCharErrorHandlers & {\n invalidCodePoint(pos: number, lineStart: number, curLine: number): void;\n};\n\nexport function readCodePoint(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n throwOnInvalid: boolean,\n errors: CodePointErrorHandlers,\n) {\n const ch = input.charCodeAt(pos);\n let code;\n\n if (ch === charCodes.leftCurlyBrace) {\n ++pos;\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n input.indexOf(\"}\", pos) - pos,\n true,\n throwOnInvalid,\n errors,\n ));\n ++pos;\n if (code !== null && code > 0x10ffff) {\n if (throwOnInvalid) {\n errors.invalidCodePoint(pos, lineStart, curLine);\n } else {\n return { code: null, pos };\n }\n }\n } else {\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n 4,\n false,\n throwOnInvalid,\n errors,\n ));\n }\n return { code, pos };\n}\n"],"mappings":";;;;;;;;eAAA,SAASA,OAAOA,CAACC,IAAI,EAAE;EACrB,OAAOA,IAAI,MAAU,IAAIA,IAAI,MAAU;AACzC,CAAC;AAID,MAAMC,iCAAiC,GAAG;EACxCC,SAAS,EAAE,IAAIC,GAAG,CAAS,kCAS1B,CAAC;EACFC,GAAG,EAAE,IAAID,GAAG,CAAS,iBAKpB;AACH,CAAC;AAED,MAAME,gCAAgC,GAAG;EAEvCC,GAAG,EAAGC,EAAU,IAAKA,EAAE,OAAqB,IAAIA,EAAE,OAAqB;EAGvEC,GAAG,EAAGD,EAAU,IAAKA,EAAE,MAAoB,IAAIA,EAAE,MAAoB;EAGrEE,GAAG,EAAGF,EAAU,IAAKA,EAAE,MAAoB,IAAIA,EAAE,MAAoB;EAGrEH,GAAG,EAAGG,EAAU,IACbA,EAAE,MAAoB,IAAIA,EAAE,MAAoB,IAChDA,EAAE,MAAwB,IAAIA,EAAE,MAAyB,IACzDA,EAAE,MAAwB,IAAIA,EAAE;AACrC,CAAC;AAUM,SAASG,kBAAkBA,CAChCC,IAAsC,EACtCC,KAAa,EACbC,GAAW,EACXC,SAAiB,EACjBC,OAAe,EACfC,MAAmC,EACnC;EACA,MAAMC,UAAU,GAAGJ,GAAG;EACtB,MAAMK,gBAAgB,GAAGJ,SAAS;EAClC,MAAMK,cAAc,GAAGJ,OAAO;EAE9B,IAAIK,GAAG,GAAG,EAAE;EACZ,IAAIC,eAAe,GAAG,IAAI;EAC1B,IAAIC,UAAU,GAAGT,GAAG;EACpB,MAAM;IAAEU;EAAO,CAAC,GAAGX,KAAK;EACxB,SAAS;IACP,IAAIC,GAAG,IAAIU,MAAM,EAAE;MACjBP,MAAM,CAACQ,YAAY,CAACP,UAAU,EAAEC,gBAAgB,EAAEC,cAAc,CAAC;MACjEC,GAAG,IAAIR,KAAK,CAACa,KAAK,CAACH,UAAU,EAAET,GAAG,CAAC;MACnC;IACF;IACA,MAAMN,EAAE,GAAGK,KAAK,CAACc,UAAU,CAACb,GAAG,CAAC;IAChC,IAAIc,WAAW,CAAChB,IAAI,EAAEJ,EAAE,EAAEK,KAAK,EAAEC,GAAG,CAAC,EAAE;MACrCO,GAAG,IAAIR,KAAK,CAACa,KAAK,CAACH,UAAU,EAAET,GAAG,CAAC;MACnC;IACF;IACA,IAAIN,EAAE,OAAwB,EAAE;MAC9Ba,GAAG,IAAIR,KAAK,CAACa,KAAK,CAACH,UAAU,EAAET,GAAG,CAAC;MACnC,MAAMe,GAAG,GAAGC,eAAe,CACzBjB,KAAK,EACLC,GAAG,EACHC,SAAS,EACTC,OAAO,EACPJ,IAAI,KAAK,UAAU,EACnBK,MACF,CAAC;MACD,IAAIY,GAAG,CAACrB,EAAE,KAAK,IAAI,IAAI,CAACc,eAAe,EAAE;QACvCA,eAAe,GAAG;UAAER,GAAG;UAAEC,SAAS;UAAEC;QAAQ,CAAC;MAC/C,CAAC,MAAM;QACLK,GAAG,IAAIQ,GAAG,CAACrB,EAAE;MACf;MACA,CAAC;QAAEM,GAAG;QAAEC,SAAS;QAAEC;MAAQ,CAAC,GAAGa,GAAG;MAClCN,UAAU,GAAGT,GAAG;IAClB,CAAC,MAAM,IACLN,EAAE,SAA4B,IAC9BA,EAAE,SAAiC,EACnC;MACA,EAAEM,GAAG;MACL,EAAEE,OAAO;MACTD,SAAS,GAAGD,GAAG;IACjB,CAAC,MAAM,IAAIN,EAAE,OAAuB,IAAIA,EAAE,OAA6B,EAAE;MACvE,IAAII,IAAI,KAAK,UAAU,EAAE;QACvBS,GAAG,IAAIR,KAAK,CAACa,KAAK,CAACH,UAAU,EAAET,GAAG,CAAC,GAAG,IAAI;QAC1C,EAAEA,GAAG;QACL,IACEN,EAAE,OAA6B,IAC/BK,KAAK,CAACc,UAAU,CAACb,GAAG,CAAC,OAAuB,EAC5C;UACA,EAAEA,GAAG;QACP;QACA,EAAEE,OAAO;QACTO,UAAU,GAAGR,SAAS,GAAGD,GAAG;MAC9B,CAAC,MAAM;QACLG,MAAM,CAACQ,YAAY,CAACP,UAAU,EAAEC,gBAAgB,EAAEC,cAAc,CAAC;MACnE;IACF,CAAC,MAAM;MACL,EAAEN,GAAG;IACP;EACF;EACA,OAEI;IACEA,GAAG;IACHiB,GAAG,EAAEV,GAAG;IACRC,eAAe;IACfP,SAAS;IACTC,OAAO;IACPgB,eAAe,EAAE,CAAC,CAACV;EACrB,CAAC;AACP;AAEA,SAASM,WAAWA,CAClBhB,IAAsC,EACtCJ,EAAU,EACVK,KAAa,EACbC,GAAW,EACX;EACA,IAAIF,IAAI,KAAK,UAAU,EAAE;IACvB,OACEJ,EAAE,OAA0B,IAC3BA,EAAE,OAAyB,IAC1BK,KAAK,CAACc,UAAU,CAACb,GAAG,GAAG,CAAC,CAAC,QAA8B;EAE7D;EACA,OACEN,EAAE,MAAMI,IAAI,KAAK,QAAQ,UAAiD,CAAC;AAE/E;AAOA,SAASkB,eAAeA,CACtBjB,KAAa,EACbC,GAAW,EACXC,SAAiB,EACjBC,OAAe,EACfiB,UAAmB,EACnBhB,MAAgC,EAChC;EACA,MAAMiB,cAAc,GAAG,CAACD,UAAU;EAClCnB,GAAG,EAAE;EAEL,MAAMe,GAAG,GAAIrB,EAAiB,KAAM;IAAEM,GAAG;IAAEN,EAAE;IAAEO,SAAS;IAAEC;EAAQ,CAAC,CAAC;EAEpE,MAAMR,EAAE,GAAGK,KAAK,CAACc,UAAU,CAACb,GAAG,EAAE,CAAC;EAClC,QAAQN,EAAE;IACR;MACE,OAAOqB,GAAG,CAAC,IAAI,CAAC;IAClB;MACE,OAAOA,GAAG,CAAC,IAAI,CAAC;IAClB;MAA2B;QACzB,IAAI5B,IAAI;QACR,CAAC;UAAEA,IAAI;UAAEa;QAAI,CAAC,GAAGqB,WAAW,CAC1BtB,KAAK,EACLC,GAAG,EACHC,SAAS,EACTC,OAAO,EACP,CAAC,EACD,KAAK,EACLkB,cAAc,EACdjB,MACF,CAAC;QACD,OAAOY,GAAG,CAAC5B,IAAI,KAAK,IAAI,GAAG,IAAI,GAAGmC,MAAM,CAACC,YAAY,CAACpC,IAAI,CAAC,CAAC;MAC9D;IACA;MAA2B;QACzB,IAAIA,IAAI;QACR,CAAC;UAAEA,IAAI;UAAEa;QAAI,CAAC,GAAGwB,aAAa,CAC5BzB,KAAK,EACLC,GAAG,EACHC,SAAS,EACTC,OAAO,EACPkB,cAAc,EACdjB,MACF,CAAC;QACD,OAAOY,GAAG,CAAC5B,IAAI,KAAK,IAAI,GAAG,IAAI,GAAGmC,MAAM,CAACG,aAAa,CAACtC,IAAI,CAAC,CAAC;MAC/D;IACA;MACE,OAAO4B,GAAG,CAAC,IAAI,CAAC;IAClB;MACE,OAAOA,GAAG,CAAC,IAAI,CAAC;IAClB;MACE,OAAOA,GAAG,CAAC,QAAQ,CAAC;IACtB;MACE,OAAOA,GAAG,CAAC,IAAI,CAAC;IAClB;MACE,IAAIhB,KAAK,CAACc,UAAU,CAACb,GAAG,CAAC,OAAuB,EAAE;QAChD,EAAEA,GAAG;MACP;IAEF;MACEC,SAAS,GAAGD,GAAG;MACf,EAAEE,OAAO;IAEX;IACA;MACE,OAAOa,GAAG,CAAC,EAAE,CAAC;IAChB;IACA;MACE,IAAII,UAAU,EAAE;QACd,OAAOJ,GAAG,CAAC,IAAI,CAAC;MAClB,CAAC,MAAM;QACLZ,MAAM,CAACuB,mBAAmB,CAAC1B,GAAG,GAAG,CAAC,EAAEC,SAAS,EAAEC,OAAO,CAAC;MACzD;IAEF;MACE,IAAIR,EAAE,MAAoB,IAAIA,EAAE,MAAoB,EAAE;QACpD,MAAMiC,QAAQ,GAAG3B,GAAG,GAAG,CAAC;QACxB,MAAM4B,KAAK,GAAG,SAAS,CAACC,IAAI,CAAC9B,KAAK,CAACa,KAAK,CAACe,QAAQ,EAAE3B,GAAG,GAAG,CAAC,CAAC,CAAC;QAE5D,IAAI8B,QAAQ,GAAGF,KAAK,CAAC,CAAC,CAAC;QAEvB,IAAIG,KAAK,GAAGC,QAAQ,CAACF,QAAQ,EAAE,CAAC,CAAC;QACjC,IAAIC,KAAK,GAAG,GAAG,EAAE;UACfD,QAAQ,GAAGA,QAAQ,CAAClB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;UAChCmB,KAAK,GAAGC,QAAQ,CAACF,QAAQ,EAAE,CAAC,CAAC;QAC/B;QACA9B,GAAG,IAAI8B,QAAQ,CAACpB,MAAM,GAAG,CAAC;QAC1B,MAAMuB,IAAI,GAAGlC,KAAK,CAACc,UAAU,CAACb,GAAG,CAAC;QAClC,IACE8B,QAAQ,KAAK,GAAG,IAChBG,IAAI,OAAqB,IACzBA,IAAI,OAAqB,EACzB;UACA,IAAId,UAAU,EAAE;YACd,OAAOJ,GAAG,CAAC,IAAI,CAAC;UAClB,CAAC,MAAM;YACLZ,MAAM,CAACuB,mBAAmB,CAACC,QAAQ,EAAE1B,SAAS,EAAEC,OAAO,CAAC;UAC1D;QACF;QAEA,OAAOa,GAAG,CAACO,MAAM,CAACC,YAAY,CAACQ,KAAK,CAAC,CAAC;MACxC;MAEA,OAAOhB,GAAG,CAACO,MAAM,CAACC,YAAY,CAAC7B,EAAE,CAAC,CAAC;EACvC;AACF;AAOA,SAAS2B,WAAWA,CAClBtB,KAAa,EACbC,GAAW,EACXC,SAAiB,EACjBC,OAAe,EACfgC,GAAW,EACXC,QAAiB,EACjBf,cAAuB,EACvBjB,MAA4B,EAC5B;EACA,MAAMC,UAAU,GAAGJ,GAAG;EACtB,IAAIoC,CAAC;EACL,CAAC;IAAEA,CAAC;IAAEpC;EAAI,CAAC,GAAGqC,OAAO,CACnBtC,KAAK,EACLC,GAAG,EACHC,SAAS,EACTC,OAAO,EACP,EAAE,EACFgC,GAAG,EACHC,QAAQ,EACR,KAAK,EACLhC,MAAM,EACY,CAACiB,cACrB,CAAC;EACD,IAAIgB,CAAC,KAAK,IAAI,EAAE;IACd,IAAIhB,cAAc,EAAE;MAClBjB,MAAM,CAACmC,qBAAqB,CAAClC,UAAU,EAAEH,SAAS,EAAEC,OAAO,CAAC;IAC9D,CAAC,MAAM;MACLF,GAAG,GAAGI,UAAU,GAAG,CAAC;IACtB;EACF;EACA,OAAO;IAAEjB,IAAI,EAAEiD,CAAC;IAAEpC;EAAI,CAAC;AACzB;AAuBO,SAASqC,OAAOA,CACrBtC,KAAa,EACbC,GAAW,EACXC,SAAiB,EACjBC,OAAe,EACfqC,KAAa,EACbL,GAAuB,EACvBC,QAAiB,EACjBK,iBAAmC,EACnCrC,MAAwB,EACxBsC,WAAoB,EACpB;EACA,MAAMC,KAAK,GAAG1C,GAAG;EACjB,MAAM2C,iBAAiB,GACrBJ,KAAK,KAAK,EAAE,GACRnD,iCAAiC,CAACG,GAAG,GACrCH,iCAAiC,CAACC,SAAS;EACjD,MAAMuD,gBAAgB,GACpBL,KAAK,KAAK,EAAE,GACR/C,gCAAgC,CAACD,GAAG,GACpCgD,KAAK,KAAK,EAAE,GACV/C,gCAAgC,CAACI,GAAG,GACpC2C,KAAK,KAAK,CAAC,GACT/C,gCAAgC,CAACG,GAAG,GACpCH,gCAAgC,CAACC,GAAG;EAE9C,IAAIoD,OAAO,GAAG,KAAK;EACnB,IAAIC,KAAK,GAAG,CAAC;EAEb,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEC,CAAC,GAAGd,GAAG,IAAI,IAAI,GAAGe,QAAQ,GAAGf,GAAG,EAAEa,CAAC,GAAGC,CAAC,EAAE,EAAED,CAAC,EAAE;IAC5D,MAAM5D,IAAI,GAAGY,KAAK,CAACc,UAAU,CAACb,GAAG,CAAC;IAClC,IAAIkD,GAAG;IAEP,IAAI/D,IAAI,OAAyB,IAAIqD,iBAAiB,KAAK,MAAM,EAAE;MACjE,MAAMW,IAAI,GAAGpD,KAAK,CAACc,UAAU,CAACb,GAAG,GAAG,CAAC,CAAC;MACtC,MAAMiC,IAAI,GAAGlC,KAAK,CAACc,UAAU,CAACb,GAAG,GAAG,CAAC,CAAC;MAEtC,IAAI,CAACwC,iBAAiB,EAAE;QACtB,IAAIC,WAAW,EAAE,OAAO;UAAEL,CAAC,EAAE,IAAI;UAAEpC;QAAI,CAAC;QACxCG,MAAM,CAACiD,gCAAgC,CAACpD,GAAG,EAAEC,SAAS,EAAEC,OAAO,CAAC;MAClE,CAAC,MAAM,IACLmD,MAAM,CAACC,KAAK,CAACrB,IAAI,CAAC,IAClB,CAACW,gBAAgB,CAACX,IAAI,CAAC,IACvBU,iBAAiB,CAACY,GAAG,CAACJ,IAAI,CAAC,IAC3BR,iBAAiB,CAACY,GAAG,CAACtB,IAAI,CAAC,EAC3B;QACA,IAAIQ,WAAW,EAAE,OAAO;UAAEL,CAAC,EAAE,IAAI;UAAEpC;QAAI,CAAC;QACxCG,MAAM,CAACqD,0BAA0B,CAACxD,GAAG,EAAEC,SAAS,EAAEC,OAAO,CAAC;MAC5D;MAGA,EAAEF,GAAG;MACL;IACF;IAEA,IAAIb,IAAI,MAAwB,EAAE;MAChC+D,GAAG,GAAG/D,IAAI,KAAuB,KAAqB;IACxD,CAAC,MAAM,IAAIA,IAAI,MAAwB,EAAE;MACvC+D,GAAG,GAAG/D,IAAI,KAAuB,KAAqB;IACxD,CAAC,MAAM,IAAIsE,QAAA,CAAkBtE,IAAI,CAAC,EAAE;MAClC+D,GAAG,GAAG/D,IAAI,KAAmB;IAC/B,CAAC,MAAM;MACL+D,GAAG,GAAGD,QAAQ;IAChB;IACA,IAAIC,GAAG,IAAIX,KAAK,EAAE;MAGhB,IAAIW,GAAG,IAAI,CAAC,IAAIT,WAAW,EAAE;QAC3B,OAAO;UAAEL,CAAC,EAAE,IAAI;UAAEpC;QAAI,CAAC;MACzB,CAAC,MAAM,IACLkD,GAAG,IAAI,CAAC,IACR/C,MAAM,CAACuD,YAAY,CAAC1D,GAAG,EAAEC,SAAS,EAAEC,OAAO,EAAEqC,KAAK,CAAC,EACnD;QACAW,GAAG,GAAG,CAAC;MACT,CAAC,MAAM,IAAIf,QAAQ,EAAE;QACnBe,GAAG,GAAG,CAAC;QACPL,OAAO,GAAG,IAAI;MAChB,CAAC,MAAM;QACL;MACF;IACF;IACA,EAAE7C,GAAG;IACL8C,KAAK,GAAGA,KAAK,GAAGP,KAAK,GAAGW,GAAG;EAC7B;EACA,IAAIlD,GAAG,KAAK0C,KAAK,IAAKR,GAAG,IAAI,IAAI,IAAIlC,GAAG,GAAG0C,KAAK,KAAKR,GAAI,IAAIW,OAAO,EAAE;IACpE,OAAO;MAAET,CAAC,EAAE,IAAI;MAAEpC;IAAI,CAAC;EACzB;EAEA,OAAO;IAAEoC,CAAC,EAAEU,KAAK;IAAE9C;EAAI,CAAC;AAC1B;AAMO,SAASwB,aAAaA,CAC3BzB,KAAa,EACbC,GAAW,EACXC,SAAiB,EACjBC,OAAe,EACfkB,cAAuB,EACvBjB,MAA8B,EAC9B;EACA,MAAMT,EAAE,GAAGK,KAAK,CAACc,UAAU,CAACb,GAAG,CAAC;EAChC,IAAIb,IAAI;EAER,IAAIO,EAAE,QAA6B,EAAE;IACnC,EAAEM,GAAG;IACL,CAAC;MAAEb,IAAI;MAAEa;IAAI,CAAC,GAAGqB,WAAW,CAC1BtB,KAAK,EACLC,GAAG,EACHC,SAAS,EACTC,OAAO,EACPH,KAAK,CAAC4D,OAAO,CAAC,GAAG,EAAE3D,GAAG,CAAC,GAAGA,GAAG,EAC7B,IAAI,EACJoB,cAAc,EACdjB,MACF,CAAC;IACD,EAAEH,GAAG;IACL,IAAIb,IAAI,KAAK,IAAI,IAAIA,IAAI,GAAG,QAAQ,EAAE;MACpC,IAAIiC,cAAc,EAAE;QAClBjB,MAAM,CAACyD,gBAAgB,CAAC5D,GAAG,EAAEC,SAAS,EAAEC,OAAO,CAAC;MAClD,CAAC,MAAM;QACL,OAAO;UAAEf,IAAI,EAAE,IAAI;UAAEa;QAAI,CAAC;MAC5B;IACF;EACF,CAAC,MAAM;IACL,CAAC;MAAEb,IAAI;MAAEa;IAAI,CAAC,GAAGqB,WAAW,CAC1BtB,KAAK,EACLC,GAAG,EACHC,SAAS,EACTC,OAAO,EACP,CAAC,EACD,KAAK,EACLkB,cAAc,EACdjB,MACF,CAAC;EACH;EACA,OAAO;IAAEhB,IAAI;IAAEa;EAAI,CAAC;AACtB","ignoreList":[]} \ No newline at end of file diff --git a/vuetest/node_modules/@babel/helper-string-parser/package.json b/vuetest/node_modules/@babel/helper-string-parser/package.json new file mode 100644 index 0000000..0d0a31a --- /dev/null +++ b/vuetest/node_modules/@babel/helper-string-parser/package.json @@ -0,0 +1,31 @@ +{ + "name": "@babel/helper-string-parser", + "version": "7.25.9", + "description": "A utility package to parse strings", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-helper-string-parser" + }, + "homepage": "https://babel.dev/docs/en/next/babel-helper-string-parser", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "main": "./lib/index.js", + "devDependencies": { + "charcodes": "^0.2.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "author": "The Babel Team (https://babel.dev/team)", + "exports": { + ".": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + }, + "./package.json": "./package.json" + }, + "type": "commonjs" +} \ No newline at end of file diff --git a/vuetest/node_modules/@babel/helper-validator-identifier/LICENSE b/vuetest/node_modules/@babel/helper-validator-identifier/LICENSE new file mode 100644 index 0000000..f31575e --- /dev/null +++ b/vuetest/node_modules/@babel/helper-validator-identifier/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +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. diff --git a/vuetest/node_modules/@babel/helper-validator-identifier/README.md b/vuetest/node_modules/@babel/helper-validator-identifier/README.md new file mode 100644 index 0000000..05c19e6 --- /dev/null +++ b/vuetest/node_modules/@babel/helper-validator-identifier/README.md @@ -0,0 +1,19 @@ +# @babel/helper-validator-identifier + +> Validate identifier/keywords name + +See our website [@babel/helper-validator-identifier](https://babeljs.io/docs/babel-helper-validator-identifier) for more information. + +## Install + +Using npm: + +```sh +npm install --save @babel/helper-validator-identifier +``` + +or using yarn: + +```sh +yarn add @babel/helper-validator-identifier +``` diff --git a/vuetest/node_modules/@babel/helper-validator-identifier/lib/identifier.js b/vuetest/node_modules/@babel/helper-validator-identifier/lib/identifier.js new file mode 100644 index 0000000..fdb9aec --- /dev/null +++ b/vuetest/node_modules/@babel/helper-validator-identifier/lib/identifier.js @@ -0,0 +1,70 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isIdentifierChar = isIdentifierChar; +exports.isIdentifierName = isIdentifierName; +exports.isIdentifierStart = isIdentifierStart; +let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c8a\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7cd\ua7d0\ua7d1\ua7d3\ua7d5-\ua7dc\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; +let nonASCIIidentifierChars = "\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0897-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65"; +const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); +const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); +nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; +const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; +const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; +function isInAstralSet(code, set) { + let pos = 0x10000; + for (let i = 0, length = set.length; i < length; i += 2) { + pos += set[i]; + if (pos > code) return false; + pos += set[i + 1]; + if (pos >= code) return true; + } + return false; +} +function isIdentifierStart(code) { + if (code < 65) return code === 36; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + if (code <= 0xffff) { + return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes); +} +function isIdentifierChar(code) { + if (code < 48) return code === 36; + if (code < 58) return true; + if (code < 65) return false; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + if (code <= 0xffff) { + return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); +} +function isIdentifierName(name) { + let isFirst = true; + for (let i = 0; i < name.length; i++) { + let cp = name.charCodeAt(i); + if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) { + const trail = name.charCodeAt(++i); + if ((trail & 0xfc00) === 0xdc00) { + cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff); + } + } + if (isFirst) { + isFirst = false; + if (!isIdentifierStart(cp)) { + return false; + } + } else if (!isIdentifierChar(cp)) { + return false; + } + } + return !isFirst; +} + +//# sourceMappingURL=identifier.js.map diff --git a/vuetest/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map b/vuetest/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map new file mode 100644 index 0000000..ecf0952 --- /dev/null +++ b/vuetest/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map @@ -0,0 +1 @@ +{"version":3,"names":["nonASCIIidentifierStartChars","nonASCIIidentifierChars","nonASCIIidentifierStart","RegExp","nonASCIIidentifier","astralIdentifierStartCodes","astralIdentifierCodes","isInAstralSet","code","set","pos","i","length","isIdentifierStart","test","String","fromCharCode","isIdentifierChar","isIdentifierName","name","isFirst","cp","charCodeAt","trail"],"sources":["../src/identifier.ts"],"sourcesContent":["// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\n// ## Character categories\n\n// Big ugly regular expressions that match characters in the\n// whitespace, identifier, and identifier-start categories. These\n// are only applied when a character is found to actually have a\n// code point between 0x80 and 0xffff.\n// Generated by `scripts/generate-identifier-regex.cjs`.\n\n/* prettier-ignore */\nlet nonASCIIidentifierStartChars = \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u0870-\\u0887\\u0889-\\u088e\\u08a0-\\u08c9\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u09fc\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0af9\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c39\\u0c3d\\u0c58-\\u0c5a\\u0c5d\\u0c60\\u0c61\\u0c80\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cdd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d04-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d54-\\u0d56\\u0d5f-\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e86-\\u0e8a\\u0e8c-\\u0ea3\\u0ea5\\u0ea7-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u1711\\u171f-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4c\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c8a\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7cd\\ua7d0\\ua7d1\\ua7d3\\ua7d5-\\ua7dc\\ua7f2-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab69\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\";\n/* prettier-ignore */\nlet nonASCIIidentifierChars = \"\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u0897-\\u089f\\u08ca-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3c\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0cf3\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0ebc\\u0ec8-\\u0ece\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u180f-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf-\\u1ace\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1dff\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\u30fb\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\\uff65\";\n\nconst nonASCIIidentifierStart = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + \"]\",\n);\nconst nonASCIIidentifier = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\",\n);\n\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\n\n// These are a run-length and offset-encoded representation of the\n// >0xffff code points that are a valid part of identifiers. The\n// offset starts at 0x10000, and each pair of numbers represents an\n// offset to the next range, and then a size of the range. They were\n// generated by `scripts/generate-identifier-regex.cjs`.\n/* prettier-ignore */\nconst astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191];\n/* prettier-ignore */\nconst astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];\n\n// This has a complexity linear to the value of the code. The\n// assumption is that looking up astral identifier characters is\n// rare.\nfunction isInAstralSet(code: number, set: readonly number[]): boolean {\n let pos = 0x10000;\n for (let i = 0, length = set.length; i < length; i += 2) {\n pos += set[i];\n if (pos > code) return false;\n\n pos += set[i + 1];\n if (pos >= code) return true;\n }\n return false;\n}\n\n// Test whether a given character code starts an identifier.\n\nexport function isIdentifierStart(code: number): boolean {\n if (code < charCodes.uppercaseA) return code === charCodes.dollarSign;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return (\n code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))\n );\n }\n return isInAstralSet(code, astralIdentifierStartCodes);\n}\n\n// Test whether a given character is part of an identifier.\n\nexport function isIdentifierChar(code: number): boolean {\n if (code < charCodes.digit0) return code === charCodes.dollarSign;\n if (code < charCodes.colon) return true;\n if (code < charCodes.uppercaseA) return false;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n }\n return (\n isInAstralSet(code, astralIdentifierStartCodes) ||\n isInAstralSet(code, astralIdentifierCodes)\n );\n}\n\n// Test whether a given string is a valid identifier name\n\nexport function isIdentifierName(name: string): boolean {\n let isFirst = true;\n for (let i = 0; i < name.length; i++) {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `name` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = name.charCodeAt(i);\n if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n const trail = name.charCodeAt(++i);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n if (isFirst) {\n isFirst = false;\n if (!isIdentifierStart(cp)) {\n return false;\n }\n } else if (!isIdentifierChar(cp)) {\n return false;\n }\n }\n return !isFirst;\n}\n"],"mappings":";;;;;;;;AAaA,IAAIA,4BAA4B,GAAG,8qIAA8qI;AAEjtI,IAAIC,uBAAuB,GAAG,+kFAA+kF;AAE7mF,MAAMC,uBAAuB,GAAG,IAAIC,MAAM,CACxC,GAAG,GAAGH,4BAA4B,GAAG,GACvC,CAAC;AACD,MAAMI,kBAAkB,GAAG,IAAID,MAAM,CACnC,GAAG,GAAGH,4BAA4B,GAAGC,uBAAuB,GAAG,GACjE,CAAC;AAEDD,4BAA4B,GAAGC,uBAAuB,GAAG,IAAI;AAQ7D,MAAMI,0BAA0B,GAAG,CAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,GAAG,EAAC,GAAG,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,IAAI,EAAC,EAAE,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,IAAI,EAAC,EAAE,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,IAAI,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,IAAI,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,IAAI,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,IAAI,EAAC,KAAK,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,EAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,IAAI,EAAC,CAAC,EAAC,IAAI,CAAC;AAEjkD,MAAMC,qBAAqB,GAAG,CAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,MAAM,EAAC,GAAG,CAAC;AAK/0B,SAASC,aAAaA,CAACC,IAAY,EAAEC,GAAsB,EAAW;EACpE,IAAIC,GAAG,GAAG,OAAO;EACjB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEC,MAAM,GAAGH,GAAG,CAACG,MAAM,EAAED,CAAC,GAAGC,MAAM,EAAED,CAAC,IAAI,CAAC,EAAE;IACvDD,GAAG,IAAID,GAAG,CAACE,CAAC,CAAC;IACb,IAAID,GAAG,GAAGF,IAAI,EAAE,OAAO,KAAK;IAE5BE,GAAG,IAAID,GAAG,CAACE,CAAC,GAAG,CAAC,CAAC;IACjB,IAAID,GAAG,IAAIF,IAAI,EAAE,OAAO,IAAI;EAC9B;EACA,OAAO,KAAK;AACd;AAIO,SAASK,iBAAiBA,CAACL,IAAY,EAAW;EACvD,IAAIA,IAAI,KAAuB,EAAE,OAAOA,IAAI,OAAyB;EACrE,IAAIA,IAAI,MAAwB,EAAE,OAAO,IAAI;EAC7C,IAAIA,IAAI,KAAuB,EAAE,OAAOA,IAAI,OAAyB;EACrE,IAAIA,IAAI,OAAwB,EAAE,OAAO,IAAI;EAC7C,IAAIA,IAAI,IAAI,MAAM,EAAE;IAClB,OACEA,IAAI,IAAI,IAAI,IAAIN,uBAAuB,CAACY,IAAI,CAACC,MAAM,CAACC,YAAY,CAACR,IAAI,CAAC,CAAC;EAE3E;EACA,OAAOD,aAAa,CAACC,IAAI,EAAEH,0BAA0B,CAAC;AACxD;AAIO,SAASY,gBAAgBA,CAACT,IAAY,EAAW;EACtD,IAAIA,IAAI,KAAmB,EAAE,OAAOA,IAAI,OAAyB;EACjE,IAAIA,IAAI,KAAkB,EAAE,OAAO,IAAI;EACvC,IAAIA,IAAI,KAAuB,EAAE,OAAO,KAAK;EAC7C,IAAIA,IAAI,MAAwB,EAAE,OAAO,IAAI;EAC7C,IAAIA,IAAI,KAAuB,EAAE,OAAOA,IAAI,OAAyB;EACrE,IAAIA,IAAI,OAAwB,EAAE,OAAO,IAAI;EAC7C,IAAIA,IAAI,IAAI,MAAM,EAAE;IAClB,OAAOA,IAAI,IAAI,IAAI,IAAIJ,kBAAkB,CAACU,IAAI,CAACC,MAAM,CAACC,YAAY,CAACR,IAAI,CAAC,CAAC;EAC3E;EACA,OACED,aAAa,CAACC,IAAI,EAAEH,0BAA0B,CAAC,IAC/CE,aAAa,CAACC,IAAI,EAAEF,qBAAqB,CAAC;AAE9C;AAIO,SAASY,gBAAgBA,CAACC,IAAY,EAAW;EACtD,IAAIC,OAAO,GAAG,IAAI;EAClB,KAAK,IAAIT,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGQ,IAAI,CAACP,MAAM,EAAED,CAAC,EAAE,EAAE;IAKpC,IAAIU,EAAE,GAAGF,IAAI,CAACG,UAAU,CAACX,CAAC,CAAC;IAC3B,IAAI,CAACU,EAAE,GAAG,MAAM,MAAM,MAAM,IAAIV,CAAC,GAAG,CAAC,GAAGQ,IAAI,CAACP,MAAM,EAAE;MACnD,MAAMW,KAAK,GAAGJ,IAAI,CAACG,UAAU,CAAC,EAAEX,CAAC,CAAC;MAClC,IAAI,CAACY,KAAK,GAAG,MAAM,MAAM,MAAM,EAAE;QAC/BF,EAAE,GAAG,OAAO,IAAI,CAACA,EAAE,GAAG,KAAK,KAAK,EAAE,CAAC,IAAIE,KAAK,GAAG,KAAK,CAAC;MACvD;IACF;IACA,IAAIH,OAAO,EAAE;MACXA,OAAO,GAAG,KAAK;MACf,IAAI,CAACP,iBAAiB,CAACQ,EAAE,CAAC,EAAE;QAC1B,OAAO,KAAK;MACd;IACF,CAAC,MAAM,IAAI,CAACJ,gBAAgB,CAACI,EAAE,CAAC,EAAE;MAChC,OAAO,KAAK;IACd;EACF;EACA,OAAO,CAACD,OAAO;AACjB","ignoreList":[]} \ No newline at end of file diff --git a/vuetest/node_modules/@babel/helper-validator-identifier/lib/index.js b/vuetest/node_modules/@babel/helper-validator-identifier/lib/index.js new file mode 100644 index 0000000..76b2282 --- /dev/null +++ b/vuetest/node_modules/@babel/helper-validator-identifier/lib/index.js @@ -0,0 +1,57 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "isIdentifierChar", { + enumerable: true, + get: function () { + return _identifier.isIdentifierChar; + } +}); +Object.defineProperty(exports, "isIdentifierName", { + enumerable: true, + get: function () { + return _identifier.isIdentifierName; + } +}); +Object.defineProperty(exports, "isIdentifierStart", { + enumerable: true, + get: function () { + return _identifier.isIdentifierStart; + } +}); +Object.defineProperty(exports, "isKeyword", { + enumerable: true, + get: function () { + return _keyword.isKeyword; + } +}); +Object.defineProperty(exports, "isReservedWord", { + enumerable: true, + get: function () { + return _keyword.isReservedWord; + } +}); +Object.defineProperty(exports, "isStrictBindOnlyReservedWord", { + enumerable: true, + get: function () { + return _keyword.isStrictBindOnlyReservedWord; + } +}); +Object.defineProperty(exports, "isStrictBindReservedWord", { + enumerable: true, + get: function () { + return _keyword.isStrictBindReservedWord; + } +}); +Object.defineProperty(exports, "isStrictReservedWord", { + enumerable: true, + get: function () { + return _keyword.isStrictReservedWord; + } +}); +var _identifier = require("./identifier.js"); +var _keyword = require("./keyword.js"); + +//# sourceMappingURL=index.js.map diff --git a/vuetest/node_modules/@babel/helper-validator-identifier/lib/index.js.map b/vuetest/node_modules/@babel/helper-validator-identifier/lib/index.js.map new file mode 100644 index 0000000..d985f3b --- /dev/null +++ b/vuetest/node_modules/@babel/helper-validator-identifier/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_identifier","require","_keyword"],"sources":["../src/index.ts"],"sourcesContent":["export {\n isIdentifierName,\n isIdentifierChar,\n isIdentifierStart,\n} from \"./identifier.ts\";\nexport {\n isReservedWord,\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n isStrictReservedWord,\n isKeyword,\n} from \"./keyword.ts\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA","ignoreList":[]} \ No newline at end of file diff --git a/vuetest/node_modules/@babel/helper-validator-identifier/lib/keyword.js b/vuetest/node_modules/@babel/helper-validator-identifier/lib/keyword.js new file mode 100644 index 0000000..054cf84 --- /dev/null +++ b/vuetest/node_modules/@babel/helper-validator-identifier/lib/keyword.js @@ -0,0 +1,35 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isKeyword = isKeyword; +exports.isReservedWord = isReservedWord; +exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; +exports.isStrictBindReservedWord = isStrictBindReservedWord; +exports.isStrictReservedWord = isStrictReservedWord; +const reservedWords = { + keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], + strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], + strictBind: ["eval", "arguments"] +}; +const keywords = new Set(reservedWords.keyword); +const reservedWordsStrictSet = new Set(reservedWords.strict); +const reservedWordsStrictBindSet = new Set(reservedWords.strictBind); +function isReservedWord(word, inModule) { + return inModule && word === "await" || word === "enum"; +} +function isStrictReservedWord(word, inModule) { + return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); +} +function isStrictBindOnlyReservedWord(word) { + return reservedWordsStrictBindSet.has(word); +} +function isStrictBindReservedWord(word, inModule) { + return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); +} +function isKeyword(word) { + return keywords.has(word); +} + +//# sourceMappingURL=keyword.js.map diff --git a/vuetest/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map b/vuetest/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map new file mode 100644 index 0000000..3471f78 --- /dev/null +++ b/vuetest/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map @@ -0,0 +1 @@ +{"version":3,"names":["reservedWords","keyword","strict","strictBind","keywords","Set","reservedWordsStrictSet","reservedWordsStrictBindSet","isReservedWord","word","inModule","isStrictReservedWord","has","isStrictBindOnlyReservedWord","isStrictBindReservedWord","isKeyword"],"sources":["../src/keyword.ts"],"sourcesContent":["const reservedWords = {\n keyword: [\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n ],\n strict: [\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n ],\n strictBind: [\"eval\", \"arguments\"],\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\n/**\n * Checks if word is a reserved word in non-strict mode\n */\nexport function isReservedWord(word: string, inModule: boolean): boolean {\n return (inModule && word === \"await\") || word === \"enum\";\n}\n\n/**\n * Checks if word is a reserved word in non-binding strict mode\n *\n * Includes non-strict reserved words\n */\nexport function isStrictReservedWord(word: string, inModule: boolean): boolean {\n return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode, but it is allowed as\n * a normal identifier.\n */\nexport function isStrictBindOnlyReservedWord(word: string): boolean {\n return reservedWordsStrictBindSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode\n *\n * Includes non-strict reserved words and non-binding strict reserved words\n */\nexport function isStrictBindReservedWord(\n word: string,\n inModule: boolean,\n): boolean {\n return (\n isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word)\n );\n}\n\nexport function isKeyword(word: string): boolean {\n return keywords.has(word);\n}\n"],"mappings":";;;;;;;;;;AAAA,MAAMA,aAAa,GAAG;EACpBC,OAAO,EAAE,CACP,OAAO,EACP,MAAM,EACN,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,EACT,IAAI,EACJ,MAAM,EACN,SAAS,EACT,KAAK,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACN,KAAK,EACL,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,QAAQ,CACT;EACDC,MAAM,EAAE,CACN,YAAY,EACZ,WAAW,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,CACR;EACDC,UAAU,EAAE,CAAC,MAAM,EAAE,WAAW;AAClC,CAAC;AACD,MAAMC,QAAQ,GAAG,IAAIC,GAAG,CAACL,aAAa,CAACC,OAAO,CAAC;AAC/C,MAAMK,sBAAsB,GAAG,IAAID,GAAG,CAACL,aAAa,CAACE,MAAM,CAAC;AAC5D,MAAMK,0BAA0B,GAAG,IAAIF,GAAG,CAACL,aAAa,CAACG,UAAU,CAAC;AAK7D,SAASK,cAAcA,CAACC,IAAY,EAAEC,QAAiB,EAAW;EACvE,OAAQA,QAAQ,IAAID,IAAI,KAAK,OAAO,IAAKA,IAAI,KAAK,MAAM;AAC1D;AAOO,SAASE,oBAAoBA,CAACF,IAAY,EAAEC,QAAiB,EAAW;EAC7E,OAAOF,cAAc,CAACC,IAAI,EAAEC,QAAQ,CAAC,IAAIJ,sBAAsB,CAACM,GAAG,CAACH,IAAI,CAAC;AAC3E;AAMO,SAASI,4BAA4BA,CAACJ,IAAY,EAAW;EAClE,OAAOF,0BAA0B,CAACK,GAAG,CAACH,IAAI,CAAC;AAC7C;AAOO,SAASK,wBAAwBA,CACtCL,IAAY,EACZC,QAAiB,EACR;EACT,OACEC,oBAAoB,CAACF,IAAI,EAAEC,QAAQ,CAAC,IAAIG,4BAA4B,CAACJ,IAAI,CAAC;AAE9E;AAEO,SAASM,SAASA,CAACN,IAAY,EAAW;EAC/C,OAAOL,QAAQ,CAACQ,GAAG,CAACH,IAAI,CAAC;AAC3B","ignoreList":[]} \ No newline at end of file diff --git a/vuetest/node_modules/@babel/helper-validator-identifier/package.json b/vuetest/node_modules/@babel/helper-validator-identifier/package.json new file mode 100644 index 0000000..0147740 --- /dev/null +++ b/vuetest/node_modules/@babel/helper-validator-identifier/package.json @@ -0,0 +1,31 @@ +{ + "name": "@babel/helper-validator-identifier", + "version": "7.25.9", + "description": "Validate identifier/keywords name", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-helper-validator-identifier" + }, + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "main": "./lib/index.js", + "exports": { + ".": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + }, + "./package.json": "./package.json" + }, + "devDependencies": { + "@unicode/unicode-16.0.0": "^1.0.0", + "charcodes": "^0.2.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "author": "The Babel Team (https://babel.dev/team)", + "type": "commonjs" +} \ No newline at end of file diff --git a/vuetest/node_modules/@babel/parser/CHANGELOG.md b/vuetest/node_modules/@babel/parser/CHANGELOG.md new file mode 100644 index 0000000..b3840ac --- /dev/null +++ b/vuetest/node_modules/@babel/parser/CHANGELOG.md @@ -0,0 +1,1073 @@ +# Changelog + +> **Tags:** +> - :boom: [Breaking Change] +> - :eyeglasses: [Spec Compliance] +> - :rocket: [New Feature] +> - :bug: [Bug Fix] +> - :memo: [Documentation] +> - :house: [Internal] +> - :nail_care: [Polish] + +> Semver Policy: https://github.com/babel/babel/tree/main/packages/babel-parser#semver + +_Note: Gaps between patch versions are faulty, broken or test releases._ + +See the [Babel Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) for the pre-6.8.0 version Changelog. + +## 6.17.1 (2017-05-10) + +### :bug: Bug Fix + * Fix typo in flow spread operator error (Brian Ng) + * Fixed invalid number literal parsing ([#473](https://github.com/babel/babylon/pull/473)) (Alex Kuzmenko) + * Fix number parser ([#433](https://github.com/babel/babylon/pull/433)) (Alex Kuzmenko) + * Ensure non pattern shorthand props are checked for reserved words ([#479](https://github.com/babel/babylon/pull/479)) (Brian Ng) + * Remove jsx context when parsing arrow functions ([#475](https://github.com/babel/babylon/pull/475)) (Brian Ng) + * Allow super in class properties ([#499](https://github.com/babel/babylon/pull/499)) (Brian Ng) + * Allow flow class field to be named constructor ([#510](https://github.com/babel/babylon/pull/510)) (Brian Ng) + +## 6.17.0 (2017-04-20) + +### :bug: Bug Fix + * Cherry-pick #418 to 6.x ([#476](https://github.com/babel/babylon/pull/476)) (Sebastian McKenzie) + * Add support for invalid escapes in tagged templates ([#274](https://github.com/babel/babylon/pull/274)) (Kevin Gibbons) + * Throw error if new.target is used outside of a function ([#402](https://github.com/babel/babylon/pull/402)) (Brian Ng) + * Fix parsing of class properties ([#351](https://github.com/babel/babylon/pull/351)) (Kevin Gibbons) + * Fix parsing yield with dynamicImport ([#383](https://github.com/babel/babylon/pull/383)) (Brian Ng) + * Ensure consistent start args for parseParenItem ([#386](https://github.com/babel/babylon/pull/386)) (Brian Ng) + +## 7.0.0-beta.8 (2017-04-04) + +### New Feature +* Add support for flow type spread (#418) (Conrad Buck) +* Allow statics in flow interfaces (#427) (Brian Ng) + +### Bug Fix +* Fix predicate attachment to match flow parser (#428) (Brian Ng) +* Add extra.raw back to JSXText and JSXAttribute (#344) (Alex Rattray) +* Fix rest parameters with array and objects (#424) (Brian Ng) +* Fix number parser (#433) (Alex Kuzmenko) + +### Docs +* Fix CONTRIBUTING.md [skip ci] (#432) (Alex Kuzmenko) + +### Internal +* Use babel-register script when running babel smoke tests (#442) (Brian Ng) + +## 7.0.0-beta.7 (2017-03-22) + +### Spec Compliance +* Remove babylon plugin for template revision since it's stage-4 (#426) (Henry Zhu) + +### Bug Fix + +* Fix push-pop logic in flow (#405) (Daniel Tschinder) + +## 7.0.0-beta.6 (2017-03-21) + +### New Feature +* Add support for invalid escapes in tagged templates (#274) (Kevin Gibbons) + +### Polish +* Improves error message when super is called outside of constructor (#408) (Arshabh Kumar Agarwal) + +### Docs + +* [7.0] Moved value field in spec from ObjectMember to ObjectProperty as ObjectMethod's don't have it (#415) [skip ci] (James Browning) + +## 7.0.0-beta.5 (2017-03-21) + +### Bug Fix +* Throw error if new.target is used outside of a function (#402) (Brian Ng) +* Fix parsing of class properties (#351) (Kevin Gibbons) + +### Other + * Test runner: Detect extra property in 'actual' but not in 'expected'. (#407) (Andy) + * Optimize travis builds (#419) (Daniel Tschinder) + * Update codecov to 2.0 (#412) (Daniel Tschinder) + * Fix spec for ClassMethod: It doesn't have a function, it *is* a function. (#406) [skip ci] (Andy) + * Changed Non-existent RestPattern to RestElement which is what is actually parsed (#409) [skip ci] (James Browning) + * Upgrade flow to 0.41 (Daniel Tschinder) + * Fix watch command (#403) (Brian Ng) + * Update yarn lock (Daniel Tschinder) + * Fix watch command (#403) (Brian Ng) + * chore(package): update flow-bin to version 0.41.0 (#395) (greenkeeper[bot]) + * Add estree test for correct order of directives (Daniel Tschinder) + * Add DoExpression to spec (#364) (Alex Kuzmenko) + * Mention cloning of repository in CONTRIBUTING.md (#391) [skip ci] (Sumedh Nimkarde) + * Explain how to run only one test (#389) [skip ci] (Aaron Ang) + + ## 7.0.0-beta.4 (2017-03-01) + +* Don't consume async when checking for async func decl (#377) (Brian Ng) +* add `ranges` option [skip ci] (Henry Zhu) +* Don't parse class properties without initializers when classProperties is disabled and Flow is enabled (#300) (Andrew Levine) + +## 7.0.0-beta.3 (2017-02-28) + +- [7.0] Change RestProperty/SpreadProperty to RestElement/SpreadElement (#384) +- Merge changes from 6.x + +## 7.0.0-beta.2 (2017-02-20) + +- estree: correctly change literals in all cases (#368) (Daniel Tschinder) + +## 7.0.0-beta.1 (2017-02-20) + +- Fix negative number literal typeannotations (#366) (Daniel Tschinder) +- Update contributing with more test info [skip ci] (#355) (Brian Ng) + +## 7.0.0-beta.0 (2017-02-15) + +- Reintroduce Variance node (#333) (Daniel Tschinder) +- Rename NumericLiteralTypeAnnotation to NumberLiteralTypeAnnotation (#332) (Charles Pick) +- [7.0] Remove ForAwaitStatement, add await flag to ForOfStatement (#349) (Brandon Dail) +- chore(package): update ava to version 0.18.0 (#345) (greenkeeper[bot]) +- chore(package): update babel-plugin-istanbul to version 4.0.0 (#350) (greenkeeper[bot]) +- Change location of ObjectTypeIndexer to match flow (#228) (Daniel Tschinder) +- Rename flow AST Type ExistentialTypeParam to ExistsTypeAnnotation (#322) (Toru Kobayashi) +- Revert "Temporary rollback for erroring on trailing comma with spread (#154)" (#290) (Daniel Tschinder) +- Remove classConstructorCall plugin (#291) (Brian Ng) +- Update yarn.lock (Daniel Tschinder) +- Update cross-env to 3.x (Daniel Tschinder) +- [7.0] Remove node 0.10, 0.12 and 5 from Travis (#284) (Sergey Rubanov) +- Remove `String.fromCodePoint` shim (#279) (Mathias Bynens) + +## 6.16.1 (2017-02-23) + +### :bug: Regression + +- Revert "Fix export default async function to be FunctionDeclaration" ([#375](https://github.com/babel/babylon/pull/375)) + +Need to modify Babel for this AST node change, so moving to 7.0. + +- Revert "Don't parse class properties without initializers when classProperties plugin is disabled, and Flow is enabled" ([#376](https://github.com/babel/babylon/pull/376)) + +[react-native](https://github.com/facebook/react-native/issues/12542) broke with this so we reverted. + +## 6.16.0 (2017-02-23) + +### :rocket: New Feature + +***ESTree*** compatibility as plugin ([#277](https://github.com/babel/babylon/pull/277)) (Daniel Tschinder) + +We finally introduce a new compatibility layer for ESTree. To put babylon into ESTree-compatible mode the new plugin `estree` can be enabled. In this mode the parser will output an AST that is compliant to the specs of [ESTree](https://github.com/estree/estree/) + +We highly recommend everyone who uses babylon outside of babel to use this plugin. This will make it much easier for users to switch between different ESTree-compatible parsers. We so far tested several projects with different parsers and exchanged their parser to babylon and in nearly all cases it worked out of the box. Some other estree-compatible parsers include `acorn`, `esprima`, `espree`, `flow-parser`, etc. + +To enable `estree` mode simply add the plugin in the config: +```json +{ + "plugins": [ "estree" ] +} +``` + +If you want to migrate your project from non-ESTree mode to ESTree, have a look at our [Readme](https://github.com/babel/babylon/#output), where all deviations are mentioned. + +Add a parseExpression public method ([#213](https://github.com/babel/babylon/pull/213)) (jeromew) + +Babylon exports a new function to parse a single expression + +```js +import { parseExpression } from 'babylon'; + +const ast = parseExpression('x || y && z', options); +``` + +The returned AST will only consist of the expression. The options are the same as for `parse()` + +Add startLine option ([#346](https://github.com/babel/babylon/pull/346)) (Raphael Mu) + +A new option was added to babylon allowing to change the initial linenumber for the first line which is usually `1`. +Changing this for example to `100` will make line `1` of the input source to be marked as line `100`, line `2` as `101`, line `3` as `102`, ... + +Function predicate declaration ([#103](https://github.com/babel/babylon/pull/103)) (Panagiotis Vekris) + +Added support for function predicates which flow introduced in version 0.33.0 + +```js +declare function is_number(x: mixed): boolean %checks(typeof x === "number"); +``` + +Allow imports in declare module ([#315](https://github.com/babel/babylon/pull/315)) (Daniel Tschinder) + +Added support for imports within module declarations which flow introduced in version 0.37.0 + +```js +declare module "C" { + import type { DT } from "D"; + declare export type CT = { D: DT }; +} +``` + +### :eyeglasses: Spec Compliance + +Forbid semicolons after decorators in classes ([#352](https://github.com/babel/babylon/pull/352)) (Kevin Gibbons) + +This example now correctly throws an error when there is a semicolon after the decorator: + +```js +class A { +@a; +foo(){} +} +``` + +Keywords are not allowed as local specifier ([#307](https://github.com/babel/babylon/pull/307)) (Daniel Tschinder) + +Using keywords in imports is not allowed anymore: + +```js +import { default } from "foo"; +import { a as debugger } from "foo"; +``` + +Do not allow overwritting of primitive types ([#314](https://github.com/babel/babylon/pull/314)) (Daniel Tschinder) + +In flow it is now forbidden to overwrite the primitive types `"any"`, `"mixed"`, `"empty"`, `"bool"`, `"boolean"`, `"number"`, `"string"`, `"void"` and `"null"` with your own type declaration. + +Disallow import type { type a } from … ([#305](https://github.com/babel/babylon/pull/305)) (Daniel Tschinder) + +The following code now correctly throws an error + +```js +import type { type a } from "foo"; +``` + +Don't parse class properties without initializers when classProperties is disabled and Flow is enabled ([#300](https://github.com/babel/babylon/pull/300)) (Andrew Levine) + +Ensure that you enable the `classProperties` plugin in order to enable correct parsing of class properties. Prior to this version it was possible to parse them by enabling the `flow` plugin but this was not intended the behaviour. + +If you enable the flow plugin you can only define the type of the class properties, but not initialize them. + +Fix export default async function to be FunctionDeclaration ([#324](https://github.com/babel/babylon/pull/324)) (Daniel Tschinder) + +Parsing the following code now returns a `FunctionDeclaration` AST node instead of `FunctionExpression`. + +```js +export default async function bar() {}; +``` + +### :nail_care: Polish + +Improve error message on attempt to destructure named import ([#288](https://github.com/babel/babylon/pull/288)) (Brian Ng) + +### :bug: Bug Fix + +Fix negative number literal typeannotations ([#366](https://github.com/babel/babylon/pull/366)) (Daniel Tschinder) + +Ensure takeDecorators is called on exported class ([#358](https://github.com/babel/babylon/pull/358)) (Brian Ng) + +ESTree: correctly change literals in all cases ([#368](https://github.com/babel/babylon/pull/368)) (Daniel Tschinder) + +Correctly convert RestProperty to Assignable ([#339](https://github.com/babel/babylon/pull/339)) (Daniel Tschinder) + +Fix #321 by allowing question marks in type params ([#338](https://github.com/babel/babylon/pull/338)) (Daniel Tschinder) + +Fix #336 by correctly setting arrow-param ([#337](https://github.com/babel/babylon/pull/337)) (Daniel Tschinder) + +Fix parse error when destructuring `set` with default value ([#317](https://github.com/babel/babylon/pull/317)) (Brian Ng) + +Fix ObjectTypeCallProperty static ([#298](https://github.com/babel/babylon/pull/298)) (Dan Harper) + + +### :house: Internal + +Fix generator-method-with-computed-name spec ([#360](https://github.com/babel/babylon/pull/360)) (Alex Rattray) + +Fix flow type-parameter-declaration test with unintended semantic ([#361](https://github.com/babel/babylon/pull/361)) (Alex Rattray) + +Cleanup and splitup parser functions ([#295](https://github.com/babel/babylon/pull/295)) (Daniel Tschinder) + +chore(package): update flow-bin to version 0.38.0 ([#313](https://github.com/babel/babylon/pull/313)) (greenkeeper[bot]) + +Call inner function instead of 1:1 copy to plugin ([#294](https://github.com/babel/babylon/pull/294)) (Daniel Tschinder) + +Update eslint-config-babel to the latest version 🚀 ([#299](https://github.com/babel/babylon/pull/299)) (greenkeeper[bot]) + +Update eslint-config-babel to the latest version 🚀 ([#293](https://github.com/babel/babylon/pull/293)) (greenkeeper[bot]) + +devDeps: remove eslint-plugin-babel ([#292](https://github.com/babel/babylon/pull/292)) (Kai Cataldo) + +Correct indent eslint rule config ([#276](https://github.com/babel/babylon/pull/276)) (Daniel Tschinder) + +Fail tests that have expected.json and throws-option ([#285](https://github.com/babel/babylon/pull/285)) (Daniel Tschinder) + +### :memo: Documentation + +Update contributing with more test info [skip ci] ([#355](https://github.com/babel/babylon/pull/355)) (Brian Ng) + +Update API documentation ([#330](https://github.com/babel/babylon/pull/330)) (Timothy Gu) + +Added keywords to package.json ([#323](https://github.com/babel/babylon/pull/323)) (Dmytro) + +AST spec: fix casing of `RegExpLiteral` ([#318](https://github.com/babel/babylon/pull/318)) (Mathias Bynens) + +## 6.15.0 (2017-01-10) + +### :eyeglasses: Spec Compliance + +Add support for Flow shorthand import type ([#267](https://github.com/babel/babylon/pull/267)) (Jeff Morrison) + +This change implements flows new shorthand import syntax +and where previously you had to write this code: + +```js +import {someValue} from "blah"; +import type {someType} from "blah"; +import typeof {someOtherValue} from "blah"; +``` + +you can now write it like this: + +```js +import { + someValue, + type someType, + typeof someOtherValue, +} from "blah"; +``` + +For more information look at [this](https://github.com/facebook/flow/pull/2890) pull request. + +flow: allow leading pipes in all positions ([#256](https://github.com/babel/babylon/pull/256)) (Vladimir Kurchatkin) + +This change now allows a leading pipe everywhere types can be used: +```js +var f = (x): | 1 | 2 => 1; +``` + +Throw error when exporting non-declaration ([#241](https://github.com/babel/babylon/pull/241)) (Kai Cataldo) + +Previously babylon parsed the following exports, although they are not valid: +```js +export typeof foo; +export new Foo(); +export function() {}; +export for (;;); +export while(foo); +``` + +### :bug: Bug Fix + +Don't set inType flag when parsing property names ([#266](https://github.com/babel/babylon/pull/266)) (Vladimir Kurchatkin) + +This fixes parsing of this case: + +```js +const map = { + [age <= 17] : 'Too young' +}; +``` + +Fix source location for JSXEmptyExpression nodes (fixes #248) ([#249](https://github.com/babel/babylon/pull/249)) (James Long) + +The following case produced an invalid AST +```js +

{/* foo */}
+``` + +Use fromCodePoint to convert high value unicode entities ([#243](https://github.com/babel/babylon/pull/243)) (Ryan Duffy) + +When high value unicode entities (e.g. 💩) were used in the input source code they are now correctly encoded in the resulting AST. + +Rename folder to avoid Windows-illegal characters ([#281](https://github.com/babel/babylon/pull/281)) (Ryan Plant) + +Allow this.state.clone() when parsing decorators ([#262](https://github.com/babel/babylon/pull/262)) (Alex Rattray) + +### :house: Internal + +User external-helpers ([#254](https://github.com/babel/babylon/pull/254)) (Daniel Tschinder) + +Add watch script for dev ([#234](https://github.com/babel/babylon/pull/234)) (Kai Cataldo) + +Freeze current plugins list for "*" option, and remove from README.md ([#245](https://github.com/babel/babylon/pull/245)) (Andrew Levine) + +Prepare tests for multiple fixture runners. ([#240](https://github.com/babel/babylon/pull/240)) (Daniel Tschinder) + +Add some test coverage for decorators stage-0 plugin ([#250](https://github.com/babel/babylon/pull/250)) (Andrew Levine) + +Refactor tokenizer types file ([#263](https://github.com/babel/babylon/pull/263)) (Sven SAULEAU) + +Update eslint-config-babel to the latest version 🚀 ([#273](https://github.com/babel/babylon/pull/273)) (greenkeeper[bot]) + +chore(package): update rollup to version 0.41.0 ([#272](https://github.com/babel/babylon/pull/272)) (greenkeeper[bot]) + +chore(package): update flow-bin to version 0.37.0 ([#255](https://github.com/babel/babylon/pull/255)) (greenkeeper[bot]) + +## 6.14.1 (2016-11-17) + +### :bug: Bug Fix + +Allow `"plugins": ["*"]` ([#229](https://github.com/babel/babylon/pull/229)) (Daniel Tschinder) + +```js +{ + "plugins": ["*"] +} +``` + +Will include all parser plugins instead of specifying each one individually. Useful for tools like babel-eslint, jscodeshift, and ast-explorer. + +## 6.14.0 (2016-11-16) + +### :eyeglasses: Spec Compliance + +Throw error for reserved words `enum` and `await` ([#195](https://github.com/babel/babylon/pull/195)) (Kai Cataldo) + +[11.6.2.2 Future Reserved Words](http://www.ecma-international.org/ecma-262/6.0/#sec-future-reserved-words) + +Babylon will throw for more reserved words such as `enum` or `await` (in strict mode). + +``` +class enum {} // throws +class await {} // throws in strict mode (module) +``` + +Optional names for function types and object type indexers ([#197](https://github.com/babel/babylon/pull/197)) (Gabe Levi) + +So where you used to have to write + +```js +type A = (x: string, y: boolean) => number; +type B = (z: string) => number; +type C = { [key: string]: number }; +``` + +you can now write (with flow 0.34.0) + +```js +type A = (string, boolean) => number; +type B = string => number; +type C = { [string]: number }; +``` + +Parse flow nested array type annotations like `number[][]` ([#219](https://github.com/babel/babylon/pull/219)) (Bernhard Häussner) + +Supports these form now of specifying array types: + +```js +var a: number[][][][]; +var b: string[][]; +``` + +### :bug: Bug Fix + +Correctly eat semicolon at the end of `DelcareModuleExports` ([#223](https://github.com/babel/babylon/pull/223)) (Daniel Tschinder) + +``` +declare module "foo" { declare module.exports: number } +declare module "foo" { declare module.exports: number; } // also allowed now +``` + +### :house: Internal + + * Count Babel tests towards Babylon code coverage ([#182](https://github.com/babel/babylon/pull/182)) (Moti Zilberman) + * Fix strange line endings ([#214](https://github.com/babel/babylon/pull/214)) (Thomas Grainger) + * Add node 7 (Daniel Tschinder) + * chore(package): update flow-bin to version 0.34.0 ([#204](https://github.com/babel/babylon/pull/204)) (Greenkeeper) + +## v6.13.1 (2016-10-26) + +### :nail_care: Polish + +- Use rollup for bundling to speed up startup time ([#190](https://github.com/babel/babylon/pull/190)) ([@drewml](https://github.com/DrewML)) + +```js +const babylon = require('babylon'); +const ast = babylon.parse('var foo = "lol";'); +``` + +With that test case, there was a ~95ms savings by removing the need for node to build/traverse the dependency graph. + +**Without bundling** +![image](https://cloud.githubusercontent.com/assets/5233399/19420264/3133497e-93ad-11e6-9a6a-2da59c4f5c13.png) + +**With bundling** +![image](https://cloud.githubusercontent.com/assets/5233399/19420267/388f556e-93ad-11e6-813e-7c5c396be322.png) + +- add clean command [skip ci] ([#201](https://github.com/babel/babylon/pull/201)) (Henry Zhu) +- add ForAwaitStatement (async generator already added) [skip ci] ([#196](https://github.com/babel/babylon/pull/196)) (Henry Zhu) + +## v6.13.0 (2016-10-21) + +### :eyeglasses: Spec Compliance + +Property variance type annotations for Flow plugin ([#161](https://github.com/babel/babylon/pull/161)) (Sam Goldman) + +> See https://flowtype.org/docs/variance.html for more information + +```js +type T = { +p: T }; +interface T { -p: T }; +declare class T { +[k:K]: V }; +class T { -[k:K]: V }; +class C2 { +p: T = e }; +``` + +Raise error on duplicate definition of __proto__ ([#183](https://github.com/babel/babylon/pull/183)) (Moti Zilberman) + +```js +({ __proto__: 1, __proto__: 2 }) // Throws an error now +``` + +### :bug: Bug Fix + +Flow: Allow class properties to be named `static` ([#184](https://github.com/babel/babylon/pull/184)) (Moti Zilberman) + +```js +declare class A { + static: T; +} +``` + +Allow "async" as identifier for object literal property shorthand ([#187](https://github.com/babel/babylon/pull/187)) (Andrew Levine) + +```js +var foo = { async, bar }; +``` + +### :nail_care: Polish + +Fix flowtype and add inType to state ([#189](https://github.com/babel/babylon/pull/189)) (Daniel Tschinder) + +> This improves the performance slightly (because of hidden classes) + +### :house: Internal + +Fix .gitattributes line ending setting ([#191](https://github.com/babel/babylon/pull/191)) (Moti Zilberman) + +Increase test coverage ([#175](https://github.com/babel/babylon/pull/175) (Moti Zilberman) + +Readd missin .eslinignore for IDEs (Daniel Tschinder) + +Error on missing expected.json fixture in CI ([#188](https://github.com/babel/babylon/pull/188)) (Moti Zilberman) + +Add .gitattributes and .editorconfig for LF line endings ([#179](https://github.com/babel/babylon/pull/179)) (Moti Zilberman) + +Fixes two tests that are failing after the merge of #172 ([#177](https://github.com/babel/babylon/pull/177)) (Moti Zilberman) + +## v6.12.0 (2016-10-14) + +### :eyeglasses: Spec Compliance + +Implement import() syntax ([#163](https://github.com/babel/babylon/pull/163)) (Jordan Gensler) + +#### Dynamic Import + +- Proposal Repo: https://github.com/domenic/proposal-dynamic-import +- Championed by [@domenic](https://github.com/domenic) +- stage-2 +- [sept-28 tc39 notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-09/sept-28.md#113a-import) + +> This repository contains a proposal for adding a "function-like" import() module loading syntactic form to JavaScript + +```js +import(`./section-modules/${link.dataset.entryModule}.js`) +.then(module => { + module.loadPageInto(main); +}) +``` + +Add EmptyTypeAnnotation ([#171](https://github.com/babel/babylon/pull/171)) (Sam Goldman) + +#### EmptyTypeAnnotation + +Just wasn't covered before. + +```js +type T = empty; +``` + +### :bug: Bug Fix + +Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) + +```js +// was failing due to sparse array +export const { foo: [ ,, qux7 ] } = bar; +``` + +Allow keyword in Flow object declaration property names with type parameters ([#146](https://github.com/babel/babylon/pull/146)) (Dan Harper) + +```js +declare class X { + foobar(): void; + static foobar(): void; +} +``` + +Allow keyword in object/class property names with Flow type parameters ([#145](https://github.com/babel/babylon/pull/145)) (Dan Harper) + +```js +class Foo { + delete(item: T): T { + return item; + } +} +``` + +Allow typeAnnotations for yield expressions ([#174](https://github.com/babel/babylon/pull/174))) (Daniel Tschinder) + +```js +function *foo() { + const x = (yield 5: any); +} +``` + +### :nail_care: Polish + +Annotate more errors with expected token ([#172](https://github.com/babel/babylon/pull/172))) (Moti Zilberman) + +```js +// Unexpected token, expected ; (1:6) +{ set 1 } +``` + +### :house: Internal + +Remove kcheck ([#173](https://github.com/babel/babylon/pull/173))) (Daniel Tschinder) + +Also run flow, linting, babel tests on separate instances (add back node 0.10) + +## v6.11.6 (2016-10-12) + +### :bug: Bug Fix/Regression + +Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) + +```js +// was failing with `Cannot read property 'type' of null` because of null identifiers +export const { foo: [ ,, qux7 ] } = bar; +``` + +## v6.11.5 (2016-10-12) + +### :eyeglasses: Spec Compliance + +Fix: Check for duplicate named exports in exported destructuring assignments ([#144](https://github.com/babel/babylon/pull/144)) (Kai Cataldo) + +```js +// `foo` has already been exported. Exported identifiers must be unique. (2:20) +export function foo() {}; +export const { a: [{foo}] } = bar; +``` + +Fix: Check for duplicate named exports in exported rest elements/properties ([#164](https://github.com/babel/babylon/pull/164)) (Kai Cataldo) + +```js +// `foo` has already been exported. Exported identifiers must be unique. (2:22) +export const foo = 1; +export const [bar, ...foo] = baz; +``` + +### :bug: Bug Fix + +Fix: Allow identifier `async` for default param in arrow expression ([#165](https://github.com/babel/babylon/pull/165)) (Kai Cataldo) + +```js +// this is ok now +const test = ({async = true}) => {}; +``` + +### :nail_care: Polish + +Babylon will now print out the token it's expecting if there's a `SyntaxError` ([#150](https://github.com/babel/babylon/pull/150)) (Daniel Tschinder) + +```bash +# So in the case of a missing ending curly (`}`) +Module build failed: SyntaxError: Unexpected token, expected } (30:0) + 28 | } + 29 | +> 30 | + | ^ +``` + +## v6.11.4 (2016-10-03) + +Temporary rollback for erroring on trailing comma with spread (#154) (Henry Zhu) + +## v6.11.3 (2016-10-01) + +### :eyeglasses: Spec Compliance + +Add static errors for object rest (#149) ([@danez](https://github.com/danez)) + +> https://github.com/sebmarkbage/ecmascript-rest-spread + +Object rest copies the *rest* of properties from the right hand side `obj` starting from the left to right. + +```js +let { x, y, ...z } = { x: 1, y: 2, z: 3 }; +// x = 1 +// y = 2 +// z = { z: 3 } +``` + +#### New Syntax Errors: + +**SyntaxError**: The rest element has to be the last element when destructuring (1:10) +```bash +> 1 | let { ...x, y, z } = { x: 1, y: 2, z: 3}; + | ^ +# Previous behavior: +# x = { x: 1, y: 2, z: 3 } +# y = 2 +# z = 3 +``` + +Before, this was just a more verbose way of shallow copying `obj` since it doesn't actually do what you think. + +**SyntaxError**: Cannot have multiple rest elements when destructuring (1:13) + +```bash +> 1 | let { x, ...y, ...z } = { x: 1, y: 2, z: 3}; + | ^ +# Previous behavior: +# x = 1 +# y = { y: 2, z: 3 } +# z = { y: 2, z: 3 } +``` + +Before y and z would just be the same value anyway so there is no reason to need to have both. + +**SyntaxError**: A trailing comma is not permitted after the rest element (1:16) + +```js +let { x, y, ...z, } = obj; +``` + +The rationale for this is that the use case for trailing comma is that you can add something at the end without affecting the line above. Since a RestProperty always has to be the last property it doesn't make sense. + +--- + +get / set are valid property names in default assignment (#142) ([@jezell](https://github.com/jezell)) + +```js +// valid +function something({ set = null, get = null }) {} +``` + +## v6.11.2 (2016-09-23) + +### Bug Fix + +- [#139](https://github.com/babel/babylon/issues/139) Don't do the duplicate check if not an identifier (#140) @hzoo + +```js +// regression with duplicate export check +SyntaxError: ./typography.js: `undefined` has already been exported. Exported identifiers must be unique. (22:13) + 20 | + 21 | export const { rhythm } = typography; +> 22 | export const { TypographyStyle } = typography +``` + +Bail out for now, and make a change to account for destructuring in the next release. + +## 6.11.1 (2016-09-22) + +### Bug Fix +- [#137](https://github.com/babel/babylon/pull/137) - Fix a regression with duplicate exports - it was erroring on all keys in `Object.prototype`. @danez + +```javascript +export toString from './toString'; +``` + +```bash +`toString` has already been exported. Exported identifiers must be unique. (1:7) +> 1 | export toString from './toString'; + | ^ + 2 | +``` + +## 6.11.0 (2016-09-22) + +### Spec Compliance (will break CI) + +- Disallow duplicate named exports ([#107](https://github.com/babel/babylon/pull/107)) @kaicataldo + +```js +// Only one default export allowed per module. (2:9) +export default function() {}; +export { foo as default }; + +// Only one default export allowed per module. (2:0) +export default {}; +export default function() {}; + +// `Foo` has already been exported. Exported identifiers must be unique. (2:0) +export { Foo }; +export class Foo {}; +``` + +### New Feature (Syntax) + +- Add support for computed class property names ([#121](https://github.com/babel/babylon/pull/121)) @motiz88 + +```js +// AST +interface ClassProperty <: Node { + type: "ClassProperty"; + key: Identifier; + value: Expression; + computed: boolean; // added +} +``` + +```js +// with "plugins": ["classProperties"] +class Foo { + [x] + ['y'] +} + +class Bar { + [p] + [m] () {} +} + ``` + +### Bug Fix + +- Fix `static` property falling through in the declare class Flow AST ([#135](https://github.com/babel/babylon/pull/135)) @danharper + +```js +declare class X { + a: number; + static b: number; // static + c: number; // this was being marked as static in the AST as well +} +``` + +### Polish + +- Rephrase "assigning/binding to rvalue" errors to include context ([#119](https://github.com/babel/babylon/pull/119)) @motiz88 + +```js +// Used to error with: +// SyntaxError: Assigning to rvalue (1:0) + +// Now: +// Invalid left-hand side in assignment expression (1:0) +3 = 4 + +// Invalid left-hand side in for-in statement (1:5) +for (+i in {}); +``` + +### Internal + +- Fix call to `this.parseMaybeAssign` with correct arguments ([#133](https://github.com/babel/babylon/pull/133)) @danez +- Add semver note to changelog ([#131](https://github.com/babel/babylon/pull/131)) @hzoo + +## 6.10.0 (2016-09-19) + +> We plan to include some spec compliance bugs in patch versions. An example was the multiple default exports issue. + +### Spec Compliance + +* Implement ES2016 check for simple parameter list in strict mode ([#106](https://github.com/babel/babylon/pull/106)) (Timothy Gu) + +> It is a Syntax Error if ContainsUseStrict of FunctionBody is true and IsSimpleParameterList of FormalParameters is false. https://tc39.github.io/ecma262/2016/#sec-function-definitions-static-semantics-early-errors + +More Context: [tc39-notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-29.md#611-the-scope-of-use-strict-with-respect-to-destructuring-in-parameter-lists) + +For example: + +```js +// this errors because it uses destructuring and default parameters +// in a function with a "use strict" directive +function a([ option1, option2 ] = []) { + "use strict"; +} + ``` + +The solution would be to use a top level "use strict" or to remove the destructuring or default parameters when using a function + "use strict" or to. + +### New Feature + +* Exact object type annotations for Flow plugin ([#104](https://github.com/babel/babylon/pull/104)) (Basil Hosmer) + +Added to flow in https://github.com/facebook/flow/commit/c710c40aa2a115435098d6c0dfeaadb023cd39b8 + +Looks like: + +```js +var a : {| x: number, y: string |} = { x: 0, y: 'foo' }; +``` + +### Bug Fixes + +* Include `typeParameter` location in `ArrowFunctionExpression` ([#126](https://github.com/babel/babylon/pull/126)) (Daniel Tschinder) +* Error on invalid flow type annotation with default assignment ([#122](https://github.com/babel/babylon/pull/122)) (Dan Harper) +* Fix Flow return types on arrow functions ([#124](https://github.com/babel/babylon/pull/124)) (Dan Harper) + +### Misc + +* Add tests for export extensions ([#127](https://github.com/babel/babylon/pull/127)) (Daniel Tschinder) +* Fix Contributing guidelines [skip ci] (Daniel Tschinder) + +## 6.9.2 (2016-09-09) + +The only change is to remove the `babel-runtime` dependency by compiling with Babel's ES2015 loose mode. So using babylon standalone should be smaller. + +## 6.9.1 (2016-08-23) + +This release contains mainly small bugfixes but also updates babylons default mode to es2017. The features for `exponentiationOperator`, `asyncFunctions` and `trailingFunctionCommas` which previously needed to be activated via plugin are now enabled by default and the plugins are now no-ops. + +### Bug Fixes + +- Fix issues with default object params in async functions ([#96](https://github.com/babel/babylon/pull/96)) @danez +- Fix issues with flow-types and async function ([#95](https://github.com/babel/babylon/pull/95)) @danez +- Fix arrow functions with destructuring, types & default value ([#94](https://github.com/babel/babylon/pull/94)) @danharper +- Fix declare class with qualified type identifier ([#97](https://github.com/babel/babylon/pull/97)) @danez +- Remove exponentiationOperator, asyncFunctions, trailingFunctionCommas plugins and enable them by default ([#98](https://github.com/babel/babylon/pull/98)) @danez + +## 6.9.0 (2016-08-16) + +### New syntax support + +- Add JSX spread children ([#42](https://github.com/babel/babylon/pull/42)) @calebmer + +(Be aware that React is not going to support this syntax) + +```js +
+ {...todos.map(todo => )} +
+``` + +- Add support for declare module.exports ([#72](https://github.com/babel/babylon/pull/72)) @danez + +```js +declare module "foo" { + declare module.exports: {} +} +``` + +### New Features + +- If supplied, attach filename property to comment node loc. ([#80](https://github.com/babel/babylon/pull/80)) @divmain +- Add identifier name to node loc field ([#90](https://github.com/babel/babylon/pull/90)) @kittens + +### Bug Fixes + +- Fix exponential operator to behave according to spec ([#75](https://github.com/babel/babylon/pull/75)) @danez +- Fix lookahead to not add comments to arrays which are not cloned ([#76](https://github.com/babel/babylon/pull/76)) @danez +- Fix accidental fall-through in Flow type parsing. ([#82](https://github.com/babel/babylon/pull/82)) @xiemaisi +- Only allow declares inside declare module ([#73](https://github.com/babel/babylon/pull/73)) @danez +- Small fix for parsing type parameter declarations ([#83](https://github.com/babel/babylon/pull/83)) @gabelevi +- Fix arrow param locations with flow types ([#57](https://github.com/babel/babylon/pull/57)) @danez +- Fixes SyntaxError position with flow optional type ([#65](https://github.com/babel/babylon/pull/65)) @danez + +### Internal + +- Add codecoverage to tests @danez +- Fix tests to not save expected output if we expect the test to fail @danez +- Make a shallow clone of babel for testing @danez +- chore(package): update cross-env to version 2.0.0 ([#77](https://github.com/babel/babylon/pull/77)) @greenkeeperio-bot +- chore(package): update ava to version 0.16.0 ([#86](https://github.com/babel/babylon/pull/86)) @greenkeeperio-bot +- chore(package): update babel-plugin-istanbul to version 2.0.0 ([#89](https://github.com/babel/babylon/pull/89)) @greenkeeperio-bot +- chore(package): update nyc to version 8.0.0 ([#88](https://github.com/babel/babylon/pull/88)) @greenkeeperio-bot + +## 6.8.4 (2016-07-06) + +### Bug Fixes + +- Fix the location of params, when flow and default value used ([#68](https://github.com/babel/babylon/pull/68)) @danez + +## 6.8.3 (2016-07-02) + +### Bug Fixes + +- Fix performance regression introduced in 6.8.2 with conditionals ([#63](https://github.com/babel/babylon/pull/63)) @danez + +## 6.8.2 (2016-06-24) + +### Bug Fixes + +- Fix parse error with yielding jsx elements in generators `function* it() { yield
; }` ([#31](https://github.com/babel/babylon/pull/31)) @eldereal +- When cloning nodes do not clone its comments ([#24](https://github.com/babel/babylon/pull/24)) @danez +- Fix parse errors when using arrow functions with an spread element and return type `(...props): void => {}` ([#10](https://github.com/babel/babylon/pull/10)) @danez +- Fix leading comments added from previous node ([#23](https://github.com/babel/babylon/pull/23)) @danez +- Fix parse errors with flow's optional arguments `(arg?) => {}` ([#19](https://github.com/babel/babylon/pull/19)) @danez +- Support negative numeric type literals @kittens +- Remove line terminator restriction after await keyword @kittens +- Remove grouped type arrow restriction as it seems flow no longer has it @kittens +- Fix parse error with generic methods that have the name `get` or `set` `class foo { get() {} }` ([#55](https://github.com/babel/babylon/pull/55)) @vkurchatkin +- Fix parse error with arrow functions that have flow type parameter declarations `(x: T): T => x;` ([#54](https://github.com/babel/babylon/pull/54)) @gabelevi + +### Documentation + +- Document AST differences from ESTree ([#41](https://github.com/babel/babylon/pull/41)) @nene +- Move ast spec from babel/babel ([#46](https://github.com/babel/babylon/pull/46)) @hzoo + +### Internal + +- Enable skipped tests ([#16](https://github.com/babel/babylon/pull/16)) @danez +- Add script to test latest version of babylon with babel ([#21](https://github.com/babel/babylon/pull/21)) @danez +- Upgrade test runner ava @kittens +- Add missing generate-identifier-regex script @kittens +- Rename parser context types @kittens +- Add node v6 to travis testing @hzoo +- Update to Unicode v9 ([#45](https://github.com/babel/babylon/pull/45)) @mathiasbynens + +## 6.8.1 (2016-06-06) + +### New Feature + +- Parse type parameter declarations with defaults like `type Foo = T` + +### Bug Fixes +- Type parameter declarations need 1 or more type parameters. +- The existential type `*` is not a valid type parameter. +- The existential type `*` is a primary type + +### Spec Compliance +- The param list for type parameter declarations now consists of `TypeParameter` nodes +- New `TypeParameter` AST Node (replaces using the `Identifier` node before) + +``` +interface TypeParameter <: Node { + bound: TypeAnnotation; + default: TypeAnnotation; + name: string; + variance: "plus" | "minus"; +} +``` + +## 6.8.0 (2016-05-02) + +#### New Feature + +##### Parse Method Parameter Decorators ([#12](https://github.com/babel/babylon/pull/12)) + +> [Method Parameter Decorators](https://goo.gl/8MmCMG) is now a TC39 [stage 0 proposal](https://github.com/tc39/ecma262/blob/master/stage0.md). + +Examples: + +```js +class Foo { + constructor(@foo() x, @bar({ a: 123 }) @baz() y) {} +} + +export default function func(@foo() x, @bar({ a: 123 }) @baz() y) {} + +var obj = { + method(@foo() x, @bar({ a: 123 }) @baz() y) {} +}; +``` + +##### Parse for-await statements (w/ `asyncGenerators` plugin) ([#17](https://github.com/babel/babylon/pull/17)) + +There is also a new node type, `ForAwaitStatement`. + +> [Async generators and for-await](https://github.com/tc39/proposal-async-iteration) are now a [stage 2 proposal](https://github.com/tc39/ecma262#current-proposals). + +Example: + +```js +async function f() { + for await (let x of y); +} +``` diff --git a/vuetest/node_modules/@babel/parser/LICENSE b/vuetest/node_modules/@babel/parser/LICENSE new file mode 100644 index 0000000..d4c7fc5 --- /dev/null +++ b/vuetest/node_modules/@babel/parser/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2012-2014 by various contributors (see AUTHORS) + +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. diff --git a/vuetest/node_modules/@babel/parser/README.md b/vuetest/node_modules/@babel/parser/README.md new file mode 100644 index 0000000..a9463e8 --- /dev/null +++ b/vuetest/node_modules/@babel/parser/README.md @@ -0,0 +1,19 @@ +# @babel/parser + +> A JavaScript parser + +See our website [@babel/parser](https://babeljs.io/docs/babel-parser) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20parser%22+is%3Aopen) associated with this package. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/parser +``` + +or using yarn: + +```sh +yarn add @babel/parser --dev +``` diff --git a/vuetest/node_modules/@babel/parser/bin/babel-parser.js b/vuetest/node_modules/@babel/parser/bin/babel-parser.js new file mode 100644 index 0000000..3aca314 --- /dev/null +++ b/vuetest/node_modules/@babel/parser/bin/babel-parser.js @@ -0,0 +1,15 @@ +#!/usr/bin/env node +/* eslint no-var: 0 */ + +var parser = require(".."); +var fs = require("fs"); + +var filename = process.argv[2]; +if (!filename) { + console.error("no filename specified"); +} else { + var file = fs.readFileSync(filename, "utf8"); + var ast = parser.parse(file); + + console.log(JSON.stringify(ast, null, " ")); +} diff --git a/vuetest/node_modules/@babel/parser/index.cjs b/vuetest/node_modules/@babel/parser/index.cjs new file mode 100644 index 0000000..89863a9 --- /dev/null +++ b/vuetest/node_modules/@babel/parser/index.cjs @@ -0,0 +1,5 @@ +try { + module.exports = require("./lib/index.cjs"); +} catch { + module.exports = require("./lib/index.js"); +} diff --git a/vuetest/node_modules/@babel/parser/lib/index.js b/vuetest/node_modules/@babel/parser/lib/index.js new file mode 100644 index 0000000..1b0c6a6 --- /dev/null +++ b/vuetest/node_modules/@babel/parser/lib/index.js @@ -0,0 +1,14214 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); +function _objectWithoutPropertiesLoose(r, e) { + if (null == r) return {}; + var t = {}; + for (var n in r) if ({}.hasOwnProperty.call(r, n)) { + if (e.includes(n)) continue; + t[n] = r[n]; + } + return t; +} +class Position { + constructor(line, col, index) { + this.line = void 0; + this.column = void 0; + this.index = void 0; + this.line = line; + this.column = col; + this.index = index; + } +} +class SourceLocation { + constructor(start, end) { + this.start = void 0; + this.end = void 0; + this.filename = void 0; + this.identifierName = void 0; + this.start = start; + this.end = end; + } +} +function createPositionWithColumnOffset(position, columnOffset) { + const { + line, + column, + index + } = position; + return new Position(line, column + columnOffset, index + columnOffset); +} +const code = "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"; +var ModuleErrors = { + ImportMetaOutsideModule: { + message: `import.meta may appear only with 'sourceType: "module"'`, + code + }, + ImportOutsideModule: { + message: `'import' and 'export' may appear only with 'sourceType: "module"'`, + code + } +}; +const NodeDescriptions = { + ArrayPattern: "array destructuring pattern", + AssignmentExpression: "assignment expression", + AssignmentPattern: "assignment expression", + ArrowFunctionExpression: "arrow function expression", + ConditionalExpression: "conditional expression", + CatchClause: "catch clause", + ForOfStatement: "for-of statement", + ForInStatement: "for-in statement", + ForStatement: "for-loop", + FormalParameters: "function parameter list", + Identifier: "identifier", + ImportSpecifier: "import specifier", + ImportDefaultSpecifier: "import default specifier", + ImportNamespaceSpecifier: "import namespace specifier", + ObjectPattern: "object destructuring pattern", + ParenthesizedExpression: "parenthesized expression", + RestElement: "rest element", + UpdateExpression: { + true: "prefix operation", + false: "postfix operation" + }, + VariableDeclarator: "variable declaration", + YieldExpression: "yield expression" +}; +const toNodeDescription = node => node.type === "UpdateExpression" ? NodeDescriptions.UpdateExpression[`${node.prefix}`] : NodeDescriptions[node.type]; +var StandardErrors = { + AccessorIsGenerator: ({ + kind + }) => `A ${kind}ter cannot be a generator.`, + ArgumentsInClass: "'arguments' is only allowed in functions and class methods.", + AsyncFunctionInSingleStatementContext: "Async functions can only be declared at the top level or inside a block.", + AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function.", + AwaitBindingIdentifierInStaticBlock: "Can not use 'await' as identifier inside a static block.", + AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.", + AwaitUsingNotInAsyncContext: "'await using' is only allowed within async functions and at the top levels of modules.", + AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.", + AwaitNotInAsyncFunction: "'await' is only allowed within async functions.", + BadGetterArity: "A 'get' accessor must not have any formal parameters.", + BadSetterArity: "A 'set' accessor must have exactly one formal parameter.", + BadSetterRestParameter: "A 'set' accessor function argument must not be a rest parameter.", + ConstructorClassField: "Classes may not have a field named 'constructor'.", + ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.", + ConstructorIsAccessor: "Class constructor may not be an accessor.", + ConstructorIsAsync: "Constructor can't be an async function.", + ConstructorIsGenerator: "Constructor can't be a generator.", + DeclarationMissingInitializer: ({ + kind + }) => `Missing initializer in ${kind} declaration.`, + DecoratorArgumentsOutsideParentheses: "Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.", + DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.", + DecoratorsBeforeAfterExport: "Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.", + DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?", + DecoratorExportClass: "Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.", + DecoratorSemicolon: "Decorators must not be followed by a semicolon.", + DecoratorStaticBlock: "Decorators can't be used with a static block.", + DeferImportRequiresNamespace: 'Only `import defer * as x from "./module"` is valid.', + DeletePrivateField: "Deleting a private field is not allowed.", + DestructureNamedImport: "ES2015 named imports do not destructure. Use another statement for destructuring after the import.", + DuplicateConstructor: "Duplicate constructor in the same class.", + DuplicateDefaultExport: "Only one default export allowed per module.", + DuplicateExport: ({ + exportName + }) => `\`${exportName}\` has already been exported. Exported identifiers must be unique.`, + DuplicateProto: "Redefinition of __proto__ property.", + DuplicateRegExpFlags: "Duplicate regular expression flag.", + DynamicImportPhaseRequiresImportExpressions: ({ + phase + }) => `'import.${phase}(...)' can only be parsed when using the 'createImportExpressions' option.`, + ElementAfterRest: "Rest element must be last element.", + EscapedCharNotAnIdentifier: "Invalid Unicode escape.", + ExportBindingIsString: ({ + localName, + exportName + }) => `A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${localName}' as '${exportName}' } from 'some-module'\`?`, + ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.", + ForInOfLoopInitializer: ({ + type + }) => `'${type === "ForInStatement" ? "for-in" : "for-of"}' loop variable declaration may not have an initializer.`, + ForInUsing: "For-in loop may not start with 'using' declaration.", + ForOfAsync: "The left-hand side of a for-of loop may not be 'async'.", + ForOfLet: "The left-hand side of a for-of loop may not start with 'let'.", + GeneratorInSingleStatementContext: "Generators can only be declared at the top level or inside a block.", + IllegalBreakContinue: ({ + type + }) => `Unsyntactic ${type === "BreakStatement" ? "break" : "continue"}.`, + IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.", + IllegalReturn: "'return' outside of function.", + ImportAttributesUseAssert: "The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.", + ImportBindingIsString: ({ + importName + }) => `A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${importName}" as foo }\`?`, + ImportCallArity: `\`import()\` requires exactly one or two arguments.`, + ImportCallNotNewExpression: "Cannot use new with import(...).", + ImportCallSpreadArgument: "`...` is not allowed in `import()`.", + ImportJSONBindingNotDefault: "A JSON module can only be imported with `default`.", + ImportReflectionHasAssertion: "`import module x` cannot have assertions.", + ImportReflectionNotBinding: 'Only `import module x from "./module"` is valid.', + IncompatibleRegExpUVFlags: "The 'u' and 'v' regular expression flags cannot be enabled at the same time.", + InvalidBigIntLiteral: "Invalid BigIntLiteral.", + InvalidCodePoint: "Code point out of bounds.", + InvalidCoverInitializedName: "Invalid shorthand property initializer.", + InvalidDecimal: "Invalid decimal.", + InvalidDigit: ({ + radix + }) => `Expected number in radix ${radix}.`, + InvalidEscapeSequence: "Bad character escape sequence.", + InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.", + InvalidEscapedReservedWord: ({ + reservedWord + }) => `Escape sequence in keyword ${reservedWord}.`, + InvalidIdentifier: ({ + identifierName + }) => `Invalid identifier ${identifierName}.`, + InvalidLhs: ({ + ancestor + }) => `Invalid left-hand side in ${toNodeDescription(ancestor)}.`, + InvalidLhsBinding: ({ + ancestor + }) => `Binding invalid left-hand side in ${toNodeDescription(ancestor)}.`, + InvalidLhsOptionalChaining: ({ + ancestor + }) => `Invalid optional chaining in the left-hand side of ${toNodeDescription(ancestor)}.`, + InvalidNumber: "Invalid number.", + InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.", + InvalidOrUnexpectedToken: ({ + unexpected + }) => `Unexpected character '${unexpected}'.`, + InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.", + InvalidPrivateFieldResolution: ({ + identifierName + }) => `Private name #${identifierName} is not defined.`, + InvalidPropertyBindingPattern: "Binding member expression.", + InvalidRecordProperty: "Only properties and spread elements are allowed in record definitions.", + InvalidRestAssignmentPattern: "Invalid rest operator's argument.", + LabelRedeclaration: ({ + labelName + }) => `Label '${labelName}' is already declared.`, + LetInLexicalBinding: "'let' is disallowed as a lexically bound name.", + LineTerminatorBeforeArrow: "No line break is allowed before '=>'.", + MalformedRegExpFlags: "Invalid regular expression flag.", + MissingClassName: "A class name is required.", + MissingEqInAssignment: "Only '=' operator can be used for specifying default value.", + MissingSemicolon: "Missing semicolon.", + MissingPlugin: ({ + missingPlugin + }) => `This experimental syntax requires enabling the parser plugin: ${missingPlugin.map(name => JSON.stringify(name)).join(", ")}.`, + MissingOneOfPlugins: ({ + missingPlugin + }) => `This experimental syntax requires enabling one of the following parser plugin(s): ${missingPlugin.map(name => JSON.stringify(name)).join(", ")}.`, + MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX.", + MixingCoalesceWithLogical: "Nullish coalescing operator(??) requires parens when mixing with logical operators.", + ModuleAttributeDifferentFromType: "The only accepted module attribute is `type`.", + ModuleAttributeInvalidValue: "Only string literals are allowed as module attribute values.", + ModuleAttributesWithDuplicateKeys: ({ + key + }) => `Duplicate key "${key}" is not allowed in module attributes.`, + ModuleExportNameHasLoneSurrogate: ({ + surrogateCharCode + }) => `An export name cannot include a lone surrogate, found '\\u${surrogateCharCode.toString(16)}'.`, + ModuleExportUndefined: ({ + localName + }) => `Export '${localName}' is not defined.`, + MultipleDefaultsInSwitch: "Multiple default clauses.", + NewlineAfterThrow: "Illegal newline after throw.", + NoCatchOrFinally: "Missing catch or finally clause.", + NumberIdentifier: "Identifier directly after number.", + NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.", + ObsoleteAwaitStar: "'await*' has been removed from the async functions proposal. Use Promise.all() instead.", + OptionalChainingNoNew: "Constructors in/after an Optional Chain are not allowed.", + OptionalChainingNoTemplate: "Tagged Template Literals are not allowed in optionalChain.", + OverrideOnConstructor: "'override' modifier cannot appear on a constructor declaration.", + ParamDupe: "Argument name clash.", + PatternHasAccessor: "Object pattern can't contain getter or setter.", + PatternHasMethod: "Object pattern can't contain methods.", + PrivateInExpectedIn: ({ + identifierName + }) => `Private names are only allowed in property accesses (\`obj.#${identifierName}\`) or in \`in\` expressions (\`#${identifierName} in obj\`).`, + PrivateNameRedeclaration: ({ + identifierName + }) => `Duplicate private name #${identifierName}.`, + RecordExpressionBarIncorrectEndSyntaxType: "Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + RecordExpressionBarIncorrectStartSyntaxType: "Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + RecordExpressionHashIncorrectStartSyntaxType: "Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.", + RecordNoProto: "'__proto__' is not allowed in Record expressions.", + RestTrailingComma: "Unexpected trailing comma after rest element.", + SloppyFunction: "In non-strict mode code, functions can only be declared at top level or inside a block.", + SloppyFunctionAnnexB: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.", + SourcePhaseImportRequiresDefault: 'Only `import source x from "./module"` is valid.', + StaticPrototype: "Classes may not have static property named prototype.", + SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?", + SuperPrivateField: "Private fields can't be accessed on super.", + TrailingDecorator: "Decorators must be attached to a class element.", + TupleExpressionBarIncorrectEndSyntaxType: "Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + TupleExpressionBarIncorrectStartSyntaxType: "Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + TupleExpressionHashIncorrectStartSyntaxType: "Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.", + UnexpectedArgumentPlaceholder: "Unexpected argument placeholder.", + UnexpectedAwaitAfterPipelineBody: 'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.', + UnexpectedDigitAfterHash: "Unexpected digit after hash token.", + UnexpectedImportExport: "'import' and 'export' may only appear at the top level.", + UnexpectedKeyword: ({ + keyword + }) => `Unexpected keyword '${keyword}'.`, + UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration.", + UnexpectedLexicalDeclaration: "Lexical declaration cannot appear in a single-statement context.", + UnexpectedNewTarget: "`new.target` can only be used in functions or class properties.", + UnexpectedNumericSeparator: "A numeric separator is only allowed between two digits.", + UnexpectedPrivateField: "Unexpected private name.", + UnexpectedReservedWord: ({ + reservedWord + }) => `Unexpected reserved word '${reservedWord}'.`, + UnexpectedSuper: "'super' is only allowed in object methods and classes.", + UnexpectedToken: ({ + expected, + unexpected + }) => `Unexpected token${unexpected ? ` '${unexpected}'.` : ""}${expected ? `, expected "${expected}"` : ""}`, + UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.", + UnexpectedUsingDeclaration: "Using declaration cannot appear in the top level when source type is `script`.", + UnsupportedBind: "Binding should be performed on object property.", + UnsupportedDecoratorExport: "A decorated export must export a class declaration.", + UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.", + UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.", + UnsupportedMetaProperty: ({ + target, + onlyValidPropertyName + }) => `The only valid meta property for ${target} is ${target}.${onlyValidPropertyName}.`, + UnsupportedParameterDecorator: "Decorators cannot be used to decorate parameters.", + UnsupportedPropertyDecorator: "Decorators cannot be used to decorate object literal properties.", + UnsupportedSuper: "'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).", + UnterminatedComment: "Unterminated comment.", + UnterminatedRegExp: "Unterminated regular expression.", + UnterminatedString: "Unterminated string constant.", + UnterminatedTemplate: "Unterminated template.", + UsingDeclarationExport: "Using declaration cannot be exported.", + UsingDeclarationHasBindingPattern: "Using declaration cannot have destructuring patterns.", + VarRedeclaration: ({ + identifierName + }) => `Identifier '${identifierName}' has already been declared.`, + YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator.", + YieldInParameter: "Yield expression is not allowed in formal parameters.", + ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0." +}; +var StrictModeErrors = { + StrictDelete: "Deleting local variable in strict mode.", + StrictEvalArguments: ({ + referenceName + }) => `Assigning to '${referenceName}' in strict mode.`, + StrictEvalArgumentsBinding: ({ + bindingName + }) => `Binding '${bindingName}' in strict mode.`, + StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block.", + StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'.", + StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.", + StrictWith: "'with' in strict mode." +}; +const UnparenthesizedPipeBodyDescriptions = new Set(["ArrowFunctionExpression", "AssignmentExpression", "ConditionalExpression", "YieldExpression"]); +var PipelineOperatorErrors = Object.assign({ + PipeBodyIsTighter: "Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.", + PipeTopicRequiresHackPipes: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.', + PipeTopicUnbound: "Topic reference is unbound; it must be inside a pipe body.", + PipeTopicUnconfiguredToken: ({ + token + }) => `Invalid topic token ${token}. In order to use ${token} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${token}" }.`, + PipeTopicUnused: "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.", + PipeUnparenthesizedBody: ({ + type + }) => `Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({ + type + })}; please wrap it in parentheses.` +}, { + PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.', + PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression.", + PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression.", + PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference.", + PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.", + PrimaryTopicRequiresSmartPipeline: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.' +}); +const _excluded = ["message"]; +function defineHidden(obj, key, value) { + Object.defineProperty(obj, key, { + enumerable: false, + configurable: true, + value + }); +} +function toParseErrorConstructor({ + toMessage, + code, + reasonCode, + syntaxPlugin +}) { + const hasMissingPlugin = reasonCode === "MissingPlugin" || reasonCode === "MissingOneOfPlugins"; + { + const oldReasonCodes = { + AccessorCannotDeclareThisParameter: "AccesorCannotDeclareThisParameter", + AccessorCannotHaveTypeParameters: "AccesorCannotHaveTypeParameters", + ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference: "ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference", + SetAccessorCannotHaveOptionalParameter: "SetAccesorCannotHaveOptionalParameter", + SetAccessorCannotHaveRestParameter: "SetAccesorCannotHaveRestParameter", + SetAccessorCannotHaveReturnType: "SetAccesorCannotHaveReturnType" + }; + if (oldReasonCodes[reasonCode]) { + reasonCode = oldReasonCodes[reasonCode]; + } + } + return function constructor(loc, details) { + const error = new SyntaxError(); + error.code = code; + error.reasonCode = reasonCode; + error.loc = loc; + error.pos = loc.index; + error.syntaxPlugin = syntaxPlugin; + if (hasMissingPlugin) { + error.missingPlugin = details.missingPlugin; + } + defineHidden(error, "clone", function clone(overrides = {}) { + var _overrides$loc; + const { + line, + column, + index + } = (_overrides$loc = overrides.loc) != null ? _overrides$loc : loc; + return constructor(new Position(line, column, index), Object.assign({}, details, overrides.details)); + }); + defineHidden(error, "details", details); + Object.defineProperty(error, "message", { + configurable: true, + get() { + const message = `${toMessage(details)} (${loc.line}:${loc.column})`; + this.message = message; + return message; + }, + set(value) { + Object.defineProperty(this, "message", { + value, + writable: true + }); + } + }); + return error; + }; +} +function ParseErrorEnum(argument, syntaxPlugin) { + if (Array.isArray(argument)) { + return parseErrorTemplates => ParseErrorEnum(parseErrorTemplates, argument[0]); + } + const ParseErrorConstructors = {}; + for (const reasonCode of Object.keys(argument)) { + const template = argument[reasonCode]; + const _ref = typeof template === "string" ? { + message: () => template + } : typeof template === "function" ? { + message: template + } : template, + { + message + } = _ref, + rest = _objectWithoutPropertiesLoose(_ref, _excluded); + const toMessage = typeof message === "string" ? () => message : message; + ParseErrorConstructors[reasonCode] = toParseErrorConstructor(Object.assign({ + code: "BABEL_PARSER_SYNTAX_ERROR", + reasonCode, + toMessage + }, syntaxPlugin ? { + syntaxPlugin + } : {}, rest)); + } + return ParseErrorConstructors; +} +const Errors = Object.assign({}, ParseErrorEnum(ModuleErrors), ParseErrorEnum(StandardErrors), ParseErrorEnum(StrictModeErrors), ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors)); +function createDefaultOptions() { + return { + sourceType: "script", + sourceFilename: undefined, + startIndex: 0, + startColumn: 0, + startLine: 1, + allowAwaitOutsideFunction: false, + allowReturnOutsideFunction: false, + allowNewTargetOutsideFunction: false, + allowImportExportEverywhere: false, + allowSuperOutsideMethod: false, + allowUndeclaredExports: false, + plugins: [], + strictMode: null, + ranges: false, + tokens: false, + createImportExpressions: false, + createParenthesizedExpressions: false, + errorRecovery: false, + attachComment: true, + annexB: true + }; +} +function getOptions(opts) { + const options = createDefaultOptions(); + if (opts == null) { + return options; + } + if (opts.annexB != null && opts.annexB !== false) { + throw new Error("The `annexB` option can only be set to `false`."); + } + for (const key of Object.keys(options)) { + if (opts[key] != null) options[key] = opts[key]; + } + if (options.startLine === 1) { + if (opts.startIndex == null && options.startColumn > 0) { + options.startIndex = options.startColumn; + } else if (opts.startColumn == null && options.startIndex > 0) { + options.startColumn = options.startIndex; + } + } else if (opts.startColumn == null || opts.startIndex == null) { + if (opts.startIndex != null) { + throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`."); + } + } + return options; +} +const { + defineProperty +} = Object; +const toUnenumerable = (object, key) => { + if (object) { + defineProperty(object, key, { + enumerable: false, + value: object[key] + }); + } +}; +function toESTreeLocation(node) { + toUnenumerable(node.loc.start, "index"); + toUnenumerable(node.loc.end, "index"); + return node; +} +var estree = superClass => class ESTreeParserMixin extends superClass { + parse() { + const file = toESTreeLocation(super.parse()); + if (this.optionFlags & 128) { + file.tokens = file.tokens.map(toESTreeLocation); + } + return file; + } + parseRegExpLiteral({ + pattern, + flags + }) { + let regex = null; + try { + regex = new RegExp(pattern, flags); + } catch (_) {} + const node = this.estreeParseLiteral(regex); + node.regex = { + pattern, + flags + }; + return node; + } + parseBigIntLiteral(value) { + let bigInt; + try { + bigInt = BigInt(value); + } catch (_unused) { + bigInt = null; + } + const node = this.estreeParseLiteral(bigInt); + node.bigint = String(node.value || value); + return node; + } + parseDecimalLiteral(value) { + const decimal = null; + const node = this.estreeParseLiteral(decimal); + node.decimal = String(node.value || value); + return node; + } + estreeParseLiteral(value) { + return this.parseLiteral(value, "Literal"); + } + parseStringLiteral(value) { + return this.estreeParseLiteral(value); + } + parseNumericLiteral(value) { + return this.estreeParseLiteral(value); + } + parseNullLiteral() { + return this.estreeParseLiteral(null); + } + parseBooleanLiteral(value) { + return this.estreeParseLiteral(value); + } + directiveToStmt(directive) { + const expression = directive.value; + delete directive.value; + expression.type = "Literal"; + expression.raw = expression.extra.raw; + expression.value = expression.extra.expressionValue; + const stmt = directive; + stmt.type = "ExpressionStatement"; + stmt.expression = expression; + stmt.directive = expression.extra.rawValue; + delete expression.extra; + return stmt; + } + initFunction(node, isAsync) { + super.initFunction(node, isAsync); + node.expression = false; + } + checkDeclaration(node) { + if (node != null && this.isObjectProperty(node)) { + this.checkDeclaration(node.value); + } else { + super.checkDeclaration(node); + } + } + getObjectOrClassMethodParams(method) { + return method.value.params; + } + isValidDirective(stmt) { + var _stmt$expression$extr; + return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && !((_stmt$expression$extr = stmt.expression.extra) != null && _stmt$expression$extr.parenthesized); + } + parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) { + super.parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse); + const directiveStatements = node.directives.map(d => this.directiveToStmt(d)); + node.body = directiveStatements.concat(node.body); + delete node.directives; + } + parsePrivateName() { + const node = super.parsePrivateName(); + { + if (!this.getPluginOption("estree", "classFeatures")) { + return node; + } + } + return this.convertPrivateNameToPrivateIdentifier(node); + } + convertPrivateNameToPrivateIdentifier(node) { + const name = super.getPrivateNameSV(node); + node = node; + delete node.id; + node.name = name; + node.type = "PrivateIdentifier"; + return node; + } + isPrivateName(node) { + { + if (!this.getPluginOption("estree", "classFeatures")) { + return super.isPrivateName(node); + } + } + return node.type === "PrivateIdentifier"; + } + getPrivateNameSV(node) { + { + if (!this.getPluginOption("estree", "classFeatures")) { + return super.getPrivateNameSV(node); + } + } + return node.name; + } + parseLiteral(value, type) { + const node = super.parseLiteral(value, type); + node.raw = node.extra.raw; + delete node.extra; + return node; + } + parseFunctionBody(node, allowExpression, isMethod = false) { + super.parseFunctionBody(node, allowExpression, isMethod); + node.expression = node.body.type !== "BlockStatement"; + } + parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { + let funcNode = this.startNode(); + funcNode.kind = node.kind; + funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope); + funcNode.type = "FunctionExpression"; + delete funcNode.kind; + node.value = funcNode; + const { + typeParameters + } = node; + if (typeParameters) { + delete node.typeParameters; + funcNode.typeParameters = typeParameters; + this.resetStartLocationFromNode(funcNode, typeParameters); + } + if (type === "ClassPrivateMethod") { + node.computed = false; + } + return this.finishNode(node, "MethodDefinition"); + } + nameIsConstructor(key) { + if (key.type === "Literal") return key.value === "constructor"; + return super.nameIsConstructor(key); + } + parseClassProperty(...args) { + const propertyNode = super.parseClassProperty(...args); + { + if (!this.getPluginOption("estree", "classFeatures")) { + return propertyNode; + } + } + { + propertyNode.type = "PropertyDefinition"; + } + return propertyNode; + } + parseClassPrivateProperty(...args) { + const propertyNode = super.parseClassPrivateProperty(...args); + { + if (!this.getPluginOption("estree", "classFeatures")) { + return propertyNode; + } + } + { + propertyNode.type = "PropertyDefinition"; + } + propertyNode.computed = false; + return propertyNode; + } + parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) { + const node = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor); + if (node) { + node.type = "Property"; + if (node.kind === "method") { + node.kind = "init"; + } + node.shorthand = false; + } + return node; + } + parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors) { + const node = super.parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors); + if (node) { + node.kind = "init"; + node.type = "Property"; + } + return node; + } + isValidLVal(type, isUnparenthesizedInAssign, binding) { + return type === "Property" ? "value" : super.isValidLVal(type, isUnparenthesizedInAssign, binding); + } + isAssignable(node, isBinding) { + if (node != null && this.isObjectProperty(node)) { + return this.isAssignable(node.value, isBinding); + } + return super.isAssignable(node, isBinding); + } + toAssignable(node, isLHS = false) { + if (node != null && this.isObjectProperty(node)) { + const { + key, + value + } = node; + if (this.isPrivateName(key)) { + this.classScope.usePrivateName(this.getPrivateNameSV(key), key.loc.start); + } + this.toAssignable(value, isLHS); + } else { + super.toAssignable(node, isLHS); + } + } + toAssignableObjectExpressionProp(prop, isLast, isLHS) { + if (prop.type === "Property" && (prop.kind === "get" || prop.kind === "set")) { + this.raise(Errors.PatternHasAccessor, prop.key); + } else if (prop.type === "Property" && prop.method) { + this.raise(Errors.PatternHasMethod, prop.key); + } else { + super.toAssignableObjectExpressionProp(prop, isLast, isLHS); + } + } + finishCallExpression(unfinished, optional) { + const node = super.finishCallExpression(unfinished, optional); + if (node.callee.type === "Import") { + var _ref, _ref2; + node.type = "ImportExpression"; + node.source = node.arguments[0]; + node.options = (_ref = node.arguments[1]) != null ? _ref : null; + node.attributes = (_ref2 = node.arguments[1]) != null ? _ref2 : null; + delete node.arguments; + delete node.callee; + } + return node; + } + toReferencedArguments(node) { + if (node.type === "ImportExpression") { + return; + } + super.toReferencedArguments(node); + } + parseExport(unfinished, decorators) { + const exportStartLoc = this.state.lastTokStartLoc; + const node = super.parseExport(unfinished, decorators); + switch (node.type) { + case "ExportAllDeclaration": + node.exported = null; + break; + case "ExportNamedDeclaration": + if (node.specifiers.length === 1 && node.specifiers[0].type === "ExportNamespaceSpecifier") { + node.type = "ExportAllDeclaration"; + node.exported = node.specifiers[0].exported; + delete node.specifiers; + } + case "ExportDefaultDeclaration": + { + var _declaration$decorato; + const { + declaration + } = node; + if ((declaration == null ? void 0 : declaration.type) === "ClassDeclaration" && ((_declaration$decorato = declaration.decorators) == null ? void 0 : _declaration$decorato.length) > 0 && declaration.start === node.start) { + this.resetStartLocation(node, exportStartLoc); + } + } + break; + } + return node; + } + parseSubscript(base, startLoc, noCalls, state) { + const node = super.parseSubscript(base, startLoc, noCalls, state); + if (state.optionalChainMember) { + if (node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression") { + node.type = node.type.substring(8); + } + if (state.stop) { + const chain = this.startNodeAtNode(node); + chain.expression = node; + return this.finishNode(chain, "ChainExpression"); + } + } else if (node.type === "MemberExpression" || node.type === "CallExpression") { + node.optional = false; + } + return node; + } + isOptionalMemberExpression(node) { + if (node.type === "ChainExpression") { + return node.expression.type === "MemberExpression"; + } + return super.isOptionalMemberExpression(node); + } + hasPropertyAsPrivateName(node) { + if (node.type === "ChainExpression") { + node = node.expression; + } + return super.hasPropertyAsPrivateName(node); + } + isObjectProperty(node) { + return node.type === "Property" && node.kind === "init" && !node.method; + } + isObjectMethod(node) { + return node.type === "Property" && (node.method || node.kind === "get" || node.kind === "set"); + } + finishNodeAt(node, type, endLoc) { + return toESTreeLocation(super.finishNodeAt(node, type, endLoc)); + } + resetStartLocation(node, startLoc) { + super.resetStartLocation(node, startLoc); + toESTreeLocation(node); + } + resetEndLocation(node, endLoc = this.state.lastTokEndLoc) { + super.resetEndLocation(node, endLoc); + toESTreeLocation(node); + } +}; +class TokContext { + constructor(token, preserveSpace) { + this.token = void 0; + this.preserveSpace = void 0; + this.token = token; + this.preserveSpace = !!preserveSpace; + } +} +const types = { + brace: new TokContext("{"), + j_oTag: new TokContext("...", true) +}; +{ + types.template = new TokContext("`", true); +} +const beforeExpr = true; +const startsExpr = true; +const isLoop = true; +const isAssign = true; +const prefix = true; +const postfix = true; +class ExportedTokenType { + constructor(label, conf = {}) { + this.label = void 0; + this.keyword = void 0; + this.beforeExpr = void 0; + this.startsExpr = void 0; + this.rightAssociative = void 0; + this.isLoop = void 0; + this.isAssign = void 0; + this.prefix = void 0; + this.postfix = void 0; + this.binop = void 0; + this.label = label; + this.keyword = conf.keyword; + this.beforeExpr = !!conf.beforeExpr; + this.startsExpr = !!conf.startsExpr; + this.rightAssociative = !!conf.rightAssociative; + this.isLoop = !!conf.isLoop; + this.isAssign = !!conf.isAssign; + this.prefix = !!conf.prefix; + this.postfix = !!conf.postfix; + this.binop = conf.binop != null ? conf.binop : null; + { + this.updateContext = null; + } + } +} +const keywords$1 = new Map(); +function createKeyword(name, options = {}) { + options.keyword = name; + const token = createToken(name, options); + keywords$1.set(name, token); + return token; +} +function createBinop(name, binop) { + return createToken(name, { + beforeExpr, + binop + }); +} +let tokenTypeCounter = -1; +const tokenTypes = []; +const tokenLabels = []; +const tokenBinops = []; +const tokenBeforeExprs = []; +const tokenStartsExprs = []; +const tokenPrefixes = []; +function createToken(name, options = {}) { + var _options$binop, _options$beforeExpr, _options$startsExpr, _options$prefix; + ++tokenTypeCounter; + tokenLabels.push(name); + tokenBinops.push((_options$binop = options.binop) != null ? _options$binop : -1); + tokenBeforeExprs.push((_options$beforeExpr = options.beforeExpr) != null ? _options$beforeExpr : false); + tokenStartsExprs.push((_options$startsExpr = options.startsExpr) != null ? _options$startsExpr : false); + tokenPrefixes.push((_options$prefix = options.prefix) != null ? _options$prefix : false); + tokenTypes.push(new ExportedTokenType(name, options)); + return tokenTypeCounter; +} +function createKeywordLike(name, options = {}) { + var _options$binop2, _options$beforeExpr2, _options$startsExpr2, _options$prefix2; + ++tokenTypeCounter; + keywords$1.set(name, tokenTypeCounter); + tokenLabels.push(name); + tokenBinops.push((_options$binop2 = options.binop) != null ? _options$binop2 : -1); + tokenBeforeExprs.push((_options$beforeExpr2 = options.beforeExpr) != null ? _options$beforeExpr2 : false); + tokenStartsExprs.push((_options$startsExpr2 = options.startsExpr) != null ? _options$startsExpr2 : false); + tokenPrefixes.push((_options$prefix2 = options.prefix) != null ? _options$prefix2 : false); + tokenTypes.push(new ExportedTokenType("name", options)); + return tokenTypeCounter; +} +const tt = { + bracketL: createToken("[", { + beforeExpr, + startsExpr + }), + bracketHashL: createToken("#[", { + beforeExpr, + startsExpr + }), + bracketBarL: createToken("[|", { + beforeExpr, + startsExpr + }), + bracketR: createToken("]"), + bracketBarR: createToken("|]"), + braceL: createToken("{", { + beforeExpr, + startsExpr + }), + braceBarL: createToken("{|", { + beforeExpr, + startsExpr + }), + braceHashL: createToken("#{", { + beforeExpr, + startsExpr + }), + braceR: createToken("}"), + braceBarR: createToken("|}"), + parenL: createToken("(", { + beforeExpr, + startsExpr + }), + parenR: createToken(")"), + comma: createToken(",", { + beforeExpr + }), + semi: createToken(";", { + beforeExpr + }), + colon: createToken(":", { + beforeExpr + }), + doubleColon: createToken("::", { + beforeExpr + }), + dot: createToken("."), + question: createToken("?", { + beforeExpr + }), + questionDot: createToken("?."), + arrow: createToken("=>", { + beforeExpr + }), + template: createToken("template"), + ellipsis: createToken("...", { + beforeExpr + }), + backQuote: createToken("`", { + startsExpr + }), + dollarBraceL: createToken("${", { + beforeExpr, + startsExpr + }), + templateTail: createToken("...`", { + startsExpr + }), + templateNonTail: createToken("...${", { + beforeExpr, + startsExpr + }), + at: createToken("@"), + hash: createToken("#", { + startsExpr + }), + interpreterDirective: createToken("#!..."), + eq: createToken("=", { + beforeExpr, + isAssign + }), + assign: createToken("_=", { + beforeExpr, + isAssign + }), + slashAssign: createToken("_=", { + beforeExpr, + isAssign + }), + xorAssign: createToken("_=", { + beforeExpr, + isAssign + }), + moduloAssign: createToken("_=", { + beforeExpr, + isAssign + }), + incDec: createToken("++/--", { + prefix, + postfix, + startsExpr + }), + bang: createToken("!", { + beforeExpr, + prefix, + startsExpr + }), + tilde: createToken("~", { + beforeExpr, + prefix, + startsExpr + }), + doubleCaret: createToken("^^", { + startsExpr + }), + doubleAt: createToken("@@", { + startsExpr + }), + pipeline: createBinop("|>", 0), + nullishCoalescing: createBinop("??", 1), + logicalOR: createBinop("||", 1), + logicalAND: createBinop("&&", 2), + bitwiseOR: createBinop("|", 3), + bitwiseXOR: createBinop("^", 4), + bitwiseAND: createBinop("&", 5), + equality: createBinop("==/!=/===/!==", 6), + lt: createBinop("/<=/>=", 7), + gt: createBinop("/<=/>=", 7), + relational: createBinop("/<=/>=", 7), + bitShift: createBinop("<>/>>>", 8), + bitShiftL: createBinop("<>/>>>", 8), + bitShiftR: createBinop("<>/>>>", 8), + plusMin: createToken("+/-", { + beforeExpr, + binop: 9, + prefix, + startsExpr + }), + modulo: createToken("%", { + binop: 10, + startsExpr + }), + star: createToken("*", { + binop: 10 + }), + slash: createBinop("/", 10), + exponent: createToken("**", { + beforeExpr, + binop: 11, + rightAssociative: true + }), + _in: createKeyword("in", { + beforeExpr, + binop: 7 + }), + _instanceof: createKeyword("instanceof", { + beforeExpr, + binop: 7 + }), + _break: createKeyword("break"), + _case: createKeyword("case", { + beforeExpr + }), + _catch: createKeyword("catch"), + _continue: createKeyword("continue"), + _debugger: createKeyword("debugger"), + _default: createKeyword("default", { + beforeExpr + }), + _else: createKeyword("else", { + beforeExpr + }), + _finally: createKeyword("finally"), + _function: createKeyword("function", { + startsExpr + }), + _if: createKeyword("if"), + _return: createKeyword("return", { + beforeExpr + }), + _switch: createKeyword("switch"), + _throw: createKeyword("throw", { + beforeExpr, + prefix, + startsExpr + }), + _try: createKeyword("try"), + _var: createKeyword("var"), + _const: createKeyword("const"), + _with: createKeyword("with"), + _new: createKeyword("new", { + beforeExpr, + startsExpr + }), + _this: createKeyword("this", { + startsExpr + }), + _super: createKeyword("super", { + startsExpr + }), + _class: createKeyword("class", { + startsExpr + }), + _extends: createKeyword("extends", { + beforeExpr + }), + _export: createKeyword("export"), + _import: createKeyword("import", { + startsExpr + }), + _null: createKeyword("null", { + startsExpr + }), + _true: createKeyword("true", { + startsExpr + }), + _false: createKeyword("false", { + startsExpr + }), + _typeof: createKeyword("typeof", { + beforeExpr, + prefix, + startsExpr + }), + _void: createKeyword("void", { + beforeExpr, + prefix, + startsExpr + }), + _delete: createKeyword("delete", { + beforeExpr, + prefix, + startsExpr + }), + _do: createKeyword("do", { + isLoop, + beforeExpr + }), + _for: createKeyword("for", { + isLoop + }), + _while: createKeyword("while", { + isLoop + }), + _as: createKeywordLike("as", { + startsExpr + }), + _assert: createKeywordLike("assert", { + startsExpr + }), + _async: createKeywordLike("async", { + startsExpr + }), + _await: createKeywordLike("await", { + startsExpr + }), + _defer: createKeywordLike("defer", { + startsExpr + }), + _from: createKeywordLike("from", { + startsExpr + }), + _get: createKeywordLike("get", { + startsExpr + }), + _let: createKeywordLike("let", { + startsExpr + }), + _meta: createKeywordLike("meta", { + startsExpr + }), + _of: createKeywordLike("of", { + startsExpr + }), + _sent: createKeywordLike("sent", { + startsExpr + }), + _set: createKeywordLike("set", { + startsExpr + }), + _source: createKeywordLike("source", { + startsExpr + }), + _static: createKeywordLike("static", { + startsExpr + }), + _using: createKeywordLike("using", { + startsExpr + }), + _yield: createKeywordLike("yield", { + startsExpr + }), + _asserts: createKeywordLike("asserts", { + startsExpr + }), + _checks: createKeywordLike("checks", { + startsExpr + }), + _exports: createKeywordLike("exports", { + startsExpr + }), + _global: createKeywordLike("global", { + startsExpr + }), + _implements: createKeywordLike("implements", { + startsExpr + }), + _intrinsic: createKeywordLike("intrinsic", { + startsExpr + }), + _infer: createKeywordLike("infer", { + startsExpr + }), + _is: createKeywordLike("is", { + startsExpr + }), + _mixins: createKeywordLike("mixins", { + startsExpr + }), + _proto: createKeywordLike("proto", { + startsExpr + }), + _require: createKeywordLike("require", { + startsExpr + }), + _satisfies: createKeywordLike("satisfies", { + startsExpr + }), + _keyof: createKeywordLike("keyof", { + startsExpr + }), + _readonly: createKeywordLike("readonly", { + startsExpr + }), + _unique: createKeywordLike("unique", { + startsExpr + }), + _abstract: createKeywordLike("abstract", { + startsExpr + }), + _declare: createKeywordLike("declare", { + startsExpr + }), + _enum: createKeywordLike("enum", { + startsExpr + }), + _module: createKeywordLike("module", { + startsExpr + }), + _namespace: createKeywordLike("namespace", { + startsExpr + }), + _interface: createKeywordLike("interface", { + startsExpr + }), + _type: createKeywordLike("type", { + startsExpr + }), + _opaque: createKeywordLike("opaque", { + startsExpr + }), + name: createToken("name", { + startsExpr + }), + placeholder: createToken("%%", { + startsExpr: true + }), + string: createToken("string", { + startsExpr + }), + num: createToken("num", { + startsExpr + }), + bigint: createToken("bigint", { + startsExpr + }), + decimal: createToken("decimal", { + startsExpr + }), + regexp: createToken("regexp", { + startsExpr + }), + privateName: createToken("#name", { + startsExpr + }), + eof: createToken("eof"), + jsxName: createToken("jsxName"), + jsxText: createToken("jsxText", { + beforeExpr: true + }), + jsxTagStart: createToken("jsxTagStart", { + startsExpr: true + }), + jsxTagEnd: createToken("jsxTagEnd") +}; +function tokenIsIdentifier(token) { + return token >= 93 && token <= 133; +} +function tokenKeywordOrIdentifierIsKeyword(token) { + return token <= 92; +} +function tokenIsKeywordOrIdentifier(token) { + return token >= 58 && token <= 133; +} +function tokenIsLiteralPropertyName(token) { + return token >= 58 && token <= 137; +} +function tokenComesBeforeExpression(token) { + return tokenBeforeExprs[token]; +} +function tokenCanStartExpression(token) { + return tokenStartsExprs[token]; +} +function tokenIsAssignment(token) { + return token >= 29 && token <= 33; +} +function tokenIsFlowInterfaceOrTypeOrOpaque(token) { + return token >= 129 && token <= 131; +} +function tokenIsLoop(token) { + return token >= 90 && token <= 92; +} +function tokenIsKeyword(token) { + return token >= 58 && token <= 92; +} +function tokenIsOperator(token) { + return token >= 39 && token <= 59; +} +function tokenIsPostfix(token) { + return token === 34; +} +function tokenIsPrefix(token) { + return tokenPrefixes[token]; +} +function tokenIsTSTypeOperator(token) { + return token >= 121 && token <= 123; +} +function tokenIsTSDeclarationStart(token) { + return token >= 124 && token <= 130; +} +function tokenLabelName(token) { + return tokenLabels[token]; +} +function tokenOperatorPrecedence(token) { + return tokenBinops[token]; +} +function tokenIsRightAssociative(token) { + return token === 57; +} +function tokenIsTemplate(token) { + return token >= 24 && token <= 25; +} +function getExportedToken(token) { + return tokenTypes[token]; +} +{ + tokenTypes[8].updateContext = context => { + context.pop(); + }; + tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = context => { + context.push(types.brace); + }; + tokenTypes[22].updateContext = context => { + if (context[context.length - 1] === types.template) { + context.pop(); + } else { + context.push(types.template); + } + }; + tokenTypes[143].updateContext = context => { + context.push(types.j_expr, types.j_oTag); + }; +} +let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c8a\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7cd\ua7d0\ua7d1\ua7d3\ua7d5-\ua7dc\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; +let nonASCIIidentifierChars = "\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0897-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65"; +const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); +const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); +nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; +const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; +const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; +function isInAstralSet(code, set) { + let pos = 0x10000; + for (let i = 0, length = set.length; i < length; i += 2) { + pos += set[i]; + if (pos > code) return false; + pos += set[i + 1]; + if (pos >= code) return true; + } + return false; +} +function isIdentifierStart(code) { + if (code < 65) return code === 36; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + if (code <= 0xffff) { + return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes); +} +function isIdentifierChar(code) { + if (code < 48) return code === 36; + if (code < 58) return true; + if (code < 65) return false; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + if (code <= 0xffff) { + return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); +} +const reservedWords = { + keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], + strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], + strictBind: ["eval", "arguments"] +}; +const keywords = new Set(reservedWords.keyword); +const reservedWordsStrictSet = new Set(reservedWords.strict); +const reservedWordsStrictBindSet = new Set(reservedWords.strictBind); +function isReservedWord(word, inModule) { + return inModule && word === "await" || word === "enum"; +} +function isStrictReservedWord(word, inModule) { + return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); +} +function isStrictBindOnlyReservedWord(word) { + return reservedWordsStrictBindSet.has(word); +} +function isStrictBindReservedWord(word, inModule) { + return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); +} +function isKeyword(word) { + return keywords.has(word); +} +function isIteratorStart(current, next, next2) { + return current === 64 && next === 64 && isIdentifierStart(next2); +} +const reservedWordLikeSet = new Set(["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "eval", "arguments", "enum", "await"]); +function canBeReservedWord(word) { + return reservedWordLikeSet.has(word); +} +class Scope { + constructor(flags) { + this.flags = 0; + this.names = new Map(); + this.firstLexicalName = ""; + this.flags = flags; + } +} +class ScopeHandler { + constructor(parser, inModule) { + this.parser = void 0; + this.scopeStack = []; + this.inModule = void 0; + this.undefinedExports = new Map(); + this.parser = parser; + this.inModule = inModule; + } + get inTopLevel() { + return (this.currentScope().flags & 1) > 0; + } + get inFunction() { + return (this.currentVarScopeFlags() & 2) > 0; + } + get allowSuper() { + return (this.currentThisScopeFlags() & 16) > 0; + } + get allowDirectSuper() { + return (this.currentThisScopeFlags() & 32) > 0; + } + get inClass() { + return (this.currentThisScopeFlags() & 64) > 0; + } + get inClassAndNotInNonArrowFunction() { + const flags = this.currentThisScopeFlags(); + return (flags & 64) > 0 && (flags & 2) === 0; + } + get inStaticBlock() { + for (let i = this.scopeStack.length - 1;; i--) { + const { + flags + } = this.scopeStack[i]; + if (flags & 128) { + return true; + } + if (flags & (387 | 64)) { + return false; + } + } + } + get inNonArrowFunction() { + return (this.currentThisScopeFlags() & 2) > 0; + } + get treatFunctionsAsVar() { + return this.treatFunctionsAsVarInScope(this.currentScope()); + } + createScope(flags) { + return new Scope(flags); + } + enter(flags) { + this.scopeStack.push(this.createScope(flags)); + } + exit() { + const scope = this.scopeStack.pop(); + return scope.flags; + } + treatFunctionsAsVarInScope(scope) { + return !!(scope.flags & (2 | 128) || !this.parser.inModule && scope.flags & 1); + } + declareName(name, bindingType, loc) { + let scope = this.currentScope(); + if (bindingType & 8 || bindingType & 16) { + this.checkRedeclarationInScope(scope, name, bindingType, loc); + let type = scope.names.get(name) || 0; + if (bindingType & 16) { + type = type | 4; + } else { + if (!scope.firstLexicalName) { + scope.firstLexicalName = name; + } + type = type | 2; + } + scope.names.set(name, type); + if (bindingType & 8) { + this.maybeExportDefined(scope, name); + } + } else if (bindingType & 4) { + for (let i = this.scopeStack.length - 1; i >= 0; --i) { + scope = this.scopeStack[i]; + this.checkRedeclarationInScope(scope, name, bindingType, loc); + scope.names.set(name, (scope.names.get(name) || 0) | 1); + this.maybeExportDefined(scope, name); + if (scope.flags & 387) break; + } + } + if (this.parser.inModule && scope.flags & 1) { + this.undefinedExports.delete(name); + } + } + maybeExportDefined(scope, name) { + if (this.parser.inModule && scope.flags & 1) { + this.undefinedExports.delete(name); + } + } + checkRedeclarationInScope(scope, name, bindingType, loc) { + if (this.isRedeclaredInScope(scope, name, bindingType)) { + this.parser.raise(Errors.VarRedeclaration, loc, { + identifierName: name + }); + } + } + isRedeclaredInScope(scope, name, bindingType) { + if (!(bindingType & 1)) return false; + if (bindingType & 8) { + return scope.names.has(name); + } + const type = scope.names.get(name); + if (bindingType & 16) { + return (type & 2) > 0 || !this.treatFunctionsAsVarInScope(scope) && (type & 1) > 0; + } + return (type & 2) > 0 && !(scope.flags & 8 && scope.firstLexicalName === name) || !this.treatFunctionsAsVarInScope(scope) && (type & 4) > 0; + } + checkLocalExport(id) { + const { + name + } = id; + const topLevelScope = this.scopeStack[0]; + if (!topLevelScope.names.has(name)) { + this.undefinedExports.set(name, id.loc.start); + } + } + currentScope() { + return this.scopeStack[this.scopeStack.length - 1]; + } + currentVarScopeFlags() { + for (let i = this.scopeStack.length - 1;; i--) { + const { + flags + } = this.scopeStack[i]; + if (flags & 387) { + return flags; + } + } + } + currentThisScopeFlags() { + for (let i = this.scopeStack.length - 1;; i--) { + const { + flags + } = this.scopeStack[i]; + if (flags & (387 | 64) && !(flags & 4)) { + return flags; + } + } + } +} +class FlowScope extends Scope { + constructor(...args) { + super(...args); + this.declareFunctions = new Set(); + } +} +class FlowScopeHandler extends ScopeHandler { + createScope(flags) { + return new FlowScope(flags); + } + declareName(name, bindingType, loc) { + const scope = this.currentScope(); + if (bindingType & 2048) { + this.checkRedeclarationInScope(scope, name, bindingType, loc); + this.maybeExportDefined(scope, name); + scope.declareFunctions.add(name); + return; + } + super.declareName(name, bindingType, loc); + } + isRedeclaredInScope(scope, name, bindingType) { + if (super.isRedeclaredInScope(scope, name, bindingType)) return true; + if (bindingType & 2048 && !scope.declareFunctions.has(name)) { + const type = scope.names.get(name); + return (type & 4) > 0 || (type & 2) > 0; + } + return false; + } + checkLocalExport(id) { + if (!this.scopeStack[0].declareFunctions.has(id.name)) { + super.checkLocalExport(id); + } + } +} +class BaseParser { + constructor() { + this.sawUnambiguousESM = false; + this.ambiguousScriptDifferentAst = false; + } + sourceToOffsetPos(sourcePos) { + return sourcePos + this.startIndex; + } + offsetToSourcePos(offsetPos) { + return offsetPos - this.startIndex; + } + hasPlugin(pluginConfig) { + if (typeof pluginConfig === "string") { + return this.plugins.has(pluginConfig); + } else { + const [pluginName, pluginOptions] = pluginConfig; + if (!this.hasPlugin(pluginName)) { + return false; + } + const actualOptions = this.plugins.get(pluginName); + for (const key of Object.keys(pluginOptions)) { + if ((actualOptions == null ? void 0 : actualOptions[key]) !== pluginOptions[key]) { + return false; + } + } + return true; + } + } + getPluginOption(plugin, name) { + var _this$plugins$get; + return (_this$plugins$get = this.plugins.get(plugin)) == null ? void 0 : _this$plugins$get[name]; + } +} +function setTrailingComments(node, comments) { + if (node.trailingComments === undefined) { + node.trailingComments = comments; + } else { + node.trailingComments.unshift(...comments); + } +} +function setLeadingComments(node, comments) { + if (node.leadingComments === undefined) { + node.leadingComments = comments; + } else { + node.leadingComments.unshift(...comments); + } +} +function setInnerComments(node, comments) { + if (node.innerComments === undefined) { + node.innerComments = comments; + } else { + node.innerComments.unshift(...comments); + } +} +function adjustInnerComments(node, elements, commentWS) { + let lastElement = null; + let i = elements.length; + while (lastElement === null && i > 0) { + lastElement = elements[--i]; + } + if (lastElement === null || lastElement.start > commentWS.start) { + setInnerComments(node, commentWS.comments); + } else { + setTrailingComments(lastElement, commentWS.comments); + } +} +class CommentsParser extends BaseParser { + addComment(comment) { + if (this.filename) comment.loc.filename = this.filename; + const { + commentsLen + } = this.state; + if (this.comments.length !== commentsLen) { + this.comments.length = commentsLen; + } + this.comments.push(comment); + this.state.commentsLen++; + } + processComment(node) { + const { + commentStack + } = this.state; + const commentStackLength = commentStack.length; + if (commentStackLength === 0) return; + let i = commentStackLength - 1; + const lastCommentWS = commentStack[i]; + if (lastCommentWS.start === node.end) { + lastCommentWS.leadingNode = node; + i--; + } + const { + start: nodeStart + } = node; + for (; i >= 0; i--) { + const commentWS = commentStack[i]; + const commentEnd = commentWS.end; + if (commentEnd > nodeStart) { + commentWS.containingNode = node; + this.finalizeComment(commentWS); + commentStack.splice(i, 1); + } else { + if (commentEnd === nodeStart) { + commentWS.trailingNode = node; + } + break; + } + } + } + finalizeComment(commentWS) { + const { + comments + } = commentWS; + if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) { + if (commentWS.leadingNode !== null) { + setTrailingComments(commentWS.leadingNode, comments); + } + if (commentWS.trailingNode !== null) { + setLeadingComments(commentWS.trailingNode, comments); + } + } else { + const { + containingNode: node, + start: commentStart + } = commentWS; + if (this.input.charCodeAt(this.offsetToSourcePos(commentStart) - 1) === 44) { + switch (node.type) { + case "ObjectExpression": + case "ObjectPattern": + case "RecordExpression": + adjustInnerComments(node, node.properties, commentWS); + break; + case "CallExpression": + case "OptionalCallExpression": + adjustInnerComments(node, node.arguments, commentWS); + break; + case "FunctionDeclaration": + case "FunctionExpression": + case "ArrowFunctionExpression": + case "ObjectMethod": + case "ClassMethod": + case "ClassPrivateMethod": + adjustInnerComments(node, node.params, commentWS); + break; + case "ArrayExpression": + case "ArrayPattern": + case "TupleExpression": + adjustInnerComments(node, node.elements, commentWS); + break; + case "ExportNamedDeclaration": + case "ImportDeclaration": + adjustInnerComments(node, node.specifiers, commentWS); + break; + case "TSEnumDeclaration": + { + adjustInnerComments(node, node.members, commentWS); + } + break; + case "TSEnumBody": + adjustInnerComments(node, node.members, commentWS); + break; + default: + { + setInnerComments(node, comments); + } + } + } else { + setInnerComments(node, comments); + } + } + } + finalizeRemainingComments() { + const { + commentStack + } = this.state; + for (let i = commentStack.length - 1; i >= 0; i--) { + this.finalizeComment(commentStack[i]); + } + this.state.commentStack = []; + } + resetPreviousNodeTrailingComments(node) { + const { + commentStack + } = this.state; + const { + length + } = commentStack; + if (length === 0) return; + const commentWS = commentStack[length - 1]; + if (commentWS.leadingNode === node) { + commentWS.leadingNode = null; + } + } + resetPreviousIdentifierLeadingComments(node) { + const { + commentStack + } = this.state; + const { + length + } = commentStack; + if (length === 0) return; + if (commentStack[length - 1].trailingNode === node) { + commentStack[length - 1].trailingNode = null; + } else if (length >= 2 && commentStack[length - 2].trailingNode === node) { + commentStack[length - 2].trailingNode = null; + } + } + takeSurroundingComments(node, start, end) { + const { + commentStack + } = this.state; + const commentStackLength = commentStack.length; + if (commentStackLength === 0) return; + let i = commentStackLength - 1; + for (; i >= 0; i--) { + const commentWS = commentStack[i]; + const commentEnd = commentWS.end; + const commentStart = commentWS.start; + if (commentStart === end) { + commentWS.leadingNode = node; + } else if (commentEnd === start) { + commentWS.trailingNode = node; + } else if (commentEnd < start) { + break; + } + } + } +} +const lineBreak = /\r\n|[\r\n\u2028\u2029]/; +const lineBreakG = new RegExp(lineBreak.source, "g"); +function isNewLine(code) { + switch (code) { + case 10: + case 13: + case 8232: + case 8233: + return true; + default: + return false; + } +} +function hasNewLine(input, start, end) { + for (let i = start; i < end; i++) { + if (isNewLine(input.charCodeAt(i))) { + return true; + } + } + return false; +} +const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; +const skipWhiteSpaceInLine = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g; +function isWhitespace(code) { + switch (code) { + case 0x0009: + case 0x000b: + case 0x000c: + case 32: + case 160: + case 5760: + case 0x2000: + case 0x2001: + case 0x2002: + case 0x2003: + case 0x2004: + case 0x2005: + case 0x2006: + case 0x2007: + case 0x2008: + case 0x2009: + case 0x200a: + case 0x202f: + case 0x205f: + case 0x3000: + case 0xfeff: + return true; + default: + return false; + } +} +class State { + constructor() { + this.flags = 1024; + this.startIndex = void 0; + this.curLine = void 0; + this.lineStart = void 0; + this.startLoc = void 0; + this.endLoc = void 0; + this.errors = []; + this.potentialArrowAt = -1; + this.noArrowAt = []; + this.noArrowParamsConversionAt = []; + this.topicContext = { + maxNumOfResolvableTopics: 0, + maxTopicIndex: null + }; + this.labels = []; + this.commentsLen = 0; + this.commentStack = []; + this.pos = 0; + this.type = 140; + this.value = null; + this.start = 0; + this.end = 0; + this.lastTokEndLoc = null; + this.lastTokStartLoc = null; + this.context = [types.brace]; + this.firstInvalidTemplateEscapePos = null; + this.strictErrors = new Map(); + this.tokensLength = 0; + } + get strict() { + return (this.flags & 1) > 0; + } + set strict(v) { + if (v) this.flags |= 1;else this.flags &= -2; + } + init({ + strictMode, + sourceType, + startIndex, + startLine, + startColumn + }) { + this.strict = strictMode === false ? false : strictMode === true ? true : sourceType === "module"; + this.startIndex = startIndex; + this.curLine = startLine; + this.lineStart = -startColumn; + this.startLoc = this.endLoc = new Position(startLine, startColumn, startIndex); + } + get maybeInArrowParameters() { + return (this.flags & 2) > 0; + } + set maybeInArrowParameters(v) { + if (v) this.flags |= 2;else this.flags &= -3; + } + get inType() { + return (this.flags & 4) > 0; + } + set inType(v) { + if (v) this.flags |= 4;else this.flags &= -5; + } + get noAnonFunctionType() { + return (this.flags & 8) > 0; + } + set noAnonFunctionType(v) { + if (v) this.flags |= 8;else this.flags &= -9; + } + get hasFlowComment() { + return (this.flags & 16) > 0; + } + set hasFlowComment(v) { + if (v) this.flags |= 16;else this.flags &= -17; + } + get isAmbientContext() { + return (this.flags & 32) > 0; + } + set isAmbientContext(v) { + if (v) this.flags |= 32;else this.flags &= -33; + } + get inAbstractClass() { + return (this.flags & 64) > 0; + } + set inAbstractClass(v) { + if (v) this.flags |= 64;else this.flags &= -65; + } + get inDisallowConditionalTypesContext() { + return (this.flags & 128) > 0; + } + set inDisallowConditionalTypesContext(v) { + if (v) this.flags |= 128;else this.flags &= -129; + } + get soloAwait() { + return (this.flags & 256) > 0; + } + set soloAwait(v) { + if (v) this.flags |= 256;else this.flags &= -257; + } + get inFSharpPipelineDirectBody() { + return (this.flags & 512) > 0; + } + set inFSharpPipelineDirectBody(v) { + if (v) this.flags |= 512;else this.flags &= -513; + } + get canStartJSXElement() { + return (this.flags & 1024) > 0; + } + set canStartJSXElement(v) { + if (v) this.flags |= 1024;else this.flags &= -1025; + } + get containsEsc() { + return (this.flags & 2048) > 0; + } + set containsEsc(v) { + if (v) this.flags |= 2048;else this.flags &= -2049; + } + get hasTopLevelAwait() { + return (this.flags & 4096) > 0; + } + set hasTopLevelAwait(v) { + if (v) this.flags |= 4096;else this.flags &= -4097; + } + curPosition() { + return new Position(this.curLine, this.pos - this.lineStart, this.pos + this.startIndex); + } + clone() { + const state = new State(); + state.flags = this.flags; + state.startIndex = this.startIndex; + state.curLine = this.curLine; + state.lineStart = this.lineStart; + state.startLoc = this.startLoc; + state.endLoc = this.endLoc; + state.errors = this.errors.slice(); + state.potentialArrowAt = this.potentialArrowAt; + state.noArrowAt = this.noArrowAt.slice(); + state.noArrowParamsConversionAt = this.noArrowParamsConversionAt.slice(); + state.topicContext = this.topicContext; + state.labels = this.labels.slice(); + state.commentsLen = this.commentsLen; + state.commentStack = this.commentStack.slice(); + state.pos = this.pos; + state.type = this.type; + state.value = this.value; + state.start = this.start; + state.end = this.end; + state.lastTokEndLoc = this.lastTokEndLoc; + state.lastTokStartLoc = this.lastTokStartLoc; + state.context = this.context.slice(); + state.firstInvalidTemplateEscapePos = this.firstInvalidTemplateEscapePos; + state.strictErrors = this.strictErrors; + state.tokensLength = this.tokensLength; + return state; + } +} +var _isDigit = function isDigit(code) { + return code >= 48 && code <= 57; +}; +const forbiddenNumericSeparatorSiblings = { + decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]), + hex: new Set([46, 88, 95, 120]) +}; +const isAllowedNumericSeparatorSibling = { + bin: ch => ch === 48 || ch === 49, + oct: ch => ch >= 48 && ch <= 55, + dec: ch => ch >= 48 && ch <= 57, + hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102 +}; +function readStringContents(type, input, pos, lineStart, curLine, errors) { + const initialPos = pos; + const initialLineStart = lineStart; + const initialCurLine = curLine; + let out = ""; + let firstInvalidLoc = null; + let chunkStart = pos; + const { + length + } = input; + for (;;) { + if (pos >= length) { + errors.unterminated(initialPos, initialLineStart, initialCurLine); + out += input.slice(chunkStart, pos); + break; + } + const ch = input.charCodeAt(pos); + if (isStringEnd(type, ch, input, pos)) { + out += input.slice(chunkStart, pos); + break; + } + if (ch === 92) { + out += input.slice(chunkStart, pos); + const res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors); + if (res.ch === null && !firstInvalidLoc) { + firstInvalidLoc = { + pos, + lineStart, + curLine + }; + } else { + out += res.ch; + } + ({ + pos, + lineStart, + curLine + } = res); + chunkStart = pos; + } else if (ch === 8232 || ch === 8233) { + ++pos; + ++curLine; + lineStart = pos; + } else if (ch === 10 || ch === 13) { + if (type === "template") { + out += input.slice(chunkStart, pos) + "\n"; + ++pos; + if (ch === 13 && input.charCodeAt(pos) === 10) { + ++pos; + } + ++curLine; + chunkStart = lineStart = pos; + } else { + errors.unterminated(initialPos, initialLineStart, initialCurLine); + } + } else { + ++pos; + } + } + return { + pos, + str: out, + firstInvalidLoc, + lineStart, + curLine, + containsInvalid: !!firstInvalidLoc + }; +} +function isStringEnd(type, ch, input, pos) { + if (type === "template") { + return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123; + } + return ch === (type === "double" ? 34 : 39); +} +function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) { + const throwOnInvalid = !inTemplate; + pos++; + const res = ch => ({ + pos, + ch, + lineStart, + curLine + }); + const ch = input.charCodeAt(pos++); + switch (ch) { + case 110: + return res("\n"); + case 114: + return res("\r"); + case 120: + { + let code; + ({ + code, + pos + } = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors)); + return res(code === null ? null : String.fromCharCode(code)); + } + case 117: + { + let code; + ({ + code, + pos + } = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors)); + return res(code === null ? null : String.fromCodePoint(code)); + } + case 116: + return res("\t"); + case 98: + return res("\b"); + case 118: + return res("\u000b"); + case 102: + return res("\f"); + case 13: + if (input.charCodeAt(pos) === 10) { + ++pos; + } + case 10: + lineStart = pos; + ++curLine; + case 8232: + case 8233: + return res(""); + case 56: + case 57: + if (inTemplate) { + return res(null); + } else { + errors.strictNumericEscape(pos - 1, lineStart, curLine); + } + default: + if (ch >= 48 && ch <= 55) { + const startPos = pos - 1; + const match = /^[0-7]+/.exec(input.slice(startPos, pos + 2)); + let octalStr = match[0]; + let octal = parseInt(octalStr, 8); + if (octal > 255) { + octalStr = octalStr.slice(0, -1); + octal = parseInt(octalStr, 8); + } + pos += octalStr.length - 1; + const next = input.charCodeAt(pos); + if (octalStr !== "0" || next === 56 || next === 57) { + if (inTemplate) { + return res(null); + } else { + errors.strictNumericEscape(startPos, lineStart, curLine); + } + } + return res(String.fromCharCode(octal)); + } + return res(String.fromCharCode(ch)); + } +} +function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) { + const initialPos = pos; + let n; + ({ + n, + pos + } = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid)); + if (n === null) { + if (throwOnInvalid) { + errors.invalidEscapeSequence(initialPos, lineStart, curLine); + } else { + pos = initialPos - 1; + } + } + return { + code: n, + pos + }; +} +function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) { + const start = pos; + const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct; + const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin; + let invalid = false; + let total = 0; + for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) { + const code = input.charCodeAt(pos); + let val; + if (code === 95 && allowNumSeparator !== "bail") { + const prev = input.charCodeAt(pos - 1); + const next = input.charCodeAt(pos + 1); + if (!allowNumSeparator) { + if (bailOnError) return { + n: null, + pos + }; + errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine); + } else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) { + if (bailOnError) return { + n: null, + pos + }; + errors.unexpectedNumericSeparator(pos, lineStart, curLine); + } + ++pos; + continue; + } + if (code >= 97) { + val = code - 97 + 10; + } else if (code >= 65) { + val = code - 65 + 10; + } else if (_isDigit(code)) { + val = code - 48; + } else { + val = Infinity; + } + if (val >= radix) { + if (val <= 9 && bailOnError) { + return { + n: null, + pos + }; + } else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) { + val = 0; + } else if (forceLen) { + val = 0; + invalid = true; + } else { + break; + } + } + ++pos; + total = total * radix + val; + } + if (pos === start || len != null && pos - start !== len || invalid) { + return { + n: null, + pos + }; + } + return { + n: total, + pos + }; +} +function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) { + const ch = input.charCodeAt(pos); + let code; + if (ch === 123) { + ++pos; + ({ + code, + pos + } = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors)); + ++pos; + if (code !== null && code > 0x10ffff) { + if (throwOnInvalid) { + errors.invalidCodePoint(pos, lineStart, curLine); + } else { + return { + code: null, + pos + }; + } + } + } else { + ({ + code, + pos + } = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors)); + } + return { + code, + pos + }; +} +function buildPosition(pos, lineStart, curLine) { + return new Position(curLine, pos - lineStart, pos); +} +const VALID_REGEX_FLAGS = new Set([103, 109, 115, 105, 121, 117, 100, 118]); +class Token { + constructor(state) { + const startIndex = state.startIndex || 0; + this.type = state.type; + this.value = state.value; + this.start = startIndex + state.start; + this.end = startIndex + state.end; + this.loc = new SourceLocation(state.startLoc, state.endLoc); + } +} +class Tokenizer extends CommentsParser { + constructor(options, input) { + super(); + this.isLookahead = void 0; + this.tokens = []; + this.errorHandlers_readInt = { + invalidDigit: (pos, lineStart, curLine, radix) => { + if (!(this.optionFlags & 1024)) return false; + this.raise(Errors.InvalidDigit, buildPosition(pos, lineStart, curLine), { + radix + }); + return true; + }, + numericSeparatorInEscapeSequence: this.errorBuilder(Errors.NumericSeparatorInEscapeSequence), + unexpectedNumericSeparator: this.errorBuilder(Errors.UnexpectedNumericSeparator) + }; + this.errorHandlers_readCodePoint = Object.assign({}, this.errorHandlers_readInt, { + invalidEscapeSequence: this.errorBuilder(Errors.InvalidEscapeSequence), + invalidCodePoint: this.errorBuilder(Errors.InvalidCodePoint) + }); + this.errorHandlers_readStringContents_string = Object.assign({}, this.errorHandlers_readCodePoint, { + strictNumericEscape: (pos, lineStart, curLine) => { + this.recordStrictModeErrors(Errors.StrictNumericEscape, buildPosition(pos, lineStart, curLine)); + }, + unterminated: (pos, lineStart, curLine) => { + throw this.raise(Errors.UnterminatedString, buildPosition(pos - 1, lineStart, curLine)); + } + }); + this.errorHandlers_readStringContents_template = Object.assign({}, this.errorHandlers_readCodePoint, { + strictNumericEscape: this.errorBuilder(Errors.StrictNumericEscape), + unterminated: (pos, lineStart, curLine) => { + throw this.raise(Errors.UnterminatedTemplate, buildPosition(pos, lineStart, curLine)); + } + }); + this.state = new State(); + this.state.init(options); + this.input = input; + this.length = input.length; + this.comments = []; + this.isLookahead = false; + } + pushToken(token) { + this.tokens.length = this.state.tokensLength; + this.tokens.push(token); + ++this.state.tokensLength; + } + next() { + this.checkKeywordEscapes(); + if (this.optionFlags & 128) { + this.pushToken(new Token(this.state)); + } + this.state.lastTokEndLoc = this.state.endLoc; + this.state.lastTokStartLoc = this.state.startLoc; + this.nextToken(); + } + eat(type) { + if (this.match(type)) { + this.next(); + return true; + } else { + return false; + } + } + match(type) { + return this.state.type === type; + } + createLookaheadState(state) { + return { + pos: state.pos, + value: null, + type: state.type, + start: state.start, + end: state.end, + context: [this.curContext()], + inType: state.inType, + startLoc: state.startLoc, + lastTokEndLoc: state.lastTokEndLoc, + curLine: state.curLine, + lineStart: state.lineStart, + curPosition: state.curPosition + }; + } + lookahead() { + const old = this.state; + this.state = this.createLookaheadState(old); + this.isLookahead = true; + this.nextToken(); + this.isLookahead = false; + const curr = this.state; + this.state = old; + return curr; + } + nextTokenStart() { + return this.nextTokenStartSince(this.state.pos); + } + nextTokenStartSince(pos) { + skipWhiteSpace.lastIndex = pos; + return skipWhiteSpace.test(this.input) ? skipWhiteSpace.lastIndex : pos; + } + lookaheadCharCode() { + return this.input.charCodeAt(this.nextTokenStart()); + } + nextTokenInLineStart() { + return this.nextTokenInLineStartSince(this.state.pos); + } + nextTokenInLineStartSince(pos) { + skipWhiteSpaceInLine.lastIndex = pos; + return skipWhiteSpaceInLine.test(this.input) ? skipWhiteSpaceInLine.lastIndex : pos; + } + lookaheadInLineCharCode() { + return this.input.charCodeAt(this.nextTokenInLineStart()); + } + codePointAtPos(pos) { + let cp = this.input.charCodeAt(pos); + if ((cp & 0xfc00) === 0xd800 && ++pos < this.input.length) { + const trail = this.input.charCodeAt(pos); + if ((trail & 0xfc00) === 0xdc00) { + cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff); + } + } + return cp; + } + setStrict(strict) { + this.state.strict = strict; + if (strict) { + this.state.strictErrors.forEach(([toParseError, at]) => this.raise(toParseError, at)); + this.state.strictErrors.clear(); + } + } + curContext() { + return this.state.context[this.state.context.length - 1]; + } + nextToken() { + this.skipSpace(); + this.state.start = this.state.pos; + if (!this.isLookahead) this.state.startLoc = this.state.curPosition(); + if (this.state.pos >= this.length) { + this.finishToken(140); + return; + } + this.getTokenFromCode(this.codePointAtPos(this.state.pos)); + } + skipBlockComment(commentEnd) { + let startLoc; + if (!this.isLookahead) startLoc = this.state.curPosition(); + const start = this.state.pos; + const end = this.input.indexOf(commentEnd, start + 2); + if (end === -1) { + throw this.raise(Errors.UnterminatedComment, this.state.curPosition()); + } + this.state.pos = end + commentEnd.length; + lineBreakG.lastIndex = start + 2; + while (lineBreakG.test(this.input) && lineBreakG.lastIndex <= end) { + ++this.state.curLine; + this.state.lineStart = lineBreakG.lastIndex; + } + if (this.isLookahead) return; + const comment = { + type: "CommentBlock", + value: this.input.slice(start + 2, end), + start: this.sourceToOffsetPos(start), + end: this.sourceToOffsetPos(end + commentEnd.length), + loc: new SourceLocation(startLoc, this.state.curPosition()) + }; + if (this.optionFlags & 128) this.pushToken(comment); + return comment; + } + skipLineComment(startSkip) { + const start = this.state.pos; + let startLoc; + if (!this.isLookahead) startLoc = this.state.curPosition(); + let ch = this.input.charCodeAt(this.state.pos += startSkip); + if (this.state.pos < this.length) { + while (!isNewLine(ch) && ++this.state.pos < this.length) { + ch = this.input.charCodeAt(this.state.pos); + } + } + if (this.isLookahead) return; + const end = this.state.pos; + const value = this.input.slice(start + startSkip, end); + const comment = { + type: "CommentLine", + value, + start: this.sourceToOffsetPos(start), + end: this.sourceToOffsetPos(end), + loc: new SourceLocation(startLoc, this.state.curPosition()) + }; + if (this.optionFlags & 128) this.pushToken(comment); + return comment; + } + skipSpace() { + const spaceStart = this.state.pos; + const comments = this.optionFlags & 2048 ? [] : null; + loop: while (this.state.pos < this.length) { + const ch = this.input.charCodeAt(this.state.pos); + switch (ch) { + case 32: + case 160: + case 9: + ++this.state.pos; + break; + case 13: + if (this.input.charCodeAt(this.state.pos + 1) === 10) { + ++this.state.pos; + } + case 10: + case 8232: + case 8233: + ++this.state.pos; + ++this.state.curLine; + this.state.lineStart = this.state.pos; + break; + case 47: + switch (this.input.charCodeAt(this.state.pos + 1)) { + case 42: + { + const comment = this.skipBlockComment("*/"); + if (comment !== undefined) { + this.addComment(comment); + comments == null || comments.push(comment); + } + break; + } + case 47: + { + const comment = this.skipLineComment(2); + if (comment !== undefined) { + this.addComment(comment); + comments == null || comments.push(comment); + } + break; + } + default: + break loop; + } + break; + default: + if (isWhitespace(ch)) { + ++this.state.pos; + } else if (ch === 45 && !this.inModule && this.optionFlags & 4096) { + const pos = this.state.pos; + if (this.input.charCodeAt(pos + 1) === 45 && this.input.charCodeAt(pos + 2) === 62 && (spaceStart === 0 || this.state.lineStart > spaceStart)) { + const comment = this.skipLineComment(3); + if (comment !== undefined) { + this.addComment(comment); + comments == null || comments.push(comment); + } + } else { + break loop; + } + } else if (ch === 60 && !this.inModule && this.optionFlags & 4096) { + const pos = this.state.pos; + if (this.input.charCodeAt(pos + 1) === 33 && this.input.charCodeAt(pos + 2) === 45 && this.input.charCodeAt(pos + 3) === 45) { + const comment = this.skipLineComment(4); + if (comment !== undefined) { + this.addComment(comment); + comments == null || comments.push(comment); + } + } else { + break loop; + } + } else { + break loop; + } + } + } + if ((comments == null ? void 0 : comments.length) > 0) { + const end = this.state.pos; + const commentWhitespace = { + start: this.sourceToOffsetPos(spaceStart), + end: this.sourceToOffsetPos(end), + comments, + leadingNode: null, + trailingNode: null, + containingNode: null + }; + this.state.commentStack.push(commentWhitespace); + } + } + finishToken(type, val) { + this.state.end = this.state.pos; + this.state.endLoc = this.state.curPosition(); + const prevType = this.state.type; + this.state.type = type; + this.state.value = val; + if (!this.isLookahead) { + this.updateContext(prevType); + } + } + replaceToken(type) { + this.state.type = type; + this.updateContext(); + } + readToken_numberSign() { + if (this.state.pos === 0 && this.readToken_interpreter()) { + return; + } + const nextPos = this.state.pos + 1; + const next = this.codePointAtPos(nextPos); + if (next >= 48 && next <= 57) { + throw this.raise(Errors.UnexpectedDigitAfterHash, this.state.curPosition()); + } + if (next === 123 || next === 91 && this.hasPlugin("recordAndTuple")) { + this.expectPlugin("recordAndTuple"); + if (this.getPluginOption("recordAndTuple", "syntaxType") === "bar") { + throw this.raise(next === 123 ? Errors.RecordExpressionHashIncorrectStartSyntaxType : Errors.TupleExpressionHashIncorrectStartSyntaxType, this.state.curPosition()); + } + this.state.pos += 2; + if (next === 123) { + this.finishToken(7); + } else { + this.finishToken(1); + } + } else if (isIdentifierStart(next)) { + ++this.state.pos; + this.finishToken(139, this.readWord1(next)); + } else if (next === 92) { + ++this.state.pos; + this.finishToken(139, this.readWord1()); + } else { + this.finishOp(27, 1); + } + } + readToken_dot() { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next >= 48 && next <= 57) { + this.readNumber(true); + return; + } + if (next === 46 && this.input.charCodeAt(this.state.pos + 2) === 46) { + this.state.pos += 3; + this.finishToken(21); + } else { + ++this.state.pos; + this.finishToken(16); + } + } + readToken_slash() { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === 61) { + this.finishOp(31, 2); + } else { + this.finishOp(56, 1); + } + } + readToken_interpreter() { + if (this.state.pos !== 0 || this.length < 2) return false; + let ch = this.input.charCodeAt(this.state.pos + 1); + if (ch !== 33) return false; + const start = this.state.pos; + this.state.pos += 1; + while (!isNewLine(ch) && ++this.state.pos < this.length) { + ch = this.input.charCodeAt(this.state.pos); + } + const value = this.input.slice(start + 2, this.state.pos); + this.finishToken(28, value); + return true; + } + readToken_mult_modulo(code) { + let type = code === 42 ? 55 : 54; + let width = 1; + let next = this.input.charCodeAt(this.state.pos + 1); + if (code === 42 && next === 42) { + width++; + next = this.input.charCodeAt(this.state.pos + 2); + type = 57; + } + if (next === 61 && !this.state.inType) { + width++; + type = code === 37 ? 33 : 30; + } + this.finishOp(type, width); + } + readToken_pipe_amp(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === code) { + if (this.input.charCodeAt(this.state.pos + 2) === 61) { + this.finishOp(30, 3); + } else { + this.finishOp(code === 124 ? 41 : 42, 2); + } + return; + } + if (code === 124) { + if (next === 62) { + this.finishOp(39, 2); + return; + } + if (this.hasPlugin("recordAndTuple") && next === 125) { + if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { + throw this.raise(Errors.RecordExpressionBarIncorrectEndSyntaxType, this.state.curPosition()); + } + this.state.pos += 2; + this.finishToken(9); + return; + } + if (this.hasPlugin("recordAndTuple") && next === 93) { + if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { + throw this.raise(Errors.TupleExpressionBarIncorrectEndSyntaxType, this.state.curPosition()); + } + this.state.pos += 2; + this.finishToken(4); + return; + } + } + if (next === 61) { + this.finishOp(30, 2); + return; + } + this.finishOp(code === 124 ? 43 : 45, 1); + } + readToken_caret() { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === 61 && !this.state.inType) { + this.finishOp(32, 2); + } else if (next === 94 && this.hasPlugin(["pipelineOperator", { + proposal: "hack", + topicToken: "^^" + }])) { + this.finishOp(37, 2); + const lookaheadCh = this.input.codePointAt(this.state.pos); + if (lookaheadCh === 94) { + this.unexpected(); + } + } else { + this.finishOp(44, 1); + } + } + readToken_atSign() { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === 64 && this.hasPlugin(["pipelineOperator", { + proposal: "hack", + topicToken: "@@" + }])) { + this.finishOp(38, 2); + } else { + this.finishOp(26, 1); + } + } + readToken_plus_min(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === code) { + this.finishOp(34, 2); + return; + } + if (next === 61) { + this.finishOp(30, 2); + } else { + this.finishOp(53, 1); + } + } + readToken_lt() { + const { + pos + } = this.state; + const next = this.input.charCodeAt(pos + 1); + if (next === 60) { + if (this.input.charCodeAt(pos + 2) === 61) { + this.finishOp(30, 3); + return; + } + this.finishOp(51, 2); + return; + } + if (next === 61) { + this.finishOp(49, 2); + return; + } + this.finishOp(47, 1); + } + readToken_gt() { + const { + pos + } = this.state; + const next = this.input.charCodeAt(pos + 1); + if (next === 62) { + const size = this.input.charCodeAt(pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(pos + size) === 61) { + this.finishOp(30, size + 1); + return; + } + this.finishOp(52, size); + return; + } + if (next === 61) { + this.finishOp(49, 2); + return; + } + this.finishOp(48, 1); + } + readToken_eq_excl(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === 61) { + this.finishOp(46, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2); + return; + } + if (code === 61 && next === 62) { + this.state.pos += 2; + this.finishToken(19); + return; + } + this.finishOp(code === 61 ? 29 : 35, 1); + } + readToken_question() { + const next = this.input.charCodeAt(this.state.pos + 1); + const next2 = this.input.charCodeAt(this.state.pos + 2); + if (next === 63) { + if (next2 === 61) { + this.finishOp(30, 3); + } else { + this.finishOp(40, 2); + } + } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) { + this.state.pos += 2; + this.finishToken(18); + } else { + ++this.state.pos; + this.finishToken(17); + } + } + getTokenFromCode(code) { + switch (code) { + case 46: + this.readToken_dot(); + return; + case 40: + ++this.state.pos; + this.finishToken(10); + return; + case 41: + ++this.state.pos; + this.finishToken(11); + return; + case 59: + ++this.state.pos; + this.finishToken(13); + return; + case 44: + ++this.state.pos; + this.finishToken(12); + return; + case 91: + if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) { + if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { + throw this.raise(Errors.TupleExpressionBarIncorrectStartSyntaxType, this.state.curPosition()); + } + this.state.pos += 2; + this.finishToken(2); + } else { + ++this.state.pos; + this.finishToken(0); + } + return; + case 93: + ++this.state.pos; + this.finishToken(3); + return; + case 123: + if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) { + if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { + throw this.raise(Errors.RecordExpressionBarIncorrectStartSyntaxType, this.state.curPosition()); + } + this.state.pos += 2; + this.finishToken(6); + } else { + ++this.state.pos; + this.finishToken(5); + } + return; + case 125: + ++this.state.pos; + this.finishToken(8); + return; + case 58: + if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) { + this.finishOp(15, 2); + } else { + ++this.state.pos; + this.finishToken(14); + } + return; + case 63: + this.readToken_question(); + return; + case 96: + this.readTemplateToken(); + return; + case 48: + { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === 120 || next === 88) { + this.readRadixNumber(16); + return; + } + if (next === 111 || next === 79) { + this.readRadixNumber(8); + return; + } + if (next === 98 || next === 66) { + this.readRadixNumber(2); + return; + } + } + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + this.readNumber(false); + return; + case 34: + case 39: + this.readString(code); + return; + case 47: + this.readToken_slash(); + return; + case 37: + case 42: + this.readToken_mult_modulo(code); + return; + case 124: + case 38: + this.readToken_pipe_amp(code); + return; + case 94: + this.readToken_caret(); + return; + case 43: + case 45: + this.readToken_plus_min(code); + return; + case 60: + this.readToken_lt(); + return; + case 62: + this.readToken_gt(); + return; + case 61: + case 33: + this.readToken_eq_excl(code); + return; + case 126: + this.finishOp(36, 1); + return; + case 64: + this.readToken_atSign(); + return; + case 35: + this.readToken_numberSign(); + return; + case 92: + this.readWord(); + return; + default: + if (isIdentifierStart(code)) { + this.readWord(code); + return; + } + } + throw this.raise(Errors.InvalidOrUnexpectedToken, this.state.curPosition(), { + unexpected: String.fromCodePoint(code) + }); + } + finishOp(type, size) { + const str = this.input.slice(this.state.pos, this.state.pos + size); + this.state.pos += size; + this.finishToken(type, str); + } + readRegexp() { + const startLoc = this.state.startLoc; + const start = this.state.start + 1; + let escaped, inClass; + let { + pos + } = this.state; + for (;; ++pos) { + if (pos >= this.length) { + throw this.raise(Errors.UnterminatedRegExp, createPositionWithColumnOffset(startLoc, 1)); + } + const ch = this.input.charCodeAt(pos); + if (isNewLine(ch)) { + throw this.raise(Errors.UnterminatedRegExp, createPositionWithColumnOffset(startLoc, 1)); + } + if (escaped) { + escaped = false; + } else { + if (ch === 91) { + inClass = true; + } else if (ch === 93 && inClass) { + inClass = false; + } else if (ch === 47 && !inClass) { + break; + } + escaped = ch === 92; + } + } + const content = this.input.slice(start, pos); + ++pos; + let mods = ""; + const nextPos = () => createPositionWithColumnOffset(startLoc, pos + 2 - start); + while (pos < this.length) { + const cp = this.codePointAtPos(pos); + const char = String.fromCharCode(cp); + if (VALID_REGEX_FLAGS.has(cp)) { + if (cp === 118) { + if (mods.includes("u")) { + this.raise(Errors.IncompatibleRegExpUVFlags, nextPos()); + } + } else if (cp === 117) { + if (mods.includes("v")) { + this.raise(Errors.IncompatibleRegExpUVFlags, nextPos()); + } + } + if (mods.includes(char)) { + this.raise(Errors.DuplicateRegExpFlags, nextPos()); + } + } else if (isIdentifierChar(cp) || cp === 92) { + this.raise(Errors.MalformedRegExpFlags, nextPos()); + } else { + break; + } + ++pos; + mods += char; + } + this.state.pos = pos; + this.finishToken(138, { + pattern: content, + flags: mods + }); + } + readInt(radix, len, forceLen = false, allowNumSeparator = true) { + const { + n, + pos + } = readInt(this.input, this.state.pos, this.state.lineStart, this.state.curLine, radix, len, forceLen, allowNumSeparator, this.errorHandlers_readInt, false); + this.state.pos = pos; + return n; + } + readRadixNumber(radix) { + const start = this.state.pos; + const startLoc = this.state.curPosition(); + let isBigInt = false; + this.state.pos += 2; + const val = this.readInt(radix); + if (val == null) { + this.raise(Errors.InvalidDigit, createPositionWithColumnOffset(startLoc, 2), { + radix + }); + } + const next = this.input.charCodeAt(this.state.pos); + if (next === 110) { + ++this.state.pos; + isBigInt = true; + } else if (next === 109) { + throw this.raise(Errors.InvalidDecimal, startLoc); + } + if (isIdentifierStart(this.codePointAtPos(this.state.pos))) { + throw this.raise(Errors.NumberIdentifier, this.state.curPosition()); + } + if (isBigInt) { + const str = this.input.slice(start, this.state.pos).replace(/[_n]/g, ""); + this.finishToken(136, str); + return; + } + this.finishToken(135, val); + } + readNumber(startsWithDot) { + const start = this.state.pos; + const startLoc = this.state.curPosition(); + let isFloat = false; + let isBigInt = false; + let hasExponent = false; + let isOctal = false; + if (!startsWithDot && this.readInt(10) === null) { + this.raise(Errors.InvalidNumber, this.state.curPosition()); + } + const hasLeadingZero = this.state.pos - start >= 2 && this.input.charCodeAt(start) === 48; + if (hasLeadingZero) { + const integer = this.input.slice(start, this.state.pos); + this.recordStrictModeErrors(Errors.StrictOctalLiteral, startLoc); + if (!this.state.strict) { + const underscorePos = integer.indexOf("_"); + if (underscorePos > 0) { + this.raise(Errors.ZeroDigitNumericSeparator, createPositionWithColumnOffset(startLoc, underscorePos)); + } + } + isOctal = hasLeadingZero && !/[89]/.test(integer); + } + let next = this.input.charCodeAt(this.state.pos); + if (next === 46 && !isOctal) { + ++this.state.pos; + this.readInt(10); + isFloat = true; + next = this.input.charCodeAt(this.state.pos); + } + if ((next === 69 || next === 101) && !isOctal) { + next = this.input.charCodeAt(++this.state.pos); + if (next === 43 || next === 45) { + ++this.state.pos; + } + if (this.readInt(10) === null) { + this.raise(Errors.InvalidOrMissingExponent, startLoc); + } + isFloat = true; + hasExponent = true; + next = this.input.charCodeAt(this.state.pos); + } + if (next === 110) { + if (isFloat || hasLeadingZero) { + this.raise(Errors.InvalidBigIntLiteral, startLoc); + } + ++this.state.pos; + isBigInt = true; + } + if (next === 109) { + this.expectPlugin("decimal", this.state.curPosition()); + if (hasExponent || hasLeadingZero) { + this.raise(Errors.InvalidDecimal, startLoc); + } + ++this.state.pos; + var isDecimal = true; + } + if (isIdentifierStart(this.codePointAtPos(this.state.pos))) { + throw this.raise(Errors.NumberIdentifier, this.state.curPosition()); + } + const str = this.input.slice(start, this.state.pos).replace(/[_mn]/g, ""); + if (isBigInt) { + this.finishToken(136, str); + return; + } + if (isDecimal) { + this.finishToken(137, str); + return; + } + const val = isOctal ? parseInt(str, 8) : parseFloat(str); + this.finishToken(135, val); + } + readCodePoint(throwOnInvalid) { + const { + code, + pos + } = readCodePoint(this.input, this.state.pos, this.state.lineStart, this.state.curLine, throwOnInvalid, this.errorHandlers_readCodePoint); + this.state.pos = pos; + return code; + } + readString(quote) { + const { + str, + pos, + curLine, + lineStart + } = readStringContents(quote === 34 ? "double" : "single", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_string); + this.state.pos = pos + 1; + this.state.lineStart = lineStart; + this.state.curLine = curLine; + this.finishToken(134, str); + } + readTemplateContinuation() { + if (!this.match(8)) { + this.unexpected(null, 8); + } + this.state.pos--; + this.readTemplateToken(); + } + readTemplateToken() { + const opening = this.input[this.state.pos]; + const { + str, + firstInvalidLoc, + pos, + curLine, + lineStart + } = readStringContents("template", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_template); + this.state.pos = pos + 1; + this.state.lineStart = lineStart; + this.state.curLine = curLine; + if (firstInvalidLoc) { + this.state.firstInvalidTemplateEscapePos = new Position(firstInvalidLoc.curLine, firstInvalidLoc.pos - firstInvalidLoc.lineStart, this.sourceToOffsetPos(firstInvalidLoc.pos)); + } + if (this.input.codePointAt(pos) === 96) { + this.finishToken(24, firstInvalidLoc ? null : opening + str + "`"); + } else { + this.state.pos++; + this.finishToken(25, firstInvalidLoc ? null : opening + str + "${"); + } + } + recordStrictModeErrors(toParseError, at) { + const index = at.index; + if (this.state.strict && !this.state.strictErrors.has(index)) { + this.raise(toParseError, at); + } else { + this.state.strictErrors.set(index, [toParseError, at]); + } + } + readWord1(firstCode) { + this.state.containsEsc = false; + let word = ""; + const start = this.state.pos; + let chunkStart = this.state.pos; + if (firstCode !== undefined) { + this.state.pos += firstCode <= 0xffff ? 1 : 2; + } + while (this.state.pos < this.length) { + const ch = this.codePointAtPos(this.state.pos); + if (isIdentifierChar(ch)) { + this.state.pos += ch <= 0xffff ? 1 : 2; + } else if (ch === 92) { + this.state.containsEsc = true; + word += this.input.slice(chunkStart, this.state.pos); + const escStart = this.state.curPosition(); + const identifierCheck = this.state.pos === start ? isIdentifierStart : isIdentifierChar; + if (this.input.charCodeAt(++this.state.pos) !== 117) { + this.raise(Errors.MissingUnicodeEscape, this.state.curPosition()); + chunkStart = this.state.pos - 1; + continue; + } + ++this.state.pos; + const esc = this.readCodePoint(true); + if (esc !== null) { + if (!identifierCheck(esc)) { + this.raise(Errors.EscapedCharNotAnIdentifier, escStart); + } + word += String.fromCodePoint(esc); + } + chunkStart = this.state.pos; + } else { + break; + } + } + return word + this.input.slice(chunkStart, this.state.pos); + } + readWord(firstCode) { + const word = this.readWord1(firstCode); + const type = keywords$1.get(word); + if (type !== undefined) { + this.finishToken(type, tokenLabelName(type)); + } else { + this.finishToken(132, word); + } + } + checkKeywordEscapes() { + const { + type + } = this.state; + if (tokenIsKeyword(type) && this.state.containsEsc) { + this.raise(Errors.InvalidEscapedReservedWord, this.state.startLoc, { + reservedWord: tokenLabelName(type) + }); + } + } + raise(toParseError, at, details = {}) { + const loc = at instanceof Position ? at : at.loc.start; + const error = toParseError(loc, details); + if (!(this.optionFlags & 1024)) throw error; + if (!this.isLookahead) this.state.errors.push(error); + return error; + } + raiseOverwrite(toParseError, at, details = {}) { + const loc = at instanceof Position ? at : at.loc.start; + const pos = loc.index; + const errors = this.state.errors; + for (let i = errors.length - 1; i >= 0; i--) { + const error = errors[i]; + if (error.loc.index === pos) { + return errors[i] = toParseError(loc, details); + } + if (error.loc.index < pos) break; + } + return this.raise(toParseError, at, details); + } + updateContext(prevType) {} + unexpected(loc, type) { + throw this.raise(Errors.UnexpectedToken, loc != null ? loc : this.state.startLoc, { + expected: type ? tokenLabelName(type) : null + }); + } + expectPlugin(pluginName, loc) { + if (this.hasPlugin(pluginName)) { + return true; + } + throw this.raise(Errors.MissingPlugin, loc != null ? loc : this.state.startLoc, { + missingPlugin: [pluginName] + }); + } + expectOnePlugin(pluginNames) { + if (!pluginNames.some(name => this.hasPlugin(name))) { + throw this.raise(Errors.MissingOneOfPlugins, this.state.startLoc, { + missingPlugin: pluginNames + }); + } + } + errorBuilder(error) { + return (pos, lineStart, curLine) => { + this.raise(error, buildPosition(pos, lineStart, curLine)); + }; + } +} +class ClassScope { + constructor() { + this.privateNames = new Set(); + this.loneAccessors = new Map(); + this.undefinedPrivateNames = new Map(); + } +} +class ClassScopeHandler { + constructor(parser) { + this.parser = void 0; + this.stack = []; + this.undefinedPrivateNames = new Map(); + this.parser = parser; + } + current() { + return this.stack[this.stack.length - 1]; + } + enter() { + this.stack.push(new ClassScope()); + } + exit() { + const oldClassScope = this.stack.pop(); + const current = this.current(); + for (const [name, loc] of Array.from(oldClassScope.undefinedPrivateNames)) { + if (current) { + if (!current.undefinedPrivateNames.has(name)) { + current.undefinedPrivateNames.set(name, loc); + } + } else { + this.parser.raise(Errors.InvalidPrivateFieldResolution, loc, { + identifierName: name + }); + } + } + } + declarePrivateName(name, elementType, loc) { + const { + privateNames, + loneAccessors, + undefinedPrivateNames + } = this.current(); + let redefined = privateNames.has(name); + if (elementType & 3) { + const accessor = redefined && loneAccessors.get(name); + if (accessor) { + const oldStatic = accessor & 4; + const newStatic = elementType & 4; + const oldKind = accessor & 3; + const newKind = elementType & 3; + redefined = oldKind === newKind || oldStatic !== newStatic; + if (!redefined) loneAccessors.delete(name); + } else if (!redefined) { + loneAccessors.set(name, elementType); + } + } + if (redefined) { + this.parser.raise(Errors.PrivateNameRedeclaration, loc, { + identifierName: name + }); + } + privateNames.add(name); + undefinedPrivateNames.delete(name); + } + usePrivateName(name, loc) { + let classScope; + for (classScope of this.stack) { + if (classScope.privateNames.has(name)) return; + } + if (classScope) { + classScope.undefinedPrivateNames.set(name, loc); + } else { + this.parser.raise(Errors.InvalidPrivateFieldResolution, loc, { + identifierName: name + }); + } + } +} +class ExpressionScope { + constructor(type = 0) { + this.type = type; + } + canBeArrowParameterDeclaration() { + return this.type === 2 || this.type === 1; + } + isCertainlyParameterDeclaration() { + return this.type === 3; + } +} +class ArrowHeadParsingScope extends ExpressionScope { + constructor(type) { + super(type); + this.declarationErrors = new Map(); + } + recordDeclarationError(ParsingErrorClass, at) { + const index = at.index; + this.declarationErrors.set(index, [ParsingErrorClass, at]); + } + clearDeclarationError(index) { + this.declarationErrors.delete(index); + } + iterateErrors(iterator) { + this.declarationErrors.forEach(iterator); + } +} +class ExpressionScopeHandler { + constructor(parser) { + this.parser = void 0; + this.stack = [new ExpressionScope()]; + this.parser = parser; + } + enter(scope) { + this.stack.push(scope); + } + exit() { + this.stack.pop(); + } + recordParameterInitializerError(toParseError, node) { + const origin = node.loc.start; + const { + stack + } = this; + let i = stack.length - 1; + let scope = stack[i]; + while (!scope.isCertainlyParameterDeclaration()) { + if (scope.canBeArrowParameterDeclaration()) { + scope.recordDeclarationError(toParseError, origin); + } else { + return; + } + scope = stack[--i]; + } + this.parser.raise(toParseError, origin); + } + recordArrowParameterBindingError(error, node) { + const { + stack + } = this; + const scope = stack[stack.length - 1]; + const origin = node.loc.start; + if (scope.isCertainlyParameterDeclaration()) { + this.parser.raise(error, origin); + } else if (scope.canBeArrowParameterDeclaration()) { + scope.recordDeclarationError(error, origin); + } else { + return; + } + } + recordAsyncArrowParametersError(at) { + const { + stack + } = this; + let i = stack.length - 1; + let scope = stack[i]; + while (scope.canBeArrowParameterDeclaration()) { + if (scope.type === 2) { + scope.recordDeclarationError(Errors.AwaitBindingIdentifier, at); + } + scope = stack[--i]; + } + } + validateAsPattern() { + const { + stack + } = this; + const currentScope = stack[stack.length - 1]; + if (!currentScope.canBeArrowParameterDeclaration()) return; + currentScope.iterateErrors(([toParseError, loc]) => { + this.parser.raise(toParseError, loc); + let i = stack.length - 2; + let scope = stack[i]; + while (scope.canBeArrowParameterDeclaration()) { + scope.clearDeclarationError(loc.index); + scope = stack[--i]; + } + }); + } +} +function newParameterDeclarationScope() { + return new ExpressionScope(3); +} +function newArrowHeadScope() { + return new ArrowHeadParsingScope(1); +} +function newAsyncArrowScope() { + return new ArrowHeadParsingScope(2); +} +function newExpressionScope() { + return new ExpressionScope(); +} +class ProductionParameterHandler { + constructor() { + this.stacks = []; + } + enter(flags) { + this.stacks.push(flags); + } + exit() { + this.stacks.pop(); + } + currentFlags() { + return this.stacks[this.stacks.length - 1]; + } + get hasAwait() { + return (this.currentFlags() & 2) > 0; + } + get hasYield() { + return (this.currentFlags() & 1) > 0; + } + get hasReturn() { + return (this.currentFlags() & 4) > 0; + } + get hasIn() { + return (this.currentFlags() & 8) > 0; + } +} +function functionFlags(isAsync, isGenerator) { + return (isAsync ? 2 : 0) | (isGenerator ? 1 : 0); +} +class UtilParser extends Tokenizer { + addExtra(node, key, value, enumerable = true) { + if (!node) return; + let { + extra + } = node; + if (extra == null) { + extra = {}; + node.extra = extra; + } + if (enumerable) { + extra[key] = value; + } else { + Object.defineProperty(extra, key, { + enumerable, + value + }); + } + } + isContextual(token) { + return this.state.type === token && !this.state.containsEsc; + } + isUnparsedContextual(nameStart, name) { + const nameEnd = nameStart + name.length; + if (this.input.slice(nameStart, nameEnd) === name) { + const nextCh = this.input.charCodeAt(nameEnd); + return !(isIdentifierChar(nextCh) || (nextCh & 0xfc00) === 0xd800); + } + return false; + } + isLookaheadContextual(name) { + const next = this.nextTokenStart(); + return this.isUnparsedContextual(next, name); + } + eatContextual(token) { + if (this.isContextual(token)) { + this.next(); + return true; + } + return false; + } + expectContextual(token, toParseError) { + if (!this.eatContextual(token)) { + if (toParseError != null) { + throw this.raise(toParseError, this.state.startLoc); + } + this.unexpected(null, token); + } + } + canInsertSemicolon() { + return this.match(140) || this.match(8) || this.hasPrecedingLineBreak(); + } + hasPrecedingLineBreak() { + return hasNewLine(this.input, this.offsetToSourcePos(this.state.lastTokEndLoc.index), this.state.start); + } + hasFollowingLineBreak() { + return hasNewLine(this.input, this.state.end, this.nextTokenStart()); + } + isLineTerminator() { + return this.eat(13) || this.canInsertSemicolon(); + } + semicolon(allowAsi = true) { + if (allowAsi ? this.isLineTerminator() : this.eat(13)) return; + this.raise(Errors.MissingSemicolon, this.state.lastTokEndLoc); + } + expect(type, loc) { + if (!this.eat(type)) { + this.unexpected(loc, type); + } + } + tryParse(fn, oldState = this.state.clone()) { + const abortSignal = { + node: null + }; + try { + const node = fn((node = null) => { + abortSignal.node = node; + throw abortSignal; + }); + if (this.state.errors.length > oldState.errors.length) { + const failState = this.state; + this.state = oldState; + this.state.tokensLength = failState.tokensLength; + return { + node, + error: failState.errors[oldState.errors.length], + thrown: false, + aborted: false, + failState + }; + } + return { + node, + error: null, + thrown: false, + aborted: false, + failState: null + }; + } catch (error) { + const failState = this.state; + this.state = oldState; + if (error instanceof SyntaxError) { + return { + node: null, + error, + thrown: true, + aborted: false, + failState + }; + } + if (error === abortSignal) { + return { + node: abortSignal.node, + error: null, + thrown: false, + aborted: true, + failState + }; + } + throw error; + } + } + checkExpressionErrors(refExpressionErrors, andThrow) { + if (!refExpressionErrors) return false; + const { + shorthandAssignLoc, + doubleProtoLoc, + privateKeyLoc, + optionalParametersLoc + } = refExpressionErrors; + const hasErrors = !!shorthandAssignLoc || !!doubleProtoLoc || !!optionalParametersLoc || !!privateKeyLoc; + if (!andThrow) { + return hasErrors; + } + if (shorthandAssignLoc != null) { + this.raise(Errors.InvalidCoverInitializedName, shorthandAssignLoc); + } + if (doubleProtoLoc != null) { + this.raise(Errors.DuplicateProto, doubleProtoLoc); + } + if (privateKeyLoc != null) { + this.raise(Errors.UnexpectedPrivateField, privateKeyLoc); + } + if (optionalParametersLoc != null) { + this.unexpected(optionalParametersLoc); + } + } + isLiteralPropertyName() { + return tokenIsLiteralPropertyName(this.state.type); + } + isPrivateName(node) { + return node.type === "PrivateName"; + } + getPrivateNameSV(node) { + return node.id.name; + } + hasPropertyAsPrivateName(node) { + return (node.type === "MemberExpression" || node.type === "OptionalMemberExpression") && this.isPrivateName(node.property); + } + isObjectProperty(node) { + return node.type === "ObjectProperty"; + } + isObjectMethod(node) { + return node.type === "ObjectMethod"; + } + initializeScopes(inModule = this.options.sourceType === "module") { + const oldLabels = this.state.labels; + this.state.labels = []; + const oldExportedIdentifiers = this.exportedIdentifiers; + this.exportedIdentifiers = new Set(); + const oldInModule = this.inModule; + this.inModule = inModule; + const oldScope = this.scope; + const ScopeHandler = this.getScopeHandler(); + this.scope = new ScopeHandler(this, inModule); + const oldProdParam = this.prodParam; + this.prodParam = new ProductionParameterHandler(); + const oldClassScope = this.classScope; + this.classScope = new ClassScopeHandler(this); + const oldExpressionScope = this.expressionScope; + this.expressionScope = new ExpressionScopeHandler(this); + return () => { + this.state.labels = oldLabels; + this.exportedIdentifiers = oldExportedIdentifiers; + this.inModule = oldInModule; + this.scope = oldScope; + this.prodParam = oldProdParam; + this.classScope = oldClassScope; + this.expressionScope = oldExpressionScope; + }; + } + enterInitialScopes() { + let paramFlags = 0; + if (this.inModule) { + paramFlags |= 2; + } + this.scope.enter(1); + this.prodParam.enter(paramFlags); + } + checkDestructuringPrivate(refExpressionErrors) { + const { + privateKeyLoc + } = refExpressionErrors; + if (privateKeyLoc !== null) { + this.expectPlugin("destructuringPrivate", privateKeyLoc); + } + } +} +class ExpressionErrors { + constructor() { + this.shorthandAssignLoc = null; + this.doubleProtoLoc = null; + this.privateKeyLoc = null; + this.optionalParametersLoc = null; + } +} +class Node { + constructor(parser, pos, loc) { + this.type = ""; + this.start = pos; + this.end = 0; + this.loc = new SourceLocation(loc); + if ((parser == null ? void 0 : parser.optionFlags) & 64) this.range = [pos, 0]; + if (parser != null && parser.filename) this.loc.filename = parser.filename; + } +} +const NodePrototype = Node.prototype; +{ + NodePrototype.__clone = function () { + const newNode = new Node(undefined, this.start, this.loc.start); + const keys = Object.keys(this); + for (let i = 0, length = keys.length; i < length; i++) { + const key = keys[i]; + if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") { + newNode[key] = this[key]; + } + } + return newNode; + }; +} +function clonePlaceholder(node) { + return cloneIdentifier(node); +} +function cloneIdentifier(node) { + const { + type, + start, + end, + loc, + range, + extra, + name + } = node; + const cloned = Object.create(NodePrototype); + cloned.type = type; + cloned.start = start; + cloned.end = end; + cloned.loc = loc; + cloned.range = range; + cloned.extra = extra; + cloned.name = name; + if (type === "Placeholder") { + cloned.expectedNode = node.expectedNode; + } + return cloned; +} +function cloneStringLiteral(node) { + const { + type, + start, + end, + loc, + range, + extra + } = node; + if (type === "Placeholder") { + return clonePlaceholder(node); + } + const cloned = Object.create(NodePrototype); + cloned.type = type; + cloned.start = start; + cloned.end = end; + cloned.loc = loc; + cloned.range = range; + if (node.raw !== undefined) { + cloned.raw = node.raw; + } else { + cloned.extra = extra; + } + cloned.value = node.value; + return cloned; +} +class NodeUtils extends UtilParser { + startNode() { + const loc = this.state.startLoc; + return new Node(this, loc.index, loc); + } + startNodeAt(loc) { + return new Node(this, loc.index, loc); + } + startNodeAtNode(type) { + return this.startNodeAt(type.loc.start); + } + finishNode(node, type) { + return this.finishNodeAt(node, type, this.state.lastTokEndLoc); + } + finishNodeAt(node, type, endLoc) { + node.type = type; + node.end = endLoc.index; + node.loc.end = endLoc; + if (this.optionFlags & 64) node.range[1] = endLoc.index; + if (this.optionFlags & 2048) { + this.processComment(node); + } + return node; + } + resetStartLocation(node, startLoc) { + node.start = startLoc.index; + node.loc.start = startLoc; + if (this.optionFlags & 64) node.range[0] = startLoc.index; + } + resetEndLocation(node, endLoc = this.state.lastTokEndLoc) { + node.end = endLoc.index; + node.loc.end = endLoc; + if (this.optionFlags & 64) node.range[1] = endLoc.index; + } + resetStartLocationFromNode(node, locationNode) { + this.resetStartLocation(node, locationNode.loc.start); + } +} +const reservedTypes = new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]); +const FlowErrors = ParseErrorEnum`flow`({ + AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.", + AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.", + AssignReservedType: ({ + reservedType + }) => `Cannot overwrite reserved type ${reservedType}.`, + DeclareClassElement: "The `declare` modifier can only appear on class fields.", + DeclareClassFieldInitializer: "Initializers are not allowed in fields with the `declare` modifier.", + DuplicateDeclareModuleExports: "Duplicate `declare module.exports` statement.", + EnumBooleanMemberNotInitialized: ({ + memberName, + enumName + }) => `Boolean enum members need to be initialized. Use either \`${memberName} = true,\` or \`${memberName} = false,\` in enum \`${enumName}\`.`, + EnumDuplicateMemberName: ({ + memberName, + enumName + }) => `Enum member names need to be unique, but the name \`${memberName}\` has already been used before in enum \`${enumName}\`.`, + EnumInconsistentMemberValues: ({ + enumName + }) => `Enum \`${enumName}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`, + EnumInvalidExplicitType: ({ + invalidEnumType, + enumName + }) => `Enum type \`${invalidEnumType}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${enumName}\`.`, + EnumInvalidExplicitTypeUnknownSupplied: ({ + enumName + }) => `Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${enumName}\`.`, + EnumInvalidMemberInitializerPrimaryType: ({ + enumName, + memberName, + explicitType + }) => `Enum \`${enumName}\` has type \`${explicitType}\`, so the initializer of \`${memberName}\` needs to be a ${explicitType} literal.`, + EnumInvalidMemberInitializerSymbolType: ({ + enumName, + memberName + }) => `Symbol enum members cannot be initialized. Use \`${memberName},\` in enum \`${enumName}\`.`, + EnumInvalidMemberInitializerUnknownType: ({ + enumName, + memberName + }) => `The enum member initializer for \`${memberName}\` needs to be a literal (either a boolean, number, or string) in enum \`${enumName}\`.`, + EnumInvalidMemberName: ({ + enumName, + memberName, + suggestion + }) => `Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${memberName}\`, consider using \`${suggestion}\`, in enum \`${enumName}\`.`, + EnumNumberMemberNotInitialized: ({ + enumName, + memberName + }) => `Number enum members need to be initialized, e.g. \`${memberName} = 1\` in enum \`${enumName}\`.`, + EnumStringMemberInconsistentlyInitialized: ({ + enumName + }) => `String enum members need to consistently either all use initializers, or use no initializers, in enum \`${enumName}\`.`, + GetterMayNotHaveThisParam: "A getter cannot have a `this` parameter.", + ImportReflectionHasImportType: "An `import module` declaration can not use `type` or `typeof` keyword.", + ImportTypeShorthandOnlyInPureImport: "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.", + InexactInsideExact: "Explicit inexact syntax cannot appear inside an explicit exact object type.", + InexactInsideNonObject: "Explicit inexact syntax cannot appear in class or interface definitions.", + InexactVariance: "Explicit inexact syntax cannot have variance.", + InvalidNonTypeImportInDeclareModule: "Imports within a `declare module` body must always be `import type` or `import typeof`.", + MissingTypeParamDefault: "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.", + NestedDeclareModule: "`declare module` cannot be used inside another `declare module`.", + NestedFlowComment: "Cannot have a flow comment inside another flow comment.", + PatternIsOptional: Object.assign({ + message: "A binding pattern parameter cannot be optional in an implementation signature." + }, { + reasonCode: "OptionalBindingPattern" + }), + SetterMayNotHaveThisParam: "A setter cannot have a `this` parameter.", + SpreadVariance: "Spread properties cannot have variance.", + ThisParamAnnotationRequired: "A type annotation is required for the `this` parameter.", + ThisParamBannedInConstructor: "Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.", + ThisParamMayNotBeOptional: "The `this` parameter cannot be optional.", + ThisParamMustBeFirst: "The `this` parameter must be the first function parameter.", + ThisParamNoDefault: "The `this` parameter may not have a default value.", + TypeBeforeInitializer: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", + TypeCastInPattern: "The type cast expression is expected to be wrapped with parenthesis.", + UnexpectedExplicitInexactInObject: "Explicit inexact syntax must appear at the end of an inexact object.", + UnexpectedReservedType: ({ + reservedType + }) => `Unexpected reserved type ${reservedType}.`, + UnexpectedReservedUnderscore: "`_` is only allowed as a type argument to call or new.", + UnexpectedSpaceBetweenModuloChecks: "Spaces between `%` and `checks` are not allowed here.", + UnexpectedSpreadType: "Spread operator cannot appear in class or interface definitions.", + UnexpectedSubtractionOperand: 'Unexpected token, expected "number" or "bigint".', + UnexpectedTokenAfterTypeParameter: "Expected an arrow function after this type parameter declaration.", + UnexpectedTypeParameterBeforeAsyncArrowFunction: "Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`.", + UnsupportedDeclareExportKind: ({ + unsupportedExportKind, + suggestion + }) => `\`declare export ${unsupportedExportKind}\` is not supported. Use \`${suggestion}\` instead.`, + UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.", + UnterminatedFlowComment: "Unterminated flow-comment." +}); +function isEsModuleType(bodyElement) { + return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration"); +} +function hasTypeImportKind(node) { + return node.importKind === "type" || node.importKind === "typeof"; +} +const exportSuggestions = { + const: "declare export var", + let: "declare export var", + type: "export type", + interface: "export interface" +}; +function partition(list, test) { + const list1 = []; + const list2 = []; + for (let i = 0; i < list.length; i++) { + (test(list[i], i, list) ? list1 : list2).push(list[i]); + } + return [list1, list2]; +} +const FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/; +var flow = superClass => class FlowParserMixin extends superClass { + constructor(...args) { + super(...args); + this.flowPragma = undefined; + } + getScopeHandler() { + return FlowScopeHandler; + } + shouldParseTypes() { + return this.getPluginOption("flow", "all") || this.flowPragma === "flow"; + } + finishToken(type, val) { + if (type !== 134 && type !== 13 && type !== 28) { + if (this.flowPragma === undefined) { + this.flowPragma = null; + } + } + super.finishToken(type, val); + } + addComment(comment) { + if (this.flowPragma === undefined) { + const matches = FLOW_PRAGMA_REGEX.exec(comment.value); + if (!matches) ;else if (matches[1] === "flow") { + this.flowPragma = "flow"; + } else if (matches[1] === "noflow") { + this.flowPragma = "noflow"; + } else { + throw new Error("Unexpected flow pragma"); + } + } + super.addComment(comment); + } + flowParseTypeInitialiser(tok) { + const oldInType = this.state.inType; + this.state.inType = true; + this.expect(tok || 14); + const type = this.flowParseType(); + this.state.inType = oldInType; + return type; + } + flowParsePredicate() { + const node = this.startNode(); + const moduloLoc = this.state.startLoc; + this.next(); + this.expectContextual(110); + if (this.state.lastTokStartLoc.index > moduloLoc.index + 1) { + this.raise(FlowErrors.UnexpectedSpaceBetweenModuloChecks, moduloLoc); + } + if (this.eat(10)) { + node.value = super.parseExpression(); + this.expect(11); + return this.finishNode(node, "DeclaredPredicate"); + } else { + return this.finishNode(node, "InferredPredicate"); + } + } + flowParseTypeAndPredicateInitialiser() { + const oldInType = this.state.inType; + this.state.inType = true; + this.expect(14); + let type = null; + let predicate = null; + if (this.match(54)) { + this.state.inType = oldInType; + predicate = this.flowParsePredicate(); + } else { + type = this.flowParseType(); + this.state.inType = oldInType; + if (this.match(54)) { + predicate = this.flowParsePredicate(); + } + } + return [type, predicate]; + } + flowParseDeclareClass(node) { + this.next(); + this.flowParseInterfaceish(node, true); + return this.finishNode(node, "DeclareClass"); + } + flowParseDeclareFunction(node) { + this.next(); + const id = node.id = this.parseIdentifier(); + const typeNode = this.startNode(); + const typeContainer = this.startNode(); + if (this.match(47)) { + typeNode.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + typeNode.typeParameters = null; + } + this.expect(10); + const tmp = this.flowParseFunctionTypeParams(); + typeNode.params = tmp.params; + typeNode.rest = tmp.rest; + typeNode.this = tmp._this; + this.expect(11); + [typeNode.returnType, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); + typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation"); + id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation"); + this.resetEndLocation(id); + this.semicolon(); + this.scope.declareName(node.id.name, 2048, node.id.loc.start); + return this.finishNode(node, "DeclareFunction"); + } + flowParseDeclare(node, insideModule) { + if (this.match(80)) { + return this.flowParseDeclareClass(node); + } else if (this.match(68)) { + return this.flowParseDeclareFunction(node); + } else if (this.match(74)) { + return this.flowParseDeclareVariable(node); + } else if (this.eatContextual(127)) { + if (this.match(16)) { + return this.flowParseDeclareModuleExports(node); + } else { + if (insideModule) { + this.raise(FlowErrors.NestedDeclareModule, this.state.lastTokStartLoc); + } + return this.flowParseDeclareModule(node); + } + } else if (this.isContextual(130)) { + return this.flowParseDeclareTypeAlias(node); + } else if (this.isContextual(131)) { + return this.flowParseDeclareOpaqueType(node); + } else if (this.isContextual(129)) { + return this.flowParseDeclareInterface(node); + } else if (this.match(82)) { + return this.flowParseDeclareExportDeclaration(node, insideModule); + } else { + this.unexpected(); + } + } + flowParseDeclareVariable(node) { + this.next(); + node.id = this.flowParseTypeAnnotatableIdentifier(true); + this.scope.declareName(node.id.name, 5, node.id.loc.start); + this.semicolon(); + return this.finishNode(node, "DeclareVariable"); + } + flowParseDeclareModule(node) { + this.scope.enter(0); + if (this.match(134)) { + node.id = super.parseExprAtom(); + } else { + node.id = this.parseIdentifier(); + } + const bodyNode = node.body = this.startNode(); + const body = bodyNode.body = []; + this.expect(5); + while (!this.match(8)) { + let bodyNode = this.startNode(); + if (this.match(83)) { + this.next(); + if (!this.isContextual(130) && !this.match(87)) { + this.raise(FlowErrors.InvalidNonTypeImportInDeclareModule, this.state.lastTokStartLoc); + } + super.parseImport(bodyNode); + } else { + this.expectContextual(125, FlowErrors.UnsupportedStatementInDeclareModule); + bodyNode = this.flowParseDeclare(bodyNode, true); + } + body.push(bodyNode); + } + this.scope.exit(); + this.expect(8); + this.finishNode(bodyNode, "BlockStatement"); + let kind = null; + let hasModuleExport = false; + body.forEach(bodyElement => { + if (isEsModuleType(bodyElement)) { + if (kind === "CommonJS") { + this.raise(FlowErrors.AmbiguousDeclareModuleKind, bodyElement); + } + kind = "ES"; + } else if (bodyElement.type === "DeclareModuleExports") { + if (hasModuleExport) { + this.raise(FlowErrors.DuplicateDeclareModuleExports, bodyElement); + } + if (kind === "ES") { + this.raise(FlowErrors.AmbiguousDeclareModuleKind, bodyElement); + } + kind = "CommonJS"; + hasModuleExport = true; + } + }); + node.kind = kind || "CommonJS"; + return this.finishNode(node, "DeclareModule"); + } + flowParseDeclareExportDeclaration(node, insideModule) { + this.expect(82); + if (this.eat(65)) { + if (this.match(68) || this.match(80)) { + node.declaration = this.flowParseDeclare(this.startNode()); + } else { + node.declaration = this.flowParseType(); + this.semicolon(); + } + node.default = true; + return this.finishNode(node, "DeclareExportDeclaration"); + } else { + if (this.match(75) || this.isLet() || (this.isContextual(130) || this.isContextual(129)) && !insideModule) { + const label = this.state.value; + throw this.raise(FlowErrors.UnsupportedDeclareExportKind, this.state.startLoc, { + unsupportedExportKind: label, + suggestion: exportSuggestions[label] + }); + } + if (this.match(74) || this.match(68) || this.match(80) || this.isContextual(131)) { + node.declaration = this.flowParseDeclare(this.startNode()); + node.default = false; + return this.finishNode(node, "DeclareExportDeclaration"); + } else if (this.match(55) || this.match(5) || this.isContextual(129) || this.isContextual(130) || this.isContextual(131)) { + node = this.parseExport(node, null); + if (node.type === "ExportNamedDeclaration") { + node.type = "ExportDeclaration"; + node.default = false; + delete node.exportKind; + } + node.type = "Declare" + node.type; + return node; + } + } + this.unexpected(); + } + flowParseDeclareModuleExports(node) { + this.next(); + this.expectContextual(111); + node.typeAnnotation = this.flowParseTypeAnnotation(); + this.semicolon(); + return this.finishNode(node, "DeclareModuleExports"); + } + flowParseDeclareTypeAlias(node) { + this.next(); + const finished = this.flowParseTypeAlias(node); + finished.type = "DeclareTypeAlias"; + return finished; + } + flowParseDeclareOpaqueType(node) { + this.next(); + const finished = this.flowParseOpaqueType(node, true); + finished.type = "DeclareOpaqueType"; + return finished; + } + flowParseDeclareInterface(node) { + this.next(); + this.flowParseInterfaceish(node, false); + return this.finishNode(node, "DeclareInterface"); + } + flowParseInterfaceish(node, isClass) { + node.id = this.flowParseRestrictedIdentifier(!isClass, true); + this.scope.declareName(node.id.name, isClass ? 17 : 8201, node.id.loc.start); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + node.typeParameters = null; + } + node.extends = []; + if (this.eat(81)) { + do { + node.extends.push(this.flowParseInterfaceExtends()); + } while (!isClass && this.eat(12)); + } + if (isClass) { + node.implements = []; + node.mixins = []; + if (this.eatContextual(117)) { + do { + node.mixins.push(this.flowParseInterfaceExtends()); + } while (this.eat(12)); + } + if (this.eatContextual(113)) { + do { + node.implements.push(this.flowParseInterfaceExtends()); + } while (this.eat(12)); + } + } + node.body = this.flowParseObjectType({ + allowStatic: isClass, + allowExact: false, + allowSpread: false, + allowProto: isClass, + allowInexact: false + }); + } + flowParseInterfaceExtends() { + const node = this.startNode(); + node.id = this.flowParseQualifiedTypeIdentifier(); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterInstantiation(); + } else { + node.typeParameters = null; + } + return this.finishNode(node, "InterfaceExtends"); + } + flowParseInterface(node) { + this.flowParseInterfaceish(node, false); + return this.finishNode(node, "InterfaceDeclaration"); + } + checkNotUnderscore(word) { + if (word === "_") { + this.raise(FlowErrors.UnexpectedReservedUnderscore, this.state.startLoc); + } + } + checkReservedType(word, startLoc, declaration) { + if (!reservedTypes.has(word)) return; + this.raise(declaration ? FlowErrors.AssignReservedType : FlowErrors.UnexpectedReservedType, startLoc, { + reservedType: word + }); + } + flowParseRestrictedIdentifier(liberal, declaration) { + this.checkReservedType(this.state.value, this.state.startLoc, declaration); + return this.parseIdentifier(liberal); + } + flowParseTypeAlias(node) { + node.id = this.flowParseRestrictedIdentifier(false, true); + this.scope.declareName(node.id.name, 8201, node.id.loc.start); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + node.typeParameters = null; + } + node.right = this.flowParseTypeInitialiser(29); + this.semicolon(); + return this.finishNode(node, "TypeAlias"); + } + flowParseOpaqueType(node, declare) { + this.expectContextual(130); + node.id = this.flowParseRestrictedIdentifier(true, true); + this.scope.declareName(node.id.name, 8201, node.id.loc.start); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + node.typeParameters = null; + } + node.supertype = null; + if (this.match(14)) { + node.supertype = this.flowParseTypeInitialiser(14); + } + node.impltype = null; + if (!declare) { + node.impltype = this.flowParseTypeInitialiser(29); + } + this.semicolon(); + return this.finishNode(node, "OpaqueType"); + } + flowParseTypeParameter(requireDefault = false) { + const nodeStartLoc = this.state.startLoc; + const node = this.startNode(); + const variance = this.flowParseVariance(); + const ident = this.flowParseTypeAnnotatableIdentifier(); + node.name = ident.name; + node.variance = variance; + node.bound = ident.typeAnnotation; + if (this.match(29)) { + this.eat(29); + node.default = this.flowParseType(); + } else { + if (requireDefault) { + this.raise(FlowErrors.MissingTypeParamDefault, nodeStartLoc); + } + } + return this.finishNode(node, "TypeParameter"); + } + flowParseTypeParameterDeclaration() { + const oldInType = this.state.inType; + const node = this.startNode(); + node.params = []; + this.state.inType = true; + if (this.match(47) || this.match(143)) { + this.next(); + } else { + this.unexpected(); + } + let defaultRequired = false; + do { + const typeParameter = this.flowParseTypeParameter(defaultRequired); + node.params.push(typeParameter); + if (typeParameter.default) { + defaultRequired = true; + } + if (!this.match(48)) { + this.expect(12); + } + } while (!this.match(48)); + this.expect(48); + this.state.inType = oldInType; + return this.finishNode(node, "TypeParameterDeclaration"); + } + flowInTopLevelContext(cb) { + if (this.curContext() !== types.brace) { + const oldContext = this.state.context; + this.state.context = [oldContext[0]]; + try { + return cb(); + } finally { + this.state.context = oldContext; + } + } else { + return cb(); + } + } + flowParseTypeParameterInstantiationInExpression() { + if (this.reScan_lt() !== 47) return; + return this.flowParseTypeParameterInstantiation(); + } + flowParseTypeParameterInstantiation() { + const node = this.startNode(); + const oldInType = this.state.inType; + this.state.inType = true; + node.params = []; + this.flowInTopLevelContext(() => { + this.expect(47); + const oldNoAnonFunctionType = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = false; + while (!this.match(48)) { + node.params.push(this.flowParseType()); + if (!this.match(48)) { + this.expect(12); + } + } + this.state.noAnonFunctionType = oldNoAnonFunctionType; + }); + this.state.inType = oldInType; + if (!this.state.inType && this.curContext() === types.brace) { + this.reScan_lt_gt(); + } + this.expect(48); + return this.finishNode(node, "TypeParameterInstantiation"); + } + flowParseTypeParameterInstantiationCallOrNew() { + if (this.reScan_lt() !== 47) return; + const node = this.startNode(); + const oldInType = this.state.inType; + node.params = []; + this.state.inType = true; + this.expect(47); + while (!this.match(48)) { + node.params.push(this.flowParseTypeOrImplicitInstantiation()); + if (!this.match(48)) { + this.expect(12); + } + } + this.expect(48); + this.state.inType = oldInType; + return this.finishNode(node, "TypeParameterInstantiation"); + } + flowParseInterfaceType() { + const node = this.startNode(); + this.expectContextual(129); + node.extends = []; + if (this.eat(81)) { + do { + node.extends.push(this.flowParseInterfaceExtends()); + } while (this.eat(12)); + } + node.body = this.flowParseObjectType({ + allowStatic: false, + allowExact: false, + allowSpread: false, + allowProto: false, + allowInexact: false + }); + return this.finishNode(node, "InterfaceTypeAnnotation"); + } + flowParseObjectPropertyKey() { + return this.match(135) || this.match(134) ? super.parseExprAtom() : this.parseIdentifier(true); + } + flowParseObjectTypeIndexer(node, isStatic, variance) { + node.static = isStatic; + if (this.lookahead().type === 14) { + node.id = this.flowParseObjectPropertyKey(); + node.key = this.flowParseTypeInitialiser(); + } else { + node.id = null; + node.key = this.flowParseType(); + } + this.expect(3); + node.value = this.flowParseTypeInitialiser(); + node.variance = variance; + return this.finishNode(node, "ObjectTypeIndexer"); + } + flowParseObjectTypeInternalSlot(node, isStatic) { + node.static = isStatic; + node.id = this.flowParseObjectPropertyKey(); + this.expect(3); + this.expect(3); + if (this.match(47) || this.match(10)) { + node.method = true; + node.optional = false; + node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.loc.start)); + } else { + node.method = false; + if (this.eat(17)) { + node.optional = true; + } + node.value = this.flowParseTypeInitialiser(); + } + return this.finishNode(node, "ObjectTypeInternalSlot"); + } + flowParseObjectTypeMethodish(node) { + node.params = []; + node.rest = null; + node.typeParameters = null; + node.this = null; + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } + this.expect(10); + if (this.match(78)) { + node.this = this.flowParseFunctionTypeParam(true); + node.this.name = null; + if (!this.match(11)) { + this.expect(12); + } + } + while (!this.match(11) && !this.match(21)) { + node.params.push(this.flowParseFunctionTypeParam(false)); + if (!this.match(11)) { + this.expect(12); + } + } + if (this.eat(21)) { + node.rest = this.flowParseFunctionTypeParam(false); + } + this.expect(11); + node.returnType = this.flowParseTypeInitialiser(); + return this.finishNode(node, "FunctionTypeAnnotation"); + } + flowParseObjectTypeCallProperty(node, isStatic) { + const valueNode = this.startNode(); + node.static = isStatic; + node.value = this.flowParseObjectTypeMethodish(valueNode); + return this.finishNode(node, "ObjectTypeCallProperty"); + } + flowParseObjectType({ + allowStatic, + allowExact, + allowSpread, + allowProto, + allowInexact + }) { + const oldInType = this.state.inType; + this.state.inType = true; + const nodeStart = this.startNode(); + nodeStart.callProperties = []; + nodeStart.properties = []; + nodeStart.indexers = []; + nodeStart.internalSlots = []; + let endDelim; + let exact; + let inexact = false; + if (allowExact && this.match(6)) { + this.expect(6); + endDelim = 9; + exact = true; + } else { + this.expect(5); + endDelim = 8; + exact = false; + } + nodeStart.exact = exact; + while (!this.match(endDelim)) { + let isStatic = false; + let protoStartLoc = null; + let inexactStartLoc = null; + const node = this.startNode(); + if (allowProto && this.isContextual(118)) { + const lookahead = this.lookahead(); + if (lookahead.type !== 14 && lookahead.type !== 17) { + this.next(); + protoStartLoc = this.state.startLoc; + allowStatic = false; + } + } + if (allowStatic && this.isContextual(106)) { + const lookahead = this.lookahead(); + if (lookahead.type !== 14 && lookahead.type !== 17) { + this.next(); + isStatic = true; + } + } + const variance = this.flowParseVariance(); + if (this.eat(0)) { + if (protoStartLoc != null) { + this.unexpected(protoStartLoc); + } + if (this.eat(0)) { + if (variance) { + this.unexpected(variance.loc.start); + } + nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic)); + } else { + nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance)); + } + } else if (this.match(10) || this.match(47)) { + if (protoStartLoc != null) { + this.unexpected(protoStartLoc); + } + if (variance) { + this.unexpected(variance.loc.start); + } + nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic)); + } else { + let kind = "init"; + if (this.isContextual(99) || this.isContextual(104)) { + const lookahead = this.lookahead(); + if (tokenIsLiteralPropertyName(lookahead.type)) { + kind = this.state.value; + this.next(); + } + } + const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStartLoc, variance, kind, allowSpread, allowInexact != null ? allowInexact : !exact); + if (propOrInexact === null) { + inexact = true; + inexactStartLoc = this.state.lastTokStartLoc; + } else { + nodeStart.properties.push(propOrInexact); + } + } + this.flowObjectTypeSemicolon(); + if (inexactStartLoc && !this.match(8) && !this.match(9)) { + this.raise(FlowErrors.UnexpectedExplicitInexactInObject, inexactStartLoc); + } + } + this.expect(endDelim); + if (allowSpread) { + nodeStart.inexact = inexact; + } + const out = this.finishNode(nodeStart, "ObjectTypeAnnotation"); + this.state.inType = oldInType; + return out; + } + flowParseObjectTypeProperty(node, isStatic, protoStartLoc, variance, kind, allowSpread, allowInexact) { + if (this.eat(21)) { + const isInexactToken = this.match(12) || this.match(13) || this.match(8) || this.match(9); + if (isInexactToken) { + if (!allowSpread) { + this.raise(FlowErrors.InexactInsideNonObject, this.state.lastTokStartLoc); + } else if (!allowInexact) { + this.raise(FlowErrors.InexactInsideExact, this.state.lastTokStartLoc); + } + if (variance) { + this.raise(FlowErrors.InexactVariance, variance); + } + return null; + } + if (!allowSpread) { + this.raise(FlowErrors.UnexpectedSpreadType, this.state.lastTokStartLoc); + } + if (protoStartLoc != null) { + this.unexpected(protoStartLoc); + } + if (variance) { + this.raise(FlowErrors.SpreadVariance, variance); + } + node.argument = this.flowParseType(); + return this.finishNode(node, "ObjectTypeSpreadProperty"); + } else { + node.key = this.flowParseObjectPropertyKey(); + node.static = isStatic; + node.proto = protoStartLoc != null; + node.kind = kind; + let optional = false; + if (this.match(47) || this.match(10)) { + node.method = true; + if (protoStartLoc != null) { + this.unexpected(protoStartLoc); + } + if (variance) { + this.unexpected(variance.loc.start); + } + node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.loc.start)); + if (kind === "get" || kind === "set") { + this.flowCheckGetterSetterParams(node); + } + if (!allowSpread && node.key.name === "constructor" && node.value.this) { + this.raise(FlowErrors.ThisParamBannedInConstructor, node.value.this); + } + } else { + if (kind !== "init") this.unexpected(); + node.method = false; + if (this.eat(17)) { + optional = true; + } + node.value = this.flowParseTypeInitialiser(); + node.variance = variance; + } + node.optional = optional; + return this.finishNode(node, "ObjectTypeProperty"); + } + } + flowCheckGetterSetterParams(property) { + const paramCount = property.kind === "get" ? 0 : 1; + const length = property.value.params.length + (property.value.rest ? 1 : 0); + if (property.value.this) { + this.raise(property.kind === "get" ? FlowErrors.GetterMayNotHaveThisParam : FlowErrors.SetterMayNotHaveThisParam, property.value.this); + } + if (length !== paramCount) { + this.raise(property.kind === "get" ? Errors.BadGetterArity : Errors.BadSetterArity, property); + } + if (property.kind === "set" && property.value.rest) { + this.raise(Errors.BadSetterRestParameter, property); + } + } + flowObjectTypeSemicolon() { + if (!this.eat(13) && !this.eat(12) && !this.match(8) && !this.match(9)) { + this.unexpected(); + } + } + flowParseQualifiedTypeIdentifier(startLoc, id) { + var _startLoc; + (_startLoc = startLoc) != null ? _startLoc : startLoc = this.state.startLoc; + let node = id || this.flowParseRestrictedIdentifier(true); + while (this.eat(16)) { + const node2 = this.startNodeAt(startLoc); + node2.qualification = node; + node2.id = this.flowParseRestrictedIdentifier(true); + node = this.finishNode(node2, "QualifiedTypeIdentifier"); + } + return node; + } + flowParseGenericType(startLoc, id) { + const node = this.startNodeAt(startLoc); + node.typeParameters = null; + node.id = this.flowParseQualifiedTypeIdentifier(startLoc, id); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterInstantiation(); + } + return this.finishNode(node, "GenericTypeAnnotation"); + } + flowParseTypeofType() { + const node = this.startNode(); + this.expect(87); + node.argument = this.flowParsePrimaryType(); + return this.finishNode(node, "TypeofTypeAnnotation"); + } + flowParseTupleType() { + const node = this.startNode(); + node.types = []; + this.expect(0); + while (this.state.pos < this.length && !this.match(3)) { + node.types.push(this.flowParseType()); + if (this.match(3)) break; + this.expect(12); + } + this.expect(3); + return this.finishNode(node, "TupleTypeAnnotation"); + } + flowParseFunctionTypeParam(first) { + let name = null; + let optional = false; + let typeAnnotation = null; + const node = this.startNode(); + const lh = this.lookahead(); + const isThis = this.state.type === 78; + if (lh.type === 14 || lh.type === 17) { + if (isThis && !first) { + this.raise(FlowErrors.ThisParamMustBeFirst, node); + } + name = this.parseIdentifier(isThis); + if (this.eat(17)) { + optional = true; + if (isThis) { + this.raise(FlowErrors.ThisParamMayNotBeOptional, node); + } + } + typeAnnotation = this.flowParseTypeInitialiser(); + } else { + typeAnnotation = this.flowParseType(); + } + node.name = name; + node.optional = optional; + node.typeAnnotation = typeAnnotation; + return this.finishNode(node, "FunctionTypeParam"); + } + reinterpretTypeAsFunctionTypeParam(type) { + const node = this.startNodeAt(type.loc.start); + node.name = null; + node.optional = false; + node.typeAnnotation = type; + return this.finishNode(node, "FunctionTypeParam"); + } + flowParseFunctionTypeParams(params = []) { + let rest = null; + let _this = null; + if (this.match(78)) { + _this = this.flowParseFunctionTypeParam(true); + _this.name = null; + if (!this.match(11)) { + this.expect(12); + } + } + while (!this.match(11) && !this.match(21)) { + params.push(this.flowParseFunctionTypeParam(false)); + if (!this.match(11)) { + this.expect(12); + } + } + if (this.eat(21)) { + rest = this.flowParseFunctionTypeParam(false); + } + return { + params, + rest, + _this + }; + } + flowIdentToTypeAnnotation(startLoc, node, id) { + switch (id.name) { + case "any": + return this.finishNode(node, "AnyTypeAnnotation"); + case "bool": + case "boolean": + return this.finishNode(node, "BooleanTypeAnnotation"); + case "mixed": + return this.finishNode(node, "MixedTypeAnnotation"); + case "empty": + return this.finishNode(node, "EmptyTypeAnnotation"); + case "number": + return this.finishNode(node, "NumberTypeAnnotation"); + case "string": + return this.finishNode(node, "StringTypeAnnotation"); + case "symbol": + return this.finishNode(node, "SymbolTypeAnnotation"); + default: + this.checkNotUnderscore(id.name); + return this.flowParseGenericType(startLoc, id); + } + } + flowParsePrimaryType() { + const startLoc = this.state.startLoc; + const node = this.startNode(); + let tmp; + let type; + let isGroupedType = false; + const oldNoAnonFunctionType = this.state.noAnonFunctionType; + switch (this.state.type) { + case 5: + return this.flowParseObjectType({ + allowStatic: false, + allowExact: false, + allowSpread: true, + allowProto: false, + allowInexact: true + }); + case 6: + return this.flowParseObjectType({ + allowStatic: false, + allowExact: true, + allowSpread: true, + allowProto: false, + allowInexact: false + }); + case 0: + this.state.noAnonFunctionType = false; + type = this.flowParseTupleType(); + this.state.noAnonFunctionType = oldNoAnonFunctionType; + return type; + case 47: + { + const node = this.startNode(); + node.typeParameters = this.flowParseTypeParameterDeclaration(); + this.expect(10); + tmp = this.flowParseFunctionTypeParams(); + node.params = tmp.params; + node.rest = tmp.rest; + node.this = tmp._this; + this.expect(11); + this.expect(19); + node.returnType = this.flowParseType(); + return this.finishNode(node, "FunctionTypeAnnotation"); + } + case 10: + { + const node = this.startNode(); + this.next(); + if (!this.match(11) && !this.match(21)) { + if (tokenIsIdentifier(this.state.type) || this.match(78)) { + const token = this.lookahead().type; + isGroupedType = token !== 17 && token !== 14; + } else { + isGroupedType = true; + } + } + if (isGroupedType) { + this.state.noAnonFunctionType = false; + type = this.flowParseType(); + this.state.noAnonFunctionType = oldNoAnonFunctionType; + if (this.state.noAnonFunctionType || !(this.match(12) || this.match(11) && this.lookahead().type === 19)) { + this.expect(11); + return type; + } else { + this.eat(12); + } + } + if (type) { + tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]); + } else { + tmp = this.flowParseFunctionTypeParams(); + } + node.params = tmp.params; + node.rest = tmp.rest; + node.this = tmp._this; + this.expect(11); + this.expect(19); + node.returnType = this.flowParseType(); + node.typeParameters = null; + return this.finishNode(node, "FunctionTypeAnnotation"); + } + case 134: + return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation"); + case 85: + case 86: + node.value = this.match(85); + this.next(); + return this.finishNode(node, "BooleanLiteralTypeAnnotation"); + case 53: + if (this.state.value === "-") { + this.next(); + if (this.match(135)) { + return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node); + } + if (this.match(136)) { + return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node); + } + throw this.raise(FlowErrors.UnexpectedSubtractionOperand, this.state.startLoc); + } + this.unexpected(); + return; + case 135: + return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation"); + case 136: + return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation"); + case 88: + this.next(); + return this.finishNode(node, "VoidTypeAnnotation"); + case 84: + this.next(); + return this.finishNode(node, "NullLiteralTypeAnnotation"); + case 78: + this.next(); + return this.finishNode(node, "ThisTypeAnnotation"); + case 55: + this.next(); + return this.finishNode(node, "ExistsTypeAnnotation"); + case 87: + return this.flowParseTypeofType(); + default: + if (tokenIsKeyword(this.state.type)) { + const label = tokenLabelName(this.state.type); + this.next(); + return super.createIdentifier(node, label); + } else if (tokenIsIdentifier(this.state.type)) { + if (this.isContextual(129)) { + return this.flowParseInterfaceType(); + } + return this.flowIdentToTypeAnnotation(startLoc, node, this.parseIdentifier()); + } + } + this.unexpected(); + } + flowParsePostfixType() { + const startLoc = this.state.startLoc; + let type = this.flowParsePrimaryType(); + let seenOptionalIndexedAccess = false; + while ((this.match(0) || this.match(18)) && !this.canInsertSemicolon()) { + const node = this.startNodeAt(startLoc); + const optional = this.eat(18); + seenOptionalIndexedAccess = seenOptionalIndexedAccess || optional; + this.expect(0); + if (!optional && this.match(3)) { + node.elementType = type; + this.next(); + type = this.finishNode(node, "ArrayTypeAnnotation"); + } else { + node.objectType = type; + node.indexType = this.flowParseType(); + this.expect(3); + if (seenOptionalIndexedAccess) { + node.optional = optional; + type = this.finishNode(node, "OptionalIndexedAccessType"); + } else { + type = this.finishNode(node, "IndexedAccessType"); + } + } + } + return type; + } + flowParsePrefixType() { + const node = this.startNode(); + if (this.eat(17)) { + node.typeAnnotation = this.flowParsePrefixType(); + return this.finishNode(node, "NullableTypeAnnotation"); + } else { + return this.flowParsePostfixType(); + } + } + flowParseAnonFunctionWithoutParens() { + const param = this.flowParsePrefixType(); + if (!this.state.noAnonFunctionType && this.eat(19)) { + const node = this.startNodeAt(param.loc.start); + node.params = [this.reinterpretTypeAsFunctionTypeParam(param)]; + node.rest = null; + node.this = null; + node.returnType = this.flowParseType(); + node.typeParameters = null; + return this.finishNode(node, "FunctionTypeAnnotation"); + } + return param; + } + flowParseIntersectionType() { + const node = this.startNode(); + this.eat(45); + const type = this.flowParseAnonFunctionWithoutParens(); + node.types = [type]; + while (this.eat(45)) { + node.types.push(this.flowParseAnonFunctionWithoutParens()); + } + return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); + } + flowParseUnionType() { + const node = this.startNode(); + this.eat(43); + const type = this.flowParseIntersectionType(); + node.types = [type]; + while (this.eat(43)) { + node.types.push(this.flowParseIntersectionType()); + } + return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); + } + flowParseType() { + const oldInType = this.state.inType; + this.state.inType = true; + const type = this.flowParseUnionType(); + this.state.inType = oldInType; + return type; + } + flowParseTypeOrImplicitInstantiation() { + if (this.state.type === 132 && this.state.value === "_") { + const startLoc = this.state.startLoc; + const node = this.parseIdentifier(); + return this.flowParseGenericType(startLoc, node); + } else { + return this.flowParseType(); + } + } + flowParseTypeAnnotation() { + const node = this.startNode(); + node.typeAnnotation = this.flowParseTypeInitialiser(); + return this.finishNode(node, "TypeAnnotation"); + } + flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) { + const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier(); + if (this.match(14)) { + ident.typeAnnotation = this.flowParseTypeAnnotation(); + this.resetEndLocation(ident); + } + return ident; + } + typeCastToParameter(node) { + node.expression.typeAnnotation = node.typeAnnotation; + this.resetEndLocation(node.expression, node.typeAnnotation.loc.end); + return node.expression; + } + flowParseVariance() { + let variance = null; + if (this.match(53)) { + variance = this.startNode(); + if (this.state.value === "+") { + variance.kind = "plus"; + } else { + variance.kind = "minus"; + } + this.next(); + return this.finishNode(variance, "Variance"); + } + return variance; + } + parseFunctionBody(node, allowExpressionBody, isMethod = false) { + if (allowExpressionBody) { + this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod)); + return; + } + super.parseFunctionBody(node, false, isMethod); + } + parseFunctionBodyAndFinish(node, type, isMethod = false) { + if (this.match(14)) { + const typeNode = this.startNode(); + [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); + node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; + } + return super.parseFunctionBodyAndFinish(node, type, isMethod); + } + parseStatementLike(flags) { + if (this.state.strict && this.isContextual(129)) { + const lookahead = this.lookahead(); + if (tokenIsKeywordOrIdentifier(lookahead.type)) { + const node = this.startNode(); + this.next(); + return this.flowParseInterface(node); + } + } else if (this.isContextual(126)) { + const node = this.startNode(); + this.next(); + return this.flowParseEnumDeclaration(node); + } + const stmt = super.parseStatementLike(flags); + if (this.flowPragma === undefined && !this.isValidDirective(stmt)) { + this.flowPragma = null; + } + return stmt; + } + parseExpressionStatement(node, expr, decorators) { + if (expr.type === "Identifier") { + if (expr.name === "declare") { + if (this.match(80) || tokenIsIdentifier(this.state.type) || this.match(68) || this.match(74) || this.match(82)) { + return this.flowParseDeclare(node); + } + } else if (tokenIsIdentifier(this.state.type)) { + if (expr.name === "interface") { + return this.flowParseInterface(node); + } else if (expr.name === "type") { + return this.flowParseTypeAlias(node); + } else if (expr.name === "opaque") { + return this.flowParseOpaqueType(node, false); + } + } + } + return super.parseExpressionStatement(node, expr, decorators); + } + shouldParseExportDeclaration() { + const { + type + } = this.state; + if (type === 126 || tokenIsFlowInterfaceOrTypeOrOpaque(type)) { + return !this.state.containsEsc; + } + return super.shouldParseExportDeclaration(); + } + isExportDefaultSpecifier() { + const { + type + } = this.state; + if (type === 126 || tokenIsFlowInterfaceOrTypeOrOpaque(type)) { + return this.state.containsEsc; + } + return super.isExportDefaultSpecifier(); + } + parseExportDefaultExpression() { + if (this.isContextual(126)) { + const node = this.startNode(); + this.next(); + return this.flowParseEnumDeclaration(node); + } + return super.parseExportDefaultExpression(); + } + parseConditional(expr, startLoc, refExpressionErrors) { + if (!this.match(17)) return expr; + if (this.state.maybeInArrowParameters) { + const nextCh = this.lookaheadCharCode(); + if (nextCh === 44 || nextCh === 61 || nextCh === 58 || nextCh === 41) { + this.setOptionalParametersError(refExpressionErrors); + return expr; + } + } + this.expect(17); + const state = this.state.clone(); + const originalNoArrowAt = this.state.noArrowAt; + const node = this.startNodeAt(startLoc); + let { + consequent, + failed + } = this.tryParseConditionalConsequent(); + let [valid, invalid] = this.getArrowLikeExpressions(consequent); + if (failed || invalid.length > 0) { + const noArrowAt = [...originalNoArrowAt]; + if (invalid.length > 0) { + this.state = state; + this.state.noArrowAt = noArrowAt; + for (let i = 0; i < invalid.length; i++) { + noArrowAt.push(invalid[i].start); + } + ({ + consequent, + failed + } = this.tryParseConditionalConsequent()); + [valid, invalid] = this.getArrowLikeExpressions(consequent); + } + if (failed && valid.length > 1) { + this.raise(FlowErrors.AmbiguousConditionalArrow, state.startLoc); + } + if (failed && valid.length === 1) { + this.state = state; + noArrowAt.push(valid[0].start); + this.state.noArrowAt = noArrowAt; + ({ + consequent, + failed + } = this.tryParseConditionalConsequent()); + } + } + this.getArrowLikeExpressions(consequent, true); + this.state.noArrowAt = originalNoArrowAt; + this.expect(14); + node.test = expr; + node.consequent = consequent; + node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(undefined, undefined)); + return this.finishNode(node, "ConditionalExpression"); + } + tryParseConditionalConsequent() { + this.state.noArrowParamsConversionAt.push(this.state.start); + const consequent = this.parseMaybeAssignAllowIn(); + const failed = !this.match(14); + this.state.noArrowParamsConversionAt.pop(); + return { + consequent, + failed + }; + } + getArrowLikeExpressions(node, disallowInvalid) { + const stack = [node]; + const arrows = []; + while (stack.length !== 0) { + const node = stack.pop(); + if (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement") { + if (node.typeParameters || !node.returnType) { + this.finishArrowValidation(node); + } else { + arrows.push(node); + } + stack.push(node.body); + } else if (node.type === "ConditionalExpression") { + stack.push(node.consequent); + stack.push(node.alternate); + } + } + if (disallowInvalid) { + arrows.forEach(node => this.finishArrowValidation(node)); + return [arrows, []]; + } + return partition(arrows, node => node.params.every(param => this.isAssignable(param, true))); + } + finishArrowValidation(node) { + var _node$extra; + this.toAssignableList(node.params, (_node$extra = node.extra) == null ? void 0 : _node$extra.trailingCommaLoc, false); + this.scope.enter(2 | 4); + super.checkParams(node, false, true); + this.scope.exit(); + } + forwardNoArrowParamsConversionAt(node, parse) { + let result; + if (this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(node.start))) { + this.state.noArrowParamsConversionAt.push(this.state.start); + result = parse(); + this.state.noArrowParamsConversionAt.pop(); + } else { + result = parse(); + } + return result; + } + parseParenItem(node, startLoc) { + const newNode = super.parseParenItem(node, startLoc); + if (this.eat(17)) { + newNode.optional = true; + this.resetEndLocation(node); + } + if (this.match(14)) { + const typeCastNode = this.startNodeAt(startLoc); + typeCastNode.expression = newNode; + typeCastNode.typeAnnotation = this.flowParseTypeAnnotation(); + return this.finishNode(typeCastNode, "TypeCastExpression"); + } + return newNode; + } + assertModuleNodeAllowed(node) { + if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") { + return; + } + super.assertModuleNodeAllowed(node); + } + parseExportDeclaration(node) { + if (this.isContextual(130)) { + node.exportKind = "type"; + const declarationNode = this.startNode(); + this.next(); + if (this.match(5)) { + node.specifiers = this.parseExportSpecifiers(true); + super.parseExportFrom(node); + return null; + } else { + return this.flowParseTypeAlias(declarationNode); + } + } else if (this.isContextual(131)) { + node.exportKind = "type"; + const declarationNode = this.startNode(); + this.next(); + return this.flowParseOpaqueType(declarationNode, false); + } else if (this.isContextual(129)) { + node.exportKind = "type"; + const declarationNode = this.startNode(); + this.next(); + return this.flowParseInterface(declarationNode); + } else if (this.isContextual(126)) { + node.exportKind = "value"; + const declarationNode = this.startNode(); + this.next(); + return this.flowParseEnumDeclaration(declarationNode); + } else { + return super.parseExportDeclaration(node); + } + } + eatExportStar(node) { + if (super.eatExportStar(node)) return true; + if (this.isContextual(130) && this.lookahead().type === 55) { + node.exportKind = "type"; + this.next(); + this.next(); + return true; + } + return false; + } + maybeParseExportNamespaceSpecifier(node) { + const { + startLoc + } = this.state; + const hasNamespace = super.maybeParseExportNamespaceSpecifier(node); + if (hasNamespace && node.exportKind === "type") { + this.unexpected(startLoc); + } + return hasNamespace; + } + parseClassId(node, isStatement, optionalId) { + super.parseClassId(node, isStatement, optionalId); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } + } + parseClassMember(classBody, member, state) { + const { + startLoc + } = this.state; + if (this.isContextual(125)) { + if (super.parseClassMemberFromModifier(classBody, member)) { + return; + } + member.declare = true; + } + super.parseClassMember(classBody, member, state); + if (member.declare) { + if (member.type !== "ClassProperty" && member.type !== "ClassPrivateProperty" && member.type !== "PropertyDefinition") { + this.raise(FlowErrors.DeclareClassElement, startLoc); + } else if (member.value) { + this.raise(FlowErrors.DeclareClassFieldInitializer, member.value); + } + } + } + isIterator(word) { + return word === "iterator" || word === "asyncIterator"; + } + readIterator() { + const word = super.readWord1(); + const fullWord = "@@" + word; + if (!this.isIterator(word) || !this.state.inType) { + this.raise(Errors.InvalidIdentifier, this.state.curPosition(), { + identifierName: fullWord + }); + } + this.finishToken(132, fullWord); + } + getTokenFromCode(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + if (code === 123 && next === 124) { + this.finishOp(6, 2); + } else if (this.state.inType && (code === 62 || code === 60)) { + this.finishOp(code === 62 ? 48 : 47, 1); + } else if (this.state.inType && code === 63) { + if (next === 46) { + this.finishOp(18, 2); + } else { + this.finishOp(17, 1); + } + } else if (isIteratorStart(code, next, this.input.charCodeAt(this.state.pos + 2))) { + this.state.pos += 2; + this.readIterator(); + } else { + super.getTokenFromCode(code); + } + } + isAssignable(node, isBinding) { + if (node.type === "TypeCastExpression") { + return this.isAssignable(node.expression, isBinding); + } else { + return super.isAssignable(node, isBinding); + } + } + toAssignable(node, isLHS = false) { + if (!isLHS && node.type === "AssignmentExpression" && node.left.type === "TypeCastExpression") { + node.left = this.typeCastToParameter(node.left); + } + super.toAssignable(node, isLHS); + } + toAssignableList(exprList, trailingCommaLoc, isLHS) { + for (let i = 0; i < exprList.length; i++) { + const expr = exprList[i]; + if ((expr == null ? void 0 : expr.type) === "TypeCastExpression") { + exprList[i] = this.typeCastToParameter(expr); + } + } + super.toAssignableList(exprList, trailingCommaLoc, isLHS); + } + toReferencedList(exprList, isParenthesizedExpr) { + for (let i = 0; i < exprList.length; i++) { + var _expr$extra; + const expr = exprList[i]; + if (expr && expr.type === "TypeCastExpression" && !((_expr$extra = expr.extra) != null && _expr$extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) { + this.raise(FlowErrors.TypeCastInPattern, expr.typeAnnotation); + } + } + return exprList; + } + parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { + const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors); + if (canBePattern && !this.state.maybeInArrowParameters) { + this.toReferencedList(node.elements); + } + return node; + } + isValidLVal(type, isParenthesized, binding) { + return type === "TypeCastExpression" || super.isValidLVal(type, isParenthesized, binding); + } + parseClassProperty(node) { + if (this.match(14)) { + node.typeAnnotation = this.flowParseTypeAnnotation(); + } + return super.parseClassProperty(node); + } + parseClassPrivateProperty(node) { + if (this.match(14)) { + node.typeAnnotation = this.flowParseTypeAnnotation(); + } + return super.parseClassPrivateProperty(node); + } + isClassMethod() { + return this.match(47) || super.isClassMethod(); + } + isClassProperty() { + return this.match(14) || super.isClassProperty(); + } + isNonstaticConstructor(method) { + return !this.match(14) && super.isNonstaticConstructor(method); + } + pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { + if (method.variance) { + this.unexpected(method.variance.loc.start); + } + delete method.variance; + if (this.match(47)) { + method.typeParameters = this.flowParseTypeParameterDeclaration(); + } + super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); + if (method.params && isConstructor) { + const params = method.params; + if (params.length > 0 && this.isThisParam(params[0])) { + this.raise(FlowErrors.ThisParamBannedInConstructor, method); + } + } else if (method.type === "MethodDefinition" && isConstructor && method.value.params) { + const params = method.value.params; + if (params.length > 0 && this.isThisParam(params[0])) { + this.raise(FlowErrors.ThisParamBannedInConstructor, method); + } + } + } + pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { + if (method.variance) { + this.unexpected(method.variance.loc.start); + } + delete method.variance; + if (this.match(47)) { + method.typeParameters = this.flowParseTypeParameterDeclaration(); + } + super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); + } + parseClassSuper(node) { + super.parseClassSuper(node); + if (node.superClass && (this.match(47) || this.match(51))) { + { + node.superTypeParameters = this.flowParseTypeParameterInstantiationInExpression(); + } + } + if (this.isContextual(113)) { + this.next(); + const implemented = node.implements = []; + do { + const node = this.startNode(); + node.id = this.flowParseRestrictedIdentifier(true); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterInstantiation(); + } else { + node.typeParameters = null; + } + implemented.push(this.finishNode(node, "ClassImplements")); + } while (this.eat(12)); + } + } + checkGetterSetterParams(method) { + super.checkGetterSetterParams(method); + const params = this.getObjectOrClassMethodParams(method); + if (params.length > 0) { + const param = params[0]; + if (this.isThisParam(param) && method.kind === "get") { + this.raise(FlowErrors.GetterMayNotHaveThisParam, param); + } else if (this.isThisParam(param)) { + this.raise(FlowErrors.SetterMayNotHaveThisParam, param); + } + } + } + parsePropertyNamePrefixOperator(node) { + node.variance = this.flowParseVariance(); + } + parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { + if (prop.variance) { + this.unexpected(prop.variance.loc.start); + } + delete prop.variance; + let typeParameters; + if (this.match(47) && !isAccessor) { + typeParameters = this.flowParseTypeParameterDeclaration(); + if (!this.match(10)) this.unexpected(); + } + const result = super.parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors); + if (typeParameters) { + (result.value || result).typeParameters = typeParameters; + } + return result; + } + parseFunctionParamType(param) { + if (this.eat(17)) { + if (param.type !== "Identifier") { + this.raise(FlowErrors.PatternIsOptional, param); + } + if (this.isThisParam(param)) { + this.raise(FlowErrors.ThisParamMayNotBeOptional, param); + } + param.optional = true; + } + if (this.match(14)) { + param.typeAnnotation = this.flowParseTypeAnnotation(); + } else if (this.isThisParam(param)) { + this.raise(FlowErrors.ThisParamAnnotationRequired, param); + } + if (this.match(29) && this.isThisParam(param)) { + this.raise(FlowErrors.ThisParamNoDefault, param); + } + this.resetEndLocation(param); + return param; + } + parseMaybeDefault(startLoc, left) { + const node = super.parseMaybeDefault(startLoc, left); + if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { + this.raise(FlowErrors.TypeBeforeInitializer, node.typeAnnotation); + } + return node; + } + checkImportReflection(node) { + super.checkImportReflection(node); + if (node.module && node.importKind !== "value") { + this.raise(FlowErrors.ImportReflectionHasImportType, node.specifiers[0].loc.start); + } + } + parseImportSpecifierLocal(node, specifier, type) { + specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true, true) : this.parseIdentifier(); + node.specifiers.push(this.finishImportSpecifier(specifier, type)); + } + isPotentialImportPhase(isExport) { + if (super.isPotentialImportPhase(isExport)) return true; + if (this.isContextual(130)) { + if (!isExport) return true; + const ch = this.lookaheadCharCode(); + return ch === 123 || ch === 42; + } + return !isExport && this.isContextual(87); + } + applyImportPhase(node, isExport, phase, loc) { + super.applyImportPhase(node, isExport, phase, loc); + if (isExport) { + if (!phase && this.match(65)) { + return; + } + node.exportKind = phase === "type" ? phase : "value"; + } else { + if (phase === "type" && this.match(55)) this.unexpected(); + node.importKind = phase === "type" || phase === "typeof" ? phase : "value"; + } + } + parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) { + const firstIdent = specifier.imported; + let specifierTypeKind = null; + if (firstIdent.type === "Identifier") { + if (firstIdent.name === "type") { + specifierTypeKind = "type"; + } else if (firstIdent.name === "typeof") { + specifierTypeKind = "typeof"; + } + } + let isBinding = false; + if (this.isContextual(93) && !this.isLookaheadContextual("as")) { + const as_ident = this.parseIdentifier(true); + if (specifierTypeKind !== null && !tokenIsKeywordOrIdentifier(this.state.type)) { + specifier.imported = as_ident; + specifier.importKind = specifierTypeKind; + specifier.local = cloneIdentifier(as_ident); + } else { + specifier.imported = firstIdent; + specifier.importKind = null; + specifier.local = this.parseIdentifier(); + } + } else { + if (specifierTypeKind !== null && tokenIsKeywordOrIdentifier(this.state.type)) { + specifier.imported = this.parseIdentifier(true); + specifier.importKind = specifierTypeKind; + } else { + if (importedIsString) { + throw this.raise(Errors.ImportBindingIsString, specifier, { + importName: firstIdent.value + }); + } + specifier.imported = firstIdent; + specifier.importKind = null; + } + if (this.eatContextual(93)) { + specifier.local = this.parseIdentifier(); + } else { + isBinding = true; + specifier.local = cloneIdentifier(specifier.imported); + } + } + const specifierIsTypeImport = hasTypeImportKind(specifier); + if (isInTypeOnlyImport && specifierIsTypeImport) { + this.raise(FlowErrors.ImportTypeShorthandOnlyInPureImport, specifier); + } + if (isInTypeOnlyImport || specifierIsTypeImport) { + this.checkReservedType(specifier.local.name, specifier.local.loc.start, true); + } + if (isBinding && !isInTypeOnlyImport && !specifierIsTypeImport) { + this.checkReservedWord(specifier.local.name, specifier.loc.start, true, true); + } + return this.finishImportSpecifier(specifier, "ImportSpecifier"); + } + parseBindingAtom() { + switch (this.state.type) { + case 78: + return this.parseIdentifier(true); + default: + return super.parseBindingAtom(); + } + } + parseFunctionParams(node, isConstructor) { + const kind = node.kind; + if (kind !== "get" && kind !== "set" && this.match(47)) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } + super.parseFunctionParams(node, isConstructor); + } + parseVarId(decl, kind) { + super.parseVarId(decl, kind); + if (this.match(14)) { + decl.id.typeAnnotation = this.flowParseTypeAnnotation(); + this.resetEndLocation(decl.id); + } + } + parseAsyncArrowFromCallExpression(node, call) { + if (this.match(14)) { + const oldNoAnonFunctionType = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = true; + node.returnType = this.flowParseTypeAnnotation(); + this.state.noAnonFunctionType = oldNoAnonFunctionType; + } + return super.parseAsyncArrowFromCallExpression(node, call); + } + shouldParseAsyncArrow() { + return this.match(14) || super.shouldParseAsyncArrow(); + } + parseMaybeAssign(refExpressionErrors, afterLeftParse) { + var _jsx; + let state = null; + let jsx; + if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) { + state = this.state.clone(); + jsx = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state); + if (!jsx.error) return jsx.node; + const { + context + } = this.state; + const currentContext = context[context.length - 1]; + if (currentContext === types.j_oTag || currentContext === types.j_expr) { + context.pop(); + } + } + if ((_jsx = jsx) != null && _jsx.error || this.match(47)) { + var _jsx2, _jsx3; + state = state || this.state.clone(); + let typeParameters; + const arrow = this.tryParse(abort => { + var _arrowExpression$extr; + typeParameters = this.flowParseTypeParameterDeclaration(); + const arrowExpression = this.forwardNoArrowParamsConversionAt(typeParameters, () => { + const result = super.parseMaybeAssign(refExpressionErrors, afterLeftParse); + this.resetStartLocationFromNode(result, typeParameters); + return result; + }); + if ((_arrowExpression$extr = arrowExpression.extra) != null && _arrowExpression$extr.parenthesized) abort(); + const expr = this.maybeUnwrapTypeCastExpression(arrowExpression); + if (expr.type !== "ArrowFunctionExpression") abort(); + expr.typeParameters = typeParameters; + this.resetStartLocationFromNode(expr, typeParameters); + return arrowExpression; + }, state); + let arrowExpression = null; + if (arrow.node && this.maybeUnwrapTypeCastExpression(arrow.node).type === "ArrowFunctionExpression") { + if (!arrow.error && !arrow.aborted) { + if (arrow.node.async) { + this.raise(FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction, typeParameters); + } + return arrow.node; + } + arrowExpression = arrow.node; + } + if ((_jsx2 = jsx) != null && _jsx2.node) { + this.state = jsx.failState; + return jsx.node; + } + if (arrowExpression) { + this.state = arrow.failState; + return arrowExpression; + } + if ((_jsx3 = jsx) != null && _jsx3.thrown) throw jsx.error; + if (arrow.thrown) throw arrow.error; + throw this.raise(FlowErrors.UnexpectedTokenAfterTypeParameter, typeParameters); + } + return super.parseMaybeAssign(refExpressionErrors, afterLeftParse); + } + parseArrow(node) { + if (this.match(14)) { + const result = this.tryParse(() => { + const oldNoAnonFunctionType = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = true; + const typeNode = this.startNode(); + [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); + this.state.noAnonFunctionType = oldNoAnonFunctionType; + if (this.canInsertSemicolon()) this.unexpected(); + if (!this.match(19)) this.unexpected(); + return typeNode; + }); + if (result.thrown) return null; + if (result.error) this.state = result.failState; + node.returnType = result.node.typeAnnotation ? this.finishNode(result.node, "TypeAnnotation") : null; + } + return super.parseArrow(node); + } + shouldParseArrow(params) { + return this.match(14) || super.shouldParseArrow(params); + } + setArrowFunctionParameters(node, params) { + if (this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(node.start))) { + node.params = params; + } else { + super.setArrowFunctionParameters(node, params); + } + } + checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) { + if (isArrowFunction && this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(node.start))) { + return; + } + for (let i = 0; i < node.params.length; i++) { + if (this.isThisParam(node.params[i]) && i > 0) { + this.raise(FlowErrors.ThisParamMustBeFirst, node.params[i]); + } + } + super.checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged); + } + parseParenAndDistinguishExpression(canBeArrow) { + return super.parseParenAndDistinguishExpression(canBeArrow && !this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start))); + } + parseSubscripts(base, startLoc, noCalls) { + if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.includes(startLoc.index)) { + this.next(); + const node = this.startNodeAt(startLoc); + node.callee = base; + node.arguments = super.parseCallExpressionArguments(11); + base = this.finishNode(node, "CallExpression"); + } else if (base.type === "Identifier" && base.name === "async" && this.match(47)) { + const state = this.state.clone(); + const arrow = this.tryParse(abort => this.parseAsyncArrowWithTypeParameters(startLoc) || abort(), state); + if (!arrow.error && !arrow.aborted) return arrow.node; + const result = this.tryParse(() => super.parseSubscripts(base, startLoc, noCalls), state); + if (result.node && !result.error) return result.node; + if (arrow.node) { + this.state = arrow.failState; + return arrow.node; + } + if (result.node) { + this.state = result.failState; + return result.node; + } + throw arrow.error || result.error; + } + return super.parseSubscripts(base, startLoc, noCalls); + } + parseSubscript(base, startLoc, noCalls, subscriptState) { + if (this.match(18) && this.isLookaheadToken_lt()) { + subscriptState.optionalChainMember = true; + if (noCalls) { + subscriptState.stop = true; + return base; + } + this.next(); + const node = this.startNodeAt(startLoc); + node.callee = base; + node.typeArguments = this.flowParseTypeParameterInstantiationInExpression(); + this.expect(10); + node.arguments = this.parseCallExpressionArguments(11); + node.optional = true; + return this.finishCallExpression(node, true); + } else if (!noCalls && this.shouldParseTypes() && (this.match(47) || this.match(51))) { + const node = this.startNodeAt(startLoc); + node.callee = base; + const result = this.tryParse(() => { + node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew(); + this.expect(10); + node.arguments = super.parseCallExpressionArguments(11); + if (subscriptState.optionalChainMember) { + node.optional = false; + } + return this.finishCallExpression(node, subscriptState.optionalChainMember); + }); + if (result.node) { + if (result.error) this.state = result.failState; + return result.node; + } + } + return super.parseSubscript(base, startLoc, noCalls, subscriptState); + } + parseNewCallee(node) { + super.parseNewCallee(node); + let targs = null; + if (this.shouldParseTypes() && this.match(47)) { + targs = this.tryParse(() => this.flowParseTypeParameterInstantiationCallOrNew()).node; + } + node.typeArguments = targs; + } + parseAsyncArrowWithTypeParameters(startLoc) { + const node = this.startNodeAt(startLoc); + this.parseFunctionParams(node, false); + if (!this.parseArrow(node)) return; + return super.parseArrowExpression(node, undefined, true); + } + readToken_mult_modulo(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + if (code === 42 && next === 47 && this.state.hasFlowComment) { + this.state.hasFlowComment = false; + this.state.pos += 2; + this.nextToken(); + return; + } + super.readToken_mult_modulo(code); + } + readToken_pipe_amp(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + if (code === 124 && next === 125) { + this.finishOp(9, 2); + return; + } + super.readToken_pipe_amp(code); + } + parseTopLevel(file, program) { + const fileNode = super.parseTopLevel(file, program); + if (this.state.hasFlowComment) { + this.raise(FlowErrors.UnterminatedFlowComment, this.state.curPosition()); + } + return fileNode; + } + skipBlockComment() { + if (this.hasPlugin("flowComments") && this.skipFlowComment()) { + if (this.state.hasFlowComment) { + throw this.raise(FlowErrors.NestedFlowComment, this.state.startLoc); + } + this.hasFlowCommentCompletion(); + const commentSkip = this.skipFlowComment(); + if (commentSkip) { + this.state.pos += commentSkip; + this.state.hasFlowComment = true; + } + return; + } + return super.skipBlockComment(this.state.hasFlowComment ? "*-/" : "*/"); + } + skipFlowComment() { + const { + pos + } = this.state; + let shiftToFirstNonWhiteSpace = 2; + while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) { + shiftToFirstNonWhiteSpace++; + } + const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos); + const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1); + if (ch2 === 58 && ch3 === 58) { + return shiftToFirstNonWhiteSpace + 2; + } + if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") { + return shiftToFirstNonWhiteSpace + 12; + } + if (ch2 === 58 && ch3 !== 58) { + return shiftToFirstNonWhiteSpace; + } + return false; + } + hasFlowCommentCompletion() { + const end = this.input.indexOf("*/", this.state.pos); + if (end === -1) { + throw this.raise(Errors.UnterminatedComment, this.state.curPosition()); + } + } + flowEnumErrorBooleanMemberNotInitialized(loc, { + enumName, + memberName + }) { + this.raise(FlowErrors.EnumBooleanMemberNotInitialized, loc, { + memberName, + enumName + }); + } + flowEnumErrorInvalidMemberInitializer(loc, enumContext) { + return this.raise(!enumContext.explicitType ? FlowErrors.EnumInvalidMemberInitializerUnknownType : enumContext.explicitType === "symbol" ? FlowErrors.EnumInvalidMemberInitializerSymbolType : FlowErrors.EnumInvalidMemberInitializerPrimaryType, loc, enumContext); + } + flowEnumErrorNumberMemberNotInitialized(loc, details) { + this.raise(FlowErrors.EnumNumberMemberNotInitialized, loc, details); + } + flowEnumErrorStringMemberInconsistentlyInitialized(node, details) { + this.raise(FlowErrors.EnumStringMemberInconsistentlyInitialized, node, details); + } + flowEnumMemberInit() { + const startLoc = this.state.startLoc; + const endOfInit = () => this.match(12) || this.match(8); + switch (this.state.type) { + case 135: + { + const literal = this.parseNumericLiteral(this.state.value); + if (endOfInit()) { + return { + type: "number", + loc: literal.loc.start, + value: literal + }; + } + return { + type: "invalid", + loc: startLoc + }; + } + case 134: + { + const literal = this.parseStringLiteral(this.state.value); + if (endOfInit()) { + return { + type: "string", + loc: literal.loc.start, + value: literal + }; + } + return { + type: "invalid", + loc: startLoc + }; + } + case 85: + case 86: + { + const literal = this.parseBooleanLiteral(this.match(85)); + if (endOfInit()) { + return { + type: "boolean", + loc: literal.loc.start, + value: literal + }; + } + return { + type: "invalid", + loc: startLoc + }; + } + default: + return { + type: "invalid", + loc: startLoc + }; + } + } + flowEnumMemberRaw() { + const loc = this.state.startLoc; + const id = this.parseIdentifier(true); + const init = this.eat(29) ? this.flowEnumMemberInit() : { + type: "none", + loc + }; + return { + id, + init + }; + } + flowEnumCheckExplicitTypeMismatch(loc, context, expectedType) { + const { + explicitType + } = context; + if (explicitType === null) { + return; + } + if (explicitType !== expectedType) { + this.flowEnumErrorInvalidMemberInitializer(loc, context); + } + } + flowEnumMembers({ + enumName, + explicitType + }) { + const seenNames = new Set(); + const members = { + booleanMembers: [], + numberMembers: [], + stringMembers: [], + defaultedMembers: [] + }; + let hasUnknownMembers = false; + while (!this.match(8)) { + if (this.eat(21)) { + hasUnknownMembers = true; + break; + } + const memberNode = this.startNode(); + const { + id, + init + } = this.flowEnumMemberRaw(); + const memberName = id.name; + if (memberName === "") { + continue; + } + if (/^[a-z]/.test(memberName)) { + this.raise(FlowErrors.EnumInvalidMemberName, id, { + memberName, + suggestion: memberName[0].toUpperCase() + memberName.slice(1), + enumName + }); + } + if (seenNames.has(memberName)) { + this.raise(FlowErrors.EnumDuplicateMemberName, id, { + memberName, + enumName + }); + } + seenNames.add(memberName); + const context = { + enumName, + explicitType, + memberName + }; + memberNode.id = id; + switch (init.type) { + case "boolean": + { + this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "boolean"); + memberNode.init = init.value; + members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember")); + break; + } + case "number": + { + this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "number"); + memberNode.init = init.value; + members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember")); + break; + } + case "string": + { + this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "string"); + memberNode.init = init.value; + members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember")); + break; + } + case "invalid": + { + throw this.flowEnumErrorInvalidMemberInitializer(init.loc, context); + } + case "none": + { + switch (explicitType) { + case "boolean": + this.flowEnumErrorBooleanMemberNotInitialized(init.loc, context); + break; + case "number": + this.flowEnumErrorNumberMemberNotInitialized(init.loc, context); + break; + default: + members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember")); + } + } + } + if (!this.match(8)) { + this.expect(12); + } + } + return { + members, + hasUnknownMembers + }; + } + flowEnumStringMembers(initializedMembers, defaultedMembers, { + enumName + }) { + if (initializedMembers.length === 0) { + return defaultedMembers; + } else if (defaultedMembers.length === 0) { + return initializedMembers; + } else if (defaultedMembers.length > initializedMembers.length) { + for (const member of initializedMembers) { + this.flowEnumErrorStringMemberInconsistentlyInitialized(member, { + enumName + }); + } + return defaultedMembers; + } else { + for (const member of defaultedMembers) { + this.flowEnumErrorStringMemberInconsistentlyInitialized(member, { + enumName + }); + } + return initializedMembers; + } + } + flowEnumParseExplicitType({ + enumName + }) { + if (!this.eatContextual(102)) return null; + if (!tokenIsIdentifier(this.state.type)) { + throw this.raise(FlowErrors.EnumInvalidExplicitTypeUnknownSupplied, this.state.startLoc, { + enumName + }); + } + const { + value + } = this.state; + this.next(); + if (value !== "boolean" && value !== "number" && value !== "string" && value !== "symbol") { + this.raise(FlowErrors.EnumInvalidExplicitType, this.state.startLoc, { + enumName, + invalidEnumType: value + }); + } + return value; + } + flowEnumBody(node, id) { + const enumName = id.name; + const nameLoc = id.loc.start; + const explicitType = this.flowEnumParseExplicitType({ + enumName + }); + this.expect(5); + const { + members, + hasUnknownMembers + } = this.flowEnumMembers({ + enumName, + explicitType + }); + node.hasUnknownMembers = hasUnknownMembers; + switch (explicitType) { + case "boolean": + node.explicitType = true; + node.members = members.booleanMembers; + this.expect(8); + return this.finishNode(node, "EnumBooleanBody"); + case "number": + node.explicitType = true; + node.members = members.numberMembers; + this.expect(8); + return this.finishNode(node, "EnumNumberBody"); + case "string": + node.explicitType = true; + node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, { + enumName + }); + this.expect(8); + return this.finishNode(node, "EnumStringBody"); + case "symbol": + node.members = members.defaultedMembers; + this.expect(8); + return this.finishNode(node, "EnumSymbolBody"); + default: + { + const empty = () => { + node.members = []; + this.expect(8); + return this.finishNode(node, "EnumStringBody"); + }; + node.explicitType = false; + const boolsLen = members.booleanMembers.length; + const numsLen = members.numberMembers.length; + const strsLen = members.stringMembers.length; + const defaultedLen = members.defaultedMembers.length; + if (!boolsLen && !numsLen && !strsLen && !defaultedLen) { + return empty(); + } else if (!boolsLen && !numsLen) { + node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, { + enumName + }); + this.expect(8); + return this.finishNode(node, "EnumStringBody"); + } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) { + for (const member of members.defaultedMembers) { + this.flowEnumErrorBooleanMemberNotInitialized(member.loc.start, { + enumName, + memberName: member.id.name + }); + } + node.members = members.booleanMembers; + this.expect(8); + return this.finishNode(node, "EnumBooleanBody"); + } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) { + for (const member of members.defaultedMembers) { + this.flowEnumErrorNumberMemberNotInitialized(member.loc.start, { + enumName, + memberName: member.id.name + }); + } + node.members = members.numberMembers; + this.expect(8); + return this.finishNode(node, "EnumNumberBody"); + } else { + this.raise(FlowErrors.EnumInconsistentMemberValues, nameLoc, { + enumName + }); + return empty(); + } + } + } + } + flowParseEnumDeclaration(node) { + const id = this.parseIdentifier(); + node.id = id; + node.body = this.flowEnumBody(this.startNode(), id); + return this.finishNode(node, "EnumDeclaration"); + } + jsxParseOpeningElementAfterName(node) { + if (this.shouldParseTypes()) { + if (this.match(47) || this.match(51)) { + node.typeArguments = this.flowParseTypeParameterInstantiationInExpression(); + } + } + return super.jsxParseOpeningElementAfterName(node); + } + isLookaheadToken_lt() { + const next = this.nextTokenStart(); + if (this.input.charCodeAt(next) === 60) { + const afterNext = this.input.charCodeAt(next + 1); + return afterNext !== 60 && afterNext !== 61; + } + return false; + } + reScan_lt_gt() { + const { + type + } = this.state; + if (type === 47) { + this.state.pos -= 1; + this.readToken_lt(); + } else if (type === 48) { + this.state.pos -= 1; + this.readToken_gt(); + } + } + reScan_lt() { + const { + type + } = this.state; + if (type === 51) { + this.state.pos -= 2; + this.finishOp(47, 1); + return 47; + } + return type; + } + maybeUnwrapTypeCastExpression(node) { + return node.type === "TypeCastExpression" ? node.expression : node; + } +}; +const entities = { + __proto__: null, + quot: "\u0022", + amp: "&", + apos: "\u0027", + lt: "<", + gt: ">", + nbsp: "\u00A0", + iexcl: "\u00A1", + cent: "\u00A2", + pound: "\u00A3", + curren: "\u00A4", + yen: "\u00A5", + brvbar: "\u00A6", + sect: "\u00A7", + uml: "\u00A8", + copy: "\u00A9", + ordf: "\u00AA", + laquo: "\u00AB", + not: "\u00AC", + shy: "\u00AD", + reg: "\u00AE", + macr: "\u00AF", + deg: "\u00B0", + plusmn: "\u00B1", + sup2: "\u00B2", + sup3: "\u00B3", + acute: "\u00B4", + micro: "\u00B5", + para: "\u00B6", + middot: "\u00B7", + cedil: "\u00B8", + sup1: "\u00B9", + ordm: "\u00BA", + raquo: "\u00BB", + frac14: "\u00BC", + frac12: "\u00BD", + frac34: "\u00BE", + iquest: "\u00BF", + Agrave: "\u00C0", + Aacute: "\u00C1", + Acirc: "\u00C2", + Atilde: "\u00C3", + Auml: "\u00C4", + Aring: "\u00C5", + AElig: "\u00C6", + Ccedil: "\u00C7", + Egrave: "\u00C8", + Eacute: "\u00C9", + Ecirc: "\u00CA", + Euml: "\u00CB", + Igrave: "\u00CC", + Iacute: "\u00CD", + Icirc: "\u00CE", + Iuml: "\u00CF", + ETH: "\u00D0", + Ntilde: "\u00D1", + Ograve: "\u00D2", + Oacute: "\u00D3", + Ocirc: "\u00D4", + Otilde: "\u00D5", + Ouml: "\u00D6", + times: "\u00D7", + Oslash: "\u00D8", + Ugrave: "\u00D9", + Uacute: "\u00DA", + Ucirc: "\u00DB", + Uuml: "\u00DC", + Yacute: "\u00DD", + THORN: "\u00DE", + szlig: "\u00DF", + agrave: "\u00E0", + aacute: "\u00E1", + acirc: "\u00E2", + atilde: "\u00E3", + auml: "\u00E4", + aring: "\u00E5", + aelig: "\u00E6", + ccedil: "\u00E7", + egrave: "\u00E8", + eacute: "\u00E9", + ecirc: "\u00EA", + euml: "\u00EB", + igrave: "\u00EC", + iacute: "\u00ED", + icirc: "\u00EE", + iuml: "\u00EF", + eth: "\u00F0", + ntilde: "\u00F1", + ograve: "\u00F2", + oacute: "\u00F3", + ocirc: "\u00F4", + otilde: "\u00F5", + ouml: "\u00F6", + divide: "\u00F7", + oslash: "\u00F8", + ugrave: "\u00F9", + uacute: "\u00FA", + ucirc: "\u00FB", + uuml: "\u00FC", + yacute: "\u00FD", + thorn: "\u00FE", + yuml: "\u00FF", + OElig: "\u0152", + oelig: "\u0153", + Scaron: "\u0160", + scaron: "\u0161", + Yuml: "\u0178", + fnof: "\u0192", + circ: "\u02C6", + tilde: "\u02DC", + Alpha: "\u0391", + Beta: "\u0392", + Gamma: "\u0393", + Delta: "\u0394", + Epsilon: "\u0395", + Zeta: "\u0396", + Eta: "\u0397", + Theta: "\u0398", + Iota: "\u0399", + Kappa: "\u039A", + Lambda: "\u039B", + Mu: "\u039C", + Nu: "\u039D", + Xi: "\u039E", + Omicron: "\u039F", + Pi: "\u03A0", + Rho: "\u03A1", + Sigma: "\u03A3", + Tau: "\u03A4", + Upsilon: "\u03A5", + Phi: "\u03A6", + Chi: "\u03A7", + Psi: "\u03A8", + Omega: "\u03A9", + alpha: "\u03B1", + beta: "\u03B2", + gamma: "\u03B3", + delta: "\u03B4", + epsilon: "\u03B5", + zeta: "\u03B6", + eta: "\u03B7", + theta: "\u03B8", + iota: "\u03B9", + kappa: "\u03BA", + lambda: "\u03BB", + mu: "\u03BC", + nu: "\u03BD", + xi: "\u03BE", + omicron: "\u03BF", + pi: "\u03C0", + rho: "\u03C1", + sigmaf: "\u03C2", + sigma: "\u03C3", + tau: "\u03C4", + upsilon: "\u03C5", + phi: "\u03C6", + chi: "\u03C7", + psi: "\u03C8", + omega: "\u03C9", + thetasym: "\u03D1", + upsih: "\u03D2", + piv: "\u03D6", + ensp: "\u2002", + emsp: "\u2003", + thinsp: "\u2009", + zwnj: "\u200C", + zwj: "\u200D", + lrm: "\u200E", + rlm: "\u200F", + ndash: "\u2013", + mdash: "\u2014", + lsquo: "\u2018", + rsquo: "\u2019", + sbquo: "\u201A", + ldquo: "\u201C", + rdquo: "\u201D", + bdquo: "\u201E", + dagger: "\u2020", + Dagger: "\u2021", + bull: "\u2022", + hellip: "\u2026", + permil: "\u2030", + prime: "\u2032", + Prime: "\u2033", + lsaquo: "\u2039", + rsaquo: "\u203A", + oline: "\u203E", + frasl: "\u2044", + euro: "\u20AC", + image: "\u2111", + weierp: "\u2118", + real: "\u211C", + trade: "\u2122", + alefsym: "\u2135", + larr: "\u2190", + uarr: "\u2191", + rarr: "\u2192", + darr: "\u2193", + harr: "\u2194", + crarr: "\u21B5", + lArr: "\u21D0", + uArr: "\u21D1", + rArr: "\u21D2", + dArr: "\u21D3", + hArr: "\u21D4", + forall: "\u2200", + part: "\u2202", + exist: "\u2203", + empty: "\u2205", + nabla: "\u2207", + isin: "\u2208", + notin: "\u2209", + ni: "\u220B", + prod: "\u220F", + sum: "\u2211", + minus: "\u2212", + lowast: "\u2217", + radic: "\u221A", + prop: "\u221D", + infin: "\u221E", + ang: "\u2220", + and: "\u2227", + or: "\u2228", + cap: "\u2229", + cup: "\u222A", + int: "\u222B", + there4: "\u2234", + sim: "\u223C", + cong: "\u2245", + asymp: "\u2248", + ne: "\u2260", + equiv: "\u2261", + le: "\u2264", + ge: "\u2265", + sub: "\u2282", + sup: "\u2283", + nsub: "\u2284", + sube: "\u2286", + supe: "\u2287", + oplus: "\u2295", + otimes: "\u2297", + perp: "\u22A5", + sdot: "\u22C5", + lceil: "\u2308", + rceil: "\u2309", + lfloor: "\u230A", + rfloor: "\u230B", + lang: "\u2329", + rang: "\u232A", + loz: "\u25CA", + spades: "\u2660", + clubs: "\u2663", + hearts: "\u2665", + diams: "\u2666" +}; +const JsxErrors = ParseErrorEnum`jsx`({ + AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.", + MissingClosingTagElement: ({ + openingTagName + }) => `Expected corresponding JSX closing tag for <${openingTagName}>.`, + MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>.", + UnexpectedSequenceExpression: "Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?", + UnexpectedToken: ({ + unexpected, + HTMLEntity + }) => `Unexpected token \`${unexpected}\`. Did you mean \`${HTMLEntity}\` or \`{'${unexpected}'}\`?`, + UnsupportedJsxValue: "JSX value should be either an expression or a quoted JSX text.", + UnterminatedJsxContent: "Unterminated JSX contents.", + UnwrappedAdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?" +}); +function isFragment(object) { + return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false; +} +function getQualifiedJSXName(object) { + if (object.type === "JSXIdentifier") { + return object.name; + } + if (object.type === "JSXNamespacedName") { + return object.namespace.name + ":" + object.name.name; + } + if (object.type === "JSXMemberExpression") { + return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property); + } + throw new Error("Node had unexpected type: " + object.type); +} +var jsx = superClass => class JSXParserMixin extends superClass { + jsxReadToken() { + let out = ""; + let chunkStart = this.state.pos; + for (;;) { + if (this.state.pos >= this.length) { + throw this.raise(JsxErrors.UnterminatedJsxContent, this.state.startLoc); + } + const ch = this.input.charCodeAt(this.state.pos); + switch (ch) { + case 60: + case 123: + if (this.state.pos === this.state.start) { + if (ch === 60 && this.state.canStartJSXElement) { + ++this.state.pos; + this.finishToken(143); + } else { + super.getTokenFromCode(ch); + } + return; + } + out += this.input.slice(chunkStart, this.state.pos); + this.finishToken(142, out); + return; + case 38: + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadEntity(); + chunkStart = this.state.pos; + break; + case 62: + case 125: + default: + if (isNewLine(ch)) { + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadNewLine(true); + chunkStart = this.state.pos; + } else { + ++this.state.pos; + } + } + } + } + jsxReadNewLine(normalizeCRLF) { + const ch = this.input.charCodeAt(this.state.pos); + let out; + ++this.state.pos; + if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) { + ++this.state.pos; + out = normalizeCRLF ? "\n" : "\r\n"; + } else { + out = String.fromCharCode(ch); + } + ++this.state.curLine; + this.state.lineStart = this.state.pos; + return out; + } + jsxReadString(quote) { + let out = ""; + let chunkStart = ++this.state.pos; + for (;;) { + if (this.state.pos >= this.length) { + throw this.raise(Errors.UnterminatedString, this.state.startLoc); + } + const ch = this.input.charCodeAt(this.state.pos); + if (ch === quote) break; + if (ch === 38) { + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadEntity(); + chunkStart = this.state.pos; + } else if (isNewLine(ch)) { + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadNewLine(false); + chunkStart = this.state.pos; + } else { + ++this.state.pos; + } + } + out += this.input.slice(chunkStart, this.state.pos++); + this.finishToken(134, out); + } + jsxReadEntity() { + const startPos = ++this.state.pos; + if (this.codePointAtPos(this.state.pos) === 35) { + ++this.state.pos; + let radix = 10; + if (this.codePointAtPos(this.state.pos) === 120) { + radix = 16; + ++this.state.pos; + } + const codePoint = this.readInt(radix, undefined, false, "bail"); + if (codePoint !== null && this.codePointAtPos(this.state.pos) === 59) { + ++this.state.pos; + return String.fromCodePoint(codePoint); + } + } else { + let count = 0; + let semi = false; + while (count++ < 10 && this.state.pos < this.length && !(semi = this.codePointAtPos(this.state.pos) === 59)) { + ++this.state.pos; + } + if (semi) { + const desc = this.input.slice(startPos, this.state.pos); + const entity = entities[desc]; + ++this.state.pos; + if (entity) { + return entity; + } + } + } + this.state.pos = startPos; + return "&"; + } + jsxReadWord() { + let ch; + const start = this.state.pos; + do { + ch = this.input.charCodeAt(++this.state.pos); + } while (isIdentifierChar(ch) || ch === 45); + this.finishToken(141, this.input.slice(start, this.state.pos)); + } + jsxParseIdentifier() { + const node = this.startNode(); + if (this.match(141)) { + node.name = this.state.value; + } else if (tokenIsKeyword(this.state.type)) { + node.name = tokenLabelName(this.state.type); + } else { + this.unexpected(); + } + this.next(); + return this.finishNode(node, "JSXIdentifier"); + } + jsxParseNamespacedName() { + const startLoc = this.state.startLoc; + const name = this.jsxParseIdentifier(); + if (!this.eat(14)) return name; + const node = this.startNodeAt(startLoc); + node.namespace = name; + node.name = this.jsxParseIdentifier(); + return this.finishNode(node, "JSXNamespacedName"); + } + jsxParseElementName() { + const startLoc = this.state.startLoc; + let node = this.jsxParseNamespacedName(); + if (node.type === "JSXNamespacedName") { + return node; + } + while (this.eat(16)) { + const newNode = this.startNodeAt(startLoc); + newNode.object = node; + newNode.property = this.jsxParseIdentifier(); + node = this.finishNode(newNode, "JSXMemberExpression"); + } + return node; + } + jsxParseAttributeValue() { + let node; + switch (this.state.type) { + case 5: + node = this.startNode(); + this.setContext(types.brace); + this.next(); + node = this.jsxParseExpressionContainer(node, types.j_oTag); + if (node.expression.type === "JSXEmptyExpression") { + this.raise(JsxErrors.AttributeIsEmpty, node); + } + return node; + case 143: + case 134: + return this.parseExprAtom(); + default: + throw this.raise(JsxErrors.UnsupportedJsxValue, this.state.startLoc); + } + } + jsxParseEmptyExpression() { + const node = this.startNodeAt(this.state.lastTokEndLoc); + return this.finishNodeAt(node, "JSXEmptyExpression", this.state.startLoc); + } + jsxParseSpreadChild(node) { + this.next(); + node.expression = this.parseExpression(); + this.setContext(types.j_expr); + this.state.canStartJSXElement = true; + this.expect(8); + return this.finishNode(node, "JSXSpreadChild"); + } + jsxParseExpressionContainer(node, previousContext) { + if (this.match(8)) { + node.expression = this.jsxParseEmptyExpression(); + } else { + const expression = this.parseExpression(); + node.expression = expression; + } + this.setContext(previousContext); + this.state.canStartJSXElement = true; + this.expect(8); + return this.finishNode(node, "JSXExpressionContainer"); + } + jsxParseAttribute() { + const node = this.startNode(); + if (this.match(5)) { + this.setContext(types.brace); + this.next(); + this.expect(21); + node.argument = this.parseMaybeAssignAllowIn(); + this.setContext(types.j_oTag); + this.state.canStartJSXElement = true; + this.expect(8); + return this.finishNode(node, "JSXSpreadAttribute"); + } + node.name = this.jsxParseNamespacedName(); + node.value = this.eat(29) ? this.jsxParseAttributeValue() : null; + return this.finishNode(node, "JSXAttribute"); + } + jsxParseOpeningElementAt(startLoc) { + const node = this.startNodeAt(startLoc); + if (this.eat(144)) { + return this.finishNode(node, "JSXOpeningFragment"); + } + node.name = this.jsxParseElementName(); + return this.jsxParseOpeningElementAfterName(node); + } + jsxParseOpeningElementAfterName(node) { + const attributes = []; + while (!this.match(56) && !this.match(144)) { + attributes.push(this.jsxParseAttribute()); + } + node.attributes = attributes; + node.selfClosing = this.eat(56); + this.expect(144); + return this.finishNode(node, "JSXOpeningElement"); + } + jsxParseClosingElementAt(startLoc) { + const node = this.startNodeAt(startLoc); + if (this.eat(144)) { + return this.finishNode(node, "JSXClosingFragment"); + } + node.name = this.jsxParseElementName(); + this.expect(144); + return this.finishNode(node, "JSXClosingElement"); + } + jsxParseElementAt(startLoc) { + const node = this.startNodeAt(startLoc); + const children = []; + const openingElement = this.jsxParseOpeningElementAt(startLoc); + let closingElement = null; + if (!openingElement.selfClosing) { + contents: for (;;) { + switch (this.state.type) { + case 143: + startLoc = this.state.startLoc; + this.next(); + if (this.eat(56)) { + closingElement = this.jsxParseClosingElementAt(startLoc); + break contents; + } + children.push(this.jsxParseElementAt(startLoc)); + break; + case 142: + children.push(this.parseLiteral(this.state.value, "JSXText")); + break; + case 5: + { + const node = this.startNode(); + this.setContext(types.brace); + this.next(); + if (this.match(21)) { + children.push(this.jsxParseSpreadChild(node)); + } else { + children.push(this.jsxParseExpressionContainer(node, types.j_expr)); + } + break; + } + default: + this.unexpected(); + } + } + if (isFragment(openingElement) && !isFragment(closingElement) && closingElement !== null) { + this.raise(JsxErrors.MissingClosingTagFragment, closingElement); + } else if (!isFragment(openingElement) && isFragment(closingElement)) { + this.raise(JsxErrors.MissingClosingTagElement, closingElement, { + openingTagName: getQualifiedJSXName(openingElement.name) + }); + } else if (!isFragment(openingElement) && !isFragment(closingElement)) { + if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) { + this.raise(JsxErrors.MissingClosingTagElement, closingElement, { + openingTagName: getQualifiedJSXName(openingElement.name) + }); + } + } + } + if (isFragment(openingElement)) { + node.openingFragment = openingElement; + node.closingFragment = closingElement; + } else { + node.openingElement = openingElement; + node.closingElement = closingElement; + } + node.children = children; + if (this.match(47)) { + throw this.raise(JsxErrors.UnwrappedAdjacentJSXElements, this.state.startLoc); + } + return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement"); + } + jsxParseElement() { + const startLoc = this.state.startLoc; + this.next(); + return this.jsxParseElementAt(startLoc); + } + setContext(newContext) { + const { + context + } = this.state; + context[context.length - 1] = newContext; + } + parseExprAtom(refExpressionErrors) { + if (this.match(143)) { + return this.jsxParseElement(); + } else if (this.match(47) && this.input.charCodeAt(this.state.pos) !== 33) { + this.replaceToken(143); + return this.jsxParseElement(); + } else { + return super.parseExprAtom(refExpressionErrors); + } + } + skipSpace() { + const curContext = this.curContext(); + if (!curContext.preserveSpace) super.skipSpace(); + } + getTokenFromCode(code) { + const context = this.curContext(); + if (context === types.j_expr) { + this.jsxReadToken(); + return; + } + if (context === types.j_oTag || context === types.j_cTag) { + if (isIdentifierStart(code)) { + this.jsxReadWord(); + return; + } + if (code === 62) { + ++this.state.pos; + this.finishToken(144); + return; + } + if ((code === 34 || code === 39) && context === types.j_oTag) { + this.jsxReadString(code); + return; + } + } + if (code === 60 && this.state.canStartJSXElement && this.input.charCodeAt(this.state.pos + 1) !== 33) { + ++this.state.pos; + this.finishToken(143); + return; + } + super.getTokenFromCode(code); + } + updateContext(prevType) { + const { + context, + type + } = this.state; + if (type === 56 && prevType === 143) { + context.splice(-2, 2, types.j_cTag); + this.state.canStartJSXElement = false; + } else if (type === 143) { + context.push(types.j_oTag); + } else if (type === 144) { + const out = context[context.length - 1]; + if (out === types.j_oTag && prevType === 56 || out === types.j_cTag) { + context.pop(); + this.state.canStartJSXElement = context[context.length - 1] === types.j_expr; + } else { + this.setContext(types.j_expr); + this.state.canStartJSXElement = true; + } + } else { + this.state.canStartJSXElement = tokenComesBeforeExpression(type); + } + } +}; +class TypeScriptScope extends Scope { + constructor(...args) { + super(...args); + this.tsNames = new Map(); + } +} +class TypeScriptScopeHandler extends ScopeHandler { + constructor(...args) { + super(...args); + this.importsStack = []; + } + createScope(flags) { + this.importsStack.push(new Set()); + return new TypeScriptScope(flags); + } + enter(flags) { + if (flags === 256) { + this.importsStack.push(new Set()); + } + super.enter(flags); + } + exit() { + const flags = super.exit(); + if (flags === 256) { + this.importsStack.pop(); + } + return flags; + } + hasImport(name, allowShadow) { + const len = this.importsStack.length; + if (this.importsStack[len - 1].has(name)) { + return true; + } + if (!allowShadow && len > 1) { + for (let i = 0; i < len - 1; i++) { + if (this.importsStack[i].has(name)) return true; + } + } + return false; + } + declareName(name, bindingType, loc) { + if (bindingType & 4096) { + if (this.hasImport(name, true)) { + this.parser.raise(Errors.VarRedeclaration, loc, { + identifierName: name + }); + } + this.importsStack[this.importsStack.length - 1].add(name); + return; + } + const scope = this.currentScope(); + let type = scope.tsNames.get(name) || 0; + if (bindingType & 1024) { + this.maybeExportDefined(scope, name); + scope.tsNames.set(name, type | 16); + return; + } + super.declareName(name, bindingType, loc); + if (bindingType & 2) { + if (!(bindingType & 1)) { + this.checkRedeclarationInScope(scope, name, bindingType, loc); + this.maybeExportDefined(scope, name); + } + type = type | 1; + } + if (bindingType & 256) { + type = type | 2; + } + if (bindingType & 512) { + type = type | 4; + } + if (bindingType & 128) { + type = type | 8; + } + if (type) scope.tsNames.set(name, type); + } + isRedeclaredInScope(scope, name, bindingType) { + const type = scope.tsNames.get(name); + if ((type & 2) > 0) { + if (bindingType & 256) { + const isConst = !!(bindingType & 512); + const wasConst = (type & 4) > 0; + return isConst !== wasConst; + } + return true; + } + if (bindingType & 128 && (type & 8) > 0) { + if (scope.names.get(name) & 2) { + return !!(bindingType & 1); + } else { + return false; + } + } + if (bindingType & 2 && (type & 1) > 0) { + return true; + } + return super.isRedeclaredInScope(scope, name, bindingType); + } + checkLocalExport(id) { + const { + name + } = id; + if (this.hasImport(name)) return; + const len = this.scopeStack.length; + for (let i = len - 1; i >= 0; i--) { + const scope = this.scopeStack[i]; + const type = scope.tsNames.get(name); + if ((type & 1) > 0 || (type & 16) > 0) { + return; + } + } + super.checkLocalExport(id); + } +} +const unwrapParenthesizedExpression = node => { + return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node; +}; +class LValParser extends NodeUtils { + toAssignable(node, isLHS = false) { + var _node$extra, _node$extra3; + let parenthesized = undefined; + if (node.type === "ParenthesizedExpression" || (_node$extra = node.extra) != null && _node$extra.parenthesized) { + parenthesized = unwrapParenthesizedExpression(node); + if (isLHS) { + if (parenthesized.type === "Identifier") { + this.expressionScope.recordArrowParameterBindingError(Errors.InvalidParenthesizedAssignment, node); + } else if (parenthesized.type !== "MemberExpression" && !this.isOptionalMemberExpression(parenthesized)) { + this.raise(Errors.InvalidParenthesizedAssignment, node); + } + } else { + this.raise(Errors.InvalidParenthesizedAssignment, node); + } + } + switch (node.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + case "RestElement": + break; + case "ObjectExpression": + node.type = "ObjectPattern"; + for (let i = 0, length = node.properties.length, last = length - 1; i < length; i++) { + var _node$extra2; + const prop = node.properties[i]; + const isLast = i === last; + this.toAssignableObjectExpressionProp(prop, isLast, isLHS); + if (isLast && prop.type === "RestElement" && (_node$extra2 = node.extra) != null && _node$extra2.trailingCommaLoc) { + this.raise(Errors.RestTrailingComma, node.extra.trailingCommaLoc); + } + } + break; + case "ObjectProperty": + { + const { + key, + value + } = node; + if (this.isPrivateName(key)) { + this.classScope.usePrivateName(this.getPrivateNameSV(key), key.loc.start); + } + this.toAssignable(value, isLHS); + break; + } + case "SpreadElement": + { + throw new Error("Internal @babel/parser error (this is a bug, please report it)." + " SpreadElement should be converted by .toAssignable's caller."); + } + case "ArrayExpression": + node.type = "ArrayPattern"; + this.toAssignableList(node.elements, (_node$extra3 = node.extra) == null ? void 0 : _node$extra3.trailingCommaLoc, isLHS); + break; + case "AssignmentExpression": + if (node.operator !== "=") { + this.raise(Errors.MissingEqInAssignment, node.left.loc.end); + } + node.type = "AssignmentPattern"; + delete node.operator; + this.toAssignable(node.left, isLHS); + break; + case "ParenthesizedExpression": + this.toAssignable(parenthesized, isLHS); + break; + } + } + toAssignableObjectExpressionProp(prop, isLast, isLHS) { + if (prop.type === "ObjectMethod") { + this.raise(prop.kind === "get" || prop.kind === "set" ? Errors.PatternHasAccessor : Errors.PatternHasMethod, prop.key); + } else if (prop.type === "SpreadElement") { + prop.type = "RestElement"; + const arg = prop.argument; + this.checkToRestConversion(arg, false); + this.toAssignable(arg, isLHS); + if (!isLast) { + this.raise(Errors.RestTrailingComma, prop); + } + } else { + this.toAssignable(prop, isLHS); + } + } + toAssignableList(exprList, trailingCommaLoc, isLHS) { + const end = exprList.length - 1; + for (let i = 0; i <= end; i++) { + const elt = exprList[i]; + if (!elt) continue; + if (elt.type === "SpreadElement") { + elt.type = "RestElement"; + const arg = elt.argument; + this.checkToRestConversion(arg, true); + this.toAssignable(arg, isLHS); + } else { + this.toAssignable(elt, isLHS); + } + if (elt.type === "RestElement") { + if (i < end) { + this.raise(Errors.RestTrailingComma, elt); + } else if (trailingCommaLoc) { + this.raise(Errors.RestTrailingComma, trailingCommaLoc); + } + } + } + } + isAssignable(node, isBinding) { + switch (node.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + case "RestElement": + return true; + case "ObjectExpression": + { + const last = node.properties.length - 1; + return node.properties.every((prop, i) => { + return prop.type !== "ObjectMethod" && (i === last || prop.type !== "SpreadElement") && this.isAssignable(prop); + }); + } + case "ObjectProperty": + return this.isAssignable(node.value); + case "SpreadElement": + return this.isAssignable(node.argument); + case "ArrayExpression": + return node.elements.every(element => element === null || this.isAssignable(element)); + case "AssignmentExpression": + return node.operator === "="; + case "ParenthesizedExpression": + return this.isAssignable(node.expression); + case "MemberExpression": + case "OptionalMemberExpression": + return !isBinding; + default: + return false; + } + } + toReferencedList(exprList, isParenthesizedExpr) { + return exprList; + } + toReferencedListDeep(exprList, isParenthesizedExpr) { + this.toReferencedList(exprList, isParenthesizedExpr); + for (const expr of exprList) { + if ((expr == null ? void 0 : expr.type) === "ArrayExpression") { + this.toReferencedListDeep(expr.elements); + } + } + } + parseSpread(refExpressionErrors) { + const node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssignAllowIn(refExpressionErrors, undefined); + return this.finishNode(node, "SpreadElement"); + } + parseRestBinding() { + const node = this.startNode(); + this.next(); + node.argument = this.parseBindingAtom(); + return this.finishNode(node, "RestElement"); + } + parseBindingAtom() { + switch (this.state.type) { + case 0: + { + const node = this.startNode(); + this.next(); + node.elements = this.parseBindingList(3, 93, 1); + return this.finishNode(node, "ArrayPattern"); + } + case 5: + return this.parseObjectLike(8, true); + } + return this.parseIdentifier(); + } + parseBindingList(close, closeCharCode, flags) { + const allowEmpty = flags & 1; + const elts = []; + let first = true; + while (!this.eat(close)) { + if (first) { + first = false; + } else { + this.expect(12); + } + if (allowEmpty && this.match(12)) { + elts.push(null); + } else if (this.eat(close)) { + break; + } else if (this.match(21)) { + let rest = this.parseRestBinding(); + if (this.hasPlugin("flow") || flags & 2) { + rest = this.parseFunctionParamType(rest); + } + elts.push(rest); + if (!this.checkCommaAfterRest(closeCharCode)) { + this.expect(close); + break; + } + } else { + const decorators = []; + if (this.match(26) && this.hasPlugin("decorators")) { + this.raise(Errors.UnsupportedParameterDecorator, this.state.startLoc); + } + while (this.match(26)) { + decorators.push(this.parseDecorator()); + } + elts.push(this.parseAssignableListItem(flags, decorators)); + } + } + return elts; + } + parseBindingRestProperty(prop) { + this.next(); + prop.argument = this.parseIdentifier(); + this.checkCommaAfterRest(125); + return this.finishNode(prop, "RestElement"); + } + parseBindingProperty() { + const { + type, + startLoc + } = this.state; + if (type === 21) { + return this.parseBindingRestProperty(this.startNode()); + } + const prop = this.startNode(); + if (type === 139) { + this.expectPlugin("destructuringPrivate", startLoc); + this.classScope.usePrivateName(this.state.value, startLoc); + prop.key = this.parsePrivateName(); + } else { + this.parsePropertyName(prop); + } + prop.method = false; + return this.parseObjPropValue(prop, startLoc, false, false, true, false); + } + parseAssignableListItem(flags, decorators) { + const left = this.parseMaybeDefault(); + if (this.hasPlugin("flow") || flags & 2) { + this.parseFunctionParamType(left); + } + const elt = this.parseMaybeDefault(left.loc.start, left); + if (decorators.length) { + left.decorators = decorators; + } + return elt; + } + parseFunctionParamType(param) { + return param; + } + parseMaybeDefault(startLoc, left) { + var _startLoc, _left; + (_startLoc = startLoc) != null ? _startLoc : startLoc = this.state.startLoc; + left = (_left = left) != null ? _left : this.parseBindingAtom(); + if (!this.eat(29)) return left; + const node = this.startNodeAt(startLoc); + node.left = left; + node.right = this.parseMaybeAssignAllowIn(); + return this.finishNode(node, "AssignmentPattern"); + } + isValidLVal(type, isUnparenthesizedInAssign, binding) { + switch (type) { + case "AssignmentPattern": + return "left"; + case "RestElement": + return "argument"; + case "ObjectProperty": + return "value"; + case "ParenthesizedExpression": + return "expression"; + case "ArrayPattern": + return "elements"; + case "ObjectPattern": + return "properties"; + } + return false; + } + isOptionalMemberExpression(expression) { + return expression.type === "OptionalMemberExpression"; + } + checkLVal(expression, ancestor, binding = 64, checkClashes = false, strictModeChanged = false, hasParenthesizedAncestor = false) { + var _expression$extra; + const type = expression.type; + if (this.isObjectMethod(expression)) return; + const isOptionalMemberExpression = this.isOptionalMemberExpression(expression); + if (isOptionalMemberExpression || type === "MemberExpression") { + if (isOptionalMemberExpression) { + this.expectPlugin("optionalChainingAssign", expression.loc.start); + if (ancestor.type !== "AssignmentExpression") { + this.raise(Errors.InvalidLhsOptionalChaining, expression, { + ancestor + }); + } + } + if (binding !== 64) { + this.raise(Errors.InvalidPropertyBindingPattern, expression); + } + return; + } + if (type === "Identifier") { + this.checkIdentifier(expression, binding, strictModeChanged); + const { + name + } = expression; + if (checkClashes) { + if (checkClashes.has(name)) { + this.raise(Errors.ParamDupe, expression); + } else { + checkClashes.add(name); + } + } + return; + } + const validity = this.isValidLVal(type, !(hasParenthesizedAncestor || (_expression$extra = expression.extra) != null && _expression$extra.parenthesized) && ancestor.type === "AssignmentExpression", binding); + if (validity === true) return; + if (validity === false) { + const ParseErrorClass = binding === 64 ? Errors.InvalidLhs : Errors.InvalidLhsBinding; + this.raise(ParseErrorClass, expression, { + ancestor + }); + return; + } + let key, isParenthesizedExpression; + if (typeof validity === "string") { + key = validity; + isParenthesizedExpression = type === "ParenthesizedExpression"; + } else { + [key, isParenthesizedExpression] = validity; + } + const nextAncestor = type === "ArrayPattern" || type === "ObjectPattern" ? { + type + } : ancestor; + const val = expression[key]; + if (Array.isArray(val)) { + for (const child of val) { + if (child) { + this.checkLVal(child, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression); + } + } + } else if (val) { + this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression); + } + } + checkIdentifier(at, bindingType, strictModeChanged = false) { + if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(at.name, this.inModule) : isStrictBindOnlyReservedWord(at.name))) { + if (bindingType === 64) { + this.raise(Errors.StrictEvalArguments, at, { + referenceName: at.name + }); + } else { + this.raise(Errors.StrictEvalArgumentsBinding, at, { + bindingName: at.name + }); + } + } + if (bindingType & 8192 && at.name === "let") { + this.raise(Errors.LetInLexicalBinding, at); + } + if (!(bindingType & 64)) { + this.declareNameFromIdentifier(at, bindingType); + } + } + declareNameFromIdentifier(identifier, binding) { + this.scope.declareName(identifier.name, binding, identifier.loc.start); + } + checkToRestConversion(node, allowPattern) { + switch (node.type) { + case "ParenthesizedExpression": + this.checkToRestConversion(node.expression, allowPattern); + break; + case "Identifier": + case "MemberExpression": + break; + case "ArrayExpression": + case "ObjectExpression": + if (allowPattern) break; + default: + this.raise(Errors.InvalidRestAssignmentPattern, node); + } + } + checkCommaAfterRest(close) { + if (!this.match(12)) { + return false; + } + this.raise(this.lookaheadCharCode() === close ? Errors.RestTrailingComma : Errors.ElementAfterRest, this.state.startLoc); + return true; + } +} +function nonNull(x) { + if (x == null) { + throw new Error(`Unexpected ${x} value.`); + } + return x; +} +function assert(x) { + if (!x) { + throw new Error("Assert fail"); + } +} +const TSErrors = ParseErrorEnum`typescript`({ + AbstractMethodHasImplementation: ({ + methodName + }) => `Method '${methodName}' cannot have an implementation because it is marked abstract.`, + AbstractPropertyHasInitializer: ({ + propertyName + }) => `Property '${propertyName}' cannot have an initializer because it is marked abstract.`, + AccessorCannotBeOptional: "An 'accessor' property cannot be declared optional.", + AccessorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.", + AccessorCannotHaveTypeParameters: "An accessor cannot have type parameters.", + ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.", + ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.", + ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference: "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.", + ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.", + DeclareAccessor: ({ + kind + }) => `'declare' is not allowed in ${kind}ters.`, + DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.", + DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.", + DuplicateAccessibilityModifier: ({ + modifier + }) => `Accessibility modifier already seen.`, + DuplicateModifier: ({ + modifier + }) => `Duplicate modifier: '${modifier}'.`, + EmptyHeritageClauseType: ({ + token + }) => `'${token}' list cannot be empty.`, + EmptyTypeArguments: "Type argument list cannot be empty.", + EmptyTypeParameters: "Type parameter list cannot be empty.", + ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.", + ImportAliasHasImportType: "An import alias can not use 'import type'.", + ImportReflectionHasImportType: "An `import module` declaration can not use `type` modifier", + IncompatibleModifiers: ({ + modifiers + }) => `'${modifiers[0]}' modifier cannot be used with '${modifiers[1]}' modifier.`, + IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.", + IndexSignatureHasAccessibility: ({ + modifier + }) => `Index signatures cannot have an accessibility modifier ('${modifier}').`, + IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.", + IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.", + IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.", + InitializerNotAllowedInAmbientContext: "Initializers are not allowed in ambient contexts.", + InvalidModifierOnTypeMember: ({ + modifier + }) => `'${modifier}' modifier cannot appear on a type member.`, + InvalidModifierOnTypeParameter: ({ + modifier + }) => `'${modifier}' modifier cannot appear on a type parameter.`, + InvalidModifierOnTypeParameterPositions: ({ + modifier + }) => `'${modifier}' modifier can only appear on a type parameter of a class, interface or type alias.`, + InvalidModifiersOrder: ({ + orderedModifiers + }) => `'${orderedModifiers[0]}' modifier must precede '${orderedModifiers[1]}' modifier.`, + InvalidPropertyAccessAfterInstantiationExpression: "Invalid property access after an instantiation expression. " + "You can either wrap the instantiation expression in parentheses, or delete the type arguments.", + InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.", + MissingInterfaceName: "'interface' declarations must be followed by an identifier.", + NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.", + NonClassMethodPropertyHasAbstractModifer: "'abstract' modifier can only appear on a class, method, or property declaration.", + OptionalTypeBeforeRequired: "A required element cannot follow an optional element.", + OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.", + PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.", + PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.", + PrivateElementHasAccessibility: ({ + modifier + }) => `Private elements cannot have an accessibility modifier ('${modifier}').`, + ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.", + ReservedArrowTypeParam: "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.", + ReservedTypeAssertion: "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.", + SetAccessorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.", + SetAccessorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.", + SetAccessorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.", + SingleTypeParameterWithoutTrailingComma: ({ + typeParameterName + }) => `Single type parameter ${typeParameterName} should have a trailing comma. Example usage: <${typeParameterName},>.`, + StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.", + TupleOptionalAfterType: "A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).", + TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", + TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.", + TypeModifierIsUsedInTypeExports: "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.", + TypeModifierIsUsedInTypeImports: "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.", + UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.", + UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.", + UnexpectedTypeAnnotation: "Did not expect a type annotation here.", + UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.", + UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.", + UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.", + UnsupportedSignatureParameterKind: ({ + type + }) => `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${type}.` +}); +function keywordTypeFromName(value) { + switch (value) { + case "any": + return "TSAnyKeyword"; + case "boolean": + return "TSBooleanKeyword"; + case "bigint": + return "TSBigIntKeyword"; + case "never": + return "TSNeverKeyword"; + case "number": + return "TSNumberKeyword"; + case "object": + return "TSObjectKeyword"; + case "string": + return "TSStringKeyword"; + case "symbol": + return "TSSymbolKeyword"; + case "undefined": + return "TSUndefinedKeyword"; + case "unknown": + return "TSUnknownKeyword"; + default: + return undefined; + } +} +function tsIsAccessModifier(modifier) { + return modifier === "private" || modifier === "public" || modifier === "protected"; +} +function tsIsVarianceAnnotations(modifier) { + return modifier === "in" || modifier === "out"; +} +var typescript = superClass => class TypeScriptParserMixin extends superClass { + constructor(...args) { + super(...args); + this.tsParseInOutModifiers = this.tsParseModifiers.bind(this, { + allowedModifiers: ["in", "out"], + disallowedModifiers: ["const", "public", "private", "protected", "readonly", "declare", "abstract", "override"], + errorTemplate: TSErrors.InvalidModifierOnTypeParameter + }); + this.tsParseConstModifier = this.tsParseModifiers.bind(this, { + allowedModifiers: ["const"], + disallowedModifiers: ["in", "out"], + errorTemplate: TSErrors.InvalidModifierOnTypeParameterPositions + }); + this.tsParseInOutConstModifiers = this.tsParseModifiers.bind(this, { + allowedModifiers: ["in", "out", "const"], + disallowedModifiers: ["public", "private", "protected", "readonly", "declare", "abstract", "override"], + errorTemplate: TSErrors.InvalidModifierOnTypeParameter + }); + } + getScopeHandler() { + return TypeScriptScopeHandler; + } + tsIsIdentifier() { + return tokenIsIdentifier(this.state.type); + } + tsTokenCanFollowModifier() { + return this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(139) || this.isLiteralPropertyName(); + } + tsNextTokenOnSameLineAndCanFollowModifier() { + this.next(); + if (this.hasPrecedingLineBreak()) { + return false; + } + return this.tsTokenCanFollowModifier(); + } + tsNextTokenCanFollowModifier() { + if (this.match(106)) { + this.next(); + return this.tsTokenCanFollowModifier(); + } + return this.tsNextTokenOnSameLineAndCanFollowModifier(); + } + tsParseModifier(allowedModifiers, stopOnStartOfClassStaticBlock) { + if (!tokenIsIdentifier(this.state.type) && this.state.type !== 58 && this.state.type !== 75) { + return undefined; + } + const modifier = this.state.value; + if (allowedModifiers.includes(modifier)) { + if (stopOnStartOfClassStaticBlock && this.tsIsStartOfStaticBlocks()) { + return undefined; + } + if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) { + return modifier; + } + } + return undefined; + } + tsParseModifiers({ + allowedModifiers, + disallowedModifiers, + stopOnStartOfClassStaticBlock, + errorTemplate = TSErrors.InvalidModifierOnTypeMember + }, modified) { + const enforceOrder = (loc, modifier, before, after) => { + if (modifier === before && modified[after]) { + this.raise(TSErrors.InvalidModifiersOrder, loc, { + orderedModifiers: [before, after] + }); + } + }; + const incompatible = (loc, modifier, mod1, mod2) => { + if (modified[mod1] && modifier === mod2 || modified[mod2] && modifier === mod1) { + this.raise(TSErrors.IncompatibleModifiers, loc, { + modifiers: [mod1, mod2] + }); + } + }; + for (;;) { + const { + startLoc + } = this.state; + const modifier = this.tsParseModifier(allowedModifiers.concat(disallowedModifiers != null ? disallowedModifiers : []), stopOnStartOfClassStaticBlock); + if (!modifier) break; + if (tsIsAccessModifier(modifier)) { + if (modified.accessibility) { + this.raise(TSErrors.DuplicateAccessibilityModifier, startLoc, { + modifier + }); + } else { + enforceOrder(startLoc, modifier, modifier, "override"); + enforceOrder(startLoc, modifier, modifier, "static"); + enforceOrder(startLoc, modifier, modifier, "readonly"); + modified.accessibility = modifier; + } + } else if (tsIsVarianceAnnotations(modifier)) { + if (modified[modifier]) { + this.raise(TSErrors.DuplicateModifier, startLoc, { + modifier + }); + } + modified[modifier] = true; + enforceOrder(startLoc, modifier, "in", "out"); + } else { + if (hasOwnProperty.call(modified, modifier)) { + this.raise(TSErrors.DuplicateModifier, startLoc, { + modifier + }); + } else { + enforceOrder(startLoc, modifier, "static", "readonly"); + enforceOrder(startLoc, modifier, "static", "override"); + enforceOrder(startLoc, modifier, "override", "readonly"); + enforceOrder(startLoc, modifier, "abstract", "override"); + incompatible(startLoc, modifier, "declare", "override"); + incompatible(startLoc, modifier, "static", "abstract"); + } + modified[modifier] = true; + } + if (disallowedModifiers != null && disallowedModifiers.includes(modifier)) { + this.raise(errorTemplate, startLoc, { + modifier + }); + } + } + } + tsIsListTerminator(kind) { + switch (kind) { + case "EnumMembers": + case "TypeMembers": + return this.match(8); + case "HeritageClauseElement": + return this.match(5); + case "TupleElementTypes": + return this.match(3); + case "TypeParametersOrArguments": + return this.match(48); + } + } + tsParseList(kind, parseElement) { + const result = []; + while (!this.tsIsListTerminator(kind)) { + result.push(parseElement()); + } + return result; + } + tsParseDelimitedList(kind, parseElement, refTrailingCommaPos) { + return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true, refTrailingCommaPos)); + } + tsParseDelimitedListWorker(kind, parseElement, expectSuccess, refTrailingCommaPos) { + const result = []; + let trailingCommaPos = -1; + for (;;) { + if (this.tsIsListTerminator(kind)) { + break; + } + trailingCommaPos = -1; + const element = parseElement(); + if (element == null) { + return undefined; + } + result.push(element); + if (this.eat(12)) { + trailingCommaPos = this.state.lastTokStartLoc.index; + continue; + } + if (this.tsIsListTerminator(kind)) { + break; + } + if (expectSuccess) { + this.expect(12); + } + return undefined; + } + if (refTrailingCommaPos) { + refTrailingCommaPos.value = trailingCommaPos; + } + return result; + } + tsParseBracketedList(kind, parseElement, bracket, skipFirstToken, refTrailingCommaPos) { + if (!skipFirstToken) { + if (bracket) { + this.expect(0); + } else { + this.expect(47); + } + } + const result = this.tsParseDelimitedList(kind, parseElement, refTrailingCommaPos); + if (bracket) { + this.expect(3); + } else { + this.expect(48); + } + return result; + } + tsParseImportType() { + const node = this.startNode(); + this.expect(83); + this.expect(10); + if (!this.match(134)) { + this.raise(TSErrors.UnsupportedImportTypeArgument, this.state.startLoc); + { + node.argument = super.parseExprAtom(); + } + } else { + { + node.argument = this.parseStringLiteral(this.state.value); + } + } + if (this.eat(12) && !this.match(11)) { + node.options = super.parseMaybeAssignAllowIn(); + this.eat(12); + } else { + node.options = null; + } + this.expect(11); + if (this.eat(16)) { + node.qualifier = this.tsParseEntityName(1 | 2); + } + if (this.match(47)) { + { + node.typeParameters = this.tsParseTypeArguments(); + } + } + return this.finishNode(node, "TSImportType"); + } + tsParseEntityName(flags) { + let entity; + if (flags & 1 && this.match(78)) { + if (flags & 2) { + entity = this.parseIdentifier(true); + } else { + const node = this.startNode(); + this.next(); + entity = this.finishNode(node, "ThisExpression"); + } + } else { + entity = this.parseIdentifier(!!(flags & 1)); + } + while (this.eat(16)) { + const node = this.startNodeAtNode(entity); + node.left = entity; + node.right = this.parseIdentifier(!!(flags & 1)); + entity = this.finishNode(node, "TSQualifiedName"); + } + return entity; + } + tsParseTypeReference() { + const node = this.startNode(); + node.typeName = this.tsParseEntityName(1); + if (!this.hasPrecedingLineBreak() && this.match(47)) { + { + node.typeParameters = this.tsParseTypeArguments(); + } + } + return this.finishNode(node, "TSTypeReference"); + } + tsParseThisTypePredicate(lhs) { + this.next(); + const node = this.startNodeAtNode(lhs); + node.parameterName = lhs; + node.typeAnnotation = this.tsParseTypeAnnotation(false); + node.asserts = false; + return this.finishNode(node, "TSTypePredicate"); + } + tsParseThisTypeNode() { + const node = this.startNode(); + this.next(); + return this.finishNode(node, "TSThisType"); + } + tsParseTypeQuery() { + const node = this.startNode(); + this.expect(87); + if (this.match(83)) { + node.exprName = this.tsParseImportType(); + } else { + { + node.exprName = this.tsParseEntityName(1 | 2); + } + } + if (!this.hasPrecedingLineBreak() && this.match(47)) { + { + node.typeParameters = this.tsParseTypeArguments(); + } + } + return this.finishNode(node, "TSTypeQuery"); + } + tsParseTypeParameter(parseModifiers) { + const node = this.startNode(); + parseModifiers(node); + node.name = this.tsParseTypeParameterName(); + node.constraint = this.tsEatThenParseType(81); + node.default = this.tsEatThenParseType(29); + return this.finishNode(node, "TSTypeParameter"); + } + tsTryParseTypeParameters(parseModifiers) { + if (this.match(47)) { + return this.tsParseTypeParameters(parseModifiers); + } + } + tsParseTypeParameters(parseModifiers) { + const node = this.startNode(); + if (this.match(47) || this.match(143)) { + this.next(); + } else { + this.unexpected(); + } + const refTrailingCommaPos = { + value: -1 + }; + node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, parseModifiers), false, true, refTrailingCommaPos); + if (node.params.length === 0) { + this.raise(TSErrors.EmptyTypeParameters, node); + } + if (refTrailingCommaPos.value !== -1) { + this.addExtra(node, "trailingComma", refTrailingCommaPos.value); + } + return this.finishNode(node, "TSTypeParameterDeclaration"); + } + tsFillSignature(returnToken, signature) { + const returnTokenRequired = returnToken === 19; + const paramsKey = "parameters"; + const returnTypeKey = "typeAnnotation"; + signature.typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + this.expect(10); + signature[paramsKey] = this.tsParseBindingListForSignature(); + if (returnTokenRequired) { + signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken); + } else if (this.match(returnToken)) { + signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken); + } + } + tsParseBindingListForSignature() { + const list = super.parseBindingList(11, 41, 2); + for (const pattern of list) { + const { + type + } = pattern; + if (type === "AssignmentPattern" || type === "TSParameterProperty") { + this.raise(TSErrors.UnsupportedSignatureParameterKind, pattern, { + type + }); + } + } + return list; + } + tsParseTypeMemberSemicolon() { + if (!this.eat(12) && !this.isLineTerminator()) { + this.expect(13); + } + } + tsParseSignatureMember(kind, node) { + this.tsFillSignature(14, node); + this.tsParseTypeMemberSemicolon(); + return this.finishNode(node, kind); + } + tsIsUnambiguouslyIndexSignature() { + this.next(); + if (tokenIsIdentifier(this.state.type)) { + this.next(); + return this.match(14); + } + return false; + } + tsTryParseIndexSignature(node) { + if (!(this.match(0) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) { + return; + } + this.expect(0); + const id = this.parseIdentifier(); + id.typeAnnotation = this.tsParseTypeAnnotation(); + this.resetEndLocation(id); + this.expect(3); + node.parameters = [id]; + const type = this.tsTryParseTypeAnnotation(); + if (type) node.typeAnnotation = type; + this.tsParseTypeMemberSemicolon(); + return this.finishNode(node, "TSIndexSignature"); + } + tsParsePropertyOrMethodSignature(node, readonly) { + if (this.eat(17)) node.optional = true; + const nodeAny = node; + if (this.match(10) || this.match(47)) { + if (readonly) { + this.raise(TSErrors.ReadonlyForMethodSignature, node); + } + const method = nodeAny; + if (method.kind && this.match(47)) { + this.raise(TSErrors.AccessorCannotHaveTypeParameters, this.state.curPosition()); + } + this.tsFillSignature(14, method); + this.tsParseTypeMemberSemicolon(); + const paramsKey = "parameters"; + const returnTypeKey = "typeAnnotation"; + if (method.kind === "get") { + if (method[paramsKey].length > 0) { + this.raise(Errors.BadGetterArity, this.state.curPosition()); + if (this.isThisParam(method[paramsKey][0])) { + this.raise(TSErrors.AccessorCannotDeclareThisParameter, this.state.curPosition()); + } + } + } else if (method.kind === "set") { + if (method[paramsKey].length !== 1) { + this.raise(Errors.BadSetterArity, this.state.curPosition()); + } else { + const firstParameter = method[paramsKey][0]; + if (this.isThisParam(firstParameter)) { + this.raise(TSErrors.AccessorCannotDeclareThisParameter, this.state.curPosition()); + } + if (firstParameter.type === "Identifier" && firstParameter.optional) { + this.raise(TSErrors.SetAccessorCannotHaveOptionalParameter, this.state.curPosition()); + } + if (firstParameter.type === "RestElement") { + this.raise(TSErrors.SetAccessorCannotHaveRestParameter, this.state.curPosition()); + } + } + if (method[returnTypeKey]) { + this.raise(TSErrors.SetAccessorCannotHaveReturnType, method[returnTypeKey]); + } + } else { + method.kind = "method"; + } + return this.finishNode(method, "TSMethodSignature"); + } else { + const property = nodeAny; + if (readonly) property.readonly = true; + const type = this.tsTryParseTypeAnnotation(); + if (type) property.typeAnnotation = type; + this.tsParseTypeMemberSemicolon(); + return this.finishNode(property, "TSPropertySignature"); + } + } + tsParseTypeMember() { + const node = this.startNode(); + if (this.match(10) || this.match(47)) { + return this.tsParseSignatureMember("TSCallSignatureDeclaration", node); + } + if (this.match(77)) { + const id = this.startNode(); + this.next(); + if (this.match(10) || this.match(47)) { + return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node); + } else { + node.key = this.createIdentifier(id, "new"); + return this.tsParsePropertyOrMethodSignature(node, false); + } + } + this.tsParseModifiers({ + allowedModifiers: ["readonly"], + disallowedModifiers: ["declare", "abstract", "private", "protected", "public", "static", "override"] + }, node); + const idx = this.tsTryParseIndexSignature(node); + if (idx) { + return idx; + } + super.parsePropertyName(node); + if (!node.computed && node.key.type === "Identifier" && (node.key.name === "get" || node.key.name === "set") && this.tsTokenCanFollowModifier()) { + node.kind = node.key.name; + super.parsePropertyName(node); + } + return this.tsParsePropertyOrMethodSignature(node, !!node.readonly); + } + tsParseTypeLiteral() { + const node = this.startNode(); + node.members = this.tsParseObjectTypeMembers(); + return this.finishNode(node, "TSTypeLiteral"); + } + tsParseObjectTypeMembers() { + this.expect(5); + const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this)); + this.expect(8); + return members; + } + tsIsStartOfMappedType() { + this.next(); + if (this.eat(53)) { + return this.isContextual(122); + } + if (this.isContextual(122)) { + this.next(); + } + if (!this.match(0)) { + return false; + } + this.next(); + if (!this.tsIsIdentifier()) { + return false; + } + this.next(); + return this.match(58); + } + tsParseMappedType() { + const node = this.startNode(); + this.expect(5); + if (this.match(53)) { + node.readonly = this.state.value; + this.next(); + this.expectContextual(122); + } else if (this.eatContextual(122)) { + node.readonly = true; + } + this.expect(0); + { + const typeParameter = this.startNode(); + typeParameter.name = this.tsParseTypeParameterName(); + typeParameter.constraint = this.tsExpectThenParseType(58); + node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter"); + } + node.nameType = this.eatContextual(93) ? this.tsParseType() : null; + this.expect(3); + if (this.match(53)) { + node.optional = this.state.value; + this.next(); + this.expect(17); + } else if (this.eat(17)) { + node.optional = true; + } + node.typeAnnotation = this.tsTryParseType(); + this.semicolon(); + this.expect(8); + return this.finishNode(node, "TSMappedType"); + } + tsParseTupleType() { + const node = this.startNode(); + node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false); + let seenOptionalElement = false; + node.elementTypes.forEach(elementNode => { + const { + type + } = elementNode; + if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) { + this.raise(TSErrors.OptionalTypeBeforeRequired, elementNode); + } + seenOptionalElement || (seenOptionalElement = type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType"); + }); + return this.finishNode(node, "TSTupleType"); + } + tsParseTupleElementType() { + const restStartLoc = this.state.startLoc; + const rest = this.eat(21); + const { + startLoc + } = this.state; + let labeled; + let label; + let optional; + let type; + const isWord = tokenIsKeywordOrIdentifier(this.state.type); + const chAfterWord = isWord ? this.lookaheadCharCode() : null; + if (chAfterWord === 58) { + labeled = true; + optional = false; + label = this.parseIdentifier(true); + this.expect(14); + type = this.tsParseType(); + } else if (chAfterWord === 63) { + optional = true; + const wordName = this.state.value; + const typeOrLabel = this.tsParseNonArrayType(); + if (this.lookaheadCharCode() === 58) { + labeled = true; + label = this.createIdentifier(this.startNodeAt(startLoc), wordName); + this.expect(17); + this.expect(14); + type = this.tsParseType(); + } else { + labeled = false; + type = typeOrLabel; + this.expect(17); + } + } else { + type = this.tsParseType(); + optional = this.eat(17); + labeled = this.eat(14); + } + if (labeled) { + let labeledNode; + if (label) { + labeledNode = this.startNodeAt(startLoc); + labeledNode.optional = optional; + labeledNode.label = label; + labeledNode.elementType = type; + if (this.eat(17)) { + labeledNode.optional = true; + this.raise(TSErrors.TupleOptionalAfterType, this.state.lastTokStartLoc); + } + } else { + labeledNode = this.startNodeAt(startLoc); + labeledNode.optional = optional; + this.raise(TSErrors.InvalidTupleMemberLabel, type); + labeledNode.label = type; + labeledNode.elementType = this.tsParseType(); + } + type = this.finishNode(labeledNode, "TSNamedTupleMember"); + } else if (optional) { + const optionalTypeNode = this.startNodeAt(startLoc); + optionalTypeNode.typeAnnotation = type; + type = this.finishNode(optionalTypeNode, "TSOptionalType"); + } + if (rest) { + const restNode = this.startNodeAt(restStartLoc); + restNode.typeAnnotation = type; + type = this.finishNode(restNode, "TSRestType"); + } + return type; + } + tsParseParenthesizedType() { + const node = this.startNode(); + this.expect(10); + node.typeAnnotation = this.tsParseType(); + this.expect(11); + return this.finishNode(node, "TSParenthesizedType"); + } + tsParseFunctionOrConstructorType(type, abstract) { + const node = this.startNode(); + if (type === "TSConstructorType") { + node.abstract = !!abstract; + if (abstract) this.next(); + this.next(); + } + this.tsInAllowConditionalTypesContext(() => this.tsFillSignature(19, node)); + return this.finishNode(node, type); + } + tsParseLiteralTypeNode() { + const node = this.startNode(); + switch (this.state.type) { + case 135: + case 136: + case 134: + case 85: + case 86: + node.literal = super.parseExprAtom(); + break; + default: + this.unexpected(); + } + return this.finishNode(node, "TSLiteralType"); + } + tsParseTemplateLiteralType() { + { + const node = this.startNode(); + node.literal = super.parseTemplate(false); + return this.finishNode(node, "TSLiteralType"); + } + } + parseTemplateSubstitution() { + if (this.state.inType) return this.tsParseType(); + return super.parseTemplateSubstitution(); + } + tsParseThisTypeOrThisTypePredicate() { + const thisKeyword = this.tsParseThisTypeNode(); + if (this.isContextual(116) && !this.hasPrecedingLineBreak()) { + return this.tsParseThisTypePredicate(thisKeyword); + } else { + return thisKeyword; + } + } + tsParseNonArrayType() { + switch (this.state.type) { + case 134: + case 135: + case 136: + case 85: + case 86: + return this.tsParseLiteralTypeNode(); + case 53: + if (this.state.value === "-") { + const node = this.startNode(); + const nextToken = this.lookahead(); + if (nextToken.type !== 135 && nextToken.type !== 136) { + this.unexpected(); + } + node.literal = this.parseMaybeUnary(); + return this.finishNode(node, "TSLiteralType"); + } + break; + case 78: + return this.tsParseThisTypeOrThisTypePredicate(); + case 87: + return this.tsParseTypeQuery(); + case 83: + return this.tsParseImportType(); + case 5: + return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral(); + case 0: + return this.tsParseTupleType(); + case 10: + return this.tsParseParenthesizedType(); + case 25: + case 24: + return this.tsParseTemplateLiteralType(); + default: + { + const { + type + } = this.state; + if (tokenIsIdentifier(type) || type === 88 || type === 84) { + const nodeType = type === 88 ? "TSVoidKeyword" : type === 84 ? "TSNullKeyword" : keywordTypeFromName(this.state.value); + if (nodeType !== undefined && this.lookaheadCharCode() !== 46) { + const node = this.startNode(); + this.next(); + return this.finishNode(node, nodeType); + } + return this.tsParseTypeReference(); + } + } + } + this.unexpected(); + } + tsParseArrayTypeOrHigher() { + const { + startLoc + } = this.state; + let type = this.tsParseNonArrayType(); + while (!this.hasPrecedingLineBreak() && this.eat(0)) { + if (this.match(3)) { + const node = this.startNodeAt(startLoc); + node.elementType = type; + this.expect(3); + type = this.finishNode(node, "TSArrayType"); + } else { + const node = this.startNodeAt(startLoc); + node.objectType = type; + node.indexType = this.tsParseType(); + this.expect(3); + type = this.finishNode(node, "TSIndexedAccessType"); + } + } + return type; + } + tsParseTypeOperator() { + const node = this.startNode(); + const operator = this.state.value; + this.next(); + node.operator = operator; + node.typeAnnotation = this.tsParseTypeOperatorOrHigher(); + if (operator === "readonly") { + this.tsCheckTypeAnnotationForReadOnly(node); + } + return this.finishNode(node, "TSTypeOperator"); + } + tsCheckTypeAnnotationForReadOnly(node) { + switch (node.typeAnnotation.type) { + case "TSTupleType": + case "TSArrayType": + return; + default: + this.raise(TSErrors.UnexpectedReadonly, node); + } + } + tsParseInferType() { + const node = this.startNode(); + this.expectContextual(115); + const typeParameter = this.startNode(); + typeParameter.name = this.tsParseTypeParameterName(); + typeParameter.constraint = this.tsTryParse(() => this.tsParseConstraintForInferType()); + node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter"); + return this.finishNode(node, "TSInferType"); + } + tsParseConstraintForInferType() { + if (this.eat(81)) { + const constraint = this.tsInDisallowConditionalTypesContext(() => this.tsParseType()); + if (this.state.inDisallowConditionalTypesContext || !this.match(17)) { + return constraint; + } + } + } + tsParseTypeOperatorOrHigher() { + const isTypeOperator = tokenIsTSTypeOperator(this.state.type) && !this.state.containsEsc; + return isTypeOperator ? this.tsParseTypeOperator() : this.isContextual(115) ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(() => this.tsParseArrayTypeOrHigher()); + } + tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) { + const node = this.startNode(); + const hasLeadingOperator = this.eat(operator); + const types = []; + do { + types.push(parseConstituentType()); + } while (this.eat(operator)); + if (types.length === 1 && !hasLeadingOperator) { + return types[0]; + } + node.types = types; + return this.finishNode(node, kind); + } + tsParseIntersectionTypeOrHigher() { + return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), 45); + } + tsParseUnionTypeOrHigher() { + return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), 43); + } + tsIsStartOfFunctionType() { + if (this.match(47)) { + return true; + } + return this.match(10) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this)); + } + tsSkipParameterStart() { + if (tokenIsIdentifier(this.state.type) || this.match(78)) { + this.next(); + return true; + } + if (this.match(5)) { + const { + errors + } = this.state; + const previousErrorCount = errors.length; + try { + this.parseObjectLike(8, true); + return errors.length === previousErrorCount; + } catch (_unused) { + return false; + } + } + if (this.match(0)) { + this.next(); + const { + errors + } = this.state; + const previousErrorCount = errors.length; + try { + super.parseBindingList(3, 93, 1); + return errors.length === previousErrorCount; + } catch (_unused2) { + return false; + } + } + return false; + } + tsIsUnambiguouslyStartOfFunctionType() { + this.next(); + if (this.match(11) || this.match(21)) { + return true; + } + if (this.tsSkipParameterStart()) { + if (this.match(14) || this.match(12) || this.match(17) || this.match(29)) { + return true; + } + if (this.match(11)) { + this.next(); + if (this.match(19)) { + return true; + } + } + } + return false; + } + tsParseTypeOrTypePredicateAnnotation(returnToken) { + return this.tsInType(() => { + const t = this.startNode(); + this.expect(returnToken); + const node = this.startNode(); + const asserts = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this)); + if (asserts && this.match(78)) { + let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate(); + if (thisTypePredicate.type === "TSThisType") { + node.parameterName = thisTypePredicate; + node.asserts = true; + node.typeAnnotation = null; + thisTypePredicate = this.finishNode(node, "TSTypePredicate"); + } else { + this.resetStartLocationFromNode(thisTypePredicate, node); + thisTypePredicate.asserts = true; + } + t.typeAnnotation = thisTypePredicate; + return this.finishNode(t, "TSTypeAnnotation"); + } + const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this)); + if (!typePredicateVariable) { + if (!asserts) { + return this.tsParseTypeAnnotation(false, t); + } + node.parameterName = this.parseIdentifier(); + node.asserts = asserts; + node.typeAnnotation = null; + t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); + return this.finishNode(t, "TSTypeAnnotation"); + } + const type = this.tsParseTypeAnnotation(false); + node.parameterName = typePredicateVariable; + node.typeAnnotation = type; + node.asserts = asserts; + t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); + return this.finishNode(t, "TSTypeAnnotation"); + }); + } + tsTryParseTypeOrTypePredicateAnnotation() { + if (this.match(14)) { + return this.tsParseTypeOrTypePredicateAnnotation(14); + } + } + tsTryParseTypeAnnotation() { + if (this.match(14)) { + return this.tsParseTypeAnnotation(); + } + } + tsTryParseType() { + return this.tsEatThenParseType(14); + } + tsParseTypePredicatePrefix() { + const id = this.parseIdentifier(); + if (this.isContextual(116) && !this.hasPrecedingLineBreak()) { + this.next(); + return id; + } + } + tsParseTypePredicateAsserts() { + if (this.state.type !== 109) { + return false; + } + const containsEsc = this.state.containsEsc; + this.next(); + if (!tokenIsIdentifier(this.state.type) && !this.match(78)) { + return false; + } + if (containsEsc) { + this.raise(Errors.InvalidEscapedReservedWord, this.state.lastTokStartLoc, { + reservedWord: "asserts" + }); + } + return true; + } + tsParseTypeAnnotation(eatColon = true, t = this.startNode()) { + this.tsInType(() => { + if (eatColon) this.expect(14); + t.typeAnnotation = this.tsParseType(); + }); + return this.finishNode(t, "TSTypeAnnotation"); + } + tsParseType() { + assert(this.state.inType); + const type = this.tsParseNonConditionalType(); + if (this.state.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(81)) { + return type; + } + const node = this.startNodeAtNode(type); + node.checkType = type; + node.extendsType = this.tsInDisallowConditionalTypesContext(() => this.tsParseNonConditionalType()); + this.expect(17); + node.trueType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()); + this.expect(14); + node.falseType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()); + return this.finishNode(node, "TSConditionalType"); + } + isAbstractConstructorSignature() { + return this.isContextual(124) && this.lookahead().type === 77; + } + tsParseNonConditionalType() { + if (this.tsIsStartOfFunctionType()) { + return this.tsParseFunctionOrConstructorType("TSFunctionType"); + } + if (this.match(77)) { + return this.tsParseFunctionOrConstructorType("TSConstructorType"); + } else if (this.isAbstractConstructorSignature()) { + return this.tsParseFunctionOrConstructorType("TSConstructorType", true); + } + return this.tsParseUnionTypeOrHigher(); + } + tsParseTypeAssertion() { + if (this.getPluginOption("typescript", "disallowAmbiguousJSXLike")) { + this.raise(TSErrors.ReservedTypeAssertion, this.state.startLoc); + } + const node = this.startNode(); + node.typeAnnotation = this.tsInType(() => { + this.next(); + return this.match(75) ? this.tsParseTypeReference() : this.tsParseType(); + }); + this.expect(48); + node.expression = this.parseMaybeUnary(); + return this.finishNode(node, "TSTypeAssertion"); + } + tsParseHeritageClause(token) { + const originalStartLoc = this.state.startLoc; + const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", () => { + const node = this.startNode(); + { + node.expression = this.tsParseEntityName(1 | 2); + if (this.match(47)) { + node.typeParameters = this.tsParseTypeArguments(); + } + return this.finishNode(node, "TSExpressionWithTypeArguments"); + } + }); + if (!delimitedList.length) { + this.raise(TSErrors.EmptyHeritageClauseType, originalStartLoc, { + token + }); + } + return delimitedList; + } + tsParseInterfaceDeclaration(node, properties = {}) { + if (this.hasFollowingLineBreak()) return null; + this.expectContextual(129); + if (properties.declare) node.declare = true; + if (tokenIsIdentifier(this.state.type)) { + node.id = this.parseIdentifier(); + this.checkIdentifier(node.id, 130); + } else { + node.id = null; + this.raise(TSErrors.MissingInterfaceName, this.state.startLoc); + } + node.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers); + if (this.eat(81)) { + node.extends = this.tsParseHeritageClause("extends"); + } + const body = this.startNode(); + body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)); + node.body = this.finishNode(body, "TSInterfaceBody"); + return this.finishNode(node, "TSInterfaceDeclaration"); + } + tsParseTypeAliasDeclaration(node) { + node.id = this.parseIdentifier(); + this.checkIdentifier(node.id, 2); + node.typeAnnotation = this.tsInType(() => { + node.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutModifiers); + this.expect(29); + if (this.isContextual(114) && this.lookahead().type !== 16) { + const node = this.startNode(); + this.next(); + return this.finishNode(node, "TSIntrinsicKeyword"); + } + return this.tsParseType(); + }); + this.semicolon(); + return this.finishNode(node, "TSTypeAliasDeclaration"); + } + tsInTopLevelContext(cb) { + if (this.curContext() !== types.brace) { + const oldContext = this.state.context; + this.state.context = [oldContext[0]]; + try { + return cb(); + } finally { + this.state.context = oldContext; + } + } else { + return cb(); + } + } + tsInType(cb) { + const oldInType = this.state.inType; + this.state.inType = true; + try { + return cb(); + } finally { + this.state.inType = oldInType; + } + } + tsInDisallowConditionalTypesContext(cb) { + const oldInDisallowConditionalTypesContext = this.state.inDisallowConditionalTypesContext; + this.state.inDisallowConditionalTypesContext = true; + try { + return cb(); + } finally { + this.state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; + } + } + tsInAllowConditionalTypesContext(cb) { + const oldInDisallowConditionalTypesContext = this.state.inDisallowConditionalTypesContext; + this.state.inDisallowConditionalTypesContext = false; + try { + return cb(); + } finally { + this.state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; + } + } + tsEatThenParseType(token) { + if (this.match(token)) { + return this.tsNextThenParseType(); + } + } + tsExpectThenParseType(token) { + return this.tsInType(() => { + this.expect(token); + return this.tsParseType(); + }); + } + tsNextThenParseType() { + return this.tsInType(() => { + this.next(); + return this.tsParseType(); + }); + } + tsParseEnumMember() { + const node = this.startNode(); + node.id = this.match(134) ? super.parseStringLiteral(this.state.value) : this.parseIdentifier(true); + if (this.eat(29)) { + node.initializer = super.parseMaybeAssignAllowIn(); + } + return this.finishNode(node, "TSEnumMember"); + } + tsParseEnumDeclaration(node, properties = {}) { + if (properties.const) node.const = true; + if (properties.declare) node.declare = true; + this.expectContextual(126); + node.id = this.parseIdentifier(); + this.checkIdentifier(node.id, node.const ? 8971 : 8459); + { + this.expect(5); + node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)); + this.expect(8); + } + return this.finishNode(node, "TSEnumDeclaration"); + } + tsParseEnumBody() { + const node = this.startNode(); + this.expect(5); + node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)); + this.expect(8); + return this.finishNode(node, "TSEnumBody"); + } + tsParseModuleBlock() { + const node = this.startNode(); + this.scope.enter(0); + this.expect(5); + super.parseBlockOrModuleBlockBody(node.body = [], undefined, true, 8); + this.scope.exit(); + return this.finishNode(node, "TSModuleBlock"); + } + tsParseModuleOrNamespaceDeclaration(node, nested = false) { + node.id = this.parseIdentifier(); + if (!nested) { + this.checkIdentifier(node.id, 1024); + } + if (this.eat(16)) { + const inner = this.startNode(); + this.tsParseModuleOrNamespaceDeclaration(inner, true); + node.body = inner; + } else { + this.scope.enter(256); + this.prodParam.enter(0); + node.body = this.tsParseModuleBlock(); + this.prodParam.exit(); + this.scope.exit(); + } + return this.finishNode(node, "TSModuleDeclaration"); + } + tsParseAmbientExternalModuleDeclaration(node) { + if (this.isContextual(112)) { + node.kind = "global"; + { + node.global = true; + } + node.id = this.parseIdentifier(); + } else if (this.match(134)) { + node.kind = "module"; + node.id = super.parseStringLiteral(this.state.value); + } else { + this.unexpected(); + } + if (this.match(5)) { + this.scope.enter(256); + this.prodParam.enter(0); + node.body = this.tsParseModuleBlock(); + this.prodParam.exit(); + this.scope.exit(); + } else { + this.semicolon(); + } + return this.finishNode(node, "TSModuleDeclaration"); + } + tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier, isExport) { + { + node.isExport = isExport || false; + } + node.id = maybeDefaultIdentifier || this.parseIdentifier(); + this.checkIdentifier(node.id, 4096); + this.expect(29); + const moduleReference = this.tsParseModuleReference(); + if (node.importKind === "type" && moduleReference.type !== "TSExternalModuleReference") { + this.raise(TSErrors.ImportAliasHasImportType, moduleReference); + } + node.moduleReference = moduleReference; + this.semicolon(); + return this.finishNode(node, "TSImportEqualsDeclaration"); + } + tsIsExternalModuleReference() { + return this.isContextual(119) && this.lookaheadCharCode() === 40; + } + tsParseModuleReference() { + return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(0); + } + tsParseExternalModuleReference() { + const node = this.startNode(); + this.expectContextual(119); + this.expect(10); + if (!this.match(134)) { + this.unexpected(); + } + node.expression = super.parseExprAtom(); + this.expect(11); + this.sawUnambiguousESM = true; + return this.finishNode(node, "TSExternalModuleReference"); + } + tsLookAhead(f) { + const state = this.state.clone(); + const res = f(); + this.state = state; + return res; + } + tsTryParseAndCatch(f) { + const result = this.tryParse(abort => f() || abort()); + if (result.aborted || !result.node) return; + if (result.error) this.state = result.failState; + return result.node; + } + tsTryParse(f) { + const state = this.state.clone(); + const result = f(); + if (result !== undefined && result !== false) { + return result; + } + this.state = state; + } + tsTryParseDeclare(nany) { + if (this.isLineTerminator()) { + return; + } + let startType = this.state.type; + let kind; + if (this.isContextual(100)) { + startType = 74; + kind = "let"; + } + return this.tsInAmbientContext(() => { + switch (startType) { + case 68: + nany.declare = true; + return super.parseFunctionStatement(nany, false, false); + case 80: + nany.declare = true; + return this.parseClass(nany, true, false); + case 126: + return this.tsParseEnumDeclaration(nany, { + declare: true + }); + case 112: + return this.tsParseAmbientExternalModuleDeclaration(nany); + case 75: + case 74: + if (!this.match(75) || !this.isLookaheadContextual("enum")) { + nany.declare = true; + return this.parseVarStatement(nany, kind || this.state.value, true); + } + this.expect(75); + return this.tsParseEnumDeclaration(nany, { + const: true, + declare: true + }); + case 129: + { + const result = this.tsParseInterfaceDeclaration(nany, { + declare: true + }); + if (result) return result; + } + default: + if (tokenIsIdentifier(startType)) { + return this.tsParseDeclaration(nany, this.state.value, true, null); + } + } + }); + } + tsTryParseExportDeclaration() { + return this.tsParseDeclaration(this.startNode(), this.state.value, true, null); + } + tsParseExpressionStatement(node, expr, decorators) { + switch (expr.name) { + case "declare": + { + const declaration = this.tsTryParseDeclare(node); + if (declaration) { + declaration.declare = true; + } + return declaration; + } + case "global": + if (this.match(5)) { + this.scope.enter(256); + this.prodParam.enter(0); + const mod = node; + mod.kind = "global"; + { + node.global = true; + } + mod.id = expr; + mod.body = this.tsParseModuleBlock(); + this.scope.exit(); + this.prodParam.exit(); + return this.finishNode(mod, "TSModuleDeclaration"); + } + break; + default: + return this.tsParseDeclaration(node, expr.name, false, decorators); + } + } + tsParseDeclaration(node, value, next, decorators) { + switch (value) { + case "abstract": + if (this.tsCheckLineTerminator(next) && (this.match(80) || tokenIsIdentifier(this.state.type))) { + return this.tsParseAbstractDeclaration(node, decorators); + } + break; + case "module": + if (this.tsCheckLineTerminator(next)) { + if (this.match(134)) { + return this.tsParseAmbientExternalModuleDeclaration(node); + } else if (tokenIsIdentifier(this.state.type)) { + node.kind = "module"; + return this.tsParseModuleOrNamespaceDeclaration(node); + } + } + break; + case "namespace": + if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) { + node.kind = "namespace"; + return this.tsParseModuleOrNamespaceDeclaration(node); + } + break; + case "type": + if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) { + return this.tsParseTypeAliasDeclaration(node); + } + break; + } + } + tsCheckLineTerminator(next) { + if (next) { + if (this.hasFollowingLineBreak()) return false; + this.next(); + return true; + } + return !this.isLineTerminator(); + } + tsTryParseGenericAsyncArrowFunction(startLoc) { + if (!this.match(47)) return; + const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + this.state.maybeInArrowParameters = true; + const res = this.tsTryParseAndCatch(() => { + const node = this.startNodeAt(startLoc); + node.typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier); + super.parseFunctionParams(node); + node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation(); + this.expect(19); + return node; + }); + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + if (!res) return; + return super.parseArrowExpression(res, null, true); + } + tsParseTypeArgumentsInExpression() { + if (this.reScan_lt() !== 47) return; + return this.tsParseTypeArguments(); + } + tsParseTypeArguments() { + const node = this.startNode(); + node.params = this.tsInType(() => this.tsInTopLevelContext(() => { + this.expect(47); + return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this)); + })); + if (node.params.length === 0) { + this.raise(TSErrors.EmptyTypeArguments, node); + } else if (!this.state.inType && this.curContext() === types.brace) { + this.reScan_lt_gt(); + } + this.expect(48); + return this.finishNode(node, "TSTypeParameterInstantiation"); + } + tsIsDeclarationStart() { + return tokenIsTSDeclarationStart(this.state.type); + } + isExportDefaultSpecifier() { + if (this.tsIsDeclarationStart()) return false; + return super.isExportDefaultSpecifier(); + } + parseAssignableListItem(flags, decorators) { + const startLoc = this.state.startLoc; + const modified = {}; + this.tsParseModifiers({ + allowedModifiers: ["public", "private", "protected", "override", "readonly"] + }, modified); + const accessibility = modified.accessibility; + const override = modified.override; + const readonly = modified.readonly; + if (!(flags & 4) && (accessibility || readonly || override)) { + this.raise(TSErrors.UnexpectedParameterModifier, startLoc); + } + const left = this.parseMaybeDefault(); + if (flags & 2) { + this.parseFunctionParamType(left); + } + const elt = this.parseMaybeDefault(left.loc.start, left); + if (accessibility || readonly || override) { + const pp = this.startNodeAt(startLoc); + if (decorators.length) { + pp.decorators = decorators; + } + if (accessibility) pp.accessibility = accessibility; + if (readonly) pp.readonly = readonly; + if (override) pp.override = override; + if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") { + this.raise(TSErrors.UnsupportedParameterPropertyKind, pp); + } + pp.parameter = elt; + return this.finishNode(pp, "TSParameterProperty"); + } + if (decorators.length) { + left.decorators = decorators; + } + return elt; + } + isSimpleParameter(node) { + return node.type === "TSParameterProperty" && super.isSimpleParameter(node.parameter) || super.isSimpleParameter(node); + } + tsDisallowOptionalPattern(node) { + for (const param of node.params) { + if (param.type !== "Identifier" && param.optional && !this.state.isAmbientContext) { + this.raise(TSErrors.PatternIsOptional, param); + } + } + } + setArrowFunctionParameters(node, params, trailingCommaLoc) { + super.setArrowFunctionParameters(node, params, trailingCommaLoc); + this.tsDisallowOptionalPattern(node); + } + parseFunctionBodyAndFinish(node, type, isMethod = false) { + if (this.match(14)) { + node.returnType = this.tsParseTypeOrTypePredicateAnnotation(14); + } + const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" || type === "ClassPrivateMethod" ? "TSDeclareMethod" : undefined; + if (bodilessType && !this.match(5) && this.isLineTerminator()) { + return this.finishNode(node, bodilessType); + } + if (bodilessType === "TSDeclareFunction" && this.state.isAmbientContext) { + this.raise(TSErrors.DeclareFunctionHasImplementation, node); + if (node.declare) { + return super.parseFunctionBodyAndFinish(node, bodilessType, isMethod); + } + } + this.tsDisallowOptionalPattern(node); + return super.parseFunctionBodyAndFinish(node, type, isMethod); + } + registerFunctionStatementId(node) { + if (!node.body && node.id) { + this.checkIdentifier(node.id, 1024); + } else { + super.registerFunctionStatementId(node); + } + } + tsCheckForInvalidTypeCasts(items) { + items.forEach(node => { + if ((node == null ? void 0 : node.type) === "TSTypeCastExpression") { + this.raise(TSErrors.UnexpectedTypeAnnotation, node.typeAnnotation); + } + }); + } + toReferencedList(exprList, isInParens) { + this.tsCheckForInvalidTypeCasts(exprList); + return exprList; + } + parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { + const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors); + if (node.type === "ArrayExpression") { + this.tsCheckForInvalidTypeCasts(node.elements); + } + return node; + } + parseSubscript(base, startLoc, noCalls, state) { + if (!this.hasPrecedingLineBreak() && this.match(35)) { + this.state.canStartJSXElement = false; + this.next(); + const nonNullExpression = this.startNodeAt(startLoc); + nonNullExpression.expression = base; + return this.finishNode(nonNullExpression, "TSNonNullExpression"); + } + let isOptionalCall = false; + if (this.match(18) && this.lookaheadCharCode() === 60) { + if (noCalls) { + state.stop = true; + return base; + } + state.optionalChainMember = isOptionalCall = true; + this.next(); + } + if (this.match(47) || this.match(51)) { + let missingParenErrorLoc; + const result = this.tsTryParseAndCatch(() => { + if (!noCalls && this.atPossibleAsyncArrow(base)) { + const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startLoc); + if (asyncArrowFn) { + return asyncArrowFn; + } + } + const typeArguments = this.tsParseTypeArgumentsInExpression(); + if (!typeArguments) return; + if (isOptionalCall && !this.match(10)) { + missingParenErrorLoc = this.state.curPosition(); + return; + } + if (tokenIsTemplate(this.state.type)) { + const result = super.parseTaggedTemplateExpression(base, startLoc, state); + { + result.typeParameters = typeArguments; + } + return result; + } + if (!noCalls && this.eat(10)) { + const node = this.startNodeAt(startLoc); + node.callee = base; + node.arguments = this.parseCallExpressionArguments(11); + this.tsCheckForInvalidTypeCasts(node.arguments); + { + node.typeParameters = typeArguments; + } + if (state.optionalChainMember) { + node.optional = isOptionalCall; + } + return this.finishCallExpression(node, state.optionalChainMember); + } + const tokenType = this.state.type; + if (tokenType === 48 || tokenType === 52 || tokenType !== 10 && tokenCanStartExpression(tokenType) && !this.hasPrecedingLineBreak()) { + return; + } + const node = this.startNodeAt(startLoc); + node.expression = base; + { + node.typeParameters = typeArguments; + } + return this.finishNode(node, "TSInstantiationExpression"); + }); + if (missingParenErrorLoc) { + this.unexpected(missingParenErrorLoc, 10); + } + if (result) { + if (result.type === "TSInstantiationExpression" && (this.match(16) || this.match(18) && this.lookaheadCharCode() !== 40)) { + this.raise(TSErrors.InvalidPropertyAccessAfterInstantiationExpression, this.state.startLoc); + } + return result; + } + } + return super.parseSubscript(base, startLoc, noCalls, state); + } + parseNewCallee(node) { + var _callee$extra; + super.parseNewCallee(node); + const { + callee + } = node; + if (callee.type === "TSInstantiationExpression" && !((_callee$extra = callee.extra) != null && _callee$extra.parenthesized)) { + { + node.typeParameters = callee.typeParameters; + } + node.callee = callee.expression; + } + } + parseExprOp(left, leftStartLoc, minPrec) { + let isSatisfies; + if (tokenOperatorPrecedence(58) > minPrec && !this.hasPrecedingLineBreak() && (this.isContextual(93) || (isSatisfies = this.isContextual(120)))) { + const node = this.startNodeAt(leftStartLoc); + node.expression = left; + node.typeAnnotation = this.tsInType(() => { + this.next(); + if (this.match(75)) { + if (isSatisfies) { + this.raise(Errors.UnexpectedKeyword, this.state.startLoc, { + keyword: "const" + }); + } + return this.tsParseTypeReference(); + } + return this.tsParseType(); + }); + this.finishNode(node, isSatisfies ? "TSSatisfiesExpression" : "TSAsExpression"); + this.reScan_lt_gt(); + return this.parseExprOp(node, leftStartLoc, minPrec); + } + return super.parseExprOp(left, leftStartLoc, minPrec); + } + checkReservedWord(word, startLoc, checkKeywords, isBinding) { + if (!this.state.isAmbientContext) { + super.checkReservedWord(word, startLoc, checkKeywords, isBinding); + } + } + checkImportReflection(node) { + super.checkImportReflection(node); + if (node.module && node.importKind !== "value") { + this.raise(TSErrors.ImportReflectionHasImportType, node.specifiers[0].loc.start); + } + } + checkDuplicateExports() {} + isPotentialImportPhase(isExport) { + if (super.isPotentialImportPhase(isExport)) return true; + if (this.isContextual(130)) { + const ch = this.lookaheadCharCode(); + return isExport ? ch === 123 || ch === 42 : ch !== 61; + } + return !isExport && this.isContextual(87); + } + applyImportPhase(node, isExport, phase, loc) { + super.applyImportPhase(node, isExport, phase, loc); + if (isExport) { + node.exportKind = phase === "type" ? "type" : "value"; + } else { + node.importKind = phase === "type" || phase === "typeof" ? phase : "value"; + } + } + parseImport(node) { + if (this.match(134)) { + node.importKind = "value"; + return super.parseImport(node); + } + let importNode; + if (tokenIsIdentifier(this.state.type) && this.lookaheadCharCode() === 61) { + node.importKind = "value"; + return this.tsParseImportEqualsDeclaration(node); + } else if (this.isContextual(130)) { + const maybeDefaultIdentifier = this.parseMaybeImportPhase(node, false); + if (this.lookaheadCharCode() === 61) { + return this.tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier); + } else { + importNode = super.parseImportSpecifiersAndAfter(node, maybeDefaultIdentifier); + } + } else { + importNode = super.parseImport(node); + } + if (importNode.importKind === "type" && importNode.specifiers.length > 1 && importNode.specifiers[0].type === "ImportDefaultSpecifier") { + this.raise(TSErrors.TypeImportCannotSpecifyDefaultAndNamed, importNode); + } + return importNode; + } + parseExport(node, decorators) { + if (this.match(83)) { + const nodeImportEquals = node; + this.next(); + let maybeDefaultIdentifier = null; + if (this.isContextual(130) && this.isPotentialImportPhase(false)) { + maybeDefaultIdentifier = this.parseMaybeImportPhase(nodeImportEquals, false); + } else { + nodeImportEquals.importKind = "value"; + } + const declaration = this.tsParseImportEqualsDeclaration(nodeImportEquals, maybeDefaultIdentifier, true); + { + return declaration; + } + } else if (this.eat(29)) { + const assign = node; + assign.expression = super.parseExpression(); + this.semicolon(); + this.sawUnambiguousESM = true; + return this.finishNode(assign, "TSExportAssignment"); + } else if (this.eatContextual(93)) { + const decl = node; + this.expectContextual(128); + decl.id = this.parseIdentifier(); + this.semicolon(); + return this.finishNode(decl, "TSNamespaceExportDeclaration"); + } else { + return super.parseExport(node, decorators); + } + } + isAbstractClass() { + return this.isContextual(124) && this.lookahead().type === 80; + } + parseExportDefaultExpression() { + if (this.isAbstractClass()) { + const cls = this.startNode(); + this.next(); + cls.abstract = true; + return this.parseClass(cls, true, true); + } + if (this.match(129)) { + const result = this.tsParseInterfaceDeclaration(this.startNode()); + if (result) return result; + } + return super.parseExportDefaultExpression(); + } + parseVarStatement(node, kind, allowMissingInitializer = false) { + const { + isAmbientContext + } = this.state; + const declaration = super.parseVarStatement(node, kind, allowMissingInitializer || isAmbientContext); + if (!isAmbientContext) return declaration; + for (const { + id, + init + } of declaration.declarations) { + if (!init) continue; + if (kind !== "const" || !!id.typeAnnotation) { + this.raise(TSErrors.InitializerNotAllowedInAmbientContext, init); + } else if (!isValidAmbientConstInitializer(init, this.hasPlugin("estree"))) { + this.raise(TSErrors.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference, init); + } + } + return declaration; + } + parseStatementContent(flags, decorators) { + if (this.match(75) && this.isLookaheadContextual("enum")) { + const node = this.startNode(); + this.expect(75); + return this.tsParseEnumDeclaration(node, { + const: true + }); + } + if (this.isContextual(126)) { + return this.tsParseEnumDeclaration(this.startNode()); + } + if (this.isContextual(129)) { + const result = this.tsParseInterfaceDeclaration(this.startNode()); + if (result) return result; + } + return super.parseStatementContent(flags, decorators); + } + parseAccessModifier() { + return this.tsParseModifier(["public", "protected", "private"]); + } + tsHasSomeModifiers(member, modifiers) { + return modifiers.some(modifier => { + if (tsIsAccessModifier(modifier)) { + return member.accessibility === modifier; + } + return !!member[modifier]; + }); + } + tsIsStartOfStaticBlocks() { + return this.isContextual(106) && this.lookaheadCharCode() === 123; + } + parseClassMember(classBody, member, state) { + const modifiers = ["declare", "private", "public", "protected", "override", "abstract", "readonly", "static"]; + this.tsParseModifiers({ + allowedModifiers: modifiers, + disallowedModifiers: ["in", "out"], + stopOnStartOfClassStaticBlock: true, + errorTemplate: TSErrors.InvalidModifierOnTypeParameterPositions + }, member); + const callParseClassMemberWithIsStatic = () => { + if (this.tsIsStartOfStaticBlocks()) { + this.next(); + this.next(); + if (this.tsHasSomeModifiers(member, modifiers)) { + this.raise(TSErrors.StaticBlockCannotHaveModifier, this.state.curPosition()); + } + super.parseClassStaticBlock(classBody, member); + } else { + this.parseClassMemberWithIsStatic(classBody, member, state, !!member.static); + } + }; + if (member.declare) { + this.tsInAmbientContext(callParseClassMemberWithIsStatic); + } else { + callParseClassMemberWithIsStatic(); + } + } + parseClassMemberWithIsStatic(classBody, member, state, isStatic) { + const idx = this.tsTryParseIndexSignature(member); + if (idx) { + classBody.body.push(idx); + if (member.abstract) { + this.raise(TSErrors.IndexSignatureHasAbstract, member); + } + if (member.accessibility) { + this.raise(TSErrors.IndexSignatureHasAccessibility, member, { + modifier: member.accessibility + }); + } + if (member.declare) { + this.raise(TSErrors.IndexSignatureHasDeclare, member); + } + if (member.override) { + this.raise(TSErrors.IndexSignatureHasOverride, member); + } + return; + } + if (!this.state.inAbstractClass && member.abstract) { + this.raise(TSErrors.NonAbstractClassHasAbstractMethod, member); + } + if (member.override) { + if (!state.hadSuperClass) { + this.raise(TSErrors.OverrideNotInSubClass, member); + } + } + super.parseClassMemberWithIsStatic(classBody, member, state, isStatic); + } + parsePostMemberNameModifiers(methodOrProp) { + const optional = this.eat(17); + if (optional) methodOrProp.optional = true; + if (methodOrProp.readonly && this.match(10)) { + this.raise(TSErrors.ClassMethodHasReadonly, methodOrProp); + } + if (methodOrProp.declare && this.match(10)) { + this.raise(TSErrors.ClassMethodHasDeclare, methodOrProp); + } + } + parseExpressionStatement(node, expr, decorators) { + const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr, decorators) : undefined; + return decl || super.parseExpressionStatement(node, expr, decorators); + } + shouldParseExportDeclaration() { + if (this.tsIsDeclarationStart()) return true; + return super.shouldParseExportDeclaration(); + } + parseConditional(expr, startLoc, refExpressionErrors) { + if (!this.state.maybeInArrowParameters || !this.match(17)) { + return super.parseConditional(expr, startLoc, refExpressionErrors); + } + const result = this.tryParse(() => super.parseConditional(expr, startLoc)); + if (!result.node) { + if (result.error) { + super.setOptionalParametersError(refExpressionErrors, result.error); + } + return expr; + } + if (result.error) this.state = result.failState; + return result.node; + } + parseParenItem(node, startLoc) { + const newNode = super.parseParenItem(node, startLoc); + if (this.eat(17)) { + newNode.optional = true; + this.resetEndLocation(node); + } + if (this.match(14)) { + const typeCastNode = this.startNodeAt(startLoc); + typeCastNode.expression = node; + typeCastNode.typeAnnotation = this.tsParseTypeAnnotation(); + return this.finishNode(typeCastNode, "TSTypeCastExpression"); + } + return node; + } + parseExportDeclaration(node) { + if (!this.state.isAmbientContext && this.isContextual(125)) { + return this.tsInAmbientContext(() => this.parseExportDeclaration(node)); + } + const startLoc = this.state.startLoc; + const isDeclare = this.eatContextual(125); + if (isDeclare && (this.isContextual(125) || !this.shouldParseExportDeclaration())) { + throw this.raise(TSErrors.ExpectedAmbientAfterExportDeclare, this.state.startLoc); + } + const isIdentifier = tokenIsIdentifier(this.state.type); + const declaration = isIdentifier && this.tsTryParseExportDeclaration() || super.parseExportDeclaration(node); + if (!declaration) return null; + if (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare) { + node.exportKind = "type"; + } + if (isDeclare && declaration.type !== "TSImportEqualsDeclaration") { + this.resetStartLocation(declaration, startLoc); + declaration.declare = true; + } + return declaration; + } + parseClassId(node, isStatement, optionalId, bindingType) { + if ((!isStatement || optionalId) && this.isContextual(113)) { + return; + } + super.parseClassId(node, isStatement, optionalId, node.declare ? 1024 : 8331); + const typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers); + if (typeParameters) node.typeParameters = typeParameters; + } + parseClassPropertyAnnotation(node) { + if (!node.optional) { + if (this.eat(35)) { + node.definite = true; + } else if (this.eat(17)) { + node.optional = true; + } + } + const type = this.tsTryParseTypeAnnotation(); + if (type) node.typeAnnotation = type; + } + parseClassProperty(node) { + this.parseClassPropertyAnnotation(node); + if (this.state.isAmbientContext && !(node.readonly && !node.typeAnnotation) && this.match(29)) { + this.raise(TSErrors.DeclareClassFieldHasInitializer, this.state.startLoc); + } + if (node.abstract && this.match(29)) { + const { + key + } = node; + this.raise(TSErrors.AbstractPropertyHasInitializer, this.state.startLoc, { + propertyName: key.type === "Identifier" && !node.computed ? key.name : `[${this.input.slice(this.offsetToSourcePos(key.start), this.offsetToSourcePos(key.end))}]` + }); + } + return super.parseClassProperty(node); + } + parseClassPrivateProperty(node) { + if (node.abstract) { + this.raise(TSErrors.PrivateElementHasAbstract, node); + } + if (node.accessibility) { + this.raise(TSErrors.PrivateElementHasAccessibility, node, { + modifier: node.accessibility + }); + } + this.parseClassPropertyAnnotation(node); + return super.parseClassPrivateProperty(node); + } + parseClassAccessorProperty(node) { + this.parseClassPropertyAnnotation(node); + if (node.optional) { + this.raise(TSErrors.AccessorCannotBeOptional, node); + } + return super.parseClassAccessorProperty(node); + } + pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + if (typeParameters && isConstructor) { + this.raise(TSErrors.ConstructorHasTypeParameters, typeParameters); + } + const { + declare = false, + kind + } = method; + if (declare && (kind === "get" || kind === "set")) { + this.raise(TSErrors.DeclareAccessor, method, { + kind + }); + } + if (typeParameters) method.typeParameters = typeParameters; + super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); + } + pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + if (typeParameters) method.typeParameters = typeParameters; + super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); + } + declareClassPrivateMethodInScope(node, kind) { + if (node.type === "TSDeclareMethod") return; + if (node.type === "MethodDefinition" && !hasOwnProperty.call(node.value, "body")) { + return; + } + super.declareClassPrivateMethodInScope(node, kind); + } + parseClassSuper(node) { + super.parseClassSuper(node); + if (node.superClass && (this.match(47) || this.match(51))) { + { + node.superTypeParameters = this.tsParseTypeArgumentsInExpression(); + } + } + if (this.eatContextual(113)) { + node.implements = this.tsParseHeritageClause("implements"); + } + } + parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + if (typeParameters) prop.typeParameters = typeParameters; + return super.parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors); + } + parseFunctionParams(node, isConstructor) { + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + if (typeParameters) node.typeParameters = typeParameters; + super.parseFunctionParams(node, isConstructor); + } + parseVarId(decl, kind) { + super.parseVarId(decl, kind); + if (decl.id.type === "Identifier" && !this.hasPrecedingLineBreak() && this.eat(35)) { + decl.definite = true; + } + const type = this.tsTryParseTypeAnnotation(); + if (type) { + decl.id.typeAnnotation = type; + this.resetEndLocation(decl.id); + } + } + parseAsyncArrowFromCallExpression(node, call) { + if (this.match(14)) { + node.returnType = this.tsParseTypeAnnotation(); + } + return super.parseAsyncArrowFromCallExpression(node, call); + } + parseMaybeAssign(refExpressionErrors, afterLeftParse) { + var _jsx, _jsx2, _typeCast, _jsx3, _typeCast2; + let state; + let jsx; + let typeCast; + if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) { + state = this.state.clone(); + jsx = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state); + if (!jsx.error) return jsx.node; + const { + context + } = this.state; + const currentContext = context[context.length - 1]; + if (currentContext === types.j_oTag || currentContext === types.j_expr) { + context.pop(); + } + } + if (!((_jsx = jsx) != null && _jsx.error) && !this.match(47)) { + return super.parseMaybeAssign(refExpressionErrors, afterLeftParse); + } + if (!state || state === this.state) state = this.state.clone(); + let typeParameters; + const arrow = this.tryParse(abort => { + var _expr$extra, _typeParameters; + typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier); + const expr = super.parseMaybeAssign(refExpressionErrors, afterLeftParse); + if (expr.type !== "ArrowFunctionExpression" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) { + abort(); + } + if (((_typeParameters = typeParameters) == null ? void 0 : _typeParameters.params.length) !== 0) { + this.resetStartLocationFromNode(expr, typeParameters); + } + expr.typeParameters = typeParameters; + return expr; + }, state); + if (!arrow.error && !arrow.aborted) { + if (typeParameters) this.reportReservedArrowTypeParam(typeParameters); + return arrow.node; + } + if (!jsx) { + assert(!this.hasPlugin("jsx")); + typeCast = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state); + if (!typeCast.error) return typeCast.node; + } + if ((_jsx2 = jsx) != null && _jsx2.node) { + this.state = jsx.failState; + return jsx.node; + } + if (arrow.node) { + this.state = arrow.failState; + if (typeParameters) this.reportReservedArrowTypeParam(typeParameters); + return arrow.node; + } + if ((_typeCast = typeCast) != null && _typeCast.node) { + this.state = typeCast.failState; + return typeCast.node; + } + throw ((_jsx3 = jsx) == null ? void 0 : _jsx3.error) || arrow.error || ((_typeCast2 = typeCast) == null ? void 0 : _typeCast2.error); + } + reportReservedArrowTypeParam(node) { + var _node$extra; + if (node.params.length === 1 && !node.params[0].constraint && !((_node$extra = node.extra) != null && _node$extra.trailingComma) && this.getPluginOption("typescript", "disallowAmbiguousJSXLike")) { + this.raise(TSErrors.ReservedArrowTypeParam, node); + } + } + parseMaybeUnary(refExpressionErrors, sawUnary) { + if (!this.hasPlugin("jsx") && this.match(47)) { + return this.tsParseTypeAssertion(); + } + return super.parseMaybeUnary(refExpressionErrors, sawUnary); + } + parseArrow(node) { + if (this.match(14)) { + const result = this.tryParse(abort => { + const returnType = this.tsParseTypeOrTypePredicateAnnotation(14); + if (this.canInsertSemicolon() || !this.match(19)) abort(); + return returnType; + }); + if (result.aborted) return; + if (!result.thrown) { + if (result.error) this.state = result.failState; + node.returnType = result.node; + } + } + return super.parseArrow(node); + } + parseFunctionParamType(param) { + if (this.eat(17)) { + param.optional = true; + } + const type = this.tsTryParseTypeAnnotation(); + if (type) param.typeAnnotation = type; + this.resetEndLocation(param); + return param; + } + isAssignable(node, isBinding) { + switch (node.type) { + case "TSTypeCastExpression": + return this.isAssignable(node.expression, isBinding); + case "TSParameterProperty": + return true; + default: + return super.isAssignable(node, isBinding); + } + } + toAssignable(node, isLHS = false) { + switch (node.type) { + case "ParenthesizedExpression": + this.toAssignableParenthesizedExpression(node, isLHS); + break; + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSNonNullExpression": + case "TSTypeAssertion": + if (isLHS) { + this.expressionScope.recordArrowParameterBindingError(TSErrors.UnexpectedTypeCastInParameter, node); + } else { + this.raise(TSErrors.UnexpectedTypeCastInParameter, node); + } + this.toAssignable(node.expression, isLHS); + break; + case "AssignmentExpression": + if (!isLHS && node.left.type === "TSTypeCastExpression") { + node.left = this.typeCastToParameter(node.left); + } + default: + super.toAssignable(node, isLHS); + } + } + toAssignableParenthesizedExpression(node, isLHS) { + switch (node.expression.type) { + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSNonNullExpression": + case "TSTypeAssertion": + case "ParenthesizedExpression": + this.toAssignable(node.expression, isLHS); + break; + default: + super.toAssignable(node, isLHS); + } + } + checkToRestConversion(node, allowPattern) { + switch (node.type) { + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSTypeAssertion": + case "TSNonNullExpression": + this.checkToRestConversion(node.expression, false); + break; + default: + super.checkToRestConversion(node, allowPattern); + } + } + isValidLVal(type, isUnparenthesizedInAssign, binding) { + switch (type) { + case "TSTypeCastExpression": + return true; + case "TSParameterProperty": + return "parameter"; + case "TSNonNullExpression": + case "TSInstantiationExpression": + return "expression"; + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSTypeAssertion": + return (binding !== 64 || !isUnparenthesizedInAssign) && ["expression", true]; + default: + return super.isValidLVal(type, isUnparenthesizedInAssign, binding); + } + } + parseBindingAtom() { + if (this.state.type === 78) { + return this.parseIdentifier(true); + } + return super.parseBindingAtom(); + } + parseMaybeDecoratorArguments(expr, startLoc) { + if (this.match(47) || this.match(51)) { + const typeArguments = this.tsParseTypeArgumentsInExpression(); + if (this.match(10)) { + const call = super.parseMaybeDecoratorArguments(expr, startLoc); + { + call.typeParameters = typeArguments; + } + return call; + } + this.unexpected(null, 10); + } + return super.parseMaybeDecoratorArguments(expr, startLoc); + } + checkCommaAfterRest(close) { + if (this.state.isAmbientContext && this.match(12) && this.lookaheadCharCode() === close) { + this.next(); + return false; + } + return super.checkCommaAfterRest(close); + } + isClassMethod() { + return this.match(47) || super.isClassMethod(); + } + isClassProperty() { + return this.match(35) || this.match(14) || super.isClassProperty(); + } + parseMaybeDefault(startLoc, left) { + const node = super.parseMaybeDefault(startLoc, left); + if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { + this.raise(TSErrors.TypeAnnotationAfterAssign, node.typeAnnotation); + } + return node; + } + getTokenFromCode(code) { + if (this.state.inType) { + if (code === 62) { + this.finishOp(48, 1); + return; + } + if (code === 60) { + this.finishOp(47, 1); + return; + } + } + super.getTokenFromCode(code); + } + reScan_lt_gt() { + const { + type + } = this.state; + if (type === 47) { + this.state.pos -= 1; + this.readToken_lt(); + } else if (type === 48) { + this.state.pos -= 1; + this.readToken_gt(); + } + } + reScan_lt() { + const { + type + } = this.state; + if (type === 51) { + this.state.pos -= 2; + this.finishOp(47, 1); + return 47; + } + return type; + } + toAssignableList(exprList, trailingCommaLoc, isLHS) { + for (let i = 0; i < exprList.length; i++) { + const expr = exprList[i]; + if ((expr == null ? void 0 : expr.type) === "TSTypeCastExpression") { + exprList[i] = this.typeCastToParameter(expr); + } + } + super.toAssignableList(exprList, trailingCommaLoc, isLHS); + } + typeCastToParameter(node) { + node.expression.typeAnnotation = node.typeAnnotation; + this.resetEndLocation(node.expression, node.typeAnnotation.loc.end); + return node.expression; + } + shouldParseArrow(params) { + if (this.match(14)) { + return params.every(expr => this.isAssignable(expr, true)); + } + return super.shouldParseArrow(params); + } + shouldParseAsyncArrow() { + return this.match(14) || super.shouldParseAsyncArrow(); + } + canHaveLeadingDecorator() { + return super.canHaveLeadingDecorator() || this.isAbstractClass(); + } + jsxParseOpeningElementAfterName(node) { + if (this.match(47) || this.match(51)) { + const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArgumentsInExpression()); + if (typeArguments) { + { + node.typeParameters = typeArguments; + } + } + } + return super.jsxParseOpeningElementAfterName(node); + } + getGetterSetterExpectedParamCount(method) { + const baseCount = super.getGetterSetterExpectedParamCount(method); + const params = this.getObjectOrClassMethodParams(method); + const firstParam = params[0]; + const hasContextParam = firstParam && this.isThisParam(firstParam); + return hasContextParam ? baseCount + 1 : baseCount; + } + parseCatchClauseParam() { + const param = super.parseCatchClauseParam(); + const type = this.tsTryParseTypeAnnotation(); + if (type) { + param.typeAnnotation = type; + this.resetEndLocation(param); + } + return param; + } + tsInAmbientContext(cb) { + const { + isAmbientContext: oldIsAmbientContext, + strict: oldStrict + } = this.state; + this.state.isAmbientContext = true; + this.state.strict = false; + try { + return cb(); + } finally { + this.state.isAmbientContext = oldIsAmbientContext; + this.state.strict = oldStrict; + } + } + parseClass(node, isStatement, optionalId) { + const oldInAbstractClass = this.state.inAbstractClass; + this.state.inAbstractClass = !!node.abstract; + try { + return super.parseClass(node, isStatement, optionalId); + } finally { + this.state.inAbstractClass = oldInAbstractClass; + } + } + tsParseAbstractDeclaration(node, decorators) { + if (this.match(80)) { + node.abstract = true; + return this.maybeTakeDecorators(decorators, this.parseClass(node, true, false)); + } else if (this.isContextual(129)) { + if (!this.hasFollowingLineBreak()) { + node.abstract = true; + this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifer, node); + return this.tsParseInterfaceDeclaration(node); + } + } else { + this.unexpected(null, 80); + } + } + parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope) { + const method = super.parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope); + if (method.abstract) { + const hasEstreePlugin = this.hasPlugin("estree"); + const methodFn = hasEstreePlugin ? method.value : method; + if (methodFn.body) { + const { + key + } = method; + this.raise(TSErrors.AbstractMethodHasImplementation, method, { + methodName: key.type === "Identifier" && !method.computed ? key.name : `[${this.input.slice(this.offsetToSourcePos(key.start), this.offsetToSourcePos(key.end))}]` + }); + } + } + return method; + } + tsParseTypeParameterName() { + const typeName = this.parseIdentifier(); + return typeName.name; + } + shouldParseAsAmbientContext() { + return !!this.getPluginOption("typescript", "dts"); + } + parse() { + if (this.shouldParseAsAmbientContext()) { + this.state.isAmbientContext = true; + } + return super.parse(); + } + getExpression() { + if (this.shouldParseAsAmbientContext()) { + this.state.isAmbientContext = true; + } + return super.getExpression(); + } + parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly) { + if (!isString && isMaybeTypeOnly) { + this.parseTypeOnlyImportExportSpecifier(node, false, isInTypeExport); + return this.finishNode(node, "ExportSpecifier"); + } + node.exportKind = "value"; + return super.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly); + } + parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) { + if (!importedIsString && isMaybeTypeOnly) { + this.parseTypeOnlyImportExportSpecifier(specifier, true, isInTypeOnlyImport); + return this.finishNode(specifier, "ImportSpecifier"); + } + specifier.importKind = "value"; + return super.parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, isInTypeOnlyImport ? 4098 : 4096); + } + parseTypeOnlyImportExportSpecifier(node, isImport, isInTypeOnlyImportExport) { + const leftOfAsKey = isImport ? "imported" : "local"; + const rightOfAsKey = isImport ? "local" : "exported"; + let leftOfAs = node[leftOfAsKey]; + let rightOfAs; + let hasTypeSpecifier = false; + let canParseAsKeyword = true; + const loc = leftOfAs.loc.start; + if (this.isContextual(93)) { + const firstAs = this.parseIdentifier(); + if (this.isContextual(93)) { + const secondAs = this.parseIdentifier(); + if (tokenIsKeywordOrIdentifier(this.state.type)) { + hasTypeSpecifier = true; + leftOfAs = firstAs; + rightOfAs = isImport ? this.parseIdentifier() : this.parseModuleExportName(); + canParseAsKeyword = false; + } else { + rightOfAs = secondAs; + canParseAsKeyword = false; + } + } else if (tokenIsKeywordOrIdentifier(this.state.type)) { + canParseAsKeyword = false; + rightOfAs = isImport ? this.parseIdentifier() : this.parseModuleExportName(); + } else { + hasTypeSpecifier = true; + leftOfAs = firstAs; + } + } else if (tokenIsKeywordOrIdentifier(this.state.type)) { + hasTypeSpecifier = true; + if (isImport) { + leftOfAs = this.parseIdentifier(true); + if (!this.isContextual(93)) { + this.checkReservedWord(leftOfAs.name, leftOfAs.loc.start, true, true); + } + } else { + leftOfAs = this.parseModuleExportName(); + } + } + if (hasTypeSpecifier && isInTypeOnlyImportExport) { + this.raise(isImport ? TSErrors.TypeModifierIsUsedInTypeImports : TSErrors.TypeModifierIsUsedInTypeExports, loc); + } + node[leftOfAsKey] = leftOfAs; + node[rightOfAsKey] = rightOfAs; + const kindKey = isImport ? "importKind" : "exportKind"; + node[kindKey] = hasTypeSpecifier ? "type" : "value"; + if (canParseAsKeyword && this.eatContextual(93)) { + node[rightOfAsKey] = isImport ? this.parseIdentifier() : this.parseModuleExportName(); + } + if (!node[rightOfAsKey]) { + node[rightOfAsKey] = cloneIdentifier(node[leftOfAsKey]); + } + if (isImport) { + this.checkIdentifier(node[rightOfAsKey], hasTypeSpecifier ? 4098 : 4096); + } + } +}; +function isPossiblyLiteralEnum(expression) { + if (expression.type !== "MemberExpression") return false; + const { + computed, + property + } = expression; + if (computed && property.type !== "StringLiteral" && (property.type !== "TemplateLiteral" || property.expressions.length > 0)) { + return false; + } + return isUncomputedMemberExpressionChain(expression.object); +} +function isValidAmbientConstInitializer(expression, estree) { + var _expression$extra; + const { + type + } = expression; + if ((_expression$extra = expression.extra) != null && _expression$extra.parenthesized) { + return false; + } + if (estree) { + if (type === "Literal") { + const { + value + } = expression; + if (typeof value === "string" || typeof value === "boolean") { + return true; + } + } + } else { + if (type === "StringLiteral" || type === "BooleanLiteral") { + return true; + } + } + if (isNumber(expression, estree) || isNegativeNumber(expression, estree)) { + return true; + } + if (type === "TemplateLiteral" && expression.expressions.length === 0) { + return true; + } + if (isPossiblyLiteralEnum(expression)) { + return true; + } + return false; +} +function isNumber(expression, estree) { + if (estree) { + return expression.type === "Literal" && (typeof expression.value === "number" || "bigint" in expression); + } + return expression.type === "NumericLiteral" || expression.type === "BigIntLiteral"; +} +function isNegativeNumber(expression, estree) { + if (expression.type === "UnaryExpression") { + const { + operator, + argument + } = expression; + if (operator === "-" && isNumber(argument, estree)) { + return true; + } + } + return false; +} +function isUncomputedMemberExpressionChain(expression) { + if (expression.type === "Identifier") return true; + if (expression.type !== "MemberExpression" || expression.computed) { + return false; + } + return isUncomputedMemberExpressionChain(expression.object); +} +const PlaceholderErrors = ParseErrorEnum`placeholders`({ + ClassNameIsRequired: "A class name is required.", + UnexpectedSpace: "Unexpected space in placeholder." +}); +var placeholders = superClass => class PlaceholdersParserMixin extends superClass { + parsePlaceholder(expectedNode) { + if (this.match(133)) { + const node = this.startNode(); + this.next(); + this.assertNoSpace(); + node.name = super.parseIdentifier(true); + this.assertNoSpace(); + this.expect(133); + return this.finishPlaceholder(node, expectedNode); + } + } + finishPlaceholder(node, expectedNode) { + let placeholder = node; + if (!placeholder.expectedNode || !placeholder.type) { + placeholder = this.finishNode(placeholder, "Placeholder"); + } + placeholder.expectedNode = expectedNode; + return placeholder; + } + getTokenFromCode(code) { + if (code === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) { + this.finishOp(133, 2); + } else { + super.getTokenFromCode(code); + } + } + parseExprAtom(refExpressionErrors) { + return this.parsePlaceholder("Expression") || super.parseExprAtom(refExpressionErrors); + } + parseIdentifier(liberal) { + return this.parsePlaceholder("Identifier") || super.parseIdentifier(liberal); + } + checkReservedWord(word, startLoc, checkKeywords, isBinding) { + if (word !== undefined) { + super.checkReservedWord(word, startLoc, checkKeywords, isBinding); + } + } + parseBindingAtom() { + return this.parsePlaceholder("Pattern") || super.parseBindingAtom(); + } + isValidLVal(type, isParenthesized, binding) { + return type === "Placeholder" || super.isValidLVal(type, isParenthesized, binding); + } + toAssignable(node, isLHS) { + if (node && node.type === "Placeholder" && node.expectedNode === "Expression") { + node.expectedNode = "Pattern"; + } else { + super.toAssignable(node, isLHS); + } + } + chStartsBindingIdentifier(ch, pos) { + if (super.chStartsBindingIdentifier(ch, pos)) { + return true; + } + const nextToken = this.lookahead(); + if (nextToken.type === 133) { + return true; + } + return false; + } + verifyBreakContinue(node, isBreak) { + if (node.label && node.label.type === "Placeholder") return; + super.verifyBreakContinue(node, isBreak); + } + parseExpressionStatement(node, expr) { + var _expr$extra; + if (expr.type !== "Placeholder" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) { + return super.parseExpressionStatement(node, expr); + } + if (this.match(14)) { + const stmt = node; + stmt.label = this.finishPlaceholder(expr, "Identifier"); + this.next(); + stmt.body = super.parseStatementOrSloppyAnnexBFunctionDeclaration(); + return this.finishNode(stmt, "LabeledStatement"); + } + this.semicolon(); + const stmtPlaceholder = node; + stmtPlaceholder.name = expr.name; + return this.finishPlaceholder(stmtPlaceholder, "Statement"); + } + parseBlock(allowDirectives, createNewLexicalScope, afterBlockParse) { + return this.parsePlaceholder("BlockStatement") || super.parseBlock(allowDirectives, createNewLexicalScope, afterBlockParse); + } + parseFunctionId(requireId) { + return this.parsePlaceholder("Identifier") || super.parseFunctionId(requireId); + } + parseClass(node, isStatement, optionalId) { + const type = isStatement ? "ClassDeclaration" : "ClassExpression"; + this.next(); + const oldStrict = this.state.strict; + const placeholder = this.parsePlaceholder("Identifier"); + if (placeholder) { + if (this.match(81) || this.match(133) || this.match(5)) { + node.id = placeholder; + } else if (optionalId || !isStatement) { + node.id = null; + node.body = this.finishPlaceholder(placeholder, "ClassBody"); + return this.finishNode(node, type); + } else { + throw this.raise(PlaceholderErrors.ClassNameIsRequired, this.state.startLoc); + } + } else { + this.parseClassId(node, isStatement, optionalId); + } + super.parseClassSuper(node); + node.body = this.parsePlaceholder("ClassBody") || super.parseClassBody(!!node.superClass, oldStrict); + return this.finishNode(node, type); + } + parseExport(node, decorators) { + const placeholder = this.parsePlaceholder("Identifier"); + if (!placeholder) return super.parseExport(node, decorators); + const node2 = node; + if (!this.isContextual(98) && !this.match(12)) { + node2.specifiers = []; + node2.source = null; + node2.declaration = this.finishPlaceholder(placeholder, "Declaration"); + return this.finishNode(node2, "ExportNamedDeclaration"); + } + this.expectPlugin("exportDefaultFrom"); + const specifier = this.startNode(); + specifier.exported = placeholder; + node2.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; + return super.parseExport(node2, decorators); + } + isExportDefaultSpecifier() { + if (this.match(65)) { + const next = this.nextTokenStart(); + if (this.isUnparsedContextual(next, "from")) { + if (this.input.startsWith(tokenLabelName(133), this.nextTokenStartSince(next + 4))) { + return true; + } + } + } + return super.isExportDefaultSpecifier(); + } + maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier) { + var _specifiers; + if ((_specifiers = node.specifiers) != null && _specifiers.length) { + return true; + } + return super.maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier); + } + checkExport(node) { + const { + specifiers + } = node; + if (specifiers != null && specifiers.length) { + node.specifiers = specifiers.filter(node => node.exported.type === "Placeholder"); + } + super.checkExport(node); + node.specifiers = specifiers; + } + parseImport(node) { + const placeholder = this.parsePlaceholder("Identifier"); + if (!placeholder) return super.parseImport(node); + node.specifiers = []; + if (!this.isContextual(98) && !this.match(12)) { + node.source = this.finishPlaceholder(placeholder, "StringLiteral"); + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); + } + const specifier = this.startNodeAtNode(placeholder); + specifier.local = placeholder; + node.specifiers.push(this.finishNode(specifier, "ImportDefaultSpecifier")); + if (this.eat(12)) { + const hasStarImport = this.maybeParseStarImportSpecifier(node); + if (!hasStarImport) this.parseNamedImportSpecifiers(node); + } + this.expectContextual(98); + node.source = this.parseImportSource(); + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); + } + parseImportSource() { + return this.parsePlaceholder("StringLiteral") || super.parseImportSource(); + } + assertNoSpace() { + if (this.state.start > this.offsetToSourcePos(this.state.lastTokEndLoc.index)) { + this.raise(PlaceholderErrors.UnexpectedSpace, this.state.lastTokEndLoc); + } + } +}; +var v8intrinsic = superClass => class V8IntrinsicMixin extends superClass { + parseV8Intrinsic() { + if (this.match(54)) { + const v8IntrinsicStartLoc = this.state.startLoc; + const node = this.startNode(); + this.next(); + if (tokenIsIdentifier(this.state.type)) { + const name = this.parseIdentifierName(); + const identifier = this.createIdentifier(node, name); + identifier.type = "V8IntrinsicIdentifier"; + if (this.match(10)) { + return identifier; + } + } + this.unexpected(v8IntrinsicStartLoc); + } + } + parseExprAtom(refExpressionErrors) { + return this.parseV8Intrinsic() || super.parseExprAtom(refExpressionErrors); + } +}; +const PIPELINE_PROPOSALS = ["minimal", "fsharp", "hack", "smart"]; +const TOPIC_TOKENS = ["^^", "@@", "^", "%", "#"]; +function validatePlugins(pluginsMap) { + if (pluginsMap.has("decorators")) { + if (pluginsMap.has("decorators-legacy")) { + throw new Error("Cannot use the decorators and decorators-legacy plugin together"); + } + const decoratorsBeforeExport = pluginsMap.get("decorators").decoratorsBeforeExport; + if (decoratorsBeforeExport != null && typeof decoratorsBeforeExport !== "boolean") { + throw new Error("'decoratorsBeforeExport' must be a boolean, if specified."); + } + const allowCallParenthesized = pluginsMap.get("decorators").allowCallParenthesized; + if (allowCallParenthesized != null && typeof allowCallParenthesized !== "boolean") { + throw new Error("'allowCallParenthesized' must be a boolean."); + } + } + if (pluginsMap.has("flow") && pluginsMap.has("typescript")) { + throw new Error("Cannot combine flow and typescript plugins."); + } + if (pluginsMap.has("placeholders") && pluginsMap.has("v8intrinsic")) { + throw new Error("Cannot combine placeholders and v8intrinsic plugins."); + } + if (pluginsMap.has("pipelineOperator")) { + var _pluginsMap$get; + const proposal = pluginsMap.get("pipelineOperator").proposal; + if (!PIPELINE_PROPOSALS.includes(proposal)) { + const proposalList = PIPELINE_PROPOSALS.map(p => `"${p}"`).join(", "); + throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${proposalList}.`); + } + const tupleSyntaxIsHash = ((_pluginsMap$get = pluginsMap.get("recordAndTuple")) == null ? void 0 : _pluginsMap$get.syntaxType) === "hash"; + if (proposal === "hack") { + if (pluginsMap.has("placeholders")) { + throw new Error("Cannot combine placeholders plugin and Hack-style pipes."); + } + if (pluginsMap.has("v8intrinsic")) { + throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes."); + } + const topicToken = pluginsMap.get("pipelineOperator").topicToken; + if (!TOPIC_TOKENS.includes(topicToken)) { + const tokenList = TOPIC_TOKENS.map(t => `"${t}"`).join(", "); + throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${tokenList}.`); + } + if (topicToken === "#" && tupleSyntaxIsHash) { + throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`); + } + } else if (proposal === "smart" && tupleSyntaxIsHash) { + throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`); + } + } + if (pluginsMap.has("moduleAttributes")) { + { + if (pluginsMap.has("deprecatedImportAssert") || pluginsMap.has("importAssertions")) { + throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins."); + } + const moduleAttributesVersionPluginOption = pluginsMap.get("moduleAttributes").version; + if (moduleAttributesVersionPluginOption !== "may-2020") { + throw new Error("The 'moduleAttributes' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is 'may-2020'."); + } + } + } + if (pluginsMap.has("importAssertions")) { + if (pluginsMap.has("deprecatedImportAssert")) { + throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins."); + } + } + if (!pluginsMap.has("deprecatedImportAssert") && pluginsMap.has("importAttributes") && pluginsMap.get("importAttributes").deprecatedAssertSyntax) { + { + pluginsMap.set("deprecatedImportAssert", {}); + } + } + if (pluginsMap.has("recordAndTuple")) { + const syntaxType = pluginsMap.get("recordAndTuple").syntaxType; + if (syntaxType != null) { + { + const RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"]; + if (!RECORD_AND_TUPLE_SYNTAX_TYPES.includes(syntaxType)) { + throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map(p => `'${p}'`).join(", ")); + } + } + } + } + if (pluginsMap.has("asyncDoExpressions") && !pluginsMap.has("doExpressions")) { + const error = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins."); + error.missingPlugins = "doExpressions"; + throw error; + } + if (pluginsMap.has("optionalChainingAssign") && pluginsMap.get("optionalChainingAssign").version !== "2023-07") { + throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is '2023-07'."); + } +} +const mixinPlugins = { + estree, + jsx, + flow, + typescript, + v8intrinsic, + placeholders +}; +const mixinPluginNames = Object.keys(mixinPlugins); +class ExpressionParser extends LValParser { + checkProto(prop, isRecord, protoRef, refExpressionErrors) { + if (prop.type === "SpreadElement" || this.isObjectMethod(prop) || prop.computed || prop.shorthand) { + return; + } + const key = prop.key; + const name = key.type === "Identifier" ? key.name : key.value; + if (name === "__proto__") { + if (isRecord) { + this.raise(Errors.RecordNoProto, key); + return; + } + if (protoRef.used) { + if (refExpressionErrors) { + if (refExpressionErrors.doubleProtoLoc === null) { + refExpressionErrors.doubleProtoLoc = key.loc.start; + } + } else { + this.raise(Errors.DuplicateProto, key); + } + } + protoRef.used = true; + } + } + shouldExitDescending(expr, potentialArrowAt) { + return expr.type === "ArrowFunctionExpression" && this.offsetToSourcePos(expr.start) === potentialArrowAt; + } + getExpression() { + this.enterInitialScopes(); + this.nextToken(); + const expr = this.parseExpression(); + if (!this.match(140)) { + this.unexpected(); + } + this.finalizeRemainingComments(); + expr.comments = this.comments; + expr.errors = this.state.errors; + if (this.optionFlags & 128) { + expr.tokens = this.tokens; + } + return expr; + } + parseExpression(disallowIn, refExpressionErrors) { + if (disallowIn) { + return this.disallowInAnd(() => this.parseExpressionBase(refExpressionErrors)); + } + return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors)); + } + parseExpressionBase(refExpressionErrors) { + const startLoc = this.state.startLoc; + const expr = this.parseMaybeAssign(refExpressionErrors); + if (this.match(12)) { + const node = this.startNodeAt(startLoc); + node.expressions = [expr]; + while (this.eat(12)) { + node.expressions.push(this.parseMaybeAssign(refExpressionErrors)); + } + this.toReferencedList(node.expressions); + return this.finishNode(node, "SequenceExpression"); + } + return expr; + } + parseMaybeAssignDisallowIn(refExpressionErrors, afterLeftParse) { + return this.disallowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse)); + } + parseMaybeAssignAllowIn(refExpressionErrors, afterLeftParse) { + return this.allowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse)); + } + setOptionalParametersError(refExpressionErrors, resultError) { + var _resultError$loc; + refExpressionErrors.optionalParametersLoc = (_resultError$loc = resultError == null ? void 0 : resultError.loc) != null ? _resultError$loc : this.state.startLoc; + } + parseMaybeAssign(refExpressionErrors, afterLeftParse) { + const startLoc = this.state.startLoc; + if (this.isContextual(108)) { + if (this.prodParam.hasYield) { + let left = this.parseYield(); + if (afterLeftParse) { + left = afterLeftParse.call(this, left, startLoc); + } + return left; + } + } + let ownExpressionErrors; + if (refExpressionErrors) { + ownExpressionErrors = false; + } else { + refExpressionErrors = new ExpressionErrors(); + ownExpressionErrors = true; + } + const { + type + } = this.state; + if (type === 10 || tokenIsIdentifier(type)) { + this.state.potentialArrowAt = this.state.start; + } + let left = this.parseMaybeConditional(refExpressionErrors); + if (afterLeftParse) { + left = afterLeftParse.call(this, left, startLoc); + } + if (tokenIsAssignment(this.state.type)) { + const node = this.startNodeAt(startLoc); + const operator = this.state.value; + node.operator = operator; + if (this.match(29)) { + this.toAssignable(left, true); + node.left = left; + const startIndex = startLoc.index; + if (refExpressionErrors.doubleProtoLoc != null && refExpressionErrors.doubleProtoLoc.index >= startIndex) { + refExpressionErrors.doubleProtoLoc = null; + } + if (refExpressionErrors.shorthandAssignLoc != null && refExpressionErrors.shorthandAssignLoc.index >= startIndex) { + refExpressionErrors.shorthandAssignLoc = null; + } + if (refExpressionErrors.privateKeyLoc != null && refExpressionErrors.privateKeyLoc.index >= startIndex) { + this.checkDestructuringPrivate(refExpressionErrors); + refExpressionErrors.privateKeyLoc = null; + } + } else { + node.left = left; + } + this.next(); + node.right = this.parseMaybeAssign(); + this.checkLVal(left, this.finishNode(node, "AssignmentExpression")); + return node; + } else if (ownExpressionErrors) { + this.checkExpressionErrors(refExpressionErrors, true); + } + return left; + } + parseMaybeConditional(refExpressionErrors) { + const startLoc = this.state.startLoc; + const potentialArrowAt = this.state.potentialArrowAt; + const expr = this.parseExprOps(refExpressionErrors); + if (this.shouldExitDescending(expr, potentialArrowAt)) { + return expr; + } + return this.parseConditional(expr, startLoc, refExpressionErrors); + } + parseConditional(expr, startLoc, refExpressionErrors) { + if (this.eat(17)) { + const node = this.startNodeAt(startLoc); + node.test = expr; + node.consequent = this.parseMaybeAssignAllowIn(); + this.expect(14); + node.alternate = this.parseMaybeAssign(); + return this.finishNode(node, "ConditionalExpression"); + } + return expr; + } + parseMaybeUnaryOrPrivate(refExpressionErrors) { + return this.match(139) ? this.parsePrivateName() : this.parseMaybeUnary(refExpressionErrors); + } + parseExprOps(refExpressionErrors) { + const startLoc = this.state.startLoc; + const potentialArrowAt = this.state.potentialArrowAt; + const expr = this.parseMaybeUnaryOrPrivate(refExpressionErrors); + if (this.shouldExitDescending(expr, potentialArrowAt)) { + return expr; + } + return this.parseExprOp(expr, startLoc, -1); + } + parseExprOp(left, leftStartLoc, minPrec) { + if (this.isPrivateName(left)) { + const value = this.getPrivateNameSV(left); + if (minPrec >= tokenOperatorPrecedence(58) || !this.prodParam.hasIn || !this.match(58)) { + this.raise(Errors.PrivateInExpectedIn, left, { + identifierName: value + }); + } + this.classScope.usePrivateName(value, left.loc.start); + } + const op = this.state.type; + if (tokenIsOperator(op) && (this.prodParam.hasIn || !this.match(58))) { + let prec = tokenOperatorPrecedence(op); + if (prec > minPrec) { + if (op === 39) { + this.expectPlugin("pipelineOperator"); + if (this.state.inFSharpPipelineDirectBody) { + return left; + } + this.checkPipelineAtInfixOperator(left, leftStartLoc); + } + const node = this.startNodeAt(leftStartLoc); + node.left = left; + node.operator = this.state.value; + const logical = op === 41 || op === 42; + const coalesce = op === 40; + if (coalesce) { + prec = tokenOperatorPrecedence(42); + } + this.next(); + if (op === 39 && this.hasPlugin(["pipelineOperator", { + proposal: "minimal" + }])) { + if (this.state.type === 96 && this.prodParam.hasAwait) { + throw this.raise(Errors.UnexpectedAwaitAfterPipelineBody, this.state.startLoc); + } + } + node.right = this.parseExprOpRightExpr(op, prec); + const finishedNode = this.finishNode(node, logical || coalesce ? "LogicalExpression" : "BinaryExpression"); + const nextOp = this.state.type; + if (coalesce && (nextOp === 41 || nextOp === 42) || logical && nextOp === 40) { + throw this.raise(Errors.MixingCoalesceWithLogical, this.state.startLoc); + } + return this.parseExprOp(finishedNode, leftStartLoc, minPrec); + } + } + return left; + } + parseExprOpRightExpr(op, prec) { + const startLoc = this.state.startLoc; + switch (op) { + case 39: + switch (this.getPluginOption("pipelineOperator", "proposal")) { + case "hack": + return this.withTopicBindingContext(() => { + return this.parseHackPipeBody(); + }); + case "fsharp": + return this.withSoloAwaitPermittingContext(() => { + return this.parseFSharpPipelineBody(prec); + }); + } + if (this.getPluginOption("pipelineOperator", "proposal") === "smart") { + return this.withTopicBindingContext(() => { + if (this.prodParam.hasYield && this.isContextual(108)) { + throw this.raise(Errors.PipeBodyIsTighter, this.state.startLoc); + } + return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(op, prec), startLoc); + }); + } + default: + return this.parseExprOpBaseRightExpr(op, prec); + } + } + parseExprOpBaseRightExpr(op, prec) { + const startLoc = this.state.startLoc; + return this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startLoc, tokenIsRightAssociative(op) ? prec - 1 : prec); + } + parseHackPipeBody() { + var _body$extra; + const { + startLoc + } = this.state; + const body = this.parseMaybeAssign(); + const requiredParentheses = UnparenthesizedPipeBodyDescriptions.has(body.type); + if (requiredParentheses && !((_body$extra = body.extra) != null && _body$extra.parenthesized)) { + this.raise(Errors.PipeUnparenthesizedBody, startLoc, { + type: body.type + }); + } + if (!this.topicReferenceWasUsedInCurrentContext()) { + this.raise(Errors.PipeTopicUnused, startLoc); + } + return body; + } + checkExponentialAfterUnary(node) { + if (this.match(57)) { + this.raise(Errors.UnexpectedTokenUnaryExponentiation, node.argument); + } + } + parseMaybeUnary(refExpressionErrors, sawUnary) { + const startLoc = this.state.startLoc; + const isAwait = this.isContextual(96); + if (isAwait && this.recordAwaitIfAllowed()) { + this.next(); + const expr = this.parseAwait(startLoc); + if (!sawUnary) this.checkExponentialAfterUnary(expr); + return expr; + } + const update = this.match(34); + const node = this.startNode(); + if (tokenIsPrefix(this.state.type)) { + node.operator = this.state.value; + node.prefix = true; + if (this.match(72)) { + this.expectPlugin("throwExpressions"); + } + const isDelete = this.match(89); + this.next(); + node.argument = this.parseMaybeUnary(null, true); + this.checkExpressionErrors(refExpressionErrors, true); + if (this.state.strict && isDelete) { + const arg = node.argument; + if (arg.type === "Identifier") { + this.raise(Errors.StrictDelete, node); + } else if (this.hasPropertyAsPrivateName(arg)) { + this.raise(Errors.DeletePrivateField, node); + } + } + if (!update) { + if (!sawUnary) { + this.checkExponentialAfterUnary(node); + } + return this.finishNode(node, "UnaryExpression"); + } + } + const expr = this.parseUpdate(node, update, refExpressionErrors); + if (isAwait) { + const { + type + } = this.state; + const startsExpr = this.hasPlugin("v8intrinsic") ? tokenCanStartExpression(type) : tokenCanStartExpression(type) && !this.match(54); + if (startsExpr && !this.isAmbiguousAwait()) { + this.raiseOverwrite(Errors.AwaitNotInAsyncContext, startLoc); + return this.parseAwait(startLoc); + } + } + return expr; + } + parseUpdate(node, update, refExpressionErrors) { + if (update) { + const updateExpressionNode = node; + this.checkLVal(updateExpressionNode.argument, this.finishNode(updateExpressionNode, "UpdateExpression")); + return node; + } + const startLoc = this.state.startLoc; + let expr = this.parseExprSubscripts(refExpressionErrors); + if (this.checkExpressionErrors(refExpressionErrors, false)) return expr; + while (tokenIsPostfix(this.state.type) && !this.canInsertSemicolon()) { + const node = this.startNodeAt(startLoc); + node.operator = this.state.value; + node.prefix = false; + node.argument = expr; + this.next(); + this.checkLVal(expr, expr = this.finishNode(node, "UpdateExpression")); + } + return expr; + } + parseExprSubscripts(refExpressionErrors) { + const startLoc = this.state.startLoc; + const potentialArrowAt = this.state.potentialArrowAt; + const expr = this.parseExprAtom(refExpressionErrors); + if (this.shouldExitDescending(expr, potentialArrowAt)) { + return expr; + } + return this.parseSubscripts(expr, startLoc); + } + parseSubscripts(base, startLoc, noCalls) { + const state = { + optionalChainMember: false, + maybeAsyncArrow: this.atPossibleAsyncArrow(base), + stop: false + }; + do { + base = this.parseSubscript(base, startLoc, noCalls, state); + state.maybeAsyncArrow = false; + } while (!state.stop); + return base; + } + parseSubscript(base, startLoc, noCalls, state) { + const { + type + } = this.state; + if (!noCalls && type === 15) { + return this.parseBind(base, startLoc, noCalls, state); + } else if (tokenIsTemplate(type)) { + return this.parseTaggedTemplateExpression(base, startLoc, state); + } + let optional = false; + if (type === 18) { + if (noCalls) { + this.raise(Errors.OptionalChainingNoNew, this.state.startLoc); + if (this.lookaheadCharCode() === 40) { + state.stop = true; + return base; + } + } + state.optionalChainMember = optional = true; + this.next(); + } + if (!noCalls && this.match(10)) { + return this.parseCoverCallAndAsyncArrowHead(base, startLoc, state, optional); + } else { + const computed = this.eat(0); + if (computed || optional || this.eat(16)) { + return this.parseMember(base, startLoc, state, computed, optional); + } else { + state.stop = true; + return base; + } + } + } + parseMember(base, startLoc, state, computed, optional) { + const node = this.startNodeAt(startLoc); + node.object = base; + node.computed = computed; + if (computed) { + node.property = this.parseExpression(); + this.expect(3); + } else if (this.match(139)) { + if (base.type === "Super") { + this.raise(Errors.SuperPrivateField, startLoc); + } + this.classScope.usePrivateName(this.state.value, this.state.startLoc); + node.property = this.parsePrivateName(); + } else { + node.property = this.parseIdentifier(true); + } + if (state.optionalChainMember) { + node.optional = optional; + return this.finishNode(node, "OptionalMemberExpression"); + } else { + return this.finishNode(node, "MemberExpression"); + } + } + parseBind(base, startLoc, noCalls, state) { + const node = this.startNodeAt(startLoc); + node.object = base; + this.next(); + node.callee = this.parseNoCallExpr(); + state.stop = true; + return this.parseSubscripts(this.finishNode(node, "BindExpression"), startLoc, noCalls); + } + parseCoverCallAndAsyncArrowHead(base, startLoc, state, optional) { + const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + let refExpressionErrors = null; + this.state.maybeInArrowParameters = true; + this.next(); + const node = this.startNodeAt(startLoc); + node.callee = base; + const { + maybeAsyncArrow, + optionalChainMember + } = state; + if (maybeAsyncArrow) { + this.expressionScope.enter(newAsyncArrowScope()); + refExpressionErrors = new ExpressionErrors(); + } + if (optionalChainMember) { + node.optional = optional; + } + if (optional) { + node.arguments = this.parseCallExpressionArguments(11); + } else { + node.arguments = this.parseCallExpressionArguments(11, base.type !== "Super", node, refExpressionErrors); + } + let finishedNode = this.finishCallExpression(node, optionalChainMember); + if (maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) { + state.stop = true; + this.checkDestructuringPrivate(refExpressionErrors); + this.expressionScope.validateAsPattern(); + this.expressionScope.exit(); + finishedNode = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startLoc), finishedNode); + } else { + if (maybeAsyncArrow) { + this.checkExpressionErrors(refExpressionErrors, true); + this.expressionScope.exit(); + } + this.toReferencedArguments(finishedNode); + } + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + return finishedNode; + } + toReferencedArguments(node, isParenthesizedExpr) { + this.toReferencedListDeep(node.arguments, isParenthesizedExpr); + } + parseTaggedTemplateExpression(base, startLoc, state) { + const node = this.startNodeAt(startLoc); + node.tag = base; + node.quasi = this.parseTemplate(true); + if (state.optionalChainMember) { + this.raise(Errors.OptionalChainingNoTemplate, startLoc); + } + return this.finishNode(node, "TaggedTemplateExpression"); + } + atPossibleAsyncArrow(base) { + return base.type === "Identifier" && base.name === "async" && this.state.lastTokEndLoc.index === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && this.offsetToSourcePos(base.start) === this.state.potentialArrowAt; + } + finishCallExpression(node, optional) { + if (node.callee.type === "Import") { + if (node.arguments.length === 0 || node.arguments.length > 2) { + this.raise(Errors.ImportCallArity, node); + } else { + for (const arg of node.arguments) { + if (arg.type === "SpreadElement") { + this.raise(Errors.ImportCallSpreadArgument, arg); + } + } + } + } + return this.finishNode(node, optional ? "OptionalCallExpression" : "CallExpression"); + } + parseCallExpressionArguments(close, allowPlaceholder, nodeForExtra, refExpressionErrors) { + const elts = []; + let first = true; + const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; + this.state.inFSharpPipelineDirectBody = false; + while (!this.eat(close)) { + if (first) { + first = false; + } else { + this.expect(12); + if (this.match(close)) { + if (nodeForExtra) { + this.addTrailingCommaExtraToNode(nodeForExtra); + } + this.next(); + break; + } + } + elts.push(this.parseExprListItem(false, refExpressionErrors, allowPlaceholder)); + } + this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; + return elts; + } + shouldParseAsyncArrow() { + return this.match(19) && !this.canInsertSemicolon(); + } + parseAsyncArrowFromCallExpression(node, call) { + var _call$extra; + this.resetPreviousNodeTrailingComments(call); + this.expect(19); + this.parseArrowExpression(node, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingCommaLoc); + if (call.innerComments) { + setInnerComments(node, call.innerComments); + } + if (call.callee.trailingComments) { + setInnerComments(node, call.callee.trailingComments); + } + return node; + } + parseNoCallExpr() { + const startLoc = this.state.startLoc; + return this.parseSubscripts(this.parseExprAtom(), startLoc, true); + } + parseExprAtom(refExpressionErrors) { + let node; + let decorators = null; + const { + type + } = this.state; + switch (type) { + case 79: + return this.parseSuper(); + case 83: + node = this.startNode(); + this.next(); + if (this.match(16)) { + return this.parseImportMetaProperty(node); + } + if (this.match(10)) { + if (this.optionFlags & 256) { + return this.parseImportCall(node); + } else { + return this.finishNode(node, "Import"); + } + } else { + this.raise(Errors.UnsupportedImport, this.state.lastTokStartLoc); + return this.finishNode(node, "Import"); + } + case 78: + node = this.startNode(); + this.next(); + return this.finishNode(node, "ThisExpression"); + case 90: + { + return this.parseDo(this.startNode(), false); + } + case 56: + case 31: + { + this.readRegexp(); + return this.parseRegExpLiteral(this.state.value); + } + case 135: + return this.parseNumericLiteral(this.state.value); + case 136: + return this.parseBigIntLiteral(this.state.value); + case 134: + return this.parseStringLiteral(this.state.value); + case 84: + return this.parseNullLiteral(); + case 85: + return this.parseBooleanLiteral(true); + case 86: + return this.parseBooleanLiteral(false); + case 10: + { + const canBeArrow = this.state.potentialArrowAt === this.state.start; + return this.parseParenAndDistinguishExpression(canBeArrow); + } + case 2: + case 1: + { + return this.parseArrayLike(this.state.type === 2 ? 4 : 3, false, true); + } + case 0: + { + return this.parseArrayLike(3, true, false, refExpressionErrors); + } + case 6: + case 7: + { + return this.parseObjectLike(this.state.type === 6 ? 9 : 8, false, true); + } + case 5: + { + return this.parseObjectLike(8, false, false, refExpressionErrors); + } + case 68: + return this.parseFunctionOrFunctionSent(); + case 26: + decorators = this.parseDecorators(); + case 80: + return this.parseClass(this.maybeTakeDecorators(decorators, this.startNode()), false); + case 77: + return this.parseNewOrNewTarget(); + case 25: + case 24: + return this.parseTemplate(false); + case 15: + { + node = this.startNode(); + this.next(); + node.object = null; + const callee = node.callee = this.parseNoCallExpr(); + if (callee.type === "MemberExpression") { + return this.finishNode(node, "BindExpression"); + } else { + throw this.raise(Errors.UnsupportedBind, callee); + } + } + case 139: + { + this.raise(Errors.PrivateInExpectedIn, this.state.startLoc, { + identifierName: this.state.value + }); + return this.parsePrivateName(); + } + case 33: + { + return this.parseTopicReferenceThenEqualsSign(54, "%"); + } + case 32: + { + return this.parseTopicReferenceThenEqualsSign(44, "^"); + } + case 37: + case 38: + { + return this.parseTopicReference("hack"); + } + case 44: + case 54: + case 27: + { + const pipeProposal = this.getPluginOption("pipelineOperator", "proposal"); + if (pipeProposal) { + return this.parseTopicReference(pipeProposal); + } + this.unexpected(); + break; + } + case 47: + { + const lookaheadCh = this.input.codePointAt(this.nextTokenStart()); + if (isIdentifierStart(lookaheadCh) || lookaheadCh === 62) { + this.expectOnePlugin(["jsx", "flow", "typescript"]); + } else { + this.unexpected(); + } + break; + } + default: + if (type === 137) { + return this.parseDecimalLiteral(this.state.value); + } + if (tokenIsIdentifier(type)) { + if (this.isContextual(127) && this.lookaheadInLineCharCode() === 123) { + return this.parseModuleExpression(); + } + const canBeArrow = this.state.potentialArrowAt === this.state.start; + const containsEsc = this.state.containsEsc; + const id = this.parseIdentifier(); + if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) { + const { + type + } = this.state; + if (type === 68) { + this.resetPreviousNodeTrailingComments(id); + this.next(); + return this.parseAsyncFunctionExpression(this.startNodeAtNode(id)); + } else if (tokenIsIdentifier(type)) { + if (this.lookaheadCharCode() === 61) { + return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(id)); + } else { + return id; + } + } else if (type === 90) { + this.resetPreviousNodeTrailingComments(id); + return this.parseDo(this.startNodeAtNode(id), true); + } + } + if (canBeArrow && this.match(19) && !this.canInsertSemicolon()) { + this.next(); + return this.parseArrowExpression(this.startNodeAtNode(id), [id], false); + } + return id; + } else { + this.unexpected(); + } + } + } + parseTopicReferenceThenEqualsSign(topicTokenType, topicTokenValue) { + const pipeProposal = this.getPluginOption("pipelineOperator", "proposal"); + if (pipeProposal) { + this.state.type = topicTokenType; + this.state.value = topicTokenValue; + this.state.pos--; + this.state.end--; + this.state.endLoc = createPositionWithColumnOffset(this.state.endLoc, -1); + return this.parseTopicReference(pipeProposal); + } else { + this.unexpected(); + } + } + parseTopicReference(pipeProposal) { + const node = this.startNode(); + const startLoc = this.state.startLoc; + const tokenType = this.state.type; + this.next(); + return this.finishTopicReference(node, startLoc, pipeProposal, tokenType); + } + finishTopicReference(node, startLoc, pipeProposal, tokenType) { + if (this.testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType)) { + if (pipeProposal === "hack") { + if (!this.topicReferenceIsAllowedInCurrentContext()) { + this.raise(Errors.PipeTopicUnbound, startLoc); + } + this.registerTopicReference(); + return this.finishNode(node, "TopicReference"); + } else { + if (!this.topicReferenceIsAllowedInCurrentContext()) { + this.raise(Errors.PrimaryTopicNotAllowed, startLoc); + } + this.registerTopicReference(); + return this.finishNode(node, "PipelinePrimaryTopicReference"); + } + } else { + throw this.raise(Errors.PipeTopicUnconfiguredToken, startLoc, { + token: tokenLabelName(tokenType) + }); + } + } + testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType) { + switch (pipeProposal) { + case "hack": + { + return this.hasPlugin(["pipelineOperator", { + topicToken: tokenLabelName(tokenType) + }]); + } + case "smart": + return tokenType === 27; + default: + throw this.raise(Errors.PipeTopicRequiresHackPipes, startLoc); + } + } + parseAsyncArrowUnaryFunction(node) { + this.prodParam.enter(functionFlags(true, this.prodParam.hasYield)); + const params = [this.parseIdentifier()]; + this.prodParam.exit(); + if (this.hasPrecedingLineBreak()) { + this.raise(Errors.LineTerminatorBeforeArrow, this.state.curPosition()); + } + this.expect(19); + return this.parseArrowExpression(node, params, true); + } + parseDo(node, isAsync) { + this.expectPlugin("doExpressions"); + if (isAsync) { + this.expectPlugin("asyncDoExpressions"); + } + node.async = isAsync; + this.next(); + const oldLabels = this.state.labels; + this.state.labels = []; + if (isAsync) { + this.prodParam.enter(2); + node.body = this.parseBlock(); + this.prodParam.exit(); + } else { + node.body = this.parseBlock(); + } + this.state.labels = oldLabels; + return this.finishNode(node, "DoExpression"); + } + parseSuper() { + const node = this.startNode(); + this.next(); + if (this.match(10) && !this.scope.allowDirectSuper && !(this.optionFlags & 16)) { + this.raise(Errors.SuperNotAllowed, node); + } else if (!this.scope.allowSuper && !(this.optionFlags & 16)) { + this.raise(Errors.UnexpectedSuper, node); + } + if (!this.match(10) && !this.match(0) && !this.match(16)) { + this.raise(Errors.UnsupportedSuper, node); + } + return this.finishNode(node, "Super"); + } + parsePrivateName() { + const node = this.startNode(); + const id = this.startNodeAt(createPositionWithColumnOffset(this.state.startLoc, 1)); + const name = this.state.value; + this.next(); + node.id = this.createIdentifier(id, name); + return this.finishNode(node, "PrivateName"); + } + parseFunctionOrFunctionSent() { + const node = this.startNode(); + this.next(); + if (this.prodParam.hasYield && this.match(16)) { + const meta = this.createIdentifier(this.startNodeAtNode(node), "function"); + this.next(); + if (this.match(103)) { + this.expectPlugin("functionSent"); + } else if (!this.hasPlugin("functionSent")) { + this.unexpected(); + } + return this.parseMetaProperty(node, meta, "sent"); + } + return this.parseFunction(node); + } + parseMetaProperty(node, meta, propertyName) { + node.meta = meta; + const containsEsc = this.state.containsEsc; + node.property = this.parseIdentifier(true); + if (node.property.name !== propertyName || containsEsc) { + this.raise(Errors.UnsupportedMetaProperty, node.property, { + target: meta.name, + onlyValidPropertyName: propertyName + }); + } + return this.finishNode(node, "MetaProperty"); + } + parseImportMetaProperty(node) { + const id = this.createIdentifier(this.startNodeAtNode(node), "import"); + this.next(); + if (this.isContextual(101)) { + if (!this.inModule) { + this.raise(Errors.ImportMetaOutsideModule, id); + } + this.sawUnambiguousESM = true; + } else if (this.isContextual(105) || this.isContextual(97)) { + const isSource = this.isContextual(105); + this.expectPlugin(isSource ? "sourcePhaseImports" : "deferredImportEvaluation"); + if (!(this.optionFlags & 256)) { + throw this.raise(Errors.DynamicImportPhaseRequiresImportExpressions, this.state.startLoc, { + phase: this.state.value + }); + } + this.next(); + node.phase = isSource ? "source" : "defer"; + return this.parseImportCall(node); + } + return this.parseMetaProperty(node, id, "meta"); + } + parseLiteralAtNode(value, type, node) { + this.addExtra(node, "rawValue", value); + this.addExtra(node, "raw", this.input.slice(this.offsetToSourcePos(node.start), this.state.end)); + node.value = value; + this.next(); + return this.finishNode(node, type); + } + parseLiteral(value, type) { + const node = this.startNode(); + return this.parseLiteralAtNode(value, type, node); + } + parseStringLiteral(value) { + return this.parseLiteral(value, "StringLiteral"); + } + parseNumericLiteral(value) { + return this.parseLiteral(value, "NumericLiteral"); + } + parseBigIntLiteral(value) { + return this.parseLiteral(value, "BigIntLiteral"); + } + parseDecimalLiteral(value) { + return this.parseLiteral(value, "DecimalLiteral"); + } + parseRegExpLiteral(value) { + const node = this.startNode(); + this.addExtra(node, "raw", this.input.slice(this.offsetToSourcePos(node.start), this.state.end)); + node.pattern = value.pattern; + node.flags = value.flags; + this.next(); + return this.finishNode(node, "RegExpLiteral"); + } + parseBooleanLiteral(value) { + const node = this.startNode(); + node.value = value; + this.next(); + return this.finishNode(node, "BooleanLiteral"); + } + parseNullLiteral() { + const node = this.startNode(); + this.next(); + return this.finishNode(node, "NullLiteral"); + } + parseParenAndDistinguishExpression(canBeArrow) { + const startLoc = this.state.startLoc; + let val; + this.next(); + this.expressionScope.enter(newArrowHeadScope()); + const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; + this.state.maybeInArrowParameters = true; + this.state.inFSharpPipelineDirectBody = false; + const innerStartLoc = this.state.startLoc; + const exprList = []; + const refExpressionErrors = new ExpressionErrors(); + let first = true; + let spreadStartLoc; + let optionalCommaStartLoc; + while (!this.match(11)) { + if (first) { + first = false; + } else { + this.expect(12, refExpressionErrors.optionalParametersLoc === null ? null : refExpressionErrors.optionalParametersLoc); + if (this.match(11)) { + optionalCommaStartLoc = this.state.startLoc; + break; + } + } + if (this.match(21)) { + const spreadNodeStartLoc = this.state.startLoc; + spreadStartLoc = this.state.startLoc; + exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartLoc)); + if (!this.checkCommaAfterRest(41)) { + break; + } + } else { + exprList.push(this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem)); + } + } + const innerEndLoc = this.state.lastTokEndLoc; + this.expect(11); + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; + let arrowNode = this.startNodeAt(startLoc); + if (canBeArrow && this.shouldParseArrow(exprList) && (arrowNode = this.parseArrow(arrowNode))) { + this.checkDestructuringPrivate(refExpressionErrors); + this.expressionScope.validateAsPattern(); + this.expressionScope.exit(); + this.parseArrowExpression(arrowNode, exprList, false); + return arrowNode; + } + this.expressionScope.exit(); + if (!exprList.length) { + this.unexpected(this.state.lastTokStartLoc); + } + if (optionalCommaStartLoc) this.unexpected(optionalCommaStartLoc); + if (spreadStartLoc) this.unexpected(spreadStartLoc); + this.checkExpressionErrors(refExpressionErrors, true); + this.toReferencedListDeep(exprList, true); + if (exprList.length > 1) { + val = this.startNodeAt(innerStartLoc); + val.expressions = exprList; + this.finishNode(val, "SequenceExpression"); + this.resetEndLocation(val, innerEndLoc); + } else { + val = exprList[0]; + } + return this.wrapParenthesis(startLoc, val); + } + wrapParenthesis(startLoc, expression) { + if (!(this.optionFlags & 512)) { + this.addExtra(expression, "parenthesized", true); + this.addExtra(expression, "parenStart", startLoc.index); + this.takeSurroundingComments(expression, startLoc.index, this.state.lastTokEndLoc.index); + return expression; + } + const parenExpression = this.startNodeAt(startLoc); + parenExpression.expression = expression; + return this.finishNode(parenExpression, "ParenthesizedExpression"); + } + shouldParseArrow(params) { + return !this.canInsertSemicolon(); + } + parseArrow(node) { + if (this.eat(19)) { + return node; + } + } + parseParenItem(node, startLoc) { + return node; + } + parseNewOrNewTarget() { + const node = this.startNode(); + this.next(); + if (this.match(16)) { + const meta = this.createIdentifier(this.startNodeAtNode(node), "new"); + this.next(); + const metaProp = this.parseMetaProperty(node, meta, "target"); + if (!this.scope.inNonArrowFunction && !this.scope.inClass && !(this.optionFlags & 4)) { + this.raise(Errors.UnexpectedNewTarget, metaProp); + } + return metaProp; + } + return this.parseNew(node); + } + parseNew(node) { + this.parseNewCallee(node); + if (this.eat(10)) { + const args = this.parseExprList(11); + this.toReferencedList(args); + node.arguments = args; + } else { + node.arguments = []; + } + return this.finishNode(node, "NewExpression"); + } + parseNewCallee(node) { + const isImport = this.match(83); + const callee = this.parseNoCallExpr(); + node.callee = callee; + if (isImport && (callee.type === "Import" || callee.type === "ImportExpression")) { + this.raise(Errors.ImportCallNotNewExpression, callee); + } + } + parseTemplateElement(isTagged) { + const { + start, + startLoc, + end, + value + } = this.state; + const elemStart = start + 1; + const elem = this.startNodeAt(createPositionWithColumnOffset(startLoc, 1)); + if (value === null) { + if (!isTagged) { + this.raise(Errors.InvalidEscapeSequenceTemplate, createPositionWithColumnOffset(this.state.firstInvalidTemplateEscapePos, 1)); + } + } + const isTail = this.match(24); + const endOffset = isTail ? -1 : -2; + const elemEnd = end + endOffset; + elem.value = { + raw: this.input.slice(elemStart, elemEnd).replace(/\r\n?/g, "\n"), + cooked: value === null ? null : value.slice(1, endOffset) + }; + elem.tail = isTail; + this.next(); + const finishedNode = this.finishNode(elem, "TemplateElement"); + this.resetEndLocation(finishedNode, createPositionWithColumnOffset(this.state.lastTokEndLoc, endOffset)); + return finishedNode; + } + parseTemplate(isTagged) { + const node = this.startNode(); + let curElt = this.parseTemplateElement(isTagged); + const quasis = [curElt]; + const substitutions = []; + while (!curElt.tail) { + substitutions.push(this.parseTemplateSubstitution()); + this.readTemplateContinuation(); + quasis.push(curElt = this.parseTemplateElement(isTagged)); + } + node.expressions = substitutions; + node.quasis = quasis; + return this.finishNode(node, "TemplateLiteral"); + } + parseTemplateSubstitution() { + return this.parseExpression(); + } + parseObjectLike(close, isPattern, isRecord, refExpressionErrors) { + if (isRecord) { + this.expectPlugin("recordAndTuple"); + } + const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; + this.state.inFSharpPipelineDirectBody = false; + const propHash = Object.create(null); + let first = true; + const node = this.startNode(); + node.properties = []; + this.next(); + while (!this.match(close)) { + if (first) { + first = false; + } else { + this.expect(12); + if (this.match(close)) { + this.addTrailingCommaExtraToNode(node); + break; + } + } + let prop; + if (isPattern) { + prop = this.parseBindingProperty(); + } else { + prop = this.parsePropertyDefinition(refExpressionErrors); + this.checkProto(prop, isRecord, propHash, refExpressionErrors); + } + if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") { + this.raise(Errors.InvalidRecordProperty, prop); + } + { + if (prop.shorthand) { + this.addExtra(prop, "shorthand", true); + } + } + node.properties.push(prop); + } + this.next(); + this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; + let type = "ObjectExpression"; + if (isPattern) { + type = "ObjectPattern"; + } else if (isRecord) { + type = "RecordExpression"; + } + return this.finishNode(node, type); + } + addTrailingCommaExtraToNode(node) { + this.addExtra(node, "trailingComma", this.state.lastTokStartLoc.index); + this.addExtra(node, "trailingCommaLoc", this.state.lastTokStartLoc, false); + } + maybeAsyncOrAccessorProp(prop) { + return !prop.computed && prop.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(0) || this.match(55)); + } + parsePropertyDefinition(refExpressionErrors) { + let decorators = []; + if (this.match(26)) { + if (this.hasPlugin("decorators")) { + this.raise(Errors.UnsupportedPropertyDecorator, this.state.startLoc); + } + while (this.match(26)) { + decorators.push(this.parseDecorator()); + } + } + const prop = this.startNode(); + let isAsync = false; + let isAccessor = false; + let startLoc; + if (this.match(21)) { + if (decorators.length) this.unexpected(); + return this.parseSpread(); + } + if (decorators.length) { + prop.decorators = decorators; + decorators = []; + } + prop.method = false; + if (refExpressionErrors) { + startLoc = this.state.startLoc; + } + let isGenerator = this.eat(55); + this.parsePropertyNamePrefixOperator(prop); + const containsEsc = this.state.containsEsc; + this.parsePropertyName(prop, refExpressionErrors); + if (!isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) { + const { + key + } = prop; + const keyName = key.name; + if (keyName === "async" && !this.hasPrecedingLineBreak()) { + isAsync = true; + this.resetPreviousNodeTrailingComments(key); + isGenerator = this.eat(55); + this.parsePropertyName(prop); + } + if (keyName === "get" || keyName === "set") { + isAccessor = true; + this.resetPreviousNodeTrailingComments(key); + prop.kind = keyName; + if (this.match(55)) { + isGenerator = true; + this.raise(Errors.AccessorIsGenerator, this.state.curPosition(), { + kind: keyName + }); + this.next(); + } + this.parsePropertyName(prop); + } + } + return this.parseObjPropValue(prop, startLoc, isGenerator, isAsync, false, isAccessor, refExpressionErrors); + } + getGetterSetterExpectedParamCount(method) { + return method.kind === "get" ? 0 : 1; + } + getObjectOrClassMethodParams(method) { + return method.params; + } + checkGetterSetterParams(method) { + var _params; + const paramCount = this.getGetterSetterExpectedParamCount(method); + const params = this.getObjectOrClassMethodParams(method); + if (params.length !== paramCount) { + this.raise(method.kind === "get" ? Errors.BadGetterArity : Errors.BadSetterArity, method); + } + if (method.kind === "set" && ((_params = params[params.length - 1]) == null ? void 0 : _params.type) === "RestElement") { + this.raise(Errors.BadSetterRestParameter, method); + } + } + parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) { + if (isAccessor) { + const finishedProp = this.parseMethod(prop, isGenerator, false, false, false, "ObjectMethod"); + this.checkGetterSetterParams(finishedProp); + return finishedProp; + } + if (isAsync || isGenerator || this.match(10)) { + if (isPattern) this.unexpected(); + prop.kind = "method"; + prop.method = true; + return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod"); + } + } + parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors) { + prop.shorthand = false; + if (this.eat(14)) { + prop.value = isPattern ? this.parseMaybeDefault(this.state.startLoc) : this.parseMaybeAssignAllowIn(refExpressionErrors); + return this.finishNode(prop, "ObjectProperty"); + } + if (!prop.computed && prop.key.type === "Identifier") { + this.checkReservedWord(prop.key.name, prop.key.loc.start, true, false); + if (isPattern) { + prop.value = this.parseMaybeDefault(startLoc, cloneIdentifier(prop.key)); + } else if (this.match(29)) { + const shorthandAssignLoc = this.state.startLoc; + if (refExpressionErrors != null) { + if (refExpressionErrors.shorthandAssignLoc === null) { + refExpressionErrors.shorthandAssignLoc = shorthandAssignLoc; + } + } else { + this.raise(Errors.InvalidCoverInitializedName, shorthandAssignLoc); + } + prop.value = this.parseMaybeDefault(startLoc, cloneIdentifier(prop.key)); + } else { + prop.value = cloneIdentifier(prop.key); + } + prop.shorthand = true; + return this.finishNode(prop, "ObjectProperty"); + } + } + parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { + const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) || this.parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors); + if (!node) this.unexpected(); + return node; + } + parsePropertyName(prop, refExpressionErrors) { + if (this.eat(0)) { + prop.computed = true; + prop.key = this.parseMaybeAssignAllowIn(); + this.expect(3); + } else { + const { + type, + value + } = this.state; + let key; + if (tokenIsKeywordOrIdentifier(type)) { + key = this.parseIdentifier(true); + } else { + switch (type) { + case 135: + key = this.parseNumericLiteral(value); + break; + case 134: + key = this.parseStringLiteral(value); + break; + case 136: + key = this.parseBigIntLiteral(value); + break; + case 139: + { + const privateKeyLoc = this.state.startLoc; + if (refExpressionErrors != null) { + if (refExpressionErrors.privateKeyLoc === null) { + refExpressionErrors.privateKeyLoc = privateKeyLoc; + } + } else { + this.raise(Errors.UnexpectedPrivateField, privateKeyLoc); + } + key = this.parsePrivateName(); + break; + } + default: + if (type === 137) { + key = this.parseDecimalLiteral(value); + break; + } + this.unexpected(); + } + } + prop.key = key; + if (type !== 139) { + prop.computed = false; + } + } + } + initFunction(node, isAsync) { + node.id = null; + node.generator = false; + node.async = isAsync; + } + parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { + this.initFunction(node, isAsync); + node.generator = isGenerator; + this.scope.enter(2 | 16 | (inClassScope ? 64 : 0) | (allowDirectSuper ? 32 : 0)); + this.prodParam.enter(functionFlags(isAsync, node.generator)); + this.parseFunctionParams(node, isConstructor); + const finishedNode = this.parseFunctionBodyAndFinish(node, type, true); + this.prodParam.exit(); + this.scope.exit(); + return finishedNode; + } + parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { + if (isTuple) { + this.expectPlugin("recordAndTuple"); + } + const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; + this.state.inFSharpPipelineDirectBody = false; + const node = this.startNode(); + this.next(); + node.elements = this.parseExprList(close, !isTuple, refExpressionErrors, node); + this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; + return this.finishNode(node, isTuple ? "TupleExpression" : "ArrayExpression"); + } + parseArrowExpression(node, params, isAsync, trailingCommaLoc) { + this.scope.enter(2 | 4); + let flags = functionFlags(isAsync, false); + if (!this.match(5) && this.prodParam.hasIn) { + flags |= 8; + } + this.prodParam.enter(flags); + this.initFunction(node, isAsync); + const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + if (params) { + this.state.maybeInArrowParameters = true; + this.setArrowFunctionParameters(node, params, trailingCommaLoc); + } + this.state.maybeInArrowParameters = false; + this.parseFunctionBody(node, true); + this.prodParam.exit(); + this.scope.exit(); + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + return this.finishNode(node, "ArrowFunctionExpression"); + } + setArrowFunctionParameters(node, params, trailingCommaLoc) { + this.toAssignableList(params, trailingCommaLoc, false); + node.params = params; + } + parseFunctionBodyAndFinish(node, type, isMethod = false) { + this.parseFunctionBody(node, false, isMethod); + return this.finishNode(node, type); + } + parseFunctionBody(node, allowExpression, isMethod = false) { + const isExpression = allowExpression && !this.match(5); + this.expressionScope.enter(newExpressionScope()); + if (isExpression) { + node.body = this.parseMaybeAssign(); + this.checkParams(node, false, allowExpression, false); + } else { + const oldStrict = this.state.strict; + const oldLabels = this.state.labels; + this.state.labels = []; + this.prodParam.enter(this.prodParam.currentFlags() | 4); + node.body = this.parseBlock(true, false, hasStrictModeDirective => { + const nonSimple = !this.isSimpleParamList(node.params); + if (hasStrictModeDirective && nonSimple) { + this.raise(Errors.IllegalLanguageModeDirective, (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.loc.end : node); + } + const strictModeChanged = !oldStrict && this.state.strict; + this.checkParams(node, !this.state.strict && !allowExpression && !isMethod && !nonSimple, allowExpression, strictModeChanged); + if (this.state.strict && node.id) { + this.checkIdentifier(node.id, 65, strictModeChanged); + } + }); + this.prodParam.exit(); + this.state.labels = oldLabels; + } + this.expressionScope.exit(); + } + isSimpleParameter(node) { + return node.type === "Identifier"; + } + isSimpleParamList(params) { + for (let i = 0, len = params.length; i < len; i++) { + if (!this.isSimpleParameter(params[i])) return false; + } + return true; + } + checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) { + const checkClashes = !allowDuplicates && new Set(); + const formalParameters = { + type: "FormalParameters" + }; + for (const param of node.params) { + this.checkLVal(param, formalParameters, 5, checkClashes, strictModeChanged); + } + } + parseExprList(close, allowEmpty, refExpressionErrors, nodeForExtra) { + const elts = []; + let first = true; + while (!this.eat(close)) { + if (first) { + first = false; + } else { + this.expect(12); + if (this.match(close)) { + if (nodeForExtra) { + this.addTrailingCommaExtraToNode(nodeForExtra); + } + this.next(); + break; + } + } + elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors)); + } + return elts; + } + parseExprListItem(allowEmpty, refExpressionErrors, allowPlaceholder) { + let elt; + if (this.match(12)) { + if (!allowEmpty) { + this.raise(Errors.UnexpectedToken, this.state.curPosition(), { + unexpected: "," + }); + } + elt = null; + } else if (this.match(21)) { + const spreadNodeStartLoc = this.state.startLoc; + elt = this.parseParenItem(this.parseSpread(refExpressionErrors), spreadNodeStartLoc); + } else if (this.match(17)) { + this.expectPlugin("partialApplication"); + if (!allowPlaceholder) { + this.raise(Errors.UnexpectedArgumentPlaceholder, this.state.startLoc); + } + const node = this.startNode(); + this.next(); + elt = this.finishNode(node, "ArgumentPlaceholder"); + } else { + elt = this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem); + } + return elt; + } + parseIdentifier(liberal) { + const node = this.startNode(); + const name = this.parseIdentifierName(liberal); + return this.createIdentifier(node, name); + } + createIdentifier(node, name) { + node.name = name; + node.loc.identifierName = name; + return this.finishNode(node, "Identifier"); + } + parseIdentifierName(liberal) { + let name; + const { + startLoc, + type + } = this.state; + if (tokenIsKeywordOrIdentifier(type)) { + name = this.state.value; + } else { + this.unexpected(); + } + const tokenIsKeyword = tokenKeywordOrIdentifierIsKeyword(type); + if (liberal) { + if (tokenIsKeyword) { + this.replaceToken(132); + } + } else { + this.checkReservedWord(name, startLoc, tokenIsKeyword, false); + } + this.next(); + return name; + } + checkReservedWord(word, startLoc, checkKeywords, isBinding) { + if (word.length > 10) { + return; + } + if (!canBeReservedWord(word)) { + return; + } + if (checkKeywords && isKeyword(word)) { + this.raise(Errors.UnexpectedKeyword, startLoc, { + keyword: word + }); + return; + } + const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord; + if (reservedTest(word, this.inModule)) { + this.raise(Errors.UnexpectedReservedWord, startLoc, { + reservedWord: word + }); + return; + } else if (word === "yield") { + if (this.prodParam.hasYield) { + this.raise(Errors.YieldBindingIdentifier, startLoc); + return; + } + } else if (word === "await") { + if (this.prodParam.hasAwait) { + this.raise(Errors.AwaitBindingIdentifier, startLoc); + return; + } + if (this.scope.inStaticBlock) { + this.raise(Errors.AwaitBindingIdentifierInStaticBlock, startLoc); + return; + } + this.expressionScope.recordAsyncArrowParametersError(startLoc); + } else if (word === "arguments") { + if (this.scope.inClassAndNotInNonArrowFunction) { + this.raise(Errors.ArgumentsInClass, startLoc); + return; + } + } + } + recordAwaitIfAllowed() { + const isAwaitAllowed = this.prodParam.hasAwait || this.optionFlags & 1 && !this.scope.inFunction; + if (isAwaitAllowed && !this.scope.inFunction) { + this.state.hasTopLevelAwait = true; + } + return isAwaitAllowed; + } + parseAwait(startLoc) { + const node = this.startNodeAt(startLoc); + this.expressionScope.recordParameterInitializerError(Errors.AwaitExpressionFormalParameter, node); + if (this.eat(55)) { + this.raise(Errors.ObsoleteAwaitStar, node); + } + if (!this.scope.inFunction && !(this.optionFlags & 1)) { + if (this.isAmbiguousAwait()) { + this.ambiguousScriptDifferentAst = true; + } else { + this.sawUnambiguousESM = true; + } + } + if (!this.state.soloAwait) { + node.argument = this.parseMaybeUnary(null, true); + } + return this.finishNode(node, "AwaitExpression"); + } + isAmbiguousAwait() { + if (this.hasPrecedingLineBreak()) return true; + const { + type + } = this.state; + return type === 53 || type === 10 || type === 0 || tokenIsTemplate(type) || type === 102 && !this.state.containsEsc || type === 138 || type === 56 || this.hasPlugin("v8intrinsic") && type === 54; + } + parseYield() { + const node = this.startNode(); + this.expressionScope.recordParameterInitializerError(Errors.YieldInParameter, node); + this.next(); + let delegating = false; + let argument = null; + if (!this.hasPrecedingLineBreak()) { + delegating = this.eat(55); + switch (this.state.type) { + case 13: + case 140: + case 8: + case 11: + case 3: + case 9: + case 14: + case 12: + if (!delegating) break; + default: + argument = this.parseMaybeAssign(); + } + } + node.delegate = delegating; + node.argument = argument; + return this.finishNode(node, "YieldExpression"); + } + parseImportCall(node) { + this.next(); + node.source = this.parseMaybeAssignAllowIn(); + node.options = null; + if (this.eat(12)) { + if (!this.match(11)) { + node.options = this.parseMaybeAssignAllowIn(); + if (this.eat(12) && !this.match(11)) { + do { + this.parseMaybeAssignAllowIn(); + } while (this.eat(12) && !this.match(11)); + this.raise(Errors.ImportCallArity, node); + } + } + } + this.expect(11); + return this.finishNode(node, "ImportExpression"); + } + checkPipelineAtInfixOperator(left, leftStartLoc) { + if (this.hasPlugin(["pipelineOperator", { + proposal: "smart" + }])) { + if (left.type === "SequenceExpression") { + this.raise(Errors.PipelineHeadSequenceExpression, leftStartLoc); + } + } + } + parseSmartPipelineBodyInStyle(childExpr, startLoc) { + if (this.isSimpleReference(childExpr)) { + const bodyNode = this.startNodeAt(startLoc); + bodyNode.callee = childExpr; + return this.finishNode(bodyNode, "PipelineBareFunction"); + } else { + const bodyNode = this.startNodeAt(startLoc); + this.checkSmartPipeTopicBodyEarlyErrors(startLoc); + bodyNode.expression = childExpr; + return this.finishNode(bodyNode, "PipelineTopicExpression"); + } + } + isSimpleReference(expression) { + switch (expression.type) { + case "MemberExpression": + return !expression.computed && this.isSimpleReference(expression.object); + case "Identifier": + return true; + default: + return false; + } + } + checkSmartPipeTopicBodyEarlyErrors(startLoc) { + if (this.match(19)) { + throw this.raise(Errors.PipelineBodyNoArrow, this.state.startLoc); + } + if (!this.topicReferenceWasUsedInCurrentContext()) { + this.raise(Errors.PipelineTopicUnused, startLoc); + } + } + withTopicBindingContext(callback) { + const outerContextTopicState = this.state.topicContext; + this.state.topicContext = { + maxNumOfResolvableTopics: 1, + maxTopicIndex: null + }; + try { + return callback(); + } finally { + this.state.topicContext = outerContextTopicState; + } + } + withSmartMixTopicForbiddingContext(callback) { + if (this.hasPlugin(["pipelineOperator", { + proposal: "smart" + }])) { + const outerContextTopicState = this.state.topicContext; + this.state.topicContext = { + maxNumOfResolvableTopics: 0, + maxTopicIndex: null + }; + try { + return callback(); + } finally { + this.state.topicContext = outerContextTopicState; + } + } else { + return callback(); + } + } + withSoloAwaitPermittingContext(callback) { + const outerContextSoloAwaitState = this.state.soloAwait; + this.state.soloAwait = true; + try { + return callback(); + } finally { + this.state.soloAwait = outerContextSoloAwaitState; + } + } + allowInAnd(callback) { + const flags = this.prodParam.currentFlags(); + const prodParamToSet = 8 & ~flags; + if (prodParamToSet) { + this.prodParam.enter(flags | 8); + try { + return callback(); + } finally { + this.prodParam.exit(); + } + } + return callback(); + } + disallowInAnd(callback) { + const flags = this.prodParam.currentFlags(); + const prodParamToClear = 8 & flags; + if (prodParamToClear) { + this.prodParam.enter(flags & ~8); + try { + return callback(); + } finally { + this.prodParam.exit(); + } + } + return callback(); + } + registerTopicReference() { + this.state.topicContext.maxTopicIndex = 0; + } + topicReferenceIsAllowedInCurrentContext() { + return this.state.topicContext.maxNumOfResolvableTopics >= 1; + } + topicReferenceWasUsedInCurrentContext() { + return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0; + } + parseFSharpPipelineBody(prec) { + const startLoc = this.state.startLoc; + this.state.potentialArrowAt = this.state.start; + const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; + this.state.inFSharpPipelineDirectBody = true; + const ret = this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startLoc, prec); + this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; + return ret; + } + parseModuleExpression() { + this.expectPlugin("moduleBlocks"); + const node = this.startNode(); + this.next(); + if (!this.match(5)) { + this.unexpected(null, 5); + } + const program = this.startNodeAt(this.state.endLoc); + this.next(); + const revertScopes = this.initializeScopes(true); + this.enterInitialScopes(); + try { + node.body = this.parseProgram(program, 8, "module"); + } finally { + revertScopes(); + } + return this.finishNode(node, "ModuleExpression"); + } + parsePropertyNamePrefixOperator(prop) {} +} +const loopLabel = { + kind: 1 + }, + switchLabel = { + kind: 2 + }; +const loneSurrogate = /[\uD800-\uDFFF]/u; +const keywordRelationalOperator = /in(?:stanceof)?/y; +function babel7CompatTokens(tokens, input, startIndex) { + for (let i = 0; i < tokens.length; i++) { + const token = tokens[i]; + const { + type + } = token; + if (typeof type === "number") { + { + if (type === 139) { + const { + loc, + start, + value, + end + } = token; + const hashEndPos = start + 1; + const hashEndLoc = createPositionWithColumnOffset(loc.start, 1); + tokens.splice(i, 1, new Token({ + type: getExportedToken(27), + value: "#", + start: start, + end: hashEndPos, + startLoc: loc.start, + endLoc: hashEndLoc + }), new Token({ + type: getExportedToken(132), + value: value, + start: hashEndPos, + end: end, + startLoc: hashEndLoc, + endLoc: loc.end + })); + i++; + continue; + } + if (tokenIsTemplate(type)) { + const { + loc, + start, + value, + end + } = token; + const backquoteEnd = start + 1; + const backquoteEndLoc = createPositionWithColumnOffset(loc.start, 1); + let startToken; + if (input.charCodeAt(start - startIndex) === 96) { + startToken = new Token({ + type: getExportedToken(22), + value: "`", + start: start, + end: backquoteEnd, + startLoc: loc.start, + endLoc: backquoteEndLoc + }); + } else { + startToken = new Token({ + type: getExportedToken(8), + value: "}", + start: start, + end: backquoteEnd, + startLoc: loc.start, + endLoc: backquoteEndLoc + }); + } + let templateValue, templateElementEnd, templateElementEndLoc, endToken; + if (type === 24) { + templateElementEnd = end - 1; + templateElementEndLoc = createPositionWithColumnOffset(loc.end, -1); + templateValue = value === null ? null : value.slice(1, -1); + endToken = new Token({ + type: getExportedToken(22), + value: "`", + start: templateElementEnd, + end: end, + startLoc: templateElementEndLoc, + endLoc: loc.end + }); + } else { + templateElementEnd = end - 2; + templateElementEndLoc = createPositionWithColumnOffset(loc.end, -2); + templateValue = value === null ? null : value.slice(1, -2); + endToken = new Token({ + type: getExportedToken(23), + value: "${", + start: templateElementEnd, + end: end, + startLoc: templateElementEndLoc, + endLoc: loc.end + }); + } + tokens.splice(i, 1, startToken, new Token({ + type: getExportedToken(20), + value: templateValue, + start: backquoteEnd, + end: templateElementEnd, + startLoc: backquoteEndLoc, + endLoc: templateElementEndLoc + }), endToken); + i += 2; + continue; + } + } + token.type = getExportedToken(type); + } + } + return tokens; +} +class StatementParser extends ExpressionParser { + parseTopLevel(file, program) { + file.program = this.parseProgram(program); + file.comments = this.comments; + if (this.optionFlags & 128) { + file.tokens = babel7CompatTokens(this.tokens, this.input, this.startIndex); + } + return this.finishNode(file, "File"); + } + parseProgram(program, end = 140, sourceType = this.options.sourceType) { + program.sourceType = sourceType; + program.interpreter = this.parseInterpreterDirective(); + this.parseBlockBody(program, true, true, end); + if (this.inModule) { + if (!(this.optionFlags & 32) && this.scope.undefinedExports.size > 0) { + for (const [localName, at] of Array.from(this.scope.undefinedExports)) { + this.raise(Errors.ModuleExportUndefined, at, { + localName + }); + } + } + this.addExtra(program, "topLevelAwait", this.state.hasTopLevelAwait); + } + let finishedProgram; + if (end === 140) { + finishedProgram = this.finishNode(program, "Program"); + } else { + finishedProgram = this.finishNodeAt(program, "Program", createPositionWithColumnOffset(this.state.startLoc, -1)); + } + return finishedProgram; + } + stmtToDirective(stmt) { + const directive = stmt; + directive.type = "Directive"; + directive.value = directive.expression; + delete directive.expression; + const directiveLiteral = directive.value; + const expressionValue = directiveLiteral.value; + const raw = this.input.slice(this.offsetToSourcePos(directiveLiteral.start), this.offsetToSourcePos(directiveLiteral.end)); + const val = directiveLiteral.value = raw.slice(1, -1); + this.addExtra(directiveLiteral, "raw", raw); + this.addExtra(directiveLiteral, "rawValue", val); + this.addExtra(directiveLiteral, "expressionValue", expressionValue); + directiveLiteral.type = "DirectiveLiteral"; + return directive; + } + parseInterpreterDirective() { + if (!this.match(28)) { + return null; + } + const node = this.startNode(); + node.value = this.state.value; + this.next(); + return this.finishNode(node, "InterpreterDirective"); + } + isLet() { + if (!this.isContextual(100)) { + return false; + } + return this.hasFollowingBindingAtom(); + } + chStartsBindingIdentifier(ch, pos) { + if (isIdentifierStart(ch)) { + keywordRelationalOperator.lastIndex = pos; + if (keywordRelationalOperator.test(this.input)) { + const endCh = this.codePointAtPos(keywordRelationalOperator.lastIndex); + if (!isIdentifierChar(endCh) && endCh !== 92) { + return false; + } + } + return true; + } else if (ch === 92) { + return true; + } else { + return false; + } + } + chStartsBindingPattern(ch) { + return ch === 91 || ch === 123; + } + hasFollowingBindingAtom() { + const next = this.nextTokenStart(); + const nextCh = this.codePointAtPos(next); + return this.chStartsBindingPattern(nextCh) || this.chStartsBindingIdentifier(nextCh, next); + } + hasInLineFollowingBindingIdentifierOrBrace() { + const next = this.nextTokenInLineStart(); + const nextCh = this.codePointAtPos(next); + return nextCh === 123 || this.chStartsBindingIdentifier(nextCh, next); + } + startsUsingForOf() { + const { + type, + containsEsc + } = this.lookahead(); + if (type === 102 && !containsEsc) { + return false; + } else if (tokenIsIdentifier(type) && !this.hasFollowingLineBreak()) { + this.expectPlugin("explicitResourceManagement"); + return true; + } + } + startsAwaitUsing() { + let next = this.nextTokenInLineStart(); + if (this.isUnparsedContextual(next, "using")) { + next = this.nextTokenInLineStartSince(next + 5); + const nextCh = this.codePointAtPos(next); + if (this.chStartsBindingIdentifier(nextCh, next)) { + this.expectPlugin("explicitResourceManagement"); + return true; + } + } + return false; + } + parseModuleItem() { + return this.parseStatementLike(1 | 2 | 4 | 8); + } + parseStatementListItem() { + return this.parseStatementLike(2 | 4 | (!this.options.annexB || this.state.strict ? 0 : 8)); + } + parseStatementOrSloppyAnnexBFunctionDeclaration(allowLabeledFunction = false) { + let flags = 0; + if (this.options.annexB && !this.state.strict) { + flags |= 4; + if (allowLabeledFunction) { + flags |= 8; + } + } + return this.parseStatementLike(flags); + } + parseStatement() { + return this.parseStatementLike(0); + } + parseStatementLike(flags) { + let decorators = null; + if (this.match(26)) { + decorators = this.parseDecorators(true); + } + return this.parseStatementContent(flags, decorators); + } + parseStatementContent(flags, decorators) { + const startType = this.state.type; + const node = this.startNode(); + const allowDeclaration = !!(flags & 2); + const allowFunctionDeclaration = !!(flags & 4); + const topLevel = flags & 1; + switch (startType) { + case 60: + return this.parseBreakContinueStatement(node, true); + case 63: + return this.parseBreakContinueStatement(node, false); + case 64: + return this.parseDebuggerStatement(node); + case 90: + return this.parseDoWhileStatement(node); + case 91: + return this.parseForStatement(node); + case 68: + if (this.lookaheadCharCode() === 46) break; + if (!allowFunctionDeclaration) { + this.raise(this.state.strict ? Errors.StrictFunction : this.options.annexB ? Errors.SloppyFunctionAnnexB : Errors.SloppyFunction, this.state.startLoc); + } + return this.parseFunctionStatement(node, false, !allowDeclaration && allowFunctionDeclaration); + case 80: + if (!allowDeclaration) this.unexpected(); + return this.parseClass(this.maybeTakeDecorators(decorators, node), true); + case 69: + return this.parseIfStatement(node); + case 70: + return this.parseReturnStatement(node); + case 71: + return this.parseSwitchStatement(node); + case 72: + return this.parseThrowStatement(node); + case 73: + return this.parseTryStatement(node); + case 96: + if (!this.state.containsEsc && this.startsAwaitUsing()) { + if (!this.recordAwaitIfAllowed()) { + this.raise(Errors.AwaitUsingNotInAsyncContext, node); + } else if (!allowDeclaration) { + this.raise(Errors.UnexpectedLexicalDeclaration, node); + } + this.next(); + return this.parseVarStatement(node, "await using"); + } + break; + case 107: + if (this.state.containsEsc || !this.hasInLineFollowingBindingIdentifierOrBrace()) { + break; + } + this.expectPlugin("explicitResourceManagement"); + if (!this.scope.inModule && this.scope.inTopLevel) { + this.raise(Errors.UnexpectedUsingDeclaration, this.state.startLoc); + } else if (!allowDeclaration) { + this.raise(Errors.UnexpectedLexicalDeclaration, this.state.startLoc); + } + return this.parseVarStatement(node, "using"); + case 100: + { + if (this.state.containsEsc) { + break; + } + const next = this.nextTokenStart(); + const nextCh = this.codePointAtPos(next); + if (nextCh !== 91) { + if (!allowDeclaration && this.hasFollowingLineBreak()) break; + if (!this.chStartsBindingIdentifier(nextCh, next) && nextCh !== 123) { + break; + } + } + } + case 75: + { + if (!allowDeclaration) { + this.raise(Errors.UnexpectedLexicalDeclaration, this.state.startLoc); + } + } + case 74: + { + const kind = this.state.value; + return this.parseVarStatement(node, kind); + } + case 92: + return this.parseWhileStatement(node); + case 76: + return this.parseWithStatement(node); + case 5: + return this.parseBlock(); + case 13: + return this.parseEmptyStatement(node); + case 83: + { + const nextTokenCharCode = this.lookaheadCharCode(); + if (nextTokenCharCode === 40 || nextTokenCharCode === 46) { + break; + } + } + case 82: + { + if (!(this.optionFlags & 8) && !topLevel) { + this.raise(Errors.UnexpectedImportExport, this.state.startLoc); + } + this.next(); + let result; + if (startType === 83) { + result = this.parseImport(node); + if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) { + this.sawUnambiguousESM = true; + } + } else { + result = this.parseExport(node, decorators); + if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") { + this.sawUnambiguousESM = true; + } + } + this.assertModuleNodeAllowed(result); + return result; + } + default: + { + if (this.isAsyncFunction()) { + if (!allowDeclaration) { + this.raise(Errors.AsyncFunctionInSingleStatementContext, this.state.startLoc); + } + this.next(); + return this.parseFunctionStatement(node, true, !allowDeclaration && allowFunctionDeclaration); + } + } + } + const maybeName = this.state.value; + const expr = this.parseExpression(); + if (tokenIsIdentifier(startType) && expr.type === "Identifier" && this.eat(14)) { + return this.parseLabeledStatement(node, maybeName, expr, flags); + } else { + return this.parseExpressionStatement(node, expr, decorators); + } + } + assertModuleNodeAllowed(node) { + if (!(this.optionFlags & 8) && !this.inModule) { + this.raise(Errors.ImportOutsideModule, node); + } + } + decoratorsEnabledBeforeExport() { + if (this.hasPlugin("decorators-legacy")) return true; + return this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") !== false; + } + maybeTakeDecorators(maybeDecorators, classNode, exportNode) { + if (maybeDecorators) { + var _classNode$decorators; + if ((_classNode$decorators = classNode.decorators) != null && _classNode$decorators.length) { + if (typeof this.getPluginOption("decorators", "decoratorsBeforeExport") !== "boolean") { + this.raise(Errors.DecoratorsBeforeAfterExport, classNode.decorators[0]); + } + classNode.decorators.unshift(...maybeDecorators); + } else { + classNode.decorators = maybeDecorators; + } + this.resetStartLocationFromNode(classNode, maybeDecorators[0]); + if (exportNode) this.resetStartLocationFromNode(exportNode, classNode); + } + return classNode; + } + canHaveLeadingDecorator() { + return this.match(80); + } + parseDecorators(allowExport) { + const decorators = []; + do { + decorators.push(this.parseDecorator()); + } while (this.match(26)); + if (this.match(82)) { + if (!allowExport) { + this.unexpected(); + } + if (!this.decoratorsEnabledBeforeExport()) { + this.raise(Errors.DecoratorExportClass, this.state.startLoc); + } + } else if (!this.canHaveLeadingDecorator()) { + throw this.raise(Errors.UnexpectedLeadingDecorator, this.state.startLoc); + } + return decorators; + } + parseDecorator() { + this.expectOnePlugin(["decorators", "decorators-legacy"]); + const node = this.startNode(); + this.next(); + if (this.hasPlugin("decorators")) { + const startLoc = this.state.startLoc; + let expr; + if (this.match(10)) { + const startLoc = this.state.startLoc; + this.next(); + expr = this.parseExpression(); + this.expect(11); + expr = this.wrapParenthesis(startLoc, expr); + const paramsStartLoc = this.state.startLoc; + node.expression = this.parseMaybeDecoratorArguments(expr, startLoc); + if (this.getPluginOption("decorators", "allowCallParenthesized") === false && node.expression !== expr) { + this.raise(Errors.DecoratorArgumentsOutsideParentheses, paramsStartLoc); + } + } else { + expr = this.parseIdentifier(false); + while (this.eat(16)) { + const node = this.startNodeAt(startLoc); + node.object = expr; + if (this.match(139)) { + this.classScope.usePrivateName(this.state.value, this.state.startLoc); + node.property = this.parsePrivateName(); + } else { + node.property = this.parseIdentifier(true); + } + node.computed = false; + expr = this.finishNode(node, "MemberExpression"); + } + node.expression = this.parseMaybeDecoratorArguments(expr, startLoc); + } + } else { + node.expression = this.parseExprSubscripts(); + } + return this.finishNode(node, "Decorator"); + } + parseMaybeDecoratorArguments(expr, startLoc) { + if (this.eat(10)) { + const node = this.startNodeAt(startLoc); + node.callee = expr; + node.arguments = this.parseCallExpressionArguments(11); + this.toReferencedList(node.arguments); + return this.finishNode(node, "CallExpression"); + } + return expr; + } + parseBreakContinueStatement(node, isBreak) { + this.next(); + if (this.isLineTerminator()) { + node.label = null; + } else { + node.label = this.parseIdentifier(); + this.semicolon(); + } + this.verifyBreakContinue(node, isBreak); + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); + } + verifyBreakContinue(node, isBreak) { + let i; + for (i = 0; i < this.state.labels.length; ++i) { + const lab = this.state.labels[i]; + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === 1)) { + break; + } + if (node.label && isBreak) break; + } + } + if (i === this.state.labels.length) { + const type = isBreak ? "BreakStatement" : "ContinueStatement"; + this.raise(Errors.IllegalBreakContinue, node, { + type + }); + } + } + parseDebuggerStatement(node) { + this.next(); + this.semicolon(); + return this.finishNode(node, "DebuggerStatement"); + } + parseHeaderExpression() { + this.expect(10); + const val = this.parseExpression(); + this.expect(11); + return val; + } + parseDoWhileStatement(node) { + this.next(); + this.state.labels.push(loopLabel); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); + this.state.labels.pop(); + this.expect(92); + node.test = this.parseHeaderExpression(); + this.eat(13); + return this.finishNode(node, "DoWhileStatement"); + } + parseForStatement(node) { + this.next(); + this.state.labels.push(loopLabel); + let awaitAt = null; + if (this.isContextual(96) && this.recordAwaitIfAllowed()) { + awaitAt = this.state.startLoc; + this.next(); + } + this.scope.enter(0); + this.expect(10); + if (this.match(13)) { + if (awaitAt !== null) { + this.unexpected(awaitAt); + } + return this.parseFor(node, null); + } + const startsWithLet = this.isContextual(100); + { + const startsWithAwaitUsing = this.isContextual(96) && this.startsAwaitUsing(); + const starsWithUsingDeclaration = startsWithAwaitUsing || this.isContextual(107) && this.startsUsingForOf(); + const isLetOrUsing = startsWithLet && this.hasFollowingBindingAtom() || starsWithUsingDeclaration; + if (this.match(74) || this.match(75) || isLetOrUsing) { + const initNode = this.startNode(); + let kind; + if (startsWithAwaitUsing) { + kind = "await using"; + if (!this.recordAwaitIfAllowed()) { + this.raise(Errors.AwaitUsingNotInAsyncContext, this.state.startLoc); + } + this.next(); + } else { + kind = this.state.value; + } + this.next(); + this.parseVar(initNode, true, kind); + const init = this.finishNode(initNode, "VariableDeclaration"); + const isForIn = this.match(58); + if (isForIn && starsWithUsingDeclaration) { + this.raise(Errors.ForInUsing, init); + } + if ((isForIn || this.isContextual(102)) && init.declarations.length === 1) { + return this.parseForIn(node, init, awaitAt); + } + if (awaitAt !== null) { + this.unexpected(awaitAt); + } + return this.parseFor(node, init); + } + } + const startsWithAsync = this.isContextual(95); + const refExpressionErrors = new ExpressionErrors(); + const init = this.parseExpression(true, refExpressionErrors); + const isForOf = this.isContextual(102); + if (isForOf) { + if (startsWithLet) { + this.raise(Errors.ForOfLet, init); + } + if (awaitAt === null && startsWithAsync && init.type === "Identifier") { + this.raise(Errors.ForOfAsync, init); + } + } + if (isForOf || this.match(58)) { + this.checkDestructuringPrivate(refExpressionErrors); + this.toAssignable(init, true); + const type = isForOf ? "ForOfStatement" : "ForInStatement"; + this.checkLVal(init, { + type + }); + return this.parseForIn(node, init, awaitAt); + } else { + this.checkExpressionErrors(refExpressionErrors, true); + } + if (awaitAt !== null) { + this.unexpected(awaitAt); + } + return this.parseFor(node, init); + } + parseFunctionStatement(node, isAsync, isHangingDeclaration) { + this.next(); + return this.parseFunction(node, 1 | (isHangingDeclaration ? 2 : 0) | (isAsync ? 8 : 0)); + } + parseIfStatement(node) { + this.next(); + node.test = this.parseHeaderExpression(); + node.consequent = this.parseStatementOrSloppyAnnexBFunctionDeclaration(); + node.alternate = this.eat(66) ? this.parseStatementOrSloppyAnnexBFunctionDeclaration() : null; + return this.finishNode(node, "IfStatement"); + } + parseReturnStatement(node) { + if (!this.prodParam.hasReturn && !(this.optionFlags & 2)) { + this.raise(Errors.IllegalReturn, this.state.startLoc); + } + this.next(); + if (this.isLineTerminator()) { + node.argument = null; + } else { + node.argument = this.parseExpression(); + this.semicolon(); + } + return this.finishNode(node, "ReturnStatement"); + } + parseSwitchStatement(node) { + this.next(); + node.discriminant = this.parseHeaderExpression(); + const cases = node.cases = []; + this.expect(5); + this.state.labels.push(switchLabel); + this.scope.enter(0); + let cur; + for (let sawDefault; !this.match(8);) { + if (this.match(61) || this.match(65)) { + const isCase = this.match(61); + if (cur) this.finishNode(cur, "SwitchCase"); + cases.push(cur = this.startNode()); + cur.consequent = []; + this.next(); + if (isCase) { + cur.test = this.parseExpression(); + } else { + if (sawDefault) { + this.raise(Errors.MultipleDefaultsInSwitch, this.state.lastTokStartLoc); + } + sawDefault = true; + cur.test = null; + } + this.expect(14); + } else { + if (cur) { + cur.consequent.push(this.parseStatementListItem()); + } else { + this.unexpected(); + } + } + } + this.scope.exit(); + if (cur) this.finishNode(cur, "SwitchCase"); + this.next(); + this.state.labels.pop(); + return this.finishNode(node, "SwitchStatement"); + } + parseThrowStatement(node) { + this.next(); + if (this.hasPrecedingLineBreak()) { + this.raise(Errors.NewlineAfterThrow, this.state.lastTokEndLoc); + } + node.argument = this.parseExpression(); + this.semicolon(); + return this.finishNode(node, "ThrowStatement"); + } + parseCatchClauseParam() { + const param = this.parseBindingAtom(); + this.scope.enter(this.options.annexB && param.type === "Identifier" ? 8 : 0); + this.checkLVal(param, { + type: "CatchClause" + }, 9); + return param; + } + parseTryStatement(node) { + this.next(); + node.block = this.parseBlock(); + node.handler = null; + if (this.match(62)) { + const clause = this.startNode(); + this.next(); + if (this.match(10)) { + this.expect(10); + clause.param = this.parseCatchClauseParam(); + this.expect(11); + } else { + clause.param = null; + this.scope.enter(0); + } + clause.body = this.withSmartMixTopicForbiddingContext(() => this.parseBlock(false, false)); + this.scope.exit(); + node.handler = this.finishNode(clause, "CatchClause"); + } + node.finalizer = this.eat(67) ? this.parseBlock() : null; + if (!node.handler && !node.finalizer) { + this.raise(Errors.NoCatchOrFinally, node); + } + return this.finishNode(node, "TryStatement"); + } + parseVarStatement(node, kind, allowMissingInitializer = false) { + this.next(); + this.parseVar(node, false, kind, allowMissingInitializer); + this.semicolon(); + return this.finishNode(node, "VariableDeclaration"); + } + parseWhileStatement(node) { + this.next(); + node.test = this.parseHeaderExpression(); + this.state.labels.push(loopLabel); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); + this.state.labels.pop(); + return this.finishNode(node, "WhileStatement"); + } + parseWithStatement(node) { + if (this.state.strict) { + this.raise(Errors.StrictWith, this.state.startLoc); + } + this.next(); + node.object = this.parseHeaderExpression(); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); + return this.finishNode(node, "WithStatement"); + } + parseEmptyStatement(node) { + this.next(); + return this.finishNode(node, "EmptyStatement"); + } + parseLabeledStatement(node, maybeName, expr, flags) { + for (const label of this.state.labels) { + if (label.name === maybeName) { + this.raise(Errors.LabelRedeclaration, expr, { + labelName: maybeName + }); + } + } + const kind = tokenIsLoop(this.state.type) ? 1 : this.match(71) ? 2 : null; + for (let i = this.state.labels.length - 1; i >= 0; i--) { + const label = this.state.labels[i]; + if (label.statementStart === node.start) { + label.statementStart = this.sourceToOffsetPos(this.state.start); + label.kind = kind; + } else { + break; + } + } + this.state.labels.push({ + name: maybeName, + kind: kind, + statementStart: this.sourceToOffsetPos(this.state.start) + }); + node.body = flags & 8 ? this.parseStatementOrSloppyAnnexBFunctionDeclaration(true) : this.parseStatement(); + this.state.labels.pop(); + node.label = expr; + return this.finishNode(node, "LabeledStatement"); + } + parseExpressionStatement(node, expr, decorators) { + node.expression = expr; + this.semicolon(); + return this.finishNode(node, "ExpressionStatement"); + } + parseBlock(allowDirectives = false, createNewLexicalScope = true, afterBlockParse) { + const node = this.startNode(); + if (allowDirectives) { + this.state.strictErrors.clear(); + } + this.expect(5); + if (createNewLexicalScope) { + this.scope.enter(0); + } + this.parseBlockBody(node, allowDirectives, false, 8, afterBlockParse); + if (createNewLexicalScope) { + this.scope.exit(); + } + return this.finishNode(node, "BlockStatement"); + } + isValidDirective(stmt) { + return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized; + } + parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) { + const body = node.body = []; + const directives = node.directives = []; + this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end, afterBlockParse); + } + parseBlockOrModuleBlockBody(body, directives, topLevel, end, afterBlockParse) { + const oldStrict = this.state.strict; + let hasStrictModeDirective = false; + let parsedNonDirective = false; + while (!this.match(end)) { + const stmt = topLevel ? this.parseModuleItem() : this.parseStatementListItem(); + if (directives && !parsedNonDirective) { + if (this.isValidDirective(stmt)) { + const directive = this.stmtToDirective(stmt); + directives.push(directive); + if (!hasStrictModeDirective && directive.value.value === "use strict") { + hasStrictModeDirective = true; + this.setStrict(true); + } + continue; + } + parsedNonDirective = true; + this.state.strictErrors.clear(); + } + body.push(stmt); + } + afterBlockParse == null || afterBlockParse.call(this, hasStrictModeDirective); + if (!oldStrict) { + this.setStrict(false); + } + this.next(); + } + parseFor(node, init) { + node.init = init; + this.semicolon(false); + node.test = this.match(13) ? null : this.parseExpression(); + this.semicolon(false); + node.update = this.match(11) ? null : this.parseExpression(); + this.expect(11); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); + this.scope.exit(); + this.state.labels.pop(); + return this.finishNode(node, "ForStatement"); + } + parseForIn(node, init, awaitAt) { + const isForIn = this.match(58); + this.next(); + if (isForIn) { + if (awaitAt !== null) this.unexpected(awaitAt); + } else { + node.await = awaitAt !== null; + } + if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || !this.options.annexB || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) { + this.raise(Errors.ForInOfLoopInitializer, init, { + type: isForIn ? "ForInStatement" : "ForOfStatement" + }); + } + if (init.type === "AssignmentPattern") { + this.raise(Errors.InvalidLhs, init, { + ancestor: { + type: "ForStatement" + } + }); + } + node.left = init; + node.right = isForIn ? this.parseExpression() : this.parseMaybeAssignAllowIn(); + this.expect(11); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); + this.scope.exit(); + this.state.labels.pop(); + return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement"); + } + parseVar(node, isFor, kind, allowMissingInitializer = false) { + const declarations = node.declarations = []; + node.kind = kind; + for (;;) { + const decl = this.startNode(); + this.parseVarId(decl, kind); + decl.init = !this.eat(29) ? null : isFor ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn(); + if (decl.init === null && !allowMissingInitializer) { + if (decl.id.type !== "Identifier" && !(isFor && (this.match(58) || this.isContextual(102)))) { + this.raise(Errors.DeclarationMissingInitializer, this.state.lastTokEndLoc, { + kind: "destructuring" + }); + } else if ((kind === "const" || kind === "using" || kind === "await using") && !(this.match(58) || this.isContextual(102))) { + this.raise(Errors.DeclarationMissingInitializer, this.state.lastTokEndLoc, { + kind + }); + } + } + declarations.push(this.finishNode(decl, "VariableDeclarator")); + if (!this.eat(12)) break; + } + return node; + } + parseVarId(decl, kind) { + const id = this.parseBindingAtom(); + if (kind === "using" || kind === "await using") { + if (id.type === "ArrayPattern" || id.type === "ObjectPattern") { + this.raise(Errors.UsingDeclarationHasBindingPattern, id.loc.start); + } + } + this.checkLVal(id, { + type: "VariableDeclarator" + }, kind === "var" ? 5 : 8201); + decl.id = id; + } + parseAsyncFunctionExpression(node) { + return this.parseFunction(node, 8); + } + parseFunction(node, flags = 0) { + const hangingDeclaration = flags & 2; + const isDeclaration = !!(flags & 1); + const requireId = isDeclaration && !(flags & 4); + const isAsync = !!(flags & 8); + this.initFunction(node, isAsync); + if (this.match(55)) { + if (hangingDeclaration) { + this.raise(Errors.GeneratorInSingleStatementContext, this.state.startLoc); + } + this.next(); + node.generator = true; + } + if (isDeclaration) { + node.id = this.parseFunctionId(requireId); + } + const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + this.state.maybeInArrowParameters = false; + this.scope.enter(2); + this.prodParam.enter(functionFlags(isAsync, node.generator)); + if (!isDeclaration) { + node.id = this.parseFunctionId(); + } + this.parseFunctionParams(node, false); + this.withSmartMixTopicForbiddingContext(() => { + this.parseFunctionBodyAndFinish(node, isDeclaration ? "FunctionDeclaration" : "FunctionExpression"); + }); + this.prodParam.exit(); + this.scope.exit(); + if (isDeclaration && !hangingDeclaration) { + this.registerFunctionStatementId(node); + } + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + return node; + } + parseFunctionId(requireId) { + return requireId || tokenIsIdentifier(this.state.type) ? this.parseIdentifier() : null; + } + parseFunctionParams(node, isConstructor) { + this.expect(10); + this.expressionScope.enter(newParameterDeclarationScope()); + node.params = this.parseBindingList(11, 41, 2 | (isConstructor ? 4 : 0)); + this.expressionScope.exit(); + } + registerFunctionStatementId(node) { + if (!node.id) return; + this.scope.declareName(node.id.name, !this.options.annexB || this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? 5 : 8201 : 17, node.id.loc.start); + } + parseClass(node, isStatement, optionalId) { + this.next(); + const oldStrict = this.state.strict; + this.state.strict = true; + this.parseClassId(node, isStatement, optionalId); + this.parseClassSuper(node); + node.body = this.parseClassBody(!!node.superClass, oldStrict); + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); + } + isClassProperty() { + return this.match(29) || this.match(13) || this.match(8); + } + isClassMethod() { + return this.match(10); + } + nameIsConstructor(key) { + return key.type === "Identifier" && key.name === "constructor" || key.type === "StringLiteral" && key.value === "constructor"; + } + isNonstaticConstructor(method) { + return !method.computed && !method.static && this.nameIsConstructor(method.key); + } + parseClassBody(hadSuperClass, oldStrict) { + this.classScope.enter(); + const state = { + hadConstructor: false, + hadSuperClass + }; + let decorators = []; + const classBody = this.startNode(); + classBody.body = []; + this.expect(5); + this.withSmartMixTopicForbiddingContext(() => { + while (!this.match(8)) { + if (this.eat(13)) { + if (decorators.length > 0) { + throw this.raise(Errors.DecoratorSemicolon, this.state.lastTokEndLoc); + } + continue; + } + if (this.match(26)) { + decorators.push(this.parseDecorator()); + continue; + } + const member = this.startNode(); + if (decorators.length) { + member.decorators = decorators; + this.resetStartLocationFromNode(member, decorators[0]); + decorators = []; + } + this.parseClassMember(classBody, member, state); + if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) { + this.raise(Errors.DecoratorConstructor, member); + } + } + }); + this.state.strict = oldStrict; + this.next(); + if (decorators.length) { + throw this.raise(Errors.TrailingDecorator, this.state.startLoc); + } + this.classScope.exit(); + return this.finishNode(classBody, "ClassBody"); + } + parseClassMemberFromModifier(classBody, member) { + const key = this.parseIdentifier(true); + if (this.isClassMethod()) { + const method = member; + method.kind = "method"; + method.computed = false; + method.key = key; + method.static = false; + this.pushClassMethod(classBody, method, false, false, false, false); + return true; + } else if (this.isClassProperty()) { + const prop = member; + prop.computed = false; + prop.key = key; + prop.static = false; + classBody.body.push(this.parseClassProperty(prop)); + return true; + } + this.resetPreviousNodeTrailingComments(key); + return false; + } + parseClassMember(classBody, member, state) { + const isStatic = this.isContextual(106); + if (isStatic) { + if (this.parseClassMemberFromModifier(classBody, member)) { + return; + } + if (this.eat(5)) { + this.parseClassStaticBlock(classBody, member); + return; + } + } + this.parseClassMemberWithIsStatic(classBody, member, state, isStatic); + } + parseClassMemberWithIsStatic(classBody, member, state, isStatic) { + const publicMethod = member; + const privateMethod = member; + const publicProp = member; + const privateProp = member; + const accessorProp = member; + const method = publicMethod; + const publicMember = publicMethod; + member.static = isStatic; + this.parsePropertyNamePrefixOperator(member); + if (this.eat(55)) { + method.kind = "method"; + const isPrivateName = this.match(139); + this.parseClassElementName(method); + if (isPrivateName) { + this.pushClassPrivateMethod(classBody, privateMethod, true, false); + return; + } + if (this.isNonstaticConstructor(publicMethod)) { + this.raise(Errors.ConstructorIsGenerator, publicMethod.key); + } + this.pushClassMethod(classBody, publicMethod, true, false, false, false); + return; + } + const isContextual = !this.state.containsEsc && tokenIsIdentifier(this.state.type); + const key = this.parseClassElementName(member); + const maybeContextualKw = isContextual ? key.name : null; + const isPrivate = this.isPrivateName(key); + const maybeQuestionTokenStartLoc = this.state.startLoc; + this.parsePostMemberNameModifiers(publicMember); + if (this.isClassMethod()) { + method.kind = "method"; + if (isPrivate) { + this.pushClassPrivateMethod(classBody, privateMethod, false, false); + return; + } + const isConstructor = this.isNonstaticConstructor(publicMethod); + let allowsDirectSuper = false; + if (isConstructor) { + publicMethod.kind = "constructor"; + if (state.hadConstructor && !this.hasPlugin("typescript")) { + this.raise(Errors.DuplicateConstructor, key); + } + if (isConstructor && this.hasPlugin("typescript") && member.override) { + this.raise(Errors.OverrideOnConstructor, key); + } + state.hadConstructor = true; + allowsDirectSuper = state.hadSuperClass; + } + this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper); + } else if (this.isClassProperty()) { + if (isPrivate) { + this.pushClassPrivateProperty(classBody, privateProp); + } else { + this.pushClassProperty(classBody, publicProp); + } + } else if (maybeContextualKw === "async" && !this.isLineTerminator()) { + this.resetPreviousNodeTrailingComments(key); + const isGenerator = this.eat(55); + if (publicMember.optional) { + this.unexpected(maybeQuestionTokenStartLoc); + } + method.kind = "method"; + const isPrivate = this.match(139); + this.parseClassElementName(method); + this.parsePostMemberNameModifiers(publicMember); + if (isPrivate) { + this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true); + } else { + if (this.isNonstaticConstructor(publicMethod)) { + this.raise(Errors.ConstructorIsAsync, publicMethod.key); + } + this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false); + } + } else if ((maybeContextualKw === "get" || maybeContextualKw === "set") && !(this.match(55) && this.isLineTerminator())) { + this.resetPreviousNodeTrailingComments(key); + method.kind = maybeContextualKw; + const isPrivate = this.match(139); + this.parseClassElementName(publicMethod); + if (isPrivate) { + this.pushClassPrivateMethod(classBody, privateMethod, false, false); + } else { + if (this.isNonstaticConstructor(publicMethod)) { + this.raise(Errors.ConstructorIsAccessor, publicMethod.key); + } + this.pushClassMethod(classBody, publicMethod, false, false, false, false); + } + this.checkGetterSetterParams(publicMethod); + } else if (maybeContextualKw === "accessor" && !this.isLineTerminator()) { + this.expectPlugin("decoratorAutoAccessors"); + this.resetPreviousNodeTrailingComments(key); + const isPrivate = this.match(139); + this.parseClassElementName(publicProp); + this.pushClassAccessorProperty(classBody, accessorProp, isPrivate); + } else if (this.isLineTerminator()) { + if (isPrivate) { + this.pushClassPrivateProperty(classBody, privateProp); + } else { + this.pushClassProperty(classBody, publicProp); + } + } else { + this.unexpected(); + } + } + parseClassElementName(member) { + const { + type, + value + } = this.state; + if ((type === 132 || type === 134) && member.static && value === "prototype") { + this.raise(Errors.StaticPrototype, this.state.startLoc); + } + if (type === 139) { + if (value === "constructor") { + this.raise(Errors.ConstructorClassPrivateField, this.state.startLoc); + } + const key = this.parsePrivateName(); + member.key = key; + return key; + } + this.parsePropertyName(member); + return member.key; + } + parseClassStaticBlock(classBody, member) { + var _member$decorators; + this.scope.enter(64 | 128 | 16); + const oldLabels = this.state.labels; + this.state.labels = []; + this.prodParam.enter(0); + const body = member.body = []; + this.parseBlockOrModuleBlockBody(body, undefined, false, 8); + this.prodParam.exit(); + this.scope.exit(); + this.state.labels = oldLabels; + classBody.body.push(this.finishNode(member, "StaticBlock")); + if ((_member$decorators = member.decorators) != null && _member$decorators.length) { + this.raise(Errors.DecoratorStaticBlock, member); + } + } + pushClassProperty(classBody, prop) { + if (!prop.computed && this.nameIsConstructor(prop.key)) { + this.raise(Errors.ConstructorClassField, prop.key); + } + classBody.body.push(this.parseClassProperty(prop)); + } + pushClassPrivateProperty(classBody, prop) { + const node = this.parseClassPrivateProperty(prop); + classBody.body.push(node); + this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), 0, node.key.loc.start); + } + pushClassAccessorProperty(classBody, prop, isPrivate) { + if (!isPrivate && !prop.computed && this.nameIsConstructor(prop.key)) { + this.raise(Errors.ConstructorClassField, prop.key); + } + const node = this.parseClassAccessorProperty(prop); + classBody.body.push(node); + if (isPrivate) { + this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), 0, node.key.loc.start); + } + } + pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { + classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true)); + } + pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { + const node = this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true); + classBody.body.push(node); + const kind = node.kind === "get" ? node.static ? 6 : 2 : node.kind === "set" ? node.static ? 5 : 1 : 0; + this.declareClassPrivateMethodInScope(node, kind); + } + declareClassPrivateMethodInScope(node, kind) { + this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), kind, node.key.loc.start); + } + parsePostMemberNameModifiers(methodOrProp) {} + parseClassPrivateProperty(node) { + this.parseInitializer(node); + this.semicolon(); + return this.finishNode(node, "ClassPrivateProperty"); + } + parseClassProperty(node) { + this.parseInitializer(node); + this.semicolon(); + return this.finishNode(node, "ClassProperty"); + } + parseClassAccessorProperty(node) { + this.parseInitializer(node); + this.semicolon(); + return this.finishNode(node, "ClassAccessorProperty"); + } + parseInitializer(node) { + this.scope.enter(64 | 16); + this.expressionScope.enter(newExpressionScope()); + this.prodParam.enter(0); + node.value = this.eat(29) ? this.parseMaybeAssignAllowIn() : null; + this.expressionScope.exit(); + this.prodParam.exit(); + this.scope.exit(); + } + parseClassId(node, isStatement, optionalId, bindingType = 8331) { + if (tokenIsIdentifier(this.state.type)) { + node.id = this.parseIdentifier(); + if (isStatement) { + this.declareNameFromIdentifier(node.id, bindingType); + } + } else { + if (optionalId || !isStatement) { + node.id = null; + } else { + throw this.raise(Errors.MissingClassName, this.state.startLoc); + } + } + } + parseClassSuper(node) { + node.superClass = this.eat(81) ? this.parseExprSubscripts() : null; + } + parseExport(node, decorators) { + const maybeDefaultIdentifier = this.parseMaybeImportPhase(node, true); + const hasDefault = this.maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier); + const parseAfterDefault = !hasDefault || this.eat(12); + const hasStar = parseAfterDefault && this.eatExportStar(node); + const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node); + const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(12)); + const isFromRequired = hasDefault || hasStar; + if (hasStar && !hasNamespace) { + if (hasDefault) this.unexpected(); + if (decorators) { + throw this.raise(Errors.UnsupportedDecoratorExport, node); + } + this.parseExportFrom(node, true); + return this.finishNode(node, "ExportAllDeclaration"); + } + const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node); + if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers) { + this.unexpected(null, 5); + } + if (hasNamespace && parseAfterNamespace) { + this.unexpected(null, 98); + } + let hasDeclaration; + if (isFromRequired || hasSpecifiers) { + hasDeclaration = false; + if (decorators) { + throw this.raise(Errors.UnsupportedDecoratorExport, node); + } + this.parseExportFrom(node, isFromRequired); + } else { + hasDeclaration = this.maybeParseExportDeclaration(node); + } + if (isFromRequired || hasSpecifiers || hasDeclaration) { + var _node2$declaration; + const node2 = node; + this.checkExport(node2, true, false, !!node2.source); + if (((_node2$declaration = node2.declaration) == null ? void 0 : _node2$declaration.type) === "ClassDeclaration") { + this.maybeTakeDecorators(decorators, node2.declaration, node2); + } else if (decorators) { + throw this.raise(Errors.UnsupportedDecoratorExport, node); + } + return this.finishNode(node2, "ExportNamedDeclaration"); + } + if (this.eat(65)) { + const node2 = node; + const decl = this.parseExportDefaultExpression(); + node2.declaration = decl; + if (decl.type === "ClassDeclaration") { + this.maybeTakeDecorators(decorators, decl, node2); + } else if (decorators) { + throw this.raise(Errors.UnsupportedDecoratorExport, node); + } + this.checkExport(node2, true, true); + return this.finishNode(node2, "ExportDefaultDeclaration"); + } + this.unexpected(null, 5); + } + eatExportStar(node) { + return this.eat(55); + } + maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier) { + if (maybeDefaultIdentifier || this.isExportDefaultSpecifier()) { + this.expectPlugin("exportDefaultFrom", maybeDefaultIdentifier == null ? void 0 : maybeDefaultIdentifier.loc.start); + const id = maybeDefaultIdentifier || this.parseIdentifier(true); + const specifier = this.startNodeAtNode(id); + specifier.exported = id; + node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; + return true; + } + return false; + } + maybeParseExportNamespaceSpecifier(node) { + if (this.isContextual(93)) { + var _ref, _ref$specifiers; + (_ref$specifiers = (_ref = node).specifiers) != null ? _ref$specifiers : _ref.specifiers = []; + const specifier = this.startNodeAt(this.state.lastTokStartLoc); + this.next(); + specifier.exported = this.parseModuleExportName(); + node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier")); + return true; + } + return false; + } + maybeParseExportNamedSpecifiers(node) { + if (this.match(5)) { + const node2 = node; + if (!node2.specifiers) node2.specifiers = []; + const isTypeExport = node2.exportKind === "type"; + node2.specifiers.push(...this.parseExportSpecifiers(isTypeExport)); + node2.source = null; + node2.declaration = null; + if (this.hasPlugin("importAssertions")) { + node2.assertions = []; + } + return true; + } + return false; + } + maybeParseExportDeclaration(node) { + if (this.shouldParseExportDeclaration()) { + node.specifiers = []; + node.source = null; + if (this.hasPlugin("importAssertions")) { + node.assertions = []; + } + node.declaration = this.parseExportDeclaration(node); + return true; + } + return false; + } + isAsyncFunction() { + if (!this.isContextual(95)) return false; + const next = this.nextTokenInLineStart(); + return this.isUnparsedContextual(next, "function"); + } + parseExportDefaultExpression() { + const expr = this.startNode(); + if (this.match(68)) { + this.next(); + return this.parseFunction(expr, 1 | 4); + } else if (this.isAsyncFunction()) { + this.next(); + this.next(); + return this.parseFunction(expr, 1 | 4 | 8); + } + if (this.match(80)) { + return this.parseClass(expr, true, true); + } + if (this.match(26)) { + if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") === true) { + this.raise(Errors.DecoratorBeforeExport, this.state.startLoc); + } + return this.parseClass(this.maybeTakeDecorators(this.parseDecorators(false), this.startNode()), true, true); + } + if (this.match(75) || this.match(74) || this.isLet()) { + throw this.raise(Errors.UnsupportedDefaultExport, this.state.startLoc); + } + const res = this.parseMaybeAssignAllowIn(); + this.semicolon(); + return res; + } + parseExportDeclaration(node) { + if (this.match(80)) { + const node = this.parseClass(this.startNode(), true, false); + return node; + } + return this.parseStatementListItem(); + } + isExportDefaultSpecifier() { + const { + type + } = this.state; + if (tokenIsIdentifier(type)) { + if (type === 95 && !this.state.containsEsc || type === 100) { + return false; + } + if ((type === 130 || type === 129) && !this.state.containsEsc) { + const { + type: nextType + } = this.lookahead(); + if (tokenIsIdentifier(nextType) && nextType !== 98 || nextType === 5) { + this.expectOnePlugin(["flow", "typescript"]); + return false; + } + } + } else if (!this.match(65)) { + return false; + } + const next = this.nextTokenStart(); + const hasFrom = this.isUnparsedContextual(next, "from"); + if (this.input.charCodeAt(next) === 44 || tokenIsIdentifier(this.state.type) && hasFrom) { + return true; + } + if (this.match(65) && hasFrom) { + const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4)); + return nextAfterFrom === 34 || nextAfterFrom === 39; + } + return false; + } + parseExportFrom(node, expect) { + if (this.eatContextual(98)) { + node.source = this.parseImportSource(); + this.checkExport(node); + this.maybeParseImportAttributes(node); + this.checkJSONModuleImport(node); + } else if (expect) { + this.unexpected(); + } + this.semicolon(); + } + shouldParseExportDeclaration() { + const { + type + } = this.state; + if (type === 26) { + this.expectOnePlugin(["decorators", "decorators-legacy"]); + if (this.hasPlugin("decorators")) { + if (this.getPluginOption("decorators", "decoratorsBeforeExport") === true) { + this.raise(Errors.DecoratorBeforeExport, this.state.startLoc); + } + return true; + } + } + if (this.isContextual(107)) { + this.raise(Errors.UsingDeclarationExport, this.state.startLoc); + return true; + } + if (this.isContextual(96) && this.startsAwaitUsing()) { + this.raise(Errors.UsingDeclarationExport, this.state.startLoc); + return true; + } + return type === 74 || type === 75 || type === 68 || type === 80 || this.isLet() || this.isAsyncFunction(); + } + checkExport(node, checkNames, isDefault, isFrom) { + if (checkNames) { + var _node$specifiers; + if (isDefault) { + this.checkDuplicateExports(node, "default"); + if (this.hasPlugin("exportDefaultFrom")) { + var _declaration$extra; + const declaration = node.declaration; + if (declaration.type === "Identifier" && declaration.name === "from" && declaration.end - declaration.start === 4 && !((_declaration$extra = declaration.extra) != null && _declaration$extra.parenthesized)) { + this.raise(Errors.ExportDefaultFromAsIdentifier, declaration); + } + } + } else if ((_node$specifiers = node.specifiers) != null && _node$specifiers.length) { + for (const specifier of node.specifiers) { + const { + exported + } = specifier; + const exportName = exported.type === "Identifier" ? exported.name : exported.value; + this.checkDuplicateExports(specifier, exportName); + if (!isFrom && specifier.local) { + const { + local + } = specifier; + if (local.type !== "Identifier") { + this.raise(Errors.ExportBindingIsString, specifier, { + localName: local.value, + exportName + }); + } else { + this.checkReservedWord(local.name, local.loc.start, true, false); + this.scope.checkLocalExport(local); + } + } + } + } else if (node.declaration) { + const decl = node.declaration; + if (decl.type === "FunctionDeclaration" || decl.type === "ClassDeclaration") { + const { + id + } = decl; + if (!id) throw new Error("Assertion failure"); + this.checkDuplicateExports(node, id.name); + } else if (decl.type === "VariableDeclaration") { + for (const declaration of decl.declarations) { + this.checkDeclaration(declaration.id); + } + } + } + } + } + checkDeclaration(node) { + if (node.type === "Identifier") { + this.checkDuplicateExports(node, node.name); + } else if (node.type === "ObjectPattern") { + for (const prop of node.properties) { + this.checkDeclaration(prop); + } + } else if (node.type === "ArrayPattern") { + for (const elem of node.elements) { + if (elem) { + this.checkDeclaration(elem); + } + } + } else if (node.type === "ObjectProperty") { + this.checkDeclaration(node.value); + } else if (node.type === "RestElement") { + this.checkDeclaration(node.argument); + } else if (node.type === "AssignmentPattern") { + this.checkDeclaration(node.left); + } + } + checkDuplicateExports(node, exportName) { + if (this.exportedIdentifiers.has(exportName)) { + if (exportName === "default") { + this.raise(Errors.DuplicateDefaultExport, node); + } else { + this.raise(Errors.DuplicateExport, node, { + exportName + }); + } + } + this.exportedIdentifiers.add(exportName); + } + parseExportSpecifiers(isInTypeExport) { + const nodes = []; + let first = true; + this.expect(5); + while (!this.eat(8)) { + if (first) { + first = false; + } else { + this.expect(12); + if (this.eat(8)) break; + } + const isMaybeTypeOnly = this.isContextual(130); + const isString = this.match(134); + const node = this.startNode(); + node.local = this.parseModuleExportName(); + nodes.push(this.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly)); + } + return nodes; + } + parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly) { + if (this.eatContextual(93)) { + node.exported = this.parseModuleExportName(); + } else if (isString) { + node.exported = cloneStringLiteral(node.local); + } else if (!node.exported) { + node.exported = cloneIdentifier(node.local); + } + return this.finishNode(node, "ExportSpecifier"); + } + parseModuleExportName() { + if (this.match(134)) { + const result = this.parseStringLiteral(this.state.value); + const surrogate = loneSurrogate.exec(result.value); + if (surrogate) { + this.raise(Errors.ModuleExportNameHasLoneSurrogate, result, { + surrogateCharCode: surrogate[0].charCodeAt(0) + }); + } + return result; + } + return this.parseIdentifier(true); + } + isJSONModuleImport(node) { + if (node.assertions != null) { + return node.assertions.some(({ + key, + value + }) => { + return value.value === "json" && (key.type === "Identifier" ? key.name === "type" : key.value === "type"); + }); + } + return false; + } + checkImportReflection(node) { + const { + specifiers + } = node; + const singleBindingType = specifiers.length === 1 ? specifiers[0].type : null; + if (node.phase === "source") { + if (singleBindingType !== "ImportDefaultSpecifier") { + this.raise(Errors.SourcePhaseImportRequiresDefault, specifiers[0].loc.start); + } + } else if (node.phase === "defer") { + if (singleBindingType !== "ImportNamespaceSpecifier") { + this.raise(Errors.DeferImportRequiresNamespace, specifiers[0].loc.start); + } + } else if (node.module) { + var _node$assertions; + if (singleBindingType !== "ImportDefaultSpecifier") { + this.raise(Errors.ImportReflectionNotBinding, specifiers[0].loc.start); + } + if (((_node$assertions = node.assertions) == null ? void 0 : _node$assertions.length) > 0) { + this.raise(Errors.ImportReflectionHasAssertion, specifiers[0].loc.start); + } + } + } + checkJSONModuleImport(node) { + if (this.isJSONModuleImport(node) && node.type !== "ExportAllDeclaration") { + const { + specifiers + } = node; + if (specifiers != null) { + const nonDefaultNamedSpecifier = specifiers.find(specifier => { + let imported; + if (specifier.type === "ExportSpecifier") { + imported = specifier.local; + } else if (specifier.type === "ImportSpecifier") { + imported = specifier.imported; + } + if (imported !== undefined) { + return imported.type === "Identifier" ? imported.name !== "default" : imported.value !== "default"; + } + }); + if (nonDefaultNamedSpecifier !== undefined) { + this.raise(Errors.ImportJSONBindingNotDefault, nonDefaultNamedSpecifier.loc.start); + } + } + } + } + isPotentialImportPhase(isExport) { + if (isExport) return false; + return this.isContextual(105) || this.isContextual(97) || this.isContextual(127); + } + applyImportPhase(node, isExport, phase, loc) { + if (isExport) { + return; + } + if (phase === "module") { + this.expectPlugin("importReflection", loc); + node.module = true; + } else if (this.hasPlugin("importReflection")) { + node.module = false; + } + if (phase === "source") { + this.expectPlugin("sourcePhaseImports", loc); + node.phase = "source"; + } else if (phase === "defer") { + this.expectPlugin("deferredImportEvaluation", loc); + node.phase = "defer"; + } else if (this.hasPlugin("sourcePhaseImports")) { + node.phase = null; + } + } + parseMaybeImportPhase(node, isExport) { + if (!this.isPotentialImportPhase(isExport)) { + this.applyImportPhase(node, isExport, null); + return null; + } + const phaseIdentifier = this.parseIdentifier(true); + const { + type + } = this.state; + const isImportPhase = tokenIsKeywordOrIdentifier(type) ? type !== 98 || this.lookaheadCharCode() === 102 : type !== 12; + if (isImportPhase) { + this.resetPreviousIdentifierLeadingComments(phaseIdentifier); + this.applyImportPhase(node, isExport, phaseIdentifier.name, phaseIdentifier.loc.start); + return null; + } else { + this.applyImportPhase(node, isExport, null); + return phaseIdentifier; + } + } + isPrecedingIdImportPhase(phase) { + const { + type + } = this.state; + return tokenIsIdentifier(type) ? type !== 98 || this.lookaheadCharCode() === 102 : type !== 12; + } + parseImport(node) { + if (this.match(134)) { + return this.parseImportSourceAndAttributes(node); + } + return this.parseImportSpecifiersAndAfter(node, this.parseMaybeImportPhase(node, false)); + } + parseImportSpecifiersAndAfter(node, maybeDefaultIdentifier) { + node.specifiers = []; + const hasDefault = this.maybeParseDefaultImportSpecifier(node, maybeDefaultIdentifier); + const parseNext = !hasDefault || this.eat(12); + const hasStar = parseNext && this.maybeParseStarImportSpecifier(node); + if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node); + this.expectContextual(98); + return this.parseImportSourceAndAttributes(node); + } + parseImportSourceAndAttributes(node) { + var _node$specifiers2; + (_node$specifiers2 = node.specifiers) != null ? _node$specifiers2 : node.specifiers = []; + node.source = this.parseImportSource(); + this.maybeParseImportAttributes(node); + this.checkImportReflection(node); + this.checkJSONModuleImport(node); + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); + } + parseImportSource() { + if (!this.match(134)) this.unexpected(); + return this.parseExprAtom(); + } + parseImportSpecifierLocal(node, specifier, type) { + specifier.local = this.parseIdentifier(); + node.specifiers.push(this.finishImportSpecifier(specifier, type)); + } + finishImportSpecifier(specifier, type, bindingType = 8201) { + this.checkLVal(specifier.local, { + type + }, bindingType); + return this.finishNode(specifier, type); + } + parseImportAttributes() { + this.expect(5); + const attrs = []; + const attrNames = new Set(); + do { + if (this.match(8)) { + break; + } + const node = this.startNode(); + const keyName = this.state.value; + if (attrNames.has(keyName)) { + this.raise(Errors.ModuleAttributesWithDuplicateKeys, this.state.startLoc, { + key: keyName + }); + } + attrNames.add(keyName); + if (this.match(134)) { + node.key = this.parseStringLiteral(keyName); + } else { + node.key = this.parseIdentifier(true); + } + this.expect(14); + if (!this.match(134)) { + throw this.raise(Errors.ModuleAttributeInvalidValue, this.state.startLoc); + } + node.value = this.parseStringLiteral(this.state.value); + attrs.push(this.finishNode(node, "ImportAttribute")); + } while (this.eat(12)); + this.expect(8); + return attrs; + } + parseModuleAttributes() { + const attrs = []; + const attributes = new Set(); + do { + const node = this.startNode(); + node.key = this.parseIdentifier(true); + if (node.key.name !== "type") { + this.raise(Errors.ModuleAttributeDifferentFromType, node.key); + } + if (attributes.has(node.key.name)) { + this.raise(Errors.ModuleAttributesWithDuplicateKeys, node.key, { + key: node.key.name + }); + } + attributes.add(node.key.name); + this.expect(14); + if (!this.match(134)) { + throw this.raise(Errors.ModuleAttributeInvalidValue, this.state.startLoc); + } + node.value = this.parseStringLiteral(this.state.value); + attrs.push(this.finishNode(node, "ImportAttribute")); + } while (this.eat(12)); + return attrs; + } + maybeParseImportAttributes(node) { + let attributes; + { + var useWith = false; + } + if (this.match(76)) { + if (this.hasPrecedingLineBreak() && this.lookaheadCharCode() === 40) { + return; + } + this.next(); + if (this.hasPlugin("moduleAttributes")) { + attributes = this.parseModuleAttributes(); + } else { + attributes = this.parseImportAttributes(); + } + { + useWith = true; + } + } else if (this.isContextual(94) && !this.hasPrecedingLineBreak()) { + if (!this.hasPlugin("deprecatedImportAssert") && !this.hasPlugin("importAssertions")) { + this.raise(Errors.ImportAttributesUseAssert, this.state.startLoc); + } + if (!this.hasPlugin("importAssertions")) { + this.addExtra(node, "deprecatedAssertSyntax", true); + } + this.next(); + attributes = this.parseImportAttributes(); + } else { + attributes = []; + } + if (!useWith && this.hasPlugin("importAssertions")) { + node.assertions = attributes; + } else { + node.attributes = attributes; + } + } + maybeParseDefaultImportSpecifier(node, maybeDefaultIdentifier) { + if (maybeDefaultIdentifier) { + const specifier = this.startNodeAtNode(maybeDefaultIdentifier); + specifier.local = maybeDefaultIdentifier; + node.specifiers.push(this.finishImportSpecifier(specifier, "ImportDefaultSpecifier")); + return true; + } else if (tokenIsKeywordOrIdentifier(this.state.type)) { + this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier"); + return true; + } + return false; + } + maybeParseStarImportSpecifier(node) { + if (this.match(55)) { + const specifier = this.startNode(); + this.next(); + this.expectContextual(93); + this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier"); + return true; + } + return false; + } + parseNamedImportSpecifiers(node) { + let first = true; + this.expect(5); + while (!this.eat(8)) { + if (first) { + first = false; + } else { + if (this.eat(14)) { + throw this.raise(Errors.DestructureNamedImport, this.state.startLoc); + } + this.expect(12); + if (this.eat(8)) break; + } + const specifier = this.startNode(); + const importedIsString = this.match(134); + const isMaybeTypeOnly = this.isContextual(130); + specifier.imported = this.parseModuleExportName(); + const importSpecifier = this.parseImportSpecifier(specifier, importedIsString, node.importKind === "type" || node.importKind === "typeof", isMaybeTypeOnly, undefined); + node.specifiers.push(importSpecifier); + } + } + parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) { + if (this.eatContextual(93)) { + specifier.local = this.parseIdentifier(); + } else { + const { + imported + } = specifier; + if (importedIsString) { + throw this.raise(Errors.ImportBindingIsString, specifier, { + importName: imported.value + }); + } + this.checkReservedWord(imported.name, specifier.loc.start, true, true); + if (!specifier.local) { + specifier.local = cloneIdentifier(imported); + } + } + return this.finishImportSpecifier(specifier, "ImportSpecifier", bindingType); + } + isThisParam(param) { + return param.type === "Identifier" && param.name === "this"; + } +} +class Parser extends StatementParser { + constructor(options, input, pluginsMap) { + options = getOptions(options); + super(options, input); + this.options = options; + this.initializeScopes(); + this.plugins = pluginsMap; + this.filename = options.sourceFilename; + this.startIndex = options.startIndex; + let optionFlags = 0; + if (options.allowAwaitOutsideFunction) { + optionFlags |= 1; + } + if (options.allowReturnOutsideFunction) { + optionFlags |= 2; + } + if (options.allowImportExportEverywhere) { + optionFlags |= 8; + } + if (options.allowSuperOutsideMethod) { + optionFlags |= 16; + } + if (options.allowUndeclaredExports) { + optionFlags |= 32; + } + if (options.allowNewTargetOutsideFunction) { + optionFlags |= 4; + } + if (options.ranges) { + optionFlags |= 64; + } + if (options.tokens) { + optionFlags |= 128; + } + if (options.createImportExpressions) { + optionFlags |= 256; + } + if (options.createParenthesizedExpressions) { + optionFlags |= 512; + } + if (options.errorRecovery) { + optionFlags |= 1024; + } + if (options.attachComment) { + optionFlags |= 2048; + } + if (options.annexB) { + optionFlags |= 4096; + } + this.optionFlags = optionFlags; + } + getScopeHandler() { + return ScopeHandler; + } + parse() { + this.enterInitialScopes(); + const file = this.startNode(); + const program = this.startNode(); + this.nextToken(); + file.errors = null; + this.parseTopLevel(file, program); + file.errors = this.state.errors; + file.comments.length = this.state.commentsLen; + return file; + } +} +function parse(input, options) { + var _options; + if (((_options = options) == null ? void 0 : _options.sourceType) === "unambiguous") { + options = Object.assign({}, options); + try { + options.sourceType = "module"; + const parser = getParser(options, input); + const ast = parser.parse(); + if (parser.sawUnambiguousESM) { + return ast; + } + if (parser.ambiguousScriptDifferentAst) { + try { + options.sourceType = "script"; + return getParser(options, input).parse(); + } catch (_unused) {} + } else { + ast.program.sourceType = "script"; + } + return ast; + } catch (moduleError) { + try { + options.sourceType = "script"; + return getParser(options, input).parse(); + } catch (_unused2) {} + throw moduleError; + } + } else { + return getParser(options, input).parse(); + } +} +function parseExpression(input, options) { + const parser = getParser(options, input); + if (parser.options.strictMode) { + parser.state.strict = true; + } + return parser.getExpression(); +} +function generateExportedTokenTypes(internalTokenTypes) { + const tokenTypes = {}; + for (const typeName of Object.keys(internalTokenTypes)) { + tokenTypes[typeName] = getExportedToken(internalTokenTypes[typeName]); + } + return tokenTypes; +} +const tokTypes = generateExportedTokenTypes(tt); +function getParser(options, input) { + let cls = Parser; + const pluginsMap = new Map(); + if (options != null && options.plugins) { + for (const plugin of options.plugins) { + let name, opts; + if (typeof plugin === "string") { + name = plugin; + } else { + [name, opts] = plugin; + } + if (!pluginsMap.has(name)) { + pluginsMap.set(name, opts || {}); + } + } + validatePlugins(pluginsMap); + cls = getParserClass(pluginsMap); + } + return new cls(options, input, pluginsMap); +} +const parserClassCache = new Map(); +function getParserClass(pluginsMap) { + const pluginList = []; + for (const name of mixinPluginNames) { + if (pluginsMap.has(name)) { + pluginList.push(name); + } + } + const key = pluginList.join("|"); + let cls = parserClassCache.get(key); + if (!cls) { + cls = Parser; + for (const plugin of pluginList) { + cls = mixinPlugins[plugin](cls); + } + parserClassCache.set(key, cls); + } + return cls; +} +exports.parse = parse; +exports.parseExpression = parseExpression; +exports.tokTypes = tokTypes; +//# sourceMappingURL=index.js.map diff --git a/vuetest/node_modules/@babel/parser/lib/index.js.map b/vuetest/node_modules/@babel/parser/lib/index.js.map new file mode 100644 index 0000000..ccb1f49 --- /dev/null +++ b/vuetest/node_modules/@babel/parser/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../src/util/location.ts","../src/parse-error/module-errors.ts","../src/parse-error/to-node-description.ts","../src/parse-error/standard-errors.ts","../src/parse-error/strict-mode-errors.ts","../src/parse-error/pipeline-operator-errors.ts","../src/parse-error.ts","../src/options.ts","../src/plugins/estree.ts","../src/tokenizer/context.ts","../src/tokenizer/types.ts","../../babel-helper-validator-identifier/src/identifier.ts","../../babel-helper-validator-identifier/src/keyword.ts","../src/util/identifier.ts","../src/util/scope.ts","../src/plugins/flow/scope.ts","../src/parser/base.ts","../src/parser/comments.ts","../src/util/whitespace.ts","../src/tokenizer/state.ts","../../babel-helper-string-parser/src/index.ts","../src/tokenizer/index.ts","../src/util/class-scope.ts","../src/util/expression-scope.ts","../src/util/production-parameter.ts","../src/parser/util.ts","../src/parser/node.ts","../src/plugins/flow/index.ts","../src/plugins/jsx/xhtml.ts","../src/plugins/jsx/index.ts","../src/plugins/typescript/scope.ts","../src/parser/lval.ts","../src/plugins/typescript/index.ts","../src/plugins/placeholders.ts","../src/plugins/v8intrinsic.ts","../src/plugin-utils.ts","../src/parser/expression.ts","../src/parser/statement.ts","../src/parser/index.ts","../src/index.ts"],"sourcesContent":["export type Pos = {\n start: number;\n};\n\n// These are used when `options.locations` is on, for the\n// `startLoc` and `endLoc` properties.\n\nexport class Position {\n line: number;\n column: number;\n index: number;\n\n constructor(line: number, col: number, index: number) {\n this.line = line;\n this.column = col;\n this.index = index;\n }\n}\n\nexport class SourceLocation {\n start: Position;\n end: Position;\n filename: string;\n identifierName: string | undefined | null;\n\n constructor(start: Position, end?: Position) {\n this.start = start;\n // (may start as null, but initialized later)\n this.end = end;\n }\n}\n\n/**\n * creates a new position with a non-zero column offset from the given position.\n * This function should be only be used when we create AST node out of the token\n * boundaries, such as TemplateElement ends before tt.templateNonTail. This\n * function does not skip whitespaces.\n */\nexport function createPositionWithColumnOffset(\n position: Position,\n columnOffset: number,\n) {\n const { line, column, index } = position;\n return new Position(line, column + columnOffset, index + columnOffset);\n}\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\n\nconst code = \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\";\n\nexport default {\n ImportMetaOutsideModule: {\n message: `import.meta may appear only with 'sourceType: \"module\"'`,\n code,\n },\n ImportOutsideModule: {\n message: `'import' and 'export' may appear only with 'sourceType: \"module\"'`,\n code,\n },\n} satisfies ParseErrorTemplates;\n","const NodeDescriptions = {\n ArrayPattern: \"array destructuring pattern\",\n AssignmentExpression: \"assignment expression\",\n AssignmentPattern: \"assignment expression\",\n ArrowFunctionExpression: \"arrow function expression\",\n ConditionalExpression: \"conditional expression\",\n CatchClause: \"catch clause\",\n ForOfStatement: \"for-of statement\",\n ForInStatement: \"for-in statement\",\n ForStatement: \"for-loop\",\n FormalParameters: \"function parameter list\",\n Identifier: \"identifier\",\n ImportSpecifier: \"import specifier\",\n ImportDefaultSpecifier: \"import default specifier\",\n ImportNamespaceSpecifier: \"import namespace specifier\",\n ObjectPattern: \"object destructuring pattern\",\n ParenthesizedExpression: \"parenthesized expression\",\n RestElement: \"rest element\",\n UpdateExpression: {\n true: \"prefix operation\",\n false: \"postfix operation\",\n },\n VariableDeclarator: \"variable declaration\",\n YieldExpression: \"yield expression\",\n};\n\ntype NodeTypesWithDescriptions = keyof Omit<\n typeof NodeDescriptions,\n \"UpdateExpression\"\n>;\n\ntype NodeWithDescription =\n | {\n type: \"UpdateExpression\";\n prefix: boolean;\n }\n | {\n type: NodeTypesWithDescriptions;\n };\n\nconst toNodeDescription = (node: NodeWithDescription) =>\n node.type === \"UpdateExpression\"\n ? NodeDescriptions.UpdateExpression[`${node.prefix}`]\n : NodeDescriptions[node.type];\n\nexport default toNodeDescription;\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\nimport toNodeDescription from \"./to-node-description.ts\";\n\nexport type LValAncestor =\n | { type: \"UpdateExpression\"; prefix: boolean }\n | {\n type:\n | \"ArrayPattern\"\n | \"AssignmentExpression\"\n | \"CatchClause\"\n | \"ForOfStatement\"\n | \"FormalParameters\"\n | \"ForInStatement\"\n | \"ForStatement\"\n | \"ImportSpecifier\"\n | \"ImportNamespaceSpecifier\"\n | \"ImportDefaultSpecifier\"\n | \"ParenthesizedExpression\"\n | \"ObjectPattern\"\n | \"RestElement\"\n | \"VariableDeclarator\";\n };\n\nexport default {\n AccessorIsGenerator: ({ kind }: { kind: \"get\" | \"set\" }) =>\n `A ${kind}ter cannot be a generator.`,\n ArgumentsInClass:\n \"'arguments' is only allowed in functions and class methods.\",\n AsyncFunctionInSingleStatementContext:\n \"Async functions can only be declared at the top level or inside a block.\",\n AwaitBindingIdentifier:\n \"Can not use 'await' as identifier inside an async function.\",\n AwaitBindingIdentifierInStaticBlock:\n \"Can not use 'await' as identifier inside a static block.\",\n AwaitExpressionFormalParameter:\n \"'await' is not allowed in async function parameters.\",\n AwaitUsingNotInAsyncContext:\n \"'await using' is only allowed within async functions and at the top levels of modules.\",\n AwaitNotInAsyncContext:\n \"'await' is only allowed within async functions and at the top levels of modules.\",\n AwaitNotInAsyncFunction: \"'await' is only allowed within async functions.\",\n BadGetterArity: \"A 'get' accessor must not have any formal parameters.\",\n BadSetterArity: \"A 'set' accessor must have exactly one formal parameter.\",\n BadSetterRestParameter:\n \"A 'set' accessor function argument must not be a rest parameter.\",\n ConstructorClassField: \"Classes may not have a field named 'constructor'.\",\n ConstructorClassPrivateField:\n \"Classes may not have a private field named '#constructor'.\",\n ConstructorIsAccessor: \"Class constructor may not be an accessor.\",\n ConstructorIsAsync: \"Constructor can't be an async function.\",\n ConstructorIsGenerator: \"Constructor can't be a generator.\",\n DeclarationMissingInitializer: ({\n kind,\n }: {\n kind: \"await using\" | \"const\" | \"destructuring\" | \"using\";\n }) => `Missing initializer in ${kind} declaration.`,\n DecoratorArgumentsOutsideParentheses:\n \"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.\",\n DecoratorBeforeExport:\n \"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.\",\n DecoratorsBeforeAfterExport:\n \"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.\",\n DecoratorConstructor:\n \"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?\",\n DecoratorExportClass:\n \"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.\",\n DecoratorSemicolon: \"Decorators must not be followed by a semicolon.\",\n DecoratorStaticBlock: \"Decorators can't be used with a static block.\",\n DeferImportRequiresNamespace:\n 'Only `import defer * as x from \"./module\"` is valid.',\n DeletePrivateField: \"Deleting a private field is not allowed.\",\n DestructureNamedImport:\n \"ES2015 named imports do not destructure. Use another statement for destructuring after the import.\",\n DuplicateConstructor: \"Duplicate constructor in the same class.\",\n DuplicateDefaultExport: \"Only one default export allowed per module.\",\n DuplicateExport: ({ exportName }: { exportName: string }) =>\n `\\`${exportName}\\` has already been exported. Exported identifiers must be unique.`,\n DuplicateProto: \"Redefinition of __proto__ property.\",\n DuplicateRegExpFlags: \"Duplicate regular expression flag.\",\n DynamicImportPhaseRequiresImportExpressions: ({ phase }: { phase: string }) =>\n `'import.${phase}(...)' can only be parsed when using the 'createImportExpressions' option.`,\n ElementAfterRest: \"Rest element must be last element.\",\n EscapedCharNotAnIdentifier: \"Invalid Unicode escape.\",\n ExportBindingIsString: ({\n localName,\n exportName,\n }: {\n localName: string;\n exportName: string;\n }) =>\n `A string literal cannot be used as an exported binding without \\`from\\`.\\n- Did you mean \\`export { '${localName}' as '${exportName}' } from 'some-module'\\`?`,\n ExportDefaultFromAsIdentifier:\n \"'from' is not allowed as an identifier after 'export default'.\",\n\n ForInOfLoopInitializer: ({\n type,\n }: {\n type: \"ForInStatement\" | \"ForOfStatement\";\n }) =>\n `'${\n type === \"ForInStatement\" ? \"for-in\" : \"for-of\"\n }' loop variable declaration may not have an initializer.`,\n ForInUsing: \"For-in loop may not start with 'using' declaration.\",\n\n ForOfAsync: \"The left-hand side of a for-of loop may not be 'async'.\",\n ForOfLet: \"The left-hand side of a for-of loop may not start with 'let'.\",\n GeneratorInSingleStatementContext:\n \"Generators can only be declared at the top level or inside a block.\",\n\n IllegalBreakContinue: ({\n type,\n }: {\n type: \"BreakStatement\" | \"ContinueStatement\";\n }) => `Unsyntactic ${type === \"BreakStatement\" ? \"break\" : \"continue\"}.`,\n\n IllegalLanguageModeDirective:\n \"Illegal 'use strict' directive in function with non-simple parameter list.\",\n IllegalReturn: \"'return' outside of function.\",\n ImportAttributesUseAssert:\n \"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.\",\n ImportBindingIsString: ({ importName }: { importName: string }) =>\n `A string literal cannot be used as an imported binding.\\n- Did you mean \\`import { \"${importName}\" as foo }\\`?`,\n ImportCallArity: `\\`import()\\` requires exactly one or two arguments.`,\n ImportCallNotNewExpression: \"Cannot use new with import(...).\",\n ImportCallSpreadArgument: \"`...` is not allowed in `import()`.\",\n ImportJSONBindingNotDefault:\n \"A JSON module can only be imported with `default`.\",\n ImportReflectionHasAssertion: \"`import module x` cannot have assertions.\",\n ImportReflectionNotBinding:\n 'Only `import module x from \"./module\"` is valid.',\n IncompatibleRegExpUVFlags:\n \"The 'u' and 'v' regular expression flags cannot be enabled at the same time.\",\n InvalidBigIntLiteral: \"Invalid BigIntLiteral.\",\n InvalidCodePoint: \"Code point out of bounds.\",\n InvalidCoverInitializedName: \"Invalid shorthand property initializer.\",\n InvalidDecimal: \"Invalid decimal.\",\n InvalidDigit: ({ radix }: { radix: number }) =>\n `Expected number in radix ${radix}.`,\n InvalidEscapeSequence: \"Bad character escape sequence.\",\n InvalidEscapeSequenceTemplate: \"Invalid escape sequence in template.\",\n InvalidEscapedReservedWord: ({ reservedWord }: { reservedWord: string }) =>\n `Escape sequence in keyword ${reservedWord}.`,\n InvalidIdentifier: ({ identifierName }: { identifierName: string }) =>\n `Invalid identifier ${identifierName}.`,\n InvalidLhs: ({ ancestor }: { ancestor: LValAncestor }) =>\n `Invalid left-hand side in ${toNodeDescription(ancestor)}.`,\n InvalidLhsBinding: ({ ancestor }: { ancestor: LValAncestor }) =>\n `Binding invalid left-hand side in ${toNodeDescription(ancestor)}.`,\n InvalidLhsOptionalChaining: ({ ancestor }: { ancestor: LValAncestor }) =>\n `Invalid optional chaining in the left-hand side of ${toNodeDescription(\n ancestor,\n )}.`,\n InvalidNumber: \"Invalid number.\",\n InvalidOrMissingExponent:\n \"Floating-point numbers require a valid exponent after the 'e'.\",\n InvalidOrUnexpectedToken: ({ unexpected }: { unexpected: string }) =>\n `Unexpected character '${unexpected}'.`,\n InvalidParenthesizedAssignment: \"Invalid parenthesized assignment pattern.\",\n InvalidPrivateFieldResolution: ({\n identifierName,\n }: {\n identifierName: string;\n }) => `Private name #${identifierName} is not defined.`,\n InvalidPropertyBindingPattern: \"Binding member expression.\",\n InvalidRecordProperty:\n \"Only properties and spread elements are allowed in record definitions.\",\n InvalidRestAssignmentPattern: \"Invalid rest operator's argument.\",\n LabelRedeclaration: ({ labelName }: { labelName: string }) =>\n `Label '${labelName}' is already declared.`,\n LetInLexicalBinding: \"'let' is disallowed as a lexically bound name.\",\n LineTerminatorBeforeArrow: \"No line break is allowed before '=>'.\",\n MalformedRegExpFlags: \"Invalid regular expression flag.\",\n MissingClassName: \"A class name is required.\",\n MissingEqInAssignment:\n \"Only '=' operator can be used for specifying default value.\",\n MissingSemicolon: \"Missing semicolon.\",\n MissingPlugin: ({ missingPlugin }: { missingPlugin: [string] }) =>\n `This experimental syntax requires enabling the parser plugin: ${missingPlugin\n .map(name => JSON.stringify(name))\n .join(\", \")}.`,\n // FIXME: Would be nice to make this \"missingPlugins\" instead.\n // Also, seems like we can drop the \"(s)\" from the message and just make it \"s\".\n MissingOneOfPlugins: ({ missingPlugin }: { missingPlugin: string[] }) =>\n `This experimental syntax requires enabling one of the following parser plugin(s): ${missingPlugin\n .map(name => JSON.stringify(name))\n .join(\", \")}.`,\n MissingUnicodeEscape: \"Expecting Unicode escape sequence \\\\uXXXX.\",\n MixingCoalesceWithLogical:\n \"Nullish coalescing operator(??) requires parens when mixing with logical operators.\",\n ModuleAttributeDifferentFromType:\n \"The only accepted module attribute is `type`.\",\n ModuleAttributeInvalidValue:\n \"Only string literals are allowed as module attribute values.\",\n ModuleAttributesWithDuplicateKeys: ({ key }: { key: string }) =>\n `Duplicate key \"${key}\" is not allowed in module attributes.`,\n ModuleExportNameHasLoneSurrogate: ({\n surrogateCharCode,\n }: {\n surrogateCharCode: number;\n }) =>\n `An export name cannot include a lone surrogate, found '\\\\u${surrogateCharCode.toString(\n 16,\n )}'.`,\n ModuleExportUndefined: ({ localName }: { localName: string }) =>\n `Export '${localName}' is not defined.`,\n MultipleDefaultsInSwitch: \"Multiple default clauses.\",\n NewlineAfterThrow: \"Illegal newline after throw.\",\n NoCatchOrFinally: \"Missing catch or finally clause.\",\n NumberIdentifier: \"Identifier directly after number.\",\n NumericSeparatorInEscapeSequence:\n \"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.\",\n ObsoleteAwaitStar:\n \"'await*' has been removed from the async functions proposal. Use Promise.all() instead.\",\n OptionalChainingNoNew:\n \"Constructors in/after an Optional Chain are not allowed.\",\n OptionalChainingNoTemplate:\n \"Tagged Template Literals are not allowed in optionalChain.\",\n OverrideOnConstructor:\n \"'override' modifier cannot appear on a constructor declaration.\",\n ParamDupe: \"Argument name clash.\",\n PatternHasAccessor: \"Object pattern can't contain getter or setter.\",\n PatternHasMethod: \"Object pattern can't contain methods.\",\n PrivateInExpectedIn: ({ identifierName }: { identifierName: string }) =>\n `Private names are only allowed in property accesses (\\`obj.#${identifierName}\\`) or in \\`in\\` expressions (\\`#${identifierName} in obj\\`).`,\n PrivateNameRedeclaration: ({ identifierName }: { identifierName: string }) =>\n `Duplicate private name #${identifierName}.`,\n RecordExpressionBarIncorrectEndSyntaxType:\n \"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n RecordExpressionBarIncorrectStartSyntaxType:\n \"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n RecordExpressionHashIncorrectStartSyntaxType:\n \"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n RecordNoProto: \"'__proto__' is not allowed in Record expressions.\",\n RestTrailingComma: \"Unexpected trailing comma after rest element.\",\n SloppyFunction:\n \"In non-strict mode code, functions can only be declared at top level or inside a block.\",\n SloppyFunctionAnnexB:\n \"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.\",\n SourcePhaseImportRequiresDefault:\n 'Only `import source x from \"./module\"` is valid.',\n StaticPrototype: \"Classes may not have static property named prototype.\",\n SuperNotAllowed:\n \"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?\",\n SuperPrivateField: \"Private fields can't be accessed on super.\",\n TrailingDecorator: \"Decorators must be attached to a class element.\",\n TupleExpressionBarIncorrectEndSyntaxType:\n \"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n TupleExpressionBarIncorrectStartSyntaxType:\n \"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n TupleExpressionHashIncorrectStartSyntaxType:\n \"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n UnexpectedArgumentPlaceholder: \"Unexpected argument placeholder.\",\n UnexpectedAwaitAfterPipelineBody:\n 'Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal.',\n UnexpectedDigitAfterHash: \"Unexpected digit after hash token.\",\n UnexpectedImportExport:\n \"'import' and 'export' may only appear at the top level.\",\n UnexpectedKeyword: ({ keyword }: { keyword: string }) =>\n `Unexpected keyword '${keyword}'.`,\n UnexpectedLeadingDecorator:\n \"Leading decorators must be attached to a class declaration.\",\n UnexpectedLexicalDeclaration:\n \"Lexical declaration cannot appear in a single-statement context.\",\n UnexpectedNewTarget:\n \"`new.target` can only be used in functions or class properties.\",\n UnexpectedNumericSeparator:\n \"A numeric separator is only allowed between two digits.\",\n UnexpectedPrivateField: \"Unexpected private name.\",\n UnexpectedReservedWord: ({ reservedWord }: { reservedWord: string }) =>\n `Unexpected reserved word '${reservedWord}'.`,\n UnexpectedSuper: \"'super' is only allowed in object methods and classes.\",\n UnexpectedToken: ({\n expected,\n unexpected,\n }: {\n expected?: string | null;\n unexpected?: string | null;\n }) =>\n `Unexpected token${unexpected ? ` '${unexpected}'.` : \"\"}${\n expected ? `, expected \"${expected}\"` : \"\"\n }`,\n UnexpectedTokenUnaryExponentiation:\n \"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.\",\n UnexpectedUsingDeclaration:\n \"Using declaration cannot appear in the top level when source type is `script`.\",\n UnsupportedBind: \"Binding should be performed on object property.\",\n UnsupportedDecoratorExport:\n \"A decorated export must export a class declaration.\",\n UnsupportedDefaultExport:\n \"Only expressions, functions or classes are allowed as the `default` export.\",\n UnsupportedImport:\n \"`import` can only be used in `import()` or `import.meta`.\",\n UnsupportedMetaProperty: ({\n target,\n onlyValidPropertyName,\n }: {\n target: string;\n onlyValidPropertyName: string;\n }) =>\n `The only valid meta property for ${target} is ${target}.${onlyValidPropertyName}.`,\n UnsupportedParameterDecorator:\n \"Decorators cannot be used to decorate parameters.\",\n UnsupportedPropertyDecorator:\n \"Decorators cannot be used to decorate object literal properties.\",\n UnsupportedSuper:\n \"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).\",\n UnterminatedComment: \"Unterminated comment.\",\n UnterminatedRegExp: \"Unterminated regular expression.\",\n UnterminatedString: \"Unterminated string constant.\",\n UnterminatedTemplate: \"Unterminated template.\",\n UsingDeclarationExport: \"Using declaration cannot be exported.\",\n UsingDeclarationHasBindingPattern:\n \"Using declaration cannot have destructuring patterns.\",\n VarRedeclaration: ({ identifierName }: { identifierName: string }) =>\n `Identifier '${identifierName}' has already been declared.`,\n YieldBindingIdentifier:\n \"Can not use 'yield' as identifier inside a generator.\",\n YieldInParameter: \"Yield expression is not allowed in formal parameters.\",\n ZeroDigitNumericSeparator:\n \"Numeric separator can not be used after leading 0.\",\n} satisfies ParseErrorTemplates;\n","import type { ParseErrorTemplates } from \"../parse-error\";\n\nexport default {\n StrictDelete: \"Deleting local variable in strict mode.\",\n\n // `referenceName` is the StringValue[1] of an IdentifierReference[2], which\n // is represented as just an `Identifier`[3] in the Babel AST.\n // 1. https://tc39.es/ecma262/#sec-static-semantics-stringvalue\n // 2. https://tc39.es/ecma262/#prod-IdentifierReference\n // 3. https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#identifier\n StrictEvalArguments: ({ referenceName }: { referenceName: string }) =>\n `Assigning to '${referenceName}' in strict mode.`,\n\n // `bindingName` is the StringValue[1] of a BindingIdentifier[2], which is\n // represented as just an `Identifier`[3] in the Babel AST.\n // 1. https://tc39.es/ecma262/#sec-static-semantics-stringvalue\n // 2. https://tc39.es/ecma262/#prod-BindingIdentifier\n // 3. https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#identifier\n StrictEvalArgumentsBinding: ({ bindingName }: { bindingName: string }) =>\n `Binding '${bindingName}' in strict mode.`,\n\n StrictFunction:\n \"In strict mode code, functions can only be declared at top level or inside a block.\",\n\n StrictNumericEscape: \"The only valid numeric escape in strict mode is '\\\\0'.\",\n\n StrictOctalLiteral: \"Legacy octal literals are not allowed in strict mode.\",\n\n StrictWith: \"'with' in strict mode.\",\n} satisfies ParseErrorTemplates;\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\nimport toNodeDescription from \"./to-node-description.ts\";\n\nexport const UnparenthesizedPipeBodyDescriptions = new Set([\n \"ArrowFunctionExpression\",\n \"AssignmentExpression\",\n \"ConditionalExpression\",\n \"YieldExpression\",\n] as const);\n\ntype GetSetMemberType> =\n T extends Set ? M : unknown;\n\nexport type UnparenthesizedPipeBodyTypes = GetSetMemberType<\n typeof UnparenthesizedPipeBodyDescriptions\n>;\n\nexport default {\n // This error is only used by the smart-mix proposal\n PipeBodyIsTighter:\n \"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.\",\n PipeTopicRequiresHackPipes: process.env.BABEL_8_BREAKING\n ? 'Topic references are only supported when using the `\"proposal\": \"hack\"` version of the pipeline proposal.'\n : 'Topic reference is used, but the pipelineOperator plugin was not passed a \"proposal\": \"hack\" or \"smart\" option.',\n PipeTopicUnbound:\n \"Topic reference is unbound; it must be inside a pipe body.\",\n PipeTopicUnconfiguredToken: ({ token }: { token: string }) =>\n `Invalid topic token ${token}. In order to use ${token} as a topic reference, the pipelineOperator plugin must be configured with { \"proposal\": \"hack\", \"topicToken\": \"${token}\" }.`,\n PipeTopicUnused:\n \"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.\",\n PipeUnparenthesizedBody: ({ type }: { type: UnparenthesizedPipeBodyTypes }) =>\n `Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({\n type,\n })}; please wrap it in parentheses.`,\n\n ...(process.env.BABEL_8_BREAKING\n ? {}\n : {\n // Messages whose codes start with “Pipeline” or “PrimaryTopic”\n // are retained for backwards compatibility\n // with the deprecated smart-mix pipe operator proposal plugin.\n // They are subject to removal in a future major version.\n PipelineBodyNoArrow:\n 'Unexpected arrow \"=>\" after pipeline body; arrow function in pipeline body must be parenthesized.',\n PipelineBodySequenceExpression:\n \"Pipeline body may not be a comma-separated sequence expression.\",\n PipelineHeadSequenceExpression:\n \"Pipeline head should not be a comma-separated sequence expression.\",\n PipelineTopicUnused:\n \"Pipeline is in topic style but does not use topic reference.\",\n PrimaryTopicNotAllowed:\n \"Topic reference was used in a lexical context without topic binding.\",\n PrimaryTopicRequiresSmartPipeline:\n 'Topic reference is used, but the pipelineOperator plugin was not passed a \"proposal\": \"hack\" or \"smart\" option.',\n }),\n} satisfies ParseErrorTemplates;\n","import { Position } from \"./util/location.ts\";\n\ntype SyntaxPlugin =\n | \"flow\"\n | \"typescript\"\n | \"jsx\"\n | \"pipelineOperator\"\n | \"placeholders\";\n\ntype ParseErrorCode =\n | \"BABEL_PARSER_SYNTAX_ERROR\"\n | \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\";\n\n// Babel uses \"normal\" SyntaxErrors for it's errors, but adds some extra\n// functionality. This functionality is defined in the\n// `ParseErrorSpecification` interface below. We may choose to change to someday\n// give our errors their own full-blown class, but until then this allow us to\n// keep all the desirable properties of SyntaxErrors (like their name in stack\n// traces, etc.), and also allows us to punt on any publicly facing\n// class-hierarchy decisions until Babel 8.\ninterface ParseErrorSpecification {\n // Look, these *could* be readonly, but then Flow complains when we initially\n // set them. We could do a whole dance and make a special interface that's not\n // readonly for when we create the error, then cast it to the readonly\n // interface for public use, but the previous implementation didn't have them\n // as readonly, so let's just not worry about it for now.\n code: ParseErrorCode;\n reasonCode: string;\n syntaxPlugin?: SyntaxPlugin;\n missingPlugin?: string | string[];\n loc: Position;\n details: ErrorDetails;\n\n // We should consider removing this as it now just contains the same\n // information as `loc.index`.\n pos: number;\n}\n\nexport type ParseError = SyntaxError &\n ParseErrorSpecification;\n\n// By `ParseErrorConstructor`, we mean something like the new-less style\n// `ErrorConstructor`[1], since `ParseError`'s are not themselves actually\n// separate classes from `SyntaxError`'s.\n//\n// 1. https://github.com/microsoft/TypeScript/blob/v4.5.5/lib/lib.es5.d.ts#L1027\nexport type ParseErrorConstructor = (\n loc: Position,\n details: ErrorDetails,\n) => ParseError;\n\ntype ToMessage = (self: ErrorDetails) => string;\n\ntype ParseErrorCredentials = {\n code: string;\n reasonCode: string;\n syntaxPlugin?: SyntaxPlugin;\n toMessage: ToMessage;\n};\n\nfunction defineHidden(obj: object, key: string, value: unknown) {\n Object.defineProperty(obj, key, {\n enumerable: false,\n configurable: true,\n value,\n });\n}\n\nfunction toParseErrorConstructor({\n toMessage,\n code,\n reasonCode,\n syntaxPlugin,\n}: ParseErrorCredentials): ParseErrorConstructor {\n const hasMissingPlugin =\n reasonCode === \"MissingPlugin\" || reasonCode === \"MissingOneOfPlugins\";\n\n if (!process.env.BABEL_8_BREAKING) {\n const oldReasonCodes: Record = {\n AccessorCannotDeclareThisParameter: \"AccesorCannotDeclareThisParameter\",\n AccessorCannotHaveTypeParameters: \"AccesorCannotHaveTypeParameters\",\n ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:\n \"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference\",\n SetAccessorCannotHaveOptionalParameter:\n \"SetAccesorCannotHaveOptionalParameter\",\n SetAccessorCannotHaveRestParameter: \"SetAccesorCannotHaveRestParameter\",\n SetAccessorCannotHaveReturnType: \"SetAccesorCannotHaveReturnType\",\n };\n if (oldReasonCodes[reasonCode]) {\n reasonCode = oldReasonCodes[reasonCode];\n }\n }\n\n return function constructor(loc: Position, details: ErrorDetails) {\n const error: ParseError = new SyntaxError() as any;\n\n error.code = code as ParseErrorCode;\n error.reasonCode = reasonCode;\n error.loc = loc;\n error.pos = loc.index;\n\n error.syntaxPlugin = syntaxPlugin;\n if (hasMissingPlugin) {\n error.missingPlugin = (details as any).missingPlugin;\n }\n\n type Overrides = {\n loc?: Position;\n details?: ErrorDetails;\n };\n defineHidden(error, \"clone\", function clone(overrides: Overrides = {}) {\n const { line, column, index } = overrides.loc ?? loc;\n return constructor(new Position(line, column, index), {\n ...details,\n ...overrides.details,\n });\n });\n\n defineHidden(error, \"details\", details);\n\n Object.defineProperty(error, \"message\", {\n configurable: true,\n get(this: ParseError): string {\n const message = `${toMessage(details)} (${loc.line}:${loc.column})`;\n this.message = message;\n return message;\n },\n set(value: string) {\n Object.defineProperty(this, \"message\", { value, writable: true });\n },\n });\n\n return error;\n };\n}\n\ntype ParseErrorTemplate =\n | string\n | ToMessage\n | { message: string | ToMessage; code?: ParseErrorCode };\n\nexport type ParseErrorTemplates = { [reasonCode: string]: ParseErrorTemplate };\n\n// This is the templated form of `ParseErrorEnum`.\n//\n// Note: We could factor out the return type calculation into something like\n// `ParseErrorConstructor`, and then we could\n// reuse it in the non-templated form of `ParseErrorEnum`, but TypeScript\n// doesn't seem to drill down that far when showing you the computed type of\n// an object in an editor, so we'll leave it inlined for now.\nexport function ParseErrorEnum(a: TemplateStringsArray): <\n T extends ParseErrorTemplates,\n>(\n parseErrorTemplates: T,\n) => {\n [K in keyof T]: ParseErrorConstructor<\n T[K] extends { message: string | ToMessage }\n ? T[K][\"message\"] extends ToMessage\n ? Parameters[0]\n : object\n : T[K] extends ToMessage\n ? Parameters[0]\n : object\n >;\n};\n\nexport function ParseErrorEnum(\n parseErrorTemplates: T,\n syntaxPlugin?: SyntaxPlugin,\n): {\n [K in keyof T]: ParseErrorConstructor<\n T[K] extends { message: string | ToMessage }\n ? T[K][\"message\"] extends ToMessage\n ? Parameters[0]\n : object\n : T[K] extends ToMessage\n ? Parameters[0]\n : object\n >;\n};\n\n// You call `ParseErrorEnum` with a mapping from `ReasonCode`'s to either:\n//\n// 1. a static error message,\n// 2. `toMessage` functions that define additional necessary `details` needed by\n// the `ParseError`, or\n// 3. Objects that contain a `message` of one of the above and overridden `code`\n// and/or `reasonCode`:\n//\n// ParseErrorEnum `optionalSyntaxPlugin` ({\n// ErrorWithStaticMessage: \"message\",\n// ErrorWithDynamicMessage: ({ type } : { type: string }) => `${type}`),\n// ErrorWithOverriddenCodeAndOrReasonCode: {\n// message: ({ type }: { type: string }) => `${type}`),\n// code: \"AN_ERROR_CODE\",\n// ...(BABEL_8_BREAKING ? { } : { reasonCode: \"CustomErrorReasonCode\" })\n// }\n// });\n//\nexport function ParseErrorEnum(\n argument: TemplateStringsArray | ParseErrorTemplates,\n syntaxPlugin?: SyntaxPlugin,\n) {\n // If the first parameter is an array, that means we were called with a tagged\n // template literal. Extract the syntaxPlugin from this, and call again in\n // the \"normalized\" form.\n if (Array.isArray(argument)) {\n return (parseErrorTemplates: ParseErrorTemplates) =>\n ParseErrorEnum(parseErrorTemplates, argument[0]);\n }\n\n const ParseErrorConstructors = {} as Record<\n string,\n ParseErrorConstructor\n >;\n\n for (const reasonCode of Object.keys(argument)) {\n const template = (argument as ParseErrorTemplates)[reasonCode];\n const { message, ...rest } =\n typeof template === \"string\"\n ? { message: () => template }\n : typeof template === \"function\"\n ? { message: template }\n : template;\n const toMessage = typeof message === \"string\" ? () => message : message;\n\n ParseErrorConstructors[reasonCode] = toParseErrorConstructor({\n code: \"BABEL_PARSER_SYNTAX_ERROR\",\n reasonCode,\n toMessage,\n ...(syntaxPlugin ? { syntaxPlugin } : {}),\n ...rest,\n });\n }\n\n return ParseErrorConstructors;\n}\n\nimport ModuleErrors from \"./parse-error/module-errors.ts\";\nimport StandardErrors from \"./parse-error/standard-errors.ts\";\nimport StrictModeErrors from \"./parse-error/strict-mode-errors.ts\";\nimport PipelineOperatorErrors from \"./parse-error/pipeline-operator-errors.ts\";\n\nexport const Errors = {\n ...ParseErrorEnum(ModuleErrors),\n ...ParseErrorEnum(StandardErrors),\n ...ParseErrorEnum(StrictModeErrors),\n ...ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors),\n};\n\nexport type { LValAncestor } from \"./parse-error/standard-errors.ts\";\n","import type { PluginList } from \"./plugin-utils.ts\";\n\n// A second optional argument can be given to further configure\n// the parser process. These options are recognized:\n\nexport type SourceType = \"script\" | \"module\" | \"unambiguous\";\n\nexport interface Options {\n sourceType?: SourceType;\n sourceFilename?: string;\n startIndex?: number;\n startColumn?: number;\n startLine?: number;\n allowAwaitOutsideFunction?: boolean;\n allowReturnOutsideFunction?: boolean;\n allowNewTargetOutsideFunction?: boolean;\n allowImportExportEverywhere?: boolean;\n allowSuperOutsideMethod?: boolean;\n allowUndeclaredExports?: boolean;\n plugins?: PluginList;\n strictMode?: boolean | undefined | null;\n ranges?: boolean;\n tokens?: boolean;\n createImportExpressions?: boolean;\n createParenthesizedExpressions?: boolean;\n errorRecovery?: boolean;\n attachComment?: boolean;\n annexB?: boolean;\n}\n\nexport const enum OptionFlags {\n AllowAwaitOutsideFunction = 1 << 0,\n AllowReturnOutsideFunction = 1 << 1,\n AllowNewTargetOutsideFunction = 1 << 2,\n AllowImportExportEverywhere = 1 << 3,\n AllowSuperOutsideMethod = 1 << 4,\n AllowUndeclaredExports = 1 << 5,\n Ranges = 1 << 6,\n Tokens = 1 << 7,\n CreateImportExpressions = 1 << 8,\n CreateParenthesizedExpressions = 1 << 9,\n ErrorRecovery = 1 << 10,\n AttachComment = 1 << 11,\n AnnexB = 1 << 12,\n}\n\ntype OptionsWithDefaults = { [P in keyof Options]-?: Options[P] };\n\nfunction createDefaultOptions(): OptionsWithDefaults {\n return {\n // Source type (\"script\" or \"module\") for different semantics\n sourceType: \"script\",\n // Source filename.\n sourceFilename: undefined,\n // Index (0-based) from which to start counting source. Useful for\n // integration with other tools.\n startIndex: 0,\n // Column (0-based) from which to start counting source. Useful for\n // integration with other tools.\n startColumn: 0,\n // Line (1-based) from which to start counting source. Useful for\n // integration with other tools.\n startLine: 1,\n // When enabled, await at the top level is not considered an\n // error.\n allowAwaitOutsideFunction: false,\n // When enabled, a return at the top level is not considered an\n // error.\n allowReturnOutsideFunction: false,\n // When enabled, new.target outside a function or class is not\n // considered an error.\n allowNewTargetOutsideFunction: false,\n // When enabled, import/export statements are not constrained to\n // appearing at the top of the program.\n allowImportExportEverywhere: false,\n // TODO\n allowSuperOutsideMethod: false,\n // When enabled, export statements can reference undeclared variables.\n allowUndeclaredExports: false,\n // An array of plugins to enable\n plugins: [],\n // TODO\n strictMode: null,\n // Nodes have their start and end characters offsets recorded in\n // `start` and `end` properties (directly on the node, rather than\n // the `loc` object, which holds line/column data. To also add a\n // [semi-standardized][range] `range` property holding a `[start,\n // end]` array with the same numbers, set the `ranges` option to\n // `true`.\n //\n // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678\n ranges: false,\n // Adds all parsed tokens to a `tokens` property on the `File` node\n tokens: false,\n // Whether to create ImportExpression AST nodes (if false\n // `import(foo)` will be parsed as CallExpression(Import, [Identifier(foo)])\n createImportExpressions: process.env.BABEL_8_BREAKING ? true : false,\n // Whether to create ParenthesizedExpression AST nodes (if false\n // the parser sets extra.parenthesized on the expression nodes instead).\n createParenthesizedExpressions: false,\n // When enabled, errors are attached to the AST instead of being directly thrown.\n // Some errors will still throw, because @babel/parser can't always recover.\n errorRecovery: false,\n // When enabled, comments will be attached to adjacent AST nodes as one of\n // `leadingComments`, `trailingComments` and `innerComments`. The comment attachment\n // is vital to preserve comments after transform. If you don't print AST back,\n // consider set this option to `false` for performance\n attachComment: true,\n // When enabled, the parser will support Annex B syntax.\n // https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers\n annexB: true,\n };\n}\n\n// Interpret and default an options object\n\nexport function getOptions(opts?: Options | null): OptionsWithDefaults {\n // https://github.com/babel/babel/pull/16918\n // `options` is accessed frequently, please make sure it is a fast object.\n // `%ToFastProperties` can make it a fast object, but the performance is the same as the slow object.\n const options: any = createDefaultOptions();\n\n if (opts == null) {\n return options;\n }\n if (opts.annexB != null && opts.annexB !== false) {\n throw new Error(\"The `annexB` option can only be set to `false`.\");\n }\n\n for (const key of Object.keys(options) as (keyof Options)[]) {\n if (opts[key] != null) options[key] = opts[key];\n }\n\n if (options.startLine === 1) {\n if (opts.startIndex == null && options.startColumn > 0) {\n options.startIndex = options.startColumn;\n } else if (opts.startColumn == null && options.startIndex > 0) {\n options.startColumn = options.startIndex;\n }\n } else if (opts.startColumn == null || opts.startIndex == null) {\n if (opts.startIndex != null || process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"With a `startLine > 1` you must also specify `startIndex` and `startColumn`.\",\n );\n }\n }\n\n return options;\n}\n","import type { TokenType } from \"../tokenizer/types.ts\";\nimport type Parser from \"../parser/index.ts\";\nimport type { ExpressionErrors } from \"../parser/util.ts\";\nimport type * as N from \"../types.ts\";\nimport type { Node as NodeType, NodeBase, File } from \"../types.ts\";\nimport type { Position } from \"../util/location.ts\";\nimport { Errors } from \"../parse-error.ts\";\nimport type { Undone } from \"../parser/node.ts\";\nimport type { BindingFlag } from \"../util/scopeflags.ts\";\nimport { OptionFlags } from \"../options.ts\";\n\nconst { defineProperty } = Object;\nconst toUnenumerable = (object: any, key: string) => {\n if (object) {\n defineProperty(object, key, { enumerable: false, value: object[key] });\n }\n};\n\nfunction toESTreeLocation(node: any) {\n toUnenumerable(node.loc.start, \"index\");\n toUnenumerable(node.loc.end, \"index\");\n\n return node;\n}\n\nexport default (superClass: typeof Parser) =>\n class ESTreeParserMixin extends superClass implements Parser {\n parse(): File {\n const file = toESTreeLocation(super.parse());\n\n if (this.optionFlags & OptionFlags.Tokens) {\n file.tokens = file.tokens.map(toESTreeLocation);\n }\n\n return file;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseRegExpLiteral({ pattern, flags }): N.EstreeRegExpLiteral {\n let regex: RegExp | null = null;\n try {\n regex = new RegExp(pattern, flags);\n } catch (_) {\n // In environments that don't support these flags value will\n // be null as the regex can't be represented natively.\n }\n const node = this.estreeParseLiteral(regex);\n node.regex = { pattern, flags };\n\n return node;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseBigIntLiteral(value: any): N.Node {\n // https://github.com/estree/estree/blob/master/es2020.md#bigintliteral\n let bigInt: bigint | null;\n try {\n bigInt = BigInt(value);\n } catch {\n bigInt = null;\n }\n const node = this.estreeParseLiteral(bigInt);\n node.bigint = String(node.value || value);\n\n return node;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseDecimalLiteral(value: any): N.Node {\n // https://github.com/estree/estree/blob/master/experimental/decimal.md\n // todo: use BigDecimal when node supports it.\n const decimal: null = null;\n const node = this.estreeParseLiteral(decimal);\n node.decimal = String(node.value || value);\n\n return node;\n }\n\n estreeParseLiteral(value: any) {\n // @ts-expect-error ESTree plugin changes node types\n return this.parseLiteral(value, \"Literal\");\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseStringLiteral(value: any): N.Node {\n return this.estreeParseLiteral(value);\n }\n\n parseNumericLiteral(value: any): any {\n return this.estreeParseLiteral(value);\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseNullLiteral(): N.Node {\n return this.estreeParseLiteral(null);\n }\n\n parseBooleanLiteral(value: boolean): N.BooleanLiteral {\n // @ts-expect-error ESTree plugin changes node types\n return this.estreeParseLiteral(value);\n }\n\n // Cast a Directive to an ExpressionStatement. Mutates the input Directive.\n directiveToStmt(directive: N.Directive): N.ExpressionStatement {\n const expression = directive.value as any as N.EstreeLiteral;\n delete directive.value;\n\n expression.type = \"Literal\";\n // @ts-expect-error N.EstreeLiteral.raw is not defined.\n expression.raw = expression.extra.raw;\n expression.value = expression.extra.expressionValue;\n\n const stmt = directive as any as N.ExpressionStatement;\n stmt.type = \"ExpressionStatement\";\n stmt.expression = expression;\n // @ts-expect-error N.ExpressionStatement.directive is not defined\n stmt.directive = expression.extra.rawValue;\n\n delete expression.extra;\n\n return stmt;\n }\n\n // ==================================\n // Overrides\n // ==================================\n\n initFunction(node: N.BodilessFunctionOrMethodBase, isAsync: boolean): void {\n super.initFunction(node, isAsync);\n node.expression = false;\n }\n\n checkDeclaration(node: N.Pattern | N.ObjectProperty): void {\n if (node != null && this.isObjectProperty(node)) {\n // @ts-expect-error plugin typings\n this.checkDeclaration((node as unknown as N.EstreeProperty).value);\n } else {\n super.checkDeclaration(node);\n }\n }\n\n getObjectOrClassMethodParams(method: N.ObjectMethod | N.ClassMethod) {\n return (method as unknown as N.EstreeMethodDefinition).value.params;\n }\n\n isValidDirective(stmt: N.Statement): boolean {\n return (\n stmt.type === \"ExpressionStatement\" &&\n stmt.expression.type === \"Literal\" &&\n typeof stmt.expression.value === \"string\" &&\n !stmt.expression.extra?.parenthesized\n );\n }\n\n parseBlockBody(\n node: N.BlockStatementLike,\n allowDirectives: boolean | undefined | null,\n topLevel: boolean,\n end: TokenType,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n ): void {\n super.parseBlockBody(\n node,\n allowDirectives,\n topLevel,\n end,\n afterBlockParse,\n );\n\n const directiveStatements = node.directives.map(d =>\n this.directiveToStmt(d),\n );\n // @ts-expect-error estree plugin typings\n node.body = directiveStatements.concat(node.body);\n delete node.directives;\n }\n\n parsePrivateName(): any {\n const node = super.parsePrivateName();\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return node;\n }\n }\n return this.convertPrivateNameToPrivateIdentifier(node);\n }\n\n convertPrivateNameToPrivateIdentifier(\n node: N.PrivateName,\n ): N.EstreePrivateIdentifier {\n const name = super.getPrivateNameSV(node);\n node = node as any;\n delete node.id;\n // @ts-expect-error mutate AST types\n node.name = name;\n // @ts-expect-error mutate AST types\n node.type = \"PrivateIdentifier\";\n return node as unknown as N.EstreePrivateIdentifier;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n isPrivateName(node: N.Node): node is N.EstreePrivateIdentifier {\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return super.isPrivateName(node);\n }\n }\n return node.type === \"PrivateIdentifier\";\n }\n\n // @ts-expect-error ESTree plugin changes node types\n getPrivateNameSV(node: N.EstreePrivateIdentifier): string {\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return super.getPrivateNameSV(node as unknown as N.PrivateName);\n }\n }\n return node.name;\n }\n\n // @ts-expect-error plugin may override interfaces\n parseLiteral(value: any, type: T[\"type\"]): T {\n const node = super.parseLiteral(value, type);\n // @ts-expect-error mutating AST types\n node.raw = node.extra.raw;\n delete node.extra;\n\n return node;\n }\n\n parseFunctionBody(\n node: N.Function,\n allowExpression?: boolean | null,\n isMethod: boolean = false,\n ): void {\n super.parseFunctionBody(node, allowExpression, isMethod);\n node.expression = node.body.type !== \"BlockStatement\";\n }\n\n // @ts-expect-error plugin may override interfaces\n parseMethod<\n T extends N.ClassPrivateMethod | N.ObjectMethod | N.ClassMethod,\n >(\n node: Undone,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowDirectSuper: boolean,\n type: T[\"type\"],\n inClassScope: boolean = false,\n ): N.EstreeMethodDefinition | N.EstreeTSAbstractMethodDefinition {\n let funcNode = this.startNode();\n funcNode.kind = node.kind; // provide kind, so super method correctly sets state\n funcNode = super.parseMethod(\n // @ts-expect-error todo(flow->ts)\n funcNode,\n isGenerator,\n isAsync,\n isConstructor,\n allowDirectSuper,\n type,\n inClassScope,\n );\n // @ts-expect-error mutate AST types\n funcNode.type = \"FunctionExpression\";\n delete funcNode.kind;\n // @ts-expect-error mutate AST types\n node.value = funcNode;\n const { typeParameters } = node;\n if (typeParameters) {\n delete node.typeParameters;\n funcNode.typeParameters = typeParameters;\n this.resetStartLocationFromNode(funcNode, typeParameters);\n }\n if (type === \"ClassPrivateMethod\") {\n node.computed = false;\n }\n if (process.env.BABEL_8_BREAKING && this.hasPlugin(\"typescript\")) {\n if (!funcNode.body) {\n (funcNode as unknown as N.EstreeTSEmptyBodyFunctionExpression).type =\n \"TSEmptyBodyFunctionExpression\";\n }\n // @ts-expect-error todo(flow->ts) property not defined for all types in union\n if (node.abstract) {\n return this.finishNode(\n // @ts-expect-error cast methods to estree types\n node as Undone,\n \"TSAbstractMethodDefinition\",\n );\n }\n }\n return this.finishNode(\n // @ts-expect-error cast methods to estree types\n node as Undone,\n \"MethodDefinition\",\n );\n }\n\n nameIsConstructor(key: N.Expression | N.PrivateName): boolean {\n if (key.type === \"Literal\") return key.value === \"constructor\";\n return super.nameIsConstructor(key);\n }\n\n parseClassProperty(...args: [N.ClassProperty]): any {\n const propertyNode = super.parseClassProperty(...args);\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return propertyNode as unknown as N.EstreePropertyDefinition;\n }\n }\n if (\n process.env.BABEL_8_BREAKING &&\n propertyNode.abstract &&\n this.hasPlugin(\"typescript\")\n ) {\n (propertyNode as unknown as N.EstreeTSAbstractPropertyDefinition).type =\n \"TSAbstractPropertyDefinition\";\n } else {\n (propertyNode as unknown as N.EstreePropertyDefinition).type =\n \"PropertyDefinition\";\n }\n return propertyNode;\n }\n\n parseClassPrivateProperty(...args: [N.ClassPrivateProperty]): any {\n const propertyNode = super.parseClassPrivateProperty(...args);\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return propertyNode as unknown as N.EstreePropertyDefinition;\n }\n }\n if (\n process.env.BABEL_8_BREAKING &&\n propertyNode.abstract &&\n this.hasPlugin(\"typescript\")\n ) {\n (propertyNode as unknown as N.EstreeTSAbstractPropertyDefinition).type =\n \"TSAbstractPropertyDefinition\";\n } else {\n (propertyNode as unknown as N.EstreePropertyDefinition).type =\n \"PropertyDefinition\";\n }\n propertyNode.computed = false;\n return propertyNode;\n }\n\n parseObjectMethod(\n prop: N.ObjectMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n ): N.ObjectMethod | undefined | null {\n const node: N.EstreeProperty = super.parseObjectMethod(\n prop,\n isGenerator,\n isAsync,\n isPattern,\n isAccessor,\n ) as any;\n\n if (node) {\n node.type = \"Property\";\n if ((node as any as N.ClassMethod).kind === \"method\") {\n node.kind = \"init\";\n }\n node.shorthand = false;\n }\n\n return node as any;\n }\n\n parseObjectProperty(\n prop: N.ObjectProperty,\n startLoc: Position | undefined | null,\n isPattern: boolean,\n refExpressionErrors?: ExpressionErrors | null,\n ): N.ObjectProperty | undefined | null {\n const node: N.EstreeProperty = super.parseObjectProperty(\n prop,\n startLoc,\n isPattern,\n refExpressionErrors,\n ) as any;\n\n if (node) {\n node.kind = \"init\";\n node.type = \"Property\";\n }\n\n return node as any;\n }\n\n isValidLVal(\n type: string,\n isUnparenthesizedInAssign: boolean,\n binding: BindingFlag,\n ) {\n return type === \"Property\"\n ? \"value\"\n : super.isValidLVal(type, isUnparenthesizedInAssign, binding);\n }\n\n isAssignable(node: N.Node, isBinding?: boolean): boolean {\n if (node != null && this.isObjectProperty(node)) {\n return this.isAssignable(node.value, isBinding);\n }\n return super.isAssignable(node, isBinding);\n }\n\n toAssignable(node: N.Node, isLHS: boolean = false): void {\n if (node != null && this.isObjectProperty(node)) {\n const { key, value } = node;\n if (this.isPrivateName(key)) {\n this.classScope.usePrivateName(\n this.getPrivateNameSV(key),\n key.loc.start,\n );\n }\n this.toAssignable(value, isLHS);\n } else {\n super.toAssignable(node, isLHS);\n }\n }\n\n toAssignableObjectExpressionProp(\n prop: N.Node,\n isLast: boolean,\n isLHS: boolean,\n ) {\n if (\n prop.type === \"Property\" &&\n (prop.kind === \"get\" || prop.kind === \"set\")\n ) {\n this.raise(Errors.PatternHasAccessor, prop.key);\n } else if (prop.type === \"Property\" && prop.method) {\n this.raise(Errors.PatternHasMethod, prop.key);\n } else {\n super.toAssignableObjectExpressionProp(prop, isLast, isLHS);\n }\n }\n\n finishCallExpression(\n unfinished: Undone,\n optional: boolean,\n ): T {\n const node = super.finishCallExpression(unfinished, optional);\n\n if (node.callee.type === \"Import\") {\n (node as N.Node as N.EstreeImportExpression).type = \"ImportExpression\";\n (node as N.Node as N.EstreeImportExpression).source = node\n .arguments[0] as N.Expression;\n (node as N.Node as N.EstreeImportExpression).options =\n (node.arguments[1] as N.Expression) ?? null;\n // compatibility with previous ESTree AST\n // TODO(Babel 8): Remove this\n (node as N.Node as N.EstreeImportExpression).attributes =\n (node.arguments[1] as N.Expression) ?? null;\n // arguments isn't optional in the type definition\n delete node.arguments;\n // callee isn't optional in the type definition\n delete node.callee;\n }\n\n return node;\n }\n\n toReferencedArguments(\n node:\n | N.CallExpression\n | N.OptionalCallExpression\n | N.EstreeImportExpression,\n /* isParenthesizedExpr?: boolean, */\n ) {\n // ImportExpressions do not have an arguments array.\n if (node.type === \"ImportExpression\") {\n return;\n }\n\n super.toReferencedArguments(node);\n }\n\n parseExport(\n unfinished: Undone,\n decorators: N.Decorator[] | null,\n ) {\n const exportStartLoc = this.state.lastTokStartLoc;\n const node = super.parseExport(unfinished, decorators);\n\n switch (node.type) {\n case \"ExportAllDeclaration\":\n // @ts-expect-error mutating AST types\n node.exported = null;\n break;\n\n case \"ExportNamedDeclaration\":\n if (\n node.specifiers.length === 1 &&\n node.specifiers[0].type === \"ExportNamespaceSpecifier\"\n ) {\n // @ts-expect-error mutating AST types\n node.type = \"ExportAllDeclaration\";\n // @ts-expect-error mutating AST types\n node.exported = node.specifiers[0].exported;\n delete node.specifiers;\n }\n\n // fallthrough\n case \"ExportDefaultDeclaration\":\n {\n const { declaration } = node;\n if (\n declaration?.type === \"ClassDeclaration\" &&\n declaration.decorators?.length > 0 &&\n // decorator comes before export\n declaration.start === node.start\n ) {\n this.resetStartLocation(\n node,\n // For compatibility with ESLint's keyword-spacing rule, which assumes that an\n // export declaration must start with export.\n // https://github.com/babel/babel/issues/15085\n // Here we reset export declaration's start to be the start of the export token\n exportStartLoc,\n );\n }\n }\n\n break;\n }\n\n return node;\n }\n\n parseSubscript(\n base: N.Expression,\n startLoc: Position,\n noCalls: boolean | undefined | null,\n state: N.ParseSubscriptState,\n ): N.Expression {\n const node = super.parseSubscript(base, startLoc, noCalls, state);\n\n if (state.optionalChainMember) {\n // https://github.com/estree/estree/blob/master/es2020.md#chainexpression\n if (\n node.type === \"OptionalMemberExpression\" ||\n node.type === \"OptionalCallExpression\"\n ) {\n // strip Optional prefix\n (node as unknown as N.CallExpression | N.MemberExpression).type =\n node.type.substring(8) as \"CallExpression\" | \"MemberExpression\";\n }\n if (state.stop) {\n const chain = this.startNodeAtNode(node);\n chain.expression = node;\n return this.finishNode(chain, \"ChainExpression\");\n }\n } else if (\n node.type === \"MemberExpression\" ||\n node.type === \"CallExpression\"\n ) {\n // @ts-expect-error not in the type definitions\n node.optional = false;\n }\n\n return node;\n }\n\n isOptionalMemberExpression(node: N.Node) {\n if (node.type === \"ChainExpression\") {\n return node.expression.type === \"MemberExpression\";\n }\n return super.isOptionalMemberExpression(node);\n }\n\n hasPropertyAsPrivateName(node: N.Node): boolean {\n if (node.type === \"ChainExpression\") {\n node = node.expression;\n }\n return super.hasPropertyAsPrivateName(node);\n }\n\n // @ts-expect-error ESTree plugin changes node types\n isObjectProperty(node: N.Node): node is N.EstreeProperty {\n return node.type === \"Property\" && node.kind === \"init\" && !node.method;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n isObjectMethod(node: N.Node): node is N.EstreeProperty {\n return (\n node.type === \"Property\" &&\n (node.method || node.kind === \"get\" || node.kind === \"set\")\n );\n }\n\n finishNodeAt(\n node: Undone,\n type: T[\"type\"],\n endLoc: Position,\n ): T {\n return toESTreeLocation(super.finishNodeAt(node, type, endLoc));\n }\n\n resetStartLocation(node: N.Node, startLoc: Position) {\n super.resetStartLocation(node, startLoc);\n toESTreeLocation(node);\n }\n\n resetEndLocation(\n node: NodeBase,\n endLoc: Position = this.state.lastTokEndLoc,\n ): void {\n super.resetEndLocation(node, endLoc);\n toESTreeLocation(node);\n }\n };\n","// The token context is used in JSX plugin to track\n// jsx tag / jsx text / normal JavaScript expression\n\nexport class TokContext {\n constructor(token: string, preserveSpace?: boolean) {\n this.token = token;\n this.preserveSpace = !!preserveSpace;\n }\n\n token: string;\n preserveSpace: boolean;\n}\n\nconst types: {\n [key: string]: TokContext;\n} = {\n brace: new TokContext(\"{\"), // normal JavaScript expression\n j_oTag: new TokContext(\"...\", true), // JSX expressions\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n types.template = new TokContext(\"`\", true);\n}\n\nexport { types };\n","import { types as tc, type TokContext } from \"./context.ts\";\n// ## Token types\n\n// The assignment of fine-grained, information-carrying type objects\n// allows the tokenizer to store the information it has about a\n// token in a way that is very cheap for the parser to look up.\n\n// All token type variables start with an underscore, to make them\n// easy to recognize.\n\n// The `beforeExpr` property is used to disambiguate between 1) binary\n// expression (<) and JSX Tag start (); 2) object literal and JSX\n// texts. It is set on the `updateContext` function in the JSX plugin.\n\n// The `startsExpr` property is used to determine whether an expression\n// may be the “argument” subexpression of a `yield` expression or\n// `yield` statement. It is set on all token types that may be at the\n// start of a subexpression.\n\n// `isLoop` marks a keyword as starting a loop, which is important\n// to know when parsing a label, in order to allow or disallow\n// continue jumps to that label.\n\nconst beforeExpr = true;\nconst startsExpr = true;\nconst isLoop = true;\nconst isAssign = true;\nconst prefix = true;\nconst postfix = true;\n\ntype TokenOptions = {\n keyword?: string;\n beforeExpr?: boolean;\n startsExpr?: boolean;\n rightAssociative?: boolean;\n isLoop?: boolean;\n isAssign?: boolean;\n prefix?: boolean;\n postfix?: boolean;\n binop?: number | null;\n};\n\n// Internally the tokenizer stores token as a number\nexport type TokenType = number;\n\n// The `ExportedTokenType` is exported via `tokTypes` and accessible\n// when `tokens: true` is enabled. Unlike internal token type, it provides\n// metadata of the tokens.\nexport class ExportedTokenType {\n label: string;\n keyword: string | undefined | null;\n beforeExpr: boolean;\n startsExpr: boolean;\n rightAssociative: boolean;\n isLoop: boolean;\n isAssign: boolean;\n prefix: boolean;\n postfix: boolean;\n binop: number | undefined | null;\n // todo(Babel 8): remove updateContext from exposed token layout\n declare updateContext:\n | ((context: Array) => void)\n | undefined\n | null;\n\n constructor(label: string, conf: TokenOptions = {}) {\n this.label = label;\n this.keyword = conf.keyword;\n this.beforeExpr = !!conf.beforeExpr;\n this.startsExpr = !!conf.startsExpr;\n this.rightAssociative = !!conf.rightAssociative;\n this.isLoop = !!conf.isLoop;\n this.isAssign = !!conf.isAssign;\n this.prefix = !!conf.prefix;\n this.postfix = !!conf.postfix;\n this.binop = conf.binop != null ? conf.binop : null;\n if (!process.env.BABEL_8_BREAKING) {\n this.updateContext = null;\n }\n }\n}\n\n// A map from keyword/keyword-like string value to the token type\nexport const keywords = new Map();\n\nfunction createKeyword(name: string, options: TokenOptions = {}): TokenType {\n options.keyword = name;\n const token = createToken(name, options);\n keywords.set(name, token);\n return token;\n}\n\nfunction createBinop(name: string, binop: number) {\n return createToken(name, { beforeExpr, binop });\n}\n\nlet tokenTypeCounter = -1;\nexport const tokenTypes: ExportedTokenType[] = [];\nconst tokenLabels: string[] = [];\nconst tokenBinops: number[] = [];\nconst tokenBeforeExprs: boolean[] = [];\nconst tokenStartsExprs: boolean[] = [];\nconst tokenPrefixes: boolean[] = [];\n\nfunction createToken(name: string, options: TokenOptions = {}): TokenType {\n ++tokenTypeCounter;\n tokenLabels.push(name);\n tokenBinops.push(options.binop ?? -1);\n tokenBeforeExprs.push(options.beforeExpr ?? false);\n tokenStartsExprs.push(options.startsExpr ?? false);\n tokenPrefixes.push(options.prefix ?? false);\n tokenTypes.push(new ExportedTokenType(name, options));\n\n return tokenTypeCounter;\n}\n\nfunction createKeywordLike(\n name: string,\n options: TokenOptions = {},\n): TokenType {\n ++tokenTypeCounter;\n keywords.set(name, tokenTypeCounter);\n tokenLabels.push(name);\n tokenBinops.push(options.binop ?? -1);\n tokenBeforeExprs.push(options.beforeExpr ?? false);\n tokenStartsExprs.push(options.startsExpr ?? false);\n tokenPrefixes.push(options.prefix ?? false);\n // In the exported token type, we set the label as \"name\" for backward compatibility with Babel 7\n tokenTypes.push(new ExportedTokenType(\"name\", options));\n\n return tokenTypeCounter;\n}\n\n// For performance the token type helpers depend on the following declarations order.\n// When adding new token types, please also check if the token helpers need update.\n\nexport type InternalTokenTypes = typeof tt;\n\nexport const tt = {\n // Punctuation token types.\n bracketL: createToken(\"[\", { beforeExpr, startsExpr }),\n bracketHashL: createToken(\"#[\", { beforeExpr, startsExpr }),\n bracketBarL: createToken(\"[|\", { beforeExpr, startsExpr }),\n bracketR: createToken(\"]\"),\n bracketBarR: createToken(\"|]\"),\n braceL: createToken(\"{\", { beforeExpr, startsExpr }),\n braceBarL: createToken(\"{|\", { beforeExpr, startsExpr }),\n braceHashL: createToken(\"#{\", { beforeExpr, startsExpr }),\n braceR: createToken(\"}\"),\n braceBarR: createToken(\"|}\"),\n parenL: createToken(\"(\", { beforeExpr, startsExpr }),\n parenR: createToken(\")\"),\n comma: createToken(\",\", { beforeExpr }),\n semi: createToken(\";\", { beforeExpr }),\n colon: createToken(\":\", { beforeExpr }),\n doubleColon: createToken(\"::\", { beforeExpr }),\n dot: createToken(\".\"),\n question: createToken(\"?\", { beforeExpr }),\n questionDot: createToken(\"?.\"),\n arrow: createToken(\"=>\", { beforeExpr }),\n template: createToken(\"template\"),\n ellipsis: createToken(\"...\", { beforeExpr }),\n backQuote: createToken(\"`\", { startsExpr }),\n dollarBraceL: createToken(\"${\", { beforeExpr, startsExpr }),\n // start: isTemplate\n templateTail: createToken(\"...`\", { startsExpr }),\n templateNonTail: createToken(\"...${\", { beforeExpr, startsExpr }),\n // end: isTemplate\n at: createToken(\"@\"),\n hash: createToken(\"#\", { startsExpr }),\n\n // Special hashbang token.\n interpreterDirective: createToken(\"#!...\"),\n\n // Operators. These carry several kinds of properties to help the\n // parser use them properly (the presence of these properties is\n // what categorizes them as operators).\n //\n // `binop`, when present, specifies that this operator is a binary\n // operator, and will refer to its precedence.\n //\n // `prefix` and `postfix` mark the operator as a prefix or postfix\n // unary operator.\n //\n // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as\n // binary operators with a very low precedence, that should result\n // in AssignmentExpression nodes.\n\n // start: isAssign\n eq: createToken(\"=\", { beforeExpr, isAssign }),\n assign: createToken(\"_=\", { beforeExpr, isAssign }),\n slashAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n // These are only needed to support % and ^ as a Hack-pipe topic token.\n // When the proposal settles on a token, the others can be merged with\n // tt.assign.\n xorAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n moduloAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n // end: isAssign\n\n incDec: createToken(\"++/--\", { prefix, postfix, startsExpr }),\n bang: createToken(\"!\", { beforeExpr, prefix, startsExpr }),\n tilde: createToken(\"~\", { beforeExpr, prefix, startsExpr }),\n\n // More possible topic tokens.\n // When the proposal settles on a token, at least one of these may be removed.\n doubleCaret: createToken(\"^^\", { startsExpr }),\n doubleAt: createToken(\"@@\", { startsExpr }),\n\n // start: isBinop\n pipeline: createBinop(\"|>\", 0),\n nullishCoalescing: createBinop(\"??\", 1),\n logicalOR: createBinop(\"||\", 1),\n logicalAND: createBinop(\"&&\", 2),\n bitwiseOR: createBinop(\"|\", 3),\n bitwiseXOR: createBinop(\"^\", 4),\n bitwiseAND: createBinop(\"&\", 5),\n equality: createBinop(\"==/!=/===/!==\", 6),\n lt: createBinop(\"/<=/>=\", 7),\n gt: createBinop(\"/<=/>=\", 7),\n relational: createBinop(\"/<=/>=\", 7),\n bitShift: createBinop(\"<>/>>>\", 8),\n bitShiftL: createBinop(\"<>/>>>\", 8),\n bitShiftR: createBinop(\"<>/>>>\", 8),\n plusMin: createToken(\"+/-\", { beforeExpr, binop: 9, prefix, startsExpr }),\n // startsExpr: required by v8intrinsic plugin\n modulo: createToken(\"%\", { binop: 10, startsExpr }),\n // unset `beforeExpr` as it can be `function *`\n star: createToken(\"*\", { binop: 10 }),\n slash: createBinop(\"/\", 10),\n exponent: createToken(\"**\", {\n beforeExpr,\n binop: 11,\n rightAssociative: true,\n }),\n\n // Keywords\n // Don't forget to update packages/babel-helper-validator-identifier/src/keyword.js\n // when new keywords are added\n // start: isLiteralPropertyName\n // start: isKeyword\n _in: createKeyword(\"in\", { beforeExpr, binop: 7 }),\n _instanceof: createKeyword(\"instanceof\", { beforeExpr, binop: 7 }),\n // end: isBinop\n _break: createKeyword(\"break\"),\n _case: createKeyword(\"case\", { beforeExpr }),\n _catch: createKeyword(\"catch\"),\n _continue: createKeyword(\"continue\"),\n _debugger: createKeyword(\"debugger\"),\n _default: createKeyword(\"default\", { beforeExpr }),\n _else: createKeyword(\"else\", { beforeExpr }),\n _finally: createKeyword(\"finally\"),\n _function: createKeyword(\"function\", { startsExpr }),\n _if: createKeyword(\"if\"),\n _return: createKeyword(\"return\", { beforeExpr }),\n _switch: createKeyword(\"switch\"),\n _throw: createKeyword(\"throw\", { beforeExpr, prefix, startsExpr }),\n _try: createKeyword(\"try\"),\n _var: createKeyword(\"var\"),\n _const: createKeyword(\"const\"),\n _with: createKeyword(\"with\"),\n _new: createKeyword(\"new\", { beforeExpr, startsExpr }),\n _this: createKeyword(\"this\", { startsExpr }),\n _super: createKeyword(\"super\", { startsExpr }),\n _class: createKeyword(\"class\", { startsExpr }),\n _extends: createKeyword(\"extends\", { beforeExpr }),\n _export: createKeyword(\"export\"),\n _import: createKeyword(\"import\", { startsExpr }),\n _null: createKeyword(\"null\", { startsExpr }),\n _true: createKeyword(\"true\", { startsExpr }),\n _false: createKeyword(\"false\", { startsExpr }),\n _typeof: createKeyword(\"typeof\", { beforeExpr, prefix, startsExpr }),\n _void: createKeyword(\"void\", { beforeExpr, prefix, startsExpr }),\n _delete: createKeyword(\"delete\", { beforeExpr, prefix, startsExpr }),\n // start: isLoop\n _do: createKeyword(\"do\", { isLoop, beforeExpr }),\n _for: createKeyword(\"for\", { isLoop }),\n _while: createKeyword(\"while\", { isLoop }),\n // end: isLoop\n // end: isKeyword\n\n // Primary literals\n // start: isIdentifier\n _as: createKeywordLike(\"as\", { startsExpr }),\n _assert: createKeywordLike(\"assert\", { startsExpr }),\n _async: createKeywordLike(\"async\", { startsExpr }),\n _await: createKeywordLike(\"await\", { startsExpr }),\n _defer: createKeywordLike(\"defer\", { startsExpr }),\n _from: createKeywordLike(\"from\", { startsExpr }),\n _get: createKeywordLike(\"get\", { startsExpr }),\n _let: createKeywordLike(\"let\", { startsExpr }),\n _meta: createKeywordLike(\"meta\", { startsExpr }),\n _of: createKeywordLike(\"of\", { startsExpr }),\n _sent: createKeywordLike(\"sent\", { startsExpr }),\n _set: createKeywordLike(\"set\", { startsExpr }),\n _source: createKeywordLike(\"source\", { startsExpr }),\n _static: createKeywordLike(\"static\", { startsExpr }),\n _using: createKeywordLike(\"using\", { startsExpr }),\n _yield: createKeywordLike(\"yield\", { startsExpr }),\n\n // Flow and TypeScript Keywordlike\n _asserts: createKeywordLike(\"asserts\", { startsExpr }),\n _checks: createKeywordLike(\"checks\", { startsExpr }),\n _exports: createKeywordLike(\"exports\", { startsExpr }),\n _global: createKeywordLike(\"global\", { startsExpr }),\n _implements: createKeywordLike(\"implements\", { startsExpr }),\n _intrinsic: createKeywordLike(\"intrinsic\", { startsExpr }),\n _infer: createKeywordLike(\"infer\", { startsExpr }),\n _is: createKeywordLike(\"is\", { startsExpr }),\n _mixins: createKeywordLike(\"mixins\", { startsExpr }),\n _proto: createKeywordLike(\"proto\", { startsExpr }),\n _require: createKeywordLike(\"require\", { startsExpr }),\n _satisfies: createKeywordLike(\"satisfies\", { startsExpr }),\n // start: isTSTypeOperator\n _keyof: createKeywordLike(\"keyof\", { startsExpr }),\n _readonly: createKeywordLike(\"readonly\", { startsExpr }),\n _unique: createKeywordLike(\"unique\", { startsExpr }),\n // end: isTSTypeOperator\n // start: isTSDeclarationStart\n _abstract: createKeywordLike(\"abstract\", { startsExpr }),\n _declare: createKeywordLike(\"declare\", { startsExpr }),\n _enum: createKeywordLike(\"enum\", { startsExpr }),\n _module: createKeywordLike(\"module\", { startsExpr }),\n _namespace: createKeywordLike(\"namespace\", { startsExpr }),\n // start: isFlowInterfaceOrTypeOrOpaque\n _interface: createKeywordLike(\"interface\", { startsExpr }),\n _type: createKeywordLike(\"type\", { startsExpr }),\n // end: isTSDeclarationStart\n _opaque: createKeywordLike(\"opaque\", { startsExpr }),\n // end: isFlowInterfaceOrTypeOrOpaque\n name: createToken(\"name\", { startsExpr }),\n\n // placeholder plugin\n placeholder: createToken(\"%%\", { startsExpr: true }),\n // end: isIdentifier\n\n string: createToken(\"string\", { startsExpr }),\n num: createToken(\"num\", { startsExpr }),\n bigint: createToken(\"bigint\", { startsExpr }),\n // TODO: Remove this in Babel 8\n decimal: createToken(\"decimal\", { startsExpr }),\n // end: isLiteralPropertyName\n regexp: createToken(\"regexp\", { startsExpr }),\n privateName: createToken(\"#name\", { startsExpr }),\n eof: createToken(\"eof\"),\n\n // jsx plugin\n jsxName: createToken(\"jsxName\"),\n jsxText: createToken(\"jsxText\", { beforeExpr: true }),\n jsxTagStart: createToken(\"jsxTagStart\", { startsExpr: true }),\n jsxTagEnd: createToken(\"jsxTagEnd\"),\n} as const;\n\nexport function tokenIsIdentifier(token: TokenType): boolean {\n return token >= tt._as && token <= tt.placeholder;\n}\n\nexport function tokenKeywordOrIdentifierIsKeyword(token: TokenType): boolean {\n // we can remove the token >= tt._in check when we\n // know a token is either keyword or identifier\n return token <= tt._while;\n}\n\nexport function tokenIsKeywordOrIdentifier(token: TokenType): boolean {\n return token >= tt._in && token <= tt.placeholder;\n}\n\nexport function tokenIsLiteralPropertyName(token: TokenType): boolean {\n return token >= tt._in && token <= tt.decimal;\n}\n\nexport function tokenComesBeforeExpression(token: TokenType): boolean {\n return tokenBeforeExprs[token];\n}\n\nexport function tokenCanStartExpression(token: TokenType): boolean {\n return tokenStartsExprs[token];\n}\n\nexport function tokenIsAssignment(token: TokenType): boolean {\n return token >= tt.eq && token <= tt.moduloAssign;\n}\n\nexport function tokenIsFlowInterfaceOrTypeOrOpaque(token: TokenType): boolean {\n return token >= tt._interface && token <= tt._opaque;\n}\n\nexport function tokenIsLoop(token: TokenType): boolean {\n return token >= tt._do && token <= tt._while;\n}\n\nexport function tokenIsKeyword(token: TokenType): boolean {\n return token >= tt._in && token <= tt._while;\n}\n\nexport function tokenIsOperator(token: TokenType): boolean {\n return token >= tt.pipeline && token <= tt._instanceof;\n}\n\nexport function tokenIsPostfix(token: TokenType): boolean {\n return token === tt.incDec;\n}\n\nexport function tokenIsPrefix(token: TokenType): boolean {\n return tokenPrefixes[token];\n}\n\nexport function tokenIsTSTypeOperator(token: TokenType): boolean {\n return token >= tt._keyof && token <= tt._unique;\n}\n\nexport function tokenIsTSDeclarationStart(token: TokenType): boolean {\n return token >= tt._abstract && token <= tt._type;\n}\n\nexport function tokenLabelName(token: TokenType): string {\n return tokenLabels[token];\n}\n\nexport function tokenOperatorPrecedence(token: TokenType): number {\n return tokenBinops[token];\n}\n\nexport function tokenIsBinaryOperator(token: TokenType): boolean {\n return tokenBinops[token] !== -1;\n}\n\nexport function tokenIsRightAssociative(token: TokenType): boolean {\n return token === tt.exponent;\n}\n\nexport function tokenIsTemplate(token: TokenType): boolean {\n return token >= tt.templateTail && token <= tt.templateNonTail;\n}\n\nexport function getExportedToken(token: TokenType): ExportedTokenType {\n return tokenTypes[token];\n}\n\nexport function isTokenType(obj: any): boolean {\n return typeof obj === \"number\";\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n tokenTypes[tt.braceR].updateContext = context => {\n context.pop();\n };\n\n tokenTypes[tt.braceL].updateContext =\n tokenTypes[tt.braceHashL].updateContext =\n tokenTypes[tt.dollarBraceL].updateContext =\n context => {\n context.push(tc.brace);\n };\n\n tokenTypes[tt.backQuote].updateContext = context => {\n if (context[context.length - 1] === tc.template) {\n context.pop();\n } else {\n context.push(tc.template);\n }\n };\n\n tokenTypes[tt.jsxTagStart].updateContext = context => {\n context.push(tc.j_expr, tc.j_oTag);\n };\n}\n","// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\n// ## Character categories\n\n// Big ugly regular expressions that match characters in the\n// whitespace, identifier, and identifier-start categories. These\n// are only applied when a character is found to actually have a\n// code point between 0x80 and 0xffff.\n// Generated by `scripts/generate-identifier-regex.cjs`.\n\n/* prettier-ignore */\nlet nonASCIIidentifierStartChars = \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u0870-\\u0887\\u0889-\\u088e\\u08a0-\\u08c9\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u09fc\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0af9\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c39\\u0c3d\\u0c58-\\u0c5a\\u0c5d\\u0c60\\u0c61\\u0c80\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cdd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d04-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d54-\\u0d56\\u0d5f-\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e86-\\u0e8a\\u0e8c-\\u0ea3\\u0ea5\\u0ea7-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u1711\\u171f-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4c\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c8a\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7cd\\ua7d0\\ua7d1\\ua7d3\\ua7d5-\\ua7dc\\ua7f2-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab69\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\";\n/* prettier-ignore */\nlet nonASCIIidentifierChars = \"\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u0897-\\u089f\\u08ca-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3c\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0cf3\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0ebc\\u0ec8-\\u0ece\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u180f-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf-\\u1ace\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1dff\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\u30fb\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\\uff65\";\n\nconst nonASCIIidentifierStart = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + \"]\",\n);\nconst nonASCIIidentifier = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\",\n);\n\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\n\n// These are a run-length and offset-encoded representation of the\n// >0xffff code points that are a valid part of identifiers. The\n// offset starts at 0x10000, and each pair of numbers represents an\n// offset to the next range, and then a size of the range. They were\n// generated by `scripts/generate-identifier-regex.cjs`.\n/* prettier-ignore */\nconst astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191];\n/* prettier-ignore */\nconst astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];\n\n// This has a complexity linear to the value of the code. The\n// assumption is that looking up astral identifier characters is\n// rare.\nfunction isInAstralSet(code: number, set: readonly number[]): boolean {\n let pos = 0x10000;\n for (let i = 0, length = set.length; i < length; i += 2) {\n pos += set[i];\n if (pos > code) return false;\n\n pos += set[i + 1];\n if (pos >= code) return true;\n }\n return false;\n}\n\n// Test whether a given character code starts an identifier.\n\nexport function isIdentifierStart(code: number): boolean {\n if (code < charCodes.uppercaseA) return code === charCodes.dollarSign;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return (\n code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))\n );\n }\n return isInAstralSet(code, astralIdentifierStartCodes);\n}\n\n// Test whether a given character is part of an identifier.\n\nexport function isIdentifierChar(code: number): boolean {\n if (code < charCodes.digit0) return code === charCodes.dollarSign;\n if (code < charCodes.colon) return true;\n if (code < charCodes.uppercaseA) return false;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n }\n return (\n isInAstralSet(code, astralIdentifierStartCodes) ||\n isInAstralSet(code, astralIdentifierCodes)\n );\n}\n\n// Test whether a given string is a valid identifier name\n\nexport function isIdentifierName(name: string): boolean {\n let isFirst = true;\n for (let i = 0; i < name.length; i++) {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `name` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = name.charCodeAt(i);\n if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n const trail = name.charCodeAt(++i);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n if (isFirst) {\n isFirst = false;\n if (!isIdentifierStart(cp)) {\n return false;\n }\n } else if (!isIdentifierChar(cp)) {\n return false;\n }\n }\n return !isFirst;\n}\n","const reservedWords = {\n keyword: [\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n ],\n strict: [\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n ],\n strictBind: [\"eval\", \"arguments\"],\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\n/**\n * Checks if word is a reserved word in non-strict mode\n */\nexport function isReservedWord(word: string, inModule: boolean): boolean {\n return (inModule && word === \"await\") || word === \"enum\";\n}\n\n/**\n * Checks if word is a reserved word in non-binding strict mode\n *\n * Includes non-strict reserved words\n */\nexport function isStrictReservedWord(word: string, inModule: boolean): boolean {\n return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode, but it is allowed as\n * a normal identifier.\n */\nexport function isStrictBindOnlyReservedWord(word: string): boolean {\n return reservedWordsStrictBindSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode\n *\n * Includes non-strict reserved words and non-binding strict reserved words\n */\nexport function isStrictBindReservedWord(\n word: string,\n inModule: boolean,\n): boolean {\n return (\n isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word)\n );\n}\n\nexport function isKeyword(word: string): boolean {\n return keywords.has(word);\n}\n","import * as charCodes from \"charcodes\";\nimport { isIdentifierStart } from \"@babel/helper-validator-identifier\";\n\nexport {\n isIdentifierStart,\n isIdentifierChar,\n isReservedWord,\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n isStrictReservedWord,\n isKeyword,\n} from \"@babel/helper-validator-identifier\";\n\nexport const keywordRelationalOperator = /^in(stanceof)?$/;\n\n// Test whether a current state character code and next character code is @\n\nexport function isIteratorStart(\n current: number,\n next: number,\n next2: number,\n): boolean {\n return (\n current === charCodes.atSign &&\n next === charCodes.atSign &&\n isIdentifierStart(next2)\n );\n}\n\n// This is the comprehensive set of JavaScript reserved words\n// If a word is in this set, it could be a reserved word,\n// depending on sourceType/strictMode/binding info. In other words\n// if a word is not in this set, it is not a reserved word under\n// any circumstance.\nconst reservedWordLikeSet = new Set([\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n // strict\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n // strictBind\n \"eval\",\n \"arguments\",\n // reservedWorkLike\n \"enum\",\n \"await\",\n]);\n\nexport function canBeReservedWord(word: string): boolean {\n return reservedWordLikeSet.has(word);\n}\n","import { ScopeFlag, BindingFlag } from \"./scopeflags.ts\";\nimport type { Position } from \"./location.ts\";\nimport type * as N from \"../types.ts\";\nimport { Errors } from \"../parse-error.ts\";\nimport type Tokenizer from \"../tokenizer/index.ts\";\n\nexport const enum NameType {\n // var-declared names in the current lexical scope\n Var = 1 << 0,\n // lexically-declared names in the current lexical scope\n Lexical = 1 << 1,\n // lexically-declared FunctionDeclaration names in the current lexical scope\n Function = 1 << 2,\n}\n\n// Start an AST node, attaching a start offset.\nexport class Scope {\n flags: ScopeFlag = 0;\n names: Map = new Map();\n firstLexicalName = \"\";\n\n constructor(flags: ScopeFlag) {\n this.flags = flags;\n }\n}\n\n// The functions in this module keep track of declared variables in the\n// current scope in order to detect duplicate variable names.\nexport default class ScopeHandler {\n parser: Tokenizer;\n scopeStack: Array = [];\n inModule: boolean;\n undefinedExports: Map = new Map();\n\n constructor(parser: Tokenizer, inModule: boolean) {\n this.parser = parser;\n this.inModule = inModule;\n }\n\n get inTopLevel() {\n return (this.currentScope().flags & ScopeFlag.PROGRAM) > 0;\n }\n get inFunction() {\n return (this.currentVarScopeFlags() & ScopeFlag.FUNCTION) > 0;\n }\n get allowSuper() {\n return (this.currentThisScopeFlags() & ScopeFlag.SUPER) > 0;\n }\n get allowDirectSuper() {\n return (this.currentThisScopeFlags() & ScopeFlag.DIRECT_SUPER) > 0;\n }\n get inClass() {\n return (this.currentThisScopeFlags() & ScopeFlag.CLASS) > 0;\n }\n get inClassAndNotInNonArrowFunction() {\n const flags = this.currentThisScopeFlags();\n return (flags & ScopeFlag.CLASS) > 0 && (flags & ScopeFlag.FUNCTION) === 0;\n }\n get inStaticBlock() {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & ScopeFlag.STATIC_BLOCK) {\n return true;\n }\n if (flags & (ScopeFlag.VAR | ScopeFlag.CLASS)) {\n // function body, module body, class property initializers\n return false;\n }\n }\n }\n get inNonArrowFunction() {\n return (this.currentThisScopeFlags() & ScopeFlag.FUNCTION) > 0;\n }\n get treatFunctionsAsVar() {\n return this.treatFunctionsAsVarInScope(this.currentScope());\n }\n\n createScope(flags: ScopeFlag): Scope {\n return new Scope(flags);\n }\n\n enter(flags: ScopeFlag) {\n /*:: +createScope: (flags:ScopeFlag) => IScope; */\n // @ts-expect-error This method will be overwritten by subclasses\n this.scopeStack.push(this.createScope(flags));\n }\n\n exit(): ScopeFlag {\n const scope = this.scopeStack.pop();\n return scope.flags;\n }\n\n // The spec says:\n // > At the top level of a function, or script, function declarations are\n // > treated like var declarations rather than like lexical declarations.\n treatFunctionsAsVarInScope(scope: IScope): boolean {\n return !!(\n scope.flags & (ScopeFlag.FUNCTION | ScopeFlag.STATIC_BLOCK) ||\n (!this.parser.inModule && scope.flags & ScopeFlag.PROGRAM)\n );\n }\n\n declareName(name: string, bindingType: BindingFlag, loc: Position) {\n let scope = this.currentScope();\n if (\n bindingType & BindingFlag.SCOPE_LEXICAL ||\n bindingType & BindingFlag.SCOPE_FUNCTION\n ) {\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n\n let type = scope.names.get(name) || 0;\n\n if (bindingType & BindingFlag.SCOPE_FUNCTION) {\n type = type | NameType.Function;\n } else {\n if (!scope.firstLexicalName) {\n scope.firstLexicalName = name;\n }\n type = type | NameType.Lexical;\n }\n\n scope.names.set(name, type);\n\n if (bindingType & BindingFlag.SCOPE_LEXICAL) {\n this.maybeExportDefined(scope, name);\n }\n } else if (bindingType & BindingFlag.SCOPE_VAR) {\n for (let i = this.scopeStack.length - 1; i >= 0; --i) {\n scope = this.scopeStack[i];\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n scope.names.set(name, (scope.names.get(name) || 0) | NameType.Var);\n this.maybeExportDefined(scope, name);\n\n if (scope.flags & ScopeFlag.VAR) break;\n }\n }\n if (this.parser.inModule && scope.flags & ScopeFlag.PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n maybeExportDefined(scope: IScope, name: string) {\n if (this.parser.inModule && scope.flags & ScopeFlag.PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n checkRedeclarationInScope(\n scope: IScope,\n name: string,\n bindingType: BindingFlag,\n loc: Position,\n ) {\n if (this.isRedeclaredInScope(scope, name, bindingType)) {\n this.parser.raise(Errors.VarRedeclaration, loc, {\n identifierName: name,\n });\n }\n }\n\n isRedeclaredInScope(\n scope: IScope,\n name: string,\n bindingType: BindingFlag,\n ): boolean {\n if (!(bindingType & BindingFlag.KIND_VALUE)) return false;\n\n if (bindingType & BindingFlag.SCOPE_LEXICAL) {\n return scope.names.has(name);\n }\n\n const type = scope.names.get(name);\n\n if (bindingType & BindingFlag.SCOPE_FUNCTION) {\n return (\n (type & NameType.Lexical) > 0 ||\n (!this.treatFunctionsAsVarInScope(scope) && (type & NameType.Var) > 0)\n );\n }\n\n return (\n ((type & NameType.Lexical) > 0 &&\n // Annex B.3.4\n // https://tc39.es/ecma262/#sec-variablestatements-in-catch-blocks\n !(\n scope.flags & ScopeFlag.SIMPLE_CATCH &&\n scope.firstLexicalName === name\n )) ||\n (!this.treatFunctionsAsVarInScope(scope) &&\n (type & NameType.Function) > 0)\n );\n }\n\n checkLocalExport(id: N.Identifier) {\n const { name } = id;\n const topLevelScope = this.scopeStack[0];\n if (!topLevelScope.names.has(name)) {\n this.undefinedExports.set(name, id.loc.start);\n }\n }\n\n currentScope(): IScope {\n return this.scopeStack[this.scopeStack.length - 1];\n }\n\n currentVarScopeFlags(): ScopeFlag {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & ScopeFlag.VAR) {\n return flags;\n }\n }\n }\n\n // Could be useful for `arguments`, `this`, `new.target`, `super()`, `super.property`, and `super[property]`.\n currentThisScopeFlags(): ScopeFlag {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (\n flags & (ScopeFlag.VAR | ScopeFlag.CLASS) &&\n !(flags & ScopeFlag.ARROW)\n ) {\n return flags;\n }\n }\n }\n}\n","import type { Position } from \"../../util/location.ts\";\nimport ScopeHandler, { NameType, Scope } from \"../../util/scope.ts\";\nimport { BindingFlag, type ScopeFlag } from \"../../util/scopeflags.ts\";\nimport type * as N from \"../../types.ts\";\n\n// Reference implementation: https://github.com/facebook/flow/blob/23aeb2a2ef6eb4241ce178fde5d8f17c5f747fb5/src/typing/env.ml#L536-L584\nclass FlowScope extends Scope {\n // declare function foo(): type;\n declareFunctions: Set = new Set();\n}\n\nexport default class FlowScopeHandler extends ScopeHandler {\n createScope(flags: ScopeFlag): FlowScope {\n return new FlowScope(flags);\n }\n\n declareName(name: string, bindingType: BindingFlag, loc: Position) {\n const scope = this.currentScope();\n if (bindingType & BindingFlag.FLAG_FLOW_DECLARE_FN) {\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n this.maybeExportDefined(scope, name);\n scope.declareFunctions.add(name);\n return;\n }\n\n super.declareName(name, bindingType, loc);\n }\n\n isRedeclaredInScope(\n scope: FlowScope,\n name: string,\n bindingType: BindingFlag,\n ): boolean {\n if (super.isRedeclaredInScope(scope, name, bindingType)) return true;\n\n if (\n bindingType & BindingFlag.FLAG_FLOW_DECLARE_FN &&\n !scope.declareFunctions.has(name)\n ) {\n const type = scope.names.get(name);\n return (type & NameType.Function) > 0 || (type & NameType.Lexical) > 0;\n }\n\n return false;\n }\n\n checkLocalExport(id: N.Identifier) {\n if (!this.scopeStack[0].declareFunctions.has(id.name)) {\n super.checkLocalExport(id);\n }\n }\n}\n","import type { OptionFlags, Options } from \"../options.ts\";\nimport type State from \"../tokenizer/state.ts\";\nimport type { PluginsMap } from \"./index.ts\";\nimport type ScopeHandler from \"../util/scope.ts\";\nimport type ExpressionScopeHandler from \"../util/expression-scope.ts\";\nimport type ClassScopeHandler from \"../util/class-scope.ts\";\nimport type ProductionParameterHandler from \"../util/production-parameter.ts\";\nimport type {\n ParserPluginWithOptions,\n PluginConfig,\n PluginOptions,\n} from \"../typings.ts\";\nimport type * as N from \"../types.ts\";\n\nexport default class BaseParser {\n // Properties set by constructor in index.js\n declare options: Options;\n declare optionFlags: OptionFlags;\n declare inModule: boolean;\n declare scope: ScopeHandler;\n declare classScope: ClassScopeHandler;\n declare prodParam: ProductionParameterHandler;\n declare expressionScope: ExpressionScopeHandler;\n declare plugins: PluginsMap;\n declare filename: string | undefined | null;\n declare startIndex: number;\n // Names of exports store. `default` is stored as a name for both\n // `export default foo;` and `export { foo as default };`.\n declare exportedIdentifiers: Set;\n sawUnambiguousESM: boolean = false;\n ambiguousScriptDifferentAst: boolean = false;\n\n // Initialized by Tokenizer\n declare state: State;\n // input and length are not in state as they are constant and we do\n // not want to ever copy them, which happens if state gets cloned\n declare input: string;\n declare length: number;\n // Comment store for Program.comments\n declare comments: Array;\n\n sourceToOffsetPos(sourcePos: number) {\n return sourcePos + this.startIndex;\n }\n\n offsetToSourcePos(offsetPos: number) {\n return offsetPos - this.startIndex;\n }\n\n // This method accepts either a string (plugin name) or an array pair\n // (plugin name and options object). If an options object is given,\n // then each value is non-recursively checked for identity with that\n // plugin’s actual option value.\n hasPlugin(pluginConfig: PluginConfig): boolean {\n if (typeof pluginConfig === \"string\") {\n return this.plugins.has(pluginConfig);\n } else {\n const [pluginName, pluginOptions] = pluginConfig;\n if (!this.hasPlugin(pluginName)) {\n return false;\n }\n const actualOptions = this.plugins.get(pluginName);\n for (const key of Object.keys(\n pluginOptions,\n ) as (keyof typeof pluginOptions)[]) {\n if (actualOptions?.[key] !== pluginOptions[key]) {\n return false;\n }\n }\n return true;\n }\n }\n\n getPluginOption<\n PluginName extends ParserPluginWithOptions[0],\n OptionName extends keyof PluginOptions,\n >(plugin: PluginName, name: OptionName) {\n return (this.plugins.get(plugin) as null | PluginOptions)?.[\n name\n ];\n }\n}\n","/*:: declare var invariant; */\n\nimport BaseParser from \"./base.ts\";\nimport type { Comment, Node, Identifier } from \"../types.ts\";\nimport * as charCodes from \"charcodes\";\nimport type { Undone } from \"./node.ts\";\n\n/**\n * A whitespace token containing comments\n */\nexport type CommentWhitespace = {\n /**\n * the start of the whitespace token.\n */\n start: number;\n /**\n * the end of the whitespace token.\n */\n end: number;\n /**\n * the containing comments\n */\n comments: Array;\n /**\n * the immediately preceding AST node of the whitespace token\n */\n leadingNode: Node | null;\n /**\n * the immediately following AST node of the whitespace token\n */\n trailingNode: Node | null;\n /**\n * the innermost AST node containing the whitespace with minimal size (|end - start|)\n */\n containingNode: Node | null;\n};\n\n/**\n * Merge comments with node's trailingComments or assign comments to be\n * trailingComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n */\nfunction setTrailingComments(node: Undone, comments: Array) {\n if (node.trailingComments === undefined) {\n node.trailingComments = comments;\n } else {\n node.trailingComments.unshift(...comments);\n }\n}\n\n/**\n * Merge comments with node's leadingComments or assign comments to be\n * leadingComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n */\nfunction setLeadingComments(node: Undone, comments: Array) {\n if (node.leadingComments === undefined) {\n node.leadingComments = comments;\n } else {\n node.leadingComments.unshift(...comments);\n }\n}\n\n/**\n * Merge comments with node's innerComments or assign comments to be\n * innerComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n */\nexport function setInnerComments(\n node: Undone,\n comments?: Array,\n) {\n if (node.innerComments === undefined) {\n node.innerComments = comments;\n } else {\n node.innerComments.unshift(...comments);\n }\n}\n\n/**\n * Given node and elements array, if elements has non-null element,\n * merge comments to its trailingComments, otherwise merge comments\n * to node's innerComments\n */\nfunction adjustInnerComments(\n node: Undone,\n elements: Array,\n commentWS: CommentWhitespace,\n) {\n let lastElement = null;\n let i = elements.length;\n while (lastElement === null && i > 0) {\n lastElement = elements[--i];\n }\n if (lastElement === null || lastElement.start > commentWS.start) {\n setInnerComments(node, commentWS.comments);\n } else {\n setTrailingComments(lastElement, commentWS.comments);\n }\n}\n\nexport default class CommentsParser extends BaseParser {\n addComment(comment: Comment): void {\n if (this.filename) comment.loc.filename = this.filename;\n const { commentsLen } = this.state;\n if (this.comments.length !== commentsLen) {\n this.comments.length = commentsLen;\n }\n this.comments.push(comment);\n this.state.commentsLen++;\n }\n\n /**\n * Given a newly created AST node _n_, attach _n_ to a comment whitespace _w_ if applicable\n * {@see {@link CommentWhitespace}}\n */\n processComment(node: Node): void {\n const { commentStack } = this.state;\n const commentStackLength = commentStack.length;\n if (commentStackLength === 0) return;\n let i = commentStackLength - 1;\n const lastCommentWS = commentStack[i];\n\n if (lastCommentWS.start === node.end) {\n lastCommentWS.leadingNode = node;\n i--;\n }\n\n const { start: nodeStart } = node;\n // invariant: for all 0 <= j <= i, let c = commentStack[j], c must satisfy c.end < node.end\n for (; i >= 0; i--) {\n const commentWS = commentStack[i];\n const commentEnd = commentWS.end;\n if (commentEnd > nodeStart) {\n // by definition of commentWhiteSpace, this implies commentWS.start > nodeStart\n // so node can be a containingNode candidate. At this time we can finalize the comment\n // whitespace, because\n // 1) its leadingNode or trailingNode, if exists, will not change\n // 2) its containingNode have been assigned and will not change because it is the\n // innermost minimal-sized AST node\n commentWS.containingNode = node;\n this.finalizeComment(commentWS);\n commentStack.splice(i, 1);\n } else {\n if (commentEnd === nodeStart) {\n commentWS.trailingNode = node;\n }\n // stop the loop when commentEnd <= nodeStart\n break;\n }\n }\n }\n\n /**\n * Assign the comments of comment whitespaces to related AST nodes.\n * Also adjust innerComments following trailing comma.\n */\n finalizeComment(commentWS: CommentWhitespace) {\n const { comments } = commentWS;\n if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) {\n if (commentWS.leadingNode !== null) {\n setTrailingComments(commentWS.leadingNode, comments);\n }\n if (commentWS.trailingNode !== null) {\n setLeadingComments(commentWS.trailingNode, comments);\n }\n } else {\n /*:: invariant(commentWS.containingNode !== null) */\n const { containingNode: node, start: commentStart } = commentWS;\n if (\n this.input.charCodeAt(this.offsetToSourcePos(commentStart) - 1) ===\n charCodes.comma\n ) {\n // If a commentWhitespace follows a comma and the containingNode allows\n // list structures with trailing comma, merge it to the trailingComment\n // of the last non-null list element\n switch (node.type) {\n case \"ObjectExpression\":\n case \"ObjectPattern\":\n case \"RecordExpression\":\n adjustInnerComments(node, node.properties, commentWS);\n break;\n case \"CallExpression\":\n case \"OptionalCallExpression\":\n adjustInnerComments(node, node.arguments, commentWS);\n break;\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n case \"ArrowFunctionExpression\":\n case \"ObjectMethod\":\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n adjustInnerComments(node, node.params, commentWS);\n break;\n case \"ArrayExpression\":\n case \"ArrayPattern\":\n case \"TupleExpression\":\n adjustInnerComments(node, node.elements, commentWS);\n break;\n case \"ExportNamedDeclaration\":\n case \"ImportDeclaration\":\n adjustInnerComments(node, node.specifiers, commentWS);\n break;\n case \"TSEnumDeclaration\":\n if (!process.env.BABEL_8_BREAKING) {\n adjustInnerComments(node, node.members, commentWS);\n } else {\n setInnerComments(node, comments);\n }\n break;\n case \"TSEnumBody\":\n adjustInnerComments(node, node.members, commentWS);\n break;\n default: {\n setInnerComments(node, comments);\n }\n }\n } else {\n setInnerComments(node, comments);\n }\n }\n }\n\n /**\n * Drains remaining commentStack and applies finalizeComment\n * to each comment whitespace. Used only in parseExpression\n * where the top level AST node is _not_ Program\n * {@see {@link CommentsParser#finalizeComment}}\n */\n finalizeRemainingComments() {\n const { commentStack } = this.state;\n for (let i = commentStack.length - 1; i >= 0; i--) {\n this.finalizeComment(commentStack[i]);\n }\n this.state.commentStack = [];\n }\n\n /* eslint-disable no-irregular-whitespace */\n /**\n * Reset previous node trailing comments. Used in object / class\n * property parsing. We parse `async`, `static`, `set` and `get`\n * as an identifier but may reinterpret it into an async/static/accessor\n * method later. In this case the identifier is not part of the AST and we\n * should sync the knowledge to commentStacks\n *\n * For example, when parsing\n * ```\n * async /* 1 *​/ function f() {}\n * ```\n * the comment whitespace `/* 1 *​/` has leading node Identifier(async). When\n * we see the function token, we create a Function node and mark `/* 1 *​/` as\n * inner comments. So `/* 1 *​/` should be detached from the Identifier node.\n *\n * @param node the last finished AST node _before_ current token\n */\n /* eslint-enable no-irregular-whitespace */\n resetPreviousNodeTrailingComments(node: Node) {\n const { commentStack } = this.state;\n const { length } = commentStack;\n if (length === 0) return;\n const commentWS = commentStack[length - 1];\n if (commentWS.leadingNode === node) {\n commentWS.leadingNode = null;\n }\n }\n\n /* eslint-disable no-irregular-whitespace */\n /**\n * Reset previous node leading comments, assuming that `node` is a\n * single-token node. Used in import phase modifiers parsing. We parse\n * `module` in `import module foo from ...` as an identifier but may\n * reinterpret it into a phase modifier later. In this case the identifier is\n * not part of the AST and we should sync the knowledge to commentStacks\n *\n * For example, when parsing\n * ```\n * import /* 1 *​/ module a from \"a\";\n * ```\n * the comment whitespace `/* 1 *​/` has trailing node Identifier(module). When\n * we see that `module` is not a default import binding, we mark `/* 1 *​/` as\n * inner comments of the ImportDeclaration. So `/* 1 *​/` should be detached from\n * the Identifier node.\n *\n * @param node the last finished AST node _before_ current token\n */\n /* eslint-enable no-irregular-whitespace */\n resetPreviousIdentifierLeadingComments(node: Identifier) {\n const { commentStack } = this.state;\n const { length } = commentStack;\n if (length === 0) return;\n\n if (commentStack[length - 1].trailingNode === node) {\n commentStack[length - 1].trailingNode = null;\n } else if (length >= 2 && commentStack[length - 2].trailingNode === node) {\n commentStack[length - 2].trailingNode = null;\n }\n }\n\n /**\n * Attach a node to the comment whitespaces right before/after\n * the given range.\n *\n * This is used to properly attach comments around parenthesized\n * expressions as leading/trailing comments of the inner expression.\n */\n takeSurroundingComments(node: Node, start: number, end: number) {\n const { commentStack } = this.state;\n const commentStackLength = commentStack.length;\n if (commentStackLength === 0) return;\n let i = commentStackLength - 1;\n\n for (; i >= 0; i--) {\n const commentWS = commentStack[i];\n const commentEnd = commentWS.end;\n const commentStart = commentWS.start;\n\n if (commentStart === end) {\n commentWS.leadingNode = node;\n } else if (commentEnd === start) {\n commentWS.trailingNode = node;\n } else if (commentEnd < start) {\n break;\n }\n }\n }\n}\n","import * as charCodes from \"charcodes\";\n\n// Matches a whole line break (where CRLF is considered a single\n// line break). Used to count lines.\nexport const lineBreak = /\\r\\n|[\\r\\n\\u2028\\u2029]/;\nexport const lineBreakG = new RegExp(lineBreak.source, \"g\");\n\n// https://tc39.github.io/ecma262/#sec-line-terminators\nexport function isNewLine(code: number): boolean {\n switch (code) {\n case charCodes.lineFeed:\n case charCodes.carriageReturn:\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n return true;\n\n default:\n return false;\n }\n}\n\nexport function hasNewLine(input: string, start: number, end: number): boolean {\n for (let i = start; i < end; i++) {\n if (isNewLine(input.charCodeAt(i))) {\n return true;\n }\n }\n return false;\n}\n\nexport const skipWhiteSpace = /(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g;\n\nexport const skipWhiteSpaceInLine =\n /(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*/g;\n\n// https://tc39.github.io/ecma262/#sec-white-space\nexport function isWhitespace(code: number): boolean {\n switch (code) {\n case 0x0009: // CHARACTER TABULATION\n case 0x000b: // LINE TABULATION\n case 0x000c: // FORM FEED\n case charCodes.space:\n case charCodes.nonBreakingSpace:\n case charCodes.oghamSpaceMark:\n case 0x2000: // EN QUAD\n case 0x2001: // EM QUAD\n case 0x2002: // EN SPACE\n case 0x2003: // EM SPACE\n case 0x2004: // THREE-PER-EM SPACE\n case 0x2005: // FOUR-PER-EM SPACE\n case 0x2006: // SIX-PER-EM SPACE\n case 0x2007: // FIGURE SPACE\n case 0x2008: // PUNCTUATION SPACE\n case 0x2009: // THIN SPACE\n case 0x200a: // HAIR SPACE\n case 0x202f: // NARROW NO-BREAK SPACE\n case 0x205f: // MEDIUM MATHEMATICAL SPACE\n case 0x3000: // IDEOGRAPHIC SPACE\n case 0xfeff: // ZERO WIDTH NO-BREAK SPACE\n return true;\n\n default:\n return false;\n }\n}\n","import type { Options } from \"../options.ts\";\nimport type { CommentWhitespace } from \"../parser/comments\";\nimport { Position } from \"../util/location.ts\";\n\nimport { types as ct, type TokContext } from \"./context.ts\";\nimport { tt, type TokenType } from \"./types.ts\";\nimport type { Errors } from \"../parse-error.ts\";\nimport type { ParseError } from \"../parse-error.ts\";\n\nexport type DeferredStrictError =\n | typeof Errors.StrictNumericEscape\n | typeof Errors.StrictOctalLiteral;\n\ntype TopicContextState = {\n // When a topic binding has been currently established,\n // then this is 1. Otherwise, it is 0. This is forwards compatible\n // with a future plugin for multiple lexical topics.\n maxNumOfResolvableTopics: number;\n // When a topic binding has been currently established, and if that binding\n // has been used as a topic reference `#`, then this is 0. Otherwise, it is\n // `null`. This is forwards compatible with a future plugin for multiple\n // lexical topics.\n maxTopicIndex: null | 0;\n};\n\nexport const enum LoopLabelKind {\n Loop = 1,\n Switch = 2,\n}\n\ndeclare const bit: import(\"../../../../scripts/babel-plugin-bit-decorator/types.d.ts\").BitDecorator;\n\nexport default class State {\n @bit.storage flags: number;\n\n @bit accessor strict = false;\n\n startIndex: number;\n curLine: number;\n lineStart: number;\n\n // And, if locations are used, the {line, column} object\n // corresponding to those offsets\n startLoc: Position;\n endLoc: Position;\n\n init({\n strictMode,\n sourceType,\n startIndex,\n startLine,\n startColumn,\n }: Options): void {\n this.strict =\n strictMode === false\n ? false\n : strictMode === true\n ? true\n : sourceType === \"module\";\n\n this.startIndex = startIndex;\n this.curLine = startLine;\n this.lineStart = -startColumn;\n this.startLoc = this.endLoc = new Position(\n startLine,\n startColumn,\n startIndex,\n );\n }\n\n errors: ParseError[] = [];\n\n // Used to signify the start of a potential arrow function\n potentialArrowAt: number = -1;\n\n // Used to signify the start of an expression which looks like a\n // typed arrow function, but it isn't\n // e.g. a ? (b) : c => d\n // ^\n noArrowAt: number[] = [];\n\n // Used to signify the start of an expression whose params, if it looks like\n // an arrow function, shouldn't be converted to assignable nodes.\n // This is used to defer the validation of typed arrow functions inside\n // conditional expressions.\n // e.g. a ? (b) : c => d\n // ^\n noArrowParamsConversionAt: number[] = [];\n\n // Flags to track\n @bit accessor maybeInArrowParameters = false;\n @bit accessor inType = false;\n @bit accessor noAnonFunctionType = false;\n @bit accessor hasFlowComment = false;\n @bit accessor isAmbientContext = false;\n @bit accessor inAbstractClass = false;\n @bit accessor inDisallowConditionalTypesContext = false;\n\n // For the Hack-style pipelines plugin\n topicContext: TopicContextState = {\n maxNumOfResolvableTopics: 0,\n maxTopicIndex: null,\n };\n\n // For the F#-style pipelines plugin\n @bit accessor soloAwait = false;\n @bit accessor inFSharpPipelineDirectBody = false;\n\n // Labels in scope.\n labels: Array<{\n kind: LoopLabelKind;\n name?: string | null;\n statementStart?: number;\n }> = [];\n\n commentsLen = 0;\n // Comment attachment store\n commentStack: Array = [];\n\n // The current position of the tokenizer in the input.\n pos: number = 0;\n\n // Properties of the current token:\n // Its type\n type: TokenType = tt.eof;\n\n // For tokens that include more information than their type, the value\n value: any = null;\n\n // Its start and end offset\n start: number = 0;\n end: number = 0;\n\n // Position information for the previous token\n // this is initialized when generating the second token.\n lastTokEndLoc: Position = null;\n // this is initialized when generating the second token.\n lastTokStartLoc: Position = null;\n\n // The context stack is used to track whether the apostrophe \"`\" starts\n // or ends a string template\n context: Array = [ct.brace];\n\n // Used to track whether a JSX element is allowed to form\n @bit accessor canStartJSXElement = true;\n\n // Used to signal to callers of `readWord1` whether the word\n // contained any escape sequences. This is needed because words with\n // escape sequences must not be interpreted as keywords.\n @bit accessor containsEsc = false;\n\n // Used to track invalid escape sequences in template literals,\n // that must be reported if the template is not tagged.\n firstInvalidTemplateEscapePos: null | Position = null;\n\n @bit accessor hasTopLevelAwait = false;\n\n // This property is used to track the following errors\n // - StrictNumericEscape\n // - StrictOctalLiteral\n //\n // in a literal that occurs prior to/immediately after a \"use strict\" directive.\n\n // todo(JLHwung): set strictErrors to null and avoid recording string errors\n // after a non-directive is parsed\n strictErrors: Map = new Map();\n\n // Tokens length in token store\n tokensLength: number = 0;\n\n /**\n * When we add a new property, we must manually update the `clone` method\n * @see State#clone\n */\n\n curPosition(): Position {\n return new Position(\n this.curLine,\n this.pos - this.lineStart,\n this.pos + this.startIndex,\n );\n }\n\n clone(): State {\n const state = new State();\n state.flags = this.flags;\n state.startIndex = this.startIndex;\n state.curLine = this.curLine;\n state.lineStart = this.lineStart;\n state.startLoc = this.startLoc;\n state.endLoc = this.endLoc;\n state.errors = this.errors.slice();\n state.potentialArrowAt = this.potentialArrowAt;\n state.noArrowAt = this.noArrowAt.slice();\n state.noArrowParamsConversionAt = this.noArrowParamsConversionAt.slice();\n state.topicContext = this.topicContext;\n state.labels = this.labels.slice();\n state.commentsLen = this.commentsLen;\n state.commentStack = this.commentStack.slice();\n state.pos = this.pos;\n state.type = this.type;\n state.value = this.value;\n state.start = this.start;\n state.end = this.end;\n state.lastTokEndLoc = this.lastTokEndLoc;\n state.lastTokStartLoc = this.lastTokStartLoc;\n state.context = this.context.slice();\n state.firstInvalidTemplateEscapePos = this.firstInvalidTemplateEscapePos;\n state.strictErrors = this.strictErrors;\n state.tokensLength = this.tokensLength;\n\n return state;\n }\n}\n\nexport type LookaheadState = {\n pos: number;\n value: any;\n type: TokenType;\n start: number;\n end: number;\n context: TokContext[];\n startLoc: Position;\n lastTokEndLoc: Position;\n curLine: number;\n lineStart: number;\n curPosition: State[\"curPosition\"];\n /* Used only in readToken_mult_modulo */\n inType: boolean;\n // These boolean properties are not initialized in createLookaheadState()\n // instead they will only be set by the tokenizer\n containsEsc?: boolean;\n};\n","// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\n// The following character codes are forbidden from being\n// an immediate sibling of NumericLiteralSeparator _\nconst forbiddenNumericSeparatorSiblings = {\n decBinOct: new Set([\n charCodes.dot,\n charCodes.uppercaseB,\n charCodes.uppercaseE,\n charCodes.uppercaseO,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseB,\n charCodes.lowercaseE,\n charCodes.lowercaseO,\n ]),\n hex: new Set([\n charCodes.dot,\n charCodes.uppercaseX,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseX,\n ]),\n};\n\nconst isAllowedNumericSeparatorSibling = {\n // 0 - 1\n bin: (ch: number) => ch === charCodes.digit0 || ch === charCodes.digit1,\n\n // 0 - 7\n oct: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit7,\n\n // 0 - 9\n dec: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit9,\n\n // 0 - 9, A - F, a - f,\n hex: (ch: number) =>\n (ch >= charCodes.digit0 && ch <= charCodes.digit9) ||\n (ch >= charCodes.uppercaseA && ch <= charCodes.uppercaseF) ||\n (ch >= charCodes.lowercaseA && ch <= charCodes.lowercaseF),\n};\n\nexport type StringContentsErrorHandlers = EscapedCharErrorHandlers & {\n unterminated(\n initialPos: number,\n initialLineStart: number,\n initialCurLine: number,\n ): void;\n};\n\nexport function readStringContents(\n type: \"single\" | \"double\" | \"template\",\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n errors: StringContentsErrorHandlers,\n) {\n const initialPos = pos;\n const initialLineStart = lineStart;\n const initialCurLine = curLine;\n\n let out = \"\";\n let firstInvalidLoc = null;\n let chunkStart = pos;\n const { length } = input;\n for (;;) {\n if (pos >= length) {\n errors.unterminated(initialPos, initialLineStart, initialCurLine);\n out += input.slice(chunkStart, pos);\n break;\n }\n const ch = input.charCodeAt(pos);\n if (isStringEnd(type, ch, input, pos)) {\n out += input.slice(chunkStart, pos);\n break;\n }\n if (ch === charCodes.backslash) {\n out += input.slice(chunkStart, pos);\n const res = readEscapedChar(\n input,\n pos,\n lineStart,\n curLine,\n type === \"template\",\n errors,\n );\n if (res.ch === null && !firstInvalidLoc) {\n firstInvalidLoc = { pos, lineStart, curLine };\n } else {\n out += res.ch;\n }\n ({ pos, lineStart, curLine } = res);\n chunkStart = pos;\n } else if (\n ch === charCodes.lineSeparator ||\n ch === charCodes.paragraphSeparator\n ) {\n ++pos;\n ++curLine;\n lineStart = pos;\n } else if (ch === charCodes.lineFeed || ch === charCodes.carriageReturn) {\n if (type === \"template\") {\n out += input.slice(chunkStart, pos) + \"\\n\";\n ++pos;\n if (\n ch === charCodes.carriageReturn &&\n input.charCodeAt(pos) === charCodes.lineFeed\n ) {\n ++pos;\n }\n ++curLine;\n chunkStart = lineStart = pos;\n } else {\n errors.unterminated(initialPos, initialLineStart, initialCurLine);\n }\n } else {\n ++pos;\n }\n }\n return process.env.BABEL_8_BREAKING\n ? { pos, str: out, firstInvalidLoc, lineStart, curLine }\n : {\n pos,\n str: out,\n firstInvalidLoc,\n lineStart,\n curLine,\n containsInvalid: !!firstInvalidLoc,\n };\n}\n\nfunction isStringEnd(\n type: \"single\" | \"double\" | \"template\",\n ch: number,\n input: string,\n pos: number,\n) {\n if (type === \"template\") {\n return (\n ch === charCodes.graveAccent ||\n (ch === charCodes.dollarSign &&\n input.charCodeAt(pos + 1) === charCodes.leftCurlyBrace)\n );\n }\n return (\n ch === (type === \"double\" ? charCodes.quotationMark : charCodes.apostrophe)\n );\n}\n\ntype EscapedCharErrorHandlers = HexCharErrorHandlers &\n CodePointErrorHandlers & {\n strictNumericEscape(pos: number, lineStart: number, curLine: number): void;\n };\n\nfunction readEscapedChar(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n inTemplate: boolean,\n errors: EscapedCharErrorHandlers,\n) {\n const throwOnInvalid = !inTemplate;\n pos++; // skip '\\'\n\n const res = (ch: string | null) => ({ pos, ch, lineStart, curLine });\n\n const ch = input.charCodeAt(pos++);\n switch (ch) {\n case charCodes.lowercaseN:\n return res(\"\\n\");\n case charCodes.lowercaseR:\n return res(\"\\r\");\n case charCodes.lowercaseX: {\n let code;\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n 2,\n false,\n throwOnInvalid,\n errors,\n ));\n return res(code === null ? null : String.fromCharCode(code));\n }\n case charCodes.lowercaseU: {\n let code;\n ({ code, pos } = readCodePoint(\n input,\n pos,\n lineStart,\n curLine,\n throwOnInvalid,\n errors,\n ));\n return res(code === null ? null : String.fromCodePoint(code));\n }\n case charCodes.lowercaseT:\n return res(\"\\t\");\n case charCodes.lowercaseB:\n return res(\"\\b\");\n case charCodes.lowercaseV:\n return res(\"\\u000b\");\n case charCodes.lowercaseF:\n return res(\"\\f\");\n case charCodes.carriageReturn:\n if (input.charCodeAt(pos) === charCodes.lineFeed) {\n ++pos;\n }\n // fall through\n case charCodes.lineFeed:\n lineStart = pos;\n ++curLine;\n // fall through\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n return res(\"\");\n case charCodes.digit8:\n case charCodes.digit9:\n if (inTemplate) {\n return res(null);\n } else {\n errors.strictNumericEscape(pos - 1, lineStart, curLine);\n }\n // fall through\n default:\n if (ch >= charCodes.digit0 && ch <= charCodes.digit7) {\n const startPos = pos - 1;\n const match = /^[0-7]+/.exec(input.slice(startPos, pos + 2));\n\n let octalStr = match[0];\n\n let octal = parseInt(octalStr, 8);\n if (octal > 255) {\n octalStr = octalStr.slice(0, -1);\n octal = parseInt(octalStr, 8);\n }\n pos += octalStr.length - 1;\n const next = input.charCodeAt(pos);\n if (\n octalStr !== \"0\" ||\n next === charCodes.digit8 ||\n next === charCodes.digit9\n ) {\n if (inTemplate) {\n return res(null);\n } else {\n errors.strictNumericEscape(startPos, lineStart, curLine);\n }\n }\n\n return res(String.fromCharCode(octal));\n }\n\n return res(String.fromCharCode(ch));\n }\n}\n\ntype HexCharErrorHandlers = IntErrorHandlers & {\n invalidEscapeSequence(pos: number, lineStart: number, curLine: number): void;\n};\n\n// Used to read character escape sequences ('\\x', '\\u').\nfunction readHexChar(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n len: number,\n forceLen: boolean,\n throwOnInvalid: boolean,\n errors: HexCharErrorHandlers,\n) {\n const initialPos = pos;\n let n;\n ({ n, pos } = readInt(\n input,\n pos,\n lineStart,\n curLine,\n 16,\n len,\n forceLen,\n false,\n errors,\n /* bailOnError */ !throwOnInvalid,\n ));\n if (n === null) {\n if (throwOnInvalid) {\n errors.invalidEscapeSequence(initialPos, lineStart, curLine);\n } else {\n pos = initialPos - 1;\n }\n }\n return { code: n, pos };\n}\n\nexport type IntErrorHandlers = {\n numericSeparatorInEscapeSequence(\n pos: number,\n lineStart: number,\n curLine: number,\n ): void;\n unexpectedNumericSeparator(\n pos: number,\n lineStart: number,\n curLine: number,\n ): void;\n // It can return \"true\" to indicate that the error was handled\n // and the int parsing should continue.\n invalidDigit(\n pos: number,\n lineStart: number,\n curLine: number,\n radix: number,\n ): boolean;\n};\n\nexport function readInt(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n radix: number,\n len: number | undefined,\n forceLen: boolean,\n allowNumSeparator: boolean | \"bail\",\n errors: IntErrorHandlers,\n bailOnError: boolean,\n) {\n const start = pos;\n const forbiddenSiblings =\n radix === 16\n ? forbiddenNumericSeparatorSiblings.hex\n : forbiddenNumericSeparatorSiblings.decBinOct;\n const isAllowedSibling =\n radix === 16\n ? isAllowedNumericSeparatorSibling.hex\n : radix === 10\n ? isAllowedNumericSeparatorSibling.dec\n : radix === 8\n ? isAllowedNumericSeparatorSibling.oct\n : isAllowedNumericSeparatorSibling.bin;\n\n let invalid = false;\n let total = 0;\n\n for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {\n const code = input.charCodeAt(pos);\n let val;\n\n if (code === charCodes.underscore && allowNumSeparator !== \"bail\") {\n const prev = input.charCodeAt(pos - 1);\n const next = input.charCodeAt(pos + 1);\n\n if (!allowNumSeparator) {\n if (bailOnError) return { n: null, pos };\n errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);\n } else if (\n Number.isNaN(next) ||\n !isAllowedSibling(next) ||\n forbiddenSiblings.has(prev) ||\n forbiddenSiblings.has(next)\n ) {\n if (bailOnError) return { n: null, pos };\n errors.unexpectedNumericSeparator(pos, lineStart, curLine);\n }\n\n // Ignore this _ character\n ++pos;\n continue;\n }\n\n if (code >= charCodes.lowercaseA) {\n val = code - charCodes.lowercaseA + charCodes.lineFeed;\n } else if (code >= charCodes.uppercaseA) {\n val = code - charCodes.uppercaseA + charCodes.lineFeed;\n } else if (charCodes.isDigit(code)) {\n val = code - charCodes.digit0; // 0-9\n } else {\n val = Infinity;\n }\n if (val >= radix) {\n // If we found a digit which is too big, errors.invalidDigit can return true to avoid\n // breaking the loop (this is used for error recovery).\n if (val <= 9 && bailOnError) {\n return { n: null, pos };\n } else if (\n val <= 9 &&\n errors.invalidDigit(pos, lineStart, curLine, radix)\n ) {\n val = 0;\n } else if (forceLen) {\n val = 0;\n invalid = true;\n } else {\n break;\n }\n }\n ++pos;\n total = total * radix + val;\n }\n if (pos === start || (len != null && pos - start !== len) || invalid) {\n return { n: null, pos };\n }\n\n return { n: total, pos };\n}\n\nexport type CodePointErrorHandlers = HexCharErrorHandlers & {\n invalidCodePoint(pos: number, lineStart: number, curLine: number): void;\n};\n\nexport function readCodePoint(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n throwOnInvalid: boolean,\n errors: CodePointErrorHandlers,\n) {\n const ch = input.charCodeAt(pos);\n let code;\n\n if (ch === charCodes.leftCurlyBrace) {\n ++pos;\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n input.indexOf(\"}\", pos) - pos,\n true,\n throwOnInvalid,\n errors,\n ));\n ++pos;\n if (code !== null && code > 0x10ffff) {\n if (throwOnInvalid) {\n errors.invalidCodePoint(pos, lineStart, curLine);\n } else {\n return { code: null, pos };\n }\n }\n } else {\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n 4,\n false,\n throwOnInvalid,\n errors,\n ));\n }\n return { code, pos };\n}\n","/*:: declare var invariant; */\n\nimport { OptionFlags, type Options } from \"../options.ts\";\nimport {\n Position,\n SourceLocation,\n createPositionWithColumnOffset,\n} from \"../util/location.ts\";\nimport CommentsParser, { type CommentWhitespace } from \"../parser/comments.ts\";\nimport type * as N from \"../types.ts\";\nimport * as charCodes from \"charcodes\";\nimport { isIdentifierStart, isIdentifierChar } from \"../util/identifier.ts\";\nimport {\n tokenIsKeyword,\n tokenLabelName,\n tt,\n keywords as keywordTypes,\n type TokenType,\n} from \"./types.ts\";\nimport type { TokContext } from \"./context.ts\";\nimport {\n Errors,\n type ParseError,\n type ParseErrorConstructor,\n} from \"../parse-error.ts\";\nimport {\n lineBreakG,\n isNewLine,\n isWhitespace,\n skipWhiteSpace,\n skipWhiteSpaceInLine,\n} from \"../util/whitespace.ts\";\nimport State from \"./state.ts\";\nimport type { LookaheadState, DeferredStrictError } from \"./state.ts\";\nimport type { Undone } from \"../parser/node.ts\";\nimport type { Node } from \"../types.ts\";\n\nimport {\n readInt,\n readCodePoint,\n readStringContents,\n type IntErrorHandlers,\n type CodePointErrorHandlers,\n type StringContentsErrorHandlers,\n} from \"@babel/helper-string-parser\";\n\nimport type { Plugin } from \"../typings.ts\";\n\nfunction buildPosition(pos: number, lineStart: number, curLine: number) {\n return new Position(curLine, pos - lineStart, pos);\n}\n\nconst VALID_REGEX_FLAGS = new Set([\n charCodes.lowercaseG,\n charCodes.lowercaseM,\n charCodes.lowercaseS,\n charCodes.lowercaseI,\n charCodes.lowercaseY,\n charCodes.lowercaseU,\n charCodes.lowercaseD,\n charCodes.lowercaseV,\n]);\n\n// Object type used to represent tokens. Note that normally, tokens\n// simply exist as properties on the parser object. This is only\n// used for the onToken callback and the external tokenizer.\n\nexport class Token {\n constructor(state: State) {\n const startIndex = state.startIndex || 0;\n this.type = state.type;\n this.value = state.value;\n this.start = startIndex + state.start;\n this.end = startIndex + state.end;\n this.loc = new SourceLocation(state.startLoc, state.endLoc);\n }\n\n declare type: TokenType;\n declare value: any;\n declare start: number;\n declare end: number;\n declare loc: SourceLocation;\n}\n\n// ## Tokenizer\n\nexport default abstract class Tokenizer extends CommentsParser {\n isLookahead: boolean;\n\n // Token store.\n tokens: Array = [];\n\n constructor(options: Options, input: string) {\n super();\n this.state = new State();\n this.state.init(options);\n this.input = input;\n this.length = input.length;\n this.comments = [];\n this.isLookahead = false;\n }\n\n pushToken(token: Token | N.Comment) {\n // Pop out invalid tokens trapped by try-catch parsing.\n // Those parsing branches are mainly created by typescript and flow plugins.\n this.tokens.length = this.state.tokensLength;\n this.tokens.push(token);\n ++this.state.tokensLength;\n }\n\n // Move to the next token\n\n next(): void {\n this.checkKeywordEscapes();\n if (this.optionFlags & OptionFlags.Tokens) {\n this.pushToken(new Token(this.state));\n }\n\n this.state.lastTokEndLoc = this.state.endLoc;\n this.state.lastTokStartLoc = this.state.startLoc;\n this.nextToken();\n }\n\n eat(type: TokenType): boolean {\n if (this.match(type)) {\n this.next();\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Whether current token matches given type\n */\n match(type: TokenType): boolean {\n return this.state.type === type;\n }\n\n /**\n * Create a LookaheadState from current parser state\n */\n createLookaheadState(state: State): LookaheadState {\n return {\n pos: state.pos,\n value: null,\n type: state.type,\n start: state.start,\n end: state.end,\n context: [this.curContext()],\n inType: state.inType,\n startLoc: state.startLoc,\n lastTokEndLoc: state.lastTokEndLoc,\n curLine: state.curLine,\n lineStart: state.lineStart,\n curPosition: state.curPosition,\n };\n }\n\n /**\n * lookahead peeks the next token, skipping changes to token context and\n * comment stack. For performance it returns a limited LookaheadState\n * instead of full parser state.\n *\n * The { column, line } Loc info is not included in lookahead since such usage\n * is rare. Although it may return other location properties e.g. `curLine` and\n * `lineStart`, these properties are not listed in the LookaheadState interface\n * and thus the returned value is _NOT_ reliable.\n *\n * The tokenizer should make best efforts to avoid using any parser state\n * other than those defined in LookaheadState\n */\n lookahead(): LookaheadState {\n const old = this.state;\n // @ts-expect-error For performance we use a simplified tokenizer state structure\n this.state = this.createLookaheadState(old);\n\n this.isLookahead = true;\n this.nextToken();\n this.isLookahead = false;\n\n const curr = this.state;\n this.state = old;\n return curr;\n }\n\n nextTokenStart(): number {\n return this.nextTokenStartSince(this.state.pos);\n }\n\n nextTokenStartSince(pos: number): number {\n skipWhiteSpace.lastIndex = pos;\n return skipWhiteSpace.test(this.input) ? skipWhiteSpace.lastIndex : pos;\n }\n\n lookaheadCharCode(): number {\n return this.input.charCodeAt(this.nextTokenStart());\n }\n\n /**\n * Similar to nextToken, but it will stop at line break when it is seen before the next token\n *\n * @returns {number} position of the next token start or line break, whichever is seen first.\n * @memberof Tokenizer\n */\n nextTokenInLineStart(): number {\n return this.nextTokenInLineStartSince(this.state.pos);\n }\n\n nextTokenInLineStartSince(pos: number): number {\n skipWhiteSpaceInLine.lastIndex = pos;\n return skipWhiteSpaceInLine.test(this.input)\n ? skipWhiteSpaceInLine.lastIndex\n : pos;\n }\n\n /**\n * Similar to lookaheadCharCode, but it will return the char code of line break if it is\n * seen before the next token\n *\n * @returns {number} char code of the next token start or line break, whichever is seen first.\n * @memberof Tokenizer\n */\n lookaheadInLineCharCode(): number {\n return this.input.charCodeAt(this.nextTokenInLineStart());\n }\n\n codePointAtPos(pos: number): number {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `input` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = this.input.charCodeAt(pos);\n if ((cp & 0xfc00) === 0xd800 && ++pos < this.input.length) {\n const trail = this.input.charCodeAt(pos);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n return cp;\n }\n\n // Toggle strict mode. Re-reads the next number or string to please\n // pedantic tests (`\"use strict\"; 010;` should fail).\n\n setStrict(strict: boolean): void {\n this.state.strict = strict;\n if (strict) {\n // Throw an error for any string decimal escape found before/immediately\n // after a \"use strict\" directive. Strict mode will be set at parse\n // time for any literals that occur after the next node of the strict\n // directive.\n this.state.strictErrors.forEach(([toParseError, at]) =>\n this.raise(toParseError, at),\n );\n this.state.strictErrors.clear();\n }\n }\n\n curContext(): TokContext {\n return this.state.context[this.state.context.length - 1];\n }\n\n // Read a single token, updating the parser object's token-related properties.\n nextToken(): void {\n this.skipSpace();\n this.state.start = this.state.pos;\n if (!this.isLookahead) this.state.startLoc = this.state.curPosition();\n if (this.state.pos >= this.length) {\n this.finishToken(tt.eof);\n return;\n }\n\n this.getTokenFromCode(this.codePointAtPos(this.state.pos));\n }\n\n // Skips a block comment, whose end is marked by commentEnd.\n // *-/ is used by the Flow plugin, when parsing block comments nested\n // inside Flow comments.\n skipBlockComment(commentEnd: \"*/\" | \"*-/\"): N.CommentBlock | undefined {\n let startLoc;\n if (!this.isLookahead) startLoc = this.state.curPosition();\n const start = this.state.pos;\n const end = this.input.indexOf(commentEnd, start + 2);\n if (end === -1) {\n // We have to call this again here because startLoc may not be set...\n // This seems to be for performance reasons:\n // https://github.com/babel/babel/commit/acf2a10899f696a8aaf34df78bf9725b5ea7f2da\n throw this.raise(Errors.UnterminatedComment, this.state.curPosition());\n }\n\n this.state.pos = end + commentEnd.length;\n lineBreakG.lastIndex = start + 2;\n while (lineBreakG.test(this.input) && lineBreakG.lastIndex <= end) {\n ++this.state.curLine;\n this.state.lineStart = lineBreakG.lastIndex;\n }\n\n // If we are doing a lookahead right now we need to advance the position (above code)\n // but we do not want to push the comment to the state.\n if (this.isLookahead) return;\n /*:: invariant(startLoc) */\n\n const comment: N.CommentBlock = {\n type: \"CommentBlock\",\n value: this.input.slice(start + 2, end),\n start: this.sourceToOffsetPos(start),\n end: this.sourceToOffsetPos(end + commentEnd.length),\n loc: new SourceLocation(startLoc, this.state.curPosition()),\n };\n if (this.optionFlags & OptionFlags.Tokens) this.pushToken(comment);\n return comment;\n }\n\n skipLineComment(startSkip: number): N.CommentLine | undefined {\n const start = this.state.pos;\n let startLoc;\n if (!this.isLookahead) startLoc = this.state.curPosition();\n let ch = this.input.charCodeAt((this.state.pos += startSkip));\n if (this.state.pos < this.length) {\n while (!isNewLine(ch) && ++this.state.pos < this.length) {\n ch = this.input.charCodeAt(this.state.pos);\n }\n }\n\n // If we are doing a lookahead right now we need to advance the position (above code)\n // but we do not want to push the comment to the state.\n if (this.isLookahead) return;\n\n const end = this.state.pos;\n const value = this.input.slice(start + startSkip, end);\n\n const comment: N.CommentLine = {\n type: \"CommentLine\",\n value,\n start: this.sourceToOffsetPos(start),\n end: this.sourceToOffsetPos(end),\n loc: new SourceLocation(startLoc, this.state.curPosition()),\n };\n if (this.optionFlags & OptionFlags.Tokens) this.pushToken(comment);\n return comment;\n }\n\n // Called at the start of the parse and after every token. Skips\n // whitespace and comments, and.\n\n skipSpace(): void {\n const spaceStart = this.state.pos;\n const comments: N.Comment[] =\n this.optionFlags & OptionFlags.AttachComment ? [] : null;\n loop: while (this.state.pos < this.length) {\n const ch = this.input.charCodeAt(this.state.pos);\n switch (ch) {\n case charCodes.space:\n case charCodes.nonBreakingSpace:\n case charCodes.tab:\n ++this.state.pos;\n break;\n case charCodes.carriageReturn:\n if (\n this.input.charCodeAt(this.state.pos + 1) === charCodes.lineFeed\n ) {\n ++this.state.pos;\n }\n // fall through\n case charCodes.lineFeed:\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n ++this.state.pos;\n ++this.state.curLine;\n this.state.lineStart = this.state.pos;\n break;\n\n case charCodes.slash:\n switch (this.input.charCodeAt(this.state.pos + 1)) {\n case charCodes.asterisk: {\n const comment = this.skipBlockComment(\"*/\");\n if (comment !== undefined) {\n this.addComment(comment);\n comments?.push(comment);\n }\n break;\n }\n\n case charCodes.slash: {\n const comment = this.skipLineComment(2);\n if (comment !== undefined) {\n this.addComment(comment);\n comments?.push(comment);\n }\n break;\n }\n\n default:\n break loop;\n }\n break;\n\n default:\n if (isWhitespace(ch)) {\n ++this.state.pos;\n } else if (\n ch === charCodes.dash &&\n !this.inModule &&\n this.optionFlags & OptionFlags.AnnexB\n ) {\n const pos = this.state.pos;\n if (\n this.input.charCodeAt(pos + 1) === charCodes.dash &&\n this.input.charCodeAt(pos + 2) === charCodes.greaterThan &&\n (spaceStart === 0 || this.state.lineStart > spaceStart)\n ) {\n // A `-->` line comment\n const comment = this.skipLineComment(3);\n if (comment !== undefined) {\n this.addComment(comment);\n comments?.push(comment);\n }\n } else {\n break loop;\n }\n } else if (\n ch === charCodes.lessThan &&\n !this.inModule &&\n this.optionFlags & OptionFlags.AnnexB\n ) {\n const pos = this.state.pos;\n if (\n this.input.charCodeAt(pos + 1) === charCodes.exclamationMark &&\n this.input.charCodeAt(pos + 2) === charCodes.dash &&\n this.input.charCodeAt(pos + 3) === charCodes.dash\n ) {\n // `` + ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), + // `<\/script` + StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), + // ` this.emitCodePoint(cp, consumed) + ); + } + } + get inSFCRoot() { + return this.mode === 2 && this.stack.length === 0; + } + reset() { + this.state = 1; + this.mode = 0; + this.buffer = ""; + this.sectionStart = 0; + this.index = 0; + this.baseState = 1; + this.inRCDATA = false; + this.currentSequence = void 0; + this.newlines.length = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + } + /** + * Generate Position object with line / column information using recorded + * newline positions. We know the index is always going to be an already + * processed index, so all the newlines up to this index should have been + * recorded. + */ + getPos(index) { + let line = 1; + let column = index + 1; + for (let i = this.newlines.length - 1; i >= 0; i--) { + const newlineIndex = this.newlines[i]; + if (index > newlineIndex) { + line = i + 2; + column = index - newlineIndex; + break; + } + } + return { + column, + line, + offset: index + }; + } + peek() { + return this.buffer.charCodeAt(this.index + 1); + } + stateText(c) { + if (c === 60) { + if (this.index > this.sectionStart) { + this.cbs.ontext(this.sectionStart, this.index); + } + this.state = 5; + this.sectionStart = this.index; + } else if (c === 38) { + this.startEntity(); + } else if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } + stateInterpolationOpen(c) { + if (c === this.delimiterOpen[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterOpen.length - 1) { + const start = this.index + 1 - this.delimiterOpen.length; + if (start > this.sectionStart) { + this.cbs.ontext(this.sectionStart, start); + } + this.state = 3; + this.sectionStart = start; + } else { + this.delimiterIndex++; + } + } else if (this.inRCDATA) { + this.state = 32; + this.stateInRCDATA(c); + } else { + this.state = 1; + this.stateText(c); + } + } + stateInterpolation(c) { + if (c === this.delimiterClose[0]) { + this.state = 4; + this.delimiterIndex = 0; + this.stateInterpolationClose(c); + } + } + stateInterpolationClose(c) { + if (c === this.delimiterClose[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterClose.length - 1) { + this.cbs.oninterpolation(this.sectionStart, this.index + 1); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else { + this.delimiterIndex++; + } + } else { + this.state = 3; + this.stateInterpolation(c); + } + } + stateSpecialStartSequence(c) { + const isEnd = this.sequenceIndex === this.currentSequence.length; + const isMatch = isEnd ? ( + // If we are at the end of the sequence, make sure the tag name has ended + isEndOfTagSection(c) + ) : ( + // Otherwise, do a case-insensitive comparison + (c | 32) === this.currentSequence[this.sequenceIndex] + ); + if (!isMatch) { + this.inRCDATA = false; + } else if (!isEnd) { + this.sequenceIndex++; + return; + } + this.sequenceIndex = 0; + this.state = 6; + this.stateInTagName(c); + } + /** Look for an end tag. For and <textarea>, also decode entities. */ + stateInRCDATA(c) { + if (this.sequenceIndex === this.currentSequence.length) { + if (c === 62 || isWhitespace(c)) { + const endOfText = this.index - this.currentSequence.length; + if (this.sectionStart < endOfText) { + const actualIndex = this.index; + this.index = endOfText; + this.cbs.ontext(this.sectionStart, endOfText); + this.index = actualIndex; + } + this.sectionStart = endOfText + 2; + this.stateInClosingTagName(c); + this.inRCDATA = false; + return; + } + this.sequenceIndex = 0; + } + if ((c | 32) === this.currentSequence[this.sequenceIndex]) { + this.sequenceIndex += 1; + } else if (this.sequenceIndex === 0) { + if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { + if (c === 38) { + this.startEntity(); + } else if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } else if (this.fastForwardTo(60)) { + this.sequenceIndex = 1; + } + } else { + this.sequenceIndex = Number(c === 60); + } + } + stateCDATASequence(c) { + if (c === Sequences.Cdata[this.sequenceIndex]) { + if (++this.sequenceIndex === Sequences.Cdata.length) { + this.state = 28; + this.currentSequence = Sequences.CdataEnd; + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + } + } else { + this.sequenceIndex = 0; + this.state = 23; + this.stateInDeclaration(c); + } + } + /** + * When we wait for one specific character, we can speed things up + * by skipping through the buffer until we find it. + * + * @returns Whether the character was found. + */ + fastForwardTo(c) { + while (++this.index < this.buffer.length) { + const cc = this.buffer.charCodeAt(this.index); + if (cc === 10) { + this.newlines.push(this.index); + } + if (cc === c) { + return true; + } + } + this.index = this.buffer.length - 1; + return false; + } + /** + * Comments and CDATA end with `-->` and `]]>`. + * + * Their common qualities are: + * - Their end sequences have a distinct character they start with. + * - That character is then repeated, so we have to check multiple repeats. + * - All characters but the start character of the sequence can be skipped. + */ + stateInCommentLike(c) { + if (c === this.currentSequence[this.sequenceIndex]) { + if (++this.sequenceIndex === this.currentSequence.length) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, this.index - 2); + } else { + this.cbs.oncomment(this.sectionStart, this.index - 2); + } + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + this.state = 1; + } + } else if (this.sequenceIndex === 0) { + if (this.fastForwardTo(this.currentSequence[0])) { + this.sequenceIndex = 1; + } + } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { + this.sequenceIndex = 0; + } + } + startSpecial(sequence, offset) { + this.enterRCDATA(sequence, offset); + this.state = 31; + } + enterRCDATA(sequence, offset) { + this.inRCDATA = true; + this.currentSequence = sequence; + this.sequenceIndex = offset; + } + stateBeforeTagName(c) { + if (c === 33) { + this.state = 22; + this.sectionStart = this.index + 1; + } else if (c === 63) { + this.state = 24; + this.sectionStart = this.index + 1; + } else if (isTagStartChar(c)) { + this.sectionStart = this.index; + if (this.mode === 0) { + this.state = 6; + } else if (this.inSFCRoot) { + this.state = 34; + } else if (!this.inXML) { + if (c === 116) { + this.state = 30; + } else { + this.state = c === 115 ? 29 : 6; + } + } else { + this.state = 6; + } + } else if (c === 47) { + this.state = 8; + } else { + this.state = 1; + this.stateText(c); + } + } + stateInTagName(c) { + if (isEndOfTagSection(c)) { + this.handleTagName(c); + } + } + stateInSFCRootTagName(c) { + if (isEndOfTagSection(c)) { + const tag = this.buffer.slice(this.sectionStart, this.index); + if (tag !== "template") { + this.enterRCDATA(toCharCodes(`</` + tag), 0); + } + this.handleTagName(c); + } + } + handleTagName(c) { + this.cbs.onopentagname(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } + stateBeforeClosingTagName(c) { + if (isWhitespace(c)) ; else if (c === 62) { + { + this.cbs.onerr(14, this.index); + } + this.state = 1; + this.sectionStart = this.index + 1; + } else { + this.state = isTagStartChar(c) ? 9 : 27; + this.sectionStart = this.index; + } + } + stateInClosingTagName(c) { + if (c === 62 || isWhitespace(c)) { + this.cbs.onclosetag(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 10; + this.stateAfterClosingTagName(c); + } + } + stateAfterClosingTagName(c) { + if (c === 62) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeAttrName(c) { + if (c === 62) { + this.cbs.onopentagend(this.index); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else if (c === 47) { + this.state = 7; + if (this.peek() !== 62) { + this.cbs.onerr(22, this.index); + } + } else if (c === 60 && this.peek() === 47) { + this.cbs.onopentagend(this.index); + this.state = 5; + this.sectionStart = this.index; + } else if (!isWhitespace(c)) { + if (c === 61) { + this.cbs.onerr( + 19, + this.index + ); + } + this.handleAttrStart(c); + } + } + handleAttrStart(c) { + if (c === 118 && this.peek() === 45) { + this.state = 13; + this.sectionStart = this.index; + } else if (c === 46 || c === 58 || c === 64 || c === 35) { + this.cbs.ondirname(this.index, this.index + 1); + this.state = 14; + this.sectionStart = this.index + 1; + } else { + this.state = 12; + this.sectionStart = this.index; + } + } + stateInSelfClosingTag(c) { + if (c === 62) { + this.cbs.onselfclosingtag(this.index); + this.state = 1; + this.sectionStart = this.index + 1; + this.inRCDATA = false; + } else if (!isWhitespace(c)) { + this.state = 11; + this.stateBeforeAttrName(c); + } + } + stateInAttrName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.onattribname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 34 || c === 39 || c === 60) { + this.cbs.onerr( + 17, + this.index + ); + } + } + stateInDirName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 58) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 14; + this.sectionStart = this.index + 1; + } else if (c === 46) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDirArg(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 91) { + this.state = 15; + } else if (c === 46) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDynamicDirArg(c) { + if (c === 93) { + this.state = 14; + } else if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index + 1); + this.handleAttrNameEnd(c); + { + this.cbs.onerr( + 27, + this.index + ); + } + } + } + stateInDirModifier(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 46) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.sectionStart = this.index + 1; + } + } + handleAttrNameEnd(c) { + this.sectionStart = this.index; + this.state = 17; + this.cbs.onattribnameend(this.index); + this.stateAfterAttrName(c); + } + stateAfterAttrName(c) { + if (c === 61) { + this.state = 18; + } else if (c === 47 || c === 62) { + this.cbs.onattribend(0, this.sectionStart); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } else if (!isWhitespace(c)) { + this.cbs.onattribend(0, this.sectionStart); + this.handleAttrStart(c); + } + } + stateBeforeAttrValue(c) { + if (c === 34) { + this.state = 19; + this.sectionStart = this.index + 1; + } else if (c === 39) { + this.state = 20; + this.sectionStart = this.index + 1; + } else if (!isWhitespace(c)) { + this.sectionStart = this.index; + this.state = 21; + this.stateInAttrValueNoQuotes(c); + } + } + handleInAttrValue(c, quote) { + if (c === quote || false) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend( + quote === 34 ? 3 : 2, + this.index + 1 + ); + this.state = 11; + } else if (c === 38) { + this.startEntity(); + } + } + stateInAttrValueDoubleQuotes(c) { + this.handleInAttrValue(c, 34); + } + stateInAttrValueSingleQuotes(c) { + this.handleInAttrValue(c, 39); + } + stateInAttrValueNoQuotes(c) { + if (isWhitespace(c) || c === 62) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend(1, this.index); + this.state = 11; + this.stateBeforeAttrName(c); + } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { + this.cbs.onerr( + 18, + this.index + ); + } else if (c === 38) { + this.startEntity(); + } + } + stateBeforeDeclaration(c) { + if (c === 91) { + this.state = 26; + this.sequenceIndex = 0; + } else { + this.state = c === 45 ? 25 : 23; + } + } + stateInDeclaration(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateInProcessingInstruction(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.onprocessinginstruction(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeComment(c) { + if (c === 45) { + this.state = 28; + this.currentSequence = Sequences.CommentEnd; + this.sequenceIndex = 2; + this.sectionStart = this.index + 1; + } else { + this.state = 23; + } + } + stateInSpecialComment(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.oncomment(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeSpecialS(c) { + if (c === Sequences.ScriptEnd[3]) { + this.startSpecial(Sequences.ScriptEnd, 4); + } else if (c === Sequences.StyleEnd[3]) { + this.startSpecial(Sequences.StyleEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + stateBeforeSpecialT(c) { + if (c === Sequences.TitleEnd[3]) { + this.startSpecial(Sequences.TitleEnd, 4); + } else if (c === Sequences.TextareaEnd[3]) { + this.startSpecial(Sequences.TextareaEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + startEntity() { + { + this.baseState = this.state; + this.state = 33; + this.entityStart = this.index; + this.entityDecoder.startEntity( + this.baseState === 1 || this.baseState === 32 ? decode_js.DecodingMode.Legacy : decode_js.DecodingMode.Attribute + ); + } + } + stateInEntity() { + { + const length = this.entityDecoder.write(this.buffer, this.index); + if (length >= 0) { + this.state = this.baseState; + if (length === 0) { + this.index = this.entityStart; + } + } else { + this.index = this.buffer.length - 1; + } + } + } + /** + * Iterates through the buffer, calling the function corresponding to the current state. + * + * States that are more likely to be hit are higher up, as a performance improvement. + */ + parse(input) { + this.buffer = input; + while (this.index < this.buffer.length) { + const c = this.buffer.charCodeAt(this.index); + if (c === 10) { + this.newlines.push(this.index); + } + switch (this.state) { + case 1: { + this.stateText(c); + break; + } + case 2: { + this.stateInterpolationOpen(c); + break; + } + case 3: { + this.stateInterpolation(c); + break; + } + case 4: { + this.stateInterpolationClose(c); + break; + } + case 31: { + this.stateSpecialStartSequence(c); + break; + } + case 32: { + this.stateInRCDATA(c); + break; + } + case 26: { + this.stateCDATASequence(c); + break; + } + case 19: { + this.stateInAttrValueDoubleQuotes(c); + break; + } + case 12: { + this.stateInAttrName(c); + break; + } + case 13: { + this.stateInDirName(c); + break; + } + case 14: { + this.stateInDirArg(c); + break; + } + case 15: { + this.stateInDynamicDirArg(c); + break; + } + case 16: { + this.stateInDirModifier(c); + break; + } + case 28: { + this.stateInCommentLike(c); + break; + } + case 27: { + this.stateInSpecialComment(c); + break; + } + case 11: { + this.stateBeforeAttrName(c); + break; + } + case 6: { + this.stateInTagName(c); + break; + } + case 34: { + this.stateInSFCRootTagName(c); + break; + } + case 9: { + this.stateInClosingTagName(c); + break; + } + case 5: { + this.stateBeforeTagName(c); + break; + } + case 17: { + this.stateAfterAttrName(c); + break; + } + case 20: { + this.stateInAttrValueSingleQuotes(c); + break; + } + case 18: { + this.stateBeforeAttrValue(c); + break; + } + case 8: { + this.stateBeforeClosingTagName(c); + break; + } + case 10: { + this.stateAfterClosingTagName(c); + break; + } + case 29: { + this.stateBeforeSpecialS(c); + break; + } + case 30: { + this.stateBeforeSpecialT(c); + break; + } + case 21: { + this.stateInAttrValueNoQuotes(c); + break; + } + case 7: { + this.stateInSelfClosingTag(c); + break; + } + case 23: { + this.stateInDeclaration(c); + break; + } + case 22: { + this.stateBeforeDeclaration(c); + break; + } + case 25: { + this.stateBeforeComment(c); + break; + } + case 24: { + this.stateInProcessingInstruction(c); + break; + } + case 33: { + this.stateInEntity(); + break; + } + } + this.index++; + } + this.cleanup(); + this.finish(); + } + /** + * Remove data that has already been consumed from the buffer. + */ + cleanup() { + if (this.sectionStart !== this.index) { + if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { + this.cbs.ontext(this.sectionStart, this.index); + this.sectionStart = this.index; + } else if (this.state === 19 || this.state === 20 || this.state === 21) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = this.index; + } + } + } + finish() { + if (this.state === 33) { + this.entityDecoder.end(); + this.state = this.baseState; + } + this.handleTrailingData(); + this.cbs.onend(); + } + /** Handle any trailing data. */ + handleTrailingData() { + const endIndex = this.buffer.length; + if (this.sectionStart >= endIndex) { + return; + } + if (this.state === 28) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, endIndex); + } else { + this.cbs.oncomment(this.sectionStart, endIndex); + } + } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { + this.cbs.ontext(this.sectionStart, endIndex); + } + } + emitCodePoint(cp, consumed) { + { + if (this.baseState !== 1 && this.baseState !== 32) { + if (this.sectionStart < this.entityStart) { + this.cbs.onattribdata(this.sectionStart, this.entityStart); + } + this.sectionStart = this.entityStart + consumed; + this.index = this.sectionStart - 1; + this.cbs.onattribentity( + decode_js.fromCodePoint(cp), + this.entityStart, + this.sectionStart + ); + } else { + if (this.sectionStart < this.entityStart) { + this.cbs.ontext(this.sectionStart, this.entityStart); + } + this.sectionStart = this.entityStart + consumed; + this.index = this.sectionStart - 1; + this.cbs.ontextentity( + decode_js.fromCodePoint(cp), + this.entityStart, + this.sectionStart + ); + } + } + } +} + +const CompilerDeprecationTypes = { + "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT", + "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC", + "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER", + "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE", + "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE", + "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE", + "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE", + "COMPILER_FILTERS": "COMPILER_FILTERS" +}; +const deprecationData = { + ["COMPILER_IS_ON_ELEMENT"]: { + message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`, + link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` + }, + ["COMPILER_V_BIND_SYNC"]: { + message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` + }, + ["COMPILER_V_BIND_OBJECT_ORDER"]: { + message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` + }, + ["COMPILER_V_ON_NATIVE"]: { + message: `.native modifier for v-on has been removed as is no longer necessary.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` + }, + ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: { + message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` + }, + ["COMPILER_NATIVE_TEMPLATE"]: { + message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.` + }, + ["COMPILER_INLINE_TEMPLATE"]: { + message: `"inline-template" has been removed in Vue 3.`, + link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` + }, + ["COMPILER_FILTERS"]: { + message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`, + link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` + } +}; +function getCompatValue(key, { compatConfig }) { + const value = compatConfig && compatConfig[key]; + if (key === "MODE") { + return value || 3; + } else { + return value; + } +} +function isCompatEnabled(key, context) { + const mode = getCompatValue("MODE", context); + const value = getCompatValue(key, context); + return mode === 3 ? value === true : value !== false; +} +function checkCompatEnabled(key, context, loc, ...args) { + const enabled = isCompatEnabled(key, context); + if (enabled) { + warnDeprecation(key, context, loc, ...args); + } + return enabled; +} +function warnDeprecation(key, context, loc, ...args) { + const val = getCompatValue(key, context); + if (val === "suppress-warning") { + return; + } + const { message, link } = deprecationData[key]; + const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? ` + Details: ${link}` : ``}`; + const err = new SyntaxError(msg); + err.code = key; + if (loc) err.loc = loc; + context.onWarn(err); +} + +function defaultOnError(error) { + throw error; +} +function defaultOnWarn(msg) { + console.warn(`[Vue warn] ${msg.message}`); +} +function createCompilerError(code, loc, messages, additionalMessage) { + const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ; + const error = new SyntaxError(String(msg)); + error.code = code; + error.loc = loc; + return error; +} +const ErrorCodes = { + "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0, + "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT", + "CDATA_IN_HTML_CONTENT": 1, + "1": "CDATA_IN_HTML_CONTENT", + "DUPLICATE_ATTRIBUTE": 2, + "2": "DUPLICATE_ATTRIBUTE", + "END_TAG_WITH_ATTRIBUTES": 3, + "3": "END_TAG_WITH_ATTRIBUTES", + "END_TAG_WITH_TRAILING_SOLIDUS": 4, + "4": "END_TAG_WITH_TRAILING_SOLIDUS", + "EOF_BEFORE_TAG_NAME": 5, + "5": "EOF_BEFORE_TAG_NAME", + "EOF_IN_CDATA": 6, + "6": "EOF_IN_CDATA", + "EOF_IN_COMMENT": 7, + "7": "EOF_IN_COMMENT", + "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8, + "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT", + "EOF_IN_TAG": 9, + "9": "EOF_IN_TAG", + "INCORRECTLY_CLOSED_COMMENT": 10, + "10": "INCORRECTLY_CLOSED_COMMENT", + "INCORRECTLY_OPENED_COMMENT": 11, + "11": "INCORRECTLY_OPENED_COMMENT", + "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12, + "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME", + "MISSING_ATTRIBUTE_VALUE": 13, + "13": "MISSING_ATTRIBUTE_VALUE", + "MISSING_END_TAG_NAME": 14, + "14": "MISSING_END_TAG_NAME", + "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15, + "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES", + "NESTED_COMMENT": 16, + "16": "NESTED_COMMENT", + "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17, + "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME", + "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18, + "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE", + "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19, + "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME", + "UNEXPECTED_NULL_CHARACTER": 20, + "20": "UNEXPECTED_NULL_CHARACTER", + "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21, + "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME", + "UNEXPECTED_SOLIDUS_IN_TAG": 22, + "22": "UNEXPECTED_SOLIDUS_IN_TAG", + "X_INVALID_END_TAG": 23, + "23": "X_INVALID_END_TAG", + "X_MISSING_END_TAG": 24, + "24": "X_MISSING_END_TAG", + "X_MISSING_INTERPOLATION_END": 25, + "25": "X_MISSING_INTERPOLATION_END", + "X_MISSING_DIRECTIVE_NAME": 26, + "26": "X_MISSING_DIRECTIVE_NAME", + "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27, + "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END", + "X_V_IF_NO_EXPRESSION": 28, + "28": "X_V_IF_NO_EXPRESSION", + "X_V_IF_SAME_KEY": 29, + "29": "X_V_IF_SAME_KEY", + "X_V_ELSE_NO_ADJACENT_IF": 30, + "30": "X_V_ELSE_NO_ADJACENT_IF", + "X_V_FOR_NO_EXPRESSION": 31, + "31": "X_V_FOR_NO_EXPRESSION", + "X_V_FOR_MALFORMED_EXPRESSION": 32, + "32": "X_V_FOR_MALFORMED_EXPRESSION", + "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33, + "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT", + "X_V_BIND_NO_EXPRESSION": 34, + "34": "X_V_BIND_NO_EXPRESSION", + "X_V_ON_NO_EXPRESSION": 35, + "35": "X_V_ON_NO_EXPRESSION", + "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36, + "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET", + "X_V_SLOT_MIXED_SLOT_USAGE": 37, + "37": "X_V_SLOT_MIXED_SLOT_USAGE", + "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38, + "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES", + "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39, + "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN", + "X_V_SLOT_MISPLACED": 40, + "40": "X_V_SLOT_MISPLACED", + "X_V_MODEL_NO_EXPRESSION": 41, + "41": "X_V_MODEL_NO_EXPRESSION", + "X_V_MODEL_MALFORMED_EXPRESSION": 42, + "42": "X_V_MODEL_MALFORMED_EXPRESSION", + "X_V_MODEL_ON_SCOPE_VARIABLE": 43, + "43": "X_V_MODEL_ON_SCOPE_VARIABLE", + "X_V_MODEL_ON_PROPS": 44, + "44": "X_V_MODEL_ON_PROPS", + "X_INVALID_EXPRESSION": 45, + "45": "X_INVALID_EXPRESSION", + "X_KEEP_ALIVE_INVALID_CHILDREN": 46, + "46": "X_KEEP_ALIVE_INVALID_CHILDREN", + "X_PREFIX_ID_NOT_SUPPORTED": 47, + "47": "X_PREFIX_ID_NOT_SUPPORTED", + "X_MODULE_MODE_NOT_SUPPORTED": 48, + "48": "X_MODULE_MODE_NOT_SUPPORTED", + "X_CACHE_HANDLER_NOT_SUPPORTED": 49, + "49": "X_CACHE_HANDLER_NOT_SUPPORTED", + "X_SCOPE_ID_NOT_SUPPORTED": 50, + "50": "X_SCOPE_ID_NOT_SUPPORTED", + "X_VNODE_HOOKS": 51, + "51": "X_VNODE_HOOKS", + "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52, + "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT", + "__EXTEND_POINT__": 53, + "53": "__EXTEND_POINT__" +}; +const errorMessages = { + // parse errors + [0]: "Illegal comment.", + [1]: "CDATA section is allowed only in XML context.", + [2]: "Duplicate attribute.", + [3]: "End tag cannot have attributes.", + [4]: "Illegal '/' in tags.", + [5]: "Unexpected EOF in tag.", + [6]: "Unexpected EOF in CDATA section.", + [7]: "Unexpected EOF in comment.", + [8]: "Unexpected EOF in script.", + [9]: "Unexpected EOF in tag.", + [10]: "Incorrectly closed comment.", + [11]: "Incorrectly opened comment.", + [12]: "Illegal tag name. Use '<' to print '<'.", + [13]: "Attribute value was expected.", + [14]: "End tag name was expected.", + [15]: "Whitespace was expected.", + [16]: "Unexpected '<!--' in comment.", + [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, + [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", + [19]: "Attribute name cannot start with '='.", + [21]: "'<?' is allowed only in XML context.", + [20]: `Unexpected null character.`, + [22]: "Illegal '/' in tags.", + // Vue-specific parse errors + [23]: "Invalid end tag.", + [24]: "Element is missing end tag.", + [25]: "Interpolation end sign was not found.", + [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", + [26]: "Legal directive name was expected.", + // transform errors + [28]: `v-if/v-else-if is missing expression.`, + [29]: `v-if/else branches must use unique keys.`, + [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, + [31]: `v-for is missing expression.`, + [32]: `v-for has invalid expression.`, + [33]: `<template v-for> key should be placed on the <template> tag.`, + [34]: `v-bind is missing expression.`, + [52]: `v-bind with same-name shorthand only allows static argument.`, + [35]: `v-on is missing expression.`, + [36]: `Unexpected custom directive on <slot> outlet.`, + [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, + [38]: `Duplicate slot names found. `, + [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, + [40]: `v-slot can only be used on components or <template> tags.`, + [41]: `v-model is missing expression.`, + [42]: `v-model value must be a valid JavaScript member expression.`, + [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, + [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. +Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, + [45]: `Error parsing JavaScript expression: `, + [46]: `<KeepAlive> expects exactly one child component.`, + [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, + // generic errors + [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, + [48]: `ES module mode is not supported in this build of compiler.`, + [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, + [50]: `"scopeId" option is only supported in module mode.`, + // just to fulfill types + [53]: `` +}; + +function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { + const rootExp = root.type === "Program" ? root.body[0].type === "ExpressionStatement" && root.body[0].expression : root; + estreeWalker.walk(root, { + enter(node, parent) { + parent && parentStack.push(parent); + if (parent && parent.type.startsWith("TS") && !TS_NODE_TYPES.includes(parent.type)) { + return this.skip(); + } + if (node.type === "Identifier") { + const isLocal = !!knownIds[node.name]; + const isRefed = isReferencedIdentifier(node, parent, parentStack); + if (includeAll || isRefed && !isLocal) { + onIdentifier(node, parent, parentStack, isRefed, isLocal); + } + } else if (node.type === "ObjectProperty" && // eslint-disable-next-line no-restricted-syntax + (parent == null ? void 0 : parent.type) === "ObjectPattern") { + node.inPattern = true; + } else if (isFunctionType(node)) { + if (node.scopeIds) { + node.scopeIds.forEach((id) => markKnownIds(id, knownIds)); + } else { + walkFunctionParams( + node, + (id) => markScopeIdentifier(node, id, knownIds) + ); + } + } else if (node.type === "BlockStatement") { + if (node.scopeIds) { + node.scopeIds.forEach((id) => markKnownIds(id, knownIds)); + } else { + walkBlockDeclarations( + node, + (id) => markScopeIdentifier(node, id, knownIds) + ); + } + } else if (node.type === "CatchClause" && node.param) { + for (const id of extractIdentifiers(node.param)) { + markScopeIdentifier(node, id, knownIds); + } + } else if (isForStatement(node)) { + walkForStatement( + node, + false, + (id) => markScopeIdentifier(node, id, knownIds) + ); + } + }, + leave(node, parent) { + parent && parentStack.pop(); + if (node !== rootExp && node.scopeIds) { + for (const id of node.scopeIds) { + knownIds[id]--; + if (knownIds[id] === 0) { + delete knownIds[id]; + } + } + } + } + }); +} +function isReferencedIdentifier(id, parent, parentStack) { + if (!parent) { + return true; + } + if (id.name === "arguments") { + return false; + } + if (isReferenced(id, parent)) { + return true; + } + switch (parent.type) { + case "AssignmentExpression": + case "AssignmentPattern": + return true; + case "ObjectPattern": + case "ArrayPattern": + return isInDestructureAssignment(parent, parentStack); + } + return false; +} +function isInDestructureAssignment(parent, parentStack) { + if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "AssignmentExpression") { + return true; + } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) { + break; + } + } + } + return false; +} +function isInNewExpression(parentStack) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "NewExpression") { + return true; + } else if (p.type !== "MemberExpression") { + break; + } + } + return false; +} +function walkFunctionParams(node, onIdent) { + for (const p of node.params) { + for (const id of extractIdentifiers(p)) { + onIdent(id); + } + } +} +function walkBlockDeclarations(block, onIdent) { + for (const stmt of block.body) { + if (stmt.type === "VariableDeclaration") { + if (stmt.declare) continue; + for (const decl of stmt.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { + if (stmt.declare || !stmt.id) continue; + onIdent(stmt.id); + } else if (isForStatement(stmt)) { + walkForStatement(stmt, true, onIdent); + } + } +} +function isForStatement(stmt) { + return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement"; +} +function walkForStatement(stmt, isVar, onIdent) { + const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left; + if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) { + for (const decl of variable.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } +} +function extractIdentifiers(param, nodes = []) { + switch (param.type) { + case "Identifier": + nodes.push(param); + break; + case "MemberExpression": + let object = param; + while (object.type === "MemberExpression") { + object = object.object; + } + nodes.push(object); + break; + case "ObjectPattern": + for (const prop of param.properties) { + if (prop.type === "RestElement") { + extractIdentifiers(prop.argument, nodes); + } else { + extractIdentifiers(prop.value, nodes); + } + } + break; + case "ArrayPattern": + param.elements.forEach((element) => { + if (element) extractIdentifiers(element, nodes); + }); + break; + case "RestElement": + extractIdentifiers(param.argument, nodes); + break; + case "AssignmentPattern": + extractIdentifiers(param.left, nodes); + break; + } + return nodes; +} +function markKnownIds(name, knownIds) { + if (name in knownIds) { + knownIds[name]++; + } else { + knownIds[name] = 1; + } +} +function markScopeIdentifier(node, child, knownIds) { + const { name } = child; + if (node.scopeIds && node.scopeIds.has(name)) { + return; + } + markKnownIds(name, knownIds); + (node.scopeIds || (node.scopeIds = /* @__PURE__ */ new Set())).add(name); +} +const isFunctionType = (node) => { + return /Function(?:Expression|Declaration)$|Method$/.test(node.type); +}; +const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed; +const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; +function isReferenced(node, parent, grandparent) { + switch (parent.type) { + // yes: PARENT[NODE] + // yes: NODE.child + // no: parent.NODE + case "MemberExpression": + case "OptionalMemberExpression": + if (parent.property === node) { + return !!parent.computed; + } + return parent.object === node; + case "JSXMemberExpression": + return parent.object === node; + // no: let NODE = init; + // yes: let id = NODE; + case "VariableDeclarator": + return parent.init === node; + // yes: () => NODE + // no: (NODE) => {} + case "ArrowFunctionExpression": + return parent.body === node; + // no: class { #NODE; } + // no: class { get #NODE() {} } + // no: class { #NODE() {} } + // no: class { fn() { return this.#NODE; } } + case "PrivateName": + return false; + // no: class { NODE() {} } + // yes: class { [NODE]() {} } + // no: class { foo(NODE) {} } + case "ClassMethod": + case "ClassPrivateMethod": + case "ObjectMethod": + if (parent.key === node) { + return !!parent.computed; + } + return false; + // yes: { [NODE]: "" } + // no: { NODE: "" } + // depends: { NODE } + // depends: { key: NODE } + case "ObjectProperty": + if (parent.key === node) { + return !!parent.computed; + } + return !grandparent; + // no: class { NODE = value; } + // yes: class { [NODE] = value; } + // yes: class { key = NODE; } + case "ClassProperty": + if (parent.key === node) { + return !!parent.computed; + } + return true; + case "ClassPrivateProperty": + return parent.key !== node; + // no: class NODE {} + // yes: class Foo extends NODE {} + case "ClassDeclaration": + case "ClassExpression": + return parent.superClass === node; + // yes: left = NODE; + // no: NODE = right; + case "AssignmentExpression": + return parent.right === node; + // no: [NODE = foo] = []; + // yes: [foo = NODE] = []; + case "AssignmentPattern": + return parent.right === node; + // no: NODE: for (;;) {} + case "LabeledStatement": + return false; + // no: try {} catch (NODE) {} + case "CatchClause": + return false; + // no: function foo(...NODE) {} + case "RestElement": + return false; + case "BreakStatement": + case "ContinueStatement": + return false; + // no: function NODE() {} + // no: function foo(NODE) {} + case "FunctionDeclaration": + case "FunctionExpression": + return false; + // no: export NODE from "foo"; + // no: export * as NODE from "foo"; + case "ExportNamespaceSpecifier": + case "ExportDefaultSpecifier": + return false; + // no: export { foo as NODE }; + // yes: export { NODE as foo }; + // no: export { NODE as foo } from "foo"; + case "ExportSpecifier": + return parent.local === node; + // no: import NODE from "foo"; + // no: import * as NODE from "foo"; + // no: import { NODE as foo } from "foo"; + // no: import { foo as NODE } from "foo"; + // no: import NODE from "bar"; + case "ImportDefaultSpecifier": + case "ImportNamespaceSpecifier": + case "ImportSpecifier": + return false; + // no: import "foo" assert { NODE: "json" } + case "ImportAttribute": + return false; + // no: <div NODE="foo" /> + case "JSXAttribute": + return false; + // no: [NODE] = []; + // no: ({ NODE }) = []; + case "ObjectPattern": + case "ArrayPattern": + return false; + // no: new.NODE + // no: NODE.target + case "MetaProperty": + return false; + // yes: type X = { someProperty: NODE } + // no: type X = { NODE: OtherType } + case "ObjectTypeProperty": + return parent.key !== node; + // yes: enum X { Foo = NODE } + // no: enum X { NODE } + case "TSEnumMember": + return parent.id !== node; + // yes: { [NODE]: value } + // no: { NODE: value } + case "TSPropertySignature": + if (parent.key === node) { + return !!parent.computed; + } + return true; + } + return true; +} +const TS_NODE_TYPES = [ + "TSAsExpression", + // foo as number + "TSTypeAssertion", + // (<number>foo) + "TSNonNullExpression", + // foo! + "TSInstantiationExpression", + // foo<string> + "TSSatisfiesExpression" + // foo satisfies T +]; +function unwrapTSNode(node) { + if (TS_NODE_TYPES.includes(node.type)) { + return unwrapTSNode(node.expression); + } else { + return node; + } +} + +const isStaticExp = (p) => p.type === 4 && p.isStatic; +function isCoreComponent(tag) { + switch (tag) { + case "Teleport": + case "teleport": + return TELEPORT; + case "Suspense": + case "suspense": + return SUSPENSE; + case "KeepAlive": + case "keep-alive": + return KEEP_ALIVE; + case "BaseTransition": + case "base-transition": + return BASE_TRANSITION; + } +} +const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/; +const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); +const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; +const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; +const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; +const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source; +const isMemberExpressionBrowser = (exp) => { + const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim()); + let state = 0 /* inMemberExp */; + let stateStack = []; + let currentOpenBracketCount = 0; + let currentOpenParensCount = 0; + let currentStringType = null; + for (let i = 0; i < path.length; i++) { + const char = path.charAt(i); + switch (state) { + case 0 /* inMemberExp */: + if (char === "[") { + stateStack.push(state); + state = 1 /* inBrackets */; + currentOpenBracketCount++; + } else if (char === "(") { + stateStack.push(state); + state = 2 /* inParens */; + currentOpenParensCount++; + } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { + return false; + } + break; + case 1 /* inBrackets */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `[`) { + currentOpenBracketCount++; + } else if (char === `]`) { + if (!--currentOpenBracketCount) { + state = stateStack.pop(); + } + } + break; + case 2 /* inParens */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `(`) { + currentOpenParensCount++; + } else if (char === `)`) { + if (i === path.length - 1) { + return false; + } + if (!--currentOpenParensCount) { + state = stateStack.pop(); + } + } + break; + case 3 /* inString */: + if (char === currentStringType) { + state = stateStack.pop(); + currentStringType = null; + } + break; + } + } + return !currentOpenBracketCount && !currentOpenParensCount; +}; +const isMemberExpressionNode = (exp, context) => { + try { + let ret = exp.ast || parser.parseExpression(getExpSource(exp), { + plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"] + }); + ret = unwrapTSNode(ret); + return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier" && ret.name !== "undefined"; + } catch (e) { + return false; + } +}; +const isMemberExpression = isMemberExpressionNode; +const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; +const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp)); +const isFnExpressionNode = (exp, context) => { + try { + let ret = exp.ast || parser.parseExpression(getExpSource(exp), { + plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"] + }); + if (ret.type === "Program") { + ret = ret.body[0]; + if (ret.type === "ExpressionStatement") { + ret = ret.expression; + } + } + ret = unwrapTSNode(ret); + return ret.type === "FunctionExpression" || ret.type === "ArrowFunctionExpression"; + } catch (e) { + return false; + } +}; +const isFnExpression = isFnExpressionNode; +function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { + return advancePositionWithMutation( + { + offset: pos.offset, + line: pos.line, + column: pos.column + }, + source, + numberOfCharacters + ); +} +function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { + let linesCount = 0; + let lastNewLinePos = -1; + for (let i = 0; i < numberOfCharacters; i++) { + if (source.charCodeAt(i) === 10) { + linesCount++; + lastNewLinePos = i; + } + } + pos.offset += numberOfCharacters; + pos.line += linesCount; + pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos; + return pos; +} +function assert(condition, msg) { + if (!condition) { + throw new Error(msg || `unexpected compiler condition`); + } +} +function findDir(node, name, allowEmpty = false) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (allowEmpty || p.exp) && (shared.isString(name) ? p.name === name : name.test(p.name))) { + return p; + } + } +} +function findProp(node, name, dynamicOnly = false, allowEmpty = false) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (dynamicOnly) continue; + if (p.name === name && (p.value || allowEmpty)) { + return p; + } + } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { + return p; + } + } +} +function isStaticArgOf(arg, name) { + return !!(arg && isStaticExp(arg) && arg.content === name); +} +function hasDynamicKeyVBind(node) { + return node.props.some( + (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" + p.arg.type !== 4 || // v-bind:[_ctx.foo] + !p.arg.isStatic) + // v-bind:[foo] + ); +} +function isText$1(node) { + return node.type === 5 || node.type === 2; +} +function isVSlot(p) { + return p.type === 7 && p.name === "slot"; +} +function isTemplateNode(node) { + return node.type === 1 && node.tagType === 3; +} +function isSlotOutlet(node) { + return node.type === 1 && node.tagType === 2; +} +const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); +function getUnnormalizedProps(props, callPath = []) { + if (props && !shared.isString(props) && props.type === 14) { + const callee = props.callee; + if (!shared.isString(callee) && propsHelperSet.has(callee)) { + return getUnnormalizedProps( + props.arguments[0], + callPath.concat(props) + ); + } + } + return [props, callPath]; +} +function injectProp(node, prop, context) { + let propsWithInjection; + let props = node.type === 13 ? node.props : node.arguments[2]; + let callPath = []; + let parentCall; + if (props && !shared.isString(props) && props.type === 14) { + const ret = getUnnormalizedProps(props); + props = ret[0]; + callPath = ret[1]; + parentCall = callPath[callPath.length - 1]; + } + if (props == null || shared.isString(props)) { + propsWithInjection = createObjectExpression([prop]); + } else if (props.type === 14) { + const first = props.arguments[0]; + if (!shared.isString(first) && first.type === 15) { + if (!hasProp(prop, first)) { + first.properties.unshift(prop); + } + } else { + if (props.callee === TO_HANDLERS) { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + } else { + props.arguments.unshift(createObjectExpression([prop])); + } + } + !propsWithInjection && (propsWithInjection = props); + } else if (props.type === 15) { + if (!hasProp(prop, props)) { + props.properties.unshift(prop); + } + propsWithInjection = props; + } else { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { + parentCall = callPath[callPath.length - 2]; + } + } + if (node.type === 13) { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.props = propsWithInjection; + } + } else { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.arguments[2] = propsWithInjection; + } + } +} +function hasProp(prop, props) { + let result = false; + if (prop.key.type === 4) { + const propKeyName = prop.key.content; + result = props.properties.some( + (p) => p.key.type === 4 && p.key.content === propKeyName + ); + } + return result; +} +function toValidAssetId(name, type) { + return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { + return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); + })}`; +} +function hasScopeRef(node, ids) { + if (!node || Object.keys(ids).length === 0) { + return false; + } + switch (node.type) { + case 1: + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { + return true; + } + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 11: + if (hasScopeRef(node.source, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 9: + return node.branches.some((b) => hasScopeRef(b, ids)); + case 10: + if (hasScopeRef(node.condition, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 4: + return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content]; + case 8: + return node.children.some((c) => shared.isObject(c) && hasScopeRef(c, ids)); + case 5: + case 12: + return hasScopeRef(node.content, ids); + case 2: + case 3: + case 20: + return false; + default: + return false; + } +} +function getMemoedVNodeCall(node) { + if (node.type === 14 && node.callee === WITH_MEMO) { + return node.arguments[1].returns; + } else { + return node; + } +} +const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/; + +const defaultParserOptions = { + parseMode: "base", + ns: 0, + delimiters: [`{{`, `}}`], + getNamespace: () => 0, + isVoidTag: shared.NO, + isPreTag: shared.NO, + isIgnoreNewlineTag: shared.NO, + isCustomElement: shared.NO, + onError: defaultOnError, + onWarn: defaultOnWarn, + comments: true, + prefixIdentifiers: false +}; +let currentOptions = defaultParserOptions; +let currentRoot = null; +let currentInput = ""; +let currentOpenTag = null; +let currentProp = null; +let currentAttrValue = ""; +let currentAttrStartIndex = -1; +let currentAttrEndIndex = -1; +let inPre = 0; +let inVPre = false; +let currentVPreBoundary = null; +const stack = []; +const tokenizer = new Tokenizer(stack, { + onerr: emitError, + ontext(start, end) { + onText(getSlice(start, end), start, end); + }, + ontextentity(char, start, end) { + onText(char, start, end); + }, + oninterpolation(start, end) { + if (inVPre) { + return onText(getSlice(start, end), start, end); + } + let innerStart = start + tokenizer.delimiterOpen.length; + let innerEnd = end - tokenizer.delimiterClose.length; + while (isWhitespace(currentInput.charCodeAt(innerStart))) { + innerStart++; + } + while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { + innerEnd--; + } + let exp = getSlice(innerStart, innerEnd); + if (exp.includes("&")) { + { + exp = decode_js.decodeHTML(exp); + } + } + addNode({ + type: 5, + content: createExp(exp, false, getLoc(innerStart, innerEnd)), + loc: getLoc(start, end) + }); + }, + onopentagname(start, end) { + const name = getSlice(start, end); + currentOpenTag = { + type: 1, + tag: name, + ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), + tagType: 0, + // will be refined on tag close + props: [], + children: [], + loc: getLoc(start - 1, end), + codegenNode: void 0 + }; + }, + onopentagend(end) { + endOpenTag(end); + }, + onclosetag(start, end) { + const name = getSlice(start, end); + if (!currentOptions.isVoidTag(name)) { + let found = false; + for (let i = 0; i < stack.length; i++) { + const e = stack[i]; + if (e.tag.toLowerCase() === name.toLowerCase()) { + found = true; + if (i > 0) { + emitError(24, stack[0].loc.start.offset); + } + for (let j = 0; j <= i; j++) { + const el = stack.shift(); + onCloseTag(el, end, j < i); + } + break; + } + } + if (!found) { + emitError(23, backTrack(start, 60)); + } + } + }, + onselfclosingtag(end) { + const name = currentOpenTag.tag; + currentOpenTag.isSelfClosing = true; + endOpenTag(end); + if (stack[0] && stack[0].tag === name) { + onCloseTag(stack.shift(), end); + } + }, + onattribname(start, end) { + currentProp = { + type: 6, + name: getSlice(start, end), + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + }, + ondirname(start, end) { + const raw = getSlice(start, end); + const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); + if (!inVPre && name === "") { + emitError(26, start); + } + if (inVPre || name === "") { + currentProp = { + type: 6, + name: raw, + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + } else { + currentProp = { + type: 7, + name, + rawName: raw, + exp: void 0, + arg: void 0, + modifiers: raw === "." ? [createSimpleExpression("prop")] : [], + loc: getLoc(start) + }; + if (name === "pre") { + inVPre = tokenizer.inVPre = true; + currentVPreBoundary = currentOpenTag; + const props = currentOpenTag.props; + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7) { + props[i] = dirToAttr(props[i]); + } + } + } + } + }, + ondirarg(start, end) { + if (start === end) return; + const arg = getSlice(start, end); + if (inVPre) { + currentProp.name += arg; + setLocEnd(currentProp.nameLoc, end); + } else { + const isStatic = arg[0] !== `[`; + currentProp.arg = createExp( + isStatic ? arg : arg.slice(1, -1), + isStatic, + getLoc(start, end), + isStatic ? 3 : 0 + ); + } + }, + ondirmodifier(start, end) { + const mod = getSlice(start, end); + if (inVPre) { + currentProp.name += "." + mod; + setLocEnd(currentProp.nameLoc, end); + } else if (currentProp.name === "slot") { + const arg = currentProp.arg; + if (arg) { + arg.content += "." + mod; + setLocEnd(arg.loc, end); + } + } else { + const exp = createSimpleExpression(mod, true, getLoc(start, end)); + currentProp.modifiers.push(exp); + } + }, + onattribdata(start, end) { + currentAttrValue += getSlice(start, end); + if (currentAttrStartIndex < 0) currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribentity(char, start, end) { + currentAttrValue += char; + if (currentAttrStartIndex < 0) currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribnameend(end) { + const start = currentProp.loc.start.offset; + const name = getSlice(start, end); + if (currentProp.type === 7) { + currentProp.rawName = name; + } + if (currentOpenTag.props.some( + (p) => (p.type === 7 ? p.rawName : p.name) === name + )) { + emitError(2, start); + } + }, + onattribend(quote, end) { + if (currentOpenTag && currentProp) { + setLocEnd(currentProp.loc, end); + if (quote !== 0) { + if (currentProp.type === 6) { + if (currentProp.name === "class") { + currentAttrValue = condense(currentAttrValue).trim(); + } + if (quote === 1 && !currentAttrValue) { + emitError(13, end); + } + currentProp.value = { + type: 2, + content: currentAttrValue, + loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) + }; + if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { + tokenizer.enterRCDATA(toCharCodes(`</template`), 0); + } + } else { + let expParseMode = 0 /* Normal */; + { + if (currentProp.name === "for") { + expParseMode = 3 /* Skip */; + } else if (currentProp.name === "slot") { + expParseMode = 1 /* Params */; + } else if (currentProp.name === "on" && currentAttrValue.includes(";")) { + expParseMode = 2 /* Statements */; + } + } + currentProp.exp = createExp( + currentAttrValue, + false, + getLoc(currentAttrStartIndex, currentAttrEndIndex), + 0, + expParseMode + ); + if (currentProp.name === "for") { + currentProp.forParseResult = parseForExpression(currentProp.exp); + } + let syncIndex = -1; + if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.findIndex( + (mod) => mod.content === "sync" + )) > -1 && checkCompatEnabled( + "COMPILER_V_BIND_SYNC", + currentOptions, + currentProp.loc, + currentProp.rawName + )) { + currentProp.name = "model"; + currentProp.modifiers.splice(syncIndex, 1); + } + } + } + if (currentProp.type !== 7 || currentProp.name !== "pre") { + currentOpenTag.props.push(currentProp); + } + } + currentAttrValue = ""; + currentAttrStartIndex = currentAttrEndIndex = -1; + }, + oncomment(start, end) { + if (currentOptions.comments) { + addNode({ + type: 3, + content: getSlice(start, end), + loc: getLoc(start - 4, end + 3) + }); + } + }, + onend() { + const end = currentInput.length; + if (tokenizer.state !== 1) { + switch (tokenizer.state) { + case 5: + case 8: + emitError(5, end); + break; + case 3: + case 4: + emitError( + 25, + tokenizer.sectionStart + ); + break; + case 28: + if (tokenizer.currentSequence === Sequences.CdataEnd) { + emitError(6, end); + } else { + emitError(7, end); + } + break; + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + // " + case 20: + // ' + case 21: + emitError(9, end); + break; + } + } + for (let index = 0; index < stack.length; index++) { + onCloseTag(stack[index], end - 1); + emitError(24, stack[index].loc.start.offset); + } + }, + oncdata(start, end) { + if (stack[0].ns !== 0) { + onText(getSlice(start, end), start, end); + } else { + emitError(1, start - 9); + } + }, + onprocessinginstruction(start) { + if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + emitError( + 21, + start - 1 + ); + } + } +}); +const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; +const stripParensRE = /^\(|\)$/g; +function parseForExpression(input) { + const loc = input.loc; + const exp = input.content; + const inMatch = exp.match(forAliasRE); + if (!inMatch) return; + const [, LHS, RHS] = inMatch; + const createAliasExpression = (content, offset, asParam = false) => { + const start = loc.start.offset + offset; + const end = start + content.length; + return createExp( + content, + false, + getLoc(start, end), + 0, + asParam ? 1 /* Params */ : 0 /* Normal */ + ); + }; + const result = { + source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), + value: void 0, + key: void 0, + index: void 0, + finalized: false + }; + let valueContent = LHS.trim().replace(stripParensRE, "").trim(); + const trimmedOffset = LHS.indexOf(valueContent); + const iteratorMatch = valueContent.match(forIteratorRE); + if (iteratorMatch) { + valueContent = valueContent.replace(forIteratorRE, "").trim(); + const keyContent = iteratorMatch[1].trim(); + let keyOffset; + if (keyContent) { + keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); + result.key = createAliasExpression(keyContent, keyOffset, true); + } + if (iteratorMatch[2]) { + const indexContent = iteratorMatch[2].trim(); + if (indexContent) { + result.index = createAliasExpression( + indexContent, + exp.indexOf( + indexContent, + result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length + ), + true + ); + } + } + } + if (valueContent) { + result.value = createAliasExpression(valueContent, trimmedOffset, true); + } + return result; +} +function getSlice(start, end) { + return currentInput.slice(start, end); +} +function endOpenTag(end) { + if (tokenizer.inSFCRoot) { + currentOpenTag.innerLoc = getLoc(end + 1, end + 1); + } + addNode(currentOpenTag); + const { tag, ns } = currentOpenTag; + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre++; + } + if (currentOptions.isVoidTag(tag)) { + onCloseTag(currentOpenTag, end); + } else { + stack.unshift(currentOpenTag); + if (ns === 1 || ns === 2) { + tokenizer.inXML = true; + } + } + currentOpenTag = null; +} +function onText(content, start, end) { + const parent = stack[0] || currentRoot; + const lastNode = parent.children[parent.children.length - 1]; + if (lastNode && lastNode.type === 2) { + lastNode.content += content; + setLocEnd(lastNode.loc, end); + } else { + parent.children.push({ + type: 2, + content, + loc: getLoc(start, end) + }); + } +} +function onCloseTag(el, end, isImplied = false) { + if (isImplied) { + setLocEnd(el.loc, backTrack(end, 60)); + } else { + setLocEnd(el.loc, lookAhead(end, 62) + 1); + } + if (tokenizer.inSFCRoot) { + if (el.children.length) { + el.innerLoc.end = shared.extend({}, el.children[el.children.length - 1].loc.end); + } else { + el.innerLoc.end = shared.extend({}, el.innerLoc.start); + } + el.innerLoc.source = getSlice( + el.innerLoc.start.offset, + el.innerLoc.end.offset + ); + } + const { tag, ns, children } = el; + if (!inVPre) { + if (tag === "slot") { + el.tagType = 2; + } else if (isFragmentTemplate(el)) { + el.tagType = 3; + } else if (isComponent(el)) { + el.tagType = 1; + } + } + if (!tokenizer.inRCDATA) { + el.children = condenseWhitespace(children); + } + if (ns === 0 && currentOptions.isIgnoreNewlineTag(tag)) { + const first = children[0]; + if (first && first.type === 2) { + first.content = first.content.replace(/^\r?\n/, ""); + } + } + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre--; + } + if (currentVPreBoundary === el) { + inVPre = tokenizer.inVPre = false; + currentVPreBoundary = null; + } + if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + tokenizer.inXML = false; + } + { + const props = el.props; + if (isCompatEnabled( + "COMPILER_V_IF_V_FOR_PRECEDENCE", + currentOptions + )) { + let hasIf = false; + let hasFor = false; + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 7) { + if (p.name === "if") { + hasIf = true; + } else if (p.name === "for") { + hasFor = true; + } + } + if (hasIf && hasFor) { + warnDeprecation( + "COMPILER_V_IF_V_FOR_PRECEDENCE", + currentOptions, + el.loc + ); + break; + } + } + } + if (!tokenizer.inSFCRoot && isCompatEnabled( + "COMPILER_NATIVE_TEMPLATE", + currentOptions + ) && el.tag === "template" && !isFragmentTemplate(el)) { + warnDeprecation( + "COMPILER_NATIVE_TEMPLATE", + currentOptions, + el.loc + ); + const parent = stack[0] || currentRoot; + const index = parent.children.indexOf(el); + parent.children.splice(index, 1, ...el.children); + } + const inlineTemplateProp = props.find( + (p) => p.type === 6 && p.name === "inline-template" + ); + if (inlineTemplateProp && checkCompatEnabled( + "COMPILER_INLINE_TEMPLATE", + currentOptions, + inlineTemplateProp.loc + ) && el.children.length) { + inlineTemplateProp.value = { + type: 2, + content: getSlice( + el.children[0].loc.start.offset, + el.children[el.children.length - 1].loc.end.offset + ), + loc: inlineTemplateProp.loc + }; + } + } +} +function lookAhead(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1) i++; + return i; +} +function backTrack(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i >= 0) i--; + return i; +} +const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); +function isFragmentTemplate({ tag, props }) { + if (tag === "template") { + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { + return true; + } + } + } + return false; +} +function isComponent({ tag, props }) { + if (currentOptions.isCustomElement(tag)) { + return false; + } + if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { + return true; + } + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 6) { + if (p.name === "is" && p.value) { + if (p.value.content.startsWith("vue:")) { + return true; + } else if (checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + } else if (// :is on plain element - only treat as component in compat mode + p.name === "bind" && isStaticArgOf(p.arg, "is") && checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + return false; +} +function isUpperCase(c) { + return c > 64 && c < 91; +} +const windowsNewlineRE = /\r\n/g; +function condenseWhitespace(nodes, tag) { + const shouldCondense = currentOptions.whitespace !== "preserve"; + let removedWhitespace = false; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (node.type === 2) { + if (!inPre) { + if (isAllWhitespace(node.content)) { + const prev = nodes[i - 1] && nodes[i - 1].type; + const next = nodes[i + 1] && nodes[i + 1].type; + if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { + removedWhitespace = true; + nodes[i] = null; + } else { + node.content = " "; + } + } else if (shouldCondense) { + node.content = condense(node.content); + } + } else { + node.content = node.content.replace(windowsNewlineRE, "\n"); + } + } + } + return removedWhitespace ? nodes.filter(Boolean) : nodes; +} +function isAllWhitespace(str) { + for (let i = 0; i < str.length; i++) { + if (!isWhitespace(str.charCodeAt(i))) { + return false; + } + } + return true; +} +function hasNewlineChar(str) { + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + if (c === 10 || c === 13) { + return true; + } + } + return false; +} +function condense(str) { + let ret = ""; + let prevCharIsWhitespace = false; + for (let i = 0; i < str.length; i++) { + if (isWhitespace(str.charCodeAt(i))) { + if (!prevCharIsWhitespace) { + ret += " "; + prevCharIsWhitespace = true; + } + } else { + ret += str[i]; + prevCharIsWhitespace = false; + } + } + return ret; +} +function addNode(node) { + (stack[0] || currentRoot).children.push(node); +} +function getLoc(start, end) { + return { + start: tokenizer.getPos(start), + // @ts-expect-error allow late attachment + end: end == null ? end : tokenizer.getPos(end), + // @ts-expect-error allow late attachment + source: end == null ? end : getSlice(start, end) + }; +} +function cloneLoc(loc) { + return getLoc(loc.start.offset, loc.end.offset); +} +function setLocEnd(loc, end) { + loc.end = tokenizer.getPos(end); + loc.source = getSlice(loc.start.offset, end); +} +function dirToAttr(dir) { + const attr = { + type: 6, + name: dir.rawName, + nameLoc: getLoc( + dir.loc.start.offset, + dir.loc.start.offset + dir.rawName.length + ), + value: void 0, + loc: dir.loc + }; + if (dir.exp) { + const loc = dir.exp.loc; + if (loc.end.offset < dir.loc.end.offset) { + loc.start.offset--; + loc.start.column--; + loc.end.offset++; + loc.end.column++; + } + attr.value = { + type: 2, + content: dir.exp.content, + loc + }; + } + return attr; +} +function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { + const exp = createSimpleExpression(content, isStatic, loc, constType); + if (!isStatic && currentOptions.prefixIdentifiers && parseMode !== 3 /* Skip */ && content.trim()) { + if (isSimpleIdentifier(content)) { + exp.ast = null; + return exp; + } + try { + const plugins = currentOptions.expressionPlugins; + const options = { + plugins: plugins ? [...plugins, "typescript"] : ["typescript"] + }; + if (parseMode === 2 /* Statements */) { + exp.ast = parser.parse(` ${content} `, options).program; + } else if (parseMode === 1 /* Params */) { + exp.ast = parser.parseExpression(`(${content})=>{}`, options); + } else { + exp.ast = parser.parseExpression(`(${content})`, options); + } + } catch (e) { + exp.ast = false; + emitError(45, loc.start.offset, e.message); + } + } + return exp; +} +function emitError(code, index, message) { + currentOptions.onError( + createCompilerError(code, getLoc(index, index), void 0, message) + ); +} +function reset() { + tokenizer.reset(); + currentOpenTag = null; + currentProp = null; + currentAttrValue = ""; + currentAttrStartIndex = -1; + currentAttrEndIndex = -1; + stack.length = 0; +} +function baseParse(input, options) { + reset(); + currentInput = input; + currentOptions = shared.extend({}, defaultParserOptions); + if (options) { + let key; + for (key in options) { + if (options[key] != null) { + currentOptions[key] = options[key]; + } + } + } + { + if (currentOptions.decodeEntities) { + console.warn( + `[@vue/compiler-core] decodeEntities option is passed but will be ignored in non-browser builds.` + ); + } + } + tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; + tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; + const delimiters = options && options.delimiters; + if (delimiters) { + tokenizer.delimiterOpen = toCharCodes(delimiters[0]); + tokenizer.delimiterClose = toCharCodes(delimiters[1]); + } + const root = currentRoot = createRoot([], input); + tokenizer.parse(currentInput); + root.loc = getLoc(0, input.length); + root.children = condenseWhitespace(root.children); + currentRoot = null; + return root; +} + +function cacheStatic(root, context) { + walk( + root, + void 0, + context, + // Root node is unfortunately non-hoistable due to potential parent + // fallthrough attributes. + isSingleElementRoot(root, root.children[0]) + ); +} +function isSingleElementRoot(root, child) { + const { children } = root; + return children.length === 1 && child.type === 1 && !isSlotOutlet(child); +} +function walk(node, parent, context, doNotHoistNode = false, inFor = false) { + const { children } = node; + const toCache = []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.type === 1 && child.tagType === 0) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType > 0) { + if (constantType >= 2) { + child.codegenNode.patchFlag = -1; + toCache.push(child); + continue; + } + } else { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + const flag = codegenNode.patchFlag; + if ((flag === void 0 || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { + const props = getNodeProps(child); + if (props) { + codegenNode.props = context.hoist(props); + } + } + if (codegenNode.dynamicProps) { + codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); + } + } + } + } else if (child.type === 12) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType >= 2) { + toCache.push(child); + continue; + } + } + if (child.type === 1) { + const isComponent = child.tagType === 1; + if (isComponent) { + context.scopes.vSlot++; + } + walk(child, node, context, false, inFor); + if (isComponent) { + context.scopes.vSlot--; + } + } else if (child.type === 11) { + walk(child, node, context, child.children.length === 1, true); + } else if (child.type === 9) { + for (let i2 = 0; i2 < child.branches.length; i2++) { + walk( + child.branches[i2], + node, + context, + child.branches[i2].children.length === 1, + inFor + ); + } + } + } + let cachedAsArray = false; + if (toCache.length === children.length && node.type === 1) { + if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && shared.isArray(node.codegenNode.children)) { + node.codegenNode.children = getCacheExpression( + createArrayExpression(node.codegenNode.children) + ); + cachedAsArray = true; + } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !shared.isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) { + const slot = getSlotNode(node.codegenNode, "default"); + if (slot) { + slot.returns = getCacheExpression( + createArrayExpression(slot.returns) + ); + cachedAsArray = true; + } + } else if (node.tagType === 3 && parent && parent.type === 1 && parent.tagType === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !shared.isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 15) { + const slotName = findDir(node, "slot", true); + const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg); + if (slot) { + slot.returns = getCacheExpression( + createArrayExpression(slot.returns) + ); + cachedAsArray = true; + } + } + } + if (!cachedAsArray) { + for (const child of toCache) { + child.codegenNode = context.cache(child.codegenNode); + } + } + function getCacheExpression(value) { + const exp = context.cache(value); + if (inFor && context.hmr) { + exp.needArraySpread = true; + } + return exp; + } + function getSlotNode(node2, name) { + if (node2.children && !shared.isArray(node2.children) && node2.children.type === 15) { + const slot = node2.children.properties.find( + (p) => p.key === name || p.key.content === name + ); + return slot && slot.value; + } + } + if (toCache.length && context.transformHoist) { + context.transformHoist(children, context, node); + } +} +function getConstantType(node, context) { + const { constantCache } = context; + switch (node.type) { + case 1: + if (node.tagType !== 0) { + return 0; + } + const cached = constantCache.get(node); + if (cached !== void 0) { + return cached; + } + const codegenNode = node.codegenNode; + if (codegenNode.type !== 13) { + return 0; + } + if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject" && node.tag !== "math") { + return 0; + } + if (codegenNode.patchFlag === void 0) { + let returnType2 = 3; + const generatedPropsType = getGeneratedPropsConstantType(node, context); + if (generatedPropsType === 0) { + constantCache.set(node, 0); + return 0; + } + if (generatedPropsType < returnType2) { + returnType2 = generatedPropsType; + } + for (let i = 0; i < node.children.length; i++) { + const childType = getConstantType(node.children[i], context); + if (childType === 0) { + constantCache.set(node, 0); + return 0; + } + if (childType < returnType2) { + returnType2 = childType; + } + } + if (returnType2 > 1) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && p.name === "bind" && p.exp) { + const expType = getConstantType(p.exp, context); + if (expType === 0) { + constantCache.set(node, 0); + return 0; + } + if (expType < returnType2) { + returnType2 = expType; + } + } + } + } + if (codegenNode.isBlock) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7) { + constantCache.set(node, 0); + return 0; + } + } + context.removeHelper(OPEN_BLOCK); + context.removeHelper( + getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) + ); + codegenNode.isBlock = false; + context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); + } + constantCache.set(node, returnType2); + return returnType2; + } else { + constantCache.set(node, 0); + return 0; + } + case 2: + case 3: + return 3; + case 9: + case 11: + case 10: + return 0; + case 5: + case 12: + return getConstantType(node.content, context); + case 4: + return node.constType; + case 8: + let returnType = 3; + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (shared.isString(child) || shared.isSymbol(child)) { + continue; + } + const childType = getConstantType(child, context); + if (childType === 0) { + return 0; + } else if (childType < returnType) { + returnType = childType; + } + } + return returnType; + case 20: + return 2; + default: + return 0; + } +} +const allowHoistedHelperSet = /* @__PURE__ */ new Set([ + NORMALIZE_CLASS, + NORMALIZE_STYLE, + NORMALIZE_PROPS, + GUARD_REACTIVE_PROPS +]); +function getConstantTypeOfHelperCall(value, context) { + if (value.type === 14 && !shared.isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { + const arg = value.arguments[0]; + if (arg.type === 4) { + return getConstantType(arg, context); + } else if (arg.type === 14) { + return getConstantTypeOfHelperCall(arg, context); + } + } + return 0; +} +function getGeneratedPropsConstantType(node, context) { + let returnType = 3; + const props = getNodeProps(node); + if (props && props.type === 15) { + const { properties } = props; + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + const keyType = getConstantType(key, context); + if (keyType === 0) { + return keyType; + } + if (keyType < returnType) { + returnType = keyType; + } + let valueType; + if (value.type === 4) { + valueType = getConstantType(value, context); + } else if (value.type === 14) { + valueType = getConstantTypeOfHelperCall(value, context); + } else { + valueType = 0; + } + if (valueType === 0) { + return valueType; + } + if (valueType < returnType) { + returnType = valueType; + } + } + } + return returnType; +} +function getNodeProps(node) { + const codegenNode = node.codegenNode; + if (codegenNode.type === 13) { + return codegenNode.props; + } +} + +function createTransformContext(root, { + filename = "", + prefixIdentifiers = false, + hoistStatic = false, + hmr = false, + cacheHandlers = false, + nodeTransforms = [], + directiveTransforms = {}, + transformHoist = null, + isBuiltInComponent = shared.NOOP, + isCustomElement = shared.NOOP, + expressionPlugins = [], + scopeId = null, + slotted = true, + ssr = false, + inSSR = false, + ssrCssVars = ``, + bindingMetadata = shared.EMPTY_OBJ, + inline = false, + isTS = false, + onError = defaultOnError, + onWarn = defaultOnWarn, + compatConfig +}) { + const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); + const context = { + // options + filename, + selfName: nameMatch && shared.capitalize(shared.camelize(nameMatch[1])), + prefixIdentifiers, + hoistStatic, + hmr, + cacheHandlers, + nodeTransforms, + directiveTransforms, + transformHoist, + isBuiltInComponent, + isCustomElement, + expressionPlugins, + scopeId, + slotted, + ssr, + inSSR, + ssrCssVars, + bindingMetadata, + inline, + isTS, + onError, + onWarn, + compatConfig, + // state + root, + helpers: /* @__PURE__ */ new Map(), + components: /* @__PURE__ */ new Set(), + directives: /* @__PURE__ */ new Set(), + hoists: [], + imports: [], + cached: [], + constantCache: /* @__PURE__ */ new WeakMap(), + temps: 0, + identifiers: /* @__PURE__ */ Object.create(null), + scopes: { + vFor: 0, + vSlot: 0, + vPre: 0, + vOnce: 0 + }, + parent: null, + grandParent: null, + currentNode: root, + childIndex: 0, + inVOnce: false, + // methods + helper(name) { + const count = context.helpers.get(name) || 0; + context.helpers.set(name, count + 1); + return name; + }, + removeHelper(name) { + const count = context.helpers.get(name); + if (count) { + const currentCount = count - 1; + if (!currentCount) { + context.helpers.delete(name); + } else { + context.helpers.set(name, currentCount); + } + } + }, + helperString(name) { + return `_${helperNameMap[context.helper(name)]}`; + }, + replaceNode(node) { + { + if (!context.currentNode) { + throw new Error(`Node being replaced is already removed.`); + } + if (!context.parent) { + throw new Error(`Cannot replace root node.`); + } + } + context.parent.children[context.childIndex] = context.currentNode = node; + }, + removeNode(node) { + if (!context.parent) { + throw new Error(`Cannot remove root node.`); + } + const list = context.parent.children; + const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; + if (removalIndex < 0) { + throw new Error(`node being removed is not a child of current parent`); + } + if (!node || node === context.currentNode) { + context.currentNode = null; + context.onNodeRemoved(); + } else { + if (context.childIndex > removalIndex) { + context.childIndex--; + context.onNodeRemoved(); + } + } + context.parent.children.splice(removalIndex, 1); + }, + onNodeRemoved: shared.NOOP, + addIdentifiers(exp) { + { + if (shared.isString(exp)) { + addId(exp); + } else if (exp.identifiers) { + exp.identifiers.forEach(addId); + } else if (exp.type === 4) { + addId(exp.content); + } + } + }, + removeIdentifiers(exp) { + { + if (shared.isString(exp)) { + removeId(exp); + } else if (exp.identifiers) { + exp.identifiers.forEach(removeId); + } else if (exp.type === 4) { + removeId(exp.content); + } + } + }, + hoist(exp) { + if (shared.isString(exp)) exp = createSimpleExpression(exp); + context.hoists.push(exp); + const identifier = createSimpleExpression( + `_hoisted_${context.hoists.length}`, + false, + exp.loc, + 2 + ); + identifier.hoisted = exp; + return identifier; + }, + cache(exp, isVNode = false, inVOnce = false) { + const cacheExp = createCacheExpression( + context.cached.length, + exp, + isVNode, + inVOnce + ); + context.cached.push(cacheExp); + return cacheExp; + } + }; + { + context.filters = /* @__PURE__ */ new Set(); + } + function addId(id) { + const { identifiers } = context; + if (identifiers[id] === void 0) { + identifiers[id] = 0; + } + identifiers[id]++; + } + function removeId(id) { + context.identifiers[id]--; + } + return context; +} +function transform(root, options) { + const context = createTransformContext(root, options); + traverseNode(root, context); + if (options.hoistStatic) { + cacheStatic(root, context); + } + if (!options.ssr) { + createRootCodegen(root, context); + } + root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); + root.components = [...context.components]; + root.directives = [...context.directives]; + root.imports = context.imports; + root.hoists = context.hoists; + root.temps = context.temps; + root.cached = context.cached; + root.transformed = true; + { + root.filters = [...context.filters]; + } +} +function createRootCodegen(root, context) { + const { helper } = context; + const { children } = root; + if (children.length === 1) { + const child = children[0]; + if (isSingleElementRoot(root, child) && child.codegenNode) { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + convertToBlock(codegenNode, context); + } + root.codegenNode = codegenNode; + } else { + root.codegenNode = child; + } + } else if (children.length > 1) { + let patchFlag = 64; + if (children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + } + root.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + root.children, + patchFlag, + void 0, + void 0, + true, + void 0, + false + ); + } else ; +} +function traverseChildren(parent, context) { + let i = 0; + const nodeRemoved = () => { + i--; + }; + for (; i < parent.children.length; i++) { + const child = parent.children[i]; + if (shared.isString(child)) continue; + context.grandParent = context.parent; + context.parent = parent; + context.childIndex = i; + context.onNodeRemoved = nodeRemoved; + traverseNode(child, context); + } +} +function traverseNode(node, context) { + context.currentNode = node; + const { nodeTransforms } = context; + const exitFns = []; + for (let i2 = 0; i2 < nodeTransforms.length; i2++) { + const onExit = nodeTransforms[i2](node, context); + if (onExit) { + if (shared.isArray(onExit)) { + exitFns.push(...onExit); + } else { + exitFns.push(onExit); + } + } + if (!context.currentNode) { + return; + } else { + node = context.currentNode; + } + } + switch (node.type) { + case 3: + if (!context.ssr) { + context.helper(CREATE_COMMENT); + } + break; + case 5: + if (!context.ssr) { + context.helper(TO_DISPLAY_STRING); + } + break; + // for container types, further traverse downwards + case 9: + for (let i2 = 0; i2 < node.branches.length; i2++) { + traverseNode(node.branches[i2], context); + } + break; + case 10: + case 11: + case 1: + case 0: + traverseChildren(node, context); + break; + } + context.currentNode = node; + let i = exitFns.length; + while (i--) { + exitFns[i](); + } +} +function createStructuralDirectiveTransform(name, fn) { + const matches = shared.isString(name) ? (n) => n === name : (n) => name.test(n); + return (node, context) => { + if (node.type === 1) { + const { props } = node; + if (node.tagType === 3 && props.some(isVSlot)) { + return; + } + const exitFns = []; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 7 && matches(prop.name)) { + props.splice(i, 1); + i--; + const onExit = fn(node, prop, context); + if (onExit) exitFns.push(onExit); + } + } + return exitFns; + } + }; +} + +const PURE_ANNOTATION = `/*@__PURE__*/`; +const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; +function createCodegenContext(ast, { + mode = "function", + prefixIdentifiers = mode === "module", + sourceMap = false, + filename = `template.vue.html`, + scopeId = null, + optimizeImports = false, + runtimeGlobalName = `Vue`, + runtimeModuleName = `vue`, + ssrRuntimeModuleName = "vue/server-renderer", + ssr = false, + isTS = false, + inSSR = false +}) { + const context = { + mode, + prefixIdentifiers, + sourceMap, + filename, + scopeId, + optimizeImports, + runtimeGlobalName, + runtimeModuleName, + ssrRuntimeModuleName, + ssr, + isTS, + inSSR, + source: ast.source, + code: ``, + column: 1, + line: 1, + offset: 0, + indentLevel: 0, + pure: false, + map: void 0, + helper(key) { + return `_${helperNameMap[key]}`; + }, + push(code, newlineIndex = -2 /* None */, node) { + context.code += code; + if (context.map) { + if (node) { + let name; + if (node.type === 4 && !node.isStatic) { + const content = node.content.replace(/^_ctx\./, ""); + if (content !== node.content && isSimpleIdentifier(content)) { + name = content; + } + } + addMapping(node.loc.start, name); + } + if (newlineIndex === -3 /* Unknown */) { + advancePositionWithMutation(context, code); + } else { + context.offset += code.length; + if (newlineIndex === -2 /* None */) { + context.column += code.length; + } else { + if (newlineIndex === -1 /* End */) { + newlineIndex = code.length - 1; + } + context.line++; + context.column = code.length - newlineIndex; + } + } + if (node && node.loc !== locStub) { + addMapping(node.loc.end); + } + } + }, + indent() { + newline(++context.indentLevel); + }, + deindent(withoutNewLine = false) { + if (withoutNewLine) { + --context.indentLevel; + } else { + newline(--context.indentLevel); + } + }, + newline() { + newline(context.indentLevel); + } + }; + function newline(n) { + context.push("\n" + ` `.repeat(n), 0 /* Start */); + } + function addMapping(loc, name = null) { + const { _names, _mappings } = context.map; + if (name !== null && !_names.has(name)) _names.add(name); + _mappings.add({ + originalLine: loc.line, + originalColumn: loc.column - 1, + // source-map column is 0 based + generatedLine: context.line, + generatedColumn: context.column - 1, + source: filename, + name + }); + } + if (sourceMap) { + context.map = new sourceMapJs.SourceMapGenerator(); + context.map.setSourceContent(filename, context.source); + context.map._sources.add(filename); + } + return context; +} +function generate(ast, options = {}) { + const context = createCodegenContext(ast, options); + if (options.onContextCreated) options.onContextCreated(context); + const { + mode, + push, + prefixIdentifiers, + indent, + deindent, + newline, + scopeId, + ssr + } = context; + const helpers = Array.from(ast.helpers); + const hasHelpers = helpers.length > 0; + const useWithBlock = !prefixIdentifiers && mode !== "module"; + const genScopeId = scopeId != null && mode === "module"; + const isSetupInlined = !!options.inline; + const preambleContext = isSetupInlined ? createCodegenContext(ast, options) : context; + if (mode === "module") { + genModulePreamble(ast, preambleContext, genScopeId, isSetupInlined); + } else { + genFunctionPreamble(ast, preambleContext); + } + const functionName = ssr ? `ssrRender` : `render`; + const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; + if (options.bindingMetadata && !options.inline) { + args.push("$props", "$setup", "$data", "$options"); + } + const signature = options.isTS ? args.map((arg) => `${arg}: any`).join(",") : args.join(", "); + if (isSetupInlined) { + push(`(${signature}) => {`); + } else { + push(`function ${functionName}(${signature}) {`); + } + indent(); + if (useWithBlock) { + push(`with (_ctx) {`); + indent(); + if (hasHelpers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue +`, + -1 /* End */ + ); + newline(); + } + } + if (ast.components.length) { + genAssets(ast.components, "component", context); + if (ast.directives.length || ast.temps > 0) { + newline(); + } + } + if (ast.directives.length) { + genAssets(ast.directives, "directive", context); + if (ast.temps > 0) { + newline(); + } + } + if (ast.filters && ast.filters.length) { + newline(); + genAssets(ast.filters, "filter", context); + newline(); + } + if (ast.temps > 0) { + push(`let `); + for (let i = 0; i < ast.temps; i++) { + push(`${i > 0 ? `, ` : ``}_temp${i}`); + } + } + if (ast.components.length || ast.directives.length || ast.temps) { + push(` +`, 0 /* Start */); + newline(); + } + if (!ssr) { + push(`return `); + } + if (ast.codegenNode) { + genNode(ast.codegenNode, context); + } else { + push(`null`); + } + if (useWithBlock) { + deindent(); + push(`}`); + } + deindent(); + push(`}`); + return { + ast, + code: context.code, + preamble: isSetupInlined ? preambleContext.code : ``, + map: context.map ? context.map.toJSON() : void 0 + }; +} +function genFunctionPreamble(ast, context) { + const { + ssr, + prefixIdentifiers, + push, + newline, + runtimeModuleName, + runtimeGlobalName, + ssrRuntimeModuleName + } = context; + const VueBinding = ssr ? `require(${JSON.stringify(runtimeModuleName)})` : runtimeGlobalName; + const helpers = Array.from(ast.helpers); + if (helpers.length > 0) { + if (prefixIdentifiers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = ${VueBinding} +`, + -1 /* End */ + ); + } else { + push(`const _Vue = ${VueBinding} +`, -1 /* End */); + if (ast.hoists.length) { + const staticHelpers = [ + CREATE_VNODE, + CREATE_ELEMENT_VNODE, + CREATE_COMMENT, + CREATE_TEXT, + CREATE_STATIC + ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); + push(`const { ${staticHelpers} } = _Vue +`, -1 /* End */); + } + } + } + if (ast.ssrHelpers && ast.ssrHelpers.length) { + push( + `const { ${ast.ssrHelpers.map(aliasHelper).join(", ")} } = require("${ssrRuntimeModuleName}") +`, + -1 /* End */ + ); + } + genHoists(ast.hoists, context); + newline(); + push(`return `); +} +function genModulePreamble(ast, context, genScopeId, inline) { + const { + push, + newline, + optimizeImports, + runtimeModuleName, + ssrRuntimeModuleName + } = context; + if (ast.helpers.size) { + const helpers = Array.from(ast.helpers); + if (optimizeImports) { + push( + `import { ${helpers.map((s) => helperNameMap[s]).join(", ")} } from ${JSON.stringify(runtimeModuleName)} +`, + -1 /* End */ + ); + push( + ` +// Binding optimization for webpack code-split +const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(", ")} +`, + -1 /* End */ + ); + } else { + push( + `import { ${helpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from ${JSON.stringify(runtimeModuleName)} +`, + -1 /* End */ + ); + } + } + if (ast.ssrHelpers && ast.ssrHelpers.length) { + push( + `import { ${ast.ssrHelpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from "${ssrRuntimeModuleName}" +`, + -1 /* End */ + ); + } + if (ast.imports.length) { + genImports(ast.imports, context); + newline(); + } + genHoists(ast.hoists, context); + newline(); + if (!inline) { + push(`export `); + } +} +function genAssets(assets, type, { helper, push, newline, isTS }) { + const resolver = helper( + type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE + ); + for (let i = 0; i < assets.length; i++) { + let id = assets[i]; + const maybeSelfReference = id.endsWith("__self"); + if (maybeSelfReference) { + id = id.slice(0, -6); + } + push( + `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` + ); + if (i < assets.length - 1) { + newline(); + } + } +} +function genHoists(hoists, context) { + if (!hoists.length) { + return; + } + context.pure = true; + const { push, newline } = context; + newline(); + for (let i = 0; i < hoists.length; i++) { + const exp = hoists[i]; + if (exp) { + push(`const _hoisted_${i + 1} = `); + genNode(exp, context); + newline(); + } + } + context.pure = false; +} +function genImports(importsOptions, context) { + if (!importsOptions.length) { + return; + } + importsOptions.forEach((imports) => { + context.push(`import `); + genNode(imports.exp, context); + context.push(` from '${imports.path}'`); + context.newline(); + }); +} +function isText(n) { + return shared.isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; +} +function genNodeListAsArray(nodes, context) { + const multilines = nodes.length > 3 || nodes.some((n) => shared.isArray(n) || !isText(n)); + context.push(`[`); + multilines && context.indent(); + genNodeList(nodes, context, multilines); + multilines && context.deindent(); + context.push(`]`); +} +function genNodeList(nodes, context, multilines = false, comma = true) { + const { push, newline } = context; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (shared.isString(node)) { + push(node, -3 /* Unknown */); + } else if (shared.isArray(node)) { + genNodeListAsArray(node, context); + } else { + genNode(node, context); + } + if (i < nodes.length - 1) { + if (multilines) { + comma && push(","); + newline(); + } else { + comma && push(", "); + } + } + } +} +function genNode(node, context) { + if (shared.isString(node)) { + context.push(node, -3 /* Unknown */); + return; + } + if (shared.isSymbol(node)) { + context.push(context.helper(node)); + return; + } + switch (node.type) { + case 1: + case 9: + case 11: + assert( + node.codegenNode != null, + `Codegen node is missing for element/if/for node. Apply appropriate transforms first.` + ); + genNode(node.codegenNode, context); + break; + case 2: + genText(node, context); + break; + case 4: + genExpression(node, context); + break; + case 5: + genInterpolation(node, context); + break; + case 12: + genNode(node.codegenNode, context); + break; + case 8: + genCompoundExpression(node, context); + break; + case 3: + genComment(node, context); + break; + case 13: + genVNodeCall(node, context); + break; + case 14: + genCallExpression(node, context); + break; + case 15: + genObjectExpression(node, context); + break; + case 17: + genArrayExpression(node, context); + break; + case 18: + genFunctionExpression(node, context); + break; + case 19: + genConditionalExpression(node, context); + break; + case 20: + genCacheExpression(node, context); + break; + case 21: + genNodeList(node.body, context, true, false); + break; + // SSR only types + case 22: + genTemplateLiteral(node, context); + break; + case 23: + genIfStatement(node, context); + break; + case 24: + genAssignmentExpression(node, context); + break; + case 25: + genSequenceExpression(node, context); + break; + case 26: + genReturnStatement(node, context); + break; + /* v8 ignore start */ + case 10: + break; + default: + { + assert(false, `unhandled codegen node type: ${node.type}`); + const exhaustiveCheck = node; + return exhaustiveCheck; + } + } +} +function genText(node, context) { + context.push(JSON.stringify(node.content), -3 /* Unknown */, node); +} +function genExpression(node, context) { + const { content, isStatic } = node; + context.push( + isStatic ? JSON.stringify(content) : content, + -3 /* Unknown */, + node + ); +} +function genInterpolation(node, context) { + const { push, helper, pure } = context; + if (pure) push(PURE_ANNOTATION); + push(`${helper(TO_DISPLAY_STRING)}(`); + genNode(node.content, context); + push(`)`); +} +function genCompoundExpression(node, context) { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (shared.isString(child)) { + context.push(child, -3 /* Unknown */); + } else { + genNode(child, context); + } + } +} +function genExpressionAsPropertyKey(node, context) { + const { push } = context; + if (node.type === 8) { + push(`[`); + genCompoundExpression(node, context); + push(`]`); + } else if (node.isStatic) { + const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); + push(text, -2 /* None */, node); + } else { + push(`[${node.content}]`, -3 /* Unknown */, node); + } +} +function genComment(node, context) { + const { push, helper, pure } = context; + if (pure) { + push(PURE_ANNOTATION); + } + push( + `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, + -3 /* Unknown */, + node + ); +} +function genVNodeCall(node, context) { + const { push, helper, pure } = context; + const { + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent + } = node; + let patchFlagString; + if (patchFlag) { + { + if (patchFlag < 0) { + patchFlagString = patchFlag + ` /* ${shared.PatchFlagNames[patchFlag]} */`; + } else { + const flagNames = Object.keys(shared.PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => shared.PatchFlagNames[n]).join(`, `); + patchFlagString = patchFlag + ` /* ${flagNames} */`; + } + } + } + if (directives) { + push(helper(WITH_DIRECTIVES) + `(`); + } + if (isBlock) { + push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); + } + if (pure) { + push(PURE_ANNOTATION); + } + const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); + push(helper(callHelper) + `(`, -2 /* None */, node); + genNodeList( + genNullableArgs([tag, props, children, patchFlagString, dynamicProps]), + context + ); + push(`)`); + if (isBlock) { + push(`)`); + } + if (directives) { + push(`, `); + genNode(directives, context); + push(`)`); + } +} +function genNullableArgs(args) { + let i = args.length; + while (i--) { + if (args[i] != null) break; + } + return args.slice(0, i + 1).map((arg) => arg || `null`); +} +function genCallExpression(node, context) { + const { push, helper, pure } = context; + const callee = shared.isString(node.callee) ? node.callee : helper(node.callee); + if (pure) { + push(PURE_ANNOTATION); + } + push(callee + `(`, -2 /* None */, node); + genNodeList(node.arguments, context); + push(`)`); +} +function genObjectExpression(node, context) { + const { push, indent, deindent, newline } = context; + const { properties } = node; + if (!properties.length) { + push(`{}`, -2 /* None */, node); + return; + } + const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4); + push(multilines ? `{` : `{ `); + multilines && indent(); + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + genExpressionAsPropertyKey(key, context); + push(`: `); + genNode(value, context); + if (i < properties.length - 1) { + push(`,`); + newline(); + } + } + multilines && deindent(); + push(multilines ? `}` : ` }`); +} +function genArrayExpression(node, context) { + genNodeListAsArray(node.elements, context); +} +function genFunctionExpression(node, context) { + const { push, indent, deindent } = context; + const { params, returns, body, newline, isSlot } = node; + if (isSlot) { + push(`_${helperNameMap[WITH_CTX]}(`); + } + push(`(`, -2 /* None */, node); + if (shared.isArray(params)) { + genNodeList(params, context); + } else if (params) { + genNode(params, context); + } + push(`) => `); + if (newline || body) { + push(`{`); + indent(); + } + if (returns) { + if (newline) { + push(`return `); + } + if (shared.isArray(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); + } + } else if (body) { + genNode(body, context); + } + if (newline || body) { + deindent(); + push(`}`); + } + if (isSlot) { + if (node.isNonScopedSlot) { + push(`, undefined, true`); + } + push(`)`); + } +} +function genConditionalExpression(node, context) { + const { test, consequent, alternate, newline: needNewline } = node; + const { push, indent, deindent, newline } = context; + if (test.type === 4) { + const needsParens = !isSimpleIdentifier(test.content); + needsParens && push(`(`); + genExpression(test, context); + needsParens && push(`)`); + } else { + push(`(`); + genNode(test, context); + push(`)`); + } + needNewline && indent(); + context.indentLevel++; + needNewline || push(` `); + push(`? `); + genNode(consequent, context); + context.indentLevel--; + needNewline && newline(); + needNewline || push(` `); + push(`: `); + const isNested = alternate.type === 19; + if (!isNested) { + context.indentLevel++; + } + genNode(alternate, context); + if (!isNested) { + context.indentLevel--; + } + needNewline && deindent( + true + /* without newline */ + ); +} +function genCacheExpression(node, context) { + const { push, helper, indent, deindent, newline } = context; + const { needPauseTracking, needArraySpread } = node; + if (needArraySpread) { + push(`[...(`); + } + push(`_cache[${node.index}] || (`); + if (needPauseTracking) { + indent(); + push(`${helper(SET_BLOCK_TRACKING)}(-1`); + if (node.inVOnce) push(`, true`); + push(`),`); + newline(); + push(`(`); + } + push(`_cache[${node.index}] = `); + genNode(node.value, context); + if (needPauseTracking) { + push(`).cacheIndex = ${node.index},`); + newline(); + push(`${helper(SET_BLOCK_TRACKING)}(1),`); + newline(); + push(`_cache[${node.index}]`); + deindent(); + } + push(`)`); + if (needArraySpread) { + push(`)]`); + } +} +function genTemplateLiteral(node, context) { + const { push, indent, deindent } = context; + push("`"); + const l = node.elements.length; + const multilines = l > 3; + for (let i = 0; i < l; i++) { + const e = node.elements[i]; + if (shared.isString(e)) { + push(e.replace(/(`|\$|\\)/g, "\\$1"), -3 /* Unknown */); + } else { + push("${"); + if (multilines) indent(); + genNode(e, context); + if (multilines) deindent(); + push("}"); + } + } + push("`"); +} +function genIfStatement(node, context) { + const { push, indent, deindent } = context; + const { test, consequent, alternate } = node; + push(`if (`); + genNode(test, context); + push(`) {`); + indent(); + genNode(consequent, context); + deindent(); + push(`}`); + if (alternate) { + push(` else `); + if (alternate.type === 23) { + genIfStatement(alternate, context); + } else { + push(`{`); + indent(); + genNode(alternate, context); + deindent(); + push(`}`); + } + } +} +function genAssignmentExpression(node, context) { + genNode(node.left, context); + context.push(` = `); + genNode(node.right, context); +} +function genSequenceExpression(node, context) { + context.push(`(`); + genNodeList(node.expressions, context); + context.push(`)`); +} +function genReturnStatement({ returns }, context) { + context.push(`return `); + if (shared.isArray(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); + } +} + +const isLiteralWhitelisted = /* @__PURE__ */ shared.makeMap("true,false,null,this"); +const transformExpression = (node, context) => { + if (node.type === 5) { + node.content = processExpression( + node.content, + context + ); + } else if (node.type === 1) { + const memo = findDir(node, "memo"); + for (let i = 0; i < node.props.length; i++) { + const dir = node.props[i]; + if (dir.type === 7 && dir.name !== "for") { + const exp = dir.exp; + const arg = dir.arg; + if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor) + !(memo && arg && arg.type === 4 && arg.content === "key")) { + dir.exp = processExpression( + exp, + context, + // slot args must be processed as function params + dir.name === "slot" + ); + } + if (arg && arg.type === 4 && !arg.isStatic) { + dir.arg = processExpression(arg, context); + } + } + } + } +}; +function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { + if (!context.prefixIdentifiers || !node.content.trim()) { + return node; + } + const { inline, bindingMetadata } = context; + const rewriteIdentifier = (raw, parent, id) => { + const type = shared.hasOwn(bindingMetadata, raw) && bindingMetadata[raw]; + if (inline) { + const isAssignmentLVal = parent && parent.type === "AssignmentExpression" && parent.left === id; + const isUpdateArg = parent && parent.type === "UpdateExpression" && parent.argument === id; + const isDestructureAssignment = parent && isInDestructureAssignment(parent, parentStack); + const isNewExpression = parent && isInNewExpression(parentStack); + const wrapWithUnref = (raw2) => { + const wrapped = `${context.helperString(UNREF)}(${raw2})`; + return isNewExpression ? `(${wrapped})` : wrapped; + }; + if (isConst(type) || type === "setup-reactive-const" || localVars[raw]) { + return raw; + } else if (type === "setup-ref") { + return `${raw}.value`; + } else if (type === "setup-maybe-ref") { + return isAssignmentLVal || isUpdateArg || isDestructureAssignment ? `${raw}.value` : wrapWithUnref(raw); + } else if (type === "setup-let") { + if (isAssignmentLVal) { + const { right: rVal, operator } = parent; + const rExp = rawExp.slice(rVal.start - 1, rVal.end - 1); + const rExpString = stringifyExpression( + processExpression( + createSimpleExpression(rExp, false), + context, + false, + false, + knownIds + ) + ); + return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore +` : ``} ? ${raw}.value ${operator} ${rExpString} : ${raw}`; + } else if (isUpdateArg) { + id.start = parent.start; + id.end = parent.end; + const { prefix: isPrefix, operator } = parent; + const prefix = isPrefix ? operator : ``; + const postfix = isPrefix ? `` : operator; + return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore +` : ``} ? ${prefix}${raw}.value${postfix} : ${prefix}${raw}${postfix}`; + } else if (isDestructureAssignment) { + return raw; + } else { + return wrapWithUnref(raw); + } + } else if (type === "props") { + return shared.genPropsAccessExp(raw); + } else if (type === "props-aliased") { + return shared.genPropsAccessExp(bindingMetadata.__propsAliases[raw]); + } + } else { + if (type && type.startsWith("setup") || type === "literal-const") { + return `$setup.${raw}`; + } else if (type === "props-aliased") { + return `$props['${bindingMetadata.__propsAliases[raw]}']`; + } else if (type) { + return `$${type}.${raw}`; + } + } + return `_ctx.${raw}`; + }; + const rawExp = node.content; + let ast = node.ast; + if (ast === false) { + return node; + } + if (ast === null || !ast && isSimpleIdentifier(rawExp)) { + const isScopeVarReference = context.identifiers[rawExp]; + const isAllowedGlobal = shared.isGloballyAllowed(rawExp); + const isLiteral = isLiteralWhitelisted(rawExp); + if (!asParams && !isScopeVarReference && !isLiteral && (!isAllowedGlobal || bindingMetadata[rawExp])) { + if (isConst(bindingMetadata[rawExp])) { + node.constType = 1; + } + node.content = rewriteIdentifier(rawExp); + } else if (!isScopeVarReference) { + if (isLiteral) { + node.constType = 3; + } else { + node.constType = 2; + } + } + return node; + } + if (!ast) { + const source = asRawStatements ? ` ${rawExp} ` : `(${rawExp})${asParams ? `=>{}` : ``}`; + try { + ast = parser.parseExpression(source, { + sourceType: "module", + plugins: context.expressionPlugins + }); + } catch (e) { + context.onError( + createCompilerError( + 45, + node.loc, + void 0, + e.message + ) + ); + return node; + } + } + const ids = []; + const parentStack = []; + const knownIds = Object.create(context.identifiers); + walkIdentifiers( + ast, + (node2, parent, _, isReferenced, isLocal) => { + if (isStaticPropertyKey(node2, parent)) { + return; + } + if (node2.name.startsWith("_filter_")) { + return; + } + const needPrefix = isReferenced && canPrefix(node2); + if (needPrefix && !isLocal) { + if (isStaticProperty(parent) && parent.shorthand) { + node2.prefix = `${node2.name}: `; + } + node2.name = rewriteIdentifier(node2.name, parent, node2); + ids.push(node2); + } else { + if (!(needPrefix && isLocal) && (!parent || parent.type !== "CallExpression" && parent.type !== "NewExpression" && parent.type !== "MemberExpression")) { + node2.isConstant = true; + } + ids.push(node2); + } + }, + true, + // invoke on ALL identifiers + parentStack, + knownIds + ); + const children = []; + ids.sort((a, b) => a.start - b.start); + ids.forEach((id, i) => { + const start = id.start - 1; + const end = id.end - 1; + const last = ids[i - 1]; + const leadingText = rawExp.slice(last ? last.end - 1 : 0, start); + if (leadingText.length || id.prefix) { + children.push(leadingText + (id.prefix || ``)); + } + const source = rawExp.slice(start, end); + children.push( + createSimpleExpression( + id.name, + false, + { + start: advancePositionWithClone(node.loc.start, source, start), + end: advancePositionWithClone(node.loc.start, source, end), + source + }, + id.isConstant ? 3 : 0 + ) + ); + if (i === ids.length - 1 && end < rawExp.length) { + children.push(rawExp.slice(end)); + } + }); + let ret; + if (children.length) { + ret = createCompoundExpression(children, node.loc); + ret.ast = ast; + } else { + ret = node; + ret.constType = 3; + } + ret.identifiers = Object.keys(knownIds); + return ret; +} +function canPrefix(id) { + if (shared.isGloballyAllowed(id.name)) { + return false; + } + if (id.name === "require") { + return false; + } + return true; +} +function stringifyExpression(exp) { + if (shared.isString(exp)) { + return exp; + } else if (exp.type === 4) { + return exp.content; + } else { + return exp.children.map(stringifyExpression).join(""); + } +} +function isConst(type) { + return type === "setup-const" || type === "literal-const"; +} + +const transformIf = createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + (node, dir, context) => { + return processIf(node, dir, context, (ifNode, branch, isRoot) => { + const siblings = context.parent.children; + let i = siblings.indexOf(ifNode); + let key = 0; + while (i-- >= 0) { + const sibling = siblings[i]; + if (sibling && sibling.type === 9) { + key += sibling.branches.length; + } + } + return () => { + if (isRoot) { + ifNode.codegenNode = createCodegenNodeForBranch( + branch, + key, + context + ); + } else { + const parentCondition = getParentCondition(ifNode.codegenNode); + parentCondition.alternate = createCodegenNodeForBranch( + branch, + key + ifNode.branches.length - 1, + context + ); + } + }; + }); + } +); +function processIf(node, dir, context, processCodegen) { + if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { + const loc = dir.exp ? dir.exp.loc : node.loc; + context.onError( + createCompilerError(28, dir.loc) + ); + dir.exp = createSimpleExpression(`true`, false, loc); + } + if (context.prefixIdentifiers && dir.exp) { + dir.exp = processExpression(dir.exp, context); + } + if (dir.name === "if") { + const branch = createIfBranch(node, dir); + const ifNode = { + type: 9, + loc: cloneLoc(node.loc), + branches: [branch] + }; + context.replaceNode(ifNode); + if (processCodegen) { + return processCodegen(ifNode, branch, true); + } + } else { + const siblings = context.parent.children; + const comments = []; + let i = siblings.indexOf(node); + while (i-- >= -1) { + const sibling = siblings[i]; + if (sibling && sibling.type === 3) { + context.removeNode(sibling); + comments.unshift(sibling); + continue; + } + if (sibling && sibling.type === 2 && !sibling.content.trim().length) { + context.removeNode(sibling); + continue; + } + if (sibling && sibling.type === 9) { + if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { + context.onError( + createCompilerError(30, node.loc) + ); + } + context.removeNode(); + const branch = createIfBranch(node, dir); + if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition> + !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) { + branch.children = [...comments, ...branch.children]; + } + { + const key = branch.userKey; + if (key) { + sibling.branches.forEach(({ userKey }) => { + if (isSameKey(userKey, key)) { + context.onError( + createCompilerError( + 29, + branch.userKey.loc + ) + ); + } + }); + } + } + sibling.branches.push(branch); + const onExit = processCodegen && processCodegen(sibling, branch, false); + traverseNode(branch, context); + if (onExit) onExit(); + context.currentNode = null; + } else { + context.onError( + createCompilerError(30, node.loc) + ); + } + break; + } + } +} +function createIfBranch(node, dir) { + const isTemplateIf = node.tagType === 3; + return { + type: 10, + loc: node.loc, + condition: dir.name === "else" ? void 0 : dir.exp, + children: isTemplateIf && !findDir(node, "for") ? node.children : [node], + userKey: findProp(node, `key`), + isTemplateIf + }; +} +function createCodegenNodeForBranch(branch, keyIndex, context) { + if (branch.condition) { + return createConditionalExpression( + branch.condition, + createChildrenCodegenNode(branch, keyIndex, context), + // make sure to pass in asBlock: true so that the comment node call + // closes the current block. + createCallExpression(context.helper(CREATE_COMMENT), [ + '"v-if"' , + "true" + ]) + ); + } else { + return createChildrenCodegenNode(branch, keyIndex, context); + } +} +function createChildrenCodegenNode(branch, keyIndex, context) { + const { helper } = context; + const keyProperty = createObjectProperty( + `key`, + createSimpleExpression( + `${keyIndex}`, + false, + locStub, + 2 + ) + ); + const { children } = branch; + const firstChild = children[0]; + const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; + if (needFragmentWrapper) { + if (children.length === 1 && firstChild.type === 11) { + const vnodeCall = firstChild.codegenNode; + injectProp(vnodeCall, keyProperty, context); + return vnodeCall; + } else { + let patchFlag = 64; + if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + } + return createVNodeCall( + context, + helper(FRAGMENT), + createObjectExpression([keyProperty]), + children, + patchFlag, + void 0, + void 0, + true, + false, + false, + branch.loc + ); + } + } else { + const ret = firstChild.codegenNode; + const vnodeCall = getMemoedVNodeCall(ret); + if (vnodeCall.type === 13) { + convertToBlock(vnodeCall, context); + } + injectProp(vnodeCall, keyProperty, context); + return ret; + } +} +function isSameKey(a, b) { + if (!a || a.type !== b.type) { + return false; + } + if (a.type === 6) { + if (a.value.content !== b.value.content) { + return false; + } + } else { + const exp = a.exp; + const branchExp = b.exp; + if (exp.type !== branchExp.type) { + return false; + } + if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { + return false; + } + } + return true; +} +function getParentCondition(node) { + while (true) { + if (node.type === 19) { + if (node.alternate.type === 19) { + node = node.alternate; + } else { + return node; + } + } else if (node.type === 20) { + node = node.value; + } + } +} + +const transformBind = (dir, _node, context) => { + const { modifiers, loc } = dir; + const arg = dir.arg; + let { exp } = dir; + if (exp && exp.type === 4 && !exp.content.trim()) { + { + context.onError( + createCompilerError(34, loc) + ); + return { + props: [ + createObjectProperty(arg, createSimpleExpression("", true, loc)) + ] + }; + } + } + if (!exp) { + if (arg.type !== 4 || !arg.isStatic) { + context.onError( + createCompilerError( + 52, + arg.loc + ) + ); + return { + props: [ + createObjectProperty(arg, createSimpleExpression("", true, loc)) + ] + }; + } + transformBindShorthand(dir, context); + exp = dir.exp; + } + if (arg.type !== 4) { + arg.children.unshift(`(`); + arg.children.push(`) || ""`); + } else if (!arg.isStatic) { + arg.content = `${arg.content} || ""`; + } + if (modifiers.some((mod) => mod.content === "camel")) { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = shared.camelize(arg.content); + } else { + arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; + } + } else { + arg.children.unshift(`${context.helperString(CAMELIZE)}(`); + arg.children.push(`)`); + } + } + if (!context.inSSR) { + if (modifiers.some((mod) => mod.content === "prop")) { + injectPrefix(arg, "."); + } + if (modifiers.some((mod) => mod.content === "attr")) { + injectPrefix(arg, "^"); + } + } + return { + props: [createObjectProperty(arg, exp)] + }; +}; +const transformBindShorthand = (dir, context) => { + const arg = dir.arg; + const propName = shared.camelize(arg.content); + dir.exp = createSimpleExpression(propName, false, arg.loc); + { + dir.exp = processExpression(dir.exp, context); + } +}; +const injectPrefix = (arg, prefix) => { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = prefix + arg.content; + } else { + arg.content = `\`${prefix}\${${arg.content}}\``; + } + } else { + arg.children.unshift(`'${prefix}' + (`); + arg.children.push(`)`); + } +}; + +const transformFor = createStructuralDirectiveTransform( + "for", + (node, dir, context) => { + const { helper, removeHelper } = context; + return processFor(node, dir, context, (forNode) => { + const renderExp = createCallExpression(helper(RENDER_LIST), [ + forNode.source + ]); + const isTemplate = isTemplateNode(node); + const memo = findDir(node, "memo"); + const keyProp = findProp(node, `key`, false, true); + const isDirKey = keyProp && keyProp.type === 7; + if (isDirKey && !keyProp.exp) { + transformBindShorthand(keyProp, context); + } + let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp); + if (memo && keyExp && isDirKey) { + { + keyProp.exp = keyExp = processExpression( + keyExp, + context + ); + } + } + const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null; + if (isTemplate) { + if (memo) { + memo.exp = processExpression( + memo.exp, + context + ); + } + if (keyProperty && keyProp.type !== 6) { + keyProperty.value = processExpression( + keyProperty.value, + context + ); + } + } + const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; + const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; + forNode.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + renderExp, + fragmentFlag, + void 0, + void 0, + true, + !isStableFragment, + false, + node.loc + ); + return () => { + let childBlock; + const { children } = forNode; + if (isTemplate) { + node.children.some((c) => { + if (c.type === 1) { + const key = findProp(c, "key"); + if (key) { + context.onError( + createCompilerError( + 33, + key.loc + ) + ); + return true; + } + } + }); + } + const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; + const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; + if (slotOutlet) { + childBlock = slotOutlet.codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + } else if (needFragmentWrapper) { + childBlock = createVNodeCall( + context, + helper(FRAGMENT), + keyProperty ? createObjectExpression([keyProperty]) : void 0, + node.children, + 64, + void 0, + void 0, + true, + void 0, + false + ); + } else { + childBlock = children[0].codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + if (childBlock.isBlock !== !isStableFragment) { + if (childBlock.isBlock) { + removeHelper(OPEN_BLOCK); + removeHelper( + getVNodeBlockHelper(context.inSSR, childBlock.isComponent) + ); + } else { + removeHelper( + getVNodeHelper(context.inSSR, childBlock.isComponent) + ); + } + } + childBlock.isBlock = !isStableFragment; + if (childBlock.isBlock) { + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); + } else { + helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); + } + } + if (memo) { + const loop = createFunctionExpression( + createForLoopParams(forNode.parseResult, [ + createSimpleExpression(`_cached`) + ]) + ); + loop.body = createBlockStatement([ + createCompoundExpression([`const _memo = (`, memo.exp, `)`]), + createCompoundExpression([ + `if (_cached`, + ...keyExp ? [` && _cached.key === `, keyExp] : [], + ` && ${context.helperString( + IS_MEMO_SAME + )}(_cached, _memo)) return _cached` + ]), + createCompoundExpression([`const _item = `, childBlock]), + createSimpleExpression(`_item.memo = _memo`), + createSimpleExpression(`return _item`) + ]); + renderExp.arguments.push( + loop, + createSimpleExpression(`_cache`), + createSimpleExpression(String(context.cached.length)) + ); + context.cached.push(null); + } else { + renderExp.arguments.push( + createFunctionExpression( + createForLoopParams(forNode.parseResult), + childBlock, + true + ) + ); + } + }; + }); + } +); +function processFor(node, dir, context, processCodegen) { + if (!dir.exp) { + context.onError( + createCompilerError(31, dir.loc) + ); + return; + } + const parseResult = dir.forParseResult; + if (!parseResult) { + context.onError( + createCompilerError(32, dir.loc) + ); + return; + } + finalizeForParseResult(parseResult, context); + const { addIdentifiers, removeIdentifiers, scopes } = context; + const { source, value, key, index } = parseResult; + const forNode = { + type: 11, + loc: dir.loc, + source, + valueAlias: value, + keyAlias: key, + objectIndexAlias: index, + parseResult, + children: isTemplateNode(node) ? node.children : [node] + }; + context.replaceNode(forNode); + scopes.vFor++; + if (context.prefixIdentifiers) { + value && addIdentifiers(value); + key && addIdentifiers(key); + index && addIdentifiers(index); + } + const onExit = processCodegen && processCodegen(forNode); + return () => { + scopes.vFor--; + if (context.prefixIdentifiers) { + value && removeIdentifiers(value); + key && removeIdentifiers(key); + index && removeIdentifiers(index); + } + if (onExit) onExit(); + }; +} +function finalizeForParseResult(result, context) { + if (result.finalized) return; + if (context.prefixIdentifiers) { + result.source = processExpression( + result.source, + context + ); + if (result.key) { + result.key = processExpression( + result.key, + context, + true + ); + } + if (result.index) { + result.index = processExpression( + result.index, + context, + true + ); + } + if (result.value) { + result.value = processExpression( + result.value, + context, + true + ); + } + } + result.finalized = true; +} +function createForLoopParams({ value, key, index }, memoArgs = []) { + return createParamsList([value, key, index, ...memoArgs]); +} +function createParamsList(args) { + let i = args.length; + while (i--) { + if (args[i]) break; + } + return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); +} + +const defaultFallback = createSimpleExpression(`undefined`, false); +const trackSlotScopes = (node, context) => { + if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { + const vSlot = findDir(node, "slot"); + if (vSlot) { + const slotProps = vSlot.exp; + if (context.prefixIdentifiers) { + slotProps && context.addIdentifiers(slotProps); + } + context.scopes.vSlot++; + return () => { + if (context.prefixIdentifiers) { + slotProps && context.removeIdentifiers(slotProps); + } + context.scopes.vSlot--; + }; + } + } +}; +const trackVForSlotScopes = (node, context) => { + let vFor; + if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) { + const result = vFor.forParseResult; + if (result) { + finalizeForParseResult(result, context); + const { value, key, index } = result; + const { addIdentifiers, removeIdentifiers } = context; + value && addIdentifiers(value); + key && addIdentifiers(key); + index && addIdentifiers(index); + return () => { + value && removeIdentifiers(value); + key && removeIdentifiers(key); + index && removeIdentifiers(index); + }; + } + } +}; +const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( + props, + children, + false, + true, + children.length ? children[0].loc : loc +); +function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { + context.helper(WITH_CTX); + const { children, loc } = node; + const slotsProperties = []; + const dynamicSlots = []; + let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; + if (!context.ssr && context.prefixIdentifiers) { + hasDynamicSlots = hasScopeRef(node, context.identifiers); + } + const onComponentSlot = findDir(node, "slot", true); + if (onComponentSlot) { + const { arg, exp } = onComponentSlot; + if (arg && !isStaticExp(arg)) { + hasDynamicSlots = true; + } + slotsProperties.push( + createObjectProperty( + arg || createSimpleExpression("default", true), + buildSlotFn(exp, void 0, children, loc) + ) + ); + } + let hasTemplateSlots = false; + let hasNamedDefaultSlot = false; + const implicitDefaultChildren = []; + const seenSlotNames = /* @__PURE__ */ new Set(); + let conditionalBranchIndex = 0; + for (let i = 0; i < children.length; i++) { + const slotElement = children[i]; + let slotDir; + if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { + if (slotElement.type !== 3) { + implicitDefaultChildren.push(slotElement); + } + continue; + } + if (onComponentSlot) { + context.onError( + createCompilerError(37, slotDir.loc) + ); + break; + } + hasTemplateSlots = true; + const { children: slotChildren, loc: slotLoc } = slotElement; + const { + arg: slotName = createSimpleExpression(`default`, true), + exp: slotProps, + loc: dirLoc + } = slotDir; + let staticSlotName; + if (isStaticExp(slotName)) { + staticSlotName = slotName ? slotName.content : `default`; + } else { + hasDynamicSlots = true; + } + const vFor = findDir(slotElement, "for"); + const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); + let vIf; + let vElse; + if (vIf = findDir(slotElement, "if")) { + hasDynamicSlots = true; + dynamicSlots.push( + createConditionalExpression( + vIf.exp, + buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), + defaultFallback + ) + ); + } else if (vElse = findDir( + slotElement, + /^else(-if)?$/, + true + /* allowEmpty */ + )) { + let j = i; + let prev; + while (j--) { + prev = children[j]; + if (prev.type !== 3) { + break; + } + } + if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) { + let conditional = dynamicSlots[dynamicSlots.length - 1]; + while (conditional.alternate.type === 19) { + conditional = conditional.alternate; + } + conditional.alternate = vElse.exp ? createConditionalExpression( + vElse.exp, + buildDynamicSlot( + slotName, + slotFunction, + conditionalBranchIndex++ + ), + defaultFallback + ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); + } else { + context.onError( + createCompilerError(30, vElse.loc) + ); + } + } else if (vFor) { + hasDynamicSlots = true; + const parseResult = vFor.forParseResult; + if (parseResult) { + finalizeForParseResult(parseResult, context); + dynamicSlots.push( + createCallExpression(context.helper(RENDER_LIST), [ + parseResult.source, + createFunctionExpression( + createForLoopParams(parseResult), + buildDynamicSlot(slotName, slotFunction), + true + ) + ]) + ); + } else { + context.onError( + createCompilerError( + 32, + vFor.loc + ) + ); + } + } else { + if (staticSlotName) { + if (seenSlotNames.has(staticSlotName)) { + context.onError( + createCompilerError( + 38, + dirLoc + ) + ); + continue; + } + seenSlotNames.add(staticSlotName); + if (staticSlotName === "default") { + hasNamedDefaultSlot = true; + } + } + slotsProperties.push(createObjectProperty(slotName, slotFunction)); + } + } + if (!onComponentSlot) { + const buildDefaultSlotProperty = (props, children2) => { + const fn = buildSlotFn(props, void 0, children2, loc); + if (context.compatConfig) { + fn.isNonScopedSlot = true; + } + return createObjectProperty(`default`, fn); + }; + if (!hasTemplateSlots) { + slotsProperties.push(buildDefaultSlotProperty(void 0, children)); + } else if (implicitDefaultChildren.length && // #3766 + // with whitespace: 'preserve', whitespaces between slots will end up in + // implicitDefaultChildren. Ignore if all implicit children are whitespaces. + implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { + if (hasNamedDefaultSlot) { + context.onError( + createCompilerError( + 39, + implicitDefaultChildren[0].loc + ) + ); + } else { + slotsProperties.push( + buildDefaultSlotProperty(void 0, implicitDefaultChildren) + ); + } + } + } + const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; + let slots = createObjectExpression( + slotsProperties.concat( + createObjectProperty( + `_`, + // 2 = compiled but dynamic = can skip normalization, but must run diff + // 1 = compiled and static = can skip normalization AND diff as optimized + createSimpleExpression( + slotFlag + (` /* ${shared.slotFlagsText[slotFlag]} */` ), + false + ) + ) + ), + loc + ); + if (dynamicSlots.length) { + slots = createCallExpression(context.helper(CREATE_SLOTS), [ + slots, + createArrayExpression(dynamicSlots) + ]); + } + return { + slots, + hasDynamicSlots + }; +} +function buildDynamicSlot(name, fn, index) { + const props = [ + createObjectProperty(`name`, name), + createObjectProperty(`fn`, fn) + ]; + if (index != null) { + props.push( + createObjectProperty(`key`, createSimpleExpression(String(index), true)) + ); + } + return createObjectExpression(props); +} +function hasForwardedSlots(children) { + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + if (child.tagType === 2 || hasForwardedSlots(child.children)) { + return true; + } + break; + case 9: + if (hasForwardedSlots(child.branches)) return true; + break; + case 10: + case 11: + if (hasForwardedSlots(child.children)) return true; + break; + } + } + return false; +} +function isNonWhitespaceContent(node) { + if (node.type !== 2 && node.type !== 12) + return true; + return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); +} + +const directiveImportMap = /* @__PURE__ */ new WeakMap(); +const transformElement = (node, context) => { + return function postTransformElement() { + node = context.currentNode; + if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { + return; + } + const { tag, props } = node; + const isComponent = node.tagType === 1; + let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; + const isDynamicComponent = shared.isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; + let vnodeProps; + let vnodeChildren; + let patchFlag = 0; + let vnodeDynamicProps; + let dynamicPropNames; + let vnodeDirectives; + let shouldUseBlock = ( + // dynamic component may resolve to plain elements + isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block + // updates inside get proper isSVG flag at runtime. (#639, #643) + // This is technically web-specific, but splitting the logic out of core + // leads to too much unnecessary complexity. + (tag === "svg" || tag === "foreignObject" || tag === "math") + ); + if (props.length > 0) { + const propsBuildResult = buildProps( + node, + context, + void 0, + isComponent, + isDynamicComponent + ); + vnodeProps = propsBuildResult.props; + patchFlag = propsBuildResult.patchFlag; + dynamicPropNames = propsBuildResult.dynamicPropNames; + const directives = propsBuildResult.directives; + vnodeDirectives = directives && directives.length ? createArrayExpression( + directives.map((dir) => buildDirectiveArgs(dir, context)) + ) : void 0; + if (propsBuildResult.shouldUseBlock) { + shouldUseBlock = true; + } + } + if (node.children.length > 0) { + if (vnodeTag === KEEP_ALIVE) { + shouldUseBlock = true; + patchFlag |= 1024; + if (node.children.length > 1) { + context.onError( + createCompilerError(46, { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + }) + ); + } + } + const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling + vnodeTag !== TELEPORT && // explained above. + vnodeTag !== KEEP_ALIVE; + if (shouldBuildAsSlots) { + const { slots, hasDynamicSlots } = buildSlots(node, context); + vnodeChildren = slots; + if (hasDynamicSlots) { + patchFlag |= 1024; + } + } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { + const child = node.children[0]; + const type = child.type; + const hasDynamicTextChild = type === 5 || type === 8; + if (hasDynamicTextChild && getConstantType(child, context) === 0) { + patchFlag |= 1; + } + if (hasDynamicTextChild || type === 2) { + vnodeChildren = child; + } else { + vnodeChildren = node.children; + } + } else { + vnodeChildren = node.children; + } + } + if (dynamicPropNames && dynamicPropNames.length) { + vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); + } + node.codegenNode = createVNodeCall( + context, + vnodeTag, + vnodeProps, + vnodeChildren, + patchFlag === 0 ? void 0 : patchFlag, + vnodeDynamicProps, + vnodeDirectives, + !!shouldUseBlock, + false, + isComponent, + node.loc + ); + }; +}; +function resolveComponentType(node, context, ssr = false) { + let { tag } = node; + const isExplicitDynamic = isComponentTag(tag); + const isProp = findProp( + node, + "is", + false, + true + /* allow empty */ + ); + if (isProp) { + if (isExplicitDynamic || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + )) { + let exp; + if (isProp.type === 6) { + exp = isProp.value && createSimpleExpression(isProp.value.content, true); + } else { + exp = isProp.exp; + if (!exp) { + exp = createSimpleExpression(`is`, false, isProp.arg.loc); + { + exp = isProp.exp = processExpression(exp, context); + } + } + } + if (exp) { + return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ + exp + ]); + } + } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { + tag = isProp.value.content.slice(4); + } + } + const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); + if (builtIn) { + if (!ssr) context.helper(builtIn); + return builtIn; + } + { + const fromSetup = resolveSetupReference(tag, context); + if (fromSetup) { + return fromSetup; + } + const dotIndex = tag.indexOf("."); + if (dotIndex > 0) { + const ns = resolveSetupReference(tag.slice(0, dotIndex), context); + if (ns) { + return ns + tag.slice(dotIndex); + } + } + } + if (context.selfName && shared.capitalize(shared.camelize(tag)) === context.selfName) { + context.helper(RESOLVE_COMPONENT); + context.components.add(tag + `__self`); + return toValidAssetId(tag, `component`); + } + context.helper(RESOLVE_COMPONENT); + context.components.add(tag); + return toValidAssetId(tag, `component`); +} +function resolveSetupReference(name, context) { + const bindings = context.bindingMetadata; + if (!bindings || bindings.__isScriptSetup === false) { + return; + } + const camelName = shared.camelize(name); + const PascalName = shared.capitalize(camelName); + const checkType = (type) => { + if (bindings[name] === type) { + return name; + } + if (bindings[camelName] === type) { + return camelName; + } + if (bindings[PascalName] === type) { + return PascalName; + } + }; + const fromConst = checkType("setup-const") || checkType("setup-reactive-const") || checkType("literal-const"); + if (fromConst) { + return context.inline ? ( + // in inline mode, const setup bindings (e.g. imports) can be used as-is + fromConst + ) : `$setup[${JSON.stringify(fromConst)}]`; + } + const fromMaybeRef = checkType("setup-let") || checkType("setup-ref") || checkType("setup-maybe-ref"); + if (fromMaybeRef) { + return context.inline ? ( + // setup scope bindings that may be refs need to be unrefed + `${context.helperString(UNREF)}(${fromMaybeRef})` + ) : `$setup[${JSON.stringify(fromMaybeRef)}]`; + } + const fromProps = checkType("props"); + if (fromProps) { + return `${context.helperString(UNREF)}(${context.inline ? "__props" : "$props"}[${JSON.stringify(fromProps)}])`; + } +} +function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { + const { tag, loc: elementLoc, children } = node; + let properties = []; + const mergeArgs = []; + const runtimeDirectives = []; + const hasChildren = children.length > 0; + let shouldUseBlock = false; + let patchFlag = 0; + let hasRef = false; + let hasClassBinding = false; + let hasStyleBinding = false; + let hasHydrationEventBinding = false; + let hasDynamicKeys = false; + let hasVnodeHook = false; + const dynamicPropNames = []; + const pushMergeArg = (arg) => { + if (properties.length) { + mergeArgs.push( + createObjectExpression(dedupeProperties(properties), elementLoc) + ); + properties = []; + } + if (arg) mergeArgs.push(arg); + }; + const pushRefVForMarker = () => { + if (context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); + } + }; + const analyzePatchFlag = ({ key, value }) => { + if (isStaticExp(key)) { + const name = key.content; + const isEventHandler = shared.isOn(name); + if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click + // dedicated fast path. + name.toLowerCase() !== "onclick" && // omit v-model handlers + name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks + !shared.isReservedProp(name)) { + hasHydrationEventBinding = true; + } + if (isEventHandler && shared.isReservedProp(name)) { + hasVnodeHook = true; + } + if (isEventHandler && value.type === 14) { + value = value.arguments[0]; + } + if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { + return; + } + if (name === "ref") { + hasRef = true; + } else if (name === "class") { + hasClassBinding = true; + } else if (name === "style") { + hasStyleBinding = true; + } else if (name !== "key" && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + } else { + hasDynamicKeys = true; + } + }; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 6) { + const { loc, name, nameLoc, value } = prop; + let isStatic = true; + if (name === "ref") { + hasRef = true; + pushRefVForMarker(); + if (value && context.inline) { + const binding = context.bindingMetadata[value.content]; + if (binding === "setup-let" || binding === "setup-ref" || binding === "setup-maybe-ref") { + isStatic = false; + properties.push( + createObjectProperty( + createSimpleExpression("ref_key", true), + createSimpleExpression(value.content, true, value.loc) + ) + ); + } + } + } + if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + properties.push( + createObjectProperty( + createSimpleExpression(name, true, nameLoc), + createSimpleExpression( + value ? value.content : "", + isStatic, + value ? value.loc : loc + ) + ) + ); + } else { + const { name, arg, exp, loc, modifiers } = prop; + const isVBind = name === "bind"; + const isVOn = name === "on"; + if (name === "slot") { + if (!isComponent) { + context.onError( + createCompilerError(40, loc) + ); + } + continue; + } + if (name === "once" || name === "memo") { + continue; + } + if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + if (isVOn && ssr) { + continue; + } + if ( + // #938: elements with dynamic keys should be forced into blocks + isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked + // before children + isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") + ) { + shouldUseBlock = true; + } + if (isVBind && isStaticArgOf(arg, "ref")) { + pushRefVForMarker(); + } + if (!arg && (isVBind || isVOn)) { + hasDynamicKeys = true; + if (exp) { + if (isVBind) { + pushRefVForMarker(); + pushMergeArg(); + { + { + const hasOverridableKeys = mergeArgs.some((arg2) => { + if (arg2.type === 15) { + return arg2.properties.some(({ key }) => { + if (key.type !== 4 || !key.isStatic) { + return true; + } + return key.content !== "class" && key.content !== "style" && !shared.isOn(key.content); + }); + } else { + return true; + } + }); + if (hasOverridableKeys) { + checkCompatEnabled( + "COMPILER_V_BIND_OBJECT_ORDER", + context, + loc + ); + } + } + if (isCompatEnabled( + "COMPILER_V_BIND_OBJECT_ORDER", + context + )) { + mergeArgs.unshift(exp); + continue; + } + } + mergeArgs.push(exp); + } else { + pushMergeArg({ + type: 14, + loc, + callee: context.helper(TO_HANDLERS), + arguments: isComponent ? [exp] : [exp, `true`] + }); + } + } else { + context.onError( + createCompilerError( + isVBind ? 34 : 35, + loc + ) + ); + } + continue; + } + if (isVBind && modifiers.some((mod) => mod.content === "prop")) { + patchFlag |= 32; + } + const directiveTransform = context.directiveTransforms[name]; + if (directiveTransform) { + const { props: props2, needRuntime } = directiveTransform(prop, node, context); + !ssr && props2.forEach(analyzePatchFlag); + if (isVOn && arg && !isStaticExp(arg)) { + pushMergeArg(createObjectExpression(props2, elementLoc)); + } else { + properties.push(...props2); + } + if (needRuntime) { + runtimeDirectives.push(prop); + if (shared.isSymbol(needRuntime)) { + directiveImportMap.set(prop, needRuntime); + } + } + } else if (!shared.isBuiltInDirective(name)) { + runtimeDirectives.push(prop); + if (hasChildren) { + shouldUseBlock = true; + } + } + } + } + let propsExpression = void 0; + if (mergeArgs.length) { + pushMergeArg(); + if (mergeArgs.length > 1) { + propsExpression = createCallExpression( + context.helper(MERGE_PROPS), + mergeArgs, + elementLoc + ); + } else { + propsExpression = mergeArgs[0]; + } + } else if (properties.length) { + propsExpression = createObjectExpression( + dedupeProperties(properties), + elementLoc + ); + } + if (hasDynamicKeys) { + patchFlag |= 16; + } else { + if (hasClassBinding && !isComponent) { + patchFlag |= 2; + } + if (hasStyleBinding && !isComponent) { + patchFlag |= 4; + } + if (dynamicPropNames.length) { + patchFlag |= 8; + } + if (hasHydrationEventBinding) { + patchFlag |= 32; + } + } + if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { + patchFlag |= 512; + } + if (!context.inSSR && propsExpression) { + switch (propsExpression.type) { + case 15: + let classKeyIndex = -1; + let styleKeyIndex = -1; + let hasDynamicKey = false; + for (let i = 0; i < propsExpression.properties.length; i++) { + const key = propsExpression.properties[i].key; + if (isStaticExp(key)) { + if (key.content === "class") { + classKeyIndex = i; + } else if (key.content === "style") { + styleKeyIndex = i; + } + } else if (!key.isHandlerKey) { + hasDynamicKey = true; + } + } + const classProp = propsExpression.properties[classKeyIndex]; + const styleProp = propsExpression.properties[styleKeyIndex]; + if (!hasDynamicKey) { + if (classProp && !isStaticExp(classProp.value)) { + classProp.value = createCallExpression( + context.helper(NORMALIZE_CLASS), + [classProp.value] + ); + } + if (styleProp && // the static style is compiled into an object, + // so use `hasStyleBinding` to ensure that it is a dynamic style binding + (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, + // v-bind:style with static literal object + styleProp.value.type === 17)) { + styleProp.value = createCallExpression( + context.helper(NORMALIZE_STYLE), + [styleProp.value] + ); + } + } else { + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [propsExpression] + ); + } + break; + case 14: + break; + default: + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [ + createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ + propsExpression + ]) + ] + ); + break; + } + } + return { + props: propsExpression, + directives: runtimeDirectives, + patchFlag, + dynamicPropNames, + shouldUseBlock + }; +} +function dedupeProperties(properties) { + const knownProps = /* @__PURE__ */ new Map(); + const deduped = []; + for (let i = 0; i < properties.length; i++) { + const prop = properties[i]; + if (prop.key.type === 8 || !prop.key.isStatic) { + deduped.push(prop); + continue; + } + const name = prop.key.content; + const existing = knownProps.get(name); + if (existing) { + if (name === "style" || name === "class" || shared.isOn(name)) { + mergeAsArray(existing, prop); + } + } else { + knownProps.set(name, prop); + deduped.push(prop); + } + } + return deduped; +} +function mergeAsArray(existing, incoming) { + if (existing.value.type === 17) { + existing.value.elements.push(incoming.value); + } else { + existing.value = createArrayExpression( + [existing.value, incoming.value], + existing.loc + ); + } +} +function buildDirectiveArgs(dir, context) { + const dirArgs = []; + const runtime = directiveImportMap.get(dir); + if (runtime) { + dirArgs.push(context.helperString(runtime)); + } else { + const fromSetup = resolveSetupReference("v-" + dir.name, context); + if (fromSetup) { + dirArgs.push(fromSetup); + } else { + context.helper(RESOLVE_DIRECTIVE); + context.directives.add(dir.name); + dirArgs.push(toValidAssetId(dir.name, `directive`)); + } + } + const { loc } = dir; + if (dir.exp) dirArgs.push(dir.exp); + if (dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(dir.arg); + } + if (Object.keys(dir.modifiers).length) { + if (!dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(`void 0`); + } + const trueExpression = createSimpleExpression(`true`, false, loc); + dirArgs.push( + createObjectExpression( + dir.modifiers.map( + (modifier) => createObjectProperty(modifier, trueExpression) + ), + loc + ) + ); + } + return createArrayExpression(dirArgs, dir.loc); +} +function stringifyDynamicPropNames(props) { + let propsNamesString = `[`; + for (let i = 0, l = props.length; i < l; i++) { + propsNamesString += JSON.stringify(props[i]); + if (i < l - 1) propsNamesString += ", "; + } + return propsNamesString + `]`; +} +function isComponentTag(tag) { + return tag === "component" || tag === "Component"; +} + +const transformSlotOutlet = (node, context) => { + if (isSlotOutlet(node)) { + const { children, loc } = node; + const { slotName, slotProps } = processSlotOutlet(node, context); + const slotArgs = [ + context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, + slotName, + "{}", + "undefined", + "true" + ]; + let expectedLen = 2; + if (slotProps) { + slotArgs[2] = slotProps; + expectedLen = 3; + } + if (children.length) { + slotArgs[3] = createFunctionExpression([], children, false, false, loc); + expectedLen = 4; + } + if (context.scopeId && !context.slotted) { + expectedLen = 5; + } + slotArgs.splice(expectedLen); + node.codegenNode = createCallExpression( + context.helper(RENDER_SLOT), + slotArgs, + loc + ); + } +}; +function processSlotOutlet(node, context) { + let slotName = `"default"`; + let slotProps = void 0; + const nonNameProps = []; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (p.value) { + if (p.name === "name") { + slotName = JSON.stringify(p.value.content); + } else { + p.name = shared.camelize(p.name); + nonNameProps.push(p); + } + } + } else { + if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { + if (p.exp) { + slotName = p.exp; + } else if (p.arg && p.arg.type === 4) { + const name = shared.camelize(p.arg.content); + slotName = p.exp = createSimpleExpression(name, false, p.arg.loc); + { + slotName = p.exp = processExpression(p.exp, context); + } + } + } else { + if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { + p.arg.content = shared.camelize(p.arg.content); + } + nonNameProps.push(p); + } + } + } + if (nonNameProps.length > 0) { + const { props, directives } = buildProps( + node, + context, + nonNameProps, + false, + false + ); + slotProps = props; + if (directives.length) { + context.onError( + createCompilerError( + 36, + directives[0].loc + ) + ); + } + } + return { + slotName, + slotProps + }; +} + +const transformOn = (dir, node, context, augmentor) => { + const { loc, modifiers, arg } = dir; + if (!dir.exp && !modifiers.length) { + context.onError(createCompilerError(35, loc)); + } + let eventName; + if (arg.type === 4) { + if (arg.isStatic) { + let rawName = arg.content; + if (rawName.startsWith("vnode")) { + context.onError(createCompilerError(51, arg.loc)); + } + if (rawName.startsWith("vue:")) { + rawName = `vnode-${rawName.slice(4)}`; + } + const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( + // for non-element and vnode lifecycle event listeners, auto convert + // it to camelCase. See issue #2249 + shared.toHandlerKey(shared.camelize(rawName)) + ) : ( + // preserve case for plain element listeners that have uppercase + // letters, as these may be custom elements' custom events + `on:${rawName}` + ); + eventName = createSimpleExpression(eventString, true, arg.loc); + } else { + eventName = createCompoundExpression([ + `${context.helperString(TO_HANDLER_KEY)}(`, + arg, + `)` + ]); + } + } else { + eventName = arg; + eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); + eventName.children.push(`)`); + } + let exp = dir.exp; + if (exp && !exp.content.trim()) { + exp = void 0; + } + let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; + if (exp) { + const isMemberExp = isMemberExpression(exp, context); + const isInlineStatement = !(isMemberExp || isFnExpression(exp, context)); + const hasMultipleStatements = exp.content.includes(`;`); + if (context.prefixIdentifiers) { + isInlineStatement && context.addIdentifiers(`$event`); + exp = dir.exp = processExpression( + exp, + context, + false, + hasMultipleStatements + ); + isInlineStatement && context.removeIdentifiers(`$event`); + shouldCache = context.cacheHandlers && // unnecessary to cache inside v-once + !context.inVOnce && // runtime constants don't need to be cached + // (this is analyzed by compileScript in SFC <script setup>) + !(exp.type === 4 && exp.constType > 0) && // #1541 bail if this is a member exp handler passed to a component - + // we need to use the original function to preserve arity, + // e.g. <transition> relies on checking cb.length to determine + // transition end handling. Inline function is ok since its arity + // is preserved even when cached. + !(isMemberExp && node.tagType === 1) && // bail if the function references closure variables (v-for, v-slot) + // it must be passed fresh to avoid stale values. + !hasScopeRef(exp, context.identifiers); + if (shouldCache && isMemberExp) { + if (exp.type === 4) { + exp.content = `${exp.content} && ${exp.content}(...args)`; + } else { + exp.children = [...exp.children, ` && `, ...exp.children, `(...args)`]; + } + } + } + if (isInlineStatement || shouldCache && isMemberExp) { + exp = createCompoundExpression([ + `${isInlineStatement ? context.isTS ? `($event: any)` : `$event` : `${context.isTS ? ` +//@ts-ignore +` : ``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, + exp, + hasMultipleStatements ? `}` : `)` + ]); + } + } + let ret = { + props: [ + createObjectProperty( + eventName, + exp || createSimpleExpression(`() => {}`, false, loc) + ) + ] + }; + if (augmentor) { + ret = augmentor(ret); + } + if (shouldCache) { + ret.props[0].value = context.cache(ret.props[0].value); + } + ret.props.forEach((p) => p.key.isHandlerKey = true); + return ret; +}; + +const transformText = (node, context) => { + if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { + return () => { + const children = node.children; + let currentContainer = void 0; + let hasText = false; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child)) { + hasText = true; + for (let j = i + 1; j < children.length; j++) { + const next = children[j]; + if (isText$1(next)) { + if (!currentContainer) { + currentContainer = children[i] = createCompoundExpression( + [child], + child.loc + ); + } + currentContainer.children.push(` + `, next); + children.splice(j, 1); + j--; + } else { + currentContainer = void 0; + break; + } + } + } + } + if (!hasText || // if this is a plain element with a single text child, leave it + // as-is since the runtime has dedicated fast path for this by directly + // setting textContent of the element. + // for component root it's always normalized anyway. + children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 + // custom directives can potentially add DOM elements arbitrarily, + // we need to avoid setting textContent of the element at runtime + // to avoid accidentally overwriting the DOM elements added + // by the user through custom directives. + !node.props.find( + (p) => p.type === 7 && !context.directiveTransforms[p.name] + ) && // in compat mode, <template> tags with no special directives + // will be rendered as a fragment so its children must be + // converted into vnodes. + !(node.tag === "template"))) { + return; + } + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child) || child.type === 8) { + const callArgs = []; + if (child.type !== 2 || child.content !== " ") { + callArgs.push(child); + } + if (!context.ssr && getConstantType(child, context) === 0) { + callArgs.push( + 1 + (` /* ${shared.PatchFlagNames[1]} */` ) + ); + } + children[i] = { + type: 12, + content: child, + loc: child.loc, + codegenNode: createCallExpression( + context.helper(CREATE_TEXT), + callArgs + ) + }; + } + } + }; + } +}; + +const seen$1 = /* @__PURE__ */ new WeakSet(); +const transformOnce = (node, context) => { + if (node.type === 1 && findDir(node, "once", true)) { + if (seen$1.has(node) || context.inVOnce || context.inSSR) { + return; + } + seen$1.add(node); + context.inVOnce = true; + context.helper(SET_BLOCK_TRACKING); + return () => { + context.inVOnce = false; + const cur = context.currentNode; + if (cur.codegenNode) { + cur.codegenNode = context.cache( + cur.codegenNode, + true, + true + ); + } + }; + } +}; + +const transformModel = (dir, node, context) => { + const { exp, arg } = dir; + if (!exp) { + context.onError( + createCompilerError(41, dir.loc) + ); + return createTransformProps(); + } + const rawExp = exp.loc.source.trim(); + const expString = exp.type === 4 ? exp.content : rawExp; + const bindingType = context.bindingMetadata[rawExp]; + if (bindingType === "props" || bindingType === "props-aliased") { + context.onError(createCompilerError(44, exp.loc)); + return createTransformProps(); + } + const maybeRef = context.inline && (bindingType === "setup-let" || bindingType === "setup-ref" || bindingType === "setup-maybe-ref"); + if (!expString.trim() || !isMemberExpression(exp, context) && !maybeRef) { + context.onError( + createCompilerError(42, exp.loc) + ); + return createTransformProps(); + } + if (context.prefixIdentifiers && isSimpleIdentifier(expString) && context.identifiers[expString]) { + context.onError( + createCompilerError(43, exp.loc) + ); + return createTransformProps(); + } + const propName = arg ? arg : createSimpleExpression("modelValue", true); + const eventName = arg ? isStaticExp(arg) ? `onUpdate:${shared.camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; + let assignmentExp; + const eventArg = context.isTS ? `($event: any)` : `$event`; + if (maybeRef) { + if (bindingType === "setup-ref") { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + createSimpleExpression(rawExp, false, exp.loc), + `).value = $event)` + ]); + } else { + const altAssignment = bindingType === "setup-let" ? `${rawExp} = $event` : `null`; + assignmentExp = createCompoundExpression([ + `${eventArg} => (${context.helperString(IS_REF)}(${rawExp}) ? (`, + createSimpleExpression(rawExp, false, exp.loc), + `).value = $event : ${altAssignment})` + ]); + } + } else { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + exp, + `) = $event)` + ]); + } + const props = [ + // modelValue: foo + createObjectProperty(propName, dir.exp), + // "onUpdate:modelValue": $event => (foo = $event) + createObjectProperty(eventName, assignmentExp) + ]; + if (context.prefixIdentifiers && !context.inVOnce && context.cacheHandlers && !hasScopeRef(exp, context.identifiers)) { + props[1].value = context.cache(props[1].value); + } + if (dir.modifiers.length && node.tagType === 1) { + const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); + const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; + props.push( + createObjectProperty( + modifiersKey, + createSimpleExpression( + `{ ${modifiers} }`, + false, + dir.loc, + 2 + ) + ) + ); + } + return createTransformProps(props); +}; +function createTransformProps(props = []) { + return { props }; +} + +const validDivisionCharRE = /[\w).+\-_$\]]/; +const transformFilter = (node, context) => { + if (!isCompatEnabled("COMPILER_FILTERS", context)) { + return; + } + if (node.type === 5) { + rewriteFilter(node.content, context); + } else if (node.type === 1) { + node.props.forEach((prop) => { + if (prop.type === 7 && prop.name !== "for" && prop.exp) { + rewriteFilter(prop.exp, context); + } + }); + } +}; +function rewriteFilter(node, context) { + if (node.type === 4) { + parseFilter(node, context); + } else { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (typeof child !== "object") continue; + if (child.type === 4) { + parseFilter(child, context); + } else if (child.type === 8) { + rewriteFilter(node, context); + } else if (child.type === 5) { + rewriteFilter(child.content, context); + } + } + } +} +function parseFilter(node, context) { + const exp = node.content; + let inSingle = false; + let inDouble = false; + let inTemplateString = false; + let inRegex = false; + let curly = 0; + let square = 0; + let paren = 0; + let lastFilterIndex = 0; + let c, prev, i, expression, filters = []; + for (i = 0; i < exp.length; i++) { + prev = c; + c = exp.charCodeAt(i); + if (inSingle) { + if (c === 39 && prev !== 92) inSingle = false; + } else if (inDouble) { + if (c === 34 && prev !== 92) inDouble = false; + } else if (inTemplateString) { + if (c === 96 && prev !== 92) inTemplateString = false; + } else if (inRegex) { + if (c === 47 && prev !== 92) inRegex = false; + } else if (c === 124 && // pipe + exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) { + if (expression === void 0) { + lastFilterIndex = i + 1; + expression = exp.slice(0, i).trim(); + } else { + pushFilter(); + } + } else { + switch (c) { + case 34: + inDouble = true; + break; + // " + case 39: + inSingle = true; + break; + // ' + case 96: + inTemplateString = true; + break; + // ` + case 40: + paren++; + break; + // ( + case 41: + paren--; + break; + // ) + case 91: + square++; + break; + // [ + case 93: + square--; + break; + // ] + case 123: + curly++; + break; + // { + case 125: + curly--; + break; + } + if (c === 47) { + let j = i - 1; + let p; + for (; j >= 0; j--) { + p = exp.charAt(j); + if (p !== " ") break; + } + if (!p || !validDivisionCharRE.test(p)) { + inRegex = true; + } + } + } + } + if (expression === void 0) { + expression = exp.slice(0, i).trim(); + } else if (lastFilterIndex !== 0) { + pushFilter(); + } + function pushFilter() { + filters.push(exp.slice(lastFilterIndex, i).trim()); + lastFilterIndex = i + 1; + } + if (filters.length) { + warnDeprecation( + "COMPILER_FILTERS", + context, + node.loc + ); + for (i = 0; i < filters.length; i++) { + expression = wrapFilter(expression, filters[i], context); + } + node.content = expression; + node.ast = void 0; + } +} +function wrapFilter(exp, filter, context) { + context.helper(RESOLVE_FILTER); + const i = filter.indexOf("("); + if (i < 0) { + context.filters.add(filter); + return `${toValidAssetId(filter, "filter")}(${exp})`; + } else { + const name = filter.slice(0, i); + const args = filter.slice(i + 1); + context.filters.add(name); + return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`; + } +} + +const seen = /* @__PURE__ */ new WeakSet(); +const transformMemo = (node, context) => { + if (node.type === 1) { + const dir = findDir(node, "memo"); + if (!dir || seen.has(node)) { + return; + } + seen.add(node); + return () => { + const codegenNode = node.codegenNode || context.currentNode.codegenNode; + if (codegenNode && codegenNode.type === 13) { + if (node.tagType !== 1) { + convertToBlock(codegenNode, context); + } + node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ + dir.exp, + createFunctionExpression(void 0, codegenNode), + `_cache`, + String(context.cached.length) + ]); + context.cached.push(null); + } + }; + } +}; + +function getBaseTransformPreset(prefixIdentifiers) { + return [ + [ + transformOnce, + transformIf, + transformMemo, + transformFor, + ...[transformFilter] , + ...prefixIdentifiers ? [ + // order is important + trackVForSlotScopes, + transformExpression + ] : [], + transformSlotOutlet, + transformElement, + trackSlotScopes, + transformText + ], + { + on: transformOn, + bind: transformBind, + model: transformModel + } + ]; +} +function baseCompile(source, options = {}) { + const onError = options.onError || defaultOnError; + const isModuleMode = options.mode === "module"; + const prefixIdentifiers = options.prefixIdentifiers === true || isModuleMode; + if (!prefixIdentifiers && options.cacheHandlers) { + onError(createCompilerError(49)); + } + if (options.scopeId && !isModuleMode) { + onError(createCompilerError(50)); + } + const resolvedOptions = shared.extend({}, options, { + prefixIdentifiers + }); + const ast = shared.isString(source) ? baseParse(source, resolvedOptions) : source; + const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(prefixIdentifiers); + if (options.isTS) { + const { expressionPlugins } = options; + if (!expressionPlugins || !expressionPlugins.includes("typescript")) { + options.expressionPlugins = [...expressionPlugins || [], "typescript"]; + } + } + transform( + ast, + shared.extend({}, resolvedOptions, { + nodeTransforms: [ + ...nodeTransforms, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: shared.extend( + {}, + directiveTransforms, + options.directiveTransforms || {} + // user transforms + ) + }) + ); + return generate(ast, resolvedOptions); +} + +const BindingTypes = { + "DATA": "data", + "PROPS": "props", + "PROPS_ALIASED": "props-aliased", + "SETUP_LET": "setup-let", + "SETUP_CONST": "setup-const", + "SETUP_REACTIVE_CONST": "setup-reactive-const", + "SETUP_MAYBE_REF": "setup-maybe-ref", + "SETUP_REF": "setup-ref", + "OPTIONS": "options", + "LITERAL_CONST": "literal-const" +}; + +const noopDirectiveTransform = () => ({ props: [] }); + +exports.generateCodeFrame = shared.generateCodeFrame; +exports.BASE_TRANSITION = BASE_TRANSITION; +exports.BindingTypes = BindingTypes; +exports.CAMELIZE = CAMELIZE; +exports.CAPITALIZE = CAPITALIZE; +exports.CREATE_BLOCK = CREATE_BLOCK; +exports.CREATE_COMMENT = CREATE_COMMENT; +exports.CREATE_ELEMENT_BLOCK = CREATE_ELEMENT_BLOCK; +exports.CREATE_ELEMENT_VNODE = CREATE_ELEMENT_VNODE; +exports.CREATE_SLOTS = CREATE_SLOTS; +exports.CREATE_STATIC = CREATE_STATIC; +exports.CREATE_TEXT = CREATE_TEXT; +exports.CREATE_VNODE = CREATE_VNODE; +exports.CompilerDeprecationTypes = CompilerDeprecationTypes; +exports.ConstantTypes = ConstantTypes; +exports.ElementTypes = ElementTypes; +exports.ErrorCodes = ErrorCodes; +exports.FRAGMENT = FRAGMENT; +exports.GUARD_REACTIVE_PROPS = GUARD_REACTIVE_PROPS; +exports.IS_MEMO_SAME = IS_MEMO_SAME; +exports.IS_REF = IS_REF; +exports.KEEP_ALIVE = KEEP_ALIVE; +exports.MERGE_PROPS = MERGE_PROPS; +exports.NORMALIZE_CLASS = NORMALIZE_CLASS; +exports.NORMALIZE_PROPS = NORMALIZE_PROPS; +exports.NORMALIZE_STYLE = NORMALIZE_STYLE; +exports.Namespaces = Namespaces; +exports.NodeTypes = NodeTypes; +exports.OPEN_BLOCK = OPEN_BLOCK; +exports.POP_SCOPE_ID = POP_SCOPE_ID; +exports.PUSH_SCOPE_ID = PUSH_SCOPE_ID; +exports.RENDER_LIST = RENDER_LIST; +exports.RENDER_SLOT = RENDER_SLOT; +exports.RESOLVE_COMPONENT = RESOLVE_COMPONENT; +exports.RESOLVE_DIRECTIVE = RESOLVE_DIRECTIVE; +exports.RESOLVE_DYNAMIC_COMPONENT = RESOLVE_DYNAMIC_COMPONENT; +exports.RESOLVE_FILTER = RESOLVE_FILTER; +exports.SET_BLOCK_TRACKING = SET_BLOCK_TRACKING; +exports.SUSPENSE = SUSPENSE; +exports.TELEPORT = TELEPORT; +exports.TO_DISPLAY_STRING = TO_DISPLAY_STRING; +exports.TO_HANDLERS = TO_HANDLERS; +exports.TO_HANDLER_KEY = TO_HANDLER_KEY; +exports.TS_NODE_TYPES = TS_NODE_TYPES; +exports.UNREF = UNREF; +exports.WITH_CTX = WITH_CTX; +exports.WITH_DIRECTIVES = WITH_DIRECTIVES; +exports.WITH_MEMO = WITH_MEMO; +exports.advancePositionWithClone = advancePositionWithClone; +exports.advancePositionWithMutation = advancePositionWithMutation; +exports.assert = assert; +exports.baseCompile = baseCompile; +exports.baseParse = baseParse; +exports.buildDirectiveArgs = buildDirectiveArgs; +exports.buildProps = buildProps; +exports.buildSlots = buildSlots; +exports.checkCompatEnabled = checkCompatEnabled; +exports.convertToBlock = convertToBlock; +exports.createArrayExpression = createArrayExpression; +exports.createAssignmentExpression = createAssignmentExpression; +exports.createBlockStatement = createBlockStatement; +exports.createCacheExpression = createCacheExpression; +exports.createCallExpression = createCallExpression; +exports.createCompilerError = createCompilerError; +exports.createCompoundExpression = createCompoundExpression; +exports.createConditionalExpression = createConditionalExpression; +exports.createForLoopParams = createForLoopParams; +exports.createFunctionExpression = createFunctionExpression; +exports.createIfStatement = createIfStatement; +exports.createInterpolation = createInterpolation; +exports.createObjectExpression = createObjectExpression; +exports.createObjectProperty = createObjectProperty; +exports.createReturnStatement = createReturnStatement; +exports.createRoot = createRoot; +exports.createSequenceExpression = createSequenceExpression; +exports.createSimpleExpression = createSimpleExpression; +exports.createStructuralDirectiveTransform = createStructuralDirectiveTransform; +exports.createTemplateLiteral = createTemplateLiteral; +exports.createTransformContext = createTransformContext; +exports.createVNodeCall = createVNodeCall; +exports.errorMessages = errorMessages; +exports.extractIdentifiers = extractIdentifiers; +exports.findDir = findDir; +exports.findProp = findProp; +exports.forAliasRE = forAliasRE; +exports.generate = generate; +exports.getBaseTransformPreset = getBaseTransformPreset; +exports.getConstantType = getConstantType; +exports.getMemoedVNodeCall = getMemoedVNodeCall; +exports.getVNodeBlockHelper = getVNodeBlockHelper; +exports.getVNodeHelper = getVNodeHelper; +exports.hasDynamicKeyVBind = hasDynamicKeyVBind; +exports.hasScopeRef = hasScopeRef; +exports.helperNameMap = helperNameMap; +exports.injectProp = injectProp; +exports.isCoreComponent = isCoreComponent; +exports.isFnExpression = isFnExpression; +exports.isFnExpressionBrowser = isFnExpressionBrowser; +exports.isFnExpressionNode = isFnExpressionNode; +exports.isFunctionType = isFunctionType; +exports.isInDestructureAssignment = isInDestructureAssignment; +exports.isInNewExpression = isInNewExpression; +exports.isMemberExpression = isMemberExpression; +exports.isMemberExpressionBrowser = isMemberExpressionBrowser; +exports.isMemberExpressionNode = isMemberExpressionNode; +exports.isReferencedIdentifier = isReferencedIdentifier; +exports.isSimpleIdentifier = isSimpleIdentifier; +exports.isSlotOutlet = isSlotOutlet; +exports.isStaticArgOf = isStaticArgOf; +exports.isStaticExp = isStaticExp; +exports.isStaticProperty = isStaticProperty; +exports.isStaticPropertyKey = isStaticPropertyKey; +exports.isTemplateNode = isTemplateNode; +exports.isText = isText$1; +exports.isVSlot = isVSlot; +exports.locStub = locStub; +exports.noopDirectiveTransform = noopDirectiveTransform; +exports.processExpression = processExpression; +exports.processFor = processFor; +exports.processIf = processIf; +exports.processSlotOutlet = processSlotOutlet; +exports.registerRuntimeHelpers = registerRuntimeHelpers; +exports.resolveComponentType = resolveComponentType; +exports.stringifyExpression = stringifyExpression; +exports.toValidAssetId = toValidAssetId; +exports.trackSlotScopes = trackSlotScopes; +exports.trackVForSlotScopes = trackVForSlotScopes; +exports.transform = transform; +exports.transformBind = transformBind; +exports.transformElement = transformElement; +exports.transformExpression = transformExpression; +exports.transformModel = transformModel; +exports.transformOn = transformOn; +exports.traverseNode = traverseNode; +exports.unwrapTSNode = unwrapTSNode; +exports.walkBlockDeclarations = walkBlockDeclarations; +exports.walkFunctionParams = walkFunctionParams; +exports.walkIdentifiers = walkIdentifiers; +exports.warnDeprecation = warnDeprecation; diff --git a/vuetest/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js b/vuetest/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js new file mode 100644 index 0000000..7792261 --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js @@ -0,0 +1,6690 @@ +/** +* @vue/compiler-core v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var shared = require('@vue/shared'); +var decode_js = require('entities/lib/decode.js'); +var parser = require('@babel/parser'); +var estreeWalker = require('estree-walker'); +var sourceMapJs = require('source-map-js'); + +const FRAGMENT = Symbol(``); +const TELEPORT = Symbol(``); +const SUSPENSE = Symbol(``); +const KEEP_ALIVE = Symbol(``); +const BASE_TRANSITION = Symbol( + `` +); +const OPEN_BLOCK = Symbol(``); +const CREATE_BLOCK = Symbol(``); +const CREATE_ELEMENT_BLOCK = Symbol( + `` +); +const CREATE_VNODE = Symbol(``); +const CREATE_ELEMENT_VNODE = Symbol( + `` +); +const CREATE_COMMENT = Symbol( + `` +); +const CREATE_TEXT = Symbol( + `` +); +const CREATE_STATIC = Symbol( + `` +); +const RESOLVE_COMPONENT = Symbol( + `` +); +const RESOLVE_DYNAMIC_COMPONENT = Symbol( + `` +); +const RESOLVE_DIRECTIVE = Symbol( + `` +); +const RESOLVE_FILTER = Symbol( + `` +); +const WITH_DIRECTIVES = Symbol( + `` +); +const RENDER_LIST = Symbol(``); +const RENDER_SLOT = Symbol(``); +const CREATE_SLOTS = Symbol(``); +const TO_DISPLAY_STRING = Symbol( + `` +); +const MERGE_PROPS = Symbol(``); +const NORMALIZE_CLASS = Symbol( + `` +); +const NORMALIZE_STYLE = Symbol( + `` +); +const NORMALIZE_PROPS = Symbol( + `` +); +const GUARD_REACTIVE_PROPS = Symbol( + `` +); +const TO_HANDLERS = Symbol(``); +const CAMELIZE = Symbol(``); +const CAPITALIZE = Symbol(``); +const TO_HANDLER_KEY = Symbol( + `` +); +const SET_BLOCK_TRACKING = Symbol( + `` +); +const PUSH_SCOPE_ID = Symbol(``); +const POP_SCOPE_ID = Symbol(``); +const WITH_CTX = Symbol(``); +const UNREF = Symbol(``); +const IS_REF = Symbol(``); +const WITH_MEMO = Symbol(``); +const IS_MEMO_SAME = Symbol(``); +const helperNameMap = { + [FRAGMENT]: `Fragment`, + [TELEPORT]: `Teleport`, + [SUSPENSE]: `Suspense`, + [KEEP_ALIVE]: `KeepAlive`, + [BASE_TRANSITION]: `BaseTransition`, + [OPEN_BLOCK]: `openBlock`, + [CREATE_BLOCK]: `createBlock`, + [CREATE_ELEMENT_BLOCK]: `createElementBlock`, + [CREATE_VNODE]: `createVNode`, + [CREATE_ELEMENT_VNODE]: `createElementVNode`, + [CREATE_COMMENT]: `createCommentVNode`, + [CREATE_TEXT]: `createTextVNode`, + [CREATE_STATIC]: `createStaticVNode`, + [RESOLVE_COMPONENT]: `resolveComponent`, + [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, + [RESOLVE_DIRECTIVE]: `resolveDirective`, + [RESOLVE_FILTER]: `resolveFilter`, + [WITH_DIRECTIVES]: `withDirectives`, + [RENDER_LIST]: `renderList`, + [RENDER_SLOT]: `renderSlot`, + [CREATE_SLOTS]: `createSlots`, + [TO_DISPLAY_STRING]: `toDisplayString`, + [MERGE_PROPS]: `mergeProps`, + [NORMALIZE_CLASS]: `normalizeClass`, + [NORMALIZE_STYLE]: `normalizeStyle`, + [NORMALIZE_PROPS]: `normalizeProps`, + [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, + [TO_HANDLERS]: `toHandlers`, + [CAMELIZE]: `camelize`, + [CAPITALIZE]: `capitalize`, + [TO_HANDLER_KEY]: `toHandlerKey`, + [SET_BLOCK_TRACKING]: `setBlockTracking`, + [PUSH_SCOPE_ID]: `pushScopeId`, + [POP_SCOPE_ID]: `popScopeId`, + [WITH_CTX]: `withCtx`, + [UNREF]: `unref`, + [IS_REF]: `isRef`, + [WITH_MEMO]: `withMemo`, + [IS_MEMO_SAME]: `isMemoSame` +}; +function registerRuntimeHelpers(helpers) { + Object.getOwnPropertySymbols(helpers).forEach((s) => { + helperNameMap[s] = helpers[s]; + }); +} + +const Namespaces = { + "HTML": 0, + "0": "HTML", + "SVG": 1, + "1": "SVG", + "MATH_ML": 2, + "2": "MATH_ML" +}; +const NodeTypes = { + "ROOT": 0, + "0": "ROOT", + "ELEMENT": 1, + "1": "ELEMENT", + "TEXT": 2, + "2": "TEXT", + "COMMENT": 3, + "3": "COMMENT", + "SIMPLE_EXPRESSION": 4, + "4": "SIMPLE_EXPRESSION", + "INTERPOLATION": 5, + "5": "INTERPOLATION", + "ATTRIBUTE": 6, + "6": "ATTRIBUTE", + "DIRECTIVE": 7, + "7": "DIRECTIVE", + "COMPOUND_EXPRESSION": 8, + "8": "COMPOUND_EXPRESSION", + "IF": 9, + "9": "IF", + "IF_BRANCH": 10, + "10": "IF_BRANCH", + "FOR": 11, + "11": "FOR", + "TEXT_CALL": 12, + "12": "TEXT_CALL", + "VNODE_CALL": 13, + "13": "VNODE_CALL", + "JS_CALL_EXPRESSION": 14, + "14": "JS_CALL_EXPRESSION", + "JS_OBJECT_EXPRESSION": 15, + "15": "JS_OBJECT_EXPRESSION", + "JS_PROPERTY": 16, + "16": "JS_PROPERTY", + "JS_ARRAY_EXPRESSION": 17, + "17": "JS_ARRAY_EXPRESSION", + "JS_FUNCTION_EXPRESSION": 18, + "18": "JS_FUNCTION_EXPRESSION", + "JS_CONDITIONAL_EXPRESSION": 19, + "19": "JS_CONDITIONAL_EXPRESSION", + "JS_CACHE_EXPRESSION": 20, + "20": "JS_CACHE_EXPRESSION", + "JS_BLOCK_STATEMENT": 21, + "21": "JS_BLOCK_STATEMENT", + "JS_TEMPLATE_LITERAL": 22, + "22": "JS_TEMPLATE_LITERAL", + "JS_IF_STATEMENT": 23, + "23": "JS_IF_STATEMENT", + "JS_ASSIGNMENT_EXPRESSION": 24, + "24": "JS_ASSIGNMENT_EXPRESSION", + "JS_SEQUENCE_EXPRESSION": 25, + "25": "JS_SEQUENCE_EXPRESSION", + "JS_RETURN_STATEMENT": 26, + "26": "JS_RETURN_STATEMENT" +}; +const ElementTypes = { + "ELEMENT": 0, + "0": "ELEMENT", + "COMPONENT": 1, + "1": "COMPONENT", + "SLOT": 2, + "2": "SLOT", + "TEMPLATE": 3, + "3": "TEMPLATE" +}; +const ConstantTypes = { + "NOT_CONSTANT": 0, + "0": "NOT_CONSTANT", + "CAN_SKIP_PATCH": 1, + "1": "CAN_SKIP_PATCH", + "CAN_CACHE": 2, + "2": "CAN_CACHE", + "CAN_STRINGIFY": 3, + "3": "CAN_STRINGIFY" +}; +const locStub = { + start: { line: 1, column: 1, offset: 0 }, + end: { line: 1, column: 1, offset: 0 }, + source: "" +}; +function createRoot(children, source = "") { + return { + type: 0, + source, + children, + helpers: /* @__PURE__ */ new Set(), + components: [], + directives: [], + hoists: [], + imports: [], + cached: [], + temps: 0, + codegenNode: void 0, + loc: locStub + }; +} +function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) { + if (context) { + if (isBlock) { + context.helper(OPEN_BLOCK); + context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); + } else { + context.helper(getVNodeHelper(context.inSSR, isComponent)); + } + if (directives) { + context.helper(WITH_DIRECTIVES); + } + } + return { + type: 13, + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent, + loc + }; +} +function createArrayExpression(elements, loc = locStub) { + return { + type: 17, + loc, + elements + }; +} +function createObjectExpression(properties, loc = locStub) { + return { + type: 15, + loc, + properties + }; +} +function createObjectProperty(key, value) { + return { + type: 16, + loc: locStub, + key: shared.isString(key) ? createSimpleExpression(key, true) : key, + value + }; +} +function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { + return { + type: 4, + loc, + content, + isStatic, + constType: isStatic ? 3 : constType + }; +} +function createInterpolation(content, loc) { + return { + type: 5, + loc, + content: shared.isString(content) ? createSimpleExpression(content, false, loc) : content + }; +} +function createCompoundExpression(children, loc = locStub) { + return { + type: 8, + loc, + children + }; +} +function createCallExpression(callee, args = [], loc = locStub) { + return { + type: 14, + loc, + callee, + arguments: args + }; +} +function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { + return { + type: 18, + params, + returns, + newline, + isSlot, + loc + }; +} +function createConditionalExpression(test, consequent, alternate, newline = true) { + return { + type: 19, + test, + consequent, + alternate, + newline, + loc: locStub + }; +} +function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) { + return { + type: 20, + index, + value, + needPauseTracking, + inVOnce, + needArraySpread: false, + loc: locStub + }; +} +function createBlockStatement(body) { + return { + type: 21, + body, + loc: locStub + }; +} +function createTemplateLiteral(elements) { + return { + type: 22, + elements, + loc: locStub + }; +} +function createIfStatement(test, consequent, alternate) { + return { + type: 23, + test, + consequent, + alternate, + loc: locStub + }; +} +function createAssignmentExpression(left, right) { + return { + type: 24, + left, + right, + loc: locStub + }; +} +function createSequenceExpression(expressions) { + return { + type: 25, + expressions, + loc: locStub + }; +} +function createReturnStatement(returns) { + return { + type: 26, + returns, + loc: locStub + }; +} +function getVNodeHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; +} +function getVNodeBlockHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; +} +function convertToBlock(node, { helper, removeHelper, inSSR }) { + if (!node.isBlock) { + node.isBlock = true; + removeHelper(getVNodeHelper(inSSR, node.isComponent)); + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(inSSR, node.isComponent)); + } +} + +const defaultDelimitersOpen = new Uint8Array([123, 123]); +const defaultDelimitersClose = new Uint8Array([125, 125]); +function isTagStartChar(c) { + return c >= 97 && c <= 122 || c >= 65 && c <= 90; +} +function isWhitespace(c) { + return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; +} +function isEndOfTagSection(c) { + return c === 47 || c === 62 || isWhitespace(c); +} +function toCharCodes(str) { + const ret = new Uint8Array(str.length); + for (let i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret; +} +const Sequences = { + Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), + // CDATA[ + CdataEnd: new Uint8Array([93, 93, 62]), + // ]]> + CommentEnd: new Uint8Array([45, 45, 62]), + // `-->` + ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), + // `<\/script` + StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), + // `</style` + TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), + // `</title` + TextareaEnd: new Uint8Array([ + 60, + 47, + 116, + 101, + 120, + 116, + 97, + 114, + 101, + 97 + ]) + // `</textarea +}; +class Tokenizer { + constructor(stack, cbs) { + this.stack = stack; + this.cbs = cbs; + /** The current state the tokenizer is in. */ + this.state = 1; + /** The read buffer. */ + this.buffer = ""; + /** The beginning of the section that is currently being read. */ + this.sectionStart = 0; + /** The index within the buffer that we are currently looking at. */ + this.index = 0; + /** The start of the last entity. */ + this.entityStart = 0; + /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ + this.baseState = 1; + /** For special parsing behavior inside of script and style tags. */ + this.inRCDATA = false; + /** For disabling RCDATA tags handling */ + this.inXML = false; + /** For disabling interpolation parsing in v-pre */ + this.inVPre = false; + /** Record newline positions for fast line / column calculation */ + this.newlines = []; + this.mode = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + this.delimiterIndex = -1; + this.currentSequence = void 0; + this.sequenceIndex = 0; + { + this.entityDecoder = new decode_js.EntityDecoder( + decode_js.htmlDecodeTree, + (cp, consumed) => this.emitCodePoint(cp, consumed) + ); + } + } + get inSFCRoot() { + return this.mode === 2 && this.stack.length === 0; + } + reset() { + this.state = 1; + this.mode = 0; + this.buffer = ""; + this.sectionStart = 0; + this.index = 0; + this.baseState = 1; + this.inRCDATA = false; + this.currentSequence = void 0; + this.newlines.length = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + } + /** + * Generate Position object with line / column information using recorded + * newline positions. We know the index is always going to be an already + * processed index, so all the newlines up to this index should have been + * recorded. + */ + getPos(index) { + let line = 1; + let column = index + 1; + for (let i = this.newlines.length - 1; i >= 0; i--) { + const newlineIndex = this.newlines[i]; + if (index > newlineIndex) { + line = i + 2; + column = index - newlineIndex; + break; + } + } + return { + column, + line, + offset: index + }; + } + peek() { + return this.buffer.charCodeAt(this.index + 1); + } + stateText(c) { + if (c === 60) { + if (this.index > this.sectionStart) { + this.cbs.ontext(this.sectionStart, this.index); + } + this.state = 5; + this.sectionStart = this.index; + } else if (c === 38) { + this.startEntity(); + } else if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } + stateInterpolationOpen(c) { + if (c === this.delimiterOpen[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterOpen.length - 1) { + const start = this.index + 1 - this.delimiterOpen.length; + if (start > this.sectionStart) { + this.cbs.ontext(this.sectionStart, start); + } + this.state = 3; + this.sectionStart = start; + } else { + this.delimiterIndex++; + } + } else if (this.inRCDATA) { + this.state = 32; + this.stateInRCDATA(c); + } else { + this.state = 1; + this.stateText(c); + } + } + stateInterpolation(c) { + if (c === this.delimiterClose[0]) { + this.state = 4; + this.delimiterIndex = 0; + this.stateInterpolationClose(c); + } + } + stateInterpolationClose(c) { + if (c === this.delimiterClose[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterClose.length - 1) { + this.cbs.oninterpolation(this.sectionStart, this.index + 1); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else { + this.delimiterIndex++; + } + } else { + this.state = 3; + this.stateInterpolation(c); + } + } + stateSpecialStartSequence(c) { + const isEnd = this.sequenceIndex === this.currentSequence.length; + const isMatch = isEnd ? ( + // If we are at the end of the sequence, make sure the tag name has ended + isEndOfTagSection(c) + ) : ( + // Otherwise, do a case-insensitive comparison + (c | 32) === this.currentSequence[this.sequenceIndex] + ); + if (!isMatch) { + this.inRCDATA = false; + } else if (!isEnd) { + this.sequenceIndex++; + return; + } + this.sequenceIndex = 0; + this.state = 6; + this.stateInTagName(c); + } + /** Look for an end tag. For <title> and <textarea>, also decode entities. */ + stateInRCDATA(c) { + if (this.sequenceIndex === this.currentSequence.length) { + if (c === 62 || isWhitespace(c)) { + const endOfText = this.index - this.currentSequence.length; + if (this.sectionStart < endOfText) { + const actualIndex = this.index; + this.index = endOfText; + this.cbs.ontext(this.sectionStart, endOfText); + this.index = actualIndex; + } + this.sectionStart = endOfText + 2; + this.stateInClosingTagName(c); + this.inRCDATA = false; + return; + } + this.sequenceIndex = 0; + } + if ((c | 32) === this.currentSequence[this.sequenceIndex]) { + this.sequenceIndex += 1; + } else if (this.sequenceIndex === 0) { + if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { + if (c === 38) { + this.startEntity(); + } else if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } else if (this.fastForwardTo(60)) { + this.sequenceIndex = 1; + } + } else { + this.sequenceIndex = Number(c === 60); + } + } + stateCDATASequence(c) { + if (c === Sequences.Cdata[this.sequenceIndex]) { + if (++this.sequenceIndex === Sequences.Cdata.length) { + this.state = 28; + this.currentSequence = Sequences.CdataEnd; + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + } + } else { + this.sequenceIndex = 0; + this.state = 23; + this.stateInDeclaration(c); + } + } + /** + * When we wait for one specific character, we can speed things up + * by skipping through the buffer until we find it. + * + * @returns Whether the character was found. + */ + fastForwardTo(c) { + while (++this.index < this.buffer.length) { + const cc = this.buffer.charCodeAt(this.index); + if (cc === 10) { + this.newlines.push(this.index); + } + if (cc === c) { + return true; + } + } + this.index = this.buffer.length - 1; + return false; + } + /** + * Comments and CDATA end with `-->` and `]]>`. + * + * Their common qualities are: + * - Their end sequences have a distinct character they start with. + * - That character is then repeated, so we have to check multiple repeats. + * - All characters but the start character of the sequence can be skipped. + */ + stateInCommentLike(c) { + if (c === this.currentSequence[this.sequenceIndex]) { + if (++this.sequenceIndex === this.currentSequence.length) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, this.index - 2); + } else { + this.cbs.oncomment(this.sectionStart, this.index - 2); + } + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + this.state = 1; + } + } else if (this.sequenceIndex === 0) { + if (this.fastForwardTo(this.currentSequence[0])) { + this.sequenceIndex = 1; + } + } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { + this.sequenceIndex = 0; + } + } + startSpecial(sequence, offset) { + this.enterRCDATA(sequence, offset); + this.state = 31; + } + enterRCDATA(sequence, offset) { + this.inRCDATA = true; + this.currentSequence = sequence; + this.sequenceIndex = offset; + } + stateBeforeTagName(c) { + if (c === 33) { + this.state = 22; + this.sectionStart = this.index + 1; + } else if (c === 63) { + this.state = 24; + this.sectionStart = this.index + 1; + } else if (isTagStartChar(c)) { + this.sectionStart = this.index; + if (this.mode === 0) { + this.state = 6; + } else if (this.inSFCRoot) { + this.state = 34; + } else if (!this.inXML) { + if (c === 116) { + this.state = 30; + } else { + this.state = c === 115 ? 29 : 6; + } + } else { + this.state = 6; + } + } else if (c === 47) { + this.state = 8; + } else { + this.state = 1; + this.stateText(c); + } + } + stateInTagName(c) { + if (isEndOfTagSection(c)) { + this.handleTagName(c); + } + } + stateInSFCRootTagName(c) { + if (isEndOfTagSection(c)) { + const tag = this.buffer.slice(this.sectionStart, this.index); + if (tag !== "template") { + this.enterRCDATA(toCharCodes(`</` + tag), 0); + } + this.handleTagName(c); + } + } + handleTagName(c) { + this.cbs.onopentagname(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } + stateBeforeClosingTagName(c) { + if (isWhitespace(c)) ; else if (c === 62) { + { + this.cbs.onerr(14, this.index); + } + this.state = 1; + this.sectionStart = this.index + 1; + } else { + this.state = isTagStartChar(c) ? 9 : 27; + this.sectionStart = this.index; + } + } + stateInClosingTagName(c) { + if (c === 62 || isWhitespace(c)) { + this.cbs.onclosetag(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 10; + this.stateAfterClosingTagName(c); + } + } + stateAfterClosingTagName(c) { + if (c === 62) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeAttrName(c) { + if (c === 62) { + this.cbs.onopentagend(this.index); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else if (c === 47) { + this.state = 7; + if (this.peek() !== 62) { + this.cbs.onerr(22, this.index); + } + } else if (c === 60 && this.peek() === 47) { + this.cbs.onopentagend(this.index); + this.state = 5; + this.sectionStart = this.index; + } else if (!isWhitespace(c)) { + if (c === 61) { + this.cbs.onerr( + 19, + this.index + ); + } + this.handleAttrStart(c); + } + } + handleAttrStart(c) { + if (c === 118 && this.peek() === 45) { + this.state = 13; + this.sectionStart = this.index; + } else if (c === 46 || c === 58 || c === 64 || c === 35) { + this.cbs.ondirname(this.index, this.index + 1); + this.state = 14; + this.sectionStart = this.index + 1; + } else { + this.state = 12; + this.sectionStart = this.index; + } + } + stateInSelfClosingTag(c) { + if (c === 62) { + this.cbs.onselfclosingtag(this.index); + this.state = 1; + this.sectionStart = this.index + 1; + this.inRCDATA = false; + } else if (!isWhitespace(c)) { + this.state = 11; + this.stateBeforeAttrName(c); + } + } + stateInAttrName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.onattribname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 34 || c === 39 || c === 60) { + this.cbs.onerr( + 17, + this.index + ); + } + } + stateInDirName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 58) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 14; + this.sectionStart = this.index + 1; + } else if (c === 46) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDirArg(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 91) { + this.state = 15; + } else if (c === 46) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDynamicDirArg(c) { + if (c === 93) { + this.state = 14; + } else if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index + 1); + this.handleAttrNameEnd(c); + { + this.cbs.onerr( + 27, + this.index + ); + } + } + } + stateInDirModifier(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 46) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.sectionStart = this.index + 1; + } + } + handleAttrNameEnd(c) { + this.sectionStart = this.index; + this.state = 17; + this.cbs.onattribnameend(this.index); + this.stateAfterAttrName(c); + } + stateAfterAttrName(c) { + if (c === 61) { + this.state = 18; + } else if (c === 47 || c === 62) { + this.cbs.onattribend(0, this.sectionStart); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } else if (!isWhitespace(c)) { + this.cbs.onattribend(0, this.sectionStart); + this.handleAttrStart(c); + } + } + stateBeforeAttrValue(c) { + if (c === 34) { + this.state = 19; + this.sectionStart = this.index + 1; + } else if (c === 39) { + this.state = 20; + this.sectionStart = this.index + 1; + } else if (!isWhitespace(c)) { + this.sectionStart = this.index; + this.state = 21; + this.stateInAttrValueNoQuotes(c); + } + } + handleInAttrValue(c, quote) { + if (c === quote || false) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend( + quote === 34 ? 3 : 2, + this.index + 1 + ); + this.state = 11; + } else if (c === 38) { + this.startEntity(); + } + } + stateInAttrValueDoubleQuotes(c) { + this.handleInAttrValue(c, 34); + } + stateInAttrValueSingleQuotes(c) { + this.handleInAttrValue(c, 39); + } + stateInAttrValueNoQuotes(c) { + if (isWhitespace(c) || c === 62) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend(1, this.index); + this.state = 11; + this.stateBeforeAttrName(c); + } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { + this.cbs.onerr( + 18, + this.index + ); + } else if (c === 38) { + this.startEntity(); + } + } + stateBeforeDeclaration(c) { + if (c === 91) { + this.state = 26; + this.sequenceIndex = 0; + } else { + this.state = c === 45 ? 25 : 23; + } + } + stateInDeclaration(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateInProcessingInstruction(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.onprocessinginstruction(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeComment(c) { + if (c === 45) { + this.state = 28; + this.currentSequence = Sequences.CommentEnd; + this.sequenceIndex = 2; + this.sectionStart = this.index + 1; + } else { + this.state = 23; + } + } + stateInSpecialComment(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.oncomment(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeSpecialS(c) { + if (c === Sequences.ScriptEnd[3]) { + this.startSpecial(Sequences.ScriptEnd, 4); + } else if (c === Sequences.StyleEnd[3]) { + this.startSpecial(Sequences.StyleEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + stateBeforeSpecialT(c) { + if (c === Sequences.TitleEnd[3]) { + this.startSpecial(Sequences.TitleEnd, 4); + } else if (c === Sequences.TextareaEnd[3]) { + this.startSpecial(Sequences.TextareaEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + startEntity() { + { + this.baseState = this.state; + this.state = 33; + this.entityStart = this.index; + this.entityDecoder.startEntity( + this.baseState === 1 || this.baseState === 32 ? decode_js.DecodingMode.Legacy : decode_js.DecodingMode.Attribute + ); + } + } + stateInEntity() { + { + const length = this.entityDecoder.write(this.buffer, this.index); + if (length >= 0) { + this.state = this.baseState; + if (length === 0) { + this.index = this.entityStart; + } + } else { + this.index = this.buffer.length - 1; + } + } + } + /** + * Iterates through the buffer, calling the function corresponding to the current state. + * + * States that are more likely to be hit are higher up, as a performance improvement. + */ + parse(input) { + this.buffer = input; + while (this.index < this.buffer.length) { + const c = this.buffer.charCodeAt(this.index); + if (c === 10) { + this.newlines.push(this.index); + } + switch (this.state) { + case 1: { + this.stateText(c); + break; + } + case 2: { + this.stateInterpolationOpen(c); + break; + } + case 3: { + this.stateInterpolation(c); + break; + } + case 4: { + this.stateInterpolationClose(c); + break; + } + case 31: { + this.stateSpecialStartSequence(c); + break; + } + case 32: { + this.stateInRCDATA(c); + break; + } + case 26: { + this.stateCDATASequence(c); + break; + } + case 19: { + this.stateInAttrValueDoubleQuotes(c); + break; + } + case 12: { + this.stateInAttrName(c); + break; + } + case 13: { + this.stateInDirName(c); + break; + } + case 14: { + this.stateInDirArg(c); + break; + } + case 15: { + this.stateInDynamicDirArg(c); + break; + } + case 16: { + this.stateInDirModifier(c); + break; + } + case 28: { + this.stateInCommentLike(c); + break; + } + case 27: { + this.stateInSpecialComment(c); + break; + } + case 11: { + this.stateBeforeAttrName(c); + break; + } + case 6: { + this.stateInTagName(c); + break; + } + case 34: { + this.stateInSFCRootTagName(c); + break; + } + case 9: { + this.stateInClosingTagName(c); + break; + } + case 5: { + this.stateBeforeTagName(c); + break; + } + case 17: { + this.stateAfterAttrName(c); + break; + } + case 20: { + this.stateInAttrValueSingleQuotes(c); + break; + } + case 18: { + this.stateBeforeAttrValue(c); + break; + } + case 8: { + this.stateBeforeClosingTagName(c); + break; + } + case 10: { + this.stateAfterClosingTagName(c); + break; + } + case 29: { + this.stateBeforeSpecialS(c); + break; + } + case 30: { + this.stateBeforeSpecialT(c); + break; + } + case 21: { + this.stateInAttrValueNoQuotes(c); + break; + } + case 7: { + this.stateInSelfClosingTag(c); + break; + } + case 23: { + this.stateInDeclaration(c); + break; + } + case 22: { + this.stateBeforeDeclaration(c); + break; + } + case 25: { + this.stateBeforeComment(c); + break; + } + case 24: { + this.stateInProcessingInstruction(c); + break; + } + case 33: { + this.stateInEntity(); + break; + } + } + this.index++; + } + this.cleanup(); + this.finish(); + } + /** + * Remove data that has already been consumed from the buffer. + */ + cleanup() { + if (this.sectionStart !== this.index) { + if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { + this.cbs.ontext(this.sectionStart, this.index); + this.sectionStart = this.index; + } else if (this.state === 19 || this.state === 20 || this.state === 21) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = this.index; + } + } + } + finish() { + if (this.state === 33) { + this.entityDecoder.end(); + this.state = this.baseState; + } + this.handleTrailingData(); + this.cbs.onend(); + } + /** Handle any trailing data. */ + handleTrailingData() { + const endIndex = this.buffer.length; + if (this.sectionStart >= endIndex) { + return; + } + if (this.state === 28) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, endIndex); + } else { + this.cbs.oncomment(this.sectionStart, endIndex); + } + } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { + this.cbs.ontext(this.sectionStart, endIndex); + } + } + emitCodePoint(cp, consumed) { + { + if (this.baseState !== 1 && this.baseState !== 32) { + if (this.sectionStart < this.entityStart) { + this.cbs.onattribdata(this.sectionStart, this.entityStart); + } + this.sectionStart = this.entityStart + consumed; + this.index = this.sectionStart - 1; + this.cbs.onattribentity( + decode_js.fromCodePoint(cp), + this.entityStart, + this.sectionStart + ); + } else { + if (this.sectionStart < this.entityStart) { + this.cbs.ontext(this.sectionStart, this.entityStart); + } + this.sectionStart = this.entityStart + consumed; + this.index = this.sectionStart - 1; + this.cbs.ontextentity( + decode_js.fromCodePoint(cp), + this.entityStart, + this.sectionStart + ); + } + } + } +} + +const CompilerDeprecationTypes = { + "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT", + "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC", + "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER", + "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE", + "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE", + "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE", + "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE", + "COMPILER_FILTERS": "COMPILER_FILTERS" +}; +const deprecationData = { + ["COMPILER_IS_ON_ELEMENT"]: { + message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`, + link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` + }, + ["COMPILER_V_BIND_SYNC"]: { + message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` + }, + ["COMPILER_V_BIND_OBJECT_ORDER"]: { + message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` + }, + ["COMPILER_V_ON_NATIVE"]: { + message: `.native modifier for v-on has been removed as is no longer necessary.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` + }, + ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: { + message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` + }, + ["COMPILER_NATIVE_TEMPLATE"]: { + message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.` + }, + ["COMPILER_INLINE_TEMPLATE"]: { + message: `"inline-template" has been removed in Vue 3.`, + link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` + }, + ["COMPILER_FILTERS"]: { + message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`, + link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` + } +}; +function getCompatValue(key, { compatConfig }) { + const value = compatConfig && compatConfig[key]; + if (key === "MODE") { + return value || 3; + } else { + return value; + } +} +function isCompatEnabled(key, context) { + const mode = getCompatValue("MODE", context); + const value = getCompatValue(key, context); + return mode === 3 ? value === true : value !== false; +} +function checkCompatEnabled(key, context, loc, ...args) { + const enabled = isCompatEnabled(key, context); + return enabled; +} +function warnDeprecation(key, context, loc, ...args) { + const val = getCompatValue(key, context); + if (val === "suppress-warning") { + return; + } + const { message, link } = deprecationData[key]; + const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? ` + Details: ${link}` : ``}`; + const err = new SyntaxError(msg); + err.code = key; + if (loc) err.loc = loc; + context.onWarn(err); +} + +function defaultOnError(error) { + throw error; +} +function defaultOnWarn(msg) { +} +function createCompilerError(code, loc, messages, additionalMessage) { + const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ; + const error = new SyntaxError(String(msg)); + error.code = code; + error.loc = loc; + return error; +} +const ErrorCodes = { + "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0, + "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT", + "CDATA_IN_HTML_CONTENT": 1, + "1": "CDATA_IN_HTML_CONTENT", + "DUPLICATE_ATTRIBUTE": 2, + "2": "DUPLICATE_ATTRIBUTE", + "END_TAG_WITH_ATTRIBUTES": 3, + "3": "END_TAG_WITH_ATTRIBUTES", + "END_TAG_WITH_TRAILING_SOLIDUS": 4, + "4": "END_TAG_WITH_TRAILING_SOLIDUS", + "EOF_BEFORE_TAG_NAME": 5, + "5": "EOF_BEFORE_TAG_NAME", + "EOF_IN_CDATA": 6, + "6": "EOF_IN_CDATA", + "EOF_IN_COMMENT": 7, + "7": "EOF_IN_COMMENT", + "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8, + "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT", + "EOF_IN_TAG": 9, + "9": "EOF_IN_TAG", + "INCORRECTLY_CLOSED_COMMENT": 10, + "10": "INCORRECTLY_CLOSED_COMMENT", + "INCORRECTLY_OPENED_COMMENT": 11, + "11": "INCORRECTLY_OPENED_COMMENT", + "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12, + "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME", + "MISSING_ATTRIBUTE_VALUE": 13, + "13": "MISSING_ATTRIBUTE_VALUE", + "MISSING_END_TAG_NAME": 14, + "14": "MISSING_END_TAG_NAME", + "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15, + "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES", + "NESTED_COMMENT": 16, + "16": "NESTED_COMMENT", + "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17, + "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME", + "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18, + "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE", + "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19, + "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME", + "UNEXPECTED_NULL_CHARACTER": 20, + "20": "UNEXPECTED_NULL_CHARACTER", + "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21, + "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME", + "UNEXPECTED_SOLIDUS_IN_TAG": 22, + "22": "UNEXPECTED_SOLIDUS_IN_TAG", + "X_INVALID_END_TAG": 23, + "23": "X_INVALID_END_TAG", + "X_MISSING_END_TAG": 24, + "24": "X_MISSING_END_TAG", + "X_MISSING_INTERPOLATION_END": 25, + "25": "X_MISSING_INTERPOLATION_END", + "X_MISSING_DIRECTIVE_NAME": 26, + "26": "X_MISSING_DIRECTIVE_NAME", + "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27, + "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END", + "X_V_IF_NO_EXPRESSION": 28, + "28": "X_V_IF_NO_EXPRESSION", + "X_V_IF_SAME_KEY": 29, + "29": "X_V_IF_SAME_KEY", + "X_V_ELSE_NO_ADJACENT_IF": 30, + "30": "X_V_ELSE_NO_ADJACENT_IF", + "X_V_FOR_NO_EXPRESSION": 31, + "31": "X_V_FOR_NO_EXPRESSION", + "X_V_FOR_MALFORMED_EXPRESSION": 32, + "32": "X_V_FOR_MALFORMED_EXPRESSION", + "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33, + "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT", + "X_V_BIND_NO_EXPRESSION": 34, + "34": "X_V_BIND_NO_EXPRESSION", + "X_V_ON_NO_EXPRESSION": 35, + "35": "X_V_ON_NO_EXPRESSION", + "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36, + "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET", + "X_V_SLOT_MIXED_SLOT_USAGE": 37, + "37": "X_V_SLOT_MIXED_SLOT_USAGE", + "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38, + "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES", + "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39, + "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN", + "X_V_SLOT_MISPLACED": 40, + "40": "X_V_SLOT_MISPLACED", + "X_V_MODEL_NO_EXPRESSION": 41, + "41": "X_V_MODEL_NO_EXPRESSION", + "X_V_MODEL_MALFORMED_EXPRESSION": 42, + "42": "X_V_MODEL_MALFORMED_EXPRESSION", + "X_V_MODEL_ON_SCOPE_VARIABLE": 43, + "43": "X_V_MODEL_ON_SCOPE_VARIABLE", + "X_V_MODEL_ON_PROPS": 44, + "44": "X_V_MODEL_ON_PROPS", + "X_INVALID_EXPRESSION": 45, + "45": "X_INVALID_EXPRESSION", + "X_KEEP_ALIVE_INVALID_CHILDREN": 46, + "46": "X_KEEP_ALIVE_INVALID_CHILDREN", + "X_PREFIX_ID_NOT_SUPPORTED": 47, + "47": "X_PREFIX_ID_NOT_SUPPORTED", + "X_MODULE_MODE_NOT_SUPPORTED": 48, + "48": "X_MODULE_MODE_NOT_SUPPORTED", + "X_CACHE_HANDLER_NOT_SUPPORTED": 49, + "49": "X_CACHE_HANDLER_NOT_SUPPORTED", + "X_SCOPE_ID_NOT_SUPPORTED": 50, + "50": "X_SCOPE_ID_NOT_SUPPORTED", + "X_VNODE_HOOKS": 51, + "51": "X_VNODE_HOOKS", + "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52, + "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT", + "__EXTEND_POINT__": 53, + "53": "__EXTEND_POINT__" +}; +const errorMessages = { + // parse errors + [0]: "Illegal comment.", + [1]: "CDATA section is allowed only in XML context.", + [2]: "Duplicate attribute.", + [3]: "End tag cannot have attributes.", + [4]: "Illegal '/' in tags.", + [5]: "Unexpected EOF in tag.", + [6]: "Unexpected EOF in CDATA section.", + [7]: "Unexpected EOF in comment.", + [8]: "Unexpected EOF in script.", + [9]: "Unexpected EOF in tag.", + [10]: "Incorrectly closed comment.", + [11]: "Incorrectly opened comment.", + [12]: "Illegal tag name. Use '<' to print '<'.", + [13]: "Attribute value was expected.", + [14]: "End tag name was expected.", + [15]: "Whitespace was expected.", + [16]: "Unexpected '<!--' in comment.", + [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, + [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", + [19]: "Attribute name cannot start with '='.", + [21]: "'<?' is allowed only in XML context.", + [20]: `Unexpected null character.`, + [22]: "Illegal '/' in tags.", + // Vue-specific parse errors + [23]: "Invalid end tag.", + [24]: "Element is missing end tag.", + [25]: "Interpolation end sign was not found.", + [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", + [26]: "Legal directive name was expected.", + // transform errors + [28]: `v-if/v-else-if is missing expression.`, + [29]: `v-if/else branches must use unique keys.`, + [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, + [31]: `v-for is missing expression.`, + [32]: `v-for has invalid expression.`, + [33]: `<template v-for> key should be placed on the <template> tag.`, + [34]: `v-bind is missing expression.`, + [52]: `v-bind with same-name shorthand only allows static argument.`, + [35]: `v-on is missing expression.`, + [36]: `Unexpected custom directive on <slot> outlet.`, + [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, + [38]: `Duplicate slot names found. `, + [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, + [40]: `v-slot can only be used on components or <template> tags.`, + [41]: `v-model is missing expression.`, + [42]: `v-model value must be a valid JavaScript member expression.`, + [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, + [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. +Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, + [45]: `Error parsing JavaScript expression: `, + [46]: `<KeepAlive> expects exactly one child component.`, + [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, + // generic errors + [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, + [48]: `ES module mode is not supported in this build of compiler.`, + [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, + [50]: `"scopeId" option is only supported in module mode.`, + // just to fulfill types + [53]: `` +}; + +function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { + const rootExp = root.type === "Program" ? root.body[0].type === "ExpressionStatement" && root.body[0].expression : root; + estreeWalker.walk(root, { + enter(node, parent) { + parent && parentStack.push(parent); + if (parent && parent.type.startsWith("TS") && !TS_NODE_TYPES.includes(parent.type)) { + return this.skip(); + } + if (node.type === "Identifier") { + const isLocal = !!knownIds[node.name]; + const isRefed = isReferencedIdentifier(node, parent, parentStack); + if (includeAll || isRefed && !isLocal) { + onIdentifier(node, parent, parentStack, isRefed, isLocal); + } + } else if (node.type === "ObjectProperty" && // eslint-disable-next-line no-restricted-syntax + (parent == null ? void 0 : parent.type) === "ObjectPattern") { + node.inPattern = true; + } else if (isFunctionType(node)) { + if (node.scopeIds) { + node.scopeIds.forEach((id) => markKnownIds(id, knownIds)); + } else { + walkFunctionParams( + node, + (id) => markScopeIdentifier(node, id, knownIds) + ); + } + } else if (node.type === "BlockStatement") { + if (node.scopeIds) { + node.scopeIds.forEach((id) => markKnownIds(id, knownIds)); + } else { + walkBlockDeclarations( + node, + (id) => markScopeIdentifier(node, id, knownIds) + ); + } + } else if (node.type === "CatchClause" && node.param) { + for (const id of extractIdentifiers(node.param)) { + markScopeIdentifier(node, id, knownIds); + } + } else if (isForStatement(node)) { + walkForStatement( + node, + false, + (id) => markScopeIdentifier(node, id, knownIds) + ); + } + }, + leave(node, parent) { + parent && parentStack.pop(); + if (node !== rootExp && node.scopeIds) { + for (const id of node.scopeIds) { + knownIds[id]--; + if (knownIds[id] === 0) { + delete knownIds[id]; + } + } + } + } + }); +} +function isReferencedIdentifier(id, parent, parentStack) { + if (!parent) { + return true; + } + if (id.name === "arguments") { + return false; + } + if (isReferenced(id, parent)) { + return true; + } + switch (parent.type) { + case "AssignmentExpression": + case "AssignmentPattern": + return true; + case "ObjectPattern": + case "ArrayPattern": + return isInDestructureAssignment(parent, parentStack); + } + return false; +} +function isInDestructureAssignment(parent, parentStack) { + if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "AssignmentExpression") { + return true; + } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) { + break; + } + } + } + return false; +} +function isInNewExpression(parentStack) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "NewExpression") { + return true; + } else if (p.type !== "MemberExpression") { + break; + } + } + return false; +} +function walkFunctionParams(node, onIdent) { + for (const p of node.params) { + for (const id of extractIdentifiers(p)) { + onIdent(id); + } + } +} +function walkBlockDeclarations(block, onIdent) { + for (const stmt of block.body) { + if (stmt.type === "VariableDeclaration") { + if (stmt.declare) continue; + for (const decl of stmt.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { + if (stmt.declare || !stmt.id) continue; + onIdent(stmt.id); + } else if (isForStatement(stmt)) { + walkForStatement(stmt, true, onIdent); + } + } +} +function isForStatement(stmt) { + return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement"; +} +function walkForStatement(stmt, isVar, onIdent) { + const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left; + if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) { + for (const decl of variable.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } +} +function extractIdentifiers(param, nodes = []) { + switch (param.type) { + case "Identifier": + nodes.push(param); + break; + case "MemberExpression": + let object = param; + while (object.type === "MemberExpression") { + object = object.object; + } + nodes.push(object); + break; + case "ObjectPattern": + for (const prop of param.properties) { + if (prop.type === "RestElement") { + extractIdentifiers(prop.argument, nodes); + } else { + extractIdentifiers(prop.value, nodes); + } + } + break; + case "ArrayPattern": + param.elements.forEach((element) => { + if (element) extractIdentifiers(element, nodes); + }); + break; + case "RestElement": + extractIdentifiers(param.argument, nodes); + break; + case "AssignmentPattern": + extractIdentifiers(param.left, nodes); + break; + } + return nodes; +} +function markKnownIds(name, knownIds) { + if (name in knownIds) { + knownIds[name]++; + } else { + knownIds[name] = 1; + } +} +function markScopeIdentifier(node, child, knownIds) { + const { name } = child; + if (node.scopeIds && node.scopeIds.has(name)) { + return; + } + markKnownIds(name, knownIds); + (node.scopeIds || (node.scopeIds = /* @__PURE__ */ new Set())).add(name); +} +const isFunctionType = (node) => { + return /Function(?:Expression|Declaration)$|Method$/.test(node.type); +}; +const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed; +const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; +function isReferenced(node, parent, grandparent) { + switch (parent.type) { + // yes: PARENT[NODE] + // yes: NODE.child + // no: parent.NODE + case "MemberExpression": + case "OptionalMemberExpression": + if (parent.property === node) { + return !!parent.computed; + } + return parent.object === node; + case "JSXMemberExpression": + return parent.object === node; + // no: let NODE = init; + // yes: let id = NODE; + case "VariableDeclarator": + return parent.init === node; + // yes: () => NODE + // no: (NODE) => {} + case "ArrowFunctionExpression": + return parent.body === node; + // no: class { #NODE; } + // no: class { get #NODE() {} } + // no: class { #NODE() {} } + // no: class { fn() { return this.#NODE; } } + case "PrivateName": + return false; + // no: class { NODE() {} } + // yes: class { [NODE]() {} } + // no: class { foo(NODE) {} } + case "ClassMethod": + case "ClassPrivateMethod": + case "ObjectMethod": + if (parent.key === node) { + return !!parent.computed; + } + return false; + // yes: { [NODE]: "" } + // no: { NODE: "" } + // depends: { NODE } + // depends: { key: NODE } + case "ObjectProperty": + if (parent.key === node) { + return !!parent.computed; + } + return !grandparent; + // no: class { NODE = value; } + // yes: class { [NODE] = value; } + // yes: class { key = NODE; } + case "ClassProperty": + if (parent.key === node) { + return !!parent.computed; + } + return true; + case "ClassPrivateProperty": + return parent.key !== node; + // no: class NODE {} + // yes: class Foo extends NODE {} + case "ClassDeclaration": + case "ClassExpression": + return parent.superClass === node; + // yes: left = NODE; + // no: NODE = right; + case "AssignmentExpression": + return parent.right === node; + // no: [NODE = foo] = []; + // yes: [foo = NODE] = []; + case "AssignmentPattern": + return parent.right === node; + // no: NODE: for (;;) {} + case "LabeledStatement": + return false; + // no: try {} catch (NODE) {} + case "CatchClause": + return false; + // no: function foo(...NODE) {} + case "RestElement": + return false; + case "BreakStatement": + case "ContinueStatement": + return false; + // no: function NODE() {} + // no: function foo(NODE) {} + case "FunctionDeclaration": + case "FunctionExpression": + return false; + // no: export NODE from "foo"; + // no: export * as NODE from "foo"; + case "ExportNamespaceSpecifier": + case "ExportDefaultSpecifier": + return false; + // no: export { foo as NODE }; + // yes: export { NODE as foo }; + // no: export { NODE as foo } from "foo"; + case "ExportSpecifier": + return parent.local === node; + // no: import NODE from "foo"; + // no: import * as NODE from "foo"; + // no: import { NODE as foo } from "foo"; + // no: import { foo as NODE } from "foo"; + // no: import NODE from "bar"; + case "ImportDefaultSpecifier": + case "ImportNamespaceSpecifier": + case "ImportSpecifier": + return false; + // no: import "foo" assert { NODE: "json" } + case "ImportAttribute": + return false; + // no: <div NODE="foo" /> + case "JSXAttribute": + return false; + // no: [NODE] = []; + // no: ({ NODE }) = []; + case "ObjectPattern": + case "ArrayPattern": + return false; + // no: new.NODE + // no: NODE.target + case "MetaProperty": + return false; + // yes: type X = { someProperty: NODE } + // no: type X = { NODE: OtherType } + case "ObjectTypeProperty": + return parent.key !== node; + // yes: enum X { Foo = NODE } + // no: enum X { NODE } + case "TSEnumMember": + return parent.id !== node; + // yes: { [NODE]: value } + // no: { NODE: value } + case "TSPropertySignature": + if (parent.key === node) { + return !!parent.computed; + } + return true; + } + return true; +} +const TS_NODE_TYPES = [ + "TSAsExpression", + // foo as number + "TSTypeAssertion", + // (<number>foo) + "TSNonNullExpression", + // foo! + "TSInstantiationExpression", + // foo<string> + "TSSatisfiesExpression" + // foo satisfies T +]; +function unwrapTSNode(node) { + if (TS_NODE_TYPES.includes(node.type)) { + return unwrapTSNode(node.expression); + } else { + return node; + } +} + +const isStaticExp = (p) => p.type === 4 && p.isStatic; +function isCoreComponent(tag) { + switch (tag) { + case "Teleport": + case "teleport": + return TELEPORT; + case "Suspense": + case "suspense": + return SUSPENSE; + case "KeepAlive": + case "keep-alive": + return KEEP_ALIVE; + case "BaseTransition": + case "base-transition": + return BASE_TRANSITION; + } +} +const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/; +const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); +const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; +const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; +const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; +const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source; +const isMemberExpressionBrowser = (exp) => { + const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim()); + let state = 0 /* inMemberExp */; + let stateStack = []; + let currentOpenBracketCount = 0; + let currentOpenParensCount = 0; + let currentStringType = null; + for (let i = 0; i < path.length; i++) { + const char = path.charAt(i); + switch (state) { + case 0 /* inMemberExp */: + if (char === "[") { + stateStack.push(state); + state = 1 /* inBrackets */; + currentOpenBracketCount++; + } else if (char === "(") { + stateStack.push(state); + state = 2 /* inParens */; + currentOpenParensCount++; + } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { + return false; + } + break; + case 1 /* inBrackets */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `[`) { + currentOpenBracketCount++; + } else if (char === `]`) { + if (!--currentOpenBracketCount) { + state = stateStack.pop(); + } + } + break; + case 2 /* inParens */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `(`) { + currentOpenParensCount++; + } else if (char === `)`) { + if (i === path.length - 1) { + return false; + } + if (!--currentOpenParensCount) { + state = stateStack.pop(); + } + } + break; + case 3 /* inString */: + if (char === currentStringType) { + state = stateStack.pop(); + currentStringType = null; + } + break; + } + } + return !currentOpenBracketCount && !currentOpenParensCount; +}; +const isMemberExpressionNode = (exp, context) => { + try { + let ret = exp.ast || parser.parseExpression(getExpSource(exp), { + plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"] + }); + ret = unwrapTSNode(ret); + return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier" && ret.name !== "undefined"; + } catch (e) { + return false; + } +}; +const isMemberExpression = isMemberExpressionNode; +const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; +const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp)); +const isFnExpressionNode = (exp, context) => { + try { + let ret = exp.ast || parser.parseExpression(getExpSource(exp), { + plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"] + }); + if (ret.type === "Program") { + ret = ret.body[0]; + if (ret.type === "ExpressionStatement") { + ret = ret.expression; + } + } + ret = unwrapTSNode(ret); + return ret.type === "FunctionExpression" || ret.type === "ArrowFunctionExpression"; + } catch (e) { + return false; + } +}; +const isFnExpression = isFnExpressionNode; +function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { + return advancePositionWithMutation( + { + offset: pos.offset, + line: pos.line, + column: pos.column + }, + source, + numberOfCharacters + ); +} +function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { + let linesCount = 0; + let lastNewLinePos = -1; + for (let i = 0; i < numberOfCharacters; i++) { + if (source.charCodeAt(i) === 10) { + linesCount++; + lastNewLinePos = i; + } + } + pos.offset += numberOfCharacters; + pos.line += linesCount; + pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos; + return pos; +} +function assert(condition, msg) { + if (!condition) { + throw new Error(msg || `unexpected compiler condition`); + } +} +function findDir(node, name, allowEmpty = false) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (allowEmpty || p.exp) && (shared.isString(name) ? p.name === name : name.test(p.name))) { + return p; + } + } +} +function findProp(node, name, dynamicOnly = false, allowEmpty = false) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (dynamicOnly) continue; + if (p.name === name && (p.value || allowEmpty)) { + return p; + } + } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { + return p; + } + } +} +function isStaticArgOf(arg, name) { + return !!(arg && isStaticExp(arg) && arg.content === name); +} +function hasDynamicKeyVBind(node) { + return node.props.some( + (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" + p.arg.type !== 4 || // v-bind:[_ctx.foo] + !p.arg.isStatic) + // v-bind:[foo] + ); +} +function isText$1(node) { + return node.type === 5 || node.type === 2; +} +function isVSlot(p) { + return p.type === 7 && p.name === "slot"; +} +function isTemplateNode(node) { + return node.type === 1 && node.tagType === 3; +} +function isSlotOutlet(node) { + return node.type === 1 && node.tagType === 2; +} +const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); +function getUnnormalizedProps(props, callPath = []) { + if (props && !shared.isString(props) && props.type === 14) { + const callee = props.callee; + if (!shared.isString(callee) && propsHelperSet.has(callee)) { + return getUnnormalizedProps( + props.arguments[0], + callPath.concat(props) + ); + } + } + return [props, callPath]; +} +function injectProp(node, prop, context) { + let propsWithInjection; + let props = node.type === 13 ? node.props : node.arguments[2]; + let callPath = []; + let parentCall; + if (props && !shared.isString(props) && props.type === 14) { + const ret = getUnnormalizedProps(props); + props = ret[0]; + callPath = ret[1]; + parentCall = callPath[callPath.length - 1]; + } + if (props == null || shared.isString(props)) { + propsWithInjection = createObjectExpression([prop]); + } else if (props.type === 14) { + const first = props.arguments[0]; + if (!shared.isString(first) && first.type === 15) { + if (!hasProp(prop, first)) { + first.properties.unshift(prop); + } + } else { + if (props.callee === TO_HANDLERS) { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + } else { + props.arguments.unshift(createObjectExpression([prop])); + } + } + !propsWithInjection && (propsWithInjection = props); + } else if (props.type === 15) { + if (!hasProp(prop, props)) { + props.properties.unshift(prop); + } + propsWithInjection = props; + } else { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { + parentCall = callPath[callPath.length - 2]; + } + } + if (node.type === 13) { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.props = propsWithInjection; + } + } else { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.arguments[2] = propsWithInjection; + } + } +} +function hasProp(prop, props) { + let result = false; + if (prop.key.type === 4) { + const propKeyName = prop.key.content; + result = props.properties.some( + (p) => p.key.type === 4 && p.key.content === propKeyName + ); + } + return result; +} +function toValidAssetId(name, type) { + return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { + return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); + })}`; +} +function hasScopeRef(node, ids) { + if (!node || Object.keys(ids).length === 0) { + return false; + } + switch (node.type) { + case 1: + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { + return true; + } + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 11: + if (hasScopeRef(node.source, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 9: + return node.branches.some((b) => hasScopeRef(b, ids)); + case 10: + if (hasScopeRef(node.condition, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 4: + return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content]; + case 8: + return node.children.some((c) => shared.isObject(c) && hasScopeRef(c, ids)); + case 5: + case 12: + return hasScopeRef(node.content, ids); + case 2: + case 3: + case 20: + return false; + default: + return false; + } +} +function getMemoedVNodeCall(node) { + if (node.type === 14 && node.callee === WITH_MEMO) { + return node.arguments[1].returns; + } else { + return node; + } +} +const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/; + +const defaultParserOptions = { + parseMode: "base", + ns: 0, + delimiters: [`{{`, `}}`], + getNamespace: () => 0, + isVoidTag: shared.NO, + isPreTag: shared.NO, + isIgnoreNewlineTag: shared.NO, + isCustomElement: shared.NO, + onError: defaultOnError, + onWarn: defaultOnWarn, + comments: false, + prefixIdentifiers: false +}; +let currentOptions = defaultParserOptions; +let currentRoot = null; +let currentInput = ""; +let currentOpenTag = null; +let currentProp = null; +let currentAttrValue = ""; +let currentAttrStartIndex = -1; +let currentAttrEndIndex = -1; +let inPre = 0; +let inVPre = false; +let currentVPreBoundary = null; +const stack = []; +const tokenizer = new Tokenizer(stack, { + onerr: emitError, + ontext(start, end) { + onText(getSlice(start, end), start, end); + }, + ontextentity(char, start, end) { + onText(char, start, end); + }, + oninterpolation(start, end) { + if (inVPre) { + return onText(getSlice(start, end), start, end); + } + let innerStart = start + tokenizer.delimiterOpen.length; + let innerEnd = end - tokenizer.delimiterClose.length; + while (isWhitespace(currentInput.charCodeAt(innerStart))) { + innerStart++; + } + while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { + innerEnd--; + } + let exp = getSlice(innerStart, innerEnd); + if (exp.includes("&")) { + { + exp = decode_js.decodeHTML(exp); + } + } + addNode({ + type: 5, + content: createExp(exp, false, getLoc(innerStart, innerEnd)), + loc: getLoc(start, end) + }); + }, + onopentagname(start, end) { + const name = getSlice(start, end); + currentOpenTag = { + type: 1, + tag: name, + ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), + tagType: 0, + // will be refined on tag close + props: [], + children: [], + loc: getLoc(start - 1, end), + codegenNode: void 0 + }; + }, + onopentagend(end) { + endOpenTag(end); + }, + onclosetag(start, end) { + const name = getSlice(start, end); + if (!currentOptions.isVoidTag(name)) { + let found = false; + for (let i = 0; i < stack.length; i++) { + const e = stack[i]; + if (e.tag.toLowerCase() === name.toLowerCase()) { + found = true; + if (i > 0) { + emitError(24, stack[0].loc.start.offset); + } + for (let j = 0; j <= i; j++) { + const el = stack.shift(); + onCloseTag(el, end, j < i); + } + break; + } + } + if (!found) { + emitError(23, backTrack(start, 60)); + } + } + }, + onselfclosingtag(end) { + const name = currentOpenTag.tag; + currentOpenTag.isSelfClosing = true; + endOpenTag(end); + if (stack[0] && stack[0].tag === name) { + onCloseTag(stack.shift(), end); + } + }, + onattribname(start, end) { + currentProp = { + type: 6, + name: getSlice(start, end), + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + }, + ondirname(start, end) { + const raw = getSlice(start, end); + const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); + if (!inVPre && name === "") { + emitError(26, start); + } + if (inVPre || name === "") { + currentProp = { + type: 6, + name: raw, + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + } else { + currentProp = { + type: 7, + name, + rawName: raw, + exp: void 0, + arg: void 0, + modifiers: raw === "." ? [createSimpleExpression("prop")] : [], + loc: getLoc(start) + }; + if (name === "pre") { + inVPre = tokenizer.inVPre = true; + currentVPreBoundary = currentOpenTag; + const props = currentOpenTag.props; + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7) { + props[i] = dirToAttr(props[i]); + } + } + } + } + }, + ondirarg(start, end) { + if (start === end) return; + const arg = getSlice(start, end); + if (inVPre) { + currentProp.name += arg; + setLocEnd(currentProp.nameLoc, end); + } else { + const isStatic = arg[0] !== `[`; + currentProp.arg = createExp( + isStatic ? arg : arg.slice(1, -1), + isStatic, + getLoc(start, end), + isStatic ? 3 : 0 + ); + } + }, + ondirmodifier(start, end) { + const mod = getSlice(start, end); + if (inVPre) { + currentProp.name += "." + mod; + setLocEnd(currentProp.nameLoc, end); + } else if (currentProp.name === "slot") { + const arg = currentProp.arg; + if (arg) { + arg.content += "." + mod; + setLocEnd(arg.loc, end); + } + } else { + const exp = createSimpleExpression(mod, true, getLoc(start, end)); + currentProp.modifiers.push(exp); + } + }, + onattribdata(start, end) { + currentAttrValue += getSlice(start, end); + if (currentAttrStartIndex < 0) currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribentity(char, start, end) { + currentAttrValue += char; + if (currentAttrStartIndex < 0) currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribnameend(end) { + const start = currentProp.loc.start.offset; + const name = getSlice(start, end); + if (currentProp.type === 7) { + currentProp.rawName = name; + } + if (currentOpenTag.props.some( + (p) => (p.type === 7 ? p.rawName : p.name) === name + )) { + emitError(2, start); + } + }, + onattribend(quote, end) { + if (currentOpenTag && currentProp) { + setLocEnd(currentProp.loc, end); + if (quote !== 0) { + if (currentProp.type === 6) { + if (currentProp.name === "class") { + currentAttrValue = condense(currentAttrValue).trim(); + } + if (quote === 1 && !currentAttrValue) { + emitError(13, end); + } + currentProp.value = { + type: 2, + content: currentAttrValue, + loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) + }; + if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { + tokenizer.enterRCDATA(toCharCodes(`</template`), 0); + } + } else { + let expParseMode = 0 /* Normal */; + { + if (currentProp.name === "for") { + expParseMode = 3 /* Skip */; + } else if (currentProp.name === "slot") { + expParseMode = 1 /* Params */; + } else if (currentProp.name === "on" && currentAttrValue.includes(";")) { + expParseMode = 2 /* Statements */; + } + } + currentProp.exp = createExp( + currentAttrValue, + false, + getLoc(currentAttrStartIndex, currentAttrEndIndex), + 0, + expParseMode + ); + if (currentProp.name === "for") { + currentProp.forParseResult = parseForExpression(currentProp.exp); + } + let syncIndex = -1; + if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.findIndex( + (mod) => mod.content === "sync" + )) > -1 && checkCompatEnabled( + "COMPILER_V_BIND_SYNC", + currentOptions, + currentProp.loc, + currentProp.rawName + )) { + currentProp.name = "model"; + currentProp.modifiers.splice(syncIndex, 1); + } + } + } + if (currentProp.type !== 7 || currentProp.name !== "pre") { + currentOpenTag.props.push(currentProp); + } + } + currentAttrValue = ""; + currentAttrStartIndex = currentAttrEndIndex = -1; + }, + oncomment(start, end) { + if (currentOptions.comments) { + addNode({ + type: 3, + content: getSlice(start, end), + loc: getLoc(start - 4, end + 3) + }); + } + }, + onend() { + const end = currentInput.length; + if (tokenizer.state !== 1) { + switch (tokenizer.state) { + case 5: + case 8: + emitError(5, end); + break; + case 3: + case 4: + emitError( + 25, + tokenizer.sectionStart + ); + break; + case 28: + if (tokenizer.currentSequence === Sequences.CdataEnd) { + emitError(6, end); + } else { + emitError(7, end); + } + break; + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + // " + case 20: + // ' + case 21: + emitError(9, end); + break; + } + } + for (let index = 0; index < stack.length; index++) { + onCloseTag(stack[index], end - 1); + emitError(24, stack[index].loc.start.offset); + } + }, + oncdata(start, end) { + if (stack[0].ns !== 0) { + onText(getSlice(start, end), start, end); + } else { + emitError(1, start - 9); + } + }, + onprocessinginstruction(start) { + if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + emitError( + 21, + start - 1 + ); + } + } +}); +const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; +const stripParensRE = /^\(|\)$/g; +function parseForExpression(input) { + const loc = input.loc; + const exp = input.content; + const inMatch = exp.match(forAliasRE); + if (!inMatch) return; + const [, LHS, RHS] = inMatch; + const createAliasExpression = (content, offset, asParam = false) => { + const start = loc.start.offset + offset; + const end = start + content.length; + return createExp( + content, + false, + getLoc(start, end), + 0, + asParam ? 1 /* Params */ : 0 /* Normal */ + ); + }; + const result = { + source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), + value: void 0, + key: void 0, + index: void 0, + finalized: false + }; + let valueContent = LHS.trim().replace(stripParensRE, "").trim(); + const trimmedOffset = LHS.indexOf(valueContent); + const iteratorMatch = valueContent.match(forIteratorRE); + if (iteratorMatch) { + valueContent = valueContent.replace(forIteratorRE, "").trim(); + const keyContent = iteratorMatch[1].trim(); + let keyOffset; + if (keyContent) { + keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); + result.key = createAliasExpression(keyContent, keyOffset, true); + } + if (iteratorMatch[2]) { + const indexContent = iteratorMatch[2].trim(); + if (indexContent) { + result.index = createAliasExpression( + indexContent, + exp.indexOf( + indexContent, + result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length + ), + true + ); + } + } + } + if (valueContent) { + result.value = createAliasExpression(valueContent, trimmedOffset, true); + } + return result; +} +function getSlice(start, end) { + return currentInput.slice(start, end); +} +function endOpenTag(end) { + if (tokenizer.inSFCRoot) { + currentOpenTag.innerLoc = getLoc(end + 1, end + 1); + } + addNode(currentOpenTag); + const { tag, ns } = currentOpenTag; + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre++; + } + if (currentOptions.isVoidTag(tag)) { + onCloseTag(currentOpenTag, end); + } else { + stack.unshift(currentOpenTag); + if (ns === 1 || ns === 2) { + tokenizer.inXML = true; + } + } + currentOpenTag = null; +} +function onText(content, start, end) { + const parent = stack[0] || currentRoot; + const lastNode = parent.children[parent.children.length - 1]; + if (lastNode && lastNode.type === 2) { + lastNode.content += content; + setLocEnd(lastNode.loc, end); + } else { + parent.children.push({ + type: 2, + content, + loc: getLoc(start, end) + }); + } +} +function onCloseTag(el, end, isImplied = false) { + if (isImplied) { + setLocEnd(el.loc, backTrack(end, 60)); + } else { + setLocEnd(el.loc, lookAhead(end, 62) + 1); + } + if (tokenizer.inSFCRoot) { + if (el.children.length) { + el.innerLoc.end = shared.extend({}, el.children[el.children.length - 1].loc.end); + } else { + el.innerLoc.end = shared.extend({}, el.innerLoc.start); + } + el.innerLoc.source = getSlice( + el.innerLoc.start.offset, + el.innerLoc.end.offset + ); + } + const { tag, ns, children } = el; + if (!inVPre) { + if (tag === "slot") { + el.tagType = 2; + } else if (isFragmentTemplate(el)) { + el.tagType = 3; + } else if (isComponent(el)) { + el.tagType = 1; + } + } + if (!tokenizer.inRCDATA) { + el.children = condenseWhitespace(children); + } + if (ns === 0 && currentOptions.isIgnoreNewlineTag(tag)) { + const first = children[0]; + if (first && first.type === 2) { + first.content = first.content.replace(/^\r?\n/, ""); + } + } + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre--; + } + if (currentVPreBoundary === el) { + inVPre = tokenizer.inVPre = false; + currentVPreBoundary = null; + } + if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + tokenizer.inXML = false; + } + { + const props = el.props; + if (!tokenizer.inSFCRoot && isCompatEnabled( + "COMPILER_NATIVE_TEMPLATE", + currentOptions + ) && el.tag === "template" && !isFragmentTemplate(el)) { + const parent = stack[0] || currentRoot; + const index = parent.children.indexOf(el); + parent.children.splice(index, 1, ...el.children); + } + const inlineTemplateProp = props.find( + (p) => p.type === 6 && p.name === "inline-template" + ); + if (inlineTemplateProp && checkCompatEnabled( + "COMPILER_INLINE_TEMPLATE", + currentOptions, + inlineTemplateProp.loc + ) && el.children.length) { + inlineTemplateProp.value = { + type: 2, + content: getSlice( + el.children[0].loc.start.offset, + el.children[el.children.length - 1].loc.end.offset + ), + loc: inlineTemplateProp.loc + }; + } + } +} +function lookAhead(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1) i++; + return i; +} +function backTrack(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i >= 0) i--; + return i; +} +const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); +function isFragmentTemplate({ tag, props }) { + if (tag === "template") { + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { + return true; + } + } + } + return false; +} +function isComponent({ tag, props }) { + if (currentOptions.isCustomElement(tag)) { + return false; + } + if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { + return true; + } + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 6) { + if (p.name === "is" && p.value) { + if (p.value.content.startsWith("vue:")) { + return true; + } else if (checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + } else if (// :is on plain element - only treat as component in compat mode + p.name === "bind" && isStaticArgOf(p.arg, "is") && checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + return false; +} +function isUpperCase(c) { + return c > 64 && c < 91; +} +const windowsNewlineRE = /\r\n/g; +function condenseWhitespace(nodes, tag) { + const shouldCondense = currentOptions.whitespace !== "preserve"; + let removedWhitespace = false; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (node.type === 2) { + if (!inPre) { + if (isAllWhitespace(node.content)) { + const prev = nodes[i - 1] && nodes[i - 1].type; + const next = nodes[i + 1] && nodes[i + 1].type; + if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { + removedWhitespace = true; + nodes[i] = null; + } else { + node.content = " "; + } + } else if (shouldCondense) { + node.content = condense(node.content); + } + } else { + node.content = node.content.replace(windowsNewlineRE, "\n"); + } + } + } + return removedWhitespace ? nodes.filter(Boolean) : nodes; +} +function isAllWhitespace(str) { + for (let i = 0; i < str.length; i++) { + if (!isWhitespace(str.charCodeAt(i))) { + return false; + } + } + return true; +} +function hasNewlineChar(str) { + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + if (c === 10 || c === 13) { + return true; + } + } + return false; +} +function condense(str) { + let ret = ""; + let prevCharIsWhitespace = false; + for (let i = 0; i < str.length; i++) { + if (isWhitespace(str.charCodeAt(i))) { + if (!prevCharIsWhitespace) { + ret += " "; + prevCharIsWhitespace = true; + } + } else { + ret += str[i]; + prevCharIsWhitespace = false; + } + } + return ret; +} +function addNode(node) { + (stack[0] || currentRoot).children.push(node); +} +function getLoc(start, end) { + return { + start: tokenizer.getPos(start), + // @ts-expect-error allow late attachment + end: end == null ? end : tokenizer.getPos(end), + // @ts-expect-error allow late attachment + source: end == null ? end : getSlice(start, end) + }; +} +function cloneLoc(loc) { + return getLoc(loc.start.offset, loc.end.offset); +} +function setLocEnd(loc, end) { + loc.end = tokenizer.getPos(end); + loc.source = getSlice(loc.start.offset, end); +} +function dirToAttr(dir) { + const attr = { + type: 6, + name: dir.rawName, + nameLoc: getLoc( + dir.loc.start.offset, + dir.loc.start.offset + dir.rawName.length + ), + value: void 0, + loc: dir.loc + }; + if (dir.exp) { + const loc = dir.exp.loc; + if (loc.end.offset < dir.loc.end.offset) { + loc.start.offset--; + loc.start.column--; + loc.end.offset++; + loc.end.column++; + } + attr.value = { + type: 2, + content: dir.exp.content, + loc + }; + } + return attr; +} +function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { + const exp = createSimpleExpression(content, isStatic, loc, constType); + if (!isStatic && currentOptions.prefixIdentifiers && parseMode !== 3 /* Skip */ && content.trim()) { + if (isSimpleIdentifier(content)) { + exp.ast = null; + return exp; + } + try { + const plugins = currentOptions.expressionPlugins; + const options = { + plugins: plugins ? [...plugins, "typescript"] : ["typescript"] + }; + if (parseMode === 2 /* Statements */) { + exp.ast = parser.parse(` ${content} `, options).program; + } else if (parseMode === 1 /* Params */) { + exp.ast = parser.parseExpression(`(${content})=>{}`, options); + } else { + exp.ast = parser.parseExpression(`(${content})`, options); + } + } catch (e) { + exp.ast = false; + emitError(45, loc.start.offset, e.message); + } + } + return exp; +} +function emitError(code, index, message) { + currentOptions.onError( + createCompilerError(code, getLoc(index, index), void 0, message) + ); +} +function reset() { + tokenizer.reset(); + currentOpenTag = null; + currentProp = null; + currentAttrValue = ""; + currentAttrStartIndex = -1; + currentAttrEndIndex = -1; + stack.length = 0; +} +function baseParse(input, options) { + reset(); + currentInput = input; + currentOptions = shared.extend({}, defaultParserOptions); + if (options) { + let key; + for (key in options) { + if (options[key] != null) { + currentOptions[key] = options[key]; + } + } + } + tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; + tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; + const delimiters = options && options.delimiters; + if (delimiters) { + tokenizer.delimiterOpen = toCharCodes(delimiters[0]); + tokenizer.delimiterClose = toCharCodes(delimiters[1]); + } + const root = currentRoot = createRoot([], input); + tokenizer.parse(currentInput); + root.loc = getLoc(0, input.length); + root.children = condenseWhitespace(root.children); + currentRoot = null; + return root; +} + +function cacheStatic(root, context) { + walk( + root, + void 0, + context, + // Root node is unfortunately non-hoistable due to potential parent + // fallthrough attributes. + isSingleElementRoot(root, root.children[0]) + ); +} +function isSingleElementRoot(root, child) { + const { children } = root; + return children.length === 1 && child.type === 1 && !isSlotOutlet(child); +} +function walk(node, parent, context, doNotHoistNode = false, inFor = false) { + const { children } = node; + const toCache = []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.type === 1 && child.tagType === 0) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType > 0) { + if (constantType >= 2) { + child.codegenNode.patchFlag = -1; + toCache.push(child); + continue; + } + } else { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + const flag = codegenNode.patchFlag; + if ((flag === void 0 || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { + const props = getNodeProps(child); + if (props) { + codegenNode.props = context.hoist(props); + } + } + if (codegenNode.dynamicProps) { + codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); + } + } + } + } else if (child.type === 12) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType >= 2) { + toCache.push(child); + continue; + } + } + if (child.type === 1) { + const isComponent = child.tagType === 1; + if (isComponent) { + context.scopes.vSlot++; + } + walk(child, node, context, false, inFor); + if (isComponent) { + context.scopes.vSlot--; + } + } else if (child.type === 11) { + walk(child, node, context, child.children.length === 1, true); + } else if (child.type === 9) { + for (let i2 = 0; i2 < child.branches.length; i2++) { + walk( + child.branches[i2], + node, + context, + child.branches[i2].children.length === 1, + inFor + ); + } + } + } + let cachedAsArray = false; + if (toCache.length === children.length && node.type === 1) { + if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && shared.isArray(node.codegenNode.children)) { + node.codegenNode.children = getCacheExpression( + createArrayExpression(node.codegenNode.children) + ); + cachedAsArray = true; + } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !shared.isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) { + const slot = getSlotNode(node.codegenNode, "default"); + if (slot) { + slot.returns = getCacheExpression( + createArrayExpression(slot.returns) + ); + cachedAsArray = true; + } + } else if (node.tagType === 3 && parent && parent.type === 1 && parent.tagType === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !shared.isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 15) { + const slotName = findDir(node, "slot", true); + const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg); + if (slot) { + slot.returns = getCacheExpression( + createArrayExpression(slot.returns) + ); + cachedAsArray = true; + } + } + } + if (!cachedAsArray) { + for (const child of toCache) { + child.codegenNode = context.cache(child.codegenNode); + } + } + function getCacheExpression(value) { + const exp = context.cache(value); + if (inFor && context.hmr) { + exp.needArraySpread = true; + } + return exp; + } + function getSlotNode(node2, name) { + if (node2.children && !shared.isArray(node2.children) && node2.children.type === 15) { + const slot = node2.children.properties.find( + (p) => p.key === name || p.key.content === name + ); + return slot && slot.value; + } + } + if (toCache.length && context.transformHoist) { + context.transformHoist(children, context, node); + } +} +function getConstantType(node, context) { + const { constantCache } = context; + switch (node.type) { + case 1: + if (node.tagType !== 0) { + return 0; + } + const cached = constantCache.get(node); + if (cached !== void 0) { + return cached; + } + const codegenNode = node.codegenNode; + if (codegenNode.type !== 13) { + return 0; + } + if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject" && node.tag !== "math") { + return 0; + } + if (codegenNode.patchFlag === void 0) { + let returnType2 = 3; + const generatedPropsType = getGeneratedPropsConstantType(node, context); + if (generatedPropsType === 0) { + constantCache.set(node, 0); + return 0; + } + if (generatedPropsType < returnType2) { + returnType2 = generatedPropsType; + } + for (let i = 0; i < node.children.length; i++) { + const childType = getConstantType(node.children[i], context); + if (childType === 0) { + constantCache.set(node, 0); + return 0; + } + if (childType < returnType2) { + returnType2 = childType; + } + } + if (returnType2 > 1) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && p.name === "bind" && p.exp) { + const expType = getConstantType(p.exp, context); + if (expType === 0) { + constantCache.set(node, 0); + return 0; + } + if (expType < returnType2) { + returnType2 = expType; + } + } + } + } + if (codegenNode.isBlock) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7) { + constantCache.set(node, 0); + return 0; + } + } + context.removeHelper(OPEN_BLOCK); + context.removeHelper( + getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) + ); + codegenNode.isBlock = false; + context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); + } + constantCache.set(node, returnType2); + return returnType2; + } else { + constantCache.set(node, 0); + return 0; + } + case 2: + case 3: + return 3; + case 9: + case 11: + case 10: + return 0; + case 5: + case 12: + return getConstantType(node.content, context); + case 4: + return node.constType; + case 8: + let returnType = 3; + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (shared.isString(child) || shared.isSymbol(child)) { + continue; + } + const childType = getConstantType(child, context); + if (childType === 0) { + return 0; + } else if (childType < returnType) { + returnType = childType; + } + } + return returnType; + case 20: + return 2; + default: + return 0; + } +} +const allowHoistedHelperSet = /* @__PURE__ */ new Set([ + NORMALIZE_CLASS, + NORMALIZE_STYLE, + NORMALIZE_PROPS, + GUARD_REACTIVE_PROPS +]); +function getConstantTypeOfHelperCall(value, context) { + if (value.type === 14 && !shared.isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { + const arg = value.arguments[0]; + if (arg.type === 4) { + return getConstantType(arg, context); + } else if (arg.type === 14) { + return getConstantTypeOfHelperCall(arg, context); + } + } + return 0; +} +function getGeneratedPropsConstantType(node, context) { + let returnType = 3; + const props = getNodeProps(node); + if (props && props.type === 15) { + const { properties } = props; + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + const keyType = getConstantType(key, context); + if (keyType === 0) { + return keyType; + } + if (keyType < returnType) { + returnType = keyType; + } + let valueType; + if (value.type === 4) { + valueType = getConstantType(value, context); + } else if (value.type === 14) { + valueType = getConstantTypeOfHelperCall(value, context); + } else { + valueType = 0; + } + if (valueType === 0) { + return valueType; + } + if (valueType < returnType) { + returnType = valueType; + } + } + } + return returnType; +} +function getNodeProps(node) { + const codegenNode = node.codegenNode; + if (codegenNode.type === 13) { + return codegenNode.props; + } +} + +function createTransformContext(root, { + filename = "", + prefixIdentifiers = false, + hoistStatic = false, + hmr = false, + cacheHandlers = false, + nodeTransforms = [], + directiveTransforms = {}, + transformHoist = null, + isBuiltInComponent = shared.NOOP, + isCustomElement = shared.NOOP, + expressionPlugins = [], + scopeId = null, + slotted = true, + ssr = false, + inSSR = false, + ssrCssVars = ``, + bindingMetadata = shared.EMPTY_OBJ, + inline = false, + isTS = false, + onError = defaultOnError, + onWarn = defaultOnWarn, + compatConfig +}) { + const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); + const context = { + // options + filename, + selfName: nameMatch && shared.capitalize(shared.camelize(nameMatch[1])), + prefixIdentifiers, + hoistStatic, + hmr, + cacheHandlers, + nodeTransforms, + directiveTransforms, + transformHoist, + isBuiltInComponent, + isCustomElement, + expressionPlugins, + scopeId, + slotted, + ssr, + inSSR, + ssrCssVars, + bindingMetadata, + inline, + isTS, + onError, + onWarn, + compatConfig, + // state + root, + helpers: /* @__PURE__ */ new Map(), + components: /* @__PURE__ */ new Set(), + directives: /* @__PURE__ */ new Set(), + hoists: [], + imports: [], + cached: [], + constantCache: /* @__PURE__ */ new WeakMap(), + temps: 0, + identifiers: /* @__PURE__ */ Object.create(null), + scopes: { + vFor: 0, + vSlot: 0, + vPre: 0, + vOnce: 0 + }, + parent: null, + grandParent: null, + currentNode: root, + childIndex: 0, + inVOnce: false, + // methods + helper(name) { + const count = context.helpers.get(name) || 0; + context.helpers.set(name, count + 1); + return name; + }, + removeHelper(name) { + const count = context.helpers.get(name); + if (count) { + const currentCount = count - 1; + if (!currentCount) { + context.helpers.delete(name); + } else { + context.helpers.set(name, currentCount); + } + } + }, + helperString(name) { + return `_${helperNameMap[context.helper(name)]}`; + }, + replaceNode(node) { + context.parent.children[context.childIndex] = context.currentNode = node; + }, + removeNode(node) { + const list = context.parent.children; + const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; + if (!node || node === context.currentNode) { + context.currentNode = null; + context.onNodeRemoved(); + } else { + if (context.childIndex > removalIndex) { + context.childIndex--; + context.onNodeRemoved(); + } + } + context.parent.children.splice(removalIndex, 1); + }, + onNodeRemoved: shared.NOOP, + addIdentifiers(exp) { + { + if (shared.isString(exp)) { + addId(exp); + } else if (exp.identifiers) { + exp.identifiers.forEach(addId); + } else if (exp.type === 4) { + addId(exp.content); + } + } + }, + removeIdentifiers(exp) { + { + if (shared.isString(exp)) { + removeId(exp); + } else if (exp.identifiers) { + exp.identifiers.forEach(removeId); + } else if (exp.type === 4) { + removeId(exp.content); + } + } + }, + hoist(exp) { + if (shared.isString(exp)) exp = createSimpleExpression(exp); + context.hoists.push(exp); + const identifier = createSimpleExpression( + `_hoisted_${context.hoists.length}`, + false, + exp.loc, + 2 + ); + identifier.hoisted = exp; + return identifier; + }, + cache(exp, isVNode = false, inVOnce = false) { + const cacheExp = createCacheExpression( + context.cached.length, + exp, + isVNode, + inVOnce + ); + context.cached.push(cacheExp); + return cacheExp; + } + }; + { + context.filters = /* @__PURE__ */ new Set(); + } + function addId(id) { + const { identifiers } = context; + if (identifiers[id] === void 0) { + identifiers[id] = 0; + } + identifiers[id]++; + } + function removeId(id) { + context.identifiers[id]--; + } + return context; +} +function transform(root, options) { + const context = createTransformContext(root, options); + traverseNode(root, context); + if (options.hoistStatic) { + cacheStatic(root, context); + } + if (!options.ssr) { + createRootCodegen(root, context); + } + root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); + root.components = [...context.components]; + root.directives = [...context.directives]; + root.imports = context.imports; + root.hoists = context.hoists; + root.temps = context.temps; + root.cached = context.cached; + root.transformed = true; + { + root.filters = [...context.filters]; + } +} +function createRootCodegen(root, context) { + const { helper } = context; + const { children } = root; + if (children.length === 1) { + const child = children[0]; + if (isSingleElementRoot(root, child) && child.codegenNode) { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + convertToBlock(codegenNode, context); + } + root.codegenNode = codegenNode; + } else { + root.codegenNode = child; + } + } else if (children.length > 1) { + let patchFlag = 64; + root.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + root.children, + patchFlag, + void 0, + void 0, + true, + void 0, + false + ); + } else ; +} +function traverseChildren(parent, context) { + let i = 0; + const nodeRemoved = () => { + i--; + }; + for (; i < parent.children.length; i++) { + const child = parent.children[i]; + if (shared.isString(child)) continue; + context.grandParent = context.parent; + context.parent = parent; + context.childIndex = i; + context.onNodeRemoved = nodeRemoved; + traverseNode(child, context); + } +} +function traverseNode(node, context) { + context.currentNode = node; + const { nodeTransforms } = context; + const exitFns = []; + for (let i2 = 0; i2 < nodeTransforms.length; i2++) { + const onExit = nodeTransforms[i2](node, context); + if (onExit) { + if (shared.isArray(onExit)) { + exitFns.push(...onExit); + } else { + exitFns.push(onExit); + } + } + if (!context.currentNode) { + return; + } else { + node = context.currentNode; + } + } + switch (node.type) { + case 3: + if (!context.ssr) { + context.helper(CREATE_COMMENT); + } + break; + case 5: + if (!context.ssr) { + context.helper(TO_DISPLAY_STRING); + } + break; + // for container types, further traverse downwards + case 9: + for (let i2 = 0; i2 < node.branches.length; i2++) { + traverseNode(node.branches[i2], context); + } + break; + case 10: + case 11: + case 1: + case 0: + traverseChildren(node, context); + break; + } + context.currentNode = node; + let i = exitFns.length; + while (i--) { + exitFns[i](); + } +} +function createStructuralDirectiveTransform(name, fn) { + const matches = shared.isString(name) ? (n) => n === name : (n) => name.test(n); + return (node, context) => { + if (node.type === 1) { + const { props } = node; + if (node.tagType === 3 && props.some(isVSlot)) { + return; + } + const exitFns = []; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 7 && matches(prop.name)) { + props.splice(i, 1); + i--; + const onExit = fn(node, prop, context); + if (onExit) exitFns.push(onExit); + } + } + return exitFns; + } + }; +} + +const PURE_ANNOTATION = `/*@__PURE__*/`; +const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; +function createCodegenContext(ast, { + mode = "function", + prefixIdentifiers = mode === "module", + sourceMap = false, + filename = `template.vue.html`, + scopeId = null, + optimizeImports = false, + runtimeGlobalName = `Vue`, + runtimeModuleName = `vue`, + ssrRuntimeModuleName = "vue/server-renderer", + ssr = false, + isTS = false, + inSSR = false +}) { + const context = { + mode, + prefixIdentifiers, + sourceMap, + filename, + scopeId, + optimizeImports, + runtimeGlobalName, + runtimeModuleName, + ssrRuntimeModuleName, + ssr, + isTS, + inSSR, + source: ast.source, + code: ``, + column: 1, + line: 1, + offset: 0, + indentLevel: 0, + pure: false, + map: void 0, + helper(key) { + return `_${helperNameMap[key]}`; + }, + push(code, newlineIndex = -2 /* None */, node) { + context.code += code; + if (context.map) { + if (node) { + let name; + if (node.type === 4 && !node.isStatic) { + const content = node.content.replace(/^_ctx\./, ""); + if (content !== node.content && isSimpleIdentifier(content)) { + name = content; + } + } + addMapping(node.loc.start, name); + } + if (newlineIndex === -3 /* Unknown */) { + advancePositionWithMutation(context, code); + } else { + context.offset += code.length; + if (newlineIndex === -2 /* None */) { + context.column += code.length; + } else { + if (newlineIndex === -1 /* End */) { + newlineIndex = code.length - 1; + } + context.line++; + context.column = code.length - newlineIndex; + } + } + if (node && node.loc !== locStub) { + addMapping(node.loc.end); + } + } + }, + indent() { + newline(++context.indentLevel); + }, + deindent(withoutNewLine = false) { + if (withoutNewLine) { + --context.indentLevel; + } else { + newline(--context.indentLevel); + } + }, + newline() { + newline(context.indentLevel); + } + }; + function newline(n) { + context.push("\n" + ` `.repeat(n), 0 /* Start */); + } + function addMapping(loc, name = null) { + const { _names, _mappings } = context.map; + if (name !== null && !_names.has(name)) _names.add(name); + _mappings.add({ + originalLine: loc.line, + originalColumn: loc.column - 1, + // source-map column is 0 based + generatedLine: context.line, + generatedColumn: context.column - 1, + source: filename, + name + }); + } + if (sourceMap) { + context.map = new sourceMapJs.SourceMapGenerator(); + context.map.setSourceContent(filename, context.source); + context.map._sources.add(filename); + } + return context; +} +function generate(ast, options = {}) { + const context = createCodegenContext(ast, options); + if (options.onContextCreated) options.onContextCreated(context); + const { + mode, + push, + prefixIdentifiers, + indent, + deindent, + newline, + scopeId, + ssr + } = context; + const helpers = Array.from(ast.helpers); + const hasHelpers = helpers.length > 0; + const useWithBlock = !prefixIdentifiers && mode !== "module"; + const genScopeId = scopeId != null && mode === "module"; + const isSetupInlined = !!options.inline; + const preambleContext = isSetupInlined ? createCodegenContext(ast, options) : context; + if (mode === "module") { + genModulePreamble(ast, preambleContext, genScopeId, isSetupInlined); + } else { + genFunctionPreamble(ast, preambleContext); + } + const functionName = ssr ? `ssrRender` : `render`; + const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; + if (options.bindingMetadata && !options.inline) { + args.push("$props", "$setup", "$data", "$options"); + } + const signature = options.isTS ? args.map((arg) => `${arg}: any`).join(",") : args.join(", "); + if (isSetupInlined) { + push(`(${signature}) => {`); + } else { + push(`function ${functionName}(${signature}) {`); + } + indent(); + if (useWithBlock) { + push(`with (_ctx) {`); + indent(); + if (hasHelpers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue +`, + -1 /* End */ + ); + newline(); + } + } + if (ast.components.length) { + genAssets(ast.components, "component", context); + if (ast.directives.length || ast.temps > 0) { + newline(); + } + } + if (ast.directives.length) { + genAssets(ast.directives, "directive", context); + if (ast.temps > 0) { + newline(); + } + } + if (ast.filters && ast.filters.length) { + newline(); + genAssets(ast.filters, "filter", context); + newline(); + } + if (ast.temps > 0) { + push(`let `); + for (let i = 0; i < ast.temps; i++) { + push(`${i > 0 ? `, ` : ``}_temp${i}`); + } + } + if (ast.components.length || ast.directives.length || ast.temps) { + push(` +`, 0 /* Start */); + newline(); + } + if (!ssr) { + push(`return `); + } + if (ast.codegenNode) { + genNode(ast.codegenNode, context); + } else { + push(`null`); + } + if (useWithBlock) { + deindent(); + push(`}`); + } + deindent(); + push(`}`); + return { + ast, + code: context.code, + preamble: isSetupInlined ? preambleContext.code : ``, + map: context.map ? context.map.toJSON() : void 0 + }; +} +function genFunctionPreamble(ast, context) { + const { + ssr, + prefixIdentifiers, + push, + newline, + runtimeModuleName, + runtimeGlobalName, + ssrRuntimeModuleName + } = context; + const VueBinding = ssr ? `require(${JSON.stringify(runtimeModuleName)})` : runtimeGlobalName; + const helpers = Array.from(ast.helpers); + if (helpers.length > 0) { + if (prefixIdentifiers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = ${VueBinding} +`, + -1 /* End */ + ); + } else { + push(`const _Vue = ${VueBinding} +`, -1 /* End */); + if (ast.hoists.length) { + const staticHelpers = [ + CREATE_VNODE, + CREATE_ELEMENT_VNODE, + CREATE_COMMENT, + CREATE_TEXT, + CREATE_STATIC + ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); + push(`const { ${staticHelpers} } = _Vue +`, -1 /* End */); + } + } + } + if (ast.ssrHelpers && ast.ssrHelpers.length) { + push( + `const { ${ast.ssrHelpers.map(aliasHelper).join(", ")} } = require("${ssrRuntimeModuleName}") +`, + -1 /* End */ + ); + } + genHoists(ast.hoists, context); + newline(); + push(`return `); +} +function genModulePreamble(ast, context, genScopeId, inline) { + const { + push, + newline, + optimizeImports, + runtimeModuleName, + ssrRuntimeModuleName + } = context; + if (ast.helpers.size) { + const helpers = Array.from(ast.helpers); + if (optimizeImports) { + push( + `import { ${helpers.map((s) => helperNameMap[s]).join(", ")} } from ${JSON.stringify(runtimeModuleName)} +`, + -1 /* End */ + ); + push( + ` +// Binding optimization for webpack code-split +const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(", ")} +`, + -1 /* End */ + ); + } else { + push( + `import { ${helpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from ${JSON.stringify(runtimeModuleName)} +`, + -1 /* End */ + ); + } + } + if (ast.ssrHelpers && ast.ssrHelpers.length) { + push( + `import { ${ast.ssrHelpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from "${ssrRuntimeModuleName}" +`, + -1 /* End */ + ); + } + if (ast.imports.length) { + genImports(ast.imports, context); + newline(); + } + genHoists(ast.hoists, context); + newline(); + if (!inline) { + push(`export `); + } +} +function genAssets(assets, type, { helper, push, newline, isTS }) { + const resolver = helper( + type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE + ); + for (let i = 0; i < assets.length; i++) { + let id = assets[i]; + const maybeSelfReference = id.endsWith("__self"); + if (maybeSelfReference) { + id = id.slice(0, -6); + } + push( + `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` + ); + if (i < assets.length - 1) { + newline(); + } + } +} +function genHoists(hoists, context) { + if (!hoists.length) { + return; + } + context.pure = true; + const { push, newline } = context; + newline(); + for (let i = 0; i < hoists.length; i++) { + const exp = hoists[i]; + if (exp) { + push(`const _hoisted_${i + 1} = `); + genNode(exp, context); + newline(); + } + } + context.pure = false; +} +function genImports(importsOptions, context) { + if (!importsOptions.length) { + return; + } + importsOptions.forEach((imports) => { + context.push(`import `); + genNode(imports.exp, context); + context.push(` from '${imports.path}'`); + context.newline(); + }); +} +function isText(n) { + return shared.isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; +} +function genNodeListAsArray(nodes, context) { + const multilines = nodes.length > 3 || nodes.some((n) => shared.isArray(n) || !isText(n)); + context.push(`[`); + multilines && context.indent(); + genNodeList(nodes, context, multilines); + multilines && context.deindent(); + context.push(`]`); +} +function genNodeList(nodes, context, multilines = false, comma = true) { + const { push, newline } = context; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (shared.isString(node)) { + push(node, -3 /* Unknown */); + } else if (shared.isArray(node)) { + genNodeListAsArray(node, context); + } else { + genNode(node, context); + } + if (i < nodes.length - 1) { + if (multilines) { + comma && push(","); + newline(); + } else { + comma && push(", "); + } + } + } +} +function genNode(node, context) { + if (shared.isString(node)) { + context.push(node, -3 /* Unknown */); + return; + } + if (shared.isSymbol(node)) { + context.push(context.helper(node)); + return; + } + switch (node.type) { + case 1: + case 9: + case 11: + genNode(node.codegenNode, context); + break; + case 2: + genText(node, context); + break; + case 4: + genExpression(node, context); + break; + case 5: + genInterpolation(node, context); + break; + case 12: + genNode(node.codegenNode, context); + break; + case 8: + genCompoundExpression(node, context); + break; + case 3: + genComment(node, context); + break; + case 13: + genVNodeCall(node, context); + break; + case 14: + genCallExpression(node, context); + break; + case 15: + genObjectExpression(node, context); + break; + case 17: + genArrayExpression(node, context); + break; + case 18: + genFunctionExpression(node, context); + break; + case 19: + genConditionalExpression(node, context); + break; + case 20: + genCacheExpression(node, context); + break; + case 21: + genNodeList(node.body, context, true, false); + break; + // SSR only types + case 22: + genTemplateLiteral(node, context); + break; + case 23: + genIfStatement(node, context); + break; + case 24: + genAssignmentExpression(node, context); + break; + case 25: + genSequenceExpression(node, context); + break; + case 26: + genReturnStatement(node, context); + break; + } +} +function genText(node, context) { + context.push(JSON.stringify(node.content), -3 /* Unknown */, node); +} +function genExpression(node, context) { + const { content, isStatic } = node; + context.push( + isStatic ? JSON.stringify(content) : content, + -3 /* Unknown */, + node + ); +} +function genInterpolation(node, context) { + const { push, helper, pure } = context; + if (pure) push(PURE_ANNOTATION); + push(`${helper(TO_DISPLAY_STRING)}(`); + genNode(node.content, context); + push(`)`); +} +function genCompoundExpression(node, context) { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (shared.isString(child)) { + context.push(child, -3 /* Unknown */); + } else { + genNode(child, context); + } + } +} +function genExpressionAsPropertyKey(node, context) { + const { push } = context; + if (node.type === 8) { + push(`[`); + genCompoundExpression(node, context); + push(`]`); + } else if (node.isStatic) { + const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); + push(text, -2 /* None */, node); + } else { + push(`[${node.content}]`, -3 /* Unknown */, node); + } +} +function genComment(node, context) { + const { push, helper, pure } = context; + if (pure) { + push(PURE_ANNOTATION); + } + push( + `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, + -3 /* Unknown */, + node + ); +} +function genVNodeCall(node, context) { + const { push, helper, pure } = context; + const { + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent + } = node; + let patchFlagString; + if (patchFlag) { + { + patchFlagString = String(patchFlag); + } + } + if (directives) { + push(helper(WITH_DIRECTIVES) + `(`); + } + if (isBlock) { + push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); + } + if (pure) { + push(PURE_ANNOTATION); + } + const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); + push(helper(callHelper) + `(`, -2 /* None */, node); + genNodeList( + genNullableArgs([tag, props, children, patchFlagString, dynamicProps]), + context + ); + push(`)`); + if (isBlock) { + push(`)`); + } + if (directives) { + push(`, `); + genNode(directives, context); + push(`)`); + } +} +function genNullableArgs(args) { + let i = args.length; + while (i--) { + if (args[i] != null) break; + } + return args.slice(0, i + 1).map((arg) => arg || `null`); +} +function genCallExpression(node, context) { + const { push, helper, pure } = context; + const callee = shared.isString(node.callee) ? node.callee : helper(node.callee); + if (pure) { + push(PURE_ANNOTATION); + } + push(callee + `(`, -2 /* None */, node); + genNodeList(node.arguments, context); + push(`)`); +} +function genObjectExpression(node, context) { + const { push, indent, deindent, newline } = context; + const { properties } = node; + if (!properties.length) { + push(`{}`, -2 /* None */, node); + return; + } + const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4); + push(multilines ? `{` : `{ `); + multilines && indent(); + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + genExpressionAsPropertyKey(key, context); + push(`: `); + genNode(value, context); + if (i < properties.length - 1) { + push(`,`); + newline(); + } + } + multilines && deindent(); + push(multilines ? `}` : ` }`); +} +function genArrayExpression(node, context) { + genNodeListAsArray(node.elements, context); +} +function genFunctionExpression(node, context) { + const { push, indent, deindent } = context; + const { params, returns, body, newline, isSlot } = node; + if (isSlot) { + push(`_${helperNameMap[WITH_CTX]}(`); + } + push(`(`, -2 /* None */, node); + if (shared.isArray(params)) { + genNodeList(params, context); + } else if (params) { + genNode(params, context); + } + push(`) => `); + if (newline || body) { + push(`{`); + indent(); + } + if (returns) { + if (newline) { + push(`return `); + } + if (shared.isArray(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); + } + } else if (body) { + genNode(body, context); + } + if (newline || body) { + deindent(); + push(`}`); + } + if (isSlot) { + if (node.isNonScopedSlot) { + push(`, undefined, true`); + } + push(`)`); + } +} +function genConditionalExpression(node, context) { + const { test, consequent, alternate, newline: needNewline } = node; + const { push, indent, deindent, newline } = context; + if (test.type === 4) { + const needsParens = !isSimpleIdentifier(test.content); + needsParens && push(`(`); + genExpression(test, context); + needsParens && push(`)`); + } else { + push(`(`); + genNode(test, context); + push(`)`); + } + needNewline && indent(); + context.indentLevel++; + needNewline || push(` `); + push(`? `); + genNode(consequent, context); + context.indentLevel--; + needNewline && newline(); + needNewline || push(` `); + push(`: `); + const isNested = alternate.type === 19; + if (!isNested) { + context.indentLevel++; + } + genNode(alternate, context); + if (!isNested) { + context.indentLevel--; + } + needNewline && deindent( + true + /* without newline */ + ); +} +function genCacheExpression(node, context) { + const { push, helper, indent, deindent, newline } = context; + const { needPauseTracking, needArraySpread } = node; + if (needArraySpread) { + push(`[...(`); + } + push(`_cache[${node.index}] || (`); + if (needPauseTracking) { + indent(); + push(`${helper(SET_BLOCK_TRACKING)}(-1`); + if (node.inVOnce) push(`, true`); + push(`),`); + newline(); + push(`(`); + } + push(`_cache[${node.index}] = `); + genNode(node.value, context); + if (needPauseTracking) { + push(`).cacheIndex = ${node.index},`); + newline(); + push(`${helper(SET_BLOCK_TRACKING)}(1),`); + newline(); + push(`_cache[${node.index}]`); + deindent(); + } + push(`)`); + if (needArraySpread) { + push(`)]`); + } +} +function genTemplateLiteral(node, context) { + const { push, indent, deindent } = context; + push("`"); + const l = node.elements.length; + const multilines = l > 3; + for (let i = 0; i < l; i++) { + const e = node.elements[i]; + if (shared.isString(e)) { + push(e.replace(/(`|\$|\\)/g, "\\$1"), -3 /* Unknown */); + } else { + push("${"); + if (multilines) indent(); + genNode(e, context); + if (multilines) deindent(); + push("}"); + } + } + push("`"); +} +function genIfStatement(node, context) { + const { push, indent, deindent } = context; + const { test, consequent, alternate } = node; + push(`if (`); + genNode(test, context); + push(`) {`); + indent(); + genNode(consequent, context); + deindent(); + push(`}`); + if (alternate) { + push(` else `); + if (alternate.type === 23) { + genIfStatement(alternate, context); + } else { + push(`{`); + indent(); + genNode(alternate, context); + deindent(); + push(`}`); + } + } +} +function genAssignmentExpression(node, context) { + genNode(node.left, context); + context.push(` = `); + genNode(node.right, context); +} +function genSequenceExpression(node, context) { + context.push(`(`); + genNodeList(node.expressions, context); + context.push(`)`); +} +function genReturnStatement({ returns }, context) { + context.push(`return `); + if (shared.isArray(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); + } +} + +const isLiteralWhitelisted = /* @__PURE__ */ shared.makeMap("true,false,null,this"); +const transformExpression = (node, context) => { + if (node.type === 5) { + node.content = processExpression( + node.content, + context + ); + } else if (node.type === 1) { + const memo = findDir(node, "memo"); + for (let i = 0; i < node.props.length; i++) { + const dir = node.props[i]; + if (dir.type === 7 && dir.name !== "for") { + const exp = dir.exp; + const arg = dir.arg; + if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor) + !(memo && arg && arg.type === 4 && arg.content === "key")) { + dir.exp = processExpression( + exp, + context, + // slot args must be processed as function params + dir.name === "slot" + ); + } + if (arg && arg.type === 4 && !arg.isStatic) { + dir.arg = processExpression(arg, context); + } + } + } + } +}; +function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { + if (!context.prefixIdentifiers || !node.content.trim()) { + return node; + } + const { inline, bindingMetadata } = context; + const rewriteIdentifier = (raw, parent, id) => { + const type = shared.hasOwn(bindingMetadata, raw) && bindingMetadata[raw]; + if (inline) { + const isAssignmentLVal = parent && parent.type === "AssignmentExpression" && parent.left === id; + const isUpdateArg = parent && parent.type === "UpdateExpression" && parent.argument === id; + const isDestructureAssignment = parent && isInDestructureAssignment(parent, parentStack); + const isNewExpression = parent && isInNewExpression(parentStack); + const wrapWithUnref = (raw2) => { + const wrapped = `${context.helperString(UNREF)}(${raw2})`; + return isNewExpression ? `(${wrapped})` : wrapped; + }; + if (isConst(type) || type === "setup-reactive-const" || localVars[raw]) { + return raw; + } else if (type === "setup-ref") { + return `${raw}.value`; + } else if (type === "setup-maybe-ref") { + return isAssignmentLVal || isUpdateArg || isDestructureAssignment ? `${raw}.value` : wrapWithUnref(raw); + } else if (type === "setup-let") { + if (isAssignmentLVal) { + const { right: rVal, operator } = parent; + const rExp = rawExp.slice(rVal.start - 1, rVal.end - 1); + const rExpString = stringifyExpression( + processExpression( + createSimpleExpression(rExp, false), + context, + false, + false, + knownIds + ) + ); + return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore +` : ``} ? ${raw}.value ${operator} ${rExpString} : ${raw}`; + } else if (isUpdateArg) { + id.start = parent.start; + id.end = parent.end; + const { prefix: isPrefix, operator } = parent; + const prefix = isPrefix ? operator : ``; + const postfix = isPrefix ? `` : operator; + return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore +` : ``} ? ${prefix}${raw}.value${postfix} : ${prefix}${raw}${postfix}`; + } else if (isDestructureAssignment) { + return raw; + } else { + return wrapWithUnref(raw); + } + } else if (type === "props") { + return shared.genPropsAccessExp(raw); + } else if (type === "props-aliased") { + return shared.genPropsAccessExp(bindingMetadata.__propsAliases[raw]); + } + } else { + if (type && type.startsWith("setup") || type === "literal-const") { + return `$setup.${raw}`; + } else if (type === "props-aliased") { + return `$props['${bindingMetadata.__propsAliases[raw]}']`; + } else if (type) { + return `$${type}.${raw}`; + } + } + return `_ctx.${raw}`; + }; + const rawExp = node.content; + let ast = node.ast; + if (ast === false) { + return node; + } + if (ast === null || !ast && isSimpleIdentifier(rawExp)) { + const isScopeVarReference = context.identifiers[rawExp]; + const isAllowedGlobal = shared.isGloballyAllowed(rawExp); + const isLiteral = isLiteralWhitelisted(rawExp); + if (!asParams && !isScopeVarReference && !isLiteral && (!isAllowedGlobal || bindingMetadata[rawExp])) { + if (isConst(bindingMetadata[rawExp])) { + node.constType = 1; + } + node.content = rewriteIdentifier(rawExp); + } else if (!isScopeVarReference) { + if (isLiteral) { + node.constType = 3; + } else { + node.constType = 2; + } + } + return node; + } + if (!ast) { + const source = asRawStatements ? ` ${rawExp} ` : `(${rawExp})${asParams ? `=>{}` : ``}`; + try { + ast = parser.parseExpression(source, { + sourceType: "module", + plugins: context.expressionPlugins + }); + } catch (e) { + context.onError( + createCompilerError( + 45, + node.loc, + void 0, + e.message + ) + ); + return node; + } + } + const ids = []; + const parentStack = []; + const knownIds = Object.create(context.identifiers); + walkIdentifiers( + ast, + (node2, parent, _, isReferenced, isLocal) => { + if (isStaticPropertyKey(node2, parent)) { + return; + } + if (node2.name.startsWith("_filter_")) { + return; + } + const needPrefix = isReferenced && canPrefix(node2); + if (needPrefix && !isLocal) { + if (isStaticProperty(parent) && parent.shorthand) { + node2.prefix = `${node2.name}: `; + } + node2.name = rewriteIdentifier(node2.name, parent, node2); + ids.push(node2); + } else { + if (!(needPrefix && isLocal) && (!parent || parent.type !== "CallExpression" && parent.type !== "NewExpression" && parent.type !== "MemberExpression")) { + node2.isConstant = true; + } + ids.push(node2); + } + }, + true, + // invoke on ALL identifiers + parentStack, + knownIds + ); + const children = []; + ids.sort((a, b) => a.start - b.start); + ids.forEach((id, i) => { + const start = id.start - 1; + const end = id.end - 1; + const last = ids[i - 1]; + const leadingText = rawExp.slice(last ? last.end - 1 : 0, start); + if (leadingText.length || id.prefix) { + children.push(leadingText + (id.prefix || ``)); + } + const source = rawExp.slice(start, end); + children.push( + createSimpleExpression( + id.name, + false, + { + start: advancePositionWithClone(node.loc.start, source, start), + end: advancePositionWithClone(node.loc.start, source, end), + source + }, + id.isConstant ? 3 : 0 + ) + ); + if (i === ids.length - 1 && end < rawExp.length) { + children.push(rawExp.slice(end)); + } + }); + let ret; + if (children.length) { + ret = createCompoundExpression(children, node.loc); + ret.ast = ast; + } else { + ret = node; + ret.constType = 3; + } + ret.identifiers = Object.keys(knownIds); + return ret; +} +function canPrefix(id) { + if (shared.isGloballyAllowed(id.name)) { + return false; + } + if (id.name === "require") { + return false; + } + return true; +} +function stringifyExpression(exp) { + if (shared.isString(exp)) { + return exp; + } else if (exp.type === 4) { + return exp.content; + } else { + return exp.children.map(stringifyExpression).join(""); + } +} +function isConst(type) { + return type === "setup-const" || type === "literal-const"; +} + +const transformIf = createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + (node, dir, context) => { + return processIf(node, dir, context, (ifNode, branch, isRoot) => { + const siblings = context.parent.children; + let i = siblings.indexOf(ifNode); + let key = 0; + while (i-- >= 0) { + const sibling = siblings[i]; + if (sibling && sibling.type === 9) { + key += sibling.branches.length; + } + } + return () => { + if (isRoot) { + ifNode.codegenNode = createCodegenNodeForBranch( + branch, + key, + context + ); + } else { + const parentCondition = getParentCondition(ifNode.codegenNode); + parentCondition.alternate = createCodegenNodeForBranch( + branch, + key + ifNode.branches.length - 1, + context + ); + } + }; + }); + } +); +function processIf(node, dir, context, processCodegen) { + if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { + const loc = dir.exp ? dir.exp.loc : node.loc; + context.onError( + createCompilerError(28, dir.loc) + ); + dir.exp = createSimpleExpression(`true`, false, loc); + } + if (context.prefixIdentifiers && dir.exp) { + dir.exp = processExpression(dir.exp, context); + } + if (dir.name === "if") { + const branch = createIfBranch(node, dir); + const ifNode = { + type: 9, + loc: cloneLoc(node.loc), + branches: [branch] + }; + context.replaceNode(ifNode); + if (processCodegen) { + return processCodegen(ifNode, branch, true); + } + } else { + const siblings = context.parent.children; + let i = siblings.indexOf(node); + while (i-- >= -1) { + const sibling = siblings[i]; + if (sibling && sibling.type === 3) { + context.removeNode(sibling); + continue; + } + if (sibling && sibling.type === 2 && !sibling.content.trim().length) { + context.removeNode(sibling); + continue; + } + if (sibling && sibling.type === 9) { + if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { + context.onError( + createCompilerError(30, node.loc) + ); + } + context.removeNode(); + const branch = createIfBranch(node, dir); + { + const key = branch.userKey; + if (key) { + sibling.branches.forEach(({ userKey }) => { + if (isSameKey(userKey, key)) { + context.onError( + createCompilerError( + 29, + branch.userKey.loc + ) + ); + } + }); + } + } + sibling.branches.push(branch); + const onExit = processCodegen && processCodegen(sibling, branch, false); + traverseNode(branch, context); + if (onExit) onExit(); + context.currentNode = null; + } else { + context.onError( + createCompilerError(30, node.loc) + ); + } + break; + } + } +} +function createIfBranch(node, dir) { + const isTemplateIf = node.tagType === 3; + return { + type: 10, + loc: node.loc, + condition: dir.name === "else" ? void 0 : dir.exp, + children: isTemplateIf && !findDir(node, "for") ? node.children : [node], + userKey: findProp(node, `key`), + isTemplateIf + }; +} +function createCodegenNodeForBranch(branch, keyIndex, context) { + if (branch.condition) { + return createConditionalExpression( + branch.condition, + createChildrenCodegenNode(branch, keyIndex, context), + // make sure to pass in asBlock: true so that the comment node call + // closes the current block. + createCallExpression(context.helper(CREATE_COMMENT), [ + '""', + "true" + ]) + ); + } else { + return createChildrenCodegenNode(branch, keyIndex, context); + } +} +function createChildrenCodegenNode(branch, keyIndex, context) { + const { helper } = context; + const keyProperty = createObjectProperty( + `key`, + createSimpleExpression( + `${keyIndex}`, + false, + locStub, + 2 + ) + ); + const { children } = branch; + const firstChild = children[0]; + const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; + if (needFragmentWrapper) { + if (children.length === 1 && firstChild.type === 11) { + const vnodeCall = firstChild.codegenNode; + injectProp(vnodeCall, keyProperty, context); + return vnodeCall; + } else { + let patchFlag = 64; + return createVNodeCall( + context, + helper(FRAGMENT), + createObjectExpression([keyProperty]), + children, + patchFlag, + void 0, + void 0, + true, + false, + false, + branch.loc + ); + } + } else { + const ret = firstChild.codegenNode; + const vnodeCall = getMemoedVNodeCall(ret); + if (vnodeCall.type === 13) { + convertToBlock(vnodeCall, context); + } + injectProp(vnodeCall, keyProperty, context); + return ret; + } +} +function isSameKey(a, b) { + if (!a || a.type !== b.type) { + return false; + } + if (a.type === 6) { + if (a.value.content !== b.value.content) { + return false; + } + } else { + const exp = a.exp; + const branchExp = b.exp; + if (exp.type !== branchExp.type) { + return false; + } + if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { + return false; + } + } + return true; +} +function getParentCondition(node) { + while (true) { + if (node.type === 19) { + if (node.alternate.type === 19) { + node = node.alternate; + } else { + return node; + } + } else if (node.type === 20) { + node = node.value; + } + } +} + +const transformBind = (dir, _node, context) => { + const { modifiers, loc } = dir; + const arg = dir.arg; + let { exp } = dir; + if (exp && exp.type === 4 && !exp.content.trim()) { + { + context.onError( + createCompilerError(34, loc) + ); + return { + props: [ + createObjectProperty(arg, createSimpleExpression("", true, loc)) + ] + }; + } + } + if (!exp) { + if (arg.type !== 4 || !arg.isStatic) { + context.onError( + createCompilerError( + 52, + arg.loc + ) + ); + return { + props: [ + createObjectProperty(arg, createSimpleExpression("", true, loc)) + ] + }; + } + transformBindShorthand(dir, context); + exp = dir.exp; + } + if (arg.type !== 4) { + arg.children.unshift(`(`); + arg.children.push(`) || ""`); + } else if (!arg.isStatic) { + arg.content = `${arg.content} || ""`; + } + if (modifiers.some((mod) => mod.content === "camel")) { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = shared.camelize(arg.content); + } else { + arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; + } + } else { + arg.children.unshift(`${context.helperString(CAMELIZE)}(`); + arg.children.push(`)`); + } + } + if (!context.inSSR) { + if (modifiers.some((mod) => mod.content === "prop")) { + injectPrefix(arg, "."); + } + if (modifiers.some((mod) => mod.content === "attr")) { + injectPrefix(arg, "^"); + } + } + return { + props: [createObjectProperty(arg, exp)] + }; +}; +const transformBindShorthand = (dir, context) => { + const arg = dir.arg; + const propName = shared.camelize(arg.content); + dir.exp = createSimpleExpression(propName, false, arg.loc); + { + dir.exp = processExpression(dir.exp, context); + } +}; +const injectPrefix = (arg, prefix) => { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = prefix + arg.content; + } else { + arg.content = `\`${prefix}\${${arg.content}}\``; + } + } else { + arg.children.unshift(`'${prefix}' + (`); + arg.children.push(`)`); + } +}; + +const transformFor = createStructuralDirectiveTransform( + "for", + (node, dir, context) => { + const { helper, removeHelper } = context; + return processFor(node, dir, context, (forNode) => { + const renderExp = createCallExpression(helper(RENDER_LIST), [ + forNode.source + ]); + const isTemplate = isTemplateNode(node); + const memo = findDir(node, "memo"); + const keyProp = findProp(node, `key`, false, true); + const isDirKey = keyProp && keyProp.type === 7; + if (isDirKey && !keyProp.exp) { + transformBindShorthand(keyProp, context); + } + let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp); + if (memo && keyExp && isDirKey) { + { + keyProp.exp = keyExp = processExpression( + keyExp, + context + ); + } + } + const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null; + if (isTemplate) { + if (memo) { + memo.exp = processExpression( + memo.exp, + context + ); + } + if (keyProperty && keyProp.type !== 6) { + keyProperty.value = processExpression( + keyProperty.value, + context + ); + } + } + const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; + const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; + forNode.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + renderExp, + fragmentFlag, + void 0, + void 0, + true, + !isStableFragment, + false, + node.loc + ); + return () => { + let childBlock; + const { children } = forNode; + if (isTemplate) { + node.children.some((c) => { + if (c.type === 1) { + const key = findProp(c, "key"); + if (key) { + context.onError( + createCompilerError( + 33, + key.loc + ) + ); + return true; + } + } + }); + } + const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; + const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; + if (slotOutlet) { + childBlock = slotOutlet.codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + } else if (needFragmentWrapper) { + childBlock = createVNodeCall( + context, + helper(FRAGMENT), + keyProperty ? createObjectExpression([keyProperty]) : void 0, + node.children, + 64, + void 0, + void 0, + true, + void 0, + false + ); + } else { + childBlock = children[0].codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + if (childBlock.isBlock !== !isStableFragment) { + if (childBlock.isBlock) { + removeHelper(OPEN_BLOCK); + removeHelper( + getVNodeBlockHelper(context.inSSR, childBlock.isComponent) + ); + } else { + removeHelper( + getVNodeHelper(context.inSSR, childBlock.isComponent) + ); + } + } + childBlock.isBlock = !isStableFragment; + if (childBlock.isBlock) { + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); + } else { + helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); + } + } + if (memo) { + const loop = createFunctionExpression( + createForLoopParams(forNode.parseResult, [ + createSimpleExpression(`_cached`) + ]) + ); + loop.body = createBlockStatement([ + createCompoundExpression([`const _memo = (`, memo.exp, `)`]), + createCompoundExpression([ + `if (_cached`, + ...keyExp ? [` && _cached.key === `, keyExp] : [], + ` && ${context.helperString( + IS_MEMO_SAME + )}(_cached, _memo)) return _cached` + ]), + createCompoundExpression([`const _item = `, childBlock]), + createSimpleExpression(`_item.memo = _memo`), + createSimpleExpression(`return _item`) + ]); + renderExp.arguments.push( + loop, + createSimpleExpression(`_cache`), + createSimpleExpression(String(context.cached.length)) + ); + context.cached.push(null); + } else { + renderExp.arguments.push( + createFunctionExpression( + createForLoopParams(forNode.parseResult), + childBlock, + true + ) + ); + } + }; + }); + } +); +function processFor(node, dir, context, processCodegen) { + if (!dir.exp) { + context.onError( + createCompilerError(31, dir.loc) + ); + return; + } + const parseResult = dir.forParseResult; + if (!parseResult) { + context.onError( + createCompilerError(32, dir.loc) + ); + return; + } + finalizeForParseResult(parseResult, context); + const { addIdentifiers, removeIdentifiers, scopes } = context; + const { source, value, key, index } = parseResult; + const forNode = { + type: 11, + loc: dir.loc, + source, + valueAlias: value, + keyAlias: key, + objectIndexAlias: index, + parseResult, + children: isTemplateNode(node) ? node.children : [node] + }; + context.replaceNode(forNode); + scopes.vFor++; + if (context.prefixIdentifiers) { + value && addIdentifiers(value); + key && addIdentifiers(key); + index && addIdentifiers(index); + } + const onExit = processCodegen && processCodegen(forNode); + return () => { + scopes.vFor--; + if (context.prefixIdentifiers) { + value && removeIdentifiers(value); + key && removeIdentifiers(key); + index && removeIdentifiers(index); + } + if (onExit) onExit(); + }; +} +function finalizeForParseResult(result, context) { + if (result.finalized) return; + if (context.prefixIdentifiers) { + result.source = processExpression( + result.source, + context + ); + if (result.key) { + result.key = processExpression( + result.key, + context, + true + ); + } + if (result.index) { + result.index = processExpression( + result.index, + context, + true + ); + } + if (result.value) { + result.value = processExpression( + result.value, + context, + true + ); + } + } + result.finalized = true; +} +function createForLoopParams({ value, key, index }, memoArgs = []) { + return createParamsList([value, key, index, ...memoArgs]); +} +function createParamsList(args) { + let i = args.length; + while (i--) { + if (args[i]) break; + } + return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); +} + +const defaultFallback = createSimpleExpression(`undefined`, false); +const trackSlotScopes = (node, context) => { + if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { + const vSlot = findDir(node, "slot"); + if (vSlot) { + const slotProps = vSlot.exp; + if (context.prefixIdentifiers) { + slotProps && context.addIdentifiers(slotProps); + } + context.scopes.vSlot++; + return () => { + if (context.prefixIdentifiers) { + slotProps && context.removeIdentifiers(slotProps); + } + context.scopes.vSlot--; + }; + } + } +}; +const trackVForSlotScopes = (node, context) => { + let vFor; + if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) { + const result = vFor.forParseResult; + if (result) { + finalizeForParseResult(result, context); + const { value, key, index } = result; + const { addIdentifiers, removeIdentifiers } = context; + value && addIdentifiers(value); + key && addIdentifiers(key); + index && addIdentifiers(index); + return () => { + value && removeIdentifiers(value); + key && removeIdentifiers(key); + index && removeIdentifiers(index); + }; + } + } +}; +const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( + props, + children, + false, + true, + children.length ? children[0].loc : loc +); +function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { + context.helper(WITH_CTX); + const { children, loc } = node; + const slotsProperties = []; + const dynamicSlots = []; + let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; + if (!context.ssr && context.prefixIdentifiers) { + hasDynamicSlots = hasScopeRef(node, context.identifiers); + } + const onComponentSlot = findDir(node, "slot", true); + if (onComponentSlot) { + const { arg, exp } = onComponentSlot; + if (arg && !isStaticExp(arg)) { + hasDynamicSlots = true; + } + slotsProperties.push( + createObjectProperty( + arg || createSimpleExpression("default", true), + buildSlotFn(exp, void 0, children, loc) + ) + ); + } + let hasTemplateSlots = false; + let hasNamedDefaultSlot = false; + const implicitDefaultChildren = []; + const seenSlotNames = /* @__PURE__ */ new Set(); + let conditionalBranchIndex = 0; + for (let i = 0; i < children.length; i++) { + const slotElement = children[i]; + let slotDir; + if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { + if (slotElement.type !== 3) { + implicitDefaultChildren.push(slotElement); + } + continue; + } + if (onComponentSlot) { + context.onError( + createCompilerError(37, slotDir.loc) + ); + break; + } + hasTemplateSlots = true; + const { children: slotChildren, loc: slotLoc } = slotElement; + const { + arg: slotName = createSimpleExpression(`default`, true), + exp: slotProps, + loc: dirLoc + } = slotDir; + let staticSlotName; + if (isStaticExp(slotName)) { + staticSlotName = slotName ? slotName.content : `default`; + } else { + hasDynamicSlots = true; + } + const vFor = findDir(slotElement, "for"); + const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); + let vIf; + let vElse; + if (vIf = findDir(slotElement, "if")) { + hasDynamicSlots = true; + dynamicSlots.push( + createConditionalExpression( + vIf.exp, + buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), + defaultFallback + ) + ); + } else if (vElse = findDir( + slotElement, + /^else(-if)?$/, + true + /* allowEmpty */ + )) { + let j = i; + let prev; + while (j--) { + prev = children[j]; + if (prev.type !== 3) { + break; + } + } + if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) { + let conditional = dynamicSlots[dynamicSlots.length - 1]; + while (conditional.alternate.type === 19) { + conditional = conditional.alternate; + } + conditional.alternate = vElse.exp ? createConditionalExpression( + vElse.exp, + buildDynamicSlot( + slotName, + slotFunction, + conditionalBranchIndex++ + ), + defaultFallback + ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); + } else { + context.onError( + createCompilerError(30, vElse.loc) + ); + } + } else if (vFor) { + hasDynamicSlots = true; + const parseResult = vFor.forParseResult; + if (parseResult) { + finalizeForParseResult(parseResult, context); + dynamicSlots.push( + createCallExpression(context.helper(RENDER_LIST), [ + parseResult.source, + createFunctionExpression( + createForLoopParams(parseResult), + buildDynamicSlot(slotName, slotFunction), + true + ) + ]) + ); + } else { + context.onError( + createCompilerError( + 32, + vFor.loc + ) + ); + } + } else { + if (staticSlotName) { + if (seenSlotNames.has(staticSlotName)) { + context.onError( + createCompilerError( + 38, + dirLoc + ) + ); + continue; + } + seenSlotNames.add(staticSlotName); + if (staticSlotName === "default") { + hasNamedDefaultSlot = true; + } + } + slotsProperties.push(createObjectProperty(slotName, slotFunction)); + } + } + if (!onComponentSlot) { + const buildDefaultSlotProperty = (props, children2) => { + const fn = buildSlotFn(props, void 0, children2, loc); + if (context.compatConfig) { + fn.isNonScopedSlot = true; + } + return createObjectProperty(`default`, fn); + }; + if (!hasTemplateSlots) { + slotsProperties.push(buildDefaultSlotProperty(void 0, children)); + } else if (implicitDefaultChildren.length && // #3766 + // with whitespace: 'preserve', whitespaces between slots will end up in + // implicitDefaultChildren. Ignore if all implicit children are whitespaces. + implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { + if (hasNamedDefaultSlot) { + context.onError( + createCompilerError( + 39, + implicitDefaultChildren[0].loc + ) + ); + } else { + slotsProperties.push( + buildDefaultSlotProperty(void 0, implicitDefaultChildren) + ); + } + } + } + const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; + let slots = createObjectExpression( + slotsProperties.concat( + createObjectProperty( + `_`, + // 2 = compiled but dynamic = can skip normalization, but must run diff + // 1 = compiled and static = can skip normalization AND diff as optimized + createSimpleExpression( + slotFlag + (``), + false + ) + ) + ), + loc + ); + if (dynamicSlots.length) { + slots = createCallExpression(context.helper(CREATE_SLOTS), [ + slots, + createArrayExpression(dynamicSlots) + ]); + } + return { + slots, + hasDynamicSlots + }; +} +function buildDynamicSlot(name, fn, index) { + const props = [ + createObjectProperty(`name`, name), + createObjectProperty(`fn`, fn) + ]; + if (index != null) { + props.push( + createObjectProperty(`key`, createSimpleExpression(String(index), true)) + ); + } + return createObjectExpression(props); +} +function hasForwardedSlots(children) { + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + if (child.tagType === 2 || hasForwardedSlots(child.children)) { + return true; + } + break; + case 9: + if (hasForwardedSlots(child.branches)) return true; + break; + case 10: + case 11: + if (hasForwardedSlots(child.children)) return true; + break; + } + } + return false; +} +function isNonWhitespaceContent(node) { + if (node.type !== 2 && node.type !== 12) + return true; + return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); +} + +const directiveImportMap = /* @__PURE__ */ new WeakMap(); +const transformElement = (node, context) => { + return function postTransformElement() { + node = context.currentNode; + if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { + return; + } + const { tag, props } = node; + const isComponent = node.tagType === 1; + let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; + const isDynamicComponent = shared.isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; + let vnodeProps; + let vnodeChildren; + let patchFlag = 0; + let vnodeDynamicProps; + let dynamicPropNames; + let vnodeDirectives; + let shouldUseBlock = ( + // dynamic component may resolve to plain elements + isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block + // updates inside get proper isSVG flag at runtime. (#639, #643) + // This is technically web-specific, but splitting the logic out of core + // leads to too much unnecessary complexity. + (tag === "svg" || tag === "foreignObject" || tag === "math") + ); + if (props.length > 0) { + const propsBuildResult = buildProps( + node, + context, + void 0, + isComponent, + isDynamicComponent + ); + vnodeProps = propsBuildResult.props; + patchFlag = propsBuildResult.patchFlag; + dynamicPropNames = propsBuildResult.dynamicPropNames; + const directives = propsBuildResult.directives; + vnodeDirectives = directives && directives.length ? createArrayExpression( + directives.map((dir) => buildDirectiveArgs(dir, context)) + ) : void 0; + if (propsBuildResult.shouldUseBlock) { + shouldUseBlock = true; + } + } + if (node.children.length > 0) { + if (vnodeTag === KEEP_ALIVE) { + shouldUseBlock = true; + patchFlag |= 1024; + } + const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling + vnodeTag !== TELEPORT && // explained above. + vnodeTag !== KEEP_ALIVE; + if (shouldBuildAsSlots) { + const { slots, hasDynamicSlots } = buildSlots(node, context); + vnodeChildren = slots; + if (hasDynamicSlots) { + patchFlag |= 1024; + } + } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { + const child = node.children[0]; + const type = child.type; + const hasDynamicTextChild = type === 5 || type === 8; + if (hasDynamicTextChild && getConstantType(child, context) === 0) { + patchFlag |= 1; + } + if (hasDynamicTextChild || type === 2) { + vnodeChildren = child; + } else { + vnodeChildren = node.children; + } + } else { + vnodeChildren = node.children; + } + } + if (dynamicPropNames && dynamicPropNames.length) { + vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); + } + node.codegenNode = createVNodeCall( + context, + vnodeTag, + vnodeProps, + vnodeChildren, + patchFlag === 0 ? void 0 : patchFlag, + vnodeDynamicProps, + vnodeDirectives, + !!shouldUseBlock, + false, + isComponent, + node.loc + ); + }; +}; +function resolveComponentType(node, context, ssr = false) { + let { tag } = node; + const isExplicitDynamic = isComponentTag(tag); + const isProp = findProp( + node, + "is", + false, + true + /* allow empty */ + ); + if (isProp) { + if (isExplicitDynamic || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + )) { + let exp; + if (isProp.type === 6) { + exp = isProp.value && createSimpleExpression(isProp.value.content, true); + } else { + exp = isProp.exp; + if (!exp) { + exp = createSimpleExpression(`is`, false, isProp.arg.loc); + { + exp = isProp.exp = processExpression(exp, context); + } + } + } + if (exp) { + return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ + exp + ]); + } + } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { + tag = isProp.value.content.slice(4); + } + } + const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); + if (builtIn) { + if (!ssr) context.helper(builtIn); + return builtIn; + } + { + const fromSetup = resolveSetupReference(tag, context); + if (fromSetup) { + return fromSetup; + } + const dotIndex = tag.indexOf("."); + if (dotIndex > 0) { + const ns = resolveSetupReference(tag.slice(0, dotIndex), context); + if (ns) { + return ns + tag.slice(dotIndex); + } + } + } + if (context.selfName && shared.capitalize(shared.camelize(tag)) === context.selfName) { + context.helper(RESOLVE_COMPONENT); + context.components.add(tag + `__self`); + return toValidAssetId(tag, `component`); + } + context.helper(RESOLVE_COMPONENT); + context.components.add(tag); + return toValidAssetId(tag, `component`); +} +function resolveSetupReference(name, context) { + const bindings = context.bindingMetadata; + if (!bindings || bindings.__isScriptSetup === false) { + return; + } + const camelName = shared.camelize(name); + const PascalName = shared.capitalize(camelName); + const checkType = (type) => { + if (bindings[name] === type) { + return name; + } + if (bindings[camelName] === type) { + return camelName; + } + if (bindings[PascalName] === type) { + return PascalName; + } + }; + const fromConst = checkType("setup-const") || checkType("setup-reactive-const") || checkType("literal-const"); + if (fromConst) { + return context.inline ? ( + // in inline mode, const setup bindings (e.g. imports) can be used as-is + fromConst + ) : `$setup[${JSON.stringify(fromConst)}]`; + } + const fromMaybeRef = checkType("setup-let") || checkType("setup-ref") || checkType("setup-maybe-ref"); + if (fromMaybeRef) { + return context.inline ? ( + // setup scope bindings that may be refs need to be unrefed + `${context.helperString(UNREF)}(${fromMaybeRef})` + ) : `$setup[${JSON.stringify(fromMaybeRef)}]`; + } + const fromProps = checkType("props"); + if (fromProps) { + return `${context.helperString(UNREF)}(${context.inline ? "__props" : "$props"}[${JSON.stringify(fromProps)}])`; + } +} +function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { + const { tag, loc: elementLoc, children } = node; + let properties = []; + const mergeArgs = []; + const runtimeDirectives = []; + const hasChildren = children.length > 0; + let shouldUseBlock = false; + let patchFlag = 0; + let hasRef = false; + let hasClassBinding = false; + let hasStyleBinding = false; + let hasHydrationEventBinding = false; + let hasDynamicKeys = false; + let hasVnodeHook = false; + const dynamicPropNames = []; + const pushMergeArg = (arg) => { + if (properties.length) { + mergeArgs.push( + createObjectExpression(dedupeProperties(properties), elementLoc) + ); + properties = []; + } + if (arg) mergeArgs.push(arg); + }; + const pushRefVForMarker = () => { + if (context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); + } + }; + const analyzePatchFlag = ({ key, value }) => { + if (isStaticExp(key)) { + const name = key.content; + const isEventHandler = shared.isOn(name); + if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click + // dedicated fast path. + name.toLowerCase() !== "onclick" && // omit v-model handlers + name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks + !shared.isReservedProp(name)) { + hasHydrationEventBinding = true; + } + if (isEventHandler && shared.isReservedProp(name)) { + hasVnodeHook = true; + } + if (isEventHandler && value.type === 14) { + value = value.arguments[0]; + } + if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { + return; + } + if (name === "ref") { + hasRef = true; + } else if (name === "class") { + hasClassBinding = true; + } else if (name === "style") { + hasStyleBinding = true; + } else if (name !== "key" && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + } else { + hasDynamicKeys = true; + } + }; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 6) { + const { loc, name, nameLoc, value } = prop; + let isStatic = true; + if (name === "ref") { + hasRef = true; + pushRefVForMarker(); + if (value && context.inline) { + const binding = context.bindingMetadata[value.content]; + if (binding === "setup-let" || binding === "setup-ref" || binding === "setup-maybe-ref") { + isStatic = false; + properties.push( + createObjectProperty( + createSimpleExpression("ref_key", true), + createSimpleExpression(value.content, true, value.loc) + ) + ); + } + } + } + if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + properties.push( + createObjectProperty( + createSimpleExpression(name, true, nameLoc), + createSimpleExpression( + value ? value.content : "", + isStatic, + value ? value.loc : loc + ) + ) + ); + } else { + const { name, arg, exp, loc, modifiers } = prop; + const isVBind = name === "bind"; + const isVOn = name === "on"; + if (name === "slot") { + if (!isComponent) { + context.onError( + createCompilerError(40, loc) + ); + } + continue; + } + if (name === "once" || name === "memo") { + continue; + } + if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + if (isVOn && ssr) { + continue; + } + if ( + // #938: elements with dynamic keys should be forced into blocks + isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked + // before children + isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") + ) { + shouldUseBlock = true; + } + if (isVBind && isStaticArgOf(arg, "ref")) { + pushRefVForMarker(); + } + if (!arg && (isVBind || isVOn)) { + hasDynamicKeys = true; + if (exp) { + if (isVBind) { + pushRefVForMarker(); + pushMergeArg(); + { + if (isCompatEnabled( + "COMPILER_V_BIND_OBJECT_ORDER", + context + )) { + mergeArgs.unshift(exp); + continue; + } + } + mergeArgs.push(exp); + } else { + pushMergeArg({ + type: 14, + loc, + callee: context.helper(TO_HANDLERS), + arguments: isComponent ? [exp] : [exp, `true`] + }); + } + } else { + context.onError( + createCompilerError( + isVBind ? 34 : 35, + loc + ) + ); + } + continue; + } + if (isVBind && modifiers.some((mod) => mod.content === "prop")) { + patchFlag |= 32; + } + const directiveTransform = context.directiveTransforms[name]; + if (directiveTransform) { + const { props: props2, needRuntime } = directiveTransform(prop, node, context); + !ssr && props2.forEach(analyzePatchFlag); + if (isVOn && arg && !isStaticExp(arg)) { + pushMergeArg(createObjectExpression(props2, elementLoc)); + } else { + properties.push(...props2); + } + if (needRuntime) { + runtimeDirectives.push(prop); + if (shared.isSymbol(needRuntime)) { + directiveImportMap.set(prop, needRuntime); + } + } + } else if (!shared.isBuiltInDirective(name)) { + runtimeDirectives.push(prop); + if (hasChildren) { + shouldUseBlock = true; + } + } + } + } + let propsExpression = void 0; + if (mergeArgs.length) { + pushMergeArg(); + if (mergeArgs.length > 1) { + propsExpression = createCallExpression( + context.helper(MERGE_PROPS), + mergeArgs, + elementLoc + ); + } else { + propsExpression = mergeArgs[0]; + } + } else if (properties.length) { + propsExpression = createObjectExpression( + dedupeProperties(properties), + elementLoc + ); + } + if (hasDynamicKeys) { + patchFlag |= 16; + } else { + if (hasClassBinding && !isComponent) { + patchFlag |= 2; + } + if (hasStyleBinding && !isComponent) { + patchFlag |= 4; + } + if (dynamicPropNames.length) { + patchFlag |= 8; + } + if (hasHydrationEventBinding) { + patchFlag |= 32; + } + } + if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { + patchFlag |= 512; + } + if (!context.inSSR && propsExpression) { + switch (propsExpression.type) { + case 15: + let classKeyIndex = -1; + let styleKeyIndex = -1; + let hasDynamicKey = false; + for (let i = 0; i < propsExpression.properties.length; i++) { + const key = propsExpression.properties[i].key; + if (isStaticExp(key)) { + if (key.content === "class") { + classKeyIndex = i; + } else if (key.content === "style") { + styleKeyIndex = i; + } + } else if (!key.isHandlerKey) { + hasDynamicKey = true; + } + } + const classProp = propsExpression.properties[classKeyIndex]; + const styleProp = propsExpression.properties[styleKeyIndex]; + if (!hasDynamicKey) { + if (classProp && !isStaticExp(classProp.value)) { + classProp.value = createCallExpression( + context.helper(NORMALIZE_CLASS), + [classProp.value] + ); + } + if (styleProp && // the static style is compiled into an object, + // so use `hasStyleBinding` to ensure that it is a dynamic style binding + (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, + // v-bind:style with static literal object + styleProp.value.type === 17)) { + styleProp.value = createCallExpression( + context.helper(NORMALIZE_STYLE), + [styleProp.value] + ); + } + } else { + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [propsExpression] + ); + } + break; + case 14: + break; + default: + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [ + createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ + propsExpression + ]) + ] + ); + break; + } + } + return { + props: propsExpression, + directives: runtimeDirectives, + patchFlag, + dynamicPropNames, + shouldUseBlock + }; +} +function dedupeProperties(properties) { + const knownProps = /* @__PURE__ */ new Map(); + const deduped = []; + for (let i = 0; i < properties.length; i++) { + const prop = properties[i]; + if (prop.key.type === 8 || !prop.key.isStatic) { + deduped.push(prop); + continue; + } + const name = prop.key.content; + const existing = knownProps.get(name); + if (existing) { + if (name === "style" || name === "class" || shared.isOn(name)) { + mergeAsArray(existing, prop); + } + } else { + knownProps.set(name, prop); + deduped.push(prop); + } + } + return deduped; +} +function mergeAsArray(existing, incoming) { + if (existing.value.type === 17) { + existing.value.elements.push(incoming.value); + } else { + existing.value = createArrayExpression( + [existing.value, incoming.value], + existing.loc + ); + } +} +function buildDirectiveArgs(dir, context) { + const dirArgs = []; + const runtime = directiveImportMap.get(dir); + if (runtime) { + dirArgs.push(context.helperString(runtime)); + } else { + const fromSetup = resolveSetupReference("v-" + dir.name, context); + if (fromSetup) { + dirArgs.push(fromSetup); + } else { + context.helper(RESOLVE_DIRECTIVE); + context.directives.add(dir.name); + dirArgs.push(toValidAssetId(dir.name, `directive`)); + } + } + const { loc } = dir; + if (dir.exp) dirArgs.push(dir.exp); + if (dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(dir.arg); + } + if (Object.keys(dir.modifiers).length) { + if (!dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(`void 0`); + } + const trueExpression = createSimpleExpression(`true`, false, loc); + dirArgs.push( + createObjectExpression( + dir.modifiers.map( + (modifier) => createObjectProperty(modifier, trueExpression) + ), + loc + ) + ); + } + return createArrayExpression(dirArgs, dir.loc); +} +function stringifyDynamicPropNames(props) { + let propsNamesString = `[`; + for (let i = 0, l = props.length; i < l; i++) { + propsNamesString += JSON.stringify(props[i]); + if (i < l - 1) propsNamesString += ", "; + } + return propsNamesString + `]`; +} +function isComponentTag(tag) { + return tag === "component" || tag === "Component"; +} + +const transformSlotOutlet = (node, context) => { + if (isSlotOutlet(node)) { + const { children, loc } = node; + const { slotName, slotProps } = processSlotOutlet(node, context); + const slotArgs = [ + context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, + slotName, + "{}", + "undefined", + "true" + ]; + let expectedLen = 2; + if (slotProps) { + slotArgs[2] = slotProps; + expectedLen = 3; + } + if (children.length) { + slotArgs[3] = createFunctionExpression([], children, false, false, loc); + expectedLen = 4; + } + if (context.scopeId && !context.slotted) { + expectedLen = 5; + } + slotArgs.splice(expectedLen); + node.codegenNode = createCallExpression( + context.helper(RENDER_SLOT), + slotArgs, + loc + ); + } +}; +function processSlotOutlet(node, context) { + let slotName = `"default"`; + let slotProps = void 0; + const nonNameProps = []; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (p.value) { + if (p.name === "name") { + slotName = JSON.stringify(p.value.content); + } else { + p.name = shared.camelize(p.name); + nonNameProps.push(p); + } + } + } else { + if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { + if (p.exp) { + slotName = p.exp; + } else if (p.arg && p.arg.type === 4) { + const name = shared.camelize(p.arg.content); + slotName = p.exp = createSimpleExpression(name, false, p.arg.loc); + { + slotName = p.exp = processExpression(p.exp, context); + } + } + } else { + if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { + p.arg.content = shared.camelize(p.arg.content); + } + nonNameProps.push(p); + } + } + } + if (nonNameProps.length > 0) { + const { props, directives } = buildProps( + node, + context, + nonNameProps, + false, + false + ); + slotProps = props; + if (directives.length) { + context.onError( + createCompilerError( + 36, + directives[0].loc + ) + ); + } + } + return { + slotName, + slotProps + }; +} + +const transformOn = (dir, node, context, augmentor) => { + const { loc, modifiers, arg } = dir; + if (!dir.exp && !modifiers.length) { + context.onError(createCompilerError(35, loc)); + } + let eventName; + if (arg.type === 4) { + if (arg.isStatic) { + let rawName = arg.content; + if (rawName.startsWith("vue:")) { + rawName = `vnode-${rawName.slice(4)}`; + } + const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( + // for non-element and vnode lifecycle event listeners, auto convert + // it to camelCase. See issue #2249 + shared.toHandlerKey(shared.camelize(rawName)) + ) : ( + // preserve case for plain element listeners that have uppercase + // letters, as these may be custom elements' custom events + `on:${rawName}` + ); + eventName = createSimpleExpression(eventString, true, arg.loc); + } else { + eventName = createCompoundExpression([ + `${context.helperString(TO_HANDLER_KEY)}(`, + arg, + `)` + ]); + } + } else { + eventName = arg; + eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); + eventName.children.push(`)`); + } + let exp = dir.exp; + if (exp && !exp.content.trim()) { + exp = void 0; + } + let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; + if (exp) { + const isMemberExp = isMemberExpression(exp, context); + const isInlineStatement = !(isMemberExp || isFnExpression(exp, context)); + const hasMultipleStatements = exp.content.includes(`;`); + if (context.prefixIdentifiers) { + isInlineStatement && context.addIdentifiers(`$event`); + exp = dir.exp = processExpression( + exp, + context, + false, + hasMultipleStatements + ); + isInlineStatement && context.removeIdentifiers(`$event`); + shouldCache = context.cacheHandlers && // unnecessary to cache inside v-once + !context.inVOnce && // runtime constants don't need to be cached + // (this is analyzed by compileScript in SFC <script setup>) + !(exp.type === 4 && exp.constType > 0) && // #1541 bail if this is a member exp handler passed to a component - + // we need to use the original function to preserve arity, + // e.g. <transition> relies on checking cb.length to determine + // transition end handling. Inline function is ok since its arity + // is preserved even when cached. + !(isMemberExp && node.tagType === 1) && // bail if the function references closure variables (v-for, v-slot) + // it must be passed fresh to avoid stale values. + !hasScopeRef(exp, context.identifiers); + if (shouldCache && isMemberExp) { + if (exp.type === 4) { + exp.content = `${exp.content} && ${exp.content}(...args)`; + } else { + exp.children = [...exp.children, ` && `, ...exp.children, `(...args)`]; + } + } + } + if (isInlineStatement || shouldCache && isMemberExp) { + exp = createCompoundExpression([ + `${isInlineStatement ? context.isTS ? `($event: any)` : `$event` : `${context.isTS ? ` +//@ts-ignore +` : ``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, + exp, + hasMultipleStatements ? `}` : `)` + ]); + } + } + let ret = { + props: [ + createObjectProperty( + eventName, + exp || createSimpleExpression(`() => {}`, false, loc) + ) + ] + }; + if (augmentor) { + ret = augmentor(ret); + } + if (shouldCache) { + ret.props[0].value = context.cache(ret.props[0].value); + } + ret.props.forEach((p) => p.key.isHandlerKey = true); + return ret; +}; + +const transformText = (node, context) => { + if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { + return () => { + const children = node.children; + let currentContainer = void 0; + let hasText = false; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child)) { + hasText = true; + for (let j = i + 1; j < children.length; j++) { + const next = children[j]; + if (isText$1(next)) { + if (!currentContainer) { + currentContainer = children[i] = createCompoundExpression( + [child], + child.loc + ); + } + currentContainer.children.push(` + `, next); + children.splice(j, 1); + j--; + } else { + currentContainer = void 0; + break; + } + } + } + } + if (!hasText || // if this is a plain element with a single text child, leave it + // as-is since the runtime has dedicated fast path for this by directly + // setting textContent of the element. + // for component root it's always normalized anyway. + children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 + // custom directives can potentially add DOM elements arbitrarily, + // we need to avoid setting textContent of the element at runtime + // to avoid accidentally overwriting the DOM elements added + // by the user through custom directives. + !node.props.find( + (p) => p.type === 7 && !context.directiveTransforms[p.name] + ) && // in compat mode, <template> tags with no special directives + // will be rendered as a fragment so its children must be + // converted into vnodes. + !(node.tag === "template"))) { + return; + } + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child) || child.type === 8) { + const callArgs = []; + if (child.type !== 2 || child.content !== " ") { + callArgs.push(child); + } + if (!context.ssr && getConstantType(child, context) === 0) { + callArgs.push( + 1 + (``) + ); + } + children[i] = { + type: 12, + content: child, + loc: child.loc, + codegenNode: createCallExpression( + context.helper(CREATE_TEXT), + callArgs + ) + }; + } + } + }; + } +}; + +const seen$1 = /* @__PURE__ */ new WeakSet(); +const transformOnce = (node, context) => { + if (node.type === 1 && findDir(node, "once", true)) { + if (seen$1.has(node) || context.inVOnce || context.inSSR) { + return; + } + seen$1.add(node); + context.inVOnce = true; + context.helper(SET_BLOCK_TRACKING); + return () => { + context.inVOnce = false; + const cur = context.currentNode; + if (cur.codegenNode) { + cur.codegenNode = context.cache( + cur.codegenNode, + true, + true + ); + } + }; + } +}; + +const transformModel = (dir, node, context) => { + const { exp, arg } = dir; + if (!exp) { + context.onError( + createCompilerError(41, dir.loc) + ); + return createTransformProps(); + } + const rawExp = exp.loc.source.trim(); + const expString = exp.type === 4 ? exp.content : rawExp; + const bindingType = context.bindingMetadata[rawExp]; + if (bindingType === "props" || bindingType === "props-aliased") { + context.onError(createCompilerError(44, exp.loc)); + return createTransformProps(); + } + const maybeRef = context.inline && (bindingType === "setup-let" || bindingType === "setup-ref" || bindingType === "setup-maybe-ref"); + if (!expString.trim() || !isMemberExpression(exp, context) && !maybeRef) { + context.onError( + createCompilerError(42, exp.loc) + ); + return createTransformProps(); + } + if (context.prefixIdentifiers && isSimpleIdentifier(expString) && context.identifiers[expString]) { + context.onError( + createCompilerError(43, exp.loc) + ); + return createTransformProps(); + } + const propName = arg ? arg : createSimpleExpression("modelValue", true); + const eventName = arg ? isStaticExp(arg) ? `onUpdate:${shared.camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; + let assignmentExp; + const eventArg = context.isTS ? `($event: any)` : `$event`; + if (maybeRef) { + if (bindingType === "setup-ref") { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + createSimpleExpression(rawExp, false, exp.loc), + `).value = $event)` + ]); + } else { + const altAssignment = bindingType === "setup-let" ? `${rawExp} = $event` : `null`; + assignmentExp = createCompoundExpression([ + `${eventArg} => (${context.helperString(IS_REF)}(${rawExp}) ? (`, + createSimpleExpression(rawExp, false, exp.loc), + `).value = $event : ${altAssignment})` + ]); + } + } else { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + exp, + `) = $event)` + ]); + } + const props = [ + // modelValue: foo + createObjectProperty(propName, dir.exp), + // "onUpdate:modelValue": $event => (foo = $event) + createObjectProperty(eventName, assignmentExp) + ]; + if (context.prefixIdentifiers && !context.inVOnce && context.cacheHandlers && !hasScopeRef(exp, context.identifiers)) { + props[1].value = context.cache(props[1].value); + } + if (dir.modifiers.length && node.tagType === 1) { + const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); + const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; + props.push( + createObjectProperty( + modifiersKey, + createSimpleExpression( + `{ ${modifiers} }`, + false, + dir.loc, + 2 + ) + ) + ); + } + return createTransformProps(props); +}; +function createTransformProps(props = []) { + return { props }; +} + +const validDivisionCharRE = /[\w).+\-_$\]]/; +const transformFilter = (node, context) => { + if (!isCompatEnabled("COMPILER_FILTERS", context)) { + return; + } + if (node.type === 5) { + rewriteFilter(node.content, context); + } else if (node.type === 1) { + node.props.forEach((prop) => { + if (prop.type === 7 && prop.name !== "for" && prop.exp) { + rewriteFilter(prop.exp, context); + } + }); + } +}; +function rewriteFilter(node, context) { + if (node.type === 4) { + parseFilter(node, context); + } else { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (typeof child !== "object") continue; + if (child.type === 4) { + parseFilter(child, context); + } else if (child.type === 8) { + rewriteFilter(node, context); + } else if (child.type === 5) { + rewriteFilter(child.content, context); + } + } + } +} +function parseFilter(node, context) { + const exp = node.content; + let inSingle = false; + let inDouble = false; + let inTemplateString = false; + let inRegex = false; + let curly = 0; + let square = 0; + let paren = 0; + let lastFilterIndex = 0; + let c, prev, i, expression, filters = []; + for (i = 0; i < exp.length; i++) { + prev = c; + c = exp.charCodeAt(i); + if (inSingle) { + if (c === 39 && prev !== 92) inSingle = false; + } else if (inDouble) { + if (c === 34 && prev !== 92) inDouble = false; + } else if (inTemplateString) { + if (c === 96 && prev !== 92) inTemplateString = false; + } else if (inRegex) { + if (c === 47 && prev !== 92) inRegex = false; + } else if (c === 124 && // pipe + exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) { + if (expression === void 0) { + lastFilterIndex = i + 1; + expression = exp.slice(0, i).trim(); + } else { + pushFilter(); + } + } else { + switch (c) { + case 34: + inDouble = true; + break; + // " + case 39: + inSingle = true; + break; + // ' + case 96: + inTemplateString = true; + break; + // ` + case 40: + paren++; + break; + // ( + case 41: + paren--; + break; + // ) + case 91: + square++; + break; + // [ + case 93: + square--; + break; + // ] + case 123: + curly++; + break; + // { + case 125: + curly--; + break; + } + if (c === 47) { + let j = i - 1; + let p; + for (; j >= 0; j--) { + p = exp.charAt(j); + if (p !== " ") break; + } + if (!p || !validDivisionCharRE.test(p)) { + inRegex = true; + } + } + } + } + if (expression === void 0) { + expression = exp.slice(0, i).trim(); + } else if (lastFilterIndex !== 0) { + pushFilter(); + } + function pushFilter() { + filters.push(exp.slice(lastFilterIndex, i).trim()); + lastFilterIndex = i + 1; + } + if (filters.length) { + for (i = 0; i < filters.length; i++) { + expression = wrapFilter(expression, filters[i], context); + } + node.content = expression; + node.ast = void 0; + } +} +function wrapFilter(exp, filter, context) { + context.helper(RESOLVE_FILTER); + const i = filter.indexOf("("); + if (i < 0) { + context.filters.add(filter); + return `${toValidAssetId(filter, "filter")}(${exp})`; + } else { + const name = filter.slice(0, i); + const args = filter.slice(i + 1); + context.filters.add(name); + return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`; + } +} + +const seen = /* @__PURE__ */ new WeakSet(); +const transformMemo = (node, context) => { + if (node.type === 1) { + const dir = findDir(node, "memo"); + if (!dir || seen.has(node)) { + return; + } + seen.add(node); + return () => { + const codegenNode = node.codegenNode || context.currentNode.codegenNode; + if (codegenNode && codegenNode.type === 13) { + if (node.tagType !== 1) { + convertToBlock(codegenNode, context); + } + node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ + dir.exp, + createFunctionExpression(void 0, codegenNode), + `_cache`, + String(context.cached.length) + ]); + context.cached.push(null); + } + }; + } +}; + +function getBaseTransformPreset(prefixIdentifiers) { + return [ + [ + transformOnce, + transformIf, + transformMemo, + transformFor, + ...[transformFilter] , + ...prefixIdentifiers ? [ + // order is important + trackVForSlotScopes, + transformExpression + ] : [], + transformSlotOutlet, + transformElement, + trackSlotScopes, + transformText + ], + { + on: transformOn, + bind: transformBind, + model: transformModel + } + ]; +} +function baseCompile(source, options = {}) { + const onError = options.onError || defaultOnError; + const isModuleMode = options.mode === "module"; + const prefixIdentifiers = options.prefixIdentifiers === true || isModuleMode; + if (!prefixIdentifiers && options.cacheHandlers) { + onError(createCompilerError(49)); + } + if (options.scopeId && !isModuleMode) { + onError(createCompilerError(50)); + } + const resolvedOptions = shared.extend({}, options, { + prefixIdentifiers + }); + const ast = shared.isString(source) ? baseParse(source, resolvedOptions) : source; + const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(prefixIdentifiers); + if (options.isTS) { + const { expressionPlugins } = options; + if (!expressionPlugins || !expressionPlugins.includes("typescript")) { + options.expressionPlugins = [...expressionPlugins || [], "typescript"]; + } + } + transform( + ast, + shared.extend({}, resolvedOptions, { + nodeTransforms: [ + ...nodeTransforms, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: shared.extend( + {}, + directiveTransforms, + options.directiveTransforms || {} + // user transforms + ) + }) + ); + return generate(ast, resolvedOptions); +} + +const BindingTypes = { + "DATA": "data", + "PROPS": "props", + "PROPS_ALIASED": "props-aliased", + "SETUP_LET": "setup-let", + "SETUP_CONST": "setup-const", + "SETUP_REACTIVE_CONST": "setup-reactive-const", + "SETUP_MAYBE_REF": "setup-maybe-ref", + "SETUP_REF": "setup-ref", + "OPTIONS": "options", + "LITERAL_CONST": "literal-const" +}; + +const noopDirectiveTransform = () => ({ props: [] }); + +exports.generateCodeFrame = shared.generateCodeFrame; +exports.BASE_TRANSITION = BASE_TRANSITION; +exports.BindingTypes = BindingTypes; +exports.CAMELIZE = CAMELIZE; +exports.CAPITALIZE = CAPITALIZE; +exports.CREATE_BLOCK = CREATE_BLOCK; +exports.CREATE_COMMENT = CREATE_COMMENT; +exports.CREATE_ELEMENT_BLOCK = CREATE_ELEMENT_BLOCK; +exports.CREATE_ELEMENT_VNODE = CREATE_ELEMENT_VNODE; +exports.CREATE_SLOTS = CREATE_SLOTS; +exports.CREATE_STATIC = CREATE_STATIC; +exports.CREATE_TEXT = CREATE_TEXT; +exports.CREATE_VNODE = CREATE_VNODE; +exports.CompilerDeprecationTypes = CompilerDeprecationTypes; +exports.ConstantTypes = ConstantTypes; +exports.ElementTypes = ElementTypes; +exports.ErrorCodes = ErrorCodes; +exports.FRAGMENT = FRAGMENT; +exports.GUARD_REACTIVE_PROPS = GUARD_REACTIVE_PROPS; +exports.IS_MEMO_SAME = IS_MEMO_SAME; +exports.IS_REF = IS_REF; +exports.KEEP_ALIVE = KEEP_ALIVE; +exports.MERGE_PROPS = MERGE_PROPS; +exports.NORMALIZE_CLASS = NORMALIZE_CLASS; +exports.NORMALIZE_PROPS = NORMALIZE_PROPS; +exports.NORMALIZE_STYLE = NORMALIZE_STYLE; +exports.Namespaces = Namespaces; +exports.NodeTypes = NodeTypes; +exports.OPEN_BLOCK = OPEN_BLOCK; +exports.POP_SCOPE_ID = POP_SCOPE_ID; +exports.PUSH_SCOPE_ID = PUSH_SCOPE_ID; +exports.RENDER_LIST = RENDER_LIST; +exports.RENDER_SLOT = RENDER_SLOT; +exports.RESOLVE_COMPONENT = RESOLVE_COMPONENT; +exports.RESOLVE_DIRECTIVE = RESOLVE_DIRECTIVE; +exports.RESOLVE_DYNAMIC_COMPONENT = RESOLVE_DYNAMIC_COMPONENT; +exports.RESOLVE_FILTER = RESOLVE_FILTER; +exports.SET_BLOCK_TRACKING = SET_BLOCK_TRACKING; +exports.SUSPENSE = SUSPENSE; +exports.TELEPORT = TELEPORT; +exports.TO_DISPLAY_STRING = TO_DISPLAY_STRING; +exports.TO_HANDLERS = TO_HANDLERS; +exports.TO_HANDLER_KEY = TO_HANDLER_KEY; +exports.TS_NODE_TYPES = TS_NODE_TYPES; +exports.UNREF = UNREF; +exports.WITH_CTX = WITH_CTX; +exports.WITH_DIRECTIVES = WITH_DIRECTIVES; +exports.WITH_MEMO = WITH_MEMO; +exports.advancePositionWithClone = advancePositionWithClone; +exports.advancePositionWithMutation = advancePositionWithMutation; +exports.assert = assert; +exports.baseCompile = baseCompile; +exports.baseParse = baseParse; +exports.buildDirectiveArgs = buildDirectiveArgs; +exports.buildProps = buildProps; +exports.buildSlots = buildSlots; +exports.checkCompatEnabled = checkCompatEnabled; +exports.convertToBlock = convertToBlock; +exports.createArrayExpression = createArrayExpression; +exports.createAssignmentExpression = createAssignmentExpression; +exports.createBlockStatement = createBlockStatement; +exports.createCacheExpression = createCacheExpression; +exports.createCallExpression = createCallExpression; +exports.createCompilerError = createCompilerError; +exports.createCompoundExpression = createCompoundExpression; +exports.createConditionalExpression = createConditionalExpression; +exports.createForLoopParams = createForLoopParams; +exports.createFunctionExpression = createFunctionExpression; +exports.createIfStatement = createIfStatement; +exports.createInterpolation = createInterpolation; +exports.createObjectExpression = createObjectExpression; +exports.createObjectProperty = createObjectProperty; +exports.createReturnStatement = createReturnStatement; +exports.createRoot = createRoot; +exports.createSequenceExpression = createSequenceExpression; +exports.createSimpleExpression = createSimpleExpression; +exports.createStructuralDirectiveTransform = createStructuralDirectiveTransform; +exports.createTemplateLiteral = createTemplateLiteral; +exports.createTransformContext = createTransformContext; +exports.createVNodeCall = createVNodeCall; +exports.errorMessages = errorMessages; +exports.extractIdentifiers = extractIdentifiers; +exports.findDir = findDir; +exports.findProp = findProp; +exports.forAliasRE = forAliasRE; +exports.generate = generate; +exports.getBaseTransformPreset = getBaseTransformPreset; +exports.getConstantType = getConstantType; +exports.getMemoedVNodeCall = getMemoedVNodeCall; +exports.getVNodeBlockHelper = getVNodeBlockHelper; +exports.getVNodeHelper = getVNodeHelper; +exports.hasDynamicKeyVBind = hasDynamicKeyVBind; +exports.hasScopeRef = hasScopeRef; +exports.helperNameMap = helperNameMap; +exports.injectProp = injectProp; +exports.isCoreComponent = isCoreComponent; +exports.isFnExpression = isFnExpression; +exports.isFnExpressionBrowser = isFnExpressionBrowser; +exports.isFnExpressionNode = isFnExpressionNode; +exports.isFunctionType = isFunctionType; +exports.isInDestructureAssignment = isInDestructureAssignment; +exports.isInNewExpression = isInNewExpression; +exports.isMemberExpression = isMemberExpression; +exports.isMemberExpressionBrowser = isMemberExpressionBrowser; +exports.isMemberExpressionNode = isMemberExpressionNode; +exports.isReferencedIdentifier = isReferencedIdentifier; +exports.isSimpleIdentifier = isSimpleIdentifier; +exports.isSlotOutlet = isSlotOutlet; +exports.isStaticArgOf = isStaticArgOf; +exports.isStaticExp = isStaticExp; +exports.isStaticProperty = isStaticProperty; +exports.isStaticPropertyKey = isStaticPropertyKey; +exports.isTemplateNode = isTemplateNode; +exports.isText = isText$1; +exports.isVSlot = isVSlot; +exports.locStub = locStub; +exports.noopDirectiveTransform = noopDirectiveTransform; +exports.processExpression = processExpression; +exports.processFor = processFor; +exports.processIf = processIf; +exports.processSlotOutlet = processSlotOutlet; +exports.registerRuntimeHelpers = registerRuntimeHelpers; +exports.resolveComponentType = resolveComponentType; +exports.stringifyExpression = stringifyExpression; +exports.toValidAssetId = toValidAssetId; +exports.trackSlotScopes = trackSlotScopes; +exports.trackVForSlotScopes = trackVForSlotScopes; +exports.transform = transform; +exports.transformBind = transformBind; +exports.transformElement = transformElement; +exports.transformExpression = transformExpression; +exports.transformModel = transformModel; +exports.transformOn = transformOn; +exports.traverseNode = traverseNode; +exports.unwrapTSNode = unwrapTSNode; +exports.walkBlockDeclarations = walkBlockDeclarations; +exports.walkFunctionParams = walkFunctionParams; +exports.walkIdentifiers = walkIdentifiers; +exports.warnDeprecation = warnDeprecation; diff --git a/vuetest/node_modules/@vue/compiler-core/dist/compiler-core.d.ts b/vuetest/node_modules/@vue/compiler-core/dist/compiler-core.d.ts new file mode 100644 index 0000000..9795cad --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-core/dist/compiler-core.d.ts @@ -0,0 +1,1091 @@ +import { PatchFlags } from '@vue/shared'; +export { generateCodeFrame } from '@vue/shared'; +import { Node as Node$1, Identifier, Function, BlockStatement as BlockStatement$1, Program, ObjectProperty } from '@babel/types'; +import { ParserPlugin } from '@babel/parser'; + +export declare const FRAGMENT: unique symbol; +export declare const TELEPORT: unique symbol; +export declare const SUSPENSE: unique symbol; +export declare const KEEP_ALIVE: unique symbol; +export declare const BASE_TRANSITION: unique symbol; +export declare const OPEN_BLOCK: unique symbol; +export declare const CREATE_BLOCK: unique symbol; +export declare const CREATE_ELEMENT_BLOCK: unique symbol; +export declare const CREATE_VNODE: unique symbol; +export declare const CREATE_ELEMENT_VNODE: unique symbol; +export declare const CREATE_COMMENT: unique symbol; +export declare const CREATE_TEXT: unique symbol; +export declare const CREATE_STATIC: unique symbol; +export declare const RESOLVE_COMPONENT: unique symbol; +export declare const RESOLVE_DYNAMIC_COMPONENT: unique symbol; +export declare const RESOLVE_DIRECTIVE: unique symbol; +export declare const RESOLVE_FILTER: unique symbol; +export declare const WITH_DIRECTIVES: unique symbol; +export declare const RENDER_LIST: unique symbol; +export declare const RENDER_SLOT: unique symbol; +export declare const CREATE_SLOTS: unique symbol; +export declare const TO_DISPLAY_STRING: unique symbol; +export declare const MERGE_PROPS: unique symbol; +export declare const NORMALIZE_CLASS: unique symbol; +export declare const NORMALIZE_STYLE: unique symbol; +export declare const NORMALIZE_PROPS: unique symbol; +export declare const GUARD_REACTIVE_PROPS: unique symbol; +export declare const TO_HANDLERS: unique symbol; +export declare const CAMELIZE: unique symbol; +export declare const CAPITALIZE: unique symbol; +export declare const TO_HANDLER_KEY: unique symbol; +export declare const SET_BLOCK_TRACKING: unique symbol; +/** + * @deprecated no longer needed in 3.5+ because we no longer hoist element nodes + * but kept for backwards compat + */ +export declare const PUSH_SCOPE_ID: unique symbol; +/** + * @deprecated kept for backwards compat + */ +export declare const POP_SCOPE_ID: unique symbol; +export declare const WITH_CTX: unique symbol; +export declare const UNREF: unique symbol; +export declare const IS_REF: unique symbol; +export declare const WITH_MEMO: unique symbol; +export declare const IS_MEMO_SAME: unique symbol; +export declare const helperNameMap: Record<symbol, string>; +export declare function registerRuntimeHelpers(helpers: Record<symbol, string>): void; + +type OptionalOptions = 'decodeEntities' | 'whitespace' | 'isNativeTag' | 'isBuiltInComponent' | 'expressionPlugins' | keyof CompilerCompatOptions; +type MergedParserOptions = Omit<Required<ParserOptions>, OptionalOptions> & Pick<ParserOptions, OptionalOptions>; +export declare function baseParse(input: string, options?: ParserOptions): RootNode; + +type CompilerCompatConfig = Partial<Record<CompilerDeprecationTypes, boolean | 'suppress-warning'>> & { + MODE?: 2 | 3; +}; +interface CompilerCompatOptions { + compatConfig?: CompilerCompatConfig; +} +export declare enum CompilerDeprecationTypes { + COMPILER_IS_ON_ELEMENT = "COMPILER_IS_ON_ELEMENT", + COMPILER_V_BIND_SYNC = "COMPILER_V_BIND_SYNC", + COMPILER_V_BIND_OBJECT_ORDER = "COMPILER_V_BIND_OBJECT_ORDER", + COMPILER_V_ON_NATIVE = "COMPILER_V_ON_NATIVE", + COMPILER_V_IF_V_FOR_PRECEDENCE = "COMPILER_V_IF_V_FOR_PRECEDENCE", + COMPILER_NATIVE_TEMPLATE = "COMPILER_NATIVE_TEMPLATE", + COMPILER_INLINE_TEMPLATE = "COMPILER_INLINE_TEMPLATE", + COMPILER_FILTERS = "COMPILER_FILTERS" +} +export declare function checkCompatEnabled(key: CompilerDeprecationTypes, context: MergedParserOptions | TransformContext, loc: SourceLocation | null, ...args: any[]): boolean; +export declare function warnDeprecation(key: CompilerDeprecationTypes, context: MergedParserOptions | TransformContext, loc: SourceLocation | null, ...args: any[]): void; + +export type NodeTransform = (node: RootNode | TemplateChildNode, context: TransformContext) => void | (() => void) | (() => void)[]; +export type DirectiveTransform = (dir: DirectiveNode, node: ElementNode, context: TransformContext, augmentor?: (ret: DirectiveTransformResult) => DirectiveTransformResult) => DirectiveTransformResult; +interface DirectiveTransformResult { + props: Property[]; + needRuntime?: boolean | symbol; + ssrTagParts?: TemplateLiteral['elements']; +} +export type StructuralDirectiveTransform = (node: ElementNode, dir: DirectiveNode, context: TransformContext) => void | (() => void); +interface ImportItem { + exp: string | ExpressionNode; + path: string; +} +export interface TransformContext extends Required<Omit<TransformOptions, keyof CompilerCompatOptions>>, CompilerCompatOptions { + selfName: string | null; + root: RootNode; + helpers: Map<symbol, number>; + components: Set<string>; + directives: Set<string>; + hoists: (JSChildNode | null)[]; + imports: ImportItem[]; + temps: number; + cached: (CacheExpression | null)[]; + identifiers: { + [name: string]: number | undefined; + }; + scopes: { + vFor: number; + vSlot: number; + vPre: number; + vOnce: number; + }; + parent: ParentNode | null; + grandParent: ParentNode | null; + childIndex: number; + currentNode: RootNode | TemplateChildNode | null; + inVOnce: boolean; + helper<T extends symbol>(name: T): T; + removeHelper<T extends symbol>(name: T): void; + helperString(name: symbol): string; + replaceNode(node: TemplateChildNode): void; + removeNode(node?: TemplateChildNode): void; + onNodeRemoved(): void; + addIdentifiers(exp: ExpressionNode | string): void; + removeIdentifiers(exp: ExpressionNode | string): void; + hoist(exp: string | JSChildNode | ArrayExpression): SimpleExpressionNode; + cache(exp: JSChildNode, isVNode?: boolean, inVOnce?: boolean): CacheExpression; + constantCache: WeakMap<TemplateChildNode, ConstantTypes>; + filters?: Set<string>; +} +export declare function createTransformContext(root: RootNode, { filename, prefixIdentifiers, hoistStatic, hmr, cacheHandlers, nodeTransforms, directiveTransforms, transformHoist, isBuiltInComponent, isCustomElement, expressionPlugins, scopeId, slotted, ssr, inSSR, ssrCssVars, bindingMetadata, inline, isTS, onError, onWarn, compatConfig, }: TransformOptions): TransformContext; +export declare function transform(root: RootNode, options: TransformOptions): void; +export declare function traverseNode(node: RootNode | TemplateChildNode, context: TransformContext): void; +export declare function createStructuralDirectiveTransform(name: string | RegExp, fn: StructuralDirectiveTransform): NodeTransform; + +export declare const transformElement: NodeTransform; +export declare function resolveComponentType(node: ComponentNode, context: TransformContext, ssr?: boolean): string | symbol | CallExpression; +export type PropsExpression = ObjectExpression | CallExpression | ExpressionNode; +export declare function buildProps(node: ElementNode, context: TransformContext, props: ElementNode['props'] | undefined, isComponent: boolean, isDynamicComponent: boolean, ssr?: boolean): { + props: PropsExpression | undefined; + directives: DirectiveNode[]; + patchFlag: number; + dynamicPropNames: string[]; + shouldUseBlock: boolean; +}; +export declare function buildDirectiveArgs(dir: DirectiveNode, context: TransformContext): ArrayExpression; + +export type Namespace = number; +export declare enum Namespaces { + HTML = 0, + SVG = 1, + MATH_ML = 2 +} +export declare enum NodeTypes { + ROOT = 0, + ELEMENT = 1, + TEXT = 2, + COMMENT = 3, + SIMPLE_EXPRESSION = 4, + INTERPOLATION = 5, + ATTRIBUTE = 6, + DIRECTIVE = 7, + COMPOUND_EXPRESSION = 8, + IF = 9, + IF_BRANCH = 10, + FOR = 11, + TEXT_CALL = 12, + VNODE_CALL = 13, + JS_CALL_EXPRESSION = 14, + JS_OBJECT_EXPRESSION = 15, + JS_PROPERTY = 16, + JS_ARRAY_EXPRESSION = 17, + JS_FUNCTION_EXPRESSION = 18, + JS_CONDITIONAL_EXPRESSION = 19, + JS_CACHE_EXPRESSION = 20, + JS_BLOCK_STATEMENT = 21, + JS_TEMPLATE_LITERAL = 22, + JS_IF_STATEMENT = 23, + JS_ASSIGNMENT_EXPRESSION = 24, + JS_SEQUENCE_EXPRESSION = 25, + JS_RETURN_STATEMENT = 26 +} +export declare enum ElementTypes { + ELEMENT = 0, + COMPONENT = 1, + SLOT = 2, + TEMPLATE = 3 +} +export interface Node { + type: NodeTypes; + loc: SourceLocation; +} +export interface SourceLocation { + start: Position; + end: Position; + source: string; +} +export interface Position { + offset: number; + line: number; + column: number; +} +export type ParentNode = RootNode | ElementNode | IfBranchNode | ForNode; +export type ExpressionNode = SimpleExpressionNode | CompoundExpressionNode; +export type TemplateChildNode = ElementNode | InterpolationNode | CompoundExpressionNode | TextNode | CommentNode | IfNode | IfBranchNode | ForNode | TextCallNode; +export interface RootNode extends Node { + type: NodeTypes.ROOT; + source: string; + children: TemplateChildNode[]; + helpers: Set<symbol>; + components: string[]; + directives: string[]; + hoists: (JSChildNode | null)[]; + imports: ImportItem[]; + cached: (CacheExpression | null)[]; + temps: number; + ssrHelpers?: symbol[]; + codegenNode?: TemplateChildNode | JSChildNode | BlockStatement; + transformed?: boolean; + filters?: string[]; +} +export type ElementNode = PlainElementNode | ComponentNode | SlotOutletNode | TemplateNode; +export interface BaseElementNode extends Node { + type: NodeTypes.ELEMENT; + ns: Namespace; + tag: string; + tagType: ElementTypes; + props: Array<AttributeNode | DirectiveNode>; + children: TemplateChildNode[]; + isSelfClosing?: boolean; + innerLoc?: SourceLocation; +} +export interface PlainElementNode extends BaseElementNode { + tagType: ElementTypes.ELEMENT; + codegenNode: VNodeCall | SimpleExpressionNode | CacheExpression | MemoExpression | undefined; + ssrCodegenNode?: TemplateLiteral; +} +export interface ComponentNode extends BaseElementNode { + tagType: ElementTypes.COMPONENT; + codegenNode: VNodeCall | CacheExpression | MemoExpression | undefined; + ssrCodegenNode?: CallExpression; +} +export interface SlotOutletNode extends BaseElementNode { + tagType: ElementTypes.SLOT; + codegenNode: RenderSlotCall | CacheExpression | undefined; + ssrCodegenNode?: CallExpression; +} +export interface TemplateNode extends BaseElementNode { + tagType: ElementTypes.TEMPLATE; + codegenNode: undefined; +} +export interface TextNode extends Node { + type: NodeTypes.TEXT; + content: string; +} +export interface CommentNode extends Node { + type: NodeTypes.COMMENT; + content: string; +} +export interface AttributeNode extends Node { + type: NodeTypes.ATTRIBUTE; + name: string; + nameLoc: SourceLocation; + value: TextNode | undefined; +} +export interface DirectiveNode extends Node { + type: NodeTypes.DIRECTIVE; + /** + * the normalized name without prefix or shorthands, e.g. "bind", "on" + */ + name: string; + /** + * the raw attribute name, preserving shorthand, and including arg & modifiers + * this is only used during parse. + */ + rawName?: string; + exp: ExpressionNode | undefined; + arg: ExpressionNode | undefined; + modifiers: SimpleExpressionNode[]; + /** + * optional property to cache the expression parse result for v-for + */ + forParseResult?: ForParseResult; +} +/** + * Static types have several levels. + * Higher levels implies lower levels. e.g. a node that can be stringified + * can always be hoisted and skipped for patch. + */ +export declare enum ConstantTypes { + NOT_CONSTANT = 0, + CAN_SKIP_PATCH = 1, + CAN_CACHE = 2, + CAN_STRINGIFY = 3 +} +export interface SimpleExpressionNode extends Node { + type: NodeTypes.SIMPLE_EXPRESSION; + content: string; + isStatic: boolean; + constType: ConstantTypes; + /** + * - `null` means the expression is a simple identifier that doesn't need + * parsing + * - `false` means there was a parsing error + */ + ast?: Node$1 | null | false; + /** + * Indicates this is an identifier for a hoist vnode call and points to the + * hoisted node. + */ + hoisted?: JSChildNode; + /** + * an expression parsed as the params of a function will track + * the identifiers declared inside the function body. + */ + identifiers?: string[]; + isHandlerKey?: boolean; +} +export interface InterpolationNode extends Node { + type: NodeTypes.INTERPOLATION; + content: ExpressionNode; +} +export interface CompoundExpressionNode extends Node { + type: NodeTypes.COMPOUND_EXPRESSION; + /** + * - `null` means the expression is a simple identifier that doesn't need + * parsing + * - `false` means there was a parsing error + */ + ast?: Node$1 | null | false; + children: (SimpleExpressionNode | CompoundExpressionNode | InterpolationNode | TextNode | string | symbol)[]; + /** + * an expression parsed as the params of a function will track + * the identifiers declared inside the function body. + */ + identifiers?: string[]; + isHandlerKey?: boolean; +} +export interface IfNode extends Node { + type: NodeTypes.IF; + branches: IfBranchNode[]; + codegenNode?: IfConditionalExpression | CacheExpression; +} +export interface IfBranchNode extends Node { + type: NodeTypes.IF_BRANCH; + condition: ExpressionNode | undefined; + children: TemplateChildNode[]; + userKey?: AttributeNode | DirectiveNode; + isTemplateIf?: boolean; +} +export interface ForNode extends Node { + type: NodeTypes.FOR; + source: ExpressionNode; + valueAlias: ExpressionNode | undefined; + keyAlias: ExpressionNode | undefined; + objectIndexAlias: ExpressionNode | undefined; + parseResult: ForParseResult; + children: TemplateChildNode[]; + codegenNode?: ForCodegenNode; +} +export interface ForParseResult { + source: ExpressionNode; + value: ExpressionNode | undefined; + key: ExpressionNode | undefined; + index: ExpressionNode | undefined; + finalized: boolean; +} +export interface TextCallNode extends Node { + type: NodeTypes.TEXT_CALL; + content: TextNode | InterpolationNode | CompoundExpressionNode; + codegenNode: CallExpression | SimpleExpressionNode; +} +export type TemplateTextChildNode = TextNode | InterpolationNode | CompoundExpressionNode; +export interface VNodeCall extends Node { + type: NodeTypes.VNODE_CALL; + tag: string | symbol | CallExpression; + props: PropsExpression | undefined; + children: TemplateChildNode[] | TemplateTextChildNode | SlotsExpression | ForRenderListExpression | SimpleExpressionNode | CacheExpression | undefined; + patchFlag: PatchFlags | undefined; + dynamicProps: string | SimpleExpressionNode | undefined; + directives: DirectiveArguments | undefined; + isBlock: boolean; + disableTracking: boolean; + isComponent: boolean; +} +export type JSChildNode = VNodeCall | CallExpression | ObjectExpression | ArrayExpression | ExpressionNode | FunctionExpression | ConditionalExpression | CacheExpression | AssignmentExpression | SequenceExpression; +export interface CallExpression extends Node { + type: NodeTypes.JS_CALL_EXPRESSION; + callee: string | symbol; + arguments: (string | symbol | JSChildNode | SSRCodegenNode | TemplateChildNode | TemplateChildNode[])[]; +} +export interface ObjectExpression extends Node { + type: NodeTypes.JS_OBJECT_EXPRESSION; + properties: Array<Property>; +} +export interface Property extends Node { + type: NodeTypes.JS_PROPERTY; + key: ExpressionNode; + value: JSChildNode; +} +export interface ArrayExpression extends Node { + type: NodeTypes.JS_ARRAY_EXPRESSION; + elements: Array<string | Node>; +} +export interface FunctionExpression extends Node { + type: NodeTypes.JS_FUNCTION_EXPRESSION; + params: ExpressionNode | string | (ExpressionNode | string)[] | undefined; + returns?: TemplateChildNode | TemplateChildNode[] | JSChildNode; + body?: BlockStatement | IfStatement; + newline: boolean; + /** + * This flag is for codegen to determine whether it needs to generate the + * withScopeId() wrapper + */ + isSlot: boolean; + /** + * __COMPAT__ only, indicates a slot function that should be excluded from + * the legacy $scopedSlots instance property. + */ + isNonScopedSlot?: boolean; +} +export interface ConditionalExpression extends Node { + type: NodeTypes.JS_CONDITIONAL_EXPRESSION; + test: JSChildNode; + consequent: JSChildNode; + alternate: JSChildNode; + newline: boolean; +} +export interface CacheExpression extends Node { + type: NodeTypes.JS_CACHE_EXPRESSION; + index: number; + value: JSChildNode; + needPauseTracking: boolean; + inVOnce: boolean; + needArraySpread: boolean; +} +export interface MemoExpression extends CallExpression { + callee: typeof WITH_MEMO; + arguments: [ExpressionNode, MemoFactory, string, string]; +} +interface MemoFactory extends FunctionExpression { + returns: BlockCodegenNode; +} +export type SSRCodegenNode = BlockStatement | TemplateLiteral | IfStatement | AssignmentExpression | ReturnStatement | SequenceExpression; +export interface BlockStatement extends Node { + type: NodeTypes.JS_BLOCK_STATEMENT; + body: (JSChildNode | IfStatement)[]; +} +export interface TemplateLiteral extends Node { + type: NodeTypes.JS_TEMPLATE_LITERAL; + elements: (string | JSChildNode)[]; +} +export interface IfStatement extends Node { + type: NodeTypes.JS_IF_STATEMENT; + test: ExpressionNode; + consequent: BlockStatement; + alternate: IfStatement | BlockStatement | ReturnStatement | undefined; +} +export interface AssignmentExpression extends Node { + type: NodeTypes.JS_ASSIGNMENT_EXPRESSION; + left: SimpleExpressionNode; + right: JSChildNode; +} +export interface SequenceExpression extends Node { + type: NodeTypes.JS_SEQUENCE_EXPRESSION; + expressions: JSChildNode[]; +} +export interface ReturnStatement extends Node { + type: NodeTypes.JS_RETURN_STATEMENT; + returns: TemplateChildNode | TemplateChildNode[] | JSChildNode; +} +export interface DirectiveArguments extends ArrayExpression { + elements: DirectiveArgumentNode[]; +} +export interface DirectiveArgumentNode extends ArrayExpression { + elements: [string] | [string, ExpressionNode] | [string, ExpressionNode, ExpressionNode] | [string, ExpressionNode, ExpressionNode, ObjectExpression]; +} +export interface RenderSlotCall extends CallExpression { + callee: typeof RENDER_SLOT; + arguments: [string, string | ExpressionNode] | [string, string | ExpressionNode, PropsExpression] | [ + string, + string | ExpressionNode, + PropsExpression | '{}', + TemplateChildNode[] + ]; +} +export type SlotsExpression = SlotsObjectExpression | DynamicSlotsExpression; +export interface SlotsObjectExpression extends ObjectExpression { + properties: SlotsObjectProperty[]; +} +export interface SlotsObjectProperty extends Property { + value: SlotFunctionExpression; +} +export interface SlotFunctionExpression extends FunctionExpression { + returns: TemplateChildNode[] | CacheExpression; +} +export interface DynamicSlotsExpression extends CallExpression { + callee: typeof CREATE_SLOTS; + arguments: [SlotsObjectExpression, DynamicSlotEntries]; +} +export interface DynamicSlotEntries extends ArrayExpression { + elements: (ConditionalDynamicSlotNode | ListDynamicSlotNode)[]; +} +export interface ConditionalDynamicSlotNode extends ConditionalExpression { + consequent: DynamicSlotNode; + alternate: DynamicSlotNode | SimpleExpressionNode; +} +export interface ListDynamicSlotNode extends CallExpression { + callee: typeof RENDER_LIST; + arguments: [ExpressionNode, ListDynamicSlotIterator]; +} +export interface ListDynamicSlotIterator extends FunctionExpression { + returns: DynamicSlotNode; +} +export interface DynamicSlotNode extends ObjectExpression { + properties: [Property, DynamicSlotFnProperty]; +} +export interface DynamicSlotFnProperty extends Property { + value: SlotFunctionExpression; +} +export type BlockCodegenNode = VNodeCall | RenderSlotCall; +export interface IfConditionalExpression extends ConditionalExpression { + consequent: BlockCodegenNode | MemoExpression; + alternate: BlockCodegenNode | IfConditionalExpression | MemoExpression; +} +export interface ForCodegenNode extends VNodeCall { + isBlock: true; + tag: typeof FRAGMENT; + props: undefined; + children: ForRenderListExpression; + patchFlag: PatchFlags; + disableTracking: boolean; +} +export interface ForRenderListExpression extends CallExpression { + callee: typeof RENDER_LIST; + arguments: [ExpressionNode, ForIteratorExpression]; +} +export interface ForIteratorExpression extends FunctionExpression { + returns?: BlockCodegenNode; +} +export declare const locStub: SourceLocation; +export declare function createRoot(children: TemplateChildNode[], source?: string): RootNode; +export declare function createVNodeCall(context: TransformContext | null, tag: VNodeCall['tag'], props?: VNodeCall['props'], children?: VNodeCall['children'], patchFlag?: VNodeCall['patchFlag'], dynamicProps?: VNodeCall['dynamicProps'], directives?: VNodeCall['directives'], isBlock?: VNodeCall['isBlock'], disableTracking?: VNodeCall['disableTracking'], isComponent?: VNodeCall['isComponent'], loc?: SourceLocation): VNodeCall; +export declare function createArrayExpression(elements: ArrayExpression['elements'], loc?: SourceLocation): ArrayExpression; +export declare function createObjectExpression(properties: ObjectExpression['properties'], loc?: SourceLocation): ObjectExpression; +export declare function createObjectProperty(key: Property['key'] | string, value: Property['value']): Property; +export declare function createSimpleExpression(content: SimpleExpressionNode['content'], isStatic?: SimpleExpressionNode['isStatic'], loc?: SourceLocation, constType?: ConstantTypes): SimpleExpressionNode; +export declare function createInterpolation(content: InterpolationNode['content'] | string, loc: SourceLocation): InterpolationNode; +export declare function createCompoundExpression(children: CompoundExpressionNode['children'], loc?: SourceLocation): CompoundExpressionNode; +type InferCodegenNodeType<T> = T extends typeof RENDER_SLOT ? RenderSlotCall : CallExpression; +export declare function createCallExpression<T extends CallExpression['callee']>(callee: T, args?: CallExpression['arguments'], loc?: SourceLocation): InferCodegenNodeType<T>; +export declare function createFunctionExpression(params: FunctionExpression['params'], returns?: FunctionExpression['returns'], newline?: boolean, isSlot?: boolean, loc?: SourceLocation): FunctionExpression; +export declare function createConditionalExpression(test: ConditionalExpression['test'], consequent: ConditionalExpression['consequent'], alternate: ConditionalExpression['alternate'], newline?: boolean): ConditionalExpression; +export declare function createCacheExpression(index: number, value: JSChildNode, needPauseTracking?: boolean, inVOnce?: boolean): CacheExpression; +export declare function createBlockStatement(body: BlockStatement['body']): BlockStatement; +export declare function createTemplateLiteral(elements: TemplateLiteral['elements']): TemplateLiteral; +export declare function createIfStatement(test: IfStatement['test'], consequent: IfStatement['consequent'], alternate?: IfStatement['alternate']): IfStatement; +export declare function createAssignmentExpression(left: AssignmentExpression['left'], right: AssignmentExpression['right']): AssignmentExpression; +export declare function createSequenceExpression(expressions: SequenceExpression['expressions']): SequenceExpression; +export declare function createReturnStatement(returns: ReturnStatement['returns']): ReturnStatement; +export declare function getVNodeHelper(ssr: boolean, isComponent: boolean): typeof CREATE_VNODE | typeof CREATE_ELEMENT_VNODE; +export declare function getVNodeBlockHelper(ssr: boolean, isComponent: boolean): typeof CREATE_BLOCK | typeof CREATE_ELEMENT_BLOCK; +export declare function convertToBlock(node: VNodeCall, { helper, removeHelper, inSSR }: TransformContext): void; + +export interface CompilerError extends SyntaxError { + code: number | string; + loc?: SourceLocation; +} +export interface CoreCompilerError extends CompilerError { + code: ErrorCodes; +} +type InferCompilerError<T> = T extends ErrorCodes ? CoreCompilerError : CompilerError; +export declare function createCompilerError<T extends number>(code: T, loc?: SourceLocation, messages?: { + [code: number]: string; +}, additionalMessage?: string): InferCompilerError<T>; +export declare enum ErrorCodes { + ABRUPT_CLOSING_OF_EMPTY_COMMENT = 0, + CDATA_IN_HTML_CONTENT = 1, + DUPLICATE_ATTRIBUTE = 2, + END_TAG_WITH_ATTRIBUTES = 3, + END_TAG_WITH_TRAILING_SOLIDUS = 4, + EOF_BEFORE_TAG_NAME = 5, + EOF_IN_CDATA = 6, + EOF_IN_COMMENT = 7, + EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT = 8, + EOF_IN_TAG = 9, + INCORRECTLY_CLOSED_COMMENT = 10, + INCORRECTLY_OPENED_COMMENT = 11, + INVALID_FIRST_CHARACTER_OF_TAG_NAME = 12, + MISSING_ATTRIBUTE_VALUE = 13, + MISSING_END_TAG_NAME = 14, + MISSING_WHITESPACE_BETWEEN_ATTRIBUTES = 15, + NESTED_COMMENT = 16, + UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME = 17, + UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE = 18, + UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME = 19, + UNEXPECTED_NULL_CHARACTER = 20, + UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME = 21, + UNEXPECTED_SOLIDUS_IN_TAG = 22, + X_INVALID_END_TAG = 23, + X_MISSING_END_TAG = 24, + X_MISSING_INTERPOLATION_END = 25, + X_MISSING_DIRECTIVE_NAME = 26, + X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END = 27, + X_V_IF_NO_EXPRESSION = 28, + X_V_IF_SAME_KEY = 29, + X_V_ELSE_NO_ADJACENT_IF = 30, + X_V_FOR_NO_EXPRESSION = 31, + X_V_FOR_MALFORMED_EXPRESSION = 32, + X_V_FOR_TEMPLATE_KEY_PLACEMENT = 33, + X_V_BIND_NO_EXPRESSION = 34, + X_V_ON_NO_EXPRESSION = 35, + X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET = 36, + X_V_SLOT_MIXED_SLOT_USAGE = 37, + X_V_SLOT_DUPLICATE_SLOT_NAMES = 38, + X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN = 39, + X_V_SLOT_MISPLACED = 40, + X_V_MODEL_NO_EXPRESSION = 41, + X_V_MODEL_MALFORMED_EXPRESSION = 42, + X_V_MODEL_ON_SCOPE_VARIABLE = 43, + X_V_MODEL_ON_PROPS = 44, + X_INVALID_EXPRESSION = 45, + X_KEEP_ALIVE_INVALID_CHILDREN = 46, + X_PREFIX_ID_NOT_SUPPORTED = 47, + X_MODULE_MODE_NOT_SUPPORTED = 48, + X_CACHE_HANDLER_NOT_SUPPORTED = 49, + X_SCOPE_ID_NOT_SUPPORTED = 50, + X_VNODE_HOOKS = 51, + X_V_BIND_INVALID_SAME_NAME_ARGUMENT = 52, + __EXTEND_POINT__ = 53 +} +export declare const errorMessages: Record<ErrorCodes, string>; + +interface ErrorHandlingOptions { + onWarn?: (warning: CompilerError) => void; + onError?: (error: CompilerError) => void; +} +export interface ParserOptions extends ErrorHandlingOptions, CompilerCompatOptions { + /** + * Base mode is platform agnostic and only parses HTML-like template syntax, + * treating all tags the same way. Specific tag parsing behavior can be + * configured by higher-level compilers. + * + * HTML mode adds additional logic for handling special parsing behavior in + * `<script>`, `<style>`,`<title>` and `<textarea>`. + * The logic is handled inside compiler-core for efficiency. + * + * SFC mode treats content of all root-level tags except `<template>` as plain + * text. + */ + parseMode?: 'base' | 'html' | 'sfc'; + /** + * Specify the root namespace to use when parsing a template. + * Defaults to `Namespaces.HTML` (0). + */ + ns?: Namespaces; + /** + * e.g. platform native elements, e.g. `<div>` for browsers + */ + isNativeTag?: (tag: string) => boolean; + /** + * e.g. native elements that can self-close, e.g. `<img>`, `<br>`, `<hr>` + */ + isVoidTag?: (tag: string) => boolean; + /** + * e.g. elements that should preserve whitespace inside, e.g. `<pre>` + */ + isPreTag?: (tag: string) => boolean; + /** + * Elements that should ignore the first newline token per parinsg spec + * e.g. `<textarea>` and `<pre>` + */ + isIgnoreNewlineTag?: (tag: string) => boolean; + /** + * Platform-specific built-in components e.g. `<Transition>` + */ + isBuiltInComponent?: (tag: string) => symbol | void; + /** + * Separate option for end users to extend the native elements list + */ + isCustomElement?: (tag: string) => boolean | void; + /** + * Get tag namespace + */ + getNamespace?: (tag: string, parent: ElementNode | undefined, rootNamespace: Namespace) => Namespace; + /** + * @default ['{{', '}}'] + */ + delimiters?: [string, string]; + /** + * Whitespace handling strategy + * @default 'condense' + */ + whitespace?: 'preserve' | 'condense'; + /** + * Only used for DOM compilers that runs in the browser. + * In non-browser builds, this option is ignored. + */ + decodeEntities?: (rawText: string, asAttr: boolean) => string; + /** + * Whether to keep comments in the templates AST. + * This defaults to `true` in development and `false` in production builds. + */ + comments?: boolean; + /** + * Parse JavaScript expressions with Babel. + * @default false + */ + prefixIdentifiers?: boolean; + /** + * A list of parser plugins to enable for `@babel/parser`, which is used to + * parse expressions in bindings and interpolations. + * https://babeljs.io/docs/en/next/babel-parser#plugins + */ + expressionPlugins?: ParserPlugin[]; +} +export type HoistTransform = (children: TemplateChildNode[], context: TransformContext, parent: ParentNode) => void; +export declare enum BindingTypes { + /** + * returned from data() + */ + DATA = "data", + /** + * declared as a prop + */ + PROPS = "props", + /** + * a local alias of a `<script setup>` destructured prop. + * the original is stored in __propsAliases of the bindingMetadata object. + */ + PROPS_ALIASED = "props-aliased", + /** + * a let binding (may or may not be a ref) + */ + SETUP_LET = "setup-let", + /** + * a const binding that can never be a ref. + * these bindings don't need `unref()` calls when processed in inlined + * template expressions. + */ + SETUP_CONST = "setup-const", + /** + * a const binding that does not need `unref()`, but may be mutated. + */ + SETUP_REACTIVE_CONST = "setup-reactive-const", + /** + * a const binding that may be a ref. + */ + SETUP_MAYBE_REF = "setup-maybe-ref", + /** + * bindings that are guaranteed to be refs + */ + SETUP_REF = "setup-ref", + /** + * declared by other options, e.g. computed, inject + */ + OPTIONS = "options", + /** + * a literal constant, e.g. 'foo', 1, true + */ + LITERAL_CONST = "literal-const" +} +export type BindingMetadata = { + [key: string]: BindingTypes | undefined; +} & { + __isScriptSetup?: boolean; + __propsAliases?: Record<string, string>; +}; +interface SharedTransformCodegenOptions { + /** + * Transform expressions like {{ foo }} to `_ctx.foo`. + * If this option is false, the generated code will be wrapped in a + * `with (this) { ... }` block. + * - This is force-enabled in module mode, since modules are by default strict + * and cannot use `with` + * @default mode === 'module' + */ + prefixIdentifiers?: boolean; + /** + * Control whether generate SSR-optimized render functions instead. + * The resulting function must be attached to the component via the + * `ssrRender` option instead of `render`. + * + * When compiler generates code for SSR's fallback branch, we need to set it to false: + * - context.ssr = false + * + * see `subTransform` in `ssrTransformComponent.ts` + */ + ssr?: boolean; + /** + * Indicates whether the compiler generates code for SSR, + * it is always true when generating code for SSR, + * regardless of whether we are generating code for SSR's fallback branch, + * this means that when the compiler generates code for SSR's fallback branch: + * - context.ssr = false + * - context.inSSR = true + */ + inSSR?: boolean; + /** + * Optional binding metadata analyzed from script - used to optimize + * binding access when `prefixIdentifiers` is enabled. + */ + bindingMetadata?: BindingMetadata; + /** + * Compile the function for inlining inside setup(). + * This allows the function to directly access setup() local bindings. + */ + inline?: boolean; + /** + * Indicates that transforms and codegen should try to output valid TS code + */ + isTS?: boolean; + /** + * Filename for source map generation. + * Also used for self-recursive reference in templates + * @default 'template.vue.html' + */ + filename?: string; +} +export interface TransformOptions extends SharedTransformCodegenOptions, ErrorHandlingOptions, CompilerCompatOptions { + /** + * An array of node transforms to be applied to every AST node. + */ + nodeTransforms?: NodeTransform[]; + /** + * An object of { name: transform } to be applied to every directive attribute + * node found on element nodes. + */ + directiveTransforms?: Record<string, DirectiveTransform | undefined>; + /** + * An optional hook to transform a node being hoisted. + * used by compiler-dom to turn hoisted nodes into stringified HTML vnodes. + * @default null + */ + transformHoist?: HoistTransform | null; + /** + * If the pairing runtime provides additional built-in elements, use this to + * mark them as built-in so the compiler will generate component vnodes + * for them. + */ + isBuiltInComponent?: (tag: string) => symbol | void; + /** + * Used by some transforms that expects only native elements + */ + isCustomElement?: (tag: string) => boolean | void; + /** + * Transform expressions like {{ foo }} to `_ctx.foo`. + * If this option is false, the generated code will be wrapped in a + * `with (this) { ... }` block. + * - This is force-enabled in module mode, since modules are by default strict + * and cannot use `with` + * @default mode === 'module' + */ + prefixIdentifiers?: boolean; + /** + * Cache static VNodes and props objects to `_hoisted_x` constants + * @default false + */ + hoistStatic?: boolean; + /** + * Cache v-on handlers to avoid creating new inline functions on each render, + * also avoids the need for dynamically patching the handlers by wrapping it. + * e.g `@click="foo"` by default is compiled to `{ onClick: foo }`. With this + * option it's compiled to: + * ```js + * { onClick: _cache[0] || (_cache[0] = e => _ctx.foo(e)) } + * ``` + * - Requires "prefixIdentifiers" to be enabled because it relies on scope + * analysis to determine if a handler is safe to cache. + * @default false + */ + cacheHandlers?: boolean; + /** + * A list of parser plugins to enable for `@babel/parser`, which is used to + * parse expressions in bindings and interpolations. + * https://babeljs.io/docs/en/next/babel-parser#plugins + */ + expressionPlugins?: ParserPlugin[]; + /** + * SFC scoped styles ID + */ + scopeId?: string | null; + /** + * Indicates this SFC template has used :slotted in its styles + * Defaults to `true` for backwards compatibility - SFC tooling should set it + * to `false` if no `:slotted` usage is detected in `<style>` + */ + slotted?: boolean; + /** + * SFC `<style vars>` injection string + * Should already be an object expression, e.g. `{ 'xxxx-color': color }` + * needed to render inline CSS variables on component root + */ + ssrCssVars?: string; + /** + * Whether to compile the template assuming it needs to handle HMR. + * Some edge cases may need to generate different code for HMR to work + * correctly, e.g. #6938, #7138 + */ + hmr?: boolean; +} +export interface CodegenOptions extends SharedTransformCodegenOptions { + /** + * - `module` mode will generate ES module import statements for helpers + * and export the render function as the default export. + * - `function` mode will generate a single `const { helpers... } = Vue` + * statement and return the render function. It expects `Vue` to be globally + * available (or passed by wrapping the code with an IIFE). It is meant to be + * used with `new Function(code)()` to generate a render function at runtime. + * @default 'function' + */ + mode?: 'module' | 'function'; + /** + * Generate source map? + * @default false + */ + sourceMap?: boolean; + /** + * SFC scoped styles ID + */ + scopeId?: string | null; + /** + * Option to optimize helper import bindings via variable assignment + * (only used for webpack code-split) + * @default false + */ + optimizeImports?: boolean; + /** + * Customize where to import runtime helpers from. + * @default 'vue' + */ + runtimeModuleName?: string; + /** + * Customize where to import ssr runtime helpers from/** + * @default 'vue/server-renderer' + */ + ssrRuntimeModuleName?: string; + /** + * Customize the global variable name of `Vue` to get helpers from + * in function mode + * @default 'Vue' + */ + runtimeGlobalName?: string; +} +export type CompilerOptions = ParserOptions & TransformOptions & CodegenOptions; + +/** + * The `SourceMapGenerator` type from `source-map-js` is a bit incomplete as it + * misses `toJSON()`. We also need to add types for internal properties which we + * need to access for better performance. + * + * Since TS 5.3, dts generation starts to strangely include broken triple slash + * references for source-map-js, so we are inlining all source map related types + * here to to workaround that. + */ +export interface CodegenSourceMapGenerator { + setSourceContent(sourceFile: string, sourceContent: string): void; + toJSON(): RawSourceMap; + _sources: Set<string>; + _names: Set<string>; + _mappings: { + add(mapping: MappingItem): void; + }; +} +export interface RawSourceMap { + file?: string; + sourceRoot?: string; + version: string; + sources: string[]; + names: string[]; + sourcesContent?: string[]; + mappings: string; +} +interface MappingItem { + source: string; + generatedLine: number; + generatedColumn: number; + originalLine: number; + originalColumn: number; + name: string | null; +} +type CodegenNode = TemplateChildNode | JSChildNode | SSRCodegenNode; +export interface CodegenResult { + code: string; + preamble: string; + ast: RootNode; + map?: RawSourceMap; +} +export interface CodegenContext extends Omit<Required<CodegenOptions>, 'bindingMetadata' | 'inline'> { + source: string; + code: string; + line: number; + column: number; + offset: number; + indentLevel: number; + pure: boolean; + map?: CodegenSourceMapGenerator; + helper(key: symbol): string; + push(code: string, newlineIndex?: number, node?: CodegenNode): void; + indent(): void; + deindent(withoutNewLine?: boolean): void; + newline(): void; +} +export declare function generate(ast: RootNode, options?: CodegenOptions & { + onContextCreated?: (context: CodegenContext) => void; +}): CodegenResult; + +export type TransformPreset = [ + NodeTransform[], + Record<string, DirectiveTransform> +]; +export declare function getBaseTransformPreset(prefixIdentifiers?: boolean): TransformPreset; +export declare function baseCompile(source: string | RootNode, options?: CompilerOptions): CodegenResult; + +export declare const isStaticExp: (p: JSChildNode) => p is SimpleExpressionNode; +export declare function isCoreComponent(tag: string): symbol | void; +export declare const isSimpleIdentifier: (name: string) => boolean; +/** + * Simple lexer to check if an expression is a member expression. This is + * lax and only checks validity at the root level (i.e. does not validate exps + * inside square brackets), but it's ok since these are only used on template + * expressions and false positives are invalid expressions in the first place. + */ +export declare const isMemberExpressionBrowser: (exp: ExpressionNode) => boolean; +export declare const isMemberExpressionNode: (exp: ExpressionNode, context: TransformContext) => boolean; +export declare const isMemberExpression: (exp: ExpressionNode, context: TransformContext) => boolean; +export declare const isFnExpressionBrowser: (exp: ExpressionNode) => boolean; +export declare const isFnExpressionNode: (exp: ExpressionNode, context: TransformContext) => boolean; +export declare const isFnExpression: (exp: ExpressionNode, context: TransformContext) => boolean; +export declare function advancePositionWithClone(pos: Position, source: string, numberOfCharacters?: number): Position; +export declare function advancePositionWithMutation(pos: Position, source: string, numberOfCharacters?: number): Position; +export declare function assert(condition: boolean, msg?: string): void; +export declare function findDir(node: ElementNode, name: string | RegExp, allowEmpty?: boolean): DirectiveNode | undefined; +export declare function findProp(node: ElementNode, name: string, dynamicOnly?: boolean, allowEmpty?: boolean): ElementNode['props'][0] | undefined; +export declare function isStaticArgOf(arg: DirectiveNode['arg'], name: string): boolean; +export declare function hasDynamicKeyVBind(node: ElementNode): boolean; +export declare function isText(node: TemplateChildNode): node is TextNode | InterpolationNode; +export declare function isVSlot(p: ElementNode['props'][0]): p is DirectiveNode; +export declare function isTemplateNode(node: RootNode | TemplateChildNode): node is TemplateNode; +export declare function isSlotOutlet(node: RootNode | TemplateChildNode): node is SlotOutletNode; +export declare function injectProp(node: VNodeCall | RenderSlotCall, prop: Property, context: TransformContext): void; +export declare function toValidAssetId(name: string, type: 'component' | 'directive' | 'filter'): string; +export declare function hasScopeRef(node: TemplateChildNode | IfBranchNode | ExpressionNode | CacheExpression | undefined, ids: TransformContext['identifiers']): boolean; +export declare function getMemoedVNodeCall(node: BlockCodegenNode | MemoExpression): VNodeCall | RenderSlotCall; +export declare const forAliasRE: RegExp; + +/** + * Return value indicates whether the AST walked can be a constant + */ +export declare function walkIdentifiers(root: Node$1, onIdentifier: (node: Identifier, parent: Node$1 | null, parentStack: Node$1[], isReference: boolean, isLocal: boolean) => void, includeAll?: boolean, parentStack?: Node$1[], knownIds?: Record<string, number>): void; +export declare function isReferencedIdentifier(id: Identifier, parent: Node$1 | null, parentStack: Node$1[]): boolean; +export declare function isInDestructureAssignment(parent: Node$1, parentStack: Node$1[]): boolean; +export declare function isInNewExpression(parentStack: Node$1[]): boolean; +export declare function walkFunctionParams(node: Function, onIdent: (id: Identifier) => void): void; +export declare function walkBlockDeclarations(block: BlockStatement$1 | Program, onIdent: (node: Identifier) => void): void; +export declare function extractIdentifiers(param: Node$1, nodes?: Identifier[]): Identifier[]; +export declare const isFunctionType: (node: Node$1) => node is Function; +export declare const isStaticProperty: (node: Node$1) => node is ObjectProperty; +export declare const isStaticPropertyKey: (node: Node$1, parent: Node$1) => boolean; +export declare const TS_NODE_TYPES: string[]; +export declare function unwrapTSNode(node: Node$1): Node$1; + +export declare const transformModel: DirectiveTransform; + +export declare const transformOn: DirectiveTransform; + +export declare const transformBind: DirectiveTransform; + +export declare const noopDirectiveTransform: DirectiveTransform; + +export declare function processIf(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (node: IfNode, branch: IfBranchNode, isRoot: boolean) => (() => void) | undefined): (() => void) | undefined; + +export declare function processFor(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (forNode: ForNode) => (() => void) | undefined): (() => void) | undefined; +export declare function createForLoopParams({ value, key, index }: ForParseResult, memoArgs?: ExpressionNode[]): ExpressionNode[]; + +export declare const transformExpression: NodeTransform; +export declare function processExpression(node: SimpleExpressionNode, context: TransformContext, asParams?: boolean, asRawStatements?: boolean, localVars?: Record<string, number>): ExpressionNode; +export declare function stringifyExpression(exp: ExpressionNode | string): string; + +export declare const trackSlotScopes: NodeTransform; +export declare const trackVForSlotScopes: NodeTransform; +export type SlotFnBuilder = (slotProps: ExpressionNode | undefined, vFor: DirectiveNode | undefined, slotChildren: TemplateChildNode[], loc: SourceLocation) => FunctionExpression; +export declare function buildSlots(node: ElementNode, context: TransformContext, buildSlotFn?: SlotFnBuilder): { + slots: SlotsExpression; + hasDynamicSlots: boolean; +}; + +interface SlotOutletProcessResult { + slotName: string | ExpressionNode; + slotProps: PropsExpression | undefined; +} +export declare function processSlotOutlet(node: SlotOutletNode, context: TransformContext): SlotOutletProcessResult; + +export declare function getConstantType(node: TemplateChildNode | SimpleExpressionNode | CacheExpression, context: TransformContext): ConstantTypes; + diff --git a/vuetest/node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js b/vuetest/node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js new file mode 100644 index 0000000..8da200e --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js @@ -0,0 +1,5790 @@ +/** +* @vue/compiler-core v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +import { isString, NOOP, isObject, NO, extend, isSymbol, isArray, capitalize, camelize, EMPTY_OBJ, PatchFlagNames, slotFlagsText, isOn, isBuiltInDirective, isReservedProp, toHandlerKey } from '@vue/shared'; +export { generateCodeFrame } from '@vue/shared'; + +const FRAGMENT = Symbol(!!(process.env.NODE_ENV !== "production") ? `Fragment` : ``); +const TELEPORT = Symbol(!!(process.env.NODE_ENV !== "production") ? `Teleport` : ``); +const SUSPENSE = Symbol(!!(process.env.NODE_ENV !== "production") ? `Suspense` : ``); +const KEEP_ALIVE = Symbol(!!(process.env.NODE_ENV !== "production") ? `KeepAlive` : ``); +const BASE_TRANSITION = Symbol( + !!(process.env.NODE_ENV !== "production") ? `BaseTransition` : `` +); +const OPEN_BLOCK = Symbol(!!(process.env.NODE_ENV !== "production") ? `openBlock` : ``); +const CREATE_BLOCK = Symbol(!!(process.env.NODE_ENV !== "production") ? `createBlock` : ``); +const CREATE_ELEMENT_BLOCK = Symbol( + !!(process.env.NODE_ENV !== "production") ? `createElementBlock` : `` +); +const CREATE_VNODE = Symbol(!!(process.env.NODE_ENV !== "production") ? `createVNode` : ``); +const CREATE_ELEMENT_VNODE = Symbol( + !!(process.env.NODE_ENV !== "production") ? `createElementVNode` : `` +); +const CREATE_COMMENT = Symbol( + !!(process.env.NODE_ENV !== "production") ? `createCommentVNode` : `` +); +const CREATE_TEXT = Symbol( + !!(process.env.NODE_ENV !== "production") ? `createTextVNode` : `` +); +const CREATE_STATIC = Symbol( + !!(process.env.NODE_ENV !== "production") ? `createStaticVNode` : `` +); +const RESOLVE_COMPONENT = Symbol( + !!(process.env.NODE_ENV !== "production") ? `resolveComponent` : `` +); +const RESOLVE_DYNAMIC_COMPONENT = Symbol( + !!(process.env.NODE_ENV !== "production") ? `resolveDynamicComponent` : `` +); +const RESOLVE_DIRECTIVE = Symbol( + !!(process.env.NODE_ENV !== "production") ? `resolveDirective` : `` +); +const RESOLVE_FILTER = Symbol( + !!(process.env.NODE_ENV !== "production") ? `resolveFilter` : `` +); +const WITH_DIRECTIVES = Symbol( + !!(process.env.NODE_ENV !== "production") ? `withDirectives` : `` +); +const RENDER_LIST = Symbol(!!(process.env.NODE_ENV !== "production") ? `renderList` : ``); +const RENDER_SLOT = Symbol(!!(process.env.NODE_ENV !== "production") ? `renderSlot` : ``); +const CREATE_SLOTS = Symbol(!!(process.env.NODE_ENV !== "production") ? `createSlots` : ``); +const TO_DISPLAY_STRING = Symbol( + !!(process.env.NODE_ENV !== "production") ? `toDisplayString` : `` +); +const MERGE_PROPS = Symbol(!!(process.env.NODE_ENV !== "production") ? `mergeProps` : ``); +const NORMALIZE_CLASS = Symbol( + !!(process.env.NODE_ENV !== "production") ? `normalizeClass` : `` +); +const NORMALIZE_STYLE = Symbol( + !!(process.env.NODE_ENV !== "production") ? `normalizeStyle` : `` +); +const NORMALIZE_PROPS = Symbol( + !!(process.env.NODE_ENV !== "production") ? `normalizeProps` : `` +); +const GUARD_REACTIVE_PROPS = Symbol( + !!(process.env.NODE_ENV !== "production") ? `guardReactiveProps` : `` +); +const TO_HANDLERS = Symbol(!!(process.env.NODE_ENV !== "production") ? `toHandlers` : ``); +const CAMELIZE = Symbol(!!(process.env.NODE_ENV !== "production") ? `camelize` : ``); +const CAPITALIZE = Symbol(!!(process.env.NODE_ENV !== "production") ? `capitalize` : ``); +const TO_HANDLER_KEY = Symbol( + !!(process.env.NODE_ENV !== "production") ? `toHandlerKey` : `` +); +const SET_BLOCK_TRACKING = Symbol( + !!(process.env.NODE_ENV !== "production") ? `setBlockTracking` : `` +); +const PUSH_SCOPE_ID = Symbol(!!(process.env.NODE_ENV !== "production") ? `pushScopeId` : ``); +const POP_SCOPE_ID = Symbol(!!(process.env.NODE_ENV !== "production") ? `popScopeId` : ``); +const WITH_CTX = Symbol(!!(process.env.NODE_ENV !== "production") ? `withCtx` : ``); +const UNREF = Symbol(!!(process.env.NODE_ENV !== "production") ? `unref` : ``); +const IS_REF = Symbol(!!(process.env.NODE_ENV !== "production") ? `isRef` : ``); +const WITH_MEMO = Symbol(!!(process.env.NODE_ENV !== "production") ? `withMemo` : ``); +const IS_MEMO_SAME = Symbol(!!(process.env.NODE_ENV !== "production") ? `isMemoSame` : ``); +const helperNameMap = { + [FRAGMENT]: `Fragment`, + [TELEPORT]: `Teleport`, + [SUSPENSE]: `Suspense`, + [KEEP_ALIVE]: `KeepAlive`, + [BASE_TRANSITION]: `BaseTransition`, + [OPEN_BLOCK]: `openBlock`, + [CREATE_BLOCK]: `createBlock`, + [CREATE_ELEMENT_BLOCK]: `createElementBlock`, + [CREATE_VNODE]: `createVNode`, + [CREATE_ELEMENT_VNODE]: `createElementVNode`, + [CREATE_COMMENT]: `createCommentVNode`, + [CREATE_TEXT]: `createTextVNode`, + [CREATE_STATIC]: `createStaticVNode`, + [RESOLVE_COMPONENT]: `resolveComponent`, + [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, + [RESOLVE_DIRECTIVE]: `resolveDirective`, + [RESOLVE_FILTER]: `resolveFilter`, + [WITH_DIRECTIVES]: `withDirectives`, + [RENDER_LIST]: `renderList`, + [RENDER_SLOT]: `renderSlot`, + [CREATE_SLOTS]: `createSlots`, + [TO_DISPLAY_STRING]: `toDisplayString`, + [MERGE_PROPS]: `mergeProps`, + [NORMALIZE_CLASS]: `normalizeClass`, + [NORMALIZE_STYLE]: `normalizeStyle`, + [NORMALIZE_PROPS]: `normalizeProps`, + [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, + [TO_HANDLERS]: `toHandlers`, + [CAMELIZE]: `camelize`, + [CAPITALIZE]: `capitalize`, + [TO_HANDLER_KEY]: `toHandlerKey`, + [SET_BLOCK_TRACKING]: `setBlockTracking`, + [PUSH_SCOPE_ID]: `pushScopeId`, + [POP_SCOPE_ID]: `popScopeId`, + [WITH_CTX]: `withCtx`, + [UNREF]: `unref`, + [IS_REF]: `isRef`, + [WITH_MEMO]: `withMemo`, + [IS_MEMO_SAME]: `isMemoSame` +}; +function registerRuntimeHelpers(helpers) { + Object.getOwnPropertySymbols(helpers).forEach((s) => { + helperNameMap[s] = helpers[s]; + }); +} + +const Namespaces = { + "HTML": 0, + "0": "HTML", + "SVG": 1, + "1": "SVG", + "MATH_ML": 2, + "2": "MATH_ML" +}; +const NodeTypes = { + "ROOT": 0, + "0": "ROOT", + "ELEMENT": 1, + "1": "ELEMENT", + "TEXT": 2, + "2": "TEXT", + "COMMENT": 3, + "3": "COMMENT", + "SIMPLE_EXPRESSION": 4, + "4": "SIMPLE_EXPRESSION", + "INTERPOLATION": 5, + "5": "INTERPOLATION", + "ATTRIBUTE": 6, + "6": "ATTRIBUTE", + "DIRECTIVE": 7, + "7": "DIRECTIVE", + "COMPOUND_EXPRESSION": 8, + "8": "COMPOUND_EXPRESSION", + "IF": 9, + "9": "IF", + "IF_BRANCH": 10, + "10": "IF_BRANCH", + "FOR": 11, + "11": "FOR", + "TEXT_CALL": 12, + "12": "TEXT_CALL", + "VNODE_CALL": 13, + "13": "VNODE_CALL", + "JS_CALL_EXPRESSION": 14, + "14": "JS_CALL_EXPRESSION", + "JS_OBJECT_EXPRESSION": 15, + "15": "JS_OBJECT_EXPRESSION", + "JS_PROPERTY": 16, + "16": "JS_PROPERTY", + "JS_ARRAY_EXPRESSION": 17, + "17": "JS_ARRAY_EXPRESSION", + "JS_FUNCTION_EXPRESSION": 18, + "18": "JS_FUNCTION_EXPRESSION", + "JS_CONDITIONAL_EXPRESSION": 19, + "19": "JS_CONDITIONAL_EXPRESSION", + "JS_CACHE_EXPRESSION": 20, + "20": "JS_CACHE_EXPRESSION", + "JS_BLOCK_STATEMENT": 21, + "21": "JS_BLOCK_STATEMENT", + "JS_TEMPLATE_LITERAL": 22, + "22": "JS_TEMPLATE_LITERAL", + "JS_IF_STATEMENT": 23, + "23": "JS_IF_STATEMENT", + "JS_ASSIGNMENT_EXPRESSION": 24, + "24": "JS_ASSIGNMENT_EXPRESSION", + "JS_SEQUENCE_EXPRESSION": 25, + "25": "JS_SEQUENCE_EXPRESSION", + "JS_RETURN_STATEMENT": 26, + "26": "JS_RETURN_STATEMENT" +}; +const ElementTypes = { + "ELEMENT": 0, + "0": "ELEMENT", + "COMPONENT": 1, + "1": "COMPONENT", + "SLOT": 2, + "2": "SLOT", + "TEMPLATE": 3, + "3": "TEMPLATE" +}; +const ConstantTypes = { + "NOT_CONSTANT": 0, + "0": "NOT_CONSTANT", + "CAN_SKIP_PATCH": 1, + "1": "CAN_SKIP_PATCH", + "CAN_CACHE": 2, + "2": "CAN_CACHE", + "CAN_STRINGIFY": 3, + "3": "CAN_STRINGIFY" +}; +const locStub = { + start: { line: 1, column: 1, offset: 0 }, + end: { line: 1, column: 1, offset: 0 }, + source: "" +}; +function createRoot(children, source = "") { + return { + type: 0, + source, + children, + helpers: /* @__PURE__ */ new Set(), + components: [], + directives: [], + hoists: [], + imports: [], + cached: [], + temps: 0, + codegenNode: void 0, + loc: locStub + }; +} +function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) { + if (context) { + if (isBlock) { + context.helper(OPEN_BLOCK); + context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); + } else { + context.helper(getVNodeHelper(context.inSSR, isComponent)); + } + if (directives) { + context.helper(WITH_DIRECTIVES); + } + } + return { + type: 13, + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent, + loc + }; +} +function createArrayExpression(elements, loc = locStub) { + return { + type: 17, + loc, + elements + }; +} +function createObjectExpression(properties, loc = locStub) { + return { + type: 15, + loc, + properties + }; +} +function createObjectProperty(key, value) { + return { + type: 16, + loc: locStub, + key: isString(key) ? createSimpleExpression(key, true) : key, + value + }; +} +function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { + return { + type: 4, + loc, + content, + isStatic, + constType: isStatic ? 3 : constType + }; +} +function createInterpolation(content, loc) { + return { + type: 5, + loc, + content: isString(content) ? createSimpleExpression(content, false, loc) : content + }; +} +function createCompoundExpression(children, loc = locStub) { + return { + type: 8, + loc, + children + }; +} +function createCallExpression(callee, args = [], loc = locStub) { + return { + type: 14, + loc, + callee, + arguments: args + }; +} +function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { + return { + type: 18, + params, + returns, + newline, + isSlot, + loc + }; +} +function createConditionalExpression(test, consequent, alternate, newline = true) { + return { + type: 19, + test, + consequent, + alternate, + newline, + loc: locStub + }; +} +function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) { + return { + type: 20, + index, + value, + needPauseTracking, + inVOnce, + needArraySpread: false, + loc: locStub + }; +} +function createBlockStatement(body) { + return { + type: 21, + body, + loc: locStub + }; +} +function createTemplateLiteral(elements) { + return { + type: 22, + elements, + loc: locStub + }; +} +function createIfStatement(test, consequent, alternate) { + return { + type: 23, + test, + consequent, + alternate, + loc: locStub + }; +} +function createAssignmentExpression(left, right) { + return { + type: 24, + left, + right, + loc: locStub + }; +} +function createSequenceExpression(expressions) { + return { + type: 25, + expressions, + loc: locStub + }; +} +function createReturnStatement(returns) { + return { + type: 26, + returns, + loc: locStub + }; +} +function getVNodeHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; +} +function getVNodeBlockHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; +} +function convertToBlock(node, { helper, removeHelper, inSSR }) { + if (!node.isBlock) { + node.isBlock = true; + removeHelper(getVNodeHelper(inSSR, node.isComponent)); + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(inSSR, node.isComponent)); + } +} + +const defaultDelimitersOpen = new Uint8Array([123, 123]); +const defaultDelimitersClose = new Uint8Array([125, 125]); +function isTagStartChar(c) { + return c >= 97 && c <= 122 || c >= 65 && c <= 90; +} +function isWhitespace(c) { + return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; +} +function isEndOfTagSection(c) { + return c === 47 || c === 62 || isWhitespace(c); +} +function toCharCodes(str) { + const ret = new Uint8Array(str.length); + for (let i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret; +} +const Sequences = { + Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), + // CDATA[ + CdataEnd: new Uint8Array([93, 93, 62]), + // ]]> + CommentEnd: new Uint8Array([45, 45, 62]), + // `-->` + ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), + // `<\/script` + StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), + // `</style` + TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), + // `</title` + TextareaEnd: new Uint8Array([ + 60, + 47, + 116, + 101, + 120, + 116, + 97, + 114, + 101, + 97 + ]) + // `</textarea +}; +class Tokenizer { + constructor(stack, cbs) { + this.stack = stack; + this.cbs = cbs; + /** The current state the tokenizer is in. */ + this.state = 1; + /** The read buffer. */ + this.buffer = ""; + /** The beginning of the section that is currently being read. */ + this.sectionStart = 0; + /** The index within the buffer that we are currently looking at. */ + this.index = 0; + /** The start of the last entity. */ + this.entityStart = 0; + /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ + this.baseState = 1; + /** For special parsing behavior inside of script and style tags. */ + this.inRCDATA = false; + /** For disabling RCDATA tags handling */ + this.inXML = false; + /** For disabling interpolation parsing in v-pre */ + this.inVPre = false; + /** Record newline positions for fast line / column calculation */ + this.newlines = []; + this.mode = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + this.delimiterIndex = -1; + this.currentSequence = void 0; + this.sequenceIndex = 0; + } + get inSFCRoot() { + return this.mode === 2 && this.stack.length === 0; + } + reset() { + this.state = 1; + this.mode = 0; + this.buffer = ""; + this.sectionStart = 0; + this.index = 0; + this.baseState = 1; + this.inRCDATA = false; + this.currentSequence = void 0; + this.newlines.length = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + } + /** + * Generate Position object with line / column information using recorded + * newline positions. We know the index is always going to be an already + * processed index, so all the newlines up to this index should have been + * recorded. + */ + getPos(index) { + let line = 1; + let column = index + 1; + for (let i = this.newlines.length - 1; i >= 0; i--) { + const newlineIndex = this.newlines[i]; + if (index > newlineIndex) { + line = i + 2; + column = index - newlineIndex; + break; + } + } + return { + column, + line, + offset: index + }; + } + peek() { + return this.buffer.charCodeAt(this.index + 1); + } + stateText(c) { + if (c === 60) { + if (this.index > this.sectionStart) { + this.cbs.ontext(this.sectionStart, this.index); + } + this.state = 5; + this.sectionStart = this.index; + } else if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } + stateInterpolationOpen(c) { + if (c === this.delimiterOpen[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterOpen.length - 1) { + const start = this.index + 1 - this.delimiterOpen.length; + if (start > this.sectionStart) { + this.cbs.ontext(this.sectionStart, start); + } + this.state = 3; + this.sectionStart = start; + } else { + this.delimiterIndex++; + } + } else if (this.inRCDATA) { + this.state = 32; + this.stateInRCDATA(c); + } else { + this.state = 1; + this.stateText(c); + } + } + stateInterpolation(c) { + if (c === this.delimiterClose[0]) { + this.state = 4; + this.delimiterIndex = 0; + this.stateInterpolationClose(c); + } + } + stateInterpolationClose(c) { + if (c === this.delimiterClose[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterClose.length - 1) { + this.cbs.oninterpolation(this.sectionStart, this.index + 1); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else { + this.delimiterIndex++; + } + } else { + this.state = 3; + this.stateInterpolation(c); + } + } + stateSpecialStartSequence(c) { + const isEnd = this.sequenceIndex === this.currentSequence.length; + const isMatch = isEnd ? ( + // If we are at the end of the sequence, make sure the tag name has ended + isEndOfTagSection(c) + ) : ( + // Otherwise, do a case-insensitive comparison + (c | 32) === this.currentSequence[this.sequenceIndex] + ); + if (!isMatch) { + this.inRCDATA = false; + } else if (!isEnd) { + this.sequenceIndex++; + return; + } + this.sequenceIndex = 0; + this.state = 6; + this.stateInTagName(c); + } + /** Look for an end tag. For <title> and <textarea>, also decode entities. */ + stateInRCDATA(c) { + if (this.sequenceIndex === this.currentSequence.length) { + if (c === 62 || isWhitespace(c)) { + const endOfText = this.index - this.currentSequence.length; + if (this.sectionStart < endOfText) { + const actualIndex = this.index; + this.index = endOfText; + this.cbs.ontext(this.sectionStart, endOfText); + this.index = actualIndex; + } + this.sectionStart = endOfText + 2; + this.stateInClosingTagName(c); + this.inRCDATA = false; + return; + } + this.sequenceIndex = 0; + } + if ((c | 32) === this.currentSequence[this.sequenceIndex]) { + this.sequenceIndex += 1; + } else if (this.sequenceIndex === 0) { + if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { + if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } else if (this.fastForwardTo(60)) { + this.sequenceIndex = 1; + } + } else { + this.sequenceIndex = Number(c === 60); + } + } + stateCDATASequence(c) { + if (c === Sequences.Cdata[this.sequenceIndex]) { + if (++this.sequenceIndex === Sequences.Cdata.length) { + this.state = 28; + this.currentSequence = Sequences.CdataEnd; + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + } + } else { + this.sequenceIndex = 0; + this.state = 23; + this.stateInDeclaration(c); + } + } + /** + * When we wait for one specific character, we can speed things up + * by skipping through the buffer until we find it. + * + * @returns Whether the character was found. + */ + fastForwardTo(c) { + while (++this.index < this.buffer.length) { + const cc = this.buffer.charCodeAt(this.index); + if (cc === 10) { + this.newlines.push(this.index); + } + if (cc === c) { + return true; + } + } + this.index = this.buffer.length - 1; + return false; + } + /** + * Comments and CDATA end with `-->` and `]]>`. + * + * Their common qualities are: + * - Their end sequences have a distinct character they start with. + * - That character is then repeated, so we have to check multiple repeats. + * - All characters but the start character of the sequence can be skipped. + */ + stateInCommentLike(c) { + if (c === this.currentSequence[this.sequenceIndex]) { + if (++this.sequenceIndex === this.currentSequence.length) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, this.index - 2); + } else { + this.cbs.oncomment(this.sectionStart, this.index - 2); + } + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + this.state = 1; + } + } else if (this.sequenceIndex === 0) { + if (this.fastForwardTo(this.currentSequence[0])) { + this.sequenceIndex = 1; + } + } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { + this.sequenceIndex = 0; + } + } + startSpecial(sequence, offset) { + this.enterRCDATA(sequence, offset); + this.state = 31; + } + enterRCDATA(sequence, offset) { + this.inRCDATA = true; + this.currentSequence = sequence; + this.sequenceIndex = offset; + } + stateBeforeTagName(c) { + if (c === 33) { + this.state = 22; + this.sectionStart = this.index + 1; + } else if (c === 63) { + this.state = 24; + this.sectionStart = this.index + 1; + } else if (isTagStartChar(c)) { + this.sectionStart = this.index; + if (this.mode === 0) { + this.state = 6; + } else if (this.inSFCRoot) { + this.state = 34; + } else if (!this.inXML) { + if (c === 116) { + this.state = 30; + } else { + this.state = c === 115 ? 29 : 6; + } + } else { + this.state = 6; + } + } else if (c === 47) { + this.state = 8; + } else { + this.state = 1; + this.stateText(c); + } + } + stateInTagName(c) { + if (isEndOfTagSection(c)) { + this.handleTagName(c); + } + } + stateInSFCRootTagName(c) { + if (isEndOfTagSection(c)) { + const tag = this.buffer.slice(this.sectionStart, this.index); + if (tag !== "template") { + this.enterRCDATA(toCharCodes(`</` + tag), 0); + } + this.handleTagName(c); + } + } + handleTagName(c) { + this.cbs.onopentagname(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } + stateBeforeClosingTagName(c) { + if (isWhitespace(c)) ; else if (c === 62) { + if (!!(process.env.NODE_ENV !== "production") || false) { + this.cbs.onerr(14, this.index); + } + this.state = 1; + this.sectionStart = this.index + 1; + } else { + this.state = isTagStartChar(c) ? 9 : 27; + this.sectionStart = this.index; + } + } + stateInClosingTagName(c) { + if (c === 62 || isWhitespace(c)) { + this.cbs.onclosetag(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 10; + this.stateAfterClosingTagName(c); + } + } + stateAfterClosingTagName(c) { + if (c === 62) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeAttrName(c) { + if (c === 62) { + this.cbs.onopentagend(this.index); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else if (c === 47) { + this.state = 7; + if ((!!(process.env.NODE_ENV !== "production") || false) && this.peek() !== 62) { + this.cbs.onerr(22, this.index); + } + } else if (c === 60 && this.peek() === 47) { + this.cbs.onopentagend(this.index); + this.state = 5; + this.sectionStart = this.index; + } else if (!isWhitespace(c)) { + if ((!!(process.env.NODE_ENV !== "production") || false) && c === 61) { + this.cbs.onerr( + 19, + this.index + ); + } + this.handleAttrStart(c); + } + } + handleAttrStart(c) { + if (c === 118 && this.peek() === 45) { + this.state = 13; + this.sectionStart = this.index; + } else if (c === 46 || c === 58 || c === 64 || c === 35) { + this.cbs.ondirname(this.index, this.index + 1); + this.state = 14; + this.sectionStart = this.index + 1; + } else { + this.state = 12; + this.sectionStart = this.index; + } + } + stateInSelfClosingTag(c) { + if (c === 62) { + this.cbs.onselfclosingtag(this.index); + this.state = 1; + this.sectionStart = this.index + 1; + this.inRCDATA = false; + } else if (!isWhitespace(c)) { + this.state = 11; + this.stateBeforeAttrName(c); + } + } + stateInAttrName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.onattribname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if ((!!(process.env.NODE_ENV !== "production") || false) && (c === 34 || c === 39 || c === 60)) { + this.cbs.onerr( + 17, + this.index + ); + } + } + stateInDirName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 58) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 14; + this.sectionStart = this.index + 1; + } else if (c === 46) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDirArg(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 91) { + this.state = 15; + } else if (c === 46) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDynamicDirArg(c) { + if (c === 93) { + this.state = 14; + } else if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index + 1); + this.handleAttrNameEnd(c); + if (!!(process.env.NODE_ENV !== "production") || false) { + this.cbs.onerr( + 27, + this.index + ); + } + } + } + stateInDirModifier(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 46) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.sectionStart = this.index + 1; + } + } + handleAttrNameEnd(c) { + this.sectionStart = this.index; + this.state = 17; + this.cbs.onattribnameend(this.index); + this.stateAfterAttrName(c); + } + stateAfterAttrName(c) { + if (c === 61) { + this.state = 18; + } else if (c === 47 || c === 62) { + this.cbs.onattribend(0, this.sectionStart); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } else if (!isWhitespace(c)) { + this.cbs.onattribend(0, this.sectionStart); + this.handleAttrStart(c); + } + } + stateBeforeAttrValue(c) { + if (c === 34) { + this.state = 19; + this.sectionStart = this.index + 1; + } else if (c === 39) { + this.state = 20; + this.sectionStart = this.index + 1; + } else if (!isWhitespace(c)) { + this.sectionStart = this.index; + this.state = 21; + this.stateInAttrValueNoQuotes(c); + } + } + handleInAttrValue(c, quote) { + if (c === quote || this.fastForwardTo(quote)) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend( + quote === 34 ? 3 : 2, + this.index + 1 + ); + this.state = 11; + } + } + stateInAttrValueDoubleQuotes(c) { + this.handleInAttrValue(c, 34); + } + stateInAttrValueSingleQuotes(c) { + this.handleInAttrValue(c, 39); + } + stateInAttrValueNoQuotes(c) { + if (isWhitespace(c) || c === 62) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend(1, this.index); + this.state = 11; + this.stateBeforeAttrName(c); + } else if ((!!(process.env.NODE_ENV !== "production") || false) && c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { + this.cbs.onerr( + 18, + this.index + ); + } else ; + } + stateBeforeDeclaration(c) { + if (c === 91) { + this.state = 26; + this.sequenceIndex = 0; + } else { + this.state = c === 45 ? 25 : 23; + } + } + stateInDeclaration(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateInProcessingInstruction(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.onprocessinginstruction(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeComment(c) { + if (c === 45) { + this.state = 28; + this.currentSequence = Sequences.CommentEnd; + this.sequenceIndex = 2; + this.sectionStart = this.index + 1; + } else { + this.state = 23; + } + } + stateInSpecialComment(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.oncomment(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeSpecialS(c) { + if (c === Sequences.ScriptEnd[3]) { + this.startSpecial(Sequences.ScriptEnd, 4); + } else if (c === Sequences.StyleEnd[3]) { + this.startSpecial(Sequences.StyleEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + stateBeforeSpecialT(c) { + if (c === Sequences.TitleEnd[3]) { + this.startSpecial(Sequences.TitleEnd, 4); + } else if (c === Sequences.TextareaEnd[3]) { + this.startSpecial(Sequences.TextareaEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + startEntity() { + } + stateInEntity() { + } + /** + * Iterates through the buffer, calling the function corresponding to the current state. + * + * States that are more likely to be hit are higher up, as a performance improvement. + */ + parse(input) { + this.buffer = input; + while (this.index < this.buffer.length) { + const c = this.buffer.charCodeAt(this.index); + if (c === 10) { + this.newlines.push(this.index); + } + switch (this.state) { + case 1: { + this.stateText(c); + break; + } + case 2: { + this.stateInterpolationOpen(c); + break; + } + case 3: { + this.stateInterpolation(c); + break; + } + case 4: { + this.stateInterpolationClose(c); + break; + } + case 31: { + this.stateSpecialStartSequence(c); + break; + } + case 32: { + this.stateInRCDATA(c); + break; + } + case 26: { + this.stateCDATASequence(c); + break; + } + case 19: { + this.stateInAttrValueDoubleQuotes(c); + break; + } + case 12: { + this.stateInAttrName(c); + break; + } + case 13: { + this.stateInDirName(c); + break; + } + case 14: { + this.stateInDirArg(c); + break; + } + case 15: { + this.stateInDynamicDirArg(c); + break; + } + case 16: { + this.stateInDirModifier(c); + break; + } + case 28: { + this.stateInCommentLike(c); + break; + } + case 27: { + this.stateInSpecialComment(c); + break; + } + case 11: { + this.stateBeforeAttrName(c); + break; + } + case 6: { + this.stateInTagName(c); + break; + } + case 34: { + this.stateInSFCRootTagName(c); + break; + } + case 9: { + this.stateInClosingTagName(c); + break; + } + case 5: { + this.stateBeforeTagName(c); + break; + } + case 17: { + this.stateAfterAttrName(c); + break; + } + case 20: { + this.stateInAttrValueSingleQuotes(c); + break; + } + case 18: { + this.stateBeforeAttrValue(c); + break; + } + case 8: { + this.stateBeforeClosingTagName(c); + break; + } + case 10: { + this.stateAfterClosingTagName(c); + break; + } + case 29: { + this.stateBeforeSpecialS(c); + break; + } + case 30: { + this.stateBeforeSpecialT(c); + break; + } + case 21: { + this.stateInAttrValueNoQuotes(c); + break; + } + case 7: { + this.stateInSelfClosingTag(c); + break; + } + case 23: { + this.stateInDeclaration(c); + break; + } + case 22: { + this.stateBeforeDeclaration(c); + break; + } + case 25: { + this.stateBeforeComment(c); + break; + } + case 24: { + this.stateInProcessingInstruction(c); + break; + } + case 33: { + this.stateInEntity(); + break; + } + } + this.index++; + } + this.cleanup(); + this.finish(); + } + /** + * Remove data that has already been consumed from the buffer. + */ + cleanup() { + if (this.sectionStart !== this.index) { + if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { + this.cbs.ontext(this.sectionStart, this.index); + this.sectionStart = this.index; + } else if (this.state === 19 || this.state === 20 || this.state === 21) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = this.index; + } + } + } + finish() { + this.handleTrailingData(); + this.cbs.onend(); + } + /** Handle any trailing data. */ + handleTrailingData() { + const endIndex = this.buffer.length; + if (this.sectionStart >= endIndex) { + return; + } + if (this.state === 28) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, endIndex); + } else { + this.cbs.oncomment(this.sectionStart, endIndex); + } + } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { + this.cbs.ontext(this.sectionStart, endIndex); + } + } + emitCodePoint(cp, consumed) { + } +} + +const CompilerDeprecationTypes = { + "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT", + "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC", + "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER", + "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE", + "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE", + "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE", + "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE", + "COMPILER_FILTERS": "COMPILER_FILTERS" +}; +const deprecationData = { + ["COMPILER_IS_ON_ELEMENT"]: { + message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`, + link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` + }, + ["COMPILER_V_BIND_SYNC"]: { + message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` + }, + ["COMPILER_V_BIND_OBJECT_ORDER"]: { + message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` + }, + ["COMPILER_V_ON_NATIVE"]: { + message: `.native modifier for v-on has been removed as is no longer necessary.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` + }, + ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: { + message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` + }, + ["COMPILER_NATIVE_TEMPLATE"]: { + message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.` + }, + ["COMPILER_INLINE_TEMPLATE"]: { + message: `"inline-template" has been removed in Vue 3.`, + link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` + }, + ["COMPILER_FILTERS"]: { + message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`, + link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` + } +}; +function getCompatValue(key, { compatConfig }) { + const value = compatConfig && compatConfig[key]; + if (key === "MODE") { + return value || 3; + } else { + return value; + } +} +function isCompatEnabled(key, context) { + const mode = getCompatValue("MODE", context); + const value = getCompatValue(key, context); + return mode === 3 ? value === true : value !== false; +} +function checkCompatEnabled(key, context, loc, ...args) { + const enabled = isCompatEnabled(key, context); + if (!!(process.env.NODE_ENV !== "production") && enabled) { + warnDeprecation(key, context, loc, ...args); + } + return enabled; +} +function warnDeprecation(key, context, loc, ...args) { + const val = getCompatValue(key, context); + if (val === "suppress-warning") { + return; + } + const { message, link } = deprecationData[key]; + const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? ` + Details: ${link}` : ``}`; + const err = new SyntaxError(msg); + err.code = key; + if (loc) err.loc = loc; + context.onWarn(err); +} + +function defaultOnError(error) { + throw error; +} +function defaultOnWarn(msg) { + !!(process.env.NODE_ENV !== "production") && console.warn(`[Vue warn] ${msg.message}`); +} +function createCompilerError(code, loc, messages, additionalMessage) { + const msg = !!(process.env.NODE_ENV !== "production") || false ? (messages || errorMessages)[code] + (additionalMessage || ``) : `https://vuejs.org/error-reference/#compiler-${code}`; + const error = new SyntaxError(String(msg)); + error.code = code; + error.loc = loc; + return error; +} +const ErrorCodes = { + "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0, + "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT", + "CDATA_IN_HTML_CONTENT": 1, + "1": "CDATA_IN_HTML_CONTENT", + "DUPLICATE_ATTRIBUTE": 2, + "2": "DUPLICATE_ATTRIBUTE", + "END_TAG_WITH_ATTRIBUTES": 3, + "3": "END_TAG_WITH_ATTRIBUTES", + "END_TAG_WITH_TRAILING_SOLIDUS": 4, + "4": "END_TAG_WITH_TRAILING_SOLIDUS", + "EOF_BEFORE_TAG_NAME": 5, + "5": "EOF_BEFORE_TAG_NAME", + "EOF_IN_CDATA": 6, + "6": "EOF_IN_CDATA", + "EOF_IN_COMMENT": 7, + "7": "EOF_IN_COMMENT", + "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8, + "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT", + "EOF_IN_TAG": 9, + "9": "EOF_IN_TAG", + "INCORRECTLY_CLOSED_COMMENT": 10, + "10": "INCORRECTLY_CLOSED_COMMENT", + "INCORRECTLY_OPENED_COMMENT": 11, + "11": "INCORRECTLY_OPENED_COMMENT", + "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12, + "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME", + "MISSING_ATTRIBUTE_VALUE": 13, + "13": "MISSING_ATTRIBUTE_VALUE", + "MISSING_END_TAG_NAME": 14, + "14": "MISSING_END_TAG_NAME", + "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15, + "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES", + "NESTED_COMMENT": 16, + "16": "NESTED_COMMENT", + "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17, + "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME", + "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18, + "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE", + "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19, + "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME", + "UNEXPECTED_NULL_CHARACTER": 20, + "20": "UNEXPECTED_NULL_CHARACTER", + "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21, + "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME", + "UNEXPECTED_SOLIDUS_IN_TAG": 22, + "22": "UNEXPECTED_SOLIDUS_IN_TAG", + "X_INVALID_END_TAG": 23, + "23": "X_INVALID_END_TAG", + "X_MISSING_END_TAG": 24, + "24": "X_MISSING_END_TAG", + "X_MISSING_INTERPOLATION_END": 25, + "25": "X_MISSING_INTERPOLATION_END", + "X_MISSING_DIRECTIVE_NAME": 26, + "26": "X_MISSING_DIRECTIVE_NAME", + "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27, + "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END", + "X_V_IF_NO_EXPRESSION": 28, + "28": "X_V_IF_NO_EXPRESSION", + "X_V_IF_SAME_KEY": 29, + "29": "X_V_IF_SAME_KEY", + "X_V_ELSE_NO_ADJACENT_IF": 30, + "30": "X_V_ELSE_NO_ADJACENT_IF", + "X_V_FOR_NO_EXPRESSION": 31, + "31": "X_V_FOR_NO_EXPRESSION", + "X_V_FOR_MALFORMED_EXPRESSION": 32, + "32": "X_V_FOR_MALFORMED_EXPRESSION", + "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33, + "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT", + "X_V_BIND_NO_EXPRESSION": 34, + "34": "X_V_BIND_NO_EXPRESSION", + "X_V_ON_NO_EXPRESSION": 35, + "35": "X_V_ON_NO_EXPRESSION", + "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36, + "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET", + "X_V_SLOT_MIXED_SLOT_USAGE": 37, + "37": "X_V_SLOT_MIXED_SLOT_USAGE", + "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38, + "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES", + "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39, + "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN", + "X_V_SLOT_MISPLACED": 40, + "40": "X_V_SLOT_MISPLACED", + "X_V_MODEL_NO_EXPRESSION": 41, + "41": "X_V_MODEL_NO_EXPRESSION", + "X_V_MODEL_MALFORMED_EXPRESSION": 42, + "42": "X_V_MODEL_MALFORMED_EXPRESSION", + "X_V_MODEL_ON_SCOPE_VARIABLE": 43, + "43": "X_V_MODEL_ON_SCOPE_VARIABLE", + "X_V_MODEL_ON_PROPS": 44, + "44": "X_V_MODEL_ON_PROPS", + "X_INVALID_EXPRESSION": 45, + "45": "X_INVALID_EXPRESSION", + "X_KEEP_ALIVE_INVALID_CHILDREN": 46, + "46": "X_KEEP_ALIVE_INVALID_CHILDREN", + "X_PREFIX_ID_NOT_SUPPORTED": 47, + "47": "X_PREFIX_ID_NOT_SUPPORTED", + "X_MODULE_MODE_NOT_SUPPORTED": 48, + "48": "X_MODULE_MODE_NOT_SUPPORTED", + "X_CACHE_HANDLER_NOT_SUPPORTED": 49, + "49": "X_CACHE_HANDLER_NOT_SUPPORTED", + "X_SCOPE_ID_NOT_SUPPORTED": 50, + "50": "X_SCOPE_ID_NOT_SUPPORTED", + "X_VNODE_HOOKS": 51, + "51": "X_VNODE_HOOKS", + "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52, + "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT", + "__EXTEND_POINT__": 53, + "53": "__EXTEND_POINT__" +}; +const errorMessages = { + // parse errors + [0]: "Illegal comment.", + [1]: "CDATA section is allowed only in XML context.", + [2]: "Duplicate attribute.", + [3]: "End tag cannot have attributes.", + [4]: "Illegal '/' in tags.", + [5]: "Unexpected EOF in tag.", + [6]: "Unexpected EOF in CDATA section.", + [7]: "Unexpected EOF in comment.", + [8]: "Unexpected EOF in script.", + [9]: "Unexpected EOF in tag.", + [10]: "Incorrectly closed comment.", + [11]: "Incorrectly opened comment.", + [12]: "Illegal tag name. Use '<' to print '<'.", + [13]: "Attribute value was expected.", + [14]: "End tag name was expected.", + [15]: "Whitespace was expected.", + [16]: "Unexpected '<!--' in comment.", + [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, + [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", + [19]: "Attribute name cannot start with '='.", + [21]: "'<?' is allowed only in XML context.", + [20]: `Unexpected null character.`, + [22]: "Illegal '/' in tags.", + // Vue-specific parse errors + [23]: "Invalid end tag.", + [24]: "Element is missing end tag.", + [25]: "Interpolation end sign was not found.", + [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", + [26]: "Legal directive name was expected.", + // transform errors + [28]: `v-if/v-else-if is missing expression.`, + [29]: `v-if/else branches must use unique keys.`, + [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, + [31]: `v-for is missing expression.`, + [32]: `v-for has invalid expression.`, + [33]: `<template v-for> key should be placed on the <template> tag.`, + [34]: `v-bind is missing expression.`, + [52]: `v-bind with same-name shorthand only allows static argument.`, + [35]: `v-on is missing expression.`, + [36]: `Unexpected custom directive on <slot> outlet.`, + [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, + [38]: `Duplicate slot names found. `, + [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, + [40]: `v-slot can only be used on components or <template> tags.`, + [41]: `v-model is missing expression.`, + [42]: `v-model value must be a valid JavaScript member expression.`, + [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, + [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. +Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, + [45]: `Error parsing JavaScript expression: `, + [46]: `<KeepAlive> expects exactly one child component.`, + [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, + // generic errors + [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, + [48]: `ES module mode is not supported in this build of compiler.`, + [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, + [50]: `"scopeId" option is only supported in module mode.`, + // just to fulfill types + [53]: `` +}; + +function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { + { + return; + } +} +function isReferencedIdentifier(id, parent, parentStack) { + { + return false; + } +} +function isInDestructureAssignment(parent, parentStack) { + if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "AssignmentExpression") { + return true; + } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) { + break; + } + } + } + return false; +} +function isInNewExpression(parentStack) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "NewExpression") { + return true; + } else if (p.type !== "MemberExpression") { + break; + } + } + return false; +} +function walkFunctionParams(node, onIdent) { + for (const p of node.params) { + for (const id of extractIdentifiers(p)) { + onIdent(id); + } + } +} +function walkBlockDeclarations(block, onIdent) { + for (const stmt of block.body) { + if (stmt.type === "VariableDeclaration") { + if (stmt.declare) continue; + for (const decl of stmt.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { + if (stmt.declare || !stmt.id) continue; + onIdent(stmt.id); + } else if (isForStatement(stmt)) { + walkForStatement(stmt, true, onIdent); + } + } +} +function isForStatement(stmt) { + return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement"; +} +function walkForStatement(stmt, isVar, onIdent) { + const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left; + if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) { + for (const decl of variable.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } +} +function extractIdentifiers(param, nodes = []) { + switch (param.type) { + case "Identifier": + nodes.push(param); + break; + case "MemberExpression": + let object = param; + while (object.type === "MemberExpression") { + object = object.object; + } + nodes.push(object); + break; + case "ObjectPattern": + for (const prop of param.properties) { + if (prop.type === "RestElement") { + extractIdentifiers(prop.argument, nodes); + } else { + extractIdentifiers(prop.value, nodes); + } + } + break; + case "ArrayPattern": + param.elements.forEach((element) => { + if (element) extractIdentifiers(element, nodes); + }); + break; + case "RestElement": + extractIdentifiers(param.argument, nodes); + break; + case "AssignmentPattern": + extractIdentifiers(param.left, nodes); + break; + } + return nodes; +} +const isFunctionType = (node) => { + return /Function(?:Expression|Declaration)$|Method$/.test(node.type); +}; +const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed; +const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; +const TS_NODE_TYPES = [ + "TSAsExpression", + // foo as number + "TSTypeAssertion", + // (<number>foo) + "TSNonNullExpression", + // foo! + "TSInstantiationExpression", + // foo<string> + "TSSatisfiesExpression" + // foo satisfies T +]; +function unwrapTSNode(node) { + if (TS_NODE_TYPES.includes(node.type)) { + return unwrapTSNode(node.expression); + } else { + return node; + } +} + +const isStaticExp = (p) => p.type === 4 && p.isStatic; +function isCoreComponent(tag) { + switch (tag) { + case "Teleport": + case "teleport": + return TELEPORT; + case "Suspense": + case "suspense": + return SUSPENSE; + case "KeepAlive": + case "keep-alive": + return KEEP_ALIVE; + case "BaseTransition": + case "base-transition": + return BASE_TRANSITION; + } +} +const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/; +const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); +const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; +const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; +const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; +const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source; +const isMemberExpressionBrowser = (exp) => { + const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim()); + let state = 0 /* inMemberExp */; + let stateStack = []; + let currentOpenBracketCount = 0; + let currentOpenParensCount = 0; + let currentStringType = null; + for (let i = 0; i < path.length; i++) { + const char = path.charAt(i); + switch (state) { + case 0 /* inMemberExp */: + if (char === "[") { + stateStack.push(state); + state = 1 /* inBrackets */; + currentOpenBracketCount++; + } else if (char === "(") { + stateStack.push(state); + state = 2 /* inParens */; + currentOpenParensCount++; + } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { + return false; + } + break; + case 1 /* inBrackets */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `[`) { + currentOpenBracketCount++; + } else if (char === `]`) { + if (!--currentOpenBracketCount) { + state = stateStack.pop(); + } + } + break; + case 2 /* inParens */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `(`) { + currentOpenParensCount++; + } else if (char === `)`) { + if (i === path.length - 1) { + return false; + } + if (!--currentOpenParensCount) { + state = stateStack.pop(); + } + } + break; + case 3 /* inString */: + if (char === currentStringType) { + state = stateStack.pop(); + currentStringType = null; + } + break; + } + } + return !currentOpenBracketCount && !currentOpenParensCount; +}; +const isMemberExpressionNode = NOOP ; +const isMemberExpression = isMemberExpressionBrowser ; +const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; +const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp)); +const isFnExpressionNode = NOOP ; +const isFnExpression = isFnExpressionBrowser ; +function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { + return advancePositionWithMutation( + { + offset: pos.offset, + line: pos.line, + column: pos.column + }, + source, + numberOfCharacters + ); +} +function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { + let linesCount = 0; + let lastNewLinePos = -1; + for (let i = 0; i < numberOfCharacters; i++) { + if (source.charCodeAt(i) === 10) { + linesCount++; + lastNewLinePos = i; + } + } + pos.offset += numberOfCharacters; + pos.line += linesCount; + pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos; + return pos; +} +function assert(condition, msg) { + if (!condition) { + throw new Error(msg || `unexpected compiler condition`); + } +} +function findDir(node, name, allowEmpty = false) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) { + return p; + } + } +} +function findProp(node, name, dynamicOnly = false, allowEmpty = false) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (dynamicOnly) continue; + if (p.name === name && (p.value || allowEmpty)) { + return p; + } + } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { + return p; + } + } +} +function isStaticArgOf(arg, name) { + return !!(arg && isStaticExp(arg) && arg.content === name); +} +function hasDynamicKeyVBind(node) { + return node.props.some( + (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" + p.arg.type !== 4 || // v-bind:[_ctx.foo] + !p.arg.isStatic) + // v-bind:[foo] + ); +} +function isText$1(node) { + return node.type === 5 || node.type === 2; +} +function isVSlot(p) { + return p.type === 7 && p.name === "slot"; +} +function isTemplateNode(node) { + return node.type === 1 && node.tagType === 3; +} +function isSlotOutlet(node) { + return node.type === 1 && node.tagType === 2; +} +const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); +function getUnnormalizedProps(props, callPath = []) { + if (props && !isString(props) && props.type === 14) { + const callee = props.callee; + if (!isString(callee) && propsHelperSet.has(callee)) { + return getUnnormalizedProps( + props.arguments[0], + callPath.concat(props) + ); + } + } + return [props, callPath]; +} +function injectProp(node, prop, context) { + let propsWithInjection; + let props = node.type === 13 ? node.props : node.arguments[2]; + let callPath = []; + let parentCall; + if (props && !isString(props) && props.type === 14) { + const ret = getUnnormalizedProps(props); + props = ret[0]; + callPath = ret[1]; + parentCall = callPath[callPath.length - 1]; + } + if (props == null || isString(props)) { + propsWithInjection = createObjectExpression([prop]); + } else if (props.type === 14) { + const first = props.arguments[0]; + if (!isString(first) && first.type === 15) { + if (!hasProp(prop, first)) { + first.properties.unshift(prop); + } + } else { + if (props.callee === TO_HANDLERS) { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + } else { + props.arguments.unshift(createObjectExpression([prop])); + } + } + !propsWithInjection && (propsWithInjection = props); + } else if (props.type === 15) { + if (!hasProp(prop, props)) { + props.properties.unshift(prop); + } + propsWithInjection = props; + } else { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { + parentCall = callPath[callPath.length - 2]; + } + } + if (node.type === 13) { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.props = propsWithInjection; + } + } else { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.arguments[2] = propsWithInjection; + } + } +} +function hasProp(prop, props) { + let result = false; + if (prop.key.type === 4) { + const propKeyName = prop.key.content; + result = props.properties.some( + (p) => p.key.type === 4 && p.key.content === propKeyName + ); + } + return result; +} +function toValidAssetId(name, type) { + return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { + return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); + })}`; +} +function hasScopeRef(node, ids) { + if (!node || Object.keys(ids).length === 0) { + return false; + } + switch (node.type) { + case 1: + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { + return true; + } + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 11: + if (hasScopeRef(node.source, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 9: + return node.branches.some((b) => hasScopeRef(b, ids)); + case 10: + if (hasScopeRef(node.condition, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 4: + return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content]; + case 8: + return node.children.some((c) => isObject(c) && hasScopeRef(c, ids)); + case 5: + case 12: + return hasScopeRef(node.content, ids); + case 2: + case 3: + case 20: + return false; + default: + if (!!(process.env.NODE_ENV !== "production")) ; + return false; + } +} +function getMemoedVNodeCall(node) { + if (node.type === 14 && node.callee === WITH_MEMO) { + return node.arguments[1].returns; + } else { + return node; + } +} +const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/; + +const defaultParserOptions = { + parseMode: "base", + ns: 0, + delimiters: [`{{`, `}}`], + getNamespace: () => 0, + isVoidTag: NO, + isPreTag: NO, + isIgnoreNewlineTag: NO, + isCustomElement: NO, + onError: defaultOnError, + onWarn: defaultOnWarn, + comments: !!(process.env.NODE_ENV !== "production"), + prefixIdentifiers: false +}; +let currentOptions = defaultParserOptions; +let currentRoot = null; +let currentInput = ""; +let currentOpenTag = null; +let currentProp = null; +let currentAttrValue = ""; +let currentAttrStartIndex = -1; +let currentAttrEndIndex = -1; +let inPre = 0; +let inVPre = false; +let currentVPreBoundary = null; +const stack = []; +const tokenizer = new Tokenizer(stack, { + onerr: emitError, + ontext(start, end) { + onText(getSlice(start, end), start, end); + }, + ontextentity(char, start, end) { + onText(char, start, end); + }, + oninterpolation(start, end) { + if (inVPre) { + return onText(getSlice(start, end), start, end); + } + let innerStart = start + tokenizer.delimiterOpen.length; + let innerEnd = end - tokenizer.delimiterClose.length; + while (isWhitespace(currentInput.charCodeAt(innerStart))) { + innerStart++; + } + while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { + innerEnd--; + } + let exp = getSlice(innerStart, innerEnd); + if (exp.includes("&")) { + { + exp = currentOptions.decodeEntities(exp, false); + } + } + addNode({ + type: 5, + content: createExp(exp, false, getLoc(innerStart, innerEnd)), + loc: getLoc(start, end) + }); + }, + onopentagname(start, end) { + const name = getSlice(start, end); + currentOpenTag = { + type: 1, + tag: name, + ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), + tagType: 0, + // will be refined on tag close + props: [], + children: [], + loc: getLoc(start - 1, end), + codegenNode: void 0 + }; + }, + onopentagend(end) { + endOpenTag(end); + }, + onclosetag(start, end) { + const name = getSlice(start, end); + if (!currentOptions.isVoidTag(name)) { + let found = false; + for (let i = 0; i < stack.length; i++) { + const e = stack[i]; + if (e.tag.toLowerCase() === name.toLowerCase()) { + found = true; + if (i > 0) { + emitError(24, stack[0].loc.start.offset); + } + for (let j = 0; j <= i; j++) { + const el = stack.shift(); + onCloseTag(el, end, j < i); + } + break; + } + } + if (!found) { + emitError(23, backTrack(start, 60)); + } + } + }, + onselfclosingtag(end) { + const name = currentOpenTag.tag; + currentOpenTag.isSelfClosing = true; + endOpenTag(end); + if (stack[0] && stack[0].tag === name) { + onCloseTag(stack.shift(), end); + } + }, + onattribname(start, end) { + currentProp = { + type: 6, + name: getSlice(start, end), + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + }, + ondirname(start, end) { + const raw = getSlice(start, end); + const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); + if (!inVPre && name === "") { + emitError(26, start); + } + if (inVPre || name === "") { + currentProp = { + type: 6, + name: raw, + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + } else { + currentProp = { + type: 7, + name, + rawName: raw, + exp: void 0, + arg: void 0, + modifiers: raw === "." ? [createSimpleExpression("prop")] : [], + loc: getLoc(start) + }; + if (name === "pre") { + inVPre = tokenizer.inVPre = true; + currentVPreBoundary = currentOpenTag; + const props = currentOpenTag.props; + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7) { + props[i] = dirToAttr(props[i]); + } + } + } + } + }, + ondirarg(start, end) { + if (start === end) return; + const arg = getSlice(start, end); + if (inVPre) { + currentProp.name += arg; + setLocEnd(currentProp.nameLoc, end); + } else { + const isStatic = arg[0] !== `[`; + currentProp.arg = createExp( + isStatic ? arg : arg.slice(1, -1), + isStatic, + getLoc(start, end), + isStatic ? 3 : 0 + ); + } + }, + ondirmodifier(start, end) { + const mod = getSlice(start, end); + if (inVPre) { + currentProp.name += "." + mod; + setLocEnd(currentProp.nameLoc, end); + } else if (currentProp.name === "slot") { + const arg = currentProp.arg; + if (arg) { + arg.content += "." + mod; + setLocEnd(arg.loc, end); + } + } else { + const exp = createSimpleExpression(mod, true, getLoc(start, end)); + currentProp.modifiers.push(exp); + } + }, + onattribdata(start, end) { + currentAttrValue += getSlice(start, end); + if (currentAttrStartIndex < 0) currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribentity(char, start, end) { + currentAttrValue += char; + if (currentAttrStartIndex < 0) currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribnameend(end) { + const start = currentProp.loc.start.offset; + const name = getSlice(start, end); + if (currentProp.type === 7) { + currentProp.rawName = name; + } + if (currentOpenTag.props.some( + (p) => (p.type === 7 ? p.rawName : p.name) === name + )) { + emitError(2, start); + } + }, + onattribend(quote, end) { + if (currentOpenTag && currentProp) { + setLocEnd(currentProp.loc, end); + if (quote !== 0) { + if (currentAttrValue.includes("&")) { + currentAttrValue = currentOptions.decodeEntities( + currentAttrValue, + true + ); + } + if (currentProp.type === 6) { + if (currentProp.name === "class") { + currentAttrValue = condense(currentAttrValue).trim(); + } + if (quote === 1 && !currentAttrValue) { + emitError(13, end); + } + currentProp.value = { + type: 2, + content: currentAttrValue, + loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) + }; + if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { + tokenizer.enterRCDATA(toCharCodes(`</template`), 0); + } + } else { + let expParseMode = 0 /* Normal */; + currentProp.exp = createExp( + currentAttrValue, + false, + getLoc(currentAttrStartIndex, currentAttrEndIndex), + 0, + expParseMode + ); + if (currentProp.name === "for") { + currentProp.forParseResult = parseForExpression(currentProp.exp); + } + let syncIndex = -1; + if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.findIndex( + (mod) => mod.content === "sync" + )) > -1 && checkCompatEnabled( + "COMPILER_V_BIND_SYNC", + currentOptions, + currentProp.loc, + currentProp.rawName + )) { + currentProp.name = "model"; + currentProp.modifiers.splice(syncIndex, 1); + } + } + } + if (currentProp.type !== 7 || currentProp.name !== "pre") { + currentOpenTag.props.push(currentProp); + } + } + currentAttrValue = ""; + currentAttrStartIndex = currentAttrEndIndex = -1; + }, + oncomment(start, end) { + if (currentOptions.comments) { + addNode({ + type: 3, + content: getSlice(start, end), + loc: getLoc(start - 4, end + 3) + }); + } + }, + onend() { + const end = currentInput.length; + if ((!!(process.env.NODE_ENV !== "production") || false) && tokenizer.state !== 1) { + switch (tokenizer.state) { + case 5: + case 8: + emitError(5, end); + break; + case 3: + case 4: + emitError( + 25, + tokenizer.sectionStart + ); + break; + case 28: + if (tokenizer.currentSequence === Sequences.CdataEnd) { + emitError(6, end); + } else { + emitError(7, end); + } + break; + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + // " + case 20: + // ' + case 21: + emitError(9, end); + break; + } + } + for (let index = 0; index < stack.length; index++) { + onCloseTag(stack[index], end - 1); + emitError(24, stack[index].loc.start.offset); + } + }, + oncdata(start, end) { + if (stack[0].ns !== 0) { + onText(getSlice(start, end), start, end); + } else { + emitError(1, start - 9); + } + }, + onprocessinginstruction(start) { + if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + emitError( + 21, + start - 1 + ); + } + } +}); +const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; +const stripParensRE = /^\(|\)$/g; +function parseForExpression(input) { + const loc = input.loc; + const exp = input.content; + const inMatch = exp.match(forAliasRE); + if (!inMatch) return; + const [, LHS, RHS] = inMatch; + const createAliasExpression = (content, offset, asParam = false) => { + const start = loc.start.offset + offset; + const end = start + content.length; + return createExp( + content, + false, + getLoc(start, end), + 0, + asParam ? 1 /* Params */ : 0 /* Normal */ + ); + }; + const result = { + source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), + value: void 0, + key: void 0, + index: void 0, + finalized: false + }; + let valueContent = LHS.trim().replace(stripParensRE, "").trim(); + const trimmedOffset = LHS.indexOf(valueContent); + const iteratorMatch = valueContent.match(forIteratorRE); + if (iteratorMatch) { + valueContent = valueContent.replace(forIteratorRE, "").trim(); + const keyContent = iteratorMatch[1].trim(); + let keyOffset; + if (keyContent) { + keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); + result.key = createAliasExpression(keyContent, keyOffset, true); + } + if (iteratorMatch[2]) { + const indexContent = iteratorMatch[2].trim(); + if (indexContent) { + result.index = createAliasExpression( + indexContent, + exp.indexOf( + indexContent, + result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length + ), + true + ); + } + } + } + if (valueContent) { + result.value = createAliasExpression(valueContent, trimmedOffset, true); + } + return result; +} +function getSlice(start, end) { + return currentInput.slice(start, end); +} +function endOpenTag(end) { + if (tokenizer.inSFCRoot) { + currentOpenTag.innerLoc = getLoc(end + 1, end + 1); + } + addNode(currentOpenTag); + const { tag, ns } = currentOpenTag; + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre++; + } + if (currentOptions.isVoidTag(tag)) { + onCloseTag(currentOpenTag, end); + } else { + stack.unshift(currentOpenTag); + if (ns === 1 || ns === 2) { + tokenizer.inXML = true; + } + } + currentOpenTag = null; +} +function onText(content, start, end) { + { + const tag = stack[0] && stack[0].tag; + if (tag !== "script" && tag !== "style" && content.includes("&")) { + content = currentOptions.decodeEntities(content, false); + } + } + const parent = stack[0] || currentRoot; + const lastNode = parent.children[parent.children.length - 1]; + if (lastNode && lastNode.type === 2) { + lastNode.content += content; + setLocEnd(lastNode.loc, end); + } else { + parent.children.push({ + type: 2, + content, + loc: getLoc(start, end) + }); + } +} +function onCloseTag(el, end, isImplied = false) { + if (isImplied) { + setLocEnd(el.loc, backTrack(end, 60)); + } else { + setLocEnd(el.loc, lookAhead(end, 62) + 1); + } + if (tokenizer.inSFCRoot) { + if (el.children.length) { + el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end); + } else { + el.innerLoc.end = extend({}, el.innerLoc.start); + } + el.innerLoc.source = getSlice( + el.innerLoc.start.offset, + el.innerLoc.end.offset + ); + } + const { tag, ns, children } = el; + if (!inVPre) { + if (tag === "slot") { + el.tagType = 2; + } else if (isFragmentTemplate(el)) { + el.tagType = 3; + } else if (isComponent(el)) { + el.tagType = 1; + } + } + if (!tokenizer.inRCDATA) { + el.children = condenseWhitespace(children); + } + if (ns === 0 && currentOptions.isIgnoreNewlineTag(tag)) { + const first = children[0]; + if (first && first.type === 2) { + first.content = first.content.replace(/^\r?\n/, ""); + } + } + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre--; + } + if (currentVPreBoundary === el) { + inVPre = tokenizer.inVPre = false; + currentVPreBoundary = null; + } + if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + tokenizer.inXML = false; + } + { + const props = el.props; + if (!!(process.env.NODE_ENV !== "production") && isCompatEnabled( + "COMPILER_V_IF_V_FOR_PRECEDENCE", + currentOptions + )) { + let hasIf = false; + let hasFor = false; + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 7) { + if (p.name === "if") { + hasIf = true; + } else if (p.name === "for") { + hasFor = true; + } + } + if (hasIf && hasFor) { + warnDeprecation( + "COMPILER_V_IF_V_FOR_PRECEDENCE", + currentOptions, + el.loc + ); + break; + } + } + } + if (!tokenizer.inSFCRoot && isCompatEnabled( + "COMPILER_NATIVE_TEMPLATE", + currentOptions + ) && el.tag === "template" && !isFragmentTemplate(el)) { + !!(process.env.NODE_ENV !== "production") && warnDeprecation( + "COMPILER_NATIVE_TEMPLATE", + currentOptions, + el.loc + ); + const parent = stack[0] || currentRoot; + const index = parent.children.indexOf(el); + parent.children.splice(index, 1, ...el.children); + } + const inlineTemplateProp = props.find( + (p) => p.type === 6 && p.name === "inline-template" + ); + if (inlineTemplateProp && checkCompatEnabled( + "COMPILER_INLINE_TEMPLATE", + currentOptions, + inlineTemplateProp.loc + ) && el.children.length) { + inlineTemplateProp.value = { + type: 2, + content: getSlice( + el.children[0].loc.start.offset, + el.children[el.children.length - 1].loc.end.offset + ), + loc: inlineTemplateProp.loc + }; + } + } +} +function lookAhead(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1) i++; + return i; +} +function backTrack(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i >= 0) i--; + return i; +} +const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); +function isFragmentTemplate({ tag, props }) { + if (tag === "template") { + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { + return true; + } + } + } + return false; +} +function isComponent({ tag, props }) { + if (currentOptions.isCustomElement(tag)) { + return false; + } + if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { + return true; + } + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 6) { + if (p.name === "is" && p.value) { + if (p.value.content.startsWith("vue:")) { + return true; + } else if (checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + } else if (// :is on plain element - only treat as component in compat mode + p.name === "bind" && isStaticArgOf(p.arg, "is") && checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + return false; +} +function isUpperCase(c) { + return c > 64 && c < 91; +} +const windowsNewlineRE = /\r\n/g; +function condenseWhitespace(nodes, tag) { + const shouldCondense = currentOptions.whitespace !== "preserve"; + let removedWhitespace = false; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (node.type === 2) { + if (!inPre) { + if (isAllWhitespace(node.content)) { + const prev = nodes[i - 1] && nodes[i - 1].type; + const next = nodes[i + 1] && nodes[i + 1].type; + if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { + removedWhitespace = true; + nodes[i] = null; + } else { + node.content = " "; + } + } else if (shouldCondense) { + node.content = condense(node.content); + } + } else { + node.content = node.content.replace(windowsNewlineRE, "\n"); + } + } + } + return removedWhitespace ? nodes.filter(Boolean) : nodes; +} +function isAllWhitespace(str) { + for (let i = 0; i < str.length; i++) { + if (!isWhitespace(str.charCodeAt(i))) { + return false; + } + } + return true; +} +function hasNewlineChar(str) { + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + if (c === 10 || c === 13) { + return true; + } + } + return false; +} +function condense(str) { + let ret = ""; + let prevCharIsWhitespace = false; + for (let i = 0; i < str.length; i++) { + if (isWhitespace(str.charCodeAt(i))) { + if (!prevCharIsWhitespace) { + ret += " "; + prevCharIsWhitespace = true; + } + } else { + ret += str[i]; + prevCharIsWhitespace = false; + } + } + return ret; +} +function addNode(node) { + (stack[0] || currentRoot).children.push(node); +} +function getLoc(start, end) { + return { + start: tokenizer.getPos(start), + // @ts-expect-error allow late attachment + end: end == null ? end : tokenizer.getPos(end), + // @ts-expect-error allow late attachment + source: end == null ? end : getSlice(start, end) + }; +} +function cloneLoc(loc) { + return getLoc(loc.start.offset, loc.end.offset); +} +function setLocEnd(loc, end) { + loc.end = tokenizer.getPos(end); + loc.source = getSlice(loc.start.offset, end); +} +function dirToAttr(dir) { + const attr = { + type: 6, + name: dir.rawName, + nameLoc: getLoc( + dir.loc.start.offset, + dir.loc.start.offset + dir.rawName.length + ), + value: void 0, + loc: dir.loc + }; + if (dir.exp) { + const loc = dir.exp.loc; + if (loc.end.offset < dir.loc.end.offset) { + loc.start.offset--; + loc.start.column--; + loc.end.offset++; + loc.end.column++; + } + attr.value = { + type: 2, + content: dir.exp.content, + loc + }; + } + return attr; +} +function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { + const exp = createSimpleExpression(content, isStatic, loc, constType); + return exp; +} +function emitError(code, index, message) { + currentOptions.onError( + createCompilerError(code, getLoc(index, index), void 0, message) + ); +} +function reset() { + tokenizer.reset(); + currentOpenTag = null; + currentProp = null; + currentAttrValue = ""; + currentAttrStartIndex = -1; + currentAttrEndIndex = -1; + stack.length = 0; +} +function baseParse(input, options) { + reset(); + currentInput = input; + currentOptions = extend({}, defaultParserOptions); + if (options) { + let key; + for (key in options) { + if (options[key] != null) { + currentOptions[key] = options[key]; + } + } + } + if (!!(process.env.NODE_ENV !== "production")) { + if (!currentOptions.decodeEntities) { + throw new Error( + `[@vue/compiler-core] decodeEntities option is required in browser builds.` + ); + } + } + tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; + tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; + const delimiters = options && options.delimiters; + if (delimiters) { + tokenizer.delimiterOpen = toCharCodes(delimiters[0]); + tokenizer.delimiterClose = toCharCodes(delimiters[1]); + } + const root = currentRoot = createRoot([], input); + tokenizer.parse(currentInput); + root.loc = getLoc(0, input.length); + root.children = condenseWhitespace(root.children); + currentRoot = null; + return root; +} + +function cacheStatic(root, context) { + walk( + root, + void 0, + context, + // Root node is unfortunately non-hoistable due to potential parent + // fallthrough attributes. + isSingleElementRoot(root, root.children[0]) + ); +} +function isSingleElementRoot(root, child) { + const { children } = root; + return children.length === 1 && child.type === 1 && !isSlotOutlet(child); +} +function walk(node, parent, context, doNotHoistNode = false, inFor = false) { + const { children } = node; + const toCache = []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.type === 1 && child.tagType === 0) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType > 0) { + if (constantType >= 2) { + child.codegenNode.patchFlag = -1; + toCache.push(child); + continue; + } + } else { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + const flag = codegenNode.patchFlag; + if ((flag === void 0 || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { + const props = getNodeProps(child); + if (props) { + codegenNode.props = context.hoist(props); + } + } + if (codegenNode.dynamicProps) { + codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); + } + } + } + } else if (child.type === 12) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType >= 2) { + toCache.push(child); + continue; + } + } + if (child.type === 1) { + const isComponent = child.tagType === 1; + if (isComponent) { + context.scopes.vSlot++; + } + walk(child, node, context, false, inFor); + if (isComponent) { + context.scopes.vSlot--; + } + } else if (child.type === 11) { + walk(child, node, context, child.children.length === 1, true); + } else if (child.type === 9) { + for (let i2 = 0; i2 < child.branches.length; i2++) { + walk( + child.branches[i2], + node, + context, + child.branches[i2].children.length === 1, + inFor + ); + } + } + } + let cachedAsArray = false; + if (toCache.length === children.length && node.type === 1) { + if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) { + node.codegenNode.children = getCacheExpression( + createArrayExpression(node.codegenNode.children) + ); + cachedAsArray = true; + } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) { + const slot = getSlotNode(node.codegenNode, "default"); + if (slot) { + slot.returns = getCacheExpression( + createArrayExpression(slot.returns) + ); + cachedAsArray = true; + } + } else if (node.tagType === 3 && parent && parent.type === 1 && parent.tagType === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 15) { + const slotName = findDir(node, "slot", true); + const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg); + if (slot) { + slot.returns = getCacheExpression( + createArrayExpression(slot.returns) + ); + cachedAsArray = true; + } + } + } + if (!cachedAsArray) { + for (const child of toCache) { + child.codegenNode = context.cache(child.codegenNode); + } + } + function getCacheExpression(value) { + const exp = context.cache(value); + if (inFor && context.hmr) { + exp.needArraySpread = true; + } + return exp; + } + function getSlotNode(node2, name) { + if (node2.children && !isArray(node2.children) && node2.children.type === 15) { + const slot = node2.children.properties.find( + (p) => p.key === name || p.key.content === name + ); + return slot && slot.value; + } + } + if (toCache.length && context.transformHoist) { + context.transformHoist(children, context, node); + } +} +function getConstantType(node, context) { + const { constantCache } = context; + switch (node.type) { + case 1: + if (node.tagType !== 0) { + return 0; + } + const cached = constantCache.get(node); + if (cached !== void 0) { + return cached; + } + const codegenNode = node.codegenNode; + if (codegenNode.type !== 13) { + return 0; + } + if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject" && node.tag !== "math") { + return 0; + } + if (codegenNode.patchFlag === void 0) { + let returnType2 = 3; + const generatedPropsType = getGeneratedPropsConstantType(node, context); + if (generatedPropsType === 0) { + constantCache.set(node, 0); + return 0; + } + if (generatedPropsType < returnType2) { + returnType2 = generatedPropsType; + } + for (let i = 0; i < node.children.length; i++) { + const childType = getConstantType(node.children[i], context); + if (childType === 0) { + constantCache.set(node, 0); + return 0; + } + if (childType < returnType2) { + returnType2 = childType; + } + } + if (returnType2 > 1) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && p.name === "bind" && p.exp) { + const expType = getConstantType(p.exp, context); + if (expType === 0) { + constantCache.set(node, 0); + return 0; + } + if (expType < returnType2) { + returnType2 = expType; + } + } + } + } + if (codegenNode.isBlock) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7) { + constantCache.set(node, 0); + return 0; + } + } + context.removeHelper(OPEN_BLOCK); + context.removeHelper( + getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) + ); + codegenNode.isBlock = false; + context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); + } + constantCache.set(node, returnType2); + return returnType2; + } else { + constantCache.set(node, 0); + return 0; + } + case 2: + case 3: + return 3; + case 9: + case 11: + case 10: + return 0; + case 5: + case 12: + return getConstantType(node.content, context); + case 4: + return node.constType; + case 8: + let returnType = 3; + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child) || isSymbol(child)) { + continue; + } + const childType = getConstantType(child, context); + if (childType === 0) { + return 0; + } else if (childType < returnType) { + returnType = childType; + } + } + return returnType; + case 20: + return 2; + default: + if (!!(process.env.NODE_ENV !== "production")) ; + return 0; + } +} +const allowHoistedHelperSet = /* @__PURE__ */ new Set([ + NORMALIZE_CLASS, + NORMALIZE_STYLE, + NORMALIZE_PROPS, + GUARD_REACTIVE_PROPS +]); +function getConstantTypeOfHelperCall(value, context) { + if (value.type === 14 && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { + const arg = value.arguments[0]; + if (arg.type === 4) { + return getConstantType(arg, context); + } else if (arg.type === 14) { + return getConstantTypeOfHelperCall(arg, context); + } + } + return 0; +} +function getGeneratedPropsConstantType(node, context) { + let returnType = 3; + const props = getNodeProps(node); + if (props && props.type === 15) { + const { properties } = props; + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + const keyType = getConstantType(key, context); + if (keyType === 0) { + return keyType; + } + if (keyType < returnType) { + returnType = keyType; + } + let valueType; + if (value.type === 4) { + valueType = getConstantType(value, context); + } else if (value.type === 14) { + valueType = getConstantTypeOfHelperCall(value, context); + } else { + valueType = 0; + } + if (valueType === 0) { + return valueType; + } + if (valueType < returnType) { + returnType = valueType; + } + } + } + return returnType; +} +function getNodeProps(node) { + const codegenNode = node.codegenNode; + if (codegenNode.type === 13) { + return codegenNode.props; + } +} + +function createTransformContext(root, { + filename = "", + prefixIdentifiers = false, + hoistStatic = false, + hmr = false, + cacheHandlers = false, + nodeTransforms = [], + directiveTransforms = {}, + transformHoist = null, + isBuiltInComponent = NOOP, + isCustomElement = NOOP, + expressionPlugins = [], + scopeId = null, + slotted = true, + ssr = false, + inSSR = false, + ssrCssVars = ``, + bindingMetadata = EMPTY_OBJ, + inline = false, + isTS = false, + onError = defaultOnError, + onWarn = defaultOnWarn, + compatConfig +}) { + const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); + const context = { + // options + filename, + selfName: nameMatch && capitalize(camelize(nameMatch[1])), + prefixIdentifiers, + hoistStatic, + hmr, + cacheHandlers, + nodeTransforms, + directiveTransforms, + transformHoist, + isBuiltInComponent, + isCustomElement, + expressionPlugins, + scopeId, + slotted, + ssr, + inSSR, + ssrCssVars, + bindingMetadata, + inline, + isTS, + onError, + onWarn, + compatConfig, + // state + root, + helpers: /* @__PURE__ */ new Map(), + components: /* @__PURE__ */ new Set(), + directives: /* @__PURE__ */ new Set(), + hoists: [], + imports: [], + cached: [], + constantCache: /* @__PURE__ */ new WeakMap(), + temps: 0, + identifiers: /* @__PURE__ */ Object.create(null), + scopes: { + vFor: 0, + vSlot: 0, + vPre: 0, + vOnce: 0 + }, + parent: null, + grandParent: null, + currentNode: root, + childIndex: 0, + inVOnce: false, + // methods + helper(name) { + const count = context.helpers.get(name) || 0; + context.helpers.set(name, count + 1); + return name; + }, + removeHelper(name) { + const count = context.helpers.get(name); + if (count) { + const currentCount = count - 1; + if (!currentCount) { + context.helpers.delete(name); + } else { + context.helpers.set(name, currentCount); + } + } + }, + helperString(name) { + return `_${helperNameMap[context.helper(name)]}`; + }, + replaceNode(node) { + if (!!(process.env.NODE_ENV !== "production")) { + if (!context.currentNode) { + throw new Error(`Node being replaced is already removed.`); + } + if (!context.parent) { + throw new Error(`Cannot replace root node.`); + } + } + context.parent.children[context.childIndex] = context.currentNode = node; + }, + removeNode(node) { + if (!!(process.env.NODE_ENV !== "production") && !context.parent) { + throw new Error(`Cannot remove root node.`); + } + const list = context.parent.children; + const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; + if (!!(process.env.NODE_ENV !== "production") && removalIndex < 0) { + throw new Error(`node being removed is not a child of current parent`); + } + if (!node || node === context.currentNode) { + context.currentNode = null; + context.onNodeRemoved(); + } else { + if (context.childIndex > removalIndex) { + context.childIndex--; + context.onNodeRemoved(); + } + } + context.parent.children.splice(removalIndex, 1); + }, + onNodeRemoved: NOOP, + addIdentifiers(exp) { + }, + removeIdentifiers(exp) { + }, + hoist(exp) { + if (isString(exp)) exp = createSimpleExpression(exp); + context.hoists.push(exp); + const identifier = createSimpleExpression( + `_hoisted_${context.hoists.length}`, + false, + exp.loc, + 2 + ); + identifier.hoisted = exp; + return identifier; + }, + cache(exp, isVNode = false, inVOnce = false) { + const cacheExp = createCacheExpression( + context.cached.length, + exp, + isVNode, + inVOnce + ); + context.cached.push(cacheExp); + return cacheExp; + } + }; + { + context.filters = /* @__PURE__ */ new Set(); + } + return context; +} +function transform(root, options) { + const context = createTransformContext(root, options); + traverseNode(root, context); + if (options.hoistStatic) { + cacheStatic(root, context); + } + if (!options.ssr) { + createRootCodegen(root, context); + } + root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); + root.components = [...context.components]; + root.directives = [...context.directives]; + root.imports = context.imports; + root.hoists = context.hoists; + root.temps = context.temps; + root.cached = context.cached; + root.transformed = true; + { + root.filters = [...context.filters]; + } +} +function createRootCodegen(root, context) { + const { helper } = context; + const { children } = root; + if (children.length === 1) { + const child = children[0]; + if (isSingleElementRoot(root, child) && child.codegenNode) { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + convertToBlock(codegenNode, context); + } + root.codegenNode = codegenNode; + } else { + root.codegenNode = child; + } + } else if (children.length > 1) { + let patchFlag = 64; + if (!!(process.env.NODE_ENV !== "production") && children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + } + root.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + root.children, + patchFlag, + void 0, + void 0, + true, + void 0, + false + ); + } else ; +} +function traverseChildren(parent, context) { + let i = 0; + const nodeRemoved = () => { + i--; + }; + for (; i < parent.children.length; i++) { + const child = parent.children[i]; + if (isString(child)) continue; + context.grandParent = context.parent; + context.parent = parent; + context.childIndex = i; + context.onNodeRemoved = nodeRemoved; + traverseNode(child, context); + } +} +function traverseNode(node, context) { + context.currentNode = node; + const { nodeTransforms } = context; + const exitFns = []; + for (let i2 = 0; i2 < nodeTransforms.length; i2++) { + const onExit = nodeTransforms[i2](node, context); + if (onExit) { + if (isArray(onExit)) { + exitFns.push(...onExit); + } else { + exitFns.push(onExit); + } + } + if (!context.currentNode) { + return; + } else { + node = context.currentNode; + } + } + switch (node.type) { + case 3: + if (!context.ssr) { + context.helper(CREATE_COMMENT); + } + break; + case 5: + if (!context.ssr) { + context.helper(TO_DISPLAY_STRING); + } + break; + // for container types, further traverse downwards + case 9: + for (let i2 = 0; i2 < node.branches.length; i2++) { + traverseNode(node.branches[i2], context); + } + break; + case 10: + case 11: + case 1: + case 0: + traverseChildren(node, context); + break; + } + context.currentNode = node; + let i = exitFns.length; + while (i--) { + exitFns[i](); + } +} +function createStructuralDirectiveTransform(name, fn) { + const matches = isString(name) ? (n) => n === name : (n) => name.test(n); + return (node, context) => { + if (node.type === 1) { + const { props } = node; + if (node.tagType === 3 && props.some(isVSlot)) { + return; + } + const exitFns = []; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 7 && matches(prop.name)) { + props.splice(i, 1); + i--; + const onExit = fn(node, prop, context); + if (onExit) exitFns.push(onExit); + } + } + return exitFns; + } + }; +} + +const PURE_ANNOTATION = `/*@__PURE__*/`; +const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; +function createCodegenContext(ast, { + mode = "function", + prefixIdentifiers = mode === "module", + sourceMap = false, + filename = `template.vue.html`, + scopeId = null, + optimizeImports = false, + runtimeGlobalName = `Vue`, + runtimeModuleName = `vue`, + ssrRuntimeModuleName = "vue/server-renderer", + ssr = false, + isTS = false, + inSSR = false +}) { + const context = { + mode, + prefixIdentifiers, + sourceMap, + filename, + scopeId, + optimizeImports, + runtimeGlobalName, + runtimeModuleName, + ssrRuntimeModuleName, + ssr, + isTS, + inSSR, + source: ast.source, + code: ``, + column: 1, + line: 1, + offset: 0, + indentLevel: 0, + pure: false, + map: void 0, + helper(key) { + return `_${helperNameMap[key]}`; + }, + push(code, newlineIndex = -2 /* None */, node) { + context.code += code; + }, + indent() { + newline(++context.indentLevel); + }, + deindent(withoutNewLine = false) { + if (withoutNewLine) { + --context.indentLevel; + } else { + newline(--context.indentLevel); + } + }, + newline() { + newline(context.indentLevel); + } + }; + function newline(n) { + context.push("\n" + ` `.repeat(n), 0 /* Start */); + } + return context; +} +function generate(ast, options = {}) { + const context = createCodegenContext(ast, options); + if (options.onContextCreated) options.onContextCreated(context); + const { + mode, + push, + prefixIdentifiers, + indent, + deindent, + newline, + scopeId, + ssr + } = context; + const helpers = Array.from(ast.helpers); + const hasHelpers = helpers.length > 0; + const useWithBlock = !prefixIdentifiers && mode !== "module"; + const preambleContext = context; + { + genFunctionPreamble(ast, preambleContext); + } + const functionName = ssr ? `ssrRender` : `render`; + const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; + const signature = args.join(", "); + { + push(`function ${functionName}(${signature}) {`); + } + indent(); + if (useWithBlock) { + push(`with (_ctx) {`); + indent(); + if (hasHelpers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue +`, + -1 /* End */ + ); + newline(); + } + } + if (ast.components.length) { + genAssets(ast.components, "component", context); + if (ast.directives.length || ast.temps > 0) { + newline(); + } + } + if (ast.directives.length) { + genAssets(ast.directives, "directive", context); + if (ast.temps > 0) { + newline(); + } + } + if (ast.filters && ast.filters.length) { + newline(); + genAssets(ast.filters, "filter", context); + newline(); + } + if (ast.temps > 0) { + push(`let `); + for (let i = 0; i < ast.temps; i++) { + push(`${i > 0 ? `, ` : ``}_temp${i}`); + } + } + if (ast.components.length || ast.directives.length || ast.temps) { + push(` +`, 0 /* Start */); + newline(); + } + if (!ssr) { + push(`return `); + } + if (ast.codegenNode) { + genNode(ast.codegenNode, context); + } else { + push(`null`); + } + if (useWithBlock) { + deindent(); + push(`}`); + } + deindent(); + push(`}`); + return { + ast, + code: context.code, + preamble: ``, + map: context.map ? context.map.toJSON() : void 0 + }; +} +function genFunctionPreamble(ast, context) { + const { + ssr, + prefixIdentifiers, + push, + newline, + runtimeModuleName, + runtimeGlobalName, + ssrRuntimeModuleName + } = context; + const VueBinding = runtimeGlobalName; + const helpers = Array.from(ast.helpers); + if (helpers.length > 0) { + { + push(`const _Vue = ${VueBinding} +`, -1 /* End */); + if (ast.hoists.length) { + const staticHelpers = [ + CREATE_VNODE, + CREATE_ELEMENT_VNODE, + CREATE_COMMENT, + CREATE_TEXT, + CREATE_STATIC + ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); + push(`const { ${staticHelpers} } = _Vue +`, -1 /* End */); + } + } + } + genHoists(ast.hoists, context); + newline(); + push(`return `); +} +function genAssets(assets, type, { helper, push, newline, isTS }) { + const resolver = helper( + type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE + ); + for (let i = 0; i < assets.length; i++) { + let id = assets[i]; + const maybeSelfReference = id.endsWith("__self"); + if (maybeSelfReference) { + id = id.slice(0, -6); + } + push( + `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` + ); + if (i < assets.length - 1) { + newline(); + } + } +} +function genHoists(hoists, context) { + if (!hoists.length) { + return; + } + context.pure = true; + const { push, newline } = context; + newline(); + for (let i = 0; i < hoists.length; i++) { + const exp = hoists[i]; + if (exp) { + push(`const _hoisted_${i + 1} = `); + genNode(exp, context); + newline(); + } + } + context.pure = false; +} +function isText(n) { + return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; +} +function genNodeListAsArray(nodes, context) { + const multilines = nodes.length > 3 || !!(process.env.NODE_ENV !== "production") && nodes.some((n) => isArray(n) || !isText(n)); + context.push(`[`); + multilines && context.indent(); + genNodeList(nodes, context, multilines); + multilines && context.deindent(); + context.push(`]`); +} +function genNodeList(nodes, context, multilines = false, comma = true) { + const { push, newline } = context; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (isString(node)) { + push(node, -3 /* Unknown */); + } else if (isArray(node)) { + genNodeListAsArray(node, context); + } else { + genNode(node, context); + } + if (i < nodes.length - 1) { + if (multilines) { + comma && push(","); + newline(); + } else { + comma && push(", "); + } + } + } +} +function genNode(node, context) { + if (isString(node)) { + context.push(node, -3 /* Unknown */); + return; + } + if (isSymbol(node)) { + context.push(context.helper(node)); + return; + } + switch (node.type) { + case 1: + case 9: + case 11: + !!(process.env.NODE_ENV !== "production") && assert( + node.codegenNode != null, + `Codegen node is missing for element/if/for node. Apply appropriate transforms first.` + ); + genNode(node.codegenNode, context); + break; + case 2: + genText(node, context); + break; + case 4: + genExpression(node, context); + break; + case 5: + genInterpolation(node, context); + break; + case 12: + genNode(node.codegenNode, context); + break; + case 8: + genCompoundExpression(node, context); + break; + case 3: + genComment(node, context); + break; + case 13: + genVNodeCall(node, context); + break; + case 14: + genCallExpression(node, context); + break; + case 15: + genObjectExpression(node, context); + break; + case 17: + genArrayExpression(node, context); + break; + case 18: + genFunctionExpression(node, context); + break; + case 19: + genConditionalExpression(node, context); + break; + case 20: + genCacheExpression(node, context); + break; + case 21: + genNodeList(node.body, context, true, false); + break; + // SSR only types + case 22: + break; + case 23: + break; + case 24: + break; + case 25: + break; + case 26: + break; + /* v8 ignore start */ + case 10: + break; + default: + if (!!(process.env.NODE_ENV !== "production")) { + assert(false, `unhandled codegen node type: ${node.type}`); + const exhaustiveCheck = node; + return exhaustiveCheck; + } + } +} +function genText(node, context) { + context.push(JSON.stringify(node.content), -3 /* Unknown */, node); +} +function genExpression(node, context) { + const { content, isStatic } = node; + context.push( + isStatic ? JSON.stringify(content) : content, + -3 /* Unknown */, + node + ); +} +function genInterpolation(node, context) { + const { push, helper, pure } = context; + if (pure) push(PURE_ANNOTATION); + push(`${helper(TO_DISPLAY_STRING)}(`); + genNode(node.content, context); + push(`)`); +} +function genCompoundExpression(node, context) { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child)) { + context.push(child, -3 /* Unknown */); + } else { + genNode(child, context); + } + } +} +function genExpressionAsPropertyKey(node, context) { + const { push } = context; + if (node.type === 8) { + push(`[`); + genCompoundExpression(node, context); + push(`]`); + } else if (node.isStatic) { + const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); + push(text, -2 /* None */, node); + } else { + push(`[${node.content}]`, -3 /* Unknown */, node); + } +} +function genComment(node, context) { + const { push, helper, pure } = context; + if (pure) { + push(PURE_ANNOTATION); + } + push( + `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, + -3 /* Unknown */, + node + ); +} +function genVNodeCall(node, context) { + const { push, helper, pure } = context; + const { + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent + } = node; + let patchFlagString; + if (patchFlag) { + if (!!(process.env.NODE_ENV !== "production")) { + if (patchFlag < 0) { + patchFlagString = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; + } else { + const flagNames = Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `); + patchFlagString = patchFlag + ` /* ${flagNames} */`; + } + } else { + patchFlagString = String(patchFlag); + } + } + if (directives) { + push(helper(WITH_DIRECTIVES) + `(`); + } + if (isBlock) { + push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); + } + if (pure) { + push(PURE_ANNOTATION); + } + const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); + push(helper(callHelper) + `(`, -2 /* None */, node); + genNodeList( + genNullableArgs([tag, props, children, patchFlagString, dynamicProps]), + context + ); + push(`)`); + if (isBlock) { + push(`)`); + } + if (directives) { + push(`, `); + genNode(directives, context); + push(`)`); + } +} +function genNullableArgs(args) { + let i = args.length; + while (i--) { + if (args[i] != null) break; + } + return args.slice(0, i + 1).map((arg) => arg || `null`); +} +function genCallExpression(node, context) { + const { push, helper, pure } = context; + const callee = isString(node.callee) ? node.callee : helper(node.callee); + if (pure) { + push(PURE_ANNOTATION); + } + push(callee + `(`, -2 /* None */, node); + genNodeList(node.arguments, context); + push(`)`); +} +function genObjectExpression(node, context) { + const { push, indent, deindent, newline } = context; + const { properties } = node; + if (!properties.length) { + push(`{}`, -2 /* None */, node); + return; + } + const multilines = properties.length > 1 || !!(process.env.NODE_ENV !== "production") && properties.some((p) => p.value.type !== 4); + push(multilines ? `{` : `{ `); + multilines && indent(); + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + genExpressionAsPropertyKey(key, context); + push(`: `); + genNode(value, context); + if (i < properties.length - 1) { + push(`,`); + newline(); + } + } + multilines && deindent(); + push(multilines ? `}` : ` }`); +} +function genArrayExpression(node, context) { + genNodeListAsArray(node.elements, context); +} +function genFunctionExpression(node, context) { + const { push, indent, deindent } = context; + const { params, returns, body, newline, isSlot } = node; + if (isSlot) { + push(`_${helperNameMap[WITH_CTX]}(`); + } + push(`(`, -2 /* None */, node); + if (isArray(params)) { + genNodeList(params, context); + } else if (params) { + genNode(params, context); + } + push(`) => `); + if (newline || body) { + push(`{`); + indent(); + } + if (returns) { + if (newline) { + push(`return `); + } + if (isArray(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); + } + } else if (body) { + genNode(body, context); + } + if (newline || body) { + deindent(); + push(`}`); + } + if (isSlot) { + if (node.isNonScopedSlot) { + push(`, undefined, true`); + } + push(`)`); + } +} +function genConditionalExpression(node, context) { + const { test, consequent, alternate, newline: needNewline } = node; + const { push, indent, deindent, newline } = context; + if (test.type === 4) { + const needsParens = !isSimpleIdentifier(test.content); + needsParens && push(`(`); + genExpression(test, context); + needsParens && push(`)`); + } else { + push(`(`); + genNode(test, context); + push(`)`); + } + needNewline && indent(); + context.indentLevel++; + needNewline || push(` `); + push(`? `); + genNode(consequent, context); + context.indentLevel--; + needNewline && newline(); + needNewline || push(` `); + push(`: `); + const isNested = alternate.type === 19; + if (!isNested) { + context.indentLevel++; + } + genNode(alternate, context); + if (!isNested) { + context.indentLevel--; + } + needNewline && deindent( + true + /* without newline */ + ); +} +function genCacheExpression(node, context) { + const { push, helper, indent, deindent, newline } = context; + const { needPauseTracking, needArraySpread } = node; + if (needArraySpread) { + push(`[...(`); + } + push(`_cache[${node.index}] || (`); + if (needPauseTracking) { + indent(); + push(`${helper(SET_BLOCK_TRACKING)}(-1`); + if (node.inVOnce) push(`, true`); + push(`),`); + newline(); + push(`(`); + } + push(`_cache[${node.index}] = `); + genNode(node.value, context); + if (needPauseTracking) { + push(`).cacheIndex = ${node.index},`); + newline(); + push(`${helper(SET_BLOCK_TRACKING)}(1),`); + newline(); + push(`_cache[${node.index}]`); + deindent(); + } + push(`)`); + if (needArraySpread) { + push(`)]`); + } +} + +const prohibitedKeywordRE = new RegExp( + "\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b" +); +const stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g; +function validateBrowserExpression(node, context, asParams = false, asRawStatements = false) { + const exp = node.content; + if (!exp.trim()) { + return; + } + try { + new Function( + asRawStatements ? ` ${exp} ` : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}` + ); + } catch (e) { + let message = e.message; + const keywordMatch = exp.replace(stripStringRE, "").match(prohibitedKeywordRE); + if (keywordMatch) { + message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`; + } + context.onError( + createCompilerError( + 45, + node.loc, + void 0, + message + ) + ); + } +} + +const transformExpression = (node, context) => { + if (node.type === 5) { + node.content = processExpression( + node.content, + context + ); + } else if (node.type === 1) { + const memo = findDir(node, "memo"); + for (let i = 0; i < node.props.length; i++) { + const dir = node.props[i]; + if (dir.type === 7 && dir.name !== "for") { + const exp = dir.exp; + const arg = dir.arg; + if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor) + !(memo && arg && arg.type === 4 && arg.content === "key")) { + dir.exp = processExpression( + exp, + context, + // slot args must be processed as function params + dir.name === "slot" + ); + } + if (arg && arg.type === 4 && !arg.isStatic) { + dir.arg = processExpression(arg, context); + } + } + } + } +}; +function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { + { + if (!!(process.env.NODE_ENV !== "production")) { + validateBrowserExpression(node, context, asParams, asRawStatements); + } + return node; + } +} +function stringifyExpression(exp) { + if (isString(exp)) { + return exp; + } else if (exp.type === 4) { + return exp.content; + } else { + return exp.children.map(stringifyExpression).join(""); + } +} + +const transformIf = createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + (node, dir, context) => { + return processIf(node, dir, context, (ifNode, branch, isRoot) => { + const siblings = context.parent.children; + let i = siblings.indexOf(ifNode); + let key = 0; + while (i-- >= 0) { + const sibling = siblings[i]; + if (sibling && sibling.type === 9) { + key += sibling.branches.length; + } + } + return () => { + if (isRoot) { + ifNode.codegenNode = createCodegenNodeForBranch( + branch, + key, + context + ); + } else { + const parentCondition = getParentCondition(ifNode.codegenNode); + parentCondition.alternate = createCodegenNodeForBranch( + branch, + key + ifNode.branches.length - 1, + context + ); + } + }; + }); + } +); +function processIf(node, dir, context, processCodegen) { + if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { + const loc = dir.exp ? dir.exp.loc : node.loc; + context.onError( + createCompilerError(28, dir.loc) + ); + dir.exp = createSimpleExpression(`true`, false, loc); + } + if (!!(process.env.NODE_ENV !== "production") && true && dir.exp) { + validateBrowserExpression(dir.exp, context); + } + if (dir.name === "if") { + const branch = createIfBranch(node, dir); + const ifNode = { + type: 9, + loc: cloneLoc(node.loc), + branches: [branch] + }; + context.replaceNode(ifNode); + if (processCodegen) { + return processCodegen(ifNode, branch, true); + } + } else { + const siblings = context.parent.children; + const comments = []; + let i = siblings.indexOf(node); + while (i-- >= -1) { + const sibling = siblings[i]; + if (sibling && sibling.type === 3) { + context.removeNode(sibling); + !!(process.env.NODE_ENV !== "production") && comments.unshift(sibling); + continue; + } + if (sibling && sibling.type === 2 && !sibling.content.trim().length) { + context.removeNode(sibling); + continue; + } + if (sibling && sibling.type === 9) { + if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { + context.onError( + createCompilerError(30, node.loc) + ); + } + context.removeNode(); + const branch = createIfBranch(node, dir); + if (!!(process.env.NODE_ENV !== "production") && comments.length && // #3619 ignore comments if the v-if is direct child of <transition> + !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) { + branch.children = [...comments, ...branch.children]; + } + if (!!(process.env.NODE_ENV !== "production") || false) { + const key = branch.userKey; + if (key) { + sibling.branches.forEach(({ userKey }) => { + if (isSameKey(userKey, key)) { + context.onError( + createCompilerError( + 29, + branch.userKey.loc + ) + ); + } + }); + } + } + sibling.branches.push(branch); + const onExit = processCodegen && processCodegen(sibling, branch, false); + traverseNode(branch, context); + if (onExit) onExit(); + context.currentNode = null; + } else { + context.onError( + createCompilerError(30, node.loc) + ); + } + break; + } + } +} +function createIfBranch(node, dir) { + const isTemplateIf = node.tagType === 3; + return { + type: 10, + loc: node.loc, + condition: dir.name === "else" ? void 0 : dir.exp, + children: isTemplateIf && !findDir(node, "for") ? node.children : [node], + userKey: findProp(node, `key`), + isTemplateIf + }; +} +function createCodegenNodeForBranch(branch, keyIndex, context) { + if (branch.condition) { + return createConditionalExpression( + branch.condition, + createChildrenCodegenNode(branch, keyIndex, context), + // make sure to pass in asBlock: true so that the comment node call + // closes the current block. + createCallExpression(context.helper(CREATE_COMMENT), [ + !!(process.env.NODE_ENV !== "production") ? '"v-if"' : '""', + "true" + ]) + ); + } else { + return createChildrenCodegenNode(branch, keyIndex, context); + } +} +function createChildrenCodegenNode(branch, keyIndex, context) { + const { helper } = context; + const keyProperty = createObjectProperty( + `key`, + createSimpleExpression( + `${keyIndex}`, + false, + locStub, + 2 + ) + ); + const { children } = branch; + const firstChild = children[0]; + const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; + if (needFragmentWrapper) { + if (children.length === 1 && firstChild.type === 11) { + const vnodeCall = firstChild.codegenNode; + injectProp(vnodeCall, keyProperty, context); + return vnodeCall; + } else { + let patchFlag = 64; + if (!!(process.env.NODE_ENV !== "production") && !branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + } + return createVNodeCall( + context, + helper(FRAGMENT), + createObjectExpression([keyProperty]), + children, + patchFlag, + void 0, + void 0, + true, + false, + false, + branch.loc + ); + } + } else { + const ret = firstChild.codegenNode; + const vnodeCall = getMemoedVNodeCall(ret); + if (vnodeCall.type === 13) { + convertToBlock(vnodeCall, context); + } + injectProp(vnodeCall, keyProperty, context); + return ret; + } +} +function isSameKey(a, b) { + if (!a || a.type !== b.type) { + return false; + } + if (a.type === 6) { + if (a.value.content !== b.value.content) { + return false; + } + } else { + const exp = a.exp; + const branchExp = b.exp; + if (exp.type !== branchExp.type) { + return false; + } + if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { + return false; + } + } + return true; +} +function getParentCondition(node) { + while (true) { + if (node.type === 19) { + if (node.alternate.type === 19) { + node = node.alternate; + } else { + return node; + } + } else if (node.type === 20) { + node = node.value; + } + } +} + +const transformBind = (dir, _node, context) => { + const { modifiers, loc } = dir; + const arg = dir.arg; + let { exp } = dir; + if (exp && exp.type === 4 && !exp.content.trim()) { + { + exp = void 0; + } + } + if (!exp) { + if (arg.type !== 4 || !arg.isStatic) { + context.onError( + createCompilerError( + 52, + arg.loc + ) + ); + return { + props: [ + createObjectProperty(arg, createSimpleExpression("", true, loc)) + ] + }; + } + transformBindShorthand(dir); + exp = dir.exp; + } + if (arg.type !== 4) { + arg.children.unshift(`(`); + arg.children.push(`) || ""`); + } else if (!arg.isStatic) { + arg.content = `${arg.content} || ""`; + } + if (modifiers.some((mod) => mod.content === "camel")) { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = camelize(arg.content); + } else { + arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; + } + } else { + arg.children.unshift(`${context.helperString(CAMELIZE)}(`); + arg.children.push(`)`); + } + } + if (!context.inSSR) { + if (modifiers.some((mod) => mod.content === "prop")) { + injectPrefix(arg, "."); + } + if (modifiers.some((mod) => mod.content === "attr")) { + injectPrefix(arg, "^"); + } + } + return { + props: [createObjectProperty(arg, exp)] + }; +}; +const transformBindShorthand = (dir, context) => { + const arg = dir.arg; + const propName = camelize(arg.content); + dir.exp = createSimpleExpression(propName, false, arg.loc); +}; +const injectPrefix = (arg, prefix) => { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = prefix + arg.content; + } else { + arg.content = `\`${prefix}\${${arg.content}}\``; + } + } else { + arg.children.unshift(`'${prefix}' + (`); + arg.children.push(`)`); + } +}; + +const transformFor = createStructuralDirectiveTransform( + "for", + (node, dir, context) => { + const { helper, removeHelper } = context; + return processFor(node, dir, context, (forNode) => { + const renderExp = createCallExpression(helper(RENDER_LIST), [ + forNode.source + ]); + const isTemplate = isTemplateNode(node); + const memo = findDir(node, "memo"); + const keyProp = findProp(node, `key`, false, true); + const isDirKey = keyProp && keyProp.type === 7; + if (isDirKey && !keyProp.exp) { + transformBindShorthand(keyProp); + } + let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp); + const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null; + const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; + const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; + forNode.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + renderExp, + fragmentFlag, + void 0, + void 0, + true, + !isStableFragment, + false, + node.loc + ); + return () => { + let childBlock; + const { children } = forNode; + if ((!!(process.env.NODE_ENV !== "production") || false) && isTemplate) { + node.children.some((c) => { + if (c.type === 1) { + const key = findProp(c, "key"); + if (key) { + context.onError( + createCompilerError( + 33, + key.loc + ) + ); + return true; + } + } + }); + } + const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; + const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; + if (slotOutlet) { + childBlock = slotOutlet.codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + } else if (needFragmentWrapper) { + childBlock = createVNodeCall( + context, + helper(FRAGMENT), + keyProperty ? createObjectExpression([keyProperty]) : void 0, + node.children, + 64, + void 0, + void 0, + true, + void 0, + false + ); + } else { + childBlock = children[0].codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + if (childBlock.isBlock !== !isStableFragment) { + if (childBlock.isBlock) { + removeHelper(OPEN_BLOCK); + removeHelper( + getVNodeBlockHelper(context.inSSR, childBlock.isComponent) + ); + } else { + removeHelper( + getVNodeHelper(context.inSSR, childBlock.isComponent) + ); + } + } + childBlock.isBlock = !isStableFragment; + if (childBlock.isBlock) { + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); + } else { + helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); + } + } + if (memo) { + const loop = createFunctionExpression( + createForLoopParams(forNode.parseResult, [ + createSimpleExpression(`_cached`) + ]) + ); + loop.body = createBlockStatement([ + createCompoundExpression([`const _memo = (`, memo.exp, `)`]), + createCompoundExpression([ + `if (_cached`, + ...keyExp ? [` && _cached.key === `, keyExp] : [], + ` && ${context.helperString( + IS_MEMO_SAME + )}(_cached, _memo)) return _cached` + ]), + createCompoundExpression([`const _item = `, childBlock]), + createSimpleExpression(`_item.memo = _memo`), + createSimpleExpression(`return _item`) + ]); + renderExp.arguments.push( + loop, + createSimpleExpression(`_cache`), + createSimpleExpression(String(context.cached.length)) + ); + context.cached.push(null); + } else { + renderExp.arguments.push( + createFunctionExpression( + createForLoopParams(forNode.parseResult), + childBlock, + true + ) + ); + } + }; + }); + } +); +function processFor(node, dir, context, processCodegen) { + if (!dir.exp) { + context.onError( + createCompilerError(31, dir.loc) + ); + return; + } + const parseResult = dir.forParseResult; + if (!parseResult) { + context.onError( + createCompilerError(32, dir.loc) + ); + return; + } + finalizeForParseResult(parseResult, context); + const { addIdentifiers, removeIdentifiers, scopes } = context; + const { source, value, key, index } = parseResult; + const forNode = { + type: 11, + loc: dir.loc, + source, + valueAlias: value, + keyAlias: key, + objectIndexAlias: index, + parseResult, + children: isTemplateNode(node) ? node.children : [node] + }; + context.replaceNode(forNode); + scopes.vFor++; + const onExit = processCodegen && processCodegen(forNode); + return () => { + scopes.vFor--; + if (onExit) onExit(); + }; +} +function finalizeForParseResult(result, context) { + if (result.finalized) return; + if (!!(process.env.NODE_ENV !== "production") && true) { + validateBrowserExpression(result.source, context); + if (result.key) { + validateBrowserExpression( + result.key, + context, + true + ); + } + if (result.index) { + validateBrowserExpression( + result.index, + context, + true + ); + } + if (result.value) { + validateBrowserExpression( + result.value, + context, + true + ); + } + } + result.finalized = true; +} +function createForLoopParams({ value, key, index }, memoArgs = []) { + return createParamsList([value, key, index, ...memoArgs]); +} +function createParamsList(args) { + let i = args.length; + while (i--) { + if (args[i]) break; + } + return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); +} + +const defaultFallback = createSimpleExpression(`undefined`, false); +const trackSlotScopes = (node, context) => { + if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { + const vSlot = findDir(node, "slot"); + if (vSlot) { + vSlot.exp; + context.scopes.vSlot++; + return () => { + context.scopes.vSlot--; + }; + } + } +}; +const trackVForSlotScopes = (node, context) => { + let vFor; + if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) { + const result = vFor.forParseResult; + if (result) { + finalizeForParseResult(result, context); + const { value, key, index } = result; + const { addIdentifiers, removeIdentifiers } = context; + value && addIdentifiers(value); + key && addIdentifiers(key); + index && addIdentifiers(index); + return () => { + value && removeIdentifiers(value); + key && removeIdentifiers(key); + index && removeIdentifiers(index); + }; + } + } +}; +const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( + props, + children, + false, + true, + children.length ? children[0].loc : loc +); +function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { + context.helper(WITH_CTX); + const { children, loc } = node; + const slotsProperties = []; + const dynamicSlots = []; + let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; + const onComponentSlot = findDir(node, "slot", true); + if (onComponentSlot) { + const { arg, exp } = onComponentSlot; + if (arg && !isStaticExp(arg)) { + hasDynamicSlots = true; + } + slotsProperties.push( + createObjectProperty( + arg || createSimpleExpression("default", true), + buildSlotFn(exp, void 0, children, loc) + ) + ); + } + let hasTemplateSlots = false; + let hasNamedDefaultSlot = false; + const implicitDefaultChildren = []; + const seenSlotNames = /* @__PURE__ */ new Set(); + let conditionalBranchIndex = 0; + for (let i = 0; i < children.length; i++) { + const slotElement = children[i]; + let slotDir; + if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { + if (slotElement.type !== 3) { + implicitDefaultChildren.push(slotElement); + } + continue; + } + if (onComponentSlot) { + context.onError( + createCompilerError(37, slotDir.loc) + ); + break; + } + hasTemplateSlots = true; + const { children: slotChildren, loc: slotLoc } = slotElement; + const { + arg: slotName = createSimpleExpression(`default`, true), + exp: slotProps, + loc: dirLoc + } = slotDir; + let staticSlotName; + if (isStaticExp(slotName)) { + staticSlotName = slotName ? slotName.content : `default`; + } else { + hasDynamicSlots = true; + } + const vFor = findDir(slotElement, "for"); + const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); + let vIf; + let vElse; + if (vIf = findDir(slotElement, "if")) { + hasDynamicSlots = true; + dynamicSlots.push( + createConditionalExpression( + vIf.exp, + buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), + defaultFallback + ) + ); + } else if (vElse = findDir( + slotElement, + /^else(-if)?$/, + true + /* allowEmpty */ + )) { + let j = i; + let prev; + while (j--) { + prev = children[j]; + if (prev.type !== 3) { + break; + } + } + if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) { + let conditional = dynamicSlots[dynamicSlots.length - 1]; + while (conditional.alternate.type === 19) { + conditional = conditional.alternate; + } + conditional.alternate = vElse.exp ? createConditionalExpression( + vElse.exp, + buildDynamicSlot( + slotName, + slotFunction, + conditionalBranchIndex++ + ), + defaultFallback + ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); + } else { + context.onError( + createCompilerError(30, vElse.loc) + ); + } + } else if (vFor) { + hasDynamicSlots = true; + const parseResult = vFor.forParseResult; + if (parseResult) { + finalizeForParseResult(parseResult, context); + dynamicSlots.push( + createCallExpression(context.helper(RENDER_LIST), [ + parseResult.source, + createFunctionExpression( + createForLoopParams(parseResult), + buildDynamicSlot(slotName, slotFunction), + true + ) + ]) + ); + } else { + context.onError( + createCompilerError( + 32, + vFor.loc + ) + ); + } + } else { + if (staticSlotName) { + if (seenSlotNames.has(staticSlotName)) { + context.onError( + createCompilerError( + 38, + dirLoc + ) + ); + continue; + } + seenSlotNames.add(staticSlotName); + if (staticSlotName === "default") { + hasNamedDefaultSlot = true; + } + } + slotsProperties.push(createObjectProperty(slotName, slotFunction)); + } + } + if (!onComponentSlot) { + const buildDefaultSlotProperty = (props, children2) => { + const fn = buildSlotFn(props, void 0, children2, loc); + if (context.compatConfig) { + fn.isNonScopedSlot = true; + } + return createObjectProperty(`default`, fn); + }; + if (!hasTemplateSlots) { + slotsProperties.push(buildDefaultSlotProperty(void 0, children)); + } else if (implicitDefaultChildren.length && // #3766 + // with whitespace: 'preserve', whitespaces between slots will end up in + // implicitDefaultChildren. Ignore if all implicit children are whitespaces. + implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { + if (hasNamedDefaultSlot) { + context.onError( + createCompilerError( + 39, + implicitDefaultChildren[0].loc + ) + ); + } else { + slotsProperties.push( + buildDefaultSlotProperty(void 0, implicitDefaultChildren) + ); + } + } + } + const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; + let slots = createObjectExpression( + slotsProperties.concat( + createObjectProperty( + `_`, + // 2 = compiled but dynamic = can skip normalization, but must run diff + // 1 = compiled and static = can skip normalization AND diff as optimized + createSimpleExpression( + slotFlag + (!!(process.env.NODE_ENV !== "production") ? ` /* ${slotFlagsText[slotFlag]} */` : ``), + false + ) + ) + ), + loc + ); + if (dynamicSlots.length) { + slots = createCallExpression(context.helper(CREATE_SLOTS), [ + slots, + createArrayExpression(dynamicSlots) + ]); + } + return { + slots, + hasDynamicSlots + }; +} +function buildDynamicSlot(name, fn, index) { + const props = [ + createObjectProperty(`name`, name), + createObjectProperty(`fn`, fn) + ]; + if (index != null) { + props.push( + createObjectProperty(`key`, createSimpleExpression(String(index), true)) + ); + } + return createObjectExpression(props); +} +function hasForwardedSlots(children) { + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + if (child.tagType === 2 || hasForwardedSlots(child.children)) { + return true; + } + break; + case 9: + if (hasForwardedSlots(child.branches)) return true; + break; + case 10: + case 11: + if (hasForwardedSlots(child.children)) return true; + break; + } + } + return false; +} +function isNonWhitespaceContent(node) { + if (node.type !== 2 && node.type !== 12) + return true; + return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); +} + +const directiveImportMap = /* @__PURE__ */ new WeakMap(); +const transformElement = (node, context) => { + return function postTransformElement() { + node = context.currentNode; + if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { + return; + } + const { tag, props } = node; + const isComponent = node.tagType === 1; + let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; + const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; + let vnodeProps; + let vnodeChildren; + let patchFlag = 0; + let vnodeDynamicProps; + let dynamicPropNames; + let vnodeDirectives; + let shouldUseBlock = ( + // dynamic component may resolve to plain elements + isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block + // updates inside get proper isSVG flag at runtime. (#639, #643) + // This is technically web-specific, but splitting the logic out of core + // leads to too much unnecessary complexity. + (tag === "svg" || tag === "foreignObject" || tag === "math") + ); + if (props.length > 0) { + const propsBuildResult = buildProps( + node, + context, + void 0, + isComponent, + isDynamicComponent + ); + vnodeProps = propsBuildResult.props; + patchFlag = propsBuildResult.patchFlag; + dynamicPropNames = propsBuildResult.dynamicPropNames; + const directives = propsBuildResult.directives; + vnodeDirectives = directives && directives.length ? createArrayExpression( + directives.map((dir) => buildDirectiveArgs(dir, context)) + ) : void 0; + if (propsBuildResult.shouldUseBlock) { + shouldUseBlock = true; + } + } + if (node.children.length > 0) { + if (vnodeTag === KEEP_ALIVE) { + shouldUseBlock = true; + patchFlag |= 1024; + if (!!(process.env.NODE_ENV !== "production") && node.children.length > 1) { + context.onError( + createCompilerError(46, { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + }) + ); + } + } + const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling + vnodeTag !== TELEPORT && // explained above. + vnodeTag !== KEEP_ALIVE; + if (shouldBuildAsSlots) { + const { slots, hasDynamicSlots } = buildSlots(node, context); + vnodeChildren = slots; + if (hasDynamicSlots) { + patchFlag |= 1024; + } + } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { + const child = node.children[0]; + const type = child.type; + const hasDynamicTextChild = type === 5 || type === 8; + if (hasDynamicTextChild && getConstantType(child, context) === 0) { + patchFlag |= 1; + } + if (hasDynamicTextChild || type === 2) { + vnodeChildren = child; + } else { + vnodeChildren = node.children; + } + } else { + vnodeChildren = node.children; + } + } + if (dynamicPropNames && dynamicPropNames.length) { + vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); + } + node.codegenNode = createVNodeCall( + context, + vnodeTag, + vnodeProps, + vnodeChildren, + patchFlag === 0 ? void 0 : patchFlag, + vnodeDynamicProps, + vnodeDirectives, + !!shouldUseBlock, + false, + isComponent, + node.loc + ); + }; +}; +function resolveComponentType(node, context, ssr = false) { + let { tag } = node; + const isExplicitDynamic = isComponentTag(tag); + const isProp = findProp( + node, + "is", + false, + true + /* allow empty */ + ); + if (isProp) { + if (isExplicitDynamic || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + )) { + let exp; + if (isProp.type === 6) { + exp = isProp.value && createSimpleExpression(isProp.value.content, true); + } else { + exp = isProp.exp; + if (!exp) { + exp = createSimpleExpression(`is`, false, isProp.arg.loc); + } + } + if (exp) { + return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ + exp + ]); + } + } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { + tag = isProp.value.content.slice(4); + } + } + const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); + if (builtIn) { + if (!ssr) context.helper(builtIn); + return builtIn; + } + context.helper(RESOLVE_COMPONENT); + context.components.add(tag); + return toValidAssetId(tag, `component`); +} +function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { + const { tag, loc: elementLoc, children } = node; + let properties = []; + const mergeArgs = []; + const runtimeDirectives = []; + const hasChildren = children.length > 0; + let shouldUseBlock = false; + let patchFlag = 0; + let hasRef = false; + let hasClassBinding = false; + let hasStyleBinding = false; + let hasHydrationEventBinding = false; + let hasDynamicKeys = false; + let hasVnodeHook = false; + const dynamicPropNames = []; + const pushMergeArg = (arg) => { + if (properties.length) { + mergeArgs.push( + createObjectExpression(dedupeProperties(properties), elementLoc) + ); + properties = []; + } + if (arg) mergeArgs.push(arg); + }; + const pushRefVForMarker = () => { + if (context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); + } + }; + const analyzePatchFlag = ({ key, value }) => { + if (isStaticExp(key)) { + const name = key.content; + const isEventHandler = isOn(name); + if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click + // dedicated fast path. + name.toLowerCase() !== "onclick" && // omit v-model handlers + name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks + !isReservedProp(name)) { + hasHydrationEventBinding = true; + } + if (isEventHandler && isReservedProp(name)) { + hasVnodeHook = true; + } + if (isEventHandler && value.type === 14) { + value = value.arguments[0]; + } + if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { + return; + } + if (name === "ref") { + hasRef = true; + } else if (name === "class") { + hasClassBinding = true; + } else if (name === "style") { + hasStyleBinding = true; + } else if (name !== "key" && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + } else { + hasDynamicKeys = true; + } + }; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 6) { + const { loc, name, nameLoc, value } = prop; + let isStatic = true; + if (name === "ref") { + hasRef = true; + pushRefVForMarker(); + } + if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + properties.push( + createObjectProperty( + createSimpleExpression(name, true, nameLoc), + createSimpleExpression( + value ? value.content : "", + isStatic, + value ? value.loc : loc + ) + ) + ); + } else { + const { name, arg, exp, loc, modifiers } = prop; + const isVBind = name === "bind"; + const isVOn = name === "on"; + if (name === "slot") { + if (!isComponent) { + context.onError( + createCompilerError(40, loc) + ); + } + continue; + } + if (name === "once" || name === "memo") { + continue; + } + if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + if (isVOn && ssr) { + continue; + } + if ( + // #938: elements with dynamic keys should be forced into blocks + isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked + // before children + isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") + ) { + shouldUseBlock = true; + } + if (isVBind && isStaticArgOf(arg, "ref")) { + pushRefVForMarker(); + } + if (!arg && (isVBind || isVOn)) { + hasDynamicKeys = true; + if (exp) { + if (isVBind) { + pushRefVForMarker(); + pushMergeArg(); + { + if (!!(process.env.NODE_ENV !== "production")) { + const hasOverridableKeys = mergeArgs.some((arg2) => { + if (arg2.type === 15) { + return arg2.properties.some(({ key }) => { + if (key.type !== 4 || !key.isStatic) { + return true; + } + return key.content !== "class" && key.content !== "style" && !isOn(key.content); + }); + } else { + return true; + } + }); + if (hasOverridableKeys) { + checkCompatEnabled( + "COMPILER_V_BIND_OBJECT_ORDER", + context, + loc + ); + } + } + if (isCompatEnabled( + "COMPILER_V_BIND_OBJECT_ORDER", + context + )) { + mergeArgs.unshift(exp); + continue; + } + } + mergeArgs.push(exp); + } else { + pushMergeArg({ + type: 14, + loc, + callee: context.helper(TO_HANDLERS), + arguments: isComponent ? [exp] : [exp, `true`] + }); + } + } else { + context.onError( + createCompilerError( + isVBind ? 34 : 35, + loc + ) + ); + } + continue; + } + if (isVBind && modifiers.some((mod) => mod.content === "prop")) { + patchFlag |= 32; + } + const directiveTransform = context.directiveTransforms[name]; + if (directiveTransform) { + const { props: props2, needRuntime } = directiveTransform(prop, node, context); + !ssr && props2.forEach(analyzePatchFlag); + if (isVOn && arg && !isStaticExp(arg)) { + pushMergeArg(createObjectExpression(props2, elementLoc)); + } else { + properties.push(...props2); + } + if (needRuntime) { + runtimeDirectives.push(prop); + if (isSymbol(needRuntime)) { + directiveImportMap.set(prop, needRuntime); + } + } + } else if (!isBuiltInDirective(name)) { + runtimeDirectives.push(prop); + if (hasChildren) { + shouldUseBlock = true; + } + } + } + } + let propsExpression = void 0; + if (mergeArgs.length) { + pushMergeArg(); + if (mergeArgs.length > 1) { + propsExpression = createCallExpression( + context.helper(MERGE_PROPS), + mergeArgs, + elementLoc + ); + } else { + propsExpression = mergeArgs[0]; + } + } else if (properties.length) { + propsExpression = createObjectExpression( + dedupeProperties(properties), + elementLoc + ); + } + if (hasDynamicKeys) { + patchFlag |= 16; + } else { + if (hasClassBinding && !isComponent) { + patchFlag |= 2; + } + if (hasStyleBinding && !isComponent) { + patchFlag |= 4; + } + if (dynamicPropNames.length) { + patchFlag |= 8; + } + if (hasHydrationEventBinding) { + patchFlag |= 32; + } + } + if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { + patchFlag |= 512; + } + if (!context.inSSR && propsExpression) { + switch (propsExpression.type) { + case 15: + let classKeyIndex = -1; + let styleKeyIndex = -1; + let hasDynamicKey = false; + for (let i = 0; i < propsExpression.properties.length; i++) { + const key = propsExpression.properties[i].key; + if (isStaticExp(key)) { + if (key.content === "class") { + classKeyIndex = i; + } else if (key.content === "style") { + styleKeyIndex = i; + } + } else if (!key.isHandlerKey) { + hasDynamicKey = true; + } + } + const classProp = propsExpression.properties[classKeyIndex]; + const styleProp = propsExpression.properties[styleKeyIndex]; + if (!hasDynamicKey) { + if (classProp && !isStaticExp(classProp.value)) { + classProp.value = createCallExpression( + context.helper(NORMALIZE_CLASS), + [classProp.value] + ); + } + if (styleProp && // the static style is compiled into an object, + // so use `hasStyleBinding` to ensure that it is a dynamic style binding + (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, + // v-bind:style with static literal object + styleProp.value.type === 17)) { + styleProp.value = createCallExpression( + context.helper(NORMALIZE_STYLE), + [styleProp.value] + ); + } + } else { + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [propsExpression] + ); + } + break; + case 14: + break; + default: + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [ + createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ + propsExpression + ]) + ] + ); + break; + } + } + return { + props: propsExpression, + directives: runtimeDirectives, + patchFlag, + dynamicPropNames, + shouldUseBlock + }; +} +function dedupeProperties(properties) { + const knownProps = /* @__PURE__ */ new Map(); + const deduped = []; + for (let i = 0; i < properties.length; i++) { + const prop = properties[i]; + if (prop.key.type === 8 || !prop.key.isStatic) { + deduped.push(prop); + continue; + } + const name = prop.key.content; + const existing = knownProps.get(name); + if (existing) { + if (name === "style" || name === "class" || isOn(name)) { + mergeAsArray(existing, prop); + } + } else { + knownProps.set(name, prop); + deduped.push(prop); + } + } + return deduped; +} +function mergeAsArray(existing, incoming) { + if (existing.value.type === 17) { + existing.value.elements.push(incoming.value); + } else { + existing.value = createArrayExpression( + [existing.value, incoming.value], + existing.loc + ); + } +} +function buildDirectiveArgs(dir, context) { + const dirArgs = []; + const runtime = directiveImportMap.get(dir); + if (runtime) { + dirArgs.push(context.helperString(runtime)); + } else { + { + context.helper(RESOLVE_DIRECTIVE); + context.directives.add(dir.name); + dirArgs.push(toValidAssetId(dir.name, `directive`)); + } + } + const { loc } = dir; + if (dir.exp) dirArgs.push(dir.exp); + if (dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(dir.arg); + } + if (Object.keys(dir.modifiers).length) { + if (!dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(`void 0`); + } + const trueExpression = createSimpleExpression(`true`, false, loc); + dirArgs.push( + createObjectExpression( + dir.modifiers.map( + (modifier) => createObjectProperty(modifier, trueExpression) + ), + loc + ) + ); + } + return createArrayExpression(dirArgs, dir.loc); +} +function stringifyDynamicPropNames(props) { + let propsNamesString = `[`; + for (let i = 0, l = props.length; i < l; i++) { + propsNamesString += JSON.stringify(props[i]); + if (i < l - 1) propsNamesString += ", "; + } + return propsNamesString + `]`; +} +function isComponentTag(tag) { + return tag === "component" || tag === "Component"; +} + +const transformSlotOutlet = (node, context) => { + if (isSlotOutlet(node)) { + const { children, loc } = node; + const { slotName, slotProps } = processSlotOutlet(node, context); + const slotArgs = [ + context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, + slotName, + "{}", + "undefined", + "true" + ]; + let expectedLen = 2; + if (slotProps) { + slotArgs[2] = slotProps; + expectedLen = 3; + } + if (children.length) { + slotArgs[3] = createFunctionExpression([], children, false, false, loc); + expectedLen = 4; + } + if (context.scopeId && !context.slotted) { + expectedLen = 5; + } + slotArgs.splice(expectedLen); + node.codegenNode = createCallExpression( + context.helper(RENDER_SLOT), + slotArgs, + loc + ); + } +}; +function processSlotOutlet(node, context) { + let slotName = `"default"`; + let slotProps = void 0; + const nonNameProps = []; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (p.value) { + if (p.name === "name") { + slotName = JSON.stringify(p.value.content); + } else { + p.name = camelize(p.name); + nonNameProps.push(p); + } + } + } else { + if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { + if (p.exp) { + slotName = p.exp; + } else if (p.arg && p.arg.type === 4) { + const name = camelize(p.arg.content); + slotName = p.exp = createSimpleExpression(name, false, p.arg.loc); + } + } else { + if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { + p.arg.content = camelize(p.arg.content); + } + nonNameProps.push(p); + } + } + } + if (nonNameProps.length > 0) { + const { props, directives } = buildProps( + node, + context, + nonNameProps, + false, + false + ); + slotProps = props; + if (directives.length) { + context.onError( + createCompilerError( + 36, + directives[0].loc + ) + ); + } + } + return { + slotName, + slotProps + }; +} + +const transformOn = (dir, node, context, augmentor) => { + const { loc, modifiers, arg } = dir; + if (!dir.exp && !modifiers.length) { + context.onError(createCompilerError(35, loc)); + } + let eventName; + if (arg.type === 4) { + if (arg.isStatic) { + let rawName = arg.content; + if (!!(process.env.NODE_ENV !== "production") && rawName.startsWith("vnode")) { + context.onError(createCompilerError(51, arg.loc)); + } + if (rawName.startsWith("vue:")) { + rawName = `vnode-${rawName.slice(4)}`; + } + const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( + // for non-element and vnode lifecycle event listeners, auto convert + // it to camelCase. See issue #2249 + toHandlerKey(camelize(rawName)) + ) : ( + // preserve case for plain element listeners that have uppercase + // letters, as these may be custom elements' custom events + `on:${rawName}` + ); + eventName = createSimpleExpression(eventString, true, arg.loc); + } else { + eventName = createCompoundExpression([ + `${context.helperString(TO_HANDLER_KEY)}(`, + arg, + `)` + ]); + } + } else { + eventName = arg; + eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); + eventName.children.push(`)`); + } + let exp = dir.exp; + if (exp && !exp.content.trim()) { + exp = void 0; + } + let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; + if (exp) { + const isMemberExp = isMemberExpression(exp); + const isInlineStatement = !(isMemberExp || isFnExpression(exp)); + const hasMultipleStatements = exp.content.includes(`;`); + if (!!(process.env.NODE_ENV !== "production") && true) { + validateBrowserExpression( + exp, + context, + false, + hasMultipleStatements + ); + } + if (isInlineStatement || shouldCache && isMemberExp) { + exp = createCompoundExpression([ + `${isInlineStatement ? `$event` : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, + exp, + hasMultipleStatements ? `}` : `)` + ]); + } + } + let ret = { + props: [ + createObjectProperty( + eventName, + exp || createSimpleExpression(`() => {}`, false, loc) + ) + ] + }; + if (augmentor) { + ret = augmentor(ret); + } + if (shouldCache) { + ret.props[0].value = context.cache(ret.props[0].value); + } + ret.props.forEach((p) => p.key.isHandlerKey = true); + return ret; +}; + +const transformText = (node, context) => { + if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { + return () => { + const children = node.children; + let currentContainer = void 0; + let hasText = false; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child)) { + hasText = true; + for (let j = i + 1; j < children.length; j++) { + const next = children[j]; + if (isText$1(next)) { + if (!currentContainer) { + currentContainer = children[i] = createCompoundExpression( + [child], + child.loc + ); + } + currentContainer.children.push(` + `, next); + children.splice(j, 1); + j--; + } else { + currentContainer = void 0; + break; + } + } + } + } + if (!hasText || // if this is a plain element with a single text child, leave it + // as-is since the runtime has dedicated fast path for this by directly + // setting textContent of the element. + // for component root it's always normalized anyway. + children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 + // custom directives can potentially add DOM elements arbitrarily, + // we need to avoid setting textContent of the element at runtime + // to avoid accidentally overwriting the DOM elements added + // by the user through custom directives. + !node.props.find( + (p) => p.type === 7 && !context.directiveTransforms[p.name] + ) && // in compat mode, <template> tags with no special directives + // will be rendered as a fragment so its children must be + // converted into vnodes. + !(node.tag === "template"))) { + return; + } + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child) || child.type === 8) { + const callArgs = []; + if (child.type !== 2 || child.content !== " ") { + callArgs.push(child); + } + if (!context.ssr && getConstantType(child, context) === 0) { + callArgs.push( + 1 + (!!(process.env.NODE_ENV !== "production") ? ` /* ${PatchFlagNames[1]} */` : ``) + ); + } + children[i] = { + type: 12, + content: child, + loc: child.loc, + codegenNode: createCallExpression( + context.helper(CREATE_TEXT), + callArgs + ) + }; + } + } + }; + } +}; + +const seen$1 = /* @__PURE__ */ new WeakSet(); +const transformOnce = (node, context) => { + if (node.type === 1 && findDir(node, "once", true)) { + if (seen$1.has(node) || context.inVOnce || context.inSSR) { + return; + } + seen$1.add(node); + context.inVOnce = true; + context.helper(SET_BLOCK_TRACKING); + return () => { + context.inVOnce = false; + const cur = context.currentNode; + if (cur.codegenNode) { + cur.codegenNode = context.cache( + cur.codegenNode, + true, + true + ); + } + }; + } +}; + +const transformModel = (dir, node, context) => { + const { exp, arg } = dir; + if (!exp) { + context.onError( + createCompilerError(41, dir.loc) + ); + return createTransformProps(); + } + const rawExp = exp.loc.source.trim(); + const expString = exp.type === 4 ? exp.content : rawExp; + const bindingType = context.bindingMetadata[rawExp]; + if (bindingType === "props" || bindingType === "props-aliased") { + context.onError(createCompilerError(44, exp.loc)); + return createTransformProps(); + } + const maybeRef = false; + if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) { + context.onError( + createCompilerError(42, exp.loc) + ); + return createTransformProps(); + } + const propName = arg ? arg : createSimpleExpression("modelValue", true); + const eventName = arg ? isStaticExp(arg) ? `onUpdate:${camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; + let assignmentExp; + const eventArg = context.isTS ? `($event: any)` : `$event`; + { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + exp, + `) = $event)` + ]); + } + const props = [ + // modelValue: foo + createObjectProperty(propName, dir.exp), + // "onUpdate:modelValue": $event => (foo = $event) + createObjectProperty(eventName, assignmentExp) + ]; + if (dir.modifiers.length && node.tagType === 1) { + const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); + const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; + props.push( + createObjectProperty( + modifiersKey, + createSimpleExpression( + `{ ${modifiers} }`, + false, + dir.loc, + 2 + ) + ) + ); + } + return createTransformProps(props); +}; +function createTransformProps(props = []) { + return { props }; +} + +const validDivisionCharRE = /[\w).+\-_$\]]/; +const transformFilter = (node, context) => { + if (!isCompatEnabled("COMPILER_FILTERS", context)) { + return; + } + if (node.type === 5) { + rewriteFilter(node.content, context); + } else if (node.type === 1) { + node.props.forEach((prop) => { + if (prop.type === 7 && prop.name !== "for" && prop.exp) { + rewriteFilter(prop.exp, context); + } + }); + } +}; +function rewriteFilter(node, context) { + if (node.type === 4) { + parseFilter(node, context); + } else { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (typeof child !== "object") continue; + if (child.type === 4) { + parseFilter(child, context); + } else if (child.type === 8) { + rewriteFilter(node, context); + } else if (child.type === 5) { + rewriteFilter(child.content, context); + } + } + } +} +function parseFilter(node, context) { + const exp = node.content; + let inSingle = false; + let inDouble = false; + let inTemplateString = false; + let inRegex = false; + let curly = 0; + let square = 0; + let paren = 0; + let lastFilterIndex = 0; + let c, prev, i, expression, filters = []; + for (i = 0; i < exp.length; i++) { + prev = c; + c = exp.charCodeAt(i); + if (inSingle) { + if (c === 39 && prev !== 92) inSingle = false; + } else if (inDouble) { + if (c === 34 && prev !== 92) inDouble = false; + } else if (inTemplateString) { + if (c === 96 && prev !== 92) inTemplateString = false; + } else if (inRegex) { + if (c === 47 && prev !== 92) inRegex = false; + } else if (c === 124 && // pipe + exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) { + if (expression === void 0) { + lastFilterIndex = i + 1; + expression = exp.slice(0, i).trim(); + } else { + pushFilter(); + } + } else { + switch (c) { + case 34: + inDouble = true; + break; + // " + case 39: + inSingle = true; + break; + // ' + case 96: + inTemplateString = true; + break; + // ` + case 40: + paren++; + break; + // ( + case 41: + paren--; + break; + // ) + case 91: + square++; + break; + // [ + case 93: + square--; + break; + // ] + case 123: + curly++; + break; + // { + case 125: + curly--; + break; + } + if (c === 47) { + let j = i - 1; + let p; + for (; j >= 0; j--) { + p = exp.charAt(j); + if (p !== " ") break; + } + if (!p || !validDivisionCharRE.test(p)) { + inRegex = true; + } + } + } + } + if (expression === void 0) { + expression = exp.slice(0, i).trim(); + } else if (lastFilterIndex !== 0) { + pushFilter(); + } + function pushFilter() { + filters.push(exp.slice(lastFilterIndex, i).trim()); + lastFilterIndex = i + 1; + } + if (filters.length) { + !!(process.env.NODE_ENV !== "production") && warnDeprecation( + "COMPILER_FILTERS", + context, + node.loc + ); + for (i = 0; i < filters.length; i++) { + expression = wrapFilter(expression, filters[i], context); + } + node.content = expression; + node.ast = void 0; + } +} +function wrapFilter(exp, filter, context) { + context.helper(RESOLVE_FILTER); + const i = filter.indexOf("("); + if (i < 0) { + context.filters.add(filter); + return `${toValidAssetId(filter, "filter")}(${exp})`; + } else { + const name = filter.slice(0, i); + const args = filter.slice(i + 1); + context.filters.add(name); + return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`; + } +} + +const seen = /* @__PURE__ */ new WeakSet(); +const transformMemo = (node, context) => { + if (node.type === 1) { + const dir = findDir(node, "memo"); + if (!dir || seen.has(node)) { + return; + } + seen.add(node); + return () => { + const codegenNode = node.codegenNode || context.currentNode.codegenNode; + if (codegenNode && codegenNode.type === 13) { + if (node.tagType !== 1) { + convertToBlock(codegenNode, context); + } + node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ + dir.exp, + createFunctionExpression(void 0, codegenNode), + `_cache`, + String(context.cached.length) + ]); + context.cached.push(null); + } + }; + } +}; + +function getBaseTransformPreset(prefixIdentifiers) { + return [ + [ + transformOnce, + transformIf, + transformMemo, + transformFor, + ...[transformFilter] , + ...!!(process.env.NODE_ENV !== "production") ? [transformExpression] : [], + transformSlotOutlet, + transformElement, + trackSlotScopes, + transformText + ], + { + on: transformOn, + bind: transformBind, + model: transformModel + } + ]; +} +function baseCompile(source, options = {}) { + const onError = options.onError || defaultOnError; + const isModuleMode = options.mode === "module"; + { + if (options.prefixIdentifiers === true) { + onError(createCompilerError(47)); + } else if (isModuleMode) { + onError(createCompilerError(48)); + } + } + const prefixIdentifiers = false; + if (options.cacheHandlers) { + onError(createCompilerError(49)); + } + if (options.scopeId && !isModuleMode) { + onError(createCompilerError(50)); + } + const resolvedOptions = extend({}, options, { + prefixIdentifiers + }); + const ast = isString(source) ? baseParse(source, resolvedOptions) : source; + const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(); + transform( + ast, + extend({}, resolvedOptions, { + nodeTransforms: [ + ...nodeTransforms, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: extend( + {}, + directiveTransforms, + options.directiveTransforms || {} + // user transforms + ) + }) + ); + return generate(ast, resolvedOptions); +} + +const BindingTypes = { + "DATA": "data", + "PROPS": "props", + "PROPS_ALIASED": "props-aliased", + "SETUP_LET": "setup-let", + "SETUP_CONST": "setup-const", + "SETUP_REACTIVE_CONST": "setup-reactive-const", + "SETUP_MAYBE_REF": "setup-maybe-ref", + "SETUP_REF": "setup-ref", + "OPTIONS": "options", + "LITERAL_CONST": "literal-const" +}; + +const noopDirectiveTransform = () => ({ props: [] }); + +export { BASE_TRANSITION, BindingTypes, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, CompilerDeprecationTypes, ConstantTypes, ElementTypes, ErrorCodes, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, Namespaces, NodeTypes, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, TS_NODE_TYPES, UNREF, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, convertToBlock, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, errorMessages, extractIdentifiers, findDir, findProp, forAliasRE, generate, getBaseTransformPreset, getConstantType, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isCoreComponent, isFnExpression, isFnExpressionBrowser, isFnExpressionNode, isFunctionType, isInDestructureAssignment, isInNewExpression, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText$1 as isText, isVSlot, locStub, noopDirectiveTransform, processExpression, processFor, processIf, processSlotOutlet, registerRuntimeHelpers, resolveComponentType, stringifyExpression, toValidAssetId, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformElement, transformExpression, transformModel, transformOn, traverseNode, unwrapTSNode, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation }; diff --git a/vuetest/node_modules/@vue/compiler-core/index.js b/vuetest/node_modules/@vue/compiler-core/index.js new file mode 100644 index 0000000..d3fc54f --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-core/index.js @@ -0,0 +1,7 @@ +'use strict' + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/compiler-core.cjs.prod.js') +} else { + module.exports = require('./dist/compiler-core.cjs.js') +} diff --git a/vuetest/node_modules/@vue/compiler-core/package.json b/vuetest/node_modules/@vue/compiler-core/package.json new file mode 100644 index 0000000..fb27b07 --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-core/package.json @@ -0,0 +1,58 @@ +{ + "name": "@vue/compiler-core", + "version": "3.5.13", + "description": "@vue/compiler-core", + "main": "index.js", + "module": "dist/compiler-core.esm-bundler.js", + "types": "dist/compiler-core.d.ts", + "files": [ + "index.js", + "dist" + ], + "exports": { + ".": { + "types": "./dist/compiler-core.d.ts", + "node": { + "production": "./dist/compiler-core.cjs.prod.js", + "development": "./dist/compiler-core.cjs.js", + "default": "./index.js" + }, + "module": "./dist/compiler-core.esm-bundler.js", + "import": "./dist/compiler-core.esm-bundler.js", + "require": "./index.js" + }, + "./*": "./*" + }, + "buildOptions": { + "name": "VueCompilerCore", + "compat": true, + "formats": [ + "esm-bundler", + "cjs" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/vuejs/core.git", + "directory": "packages/compiler-core" + }, + "keywords": [ + "vue" + ], + "author": "Evan You", + "license": "MIT", + "bugs": { + "url": "https://github.com/vuejs/core/issues" + }, + "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme", + "dependencies": { + "@babel/parser": "^7.25.3", + "entities": "^4.5.0", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.0", + "@vue/shared": "3.5.13" + }, + "devDependencies": { + "@babel/types": "^7.25.2" + } +} \ No newline at end of file diff --git a/vuetest/node_modules/@vue/compiler-dom/LICENSE b/vuetest/node_modules/@vue/compiler-dom/LICENSE new file mode 100644 index 0000000..15f1f7e --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-dom/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018-present, Yuxi (Evan) You + +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. diff --git a/vuetest/node_modules/@vue/compiler-dom/README.md b/vuetest/node_modules/@vue/compiler-dom/README.md new file mode 100644 index 0000000..57748e6 --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-dom/README.md @@ -0,0 +1 @@ +# @vue/compiler-dom diff --git a/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js b/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js new file mode 100644 index 0000000..dc802dd --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js @@ -0,0 +1,928 @@ +/** +* @vue/compiler-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var compilerCore = require('@vue/compiler-core'); +var shared = require('@vue/shared'); + +const V_MODEL_RADIO = Symbol(`vModelRadio` ); +const V_MODEL_CHECKBOX = Symbol( + `vModelCheckbox` +); +const V_MODEL_TEXT = Symbol(`vModelText` ); +const V_MODEL_SELECT = Symbol( + `vModelSelect` +); +const V_MODEL_DYNAMIC = Symbol( + `vModelDynamic` +); +const V_ON_WITH_MODIFIERS = Symbol( + `vOnModifiersGuard` +); +const V_ON_WITH_KEYS = Symbol( + `vOnKeysGuard` +); +const V_SHOW = Symbol(`vShow` ); +const TRANSITION = Symbol(`Transition` ); +const TRANSITION_GROUP = Symbol( + `TransitionGroup` +); +compilerCore.registerRuntimeHelpers({ + [V_MODEL_RADIO]: `vModelRadio`, + [V_MODEL_CHECKBOX]: `vModelCheckbox`, + [V_MODEL_TEXT]: `vModelText`, + [V_MODEL_SELECT]: `vModelSelect`, + [V_MODEL_DYNAMIC]: `vModelDynamic`, + [V_ON_WITH_MODIFIERS]: `withModifiers`, + [V_ON_WITH_KEYS]: `withKeys`, + [V_SHOW]: `vShow`, + [TRANSITION]: `Transition`, + [TRANSITION_GROUP]: `TransitionGroup` +}); + +const parserOptions = { + parseMode: "html", + isVoidTag: shared.isVoidTag, + isNativeTag: (tag) => shared.isHTMLTag(tag) || shared.isSVGTag(tag) || shared.isMathMLTag(tag), + isPreTag: (tag) => tag === "pre", + isIgnoreNewlineTag: (tag) => tag === "pre" || tag === "textarea", + decodeEntities: void 0, + isBuiltInComponent: (tag) => { + if (tag === "Transition" || tag === "transition") { + return TRANSITION; + } else if (tag === "TransitionGroup" || tag === "transition-group") { + return TRANSITION_GROUP; + } + }, + // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher + getNamespace(tag, parent, rootNamespace) { + let ns = parent ? parent.ns : rootNamespace; + if (parent && ns === 2) { + if (parent.tag === "annotation-xml") { + if (tag === "svg") { + return 1; + } + if (parent.props.some( + (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") + )) { + ns = 0; + } + } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { + ns = 0; + } + } else if (parent && ns === 1) { + if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { + ns = 0; + } + } + if (ns === 0) { + if (tag === "svg") { + return 1; + } + if (tag === "math") { + return 2; + } + } + return ns; + } +}; + +const transformStyle = (node) => { + if (node.type === 1) { + node.props.forEach((p, i) => { + if (p.type === 6 && p.name === "style" && p.value) { + node.props[i] = { + type: 7, + name: `bind`, + arg: compilerCore.createSimpleExpression(`style`, true, p.loc), + exp: parseInlineCSS(p.value.content, p.loc), + modifiers: [], + loc: p.loc + }; + } + }); + } +}; +const parseInlineCSS = (cssText, loc) => { + const normalized = shared.parseStringStyle(cssText); + return compilerCore.createSimpleExpression( + JSON.stringify(normalized), + false, + loc, + 3 + ); +}; + +function createDOMCompilerError(code, loc) { + return compilerCore.createCompilerError( + code, + loc, + DOMErrorMessages + ); +} +const DOMErrorCodes = { + "X_V_HTML_NO_EXPRESSION": 53, + "53": "X_V_HTML_NO_EXPRESSION", + "X_V_HTML_WITH_CHILDREN": 54, + "54": "X_V_HTML_WITH_CHILDREN", + "X_V_TEXT_NO_EXPRESSION": 55, + "55": "X_V_TEXT_NO_EXPRESSION", + "X_V_TEXT_WITH_CHILDREN": 56, + "56": "X_V_TEXT_WITH_CHILDREN", + "X_V_MODEL_ON_INVALID_ELEMENT": 57, + "57": "X_V_MODEL_ON_INVALID_ELEMENT", + "X_V_MODEL_ARG_ON_ELEMENT": 58, + "58": "X_V_MODEL_ARG_ON_ELEMENT", + "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59, + "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", + "X_V_MODEL_UNNECESSARY_VALUE": 60, + "60": "X_V_MODEL_UNNECESSARY_VALUE", + "X_V_SHOW_NO_EXPRESSION": 61, + "61": "X_V_SHOW_NO_EXPRESSION", + "X_TRANSITION_INVALID_CHILDREN": 62, + "62": "X_TRANSITION_INVALID_CHILDREN", + "X_IGNORED_SIDE_EFFECT_TAG": 63, + "63": "X_IGNORED_SIDE_EFFECT_TAG", + "__EXTEND_POINT__": 64, + "64": "__EXTEND_POINT__" +}; +const DOMErrorMessages = { + [53]: `v-html is missing expression.`, + [54]: `v-html will override element children.`, + [55]: `v-text is missing expression.`, + [56]: `v-text will override element children.`, + [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, + [58]: `v-model argument is not supported on plain elements.`, + [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, + [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, + [61]: `v-show is missing expression.`, + [62]: `<Transition> expects exactly one child element or component.`, + [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` +}; + +const transformVHtml = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(53, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(54, loc) + ); + node.children.length = 0; + } + return { + props: [ + compilerCore.createObjectProperty( + compilerCore.createSimpleExpression(`innerHTML`, true, loc), + exp || compilerCore.createSimpleExpression("", true) + ) + ] + }; +}; + +const transformVText = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(55, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(56, loc) + ); + node.children.length = 0; + } + return { + props: [ + compilerCore.createObjectProperty( + compilerCore.createSimpleExpression(`textContent`, true), + exp ? compilerCore.getConstantType(exp, context) > 0 ? exp : compilerCore.createCallExpression( + context.helperString(compilerCore.TO_DISPLAY_STRING), + [exp], + loc + ) : compilerCore.createSimpleExpression("", true) + ) + ] + }; +}; + +const transformModel = (dir, node, context) => { + const baseResult = compilerCore.transformModel(dir, node, context); + if (!baseResult.props.length || node.tagType === 1) { + return baseResult; + } + if (dir.arg) { + context.onError( + createDOMCompilerError( + 58, + dir.arg.loc + ) + ); + } + function checkDuplicatedValue() { + const value = compilerCore.findDir(node, "bind"); + if (value && compilerCore.isStaticArgOf(value.arg, "value")) { + context.onError( + createDOMCompilerError( + 60, + value.loc + ) + ); + } + } + const { tag } = node; + const isCustomElement = context.isCustomElement(tag); + if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { + let directiveToUse = V_MODEL_TEXT; + let isInvalidType = false; + if (tag === "input" || isCustomElement) { + const type = compilerCore.findProp(node, `type`); + if (type) { + if (type.type === 7) { + directiveToUse = V_MODEL_DYNAMIC; + } else if (type.value) { + switch (type.value.content) { + case "radio": + directiveToUse = V_MODEL_RADIO; + break; + case "checkbox": + directiveToUse = V_MODEL_CHECKBOX; + break; + case "file": + isInvalidType = true; + context.onError( + createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + default: + checkDuplicatedValue(); + break; + } + } + } else if (compilerCore.hasDynamicKeyVBind(node)) { + directiveToUse = V_MODEL_DYNAMIC; + } else { + checkDuplicatedValue(); + } + } else if (tag === "select") { + directiveToUse = V_MODEL_SELECT; + } else { + checkDuplicatedValue(); + } + if (!isInvalidType) { + baseResult.needRuntime = context.helper(directiveToUse); + } + } else { + context.onError( + createDOMCompilerError( + 57, + dir.loc + ) + ); + } + baseResult.props = baseResult.props.filter( + (p) => !(p.key.type === 4 && p.key.content === "modelValue") + ); + return baseResult; +}; + +const isEventOptionModifier = /* @__PURE__ */ shared.makeMap(`passive,once,capture`); +const isNonKeyModifier = /* @__PURE__ */ shared.makeMap( + // event propagation management + `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` +); +const maybeKeyModifier = /* @__PURE__ */ shared.makeMap("left,right"); +const isKeyboardEvent = /* @__PURE__ */ shared.makeMap(`onkeyup,onkeydown,onkeypress`); +const resolveModifiers = (key, modifiers, context, loc) => { + const keyModifiers = []; + const nonKeyModifiers = []; + const eventOptionModifiers = []; + for (let i = 0; i < modifiers.length; i++) { + const modifier = modifiers[i].content; + if (modifier === "native" && compilerCore.checkCompatEnabled( + "COMPILER_V_ON_NATIVE", + context, + loc + )) { + eventOptionModifiers.push(modifier); + } else if (isEventOptionModifier(modifier)) { + eventOptionModifiers.push(modifier); + } else { + if (maybeKeyModifier(modifier)) { + if (compilerCore.isStaticExp(key)) { + if (isKeyboardEvent(key.content.toLowerCase())) { + keyModifiers.push(modifier); + } else { + nonKeyModifiers.push(modifier); + } + } else { + keyModifiers.push(modifier); + nonKeyModifiers.push(modifier); + } + } else { + if (isNonKeyModifier(modifier)) { + nonKeyModifiers.push(modifier); + } else { + keyModifiers.push(modifier); + } + } + } + } + return { + keyModifiers, + nonKeyModifiers, + eventOptionModifiers + }; +}; +const transformClick = (key, event) => { + const isStaticClick = compilerCore.isStaticExp(key) && key.content.toLowerCase() === "onclick"; + return isStaticClick ? compilerCore.createSimpleExpression(event, true) : key.type !== 4 ? compilerCore.createCompoundExpression([ + `(`, + key, + `) === "onClick" ? "${event}" : (`, + key, + `)` + ]) : key; +}; +const transformOn = (dir, node, context) => { + return compilerCore.transformOn(dir, node, context, (baseResult) => { + const { modifiers } = dir; + if (!modifiers.length) return baseResult; + let { key, value: handlerExp } = baseResult.props[0]; + const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); + if (nonKeyModifiers.includes("right")) { + key = transformClick(key, `onContextmenu`); + } + if (nonKeyModifiers.includes("middle")) { + key = transformClick(key, `onMouseup`); + } + if (nonKeyModifiers.length) { + handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ + handlerExp, + JSON.stringify(nonKeyModifiers) + ]); + } + if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard + (!compilerCore.isStaticExp(key) || isKeyboardEvent(key.content.toLowerCase()))) { + handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_KEYS), [ + handlerExp, + JSON.stringify(keyModifiers) + ]); + } + if (eventOptionModifiers.length) { + const modifierPostfix = eventOptionModifiers.map(shared.capitalize).join(""); + key = compilerCore.isStaticExp(key) ? compilerCore.createSimpleExpression(`${key.content}${modifierPostfix}`, true) : compilerCore.createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); + } + return { + props: [compilerCore.createObjectProperty(key, handlerExp)] + }; + }); +}; + +const transformShow = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(61, loc) + ); + } + return { + props: [], + needRuntime: context.helper(V_SHOW) + }; +}; + +const transformTransition = (node, context) => { + if (node.type === 1 && node.tagType === 1) { + const component = context.isBuiltInComponent(node.tag); + if (component === TRANSITION) { + return () => { + if (!node.children.length) { + return; + } + if (hasMultipleChildren(node)) { + context.onError( + createDOMCompilerError( + 62, + { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + } + ) + ); + } + const child = node.children[0]; + if (child.type === 1) { + for (const p of child.props) { + if (p.type === 7 && p.name === "show") { + node.props.push({ + type: 6, + name: "persisted", + nameLoc: node.loc, + value: void 0, + loc: node.loc + }); + } + } + } + }; + } + } +}; +function hasMultipleChildren(node) { + const children = node.children = node.children.filter( + (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()) + ); + const child = children[0]; + return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren); +} + +const expReplaceRE = /__VUE_EXP_START__(.*?)__VUE_EXP_END__/g; +const stringifyStatic = (children, context, parent) => { + if (context.scopes.vSlot > 0) { + return; + } + const isParentCached = parent.type === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !shared.isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 20; + let nc = 0; + let ec = 0; + const currentChunk = []; + const stringifyCurrentChunk = (currentIndex) => { + if (nc >= 20 || ec >= 5) { + const staticCall = compilerCore.createCallExpression(context.helper(compilerCore.CREATE_STATIC), [ + JSON.stringify( + currentChunk.map((node) => stringifyNode(node, context)).join("") + ).replace(expReplaceRE, `" + $1 + "`), + // the 2nd argument indicates the number of DOM nodes this static vnode + // will insert / hydrate + String(currentChunk.length) + ]); + const deleteCount = currentChunk.length - 1; + if (isParentCached) { + children.splice( + currentIndex - currentChunk.length, + currentChunk.length, + // @ts-expect-error + staticCall + ); + } else { + currentChunk[0].codegenNode.value = staticCall; + if (currentChunk.length > 1) { + children.splice(currentIndex - currentChunk.length + 1, deleteCount); + const cacheIndex = context.cached.indexOf( + currentChunk[currentChunk.length - 1].codegenNode + ); + if (cacheIndex > -1) { + for (let i2 = cacheIndex; i2 < context.cached.length; i2++) { + const c = context.cached[i2]; + if (c) c.index -= deleteCount; + } + context.cached.splice(cacheIndex - deleteCount + 1, deleteCount); + } + } + } + return deleteCount; + } + return 0; + }; + let i = 0; + for (; i < children.length; i++) { + const child = children[i]; + const isCached = isParentCached || getCachedNode(child); + if (isCached) { + const result = analyzeNode(child); + if (result) { + nc += result[0]; + ec += result[1]; + currentChunk.push(child); + continue; + } + } + i -= stringifyCurrentChunk(i); + nc = 0; + ec = 0; + currentChunk.length = 0; + } + stringifyCurrentChunk(i); +}; +const getCachedNode = (node) => { + if ((node.type === 1 && node.tagType === 0 || node.type === 12) && node.codegenNode && node.codegenNode.type === 20) { + return node.codegenNode; + } +}; +const dataAriaRE = /^(data|aria)-/; +const isStringifiableAttr = (name, ns) => { + return (ns === 0 ? shared.isKnownHtmlAttr(name) : ns === 1 ? shared.isKnownSvgAttr(name) : ns === 2 ? shared.isKnownMathMLAttr(name) : false) || dataAriaRE.test(name); +}; +const isNonStringifiable = /* @__PURE__ */ shared.makeMap( + `caption,thead,tr,th,tbody,td,tfoot,colgroup,col` +); +function analyzeNode(node) { + if (node.type === 1 && isNonStringifiable(node.tag)) { + return false; + } + if (node.type === 12) { + return [1, 0]; + } + let nc = 1; + let ec = node.props.length > 0 ? 1 : 0; + let bailed = false; + const bail = () => { + bailed = true; + return false; + }; + function walk(node2) { + const isOptionTag = node2.tag === "option" && node2.ns === 0; + for (let i = 0; i < node2.props.length; i++) { + const p = node2.props[i]; + if (p.type === 6 && !isStringifiableAttr(p.name, node2.ns)) { + return bail(); + } + if (p.type === 7 && p.name === "bind") { + if (p.arg && (p.arg.type === 8 || p.arg.isStatic && !isStringifiableAttr(p.arg.content, node2.ns))) { + return bail(); + } + if (p.exp && (p.exp.type === 8 || p.exp.constType < 3)) { + return bail(); + } + if (isOptionTag && compilerCore.isStaticArgOf(p.arg, "value") && p.exp && !p.exp.isStatic) { + return bail(); + } + } + } + for (let i = 0; i < node2.children.length; i++) { + nc++; + const child = node2.children[i]; + if (child.type === 1) { + if (child.props.length > 0) { + ec++; + } + walk(child); + if (bailed) { + return false; + } + } + } + return true; + } + return walk(node) ? [nc, ec] : false; +} +function stringifyNode(node, context) { + if (shared.isString(node)) { + return node; + } + if (shared.isSymbol(node)) { + return ``; + } + switch (node.type) { + case 1: + return stringifyElement(node, context); + case 2: + return shared.escapeHtml(node.content); + case 3: + return `<!--${shared.escapeHtml(node.content)}-->`; + case 5: + return shared.escapeHtml(shared.toDisplayString(evaluateConstant(node.content))); + case 8: + return shared.escapeHtml(evaluateConstant(node)); + case 12: + return stringifyNode(node.content, context); + default: + return ""; + } +} +function stringifyElement(node, context) { + let res = `<${node.tag}`; + let innerHTML = ""; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + res += ` ${p.name}`; + if (p.value) { + res += `="${shared.escapeHtml(p.value.content)}"`; + } + } else if (p.type === 7) { + if (p.name === "bind") { + const exp = p.exp; + if (exp.content[0] === "_") { + res += ` ${p.arg.content}="__VUE_EXP_START__${exp.content}__VUE_EXP_END__"`; + continue; + } + if (shared.isBooleanAttr(p.arg.content) && exp.content === "false") { + continue; + } + let evaluated = evaluateConstant(exp); + if (evaluated != null) { + const arg = p.arg && p.arg.content; + if (arg === "class") { + evaluated = shared.normalizeClass(evaluated); + } else if (arg === "style") { + evaluated = shared.stringifyStyle(shared.normalizeStyle(evaluated)); + } + res += ` ${p.arg.content}="${shared.escapeHtml( + evaluated + )}"`; + } + } else if (p.name === "html") { + innerHTML = evaluateConstant(p.exp); + } else if (p.name === "text") { + innerHTML = shared.escapeHtml( + shared.toDisplayString(evaluateConstant(p.exp)) + ); + } + } + } + if (context.scopeId) { + res += ` ${context.scopeId}`; + } + res += `>`; + if (innerHTML) { + res += innerHTML; + } else { + for (let i = 0; i < node.children.length; i++) { + res += stringifyNode(node.children[i], context); + } + } + if (!shared.isVoidTag(node.tag)) { + res += `</${node.tag}>`; + } + return res; +} +function evaluateConstant(exp) { + if (exp.type === 4) { + return new Function(`return (${exp.content})`)(); + } else { + let res = ``; + exp.children.forEach((c) => { + if (shared.isString(c) || shared.isSymbol(c)) { + return; + } + if (c.type === 2) { + res += c.content; + } else if (c.type === 5) { + res += shared.toDisplayString(evaluateConstant(c.content)); + } else { + res += evaluateConstant(c); + } + }); + return res; + } +} + +const ignoreSideEffectTags = (node, context) => { + if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { + context.onError( + createDOMCompilerError( + 63, + node.loc + ) + ); + context.removeNode(); + } +}; + +function isValidHTMLNesting(parent, child) { + if (parent in onlyValidChildren) { + return onlyValidChildren[parent].has(child); + } + if (child in onlyValidParents) { + return onlyValidParents[child].has(parent); + } + if (parent in knownInvalidChildren) { + if (knownInvalidChildren[parent].has(child)) return false; + } + if (child in knownInvalidParents) { + if (knownInvalidParents[child].has(parent)) return false; + } + return true; +} +const headings = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]); +const emptySet = /* @__PURE__ */ new Set([]); +const onlyValidChildren = { + head: /* @__PURE__ */ new Set([ + "base", + "basefront", + "bgsound", + "link", + "meta", + "title", + "noscript", + "noframes", + "style", + "script", + "template" + ]), + optgroup: /* @__PURE__ */ new Set(["option"]), + select: /* @__PURE__ */ new Set(["optgroup", "option", "hr"]), + // table + table: /* @__PURE__ */ new Set(["caption", "colgroup", "tbody", "tfoot", "thead"]), + tr: /* @__PURE__ */ new Set(["td", "th"]), + colgroup: /* @__PURE__ */ new Set(["col"]), + tbody: /* @__PURE__ */ new Set(["tr"]), + thead: /* @__PURE__ */ new Set(["tr"]), + tfoot: /* @__PURE__ */ new Set(["tr"]), + // these elements can not have any children elements + script: emptySet, + iframe: emptySet, + option: emptySet, + textarea: emptySet, + style: emptySet, + title: emptySet +}; +const onlyValidParents = { + // sections + html: emptySet, + body: /* @__PURE__ */ new Set(["html"]), + head: /* @__PURE__ */ new Set(["html"]), + // table + td: /* @__PURE__ */ new Set(["tr"]), + colgroup: /* @__PURE__ */ new Set(["table"]), + caption: /* @__PURE__ */ new Set(["table"]), + tbody: /* @__PURE__ */ new Set(["table"]), + tfoot: /* @__PURE__ */ new Set(["table"]), + col: /* @__PURE__ */ new Set(["colgroup"]), + th: /* @__PURE__ */ new Set(["tr"]), + thead: /* @__PURE__ */ new Set(["table"]), + tr: /* @__PURE__ */ new Set(["tbody", "thead", "tfoot"]), + // data list + dd: /* @__PURE__ */ new Set(["dl", "div"]), + dt: /* @__PURE__ */ new Set(["dl", "div"]), + // other + figcaption: /* @__PURE__ */ new Set(["figure"]), + // li: new Set(["ul", "ol"]), + summary: /* @__PURE__ */ new Set(["details"]), + area: /* @__PURE__ */ new Set(["map"]) +}; +const knownInvalidChildren = { + p: /* @__PURE__ */ new Set([ + "address", + "article", + "aside", + "blockquote", + "center", + "details", + "dialog", + "dir", + "div", + "dl", + "fieldset", + "figure", + "footer", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "header", + "hgroup", + "hr", + "li", + "main", + "nav", + "menu", + "ol", + "p", + "pre", + "section", + "table", + "ul" + ]), + svg: /* @__PURE__ */ new Set([ + "b", + "blockquote", + "br", + "code", + "dd", + "div", + "dl", + "dt", + "em", + "embed", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "hr", + "i", + "img", + "li", + "menu", + "meta", + "ol", + "p", + "pre", + "ruby", + "s", + "small", + "span", + "strong", + "sub", + "sup", + "table", + "u", + "ul", + "var" + ]) +}; +const knownInvalidParents = { + a: /* @__PURE__ */ new Set(["a"]), + button: /* @__PURE__ */ new Set(["button"]), + dd: /* @__PURE__ */ new Set(["dd", "dt"]), + dt: /* @__PURE__ */ new Set(["dd", "dt"]), + form: /* @__PURE__ */ new Set(["form"]), + li: /* @__PURE__ */ new Set(["li"]), + h1: headings, + h2: headings, + h3: headings, + h4: headings, + h5: headings, + h6: headings +}; + +const validateHtmlNesting = (node, context) => { + if (node.type === 1 && node.tagType === 0 && context.parent && context.parent.type === 1 && context.parent.tagType === 0 && !isValidHTMLNesting(context.parent.tag, node.tag)) { + const error = new SyntaxError( + `<${node.tag}> cannot be child of <${context.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.` + ); + error.loc = node.loc; + context.onWarn(error); + } +}; + +const DOMNodeTransforms = [ + transformStyle, + ...[transformTransition, validateHtmlNesting] +]; +const DOMDirectiveTransforms = { + cloak: compilerCore.noopDirectiveTransform, + html: transformVHtml, + text: transformVText, + model: transformModel, + // override compiler-core + on: transformOn, + // override compiler-core + show: transformShow +}; +function compile(src, options = {}) { + return compilerCore.baseCompile( + src, + shared.extend({}, parserOptions, options, { + nodeTransforms: [ + // ignore <script> and <tag> + // this is not put inside DOMNodeTransforms because that list is used + // by compiler-ssr to generate vnode fallback branches + ignoreSideEffectTags, + ...DOMNodeTransforms, + ...options.nodeTransforms || [] + ], + directiveTransforms: shared.extend( + {}, + DOMDirectiveTransforms, + options.directiveTransforms || {} + ), + transformHoist: stringifyStatic + }) + ); +} +function parse(template, options = {}) { + return compilerCore.baseParse(template, shared.extend({}, parserOptions, options)); +} + +exports.DOMDirectiveTransforms = DOMDirectiveTransforms; +exports.DOMErrorCodes = DOMErrorCodes; +exports.DOMErrorMessages = DOMErrorMessages; +exports.DOMNodeTransforms = DOMNodeTransforms; +exports.TRANSITION = TRANSITION; +exports.TRANSITION_GROUP = TRANSITION_GROUP; +exports.V_MODEL_CHECKBOX = V_MODEL_CHECKBOX; +exports.V_MODEL_DYNAMIC = V_MODEL_DYNAMIC; +exports.V_MODEL_RADIO = V_MODEL_RADIO; +exports.V_MODEL_SELECT = V_MODEL_SELECT; +exports.V_MODEL_TEXT = V_MODEL_TEXT; +exports.V_ON_WITH_KEYS = V_ON_WITH_KEYS; +exports.V_ON_WITH_MODIFIERS = V_ON_WITH_MODIFIERS; +exports.V_SHOW = V_SHOW; +exports.compile = compile; +exports.createDOMCompilerError = createDOMCompilerError; +exports.parse = parse; +exports.parserOptions = parserOptions; +exports.transformStyle = transformStyle; +Object.keys(compilerCore).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = compilerCore[k]; +}); diff --git a/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js b/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js new file mode 100644 index 0000000..94b29b7 --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js @@ -0,0 +1,686 @@ +/** +* @vue/compiler-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var compilerCore = require('@vue/compiler-core'); +var shared = require('@vue/shared'); + +const V_MODEL_RADIO = Symbol(``); +const V_MODEL_CHECKBOX = Symbol( + `` +); +const V_MODEL_TEXT = Symbol(``); +const V_MODEL_SELECT = Symbol( + `` +); +const V_MODEL_DYNAMIC = Symbol( + `` +); +const V_ON_WITH_MODIFIERS = Symbol( + `` +); +const V_ON_WITH_KEYS = Symbol( + `` +); +const V_SHOW = Symbol(``); +const TRANSITION = Symbol(``); +const TRANSITION_GROUP = Symbol( + `` +); +compilerCore.registerRuntimeHelpers({ + [V_MODEL_RADIO]: `vModelRadio`, + [V_MODEL_CHECKBOX]: `vModelCheckbox`, + [V_MODEL_TEXT]: `vModelText`, + [V_MODEL_SELECT]: `vModelSelect`, + [V_MODEL_DYNAMIC]: `vModelDynamic`, + [V_ON_WITH_MODIFIERS]: `withModifiers`, + [V_ON_WITH_KEYS]: `withKeys`, + [V_SHOW]: `vShow`, + [TRANSITION]: `Transition`, + [TRANSITION_GROUP]: `TransitionGroup` +}); + +const parserOptions = { + parseMode: "html", + isVoidTag: shared.isVoidTag, + isNativeTag: (tag) => shared.isHTMLTag(tag) || shared.isSVGTag(tag) || shared.isMathMLTag(tag), + isPreTag: (tag) => tag === "pre", + isIgnoreNewlineTag: (tag) => tag === "pre" || tag === "textarea", + decodeEntities: void 0, + isBuiltInComponent: (tag) => { + if (tag === "Transition" || tag === "transition") { + return TRANSITION; + } else if (tag === "TransitionGroup" || tag === "transition-group") { + return TRANSITION_GROUP; + } + }, + // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher + getNamespace(tag, parent, rootNamespace) { + let ns = parent ? parent.ns : rootNamespace; + if (parent && ns === 2) { + if (parent.tag === "annotation-xml") { + if (tag === "svg") { + return 1; + } + if (parent.props.some( + (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") + )) { + ns = 0; + } + } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { + ns = 0; + } + } else if (parent && ns === 1) { + if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { + ns = 0; + } + } + if (ns === 0) { + if (tag === "svg") { + return 1; + } + if (tag === "math") { + return 2; + } + } + return ns; + } +}; + +const transformStyle = (node) => { + if (node.type === 1) { + node.props.forEach((p, i) => { + if (p.type === 6 && p.name === "style" && p.value) { + node.props[i] = { + type: 7, + name: `bind`, + arg: compilerCore.createSimpleExpression(`style`, true, p.loc), + exp: parseInlineCSS(p.value.content, p.loc), + modifiers: [], + loc: p.loc + }; + } + }); + } +}; +const parseInlineCSS = (cssText, loc) => { + const normalized = shared.parseStringStyle(cssText); + return compilerCore.createSimpleExpression( + JSON.stringify(normalized), + false, + loc, + 3 + ); +}; + +function createDOMCompilerError(code, loc) { + return compilerCore.createCompilerError( + code, + loc, + DOMErrorMessages + ); +} +const DOMErrorCodes = { + "X_V_HTML_NO_EXPRESSION": 53, + "53": "X_V_HTML_NO_EXPRESSION", + "X_V_HTML_WITH_CHILDREN": 54, + "54": "X_V_HTML_WITH_CHILDREN", + "X_V_TEXT_NO_EXPRESSION": 55, + "55": "X_V_TEXT_NO_EXPRESSION", + "X_V_TEXT_WITH_CHILDREN": 56, + "56": "X_V_TEXT_WITH_CHILDREN", + "X_V_MODEL_ON_INVALID_ELEMENT": 57, + "57": "X_V_MODEL_ON_INVALID_ELEMENT", + "X_V_MODEL_ARG_ON_ELEMENT": 58, + "58": "X_V_MODEL_ARG_ON_ELEMENT", + "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59, + "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", + "X_V_MODEL_UNNECESSARY_VALUE": 60, + "60": "X_V_MODEL_UNNECESSARY_VALUE", + "X_V_SHOW_NO_EXPRESSION": 61, + "61": "X_V_SHOW_NO_EXPRESSION", + "X_TRANSITION_INVALID_CHILDREN": 62, + "62": "X_TRANSITION_INVALID_CHILDREN", + "X_IGNORED_SIDE_EFFECT_TAG": 63, + "63": "X_IGNORED_SIDE_EFFECT_TAG", + "__EXTEND_POINT__": 64, + "64": "__EXTEND_POINT__" +}; +const DOMErrorMessages = { + [53]: `v-html is missing expression.`, + [54]: `v-html will override element children.`, + [55]: `v-text is missing expression.`, + [56]: `v-text will override element children.`, + [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, + [58]: `v-model argument is not supported on plain elements.`, + [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, + [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, + [61]: `v-show is missing expression.`, + [62]: `<Transition> expects exactly one child element or component.`, + [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` +}; + +const transformVHtml = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(53, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(54, loc) + ); + node.children.length = 0; + } + return { + props: [ + compilerCore.createObjectProperty( + compilerCore.createSimpleExpression(`innerHTML`, true, loc), + exp || compilerCore.createSimpleExpression("", true) + ) + ] + }; +}; + +const transformVText = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(55, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(56, loc) + ); + node.children.length = 0; + } + return { + props: [ + compilerCore.createObjectProperty( + compilerCore.createSimpleExpression(`textContent`, true), + exp ? compilerCore.getConstantType(exp, context) > 0 ? exp : compilerCore.createCallExpression( + context.helperString(compilerCore.TO_DISPLAY_STRING), + [exp], + loc + ) : compilerCore.createSimpleExpression("", true) + ) + ] + }; +}; + +const transformModel = (dir, node, context) => { + const baseResult = compilerCore.transformModel(dir, node, context); + if (!baseResult.props.length || node.tagType === 1) { + return baseResult; + } + if (dir.arg) { + context.onError( + createDOMCompilerError( + 58, + dir.arg.loc + ) + ); + } + const { tag } = node; + const isCustomElement = context.isCustomElement(tag); + if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { + let directiveToUse = V_MODEL_TEXT; + let isInvalidType = false; + if (tag === "input" || isCustomElement) { + const type = compilerCore.findProp(node, `type`); + if (type) { + if (type.type === 7) { + directiveToUse = V_MODEL_DYNAMIC; + } else if (type.value) { + switch (type.value.content) { + case "radio": + directiveToUse = V_MODEL_RADIO; + break; + case "checkbox": + directiveToUse = V_MODEL_CHECKBOX; + break; + case "file": + isInvalidType = true; + context.onError( + createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + } + } + } else if (compilerCore.hasDynamicKeyVBind(node)) { + directiveToUse = V_MODEL_DYNAMIC; + } else ; + } else if (tag === "select") { + directiveToUse = V_MODEL_SELECT; + } else ; + if (!isInvalidType) { + baseResult.needRuntime = context.helper(directiveToUse); + } + } else { + context.onError( + createDOMCompilerError( + 57, + dir.loc + ) + ); + } + baseResult.props = baseResult.props.filter( + (p) => !(p.key.type === 4 && p.key.content === "modelValue") + ); + return baseResult; +}; + +const isEventOptionModifier = /* @__PURE__ */ shared.makeMap(`passive,once,capture`); +const isNonKeyModifier = /* @__PURE__ */ shared.makeMap( + // event propagation management + `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` +); +const maybeKeyModifier = /* @__PURE__ */ shared.makeMap("left,right"); +const isKeyboardEvent = /* @__PURE__ */ shared.makeMap(`onkeyup,onkeydown,onkeypress`); +const resolveModifiers = (key, modifiers, context, loc) => { + const keyModifiers = []; + const nonKeyModifiers = []; + const eventOptionModifiers = []; + for (let i = 0; i < modifiers.length; i++) { + const modifier = modifiers[i].content; + if (modifier === "native" && compilerCore.checkCompatEnabled( + "COMPILER_V_ON_NATIVE", + context, + loc + )) { + eventOptionModifiers.push(modifier); + } else if (isEventOptionModifier(modifier)) { + eventOptionModifiers.push(modifier); + } else { + if (maybeKeyModifier(modifier)) { + if (compilerCore.isStaticExp(key)) { + if (isKeyboardEvent(key.content.toLowerCase())) { + keyModifiers.push(modifier); + } else { + nonKeyModifiers.push(modifier); + } + } else { + keyModifiers.push(modifier); + nonKeyModifiers.push(modifier); + } + } else { + if (isNonKeyModifier(modifier)) { + nonKeyModifiers.push(modifier); + } else { + keyModifiers.push(modifier); + } + } + } + } + return { + keyModifiers, + nonKeyModifiers, + eventOptionModifiers + }; +}; +const transformClick = (key, event) => { + const isStaticClick = compilerCore.isStaticExp(key) && key.content.toLowerCase() === "onclick"; + return isStaticClick ? compilerCore.createSimpleExpression(event, true) : key.type !== 4 ? compilerCore.createCompoundExpression([ + `(`, + key, + `) === "onClick" ? "${event}" : (`, + key, + `)` + ]) : key; +}; +const transformOn = (dir, node, context) => { + return compilerCore.transformOn(dir, node, context, (baseResult) => { + const { modifiers } = dir; + if (!modifiers.length) return baseResult; + let { key, value: handlerExp } = baseResult.props[0]; + const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); + if (nonKeyModifiers.includes("right")) { + key = transformClick(key, `onContextmenu`); + } + if (nonKeyModifiers.includes("middle")) { + key = transformClick(key, `onMouseup`); + } + if (nonKeyModifiers.length) { + handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ + handlerExp, + JSON.stringify(nonKeyModifiers) + ]); + } + if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard + (!compilerCore.isStaticExp(key) || isKeyboardEvent(key.content.toLowerCase()))) { + handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_KEYS), [ + handlerExp, + JSON.stringify(keyModifiers) + ]); + } + if (eventOptionModifiers.length) { + const modifierPostfix = eventOptionModifiers.map(shared.capitalize).join(""); + key = compilerCore.isStaticExp(key) ? compilerCore.createSimpleExpression(`${key.content}${modifierPostfix}`, true) : compilerCore.createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); + } + return { + props: [compilerCore.createObjectProperty(key, handlerExp)] + }; + }); +}; + +const transformShow = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(61, loc) + ); + } + return { + props: [], + needRuntime: context.helper(V_SHOW) + }; +}; + +const expReplaceRE = /__VUE_EXP_START__(.*?)__VUE_EXP_END__/g; +const stringifyStatic = (children, context, parent) => { + if (context.scopes.vSlot > 0) { + return; + } + const isParentCached = parent.type === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !shared.isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 20; + let nc = 0; + let ec = 0; + const currentChunk = []; + const stringifyCurrentChunk = (currentIndex) => { + if (nc >= 20 || ec >= 5) { + const staticCall = compilerCore.createCallExpression(context.helper(compilerCore.CREATE_STATIC), [ + JSON.stringify( + currentChunk.map((node) => stringifyNode(node, context)).join("") + ).replace(expReplaceRE, `" + $1 + "`), + // the 2nd argument indicates the number of DOM nodes this static vnode + // will insert / hydrate + String(currentChunk.length) + ]); + const deleteCount = currentChunk.length - 1; + if (isParentCached) { + children.splice( + currentIndex - currentChunk.length, + currentChunk.length, + // @ts-expect-error + staticCall + ); + } else { + currentChunk[0].codegenNode.value = staticCall; + if (currentChunk.length > 1) { + children.splice(currentIndex - currentChunk.length + 1, deleteCount); + const cacheIndex = context.cached.indexOf( + currentChunk[currentChunk.length - 1].codegenNode + ); + if (cacheIndex > -1) { + for (let i2 = cacheIndex; i2 < context.cached.length; i2++) { + const c = context.cached[i2]; + if (c) c.index -= deleteCount; + } + context.cached.splice(cacheIndex - deleteCount + 1, deleteCount); + } + } + } + return deleteCount; + } + return 0; + }; + let i = 0; + for (; i < children.length; i++) { + const child = children[i]; + const isCached = isParentCached || getCachedNode(child); + if (isCached) { + const result = analyzeNode(child); + if (result) { + nc += result[0]; + ec += result[1]; + currentChunk.push(child); + continue; + } + } + i -= stringifyCurrentChunk(i); + nc = 0; + ec = 0; + currentChunk.length = 0; + } + stringifyCurrentChunk(i); +}; +const getCachedNode = (node) => { + if ((node.type === 1 && node.tagType === 0 || node.type === 12) && node.codegenNode && node.codegenNode.type === 20) { + return node.codegenNode; + } +}; +const dataAriaRE = /^(data|aria)-/; +const isStringifiableAttr = (name, ns) => { + return (ns === 0 ? shared.isKnownHtmlAttr(name) : ns === 1 ? shared.isKnownSvgAttr(name) : ns === 2 ? shared.isKnownMathMLAttr(name) : false) || dataAriaRE.test(name); +}; +const isNonStringifiable = /* @__PURE__ */ shared.makeMap( + `caption,thead,tr,th,tbody,td,tfoot,colgroup,col` +); +function analyzeNode(node) { + if (node.type === 1 && isNonStringifiable(node.tag)) { + return false; + } + if (node.type === 12) { + return [1, 0]; + } + let nc = 1; + let ec = node.props.length > 0 ? 1 : 0; + let bailed = false; + const bail = () => { + bailed = true; + return false; + }; + function walk(node2) { + const isOptionTag = node2.tag === "option" && node2.ns === 0; + for (let i = 0; i < node2.props.length; i++) { + const p = node2.props[i]; + if (p.type === 6 && !isStringifiableAttr(p.name, node2.ns)) { + return bail(); + } + if (p.type === 7 && p.name === "bind") { + if (p.arg && (p.arg.type === 8 || p.arg.isStatic && !isStringifiableAttr(p.arg.content, node2.ns))) { + return bail(); + } + if (p.exp && (p.exp.type === 8 || p.exp.constType < 3)) { + return bail(); + } + if (isOptionTag && compilerCore.isStaticArgOf(p.arg, "value") && p.exp && !p.exp.isStatic) { + return bail(); + } + } + } + for (let i = 0; i < node2.children.length; i++) { + nc++; + const child = node2.children[i]; + if (child.type === 1) { + if (child.props.length > 0) { + ec++; + } + walk(child); + if (bailed) { + return false; + } + } + } + return true; + } + return walk(node) ? [nc, ec] : false; +} +function stringifyNode(node, context) { + if (shared.isString(node)) { + return node; + } + if (shared.isSymbol(node)) { + return ``; + } + switch (node.type) { + case 1: + return stringifyElement(node, context); + case 2: + return shared.escapeHtml(node.content); + case 3: + return `<!--${shared.escapeHtml(node.content)}-->`; + case 5: + return shared.escapeHtml(shared.toDisplayString(evaluateConstant(node.content))); + case 8: + return shared.escapeHtml(evaluateConstant(node)); + case 12: + return stringifyNode(node.content, context); + default: + return ""; + } +} +function stringifyElement(node, context) { + let res = `<${node.tag}`; + let innerHTML = ""; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + res += ` ${p.name}`; + if (p.value) { + res += `="${shared.escapeHtml(p.value.content)}"`; + } + } else if (p.type === 7) { + if (p.name === "bind") { + const exp = p.exp; + if (exp.content[0] === "_") { + res += ` ${p.arg.content}="__VUE_EXP_START__${exp.content}__VUE_EXP_END__"`; + continue; + } + if (shared.isBooleanAttr(p.arg.content) && exp.content === "false") { + continue; + } + let evaluated = evaluateConstant(exp); + if (evaluated != null) { + const arg = p.arg && p.arg.content; + if (arg === "class") { + evaluated = shared.normalizeClass(evaluated); + } else if (arg === "style") { + evaluated = shared.stringifyStyle(shared.normalizeStyle(evaluated)); + } + res += ` ${p.arg.content}="${shared.escapeHtml( + evaluated + )}"`; + } + } else if (p.name === "html") { + innerHTML = evaluateConstant(p.exp); + } else if (p.name === "text") { + innerHTML = shared.escapeHtml( + shared.toDisplayString(evaluateConstant(p.exp)) + ); + } + } + } + if (context.scopeId) { + res += ` ${context.scopeId}`; + } + res += `>`; + if (innerHTML) { + res += innerHTML; + } else { + for (let i = 0; i < node.children.length; i++) { + res += stringifyNode(node.children[i], context); + } + } + if (!shared.isVoidTag(node.tag)) { + res += `</${node.tag}>`; + } + return res; +} +function evaluateConstant(exp) { + if (exp.type === 4) { + return new Function(`return (${exp.content})`)(); + } else { + let res = ``; + exp.children.forEach((c) => { + if (shared.isString(c) || shared.isSymbol(c)) { + return; + } + if (c.type === 2) { + res += c.content; + } else if (c.type === 5) { + res += shared.toDisplayString(evaluateConstant(c.content)); + } else { + res += evaluateConstant(c); + } + }); + return res; + } +} + +const ignoreSideEffectTags = (node, context) => { + if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { + context.removeNode(); + } +}; + +const DOMNodeTransforms = [ + transformStyle, + ...[] +]; +const DOMDirectiveTransforms = { + cloak: compilerCore.noopDirectiveTransform, + html: transformVHtml, + text: transformVText, + model: transformModel, + // override compiler-core + on: transformOn, + // override compiler-core + show: transformShow +}; +function compile(src, options = {}) { + return compilerCore.baseCompile( + src, + shared.extend({}, parserOptions, options, { + nodeTransforms: [ + // ignore <script> and <tag> + // this is not put inside DOMNodeTransforms because that list is used + // by compiler-ssr to generate vnode fallback branches + ignoreSideEffectTags, + ...DOMNodeTransforms, + ...options.nodeTransforms || [] + ], + directiveTransforms: shared.extend( + {}, + DOMDirectiveTransforms, + options.directiveTransforms || {} + ), + transformHoist: stringifyStatic + }) + ); +} +function parse(template, options = {}) { + return compilerCore.baseParse(template, shared.extend({}, parserOptions, options)); +} + +exports.DOMDirectiveTransforms = DOMDirectiveTransforms; +exports.DOMErrorCodes = DOMErrorCodes; +exports.DOMErrorMessages = DOMErrorMessages; +exports.DOMNodeTransforms = DOMNodeTransforms; +exports.TRANSITION = TRANSITION; +exports.TRANSITION_GROUP = TRANSITION_GROUP; +exports.V_MODEL_CHECKBOX = V_MODEL_CHECKBOX; +exports.V_MODEL_DYNAMIC = V_MODEL_DYNAMIC; +exports.V_MODEL_RADIO = V_MODEL_RADIO; +exports.V_MODEL_SELECT = V_MODEL_SELECT; +exports.V_MODEL_TEXT = V_MODEL_TEXT; +exports.V_ON_WITH_KEYS = V_ON_WITH_KEYS; +exports.V_ON_WITH_MODIFIERS = V_ON_WITH_MODIFIERS; +exports.V_SHOW = V_SHOW; +exports.compile = compile; +exports.createDOMCompilerError = createDOMCompilerError; +exports.parse = parse; +exports.parserOptions = parserOptions; +exports.transformStyle = transformStyle; +Object.keys(compilerCore).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = compilerCore[k]; +}); diff --git a/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts b/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts new file mode 100644 index 0000000..b631ed8 --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts @@ -0,0 +1,45 @@ +import { ParserOptions, NodeTransform, SourceLocation, CompilerError, DirectiveTransform, RootNode, CompilerOptions, CodegenResult } from '@vue/compiler-core'; +export * from '@vue/compiler-core'; + +export declare const parserOptions: ParserOptions; + +export declare const V_MODEL_RADIO: unique symbol; +export declare const V_MODEL_CHECKBOX: unique symbol; +export declare const V_MODEL_TEXT: unique symbol; +export declare const V_MODEL_SELECT: unique symbol; +export declare const V_MODEL_DYNAMIC: unique symbol; +export declare const V_ON_WITH_MODIFIERS: unique symbol; +export declare const V_ON_WITH_KEYS: unique symbol; +export declare const V_SHOW: unique symbol; +export declare const TRANSITION: unique symbol; +export declare const TRANSITION_GROUP: unique symbol; + +export declare const transformStyle: NodeTransform; + +interface DOMCompilerError extends CompilerError { + code: DOMErrorCodes; +} +export declare function createDOMCompilerError(code: DOMErrorCodes, loc?: SourceLocation): DOMCompilerError; +export declare enum DOMErrorCodes { + X_V_HTML_NO_EXPRESSION = 53, + X_V_HTML_WITH_CHILDREN = 54, + X_V_TEXT_NO_EXPRESSION = 55, + X_V_TEXT_WITH_CHILDREN = 56, + X_V_MODEL_ON_INVALID_ELEMENT = 57, + X_V_MODEL_ARG_ON_ELEMENT = 58, + X_V_MODEL_ON_FILE_INPUT_ELEMENT = 59, + X_V_MODEL_UNNECESSARY_VALUE = 60, + X_V_SHOW_NO_EXPRESSION = 61, + X_TRANSITION_INVALID_CHILDREN = 62, + X_IGNORED_SIDE_EFFECT_TAG = 63, + __EXTEND_POINT__ = 64 +} +export declare const DOMErrorMessages: { + [code: number]: string; +}; + +export declare const DOMNodeTransforms: NodeTransform[]; +export declare const DOMDirectiveTransforms: Record<string, DirectiveTransform>; +export declare function compile(src: string | RootNode, options?: CompilerOptions): CodegenResult; +export declare function parse(template: string, options?: ParserOptions): RootNode; + diff --git a/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js b/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js new file mode 100644 index 0000000..bd01668 --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js @@ -0,0 +1,6597 @@ +/** +* @vue/compiler-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function makeMap(str) { + const map = /* @__PURE__ */ Object.create(null); + for (const key of str.split(",")) map[key] = 1; + return (val) => val in map; +} + +const EMPTY_OBJ = Object.freeze({}) ; +const NOOP = () => { +}; +const NO = () => false; +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +const extend = Object.assign; +const isArray = Array.isArray; +const isString = (val) => typeof val === "string"; +const isSymbol = (val) => typeof val === "symbol"; +const isObject = (val) => val !== null && typeof val === "object"; +const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); +const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +}; +const camelizeRE = /-(\w)/g; +const camelize = cacheStringFunction( + (str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); + } +); +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const toHandlerKey = cacheStringFunction( + (str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + } +); + +const PatchFlagNames = { + [1]: `TEXT`, + [2]: `CLASS`, + [4]: `STYLE`, + [8]: `PROPS`, + [16]: `FULL_PROPS`, + [32]: `NEED_HYDRATION`, + [64]: `STABLE_FRAGMENT`, + [128]: `KEYED_FRAGMENT`, + [256]: `UNKEYED_FRAGMENT`, + [512]: `NEED_PATCH`, + [1024]: `DYNAMIC_SLOTS`, + [2048]: `DEV_ROOT_FRAGMENT`, + [-1]: `HOISTED`, + [-2]: `BAIL` +}; + +const slotFlagsText = { + [1]: "STABLE", + [2]: "DYNAMIC", + [3]: "FORWARDED" +}; + +const range = 2; +function generateCodeFrame(source, start = 0, end = source.length) { + start = Math.max(0, Math.min(start, source.length)); + end = Math.max(0, Math.min(end, source.length)); + if (start > end) return ""; + let lines = source.split(/(\r?\n)/); + const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); + lines = lines.filter((_, idx) => idx % 2 === 0); + let count = 0; + const res = []; + for (let i = 0; i < lines.length; i++) { + count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); + if (count >= start) { + for (let j = i - range; j <= i + range || end > count; j++) { + if (j < 0 || j >= lines.length) continue; + const line = j + 1; + res.push( + `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` + ); + const lineLength = lines[j].length; + const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; + if (j === i) { + const pad = start - (count - (lineLength + newLineSeqLength)); + const length = Math.max( + 1, + end > count ? lineLength - pad : end - start + ); + res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); + } else if (j > i) { + if (end > count) { + const length = Math.max(Math.min(end - count, lineLength), 1); + res.push(` | ` + "^".repeat(length)); + } + count += lineLength + newLineSeqLength; + } + } + break; + } + } + return res.join("\n"); +} + +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:([^]+)/; +const styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} + +const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; +const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); +const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); +const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); +const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); + +const FRAGMENT = Symbol(`Fragment` ); +const TELEPORT = Symbol(`Teleport` ); +const SUSPENSE = Symbol(`Suspense` ); +const KEEP_ALIVE = Symbol(`KeepAlive` ); +const BASE_TRANSITION = Symbol( + `BaseTransition` +); +const OPEN_BLOCK = Symbol(`openBlock` ); +const CREATE_BLOCK = Symbol(`createBlock` ); +const CREATE_ELEMENT_BLOCK = Symbol( + `createElementBlock` +); +const CREATE_VNODE = Symbol(`createVNode` ); +const CREATE_ELEMENT_VNODE = Symbol( + `createElementVNode` +); +const CREATE_COMMENT = Symbol( + `createCommentVNode` +); +const CREATE_TEXT = Symbol( + `createTextVNode` +); +const CREATE_STATIC = Symbol( + `createStaticVNode` +); +const RESOLVE_COMPONENT = Symbol( + `resolveComponent` +); +const RESOLVE_DYNAMIC_COMPONENT = Symbol( + `resolveDynamicComponent` +); +const RESOLVE_DIRECTIVE = Symbol( + `resolveDirective` +); +const RESOLVE_FILTER = Symbol( + `resolveFilter` +); +const WITH_DIRECTIVES = Symbol( + `withDirectives` +); +const RENDER_LIST = Symbol(`renderList` ); +const RENDER_SLOT = Symbol(`renderSlot` ); +const CREATE_SLOTS = Symbol(`createSlots` ); +const TO_DISPLAY_STRING = Symbol( + `toDisplayString` +); +const MERGE_PROPS = Symbol(`mergeProps` ); +const NORMALIZE_CLASS = Symbol( + `normalizeClass` +); +const NORMALIZE_STYLE = Symbol( + `normalizeStyle` +); +const NORMALIZE_PROPS = Symbol( + `normalizeProps` +); +const GUARD_REACTIVE_PROPS = Symbol( + `guardReactiveProps` +); +const TO_HANDLERS = Symbol(`toHandlers` ); +const CAMELIZE = Symbol(`camelize` ); +const CAPITALIZE = Symbol(`capitalize` ); +const TO_HANDLER_KEY = Symbol( + `toHandlerKey` +); +const SET_BLOCK_TRACKING = Symbol( + `setBlockTracking` +); +const PUSH_SCOPE_ID = Symbol(`pushScopeId` ); +const POP_SCOPE_ID = Symbol(`popScopeId` ); +const WITH_CTX = Symbol(`withCtx` ); +const UNREF = Symbol(`unref` ); +const IS_REF = Symbol(`isRef` ); +const WITH_MEMO = Symbol(`withMemo` ); +const IS_MEMO_SAME = Symbol(`isMemoSame` ); +const helperNameMap = { + [FRAGMENT]: `Fragment`, + [TELEPORT]: `Teleport`, + [SUSPENSE]: `Suspense`, + [KEEP_ALIVE]: `KeepAlive`, + [BASE_TRANSITION]: `BaseTransition`, + [OPEN_BLOCK]: `openBlock`, + [CREATE_BLOCK]: `createBlock`, + [CREATE_ELEMENT_BLOCK]: `createElementBlock`, + [CREATE_VNODE]: `createVNode`, + [CREATE_ELEMENT_VNODE]: `createElementVNode`, + [CREATE_COMMENT]: `createCommentVNode`, + [CREATE_TEXT]: `createTextVNode`, + [CREATE_STATIC]: `createStaticVNode`, + [RESOLVE_COMPONENT]: `resolveComponent`, + [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, + [RESOLVE_DIRECTIVE]: `resolveDirective`, + [RESOLVE_FILTER]: `resolveFilter`, + [WITH_DIRECTIVES]: `withDirectives`, + [RENDER_LIST]: `renderList`, + [RENDER_SLOT]: `renderSlot`, + [CREATE_SLOTS]: `createSlots`, + [TO_DISPLAY_STRING]: `toDisplayString`, + [MERGE_PROPS]: `mergeProps`, + [NORMALIZE_CLASS]: `normalizeClass`, + [NORMALIZE_STYLE]: `normalizeStyle`, + [NORMALIZE_PROPS]: `normalizeProps`, + [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, + [TO_HANDLERS]: `toHandlers`, + [CAMELIZE]: `camelize`, + [CAPITALIZE]: `capitalize`, + [TO_HANDLER_KEY]: `toHandlerKey`, + [SET_BLOCK_TRACKING]: `setBlockTracking`, + [PUSH_SCOPE_ID]: `pushScopeId`, + [POP_SCOPE_ID]: `popScopeId`, + [WITH_CTX]: `withCtx`, + [UNREF]: `unref`, + [IS_REF]: `isRef`, + [WITH_MEMO]: `withMemo`, + [IS_MEMO_SAME]: `isMemoSame` +}; +function registerRuntimeHelpers(helpers) { + Object.getOwnPropertySymbols(helpers).forEach((s) => { + helperNameMap[s] = helpers[s]; + }); +} + +const Namespaces = { + "HTML": 0, + "0": "HTML", + "SVG": 1, + "1": "SVG", + "MATH_ML": 2, + "2": "MATH_ML" +}; +const NodeTypes = { + "ROOT": 0, + "0": "ROOT", + "ELEMENT": 1, + "1": "ELEMENT", + "TEXT": 2, + "2": "TEXT", + "COMMENT": 3, + "3": "COMMENT", + "SIMPLE_EXPRESSION": 4, + "4": "SIMPLE_EXPRESSION", + "INTERPOLATION": 5, + "5": "INTERPOLATION", + "ATTRIBUTE": 6, + "6": "ATTRIBUTE", + "DIRECTIVE": 7, + "7": "DIRECTIVE", + "COMPOUND_EXPRESSION": 8, + "8": "COMPOUND_EXPRESSION", + "IF": 9, + "9": "IF", + "IF_BRANCH": 10, + "10": "IF_BRANCH", + "FOR": 11, + "11": "FOR", + "TEXT_CALL": 12, + "12": "TEXT_CALL", + "VNODE_CALL": 13, + "13": "VNODE_CALL", + "JS_CALL_EXPRESSION": 14, + "14": "JS_CALL_EXPRESSION", + "JS_OBJECT_EXPRESSION": 15, + "15": "JS_OBJECT_EXPRESSION", + "JS_PROPERTY": 16, + "16": "JS_PROPERTY", + "JS_ARRAY_EXPRESSION": 17, + "17": "JS_ARRAY_EXPRESSION", + "JS_FUNCTION_EXPRESSION": 18, + "18": "JS_FUNCTION_EXPRESSION", + "JS_CONDITIONAL_EXPRESSION": 19, + "19": "JS_CONDITIONAL_EXPRESSION", + "JS_CACHE_EXPRESSION": 20, + "20": "JS_CACHE_EXPRESSION", + "JS_BLOCK_STATEMENT": 21, + "21": "JS_BLOCK_STATEMENT", + "JS_TEMPLATE_LITERAL": 22, + "22": "JS_TEMPLATE_LITERAL", + "JS_IF_STATEMENT": 23, + "23": "JS_IF_STATEMENT", + "JS_ASSIGNMENT_EXPRESSION": 24, + "24": "JS_ASSIGNMENT_EXPRESSION", + "JS_SEQUENCE_EXPRESSION": 25, + "25": "JS_SEQUENCE_EXPRESSION", + "JS_RETURN_STATEMENT": 26, + "26": "JS_RETURN_STATEMENT" +}; +const ElementTypes = { + "ELEMENT": 0, + "0": "ELEMENT", + "COMPONENT": 1, + "1": "COMPONENT", + "SLOT": 2, + "2": "SLOT", + "TEMPLATE": 3, + "3": "TEMPLATE" +}; +const ConstantTypes = { + "NOT_CONSTANT": 0, + "0": "NOT_CONSTANT", + "CAN_SKIP_PATCH": 1, + "1": "CAN_SKIP_PATCH", + "CAN_CACHE": 2, + "2": "CAN_CACHE", + "CAN_STRINGIFY": 3, + "3": "CAN_STRINGIFY" +}; +const locStub = { + start: { line: 1, column: 1, offset: 0 }, + end: { line: 1, column: 1, offset: 0 }, + source: "" +}; +function createRoot(children, source = "") { + return { + type: 0, + source, + children, + helpers: /* @__PURE__ */ new Set(), + components: [], + directives: [], + hoists: [], + imports: [], + cached: [], + temps: 0, + codegenNode: void 0, + loc: locStub + }; +} +function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) { + if (context) { + if (isBlock) { + context.helper(OPEN_BLOCK); + context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); + } else { + context.helper(getVNodeHelper(context.inSSR, isComponent)); + } + if (directives) { + context.helper(WITH_DIRECTIVES); + } + } + return { + type: 13, + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent, + loc + }; +} +function createArrayExpression(elements, loc = locStub) { + return { + type: 17, + loc, + elements + }; +} +function createObjectExpression(properties, loc = locStub) { + return { + type: 15, + loc, + properties + }; +} +function createObjectProperty(key, value) { + return { + type: 16, + loc: locStub, + key: isString(key) ? createSimpleExpression(key, true) : key, + value + }; +} +function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { + return { + type: 4, + loc, + content, + isStatic, + constType: isStatic ? 3 : constType + }; +} +function createInterpolation(content, loc) { + return { + type: 5, + loc, + content: isString(content) ? createSimpleExpression(content, false, loc) : content + }; +} +function createCompoundExpression(children, loc = locStub) { + return { + type: 8, + loc, + children + }; +} +function createCallExpression(callee, args = [], loc = locStub) { + return { + type: 14, + loc, + callee, + arguments: args + }; +} +function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { + return { + type: 18, + params, + returns, + newline, + isSlot, + loc + }; +} +function createConditionalExpression(test, consequent, alternate, newline = true) { + return { + type: 19, + test, + consequent, + alternate, + newline, + loc: locStub + }; +} +function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) { + return { + type: 20, + index, + value, + needPauseTracking, + inVOnce, + needArraySpread: false, + loc: locStub + }; +} +function createBlockStatement(body) { + return { + type: 21, + body, + loc: locStub + }; +} +function createTemplateLiteral(elements) { + return { + type: 22, + elements, + loc: locStub + }; +} +function createIfStatement(test, consequent, alternate) { + return { + type: 23, + test, + consequent, + alternate, + loc: locStub + }; +} +function createAssignmentExpression(left, right) { + return { + type: 24, + left, + right, + loc: locStub + }; +} +function createSequenceExpression(expressions) { + return { + type: 25, + expressions, + loc: locStub + }; +} +function createReturnStatement(returns) { + return { + type: 26, + returns, + loc: locStub + }; +} +function getVNodeHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; +} +function getVNodeBlockHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; +} +function convertToBlock(node, { helper, removeHelper, inSSR }) { + if (!node.isBlock) { + node.isBlock = true; + removeHelper(getVNodeHelper(inSSR, node.isComponent)); + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(inSSR, node.isComponent)); + } +} + +const defaultDelimitersOpen = new Uint8Array([123, 123]); +const defaultDelimitersClose = new Uint8Array([125, 125]); +function isTagStartChar(c) { + return c >= 97 && c <= 122 || c >= 65 && c <= 90; +} +function isWhitespace(c) { + return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; +} +function isEndOfTagSection(c) { + return c === 47 || c === 62 || isWhitespace(c); +} +function toCharCodes(str) { + const ret = new Uint8Array(str.length); + for (let i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret; +} +const Sequences = { + Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), + // CDATA[ + CdataEnd: new Uint8Array([93, 93, 62]), + // ]]> + CommentEnd: new Uint8Array([45, 45, 62]), + // `-->` + ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), + // `<\/script` + StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), + // `</style` + TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), + // `</title` + TextareaEnd: new Uint8Array([ + 60, + 47, + 116, + 101, + 120, + 116, + 97, + 114, + 101, + 97 + ]) + // `</textarea +}; +class Tokenizer { + constructor(stack, cbs) { + this.stack = stack; + this.cbs = cbs; + /** The current state the tokenizer is in. */ + this.state = 1; + /** The read buffer. */ + this.buffer = ""; + /** The beginning of the section that is currently being read. */ + this.sectionStart = 0; + /** The index within the buffer that we are currently looking at. */ + this.index = 0; + /** The start of the last entity. */ + this.entityStart = 0; + /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ + this.baseState = 1; + /** For special parsing behavior inside of script and style tags. */ + this.inRCDATA = false; + /** For disabling RCDATA tags handling */ + this.inXML = false; + /** For disabling interpolation parsing in v-pre */ + this.inVPre = false; + /** Record newline positions for fast line / column calculation */ + this.newlines = []; + this.mode = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + this.delimiterIndex = -1; + this.currentSequence = void 0; + this.sequenceIndex = 0; + } + get inSFCRoot() { + return this.mode === 2 && this.stack.length === 0; + } + reset() { + this.state = 1; + this.mode = 0; + this.buffer = ""; + this.sectionStart = 0; + this.index = 0; + this.baseState = 1; + this.inRCDATA = false; + this.currentSequence = void 0; + this.newlines.length = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + } + /** + * Generate Position object with line / column information using recorded + * newline positions. We know the index is always going to be an already + * processed index, so all the newlines up to this index should have been + * recorded. + */ + getPos(index) { + let line = 1; + let column = index + 1; + for (let i = this.newlines.length - 1; i >= 0; i--) { + const newlineIndex = this.newlines[i]; + if (index > newlineIndex) { + line = i + 2; + column = index - newlineIndex; + break; + } + } + return { + column, + line, + offset: index + }; + } + peek() { + return this.buffer.charCodeAt(this.index + 1); + } + stateText(c) { + if (c === 60) { + if (this.index > this.sectionStart) { + this.cbs.ontext(this.sectionStart, this.index); + } + this.state = 5; + this.sectionStart = this.index; + } else if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } + stateInterpolationOpen(c) { + if (c === this.delimiterOpen[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterOpen.length - 1) { + const start = this.index + 1 - this.delimiterOpen.length; + if (start > this.sectionStart) { + this.cbs.ontext(this.sectionStart, start); + } + this.state = 3; + this.sectionStart = start; + } else { + this.delimiterIndex++; + } + } else if (this.inRCDATA) { + this.state = 32; + this.stateInRCDATA(c); + } else { + this.state = 1; + this.stateText(c); + } + } + stateInterpolation(c) { + if (c === this.delimiterClose[0]) { + this.state = 4; + this.delimiterIndex = 0; + this.stateInterpolationClose(c); + } + } + stateInterpolationClose(c) { + if (c === this.delimiterClose[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterClose.length - 1) { + this.cbs.oninterpolation(this.sectionStart, this.index + 1); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else { + this.delimiterIndex++; + } + } else { + this.state = 3; + this.stateInterpolation(c); + } + } + stateSpecialStartSequence(c) { + const isEnd = this.sequenceIndex === this.currentSequence.length; + const isMatch = isEnd ? ( + // If we are at the end of the sequence, make sure the tag name has ended + isEndOfTagSection(c) + ) : ( + // Otherwise, do a case-insensitive comparison + (c | 32) === this.currentSequence[this.sequenceIndex] + ); + if (!isMatch) { + this.inRCDATA = false; + } else if (!isEnd) { + this.sequenceIndex++; + return; + } + this.sequenceIndex = 0; + this.state = 6; + this.stateInTagName(c); + } + /** Look for an end tag. For <title> and <textarea>, also decode entities. */ + stateInRCDATA(c) { + if (this.sequenceIndex === this.currentSequence.length) { + if (c === 62 || isWhitespace(c)) { + const endOfText = this.index - this.currentSequence.length; + if (this.sectionStart < endOfText) { + const actualIndex = this.index; + this.index = endOfText; + this.cbs.ontext(this.sectionStart, endOfText); + this.index = actualIndex; + } + this.sectionStart = endOfText + 2; + this.stateInClosingTagName(c); + this.inRCDATA = false; + return; + } + this.sequenceIndex = 0; + } + if ((c | 32) === this.currentSequence[this.sequenceIndex]) { + this.sequenceIndex += 1; + } else if (this.sequenceIndex === 0) { + if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { + if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } else if (this.fastForwardTo(60)) { + this.sequenceIndex = 1; + } + } else { + this.sequenceIndex = Number(c === 60); + } + } + stateCDATASequence(c) { + if (c === Sequences.Cdata[this.sequenceIndex]) { + if (++this.sequenceIndex === Sequences.Cdata.length) { + this.state = 28; + this.currentSequence = Sequences.CdataEnd; + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + } + } else { + this.sequenceIndex = 0; + this.state = 23; + this.stateInDeclaration(c); + } + } + /** + * When we wait for one specific character, we can speed things up + * by skipping through the buffer until we find it. + * + * @returns Whether the character was found. + */ + fastForwardTo(c) { + while (++this.index < this.buffer.length) { + const cc = this.buffer.charCodeAt(this.index); + if (cc === 10) { + this.newlines.push(this.index); + } + if (cc === c) { + return true; + } + } + this.index = this.buffer.length - 1; + return false; + } + /** + * Comments and CDATA end with `-->` and `]]>`. + * + * Their common qualities are: + * - Their end sequences have a distinct character they start with. + * - That character is then repeated, so we have to check multiple repeats. + * - All characters but the start character of the sequence can be skipped. + */ + stateInCommentLike(c) { + if (c === this.currentSequence[this.sequenceIndex]) { + if (++this.sequenceIndex === this.currentSequence.length) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, this.index - 2); + } else { + this.cbs.oncomment(this.sectionStart, this.index - 2); + } + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + this.state = 1; + } + } else if (this.sequenceIndex === 0) { + if (this.fastForwardTo(this.currentSequence[0])) { + this.sequenceIndex = 1; + } + } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { + this.sequenceIndex = 0; + } + } + startSpecial(sequence, offset) { + this.enterRCDATA(sequence, offset); + this.state = 31; + } + enterRCDATA(sequence, offset) { + this.inRCDATA = true; + this.currentSequence = sequence; + this.sequenceIndex = offset; + } + stateBeforeTagName(c) { + if (c === 33) { + this.state = 22; + this.sectionStart = this.index + 1; + } else if (c === 63) { + this.state = 24; + this.sectionStart = this.index + 1; + } else if (isTagStartChar(c)) { + this.sectionStart = this.index; + if (this.mode === 0) { + this.state = 6; + } else if (this.inSFCRoot) { + this.state = 34; + } else if (!this.inXML) { + if (c === 116) { + this.state = 30; + } else { + this.state = c === 115 ? 29 : 6; + } + } else { + this.state = 6; + } + } else if (c === 47) { + this.state = 8; + } else { + this.state = 1; + this.stateText(c); + } + } + stateInTagName(c) { + if (isEndOfTagSection(c)) { + this.handleTagName(c); + } + } + stateInSFCRootTagName(c) { + if (isEndOfTagSection(c)) { + const tag = this.buffer.slice(this.sectionStart, this.index); + if (tag !== "template") { + this.enterRCDATA(toCharCodes(`</` + tag), 0); + } + this.handleTagName(c); + } + } + handleTagName(c) { + this.cbs.onopentagname(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } + stateBeforeClosingTagName(c) { + if (isWhitespace(c)) ; else if (c === 62) { + { + this.cbs.onerr(14, this.index); + } + this.state = 1; + this.sectionStart = this.index + 1; + } else { + this.state = isTagStartChar(c) ? 9 : 27; + this.sectionStart = this.index; + } + } + stateInClosingTagName(c) { + if (c === 62 || isWhitespace(c)) { + this.cbs.onclosetag(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 10; + this.stateAfterClosingTagName(c); + } + } + stateAfterClosingTagName(c) { + if (c === 62) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeAttrName(c) { + if (c === 62) { + this.cbs.onopentagend(this.index); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else if (c === 47) { + this.state = 7; + if (this.peek() !== 62) { + this.cbs.onerr(22, this.index); + } + } else if (c === 60 && this.peek() === 47) { + this.cbs.onopentagend(this.index); + this.state = 5; + this.sectionStart = this.index; + } else if (!isWhitespace(c)) { + if (c === 61) { + this.cbs.onerr( + 19, + this.index + ); + } + this.handleAttrStart(c); + } + } + handleAttrStart(c) { + if (c === 118 && this.peek() === 45) { + this.state = 13; + this.sectionStart = this.index; + } else if (c === 46 || c === 58 || c === 64 || c === 35) { + this.cbs.ondirname(this.index, this.index + 1); + this.state = 14; + this.sectionStart = this.index + 1; + } else { + this.state = 12; + this.sectionStart = this.index; + } + } + stateInSelfClosingTag(c) { + if (c === 62) { + this.cbs.onselfclosingtag(this.index); + this.state = 1; + this.sectionStart = this.index + 1; + this.inRCDATA = false; + } else if (!isWhitespace(c)) { + this.state = 11; + this.stateBeforeAttrName(c); + } + } + stateInAttrName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.onattribname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 34 || c === 39 || c === 60) { + this.cbs.onerr( + 17, + this.index + ); + } + } + stateInDirName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 58) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 14; + this.sectionStart = this.index + 1; + } else if (c === 46) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDirArg(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 91) { + this.state = 15; + } else if (c === 46) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDynamicDirArg(c) { + if (c === 93) { + this.state = 14; + } else if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index + 1); + this.handleAttrNameEnd(c); + { + this.cbs.onerr( + 27, + this.index + ); + } + } + } + stateInDirModifier(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 46) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.sectionStart = this.index + 1; + } + } + handleAttrNameEnd(c) { + this.sectionStart = this.index; + this.state = 17; + this.cbs.onattribnameend(this.index); + this.stateAfterAttrName(c); + } + stateAfterAttrName(c) { + if (c === 61) { + this.state = 18; + } else if (c === 47 || c === 62) { + this.cbs.onattribend(0, this.sectionStart); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } else if (!isWhitespace(c)) { + this.cbs.onattribend(0, this.sectionStart); + this.handleAttrStart(c); + } + } + stateBeforeAttrValue(c) { + if (c === 34) { + this.state = 19; + this.sectionStart = this.index + 1; + } else if (c === 39) { + this.state = 20; + this.sectionStart = this.index + 1; + } else if (!isWhitespace(c)) { + this.sectionStart = this.index; + this.state = 21; + this.stateInAttrValueNoQuotes(c); + } + } + handleInAttrValue(c, quote) { + if (c === quote || this.fastForwardTo(quote)) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend( + quote === 34 ? 3 : 2, + this.index + 1 + ); + this.state = 11; + } + } + stateInAttrValueDoubleQuotes(c) { + this.handleInAttrValue(c, 34); + } + stateInAttrValueSingleQuotes(c) { + this.handleInAttrValue(c, 39); + } + stateInAttrValueNoQuotes(c) { + if (isWhitespace(c) || c === 62) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend(1, this.index); + this.state = 11; + this.stateBeforeAttrName(c); + } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { + this.cbs.onerr( + 18, + this.index + ); + } else ; + } + stateBeforeDeclaration(c) { + if (c === 91) { + this.state = 26; + this.sequenceIndex = 0; + } else { + this.state = c === 45 ? 25 : 23; + } + } + stateInDeclaration(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateInProcessingInstruction(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.onprocessinginstruction(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeComment(c) { + if (c === 45) { + this.state = 28; + this.currentSequence = Sequences.CommentEnd; + this.sequenceIndex = 2; + this.sectionStart = this.index + 1; + } else { + this.state = 23; + } + } + stateInSpecialComment(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.oncomment(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeSpecialS(c) { + if (c === Sequences.ScriptEnd[3]) { + this.startSpecial(Sequences.ScriptEnd, 4); + } else if (c === Sequences.StyleEnd[3]) { + this.startSpecial(Sequences.StyleEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + stateBeforeSpecialT(c) { + if (c === Sequences.TitleEnd[3]) { + this.startSpecial(Sequences.TitleEnd, 4); + } else if (c === Sequences.TextareaEnd[3]) { + this.startSpecial(Sequences.TextareaEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + startEntity() { + } + stateInEntity() { + } + /** + * Iterates through the buffer, calling the function corresponding to the current state. + * + * States that are more likely to be hit are higher up, as a performance improvement. + */ + parse(input) { + this.buffer = input; + while (this.index < this.buffer.length) { + const c = this.buffer.charCodeAt(this.index); + if (c === 10) { + this.newlines.push(this.index); + } + switch (this.state) { + case 1: { + this.stateText(c); + break; + } + case 2: { + this.stateInterpolationOpen(c); + break; + } + case 3: { + this.stateInterpolation(c); + break; + } + case 4: { + this.stateInterpolationClose(c); + break; + } + case 31: { + this.stateSpecialStartSequence(c); + break; + } + case 32: { + this.stateInRCDATA(c); + break; + } + case 26: { + this.stateCDATASequence(c); + break; + } + case 19: { + this.stateInAttrValueDoubleQuotes(c); + break; + } + case 12: { + this.stateInAttrName(c); + break; + } + case 13: { + this.stateInDirName(c); + break; + } + case 14: { + this.stateInDirArg(c); + break; + } + case 15: { + this.stateInDynamicDirArg(c); + break; + } + case 16: { + this.stateInDirModifier(c); + break; + } + case 28: { + this.stateInCommentLike(c); + break; + } + case 27: { + this.stateInSpecialComment(c); + break; + } + case 11: { + this.stateBeforeAttrName(c); + break; + } + case 6: { + this.stateInTagName(c); + break; + } + case 34: { + this.stateInSFCRootTagName(c); + break; + } + case 9: { + this.stateInClosingTagName(c); + break; + } + case 5: { + this.stateBeforeTagName(c); + break; + } + case 17: { + this.stateAfterAttrName(c); + break; + } + case 20: { + this.stateInAttrValueSingleQuotes(c); + break; + } + case 18: { + this.stateBeforeAttrValue(c); + break; + } + case 8: { + this.stateBeforeClosingTagName(c); + break; + } + case 10: { + this.stateAfterClosingTagName(c); + break; + } + case 29: { + this.stateBeforeSpecialS(c); + break; + } + case 30: { + this.stateBeforeSpecialT(c); + break; + } + case 21: { + this.stateInAttrValueNoQuotes(c); + break; + } + case 7: { + this.stateInSelfClosingTag(c); + break; + } + case 23: { + this.stateInDeclaration(c); + break; + } + case 22: { + this.stateBeforeDeclaration(c); + break; + } + case 25: { + this.stateBeforeComment(c); + break; + } + case 24: { + this.stateInProcessingInstruction(c); + break; + } + case 33: { + this.stateInEntity(); + break; + } + } + this.index++; + } + this.cleanup(); + this.finish(); + } + /** + * Remove data that has already been consumed from the buffer. + */ + cleanup() { + if (this.sectionStart !== this.index) { + if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { + this.cbs.ontext(this.sectionStart, this.index); + this.sectionStart = this.index; + } else if (this.state === 19 || this.state === 20 || this.state === 21) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = this.index; + } + } + } + finish() { + this.handleTrailingData(); + this.cbs.onend(); + } + /** Handle any trailing data. */ + handleTrailingData() { + const endIndex = this.buffer.length; + if (this.sectionStart >= endIndex) { + return; + } + if (this.state === 28) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, endIndex); + } else { + this.cbs.oncomment(this.sectionStart, endIndex); + } + } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { + this.cbs.ontext(this.sectionStart, endIndex); + } + } + emitCodePoint(cp, consumed) { + } +} + +const CompilerDeprecationTypes = { + "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT", + "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC", + "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER", + "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE", + "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE", + "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE", + "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE", + "COMPILER_FILTERS": "COMPILER_FILTERS" +}; +const deprecationData = { + ["COMPILER_IS_ON_ELEMENT"]: { + message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`, + link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` + }, + ["COMPILER_V_BIND_SYNC"]: { + message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` + }, + ["COMPILER_V_BIND_OBJECT_ORDER"]: { + message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` + }, + ["COMPILER_V_ON_NATIVE"]: { + message: `.native modifier for v-on has been removed as is no longer necessary.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` + }, + ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: { + message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` + }, + ["COMPILER_NATIVE_TEMPLATE"]: { + message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.` + }, + ["COMPILER_INLINE_TEMPLATE"]: { + message: `"inline-template" has been removed in Vue 3.`, + link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` + }, + ["COMPILER_FILTERS"]: { + message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`, + link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` + } +}; +function getCompatValue(key, { compatConfig }) { + const value = compatConfig && compatConfig[key]; + if (key === "MODE") { + return value || 3; + } else { + return value; + } +} +function isCompatEnabled(key, context) { + const mode = getCompatValue("MODE", context); + const value = getCompatValue(key, context); + return mode === 3 ? value === true : value !== false; +} +function checkCompatEnabled(key, context, loc, ...args) { + const enabled = isCompatEnabled(key, context); + if (enabled) { + warnDeprecation(key, context, loc, ...args); + } + return enabled; +} +function warnDeprecation(key, context, loc, ...args) { + const val = getCompatValue(key, context); + if (val === "suppress-warning") { + return; + } + const { message, link } = deprecationData[key]; + const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? ` + Details: ${link}` : ``}`; + const err = new SyntaxError(msg); + err.code = key; + if (loc) err.loc = loc; + context.onWarn(err); +} + +function defaultOnError(error) { + throw error; +} +function defaultOnWarn(msg) { + console.warn(`[Vue warn] ${msg.message}`); +} +function createCompilerError(code, loc, messages, additionalMessage) { + const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ; + const error = new SyntaxError(String(msg)); + error.code = code; + error.loc = loc; + return error; +} +const ErrorCodes = { + "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0, + "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT", + "CDATA_IN_HTML_CONTENT": 1, + "1": "CDATA_IN_HTML_CONTENT", + "DUPLICATE_ATTRIBUTE": 2, + "2": "DUPLICATE_ATTRIBUTE", + "END_TAG_WITH_ATTRIBUTES": 3, + "3": "END_TAG_WITH_ATTRIBUTES", + "END_TAG_WITH_TRAILING_SOLIDUS": 4, + "4": "END_TAG_WITH_TRAILING_SOLIDUS", + "EOF_BEFORE_TAG_NAME": 5, + "5": "EOF_BEFORE_TAG_NAME", + "EOF_IN_CDATA": 6, + "6": "EOF_IN_CDATA", + "EOF_IN_COMMENT": 7, + "7": "EOF_IN_COMMENT", + "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8, + "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT", + "EOF_IN_TAG": 9, + "9": "EOF_IN_TAG", + "INCORRECTLY_CLOSED_COMMENT": 10, + "10": "INCORRECTLY_CLOSED_COMMENT", + "INCORRECTLY_OPENED_COMMENT": 11, + "11": "INCORRECTLY_OPENED_COMMENT", + "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12, + "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME", + "MISSING_ATTRIBUTE_VALUE": 13, + "13": "MISSING_ATTRIBUTE_VALUE", + "MISSING_END_TAG_NAME": 14, + "14": "MISSING_END_TAG_NAME", + "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15, + "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES", + "NESTED_COMMENT": 16, + "16": "NESTED_COMMENT", + "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17, + "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME", + "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18, + "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE", + "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19, + "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME", + "UNEXPECTED_NULL_CHARACTER": 20, + "20": "UNEXPECTED_NULL_CHARACTER", + "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21, + "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME", + "UNEXPECTED_SOLIDUS_IN_TAG": 22, + "22": "UNEXPECTED_SOLIDUS_IN_TAG", + "X_INVALID_END_TAG": 23, + "23": "X_INVALID_END_TAG", + "X_MISSING_END_TAG": 24, + "24": "X_MISSING_END_TAG", + "X_MISSING_INTERPOLATION_END": 25, + "25": "X_MISSING_INTERPOLATION_END", + "X_MISSING_DIRECTIVE_NAME": 26, + "26": "X_MISSING_DIRECTIVE_NAME", + "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27, + "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END", + "X_V_IF_NO_EXPRESSION": 28, + "28": "X_V_IF_NO_EXPRESSION", + "X_V_IF_SAME_KEY": 29, + "29": "X_V_IF_SAME_KEY", + "X_V_ELSE_NO_ADJACENT_IF": 30, + "30": "X_V_ELSE_NO_ADJACENT_IF", + "X_V_FOR_NO_EXPRESSION": 31, + "31": "X_V_FOR_NO_EXPRESSION", + "X_V_FOR_MALFORMED_EXPRESSION": 32, + "32": "X_V_FOR_MALFORMED_EXPRESSION", + "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33, + "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT", + "X_V_BIND_NO_EXPRESSION": 34, + "34": "X_V_BIND_NO_EXPRESSION", + "X_V_ON_NO_EXPRESSION": 35, + "35": "X_V_ON_NO_EXPRESSION", + "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36, + "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET", + "X_V_SLOT_MIXED_SLOT_USAGE": 37, + "37": "X_V_SLOT_MIXED_SLOT_USAGE", + "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38, + "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES", + "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39, + "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN", + "X_V_SLOT_MISPLACED": 40, + "40": "X_V_SLOT_MISPLACED", + "X_V_MODEL_NO_EXPRESSION": 41, + "41": "X_V_MODEL_NO_EXPRESSION", + "X_V_MODEL_MALFORMED_EXPRESSION": 42, + "42": "X_V_MODEL_MALFORMED_EXPRESSION", + "X_V_MODEL_ON_SCOPE_VARIABLE": 43, + "43": "X_V_MODEL_ON_SCOPE_VARIABLE", + "X_V_MODEL_ON_PROPS": 44, + "44": "X_V_MODEL_ON_PROPS", + "X_INVALID_EXPRESSION": 45, + "45": "X_INVALID_EXPRESSION", + "X_KEEP_ALIVE_INVALID_CHILDREN": 46, + "46": "X_KEEP_ALIVE_INVALID_CHILDREN", + "X_PREFIX_ID_NOT_SUPPORTED": 47, + "47": "X_PREFIX_ID_NOT_SUPPORTED", + "X_MODULE_MODE_NOT_SUPPORTED": 48, + "48": "X_MODULE_MODE_NOT_SUPPORTED", + "X_CACHE_HANDLER_NOT_SUPPORTED": 49, + "49": "X_CACHE_HANDLER_NOT_SUPPORTED", + "X_SCOPE_ID_NOT_SUPPORTED": 50, + "50": "X_SCOPE_ID_NOT_SUPPORTED", + "X_VNODE_HOOKS": 51, + "51": "X_VNODE_HOOKS", + "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52, + "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT", + "__EXTEND_POINT__": 53, + "53": "__EXTEND_POINT__" +}; +const errorMessages = { + // parse errors + [0]: "Illegal comment.", + [1]: "CDATA section is allowed only in XML context.", + [2]: "Duplicate attribute.", + [3]: "End tag cannot have attributes.", + [4]: "Illegal '/' in tags.", + [5]: "Unexpected EOF in tag.", + [6]: "Unexpected EOF in CDATA section.", + [7]: "Unexpected EOF in comment.", + [8]: "Unexpected EOF in script.", + [9]: "Unexpected EOF in tag.", + [10]: "Incorrectly closed comment.", + [11]: "Incorrectly opened comment.", + [12]: "Illegal tag name. Use '<' to print '<'.", + [13]: "Attribute value was expected.", + [14]: "End tag name was expected.", + [15]: "Whitespace was expected.", + [16]: "Unexpected '<!--' in comment.", + [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, + [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", + [19]: "Attribute name cannot start with '='.", + [21]: "'<?' is allowed only in XML context.", + [20]: `Unexpected null character.`, + [22]: "Illegal '/' in tags.", + // Vue-specific parse errors + [23]: "Invalid end tag.", + [24]: "Element is missing end tag.", + [25]: "Interpolation end sign was not found.", + [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", + [26]: "Legal directive name was expected.", + // transform errors + [28]: `v-if/v-else-if is missing expression.`, + [29]: `v-if/else branches must use unique keys.`, + [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, + [31]: `v-for is missing expression.`, + [32]: `v-for has invalid expression.`, + [33]: `<template v-for> key should be placed on the <template> tag.`, + [34]: `v-bind is missing expression.`, + [52]: `v-bind with same-name shorthand only allows static argument.`, + [35]: `v-on is missing expression.`, + [36]: `Unexpected custom directive on <slot> outlet.`, + [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, + [38]: `Duplicate slot names found. `, + [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, + [40]: `v-slot can only be used on components or <template> tags.`, + [41]: `v-model is missing expression.`, + [42]: `v-model value must be a valid JavaScript member expression.`, + [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, + [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. +Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, + [45]: `Error parsing JavaScript expression: `, + [46]: `<KeepAlive> expects exactly one child component.`, + [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, + // generic errors + [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, + [48]: `ES module mode is not supported in this build of compiler.`, + [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, + [50]: `"scopeId" option is only supported in module mode.`, + // just to fulfill types + [53]: `` +}; + +function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { + { + return; + } +} +function isReferencedIdentifier(id, parent, parentStack) { + { + return false; + } +} +function isInDestructureAssignment(parent, parentStack) { + if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "AssignmentExpression") { + return true; + } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) { + break; + } + } + } + return false; +} +function isInNewExpression(parentStack) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "NewExpression") { + return true; + } else if (p.type !== "MemberExpression") { + break; + } + } + return false; +} +function walkFunctionParams(node, onIdent) { + for (const p of node.params) { + for (const id of extractIdentifiers(p)) { + onIdent(id); + } + } +} +function walkBlockDeclarations(block, onIdent) { + for (const stmt of block.body) { + if (stmt.type === "VariableDeclaration") { + if (stmt.declare) continue; + for (const decl of stmt.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { + if (stmt.declare || !stmt.id) continue; + onIdent(stmt.id); + } else if (isForStatement(stmt)) { + walkForStatement(stmt, true, onIdent); + } + } +} +function isForStatement(stmt) { + return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement"; +} +function walkForStatement(stmt, isVar, onIdent) { + const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left; + if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) { + for (const decl of variable.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } +} +function extractIdentifiers(param, nodes = []) { + switch (param.type) { + case "Identifier": + nodes.push(param); + break; + case "MemberExpression": + let object = param; + while (object.type === "MemberExpression") { + object = object.object; + } + nodes.push(object); + break; + case "ObjectPattern": + for (const prop of param.properties) { + if (prop.type === "RestElement") { + extractIdentifiers(prop.argument, nodes); + } else { + extractIdentifiers(prop.value, nodes); + } + } + break; + case "ArrayPattern": + param.elements.forEach((element) => { + if (element) extractIdentifiers(element, nodes); + }); + break; + case "RestElement": + extractIdentifiers(param.argument, nodes); + break; + case "AssignmentPattern": + extractIdentifiers(param.left, nodes); + break; + } + return nodes; +} +const isFunctionType = (node) => { + return /Function(?:Expression|Declaration)$|Method$/.test(node.type); +}; +const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed; +const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; +const TS_NODE_TYPES = [ + "TSAsExpression", + // foo as number + "TSTypeAssertion", + // (<number>foo) + "TSNonNullExpression", + // foo! + "TSInstantiationExpression", + // foo<string> + "TSSatisfiesExpression" + // foo satisfies T +]; +function unwrapTSNode(node) { + if (TS_NODE_TYPES.includes(node.type)) { + return unwrapTSNode(node.expression); + } else { + return node; + } +} + +const isStaticExp = (p) => p.type === 4 && p.isStatic; +function isCoreComponent(tag) { + switch (tag) { + case "Teleport": + case "teleport": + return TELEPORT; + case "Suspense": + case "suspense": + return SUSPENSE; + case "KeepAlive": + case "keep-alive": + return KEEP_ALIVE; + case "BaseTransition": + case "base-transition": + return BASE_TRANSITION; + } +} +const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/; +const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); +const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; +const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; +const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; +const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source; +const isMemberExpressionBrowser = (exp) => { + const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim()); + let state = 0 /* inMemberExp */; + let stateStack = []; + let currentOpenBracketCount = 0; + let currentOpenParensCount = 0; + let currentStringType = null; + for (let i = 0; i < path.length; i++) { + const char = path.charAt(i); + switch (state) { + case 0 /* inMemberExp */: + if (char === "[") { + stateStack.push(state); + state = 1 /* inBrackets */; + currentOpenBracketCount++; + } else if (char === "(") { + stateStack.push(state); + state = 2 /* inParens */; + currentOpenParensCount++; + } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { + return false; + } + break; + case 1 /* inBrackets */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `[`) { + currentOpenBracketCount++; + } else if (char === `]`) { + if (!--currentOpenBracketCount) { + state = stateStack.pop(); + } + } + break; + case 2 /* inParens */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `(`) { + currentOpenParensCount++; + } else if (char === `)`) { + if (i === path.length - 1) { + return false; + } + if (!--currentOpenParensCount) { + state = stateStack.pop(); + } + } + break; + case 3 /* inString */: + if (char === currentStringType) { + state = stateStack.pop(); + currentStringType = null; + } + break; + } + } + return !currentOpenBracketCount && !currentOpenParensCount; +}; +const isMemberExpressionNode = NOOP ; +const isMemberExpression = isMemberExpressionBrowser ; +const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; +const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp)); +const isFnExpressionNode = NOOP ; +const isFnExpression = isFnExpressionBrowser ; +function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { + return advancePositionWithMutation( + { + offset: pos.offset, + line: pos.line, + column: pos.column + }, + source, + numberOfCharacters + ); +} +function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { + let linesCount = 0; + let lastNewLinePos = -1; + for (let i = 0; i < numberOfCharacters; i++) { + if (source.charCodeAt(i) === 10) { + linesCount++; + lastNewLinePos = i; + } + } + pos.offset += numberOfCharacters; + pos.line += linesCount; + pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos; + return pos; +} +function assert(condition, msg) { + if (!condition) { + throw new Error(msg || `unexpected compiler condition`); + } +} +function findDir(node, name, allowEmpty = false) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) { + return p; + } + } +} +function findProp(node, name, dynamicOnly = false, allowEmpty = false) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (dynamicOnly) continue; + if (p.name === name && (p.value || allowEmpty)) { + return p; + } + } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { + return p; + } + } +} +function isStaticArgOf(arg, name) { + return !!(arg && isStaticExp(arg) && arg.content === name); +} +function hasDynamicKeyVBind(node) { + return node.props.some( + (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" + p.arg.type !== 4 || // v-bind:[_ctx.foo] + !p.arg.isStatic) + // v-bind:[foo] + ); +} +function isText$1(node) { + return node.type === 5 || node.type === 2; +} +function isVSlot(p) { + return p.type === 7 && p.name === "slot"; +} +function isTemplateNode(node) { + return node.type === 1 && node.tagType === 3; +} +function isSlotOutlet(node) { + return node.type === 1 && node.tagType === 2; +} +const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); +function getUnnormalizedProps(props, callPath = []) { + if (props && !isString(props) && props.type === 14) { + const callee = props.callee; + if (!isString(callee) && propsHelperSet.has(callee)) { + return getUnnormalizedProps( + props.arguments[0], + callPath.concat(props) + ); + } + } + return [props, callPath]; +} +function injectProp(node, prop, context) { + let propsWithInjection; + let props = node.type === 13 ? node.props : node.arguments[2]; + let callPath = []; + let parentCall; + if (props && !isString(props) && props.type === 14) { + const ret = getUnnormalizedProps(props); + props = ret[0]; + callPath = ret[1]; + parentCall = callPath[callPath.length - 1]; + } + if (props == null || isString(props)) { + propsWithInjection = createObjectExpression([prop]); + } else if (props.type === 14) { + const first = props.arguments[0]; + if (!isString(first) && first.type === 15) { + if (!hasProp(prop, first)) { + first.properties.unshift(prop); + } + } else { + if (props.callee === TO_HANDLERS) { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + } else { + props.arguments.unshift(createObjectExpression([prop])); + } + } + !propsWithInjection && (propsWithInjection = props); + } else if (props.type === 15) { + if (!hasProp(prop, props)) { + props.properties.unshift(prop); + } + propsWithInjection = props; + } else { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { + parentCall = callPath[callPath.length - 2]; + } + } + if (node.type === 13) { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.props = propsWithInjection; + } + } else { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.arguments[2] = propsWithInjection; + } + } +} +function hasProp(prop, props) { + let result = false; + if (prop.key.type === 4) { + const propKeyName = prop.key.content; + result = props.properties.some( + (p) => p.key.type === 4 && p.key.content === propKeyName + ); + } + return result; +} +function toValidAssetId(name, type) { + return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { + return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); + })}`; +} +function hasScopeRef(node, ids) { + if (!node || Object.keys(ids).length === 0) { + return false; + } + switch (node.type) { + case 1: + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { + return true; + } + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 11: + if (hasScopeRef(node.source, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 9: + return node.branches.some((b) => hasScopeRef(b, ids)); + case 10: + if (hasScopeRef(node.condition, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 4: + return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content]; + case 8: + return node.children.some((c) => isObject(c) && hasScopeRef(c, ids)); + case 5: + case 12: + return hasScopeRef(node.content, ids); + case 2: + case 3: + case 20: + return false; + default: + return false; + } +} +function getMemoedVNodeCall(node) { + if (node.type === 14 && node.callee === WITH_MEMO) { + return node.arguments[1].returns; + } else { + return node; + } +} +const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/; + +const defaultParserOptions = { + parseMode: "base", + ns: 0, + delimiters: [`{{`, `}}`], + getNamespace: () => 0, + isVoidTag: NO, + isPreTag: NO, + isIgnoreNewlineTag: NO, + isCustomElement: NO, + onError: defaultOnError, + onWarn: defaultOnWarn, + comments: true, + prefixIdentifiers: false +}; +let currentOptions = defaultParserOptions; +let currentRoot = null; +let currentInput = ""; +let currentOpenTag = null; +let currentProp = null; +let currentAttrValue = ""; +let currentAttrStartIndex = -1; +let currentAttrEndIndex = -1; +let inPre = 0; +let inVPre = false; +let currentVPreBoundary = null; +const stack = []; +const tokenizer = new Tokenizer(stack, { + onerr: emitError, + ontext(start, end) { + onText(getSlice(start, end), start, end); + }, + ontextentity(char, start, end) { + onText(char, start, end); + }, + oninterpolation(start, end) { + if (inVPre) { + return onText(getSlice(start, end), start, end); + } + let innerStart = start + tokenizer.delimiterOpen.length; + let innerEnd = end - tokenizer.delimiterClose.length; + while (isWhitespace(currentInput.charCodeAt(innerStart))) { + innerStart++; + } + while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { + innerEnd--; + } + let exp = getSlice(innerStart, innerEnd); + if (exp.includes("&")) { + { + exp = currentOptions.decodeEntities(exp, false); + } + } + addNode({ + type: 5, + content: createExp(exp, false, getLoc(innerStart, innerEnd)), + loc: getLoc(start, end) + }); + }, + onopentagname(start, end) { + const name = getSlice(start, end); + currentOpenTag = { + type: 1, + tag: name, + ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), + tagType: 0, + // will be refined on tag close + props: [], + children: [], + loc: getLoc(start - 1, end), + codegenNode: void 0 + }; + }, + onopentagend(end) { + endOpenTag(end); + }, + onclosetag(start, end) { + const name = getSlice(start, end); + if (!currentOptions.isVoidTag(name)) { + let found = false; + for (let i = 0; i < stack.length; i++) { + const e = stack[i]; + if (e.tag.toLowerCase() === name.toLowerCase()) { + found = true; + if (i > 0) { + emitError(24, stack[0].loc.start.offset); + } + for (let j = 0; j <= i; j++) { + const el = stack.shift(); + onCloseTag(el, end, j < i); + } + break; + } + } + if (!found) { + emitError(23, backTrack(start, 60)); + } + } + }, + onselfclosingtag(end) { + const name = currentOpenTag.tag; + currentOpenTag.isSelfClosing = true; + endOpenTag(end); + if (stack[0] && stack[0].tag === name) { + onCloseTag(stack.shift(), end); + } + }, + onattribname(start, end) { + currentProp = { + type: 6, + name: getSlice(start, end), + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + }, + ondirname(start, end) { + const raw = getSlice(start, end); + const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); + if (!inVPre && name === "") { + emitError(26, start); + } + if (inVPre || name === "") { + currentProp = { + type: 6, + name: raw, + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + } else { + currentProp = { + type: 7, + name, + rawName: raw, + exp: void 0, + arg: void 0, + modifiers: raw === "." ? [createSimpleExpression("prop")] : [], + loc: getLoc(start) + }; + if (name === "pre") { + inVPre = tokenizer.inVPre = true; + currentVPreBoundary = currentOpenTag; + const props = currentOpenTag.props; + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7) { + props[i] = dirToAttr(props[i]); + } + } + } + } + }, + ondirarg(start, end) { + if (start === end) return; + const arg = getSlice(start, end); + if (inVPre) { + currentProp.name += arg; + setLocEnd(currentProp.nameLoc, end); + } else { + const isStatic = arg[0] !== `[`; + currentProp.arg = createExp( + isStatic ? arg : arg.slice(1, -1), + isStatic, + getLoc(start, end), + isStatic ? 3 : 0 + ); + } + }, + ondirmodifier(start, end) { + const mod = getSlice(start, end); + if (inVPre) { + currentProp.name += "." + mod; + setLocEnd(currentProp.nameLoc, end); + } else if (currentProp.name === "slot") { + const arg = currentProp.arg; + if (arg) { + arg.content += "." + mod; + setLocEnd(arg.loc, end); + } + } else { + const exp = createSimpleExpression(mod, true, getLoc(start, end)); + currentProp.modifiers.push(exp); + } + }, + onattribdata(start, end) { + currentAttrValue += getSlice(start, end); + if (currentAttrStartIndex < 0) currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribentity(char, start, end) { + currentAttrValue += char; + if (currentAttrStartIndex < 0) currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribnameend(end) { + const start = currentProp.loc.start.offset; + const name = getSlice(start, end); + if (currentProp.type === 7) { + currentProp.rawName = name; + } + if (currentOpenTag.props.some( + (p) => (p.type === 7 ? p.rawName : p.name) === name + )) { + emitError(2, start); + } + }, + onattribend(quote, end) { + if (currentOpenTag && currentProp) { + setLocEnd(currentProp.loc, end); + if (quote !== 0) { + if (currentAttrValue.includes("&")) { + currentAttrValue = currentOptions.decodeEntities( + currentAttrValue, + true + ); + } + if (currentProp.type === 6) { + if (currentProp.name === "class") { + currentAttrValue = condense(currentAttrValue).trim(); + } + if (quote === 1 && !currentAttrValue) { + emitError(13, end); + } + currentProp.value = { + type: 2, + content: currentAttrValue, + loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) + }; + if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { + tokenizer.enterRCDATA(toCharCodes(`</template`), 0); + } + } else { + let expParseMode = 0 /* Normal */; + currentProp.exp = createExp( + currentAttrValue, + false, + getLoc(currentAttrStartIndex, currentAttrEndIndex), + 0, + expParseMode + ); + if (currentProp.name === "for") { + currentProp.forParseResult = parseForExpression(currentProp.exp); + } + let syncIndex = -1; + if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.findIndex( + (mod) => mod.content === "sync" + )) > -1 && checkCompatEnabled( + "COMPILER_V_BIND_SYNC", + currentOptions, + currentProp.loc, + currentProp.rawName + )) { + currentProp.name = "model"; + currentProp.modifiers.splice(syncIndex, 1); + } + } + } + if (currentProp.type !== 7 || currentProp.name !== "pre") { + currentOpenTag.props.push(currentProp); + } + } + currentAttrValue = ""; + currentAttrStartIndex = currentAttrEndIndex = -1; + }, + oncomment(start, end) { + if (currentOptions.comments) { + addNode({ + type: 3, + content: getSlice(start, end), + loc: getLoc(start - 4, end + 3) + }); + } + }, + onend() { + const end = currentInput.length; + if (tokenizer.state !== 1) { + switch (tokenizer.state) { + case 5: + case 8: + emitError(5, end); + break; + case 3: + case 4: + emitError( + 25, + tokenizer.sectionStart + ); + break; + case 28: + if (tokenizer.currentSequence === Sequences.CdataEnd) { + emitError(6, end); + } else { + emitError(7, end); + } + break; + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + // " + case 20: + // ' + case 21: + emitError(9, end); + break; + } + } + for (let index = 0; index < stack.length; index++) { + onCloseTag(stack[index], end - 1); + emitError(24, stack[index].loc.start.offset); + } + }, + oncdata(start, end) { + if (stack[0].ns !== 0) { + onText(getSlice(start, end), start, end); + } else { + emitError(1, start - 9); + } + }, + onprocessinginstruction(start) { + if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + emitError( + 21, + start - 1 + ); + } + } +}); +const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; +const stripParensRE = /^\(|\)$/g; +function parseForExpression(input) { + const loc = input.loc; + const exp = input.content; + const inMatch = exp.match(forAliasRE); + if (!inMatch) return; + const [, LHS, RHS] = inMatch; + const createAliasExpression = (content, offset, asParam = false) => { + const start = loc.start.offset + offset; + const end = start + content.length; + return createExp( + content, + false, + getLoc(start, end), + 0, + asParam ? 1 /* Params */ : 0 /* Normal */ + ); + }; + const result = { + source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), + value: void 0, + key: void 0, + index: void 0, + finalized: false + }; + let valueContent = LHS.trim().replace(stripParensRE, "").trim(); + const trimmedOffset = LHS.indexOf(valueContent); + const iteratorMatch = valueContent.match(forIteratorRE); + if (iteratorMatch) { + valueContent = valueContent.replace(forIteratorRE, "").trim(); + const keyContent = iteratorMatch[1].trim(); + let keyOffset; + if (keyContent) { + keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); + result.key = createAliasExpression(keyContent, keyOffset, true); + } + if (iteratorMatch[2]) { + const indexContent = iteratorMatch[2].trim(); + if (indexContent) { + result.index = createAliasExpression( + indexContent, + exp.indexOf( + indexContent, + result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length + ), + true + ); + } + } + } + if (valueContent) { + result.value = createAliasExpression(valueContent, trimmedOffset, true); + } + return result; +} +function getSlice(start, end) { + return currentInput.slice(start, end); +} +function endOpenTag(end) { + if (tokenizer.inSFCRoot) { + currentOpenTag.innerLoc = getLoc(end + 1, end + 1); + } + addNode(currentOpenTag); + const { tag, ns } = currentOpenTag; + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre++; + } + if (currentOptions.isVoidTag(tag)) { + onCloseTag(currentOpenTag, end); + } else { + stack.unshift(currentOpenTag); + if (ns === 1 || ns === 2) { + tokenizer.inXML = true; + } + } + currentOpenTag = null; +} +function onText(content, start, end) { + { + const tag = stack[0] && stack[0].tag; + if (tag !== "script" && tag !== "style" && content.includes("&")) { + content = currentOptions.decodeEntities(content, false); + } + } + const parent = stack[0] || currentRoot; + const lastNode = parent.children[parent.children.length - 1]; + if (lastNode && lastNode.type === 2) { + lastNode.content += content; + setLocEnd(lastNode.loc, end); + } else { + parent.children.push({ + type: 2, + content, + loc: getLoc(start, end) + }); + } +} +function onCloseTag(el, end, isImplied = false) { + if (isImplied) { + setLocEnd(el.loc, backTrack(end, 60)); + } else { + setLocEnd(el.loc, lookAhead(end, 62) + 1); + } + if (tokenizer.inSFCRoot) { + if (el.children.length) { + el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end); + } else { + el.innerLoc.end = extend({}, el.innerLoc.start); + } + el.innerLoc.source = getSlice( + el.innerLoc.start.offset, + el.innerLoc.end.offset + ); + } + const { tag, ns, children } = el; + if (!inVPre) { + if (tag === "slot") { + el.tagType = 2; + } else if (isFragmentTemplate(el)) { + el.tagType = 3; + } else if (isComponent(el)) { + el.tagType = 1; + } + } + if (!tokenizer.inRCDATA) { + el.children = condenseWhitespace(children); + } + if (ns === 0 && currentOptions.isIgnoreNewlineTag(tag)) { + const first = children[0]; + if (first && first.type === 2) { + first.content = first.content.replace(/^\r?\n/, ""); + } + } + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre--; + } + if (currentVPreBoundary === el) { + inVPre = tokenizer.inVPre = false; + currentVPreBoundary = null; + } + if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + tokenizer.inXML = false; + } + { + const props = el.props; + if (isCompatEnabled( + "COMPILER_V_IF_V_FOR_PRECEDENCE", + currentOptions + )) { + let hasIf = false; + let hasFor = false; + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 7) { + if (p.name === "if") { + hasIf = true; + } else if (p.name === "for") { + hasFor = true; + } + } + if (hasIf && hasFor) { + warnDeprecation( + "COMPILER_V_IF_V_FOR_PRECEDENCE", + currentOptions, + el.loc + ); + break; + } + } + } + if (!tokenizer.inSFCRoot && isCompatEnabled( + "COMPILER_NATIVE_TEMPLATE", + currentOptions + ) && el.tag === "template" && !isFragmentTemplate(el)) { + warnDeprecation( + "COMPILER_NATIVE_TEMPLATE", + currentOptions, + el.loc + ); + const parent = stack[0] || currentRoot; + const index = parent.children.indexOf(el); + parent.children.splice(index, 1, ...el.children); + } + const inlineTemplateProp = props.find( + (p) => p.type === 6 && p.name === "inline-template" + ); + if (inlineTemplateProp && checkCompatEnabled( + "COMPILER_INLINE_TEMPLATE", + currentOptions, + inlineTemplateProp.loc + ) && el.children.length) { + inlineTemplateProp.value = { + type: 2, + content: getSlice( + el.children[0].loc.start.offset, + el.children[el.children.length - 1].loc.end.offset + ), + loc: inlineTemplateProp.loc + }; + } + } +} +function lookAhead(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1) i++; + return i; +} +function backTrack(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i >= 0) i--; + return i; +} +const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); +function isFragmentTemplate({ tag, props }) { + if (tag === "template") { + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { + return true; + } + } + } + return false; +} +function isComponent({ tag, props }) { + if (currentOptions.isCustomElement(tag)) { + return false; + } + if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { + return true; + } + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 6) { + if (p.name === "is" && p.value) { + if (p.value.content.startsWith("vue:")) { + return true; + } else if (checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + } else if (// :is on plain element - only treat as component in compat mode + p.name === "bind" && isStaticArgOf(p.arg, "is") && checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + return false; +} +function isUpperCase(c) { + return c > 64 && c < 91; +} +const windowsNewlineRE = /\r\n/g; +function condenseWhitespace(nodes, tag) { + const shouldCondense = currentOptions.whitespace !== "preserve"; + let removedWhitespace = false; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (node.type === 2) { + if (!inPre) { + if (isAllWhitespace(node.content)) { + const prev = nodes[i - 1] && nodes[i - 1].type; + const next = nodes[i + 1] && nodes[i + 1].type; + if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { + removedWhitespace = true; + nodes[i] = null; + } else { + node.content = " "; + } + } else if (shouldCondense) { + node.content = condense(node.content); + } + } else { + node.content = node.content.replace(windowsNewlineRE, "\n"); + } + } + } + return removedWhitespace ? nodes.filter(Boolean) : nodes; +} +function isAllWhitespace(str) { + for (let i = 0; i < str.length; i++) { + if (!isWhitespace(str.charCodeAt(i))) { + return false; + } + } + return true; +} +function hasNewlineChar(str) { + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + if (c === 10 || c === 13) { + return true; + } + } + return false; +} +function condense(str) { + let ret = ""; + let prevCharIsWhitespace = false; + for (let i = 0; i < str.length; i++) { + if (isWhitespace(str.charCodeAt(i))) { + if (!prevCharIsWhitespace) { + ret += " "; + prevCharIsWhitespace = true; + } + } else { + ret += str[i]; + prevCharIsWhitespace = false; + } + } + return ret; +} +function addNode(node) { + (stack[0] || currentRoot).children.push(node); +} +function getLoc(start, end) { + return { + start: tokenizer.getPos(start), + // @ts-expect-error allow late attachment + end: end == null ? end : tokenizer.getPos(end), + // @ts-expect-error allow late attachment + source: end == null ? end : getSlice(start, end) + }; +} +function cloneLoc(loc) { + return getLoc(loc.start.offset, loc.end.offset); +} +function setLocEnd(loc, end) { + loc.end = tokenizer.getPos(end); + loc.source = getSlice(loc.start.offset, end); +} +function dirToAttr(dir) { + const attr = { + type: 6, + name: dir.rawName, + nameLoc: getLoc( + dir.loc.start.offset, + dir.loc.start.offset + dir.rawName.length + ), + value: void 0, + loc: dir.loc + }; + if (dir.exp) { + const loc = dir.exp.loc; + if (loc.end.offset < dir.loc.end.offset) { + loc.start.offset--; + loc.start.column--; + loc.end.offset++; + loc.end.column++; + } + attr.value = { + type: 2, + content: dir.exp.content, + loc + }; + } + return attr; +} +function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { + const exp = createSimpleExpression(content, isStatic, loc, constType); + return exp; +} +function emitError(code, index, message) { + currentOptions.onError( + createCompilerError(code, getLoc(index, index), void 0, message) + ); +} +function reset() { + tokenizer.reset(); + currentOpenTag = null; + currentProp = null; + currentAttrValue = ""; + currentAttrStartIndex = -1; + currentAttrEndIndex = -1; + stack.length = 0; +} +function baseParse(input, options) { + reset(); + currentInput = input; + currentOptions = extend({}, defaultParserOptions); + if (options) { + let key; + for (key in options) { + if (options[key] != null) { + currentOptions[key] = options[key]; + } + } + } + { + if (!currentOptions.decodeEntities) { + throw new Error( + `[@vue/compiler-core] decodeEntities option is required in browser builds.` + ); + } + } + tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; + tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; + const delimiters = options && options.delimiters; + if (delimiters) { + tokenizer.delimiterOpen = toCharCodes(delimiters[0]); + tokenizer.delimiterClose = toCharCodes(delimiters[1]); + } + const root = currentRoot = createRoot([], input); + tokenizer.parse(currentInput); + root.loc = getLoc(0, input.length); + root.children = condenseWhitespace(root.children); + currentRoot = null; + return root; +} + +function cacheStatic(root, context) { + walk( + root, + void 0, + context, + // Root node is unfortunately non-hoistable due to potential parent + // fallthrough attributes. + isSingleElementRoot(root, root.children[0]) + ); +} +function isSingleElementRoot(root, child) { + const { children } = root; + return children.length === 1 && child.type === 1 && !isSlotOutlet(child); +} +function walk(node, parent, context, doNotHoistNode = false, inFor = false) { + const { children } = node; + const toCache = []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.type === 1 && child.tagType === 0) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType > 0) { + if (constantType >= 2) { + child.codegenNode.patchFlag = -1; + toCache.push(child); + continue; + } + } else { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + const flag = codegenNode.patchFlag; + if ((flag === void 0 || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { + const props = getNodeProps(child); + if (props) { + codegenNode.props = context.hoist(props); + } + } + if (codegenNode.dynamicProps) { + codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); + } + } + } + } else if (child.type === 12) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType >= 2) { + toCache.push(child); + continue; + } + } + if (child.type === 1) { + const isComponent = child.tagType === 1; + if (isComponent) { + context.scopes.vSlot++; + } + walk(child, node, context, false, inFor); + if (isComponent) { + context.scopes.vSlot--; + } + } else if (child.type === 11) { + walk(child, node, context, child.children.length === 1, true); + } else if (child.type === 9) { + for (let i2 = 0; i2 < child.branches.length; i2++) { + walk( + child.branches[i2], + node, + context, + child.branches[i2].children.length === 1, + inFor + ); + } + } + } + let cachedAsArray = false; + if (toCache.length === children.length && node.type === 1) { + if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) { + node.codegenNode.children = getCacheExpression( + createArrayExpression(node.codegenNode.children) + ); + cachedAsArray = true; + } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) { + const slot = getSlotNode(node.codegenNode, "default"); + if (slot) { + slot.returns = getCacheExpression( + createArrayExpression(slot.returns) + ); + cachedAsArray = true; + } + } else if (node.tagType === 3 && parent && parent.type === 1 && parent.tagType === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 15) { + const slotName = findDir(node, "slot", true); + const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg); + if (slot) { + slot.returns = getCacheExpression( + createArrayExpression(slot.returns) + ); + cachedAsArray = true; + } + } + } + if (!cachedAsArray) { + for (const child of toCache) { + child.codegenNode = context.cache(child.codegenNode); + } + } + function getCacheExpression(value) { + const exp = context.cache(value); + if (inFor && context.hmr) { + exp.needArraySpread = true; + } + return exp; + } + function getSlotNode(node2, name) { + if (node2.children && !isArray(node2.children) && node2.children.type === 15) { + const slot = node2.children.properties.find( + (p) => p.key === name || p.key.content === name + ); + return slot && slot.value; + } + } + if (toCache.length && context.transformHoist) { + context.transformHoist(children, context, node); + } +} +function getConstantType(node, context) { + const { constantCache } = context; + switch (node.type) { + case 1: + if (node.tagType !== 0) { + return 0; + } + const cached = constantCache.get(node); + if (cached !== void 0) { + return cached; + } + const codegenNode = node.codegenNode; + if (codegenNode.type !== 13) { + return 0; + } + if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject" && node.tag !== "math") { + return 0; + } + if (codegenNode.patchFlag === void 0) { + let returnType2 = 3; + const generatedPropsType = getGeneratedPropsConstantType(node, context); + if (generatedPropsType === 0) { + constantCache.set(node, 0); + return 0; + } + if (generatedPropsType < returnType2) { + returnType2 = generatedPropsType; + } + for (let i = 0; i < node.children.length; i++) { + const childType = getConstantType(node.children[i], context); + if (childType === 0) { + constantCache.set(node, 0); + return 0; + } + if (childType < returnType2) { + returnType2 = childType; + } + } + if (returnType2 > 1) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && p.name === "bind" && p.exp) { + const expType = getConstantType(p.exp, context); + if (expType === 0) { + constantCache.set(node, 0); + return 0; + } + if (expType < returnType2) { + returnType2 = expType; + } + } + } + } + if (codegenNode.isBlock) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7) { + constantCache.set(node, 0); + return 0; + } + } + context.removeHelper(OPEN_BLOCK); + context.removeHelper( + getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) + ); + codegenNode.isBlock = false; + context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); + } + constantCache.set(node, returnType2); + return returnType2; + } else { + constantCache.set(node, 0); + return 0; + } + case 2: + case 3: + return 3; + case 9: + case 11: + case 10: + return 0; + case 5: + case 12: + return getConstantType(node.content, context); + case 4: + return node.constType; + case 8: + let returnType = 3; + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child) || isSymbol(child)) { + continue; + } + const childType = getConstantType(child, context); + if (childType === 0) { + return 0; + } else if (childType < returnType) { + returnType = childType; + } + } + return returnType; + case 20: + return 2; + default: + return 0; + } +} +const allowHoistedHelperSet = /* @__PURE__ */ new Set([ + NORMALIZE_CLASS, + NORMALIZE_STYLE, + NORMALIZE_PROPS, + GUARD_REACTIVE_PROPS +]); +function getConstantTypeOfHelperCall(value, context) { + if (value.type === 14 && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { + const arg = value.arguments[0]; + if (arg.type === 4) { + return getConstantType(arg, context); + } else if (arg.type === 14) { + return getConstantTypeOfHelperCall(arg, context); + } + } + return 0; +} +function getGeneratedPropsConstantType(node, context) { + let returnType = 3; + const props = getNodeProps(node); + if (props && props.type === 15) { + const { properties } = props; + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + const keyType = getConstantType(key, context); + if (keyType === 0) { + return keyType; + } + if (keyType < returnType) { + returnType = keyType; + } + let valueType; + if (value.type === 4) { + valueType = getConstantType(value, context); + } else if (value.type === 14) { + valueType = getConstantTypeOfHelperCall(value, context); + } else { + valueType = 0; + } + if (valueType === 0) { + return valueType; + } + if (valueType < returnType) { + returnType = valueType; + } + } + } + return returnType; +} +function getNodeProps(node) { + const codegenNode = node.codegenNode; + if (codegenNode.type === 13) { + return codegenNode.props; + } +} + +function createTransformContext(root, { + filename = "", + prefixIdentifiers = false, + hoistStatic = false, + hmr = false, + cacheHandlers = false, + nodeTransforms = [], + directiveTransforms = {}, + transformHoist = null, + isBuiltInComponent = NOOP, + isCustomElement = NOOP, + expressionPlugins = [], + scopeId = null, + slotted = true, + ssr = false, + inSSR = false, + ssrCssVars = ``, + bindingMetadata = EMPTY_OBJ, + inline = false, + isTS = false, + onError = defaultOnError, + onWarn = defaultOnWarn, + compatConfig +}) { + const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); + const context = { + // options + filename, + selfName: nameMatch && capitalize(camelize(nameMatch[1])), + prefixIdentifiers, + hoistStatic, + hmr, + cacheHandlers, + nodeTransforms, + directiveTransforms, + transformHoist, + isBuiltInComponent, + isCustomElement, + expressionPlugins, + scopeId, + slotted, + ssr, + inSSR, + ssrCssVars, + bindingMetadata, + inline, + isTS, + onError, + onWarn, + compatConfig, + // state + root, + helpers: /* @__PURE__ */ new Map(), + components: /* @__PURE__ */ new Set(), + directives: /* @__PURE__ */ new Set(), + hoists: [], + imports: [], + cached: [], + constantCache: /* @__PURE__ */ new WeakMap(), + temps: 0, + identifiers: /* @__PURE__ */ Object.create(null), + scopes: { + vFor: 0, + vSlot: 0, + vPre: 0, + vOnce: 0 + }, + parent: null, + grandParent: null, + currentNode: root, + childIndex: 0, + inVOnce: false, + // methods + helper(name) { + const count = context.helpers.get(name) || 0; + context.helpers.set(name, count + 1); + return name; + }, + removeHelper(name) { + const count = context.helpers.get(name); + if (count) { + const currentCount = count - 1; + if (!currentCount) { + context.helpers.delete(name); + } else { + context.helpers.set(name, currentCount); + } + } + }, + helperString(name) { + return `_${helperNameMap[context.helper(name)]}`; + }, + replaceNode(node) { + { + if (!context.currentNode) { + throw new Error(`Node being replaced is already removed.`); + } + if (!context.parent) { + throw new Error(`Cannot replace root node.`); + } + } + context.parent.children[context.childIndex] = context.currentNode = node; + }, + removeNode(node) { + if (!context.parent) { + throw new Error(`Cannot remove root node.`); + } + const list = context.parent.children; + const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; + if (removalIndex < 0) { + throw new Error(`node being removed is not a child of current parent`); + } + if (!node || node === context.currentNode) { + context.currentNode = null; + context.onNodeRemoved(); + } else { + if (context.childIndex > removalIndex) { + context.childIndex--; + context.onNodeRemoved(); + } + } + context.parent.children.splice(removalIndex, 1); + }, + onNodeRemoved: NOOP, + addIdentifiers(exp) { + }, + removeIdentifiers(exp) { + }, + hoist(exp) { + if (isString(exp)) exp = createSimpleExpression(exp); + context.hoists.push(exp); + const identifier = createSimpleExpression( + `_hoisted_${context.hoists.length}`, + false, + exp.loc, + 2 + ); + identifier.hoisted = exp; + return identifier; + }, + cache(exp, isVNode = false, inVOnce = false) { + const cacheExp = createCacheExpression( + context.cached.length, + exp, + isVNode, + inVOnce + ); + context.cached.push(cacheExp); + return cacheExp; + } + }; + { + context.filters = /* @__PURE__ */ new Set(); + } + return context; +} +function transform(root, options) { + const context = createTransformContext(root, options); + traverseNode(root, context); + if (options.hoistStatic) { + cacheStatic(root, context); + } + if (!options.ssr) { + createRootCodegen(root, context); + } + root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); + root.components = [...context.components]; + root.directives = [...context.directives]; + root.imports = context.imports; + root.hoists = context.hoists; + root.temps = context.temps; + root.cached = context.cached; + root.transformed = true; + { + root.filters = [...context.filters]; + } +} +function createRootCodegen(root, context) { + const { helper } = context; + const { children } = root; + if (children.length === 1) { + const child = children[0]; + if (isSingleElementRoot(root, child) && child.codegenNode) { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + convertToBlock(codegenNode, context); + } + root.codegenNode = codegenNode; + } else { + root.codegenNode = child; + } + } else if (children.length > 1) { + let patchFlag = 64; + if (children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + } + root.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + root.children, + patchFlag, + void 0, + void 0, + true, + void 0, + false + ); + } else ; +} +function traverseChildren(parent, context) { + let i = 0; + const nodeRemoved = () => { + i--; + }; + for (; i < parent.children.length; i++) { + const child = parent.children[i]; + if (isString(child)) continue; + context.grandParent = context.parent; + context.parent = parent; + context.childIndex = i; + context.onNodeRemoved = nodeRemoved; + traverseNode(child, context); + } +} +function traverseNode(node, context) { + context.currentNode = node; + const { nodeTransforms } = context; + const exitFns = []; + for (let i2 = 0; i2 < nodeTransforms.length; i2++) { + const onExit = nodeTransforms[i2](node, context); + if (onExit) { + if (isArray(onExit)) { + exitFns.push(...onExit); + } else { + exitFns.push(onExit); + } + } + if (!context.currentNode) { + return; + } else { + node = context.currentNode; + } + } + switch (node.type) { + case 3: + if (!context.ssr) { + context.helper(CREATE_COMMENT); + } + break; + case 5: + if (!context.ssr) { + context.helper(TO_DISPLAY_STRING); + } + break; + // for container types, further traverse downwards + case 9: + for (let i2 = 0; i2 < node.branches.length; i2++) { + traverseNode(node.branches[i2], context); + } + break; + case 10: + case 11: + case 1: + case 0: + traverseChildren(node, context); + break; + } + context.currentNode = node; + let i = exitFns.length; + while (i--) { + exitFns[i](); + } +} +function createStructuralDirectiveTransform(name, fn) { + const matches = isString(name) ? (n) => n === name : (n) => name.test(n); + return (node, context) => { + if (node.type === 1) { + const { props } = node; + if (node.tagType === 3 && props.some(isVSlot)) { + return; + } + const exitFns = []; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 7 && matches(prop.name)) { + props.splice(i, 1); + i--; + const onExit = fn(node, prop, context); + if (onExit) exitFns.push(onExit); + } + } + return exitFns; + } + }; +} + +const PURE_ANNOTATION = `/*@__PURE__*/`; +const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; +function createCodegenContext(ast, { + mode = "function", + prefixIdentifiers = mode === "module", + sourceMap = false, + filename = `template.vue.html`, + scopeId = null, + optimizeImports = false, + runtimeGlobalName = `Vue`, + runtimeModuleName = `vue`, + ssrRuntimeModuleName = "vue/server-renderer", + ssr = false, + isTS = false, + inSSR = false +}) { + const context = { + mode, + prefixIdentifiers, + sourceMap, + filename, + scopeId, + optimizeImports, + runtimeGlobalName, + runtimeModuleName, + ssrRuntimeModuleName, + ssr, + isTS, + inSSR, + source: ast.source, + code: ``, + column: 1, + line: 1, + offset: 0, + indentLevel: 0, + pure: false, + map: void 0, + helper(key) { + return `_${helperNameMap[key]}`; + }, + push(code, newlineIndex = -2 /* None */, node) { + context.code += code; + }, + indent() { + newline(++context.indentLevel); + }, + deindent(withoutNewLine = false) { + if (withoutNewLine) { + --context.indentLevel; + } else { + newline(--context.indentLevel); + } + }, + newline() { + newline(context.indentLevel); + } + }; + function newline(n) { + context.push("\n" + ` `.repeat(n), 0 /* Start */); + } + return context; +} +function generate(ast, options = {}) { + const context = createCodegenContext(ast, options); + if (options.onContextCreated) options.onContextCreated(context); + const { + mode, + push, + prefixIdentifiers, + indent, + deindent, + newline, + scopeId, + ssr + } = context; + const helpers = Array.from(ast.helpers); + const hasHelpers = helpers.length > 0; + const useWithBlock = !prefixIdentifiers && mode !== "module"; + const preambleContext = context; + { + genFunctionPreamble(ast, preambleContext); + } + const functionName = ssr ? `ssrRender` : `render`; + const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; + const signature = args.join(", "); + { + push(`function ${functionName}(${signature}) {`); + } + indent(); + if (useWithBlock) { + push(`with (_ctx) {`); + indent(); + if (hasHelpers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue +`, + -1 /* End */ + ); + newline(); + } + } + if (ast.components.length) { + genAssets(ast.components, "component", context); + if (ast.directives.length || ast.temps > 0) { + newline(); + } + } + if (ast.directives.length) { + genAssets(ast.directives, "directive", context); + if (ast.temps > 0) { + newline(); + } + } + if (ast.filters && ast.filters.length) { + newline(); + genAssets(ast.filters, "filter", context); + newline(); + } + if (ast.temps > 0) { + push(`let `); + for (let i = 0; i < ast.temps; i++) { + push(`${i > 0 ? `, ` : ``}_temp${i}`); + } + } + if (ast.components.length || ast.directives.length || ast.temps) { + push(` +`, 0 /* Start */); + newline(); + } + if (!ssr) { + push(`return `); + } + if (ast.codegenNode) { + genNode(ast.codegenNode, context); + } else { + push(`null`); + } + if (useWithBlock) { + deindent(); + push(`}`); + } + deindent(); + push(`}`); + return { + ast, + code: context.code, + preamble: ``, + map: context.map ? context.map.toJSON() : void 0 + }; +} +function genFunctionPreamble(ast, context) { + const { + ssr, + prefixIdentifiers, + push, + newline, + runtimeModuleName, + runtimeGlobalName, + ssrRuntimeModuleName + } = context; + const VueBinding = runtimeGlobalName; + const helpers = Array.from(ast.helpers); + if (helpers.length > 0) { + { + push(`const _Vue = ${VueBinding} +`, -1 /* End */); + if (ast.hoists.length) { + const staticHelpers = [ + CREATE_VNODE, + CREATE_ELEMENT_VNODE, + CREATE_COMMENT, + CREATE_TEXT, + CREATE_STATIC + ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); + push(`const { ${staticHelpers} } = _Vue +`, -1 /* End */); + } + } + } + genHoists(ast.hoists, context); + newline(); + push(`return `); +} +function genAssets(assets, type, { helper, push, newline, isTS }) { + const resolver = helper( + type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE + ); + for (let i = 0; i < assets.length; i++) { + let id = assets[i]; + const maybeSelfReference = id.endsWith("__self"); + if (maybeSelfReference) { + id = id.slice(0, -6); + } + push( + `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` + ); + if (i < assets.length - 1) { + newline(); + } + } +} +function genHoists(hoists, context) { + if (!hoists.length) { + return; + } + context.pure = true; + const { push, newline } = context; + newline(); + for (let i = 0; i < hoists.length; i++) { + const exp = hoists[i]; + if (exp) { + push(`const _hoisted_${i + 1} = `); + genNode(exp, context); + newline(); + } + } + context.pure = false; +} +function isText(n) { + return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; +} +function genNodeListAsArray(nodes, context) { + const multilines = nodes.length > 3 || nodes.some((n) => isArray(n) || !isText(n)); + context.push(`[`); + multilines && context.indent(); + genNodeList(nodes, context, multilines); + multilines && context.deindent(); + context.push(`]`); +} +function genNodeList(nodes, context, multilines = false, comma = true) { + const { push, newline } = context; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (isString(node)) { + push(node, -3 /* Unknown */); + } else if (isArray(node)) { + genNodeListAsArray(node, context); + } else { + genNode(node, context); + } + if (i < nodes.length - 1) { + if (multilines) { + comma && push(","); + newline(); + } else { + comma && push(", "); + } + } + } +} +function genNode(node, context) { + if (isString(node)) { + context.push(node, -3 /* Unknown */); + return; + } + if (isSymbol(node)) { + context.push(context.helper(node)); + return; + } + switch (node.type) { + case 1: + case 9: + case 11: + assert( + node.codegenNode != null, + `Codegen node is missing for element/if/for node. Apply appropriate transforms first.` + ); + genNode(node.codegenNode, context); + break; + case 2: + genText(node, context); + break; + case 4: + genExpression(node, context); + break; + case 5: + genInterpolation(node, context); + break; + case 12: + genNode(node.codegenNode, context); + break; + case 8: + genCompoundExpression(node, context); + break; + case 3: + genComment(node, context); + break; + case 13: + genVNodeCall(node, context); + break; + case 14: + genCallExpression(node, context); + break; + case 15: + genObjectExpression(node, context); + break; + case 17: + genArrayExpression(node, context); + break; + case 18: + genFunctionExpression(node, context); + break; + case 19: + genConditionalExpression(node, context); + break; + case 20: + genCacheExpression(node, context); + break; + case 21: + genNodeList(node.body, context, true, false); + break; + // SSR only types + case 22: + break; + case 23: + break; + case 24: + break; + case 25: + break; + case 26: + break; + /* v8 ignore start */ + case 10: + break; + default: + { + assert(false, `unhandled codegen node type: ${node.type}`); + const exhaustiveCheck = node; + return exhaustiveCheck; + } + } +} +function genText(node, context) { + context.push(JSON.stringify(node.content), -3 /* Unknown */, node); +} +function genExpression(node, context) { + const { content, isStatic } = node; + context.push( + isStatic ? JSON.stringify(content) : content, + -3 /* Unknown */, + node + ); +} +function genInterpolation(node, context) { + const { push, helper, pure } = context; + if (pure) push(PURE_ANNOTATION); + push(`${helper(TO_DISPLAY_STRING)}(`); + genNode(node.content, context); + push(`)`); +} +function genCompoundExpression(node, context) { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child)) { + context.push(child, -3 /* Unknown */); + } else { + genNode(child, context); + } + } +} +function genExpressionAsPropertyKey(node, context) { + const { push } = context; + if (node.type === 8) { + push(`[`); + genCompoundExpression(node, context); + push(`]`); + } else if (node.isStatic) { + const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); + push(text, -2 /* None */, node); + } else { + push(`[${node.content}]`, -3 /* Unknown */, node); + } +} +function genComment(node, context) { + const { push, helper, pure } = context; + if (pure) { + push(PURE_ANNOTATION); + } + push( + `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, + -3 /* Unknown */, + node + ); +} +function genVNodeCall(node, context) { + const { push, helper, pure } = context; + const { + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent + } = node; + let patchFlagString; + if (patchFlag) { + { + if (patchFlag < 0) { + patchFlagString = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; + } else { + const flagNames = Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `); + patchFlagString = patchFlag + ` /* ${flagNames} */`; + } + } + } + if (directives) { + push(helper(WITH_DIRECTIVES) + `(`); + } + if (isBlock) { + push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); + } + if (pure) { + push(PURE_ANNOTATION); + } + const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); + push(helper(callHelper) + `(`, -2 /* None */, node); + genNodeList( + genNullableArgs([tag, props, children, patchFlagString, dynamicProps]), + context + ); + push(`)`); + if (isBlock) { + push(`)`); + } + if (directives) { + push(`, `); + genNode(directives, context); + push(`)`); + } +} +function genNullableArgs(args) { + let i = args.length; + while (i--) { + if (args[i] != null) break; + } + return args.slice(0, i + 1).map((arg) => arg || `null`); +} +function genCallExpression(node, context) { + const { push, helper, pure } = context; + const callee = isString(node.callee) ? node.callee : helper(node.callee); + if (pure) { + push(PURE_ANNOTATION); + } + push(callee + `(`, -2 /* None */, node); + genNodeList(node.arguments, context); + push(`)`); +} +function genObjectExpression(node, context) { + const { push, indent, deindent, newline } = context; + const { properties } = node; + if (!properties.length) { + push(`{}`, -2 /* None */, node); + return; + } + const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4); + push(multilines ? `{` : `{ `); + multilines && indent(); + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + genExpressionAsPropertyKey(key, context); + push(`: `); + genNode(value, context); + if (i < properties.length - 1) { + push(`,`); + newline(); + } + } + multilines && deindent(); + push(multilines ? `}` : ` }`); +} +function genArrayExpression(node, context) { + genNodeListAsArray(node.elements, context); +} +function genFunctionExpression(node, context) { + const { push, indent, deindent } = context; + const { params, returns, body, newline, isSlot } = node; + if (isSlot) { + push(`_${helperNameMap[WITH_CTX]}(`); + } + push(`(`, -2 /* None */, node); + if (isArray(params)) { + genNodeList(params, context); + } else if (params) { + genNode(params, context); + } + push(`) => `); + if (newline || body) { + push(`{`); + indent(); + } + if (returns) { + if (newline) { + push(`return `); + } + if (isArray(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); + } + } else if (body) { + genNode(body, context); + } + if (newline || body) { + deindent(); + push(`}`); + } + if (isSlot) { + if (node.isNonScopedSlot) { + push(`, undefined, true`); + } + push(`)`); + } +} +function genConditionalExpression(node, context) { + const { test, consequent, alternate, newline: needNewline } = node; + const { push, indent, deindent, newline } = context; + if (test.type === 4) { + const needsParens = !isSimpleIdentifier(test.content); + needsParens && push(`(`); + genExpression(test, context); + needsParens && push(`)`); + } else { + push(`(`); + genNode(test, context); + push(`)`); + } + needNewline && indent(); + context.indentLevel++; + needNewline || push(` `); + push(`? `); + genNode(consequent, context); + context.indentLevel--; + needNewline && newline(); + needNewline || push(` `); + push(`: `); + const isNested = alternate.type === 19; + if (!isNested) { + context.indentLevel++; + } + genNode(alternate, context); + if (!isNested) { + context.indentLevel--; + } + needNewline && deindent( + true + /* without newline */ + ); +} +function genCacheExpression(node, context) { + const { push, helper, indent, deindent, newline } = context; + const { needPauseTracking, needArraySpread } = node; + if (needArraySpread) { + push(`[...(`); + } + push(`_cache[${node.index}] || (`); + if (needPauseTracking) { + indent(); + push(`${helper(SET_BLOCK_TRACKING)}(-1`); + if (node.inVOnce) push(`, true`); + push(`),`); + newline(); + push(`(`); + } + push(`_cache[${node.index}] = `); + genNode(node.value, context); + if (needPauseTracking) { + push(`).cacheIndex = ${node.index},`); + newline(); + push(`${helper(SET_BLOCK_TRACKING)}(1),`); + newline(); + push(`_cache[${node.index}]`); + deindent(); + } + push(`)`); + if (needArraySpread) { + push(`)]`); + } +} + +const prohibitedKeywordRE = new RegExp( + "\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b" +); +const stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g; +function validateBrowserExpression(node, context, asParams = false, asRawStatements = false) { + const exp = node.content; + if (!exp.trim()) { + return; + } + try { + new Function( + asRawStatements ? ` ${exp} ` : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}` + ); + } catch (e) { + let message = e.message; + const keywordMatch = exp.replace(stripStringRE, "").match(prohibitedKeywordRE); + if (keywordMatch) { + message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`; + } + context.onError( + createCompilerError( + 45, + node.loc, + void 0, + message + ) + ); + } +} + +const transformExpression = (node, context) => { + if (node.type === 5) { + node.content = processExpression( + node.content, + context + ); + } else if (node.type === 1) { + const memo = findDir(node, "memo"); + for (let i = 0; i < node.props.length; i++) { + const dir = node.props[i]; + if (dir.type === 7 && dir.name !== "for") { + const exp = dir.exp; + const arg = dir.arg; + if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor) + !(memo && arg && arg.type === 4 && arg.content === "key")) { + dir.exp = processExpression( + exp, + context, + // slot args must be processed as function params + dir.name === "slot" + ); + } + if (arg && arg.type === 4 && !arg.isStatic) { + dir.arg = processExpression(arg, context); + } + } + } + } +}; +function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { + { + { + validateBrowserExpression(node, context, asParams, asRawStatements); + } + return node; + } +} +function stringifyExpression(exp) { + if (isString(exp)) { + return exp; + } else if (exp.type === 4) { + return exp.content; + } else { + return exp.children.map(stringifyExpression).join(""); + } +} + +const transformIf = createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + (node, dir, context) => { + return processIf(node, dir, context, (ifNode, branch, isRoot) => { + const siblings = context.parent.children; + let i = siblings.indexOf(ifNode); + let key = 0; + while (i-- >= 0) { + const sibling = siblings[i]; + if (sibling && sibling.type === 9) { + key += sibling.branches.length; + } + } + return () => { + if (isRoot) { + ifNode.codegenNode = createCodegenNodeForBranch( + branch, + key, + context + ); + } else { + const parentCondition = getParentCondition(ifNode.codegenNode); + parentCondition.alternate = createCodegenNodeForBranch( + branch, + key + ifNode.branches.length - 1, + context + ); + } + }; + }); + } +); +function processIf(node, dir, context, processCodegen) { + if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { + const loc = dir.exp ? dir.exp.loc : node.loc; + context.onError( + createCompilerError(28, dir.loc) + ); + dir.exp = createSimpleExpression(`true`, false, loc); + } + if (dir.exp) { + validateBrowserExpression(dir.exp, context); + } + if (dir.name === "if") { + const branch = createIfBranch(node, dir); + const ifNode = { + type: 9, + loc: cloneLoc(node.loc), + branches: [branch] + }; + context.replaceNode(ifNode); + if (processCodegen) { + return processCodegen(ifNode, branch, true); + } + } else { + const siblings = context.parent.children; + const comments = []; + let i = siblings.indexOf(node); + while (i-- >= -1) { + const sibling = siblings[i]; + if (sibling && sibling.type === 3) { + context.removeNode(sibling); + comments.unshift(sibling); + continue; + } + if (sibling && sibling.type === 2 && !sibling.content.trim().length) { + context.removeNode(sibling); + continue; + } + if (sibling && sibling.type === 9) { + if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { + context.onError( + createCompilerError(30, node.loc) + ); + } + context.removeNode(); + const branch = createIfBranch(node, dir); + if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition> + !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) { + branch.children = [...comments, ...branch.children]; + } + { + const key = branch.userKey; + if (key) { + sibling.branches.forEach(({ userKey }) => { + if (isSameKey(userKey, key)) { + context.onError( + createCompilerError( + 29, + branch.userKey.loc + ) + ); + } + }); + } + } + sibling.branches.push(branch); + const onExit = processCodegen && processCodegen(sibling, branch, false); + traverseNode(branch, context); + if (onExit) onExit(); + context.currentNode = null; + } else { + context.onError( + createCompilerError(30, node.loc) + ); + } + break; + } + } +} +function createIfBranch(node, dir) { + const isTemplateIf = node.tagType === 3; + return { + type: 10, + loc: node.loc, + condition: dir.name === "else" ? void 0 : dir.exp, + children: isTemplateIf && !findDir(node, "for") ? node.children : [node], + userKey: findProp(node, `key`), + isTemplateIf + }; +} +function createCodegenNodeForBranch(branch, keyIndex, context) { + if (branch.condition) { + return createConditionalExpression( + branch.condition, + createChildrenCodegenNode(branch, keyIndex, context), + // make sure to pass in asBlock: true so that the comment node call + // closes the current block. + createCallExpression(context.helper(CREATE_COMMENT), [ + '"v-if"' , + "true" + ]) + ); + } else { + return createChildrenCodegenNode(branch, keyIndex, context); + } +} +function createChildrenCodegenNode(branch, keyIndex, context) { + const { helper } = context; + const keyProperty = createObjectProperty( + `key`, + createSimpleExpression( + `${keyIndex}`, + false, + locStub, + 2 + ) + ); + const { children } = branch; + const firstChild = children[0]; + const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; + if (needFragmentWrapper) { + if (children.length === 1 && firstChild.type === 11) { + const vnodeCall = firstChild.codegenNode; + injectProp(vnodeCall, keyProperty, context); + return vnodeCall; + } else { + let patchFlag = 64; + if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + } + return createVNodeCall( + context, + helper(FRAGMENT), + createObjectExpression([keyProperty]), + children, + patchFlag, + void 0, + void 0, + true, + false, + false, + branch.loc + ); + } + } else { + const ret = firstChild.codegenNode; + const vnodeCall = getMemoedVNodeCall(ret); + if (vnodeCall.type === 13) { + convertToBlock(vnodeCall, context); + } + injectProp(vnodeCall, keyProperty, context); + return ret; + } +} +function isSameKey(a, b) { + if (!a || a.type !== b.type) { + return false; + } + if (a.type === 6) { + if (a.value.content !== b.value.content) { + return false; + } + } else { + const exp = a.exp; + const branchExp = b.exp; + if (exp.type !== branchExp.type) { + return false; + } + if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { + return false; + } + } + return true; +} +function getParentCondition(node) { + while (true) { + if (node.type === 19) { + if (node.alternate.type === 19) { + node = node.alternate; + } else { + return node; + } + } else if (node.type === 20) { + node = node.value; + } + } +} + +const transformBind = (dir, _node, context) => { + const { modifiers, loc } = dir; + const arg = dir.arg; + let { exp } = dir; + if (exp && exp.type === 4 && !exp.content.trim()) { + { + exp = void 0; + } + } + if (!exp) { + if (arg.type !== 4 || !arg.isStatic) { + context.onError( + createCompilerError( + 52, + arg.loc + ) + ); + return { + props: [ + createObjectProperty(arg, createSimpleExpression("", true, loc)) + ] + }; + } + transformBindShorthand(dir); + exp = dir.exp; + } + if (arg.type !== 4) { + arg.children.unshift(`(`); + arg.children.push(`) || ""`); + } else if (!arg.isStatic) { + arg.content = `${arg.content} || ""`; + } + if (modifiers.some((mod) => mod.content === "camel")) { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = camelize(arg.content); + } else { + arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; + } + } else { + arg.children.unshift(`${context.helperString(CAMELIZE)}(`); + arg.children.push(`)`); + } + } + if (!context.inSSR) { + if (modifiers.some((mod) => mod.content === "prop")) { + injectPrefix(arg, "."); + } + if (modifiers.some((mod) => mod.content === "attr")) { + injectPrefix(arg, "^"); + } + } + return { + props: [createObjectProperty(arg, exp)] + }; +}; +const transformBindShorthand = (dir, context) => { + const arg = dir.arg; + const propName = camelize(arg.content); + dir.exp = createSimpleExpression(propName, false, arg.loc); +}; +const injectPrefix = (arg, prefix) => { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = prefix + arg.content; + } else { + arg.content = `\`${prefix}\${${arg.content}}\``; + } + } else { + arg.children.unshift(`'${prefix}' + (`); + arg.children.push(`)`); + } +}; + +const transformFor = createStructuralDirectiveTransform( + "for", + (node, dir, context) => { + const { helper, removeHelper } = context; + return processFor(node, dir, context, (forNode) => { + const renderExp = createCallExpression(helper(RENDER_LIST), [ + forNode.source + ]); + const isTemplate = isTemplateNode(node); + const memo = findDir(node, "memo"); + const keyProp = findProp(node, `key`, false, true); + const isDirKey = keyProp && keyProp.type === 7; + if (isDirKey && !keyProp.exp) { + transformBindShorthand(keyProp); + } + let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp); + const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null; + const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; + const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; + forNode.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + renderExp, + fragmentFlag, + void 0, + void 0, + true, + !isStableFragment, + false, + node.loc + ); + return () => { + let childBlock; + const { children } = forNode; + if (isTemplate) { + node.children.some((c) => { + if (c.type === 1) { + const key = findProp(c, "key"); + if (key) { + context.onError( + createCompilerError( + 33, + key.loc + ) + ); + return true; + } + } + }); + } + const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; + const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; + if (slotOutlet) { + childBlock = slotOutlet.codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + } else if (needFragmentWrapper) { + childBlock = createVNodeCall( + context, + helper(FRAGMENT), + keyProperty ? createObjectExpression([keyProperty]) : void 0, + node.children, + 64, + void 0, + void 0, + true, + void 0, + false + ); + } else { + childBlock = children[0].codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + if (childBlock.isBlock !== !isStableFragment) { + if (childBlock.isBlock) { + removeHelper(OPEN_BLOCK); + removeHelper( + getVNodeBlockHelper(context.inSSR, childBlock.isComponent) + ); + } else { + removeHelper( + getVNodeHelper(context.inSSR, childBlock.isComponent) + ); + } + } + childBlock.isBlock = !isStableFragment; + if (childBlock.isBlock) { + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); + } else { + helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); + } + } + if (memo) { + const loop = createFunctionExpression( + createForLoopParams(forNode.parseResult, [ + createSimpleExpression(`_cached`) + ]) + ); + loop.body = createBlockStatement([ + createCompoundExpression([`const _memo = (`, memo.exp, `)`]), + createCompoundExpression([ + `if (_cached`, + ...keyExp ? [` && _cached.key === `, keyExp] : [], + ` && ${context.helperString( + IS_MEMO_SAME + )}(_cached, _memo)) return _cached` + ]), + createCompoundExpression([`const _item = `, childBlock]), + createSimpleExpression(`_item.memo = _memo`), + createSimpleExpression(`return _item`) + ]); + renderExp.arguments.push( + loop, + createSimpleExpression(`_cache`), + createSimpleExpression(String(context.cached.length)) + ); + context.cached.push(null); + } else { + renderExp.arguments.push( + createFunctionExpression( + createForLoopParams(forNode.parseResult), + childBlock, + true + ) + ); + } + }; + }); + } +); +function processFor(node, dir, context, processCodegen) { + if (!dir.exp) { + context.onError( + createCompilerError(31, dir.loc) + ); + return; + } + const parseResult = dir.forParseResult; + if (!parseResult) { + context.onError( + createCompilerError(32, dir.loc) + ); + return; + } + finalizeForParseResult(parseResult, context); + const { addIdentifiers, removeIdentifiers, scopes } = context; + const { source, value, key, index } = parseResult; + const forNode = { + type: 11, + loc: dir.loc, + source, + valueAlias: value, + keyAlias: key, + objectIndexAlias: index, + parseResult, + children: isTemplateNode(node) ? node.children : [node] + }; + context.replaceNode(forNode); + scopes.vFor++; + const onExit = processCodegen && processCodegen(forNode); + return () => { + scopes.vFor--; + if (onExit) onExit(); + }; +} +function finalizeForParseResult(result, context) { + if (result.finalized) return; + { + validateBrowserExpression(result.source, context); + if (result.key) { + validateBrowserExpression( + result.key, + context, + true + ); + } + if (result.index) { + validateBrowserExpression( + result.index, + context, + true + ); + } + if (result.value) { + validateBrowserExpression( + result.value, + context, + true + ); + } + } + result.finalized = true; +} +function createForLoopParams({ value, key, index }, memoArgs = []) { + return createParamsList([value, key, index, ...memoArgs]); +} +function createParamsList(args) { + let i = args.length; + while (i--) { + if (args[i]) break; + } + return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); +} + +const defaultFallback = createSimpleExpression(`undefined`, false); +const trackSlotScopes = (node, context) => { + if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { + const vSlot = findDir(node, "slot"); + if (vSlot) { + vSlot.exp; + context.scopes.vSlot++; + return () => { + context.scopes.vSlot--; + }; + } + } +}; +const trackVForSlotScopes = (node, context) => { + let vFor; + if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) { + const result = vFor.forParseResult; + if (result) { + finalizeForParseResult(result, context); + const { value, key, index } = result; + const { addIdentifiers, removeIdentifiers } = context; + value && addIdentifiers(value); + key && addIdentifiers(key); + index && addIdentifiers(index); + return () => { + value && removeIdentifiers(value); + key && removeIdentifiers(key); + index && removeIdentifiers(index); + }; + } + } +}; +const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( + props, + children, + false, + true, + children.length ? children[0].loc : loc +); +function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { + context.helper(WITH_CTX); + const { children, loc } = node; + const slotsProperties = []; + const dynamicSlots = []; + let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; + const onComponentSlot = findDir(node, "slot", true); + if (onComponentSlot) { + const { arg, exp } = onComponentSlot; + if (arg && !isStaticExp(arg)) { + hasDynamicSlots = true; + } + slotsProperties.push( + createObjectProperty( + arg || createSimpleExpression("default", true), + buildSlotFn(exp, void 0, children, loc) + ) + ); + } + let hasTemplateSlots = false; + let hasNamedDefaultSlot = false; + const implicitDefaultChildren = []; + const seenSlotNames = /* @__PURE__ */ new Set(); + let conditionalBranchIndex = 0; + for (let i = 0; i < children.length; i++) { + const slotElement = children[i]; + let slotDir; + if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { + if (slotElement.type !== 3) { + implicitDefaultChildren.push(slotElement); + } + continue; + } + if (onComponentSlot) { + context.onError( + createCompilerError(37, slotDir.loc) + ); + break; + } + hasTemplateSlots = true; + const { children: slotChildren, loc: slotLoc } = slotElement; + const { + arg: slotName = createSimpleExpression(`default`, true), + exp: slotProps, + loc: dirLoc + } = slotDir; + let staticSlotName; + if (isStaticExp(slotName)) { + staticSlotName = slotName ? slotName.content : `default`; + } else { + hasDynamicSlots = true; + } + const vFor = findDir(slotElement, "for"); + const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); + let vIf; + let vElse; + if (vIf = findDir(slotElement, "if")) { + hasDynamicSlots = true; + dynamicSlots.push( + createConditionalExpression( + vIf.exp, + buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), + defaultFallback + ) + ); + } else if (vElse = findDir( + slotElement, + /^else(-if)?$/, + true + /* allowEmpty */ + )) { + let j = i; + let prev; + while (j--) { + prev = children[j]; + if (prev.type !== 3) { + break; + } + } + if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) { + let conditional = dynamicSlots[dynamicSlots.length - 1]; + while (conditional.alternate.type === 19) { + conditional = conditional.alternate; + } + conditional.alternate = vElse.exp ? createConditionalExpression( + vElse.exp, + buildDynamicSlot( + slotName, + slotFunction, + conditionalBranchIndex++ + ), + defaultFallback + ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); + } else { + context.onError( + createCompilerError(30, vElse.loc) + ); + } + } else if (vFor) { + hasDynamicSlots = true; + const parseResult = vFor.forParseResult; + if (parseResult) { + finalizeForParseResult(parseResult, context); + dynamicSlots.push( + createCallExpression(context.helper(RENDER_LIST), [ + parseResult.source, + createFunctionExpression( + createForLoopParams(parseResult), + buildDynamicSlot(slotName, slotFunction), + true + ) + ]) + ); + } else { + context.onError( + createCompilerError( + 32, + vFor.loc + ) + ); + } + } else { + if (staticSlotName) { + if (seenSlotNames.has(staticSlotName)) { + context.onError( + createCompilerError( + 38, + dirLoc + ) + ); + continue; + } + seenSlotNames.add(staticSlotName); + if (staticSlotName === "default") { + hasNamedDefaultSlot = true; + } + } + slotsProperties.push(createObjectProperty(slotName, slotFunction)); + } + } + if (!onComponentSlot) { + const buildDefaultSlotProperty = (props, children2) => { + const fn = buildSlotFn(props, void 0, children2, loc); + if (context.compatConfig) { + fn.isNonScopedSlot = true; + } + return createObjectProperty(`default`, fn); + }; + if (!hasTemplateSlots) { + slotsProperties.push(buildDefaultSlotProperty(void 0, children)); + } else if (implicitDefaultChildren.length && // #3766 + // with whitespace: 'preserve', whitespaces between slots will end up in + // implicitDefaultChildren. Ignore if all implicit children are whitespaces. + implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { + if (hasNamedDefaultSlot) { + context.onError( + createCompilerError( + 39, + implicitDefaultChildren[0].loc + ) + ); + } else { + slotsProperties.push( + buildDefaultSlotProperty(void 0, implicitDefaultChildren) + ); + } + } + } + const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; + let slots = createObjectExpression( + slotsProperties.concat( + createObjectProperty( + `_`, + // 2 = compiled but dynamic = can skip normalization, but must run diff + // 1 = compiled and static = can skip normalization AND diff as optimized + createSimpleExpression( + slotFlag + (` /* ${slotFlagsText[slotFlag]} */` ), + false + ) + ) + ), + loc + ); + if (dynamicSlots.length) { + slots = createCallExpression(context.helper(CREATE_SLOTS), [ + slots, + createArrayExpression(dynamicSlots) + ]); + } + return { + slots, + hasDynamicSlots + }; +} +function buildDynamicSlot(name, fn, index) { + const props = [ + createObjectProperty(`name`, name), + createObjectProperty(`fn`, fn) + ]; + if (index != null) { + props.push( + createObjectProperty(`key`, createSimpleExpression(String(index), true)) + ); + } + return createObjectExpression(props); +} +function hasForwardedSlots(children) { + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + if (child.tagType === 2 || hasForwardedSlots(child.children)) { + return true; + } + break; + case 9: + if (hasForwardedSlots(child.branches)) return true; + break; + case 10: + case 11: + if (hasForwardedSlots(child.children)) return true; + break; + } + } + return false; +} +function isNonWhitespaceContent(node) { + if (node.type !== 2 && node.type !== 12) + return true; + return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); +} + +const directiveImportMap = /* @__PURE__ */ new WeakMap(); +const transformElement = (node, context) => { + return function postTransformElement() { + node = context.currentNode; + if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { + return; + } + const { tag, props } = node; + const isComponent = node.tagType === 1; + let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; + const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; + let vnodeProps; + let vnodeChildren; + let patchFlag = 0; + let vnodeDynamicProps; + let dynamicPropNames; + let vnodeDirectives; + let shouldUseBlock = ( + // dynamic component may resolve to plain elements + isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block + // updates inside get proper isSVG flag at runtime. (#639, #643) + // This is technically web-specific, but splitting the logic out of core + // leads to too much unnecessary complexity. + (tag === "svg" || tag === "foreignObject" || tag === "math") + ); + if (props.length > 0) { + const propsBuildResult = buildProps( + node, + context, + void 0, + isComponent, + isDynamicComponent + ); + vnodeProps = propsBuildResult.props; + patchFlag = propsBuildResult.patchFlag; + dynamicPropNames = propsBuildResult.dynamicPropNames; + const directives = propsBuildResult.directives; + vnodeDirectives = directives && directives.length ? createArrayExpression( + directives.map((dir) => buildDirectiveArgs(dir, context)) + ) : void 0; + if (propsBuildResult.shouldUseBlock) { + shouldUseBlock = true; + } + } + if (node.children.length > 0) { + if (vnodeTag === KEEP_ALIVE) { + shouldUseBlock = true; + patchFlag |= 1024; + if (node.children.length > 1) { + context.onError( + createCompilerError(46, { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + }) + ); + } + } + const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling + vnodeTag !== TELEPORT && // explained above. + vnodeTag !== KEEP_ALIVE; + if (shouldBuildAsSlots) { + const { slots, hasDynamicSlots } = buildSlots(node, context); + vnodeChildren = slots; + if (hasDynamicSlots) { + patchFlag |= 1024; + } + } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { + const child = node.children[0]; + const type = child.type; + const hasDynamicTextChild = type === 5 || type === 8; + if (hasDynamicTextChild && getConstantType(child, context) === 0) { + patchFlag |= 1; + } + if (hasDynamicTextChild || type === 2) { + vnodeChildren = child; + } else { + vnodeChildren = node.children; + } + } else { + vnodeChildren = node.children; + } + } + if (dynamicPropNames && dynamicPropNames.length) { + vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); + } + node.codegenNode = createVNodeCall( + context, + vnodeTag, + vnodeProps, + vnodeChildren, + patchFlag === 0 ? void 0 : patchFlag, + vnodeDynamicProps, + vnodeDirectives, + !!shouldUseBlock, + false, + isComponent, + node.loc + ); + }; +}; +function resolveComponentType(node, context, ssr = false) { + let { tag } = node; + const isExplicitDynamic = isComponentTag(tag); + const isProp = findProp( + node, + "is", + false, + true + /* allow empty */ + ); + if (isProp) { + if (isExplicitDynamic || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + )) { + let exp; + if (isProp.type === 6) { + exp = isProp.value && createSimpleExpression(isProp.value.content, true); + } else { + exp = isProp.exp; + if (!exp) { + exp = createSimpleExpression(`is`, false, isProp.arg.loc); + } + } + if (exp) { + return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ + exp + ]); + } + } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { + tag = isProp.value.content.slice(4); + } + } + const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); + if (builtIn) { + if (!ssr) context.helper(builtIn); + return builtIn; + } + context.helper(RESOLVE_COMPONENT); + context.components.add(tag); + return toValidAssetId(tag, `component`); +} +function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { + const { tag, loc: elementLoc, children } = node; + let properties = []; + const mergeArgs = []; + const runtimeDirectives = []; + const hasChildren = children.length > 0; + let shouldUseBlock = false; + let patchFlag = 0; + let hasRef = false; + let hasClassBinding = false; + let hasStyleBinding = false; + let hasHydrationEventBinding = false; + let hasDynamicKeys = false; + let hasVnodeHook = false; + const dynamicPropNames = []; + const pushMergeArg = (arg) => { + if (properties.length) { + mergeArgs.push( + createObjectExpression(dedupeProperties(properties), elementLoc) + ); + properties = []; + } + if (arg) mergeArgs.push(arg); + }; + const pushRefVForMarker = () => { + if (context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); + } + }; + const analyzePatchFlag = ({ key, value }) => { + if (isStaticExp(key)) { + const name = key.content; + const isEventHandler = isOn(name); + if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click + // dedicated fast path. + name.toLowerCase() !== "onclick" && // omit v-model handlers + name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks + !isReservedProp(name)) { + hasHydrationEventBinding = true; + } + if (isEventHandler && isReservedProp(name)) { + hasVnodeHook = true; + } + if (isEventHandler && value.type === 14) { + value = value.arguments[0]; + } + if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { + return; + } + if (name === "ref") { + hasRef = true; + } else if (name === "class") { + hasClassBinding = true; + } else if (name === "style") { + hasStyleBinding = true; + } else if (name !== "key" && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + } else { + hasDynamicKeys = true; + } + }; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 6) { + const { loc, name, nameLoc, value } = prop; + let isStatic = true; + if (name === "ref") { + hasRef = true; + pushRefVForMarker(); + } + if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + properties.push( + createObjectProperty( + createSimpleExpression(name, true, nameLoc), + createSimpleExpression( + value ? value.content : "", + isStatic, + value ? value.loc : loc + ) + ) + ); + } else { + const { name, arg, exp, loc, modifiers } = prop; + const isVBind = name === "bind"; + const isVOn = name === "on"; + if (name === "slot") { + if (!isComponent) { + context.onError( + createCompilerError(40, loc) + ); + } + continue; + } + if (name === "once" || name === "memo") { + continue; + } + if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + if (isVOn && ssr) { + continue; + } + if ( + // #938: elements with dynamic keys should be forced into blocks + isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked + // before children + isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") + ) { + shouldUseBlock = true; + } + if (isVBind && isStaticArgOf(arg, "ref")) { + pushRefVForMarker(); + } + if (!arg && (isVBind || isVOn)) { + hasDynamicKeys = true; + if (exp) { + if (isVBind) { + pushRefVForMarker(); + pushMergeArg(); + { + { + const hasOverridableKeys = mergeArgs.some((arg2) => { + if (arg2.type === 15) { + return arg2.properties.some(({ key }) => { + if (key.type !== 4 || !key.isStatic) { + return true; + } + return key.content !== "class" && key.content !== "style" && !isOn(key.content); + }); + } else { + return true; + } + }); + if (hasOverridableKeys) { + checkCompatEnabled( + "COMPILER_V_BIND_OBJECT_ORDER", + context, + loc + ); + } + } + if (isCompatEnabled( + "COMPILER_V_BIND_OBJECT_ORDER", + context + )) { + mergeArgs.unshift(exp); + continue; + } + } + mergeArgs.push(exp); + } else { + pushMergeArg({ + type: 14, + loc, + callee: context.helper(TO_HANDLERS), + arguments: isComponent ? [exp] : [exp, `true`] + }); + } + } else { + context.onError( + createCompilerError( + isVBind ? 34 : 35, + loc + ) + ); + } + continue; + } + if (isVBind && modifiers.some((mod) => mod.content === "prop")) { + patchFlag |= 32; + } + const directiveTransform = context.directiveTransforms[name]; + if (directiveTransform) { + const { props: props2, needRuntime } = directiveTransform(prop, node, context); + !ssr && props2.forEach(analyzePatchFlag); + if (isVOn && arg && !isStaticExp(arg)) { + pushMergeArg(createObjectExpression(props2, elementLoc)); + } else { + properties.push(...props2); + } + if (needRuntime) { + runtimeDirectives.push(prop); + if (isSymbol(needRuntime)) { + directiveImportMap.set(prop, needRuntime); + } + } + } else if (!isBuiltInDirective(name)) { + runtimeDirectives.push(prop); + if (hasChildren) { + shouldUseBlock = true; + } + } + } + } + let propsExpression = void 0; + if (mergeArgs.length) { + pushMergeArg(); + if (mergeArgs.length > 1) { + propsExpression = createCallExpression( + context.helper(MERGE_PROPS), + mergeArgs, + elementLoc + ); + } else { + propsExpression = mergeArgs[0]; + } + } else if (properties.length) { + propsExpression = createObjectExpression( + dedupeProperties(properties), + elementLoc + ); + } + if (hasDynamicKeys) { + patchFlag |= 16; + } else { + if (hasClassBinding && !isComponent) { + patchFlag |= 2; + } + if (hasStyleBinding && !isComponent) { + patchFlag |= 4; + } + if (dynamicPropNames.length) { + patchFlag |= 8; + } + if (hasHydrationEventBinding) { + patchFlag |= 32; + } + } + if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { + patchFlag |= 512; + } + if (!context.inSSR && propsExpression) { + switch (propsExpression.type) { + case 15: + let classKeyIndex = -1; + let styleKeyIndex = -1; + let hasDynamicKey = false; + for (let i = 0; i < propsExpression.properties.length; i++) { + const key = propsExpression.properties[i].key; + if (isStaticExp(key)) { + if (key.content === "class") { + classKeyIndex = i; + } else if (key.content === "style") { + styleKeyIndex = i; + } + } else if (!key.isHandlerKey) { + hasDynamicKey = true; + } + } + const classProp = propsExpression.properties[classKeyIndex]; + const styleProp = propsExpression.properties[styleKeyIndex]; + if (!hasDynamicKey) { + if (classProp && !isStaticExp(classProp.value)) { + classProp.value = createCallExpression( + context.helper(NORMALIZE_CLASS), + [classProp.value] + ); + } + if (styleProp && // the static style is compiled into an object, + // so use `hasStyleBinding` to ensure that it is a dynamic style binding + (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, + // v-bind:style with static literal object + styleProp.value.type === 17)) { + styleProp.value = createCallExpression( + context.helper(NORMALIZE_STYLE), + [styleProp.value] + ); + } + } else { + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [propsExpression] + ); + } + break; + case 14: + break; + default: + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [ + createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ + propsExpression + ]) + ] + ); + break; + } + } + return { + props: propsExpression, + directives: runtimeDirectives, + patchFlag, + dynamicPropNames, + shouldUseBlock + }; +} +function dedupeProperties(properties) { + const knownProps = /* @__PURE__ */ new Map(); + const deduped = []; + for (let i = 0; i < properties.length; i++) { + const prop = properties[i]; + if (prop.key.type === 8 || !prop.key.isStatic) { + deduped.push(prop); + continue; + } + const name = prop.key.content; + const existing = knownProps.get(name); + if (existing) { + if (name === "style" || name === "class" || isOn(name)) { + mergeAsArray(existing, prop); + } + } else { + knownProps.set(name, prop); + deduped.push(prop); + } + } + return deduped; +} +function mergeAsArray(existing, incoming) { + if (existing.value.type === 17) { + existing.value.elements.push(incoming.value); + } else { + existing.value = createArrayExpression( + [existing.value, incoming.value], + existing.loc + ); + } +} +function buildDirectiveArgs(dir, context) { + const dirArgs = []; + const runtime = directiveImportMap.get(dir); + if (runtime) { + dirArgs.push(context.helperString(runtime)); + } else { + { + context.helper(RESOLVE_DIRECTIVE); + context.directives.add(dir.name); + dirArgs.push(toValidAssetId(dir.name, `directive`)); + } + } + const { loc } = dir; + if (dir.exp) dirArgs.push(dir.exp); + if (dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(dir.arg); + } + if (Object.keys(dir.modifiers).length) { + if (!dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(`void 0`); + } + const trueExpression = createSimpleExpression(`true`, false, loc); + dirArgs.push( + createObjectExpression( + dir.modifiers.map( + (modifier) => createObjectProperty(modifier, trueExpression) + ), + loc + ) + ); + } + return createArrayExpression(dirArgs, dir.loc); +} +function stringifyDynamicPropNames(props) { + let propsNamesString = `[`; + for (let i = 0, l = props.length; i < l; i++) { + propsNamesString += JSON.stringify(props[i]); + if (i < l - 1) propsNamesString += ", "; + } + return propsNamesString + `]`; +} +function isComponentTag(tag) { + return tag === "component" || tag === "Component"; +} + +const transformSlotOutlet = (node, context) => { + if (isSlotOutlet(node)) { + const { children, loc } = node; + const { slotName, slotProps } = processSlotOutlet(node, context); + const slotArgs = [ + context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, + slotName, + "{}", + "undefined", + "true" + ]; + let expectedLen = 2; + if (slotProps) { + slotArgs[2] = slotProps; + expectedLen = 3; + } + if (children.length) { + slotArgs[3] = createFunctionExpression([], children, false, false, loc); + expectedLen = 4; + } + if (context.scopeId && !context.slotted) { + expectedLen = 5; + } + slotArgs.splice(expectedLen); + node.codegenNode = createCallExpression( + context.helper(RENDER_SLOT), + slotArgs, + loc + ); + } +}; +function processSlotOutlet(node, context) { + let slotName = `"default"`; + let slotProps = void 0; + const nonNameProps = []; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (p.value) { + if (p.name === "name") { + slotName = JSON.stringify(p.value.content); + } else { + p.name = camelize(p.name); + nonNameProps.push(p); + } + } + } else { + if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { + if (p.exp) { + slotName = p.exp; + } else if (p.arg && p.arg.type === 4) { + const name = camelize(p.arg.content); + slotName = p.exp = createSimpleExpression(name, false, p.arg.loc); + } + } else { + if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { + p.arg.content = camelize(p.arg.content); + } + nonNameProps.push(p); + } + } + } + if (nonNameProps.length > 0) { + const { props, directives } = buildProps( + node, + context, + nonNameProps, + false, + false + ); + slotProps = props; + if (directives.length) { + context.onError( + createCompilerError( + 36, + directives[0].loc + ) + ); + } + } + return { + slotName, + slotProps + }; +} + +const transformOn$1 = (dir, node, context, augmentor) => { + const { loc, modifiers, arg } = dir; + if (!dir.exp && !modifiers.length) { + context.onError(createCompilerError(35, loc)); + } + let eventName; + if (arg.type === 4) { + if (arg.isStatic) { + let rawName = arg.content; + if (rawName.startsWith("vnode")) { + context.onError(createCompilerError(51, arg.loc)); + } + if (rawName.startsWith("vue:")) { + rawName = `vnode-${rawName.slice(4)}`; + } + const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( + // for non-element and vnode lifecycle event listeners, auto convert + // it to camelCase. See issue #2249 + toHandlerKey(camelize(rawName)) + ) : ( + // preserve case for plain element listeners that have uppercase + // letters, as these may be custom elements' custom events + `on:${rawName}` + ); + eventName = createSimpleExpression(eventString, true, arg.loc); + } else { + eventName = createCompoundExpression([ + `${context.helperString(TO_HANDLER_KEY)}(`, + arg, + `)` + ]); + } + } else { + eventName = arg; + eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); + eventName.children.push(`)`); + } + let exp = dir.exp; + if (exp && !exp.content.trim()) { + exp = void 0; + } + let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; + if (exp) { + const isMemberExp = isMemberExpression(exp); + const isInlineStatement = !(isMemberExp || isFnExpression(exp)); + const hasMultipleStatements = exp.content.includes(`;`); + { + validateBrowserExpression( + exp, + context, + false, + hasMultipleStatements + ); + } + if (isInlineStatement || shouldCache && isMemberExp) { + exp = createCompoundExpression([ + `${isInlineStatement ? `$event` : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, + exp, + hasMultipleStatements ? `}` : `)` + ]); + } + } + let ret = { + props: [ + createObjectProperty( + eventName, + exp || createSimpleExpression(`() => {}`, false, loc) + ) + ] + }; + if (augmentor) { + ret = augmentor(ret); + } + if (shouldCache) { + ret.props[0].value = context.cache(ret.props[0].value); + } + ret.props.forEach((p) => p.key.isHandlerKey = true); + return ret; +}; + +const transformText = (node, context) => { + if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { + return () => { + const children = node.children; + let currentContainer = void 0; + let hasText = false; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child)) { + hasText = true; + for (let j = i + 1; j < children.length; j++) { + const next = children[j]; + if (isText$1(next)) { + if (!currentContainer) { + currentContainer = children[i] = createCompoundExpression( + [child], + child.loc + ); + } + currentContainer.children.push(` + `, next); + children.splice(j, 1); + j--; + } else { + currentContainer = void 0; + break; + } + } + } + } + if (!hasText || // if this is a plain element with a single text child, leave it + // as-is since the runtime has dedicated fast path for this by directly + // setting textContent of the element. + // for component root it's always normalized anyway. + children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 + // custom directives can potentially add DOM elements arbitrarily, + // we need to avoid setting textContent of the element at runtime + // to avoid accidentally overwriting the DOM elements added + // by the user through custom directives. + !node.props.find( + (p) => p.type === 7 && !context.directiveTransforms[p.name] + ) && // in compat mode, <template> tags with no special directives + // will be rendered as a fragment so its children must be + // converted into vnodes. + !(node.tag === "template"))) { + return; + } + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child) || child.type === 8) { + const callArgs = []; + if (child.type !== 2 || child.content !== " ") { + callArgs.push(child); + } + if (!context.ssr && getConstantType(child, context) === 0) { + callArgs.push( + 1 + (` /* ${PatchFlagNames[1]} */` ) + ); + } + children[i] = { + type: 12, + content: child, + loc: child.loc, + codegenNode: createCallExpression( + context.helper(CREATE_TEXT), + callArgs + ) + }; + } + } + }; + } +}; + +const seen$1 = /* @__PURE__ */ new WeakSet(); +const transformOnce = (node, context) => { + if (node.type === 1 && findDir(node, "once", true)) { + if (seen$1.has(node) || context.inVOnce || context.inSSR) { + return; + } + seen$1.add(node); + context.inVOnce = true; + context.helper(SET_BLOCK_TRACKING); + return () => { + context.inVOnce = false; + const cur = context.currentNode; + if (cur.codegenNode) { + cur.codegenNode = context.cache( + cur.codegenNode, + true, + true + ); + } + }; + } +}; + +const transformModel$1 = (dir, node, context) => { + const { exp, arg } = dir; + if (!exp) { + context.onError( + createCompilerError(41, dir.loc) + ); + return createTransformProps(); + } + const rawExp = exp.loc.source.trim(); + const expString = exp.type === 4 ? exp.content : rawExp; + const bindingType = context.bindingMetadata[rawExp]; + if (bindingType === "props" || bindingType === "props-aliased") { + context.onError(createCompilerError(44, exp.loc)); + return createTransformProps(); + } + const maybeRef = false; + if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) { + context.onError( + createCompilerError(42, exp.loc) + ); + return createTransformProps(); + } + const propName = arg ? arg : createSimpleExpression("modelValue", true); + const eventName = arg ? isStaticExp(arg) ? `onUpdate:${camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; + let assignmentExp; + const eventArg = context.isTS ? `($event: any)` : `$event`; + { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + exp, + `) = $event)` + ]); + } + const props = [ + // modelValue: foo + createObjectProperty(propName, dir.exp), + // "onUpdate:modelValue": $event => (foo = $event) + createObjectProperty(eventName, assignmentExp) + ]; + if (dir.modifiers.length && node.tagType === 1) { + const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); + const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; + props.push( + createObjectProperty( + modifiersKey, + createSimpleExpression( + `{ ${modifiers} }`, + false, + dir.loc, + 2 + ) + ) + ); + } + return createTransformProps(props); +}; +function createTransformProps(props = []) { + return { props }; +} + +const validDivisionCharRE = /[\w).+\-_$\]]/; +const transformFilter = (node, context) => { + if (!isCompatEnabled("COMPILER_FILTERS", context)) { + return; + } + if (node.type === 5) { + rewriteFilter(node.content, context); + } else if (node.type === 1) { + node.props.forEach((prop) => { + if (prop.type === 7 && prop.name !== "for" && prop.exp) { + rewriteFilter(prop.exp, context); + } + }); + } +}; +function rewriteFilter(node, context) { + if (node.type === 4) { + parseFilter(node, context); + } else { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (typeof child !== "object") continue; + if (child.type === 4) { + parseFilter(child, context); + } else if (child.type === 8) { + rewriteFilter(node, context); + } else if (child.type === 5) { + rewriteFilter(child.content, context); + } + } + } +} +function parseFilter(node, context) { + const exp = node.content; + let inSingle = false; + let inDouble = false; + let inTemplateString = false; + let inRegex = false; + let curly = 0; + let square = 0; + let paren = 0; + let lastFilterIndex = 0; + let c, prev, i, expression, filters = []; + for (i = 0; i < exp.length; i++) { + prev = c; + c = exp.charCodeAt(i); + if (inSingle) { + if (c === 39 && prev !== 92) inSingle = false; + } else if (inDouble) { + if (c === 34 && prev !== 92) inDouble = false; + } else if (inTemplateString) { + if (c === 96 && prev !== 92) inTemplateString = false; + } else if (inRegex) { + if (c === 47 && prev !== 92) inRegex = false; + } else if (c === 124 && // pipe + exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) { + if (expression === void 0) { + lastFilterIndex = i + 1; + expression = exp.slice(0, i).trim(); + } else { + pushFilter(); + } + } else { + switch (c) { + case 34: + inDouble = true; + break; + // " + case 39: + inSingle = true; + break; + // ' + case 96: + inTemplateString = true; + break; + // ` + case 40: + paren++; + break; + // ( + case 41: + paren--; + break; + // ) + case 91: + square++; + break; + // [ + case 93: + square--; + break; + // ] + case 123: + curly++; + break; + // { + case 125: + curly--; + break; + } + if (c === 47) { + let j = i - 1; + let p; + for (; j >= 0; j--) { + p = exp.charAt(j); + if (p !== " ") break; + } + if (!p || !validDivisionCharRE.test(p)) { + inRegex = true; + } + } + } + } + if (expression === void 0) { + expression = exp.slice(0, i).trim(); + } else if (lastFilterIndex !== 0) { + pushFilter(); + } + function pushFilter() { + filters.push(exp.slice(lastFilterIndex, i).trim()); + lastFilterIndex = i + 1; + } + if (filters.length) { + warnDeprecation( + "COMPILER_FILTERS", + context, + node.loc + ); + for (i = 0; i < filters.length; i++) { + expression = wrapFilter(expression, filters[i], context); + } + node.content = expression; + node.ast = void 0; + } +} +function wrapFilter(exp, filter, context) { + context.helper(RESOLVE_FILTER); + const i = filter.indexOf("("); + if (i < 0) { + context.filters.add(filter); + return `${toValidAssetId(filter, "filter")}(${exp})`; + } else { + const name = filter.slice(0, i); + const args = filter.slice(i + 1); + context.filters.add(name); + return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`; + } +} + +const seen = /* @__PURE__ */ new WeakSet(); +const transformMemo = (node, context) => { + if (node.type === 1) { + const dir = findDir(node, "memo"); + if (!dir || seen.has(node)) { + return; + } + seen.add(node); + return () => { + const codegenNode = node.codegenNode || context.currentNode.codegenNode; + if (codegenNode && codegenNode.type === 13) { + if (node.tagType !== 1) { + convertToBlock(codegenNode, context); + } + node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ + dir.exp, + createFunctionExpression(void 0, codegenNode), + `_cache`, + String(context.cached.length) + ]); + context.cached.push(null); + } + }; + } +}; + +function getBaseTransformPreset(prefixIdentifiers) { + return [ + [ + transformOnce, + transformIf, + transformMemo, + transformFor, + ...[transformFilter] , + ...[transformExpression] , + transformSlotOutlet, + transformElement, + trackSlotScopes, + transformText + ], + { + on: transformOn$1, + bind: transformBind, + model: transformModel$1 + } + ]; +} +function baseCompile(source, options = {}) { + const onError = options.onError || defaultOnError; + const isModuleMode = options.mode === "module"; + { + if (options.prefixIdentifiers === true) { + onError(createCompilerError(47)); + } else if (isModuleMode) { + onError(createCompilerError(48)); + } + } + const prefixIdentifiers = false; + if (options.cacheHandlers) { + onError(createCompilerError(49)); + } + if (options.scopeId && !isModuleMode) { + onError(createCompilerError(50)); + } + const resolvedOptions = extend({}, options, { + prefixIdentifiers + }); + const ast = isString(source) ? baseParse(source, resolvedOptions) : source; + const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(); + transform( + ast, + extend({}, resolvedOptions, { + nodeTransforms: [ + ...nodeTransforms, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: extend( + {}, + directiveTransforms, + options.directiveTransforms || {} + // user transforms + ) + }) + ); + return generate(ast, resolvedOptions); +} + +const BindingTypes = { + "DATA": "data", + "PROPS": "props", + "PROPS_ALIASED": "props-aliased", + "SETUP_LET": "setup-let", + "SETUP_CONST": "setup-const", + "SETUP_REACTIVE_CONST": "setup-reactive-const", + "SETUP_MAYBE_REF": "setup-maybe-ref", + "SETUP_REF": "setup-ref", + "OPTIONS": "options", + "LITERAL_CONST": "literal-const" +}; + +const noopDirectiveTransform = () => ({ props: [] }); + +const V_MODEL_RADIO = Symbol(`vModelRadio` ); +const V_MODEL_CHECKBOX = Symbol( + `vModelCheckbox` +); +const V_MODEL_TEXT = Symbol(`vModelText` ); +const V_MODEL_SELECT = Symbol( + `vModelSelect` +); +const V_MODEL_DYNAMIC = Symbol( + `vModelDynamic` +); +const V_ON_WITH_MODIFIERS = Symbol( + `vOnModifiersGuard` +); +const V_ON_WITH_KEYS = Symbol( + `vOnKeysGuard` +); +const V_SHOW = Symbol(`vShow` ); +const TRANSITION = Symbol(`Transition` ); +const TRANSITION_GROUP = Symbol( + `TransitionGroup` +); +registerRuntimeHelpers({ + [V_MODEL_RADIO]: `vModelRadio`, + [V_MODEL_CHECKBOX]: `vModelCheckbox`, + [V_MODEL_TEXT]: `vModelText`, + [V_MODEL_SELECT]: `vModelSelect`, + [V_MODEL_DYNAMIC]: `vModelDynamic`, + [V_ON_WITH_MODIFIERS]: `withModifiers`, + [V_ON_WITH_KEYS]: `withKeys`, + [V_SHOW]: `vShow`, + [TRANSITION]: `Transition`, + [TRANSITION_GROUP]: `TransitionGroup` +}); + +let decoder; +function decodeHtmlBrowser(raw, asAttr = false) { + if (!decoder) { + decoder = document.createElement("div"); + } + if (asAttr) { + decoder.innerHTML = `<div foo="${raw.replace(/"/g, """)}">`; + return decoder.children[0].getAttribute("foo"); + } else { + decoder.innerHTML = raw; + return decoder.textContent; + } +} + +const parserOptions = { + parseMode: "html", + isVoidTag, + isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + isPreTag: (tag) => tag === "pre", + isIgnoreNewlineTag: (tag) => tag === "pre" || tag === "textarea", + decodeEntities: decodeHtmlBrowser , + isBuiltInComponent: (tag) => { + if (tag === "Transition" || tag === "transition") { + return TRANSITION; + } else if (tag === "TransitionGroup" || tag === "transition-group") { + return TRANSITION_GROUP; + } + }, + // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher + getNamespace(tag, parent, rootNamespace) { + let ns = parent ? parent.ns : rootNamespace; + if (parent && ns === 2) { + if (parent.tag === "annotation-xml") { + if (tag === "svg") { + return 1; + } + if (parent.props.some( + (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") + )) { + ns = 0; + } + } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { + ns = 0; + } + } else if (parent && ns === 1) { + if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { + ns = 0; + } + } + if (ns === 0) { + if (tag === "svg") { + return 1; + } + if (tag === "math") { + return 2; + } + } + return ns; + } +}; + +const transformStyle = (node) => { + if (node.type === 1) { + node.props.forEach((p, i) => { + if (p.type === 6 && p.name === "style" && p.value) { + node.props[i] = { + type: 7, + name: `bind`, + arg: createSimpleExpression(`style`, true, p.loc), + exp: parseInlineCSS(p.value.content, p.loc), + modifiers: [], + loc: p.loc + }; + } + }); + } +}; +const parseInlineCSS = (cssText, loc) => { + const normalized = parseStringStyle(cssText); + return createSimpleExpression( + JSON.stringify(normalized), + false, + loc, + 3 + ); +}; + +function createDOMCompilerError(code, loc) { + return createCompilerError( + code, + loc, + DOMErrorMessages + ); +} +const DOMErrorCodes = { + "X_V_HTML_NO_EXPRESSION": 53, + "53": "X_V_HTML_NO_EXPRESSION", + "X_V_HTML_WITH_CHILDREN": 54, + "54": "X_V_HTML_WITH_CHILDREN", + "X_V_TEXT_NO_EXPRESSION": 55, + "55": "X_V_TEXT_NO_EXPRESSION", + "X_V_TEXT_WITH_CHILDREN": 56, + "56": "X_V_TEXT_WITH_CHILDREN", + "X_V_MODEL_ON_INVALID_ELEMENT": 57, + "57": "X_V_MODEL_ON_INVALID_ELEMENT", + "X_V_MODEL_ARG_ON_ELEMENT": 58, + "58": "X_V_MODEL_ARG_ON_ELEMENT", + "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59, + "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", + "X_V_MODEL_UNNECESSARY_VALUE": 60, + "60": "X_V_MODEL_UNNECESSARY_VALUE", + "X_V_SHOW_NO_EXPRESSION": 61, + "61": "X_V_SHOW_NO_EXPRESSION", + "X_TRANSITION_INVALID_CHILDREN": 62, + "62": "X_TRANSITION_INVALID_CHILDREN", + "X_IGNORED_SIDE_EFFECT_TAG": 63, + "63": "X_IGNORED_SIDE_EFFECT_TAG", + "__EXTEND_POINT__": 64, + "64": "__EXTEND_POINT__" +}; +const DOMErrorMessages = { + [53]: `v-html is missing expression.`, + [54]: `v-html will override element children.`, + [55]: `v-text is missing expression.`, + [56]: `v-text will override element children.`, + [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, + [58]: `v-model argument is not supported on plain elements.`, + [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, + [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, + [61]: `v-show is missing expression.`, + [62]: `<Transition> expects exactly one child element or component.`, + [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` +}; + +const transformVHtml = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(53, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(54, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`innerHTML`, true, loc), + exp || createSimpleExpression("", true) + ) + ] + }; +}; + +const transformVText = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(55, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(56, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`textContent`, true), + exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression( + context.helperString(TO_DISPLAY_STRING), + [exp], + loc + ) : createSimpleExpression("", true) + ) + ] + }; +}; + +const transformModel = (dir, node, context) => { + const baseResult = transformModel$1(dir, node, context); + if (!baseResult.props.length || node.tagType === 1) { + return baseResult; + } + if (dir.arg) { + context.onError( + createDOMCompilerError( + 58, + dir.arg.loc + ) + ); + } + function checkDuplicatedValue() { + const value = findDir(node, "bind"); + if (value && isStaticArgOf(value.arg, "value")) { + context.onError( + createDOMCompilerError( + 60, + value.loc + ) + ); + } + } + const { tag } = node; + const isCustomElement = context.isCustomElement(tag); + if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { + let directiveToUse = V_MODEL_TEXT; + let isInvalidType = false; + if (tag === "input" || isCustomElement) { + const type = findProp(node, `type`); + if (type) { + if (type.type === 7) { + directiveToUse = V_MODEL_DYNAMIC; + } else if (type.value) { + switch (type.value.content) { + case "radio": + directiveToUse = V_MODEL_RADIO; + break; + case "checkbox": + directiveToUse = V_MODEL_CHECKBOX; + break; + case "file": + isInvalidType = true; + context.onError( + createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + default: + checkDuplicatedValue(); + break; + } + } + } else if (hasDynamicKeyVBind(node)) { + directiveToUse = V_MODEL_DYNAMIC; + } else { + checkDuplicatedValue(); + } + } else if (tag === "select") { + directiveToUse = V_MODEL_SELECT; + } else { + checkDuplicatedValue(); + } + if (!isInvalidType) { + baseResult.needRuntime = context.helper(directiveToUse); + } + } else { + context.onError( + createDOMCompilerError( + 57, + dir.loc + ) + ); + } + baseResult.props = baseResult.props.filter( + (p) => !(p.key.type === 4 && p.key.content === "modelValue") + ); + return baseResult; +}; + +const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`); +const isNonKeyModifier = /* @__PURE__ */ makeMap( + // event propagation management + `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` +); +const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right"); +const isKeyboardEvent = /* @__PURE__ */ makeMap(`onkeyup,onkeydown,onkeypress`); +const resolveModifiers = (key, modifiers, context, loc) => { + const keyModifiers = []; + const nonKeyModifiers = []; + const eventOptionModifiers = []; + for (let i = 0; i < modifiers.length; i++) { + const modifier = modifiers[i].content; + if (modifier === "native" && checkCompatEnabled( + "COMPILER_V_ON_NATIVE", + context, + loc + )) { + eventOptionModifiers.push(modifier); + } else if (isEventOptionModifier(modifier)) { + eventOptionModifiers.push(modifier); + } else { + if (maybeKeyModifier(modifier)) { + if (isStaticExp(key)) { + if (isKeyboardEvent(key.content.toLowerCase())) { + keyModifiers.push(modifier); + } else { + nonKeyModifiers.push(modifier); + } + } else { + keyModifiers.push(modifier); + nonKeyModifiers.push(modifier); + } + } else { + if (isNonKeyModifier(modifier)) { + nonKeyModifiers.push(modifier); + } else { + keyModifiers.push(modifier); + } + } + } + } + return { + keyModifiers, + nonKeyModifiers, + eventOptionModifiers + }; +}; +const transformClick = (key, event) => { + const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick"; + return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([ + `(`, + key, + `) === "onClick" ? "${event}" : (`, + key, + `)` + ]) : key; +}; +const transformOn = (dir, node, context) => { + return transformOn$1(dir, node, context, (baseResult) => { + const { modifiers } = dir; + if (!modifiers.length) return baseResult; + let { key, value: handlerExp } = baseResult.props[0]; + const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); + if (nonKeyModifiers.includes("right")) { + key = transformClick(key, `onContextmenu`); + } + if (nonKeyModifiers.includes("middle")) { + key = transformClick(key, `onMouseup`); + } + if (nonKeyModifiers.length) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ + handlerExp, + JSON.stringify(nonKeyModifiers) + ]); + } + if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard + (!isStaticExp(key) || isKeyboardEvent(key.content.toLowerCase()))) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ + handlerExp, + JSON.stringify(keyModifiers) + ]); + } + if (eventOptionModifiers.length) { + const modifierPostfix = eventOptionModifiers.map(capitalize).join(""); + key = isStaticExp(key) ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); + } + return { + props: [createObjectProperty(key, handlerExp)] + }; + }); +}; + +const transformShow = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(61, loc) + ); + } + return { + props: [], + needRuntime: context.helper(V_SHOW) + }; +}; + +const transformTransition = (node, context) => { + if (node.type === 1 && node.tagType === 1) { + const component = context.isBuiltInComponent(node.tag); + if (component === TRANSITION) { + return () => { + if (!node.children.length) { + return; + } + if (hasMultipleChildren(node)) { + context.onError( + createDOMCompilerError( + 62, + { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + } + ) + ); + } + const child = node.children[0]; + if (child.type === 1) { + for (const p of child.props) { + if (p.type === 7 && p.name === "show") { + node.props.push({ + type: 6, + name: "persisted", + nameLoc: node.loc, + value: void 0, + loc: node.loc + }); + } + } + } + }; + } + } +}; +function hasMultipleChildren(node) { + const children = node.children = node.children.filter( + (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()) + ); + const child = children[0]; + return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren); +} + +const ignoreSideEffectTags = (node, context) => { + if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { + context.onError( + createDOMCompilerError( + 63, + node.loc + ) + ); + context.removeNode(); + } +}; + +function isValidHTMLNesting(parent, child) { + if (parent in onlyValidChildren) { + return onlyValidChildren[parent].has(child); + } + if (child in onlyValidParents) { + return onlyValidParents[child].has(parent); + } + if (parent in knownInvalidChildren) { + if (knownInvalidChildren[parent].has(child)) return false; + } + if (child in knownInvalidParents) { + if (knownInvalidParents[child].has(parent)) return false; + } + return true; +} +const headings = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]); +const emptySet = /* @__PURE__ */ new Set([]); +const onlyValidChildren = { + head: /* @__PURE__ */ new Set([ + "base", + "basefront", + "bgsound", + "link", + "meta", + "title", + "noscript", + "noframes", + "style", + "script", + "template" + ]), + optgroup: /* @__PURE__ */ new Set(["option"]), + select: /* @__PURE__ */ new Set(["optgroup", "option", "hr"]), + // table + table: /* @__PURE__ */ new Set(["caption", "colgroup", "tbody", "tfoot", "thead"]), + tr: /* @__PURE__ */ new Set(["td", "th"]), + colgroup: /* @__PURE__ */ new Set(["col"]), + tbody: /* @__PURE__ */ new Set(["tr"]), + thead: /* @__PURE__ */ new Set(["tr"]), + tfoot: /* @__PURE__ */ new Set(["tr"]), + // these elements can not have any children elements + script: emptySet, + iframe: emptySet, + option: emptySet, + textarea: emptySet, + style: emptySet, + title: emptySet +}; +const onlyValidParents = { + // sections + html: emptySet, + body: /* @__PURE__ */ new Set(["html"]), + head: /* @__PURE__ */ new Set(["html"]), + // table + td: /* @__PURE__ */ new Set(["tr"]), + colgroup: /* @__PURE__ */ new Set(["table"]), + caption: /* @__PURE__ */ new Set(["table"]), + tbody: /* @__PURE__ */ new Set(["table"]), + tfoot: /* @__PURE__ */ new Set(["table"]), + col: /* @__PURE__ */ new Set(["colgroup"]), + th: /* @__PURE__ */ new Set(["tr"]), + thead: /* @__PURE__ */ new Set(["table"]), + tr: /* @__PURE__ */ new Set(["tbody", "thead", "tfoot"]), + // data list + dd: /* @__PURE__ */ new Set(["dl", "div"]), + dt: /* @__PURE__ */ new Set(["dl", "div"]), + // other + figcaption: /* @__PURE__ */ new Set(["figure"]), + // li: new Set(["ul", "ol"]), + summary: /* @__PURE__ */ new Set(["details"]), + area: /* @__PURE__ */ new Set(["map"]) +}; +const knownInvalidChildren = { + p: /* @__PURE__ */ new Set([ + "address", + "article", + "aside", + "blockquote", + "center", + "details", + "dialog", + "dir", + "div", + "dl", + "fieldset", + "figure", + "footer", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "header", + "hgroup", + "hr", + "li", + "main", + "nav", + "menu", + "ol", + "p", + "pre", + "section", + "table", + "ul" + ]), + svg: /* @__PURE__ */ new Set([ + "b", + "blockquote", + "br", + "code", + "dd", + "div", + "dl", + "dt", + "em", + "embed", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "hr", + "i", + "img", + "li", + "menu", + "meta", + "ol", + "p", + "pre", + "ruby", + "s", + "small", + "span", + "strong", + "sub", + "sup", + "table", + "u", + "ul", + "var" + ]) +}; +const knownInvalidParents = { + a: /* @__PURE__ */ new Set(["a"]), + button: /* @__PURE__ */ new Set(["button"]), + dd: /* @__PURE__ */ new Set(["dd", "dt"]), + dt: /* @__PURE__ */ new Set(["dd", "dt"]), + form: /* @__PURE__ */ new Set(["form"]), + li: /* @__PURE__ */ new Set(["li"]), + h1: headings, + h2: headings, + h3: headings, + h4: headings, + h5: headings, + h6: headings +}; + +const validateHtmlNesting = (node, context) => { + if (node.type === 1 && node.tagType === 0 && context.parent && context.parent.type === 1 && context.parent.tagType === 0 && !isValidHTMLNesting(context.parent.tag, node.tag)) { + const error = new SyntaxError( + `<${node.tag}> cannot be child of <${context.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.` + ); + error.loc = node.loc; + context.onWarn(error); + } +}; + +const DOMNodeTransforms = [ + transformStyle, + ...[transformTransition, validateHtmlNesting] +]; +const DOMDirectiveTransforms = { + cloak: noopDirectiveTransform, + html: transformVHtml, + text: transformVText, + model: transformModel, + // override compiler-core + on: transformOn, + // override compiler-core + show: transformShow +}; +function compile(src, options = {}) { + return baseCompile( + src, + extend({}, parserOptions, options, { + nodeTransforms: [ + // ignore <script> and <tag> + // this is not put inside DOMNodeTransforms because that list is used + // by compiler-ssr to generate vnode fallback branches + ignoreSideEffectTags, + ...DOMNodeTransforms, + ...options.nodeTransforms || [] + ], + directiveTransforms: extend( + {}, + DOMDirectiveTransforms, + options.directiveTransforms || {} + ), + transformHoist: null + }) + ); +} +function parse(template, options = {}) { + return baseParse(template, extend({}, parserOptions, options)); +} + +export { BASE_TRANSITION, BindingTypes, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, CompilerDeprecationTypes, ConstantTypes, DOMDirectiveTransforms, DOMErrorCodes, DOMErrorMessages, DOMNodeTransforms, ElementTypes, ErrorCodes, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, Namespaces, NodeTypes, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, TRANSITION, TRANSITION_GROUP, TS_NODE_TYPES, UNREF, V_MODEL_CHECKBOX, V_MODEL_DYNAMIC, V_MODEL_RADIO, V_MODEL_SELECT, V_MODEL_TEXT, V_ON_WITH_KEYS, V_ON_WITH_MODIFIERS, V_SHOW, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, compile, convertToBlock, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createDOMCompilerError, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, errorMessages, extractIdentifiers, findDir, findProp, forAliasRE, generate, generateCodeFrame, getBaseTransformPreset, getConstantType, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isCoreComponent, isFnExpression, isFnExpressionBrowser, isFnExpressionNode, isFunctionType, isInDestructureAssignment, isInNewExpression, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText$1 as isText, isVSlot, locStub, noopDirectiveTransform, parse, parserOptions, processExpression, processFor, processIf, processSlotOutlet, registerRuntimeHelpers, resolveComponentType, stringifyExpression, toValidAssetId, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformElement, transformExpression, transformModel$1 as transformModel, transformOn$1 as transformOn, transformStyle, traverseNode, unwrapTSNode, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation }; diff --git a/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js b/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js new file mode 100644 index 0000000..f473ca6 --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js @@ -0,0 +1,11 @@ +/** +* @vue/compiler-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let e;function t(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return e=>e in t}let n={},i=()=>{},s=()=>!1,r=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||97>e.charCodeAt(2)),o=Object.assign,a=Array.isArray,l=e=>"string"==typeof e,c=e=>"symbol"==typeof e,h=e=>null!==e&&"object"==typeof e,p=t(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),d=t("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),u=e=>{let t=Object.create(null);return n=>t[n]||(t[n]=e(n))},f=/-(\w)/g,E=u(e=>e.replace(f,(e,t)=>t?t.toUpperCase():"")),_=u(e=>e.charAt(0).toUpperCase()+e.slice(1)),m=u(e=>e?`on${_(e)}`:"");function S(e,t=0,n=e.length){if((t=Math.max(0,Math.min(t,e.length)))>(n=Math.max(0,Math.min(n,e.length))))return"";let i=e.split(/(\r?\n)/),s=i.filter((e,t)=>t%2==1);i=i.filter((e,t)=>t%2==0);let r=0,o=[];for(let e=0;e<i.length;e++)if((r+=i[e].length+(s[e]&&s[e].length||0))>=t){for(let a=e-2;a<=e+2||n>r;a++){if(a<0||a>=i.length)continue;let l=a+1;o.push(`${l}${" ".repeat(Math.max(3-String(l).length,0))}| ${i[a]}`);let c=i[a].length,h=s[a]&&s[a].length||0;if(a===e){let e=t-(r-(c+h)),i=Math.max(1,n>r?c-e:n-t);o.push(" | "+" ".repeat(e)+"^".repeat(i))}else if(a>e){if(n>r){let e=Math.max(Math.min(n-r,c),1);o.push(" | "+"^".repeat(e))}r+=c+h}}break}return o.join("\n")}let g=/;(?![^(]*\))/g,T=/:([^]+)/,N=/\/\*[^]*?\*\//g,I=t("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),y=t("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),O=t("annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"),A=t("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),C=Symbol(""),b=Symbol(""),R=Symbol(""),v=Symbol(""),x=Symbol(""),L=Symbol(""),M=Symbol(""),P=Symbol(""),D=Symbol(""),V=Symbol(""),k=Symbol(""),X=Symbol(""),w=Symbol(""),U=Symbol(""),F=Symbol(""),B=Symbol(""),$=Symbol(""),H=Symbol(""),G=Symbol(""),q=Symbol(""),J=Symbol(""),j=Symbol(""),W=Symbol(""),K=Symbol(""),Y=Symbol(""),Q=Symbol(""),z=Symbol(""),Z=Symbol(""),ee=Symbol(""),et=Symbol(""),en=Symbol(""),ei=Symbol(""),es=Symbol(""),er=Symbol(""),eo=Symbol(""),ea=Symbol(""),el=Symbol(""),ec=Symbol(""),eh=Symbol(""),ep={[C]:"Fragment",[b]:"Teleport",[R]:"Suspense",[v]:"KeepAlive",[x]:"BaseTransition",[L]:"openBlock",[M]:"createBlock",[P]:"createElementBlock",[D]:"createVNode",[V]:"createElementVNode",[k]:"createCommentVNode",[X]:"createTextVNode",[w]:"createStaticVNode",[U]:"resolveComponent",[F]:"resolveDynamicComponent",[B]:"resolveDirective",[$]:"resolveFilter",[H]:"withDirectives",[G]:"renderList",[q]:"renderSlot",[J]:"createSlots",[j]:"toDisplayString",[W]:"mergeProps",[K]:"normalizeClass",[Y]:"normalizeStyle",[Q]:"normalizeProps",[z]:"guardReactiveProps",[Z]:"toHandlers",[ee]:"camelize",[et]:"capitalize",[en]:"toHandlerKey",[ei]:"setBlockTracking",[es]:"pushScopeId",[er]:"popScopeId",[eo]:"withCtx",[ea]:"unref",[el]:"isRef",[ec]:"withMemo",[eh]:"isMemoSame"};function ed(e){Object.getOwnPropertySymbols(e).forEach(t=>{ep[t]=e[t]})}let eu={HTML:0,0:"HTML",SVG:1,1:"SVG",MATH_ML:2,2:"MATH_ML"},ef={ROOT:0,0:"ROOT",ELEMENT:1,1:"ELEMENT",TEXT:2,2:"TEXT",COMMENT:3,3:"COMMENT",SIMPLE_EXPRESSION:4,4:"SIMPLE_EXPRESSION",INTERPOLATION:5,5:"INTERPOLATION",ATTRIBUTE:6,6:"ATTRIBUTE",DIRECTIVE:7,7:"DIRECTIVE",COMPOUND_EXPRESSION:8,8:"COMPOUND_EXPRESSION",IF:9,9:"IF",IF_BRANCH:10,10:"IF_BRANCH",FOR:11,11:"FOR",TEXT_CALL:12,12:"TEXT_CALL",VNODE_CALL:13,13:"VNODE_CALL",JS_CALL_EXPRESSION:14,14:"JS_CALL_EXPRESSION",JS_OBJECT_EXPRESSION:15,15:"JS_OBJECT_EXPRESSION",JS_PROPERTY:16,16:"JS_PROPERTY",JS_ARRAY_EXPRESSION:17,17:"JS_ARRAY_EXPRESSION",JS_FUNCTION_EXPRESSION:18,18:"JS_FUNCTION_EXPRESSION",JS_CONDITIONAL_EXPRESSION:19,19:"JS_CONDITIONAL_EXPRESSION",JS_CACHE_EXPRESSION:20,20:"JS_CACHE_EXPRESSION",JS_BLOCK_STATEMENT:21,21:"JS_BLOCK_STATEMENT",JS_TEMPLATE_LITERAL:22,22:"JS_TEMPLATE_LITERAL",JS_IF_STATEMENT:23,23:"JS_IF_STATEMENT",JS_ASSIGNMENT_EXPRESSION:24,24:"JS_ASSIGNMENT_EXPRESSION",JS_SEQUENCE_EXPRESSION:25,25:"JS_SEQUENCE_EXPRESSION",JS_RETURN_STATEMENT:26,26:"JS_RETURN_STATEMENT"},eE={ELEMENT:0,0:"ELEMENT",COMPONENT:1,1:"COMPONENT",SLOT:2,2:"SLOT",TEMPLATE:3,3:"TEMPLATE"},e_={NOT_CONSTANT:0,0:"NOT_CONSTANT",CAN_SKIP_PATCH:1,1:"CAN_SKIP_PATCH",CAN_CACHE:2,2:"CAN_CACHE",CAN_STRINGIFY:3,3:"CAN_STRINGIFY"},em={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function eS(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:em}}function eg(e,t,n,i,s,r,o,a=!1,l=!1,c=!1,h=em){return e&&(a?(e.helper(L),e.helper(eX(e.inSSR,c))):e.helper(ek(e.inSSR,c)),o&&e.helper(H)),{type:13,tag:t,props:n,children:i,patchFlag:s,dynamicProps:r,directives:o,isBlock:a,disableTracking:l,isComponent:c,loc:h}}function eT(e,t=em){return{type:17,loc:t,elements:e}}function eN(e,t=em){return{type:15,loc:t,properties:e}}function eI(e,t){return{type:16,loc:em,key:l(e)?ey(e,!0):e,value:t}}function ey(e,t=!1,n=em,i=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:i}}function eO(e,t){return{type:5,loc:t,content:l(e)?ey(e,!1,t):e}}function eA(e,t=em){return{type:8,loc:t,children:e}}function eC(e,t=[],n=em){return{type:14,loc:n,callee:e,arguments:t}}function eb(e,t,n=!1,i=!1,s=em){return{type:18,params:e,returns:t,newline:n,isSlot:i,loc:s}}function eR(e,t,n,i=!0){return{type:19,test:e,consequent:t,alternate:n,newline:i,loc:em}}function ev(e,t,n=!1,i=!1){return{type:20,index:e,value:t,needPauseTracking:n,inVOnce:i,needArraySpread:!1,loc:em}}function ex(e){return{type:21,body:e,loc:em}}function eL(e){return{type:22,elements:e,loc:em}}function eM(e,t,n){return{type:23,test:e,consequent:t,alternate:n,loc:em}}function eP(e,t){return{type:24,left:e,right:t,loc:em}}function eD(e){return{type:25,expressions:e,loc:em}}function eV(e){return{type:26,returns:e,loc:em}}function ek(e,t){return e||t?D:V}function eX(e,t){return e||t?M:P}function ew(e,{helper:t,removeHelper:n,inSSR:i}){e.isBlock||(e.isBlock=!0,n(ek(i,e.isComponent)),t(L),t(eX(i,e.isComponent)))}let eU=new Uint8Array([123,123]),eF=new Uint8Array([125,125]);function eB(e){return e>=97&&e<=122||e>=65&&e<=90}function e$(e){return 32===e||10===e||9===e||12===e||13===e}function eH(e){return 47===e||62===e||e$(e)}function eG(e){let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}let eq={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])},eJ={COMPILER_IS_ON_ELEMENT:"COMPILER_IS_ON_ELEMENT",COMPILER_V_BIND_SYNC:"COMPILER_V_BIND_SYNC",COMPILER_V_BIND_OBJECT_ORDER:"COMPILER_V_BIND_OBJECT_ORDER",COMPILER_V_ON_NATIVE:"COMPILER_V_ON_NATIVE",COMPILER_V_IF_V_FOR_PRECEDENCE:"COMPILER_V_IF_V_FOR_PRECEDENCE",COMPILER_NATIVE_TEMPLATE:"COMPILER_NATIVE_TEMPLATE",COMPILER_INLINE_TEMPLATE:"COMPILER_INLINE_TEMPLATE",COMPILER_FILTERS:"COMPILER_FILTERS"},ej={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:e=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${e}.sync\` should be changed to \`v-model:${e}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.",link:"https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Vue 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Vue 3.',link:"https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html"},COMPILER_FILTERS:{message:'filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://v3-migration.vuejs.org/breaking-changes/filters.html"}};function eW(e,{compatConfig:t}){let n=t&&t[e];return"MODE"===e?n||3:n}function eK(e,t){let n=eW("MODE",t),i=eW(e,t);return 3===n?!0===i:!1!==i}function eY(e,t,n,...i){return eK(e,t)}function eQ(e,t,n,...i){if("suppress-warning"===eW(e,t))return;let{message:s,link:r}=ej[e],o=SyntaxError(`(deprecation ${e}) ${"function"==typeof s?s(...i):s}${r?` + Details: ${r}`:""}`);o.code=e,n&&(o.loc=n),t.onWarn(o)}function ez(e){throw e}function eZ(e){}function e1(e,t,n,i){let s=SyntaxError(String(`https://vuejs.org/error-reference/#compiler-${e}`));return s.code=e,s.loc=t,s}let e0={ABRUPT_CLOSING_OF_EMPTY_COMMENT:0,0:"ABRUPT_CLOSING_OF_EMPTY_COMMENT",CDATA_IN_HTML_CONTENT:1,1:"CDATA_IN_HTML_CONTENT",DUPLICATE_ATTRIBUTE:2,2:"DUPLICATE_ATTRIBUTE",END_TAG_WITH_ATTRIBUTES:3,3:"END_TAG_WITH_ATTRIBUTES",END_TAG_WITH_TRAILING_SOLIDUS:4,4:"END_TAG_WITH_TRAILING_SOLIDUS",EOF_BEFORE_TAG_NAME:5,5:"EOF_BEFORE_TAG_NAME",EOF_IN_CDATA:6,6:"EOF_IN_CDATA",EOF_IN_COMMENT:7,7:"EOF_IN_COMMENT",EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT:8,8:"EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT",EOF_IN_TAG:9,9:"EOF_IN_TAG",INCORRECTLY_CLOSED_COMMENT:10,10:"INCORRECTLY_CLOSED_COMMENT",INCORRECTLY_OPENED_COMMENT:11,11:"INCORRECTLY_OPENED_COMMENT",INVALID_FIRST_CHARACTER_OF_TAG_NAME:12,12:"INVALID_FIRST_CHARACTER_OF_TAG_NAME",MISSING_ATTRIBUTE_VALUE:13,13:"MISSING_ATTRIBUTE_VALUE",MISSING_END_TAG_NAME:14,14:"MISSING_END_TAG_NAME",MISSING_WHITESPACE_BETWEEN_ATTRIBUTES:15,15:"MISSING_WHITESPACE_BETWEEN_ATTRIBUTES",NESTED_COMMENT:16,16:"NESTED_COMMENT",UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME:17,17:"UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME",UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE:18,18:"UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE",UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME:19,19:"UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME",UNEXPECTED_NULL_CHARACTER:20,20:"UNEXPECTED_NULL_CHARACTER",UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME:21,21:"UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME",UNEXPECTED_SOLIDUS_IN_TAG:22,22:"UNEXPECTED_SOLIDUS_IN_TAG",X_INVALID_END_TAG:23,23:"X_INVALID_END_TAG",X_MISSING_END_TAG:24,24:"X_MISSING_END_TAG",X_MISSING_INTERPOLATION_END:25,25:"X_MISSING_INTERPOLATION_END",X_MISSING_DIRECTIVE_NAME:26,26:"X_MISSING_DIRECTIVE_NAME",X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END:27,27:"X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END",X_V_IF_NO_EXPRESSION:28,28:"X_V_IF_NO_EXPRESSION",X_V_IF_SAME_KEY:29,29:"X_V_IF_SAME_KEY",X_V_ELSE_NO_ADJACENT_IF:30,30:"X_V_ELSE_NO_ADJACENT_IF",X_V_FOR_NO_EXPRESSION:31,31:"X_V_FOR_NO_EXPRESSION",X_V_FOR_MALFORMED_EXPRESSION:32,32:"X_V_FOR_MALFORMED_EXPRESSION",X_V_FOR_TEMPLATE_KEY_PLACEMENT:33,33:"X_V_FOR_TEMPLATE_KEY_PLACEMENT",X_V_BIND_NO_EXPRESSION:34,34:"X_V_BIND_NO_EXPRESSION",X_V_ON_NO_EXPRESSION:35,35:"X_V_ON_NO_EXPRESSION",X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET:36,36:"X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET",X_V_SLOT_MIXED_SLOT_USAGE:37,37:"X_V_SLOT_MIXED_SLOT_USAGE",X_V_SLOT_DUPLICATE_SLOT_NAMES:38,38:"X_V_SLOT_DUPLICATE_SLOT_NAMES",X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN:39,39:"X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN",X_V_SLOT_MISPLACED:40,40:"X_V_SLOT_MISPLACED",X_V_MODEL_NO_EXPRESSION:41,41:"X_V_MODEL_NO_EXPRESSION",X_V_MODEL_MALFORMED_EXPRESSION:42,42:"X_V_MODEL_MALFORMED_EXPRESSION",X_V_MODEL_ON_SCOPE_VARIABLE:43,43:"X_V_MODEL_ON_SCOPE_VARIABLE",X_V_MODEL_ON_PROPS:44,44:"X_V_MODEL_ON_PROPS",X_INVALID_EXPRESSION:45,45:"X_INVALID_EXPRESSION",X_KEEP_ALIVE_INVALID_CHILDREN:46,46:"X_KEEP_ALIVE_INVALID_CHILDREN",X_PREFIX_ID_NOT_SUPPORTED:47,47:"X_PREFIX_ID_NOT_SUPPORTED",X_MODULE_MODE_NOT_SUPPORTED:48,48:"X_MODULE_MODE_NOT_SUPPORTED",X_CACHE_HANDLER_NOT_SUPPORTED:49,49:"X_CACHE_HANDLER_NOT_SUPPORTED",X_SCOPE_ID_NOT_SUPPORTED:50,50:"X_SCOPE_ID_NOT_SUPPORTED",X_VNODE_HOOKS:51,51:"X_VNODE_HOOKS",X_V_BIND_INVALID_SAME_NAME_ARGUMENT:52,52:"X_V_BIND_INVALID_SAME_NAME_ARGUMENT",__EXTEND_POINT__:53,53:"__EXTEND_POINT__"},e2={0:"Illegal comment.",1:"CDATA section is allowed only in XML context.",2:"Duplicate attribute.",3:"End tag cannot have attributes.",4:"Illegal '/' in tags.",5:"Unexpected EOF in tag.",6:"Unexpected EOF in CDATA section.",7:"Unexpected EOF in comment.",8:"Unexpected EOF in script.",9:"Unexpected EOF in tag.",10:"Incorrectly closed comment.",11:"Incorrectly opened comment.",12:"Illegal tag name. Use '<' to print '<'.",13:"Attribute value was expected.",14:"End tag name was expected.",15:"Whitespace was expected.",16:"Unexpected '<!--' in comment.",17:"Attribute name cannot contain U+0022 (\"), U+0027 ('), and U+003C (<).",18:"Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",19:"Attribute name cannot start with '='.",21:"'<?' is allowed only in XML context.",20:"Unexpected null character.",22:"Illegal '/' in tags.",23:"Invalid end tag.",24:"Element is missing end tag.",25:"Interpolation end sign was not found.",27:"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",26:"Legal directive name was expected.",28:"v-if/v-else-if is missing expression.",29:"v-if/else branches must use unique keys.",30:"v-else/v-else-if has no adjacent v-if or v-else-if.",31:"v-for is missing expression.",32:"v-for has invalid expression.",33:"<template v-for> key should be placed on the <template> tag.",34:"v-bind is missing expression.",52:"v-bind with same-name shorthand only allows static argument.",35:"v-on is missing expression.",36:"Unexpected custom directive on <slot> outlet.",37:"Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.",38:"Duplicate slot names found. ",39:"Extraneous children found when component already has explicitly named default slot. These children will be ignored.",40:"v-slot can only be used on components or <template> tags.",41:"v-model is missing expression.",42:"v-model value must be a valid JavaScript member expression.",43:"v-model cannot be used on v-for or v-slot scope variables because they are not writable.",44:`v-model cannot be used on a prop, because local prop bindings are not writable. +Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,45:"Error parsing JavaScript expression: ",46:"<KeepAlive> expects exactly one child component.",51:"@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.",47:'"prefixIdentifiers" option is not supported in this build of compiler.',48:"ES module mode is not supported in this build of compiler.",49:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',50:'"scopeId" option is only supported in module mode.',53:""};function e3(e,t,n=!1,i=[],s=Object.create(null)){}function e4(e,t,n){return!1}function e6(e,t){if(e&&("ObjectProperty"===e.type||"ArrayPattern"===e.type)){let e=t.length;for(;e--;){let n=t[e];if("AssignmentExpression"===n.type)return!0;if("ObjectProperty"!==n.type&&!n.type.endsWith("Pattern"))break}}return!1}function e5(e){let t=e.length;for(;t--;){let n=e[t];if("NewExpression"===n.type)return!0;if("MemberExpression"!==n.type)break}return!1}function e9(e,t){for(let n of e.params)for(let e of e8(n))t(e)}function e7(e,t){for(let n of e.body)if("VariableDeclaration"===n.type){if(n.declare)continue;for(let e of n.declarations)for(let n of e8(e.id))t(n)}else if("FunctionDeclaration"===n.type||"ClassDeclaration"===n.type){if(n.declare||!n.id)continue;t(n.id)}else("ForOfStatement"===n.type||"ForInStatement"===n.type||"ForStatement"===n.type)&&function(e,t,n){let i="ForStatement"===e.type?e.init:e.left;if(i&&"VariableDeclaration"===i.type&&("var"===i.kind?t:!t))for(let e of i.declarations)for(let t of e8(e.id))n(t)}(n,!0,t)}function e8(e,t=[]){switch(e.type){case"Identifier":t.push(e);break;case"MemberExpression":let n=e;for(;"MemberExpression"===n.type;)n=n.object;t.push(n);break;case"ObjectPattern":for(let n of e.properties)"RestElement"===n.type?e8(n.argument,t):e8(n.value,t);break;case"ArrayPattern":e.elements.forEach(e=>{e&&e8(e,t)});break;case"RestElement":e8(e.argument,t);break;case"AssignmentPattern":e8(e.left,t)}return t}let te=e=>/Function(?:Expression|Declaration)$|Method$/.test(e.type),tt=e=>e&&("ObjectProperty"===e.type||"ObjectMethod"===e.type)&&!e.computed,tn=(e,t)=>tt(t)&&t.key===e,ti=["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"];function ts(e){return ti.includes(e.type)?ts(e.expression):e}let tr=e=>4===e.type&&e.isStatic;function to(e){switch(e){case"Teleport":case"teleport":return b;case"Suspense":case"suspense":return R;case"KeepAlive":case"keep-alive":return v;case"BaseTransition":case"base-transition":return x}}let ta=/^\d|[^\$\w\xA0-\uFFFF]/,tl=e=>!ta.test(e),tc=/[A-Za-z_$\xA0-\uFFFF]/,th=/[\.\?\w$\xA0-\uFFFF]/,tp=/\s+[.[]\s*|\s*[.[]\s+/g,td=e=>4===e.type?e.content:e.loc.source,tu=e=>{let t=td(e).trim().replace(tp,e=>e.trim()),n=0,i=[],s=0,r=0,o=null;for(let e=0;e<t.length;e++){let a=t.charAt(e);switch(n){case 0:if("["===a)i.push(n),n=1,s++;else if("("===a)i.push(n),n=2,r++;else if(!(0===e?tc:th).test(a))return!1;break;case 1:"'"===a||'"'===a||"`"===a?(i.push(n),n=3,o=a):"["===a?s++:"]"!==a||--s||(n=i.pop());break;case 2:if("'"===a||'"'===a||"`"===a)i.push(n),n=3,o=a;else if("("===a)r++;else if(")"===a){if(e===t.length-1)return!1;--r||(n=i.pop())}break;case 3:a===o&&(n=i.pop(),o=null)}}return!s&&!r},tf=i,tE=tu,t_=/^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,tm=e=>t_.test(td(e)),tS=i,tg=tm;function tT(e,t,n=t.length){return tN({offset:e.offset,line:e.line,column:e.column},t,n)}function tN(e,t,n=t.length){let i=0,s=-1;for(let e=0;e<n;e++)10===t.charCodeAt(e)&&(i++,s=e);return e.offset+=n,e.line+=i,e.column=-1===s?e.column+n:n-s,e}function tI(e,t){if(!e)throw Error(t||"unexpected compiler condition")}function ty(e,t,n=!1){for(let i=0;i<e.props.length;i++){let s=e.props[i];if(7===s.type&&(n||s.exp)&&(l(t)?s.name===t:t.test(s.name)))return s}}function tO(e,t,n=!1,i=!1){for(let s=0;s<e.props.length;s++){let r=e.props[s];if(6===r.type){if(n)continue;if(r.name===t&&(r.value||i))return r}else if("bind"===r.name&&(r.exp||i)&&tA(r.arg,t))return r}}function tA(e,t){return!!(e&&tr(e)&&e.content===t)}function tC(e){return e.props.some(e=>7===e.type&&"bind"===e.name&&(!e.arg||4!==e.arg.type||!e.arg.isStatic))}function tb(e){return 5===e.type||2===e.type}function tR(e){return 7===e.type&&"slot"===e.name}function tv(e){return 1===e.type&&3===e.tagType}function tx(e){return 1===e.type&&2===e.tagType}let tL=new Set([Q,z]);function tM(e,t,n){let i,s;let r=13===e.type?e.props:e.arguments[2],o=[];if(r&&!l(r)&&14===r.type){let e=function e(t,n=[]){if(t&&!l(t)&&14===t.type){let i=t.callee;if(!l(i)&&tL.has(i))return e(t.arguments[0],n.concat(t))}return[t,n]}(r);r=e[0],s=(o=e[1])[o.length-1]}if(null==r||l(r))i=eN([t]);else if(14===r.type){let e=r.arguments[0];l(e)||15!==e.type?r.callee===Z?i=eC(n.helper(W),[eN([t]),r]):r.arguments.unshift(eN([t])):tP(t,e)||e.properties.unshift(t),i||(i=r)}else 15===r.type?(tP(t,r)||r.properties.unshift(t),i=r):(i=eC(n.helper(W),[eN([t]),r]),s&&s.callee===z&&(s=o[o.length-2]));13===e.type?s?s.arguments[0]=i:e.props=i:s?s.arguments[0]=i:e.arguments[2]=i}function tP(e,t){let n=!1;if(4===e.key.type){let i=e.key.content;n=t.properties.some(e=>4===e.key.type&&e.key.content===i)}return n}function tD(e,t){return`_${t}_${e.replace(/[^\w]/g,(t,n)=>"-"===t?"_":e.charCodeAt(n).toString())}`}function tV(e,t){if(!e||0===Object.keys(t).length)return!1;switch(e.type){case 1:for(let n=0;n<e.props.length;n++){let i=e.props[n];if(7===i.type&&(tV(i.arg,t)||tV(i.exp,t)))return!0}return e.children.some(e=>tV(e,t));case 11:if(tV(e.source,t))return!0;return e.children.some(e=>tV(e,t));case 9:return e.branches.some(e=>tV(e,t));case 10:if(tV(e.condition,t))return!0;return e.children.some(e=>tV(e,t));case 4:return!e.isStatic&&tl(e.content)&&!!t[e.content];case 8:return e.children.some(e=>h(e)&&tV(e,t));case 5:case 12:return tV(e.content,t);default:return!1}}function tk(e){return 14===e.type&&e.callee===ec?e.arguments[1].returns:e}let tX=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,tw={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:s,isPreTag:s,isIgnoreNewlineTag:s,isCustomElement:s,onError:ez,onWarn:eZ,comments:!1,prefixIdentifiers:!1},tU=tw,tF=null,tB="",t$=null,tH=null,tG="",tq=-1,tJ=-1,tj=0,tW=!1,tK=null,tY=[],tQ=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=eU,this.delimiterClose=eF,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=eU,this.delimiterClose=eF}getPos(e){let t=1,n=e+1;for(let i=this.newlines.length-1;i>=0;i--){let s=this.newlines[i];if(e>s){t=i+2,n=e-s;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex]){if(this.delimiterIndex===this.delimiterOpen.length-1){let e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++}else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){let t=this.sequenceIndex===this.currentSequence.length;if(t?eH(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t){this.sequenceIndex++;return}}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||e$(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart<t){let e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}this.sectionStart=t+2,this.stateInClosingTagName(e),this.inRCDATA=!1;return}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence!==eq.TitleEnd&&(this.currentSequence!==eq.TextareaEnd||this.inSFCRoot)?this.fastForwardTo(60)&&(this.sequenceIndex=1):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.sequenceIndex=Number(60===e)}stateCDATASequence(e){e===eq.Cdata[this.sequenceIndex]?++this.sequenceIndex===eq.Cdata.length&&(this.state=28,this.currentSequence=eq.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){let t=this.buffer.charCodeAt(this.index);if(10===t&&this.newlines.push(this.index),t===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===eq.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,t){this.enterRCDATA(e,t),this.state=31}enterRCDATA(e,t){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=t}stateBeforeTagName(e){33===e?(this.state=22,this.sectionStart=this.index+1):63===e?(this.state=24,this.sectionStart=this.index+1):eB(e)?(this.sectionStart=this.index,0===this.mode?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:116===e?this.state=30:this.state=115===e?29:6):47===e?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){eH(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(eH(e)){let t=this.buffer.slice(this.sectionStart,this.index);"template"!==t&&this.enterRCDATA(eG("</"+t),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){e$(e)||(62===e?(this.state=1,this.sectionStart=this.index+1):(this.state=eB(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(62===e||e$(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){62===e&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){62===e?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):47===e?this.state=7:60===e&&47===this.peek()?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):e$(e)||this.handleAttrStart(e)}handleAttrStart(e){118===e&&45===this.peek()?(this.state=13,this.sectionStart=this.index):46===e||58===e||64===e||35===e?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){62===e?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):e$(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(61===e||eH(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){61===e||eH(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):58===e?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):46===e&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){61===e||eH(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):91===e?this.state=15:46===e&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){93===e?this.state=14:(61===e||eH(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){61===e||eH(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):46===e&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){61===e?this.state=18:47===e||62===e?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):e$(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){34===e?(this.state=19,this.sectionStart=this.index+1):39===e?(this.state=20,this.sectionStart=this.index+1):e$(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,t){(e===t||this.fastForwardTo(t))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(34===t?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){e$(e)||62===e?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):(39===e||60===e||61===e||96===e)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){91===e?(this.state=26,this.sequenceIndex=0):this.state=45===e?25:23}stateInDeclaration(e){(62===e||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(62===e||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){45===e?(this.state=28,this.currentSequence=eq.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(62===e||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){e===eq.ScriptEnd[3]?this.startSpecial(eq.ScriptEnd,4):e===eq.StyleEnd[3]?this.startSpecial(eq.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===eq.TitleEnd[3]?this.startSpecial(eq.TitleEnd,4):e===eq.TextareaEnd[3]?this.startSpecial(eq.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){let e=this.buffer.charCodeAt(this.index);switch(10===e&&this.newlines.push(this.index),this.state){case 1:this.stateText(e);break;case 2:this.stateInterpolationOpen(e);break;case 3:this.stateInterpolation(e);break;case 4:this.stateInterpolationClose(e);break;case 31:this.stateSpecialStartSequence(e);break;case 32:this.stateInRCDATA(e);break;case 26:this.stateCDATASequence(e);break;case 19:this.stateInAttrValueDoubleQuotes(e);break;case 12:this.stateInAttrName(e);break;case 13:this.stateInDirName(e);break;case 14:this.stateInDirArg(e);break;case 15:this.stateInDynamicDirArg(e);break;case 16:this.stateInDirModifier(e);break;case 28:this.stateInCommentLike(e);break;case 27:this.stateInSpecialComment(e);break;case 11:this.stateBeforeAttrName(e);break;case 6:this.stateInTagName(e);break;case 34:this.stateInSFCRootTagName(e);break;case 9:this.stateInClosingTagName(e);break;case 5:this.stateBeforeTagName(e);break;case 17:this.stateAfterAttrName(e);break;case 20:this.stateInAttrValueSingleQuotes(e);break;case 18:this.stateBeforeAttrValue(e);break;case 8:this.stateBeforeClosingTagName(e);break;case 10:this.stateAfterClosingTagName(e);break;case 29:this.stateBeforeSpecialS(e);break;case 30:this.stateBeforeSpecialT(e);break;case 21:this.stateInAttrValueNoQuotes(e);break;case 7:this.stateInSelfClosingTag(e);break;case 23:this.stateInDeclaration(e);break;case 22:this.stateBeforeDeclaration(e);break;case 25:this.stateBeforeComment(e);break;case 24:this.stateInProcessingInstruction(e);break;case 33:this.stateInEntity()}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(1===this.state||32===this.state&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(19===this.state||20===this.state||21===this.state)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){let e=this.buffer.length;this.sectionStart>=e||(28===this.state?this.currentSequence===eq.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(tY,{onerr:ns,ontext(e,t){t2(t1(e,t),e,t)},ontextentity(e,t,n){t2(e,t,n)},oninterpolation(e,t){if(tW)return t2(t1(e,t),e,t);let n=e+tQ.delimiterOpen.length,i=t-tQ.delimiterClose.length;for(;e$(tB.charCodeAt(n));)n++;for(;e$(tB.charCodeAt(i-1));)i--;let s=t1(n,i);s.includes("&")&&(s=tU.decodeEntities(s,!1)),ne({type:5,content:ni(s,!1,nt(n,i)),loc:nt(e,t)})},onopentagname(e,t){let n=t1(e,t);t$={type:1,tag:n,ns:tU.getNamespace(n,tY[0],tU.ns),tagType:0,props:[],children:[],loc:nt(e-1,t),codegenNode:void 0}},onopentagend(e){t0(e)},onclosetag(e,t){let n=t1(e,t);if(!tU.isVoidTag(n)){let i=!1;for(let e=0;e<tY.length;e++)if(tY[e].tag.toLowerCase()===n.toLowerCase()){i=!0,e>0&&tY[0].loc.start.offset;for(let n=0;n<=e;n++)t3(tY.shift(),t,n<e);break}i||t4(e,60)}},onselfclosingtag(e){let t=t$.tag;t$.isSelfClosing=!0,t0(e),tY[0]&&tY[0].tag===t&&t3(tY.shift(),e)},onattribname(e,t){tH={type:6,name:t1(e,t),nameLoc:nt(e,t),value:void 0,loc:nt(e)}},ondirname(e,t){let n=t1(e,t),i="."===n||":"===n?"bind":"@"===n?"on":"#"===n?"slot":n.slice(2);if(tW||""===i)tH={type:6,name:n,nameLoc:nt(e,t),value:void 0,loc:nt(e)};else if(tH={type:7,name:i,rawName:n,exp:void 0,arg:void 0,modifiers:"."===n?[ey("prop")]:[],loc:nt(e)},"pre"===i){tW=tQ.inVPre=!0,tK=t$;let e=t$.props;for(let t=0;t<e.length;t++)7===e[t].type&&(e[t]=function(e){let t={type:6,name:e.rawName,nameLoc:nt(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){let n=e.exp.loc;n.end.offset<e.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),t.value={type:2,content:e.exp.content,loc:n}}return t}(e[t]))}},ondirarg(e,t){if(e===t)return;let n=t1(e,t);if(tW)tH.name+=n,nn(tH.nameLoc,t);else{let i="["!==n[0];tH.arg=ni(i?n:n.slice(1,-1),i,nt(e,t),i?3:0)}},ondirmodifier(e,t){let n=t1(e,t);if(tW)tH.name+="."+n,nn(tH.nameLoc,t);else if("slot"===tH.name){let e=tH.arg;e&&(e.content+="."+n,nn(e.loc,t))}else{let i=ey(n,!0,nt(e,t));tH.modifiers.push(i)}},onattribdata(e,t){tG+=t1(e,t),tq<0&&(tq=e),tJ=t},onattribentity(e,t,n){tG+=e,tq<0&&(tq=t),tJ=n},onattribnameend(e){let t=t1(tH.loc.start.offset,e);7===tH.type&&(tH.rawName=t),t$.props.some(e=>(7===e.type?e.rawName:e.name)===t)},onattribend(e,t){if(t$&&tH){if(nn(tH.loc,t),0!==e){if(tG.includes("&")&&(tG=tU.decodeEntities(tG,!0)),6===tH.type)"class"===tH.name&&(tG=t8(tG).trim()),tH.value={type:2,content:tG,loc:1===e?nt(tq,tJ):nt(tq-1,tJ+1)},tQ.inSFCRoot&&"template"===t$.tag&&"lang"===tH.name&&tG&&"html"!==tG&&tQ.enterRCDATA(eG("</template"),0);else{tH.exp=ni(tG,!1,nt(tq,tJ),0,0),"for"===tH.name&&(tH.forParseResult=function(e){let t=e.loc,n=e.content,i=n.match(tX);if(!i)return;let[,s,r]=i,o=(e,n,i=!1)=>{let s=t.start.offset+n,r=s+e.length;return ni(e,!1,nt(s,r),0,i?1:0)},a={source:o(r.trim(),n.indexOf(r,s.length)),value:void 0,key:void 0,index:void 0,finalized:!1},l=s.trim().replace(tZ,"").trim(),c=s.indexOf(l),h=l.match(tz);if(h){let e;l=l.replace(tz,"").trim();let t=h[1].trim();if(t&&(e=n.indexOf(t,c+l.length),a.key=o(t,e,!0)),h[2]){let i=h[2].trim();i&&(a.index=o(i,n.indexOf(i,a.key?e+t.length:c+l.length),!0))}}return l&&(a.value=o(l,c,!0)),a}(tH.exp));let e=-1;"bind"===tH.name&&(e=tH.modifiers.findIndex(e=>"sync"===e.content))>-1&&eY("COMPILER_V_BIND_SYNC",tU,tH.loc,tH.rawName)&&(tH.name="model",tH.modifiers.splice(e,1))}}(7!==tH.type||"pre"!==tH.name)&&t$.props.push(tH)}tG="",tq=tJ=-1},oncomment(e,t){tU.comments&&ne({type:3,content:t1(e,t),loc:nt(e-4,t+3)})},onend(){let e=tB.length;for(let t=0;t<tY.length;t++)t3(tY[t],e-1),tY[t].loc.start.offset},oncdata(e,t){0!==tY[0].ns&&t2(t1(e,t),e,t)},onprocessinginstruction(e){(tY[0]?tY[0].ns:tU.ns)===0&&ns(21,e-1)}}),tz=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,tZ=/^\(|\)$/g;function t1(e,t){return tB.slice(e,t)}function t0(e){tQ.inSFCRoot&&(t$.innerLoc=nt(e+1,e+1)),ne(t$);let{tag:t,ns:n}=t$;0===n&&tU.isPreTag(t)&&tj++,tU.isVoidTag(t)?t3(t$,e):(tY.unshift(t$),(1===n||2===n)&&(tQ.inXML=!0)),t$=null}function t2(e,t,n){{let t=tY[0]&&tY[0].tag;"script"!==t&&"style"!==t&&e.includes("&")&&(e=tU.decodeEntities(e,!1))}let i=tY[0]||tF,s=i.children[i.children.length-1];s&&2===s.type?(s.content+=e,nn(s.loc,n)):i.children.push({type:2,content:e,loc:nt(t,n)})}function t3(e,t,n=!1){n?nn(e.loc,t4(t,60)):nn(e.loc,function(e,t){let n=e;for(;62!==tB.charCodeAt(n)&&n<tB.length-1;)n++;return n}(t,0)+1),tQ.inSFCRoot&&(e.children.length?e.innerLoc.end=o({},e.children[e.children.length-1].loc.end):e.innerLoc.end=o({},e.innerLoc.start),e.innerLoc.source=t1(e.innerLoc.start.offset,e.innerLoc.end.offset));let{tag:i,ns:s,children:r}=e;if(!tW&&("slot"===i?e.tagType=2:t5(e)?e.tagType=3:function({tag:e,props:t}){var n;if(tU.isCustomElement(e))return!1;if("component"===e||(n=e.charCodeAt(0))>64&&n<91||to(e)||tU.isBuiltInComponent&&tU.isBuiltInComponent(e)||tU.isNativeTag&&!tU.isNativeTag(e))return!0;for(let e=0;e<t.length;e++){let n=t[e];if(6===n.type){if("is"===n.name&&n.value&&(n.value.content.startsWith("vue:")||eY("COMPILER_IS_ON_ELEMENT",tU,n.loc)))return!0}else if("bind"===n.name&&tA(n.arg,"is")&&eY("COMPILER_IS_ON_ELEMENT",tU,n.loc))return!0}return!1}(e)&&(e.tagType=1)),tQ.inRCDATA||(e.children=t7(r)),0===s&&tU.isIgnoreNewlineTag(i)){let e=r[0];e&&2===e.type&&(e.content=e.content.replace(/^\r?\n/,""))}0===s&&tU.isPreTag(i)&&tj--,tK===e&&(tW=tQ.inVPre=!1,tK=null),tQ.inXML&&(tY[0]?tY[0].ns:tU.ns)===0&&(tQ.inXML=!1);{let t=e.props;if(!tQ.inSFCRoot&&eK("COMPILER_NATIVE_TEMPLATE",tU)&&"template"===e.tag&&!t5(e)){let t=tY[0]||tF,n=t.children.indexOf(e);t.children.splice(n,1,...e.children)}let n=t.find(e=>6===e.type&&"inline-template"===e.name);n&&eY("COMPILER_INLINE_TEMPLATE",tU,n.loc)&&e.children.length&&(n.value={type:2,content:t1(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:n.loc})}}function t4(e,t){let n=e;for(;tB.charCodeAt(n)!==t&&n>=0;)n--;return n}let t6=new Set(["if","else","else-if","for","slot"]);function t5({tag:e,props:t}){if("template"===e){for(let e=0;e<t.length;e++)if(7===t[e].type&&t6.has(t[e].name))return!0}return!1}let t9=/\r\n/g;function t7(e,t){let n="preserve"!==tU.whitespace,i=!1;for(let t=0;t<e.length;t++){let s=e[t];if(2===s.type){if(tj)s.content=s.content.replace(t9,"\n");else if(function(e){for(let t=0;t<e.length;t++)if(!e$(e.charCodeAt(t)))return!1;return!0}(s.content)){let r=e[t-1]&&e[t-1].type,o=e[t+1]&&e[t+1].type;!r||!o||n&&(3===r&&(3===o||1===o)||1===r&&(3===o||1===o&&function(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(10===n||13===n)return!0}return!1}(s.content)))?(i=!0,e[t]=null):s.content=" "}else n&&(s.content=t8(s.content))}}return i?e.filter(Boolean):e}function t8(e){let t="",n=!1;for(let i=0;i<e.length;i++)e$(e.charCodeAt(i))?n||(t+=" ",n=!0):(t+=e[i],n=!1);return t}function ne(e){(tY[0]||tF).children.push(e)}function nt(e,t){return{start:tQ.getPos(e),end:null==t?t:tQ.getPos(t),source:null==t?t:t1(e,t)}}function nn(e,t){e.end=tQ.getPos(t),e.source=t1(e.start.offset,t)}function ni(e,t=!1,n,i=0,s=0){return ey(e,t,n,i)}function ns(e,t,n){tU.onError(e1(e,nt(t,t)))}function nr(e,t){if(tQ.reset(),t$=null,tH=null,tG="",tq=-1,tJ=-1,tY.length=0,tB=e,tU=o({},tw),t){let e;for(e in t)null!=t[e]&&(tU[e]=t[e])}tQ.mode="html"===tU.parseMode?1:"sfc"===tU.parseMode?2:0,tQ.inXML=1===tU.ns||2===tU.ns;let n=t&&t.delimiters;n&&(tQ.delimiterOpen=eG(n[0]),tQ.delimiterClose=eG(n[1]));let i=tF=eS([],e);return tQ.parse(tB),i.loc=nt(0,e.length),i.children=t7(i.children),tF=null,i}function no(e,t){let{children:n}=e;return 1===n.length&&1===t.type&&!tx(t)}function na(e,t){let{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;let i=n.get(e);if(void 0!==i)return i;let s=e.codegenNode;if(13!==s.type||s.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag&&"math"!==e.tag)return 0;if(void 0!==s.patchFlag)return n.set(e,0),0;{let i=3,r=nc(e,t);if(0===r)return n.set(e,0),0;r<i&&(i=r);for(let s=0;s<e.children.length;s++){let r=na(e.children[s],t);if(0===r)return n.set(e,0),0;r<i&&(i=r)}if(i>1)for(let s=0;s<e.props.length;s++){let r=e.props[s];if(7===r.type&&"bind"===r.name&&r.exp){let s=na(r.exp,t);if(0===s)return n.set(e,0),0;s<i&&(i=s)}}if(s.isBlock){for(let t=0;t<e.props.length;t++)if(7===e.props[t].type)return n.set(e,0),0;t.removeHelper(L),t.removeHelper(eX(t.inSSR,s.isComponent)),s.isBlock=!1,t.helper(ek(t.inSSR,s.isComponent))}return n.set(e,i),i}case 2:case 3:return 3;case 9:case 11:case 10:default:return 0;case 5:case 12:return na(e.content,t);case 4:return e.constType;case 8:let r=3;for(let n=0;n<e.children.length;n++){let i=e.children[n];if(l(i)||c(i))continue;let s=na(i,t);if(0===s)return 0;s<r&&(r=s)}return r;case 20:return 2}}let nl=new Set([K,Y,Q,z]);function nc(e,t){let n=3,i=nh(e);if(i&&15===i.type){let{properties:e}=i;for(let i=0;i<e.length;i++){let s;let{key:r,value:o}=e[i],a=na(r,t);if(0===a)return a;if(a<n&&(n=a),0===(s=4===o.type?na(o,t):14===o.type?function e(t,n){if(14===t.type&&!l(t.callee)&&nl.has(t.callee)){let i=t.arguments[0];if(4===i.type)return na(i,n);if(14===i.type)return e(i,n)}return 0}(o,t):0))return s;s<n&&(n=s)}}return n}function nh(e){let t=e.codegenNode;if(13===t.type)return t.props}function np(e,{filename:t="",prefixIdentifiers:s=!1,hoistStatic:r=!1,hmr:o=!1,cacheHandlers:a=!1,nodeTransforms:c=[],directiveTransforms:h={},transformHoist:p=null,isBuiltInComponent:d=i,isCustomElement:u=i,expressionPlugins:f=[],scopeId:m=null,slotted:S=!0,ssr:g=!1,inSSR:T=!1,ssrCssVars:N="",bindingMetadata:I=n,inline:y=!1,isTS:O=!1,onError:A=ez,onWarn:C=eZ,compatConfig:b}){let R=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),v={filename:t,selfName:R&&_(E(R[1])),prefixIdentifiers:s,hoistStatic:r,hmr:o,cacheHandlers:a,nodeTransforms:c,directiveTransforms:h,transformHoist:p,isBuiltInComponent:d,isCustomElement:u,expressionPlugins:f,scopeId:m,slotted:S,ssr:g,inSSR:T,ssrCssVars:N,bindingMetadata:I,inline:y,isTS:O,onError:A,onWarn:C,compatConfig:b,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){let t=v.helpers.get(e)||0;return v.helpers.set(e,t+1),e},removeHelper(e){let t=v.helpers.get(e);if(t){let n=t-1;n?v.helpers.set(e,n):v.helpers.delete(e)}},helperString:e=>`_${ep[v.helper(e)]}`,replaceNode(e){v.parent.children[v.childIndex]=v.currentNode=e},removeNode(e){let t=v.parent.children,n=e?t.indexOf(e):v.currentNode?v.childIndex:-1;e&&e!==v.currentNode?v.childIndex>n&&(v.childIndex--,v.onNodeRemoved()):(v.currentNode=null,v.onNodeRemoved()),v.parent.children.splice(n,1)},onNodeRemoved:i,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){l(e)&&(e=ey(e)),v.hoists.push(e);let t=ey(`_hoisted_${v.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1,n=!1){let i=ev(v.cached.length,e,t,n);return v.cached.push(i),i}};return v.filters=new Set,v}function nd(e,t){let n=np(e,t);nu(e,n),t.hoistStatic&&!function e(t,n,i,s=!1,r=!1){let{children:o}=t,l=[];for(let n=0;n<o.length;n++){let a=o[n];if(1===a.type&&0===a.tagType){let e=s?0:na(a,i);if(e>0){if(e>=2){a.codegenNode.patchFlag=-1,l.push(a);continue}}else{let e=a.codegenNode;if(13===e.type){let t=e.patchFlag;if((void 0===t||512===t||1===t)&&nc(a,i)>=2){let t=nh(a);t&&(e.props=i.hoist(t))}e.dynamicProps&&(e.dynamicProps=i.hoist(e.dynamicProps))}}}else if(12===a.type&&(s?0:na(a,i))>=2){l.push(a);continue}if(1===a.type){let n=1===a.tagType;n&&i.scopes.vSlot++,e(a,t,i,!1,r),n&&i.scopes.vSlot--}else if(11===a.type)e(a,t,i,1===a.children.length,!0);else if(9===a.type)for(let n=0;n<a.branches.length;n++)e(a.branches[n],t,i,1===a.branches[n].children.length,r)}let c=!1;if(l.length===o.length&&1===t.type){if(0===t.tagType&&t.codegenNode&&13===t.codegenNode.type&&a(t.codegenNode.children))t.codegenNode.children=h(eT(t.codegenNode.children)),c=!0;else if(1===t.tagType&&t.codegenNode&&13===t.codegenNode.type&&t.codegenNode.children&&!a(t.codegenNode.children)&&15===t.codegenNode.children.type){let e=p(t.codegenNode,"default");e&&(e.returns=h(eT(e.returns)),c=!0)}else if(3===t.tagType&&n&&1===n.type&&1===n.tagType&&n.codegenNode&&13===n.codegenNode.type&&n.codegenNode.children&&!a(n.codegenNode.children)&&15===n.codegenNode.children.type){let e=ty(t,"slot",!0),i=e&&e.arg&&p(n.codegenNode,e.arg);i&&(i.returns=h(eT(i.returns)),c=!0)}}if(!c)for(let e of l)e.codegenNode=i.cache(e.codegenNode);function h(e){let t=i.cache(e);return r&&i.hmr&&(t.needArraySpread=!0),t}function p(e,t){if(e.children&&!a(e.children)&&15===e.children.type){let n=e.children.properties.find(e=>e.key===t||e.key.content===t);return n&&n.value}}l.length&&i.transformHoist&&i.transformHoist(o,i,t)}(e,void 0,n,no(e,e.children[0])),t.ssr||function(e,t){let{helper:n}=t,{children:i}=e;if(1===i.length){let n=i[0];if(no(e,n)&&n.codegenNode){let i=n.codegenNode;13===i.type&&ew(i,t),e.codegenNode=i}else e.codegenNode=n}else i.length>1&&(e.codegenNode=eg(t,n(C),void 0,e.children,64,void 0,void 0,!0,void 0,!1))}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function nu(e,t){t.currentNode=e;let{nodeTransforms:n}=t,i=[];for(let s=0;s<n.length;s++){let r=n[s](e,t);if(r&&(a(r)?i.push(...r):i.push(r)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(k);break;case 5:t.ssr||t.helper(j);break;case 9:for(let n=0;n<e.branches.length;n++)nu(e.branches[n],t);break;case 10:case 11:case 1:case 0:!function(e,t){let n=0,i=()=>{n--};for(;n<e.children.length;n++){let s=e.children[n];l(s)||(t.grandParent=t.parent,t.parent=e,t.childIndex=n,t.onNodeRemoved=i,nu(s,t))}}(e,t)}t.currentNode=e;let s=i.length;for(;s--;)i[s]()}function nf(e,t){let n=l(e)?t=>t===e:t=>e.test(t);return(e,i)=>{if(1===e.type){let{props:s}=e;if(3===e.tagType&&s.some(tR))return;let r=[];for(let o=0;o<s.length;o++){let a=s[o];if(7===a.type&&n(a.name)){s.splice(o,1),o--;let n=t(e,a,i);n&&r.push(n)}}return r}}}let nE="/*@__PURE__*/",n_=e=>`${ep[e]}: _${ep[e]}`;function nm(e,t={}){let n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:i=!1,filename:s="template.vue.html",scopeId:r=null,optimizeImports:o=!1,runtimeGlobalName:a="Vue",runtimeModuleName:l="vue",ssrRuntimeModuleName:c="vue/server-renderer",ssr:h=!1,isTS:p=!1,inSSR:d=!1}){let u={mode:t,prefixIdentifiers:n,sourceMap:i,filename:s,scopeId:r,optimizeImports:o,runtimeGlobalName:a,runtimeModuleName:l,ssrRuntimeModuleName:c,ssr:h,isTS:p,inSSR:d,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${ep[e]}`,push(e,t=-2,n){u.code+=e},indent(){f(++u.indentLevel)},deindent(e=!1){e?--u.indentLevel:f(--u.indentLevel)},newline(){f(u.indentLevel)}};function f(e){u.push("\n"+" ".repeat(e),0)}return u}(e,t);t.onContextCreated&&t.onContextCreated(n);let{mode:i,push:s,prefixIdentifiers:r,indent:o,deindent:a,newline:l,scopeId:c,ssr:h}=n,p=Array.from(e.helpers),d=p.length>0,u=!r&&"module"!==i;!function(e,t){let{ssr:n,prefixIdentifiers:i,push:s,newline:r,runtimeModuleName:o,runtimeGlobalName:a,ssrRuntimeModuleName:l}=t,c=Array.from(e.helpers);if(c.length>0&&(s(`const _Vue = ${a} +`,-1),e.hoists.length)){let e=[D,V,k,X,w].filter(e=>c.includes(e)).map(n_).join(", ");s(`const { ${e} } = _Vue +`,-1)}(function(e,t){if(!e.length)return;t.pure=!0;let{push:n,newline:i}=t;i();for(let s=0;s<e.length;s++){let r=e[s];r&&(n(`const _hoisted_${s+1} = `),nN(r,t),i())}t.pure=!1})(e.hoists,t),r(),s("return ")}(e,n);let f=(h?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(s(`function ${h?"ssrRender":"render"}(${f}) {`),o(),u&&(s("with (_ctx) {"),o(),d&&(s(`const { ${p.map(n_).join(", ")} } = _Vue +`,-1),l())),e.components.length&&(nS(e.components,"component",n),(e.directives.length||e.temps>0)&&l()),e.directives.length&&(nS(e.directives,"directive",n),e.temps>0&&l()),e.filters&&e.filters.length&&(l(),nS(e.filters,"filter",n),l()),e.temps>0){s("let ");for(let t=0;t<e.temps;t++)s(`${t>0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(s(` +`,0),l()),h||s("return "),e.codegenNode?nN(e.codegenNode,n):s("null"),u&&(a(),s("}")),a(),s("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function nS(e,t,{helper:n,push:i,newline:s,isTS:r}){let o=n("filter"===t?$:"component"===t?U:B);for(let n=0;n<e.length;n++){let a=e[n],l=a.endsWith("__self");l&&(a=a.slice(0,-6)),i(`const ${tD(a,t)} = ${o}(${JSON.stringify(a)}${l?", true":""})${r?"!":""}`),n<e.length-1&&s()}}function ng(e,t){let n=e.length>3;t.push("["),n&&t.indent(),nT(e,t,n),n&&t.deindent(),t.push("]")}function nT(e,t,n=!1,i=!0){let{push:s,newline:r}=t;for(let o=0;o<e.length;o++){let c=e[o];l(c)?s(c,-3):a(c)?ng(c,t):nN(c,t),o<e.length-1&&(n?(i&&s(","),r()):i&&s(", "))}}function nN(e,t){if(l(e)){t.push(e,-3);return}if(c(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:case 12:nN(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),-3,e)}(e,t);break;case 4:nI(e,t);break;case 5:!function(e,t){let{push:n,helper:i,pure:s}=t;s&&n(nE),n(`${i(j)}(`),nN(e.content,t),n(")")}(e,t);break;case 8:ny(e,t);break;case 3:!function(e,t){let{push:n,helper:i,pure:s}=t;s&&n(nE),n(`${i(k)}(${JSON.stringify(e.content)})`,-3,e)}(e,t);break;case 13:!function(e,t){let n;let{push:i,helper:s,pure:r}=t,{tag:o,props:a,children:l,patchFlag:c,dynamicProps:h,directives:p,isBlock:d,disableTracking:u,isComponent:f}=e;c&&(n=String(c)),p&&i(s(H)+"("),d&&i(`(${s(L)}(${u?"true":""}), `),r&&i(nE),i(s(d?eX(t.inSSR,f):ek(t.inSSR,f))+"(",-2,e),nT(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map(e=>e||"null")}([o,a,l,n,h]),t),i(")"),d&&i(")"),p&&(i(", "),nN(p,t),i(")"))}(e,t);break;case 14:!function(e,t){let{push:n,helper:i,pure:s}=t,r=l(e.callee)?e.callee:i(e.callee);s&&n(nE),n(r+"(",-2,e),nT(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){let{push:n,indent:i,deindent:s,newline:r}=t,{properties:o}=e;if(!o.length){n("{}",-2,e);return}let a=o.length>1;n(a?"{":"{ "),a&&i();for(let e=0;e<o.length;e++){let{key:i,value:s}=o[e];!function(e,t){let{push:n}=t;8===e.type?(n("["),ny(e,t),n("]")):e.isStatic?n(tl(e.content)?e.content:JSON.stringify(e.content),-2,e):n(`[${e.content}]`,-3,e)}(i,t),n(": "),nN(s,t),e<o.length-1&&(n(","),r())}a&&s(),n(a?"}":" }")}(e,t);break;case 17:ng(e.elements,t);break;case 18:!function(e,t){let{push:n,indent:i,deindent:s}=t,{params:r,returns:o,body:l,newline:c,isSlot:h}=e;h&&n(`_${ep[eo]}(`),n("(",-2,e),a(r)?nT(r,t):r&&nN(r,t),n(") => "),(c||l)&&(n("{"),i()),o?(c&&n("return "),a(o)?ng(o,t):nN(o,t)):l&&nN(l,t),(c||l)&&(s(),n("}")),h&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){let{test:n,consequent:i,alternate:s,newline:r}=e,{push:o,indent:a,deindent:l,newline:c}=t;if(4===n.type){let e=!tl(n.content);e&&o("("),nI(n,t),e&&o(")")}else o("("),nN(n,t),o(")");r&&a(),t.indentLevel++,r||o(" "),o("? "),nN(i,t),t.indentLevel--,r&&c(),r||o(" "),o(": ");let h=19===s.type;!h&&t.indentLevel++,nN(s,t),!h&&t.indentLevel--,r&&l(!0)}(e,t);break;case 20:!function(e,t){let{push:n,helper:i,indent:s,deindent:r,newline:o}=t,{needPauseTracking:a,needArraySpread:l}=e;l&&n("[...("),n(`_cache[${e.index}] || (`),a&&(s(),n(`${i(ei)}(-1`),e.inVOnce&&n(", true"),n("),"),o(),n("(")),n(`_cache[${e.index}] = `),nN(e.value,t),a&&(n(`).cacheIndex = ${e.index},`),o(),n(`${i(ei)}(1),`),o(),n(`_cache[${e.index}]`),r()),n(")"),l&&n(")]")}(e,t);break;case 21:nT(e.body,t,!0,!1)}}function nI(e,t){let{content:n,isStatic:i}=e;t.push(i?JSON.stringify(n):n,-3,e)}function ny(e,t){for(let n=0;n<e.children.length;n++){let i=e.children[n];l(i)?t.push(i,-3):nN(i,t)}}let nO=(e,t)=>{if(5===e.type)e.content=nA(e.content,t);else if(1===e.type){let n=ty(e,"memo");for(let i=0;i<e.props.length;i++){let s=e.props[i];if(7===s.type&&"for"!==s.name){let e=s.exp,i=s.arg;!e||4!==e.type||"on"===s.name&&i||n&&i&&4===i.type&&"key"===i.content||(s.exp=nA(e,t,"slot"===s.name)),i&&4===i.type&&!i.isStatic&&(s.arg=nA(i,t))}}}};function nA(e,t,n=!1,i=!1,s=Object.create(t.identifiers)){return e}function nC(e){return l(e)?e:4===e.type?e.content:e.children.map(nC).join("")}let nb=nf(/^(if|else|else-if)$/,(e,t,n)=>nR(e,t,n,(e,t,i)=>{let s=n.parent.children,r=s.indexOf(e),o=0;for(;r-- >=0;){let e=s[r];e&&9===e.type&&(o+=e.branches.length)}return()=>{i?e.codegenNode=nx(t,o,n):function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode).alternate=nx(t,o+e.branches.length-1,n)}}));function nR(e,t,n,i){if("else"!==t.name&&(!t.exp||!t.exp.content.trim())){let i=t.exp?t.exp.loc:e.loc;n.onError(e1(28,t.loc)),t.exp=ey("true",!1,i)}if("if"===t.name){var s;let r=nv(e,t),o={type:9,loc:nt((s=e.loc).start.offset,s.end.offset),branches:[r]};if(n.replaceNode(o),i)return i(o,r,!0)}else{let s=n.parent.children,r=s.indexOf(e);for(;r-- >=-1;){let o=s[r];if(o&&3===o.type||o&&2===o.type&&!o.content.trim().length){n.removeNode(o);continue}if(o&&9===o.type){"else-if"===t.name&&void 0===o.branches[o.branches.length-1].condition&&n.onError(e1(30,e.loc)),n.removeNode();let s=nv(e,t);o.branches.push(s);let r=i&&i(o,s,!1);nu(s,n),r&&r(),n.currentNode=null}else n.onError(e1(30,e.loc));break}}}function nv(e,t){let n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!ty(e,"for")?e.children:[e],userKey:tO(e,"key"),isTemplateIf:n}}function nx(e,t,n){return e.condition?eR(e.condition,nL(e,t,n),eC(n.helper(k),['""',"true"])):nL(e,t,n)}function nL(e,t,n){let{helper:i}=n,s=eI("key",ey(`${t}`,!1,em,2)),{children:r}=e,o=r[0];if(1!==r.length||1!==o.type){if(1!==r.length||11!==o.type)return eg(n,i(C),eN([s]),r,64,void 0,void 0,!0,!1,!1,e.loc);{let e=o.codegenNode;return tM(e,s,n),e}}{let e=o.codegenNode,t=tk(e);return 13===t.type&&ew(t,n),tM(t,s,n),e}}let nM=(e,t,n)=>{let{modifiers:i,loc:s}=e,r=e.arg,{exp:o}=e;if(o&&4===o.type&&!o.content.trim()&&(o=void 0),!o){if(4!==r.type||!r.isStatic)return n.onError(e1(52,r.loc)),{props:[eI(r,ey("",!0,s))]};nP(e),o=e.exp}return 4!==r.type?(r.children.unshift("("),r.children.push(') || ""')):r.isStatic||(r.content=`${r.content} || ""`),i.some(e=>"camel"===e.content)&&(4===r.type?r.isStatic?r.content=E(r.content):r.content=`${n.helperString(ee)}(${r.content})`:(r.children.unshift(`${n.helperString(ee)}(`),r.children.push(")"))),!n.inSSR&&(i.some(e=>"prop"===e.content)&&nD(r,"."),i.some(e=>"attr"===e.content)&&nD(r,"^")),{props:[eI(r,o)]}},nP=(e,t)=>{let n=e.arg,i=E(n.content);e.exp=ey(i,!1,n.loc)},nD=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},nV=nf("for",(e,t,n)=>{let{helper:i,removeHelper:s}=n;return nk(e,t,n,t=>{let r=eC(i(G),[t.source]),o=tv(e),a=ty(e,"memo"),l=tO(e,"key",!1,!0);l&&7===l.type&&!l.exp&&nP(l);let c=l&&(6===l.type?l.value?ey(l.value.content,!0):void 0:l.exp),h=l&&c?eI("key",c):null,p=4===t.source.type&&t.source.constType>0,d=p?64:l?128:256;return t.codegenNode=eg(n,i(C),void 0,r,d,void 0,void 0,!0,!p,!1,e.loc),()=>{let l;let{children:d}=t,u=1!==d.length||1!==d[0].type,f=tx(e)?e:o&&1===e.children.length&&tx(e.children[0])?e.children[0]:null;if(f?(l=f.codegenNode,o&&h&&tM(l,h,n)):u?l=eg(n,i(C),h?eN([h]):void 0,e.children,64,void 0,void 0,!0,void 0,!1):(l=d[0].codegenNode,o&&h&&tM(l,h,n),!p!==l.isBlock&&(l.isBlock?(s(L),s(eX(n.inSSR,l.isComponent))):s(ek(n.inSSR,l.isComponent))),l.isBlock=!p,l.isBlock?(i(L),i(eX(n.inSSR,l.isComponent))):i(ek(n.inSSR,l.isComponent))),a){let e=eb(nw(t.parseResult,[ey("_cached")]));e.body=ex([eA(["const _memo = (",a.exp,")"]),eA(["if (_cached",...c?[" && _cached.key === ",c]:[],` && ${n.helperString(eh)}(_cached, _memo)) return _cached`]),eA(["const _item = ",l]),ey("_item.memo = _memo"),ey("return _item")]),r.arguments.push(e,ey("_cache"),ey(String(n.cached.length))),n.cached.push(null)}else r.arguments.push(eb(nw(t.parseResult),l,!0))}})});function nk(e,t,n,i){if(!t.exp){n.onError(e1(31,t.loc));return}let s=t.forParseResult;if(!s){n.onError(e1(32,t.loc));return}nX(s);let{addIdentifiers:r,removeIdentifiers:o,scopes:a}=n,{source:l,value:c,key:h,index:p}=s,d={type:11,loc:t.loc,source:l,valueAlias:c,keyAlias:h,objectIndexAlias:p,parseResult:s,children:tv(e)?e.children:[e]};n.replaceNode(d),a.vFor++;let u=i&&i(d);return()=>{a.vFor--,u&&u()}}function nX(e,t){e.finalized||(e.finalized=!0)}function nw({value:e,key:t,index:n},i=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((e,t)=>e||ey("_".repeat(t+1),!1))}([e,t,n,...i])}let nU=ey("undefined",!1),nF=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){let n=ty(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},nB=(e,t)=>{let n;if(tv(e)&&e.props.some(tR)&&(n=ty(e,"for"))){let e=n.forParseResult;if(e){nX(e);let{value:n,key:i,index:s}=e,{addIdentifiers:r,removeIdentifiers:o}=t;return n&&r(n),i&&r(i),s&&r(s),()=>{n&&o(n),i&&o(i),s&&o(s)}}}},n$=(e,t,n,i)=>eb(e,n,!1,!0,n.length?n[0].loc:i);function nH(e,t,n=n$){t.helper(eo);let{children:i,loc:s}=e,r=[],o=[],a=t.scopes.vSlot>0||t.scopes.vFor>0,l=ty(e,"slot",!0);if(l){let{arg:e,exp:t}=l;e&&!tr(e)&&(a=!0),r.push(eI(e||ey("default",!0),n(t,void 0,i,s)))}let c=!1,h=!1,p=[],d=new Set,u=0;for(let e=0;e<i.length;e++){let s,f,E,_;let m=i[e];if(!tv(m)||!(s=ty(m,"slot",!0))){3!==m.type&&p.push(m);continue}if(l){t.onError(e1(37,s.loc));break}c=!0;let{children:S,loc:g}=m,{arg:T=ey("default",!0),exp:N,loc:I}=s;tr(T)?f=T?T.content:"default":a=!0;let y=ty(m,"for"),O=n(N,y,S,g);if(E=ty(m,"if"))a=!0,o.push(eR(E.exp,nG(T,O,u++),nU));else if(_=ty(m,/^else(-if)?$/,!0)){let n,s=e;for(;s--&&3===(n=i[s]).type;);if(n&&tv(n)&&ty(n,/^(else-)?if$/)){let e=o[o.length-1];for(;19===e.alternate.type;)e=e.alternate;e.alternate=_.exp?eR(_.exp,nG(T,O,u++),nU):nG(T,O,u++)}else t.onError(e1(30,_.loc))}else if(y){a=!0;let e=y.forParseResult;e?(nX(e),o.push(eC(t.helper(G),[e.source,eb(nw(e),nG(T,O),!0)]))):t.onError(e1(32,y.loc))}else{if(f){if(d.has(f)){t.onError(e1(38,I));continue}d.add(f),"default"===f&&(h=!0)}r.push(eI(T,O))}}if(!l){let e=(e,i)=>{let r=n(e,void 0,i,s);return t.compatConfig&&(r.isNonScopedSlot=!0),eI("default",r)};c?p.length&&p.some(e=>(function e(t){return 2!==t.type&&12!==t.type||(2===t.type?!!t.content.trim():e(t.content))})(e))&&(h?t.onError(e1(39,p[0].loc)):r.push(e(void 0,p))):r.push(e(void 0,i))}let f=a?2:!function e(t){for(let n=0;n<t.length;n++){let i=t[n];switch(i.type){case 1:if(2===i.tagType||e(i.children))return!0;break;case 9:if(e(i.branches))return!0;break;case 10:case 11:if(e(i.children))return!0}}return!1}(e.children)?1:3,E=eN(r.concat(eI("_",ey(f+"",!1))),s);return o.length&&(E=eC(t.helper(J),[E,eT(o)])),{slots:E,hasDynamicSlots:a}}function nG(e,t,n){let i=[eI("name",e),eI("fn",t)];return null!=n&&i.push(eI("key",ey(String(n),!0))),eN(i)}let nq=new WeakMap,nJ=(e,t)=>function(){let n,i,s,r,o;if(!(1===(e=t.currentNode).type&&(0===e.tagType||1===e.tagType)))return;let{tag:a,props:l}=e,c=1===e.tagType,p=c?nj(e,t):`"${a}"`,d=h(p)&&p.callee===F,u=0,f=d||p===b||p===R||!c&&("svg"===a||"foreignObject"===a||"math"===a);if(l.length>0){let i=nW(e,t,void 0,c,d);n=i.props,u=i.patchFlag,r=i.dynamicPropNames;let s=i.directives;o=s&&s.length?eT(s.map(e=>nY(e,t))):void 0,i.shouldUseBlock&&(f=!0)}if(e.children.length>0){if(p===v&&(f=!0,u|=1024),c&&p!==b&&p!==v){let{slots:n,hasDynamicSlots:s}=nH(e,t);i=n,s&&(u|=1024)}else if(1===e.children.length&&p!==b){let n=e.children[0],s=n.type,r=5===s||8===s;r&&0===na(n,t)&&(u|=1),i=r||2===s?n:e.children}else i=e.children}r&&r.length&&(s=function(e){let t="[";for(let n=0,i=e.length;n<i;n++)t+=JSON.stringify(e[n]),n<i-1&&(t+=", ");return t+"]"}(r)),e.codegenNode=eg(t,p,n,i,0===u?void 0:u,s,o,!!f,!1,c,e.loc)};function nj(e,t,n=!1){let{tag:i}=e,s=nQ(i),r=tO(e,"is",!1,!0);if(r){if(s||eK("COMPILER_IS_ON_ELEMENT",t)){let e;if(6===r.type?e=r.value&&ey(r.value.content,!0):(e=r.exp)||(e=ey("is",!1,r.arg.loc)),e)return eC(t.helper(F),[e])}else 6===r.type&&r.value.content.startsWith("vue:")&&(i=r.value.content.slice(4))}let o=to(i)||t.isBuiltInComponent(i);return o?(n||t.helper(o),o):(t.helper(U),t.components.add(i),tD(i,"component"))}function nW(e,t,n=e.props,i,s,o=!1){let a;let{tag:l,loc:h,children:u}=e,f=[],E=[],_=[],m=u.length>0,S=!1,g=0,T=!1,N=!1,I=!1,y=!1,O=!1,A=!1,C=[],b=e=>{f.length&&(E.push(eN(nK(f),h)),f=[]),e&&E.push(e)},R=()=>{t.scopes.vFor>0&&f.push(eI(ey("ref_for",!0),ey("true")))},v=({key:e,value:n})=>{if(tr(e)){let o=e.content,a=r(o);a&&(!i||s)&&"onclick"!==o.toLowerCase()&&"onUpdate:modelValue"!==o&&!p(o)&&(y=!0),a&&p(o)&&(A=!0),a&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&na(n,t)>0||("ref"===o?T=!0:"class"===o?N=!0:"style"===o?I=!0:"key"===o||C.includes(o)||C.push(o),i&&("class"===o||"style"===o)&&!C.includes(o)&&C.push(o))}else O=!0};for(let s=0;s<n.length;s++){let r=n[s];if(6===r.type){let{loc:e,name:n,nameLoc:i,value:s}=r;if("ref"===n&&(T=!0,R()),"is"===n&&(nQ(l)||s&&s.content.startsWith("vue:")||eK("COMPILER_IS_ON_ELEMENT",t)))continue;f.push(eI(ey(n,!0,i),ey(s?s.content:"",!0,s?s.loc:e)))}else{let{name:n,arg:s,exp:a,loc:p,modifiers:u}=r,T="bind"===n,N="on"===n;if("slot"===n){i||t.onError(e1(40,p));continue}if("once"===n||"memo"===n||"is"===n||T&&tA(s,"is")&&(nQ(l)||eK("COMPILER_IS_ON_ELEMENT",t))||N&&o)continue;if((T&&tA(s,"key")||N&&m&&tA(s,"vue:before-update"))&&(S=!0),T&&tA(s,"ref")&&R(),!s&&(T||N)){if(O=!0,a){if(T){if(R(),b(),eK("COMPILER_V_BIND_OBJECT_ORDER",t)){E.unshift(a);continue}E.push(a)}else b({type:14,loc:p,callee:t.helper(Z),arguments:i?[a]:[a,"true"]})}else t.onError(e1(T?34:35,p));continue}T&&u.some(e=>"prop"===e.content)&&(g|=32);let I=t.directiveTransforms[n];if(I){let{props:n,needRuntime:i}=I(r,e,t);o||n.forEach(v),N&&s&&!tr(s)?b(eN(n,h)):f.push(...n),i&&(_.push(r),c(i)&&nq.set(r,i))}else!d(n)&&(_.push(r),m&&(S=!0))}}if(E.length?(b(),a=E.length>1?eC(t.helper(W),E,h):E[0]):f.length&&(a=eN(nK(f),h)),O?g|=16:(N&&!i&&(g|=2),I&&!i&&(g|=4),C.length&&(g|=8),y&&(g|=32)),!S&&(0===g||32===g)&&(T||A||_.length>0)&&(g|=512),!t.inSSR&&a)switch(a.type){case 15:let x=-1,L=-1,M=!1;for(let e=0;e<a.properties.length;e++){let t=a.properties[e].key;tr(t)?"class"===t.content?x=e:"style"===t.content&&(L=e):t.isHandlerKey||(M=!0)}let P=a.properties[x],D=a.properties[L];M?a=eC(t.helper(Q),[a]):(P&&!tr(P.value)&&(P.value=eC(t.helper(K),[P.value])),D&&(I||4===D.value.type&&"["===D.value.content.trim()[0]||17===D.value.type)&&(D.value=eC(t.helper(Y),[D.value])));break;case 14:break;default:a=eC(t.helper(Q),[eC(t.helper(z),[a])])}return{props:a,directives:_,patchFlag:g,dynamicPropNames:C,shouldUseBlock:S}}function nK(e){let t=new Map,n=[];for(let i=0;i<e.length;i++){let s=e[i];if(8===s.key.type||!s.key.isStatic){n.push(s);continue}let o=s.key.content,a=t.get(o);a?("style"===o||"class"===o||r(o))&&(17===a.value.type?a.value.elements.push(s.value):a.value=eT([a.value,s.value],a.loc)):(t.set(o,s),n.push(s))}return n}function nY(e,t){let n=[],i=nq.get(e);i?n.push(t.helperString(i)):(t.helper(B),t.directives.add(e.name),n.push(tD(e.name,"directive")));let{loc:s}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));let t=ey("true",!1,s);n.push(eN(e.modifiers.map(e=>eI(e,t)),s))}return eT(n,e.loc)}function nQ(e){return"component"===e||"Component"===e}let nz=(e,t)=>{if(tx(e)){let{children:n,loc:i}=e,{slotName:s,slotProps:r}=nZ(e,t),o=[t.prefixIdentifiers?"_ctx.$slots":"$slots",s,"{}","undefined","true"],a=2;r&&(o[2]=r,a=3),n.length&&(o[3]=eb([],n,!1,!1,i),a=4),t.scopeId&&!t.slotted&&(a=5),o.splice(a),e.codegenNode=eC(t.helper(q),o,i)}};function nZ(e,t){let n,i='"default"',s=[];for(let t=0;t<e.props.length;t++){let n=e.props[t];if(6===n.type)n.value&&("name"===n.name?i=JSON.stringify(n.value.content):(n.name=E(n.name),s.push(n)));else if("bind"===n.name&&tA(n.arg,"name")){if(n.exp)i=n.exp;else if(n.arg&&4===n.arg.type){let e=E(n.arg.content);i=n.exp=ey(e,!1,n.arg.loc)}}else"bind"===n.name&&n.arg&&tr(n.arg)&&(n.arg.content=E(n.arg.content)),s.push(n)}if(s.length>0){let{props:i,directives:r}=nW(e,t,s,!1,!1);n=i,r.length&&t.onError(e1(36,r[0].loc))}return{slotName:i,slotProps:n}}let n1=(e,t,n,i)=>{let s;let{loc:r,modifiers:o,arg:a}=e;if(e.exp||o.length,4===a.type){if(a.isStatic){let e=a.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`),s=ey(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?m(E(e)):`on:${e}`,!0,a.loc)}else s=eA([`${n.helperString(en)}(`,a,")"])}else(s=a).children.unshift(`${n.helperString(en)}(`),s.children.push(")");let l=e.exp;l&&!l.content.trim()&&(l=void 0);let c=n.cacheHandlers&&!l&&!n.inVOnce;if(l){let e=tE(l),t=!(e||tg(l)),n=l.content.includes(";");(t||c&&e)&&(l=eA([`${t?"$event":"(...args)"} => ${n?"{":"("}`,l,n?"}":")"]))}let h={props:[eI(s,l||ey("() => {}",!1,r))]};return i&&(h=i(h)),c&&(h.props[0].value=n.cache(h.props[0].value)),h.props.forEach(e=>e.key.isHandlerKey=!0),h},n0=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{let n;let i=e.children,s=!1;for(let e=0;e<i.length;e++){let t=i[e];if(tb(t)){s=!0;for(let s=e+1;s<i.length;s++){let r=i[s];if(tb(r))n||(n=i[e]=eA([t],t.loc)),n.children.push(" + ",r),i.splice(s,1),s--;else{n=void 0;break}}}}if(s&&(1!==i.length||0!==e.type&&(1!==e.type||0!==e.tagType||e.props.find(e=>7===e.type&&!t.directiveTransforms[e.name])||"template"===e.tag)))for(let e=0;e<i.length;e++){let n=i[e];if(tb(n)||8===n.type){let s=[];(2!==n.type||" "!==n.content)&&s.push(n),t.ssr||0!==na(n,t)||s.push("1"),i[e]={type:12,content:n,loc:n.loc,codegenNode:eC(t.helper(X),s)}}}}},n2=new WeakSet,n3=(e,t)=>{if(1===e.type&&ty(e,"once",!0)&&!n2.has(e)&&!t.inVOnce&&!t.inSSR)return n2.add(e),t.inVOnce=!0,t.helper(ei),()=>{t.inVOnce=!1;let e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0,!0))}},n4=(e,t,n)=>{let i;let{exp:s,arg:r}=e;if(!s)return n.onError(e1(41,e.loc)),n6();let o=s.loc.source.trim(),a=4===s.type?s.content:o,l=n.bindingMetadata[o];if("props"===l||"props-aliased"===l)return s.loc,n6();if(!a.trim()||!tE(s))return n.onError(e1(42,s.loc)),n6();let c=r||ey("modelValue",!0),h=r?tr(r)?`onUpdate:${E(r.content)}`:eA(['"onUpdate:" + ',r]):"onUpdate:modelValue",p=n.isTS?"($event: any)":"$event";i=eA([`${p} => ((`,s,") = $event)"]);let d=[eI(c,e.exp),eI(h,i)];if(e.modifiers.length&&1===t.tagType){let t=e.modifiers.map(e=>e.content).map(e=>(tl(e)?e:JSON.stringify(e))+": true").join(", "),n=r?tr(r)?`${r.content}Modifiers`:eA([r,' + "Modifiers"']):"modelModifiers";d.push(eI(n,ey(`{ ${t} }`,!1,e.loc,2)))}return n6(d)};function n6(e=[]){return{props:e}}let n5=/[\w).+\-_$\]]/,n9=(e,t)=>{eK("COMPILER_FILTERS",t)&&(5===e.type?n7(e.content,t):1===e.type&&e.props.forEach(e=>{7===e.type&&"for"!==e.name&&e.exp&&n7(e.exp,t)}))};function n7(e,t){if(4===e.type)n8(e,t);else for(let n=0;n<e.children.length;n++){let i=e.children[n];"object"==typeof i&&(4===i.type?n8(i,t):8===i.type?n7(e,t):5===i.type&&n7(i.content,t))}}function n8(e,t){let n=e.content,i=!1,s=!1,r=!1,o=!1,a=0,l=0,c=0,h=0,p,d,u,f,E=[];for(u=0;u<n.length;u++)if(d=p,p=n.charCodeAt(u),i)39===p&&92!==d&&(i=!1);else if(s)34===p&&92!==d&&(s=!1);else if(r)96===p&&92!==d&&(r=!1);else if(o)47===p&&92!==d&&(o=!1);else if(124!==p||124===n.charCodeAt(u+1)||124===n.charCodeAt(u-1)||a||l||c){switch(p){case 34:s=!0;break;case 39:i=!0;break;case 96:r=!0;break;case 40:c++;break;case 41:c--;break;case 91:l++;break;case 93:l--;break;case 123:a++;break;case 125:a--}if(47===p){let e,t=u-1;for(;t>=0&&" "===(e=n.charAt(t));t--);e&&n5.test(e)||(o=!0)}}else void 0===f?(h=u+1,f=n.slice(0,u).trim()):_();function _(){E.push(n.slice(h,u).trim()),h=u+1}if(void 0===f?f=n.slice(0,u).trim():0!==h&&_(),E.length){for(u=0;u<E.length;u++)f=function(e,t,n){n.helper($);let i=t.indexOf("(");if(i<0)return n.filters.add(t),`${tD(t,"filter")}(${e})`;{let s=t.slice(0,i),r=t.slice(i+1);return n.filters.add(s),`${tD(s,"filter")}(${e}${")"!==r?","+r:r}`}}(f,E[u],t);e.content=f,e.ast=void 0}}let ie=new WeakSet,it=(e,t)=>{if(1===e.type){let n=ty(e,"memo");if(!(!n||ie.has(e)))return ie.add(e),()=>{let i=e.codegenNode||t.currentNode.codegenNode;i&&13===i.type&&(1!==e.tagType&&ew(i,t),e.codegenNode=eC(t.helper(ec),[n.exp,eb(void 0,i),"_cache",String(t.cached.length)]),t.cached.push(null))}}};function ii(e){return[[n3,nb,it,nV,n9,nz,nJ,nF,n0],{on:n1,bind:nM,model:n4}]}function is(e,t={}){let n=t.onError||ez,i="module"===t.mode;!0===t.prefixIdentifiers?n(e1(47)):i&&n(e1(48)),t.cacheHandlers&&n(e1(49)),t.scopeId&&!i&&n(e1(50));let s=o({},t,{prefixIdentifiers:!1}),r=l(e)?nr(e,s):e,[a,c]=ii();return nd(r,o({},s,{nodeTransforms:[...a,...t.nodeTransforms||[]],directiveTransforms:o({},c,t.directiveTransforms||{})})),nm(r,s)}let ir={DATA:"data",PROPS:"props",PROPS_ALIASED:"props-aliased",SETUP_LET:"setup-let",SETUP_CONST:"setup-const",SETUP_REACTIVE_CONST:"setup-reactive-const",SETUP_MAYBE_REF:"setup-maybe-ref",SETUP_REF:"setup-ref",OPTIONS:"options",LITERAL_CONST:"literal-const"},io=()=>({props:[]}),ia=Symbol(""),il=Symbol(""),ic=Symbol(""),ih=Symbol(""),ip=Symbol(""),id=Symbol(""),iu=Symbol(""),iE=Symbol(""),i_=Symbol(""),im=Symbol("");ed({[ia]:"vModelRadio",[il]:"vModelCheckbox",[ic]:"vModelText",[ih]:"vModelSelect",[ip]:"vModelDynamic",[id]:"withModifiers",[iu]:"withKeys",[iE]:"vShow",[i_]:"Transition",[im]:"TransitionGroup"});let iS={parseMode:"html",isVoidTag:A,isNativeTag:e=>I(e)||y(e)||O(e),isPreTag:e=>"pre"===e,isIgnoreNewlineTag:e=>"pre"===e||"textarea"===e,decodeEntities:function(t,n=!1){return(e||(e=document.createElement("div")),n)?(e.innerHTML=`<div foo="${t.replace(/"/g,""")}">`,e.children[0].getAttribute("foo")):(e.innerHTML=t,e.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?i_:"TransitionGroup"===e||"transition-group"===e?im:void 0,getNamespace(e,t,n){let i=t?t.ns:n;if(t&&2===i){if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some(e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content))&&(i=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(i=0)}else t&&1===i&&("foreignObject"===t.tag||"desc"===t.tag||"title"===t.tag)&&(i=0);if(0===i){if("svg"===e)return 1;if("math"===e)return 2}return i}},ig=e=>{1===e.type&&e.props.forEach((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:ey("style",!0,t.loc),exp:iT(t.value.content,t.loc),modifiers:[],loc:t.loc})})},iT=(e,t)=>ey(JSON.stringify(function(e){let t={};return e.replace(N,"").split(g).forEach(e=>{if(e){let n=e.split(T);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}(e)),!1,t,3);function iN(e,t){return e1(e,t)}let iI={X_V_HTML_NO_EXPRESSION:53,53:"X_V_HTML_NO_EXPRESSION",X_V_HTML_WITH_CHILDREN:54,54:"X_V_HTML_WITH_CHILDREN",X_V_TEXT_NO_EXPRESSION:55,55:"X_V_TEXT_NO_EXPRESSION",X_V_TEXT_WITH_CHILDREN:56,56:"X_V_TEXT_WITH_CHILDREN",X_V_MODEL_ON_INVALID_ELEMENT:57,57:"X_V_MODEL_ON_INVALID_ELEMENT",X_V_MODEL_ARG_ON_ELEMENT:58,58:"X_V_MODEL_ARG_ON_ELEMENT",X_V_MODEL_ON_FILE_INPUT_ELEMENT:59,59:"X_V_MODEL_ON_FILE_INPUT_ELEMENT",X_V_MODEL_UNNECESSARY_VALUE:60,60:"X_V_MODEL_UNNECESSARY_VALUE",X_V_SHOW_NO_EXPRESSION:61,61:"X_V_SHOW_NO_EXPRESSION",X_TRANSITION_INVALID_CHILDREN:62,62:"X_TRANSITION_INVALID_CHILDREN",X_IGNORED_SIDE_EFFECT_TAG:63,63:"X_IGNORED_SIDE_EFFECT_TAG",__EXTEND_POINT__:64,64:"__EXTEND_POINT__"},iy={53:"v-html is missing expression.",54:"v-html will override element children.",55:"v-text is missing expression.",56:"v-text will override element children.",57:"v-model can only be used on <input>, <textarea> and <select> elements.",58:"v-model argument is not supported on plain elements.",59:"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",60:"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",61:"v-show is missing expression.",62:"<Transition> expects exactly one child element or component.",63:"Tags with side effect (<script> and <style>) are ignored in client component templates."},iO=t("passive,once,capture"),iA=t("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),iC=t("left,right"),ib=t("onkeyup,onkeydown,onkeypress"),iR=(e,t,n,i)=>{let s=[],r=[],o=[];for(let i=0;i<t.length;i++){let a=t[i].content;"native"===a&&eY("COMPILER_V_ON_NATIVE",n)?o.push(a):iO(a)?o.push(a):iC(a)?tr(e)?ib(e.content.toLowerCase())?s.push(a):r.push(a):(s.push(a),r.push(a)):iA(a)?r.push(a):s.push(a)}return{keyModifiers:s,nonKeyModifiers:r,eventOptionModifiers:o}},iv=(e,t)=>tr(e)&&"onclick"===e.content.toLowerCase()?ey(t,!0):4!==e.type?eA(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,ix=(e,t)=>{1===e.type&&0===e.tagType&&("script"===e.tag||"style"===e.tag)&&t.removeNode()},iL=[ig],iM={cloak:io,html:(e,t,n)=>{let{exp:i,loc:s}=e;return i||n.onError(iN(53,s)),t.children.length&&(n.onError(iN(54,s)),t.children.length=0),{props:[eI(ey("innerHTML",!0,s),i||ey("",!0))]}},text:(e,t,n)=>{let{exp:i,loc:s}=e;return i||n.onError(iN(55,s)),t.children.length&&(n.onError(iN(56,s)),t.children.length=0),{props:[eI(ey("textContent",!0),i?na(i,n)>0?i:eC(n.helperString(j),[i],s):ey("",!0))]}},model:(e,t,n)=>{let i=n4(e,t,n);if(!i.props.length||1===t.tagType)return i;e.arg&&n.onError(iN(58,e.arg.loc));let{tag:s}=t,r=n.isCustomElement(s);if("input"===s||"textarea"===s||"select"===s||r){let o=ic,a=!1;if("input"===s||r){let i=tO(t,"type");if(i){if(7===i.type)o=ip;else if(i.value)switch(i.value.content){case"radio":o=ia;break;case"checkbox":o=il;break;case"file":a=!0,n.onError(iN(59,e.loc))}}else tC(t)&&(o=ip)}else"select"===s&&(o=ih);a||(i.needRuntime=n.helper(o))}else n.onError(iN(57,e.loc));return i.props=i.props.filter(e=>!(4===e.key.type&&"modelValue"===e.key.content)),i},on:(e,t,n)=>n1(e,t,n,t=>{let{modifiers:i}=e;if(!i.length)return t;let{key:s,value:r}=t.props[0],{keyModifiers:o,nonKeyModifiers:a,eventOptionModifiers:l}=iR(s,i,n,e.loc);if(a.includes("right")&&(s=iv(s,"onContextmenu")),a.includes("middle")&&(s=iv(s,"onMouseup")),a.length&&(r=eC(n.helper(id),[r,JSON.stringify(a)])),o.length&&(!tr(s)||ib(s.content.toLowerCase()))&&(r=eC(n.helper(iu),[r,JSON.stringify(o)])),l.length){let e=l.map(_).join("");s=tr(s)?ey(`${s.content}${e}`,!0):eA(["(",s,`) + "${e}"`])}return{props:[eI(s,r)]}}),show:(e,t,n)=>{let{exp:i,loc:s}=e;return i||n.onError(iN(61,s)),{props:[],needRuntime:n.helper(iE)}}};function iP(e,t={}){return is(e,o({},iS,t,{nodeTransforms:[ix,...iL,...t.nodeTransforms||[]],directiveTransforms:o({},iM,t.directiveTransforms||{}),transformHoist:null}))}function iD(e,t={}){return nr(e,o({},iS,t))}export{x as BASE_TRANSITION,ir as BindingTypes,ee as CAMELIZE,et as CAPITALIZE,M as CREATE_BLOCK,k as CREATE_COMMENT,P as CREATE_ELEMENT_BLOCK,V as CREATE_ELEMENT_VNODE,J as CREATE_SLOTS,w as CREATE_STATIC,X as CREATE_TEXT,D as CREATE_VNODE,eJ as CompilerDeprecationTypes,e_ as ConstantTypes,iM as DOMDirectiveTransforms,iI as DOMErrorCodes,iy as DOMErrorMessages,iL as DOMNodeTransforms,eE as ElementTypes,e0 as ErrorCodes,C as FRAGMENT,z as GUARD_REACTIVE_PROPS,eh as IS_MEMO_SAME,el as IS_REF,v as KEEP_ALIVE,W as MERGE_PROPS,K as NORMALIZE_CLASS,Q as NORMALIZE_PROPS,Y as NORMALIZE_STYLE,eu as Namespaces,ef as NodeTypes,L as OPEN_BLOCK,er as POP_SCOPE_ID,es as PUSH_SCOPE_ID,G as RENDER_LIST,q as RENDER_SLOT,U as RESOLVE_COMPONENT,B as RESOLVE_DIRECTIVE,F as RESOLVE_DYNAMIC_COMPONENT,$ as RESOLVE_FILTER,ei as SET_BLOCK_TRACKING,R as SUSPENSE,b as TELEPORT,j as TO_DISPLAY_STRING,Z as TO_HANDLERS,en as TO_HANDLER_KEY,i_ as TRANSITION,im as TRANSITION_GROUP,ti as TS_NODE_TYPES,ea as UNREF,il as V_MODEL_CHECKBOX,ip as V_MODEL_DYNAMIC,ia as V_MODEL_RADIO,ih as V_MODEL_SELECT,ic as V_MODEL_TEXT,iu as V_ON_WITH_KEYS,id as V_ON_WITH_MODIFIERS,iE as V_SHOW,eo as WITH_CTX,H as WITH_DIRECTIVES,ec as WITH_MEMO,tT as advancePositionWithClone,tN as advancePositionWithMutation,tI as assert,is as baseCompile,nr as baseParse,nY as buildDirectiveArgs,nW as buildProps,nH as buildSlots,eY as checkCompatEnabled,iP as compile,ew as convertToBlock,eT as createArrayExpression,eP as createAssignmentExpression,ex as createBlockStatement,ev as createCacheExpression,eC as createCallExpression,e1 as createCompilerError,eA as createCompoundExpression,eR as createConditionalExpression,iN as createDOMCompilerError,nw as createForLoopParams,eb as createFunctionExpression,eM as createIfStatement,eO as createInterpolation,eN as createObjectExpression,eI as createObjectProperty,eV as createReturnStatement,eS as createRoot,eD as createSequenceExpression,ey as createSimpleExpression,nf as createStructuralDirectiveTransform,eL as createTemplateLiteral,np as createTransformContext,eg as createVNodeCall,e2 as errorMessages,e8 as extractIdentifiers,ty as findDir,tO as findProp,tX as forAliasRE,nm as generate,S as generateCodeFrame,ii as getBaseTransformPreset,na as getConstantType,tk as getMemoedVNodeCall,eX as getVNodeBlockHelper,ek as getVNodeHelper,tC as hasDynamicKeyVBind,tV as hasScopeRef,ep as helperNameMap,tM as injectProp,to as isCoreComponent,tg as isFnExpression,tm as isFnExpressionBrowser,tS as isFnExpressionNode,te as isFunctionType,e6 as isInDestructureAssignment,e5 as isInNewExpression,tE as isMemberExpression,tu as isMemberExpressionBrowser,tf as isMemberExpressionNode,e4 as isReferencedIdentifier,tl as isSimpleIdentifier,tx as isSlotOutlet,tA as isStaticArgOf,tr as isStaticExp,tt as isStaticProperty,tn as isStaticPropertyKey,tv as isTemplateNode,tb as isText,tR as isVSlot,em as locStub,io as noopDirectiveTransform,iD as parse,iS as parserOptions,nA as processExpression,nk as processFor,nR as processIf,nZ as processSlotOutlet,ed as registerRuntimeHelpers,nj as resolveComponentType,nC as stringifyExpression,tD as toValidAssetId,nF as trackSlotScopes,nB as trackVForSlotScopes,nd as transform,nM as transformBind,nJ as transformElement,nO as transformExpression,n4 as transformModel,n1 as transformOn,ig as transformStyle,nu as traverseNode,ts as unwrapTSNode,e7 as walkBlockDeclarations,e9 as walkFunctionParams,e3 as walkIdentifiers,eQ as warnDeprecation}; diff --git a/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js b/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js new file mode 100644 index 0000000..a6fe625 --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js @@ -0,0 +1,687 @@ +/** +* @vue/compiler-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +import { registerRuntimeHelpers, createSimpleExpression, createCompilerError, createObjectProperty, getConstantType, createCallExpression, TO_DISPLAY_STRING, transformModel as transformModel$1, findProp, hasDynamicKeyVBind, findDir, isStaticArgOf, transformOn as transformOn$1, isStaticExp, createCompoundExpression, checkCompatEnabled, noopDirectiveTransform, baseCompile, baseParse } from '@vue/compiler-core'; +export * from '@vue/compiler-core'; +import { isVoidTag, isHTMLTag, isSVGTag, isMathMLTag, parseStringStyle, capitalize, makeMap, extend } from '@vue/shared'; + +const V_MODEL_RADIO = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelRadio` : ``); +const V_MODEL_CHECKBOX = Symbol( + !!(process.env.NODE_ENV !== "production") ? `vModelCheckbox` : `` +); +const V_MODEL_TEXT = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelText` : ``); +const V_MODEL_SELECT = Symbol( + !!(process.env.NODE_ENV !== "production") ? `vModelSelect` : `` +); +const V_MODEL_DYNAMIC = Symbol( + !!(process.env.NODE_ENV !== "production") ? `vModelDynamic` : `` +); +const V_ON_WITH_MODIFIERS = Symbol( + !!(process.env.NODE_ENV !== "production") ? `vOnModifiersGuard` : `` +); +const V_ON_WITH_KEYS = Symbol( + !!(process.env.NODE_ENV !== "production") ? `vOnKeysGuard` : `` +); +const V_SHOW = Symbol(!!(process.env.NODE_ENV !== "production") ? `vShow` : ``); +const TRANSITION = Symbol(!!(process.env.NODE_ENV !== "production") ? `Transition` : ``); +const TRANSITION_GROUP = Symbol( + !!(process.env.NODE_ENV !== "production") ? `TransitionGroup` : `` +); +registerRuntimeHelpers({ + [V_MODEL_RADIO]: `vModelRadio`, + [V_MODEL_CHECKBOX]: `vModelCheckbox`, + [V_MODEL_TEXT]: `vModelText`, + [V_MODEL_SELECT]: `vModelSelect`, + [V_MODEL_DYNAMIC]: `vModelDynamic`, + [V_ON_WITH_MODIFIERS]: `withModifiers`, + [V_ON_WITH_KEYS]: `withKeys`, + [V_SHOW]: `vShow`, + [TRANSITION]: `Transition`, + [TRANSITION_GROUP]: `TransitionGroup` +}); + +let decoder; +function decodeHtmlBrowser(raw, asAttr = false) { + if (!decoder) { + decoder = document.createElement("div"); + } + if (asAttr) { + decoder.innerHTML = `<div foo="${raw.replace(/"/g, """)}">`; + return decoder.children[0].getAttribute("foo"); + } else { + decoder.innerHTML = raw; + return decoder.textContent; + } +} + +const parserOptions = { + parseMode: "html", + isVoidTag, + isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + isPreTag: (tag) => tag === "pre", + isIgnoreNewlineTag: (tag) => tag === "pre" || tag === "textarea", + decodeEntities: decodeHtmlBrowser , + isBuiltInComponent: (tag) => { + if (tag === "Transition" || tag === "transition") { + return TRANSITION; + } else if (tag === "TransitionGroup" || tag === "transition-group") { + return TRANSITION_GROUP; + } + }, + // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher + getNamespace(tag, parent, rootNamespace) { + let ns = parent ? parent.ns : rootNamespace; + if (parent && ns === 2) { + if (parent.tag === "annotation-xml") { + if (tag === "svg") { + return 1; + } + if (parent.props.some( + (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") + )) { + ns = 0; + } + } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { + ns = 0; + } + } else if (parent && ns === 1) { + if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { + ns = 0; + } + } + if (ns === 0) { + if (tag === "svg") { + return 1; + } + if (tag === "math") { + return 2; + } + } + return ns; + } +}; + +const transformStyle = (node) => { + if (node.type === 1) { + node.props.forEach((p, i) => { + if (p.type === 6 && p.name === "style" && p.value) { + node.props[i] = { + type: 7, + name: `bind`, + arg: createSimpleExpression(`style`, true, p.loc), + exp: parseInlineCSS(p.value.content, p.loc), + modifiers: [], + loc: p.loc + }; + } + }); + } +}; +const parseInlineCSS = (cssText, loc) => { + const normalized = parseStringStyle(cssText); + return createSimpleExpression( + JSON.stringify(normalized), + false, + loc, + 3 + ); +}; + +function createDOMCompilerError(code, loc) { + return createCompilerError( + code, + loc, + !!(process.env.NODE_ENV !== "production") || false ? DOMErrorMessages : void 0 + ); +} +const DOMErrorCodes = { + "X_V_HTML_NO_EXPRESSION": 53, + "53": "X_V_HTML_NO_EXPRESSION", + "X_V_HTML_WITH_CHILDREN": 54, + "54": "X_V_HTML_WITH_CHILDREN", + "X_V_TEXT_NO_EXPRESSION": 55, + "55": "X_V_TEXT_NO_EXPRESSION", + "X_V_TEXT_WITH_CHILDREN": 56, + "56": "X_V_TEXT_WITH_CHILDREN", + "X_V_MODEL_ON_INVALID_ELEMENT": 57, + "57": "X_V_MODEL_ON_INVALID_ELEMENT", + "X_V_MODEL_ARG_ON_ELEMENT": 58, + "58": "X_V_MODEL_ARG_ON_ELEMENT", + "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59, + "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", + "X_V_MODEL_UNNECESSARY_VALUE": 60, + "60": "X_V_MODEL_UNNECESSARY_VALUE", + "X_V_SHOW_NO_EXPRESSION": 61, + "61": "X_V_SHOW_NO_EXPRESSION", + "X_TRANSITION_INVALID_CHILDREN": 62, + "62": "X_TRANSITION_INVALID_CHILDREN", + "X_IGNORED_SIDE_EFFECT_TAG": 63, + "63": "X_IGNORED_SIDE_EFFECT_TAG", + "__EXTEND_POINT__": 64, + "64": "__EXTEND_POINT__" +}; +const DOMErrorMessages = { + [53]: `v-html is missing expression.`, + [54]: `v-html will override element children.`, + [55]: `v-text is missing expression.`, + [56]: `v-text will override element children.`, + [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, + [58]: `v-model argument is not supported on plain elements.`, + [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, + [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, + [61]: `v-show is missing expression.`, + [62]: `<Transition> expects exactly one child element or component.`, + [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` +}; + +const transformVHtml = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(53, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(54, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`innerHTML`, true, loc), + exp || createSimpleExpression("", true) + ) + ] + }; +}; + +const transformVText = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(55, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(56, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`textContent`, true), + exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression( + context.helperString(TO_DISPLAY_STRING), + [exp], + loc + ) : createSimpleExpression("", true) + ) + ] + }; +}; + +const transformModel = (dir, node, context) => { + const baseResult = transformModel$1(dir, node, context); + if (!baseResult.props.length || node.tagType === 1) { + return baseResult; + } + if (dir.arg) { + context.onError( + createDOMCompilerError( + 58, + dir.arg.loc + ) + ); + } + function checkDuplicatedValue() { + const value = findDir(node, "bind"); + if (value && isStaticArgOf(value.arg, "value")) { + context.onError( + createDOMCompilerError( + 60, + value.loc + ) + ); + } + } + const { tag } = node; + const isCustomElement = context.isCustomElement(tag); + if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { + let directiveToUse = V_MODEL_TEXT; + let isInvalidType = false; + if (tag === "input" || isCustomElement) { + const type = findProp(node, `type`); + if (type) { + if (type.type === 7) { + directiveToUse = V_MODEL_DYNAMIC; + } else if (type.value) { + switch (type.value.content) { + case "radio": + directiveToUse = V_MODEL_RADIO; + break; + case "checkbox": + directiveToUse = V_MODEL_CHECKBOX; + break; + case "file": + isInvalidType = true; + context.onError( + createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + default: + !!(process.env.NODE_ENV !== "production") && checkDuplicatedValue(); + break; + } + } + } else if (hasDynamicKeyVBind(node)) { + directiveToUse = V_MODEL_DYNAMIC; + } else { + !!(process.env.NODE_ENV !== "production") && checkDuplicatedValue(); + } + } else if (tag === "select") { + directiveToUse = V_MODEL_SELECT; + } else { + !!(process.env.NODE_ENV !== "production") && checkDuplicatedValue(); + } + if (!isInvalidType) { + baseResult.needRuntime = context.helper(directiveToUse); + } + } else { + context.onError( + createDOMCompilerError( + 57, + dir.loc + ) + ); + } + baseResult.props = baseResult.props.filter( + (p) => !(p.key.type === 4 && p.key.content === "modelValue") + ); + return baseResult; +}; + +const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`); +const isNonKeyModifier = /* @__PURE__ */ makeMap( + // event propagation management + `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` +); +const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right"); +const isKeyboardEvent = /* @__PURE__ */ makeMap(`onkeyup,onkeydown,onkeypress`); +const resolveModifiers = (key, modifiers, context, loc) => { + const keyModifiers = []; + const nonKeyModifiers = []; + const eventOptionModifiers = []; + for (let i = 0; i < modifiers.length; i++) { + const modifier = modifiers[i].content; + if (modifier === "native" && checkCompatEnabled( + "COMPILER_V_ON_NATIVE", + context, + loc + )) { + eventOptionModifiers.push(modifier); + } else if (isEventOptionModifier(modifier)) { + eventOptionModifiers.push(modifier); + } else { + if (maybeKeyModifier(modifier)) { + if (isStaticExp(key)) { + if (isKeyboardEvent(key.content.toLowerCase())) { + keyModifiers.push(modifier); + } else { + nonKeyModifiers.push(modifier); + } + } else { + keyModifiers.push(modifier); + nonKeyModifiers.push(modifier); + } + } else { + if (isNonKeyModifier(modifier)) { + nonKeyModifiers.push(modifier); + } else { + keyModifiers.push(modifier); + } + } + } + } + return { + keyModifiers, + nonKeyModifiers, + eventOptionModifiers + }; +}; +const transformClick = (key, event) => { + const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick"; + return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([ + `(`, + key, + `) === "onClick" ? "${event}" : (`, + key, + `)` + ]) : key; +}; +const transformOn = (dir, node, context) => { + return transformOn$1(dir, node, context, (baseResult) => { + const { modifiers } = dir; + if (!modifiers.length) return baseResult; + let { key, value: handlerExp } = baseResult.props[0]; + const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); + if (nonKeyModifiers.includes("right")) { + key = transformClick(key, `onContextmenu`); + } + if (nonKeyModifiers.includes("middle")) { + key = transformClick(key, `onMouseup`); + } + if (nonKeyModifiers.length) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ + handlerExp, + JSON.stringify(nonKeyModifiers) + ]); + } + if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard + (!isStaticExp(key) || isKeyboardEvent(key.content.toLowerCase()))) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ + handlerExp, + JSON.stringify(keyModifiers) + ]); + } + if (eventOptionModifiers.length) { + const modifierPostfix = eventOptionModifiers.map(capitalize).join(""); + key = isStaticExp(key) ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); + } + return { + props: [createObjectProperty(key, handlerExp)] + }; + }); +}; + +const transformShow = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(61, loc) + ); + } + return { + props: [], + needRuntime: context.helper(V_SHOW) + }; +}; + +const transformTransition = (node, context) => { + if (node.type === 1 && node.tagType === 1) { + const component = context.isBuiltInComponent(node.tag); + if (component === TRANSITION) { + return () => { + if (!node.children.length) { + return; + } + if (hasMultipleChildren(node)) { + context.onError( + createDOMCompilerError( + 62, + { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + } + ) + ); + } + const child = node.children[0]; + if (child.type === 1) { + for (const p of child.props) { + if (p.type === 7 && p.name === "show") { + node.props.push({ + type: 6, + name: "persisted", + nameLoc: node.loc, + value: void 0, + loc: node.loc + }); + } + } + } + }; + } + } +}; +function hasMultipleChildren(node) { + const children = node.children = node.children.filter( + (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()) + ); + const child = children[0]; + return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren); +} + +const ignoreSideEffectTags = (node, context) => { + if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { + !!(process.env.NODE_ENV !== "production") && context.onError( + createDOMCompilerError( + 63, + node.loc + ) + ); + context.removeNode(); + } +}; + +function isValidHTMLNesting(parent, child) { + if (parent in onlyValidChildren) { + return onlyValidChildren[parent].has(child); + } + if (child in onlyValidParents) { + return onlyValidParents[child].has(parent); + } + if (parent in knownInvalidChildren) { + if (knownInvalidChildren[parent].has(child)) return false; + } + if (child in knownInvalidParents) { + if (knownInvalidParents[child].has(parent)) return false; + } + return true; +} +const headings = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]); +const emptySet = /* @__PURE__ */ new Set([]); +const onlyValidChildren = { + head: /* @__PURE__ */ new Set([ + "base", + "basefront", + "bgsound", + "link", + "meta", + "title", + "noscript", + "noframes", + "style", + "script", + "template" + ]), + optgroup: /* @__PURE__ */ new Set(["option"]), + select: /* @__PURE__ */ new Set(["optgroup", "option", "hr"]), + // table + table: /* @__PURE__ */ new Set(["caption", "colgroup", "tbody", "tfoot", "thead"]), + tr: /* @__PURE__ */ new Set(["td", "th"]), + colgroup: /* @__PURE__ */ new Set(["col"]), + tbody: /* @__PURE__ */ new Set(["tr"]), + thead: /* @__PURE__ */ new Set(["tr"]), + tfoot: /* @__PURE__ */ new Set(["tr"]), + // these elements can not have any children elements + script: emptySet, + iframe: emptySet, + option: emptySet, + textarea: emptySet, + style: emptySet, + title: emptySet +}; +const onlyValidParents = { + // sections + html: emptySet, + body: /* @__PURE__ */ new Set(["html"]), + head: /* @__PURE__ */ new Set(["html"]), + // table + td: /* @__PURE__ */ new Set(["tr"]), + colgroup: /* @__PURE__ */ new Set(["table"]), + caption: /* @__PURE__ */ new Set(["table"]), + tbody: /* @__PURE__ */ new Set(["table"]), + tfoot: /* @__PURE__ */ new Set(["table"]), + col: /* @__PURE__ */ new Set(["colgroup"]), + th: /* @__PURE__ */ new Set(["tr"]), + thead: /* @__PURE__ */ new Set(["table"]), + tr: /* @__PURE__ */ new Set(["tbody", "thead", "tfoot"]), + // data list + dd: /* @__PURE__ */ new Set(["dl", "div"]), + dt: /* @__PURE__ */ new Set(["dl", "div"]), + // other + figcaption: /* @__PURE__ */ new Set(["figure"]), + // li: new Set(["ul", "ol"]), + summary: /* @__PURE__ */ new Set(["details"]), + area: /* @__PURE__ */ new Set(["map"]) +}; +const knownInvalidChildren = { + p: /* @__PURE__ */ new Set([ + "address", + "article", + "aside", + "blockquote", + "center", + "details", + "dialog", + "dir", + "div", + "dl", + "fieldset", + "figure", + "footer", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "header", + "hgroup", + "hr", + "li", + "main", + "nav", + "menu", + "ol", + "p", + "pre", + "section", + "table", + "ul" + ]), + svg: /* @__PURE__ */ new Set([ + "b", + "blockquote", + "br", + "code", + "dd", + "div", + "dl", + "dt", + "em", + "embed", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "hr", + "i", + "img", + "li", + "menu", + "meta", + "ol", + "p", + "pre", + "ruby", + "s", + "small", + "span", + "strong", + "sub", + "sup", + "table", + "u", + "ul", + "var" + ]) +}; +const knownInvalidParents = { + a: /* @__PURE__ */ new Set(["a"]), + button: /* @__PURE__ */ new Set(["button"]), + dd: /* @__PURE__ */ new Set(["dd", "dt"]), + dt: /* @__PURE__ */ new Set(["dd", "dt"]), + form: /* @__PURE__ */ new Set(["form"]), + li: /* @__PURE__ */ new Set(["li"]), + h1: headings, + h2: headings, + h3: headings, + h4: headings, + h5: headings, + h6: headings +}; + +const validateHtmlNesting = (node, context) => { + if (node.type === 1 && node.tagType === 0 && context.parent && context.parent.type === 1 && context.parent.tagType === 0 && !isValidHTMLNesting(context.parent.tag, node.tag)) { + const error = new SyntaxError( + `<${node.tag}> cannot be child of <${context.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.` + ); + error.loc = node.loc; + context.onWarn(error); + } +}; + +const DOMNodeTransforms = [ + transformStyle, + ...!!(process.env.NODE_ENV !== "production") ? [transformTransition, validateHtmlNesting] : [] +]; +const DOMDirectiveTransforms = { + cloak: noopDirectiveTransform, + html: transformVHtml, + text: transformVText, + model: transformModel, + // override compiler-core + on: transformOn, + // override compiler-core + show: transformShow +}; +function compile(src, options = {}) { + return baseCompile( + src, + extend({}, parserOptions, options, { + nodeTransforms: [ + // ignore <script> and <tag> + // this is not put inside DOMNodeTransforms because that list is used + // by compiler-ssr to generate vnode fallback branches + ignoreSideEffectTags, + ...DOMNodeTransforms, + ...options.nodeTransforms || [] + ], + directiveTransforms: extend( + {}, + DOMDirectiveTransforms, + options.directiveTransforms || {} + ), + transformHoist: null + }) + ); +} +function parse(template, options = {}) { + return baseParse(template, extend({}, parserOptions, options)); +} + +export { DOMDirectiveTransforms, DOMErrorCodes, DOMErrorMessages, DOMNodeTransforms, TRANSITION, TRANSITION_GROUP, V_MODEL_CHECKBOX, V_MODEL_DYNAMIC, V_MODEL_RADIO, V_MODEL_SELECT, V_MODEL_TEXT, V_ON_WITH_KEYS, V_ON_WITH_MODIFIERS, V_SHOW, compile, createDOMCompilerError, parse, parserOptions, transformStyle }; diff --git a/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.global.js b/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.global.js new file mode 100644 index 0000000..8537569 --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.global.js @@ -0,0 +1,6761 @@ +/** +* @vue/compiler-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +var VueCompilerDOM = (function (exports) { + 'use strict'; + + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function makeMap(str) { + const map = /* @__PURE__ */ Object.create(null); + for (const key of str.split(",")) map[key] = 1; + return (val) => val in map; + } + + const EMPTY_OBJ = Object.freeze({}) ; + const NOOP = () => { + }; + const NO = () => false; + const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter + (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); + const extend = Object.assign; + const isArray = Array.isArray; + const isString = (val) => typeof val === "string"; + const isSymbol = (val) => typeof val === "symbol"; + const isObject = (val) => val !== null && typeof val === "object"; + const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" + ); + const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" + ); + const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; + }; + const camelizeRE = /-(\w)/g; + const camelize = cacheStringFunction( + (str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); + } + ); + const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); + }); + const toHandlerKey = cacheStringFunction( + (str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + } + ); + + const PatchFlagNames = { + [1]: `TEXT`, + [2]: `CLASS`, + [4]: `STYLE`, + [8]: `PROPS`, + [16]: `FULL_PROPS`, + [32]: `NEED_HYDRATION`, + [64]: `STABLE_FRAGMENT`, + [128]: `KEYED_FRAGMENT`, + [256]: `UNKEYED_FRAGMENT`, + [512]: `NEED_PATCH`, + [1024]: `DYNAMIC_SLOTS`, + [2048]: `DEV_ROOT_FRAGMENT`, + [-1]: `HOISTED`, + [-2]: `BAIL` + }; + + const slotFlagsText = { + [1]: "STABLE", + [2]: "DYNAMIC", + [3]: "FORWARDED" + }; + + const range = 2; + function generateCodeFrame(source, start = 0, end = source.length) { + start = Math.max(0, Math.min(start, source.length)); + end = Math.max(0, Math.min(end, source.length)); + if (start > end) return ""; + let lines = source.split(/(\r?\n)/); + const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); + lines = lines.filter((_, idx) => idx % 2 === 0); + let count = 0; + const res = []; + for (let i = 0; i < lines.length; i++) { + count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); + if (count >= start) { + for (let j = i - range; j <= i + range || end > count; j++) { + if (j < 0 || j >= lines.length) continue; + const line = j + 1; + res.push( + `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` + ); + const lineLength = lines[j].length; + const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; + if (j === i) { + const pad = start - (count - (lineLength + newLineSeqLength)); + const length = Math.max( + 1, + end > count ? lineLength - pad : end - start + ); + res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); + } else if (j > i) { + if (end > count) { + const length = Math.max(Math.min(end - count, lineLength), 1); + res.push(` | ` + "^".repeat(length)); + } + count += lineLength + newLineSeqLength; + } + } + break; + } + } + return res.join("\n"); + } + + const listDelimiterRE = /;(?![^(]*\))/g; + const propertyDelimiterRE = /:([^]+)/; + const styleCommentRE = /\/\*[^]*?\*\//g; + function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; + } + + const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; + const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; + const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; + const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; + const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); + const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); + const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); + const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); + + const FRAGMENT = Symbol(`Fragment` ); + const TELEPORT = Symbol(`Teleport` ); + const SUSPENSE = Symbol(`Suspense` ); + const KEEP_ALIVE = Symbol(`KeepAlive` ); + const BASE_TRANSITION = Symbol( + `BaseTransition` + ); + const OPEN_BLOCK = Symbol(`openBlock` ); + const CREATE_BLOCK = Symbol(`createBlock` ); + const CREATE_ELEMENT_BLOCK = Symbol( + `createElementBlock` + ); + const CREATE_VNODE = Symbol(`createVNode` ); + const CREATE_ELEMENT_VNODE = Symbol( + `createElementVNode` + ); + const CREATE_COMMENT = Symbol( + `createCommentVNode` + ); + const CREATE_TEXT = Symbol( + `createTextVNode` + ); + const CREATE_STATIC = Symbol( + `createStaticVNode` + ); + const RESOLVE_COMPONENT = Symbol( + `resolveComponent` + ); + const RESOLVE_DYNAMIC_COMPONENT = Symbol( + `resolveDynamicComponent` + ); + const RESOLVE_DIRECTIVE = Symbol( + `resolveDirective` + ); + const RESOLVE_FILTER = Symbol( + `resolveFilter` + ); + const WITH_DIRECTIVES = Symbol( + `withDirectives` + ); + const RENDER_LIST = Symbol(`renderList` ); + const RENDER_SLOT = Symbol(`renderSlot` ); + const CREATE_SLOTS = Symbol(`createSlots` ); + const TO_DISPLAY_STRING = Symbol( + `toDisplayString` + ); + const MERGE_PROPS = Symbol(`mergeProps` ); + const NORMALIZE_CLASS = Symbol( + `normalizeClass` + ); + const NORMALIZE_STYLE = Symbol( + `normalizeStyle` + ); + const NORMALIZE_PROPS = Symbol( + `normalizeProps` + ); + const GUARD_REACTIVE_PROPS = Symbol( + `guardReactiveProps` + ); + const TO_HANDLERS = Symbol(`toHandlers` ); + const CAMELIZE = Symbol(`camelize` ); + const CAPITALIZE = Symbol(`capitalize` ); + const TO_HANDLER_KEY = Symbol( + `toHandlerKey` + ); + const SET_BLOCK_TRACKING = Symbol( + `setBlockTracking` + ); + const PUSH_SCOPE_ID = Symbol(`pushScopeId` ); + const POP_SCOPE_ID = Symbol(`popScopeId` ); + const WITH_CTX = Symbol(`withCtx` ); + const UNREF = Symbol(`unref` ); + const IS_REF = Symbol(`isRef` ); + const WITH_MEMO = Symbol(`withMemo` ); + const IS_MEMO_SAME = Symbol(`isMemoSame` ); + const helperNameMap = { + [FRAGMENT]: `Fragment`, + [TELEPORT]: `Teleport`, + [SUSPENSE]: `Suspense`, + [KEEP_ALIVE]: `KeepAlive`, + [BASE_TRANSITION]: `BaseTransition`, + [OPEN_BLOCK]: `openBlock`, + [CREATE_BLOCK]: `createBlock`, + [CREATE_ELEMENT_BLOCK]: `createElementBlock`, + [CREATE_VNODE]: `createVNode`, + [CREATE_ELEMENT_VNODE]: `createElementVNode`, + [CREATE_COMMENT]: `createCommentVNode`, + [CREATE_TEXT]: `createTextVNode`, + [CREATE_STATIC]: `createStaticVNode`, + [RESOLVE_COMPONENT]: `resolveComponent`, + [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, + [RESOLVE_DIRECTIVE]: `resolveDirective`, + [RESOLVE_FILTER]: `resolveFilter`, + [WITH_DIRECTIVES]: `withDirectives`, + [RENDER_LIST]: `renderList`, + [RENDER_SLOT]: `renderSlot`, + [CREATE_SLOTS]: `createSlots`, + [TO_DISPLAY_STRING]: `toDisplayString`, + [MERGE_PROPS]: `mergeProps`, + [NORMALIZE_CLASS]: `normalizeClass`, + [NORMALIZE_STYLE]: `normalizeStyle`, + [NORMALIZE_PROPS]: `normalizeProps`, + [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, + [TO_HANDLERS]: `toHandlers`, + [CAMELIZE]: `camelize`, + [CAPITALIZE]: `capitalize`, + [TO_HANDLER_KEY]: `toHandlerKey`, + [SET_BLOCK_TRACKING]: `setBlockTracking`, + [PUSH_SCOPE_ID]: `pushScopeId`, + [POP_SCOPE_ID]: `popScopeId`, + [WITH_CTX]: `withCtx`, + [UNREF]: `unref`, + [IS_REF]: `isRef`, + [WITH_MEMO]: `withMemo`, + [IS_MEMO_SAME]: `isMemoSame` + }; + function registerRuntimeHelpers(helpers) { + Object.getOwnPropertySymbols(helpers).forEach((s) => { + helperNameMap[s] = helpers[s]; + }); + } + + const Namespaces = { + "HTML": 0, + "0": "HTML", + "SVG": 1, + "1": "SVG", + "MATH_ML": 2, + "2": "MATH_ML" + }; + const NodeTypes = { + "ROOT": 0, + "0": "ROOT", + "ELEMENT": 1, + "1": "ELEMENT", + "TEXT": 2, + "2": "TEXT", + "COMMENT": 3, + "3": "COMMENT", + "SIMPLE_EXPRESSION": 4, + "4": "SIMPLE_EXPRESSION", + "INTERPOLATION": 5, + "5": "INTERPOLATION", + "ATTRIBUTE": 6, + "6": "ATTRIBUTE", + "DIRECTIVE": 7, + "7": "DIRECTIVE", + "COMPOUND_EXPRESSION": 8, + "8": "COMPOUND_EXPRESSION", + "IF": 9, + "9": "IF", + "IF_BRANCH": 10, + "10": "IF_BRANCH", + "FOR": 11, + "11": "FOR", + "TEXT_CALL": 12, + "12": "TEXT_CALL", + "VNODE_CALL": 13, + "13": "VNODE_CALL", + "JS_CALL_EXPRESSION": 14, + "14": "JS_CALL_EXPRESSION", + "JS_OBJECT_EXPRESSION": 15, + "15": "JS_OBJECT_EXPRESSION", + "JS_PROPERTY": 16, + "16": "JS_PROPERTY", + "JS_ARRAY_EXPRESSION": 17, + "17": "JS_ARRAY_EXPRESSION", + "JS_FUNCTION_EXPRESSION": 18, + "18": "JS_FUNCTION_EXPRESSION", + "JS_CONDITIONAL_EXPRESSION": 19, + "19": "JS_CONDITIONAL_EXPRESSION", + "JS_CACHE_EXPRESSION": 20, + "20": "JS_CACHE_EXPRESSION", + "JS_BLOCK_STATEMENT": 21, + "21": "JS_BLOCK_STATEMENT", + "JS_TEMPLATE_LITERAL": 22, + "22": "JS_TEMPLATE_LITERAL", + "JS_IF_STATEMENT": 23, + "23": "JS_IF_STATEMENT", + "JS_ASSIGNMENT_EXPRESSION": 24, + "24": "JS_ASSIGNMENT_EXPRESSION", + "JS_SEQUENCE_EXPRESSION": 25, + "25": "JS_SEQUENCE_EXPRESSION", + "JS_RETURN_STATEMENT": 26, + "26": "JS_RETURN_STATEMENT" + }; + const ElementTypes = { + "ELEMENT": 0, + "0": "ELEMENT", + "COMPONENT": 1, + "1": "COMPONENT", + "SLOT": 2, + "2": "SLOT", + "TEMPLATE": 3, + "3": "TEMPLATE" + }; + const ConstantTypes = { + "NOT_CONSTANT": 0, + "0": "NOT_CONSTANT", + "CAN_SKIP_PATCH": 1, + "1": "CAN_SKIP_PATCH", + "CAN_CACHE": 2, + "2": "CAN_CACHE", + "CAN_STRINGIFY": 3, + "3": "CAN_STRINGIFY" + }; + const locStub = { + start: { line: 1, column: 1, offset: 0 }, + end: { line: 1, column: 1, offset: 0 }, + source: "" + }; + function createRoot(children, source = "") { + return { + type: 0, + source, + children, + helpers: /* @__PURE__ */ new Set(), + components: [], + directives: [], + hoists: [], + imports: [], + cached: [], + temps: 0, + codegenNode: void 0, + loc: locStub + }; + } + function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) { + if (context) { + if (isBlock) { + context.helper(OPEN_BLOCK); + context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); + } else { + context.helper(getVNodeHelper(context.inSSR, isComponent)); + } + if (directives) { + context.helper(WITH_DIRECTIVES); + } + } + return { + type: 13, + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent, + loc + }; + } + function createArrayExpression(elements, loc = locStub) { + return { + type: 17, + loc, + elements + }; + } + function createObjectExpression(properties, loc = locStub) { + return { + type: 15, + loc, + properties + }; + } + function createObjectProperty(key, value) { + return { + type: 16, + loc: locStub, + key: isString(key) ? createSimpleExpression(key, true) : key, + value + }; + } + function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { + return { + type: 4, + loc, + content, + isStatic, + constType: isStatic ? 3 : constType + }; + } + function createInterpolation(content, loc) { + return { + type: 5, + loc, + content: isString(content) ? createSimpleExpression(content, false, loc) : content + }; + } + function createCompoundExpression(children, loc = locStub) { + return { + type: 8, + loc, + children + }; + } + function createCallExpression(callee, args = [], loc = locStub) { + return { + type: 14, + loc, + callee, + arguments: args + }; + } + function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { + return { + type: 18, + params, + returns, + newline, + isSlot, + loc + }; + } + function createConditionalExpression(test, consequent, alternate, newline = true) { + return { + type: 19, + test, + consequent, + alternate, + newline, + loc: locStub + }; + } + function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) { + return { + type: 20, + index, + value, + needPauseTracking, + inVOnce, + needArraySpread: false, + loc: locStub + }; + } + function createBlockStatement(body) { + return { + type: 21, + body, + loc: locStub + }; + } + function createTemplateLiteral(elements) { + return { + type: 22, + elements, + loc: locStub + }; + } + function createIfStatement(test, consequent, alternate) { + return { + type: 23, + test, + consequent, + alternate, + loc: locStub + }; + } + function createAssignmentExpression(left, right) { + return { + type: 24, + left, + right, + loc: locStub + }; + } + function createSequenceExpression(expressions) { + return { + type: 25, + expressions, + loc: locStub + }; + } + function createReturnStatement(returns) { + return { + type: 26, + returns, + loc: locStub + }; + } + function getVNodeHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; + } + function getVNodeBlockHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; + } + function convertToBlock(node, { helper, removeHelper, inSSR }) { + if (!node.isBlock) { + node.isBlock = true; + removeHelper(getVNodeHelper(inSSR, node.isComponent)); + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(inSSR, node.isComponent)); + } + } + + const defaultDelimitersOpen = new Uint8Array([123, 123]); + const defaultDelimitersClose = new Uint8Array([125, 125]); + function isTagStartChar(c) { + return c >= 97 && c <= 122 || c >= 65 && c <= 90; + } + function isWhitespace(c) { + return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; + } + function isEndOfTagSection(c) { + return c === 47 || c === 62 || isWhitespace(c); + } + function toCharCodes(str) { + const ret = new Uint8Array(str.length); + for (let i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret; + } + const Sequences = { + Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), + // CDATA[ + CdataEnd: new Uint8Array([93, 93, 62]), + // ]]> + CommentEnd: new Uint8Array([45, 45, 62]), + // `-->` + ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), + // `<\/script` + StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), + // `</style` + TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), + // `</title` + TextareaEnd: new Uint8Array([ + 60, + 47, + 116, + 101, + 120, + 116, + 97, + 114, + 101, + 97 + ]) + // `</textarea + }; + class Tokenizer { + constructor(stack, cbs) { + this.stack = stack; + this.cbs = cbs; + /** The current state the tokenizer is in. */ + this.state = 1; + /** The read buffer. */ + this.buffer = ""; + /** The beginning of the section that is currently being read. */ + this.sectionStart = 0; + /** The index within the buffer that we are currently looking at. */ + this.index = 0; + /** The start of the last entity. */ + this.entityStart = 0; + /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ + this.baseState = 1; + /** For special parsing behavior inside of script and style tags. */ + this.inRCDATA = false; + /** For disabling RCDATA tags handling */ + this.inXML = false; + /** For disabling interpolation parsing in v-pre */ + this.inVPre = false; + /** Record newline positions for fast line / column calculation */ + this.newlines = []; + this.mode = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + this.delimiterIndex = -1; + this.currentSequence = void 0; + this.sequenceIndex = 0; + } + get inSFCRoot() { + return this.mode === 2 && this.stack.length === 0; + } + reset() { + this.state = 1; + this.mode = 0; + this.buffer = ""; + this.sectionStart = 0; + this.index = 0; + this.baseState = 1; + this.inRCDATA = false; + this.currentSequence = void 0; + this.newlines.length = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + } + /** + * Generate Position object with line / column information using recorded + * newline positions. We know the index is always going to be an already + * processed index, so all the newlines up to this index should have been + * recorded. + */ + getPos(index) { + let line = 1; + let column = index + 1; + for (let i = this.newlines.length - 1; i >= 0; i--) { + const newlineIndex = this.newlines[i]; + if (index > newlineIndex) { + line = i + 2; + column = index - newlineIndex; + break; + } + } + return { + column, + line, + offset: index + }; + } + peek() { + return this.buffer.charCodeAt(this.index + 1); + } + stateText(c) { + if (c === 60) { + if (this.index > this.sectionStart) { + this.cbs.ontext(this.sectionStart, this.index); + } + this.state = 5; + this.sectionStart = this.index; + } else if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } + stateInterpolationOpen(c) { + if (c === this.delimiterOpen[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterOpen.length - 1) { + const start = this.index + 1 - this.delimiterOpen.length; + if (start > this.sectionStart) { + this.cbs.ontext(this.sectionStart, start); + } + this.state = 3; + this.sectionStart = start; + } else { + this.delimiterIndex++; + } + } else if (this.inRCDATA) { + this.state = 32; + this.stateInRCDATA(c); + } else { + this.state = 1; + this.stateText(c); + } + } + stateInterpolation(c) { + if (c === this.delimiterClose[0]) { + this.state = 4; + this.delimiterIndex = 0; + this.stateInterpolationClose(c); + } + } + stateInterpolationClose(c) { + if (c === this.delimiterClose[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterClose.length - 1) { + this.cbs.oninterpolation(this.sectionStart, this.index + 1); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else { + this.delimiterIndex++; + } + } else { + this.state = 3; + this.stateInterpolation(c); + } + } + stateSpecialStartSequence(c) { + const isEnd = this.sequenceIndex === this.currentSequence.length; + const isMatch = isEnd ? ( + // If we are at the end of the sequence, make sure the tag name has ended + isEndOfTagSection(c) + ) : ( + // Otherwise, do a case-insensitive comparison + (c | 32) === this.currentSequence[this.sequenceIndex] + ); + if (!isMatch) { + this.inRCDATA = false; + } else if (!isEnd) { + this.sequenceIndex++; + return; + } + this.sequenceIndex = 0; + this.state = 6; + this.stateInTagName(c); + } + /** Look for an end tag. For <title> and <textarea>, also decode entities. */ + stateInRCDATA(c) { + if (this.sequenceIndex === this.currentSequence.length) { + if (c === 62 || isWhitespace(c)) { + const endOfText = this.index - this.currentSequence.length; + if (this.sectionStart < endOfText) { + const actualIndex = this.index; + this.index = endOfText; + this.cbs.ontext(this.sectionStart, endOfText); + this.index = actualIndex; + } + this.sectionStart = endOfText + 2; + this.stateInClosingTagName(c); + this.inRCDATA = false; + return; + } + this.sequenceIndex = 0; + } + if ((c | 32) === this.currentSequence[this.sequenceIndex]) { + this.sequenceIndex += 1; + } else if (this.sequenceIndex === 0) { + if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { + if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } else if (this.fastForwardTo(60)) { + this.sequenceIndex = 1; + } + } else { + this.sequenceIndex = Number(c === 60); + } + } + stateCDATASequence(c) { + if (c === Sequences.Cdata[this.sequenceIndex]) { + if (++this.sequenceIndex === Sequences.Cdata.length) { + this.state = 28; + this.currentSequence = Sequences.CdataEnd; + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + } + } else { + this.sequenceIndex = 0; + this.state = 23; + this.stateInDeclaration(c); + } + } + /** + * When we wait for one specific character, we can speed things up + * by skipping through the buffer until we find it. + * + * @returns Whether the character was found. + */ + fastForwardTo(c) { + while (++this.index < this.buffer.length) { + const cc = this.buffer.charCodeAt(this.index); + if (cc === 10) { + this.newlines.push(this.index); + } + if (cc === c) { + return true; + } + } + this.index = this.buffer.length - 1; + return false; + } + /** + * Comments and CDATA end with `-->` and `]]>`. + * + * Their common qualities are: + * - Their end sequences have a distinct character they start with. + * - That character is then repeated, so we have to check multiple repeats. + * - All characters but the start character of the sequence can be skipped. + */ + stateInCommentLike(c) { + if (c === this.currentSequence[this.sequenceIndex]) { + if (++this.sequenceIndex === this.currentSequence.length) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, this.index - 2); + } else { + this.cbs.oncomment(this.sectionStart, this.index - 2); + } + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + this.state = 1; + } + } else if (this.sequenceIndex === 0) { + if (this.fastForwardTo(this.currentSequence[0])) { + this.sequenceIndex = 1; + } + } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { + this.sequenceIndex = 0; + } + } + startSpecial(sequence, offset) { + this.enterRCDATA(sequence, offset); + this.state = 31; + } + enterRCDATA(sequence, offset) { + this.inRCDATA = true; + this.currentSequence = sequence; + this.sequenceIndex = offset; + } + stateBeforeTagName(c) { + if (c === 33) { + this.state = 22; + this.sectionStart = this.index + 1; + } else if (c === 63) { + this.state = 24; + this.sectionStart = this.index + 1; + } else if (isTagStartChar(c)) { + this.sectionStart = this.index; + if (this.mode === 0) { + this.state = 6; + } else if (this.inSFCRoot) { + this.state = 34; + } else if (!this.inXML) { + if (c === 116) { + this.state = 30; + } else { + this.state = c === 115 ? 29 : 6; + } + } else { + this.state = 6; + } + } else if (c === 47) { + this.state = 8; + } else { + this.state = 1; + this.stateText(c); + } + } + stateInTagName(c) { + if (isEndOfTagSection(c)) { + this.handleTagName(c); + } + } + stateInSFCRootTagName(c) { + if (isEndOfTagSection(c)) { + const tag = this.buffer.slice(this.sectionStart, this.index); + if (tag !== "template") { + this.enterRCDATA(toCharCodes(`</` + tag), 0); + } + this.handleTagName(c); + } + } + handleTagName(c) { + this.cbs.onopentagname(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } + stateBeforeClosingTagName(c) { + if (isWhitespace(c)) ; else if (c === 62) { + { + this.cbs.onerr(14, this.index); + } + this.state = 1; + this.sectionStart = this.index + 1; + } else { + this.state = isTagStartChar(c) ? 9 : 27; + this.sectionStart = this.index; + } + } + stateInClosingTagName(c) { + if (c === 62 || isWhitespace(c)) { + this.cbs.onclosetag(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 10; + this.stateAfterClosingTagName(c); + } + } + stateAfterClosingTagName(c) { + if (c === 62) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeAttrName(c) { + if (c === 62) { + this.cbs.onopentagend(this.index); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else if (c === 47) { + this.state = 7; + if (this.peek() !== 62) { + this.cbs.onerr(22, this.index); + } + } else if (c === 60 && this.peek() === 47) { + this.cbs.onopentagend(this.index); + this.state = 5; + this.sectionStart = this.index; + } else if (!isWhitespace(c)) { + if (c === 61) { + this.cbs.onerr( + 19, + this.index + ); + } + this.handleAttrStart(c); + } + } + handleAttrStart(c) { + if (c === 118 && this.peek() === 45) { + this.state = 13; + this.sectionStart = this.index; + } else if (c === 46 || c === 58 || c === 64 || c === 35) { + this.cbs.ondirname(this.index, this.index + 1); + this.state = 14; + this.sectionStart = this.index + 1; + } else { + this.state = 12; + this.sectionStart = this.index; + } + } + stateInSelfClosingTag(c) { + if (c === 62) { + this.cbs.onselfclosingtag(this.index); + this.state = 1; + this.sectionStart = this.index + 1; + this.inRCDATA = false; + } else if (!isWhitespace(c)) { + this.state = 11; + this.stateBeforeAttrName(c); + } + } + stateInAttrName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.onattribname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 34 || c === 39 || c === 60) { + this.cbs.onerr( + 17, + this.index + ); + } + } + stateInDirName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 58) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 14; + this.sectionStart = this.index + 1; + } else if (c === 46) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDirArg(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 91) { + this.state = 15; + } else if (c === 46) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDynamicDirArg(c) { + if (c === 93) { + this.state = 14; + } else if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index + 1); + this.handleAttrNameEnd(c); + { + this.cbs.onerr( + 27, + this.index + ); + } + } + } + stateInDirModifier(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 46) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.sectionStart = this.index + 1; + } + } + handleAttrNameEnd(c) { + this.sectionStart = this.index; + this.state = 17; + this.cbs.onattribnameend(this.index); + this.stateAfterAttrName(c); + } + stateAfterAttrName(c) { + if (c === 61) { + this.state = 18; + } else if (c === 47 || c === 62) { + this.cbs.onattribend(0, this.sectionStart); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } else if (!isWhitespace(c)) { + this.cbs.onattribend(0, this.sectionStart); + this.handleAttrStart(c); + } + } + stateBeforeAttrValue(c) { + if (c === 34) { + this.state = 19; + this.sectionStart = this.index + 1; + } else if (c === 39) { + this.state = 20; + this.sectionStart = this.index + 1; + } else if (!isWhitespace(c)) { + this.sectionStart = this.index; + this.state = 21; + this.stateInAttrValueNoQuotes(c); + } + } + handleInAttrValue(c, quote) { + if (c === quote || this.fastForwardTo(quote)) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend( + quote === 34 ? 3 : 2, + this.index + 1 + ); + this.state = 11; + } + } + stateInAttrValueDoubleQuotes(c) { + this.handleInAttrValue(c, 34); + } + stateInAttrValueSingleQuotes(c) { + this.handleInAttrValue(c, 39); + } + stateInAttrValueNoQuotes(c) { + if (isWhitespace(c) || c === 62) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend(1, this.index); + this.state = 11; + this.stateBeforeAttrName(c); + } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { + this.cbs.onerr( + 18, + this.index + ); + } else ; + } + stateBeforeDeclaration(c) { + if (c === 91) { + this.state = 26; + this.sequenceIndex = 0; + } else { + this.state = c === 45 ? 25 : 23; + } + } + stateInDeclaration(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateInProcessingInstruction(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.onprocessinginstruction(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeComment(c) { + if (c === 45) { + this.state = 28; + this.currentSequence = Sequences.CommentEnd; + this.sequenceIndex = 2; + this.sectionStart = this.index + 1; + } else { + this.state = 23; + } + } + stateInSpecialComment(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.oncomment(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeSpecialS(c) { + if (c === Sequences.ScriptEnd[3]) { + this.startSpecial(Sequences.ScriptEnd, 4); + } else if (c === Sequences.StyleEnd[3]) { + this.startSpecial(Sequences.StyleEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + stateBeforeSpecialT(c) { + if (c === Sequences.TitleEnd[3]) { + this.startSpecial(Sequences.TitleEnd, 4); + } else if (c === Sequences.TextareaEnd[3]) { + this.startSpecial(Sequences.TextareaEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + startEntity() { + } + stateInEntity() { + } + /** + * Iterates through the buffer, calling the function corresponding to the current state. + * + * States that are more likely to be hit are higher up, as a performance improvement. + */ + parse(input) { + this.buffer = input; + while (this.index < this.buffer.length) { + const c = this.buffer.charCodeAt(this.index); + if (c === 10) { + this.newlines.push(this.index); + } + switch (this.state) { + case 1: { + this.stateText(c); + break; + } + case 2: { + this.stateInterpolationOpen(c); + break; + } + case 3: { + this.stateInterpolation(c); + break; + } + case 4: { + this.stateInterpolationClose(c); + break; + } + case 31: { + this.stateSpecialStartSequence(c); + break; + } + case 32: { + this.stateInRCDATA(c); + break; + } + case 26: { + this.stateCDATASequence(c); + break; + } + case 19: { + this.stateInAttrValueDoubleQuotes(c); + break; + } + case 12: { + this.stateInAttrName(c); + break; + } + case 13: { + this.stateInDirName(c); + break; + } + case 14: { + this.stateInDirArg(c); + break; + } + case 15: { + this.stateInDynamicDirArg(c); + break; + } + case 16: { + this.stateInDirModifier(c); + break; + } + case 28: { + this.stateInCommentLike(c); + break; + } + case 27: { + this.stateInSpecialComment(c); + break; + } + case 11: { + this.stateBeforeAttrName(c); + break; + } + case 6: { + this.stateInTagName(c); + break; + } + case 34: { + this.stateInSFCRootTagName(c); + break; + } + case 9: { + this.stateInClosingTagName(c); + break; + } + case 5: { + this.stateBeforeTagName(c); + break; + } + case 17: { + this.stateAfterAttrName(c); + break; + } + case 20: { + this.stateInAttrValueSingleQuotes(c); + break; + } + case 18: { + this.stateBeforeAttrValue(c); + break; + } + case 8: { + this.stateBeforeClosingTagName(c); + break; + } + case 10: { + this.stateAfterClosingTagName(c); + break; + } + case 29: { + this.stateBeforeSpecialS(c); + break; + } + case 30: { + this.stateBeforeSpecialT(c); + break; + } + case 21: { + this.stateInAttrValueNoQuotes(c); + break; + } + case 7: { + this.stateInSelfClosingTag(c); + break; + } + case 23: { + this.stateInDeclaration(c); + break; + } + case 22: { + this.stateBeforeDeclaration(c); + break; + } + case 25: { + this.stateBeforeComment(c); + break; + } + case 24: { + this.stateInProcessingInstruction(c); + break; + } + case 33: { + this.stateInEntity(); + break; + } + } + this.index++; + } + this.cleanup(); + this.finish(); + } + /** + * Remove data that has already been consumed from the buffer. + */ + cleanup() { + if (this.sectionStart !== this.index) { + if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { + this.cbs.ontext(this.sectionStart, this.index); + this.sectionStart = this.index; + } else if (this.state === 19 || this.state === 20 || this.state === 21) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = this.index; + } + } + } + finish() { + this.handleTrailingData(); + this.cbs.onend(); + } + /** Handle any trailing data. */ + handleTrailingData() { + const endIndex = this.buffer.length; + if (this.sectionStart >= endIndex) { + return; + } + if (this.state === 28) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, endIndex); + } else { + this.cbs.oncomment(this.sectionStart, endIndex); + } + } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { + this.cbs.ontext(this.sectionStart, endIndex); + } + } + emitCodePoint(cp, consumed) { + } + } + + const CompilerDeprecationTypes = { + "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT", + "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC", + "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER", + "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE", + "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE", + "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE", + "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE", + "COMPILER_FILTERS": "COMPILER_FILTERS" + }; + const deprecationData = { + ["COMPILER_IS_ON_ELEMENT"]: { + message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`, + link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` + }, + ["COMPILER_V_BIND_SYNC"]: { + message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` + }, + ["COMPILER_V_BIND_OBJECT_ORDER"]: { + message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` + }, + ["COMPILER_V_ON_NATIVE"]: { + message: `.native modifier for v-on has been removed as is no longer necessary.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` + }, + ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: { + message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` + }, + ["COMPILER_NATIVE_TEMPLATE"]: { + message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.` + }, + ["COMPILER_INLINE_TEMPLATE"]: { + message: `"inline-template" has been removed in Vue 3.`, + link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` + }, + ["COMPILER_FILTERS"]: { + message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`, + link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` + } + }; + function getCompatValue(key, { compatConfig }) { + const value = compatConfig && compatConfig[key]; + if (key === "MODE") { + return value || 3; + } else { + return value; + } + } + function isCompatEnabled(key, context) { + const mode = getCompatValue("MODE", context); + const value = getCompatValue(key, context); + return mode === 3 ? value === true : value !== false; + } + function checkCompatEnabled(key, context, loc, ...args) { + const enabled = isCompatEnabled(key, context); + if (enabled) { + warnDeprecation(key, context, loc, ...args); + } + return enabled; + } + function warnDeprecation(key, context, loc, ...args) { + const val = getCompatValue(key, context); + if (val === "suppress-warning") { + return; + } + const { message, link } = deprecationData[key]; + const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? ` + Details: ${link}` : ``}`; + const err = new SyntaxError(msg); + err.code = key; + if (loc) err.loc = loc; + context.onWarn(err); + } + + function defaultOnError(error) { + throw error; + } + function defaultOnWarn(msg) { + console.warn(`[Vue warn] ${msg.message}`); + } + function createCompilerError(code, loc, messages, additionalMessage) { + const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ; + const error = new SyntaxError(String(msg)); + error.code = code; + error.loc = loc; + return error; + } + const ErrorCodes = { + "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0, + "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT", + "CDATA_IN_HTML_CONTENT": 1, + "1": "CDATA_IN_HTML_CONTENT", + "DUPLICATE_ATTRIBUTE": 2, + "2": "DUPLICATE_ATTRIBUTE", + "END_TAG_WITH_ATTRIBUTES": 3, + "3": "END_TAG_WITH_ATTRIBUTES", + "END_TAG_WITH_TRAILING_SOLIDUS": 4, + "4": "END_TAG_WITH_TRAILING_SOLIDUS", + "EOF_BEFORE_TAG_NAME": 5, + "5": "EOF_BEFORE_TAG_NAME", + "EOF_IN_CDATA": 6, + "6": "EOF_IN_CDATA", + "EOF_IN_COMMENT": 7, + "7": "EOF_IN_COMMENT", + "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8, + "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT", + "EOF_IN_TAG": 9, + "9": "EOF_IN_TAG", + "INCORRECTLY_CLOSED_COMMENT": 10, + "10": "INCORRECTLY_CLOSED_COMMENT", + "INCORRECTLY_OPENED_COMMENT": 11, + "11": "INCORRECTLY_OPENED_COMMENT", + "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12, + "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME", + "MISSING_ATTRIBUTE_VALUE": 13, + "13": "MISSING_ATTRIBUTE_VALUE", + "MISSING_END_TAG_NAME": 14, + "14": "MISSING_END_TAG_NAME", + "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15, + "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES", + "NESTED_COMMENT": 16, + "16": "NESTED_COMMENT", + "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17, + "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME", + "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18, + "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE", + "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19, + "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME", + "UNEXPECTED_NULL_CHARACTER": 20, + "20": "UNEXPECTED_NULL_CHARACTER", + "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21, + "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME", + "UNEXPECTED_SOLIDUS_IN_TAG": 22, + "22": "UNEXPECTED_SOLIDUS_IN_TAG", + "X_INVALID_END_TAG": 23, + "23": "X_INVALID_END_TAG", + "X_MISSING_END_TAG": 24, + "24": "X_MISSING_END_TAG", + "X_MISSING_INTERPOLATION_END": 25, + "25": "X_MISSING_INTERPOLATION_END", + "X_MISSING_DIRECTIVE_NAME": 26, + "26": "X_MISSING_DIRECTIVE_NAME", + "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27, + "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END", + "X_V_IF_NO_EXPRESSION": 28, + "28": "X_V_IF_NO_EXPRESSION", + "X_V_IF_SAME_KEY": 29, + "29": "X_V_IF_SAME_KEY", + "X_V_ELSE_NO_ADJACENT_IF": 30, + "30": "X_V_ELSE_NO_ADJACENT_IF", + "X_V_FOR_NO_EXPRESSION": 31, + "31": "X_V_FOR_NO_EXPRESSION", + "X_V_FOR_MALFORMED_EXPRESSION": 32, + "32": "X_V_FOR_MALFORMED_EXPRESSION", + "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33, + "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT", + "X_V_BIND_NO_EXPRESSION": 34, + "34": "X_V_BIND_NO_EXPRESSION", + "X_V_ON_NO_EXPRESSION": 35, + "35": "X_V_ON_NO_EXPRESSION", + "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36, + "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET", + "X_V_SLOT_MIXED_SLOT_USAGE": 37, + "37": "X_V_SLOT_MIXED_SLOT_USAGE", + "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38, + "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES", + "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39, + "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN", + "X_V_SLOT_MISPLACED": 40, + "40": "X_V_SLOT_MISPLACED", + "X_V_MODEL_NO_EXPRESSION": 41, + "41": "X_V_MODEL_NO_EXPRESSION", + "X_V_MODEL_MALFORMED_EXPRESSION": 42, + "42": "X_V_MODEL_MALFORMED_EXPRESSION", + "X_V_MODEL_ON_SCOPE_VARIABLE": 43, + "43": "X_V_MODEL_ON_SCOPE_VARIABLE", + "X_V_MODEL_ON_PROPS": 44, + "44": "X_V_MODEL_ON_PROPS", + "X_INVALID_EXPRESSION": 45, + "45": "X_INVALID_EXPRESSION", + "X_KEEP_ALIVE_INVALID_CHILDREN": 46, + "46": "X_KEEP_ALIVE_INVALID_CHILDREN", + "X_PREFIX_ID_NOT_SUPPORTED": 47, + "47": "X_PREFIX_ID_NOT_SUPPORTED", + "X_MODULE_MODE_NOT_SUPPORTED": 48, + "48": "X_MODULE_MODE_NOT_SUPPORTED", + "X_CACHE_HANDLER_NOT_SUPPORTED": 49, + "49": "X_CACHE_HANDLER_NOT_SUPPORTED", + "X_SCOPE_ID_NOT_SUPPORTED": 50, + "50": "X_SCOPE_ID_NOT_SUPPORTED", + "X_VNODE_HOOKS": 51, + "51": "X_VNODE_HOOKS", + "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52, + "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT", + "__EXTEND_POINT__": 53, + "53": "__EXTEND_POINT__" + }; + const errorMessages = { + // parse errors + [0]: "Illegal comment.", + [1]: "CDATA section is allowed only in XML context.", + [2]: "Duplicate attribute.", + [3]: "End tag cannot have attributes.", + [4]: "Illegal '/' in tags.", + [5]: "Unexpected EOF in tag.", + [6]: "Unexpected EOF in CDATA section.", + [7]: "Unexpected EOF in comment.", + [8]: "Unexpected EOF in script.", + [9]: "Unexpected EOF in tag.", + [10]: "Incorrectly closed comment.", + [11]: "Incorrectly opened comment.", + [12]: "Illegal tag name. Use '<' to print '<'.", + [13]: "Attribute value was expected.", + [14]: "End tag name was expected.", + [15]: "Whitespace was expected.", + [16]: "Unexpected '<!--' in comment.", + [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, + [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", + [19]: "Attribute name cannot start with '='.", + [21]: "'<?' is allowed only in XML context.", + [20]: `Unexpected null character.`, + [22]: "Illegal '/' in tags.", + // Vue-specific parse errors + [23]: "Invalid end tag.", + [24]: "Element is missing end tag.", + [25]: "Interpolation end sign was not found.", + [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", + [26]: "Legal directive name was expected.", + // transform errors + [28]: `v-if/v-else-if is missing expression.`, + [29]: `v-if/else branches must use unique keys.`, + [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, + [31]: `v-for is missing expression.`, + [32]: `v-for has invalid expression.`, + [33]: `<template v-for> key should be placed on the <template> tag.`, + [34]: `v-bind is missing expression.`, + [52]: `v-bind with same-name shorthand only allows static argument.`, + [35]: `v-on is missing expression.`, + [36]: `Unexpected custom directive on <slot> outlet.`, + [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, + [38]: `Duplicate slot names found. `, + [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, + [40]: `v-slot can only be used on components or <template> tags.`, + [41]: `v-model is missing expression.`, + [42]: `v-model value must be a valid JavaScript member expression.`, + [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, + [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. +Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, + [45]: `Error parsing JavaScript expression: `, + [46]: `<KeepAlive> expects exactly one child component.`, + [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, + // generic errors + [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, + [48]: `ES module mode is not supported in this build of compiler.`, + [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, + [50]: `"scopeId" option is only supported in module mode.`, + // just to fulfill types + [53]: `` + }; + + function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { + { + return; + } + } + function isReferencedIdentifier(id, parent, parentStack) { + { + return false; + } + } + function isInDestructureAssignment(parent, parentStack) { + if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "AssignmentExpression") { + return true; + } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) { + break; + } + } + } + return false; + } + function isInNewExpression(parentStack) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "NewExpression") { + return true; + } else if (p.type !== "MemberExpression") { + break; + } + } + return false; + } + function walkFunctionParams(node, onIdent) { + for (const p of node.params) { + for (const id of extractIdentifiers(p)) { + onIdent(id); + } + } + } + function walkBlockDeclarations(block, onIdent) { + for (const stmt of block.body) { + if (stmt.type === "VariableDeclaration") { + if (stmt.declare) continue; + for (const decl of stmt.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { + if (stmt.declare || !stmt.id) continue; + onIdent(stmt.id); + } else if (isForStatement(stmt)) { + walkForStatement(stmt, true, onIdent); + } + } + } + function isForStatement(stmt) { + return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement"; + } + function walkForStatement(stmt, isVar, onIdent) { + const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left; + if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) { + for (const decl of variable.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } + } + function extractIdentifiers(param, nodes = []) { + switch (param.type) { + case "Identifier": + nodes.push(param); + break; + case "MemberExpression": + let object = param; + while (object.type === "MemberExpression") { + object = object.object; + } + nodes.push(object); + break; + case "ObjectPattern": + for (const prop of param.properties) { + if (prop.type === "RestElement") { + extractIdentifiers(prop.argument, nodes); + } else { + extractIdentifiers(prop.value, nodes); + } + } + break; + case "ArrayPattern": + param.elements.forEach((element) => { + if (element) extractIdentifiers(element, nodes); + }); + break; + case "RestElement": + extractIdentifiers(param.argument, nodes); + break; + case "AssignmentPattern": + extractIdentifiers(param.left, nodes); + break; + } + return nodes; + } + const isFunctionType = (node) => { + return /Function(?:Expression|Declaration)$|Method$/.test(node.type); + }; + const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed; + const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; + const TS_NODE_TYPES = [ + "TSAsExpression", + // foo as number + "TSTypeAssertion", + // (<number>foo) + "TSNonNullExpression", + // foo! + "TSInstantiationExpression", + // foo<string> + "TSSatisfiesExpression" + // foo satisfies T + ]; + function unwrapTSNode(node) { + if (TS_NODE_TYPES.includes(node.type)) { + return unwrapTSNode(node.expression); + } else { + return node; + } + } + + const isStaticExp = (p) => p.type === 4 && p.isStatic; + function isCoreComponent(tag) { + switch (tag) { + case "Teleport": + case "teleport": + return TELEPORT; + case "Suspense": + case "suspense": + return SUSPENSE; + case "KeepAlive": + case "keep-alive": + return KEEP_ALIVE; + case "BaseTransition": + case "base-transition": + return BASE_TRANSITION; + } + } + const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/; + const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); + const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; + const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; + const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; + const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source; + const isMemberExpressionBrowser = (exp) => { + const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim()); + let state = 0 /* inMemberExp */; + let stateStack = []; + let currentOpenBracketCount = 0; + let currentOpenParensCount = 0; + let currentStringType = null; + for (let i = 0; i < path.length; i++) { + const char = path.charAt(i); + switch (state) { + case 0 /* inMemberExp */: + if (char === "[") { + stateStack.push(state); + state = 1 /* inBrackets */; + currentOpenBracketCount++; + } else if (char === "(") { + stateStack.push(state); + state = 2 /* inParens */; + currentOpenParensCount++; + } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { + return false; + } + break; + case 1 /* inBrackets */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `[`) { + currentOpenBracketCount++; + } else if (char === `]`) { + if (!--currentOpenBracketCount) { + state = stateStack.pop(); + } + } + break; + case 2 /* inParens */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `(`) { + currentOpenParensCount++; + } else if (char === `)`) { + if (i === path.length - 1) { + return false; + } + if (!--currentOpenParensCount) { + state = stateStack.pop(); + } + } + break; + case 3 /* inString */: + if (char === currentStringType) { + state = stateStack.pop(); + currentStringType = null; + } + break; + } + } + return !currentOpenBracketCount && !currentOpenParensCount; + }; + const isMemberExpressionNode = NOOP ; + const isMemberExpression = isMemberExpressionBrowser ; + const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; + const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp)); + const isFnExpressionNode = NOOP ; + const isFnExpression = isFnExpressionBrowser ; + function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { + return advancePositionWithMutation( + { + offset: pos.offset, + line: pos.line, + column: pos.column + }, + source, + numberOfCharacters + ); + } + function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { + let linesCount = 0; + let lastNewLinePos = -1; + for (let i = 0; i < numberOfCharacters; i++) { + if (source.charCodeAt(i) === 10) { + linesCount++; + lastNewLinePos = i; + } + } + pos.offset += numberOfCharacters; + pos.line += linesCount; + pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos; + return pos; + } + function assert(condition, msg) { + if (!condition) { + throw new Error(msg || `unexpected compiler condition`); + } + } + function findDir(node, name, allowEmpty = false) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) { + return p; + } + } + } + function findProp(node, name, dynamicOnly = false, allowEmpty = false) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (dynamicOnly) continue; + if (p.name === name && (p.value || allowEmpty)) { + return p; + } + } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { + return p; + } + } + } + function isStaticArgOf(arg, name) { + return !!(arg && isStaticExp(arg) && arg.content === name); + } + function hasDynamicKeyVBind(node) { + return node.props.some( + (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" + p.arg.type !== 4 || // v-bind:[_ctx.foo] + !p.arg.isStatic) + // v-bind:[foo] + ); + } + function isText$1(node) { + return node.type === 5 || node.type === 2; + } + function isVSlot(p) { + return p.type === 7 && p.name === "slot"; + } + function isTemplateNode(node) { + return node.type === 1 && node.tagType === 3; + } + function isSlotOutlet(node) { + return node.type === 1 && node.tagType === 2; + } + const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); + function getUnnormalizedProps(props, callPath = []) { + if (props && !isString(props) && props.type === 14) { + const callee = props.callee; + if (!isString(callee) && propsHelperSet.has(callee)) { + return getUnnormalizedProps( + props.arguments[0], + callPath.concat(props) + ); + } + } + return [props, callPath]; + } + function injectProp(node, prop, context) { + let propsWithInjection; + let props = node.type === 13 ? node.props : node.arguments[2]; + let callPath = []; + let parentCall; + if (props && !isString(props) && props.type === 14) { + const ret = getUnnormalizedProps(props); + props = ret[0]; + callPath = ret[1]; + parentCall = callPath[callPath.length - 1]; + } + if (props == null || isString(props)) { + propsWithInjection = createObjectExpression([prop]); + } else if (props.type === 14) { + const first = props.arguments[0]; + if (!isString(first) && first.type === 15) { + if (!hasProp(prop, first)) { + first.properties.unshift(prop); + } + } else { + if (props.callee === TO_HANDLERS) { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + } else { + props.arguments.unshift(createObjectExpression([prop])); + } + } + !propsWithInjection && (propsWithInjection = props); + } else if (props.type === 15) { + if (!hasProp(prop, props)) { + props.properties.unshift(prop); + } + propsWithInjection = props; + } else { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { + parentCall = callPath[callPath.length - 2]; + } + } + if (node.type === 13) { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.props = propsWithInjection; + } + } else { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.arguments[2] = propsWithInjection; + } + } + } + function hasProp(prop, props) { + let result = false; + if (prop.key.type === 4) { + const propKeyName = prop.key.content; + result = props.properties.some( + (p) => p.key.type === 4 && p.key.content === propKeyName + ); + } + return result; + } + function toValidAssetId(name, type) { + return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { + return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); + })}`; + } + function hasScopeRef(node, ids) { + if (!node || Object.keys(ids).length === 0) { + return false; + } + switch (node.type) { + case 1: + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { + return true; + } + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 11: + if (hasScopeRef(node.source, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 9: + return node.branches.some((b) => hasScopeRef(b, ids)); + case 10: + if (hasScopeRef(node.condition, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 4: + return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content]; + case 8: + return node.children.some((c) => isObject(c) && hasScopeRef(c, ids)); + case 5: + case 12: + return hasScopeRef(node.content, ids); + case 2: + case 3: + case 20: + return false; + default: + return false; + } + } + function getMemoedVNodeCall(node) { + if (node.type === 14 && node.callee === WITH_MEMO) { + return node.arguments[1].returns; + } else { + return node; + } + } + const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/; + + const defaultParserOptions = { + parseMode: "base", + ns: 0, + delimiters: [`{{`, `}}`], + getNamespace: () => 0, + isVoidTag: NO, + isPreTag: NO, + isIgnoreNewlineTag: NO, + isCustomElement: NO, + onError: defaultOnError, + onWarn: defaultOnWarn, + comments: true, + prefixIdentifiers: false + }; + let currentOptions = defaultParserOptions; + let currentRoot = null; + let currentInput = ""; + let currentOpenTag = null; + let currentProp = null; + let currentAttrValue = ""; + let currentAttrStartIndex = -1; + let currentAttrEndIndex = -1; + let inPre = 0; + let inVPre = false; + let currentVPreBoundary = null; + const stack = []; + const tokenizer = new Tokenizer(stack, { + onerr: emitError, + ontext(start, end) { + onText(getSlice(start, end), start, end); + }, + ontextentity(char, start, end) { + onText(char, start, end); + }, + oninterpolation(start, end) { + if (inVPre) { + return onText(getSlice(start, end), start, end); + } + let innerStart = start + tokenizer.delimiterOpen.length; + let innerEnd = end - tokenizer.delimiterClose.length; + while (isWhitespace(currentInput.charCodeAt(innerStart))) { + innerStart++; + } + while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { + innerEnd--; + } + let exp = getSlice(innerStart, innerEnd); + if (exp.includes("&")) { + { + exp = currentOptions.decodeEntities(exp, false); + } + } + addNode({ + type: 5, + content: createExp(exp, false, getLoc(innerStart, innerEnd)), + loc: getLoc(start, end) + }); + }, + onopentagname(start, end) { + const name = getSlice(start, end); + currentOpenTag = { + type: 1, + tag: name, + ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), + tagType: 0, + // will be refined on tag close + props: [], + children: [], + loc: getLoc(start - 1, end), + codegenNode: void 0 + }; + }, + onopentagend(end) { + endOpenTag(end); + }, + onclosetag(start, end) { + const name = getSlice(start, end); + if (!currentOptions.isVoidTag(name)) { + let found = false; + for (let i = 0; i < stack.length; i++) { + const e = stack[i]; + if (e.tag.toLowerCase() === name.toLowerCase()) { + found = true; + if (i > 0) { + emitError(24, stack[0].loc.start.offset); + } + for (let j = 0; j <= i; j++) { + const el = stack.shift(); + onCloseTag(el, end, j < i); + } + break; + } + } + if (!found) { + emitError(23, backTrack(start, 60)); + } + } + }, + onselfclosingtag(end) { + const name = currentOpenTag.tag; + currentOpenTag.isSelfClosing = true; + endOpenTag(end); + if (stack[0] && stack[0].tag === name) { + onCloseTag(stack.shift(), end); + } + }, + onattribname(start, end) { + currentProp = { + type: 6, + name: getSlice(start, end), + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + }, + ondirname(start, end) { + const raw = getSlice(start, end); + const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); + if (!inVPre && name === "") { + emitError(26, start); + } + if (inVPre || name === "") { + currentProp = { + type: 6, + name: raw, + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + } else { + currentProp = { + type: 7, + name, + rawName: raw, + exp: void 0, + arg: void 0, + modifiers: raw === "." ? [createSimpleExpression("prop")] : [], + loc: getLoc(start) + }; + if (name === "pre") { + inVPre = tokenizer.inVPre = true; + currentVPreBoundary = currentOpenTag; + const props = currentOpenTag.props; + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7) { + props[i] = dirToAttr(props[i]); + } + } + } + } + }, + ondirarg(start, end) { + if (start === end) return; + const arg = getSlice(start, end); + if (inVPre) { + currentProp.name += arg; + setLocEnd(currentProp.nameLoc, end); + } else { + const isStatic = arg[0] !== `[`; + currentProp.arg = createExp( + isStatic ? arg : arg.slice(1, -1), + isStatic, + getLoc(start, end), + isStatic ? 3 : 0 + ); + } + }, + ondirmodifier(start, end) { + const mod = getSlice(start, end); + if (inVPre) { + currentProp.name += "." + mod; + setLocEnd(currentProp.nameLoc, end); + } else if (currentProp.name === "slot") { + const arg = currentProp.arg; + if (arg) { + arg.content += "." + mod; + setLocEnd(arg.loc, end); + } + } else { + const exp = createSimpleExpression(mod, true, getLoc(start, end)); + currentProp.modifiers.push(exp); + } + }, + onattribdata(start, end) { + currentAttrValue += getSlice(start, end); + if (currentAttrStartIndex < 0) currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribentity(char, start, end) { + currentAttrValue += char; + if (currentAttrStartIndex < 0) currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribnameend(end) { + const start = currentProp.loc.start.offset; + const name = getSlice(start, end); + if (currentProp.type === 7) { + currentProp.rawName = name; + } + if (currentOpenTag.props.some( + (p) => (p.type === 7 ? p.rawName : p.name) === name + )) { + emitError(2, start); + } + }, + onattribend(quote, end) { + if (currentOpenTag && currentProp) { + setLocEnd(currentProp.loc, end); + if (quote !== 0) { + if (currentAttrValue.includes("&")) { + currentAttrValue = currentOptions.decodeEntities( + currentAttrValue, + true + ); + } + if (currentProp.type === 6) { + if (currentProp.name === "class") { + currentAttrValue = condense(currentAttrValue).trim(); + } + if (quote === 1 && !currentAttrValue) { + emitError(13, end); + } + currentProp.value = { + type: 2, + content: currentAttrValue, + loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) + }; + if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { + tokenizer.enterRCDATA(toCharCodes(`</template`), 0); + } + } else { + let expParseMode = 0 /* Normal */; + currentProp.exp = createExp( + currentAttrValue, + false, + getLoc(currentAttrStartIndex, currentAttrEndIndex), + 0, + expParseMode + ); + if (currentProp.name === "for") { + currentProp.forParseResult = parseForExpression(currentProp.exp); + } + let syncIndex = -1; + if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.findIndex( + (mod) => mod.content === "sync" + )) > -1 && checkCompatEnabled( + "COMPILER_V_BIND_SYNC", + currentOptions, + currentProp.loc, + currentProp.rawName + )) { + currentProp.name = "model"; + currentProp.modifiers.splice(syncIndex, 1); + } + } + } + if (currentProp.type !== 7 || currentProp.name !== "pre") { + currentOpenTag.props.push(currentProp); + } + } + currentAttrValue = ""; + currentAttrStartIndex = currentAttrEndIndex = -1; + }, + oncomment(start, end) { + if (currentOptions.comments) { + addNode({ + type: 3, + content: getSlice(start, end), + loc: getLoc(start - 4, end + 3) + }); + } + }, + onend() { + const end = currentInput.length; + if (tokenizer.state !== 1) { + switch (tokenizer.state) { + case 5: + case 8: + emitError(5, end); + break; + case 3: + case 4: + emitError( + 25, + tokenizer.sectionStart + ); + break; + case 28: + if (tokenizer.currentSequence === Sequences.CdataEnd) { + emitError(6, end); + } else { + emitError(7, end); + } + break; + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + // " + case 20: + // ' + case 21: + emitError(9, end); + break; + } + } + for (let index = 0; index < stack.length; index++) { + onCloseTag(stack[index], end - 1); + emitError(24, stack[index].loc.start.offset); + } + }, + oncdata(start, end) { + if (stack[0].ns !== 0) { + onText(getSlice(start, end), start, end); + } else { + emitError(1, start - 9); + } + }, + onprocessinginstruction(start) { + if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + emitError( + 21, + start - 1 + ); + } + } + }); + const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; + const stripParensRE = /^\(|\)$/g; + function parseForExpression(input) { + const loc = input.loc; + const exp = input.content; + const inMatch = exp.match(forAliasRE); + if (!inMatch) return; + const [, LHS, RHS] = inMatch; + const createAliasExpression = (content, offset, asParam = false) => { + const start = loc.start.offset + offset; + const end = start + content.length; + return createExp( + content, + false, + getLoc(start, end), + 0, + asParam ? 1 /* Params */ : 0 /* Normal */ + ); + }; + const result = { + source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), + value: void 0, + key: void 0, + index: void 0, + finalized: false + }; + let valueContent = LHS.trim().replace(stripParensRE, "").trim(); + const trimmedOffset = LHS.indexOf(valueContent); + const iteratorMatch = valueContent.match(forIteratorRE); + if (iteratorMatch) { + valueContent = valueContent.replace(forIteratorRE, "").trim(); + const keyContent = iteratorMatch[1].trim(); + let keyOffset; + if (keyContent) { + keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); + result.key = createAliasExpression(keyContent, keyOffset, true); + } + if (iteratorMatch[2]) { + const indexContent = iteratorMatch[2].trim(); + if (indexContent) { + result.index = createAliasExpression( + indexContent, + exp.indexOf( + indexContent, + result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length + ), + true + ); + } + } + } + if (valueContent) { + result.value = createAliasExpression(valueContent, trimmedOffset, true); + } + return result; + } + function getSlice(start, end) { + return currentInput.slice(start, end); + } + function endOpenTag(end) { + if (tokenizer.inSFCRoot) { + currentOpenTag.innerLoc = getLoc(end + 1, end + 1); + } + addNode(currentOpenTag); + const { tag, ns } = currentOpenTag; + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre++; + } + if (currentOptions.isVoidTag(tag)) { + onCloseTag(currentOpenTag, end); + } else { + stack.unshift(currentOpenTag); + if (ns === 1 || ns === 2) { + tokenizer.inXML = true; + } + } + currentOpenTag = null; + } + function onText(content, start, end) { + { + const tag = stack[0] && stack[0].tag; + if (tag !== "script" && tag !== "style" && content.includes("&")) { + content = currentOptions.decodeEntities(content, false); + } + } + const parent = stack[0] || currentRoot; + const lastNode = parent.children[parent.children.length - 1]; + if (lastNode && lastNode.type === 2) { + lastNode.content += content; + setLocEnd(lastNode.loc, end); + } else { + parent.children.push({ + type: 2, + content, + loc: getLoc(start, end) + }); + } + } + function onCloseTag(el, end, isImplied = false) { + if (isImplied) { + setLocEnd(el.loc, backTrack(end, 60)); + } else { + setLocEnd(el.loc, lookAhead(end, 62) + 1); + } + if (tokenizer.inSFCRoot) { + if (el.children.length) { + el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end); + } else { + el.innerLoc.end = extend({}, el.innerLoc.start); + } + el.innerLoc.source = getSlice( + el.innerLoc.start.offset, + el.innerLoc.end.offset + ); + } + const { tag, ns, children } = el; + if (!inVPre) { + if (tag === "slot") { + el.tagType = 2; + } else if (isFragmentTemplate(el)) { + el.tagType = 3; + } else if (isComponent(el)) { + el.tagType = 1; + } + } + if (!tokenizer.inRCDATA) { + el.children = condenseWhitespace(children); + } + if (ns === 0 && currentOptions.isIgnoreNewlineTag(tag)) { + const first = children[0]; + if (first && first.type === 2) { + first.content = first.content.replace(/^\r?\n/, ""); + } + } + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre--; + } + if (currentVPreBoundary === el) { + inVPre = tokenizer.inVPre = false; + currentVPreBoundary = null; + } + if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + tokenizer.inXML = false; + } + { + const props = el.props; + if (isCompatEnabled( + "COMPILER_V_IF_V_FOR_PRECEDENCE", + currentOptions + )) { + let hasIf = false; + let hasFor = false; + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 7) { + if (p.name === "if") { + hasIf = true; + } else if (p.name === "for") { + hasFor = true; + } + } + if (hasIf && hasFor) { + warnDeprecation( + "COMPILER_V_IF_V_FOR_PRECEDENCE", + currentOptions, + el.loc + ); + break; + } + } + } + if (!tokenizer.inSFCRoot && isCompatEnabled( + "COMPILER_NATIVE_TEMPLATE", + currentOptions + ) && el.tag === "template" && !isFragmentTemplate(el)) { + warnDeprecation( + "COMPILER_NATIVE_TEMPLATE", + currentOptions, + el.loc + ); + const parent = stack[0] || currentRoot; + const index = parent.children.indexOf(el); + parent.children.splice(index, 1, ...el.children); + } + const inlineTemplateProp = props.find( + (p) => p.type === 6 && p.name === "inline-template" + ); + if (inlineTemplateProp && checkCompatEnabled( + "COMPILER_INLINE_TEMPLATE", + currentOptions, + inlineTemplateProp.loc + ) && el.children.length) { + inlineTemplateProp.value = { + type: 2, + content: getSlice( + el.children[0].loc.start.offset, + el.children[el.children.length - 1].loc.end.offset + ), + loc: inlineTemplateProp.loc + }; + } + } + } + function lookAhead(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1) i++; + return i; + } + function backTrack(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i >= 0) i--; + return i; + } + const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); + function isFragmentTemplate({ tag, props }) { + if (tag === "template") { + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { + return true; + } + } + } + return false; + } + function isComponent({ tag, props }) { + if (currentOptions.isCustomElement(tag)) { + return false; + } + if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { + return true; + } + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 6) { + if (p.name === "is" && p.value) { + if (p.value.content.startsWith("vue:")) { + return true; + } else if (checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + } else if (// :is on plain element - only treat as component in compat mode + p.name === "bind" && isStaticArgOf(p.arg, "is") && checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + return false; + } + function isUpperCase(c) { + return c > 64 && c < 91; + } + const windowsNewlineRE = /\r\n/g; + function condenseWhitespace(nodes, tag) { + const shouldCondense = currentOptions.whitespace !== "preserve"; + let removedWhitespace = false; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (node.type === 2) { + if (!inPre) { + if (isAllWhitespace(node.content)) { + const prev = nodes[i - 1] && nodes[i - 1].type; + const next = nodes[i + 1] && nodes[i + 1].type; + if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { + removedWhitespace = true; + nodes[i] = null; + } else { + node.content = " "; + } + } else if (shouldCondense) { + node.content = condense(node.content); + } + } else { + node.content = node.content.replace(windowsNewlineRE, "\n"); + } + } + } + return removedWhitespace ? nodes.filter(Boolean) : nodes; + } + function isAllWhitespace(str) { + for (let i = 0; i < str.length; i++) { + if (!isWhitespace(str.charCodeAt(i))) { + return false; + } + } + return true; + } + function hasNewlineChar(str) { + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + if (c === 10 || c === 13) { + return true; + } + } + return false; + } + function condense(str) { + let ret = ""; + let prevCharIsWhitespace = false; + for (let i = 0; i < str.length; i++) { + if (isWhitespace(str.charCodeAt(i))) { + if (!prevCharIsWhitespace) { + ret += " "; + prevCharIsWhitespace = true; + } + } else { + ret += str[i]; + prevCharIsWhitespace = false; + } + } + return ret; + } + function addNode(node) { + (stack[0] || currentRoot).children.push(node); + } + function getLoc(start, end) { + return { + start: tokenizer.getPos(start), + // @ts-expect-error allow late attachment + end: end == null ? end : tokenizer.getPos(end), + // @ts-expect-error allow late attachment + source: end == null ? end : getSlice(start, end) + }; + } + function cloneLoc(loc) { + return getLoc(loc.start.offset, loc.end.offset); + } + function setLocEnd(loc, end) { + loc.end = tokenizer.getPos(end); + loc.source = getSlice(loc.start.offset, end); + } + function dirToAttr(dir) { + const attr = { + type: 6, + name: dir.rawName, + nameLoc: getLoc( + dir.loc.start.offset, + dir.loc.start.offset + dir.rawName.length + ), + value: void 0, + loc: dir.loc + }; + if (dir.exp) { + const loc = dir.exp.loc; + if (loc.end.offset < dir.loc.end.offset) { + loc.start.offset--; + loc.start.column--; + loc.end.offset++; + loc.end.column++; + } + attr.value = { + type: 2, + content: dir.exp.content, + loc + }; + } + return attr; + } + function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { + const exp = createSimpleExpression(content, isStatic, loc, constType); + return exp; + } + function emitError(code, index, message) { + currentOptions.onError( + createCompilerError(code, getLoc(index, index), void 0, message) + ); + } + function reset() { + tokenizer.reset(); + currentOpenTag = null; + currentProp = null; + currentAttrValue = ""; + currentAttrStartIndex = -1; + currentAttrEndIndex = -1; + stack.length = 0; + } + function baseParse(input, options) { + reset(); + currentInput = input; + currentOptions = extend({}, defaultParserOptions); + if (options) { + let key; + for (key in options) { + if (options[key] != null) { + currentOptions[key] = options[key]; + } + } + } + { + if (!currentOptions.decodeEntities) { + throw new Error( + `[@vue/compiler-core] decodeEntities option is required in browser builds.` + ); + } + } + tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; + tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; + const delimiters = options && options.delimiters; + if (delimiters) { + tokenizer.delimiterOpen = toCharCodes(delimiters[0]); + tokenizer.delimiterClose = toCharCodes(delimiters[1]); + } + const root = currentRoot = createRoot([], input); + tokenizer.parse(currentInput); + root.loc = getLoc(0, input.length); + root.children = condenseWhitespace(root.children); + currentRoot = null; + return root; + } + + function cacheStatic(root, context) { + walk( + root, + void 0, + context, + // Root node is unfortunately non-hoistable due to potential parent + // fallthrough attributes. + isSingleElementRoot(root, root.children[0]) + ); + } + function isSingleElementRoot(root, child) { + const { children } = root; + return children.length === 1 && child.type === 1 && !isSlotOutlet(child); + } + function walk(node, parent, context, doNotHoistNode = false, inFor = false) { + const { children } = node; + const toCache = []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.type === 1 && child.tagType === 0) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType > 0) { + if (constantType >= 2) { + child.codegenNode.patchFlag = -1; + toCache.push(child); + continue; + } + } else { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + const flag = codegenNode.patchFlag; + if ((flag === void 0 || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { + const props = getNodeProps(child); + if (props) { + codegenNode.props = context.hoist(props); + } + } + if (codegenNode.dynamicProps) { + codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); + } + } + } + } else if (child.type === 12) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType >= 2) { + toCache.push(child); + continue; + } + } + if (child.type === 1) { + const isComponent = child.tagType === 1; + if (isComponent) { + context.scopes.vSlot++; + } + walk(child, node, context, false, inFor); + if (isComponent) { + context.scopes.vSlot--; + } + } else if (child.type === 11) { + walk(child, node, context, child.children.length === 1, true); + } else if (child.type === 9) { + for (let i2 = 0; i2 < child.branches.length; i2++) { + walk( + child.branches[i2], + node, + context, + child.branches[i2].children.length === 1, + inFor + ); + } + } + } + let cachedAsArray = false; + if (toCache.length === children.length && node.type === 1) { + if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) { + node.codegenNode.children = getCacheExpression( + createArrayExpression(node.codegenNode.children) + ); + cachedAsArray = true; + } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) { + const slot = getSlotNode(node.codegenNode, "default"); + if (slot) { + slot.returns = getCacheExpression( + createArrayExpression(slot.returns) + ); + cachedAsArray = true; + } + } else if (node.tagType === 3 && parent && parent.type === 1 && parent.tagType === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 15) { + const slotName = findDir(node, "slot", true); + const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg); + if (slot) { + slot.returns = getCacheExpression( + createArrayExpression(slot.returns) + ); + cachedAsArray = true; + } + } + } + if (!cachedAsArray) { + for (const child of toCache) { + child.codegenNode = context.cache(child.codegenNode); + } + } + function getCacheExpression(value) { + const exp = context.cache(value); + if (inFor && context.hmr) { + exp.needArraySpread = true; + } + return exp; + } + function getSlotNode(node2, name) { + if (node2.children && !isArray(node2.children) && node2.children.type === 15) { + const slot = node2.children.properties.find( + (p) => p.key === name || p.key.content === name + ); + return slot && slot.value; + } + } + if (toCache.length && context.transformHoist) { + context.transformHoist(children, context, node); + } + } + function getConstantType(node, context) { + const { constantCache } = context; + switch (node.type) { + case 1: + if (node.tagType !== 0) { + return 0; + } + const cached = constantCache.get(node); + if (cached !== void 0) { + return cached; + } + const codegenNode = node.codegenNode; + if (codegenNode.type !== 13) { + return 0; + } + if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject" && node.tag !== "math") { + return 0; + } + if (codegenNode.patchFlag === void 0) { + let returnType2 = 3; + const generatedPropsType = getGeneratedPropsConstantType(node, context); + if (generatedPropsType === 0) { + constantCache.set(node, 0); + return 0; + } + if (generatedPropsType < returnType2) { + returnType2 = generatedPropsType; + } + for (let i = 0; i < node.children.length; i++) { + const childType = getConstantType(node.children[i], context); + if (childType === 0) { + constantCache.set(node, 0); + return 0; + } + if (childType < returnType2) { + returnType2 = childType; + } + } + if (returnType2 > 1) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && p.name === "bind" && p.exp) { + const expType = getConstantType(p.exp, context); + if (expType === 0) { + constantCache.set(node, 0); + return 0; + } + if (expType < returnType2) { + returnType2 = expType; + } + } + } + } + if (codegenNode.isBlock) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7) { + constantCache.set(node, 0); + return 0; + } + } + context.removeHelper(OPEN_BLOCK); + context.removeHelper( + getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) + ); + codegenNode.isBlock = false; + context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); + } + constantCache.set(node, returnType2); + return returnType2; + } else { + constantCache.set(node, 0); + return 0; + } + case 2: + case 3: + return 3; + case 9: + case 11: + case 10: + return 0; + case 5: + case 12: + return getConstantType(node.content, context); + case 4: + return node.constType; + case 8: + let returnType = 3; + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child) || isSymbol(child)) { + continue; + } + const childType = getConstantType(child, context); + if (childType === 0) { + return 0; + } else if (childType < returnType) { + returnType = childType; + } + } + return returnType; + case 20: + return 2; + default: + return 0; + } + } + const allowHoistedHelperSet = /* @__PURE__ */ new Set([ + NORMALIZE_CLASS, + NORMALIZE_STYLE, + NORMALIZE_PROPS, + GUARD_REACTIVE_PROPS + ]); + function getConstantTypeOfHelperCall(value, context) { + if (value.type === 14 && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { + const arg = value.arguments[0]; + if (arg.type === 4) { + return getConstantType(arg, context); + } else if (arg.type === 14) { + return getConstantTypeOfHelperCall(arg, context); + } + } + return 0; + } + function getGeneratedPropsConstantType(node, context) { + let returnType = 3; + const props = getNodeProps(node); + if (props && props.type === 15) { + const { properties } = props; + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + const keyType = getConstantType(key, context); + if (keyType === 0) { + return keyType; + } + if (keyType < returnType) { + returnType = keyType; + } + let valueType; + if (value.type === 4) { + valueType = getConstantType(value, context); + } else if (value.type === 14) { + valueType = getConstantTypeOfHelperCall(value, context); + } else { + valueType = 0; + } + if (valueType === 0) { + return valueType; + } + if (valueType < returnType) { + returnType = valueType; + } + } + } + return returnType; + } + function getNodeProps(node) { + const codegenNode = node.codegenNode; + if (codegenNode.type === 13) { + return codegenNode.props; + } + } + + function createTransformContext(root, { + filename = "", + prefixIdentifiers = false, + hoistStatic = false, + hmr = false, + cacheHandlers = false, + nodeTransforms = [], + directiveTransforms = {}, + transformHoist = null, + isBuiltInComponent = NOOP, + isCustomElement = NOOP, + expressionPlugins = [], + scopeId = null, + slotted = true, + ssr = false, + inSSR = false, + ssrCssVars = ``, + bindingMetadata = EMPTY_OBJ, + inline = false, + isTS = false, + onError = defaultOnError, + onWarn = defaultOnWarn, + compatConfig + }) { + const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); + const context = { + // options + filename, + selfName: nameMatch && capitalize(camelize(nameMatch[1])), + prefixIdentifiers, + hoistStatic, + hmr, + cacheHandlers, + nodeTransforms, + directiveTransforms, + transformHoist, + isBuiltInComponent, + isCustomElement, + expressionPlugins, + scopeId, + slotted, + ssr, + inSSR, + ssrCssVars, + bindingMetadata, + inline, + isTS, + onError, + onWarn, + compatConfig, + // state + root, + helpers: /* @__PURE__ */ new Map(), + components: /* @__PURE__ */ new Set(), + directives: /* @__PURE__ */ new Set(), + hoists: [], + imports: [], + cached: [], + constantCache: /* @__PURE__ */ new WeakMap(), + temps: 0, + identifiers: /* @__PURE__ */ Object.create(null), + scopes: { + vFor: 0, + vSlot: 0, + vPre: 0, + vOnce: 0 + }, + parent: null, + grandParent: null, + currentNode: root, + childIndex: 0, + inVOnce: false, + // methods + helper(name) { + const count = context.helpers.get(name) || 0; + context.helpers.set(name, count + 1); + return name; + }, + removeHelper(name) { + const count = context.helpers.get(name); + if (count) { + const currentCount = count - 1; + if (!currentCount) { + context.helpers.delete(name); + } else { + context.helpers.set(name, currentCount); + } + } + }, + helperString(name) { + return `_${helperNameMap[context.helper(name)]}`; + }, + replaceNode(node) { + { + if (!context.currentNode) { + throw new Error(`Node being replaced is already removed.`); + } + if (!context.parent) { + throw new Error(`Cannot replace root node.`); + } + } + context.parent.children[context.childIndex] = context.currentNode = node; + }, + removeNode(node) { + if (!context.parent) { + throw new Error(`Cannot remove root node.`); + } + const list = context.parent.children; + const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; + if (removalIndex < 0) { + throw new Error(`node being removed is not a child of current parent`); + } + if (!node || node === context.currentNode) { + context.currentNode = null; + context.onNodeRemoved(); + } else { + if (context.childIndex > removalIndex) { + context.childIndex--; + context.onNodeRemoved(); + } + } + context.parent.children.splice(removalIndex, 1); + }, + onNodeRemoved: NOOP, + addIdentifiers(exp) { + }, + removeIdentifiers(exp) { + }, + hoist(exp) { + if (isString(exp)) exp = createSimpleExpression(exp); + context.hoists.push(exp); + const identifier = createSimpleExpression( + `_hoisted_${context.hoists.length}`, + false, + exp.loc, + 2 + ); + identifier.hoisted = exp; + return identifier; + }, + cache(exp, isVNode = false, inVOnce = false) { + const cacheExp = createCacheExpression( + context.cached.length, + exp, + isVNode, + inVOnce + ); + context.cached.push(cacheExp); + return cacheExp; + } + }; + { + context.filters = /* @__PURE__ */ new Set(); + } + return context; + } + function transform(root, options) { + const context = createTransformContext(root, options); + traverseNode(root, context); + if (options.hoistStatic) { + cacheStatic(root, context); + } + if (!options.ssr) { + createRootCodegen(root, context); + } + root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); + root.components = [...context.components]; + root.directives = [...context.directives]; + root.imports = context.imports; + root.hoists = context.hoists; + root.temps = context.temps; + root.cached = context.cached; + root.transformed = true; + { + root.filters = [...context.filters]; + } + } + function createRootCodegen(root, context) { + const { helper } = context; + const { children } = root; + if (children.length === 1) { + const child = children[0]; + if (isSingleElementRoot(root, child) && child.codegenNode) { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + convertToBlock(codegenNode, context); + } + root.codegenNode = codegenNode; + } else { + root.codegenNode = child; + } + } else if (children.length > 1) { + let patchFlag = 64; + if (children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + } + root.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + root.children, + patchFlag, + void 0, + void 0, + true, + void 0, + false + ); + } else ; + } + function traverseChildren(parent, context) { + let i = 0; + const nodeRemoved = () => { + i--; + }; + for (; i < parent.children.length; i++) { + const child = parent.children[i]; + if (isString(child)) continue; + context.grandParent = context.parent; + context.parent = parent; + context.childIndex = i; + context.onNodeRemoved = nodeRemoved; + traverseNode(child, context); + } + } + function traverseNode(node, context) { + context.currentNode = node; + const { nodeTransforms } = context; + const exitFns = []; + for (let i2 = 0; i2 < nodeTransforms.length; i2++) { + const onExit = nodeTransforms[i2](node, context); + if (onExit) { + if (isArray(onExit)) { + exitFns.push(...onExit); + } else { + exitFns.push(onExit); + } + } + if (!context.currentNode) { + return; + } else { + node = context.currentNode; + } + } + switch (node.type) { + case 3: + if (!context.ssr) { + context.helper(CREATE_COMMENT); + } + break; + case 5: + if (!context.ssr) { + context.helper(TO_DISPLAY_STRING); + } + break; + // for container types, further traverse downwards + case 9: + for (let i2 = 0; i2 < node.branches.length; i2++) { + traverseNode(node.branches[i2], context); + } + break; + case 10: + case 11: + case 1: + case 0: + traverseChildren(node, context); + break; + } + context.currentNode = node; + let i = exitFns.length; + while (i--) { + exitFns[i](); + } + } + function createStructuralDirectiveTransform(name, fn) { + const matches = isString(name) ? (n) => n === name : (n) => name.test(n); + return (node, context) => { + if (node.type === 1) { + const { props } = node; + if (node.tagType === 3 && props.some(isVSlot)) { + return; + } + const exitFns = []; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 7 && matches(prop.name)) { + props.splice(i, 1); + i--; + const onExit = fn(node, prop, context); + if (onExit) exitFns.push(onExit); + } + } + return exitFns; + } + }; + } + + const PURE_ANNOTATION = `/*@__PURE__*/`; + const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; + function createCodegenContext(ast, { + mode = "function", + prefixIdentifiers = mode === "module", + sourceMap = false, + filename = `template.vue.html`, + scopeId = null, + optimizeImports = false, + runtimeGlobalName = `Vue`, + runtimeModuleName = `vue`, + ssrRuntimeModuleName = "vue/server-renderer", + ssr = false, + isTS = false, + inSSR = false + }) { + const context = { + mode, + prefixIdentifiers, + sourceMap, + filename, + scopeId, + optimizeImports, + runtimeGlobalName, + runtimeModuleName, + ssrRuntimeModuleName, + ssr, + isTS, + inSSR, + source: ast.source, + code: ``, + column: 1, + line: 1, + offset: 0, + indentLevel: 0, + pure: false, + map: void 0, + helper(key) { + return `_${helperNameMap[key]}`; + }, + push(code, newlineIndex = -2 /* None */, node) { + context.code += code; + }, + indent() { + newline(++context.indentLevel); + }, + deindent(withoutNewLine = false) { + if (withoutNewLine) { + --context.indentLevel; + } else { + newline(--context.indentLevel); + } + }, + newline() { + newline(context.indentLevel); + } + }; + function newline(n) { + context.push("\n" + ` `.repeat(n), 0 /* Start */); + } + return context; + } + function generate(ast, options = {}) { + const context = createCodegenContext(ast, options); + if (options.onContextCreated) options.onContextCreated(context); + const { + mode, + push, + prefixIdentifiers, + indent, + deindent, + newline, + scopeId, + ssr + } = context; + const helpers = Array.from(ast.helpers); + const hasHelpers = helpers.length > 0; + const useWithBlock = !prefixIdentifiers && mode !== "module"; + const preambleContext = context; + { + genFunctionPreamble(ast, preambleContext); + } + const functionName = ssr ? `ssrRender` : `render`; + const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; + const signature = args.join(", "); + { + push(`function ${functionName}(${signature}) {`); + } + indent(); + if (useWithBlock) { + push(`with (_ctx) {`); + indent(); + if (hasHelpers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue +`, + -1 /* End */ + ); + newline(); + } + } + if (ast.components.length) { + genAssets(ast.components, "component", context); + if (ast.directives.length || ast.temps > 0) { + newline(); + } + } + if (ast.directives.length) { + genAssets(ast.directives, "directive", context); + if (ast.temps > 0) { + newline(); + } + } + if (ast.filters && ast.filters.length) { + newline(); + genAssets(ast.filters, "filter", context); + newline(); + } + if (ast.temps > 0) { + push(`let `); + for (let i = 0; i < ast.temps; i++) { + push(`${i > 0 ? `, ` : ``}_temp${i}`); + } + } + if (ast.components.length || ast.directives.length || ast.temps) { + push(` +`, 0 /* Start */); + newline(); + } + if (!ssr) { + push(`return `); + } + if (ast.codegenNode) { + genNode(ast.codegenNode, context); + } else { + push(`null`); + } + if (useWithBlock) { + deindent(); + push(`}`); + } + deindent(); + push(`}`); + return { + ast, + code: context.code, + preamble: ``, + map: context.map ? context.map.toJSON() : void 0 + }; + } + function genFunctionPreamble(ast, context) { + const { + ssr, + prefixIdentifiers, + push, + newline, + runtimeModuleName, + runtimeGlobalName, + ssrRuntimeModuleName + } = context; + const VueBinding = runtimeGlobalName; + const helpers = Array.from(ast.helpers); + if (helpers.length > 0) { + { + push(`const _Vue = ${VueBinding} +`, -1 /* End */); + if (ast.hoists.length) { + const staticHelpers = [ + CREATE_VNODE, + CREATE_ELEMENT_VNODE, + CREATE_COMMENT, + CREATE_TEXT, + CREATE_STATIC + ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); + push(`const { ${staticHelpers} } = _Vue +`, -1 /* End */); + } + } + } + genHoists(ast.hoists, context); + newline(); + push(`return `); + } + function genAssets(assets, type, { helper, push, newline, isTS }) { + const resolver = helper( + type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE + ); + for (let i = 0; i < assets.length; i++) { + let id = assets[i]; + const maybeSelfReference = id.endsWith("__self"); + if (maybeSelfReference) { + id = id.slice(0, -6); + } + push( + `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` + ); + if (i < assets.length - 1) { + newline(); + } + } + } + function genHoists(hoists, context) { + if (!hoists.length) { + return; + } + context.pure = true; + const { push, newline } = context; + newline(); + for (let i = 0; i < hoists.length; i++) { + const exp = hoists[i]; + if (exp) { + push(`const _hoisted_${i + 1} = `); + genNode(exp, context); + newline(); + } + } + context.pure = false; + } + function isText(n) { + return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; + } + function genNodeListAsArray(nodes, context) { + const multilines = nodes.length > 3 || nodes.some((n) => isArray(n) || !isText(n)); + context.push(`[`); + multilines && context.indent(); + genNodeList(nodes, context, multilines); + multilines && context.deindent(); + context.push(`]`); + } + function genNodeList(nodes, context, multilines = false, comma = true) { + const { push, newline } = context; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (isString(node)) { + push(node, -3 /* Unknown */); + } else if (isArray(node)) { + genNodeListAsArray(node, context); + } else { + genNode(node, context); + } + if (i < nodes.length - 1) { + if (multilines) { + comma && push(","); + newline(); + } else { + comma && push(", "); + } + } + } + } + function genNode(node, context) { + if (isString(node)) { + context.push(node, -3 /* Unknown */); + return; + } + if (isSymbol(node)) { + context.push(context.helper(node)); + return; + } + switch (node.type) { + case 1: + case 9: + case 11: + assert( + node.codegenNode != null, + `Codegen node is missing for element/if/for node. Apply appropriate transforms first.` + ); + genNode(node.codegenNode, context); + break; + case 2: + genText(node, context); + break; + case 4: + genExpression(node, context); + break; + case 5: + genInterpolation(node, context); + break; + case 12: + genNode(node.codegenNode, context); + break; + case 8: + genCompoundExpression(node, context); + break; + case 3: + genComment(node, context); + break; + case 13: + genVNodeCall(node, context); + break; + case 14: + genCallExpression(node, context); + break; + case 15: + genObjectExpression(node, context); + break; + case 17: + genArrayExpression(node, context); + break; + case 18: + genFunctionExpression(node, context); + break; + case 19: + genConditionalExpression(node, context); + break; + case 20: + genCacheExpression(node, context); + break; + case 21: + genNodeList(node.body, context, true, false); + break; + // SSR only types + case 22: + break; + case 23: + break; + case 24: + break; + case 25: + break; + case 26: + break; + /* v8 ignore start */ + case 10: + break; + default: + { + assert(false, `unhandled codegen node type: ${node.type}`); + const exhaustiveCheck = node; + return exhaustiveCheck; + } + } + } + function genText(node, context) { + context.push(JSON.stringify(node.content), -3 /* Unknown */, node); + } + function genExpression(node, context) { + const { content, isStatic } = node; + context.push( + isStatic ? JSON.stringify(content) : content, + -3 /* Unknown */, + node + ); + } + function genInterpolation(node, context) { + const { push, helper, pure } = context; + if (pure) push(PURE_ANNOTATION); + push(`${helper(TO_DISPLAY_STRING)}(`); + genNode(node.content, context); + push(`)`); + } + function genCompoundExpression(node, context) { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child)) { + context.push(child, -3 /* Unknown */); + } else { + genNode(child, context); + } + } + } + function genExpressionAsPropertyKey(node, context) { + const { push } = context; + if (node.type === 8) { + push(`[`); + genCompoundExpression(node, context); + push(`]`); + } else if (node.isStatic) { + const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); + push(text, -2 /* None */, node); + } else { + push(`[${node.content}]`, -3 /* Unknown */, node); + } + } + function genComment(node, context) { + const { push, helper, pure } = context; + if (pure) { + push(PURE_ANNOTATION); + } + push( + `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, + -3 /* Unknown */, + node + ); + } + function genVNodeCall(node, context) { + const { push, helper, pure } = context; + const { + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent + } = node; + let patchFlagString; + if (patchFlag) { + { + if (patchFlag < 0) { + patchFlagString = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; + } else { + const flagNames = Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `); + patchFlagString = patchFlag + ` /* ${flagNames} */`; + } + } + } + if (directives) { + push(helper(WITH_DIRECTIVES) + `(`); + } + if (isBlock) { + push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); + } + if (pure) { + push(PURE_ANNOTATION); + } + const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); + push(helper(callHelper) + `(`, -2 /* None */, node); + genNodeList( + genNullableArgs([tag, props, children, patchFlagString, dynamicProps]), + context + ); + push(`)`); + if (isBlock) { + push(`)`); + } + if (directives) { + push(`, `); + genNode(directives, context); + push(`)`); + } + } + function genNullableArgs(args) { + let i = args.length; + while (i--) { + if (args[i] != null) break; + } + return args.slice(0, i + 1).map((arg) => arg || `null`); + } + function genCallExpression(node, context) { + const { push, helper, pure } = context; + const callee = isString(node.callee) ? node.callee : helper(node.callee); + if (pure) { + push(PURE_ANNOTATION); + } + push(callee + `(`, -2 /* None */, node); + genNodeList(node.arguments, context); + push(`)`); + } + function genObjectExpression(node, context) { + const { push, indent, deindent, newline } = context; + const { properties } = node; + if (!properties.length) { + push(`{}`, -2 /* None */, node); + return; + } + const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4); + push(multilines ? `{` : `{ `); + multilines && indent(); + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + genExpressionAsPropertyKey(key, context); + push(`: `); + genNode(value, context); + if (i < properties.length - 1) { + push(`,`); + newline(); + } + } + multilines && deindent(); + push(multilines ? `}` : ` }`); + } + function genArrayExpression(node, context) { + genNodeListAsArray(node.elements, context); + } + function genFunctionExpression(node, context) { + const { push, indent, deindent } = context; + const { params, returns, body, newline, isSlot } = node; + if (isSlot) { + push(`_${helperNameMap[WITH_CTX]}(`); + } + push(`(`, -2 /* None */, node); + if (isArray(params)) { + genNodeList(params, context); + } else if (params) { + genNode(params, context); + } + push(`) => `); + if (newline || body) { + push(`{`); + indent(); + } + if (returns) { + if (newline) { + push(`return `); + } + if (isArray(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); + } + } else if (body) { + genNode(body, context); + } + if (newline || body) { + deindent(); + push(`}`); + } + if (isSlot) { + if (node.isNonScopedSlot) { + push(`, undefined, true`); + } + push(`)`); + } + } + function genConditionalExpression(node, context) { + const { test, consequent, alternate, newline: needNewline } = node; + const { push, indent, deindent, newline } = context; + if (test.type === 4) { + const needsParens = !isSimpleIdentifier(test.content); + needsParens && push(`(`); + genExpression(test, context); + needsParens && push(`)`); + } else { + push(`(`); + genNode(test, context); + push(`)`); + } + needNewline && indent(); + context.indentLevel++; + needNewline || push(` `); + push(`? `); + genNode(consequent, context); + context.indentLevel--; + needNewline && newline(); + needNewline || push(` `); + push(`: `); + const isNested = alternate.type === 19; + if (!isNested) { + context.indentLevel++; + } + genNode(alternate, context); + if (!isNested) { + context.indentLevel--; + } + needNewline && deindent( + true + /* without newline */ + ); + } + function genCacheExpression(node, context) { + const { push, helper, indent, deindent, newline } = context; + const { needPauseTracking, needArraySpread } = node; + if (needArraySpread) { + push(`[...(`); + } + push(`_cache[${node.index}] || (`); + if (needPauseTracking) { + indent(); + push(`${helper(SET_BLOCK_TRACKING)}(-1`); + if (node.inVOnce) push(`, true`); + push(`),`); + newline(); + push(`(`); + } + push(`_cache[${node.index}] = `); + genNode(node.value, context); + if (needPauseTracking) { + push(`).cacheIndex = ${node.index},`); + newline(); + push(`${helper(SET_BLOCK_TRACKING)}(1),`); + newline(); + push(`_cache[${node.index}]`); + deindent(); + } + push(`)`); + if (needArraySpread) { + push(`)]`); + } + } + + const prohibitedKeywordRE = new RegExp( + "\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b" + ); + const stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g; + function validateBrowserExpression(node, context, asParams = false, asRawStatements = false) { + const exp = node.content; + if (!exp.trim()) { + return; + } + try { + new Function( + asRawStatements ? ` ${exp} ` : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}` + ); + } catch (e) { + let message = e.message; + const keywordMatch = exp.replace(stripStringRE, "").match(prohibitedKeywordRE); + if (keywordMatch) { + message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`; + } + context.onError( + createCompilerError( + 45, + node.loc, + void 0, + message + ) + ); + } + } + + const transformExpression = (node, context) => { + if (node.type === 5) { + node.content = processExpression( + node.content, + context + ); + } else if (node.type === 1) { + const memo = findDir(node, "memo"); + for (let i = 0; i < node.props.length; i++) { + const dir = node.props[i]; + if (dir.type === 7 && dir.name !== "for") { + const exp = dir.exp; + const arg = dir.arg; + if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor) + !(memo && arg && arg.type === 4 && arg.content === "key")) { + dir.exp = processExpression( + exp, + context, + // slot args must be processed as function params + dir.name === "slot" + ); + } + if (arg && arg.type === 4 && !arg.isStatic) { + dir.arg = processExpression(arg, context); + } + } + } + } + }; + function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { + { + { + validateBrowserExpression(node, context, asParams, asRawStatements); + } + return node; + } + } + function stringifyExpression(exp) { + if (isString(exp)) { + return exp; + } else if (exp.type === 4) { + return exp.content; + } else { + return exp.children.map(stringifyExpression).join(""); + } + } + + const transformIf = createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + (node, dir, context) => { + return processIf(node, dir, context, (ifNode, branch, isRoot) => { + const siblings = context.parent.children; + let i = siblings.indexOf(ifNode); + let key = 0; + while (i-- >= 0) { + const sibling = siblings[i]; + if (sibling && sibling.type === 9) { + key += sibling.branches.length; + } + } + return () => { + if (isRoot) { + ifNode.codegenNode = createCodegenNodeForBranch( + branch, + key, + context + ); + } else { + const parentCondition = getParentCondition(ifNode.codegenNode); + parentCondition.alternate = createCodegenNodeForBranch( + branch, + key + ifNode.branches.length - 1, + context + ); + } + }; + }); + } + ); + function processIf(node, dir, context, processCodegen) { + if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { + const loc = dir.exp ? dir.exp.loc : node.loc; + context.onError( + createCompilerError(28, dir.loc) + ); + dir.exp = createSimpleExpression(`true`, false, loc); + } + if (dir.exp) { + validateBrowserExpression(dir.exp, context); + } + if (dir.name === "if") { + const branch = createIfBranch(node, dir); + const ifNode = { + type: 9, + loc: cloneLoc(node.loc), + branches: [branch] + }; + context.replaceNode(ifNode); + if (processCodegen) { + return processCodegen(ifNode, branch, true); + } + } else { + const siblings = context.parent.children; + const comments = []; + let i = siblings.indexOf(node); + while (i-- >= -1) { + const sibling = siblings[i]; + if (sibling && sibling.type === 3) { + context.removeNode(sibling); + comments.unshift(sibling); + continue; + } + if (sibling && sibling.type === 2 && !sibling.content.trim().length) { + context.removeNode(sibling); + continue; + } + if (sibling && sibling.type === 9) { + if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { + context.onError( + createCompilerError(30, node.loc) + ); + } + context.removeNode(); + const branch = createIfBranch(node, dir); + if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition> + !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) { + branch.children = [...comments, ...branch.children]; + } + { + const key = branch.userKey; + if (key) { + sibling.branches.forEach(({ userKey }) => { + if (isSameKey(userKey, key)) { + context.onError( + createCompilerError( + 29, + branch.userKey.loc + ) + ); + } + }); + } + } + sibling.branches.push(branch); + const onExit = processCodegen && processCodegen(sibling, branch, false); + traverseNode(branch, context); + if (onExit) onExit(); + context.currentNode = null; + } else { + context.onError( + createCompilerError(30, node.loc) + ); + } + break; + } + } + } + function createIfBranch(node, dir) { + const isTemplateIf = node.tagType === 3; + return { + type: 10, + loc: node.loc, + condition: dir.name === "else" ? void 0 : dir.exp, + children: isTemplateIf && !findDir(node, "for") ? node.children : [node], + userKey: findProp(node, `key`), + isTemplateIf + }; + } + function createCodegenNodeForBranch(branch, keyIndex, context) { + if (branch.condition) { + return createConditionalExpression( + branch.condition, + createChildrenCodegenNode(branch, keyIndex, context), + // make sure to pass in asBlock: true so that the comment node call + // closes the current block. + createCallExpression(context.helper(CREATE_COMMENT), [ + '"v-if"' , + "true" + ]) + ); + } else { + return createChildrenCodegenNode(branch, keyIndex, context); + } + } + function createChildrenCodegenNode(branch, keyIndex, context) { + const { helper } = context; + const keyProperty = createObjectProperty( + `key`, + createSimpleExpression( + `${keyIndex}`, + false, + locStub, + 2 + ) + ); + const { children } = branch; + const firstChild = children[0]; + const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; + if (needFragmentWrapper) { + if (children.length === 1 && firstChild.type === 11) { + const vnodeCall = firstChild.codegenNode; + injectProp(vnodeCall, keyProperty, context); + return vnodeCall; + } else { + let patchFlag = 64; + if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + } + return createVNodeCall( + context, + helper(FRAGMENT), + createObjectExpression([keyProperty]), + children, + patchFlag, + void 0, + void 0, + true, + false, + false, + branch.loc + ); + } + } else { + const ret = firstChild.codegenNode; + const vnodeCall = getMemoedVNodeCall(ret); + if (vnodeCall.type === 13) { + convertToBlock(vnodeCall, context); + } + injectProp(vnodeCall, keyProperty, context); + return ret; + } + } + function isSameKey(a, b) { + if (!a || a.type !== b.type) { + return false; + } + if (a.type === 6) { + if (a.value.content !== b.value.content) { + return false; + } + } else { + const exp = a.exp; + const branchExp = b.exp; + if (exp.type !== branchExp.type) { + return false; + } + if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { + return false; + } + } + return true; + } + function getParentCondition(node) { + while (true) { + if (node.type === 19) { + if (node.alternate.type === 19) { + node = node.alternate; + } else { + return node; + } + } else if (node.type === 20) { + node = node.value; + } + } + } + + const transformBind = (dir, _node, context) => { + const { modifiers, loc } = dir; + const arg = dir.arg; + let { exp } = dir; + if (exp && exp.type === 4 && !exp.content.trim()) { + { + exp = void 0; + } + } + if (!exp) { + if (arg.type !== 4 || !arg.isStatic) { + context.onError( + createCompilerError( + 52, + arg.loc + ) + ); + return { + props: [ + createObjectProperty(arg, createSimpleExpression("", true, loc)) + ] + }; + } + transformBindShorthand(dir); + exp = dir.exp; + } + if (arg.type !== 4) { + arg.children.unshift(`(`); + arg.children.push(`) || ""`); + } else if (!arg.isStatic) { + arg.content = `${arg.content} || ""`; + } + if (modifiers.some((mod) => mod.content === "camel")) { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = camelize(arg.content); + } else { + arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; + } + } else { + arg.children.unshift(`${context.helperString(CAMELIZE)}(`); + arg.children.push(`)`); + } + } + if (!context.inSSR) { + if (modifiers.some((mod) => mod.content === "prop")) { + injectPrefix(arg, "."); + } + if (modifiers.some((mod) => mod.content === "attr")) { + injectPrefix(arg, "^"); + } + } + return { + props: [createObjectProperty(arg, exp)] + }; + }; + const transformBindShorthand = (dir, context) => { + const arg = dir.arg; + const propName = camelize(arg.content); + dir.exp = createSimpleExpression(propName, false, arg.loc); + }; + const injectPrefix = (arg, prefix) => { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = prefix + arg.content; + } else { + arg.content = `\`${prefix}\${${arg.content}}\``; + } + } else { + arg.children.unshift(`'${prefix}' + (`); + arg.children.push(`)`); + } + }; + + const transformFor = createStructuralDirectiveTransform( + "for", + (node, dir, context) => { + const { helper, removeHelper } = context; + return processFor(node, dir, context, (forNode) => { + const renderExp = createCallExpression(helper(RENDER_LIST), [ + forNode.source + ]); + const isTemplate = isTemplateNode(node); + const memo = findDir(node, "memo"); + const keyProp = findProp(node, `key`, false, true); + const isDirKey = keyProp && keyProp.type === 7; + if (isDirKey && !keyProp.exp) { + transformBindShorthand(keyProp); + } + let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp); + const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null; + const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; + const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; + forNode.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + renderExp, + fragmentFlag, + void 0, + void 0, + true, + !isStableFragment, + false, + node.loc + ); + return () => { + let childBlock; + const { children } = forNode; + if (isTemplate) { + node.children.some((c) => { + if (c.type === 1) { + const key = findProp(c, "key"); + if (key) { + context.onError( + createCompilerError( + 33, + key.loc + ) + ); + return true; + } + } + }); + } + const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; + const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; + if (slotOutlet) { + childBlock = slotOutlet.codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + } else if (needFragmentWrapper) { + childBlock = createVNodeCall( + context, + helper(FRAGMENT), + keyProperty ? createObjectExpression([keyProperty]) : void 0, + node.children, + 64, + void 0, + void 0, + true, + void 0, + false + ); + } else { + childBlock = children[0].codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + if (childBlock.isBlock !== !isStableFragment) { + if (childBlock.isBlock) { + removeHelper(OPEN_BLOCK); + removeHelper( + getVNodeBlockHelper(context.inSSR, childBlock.isComponent) + ); + } else { + removeHelper( + getVNodeHelper(context.inSSR, childBlock.isComponent) + ); + } + } + childBlock.isBlock = !isStableFragment; + if (childBlock.isBlock) { + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); + } else { + helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); + } + } + if (memo) { + const loop = createFunctionExpression( + createForLoopParams(forNode.parseResult, [ + createSimpleExpression(`_cached`) + ]) + ); + loop.body = createBlockStatement([ + createCompoundExpression([`const _memo = (`, memo.exp, `)`]), + createCompoundExpression([ + `if (_cached`, + ...keyExp ? [` && _cached.key === `, keyExp] : [], + ` && ${context.helperString( + IS_MEMO_SAME + )}(_cached, _memo)) return _cached` + ]), + createCompoundExpression([`const _item = `, childBlock]), + createSimpleExpression(`_item.memo = _memo`), + createSimpleExpression(`return _item`) + ]); + renderExp.arguments.push( + loop, + createSimpleExpression(`_cache`), + createSimpleExpression(String(context.cached.length)) + ); + context.cached.push(null); + } else { + renderExp.arguments.push( + createFunctionExpression( + createForLoopParams(forNode.parseResult), + childBlock, + true + ) + ); + } + }; + }); + } + ); + function processFor(node, dir, context, processCodegen) { + if (!dir.exp) { + context.onError( + createCompilerError(31, dir.loc) + ); + return; + } + const parseResult = dir.forParseResult; + if (!parseResult) { + context.onError( + createCompilerError(32, dir.loc) + ); + return; + } + finalizeForParseResult(parseResult, context); + const { addIdentifiers, removeIdentifiers, scopes } = context; + const { source, value, key, index } = parseResult; + const forNode = { + type: 11, + loc: dir.loc, + source, + valueAlias: value, + keyAlias: key, + objectIndexAlias: index, + parseResult, + children: isTemplateNode(node) ? node.children : [node] + }; + context.replaceNode(forNode); + scopes.vFor++; + const onExit = processCodegen && processCodegen(forNode); + return () => { + scopes.vFor--; + if (onExit) onExit(); + }; + } + function finalizeForParseResult(result, context) { + if (result.finalized) return; + { + validateBrowserExpression(result.source, context); + if (result.key) { + validateBrowserExpression( + result.key, + context, + true + ); + } + if (result.index) { + validateBrowserExpression( + result.index, + context, + true + ); + } + if (result.value) { + validateBrowserExpression( + result.value, + context, + true + ); + } + } + result.finalized = true; + } + function createForLoopParams({ value, key, index }, memoArgs = []) { + return createParamsList([value, key, index, ...memoArgs]); + } + function createParamsList(args) { + let i = args.length; + while (i--) { + if (args[i]) break; + } + return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); + } + + const defaultFallback = createSimpleExpression(`undefined`, false); + const trackSlotScopes = (node, context) => { + if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { + const vSlot = findDir(node, "slot"); + if (vSlot) { + vSlot.exp; + context.scopes.vSlot++; + return () => { + context.scopes.vSlot--; + }; + } + } + }; + const trackVForSlotScopes = (node, context) => { + let vFor; + if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) { + const result = vFor.forParseResult; + if (result) { + finalizeForParseResult(result, context); + const { value, key, index } = result; + const { addIdentifiers, removeIdentifiers } = context; + value && addIdentifiers(value); + key && addIdentifiers(key); + index && addIdentifiers(index); + return () => { + value && removeIdentifiers(value); + key && removeIdentifiers(key); + index && removeIdentifiers(index); + }; + } + } + }; + const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( + props, + children, + false, + true, + children.length ? children[0].loc : loc + ); + function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { + context.helper(WITH_CTX); + const { children, loc } = node; + const slotsProperties = []; + const dynamicSlots = []; + let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; + const onComponentSlot = findDir(node, "slot", true); + if (onComponentSlot) { + const { arg, exp } = onComponentSlot; + if (arg && !isStaticExp(arg)) { + hasDynamicSlots = true; + } + slotsProperties.push( + createObjectProperty( + arg || createSimpleExpression("default", true), + buildSlotFn(exp, void 0, children, loc) + ) + ); + } + let hasTemplateSlots = false; + let hasNamedDefaultSlot = false; + const implicitDefaultChildren = []; + const seenSlotNames = /* @__PURE__ */ new Set(); + let conditionalBranchIndex = 0; + for (let i = 0; i < children.length; i++) { + const slotElement = children[i]; + let slotDir; + if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { + if (slotElement.type !== 3) { + implicitDefaultChildren.push(slotElement); + } + continue; + } + if (onComponentSlot) { + context.onError( + createCompilerError(37, slotDir.loc) + ); + break; + } + hasTemplateSlots = true; + const { children: slotChildren, loc: slotLoc } = slotElement; + const { + arg: slotName = createSimpleExpression(`default`, true), + exp: slotProps, + loc: dirLoc + } = slotDir; + let staticSlotName; + if (isStaticExp(slotName)) { + staticSlotName = slotName ? slotName.content : `default`; + } else { + hasDynamicSlots = true; + } + const vFor = findDir(slotElement, "for"); + const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); + let vIf; + let vElse; + if (vIf = findDir(slotElement, "if")) { + hasDynamicSlots = true; + dynamicSlots.push( + createConditionalExpression( + vIf.exp, + buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), + defaultFallback + ) + ); + } else if (vElse = findDir( + slotElement, + /^else(-if)?$/, + true + /* allowEmpty */ + )) { + let j = i; + let prev; + while (j--) { + prev = children[j]; + if (prev.type !== 3) { + break; + } + } + if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) { + let conditional = dynamicSlots[dynamicSlots.length - 1]; + while (conditional.alternate.type === 19) { + conditional = conditional.alternate; + } + conditional.alternate = vElse.exp ? createConditionalExpression( + vElse.exp, + buildDynamicSlot( + slotName, + slotFunction, + conditionalBranchIndex++ + ), + defaultFallback + ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); + } else { + context.onError( + createCompilerError(30, vElse.loc) + ); + } + } else if (vFor) { + hasDynamicSlots = true; + const parseResult = vFor.forParseResult; + if (parseResult) { + finalizeForParseResult(parseResult, context); + dynamicSlots.push( + createCallExpression(context.helper(RENDER_LIST), [ + parseResult.source, + createFunctionExpression( + createForLoopParams(parseResult), + buildDynamicSlot(slotName, slotFunction), + true + ) + ]) + ); + } else { + context.onError( + createCompilerError( + 32, + vFor.loc + ) + ); + } + } else { + if (staticSlotName) { + if (seenSlotNames.has(staticSlotName)) { + context.onError( + createCompilerError( + 38, + dirLoc + ) + ); + continue; + } + seenSlotNames.add(staticSlotName); + if (staticSlotName === "default") { + hasNamedDefaultSlot = true; + } + } + slotsProperties.push(createObjectProperty(slotName, slotFunction)); + } + } + if (!onComponentSlot) { + const buildDefaultSlotProperty = (props, children2) => { + const fn = buildSlotFn(props, void 0, children2, loc); + if (context.compatConfig) { + fn.isNonScopedSlot = true; + } + return createObjectProperty(`default`, fn); + }; + if (!hasTemplateSlots) { + slotsProperties.push(buildDefaultSlotProperty(void 0, children)); + } else if (implicitDefaultChildren.length && // #3766 + // with whitespace: 'preserve', whitespaces between slots will end up in + // implicitDefaultChildren. Ignore if all implicit children are whitespaces. + implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { + if (hasNamedDefaultSlot) { + context.onError( + createCompilerError( + 39, + implicitDefaultChildren[0].loc + ) + ); + } else { + slotsProperties.push( + buildDefaultSlotProperty(void 0, implicitDefaultChildren) + ); + } + } + } + const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; + let slots = createObjectExpression( + slotsProperties.concat( + createObjectProperty( + `_`, + // 2 = compiled but dynamic = can skip normalization, but must run diff + // 1 = compiled and static = can skip normalization AND diff as optimized + createSimpleExpression( + slotFlag + (` /* ${slotFlagsText[slotFlag]} */` ), + false + ) + ) + ), + loc + ); + if (dynamicSlots.length) { + slots = createCallExpression(context.helper(CREATE_SLOTS), [ + slots, + createArrayExpression(dynamicSlots) + ]); + } + return { + slots, + hasDynamicSlots + }; + } + function buildDynamicSlot(name, fn, index) { + const props = [ + createObjectProperty(`name`, name), + createObjectProperty(`fn`, fn) + ]; + if (index != null) { + props.push( + createObjectProperty(`key`, createSimpleExpression(String(index), true)) + ); + } + return createObjectExpression(props); + } + function hasForwardedSlots(children) { + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + if (child.tagType === 2 || hasForwardedSlots(child.children)) { + return true; + } + break; + case 9: + if (hasForwardedSlots(child.branches)) return true; + break; + case 10: + case 11: + if (hasForwardedSlots(child.children)) return true; + break; + } + } + return false; + } + function isNonWhitespaceContent(node) { + if (node.type !== 2 && node.type !== 12) + return true; + return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); + } + + const directiveImportMap = /* @__PURE__ */ new WeakMap(); + const transformElement = (node, context) => { + return function postTransformElement() { + node = context.currentNode; + if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { + return; + } + const { tag, props } = node; + const isComponent = node.tagType === 1; + let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; + const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; + let vnodeProps; + let vnodeChildren; + let patchFlag = 0; + let vnodeDynamicProps; + let dynamicPropNames; + let vnodeDirectives; + let shouldUseBlock = ( + // dynamic component may resolve to plain elements + isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block + // updates inside get proper isSVG flag at runtime. (#639, #643) + // This is technically web-specific, but splitting the logic out of core + // leads to too much unnecessary complexity. + (tag === "svg" || tag === "foreignObject" || tag === "math") + ); + if (props.length > 0) { + const propsBuildResult = buildProps( + node, + context, + void 0, + isComponent, + isDynamicComponent + ); + vnodeProps = propsBuildResult.props; + patchFlag = propsBuildResult.patchFlag; + dynamicPropNames = propsBuildResult.dynamicPropNames; + const directives = propsBuildResult.directives; + vnodeDirectives = directives && directives.length ? createArrayExpression( + directives.map((dir) => buildDirectiveArgs(dir, context)) + ) : void 0; + if (propsBuildResult.shouldUseBlock) { + shouldUseBlock = true; + } + } + if (node.children.length > 0) { + if (vnodeTag === KEEP_ALIVE) { + shouldUseBlock = true; + patchFlag |= 1024; + if (node.children.length > 1) { + context.onError( + createCompilerError(46, { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + }) + ); + } + } + const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling + vnodeTag !== TELEPORT && // explained above. + vnodeTag !== KEEP_ALIVE; + if (shouldBuildAsSlots) { + const { slots, hasDynamicSlots } = buildSlots(node, context); + vnodeChildren = slots; + if (hasDynamicSlots) { + patchFlag |= 1024; + } + } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { + const child = node.children[0]; + const type = child.type; + const hasDynamicTextChild = type === 5 || type === 8; + if (hasDynamicTextChild && getConstantType(child, context) === 0) { + patchFlag |= 1; + } + if (hasDynamicTextChild || type === 2) { + vnodeChildren = child; + } else { + vnodeChildren = node.children; + } + } else { + vnodeChildren = node.children; + } + } + if (dynamicPropNames && dynamicPropNames.length) { + vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); + } + node.codegenNode = createVNodeCall( + context, + vnodeTag, + vnodeProps, + vnodeChildren, + patchFlag === 0 ? void 0 : patchFlag, + vnodeDynamicProps, + vnodeDirectives, + !!shouldUseBlock, + false, + isComponent, + node.loc + ); + }; + }; + function resolveComponentType(node, context, ssr = false) { + let { tag } = node; + const isExplicitDynamic = isComponentTag(tag); + const isProp = findProp( + node, + "is", + false, + true + /* allow empty */ + ); + if (isProp) { + if (isExplicitDynamic || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + )) { + let exp; + if (isProp.type === 6) { + exp = isProp.value && createSimpleExpression(isProp.value.content, true); + } else { + exp = isProp.exp; + if (!exp) { + exp = createSimpleExpression(`is`, false, isProp.arg.loc); + } + } + if (exp) { + return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ + exp + ]); + } + } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { + tag = isProp.value.content.slice(4); + } + } + const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); + if (builtIn) { + if (!ssr) context.helper(builtIn); + return builtIn; + } + context.helper(RESOLVE_COMPONENT); + context.components.add(tag); + return toValidAssetId(tag, `component`); + } + function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { + const { tag, loc: elementLoc, children } = node; + let properties = []; + const mergeArgs = []; + const runtimeDirectives = []; + const hasChildren = children.length > 0; + let shouldUseBlock = false; + let patchFlag = 0; + let hasRef = false; + let hasClassBinding = false; + let hasStyleBinding = false; + let hasHydrationEventBinding = false; + let hasDynamicKeys = false; + let hasVnodeHook = false; + const dynamicPropNames = []; + const pushMergeArg = (arg) => { + if (properties.length) { + mergeArgs.push( + createObjectExpression(dedupeProperties(properties), elementLoc) + ); + properties = []; + } + if (arg) mergeArgs.push(arg); + }; + const pushRefVForMarker = () => { + if (context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); + } + }; + const analyzePatchFlag = ({ key, value }) => { + if (isStaticExp(key)) { + const name = key.content; + const isEventHandler = isOn(name); + if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click + // dedicated fast path. + name.toLowerCase() !== "onclick" && // omit v-model handlers + name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks + !isReservedProp(name)) { + hasHydrationEventBinding = true; + } + if (isEventHandler && isReservedProp(name)) { + hasVnodeHook = true; + } + if (isEventHandler && value.type === 14) { + value = value.arguments[0]; + } + if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { + return; + } + if (name === "ref") { + hasRef = true; + } else if (name === "class") { + hasClassBinding = true; + } else if (name === "style") { + hasStyleBinding = true; + } else if (name !== "key" && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + } else { + hasDynamicKeys = true; + } + }; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 6) { + const { loc, name, nameLoc, value } = prop; + let isStatic = true; + if (name === "ref") { + hasRef = true; + pushRefVForMarker(); + } + if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + properties.push( + createObjectProperty( + createSimpleExpression(name, true, nameLoc), + createSimpleExpression( + value ? value.content : "", + isStatic, + value ? value.loc : loc + ) + ) + ); + } else { + const { name, arg, exp, loc, modifiers } = prop; + const isVBind = name === "bind"; + const isVOn = name === "on"; + if (name === "slot") { + if (!isComponent) { + context.onError( + createCompilerError(40, loc) + ); + } + continue; + } + if (name === "once" || name === "memo") { + continue; + } + if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + if (isVOn && ssr) { + continue; + } + if ( + // #938: elements with dynamic keys should be forced into blocks + isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked + // before children + isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") + ) { + shouldUseBlock = true; + } + if (isVBind && isStaticArgOf(arg, "ref")) { + pushRefVForMarker(); + } + if (!arg && (isVBind || isVOn)) { + hasDynamicKeys = true; + if (exp) { + if (isVBind) { + pushRefVForMarker(); + pushMergeArg(); + { + { + const hasOverridableKeys = mergeArgs.some((arg2) => { + if (arg2.type === 15) { + return arg2.properties.some(({ key }) => { + if (key.type !== 4 || !key.isStatic) { + return true; + } + return key.content !== "class" && key.content !== "style" && !isOn(key.content); + }); + } else { + return true; + } + }); + if (hasOverridableKeys) { + checkCompatEnabled( + "COMPILER_V_BIND_OBJECT_ORDER", + context, + loc + ); + } + } + if (isCompatEnabled( + "COMPILER_V_BIND_OBJECT_ORDER", + context + )) { + mergeArgs.unshift(exp); + continue; + } + } + mergeArgs.push(exp); + } else { + pushMergeArg({ + type: 14, + loc, + callee: context.helper(TO_HANDLERS), + arguments: isComponent ? [exp] : [exp, `true`] + }); + } + } else { + context.onError( + createCompilerError( + isVBind ? 34 : 35, + loc + ) + ); + } + continue; + } + if (isVBind && modifiers.some((mod) => mod.content === "prop")) { + patchFlag |= 32; + } + const directiveTransform = context.directiveTransforms[name]; + if (directiveTransform) { + const { props: props2, needRuntime } = directiveTransform(prop, node, context); + !ssr && props2.forEach(analyzePatchFlag); + if (isVOn && arg && !isStaticExp(arg)) { + pushMergeArg(createObjectExpression(props2, elementLoc)); + } else { + properties.push(...props2); + } + if (needRuntime) { + runtimeDirectives.push(prop); + if (isSymbol(needRuntime)) { + directiveImportMap.set(prop, needRuntime); + } + } + } else if (!isBuiltInDirective(name)) { + runtimeDirectives.push(prop); + if (hasChildren) { + shouldUseBlock = true; + } + } + } + } + let propsExpression = void 0; + if (mergeArgs.length) { + pushMergeArg(); + if (mergeArgs.length > 1) { + propsExpression = createCallExpression( + context.helper(MERGE_PROPS), + mergeArgs, + elementLoc + ); + } else { + propsExpression = mergeArgs[0]; + } + } else if (properties.length) { + propsExpression = createObjectExpression( + dedupeProperties(properties), + elementLoc + ); + } + if (hasDynamicKeys) { + patchFlag |= 16; + } else { + if (hasClassBinding && !isComponent) { + patchFlag |= 2; + } + if (hasStyleBinding && !isComponent) { + patchFlag |= 4; + } + if (dynamicPropNames.length) { + patchFlag |= 8; + } + if (hasHydrationEventBinding) { + patchFlag |= 32; + } + } + if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { + patchFlag |= 512; + } + if (!context.inSSR && propsExpression) { + switch (propsExpression.type) { + case 15: + let classKeyIndex = -1; + let styleKeyIndex = -1; + let hasDynamicKey = false; + for (let i = 0; i < propsExpression.properties.length; i++) { + const key = propsExpression.properties[i].key; + if (isStaticExp(key)) { + if (key.content === "class") { + classKeyIndex = i; + } else if (key.content === "style") { + styleKeyIndex = i; + } + } else if (!key.isHandlerKey) { + hasDynamicKey = true; + } + } + const classProp = propsExpression.properties[classKeyIndex]; + const styleProp = propsExpression.properties[styleKeyIndex]; + if (!hasDynamicKey) { + if (classProp && !isStaticExp(classProp.value)) { + classProp.value = createCallExpression( + context.helper(NORMALIZE_CLASS), + [classProp.value] + ); + } + if (styleProp && // the static style is compiled into an object, + // so use `hasStyleBinding` to ensure that it is a dynamic style binding + (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, + // v-bind:style with static literal object + styleProp.value.type === 17)) { + styleProp.value = createCallExpression( + context.helper(NORMALIZE_STYLE), + [styleProp.value] + ); + } + } else { + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [propsExpression] + ); + } + break; + case 14: + break; + default: + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [ + createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ + propsExpression + ]) + ] + ); + break; + } + } + return { + props: propsExpression, + directives: runtimeDirectives, + patchFlag, + dynamicPropNames, + shouldUseBlock + }; + } + function dedupeProperties(properties) { + const knownProps = /* @__PURE__ */ new Map(); + const deduped = []; + for (let i = 0; i < properties.length; i++) { + const prop = properties[i]; + if (prop.key.type === 8 || !prop.key.isStatic) { + deduped.push(prop); + continue; + } + const name = prop.key.content; + const existing = knownProps.get(name); + if (existing) { + if (name === "style" || name === "class" || isOn(name)) { + mergeAsArray(existing, prop); + } + } else { + knownProps.set(name, prop); + deduped.push(prop); + } + } + return deduped; + } + function mergeAsArray(existing, incoming) { + if (existing.value.type === 17) { + existing.value.elements.push(incoming.value); + } else { + existing.value = createArrayExpression( + [existing.value, incoming.value], + existing.loc + ); + } + } + function buildDirectiveArgs(dir, context) { + const dirArgs = []; + const runtime = directiveImportMap.get(dir); + if (runtime) { + dirArgs.push(context.helperString(runtime)); + } else { + { + context.helper(RESOLVE_DIRECTIVE); + context.directives.add(dir.name); + dirArgs.push(toValidAssetId(dir.name, `directive`)); + } + } + const { loc } = dir; + if (dir.exp) dirArgs.push(dir.exp); + if (dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(dir.arg); + } + if (Object.keys(dir.modifiers).length) { + if (!dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(`void 0`); + } + const trueExpression = createSimpleExpression(`true`, false, loc); + dirArgs.push( + createObjectExpression( + dir.modifiers.map( + (modifier) => createObjectProperty(modifier, trueExpression) + ), + loc + ) + ); + } + return createArrayExpression(dirArgs, dir.loc); + } + function stringifyDynamicPropNames(props) { + let propsNamesString = `[`; + for (let i = 0, l = props.length; i < l; i++) { + propsNamesString += JSON.stringify(props[i]); + if (i < l - 1) propsNamesString += ", "; + } + return propsNamesString + `]`; + } + function isComponentTag(tag) { + return tag === "component" || tag === "Component"; + } + + const transformSlotOutlet = (node, context) => { + if (isSlotOutlet(node)) { + const { children, loc } = node; + const { slotName, slotProps } = processSlotOutlet(node, context); + const slotArgs = [ + context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, + slotName, + "{}", + "undefined", + "true" + ]; + let expectedLen = 2; + if (slotProps) { + slotArgs[2] = slotProps; + expectedLen = 3; + } + if (children.length) { + slotArgs[3] = createFunctionExpression([], children, false, false, loc); + expectedLen = 4; + } + if (context.scopeId && !context.slotted) { + expectedLen = 5; + } + slotArgs.splice(expectedLen); + node.codegenNode = createCallExpression( + context.helper(RENDER_SLOT), + slotArgs, + loc + ); + } + }; + function processSlotOutlet(node, context) { + let slotName = `"default"`; + let slotProps = void 0; + const nonNameProps = []; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (p.value) { + if (p.name === "name") { + slotName = JSON.stringify(p.value.content); + } else { + p.name = camelize(p.name); + nonNameProps.push(p); + } + } + } else { + if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { + if (p.exp) { + slotName = p.exp; + } else if (p.arg && p.arg.type === 4) { + const name = camelize(p.arg.content); + slotName = p.exp = createSimpleExpression(name, false, p.arg.loc); + } + } else { + if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { + p.arg.content = camelize(p.arg.content); + } + nonNameProps.push(p); + } + } + } + if (nonNameProps.length > 0) { + const { props, directives } = buildProps( + node, + context, + nonNameProps, + false, + false + ); + slotProps = props; + if (directives.length) { + context.onError( + createCompilerError( + 36, + directives[0].loc + ) + ); + } + } + return { + slotName, + slotProps + }; + } + + const transformOn$1 = (dir, node, context, augmentor) => { + const { loc, modifiers, arg } = dir; + if (!dir.exp && !modifiers.length) { + context.onError(createCompilerError(35, loc)); + } + let eventName; + if (arg.type === 4) { + if (arg.isStatic) { + let rawName = arg.content; + if (rawName.startsWith("vnode")) { + context.onError(createCompilerError(51, arg.loc)); + } + if (rawName.startsWith("vue:")) { + rawName = `vnode-${rawName.slice(4)}`; + } + const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( + // for non-element and vnode lifecycle event listeners, auto convert + // it to camelCase. See issue #2249 + toHandlerKey(camelize(rawName)) + ) : ( + // preserve case for plain element listeners that have uppercase + // letters, as these may be custom elements' custom events + `on:${rawName}` + ); + eventName = createSimpleExpression(eventString, true, arg.loc); + } else { + eventName = createCompoundExpression([ + `${context.helperString(TO_HANDLER_KEY)}(`, + arg, + `)` + ]); + } + } else { + eventName = arg; + eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); + eventName.children.push(`)`); + } + let exp = dir.exp; + if (exp && !exp.content.trim()) { + exp = void 0; + } + let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; + if (exp) { + const isMemberExp = isMemberExpression(exp); + const isInlineStatement = !(isMemberExp || isFnExpression(exp)); + const hasMultipleStatements = exp.content.includes(`;`); + { + validateBrowserExpression( + exp, + context, + false, + hasMultipleStatements + ); + } + if (isInlineStatement || shouldCache && isMemberExp) { + exp = createCompoundExpression([ + `${isInlineStatement ? `$event` : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, + exp, + hasMultipleStatements ? `}` : `)` + ]); + } + } + let ret = { + props: [ + createObjectProperty( + eventName, + exp || createSimpleExpression(`() => {}`, false, loc) + ) + ] + }; + if (augmentor) { + ret = augmentor(ret); + } + if (shouldCache) { + ret.props[0].value = context.cache(ret.props[0].value); + } + ret.props.forEach((p) => p.key.isHandlerKey = true); + return ret; + }; + + const transformText = (node, context) => { + if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { + return () => { + const children = node.children; + let currentContainer = void 0; + let hasText = false; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child)) { + hasText = true; + for (let j = i + 1; j < children.length; j++) { + const next = children[j]; + if (isText$1(next)) { + if (!currentContainer) { + currentContainer = children[i] = createCompoundExpression( + [child], + child.loc + ); + } + currentContainer.children.push(` + `, next); + children.splice(j, 1); + j--; + } else { + currentContainer = void 0; + break; + } + } + } + } + if (!hasText || // if this is a plain element with a single text child, leave it + // as-is since the runtime has dedicated fast path for this by directly + // setting textContent of the element. + // for component root it's always normalized anyway. + children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 + // custom directives can potentially add DOM elements arbitrarily, + // we need to avoid setting textContent of the element at runtime + // to avoid accidentally overwriting the DOM elements added + // by the user through custom directives. + !node.props.find( + (p) => p.type === 7 && !context.directiveTransforms[p.name] + ) && // in compat mode, <template> tags with no special directives + // will be rendered as a fragment so its children must be + // converted into vnodes. + !(node.tag === "template"))) { + return; + } + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child) || child.type === 8) { + const callArgs = []; + if (child.type !== 2 || child.content !== " ") { + callArgs.push(child); + } + if (!context.ssr && getConstantType(child, context) === 0) { + callArgs.push( + 1 + (` /* ${PatchFlagNames[1]} */` ) + ); + } + children[i] = { + type: 12, + content: child, + loc: child.loc, + codegenNode: createCallExpression( + context.helper(CREATE_TEXT), + callArgs + ) + }; + } + } + }; + } + }; + + const seen$1 = /* @__PURE__ */ new WeakSet(); + const transformOnce = (node, context) => { + if (node.type === 1 && findDir(node, "once", true)) { + if (seen$1.has(node) || context.inVOnce || context.inSSR) { + return; + } + seen$1.add(node); + context.inVOnce = true; + context.helper(SET_BLOCK_TRACKING); + return () => { + context.inVOnce = false; + const cur = context.currentNode; + if (cur.codegenNode) { + cur.codegenNode = context.cache( + cur.codegenNode, + true, + true + ); + } + }; + } + }; + + const transformModel$1 = (dir, node, context) => { + const { exp, arg } = dir; + if (!exp) { + context.onError( + createCompilerError(41, dir.loc) + ); + return createTransformProps(); + } + const rawExp = exp.loc.source.trim(); + const expString = exp.type === 4 ? exp.content : rawExp; + const bindingType = context.bindingMetadata[rawExp]; + if (bindingType === "props" || bindingType === "props-aliased") { + context.onError(createCompilerError(44, exp.loc)); + return createTransformProps(); + } + const maybeRef = false; + if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) { + context.onError( + createCompilerError(42, exp.loc) + ); + return createTransformProps(); + } + const propName = arg ? arg : createSimpleExpression("modelValue", true); + const eventName = arg ? isStaticExp(arg) ? `onUpdate:${camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; + let assignmentExp; + const eventArg = context.isTS ? `($event: any)` : `$event`; + { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + exp, + `) = $event)` + ]); + } + const props = [ + // modelValue: foo + createObjectProperty(propName, dir.exp), + // "onUpdate:modelValue": $event => (foo = $event) + createObjectProperty(eventName, assignmentExp) + ]; + if (dir.modifiers.length && node.tagType === 1) { + const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); + const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; + props.push( + createObjectProperty( + modifiersKey, + createSimpleExpression( + `{ ${modifiers} }`, + false, + dir.loc, + 2 + ) + ) + ); + } + return createTransformProps(props); + }; + function createTransformProps(props = []) { + return { props }; + } + + const validDivisionCharRE = /[\w).+\-_$\]]/; + const transformFilter = (node, context) => { + if (!isCompatEnabled("COMPILER_FILTERS", context)) { + return; + } + if (node.type === 5) { + rewriteFilter(node.content, context); + } else if (node.type === 1) { + node.props.forEach((prop) => { + if (prop.type === 7 && prop.name !== "for" && prop.exp) { + rewriteFilter(prop.exp, context); + } + }); + } + }; + function rewriteFilter(node, context) { + if (node.type === 4) { + parseFilter(node, context); + } else { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (typeof child !== "object") continue; + if (child.type === 4) { + parseFilter(child, context); + } else if (child.type === 8) { + rewriteFilter(node, context); + } else if (child.type === 5) { + rewriteFilter(child.content, context); + } + } + } + } + function parseFilter(node, context) { + const exp = node.content; + let inSingle = false; + let inDouble = false; + let inTemplateString = false; + let inRegex = false; + let curly = 0; + let square = 0; + let paren = 0; + let lastFilterIndex = 0; + let c, prev, i, expression, filters = []; + for (i = 0; i < exp.length; i++) { + prev = c; + c = exp.charCodeAt(i); + if (inSingle) { + if (c === 39 && prev !== 92) inSingle = false; + } else if (inDouble) { + if (c === 34 && prev !== 92) inDouble = false; + } else if (inTemplateString) { + if (c === 96 && prev !== 92) inTemplateString = false; + } else if (inRegex) { + if (c === 47 && prev !== 92) inRegex = false; + } else if (c === 124 && // pipe + exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) { + if (expression === void 0) { + lastFilterIndex = i + 1; + expression = exp.slice(0, i).trim(); + } else { + pushFilter(); + } + } else { + switch (c) { + case 34: + inDouble = true; + break; + // " + case 39: + inSingle = true; + break; + // ' + case 96: + inTemplateString = true; + break; + // ` + case 40: + paren++; + break; + // ( + case 41: + paren--; + break; + // ) + case 91: + square++; + break; + // [ + case 93: + square--; + break; + // ] + case 123: + curly++; + break; + // { + case 125: + curly--; + break; + } + if (c === 47) { + let j = i - 1; + let p; + for (; j >= 0; j--) { + p = exp.charAt(j); + if (p !== " ") break; + } + if (!p || !validDivisionCharRE.test(p)) { + inRegex = true; + } + } + } + } + if (expression === void 0) { + expression = exp.slice(0, i).trim(); + } else if (lastFilterIndex !== 0) { + pushFilter(); + } + function pushFilter() { + filters.push(exp.slice(lastFilterIndex, i).trim()); + lastFilterIndex = i + 1; + } + if (filters.length) { + warnDeprecation( + "COMPILER_FILTERS", + context, + node.loc + ); + for (i = 0; i < filters.length; i++) { + expression = wrapFilter(expression, filters[i], context); + } + node.content = expression; + node.ast = void 0; + } + } + function wrapFilter(exp, filter, context) { + context.helper(RESOLVE_FILTER); + const i = filter.indexOf("("); + if (i < 0) { + context.filters.add(filter); + return `${toValidAssetId(filter, "filter")}(${exp})`; + } else { + const name = filter.slice(0, i); + const args = filter.slice(i + 1); + context.filters.add(name); + return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`; + } + } + + const seen = /* @__PURE__ */ new WeakSet(); + const transformMemo = (node, context) => { + if (node.type === 1) { + const dir = findDir(node, "memo"); + if (!dir || seen.has(node)) { + return; + } + seen.add(node); + return () => { + const codegenNode = node.codegenNode || context.currentNode.codegenNode; + if (codegenNode && codegenNode.type === 13) { + if (node.tagType !== 1) { + convertToBlock(codegenNode, context); + } + node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ + dir.exp, + createFunctionExpression(void 0, codegenNode), + `_cache`, + String(context.cached.length) + ]); + context.cached.push(null); + } + }; + } + }; + + function getBaseTransformPreset(prefixIdentifiers) { + return [ + [ + transformOnce, + transformIf, + transformMemo, + transformFor, + ...[transformFilter] , + ...[transformExpression] , + transformSlotOutlet, + transformElement, + trackSlotScopes, + transformText + ], + { + on: transformOn$1, + bind: transformBind, + model: transformModel$1 + } + ]; + } + function baseCompile(source, options = {}) { + const onError = options.onError || defaultOnError; + const isModuleMode = options.mode === "module"; + { + if (options.prefixIdentifiers === true) { + onError(createCompilerError(47)); + } else if (isModuleMode) { + onError(createCompilerError(48)); + } + } + const prefixIdentifiers = false; + if (options.cacheHandlers) { + onError(createCompilerError(49)); + } + if (options.scopeId && !isModuleMode) { + onError(createCompilerError(50)); + } + const resolvedOptions = extend({}, options, { + prefixIdentifiers + }); + const ast = isString(source) ? baseParse(source, resolvedOptions) : source; + const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(); + transform( + ast, + extend({}, resolvedOptions, { + nodeTransforms: [ + ...nodeTransforms, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: extend( + {}, + directiveTransforms, + options.directiveTransforms || {} + // user transforms + ) + }) + ); + return generate(ast, resolvedOptions); + } + + const BindingTypes = { + "DATA": "data", + "PROPS": "props", + "PROPS_ALIASED": "props-aliased", + "SETUP_LET": "setup-let", + "SETUP_CONST": "setup-const", + "SETUP_REACTIVE_CONST": "setup-reactive-const", + "SETUP_MAYBE_REF": "setup-maybe-ref", + "SETUP_REF": "setup-ref", + "OPTIONS": "options", + "LITERAL_CONST": "literal-const" + }; + + const noopDirectiveTransform = () => ({ props: [] }); + + const V_MODEL_RADIO = Symbol(`vModelRadio` ); + const V_MODEL_CHECKBOX = Symbol( + `vModelCheckbox` + ); + const V_MODEL_TEXT = Symbol(`vModelText` ); + const V_MODEL_SELECT = Symbol( + `vModelSelect` + ); + const V_MODEL_DYNAMIC = Symbol( + `vModelDynamic` + ); + const V_ON_WITH_MODIFIERS = Symbol( + `vOnModifiersGuard` + ); + const V_ON_WITH_KEYS = Symbol( + `vOnKeysGuard` + ); + const V_SHOW = Symbol(`vShow` ); + const TRANSITION = Symbol(`Transition` ); + const TRANSITION_GROUP = Symbol( + `TransitionGroup` + ); + registerRuntimeHelpers({ + [V_MODEL_RADIO]: `vModelRadio`, + [V_MODEL_CHECKBOX]: `vModelCheckbox`, + [V_MODEL_TEXT]: `vModelText`, + [V_MODEL_SELECT]: `vModelSelect`, + [V_MODEL_DYNAMIC]: `vModelDynamic`, + [V_ON_WITH_MODIFIERS]: `withModifiers`, + [V_ON_WITH_KEYS]: `withKeys`, + [V_SHOW]: `vShow`, + [TRANSITION]: `Transition`, + [TRANSITION_GROUP]: `TransitionGroup` + }); + + let decoder; + function decodeHtmlBrowser(raw, asAttr = false) { + if (!decoder) { + decoder = document.createElement("div"); + } + if (asAttr) { + decoder.innerHTML = `<div foo="${raw.replace(/"/g, """)}">`; + return decoder.children[0].getAttribute("foo"); + } else { + decoder.innerHTML = raw; + return decoder.textContent; + } + } + + const parserOptions = { + parseMode: "html", + isVoidTag, + isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + isPreTag: (tag) => tag === "pre", + isIgnoreNewlineTag: (tag) => tag === "pre" || tag === "textarea", + decodeEntities: decodeHtmlBrowser , + isBuiltInComponent: (tag) => { + if (tag === "Transition" || tag === "transition") { + return TRANSITION; + } else if (tag === "TransitionGroup" || tag === "transition-group") { + return TRANSITION_GROUP; + } + }, + // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher + getNamespace(tag, parent, rootNamespace) { + let ns = parent ? parent.ns : rootNamespace; + if (parent && ns === 2) { + if (parent.tag === "annotation-xml") { + if (tag === "svg") { + return 1; + } + if (parent.props.some( + (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") + )) { + ns = 0; + } + } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { + ns = 0; + } + } else if (parent && ns === 1) { + if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { + ns = 0; + } + } + if (ns === 0) { + if (tag === "svg") { + return 1; + } + if (tag === "math") { + return 2; + } + } + return ns; + } + }; + + const transformStyle = (node) => { + if (node.type === 1) { + node.props.forEach((p, i) => { + if (p.type === 6 && p.name === "style" && p.value) { + node.props[i] = { + type: 7, + name: `bind`, + arg: createSimpleExpression(`style`, true, p.loc), + exp: parseInlineCSS(p.value.content, p.loc), + modifiers: [], + loc: p.loc + }; + } + }); + } + }; + const parseInlineCSS = (cssText, loc) => { + const normalized = parseStringStyle(cssText); + return createSimpleExpression( + JSON.stringify(normalized), + false, + loc, + 3 + ); + }; + + function createDOMCompilerError(code, loc) { + return createCompilerError( + code, + loc, + DOMErrorMessages + ); + } + const DOMErrorCodes = { + "X_V_HTML_NO_EXPRESSION": 53, + "53": "X_V_HTML_NO_EXPRESSION", + "X_V_HTML_WITH_CHILDREN": 54, + "54": "X_V_HTML_WITH_CHILDREN", + "X_V_TEXT_NO_EXPRESSION": 55, + "55": "X_V_TEXT_NO_EXPRESSION", + "X_V_TEXT_WITH_CHILDREN": 56, + "56": "X_V_TEXT_WITH_CHILDREN", + "X_V_MODEL_ON_INVALID_ELEMENT": 57, + "57": "X_V_MODEL_ON_INVALID_ELEMENT", + "X_V_MODEL_ARG_ON_ELEMENT": 58, + "58": "X_V_MODEL_ARG_ON_ELEMENT", + "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59, + "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", + "X_V_MODEL_UNNECESSARY_VALUE": 60, + "60": "X_V_MODEL_UNNECESSARY_VALUE", + "X_V_SHOW_NO_EXPRESSION": 61, + "61": "X_V_SHOW_NO_EXPRESSION", + "X_TRANSITION_INVALID_CHILDREN": 62, + "62": "X_TRANSITION_INVALID_CHILDREN", + "X_IGNORED_SIDE_EFFECT_TAG": 63, + "63": "X_IGNORED_SIDE_EFFECT_TAG", + "__EXTEND_POINT__": 64, + "64": "__EXTEND_POINT__" + }; + const DOMErrorMessages = { + [53]: `v-html is missing expression.`, + [54]: `v-html will override element children.`, + [55]: `v-text is missing expression.`, + [56]: `v-text will override element children.`, + [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, + [58]: `v-model argument is not supported on plain elements.`, + [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, + [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, + [61]: `v-show is missing expression.`, + [62]: `<Transition> expects exactly one child element or component.`, + [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` + }; + + const transformVHtml = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(53, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(54, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`innerHTML`, true, loc), + exp || createSimpleExpression("", true) + ) + ] + }; + }; + + const transformVText = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(55, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(56, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`textContent`, true), + exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression( + context.helperString(TO_DISPLAY_STRING), + [exp], + loc + ) : createSimpleExpression("", true) + ) + ] + }; + }; + + const transformModel = (dir, node, context) => { + const baseResult = transformModel$1(dir, node, context); + if (!baseResult.props.length || node.tagType === 1) { + return baseResult; + } + if (dir.arg) { + context.onError( + createDOMCompilerError( + 58, + dir.arg.loc + ) + ); + } + function checkDuplicatedValue() { + const value = findDir(node, "bind"); + if (value && isStaticArgOf(value.arg, "value")) { + context.onError( + createDOMCompilerError( + 60, + value.loc + ) + ); + } + } + const { tag } = node; + const isCustomElement = context.isCustomElement(tag); + if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { + let directiveToUse = V_MODEL_TEXT; + let isInvalidType = false; + if (tag === "input" || isCustomElement) { + const type = findProp(node, `type`); + if (type) { + if (type.type === 7) { + directiveToUse = V_MODEL_DYNAMIC; + } else if (type.value) { + switch (type.value.content) { + case "radio": + directiveToUse = V_MODEL_RADIO; + break; + case "checkbox": + directiveToUse = V_MODEL_CHECKBOX; + break; + case "file": + isInvalidType = true; + context.onError( + createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + default: + checkDuplicatedValue(); + break; + } + } + } else if (hasDynamicKeyVBind(node)) { + directiveToUse = V_MODEL_DYNAMIC; + } else { + checkDuplicatedValue(); + } + } else if (tag === "select") { + directiveToUse = V_MODEL_SELECT; + } else { + checkDuplicatedValue(); + } + if (!isInvalidType) { + baseResult.needRuntime = context.helper(directiveToUse); + } + } else { + context.onError( + createDOMCompilerError( + 57, + dir.loc + ) + ); + } + baseResult.props = baseResult.props.filter( + (p) => !(p.key.type === 4 && p.key.content === "modelValue") + ); + return baseResult; + }; + + const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`); + const isNonKeyModifier = /* @__PURE__ */ makeMap( + // event propagation management + `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` + ); + const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right"); + const isKeyboardEvent = /* @__PURE__ */ makeMap(`onkeyup,onkeydown,onkeypress`); + const resolveModifiers = (key, modifiers, context, loc) => { + const keyModifiers = []; + const nonKeyModifiers = []; + const eventOptionModifiers = []; + for (let i = 0; i < modifiers.length; i++) { + const modifier = modifiers[i].content; + if (modifier === "native" && checkCompatEnabled( + "COMPILER_V_ON_NATIVE", + context, + loc + )) { + eventOptionModifiers.push(modifier); + } else if (isEventOptionModifier(modifier)) { + eventOptionModifiers.push(modifier); + } else { + if (maybeKeyModifier(modifier)) { + if (isStaticExp(key)) { + if (isKeyboardEvent(key.content.toLowerCase())) { + keyModifiers.push(modifier); + } else { + nonKeyModifiers.push(modifier); + } + } else { + keyModifiers.push(modifier); + nonKeyModifiers.push(modifier); + } + } else { + if (isNonKeyModifier(modifier)) { + nonKeyModifiers.push(modifier); + } else { + keyModifiers.push(modifier); + } + } + } + } + return { + keyModifiers, + nonKeyModifiers, + eventOptionModifiers + }; + }; + const transformClick = (key, event) => { + const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick"; + return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([ + `(`, + key, + `) === "onClick" ? "${event}" : (`, + key, + `)` + ]) : key; + }; + const transformOn = (dir, node, context) => { + return transformOn$1(dir, node, context, (baseResult) => { + const { modifiers } = dir; + if (!modifiers.length) return baseResult; + let { key, value: handlerExp } = baseResult.props[0]; + const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); + if (nonKeyModifiers.includes("right")) { + key = transformClick(key, `onContextmenu`); + } + if (nonKeyModifiers.includes("middle")) { + key = transformClick(key, `onMouseup`); + } + if (nonKeyModifiers.length) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ + handlerExp, + JSON.stringify(nonKeyModifiers) + ]); + } + if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard + (!isStaticExp(key) || isKeyboardEvent(key.content.toLowerCase()))) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ + handlerExp, + JSON.stringify(keyModifiers) + ]); + } + if (eventOptionModifiers.length) { + const modifierPostfix = eventOptionModifiers.map(capitalize).join(""); + key = isStaticExp(key) ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); + } + return { + props: [createObjectProperty(key, handlerExp)] + }; + }); + }; + + const transformShow = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(61, loc) + ); + } + return { + props: [], + needRuntime: context.helper(V_SHOW) + }; + }; + + const transformTransition = (node, context) => { + if (node.type === 1 && node.tagType === 1) { + const component = context.isBuiltInComponent(node.tag); + if (component === TRANSITION) { + return () => { + if (!node.children.length) { + return; + } + if (hasMultipleChildren(node)) { + context.onError( + createDOMCompilerError( + 62, + { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + } + ) + ); + } + const child = node.children[0]; + if (child.type === 1) { + for (const p of child.props) { + if (p.type === 7 && p.name === "show") { + node.props.push({ + type: 6, + name: "persisted", + nameLoc: node.loc, + value: void 0, + loc: node.loc + }); + } + } + } + }; + } + } + }; + function hasMultipleChildren(node) { + const children = node.children = node.children.filter( + (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()) + ); + const child = children[0]; + return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren); + } + + const ignoreSideEffectTags = (node, context) => { + if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { + context.onError( + createDOMCompilerError( + 63, + node.loc + ) + ); + context.removeNode(); + } + }; + + function isValidHTMLNesting(parent, child) { + if (parent in onlyValidChildren) { + return onlyValidChildren[parent].has(child); + } + if (child in onlyValidParents) { + return onlyValidParents[child].has(parent); + } + if (parent in knownInvalidChildren) { + if (knownInvalidChildren[parent].has(child)) return false; + } + if (child in knownInvalidParents) { + if (knownInvalidParents[child].has(parent)) return false; + } + return true; + } + const headings = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]); + const emptySet = /* @__PURE__ */ new Set([]); + const onlyValidChildren = { + head: /* @__PURE__ */ new Set([ + "base", + "basefront", + "bgsound", + "link", + "meta", + "title", + "noscript", + "noframes", + "style", + "script", + "template" + ]), + optgroup: /* @__PURE__ */ new Set(["option"]), + select: /* @__PURE__ */ new Set(["optgroup", "option", "hr"]), + // table + table: /* @__PURE__ */ new Set(["caption", "colgroup", "tbody", "tfoot", "thead"]), + tr: /* @__PURE__ */ new Set(["td", "th"]), + colgroup: /* @__PURE__ */ new Set(["col"]), + tbody: /* @__PURE__ */ new Set(["tr"]), + thead: /* @__PURE__ */ new Set(["tr"]), + tfoot: /* @__PURE__ */ new Set(["tr"]), + // these elements can not have any children elements + script: emptySet, + iframe: emptySet, + option: emptySet, + textarea: emptySet, + style: emptySet, + title: emptySet + }; + const onlyValidParents = { + // sections + html: emptySet, + body: /* @__PURE__ */ new Set(["html"]), + head: /* @__PURE__ */ new Set(["html"]), + // table + td: /* @__PURE__ */ new Set(["tr"]), + colgroup: /* @__PURE__ */ new Set(["table"]), + caption: /* @__PURE__ */ new Set(["table"]), + tbody: /* @__PURE__ */ new Set(["table"]), + tfoot: /* @__PURE__ */ new Set(["table"]), + col: /* @__PURE__ */ new Set(["colgroup"]), + th: /* @__PURE__ */ new Set(["tr"]), + thead: /* @__PURE__ */ new Set(["table"]), + tr: /* @__PURE__ */ new Set(["tbody", "thead", "tfoot"]), + // data list + dd: /* @__PURE__ */ new Set(["dl", "div"]), + dt: /* @__PURE__ */ new Set(["dl", "div"]), + // other + figcaption: /* @__PURE__ */ new Set(["figure"]), + // li: new Set(["ul", "ol"]), + summary: /* @__PURE__ */ new Set(["details"]), + area: /* @__PURE__ */ new Set(["map"]) + }; + const knownInvalidChildren = { + p: /* @__PURE__ */ new Set([ + "address", + "article", + "aside", + "blockquote", + "center", + "details", + "dialog", + "dir", + "div", + "dl", + "fieldset", + "figure", + "footer", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "header", + "hgroup", + "hr", + "li", + "main", + "nav", + "menu", + "ol", + "p", + "pre", + "section", + "table", + "ul" + ]), + svg: /* @__PURE__ */ new Set([ + "b", + "blockquote", + "br", + "code", + "dd", + "div", + "dl", + "dt", + "em", + "embed", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "hr", + "i", + "img", + "li", + "menu", + "meta", + "ol", + "p", + "pre", + "ruby", + "s", + "small", + "span", + "strong", + "sub", + "sup", + "table", + "u", + "ul", + "var" + ]) + }; + const knownInvalidParents = { + a: /* @__PURE__ */ new Set(["a"]), + button: /* @__PURE__ */ new Set(["button"]), + dd: /* @__PURE__ */ new Set(["dd", "dt"]), + dt: /* @__PURE__ */ new Set(["dd", "dt"]), + form: /* @__PURE__ */ new Set(["form"]), + li: /* @__PURE__ */ new Set(["li"]), + h1: headings, + h2: headings, + h3: headings, + h4: headings, + h5: headings, + h6: headings + }; + + const validateHtmlNesting = (node, context) => { + if (node.type === 1 && node.tagType === 0 && context.parent && context.parent.type === 1 && context.parent.tagType === 0 && !isValidHTMLNesting(context.parent.tag, node.tag)) { + const error = new SyntaxError( + `<${node.tag}> cannot be child of <${context.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.` + ); + error.loc = node.loc; + context.onWarn(error); + } + }; + + const DOMNodeTransforms = [ + transformStyle, + ...[transformTransition, validateHtmlNesting] + ]; + const DOMDirectiveTransforms = { + cloak: noopDirectiveTransform, + html: transformVHtml, + text: transformVText, + model: transformModel, + // override compiler-core + on: transformOn, + // override compiler-core + show: transformShow + }; + function compile(src, options = {}) { + return baseCompile( + src, + extend({}, parserOptions, options, { + nodeTransforms: [ + // ignore <script> and <tag> + // this is not put inside DOMNodeTransforms because that list is used + // by compiler-ssr to generate vnode fallback branches + ignoreSideEffectTags, + ...DOMNodeTransforms, + ...options.nodeTransforms || [] + ], + directiveTransforms: extend( + {}, + DOMDirectiveTransforms, + options.directiveTransforms || {} + ), + transformHoist: null + }) + ); + } + function parse(template, options = {}) { + return baseParse(template, extend({}, parserOptions, options)); + } + + exports.BASE_TRANSITION = BASE_TRANSITION; + exports.BindingTypes = BindingTypes; + exports.CAMELIZE = CAMELIZE; + exports.CAPITALIZE = CAPITALIZE; + exports.CREATE_BLOCK = CREATE_BLOCK; + exports.CREATE_COMMENT = CREATE_COMMENT; + exports.CREATE_ELEMENT_BLOCK = CREATE_ELEMENT_BLOCK; + exports.CREATE_ELEMENT_VNODE = CREATE_ELEMENT_VNODE; + exports.CREATE_SLOTS = CREATE_SLOTS; + exports.CREATE_STATIC = CREATE_STATIC; + exports.CREATE_TEXT = CREATE_TEXT; + exports.CREATE_VNODE = CREATE_VNODE; + exports.CompilerDeprecationTypes = CompilerDeprecationTypes; + exports.ConstantTypes = ConstantTypes; + exports.DOMDirectiveTransforms = DOMDirectiveTransforms; + exports.DOMErrorCodes = DOMErrorCodes; + exports.DOMErrorMessages = DOMErrorMessages; + exports.DOMNodeTransforms = DOMNodeTransforms; + exports.ElementTypes = ElementTypes; + exports.ErrorCodes = ErrorCodes; + exports.FRAGMENT = FRAGMENT; + exports.GUARD_REACTIVE_PROPS = GUARD_REACTIVE_PROPS; + exports.IS_MEMO_SAME = IS_MEMO_SAME; + exports.IS_REF = IS_REF; + exports.KEEP_ALIVE = KEEP_ALIVE; + exports.MERGE_PROPS = MERGE_PROPS; + exports.NORMALIZE_CLASS = NORMALIZE_CLASS; + exports.NORMALIZE_PROPS = NORMALIZE_PROPS; + exports.NORMALIZE_STYLE = NORMALIZE_STYLE; + exports.Namespaces = Namespaces; + exports.NodeTypes = NodeTypes; + exports.OPEN_BLOCK = OPEN_BLOCK; + exports.POP_SCOPE_ID = POP_SCOPE_ID; + exports.PUSH_SCOPE_ID = PUSH_SCOPE_ID; + exports.RENDER_LIST = RENDER_LIST; + exports.RENDER_SLOT = RENDER_SLOT; + exports.RESOLVE_COMPONENT = RESOLVE_COMPONENT; + exports.RESOLVE_DIRECTIVE = RESOLVE_DIRECTIVE; + exports.RESOLVE_DYNAMIC_COMPONENT = RESOLVE_DYNAMIC_COMPONENT; + exports.RESOLVE_FILTER = RESOLVE_FILTER; + exports.SET_BLOCK_TRACKING = SET_BLOCK_TRACKING; + exports.SUSPENSE = SUSPENSE; + exports.TELEPORT = TELEPORT; + exports.TO_DISPLAY_STRING = TO_DISPLAY_STRING; + exports.TO_HANDLERS = TO_HANDLERS; + exports.TO_HANDLER_KEY = TO_HANDLER_KEY; + exports.TRANSITION = TRANSITION; + exports.TRANSITION_GROUP = TRANSITION_GROUP; + exports.TS_NODE_TYPES = TS_NODE_TYPES; + exports.UNREF = UNREF; + exports.V_MODEL_CHECKBOX = V_MODEL_CHECKBOX; + exports.V_MODEL_DYNAMIC = V_MODEL_DYNAMIC; + exports.V_MODEL_RADIO = V_MODEL_RADIO; + exports.V_MODEL_SELECT = V_MODEL_SELECT; + exports.V_MODEL_TEXT = V_MODEL_TEXT; + exports.V_ON_WITH_KEYS = V_ON_WITH_KEYS; + exports.V_ON_WITH_MODIFIERS = V_ON_WITH_MODIFIERS; + exports.V_SHOW = V_SHOW; + exports.WITH_CTX = WITH_CTX; + exports.WITH_DIRECTIVES = WITH_DIRECTIVES; + exports.WITH_MEMO = WITH_MEMO; + exports.advancePositionWithClone = advancePositionWithClone; + exports.advancePositionWithMutation = advancePositionWithMutation; + exports.assert = assert; + exports.baseCompile = baseCompile; + exports.baseParse = baseParse; + exports.buildDirectiveArgs = buildDirectiveArgs; + exports.buildProps = buildProps; + exports.buildSlots = buildSlots; + exports.checkCompatEnabled = checkCompatEnabled; + exports.compile = compile; + exports.convertToBlock = convertToBlock; + exports.createArrayExpression = createArrayExpression; + exports.createAssignmentExpression = createAssignmentExpression; + exports.createBlockStatement = createBlockStatement; + exports.createCacheExpression = createCacheExpression; + exports.createCallExpression = createCallExpression; + exports.createCompilerError = createCompilerError; + exports.createCompoundExpression = createCompoundExpression; + exports.createConditionalExpression = createConditionalExpression; + exports.createDOMCompilerError = createDOMCompilerError; + exports.createForLoopParams = createForLoopParams; + exports.createFunctionExpression = createFunctionExpression; + exports.createIfStatement = createIfStatement; + exports.createInterpolation = createInterpolation; + exports.createObjectExpression = createObjectExpression; + exports.createObjectProperty = createObjectProperty; + exports.createReturnStatement = createReturnStatement; + exports.createRoot = createRoot; + exports.createSequenceExpression = createSequenceExpression; + exports.createSimpleExpression = createSimpleExpression; + exports.createStructuralDirectiveTransform = createStructuralDirectiveTransform; + exports.createTemplateLiteral = createTemplateLiteral; + exports.createTransformContext = createTransformContext; + exports.createVNodeCall = createVNodeCall; + exports.errorMessages = errorMessages; + exports.extractIdentifiers = extractIdentifiers; + exports.findDir = findDir; + exports.findProp = findProp; + exports.forAliasRE = forAliasRE; + exports.generate = generate; + exports.generateCodeFrame = generateCodeFrame; + exports.getBaseTransformPreset = getBaseTransformPreset; + exports.getConstantType = getConstantType; + exports.getMemoedVNodeCall = getMemoedVNodeCall; + exports.getVNodeBlockHelper = getVNodeBlockHelper; + exports.getVNodeHelper = getVNodeHelper; + exports.hasDynamicKeyVBind = hasDynamicKeyVBind; + exports.hasScopeRef = hasScopeRef; + exports.helperNameMap = helperNameMap; + exports.injectProp = injectProp; + exports.isCoreComponent = isCoreComponent; + exports.isFnExpression = isFnExpression; + exports.isFnExpressionBrowser = isFnExpressionBrowser; + exports.isFnExpressionNode = isFnExpressionNode; + exports.isFunctionType = isFunctionType; + exports.isInDestructureAssignment = isInDestructureAssignment; + exports.isInNewExpression = isInNewExpression; + exports.isMemberExpression = isMemberExpression; + exports.isMemberExpressionBrowser = isMemberExpressionBrowser; + exports.isMemberExpressionNode = isMemberExpressionNode; + exports.isReferencedIdentifier = isReferencedIdentifier; + exports.isSimpleIdentifier = isSimpleIdentifier; + exports.isSlotOutlet = isSlotOutlet; + exports.isStaticArgOf = isStaticArgOf; + exports.isStaticExp = isStaticExp; + exports.isStaticProperty = isStaticProperty; + exports.isStaticPropertyKey = isStaticPropertyKey; + exports.isTemplateNode = isTemplateNode; + exports.isText = isText$1; + exports.isVSlot = isVSlot; + exports.locStub = locStub; + exports.noopDirectiveTransform = noopDirectiveTransform; + exports.parse = parse; + exports.parserOptions = parserOptions; + exports.processExpression = processExpression; + exports.processFor = processFor; + exports.processIf = processIf; + exports.processSlotOutlet = processSlotOutlet; + exports.registerRuntimeHelpers = registerRuntimeHelpers; + exports.resolveComponentType = resolveComponentType; + exports.stringifyExpression = stringifyExpression; + exports.toValidAssetId = toValidAssetId; + exports.trackSlotScopes = trackSlotScopes; + exports.trackVForSlotScopes = trackVForSlotScopes; + exports.transform = transform; + exports.transformBind = transformBind; + exports.transformElement = transformElement; + exports.transformExpression = transformExpression; + exports.transformModel = transformModel$1; + exports.transformOn = transformOn$1; + exports.transformStyle = transformStyle; + exports.traverseNode = traverseNode; + exports.unwrapTSNode = unwrapTSNode; + exports.walkBlockDeclarations = walkBlockDeclarations; + exports.walkFunctionParams = walkFunctionParams; + exports.walkIdentifiers = walkIdentifiers; + exports.warnDeprecation = warnDeprecation; + + return exports; + +})({}); diff --git a/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js b/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js new file mode 100644 index 0000000..6386167 --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js @@ -0,0 +1,11 @@ +/** +* @vue/compiler-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/var VueCompilerDOM=function(e){"use strict";let t;function n(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return e=>e in t}let i={},s=()=>{},r=()=>!1,o=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||97>e.charCodeAt(2)),a=Object.assign,l=Array.isArray,c=e=>"string"==typeof e,h=e=>"symbol"==typeof e,p=e=>null!==e&&"object"==typeof e,d=n(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),u=n("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),f=e=>{let t=Object.create(null);return n=>t[n]||(t[n]=e(n))},E=/-(\w)/g,_=f(e=>e.replace(E,(e,t)=>t?t.toUpperCase():"")),m=f(e=>e.charAt(0).toUpperCase()+e.slice(1)),S=f(e=>e?`on${m(e)}`:""),g=/;(?![^(]*\))/g,T=/:([^]+)/,N=/\/\*[^]*?\*\//g,I=n("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),y=n("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),O=n("annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"),A=n("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),C=Symbol(""),b=Symbol(""),R=Symbol(""),v=Symbol(""),x=Symbol(""),L=Symbol(""),M=Symbol(""),D=Symbol(""),P=Symbol(""),V=Symbol(""),k=Symbol(""),X=Symbol(""),w=Symbol(""),U=Symbol(""),F=Symbol(""),B=Symbol(""),$=Symbol(""),H=Symbol(""),G=Symbol(""),q=Symbol(""),J=Symbol(""),j=Symbol(""),W=Symbol(""),K=Symbol(""),Y=Symbol(""),Q=Symbol(""),z=Symbol(""),Z=Symbol(""),ee=Symbol(""),et=Symbol(""),en=Symbol(""),ei=Symbol(""),es=Symbol(""),er=Symbol(""),eo=Symbol(""),ea=Symbol(""),el=Symbol(""),ec=Symbol(""),eh=Symbol(""),ep={[C]:"Fragment",[b]:"Teleport",[R]:"Suspense",[v]:"KeepAlive",[x]:"BaseTransition",[L]:"openBlock",[M]:"createBlock",[D]:"createElementBlock",[P]:"createVNode",[V]:"createElementVNode",[k]:"createCommentVNode",[X]:"createTextVNode",[w]:"createStaticVNode",[U]:"resolveComponent",[F]:"resolveDynamicComponent",[B]:"resolveDirective",[$]:"resolveFilter",[H]:"withDirectives",[G]:"renderList",[q]:"renderSlot",[J]:"createSlots",[j]:"toDisplayString",[W]:"mergeProps",[K]:"normalizeClass",[Y]:"normalizeStyle",[Q]:"normalizeProps",[z]:"guardReactiveProps",[Z]:"toHandlers",[ee]:"camelize",[et]:"capitalize",[en]:"toHandlerKey",[ei]:"setBlockTracking",[es]:"pushScopeId",[er]:"popScopeId",[eo]:"withCtx",[ea]:"unref",[el]:"isRef",[ec]:"withMemo",[eh]:"isMemoSame"};function ed(e){Object.getOwnPropertySymbols(e).forEach(t=>{ep[t]=e[t]})}let eu={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function ef(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:eu}}function eE(e,t,n,i,s,r,o,a=!1,l=!1,c=!1,h=eu){return e&&(a?(e.helper(L),e.helper(eb(e.inSSR,c))):e.helper(eC(e.inSSR,c)),o&&e.helper(H)),{type:13,tag:t,props:n,children:i,patchFlag:s,dynamicProps:r,directives:o,isBlock:a,disableTracking:l,isComponent:c,loc:h}}function e_(e,t=eu){return{type:17,loc:t,elements:e}}function em(e,t=eu){return{type:15,loc:t,properties:e}}function eS(e,t){return{type:16,loc:eu,key:c(e)?eg(e,!0):e,value:t}}function eg(e,t=!1,n=eu,i=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:i}}function eT(e,t=eu){return{type:8,loc:t,children:e}}function eN(e,t=[],n=eu){return{type:14,loc:n,callee:e,arguments:t}}function eI(e,t,n=!1,i=!1,s=eu){return{type:18,params:e,returns:t,newline:n,isSlot:i,loc:s}}function ey(e,t,n,i=!0){return{type:19,test:e,consequent:t,alternate:n,newline:i,loc:eu}}function eO(e,t,n=!1,i=!1){return{type:20,index:e,value:t,needPauseTracking:n,inVOnce:i,needArraySpread:!1,loc:eu}}function eA(e){return{type:21,body:e,loc:eu}}function eC(e,t){return e||t?P:V}function eb(e,t){return e||t?M:D}function eR(e,{helper:t,removeHelper:n,inSSR:i}){e.isBlock||(e.isBlock=!0,n(eC(i,e.isComponent)),t(L),t(eb(i,e.isComponent)))}let ev=new Uint8Array([123,123]),ex=new Uint8Array([125,125]);function eL(e){return e>=97&&e<=122||e>=65&&e<=90}function eM(e){return 32===e||10===e||9===e||12===e||13===e}function eD(e){return 47===e||62===e||eM(e)}function eP(e){let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}let eV={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])},ek={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:e=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${e}.sync\` should be changed to \`v-model:${e}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.",link:"https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Vue 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Vue 3.',link:"https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html"},COMPILER_FILTERS:{message:'filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://v3-migration.vuejs.org/breaking-changes/filters.html"}};function eX(e,{compatConfig:t}){let n=t&&t[e];return"MODE"===e?n||3:n}function ew(e,t){let n=eX("MODE",t),i=eX(e,t);return 3===n?!0===i:!1!==i}function eU(e,t,n,...i){return ew(e,t)}function eF(e){throw e}function eB(e){}function e$(e,t,n,i){let s=SyntaxError(String(`https://vuejs.org/error-reference/#compiler-${e}`));return s.code=e,s.loc=t,s}let eH={0:"Illegal comment.",1:"CDATA section is allowed only in XML context.",2:"Duplicate attribute.",3:"End tag cannot have attributes.",4:"Illegal '/' in tags.",5:"Unexpected EOF in tag.",6:"Unexpected EOF in CDATA section.",7:"Unexpected EOF in comment.",8:"Unexpected EOF in script.",9:"Unexpected EOF in tag.",10:"Incorrectly closed comment.",11:"Incorrectly opened comment.",12:"Illegal tag name. Use '<' to print '<'.",13:"Attribute value was expected.",14:"End tag name was expected.",15:"Whitespace was expected.",16:"Unexpected '<!--' in comment.",17:"Attribute name cannot contain U+0022 (\"), U+0027 ('), and U+003C (<).",18:"Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",19:"Attribute name cannot start with '='.",21:"'<?' is allowed only in XML context.",20:"Unexpected null character.",22:"Illegal '/' in tags.",23:"Invalid end tag.",24:"Element is missing end tag.",25:"Interpolation end sign was not found.",27:"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",26:"Legal directive name was expected.",28:"v-if/v-else-if is missing expression.",29:"v-if/else branches must use unique keys.",30:"v-else/v-else-if has no adjacent v-if or v-else-if.",31:"v-for is missing expression.",32:"v-for has invalid expression.",33:"<template v-for> key should be placed on the <template> tag.",34:"v-bind is missing expression.",52:"v-bind with same-name shorthand only allows static argument.",35:"v-on is missing expression.",36:"Unexpected custom directive on <slot> outlet.",37:"Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.",38:"Duplicate slot names found. ",39:"Extraneous children found when component already has explicitly named default slot. These children will be ignored.",40:"v-slot can only be used on components or <template> tags.",41:"v-model is missing expression.",42:"v-model value must be a valid JavaScript member expression.",43:"v-model cannot be used on v-for or v-slot scope variables because they are not writable.",44:`v-model cannot be used on a prop, because local prop bindings are not writable. +Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,45:"Error parsing JavaScript expression: ",46:"<KeepAlive> expects exactly one child component.",51:"@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.",47:'"prefixIdentifiers" option is not supported in this build of compiler.',48:"ES module mode is not supported in this build of compiler.",49:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',50:'"scopeId" option is only supported in module mode.',53:""};function eG(e,t=[]){switch(e.type){case"Identifier":t.push(e);break;case"MemberExpression":let n=e;for(;"MemberExpression"===n.type;)n=n.object;t.push(n);break;case"ObjectPattern":for(let n of e.properties)"RestElement"===n.type?eG(n.argument,t):eG(n.value,t);break;case"ArrayPattern":e.elements.forEach(e=>{e&&eG(e,t)});break;case"RestElement":eG(e.argument,t);break;case"AssignmentPattern":eG(e.left,t)}return t}let eq=e=>e&&("ObjectProperty"===e.type||"ObjectMethod"===e.type)&&!e.computed,eJ=["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"],ej=e=>4===e.type&&e.isStatic;function eW(e){switch(e){case"Teleport":case"teleport":return b;case"Suspense":case"suspense":return R;case"KeepAlive":case"keep-alive":return v;case"BaseTransition":case"base-transition":return x}}let eK=/^\d|[^\$\w\xA0-\uFFFF]/,eY=e=>!eK.test(e),eQ=/[A-Za-z_$\xA0-\uFFFF]/,ez=/[\.\?\w$\xA0-\uFFFF]/,eZ=/\s+[.[]\s*|\s*[.[]\s+/g,e1=e=>4===e.type?e.content:e.loc.source,e0=e=>{let t=e1(e).trim().replace(eZ,e=>e.trim()),n=0,i=[],s=0,r=0,o=null;for(let e=0;e<t.length;e++){let a=t.charAt(e);switch(n){case 0:if("["===a)i.push(n),n=1,s++;else if("("===a)i.push(n),n=2,r++;else if(!(0===e?eQ:ez).test(a))return!1;break;case 1:"'"===a||'"'===a||"`"===a?(i.push(n),n=3,o=a):"["===a?s++:"]"!==a||--s||(n=i.pop());break;case 2:if("'"===a||'"'===a||"`"===a)i.push(n),n=3,o=a;else if("("===a)r++;else if(")"===a){if(e===t.length-1)return!1;--r||(n=i.pop())}break;case 3:a===o&&(n=i.pop(),o=null)}}return!s&&!r},e2=/^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,e3=e=>e2.test(e1(e));function e4(e,t,n=t.length){let i=0,s=-1;for(let e=0;e<n;e++)10===t.charCodeAt(e)&&(i++,s=e);return e.offset+=n,e.line+=i,e.column=-1===s?e.column+n:n-s,e}function e6(e,t,n=!1){for(let i=0;i<e.props.length;i++){let s=e.props[i];if(7===s.type&&(n||s.exp)&&(c(t)?s.name===t:t.test(s.name)))return s}}function e5(e,t,n=!1,i=!1){for(let s=0;s<e.props.length;s++){let r=e.props[s];if(6===r.type){if(n)continue;if(r.name===t&&(r.value||i))return r}else if("bind"===r.name&&(r.exp||i)&&e9(r.arg,t))return r}}function e9(e,t){return!!(e&&ej(e)&&e.content===t)}function e7(e){return e.props.some(e=>7===e.type&&"bind"===e.name&&(!e.arg||4!==e.arg.type||!e.arg.isStatic))}function e8(e){return 5===e.type||2===e.type}function te(e){return 7===e.type&&"slot"===e.name}function tt(e){return 1===e.type&&3===e.tagType}function tn(e){return 1===e.type&&2===e.tagType}let ti=new Set([Q,z]);function ts(e,t,n){let i,s;let r=13===e.type?e.props:e.arguments[2],o=[];if(r&&!c(r)&&14===r.type){let e=function e(t,n=[]){if(t&&!c(t)&&14===t.type){let i=t.callee;if(!c(i)&&ti.has(i))return e(t.arguments[0],n.concat(t))}return[t,n]}(r);r=e[0],s=(o=e[1])[o.length-1]}if(null==r||c(r))i=em([t]);else if(14===r.type){let e=r.arguments[0];c(e)||15!==e.type?r.callee===Z?i=eN(n.helper(W),[em([t]),r]):r.arguments.unshift(em([t])):tr(t,e)||e.properties.unshift(t),i||(i=r)}else 15===r.type?(tr(t,r)||r.properties.unshift(t),i=r):(i=eN(n.helper(W),[em([t]),r]),s&&s.callee===z&&(s=o[o.length-2]));13===e.type?s?s.arguments[0]=i:e.props=i:s?s.arguments[0]=i:e.arguments[2]=i}function tr(e,t){let n=!1;if(4===e.key.type){let i=e.key.content;n=t.properties.some(e=>4===e.key.type&&e.key.content===i)}return n}function to(e,t){return`_${t}_${e.replace(/[^\w]/g,(t,n)=>"-"===t?"_":e.charCodeAt(n).toString())}`}function ta(e){return 14===e.type&&e.callee===ec?e.arguments[1].returns:e}let tl=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,tc={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:r,isPreTag:r,isIgnoreNewlineTag:r,isCustomElement:r,onError:eF,onWarn:eB,comments:!1,prefixIdentifiers:!1},th=tc,tp=null,td="",tu=null,tf=null,tE="",t_=-1,tm=-1,tS=0,tg=!1,tT=null,tN=[],tI=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=ev,this.delimiterClose=ex,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=ev,this.delimiterClose=ex}getPos(e){let t=1,n=e+1;for(let i=this.newlines.length-1;i>=0;i--){let s=this.newlines[i];if(e>s){t=i+2,n=e-s;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex]){if(this.delimiterIndex===this.delimiterOpen.length-1){let e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++}else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){let t=this.sequenceIndex===this.currentSequence.length;if(t?eD(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t){this.sequenceIndex++;return}}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||eM(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart<t){let e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}this.sectionStart=t+2,this.stateInClosingTagName(e),this.inRCDATA=!1;return}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence!==eV.TitleEnd&&(this.currentSequence!==eV.TextareaEnd||this.inSFCRoot)?this.fastForwardTo(60)&&(this.sequenceIndex=1):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.sequenceIndex=Number(60===e)}stateCDATASequence(e){e===eV.Cdata[this.sequenceIndex]?++this.sequenceIndex===eV.Cdata.length&&(this.state=28,this.currentSequence=eV.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){let t=this.buffer.charCodeAt(this.index);if(10===t&&this.newlines.push(this.index),t===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===eV.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,t){this.enterRCDATA(e,t),this.state=31}enterRCDATA(e,t){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=t}stateBeforeTagName(e){33===e?(this.state=22,this.sectionStart=this.index+1):63===e?(this.state=24,this.sectionStart=this.index+1):eL(e)?(this.sectionStart=this.index,0===this.mode?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:116===e?this.state=30:this.state=115===e?29:6):47===e?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){eD(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(eD(e)){let t=this.buffer.slice(this.sectionStart,this.index);"template"!==t&&this.enterRCDATA(eP("</"+t),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){eM(e)||(62===e?(this.state=1,this.sectionStart=this.index+1):(this.state=eL(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(62===e||eM(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){62===e&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){62===e?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):47===e?this.state=7:60===e&&47===this.peek()?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):eM(e)||this.handleAttrStart(e)}handleAttrStart(e){118===e&&45===this.peek()?(this.state=13,this.sectionStart=this.index):46===e||58===e||64===e||35===e?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){62===e?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):eM(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(61===e||eD(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){61===e||eD(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):58===e?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):46===e&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){61===e||eD(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):91===e?this.state=15:46===e&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){93===e?this.state=14:(61===e||eD(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){61===e||eD(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):46===e&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){61===e?this.state=18:47===e||62===e?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):eM(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){34===e?(this.state=19,this.sectionStart=this.index+1):39===e?(this.state=20,this.sectionStart=this.index+1):eM(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,t){(e===t||this.fastForwardTo(t))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(34===t?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){eM(e)||62===e?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):(39===e||60===e||61===e||96===e)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){91===e?(this.state=26,this.sequenceIndex=0):this.state=45===e?25:23}stateInDeclaration(e){(62===e||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(62===e||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){45===e?(this.state=28,this.currentSequence=eV.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(62===e||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){e===eV.ScriptEnd[3]?this.startSpecial(eV.ScriptEnd,4):e===eV.StyleEnd[3]?this.startSpecial(eV.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===eV.TitleEnd[3]?this.startSpecial(eV.TitleEnd,4):e===eV.TextareaEnd[3]?this.startSpecial(eV.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){let e=this.buffer.charCodeAt(this.index);switch(10===e&&this.newlines.push(this.index),this.state){case 1:this.stateText(e);break;case 2:this.stateInterpolationOpen(e);break;case 3:this.stateInterpolation(e);break;case 4:this.stateInterpolationClose(e);break;case 31:this.stateSpecialStartSequence(e);break;case 32:this.stateInRCDATA(e);break;case 26:this.stateCDATASequence(e);break;case 19:this.stateInAttrValueDoubleQuotes(e);break;case 12:this.stateInAttrName(e);break;case 13:this.stateInDirName(e);break;case 14:this.stateInDirArg(e);break;case 15:this.stateInDynamicDirArg(e);break;case 16:this.stateInDirModifier(e);break;case 28:this.stateInCommentLike(e);break;case 27:this.stateInSpecialComment(e);break;case 11:this.stateBeforeAttrName(e);break;case 6:this.stateInTagName(e);break;case 34:this.stateInSFCRootTagName(e);break;case 9:this.stateInClosingTagName(e);break;case 5:this.stateBeforeTagName(e);break;case 17:this.stateAfterAttrName(e);break;case 20:this.stateInAttrValueSingleQuotes(e);break;case 18:this.stateBeforeAttrValue(e);break;case 8:this.stateBeforeClosingTagName(e);break;case 10:this.stateAfterClosingTagName(e);break;case 29:this.stateBeforeSpecialS(e);break;case 30:this.stateBeforeSpecialT(e);break;case 21:this.stateInAttrValueNoQuotes(e);break;case 7:this.stateInSelfClosingTag(e);break;case 23:this.stateInDeclaration(e);break;case 22:this.stateBeforeDeclaration(e);break;case 25:this.stateBeforeComment(e);break;case 24:this.stateInProcessingInstruction(e);break;case 33:this.stateInEntity()}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(1===this.state||32===this.state&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(19===this.state||20===this.state||21===this.state)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){let e=this.buffer.length;this.sectionStart>=e||(28===this.state?this.currentSequence===eV.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(tN,{onerr:tU,ontext(e,t){tb(tA(e,t),e,t)},ontextentity(e,t,n){tb(e,t,n)},oninterpolation(e,t){if(tg)return tb(tA(e,t),e,t);let n=e+tI.delimiterOpen.length,i=t-tI.delimiterClose.length;for(;eM(td.charCodeAt(n));)n++;for(;eM(td.charCodeAt(i-1));)i--;let s=tA(n,i);s.includes("&")&&(s=th.decodeEntities(s,!1)),tV({type:5,content:tw(s,!1,tk(n,i)),loc:tk(e,t)})},onopentagname(e,t){let n=tA(e,t);tu={type:1,tag:n,ns:th.getNamespace(n,tN[0],th.ns),tagType:0,props:[],children:[],loc:tk(e-1,t),codegenNode:void 0}},onopentagend(e){tC(e)},onclosetag(e,t){let n=tA(e,t);if(!th.isVoidTag(n)){let i=!1;for(let e=0;e<tN.length;e++)if(tN[e].tag.toLowerCase()===n.toLowerCase()){i=!0,e>0&&tN[0].loc.start.offset;for(let n=0;n<=e;n++)tR(tN.shift(),t,n<e);break}i||tv(e,60)}},onselfclosingtag(e){let t=tu.tag;tu.isSelfClosing=!0,tC(e),tN[0]&&tN[0].tag===t&&tR(tN.shift(),e)},onattribname(e,t){tf={type:6,name:tA(e,t),nameLoc:tk(e,t),value:void 0,loc:tk(e)}},ondirname(e,t){let n=tA(e,t),i="."===n||":"===n?"bind":"@"===n?"on":"#"===n?"slot":n.slice(2);if(tg||""===i)tf={type:6,name:n,nameLoc:tk(e,t),value:void 0,loc:tk(e)};else if(tf={type:7,name:i,rawName:n,exp:void 0,arg:void 0,modifiers:"."===n?[eg("prop")]:[],loc:tk(e)},"pre"===i){tg=tI.inVPre=!0,tT=tu;let e=tu.props;for(let t=0;t<e.length;t++)7===e[t].type&&(e[t]=function(e){let t={type:6,name:e.rawName,nameLoc:tk(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){let n=e.exp.loc;n.end.offset<e.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),t.value={type:2,content:e.exp.content,loc:n}}return t}(e[t]))}},ondirarg(e,t){if(e===t)return;let n=tA(e,t);if(tg)tf.name+=n,tX(tf.nameLoc,t);else{let i="["!==n[0];tf.arg=tw(i?n:n.slice(1,-1),i,tk(e,t),i?3:0)}},ondirmodifier(e,t){let n=tA(e,t);if(tg)tf.name+="."+n,tX(tf.nameLoc,t);else if("slot"===tf.name){let e=tf.arg;e&&(e.content+="."+n,tX(e.loc,t))}else{let i=eg(n,!0,tk(e,t));tf.modifiers.push(i)}},onattribdata(e,t){tE+=tA(e,t),t_<0&&(t_=e),tm=t},onattribentity(e,t,n){tE+=e,t_<0&&(t_=t),tm=n},onattribnameend(e){let t=tA(tf.loc.start.offset,e);7===tf.type&&(tf.rawName=t),tu.props.some(e=>(7===e.type?e.rawName:e.name)===t)},onattribend(e,t){if(tu&&tf){if(tX(tf.loc,t),0!==e){if(tE.includes("&")&&(tE=th.decodeEntities(tE,!0)),6===tf.type)"class"===tf.name&&(tE=tP(tE).trim()),tf.value={type:2,content:tE,loc:1===e?tk(t_,tm):tk(t_-1,tm+1)},tI.inSFCRoot&&"template"===tu.tag&&"lang"===tf.name&&tE&&"html"!==tE&&tI.enterRCDATA(eP("</template"),0);else{tf.exp=tw(tE,!1,tk(t_,tm),0,0),"for"===tf.name&&(tf.forParseResult=function(e){let t=e.loc,n=e.content,i=n.match(tl);if(!i)return;let[,s,r]=i,o=(e,n,i=!1)=>{let s=t.start.offset+n,r=s+e.length;return tw(e,!1,tk(s,r),0,i?1:0)},a={source:o(r.trim(),n.indexOf(r,s.length)),value:void 0,key:void 0,index:void 0,finalized:!1},l=s.trim().replace(tO,"").trim(),c=s.indexOf(l),h=l.match(ty);if(h){let e;l=l.replace(ty,"").trim();let t=h[1].trim();if(t&&(e=n.indexOf(t,c+l.length),a.key=o(t,e,!0)),h[2]){let i=h[2].trim();i&&(a.index=o(i,n.indexOf(i,a.key?e+t.length:c+l.length),!0))}}return l&&(a.value=o(l,c,!0)),a}(tf.exp));let e=-1;"bind"===tf.name&&(e=tf.modifiers.findIndex(e=>"sync"===e.content))>-1&&eU("COMPILER_V_BIND_SYNC",th,tf.loc,tf.rawName)&&(tf.name="model",tf.modifiers.splice(e,1))}}(7!==tf.type||"pre"!==tf.name)&&tu.props.push(tf)}tE="",t_=tm=-1},oncomment(e,t){th.comments&&tV({type:3,content:tA(e,t),loc:tk(e-4,t+3)})},onend(){let e=td.length;for(let t=0;t<tN.length;t++)tR(tN[t],e-1),tN[t].loc.start.offset},oncdata(e,t){0!==tN[0].ns&&tb(tA(e,t),e,t)},onprocessinginstruction(e){(tN[0]?tN[0].ns:th.ns)===0&&tU(21,e-1)}}),ty=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,tO=/^\(|\)$/g;function tA(e,t){return td.slice(e,t)}function tC(e){tI.inSFCRoot&&(tu.innerLoc=tk(e+1,e+1)),tV(tu);let{tag:t,ns:n}=tu;0===n&&th.isPreTag(t)&&tS++,th.isVoidTag(t)?tR(tu,e):(tN.unshift(tu),(1===n||2===n)&&(tI.inXML=!0)),tu=null}function tb(e,t,n){{let t=tN[0]&&tN[0].tag;"script"!==t&&"style"!==t&&e.includes("&")&&(e=th.decodeEntities(e,!1))}let i=tN[0]||tp,s=i.children[i.children.length-1];s&&2===s.type?(s.content+=e,tX(s.loc,n)):i.children.push({type:2,content:e,loc:tk(t,n)})}function tR(e,t,n=!1){n?tX(e.loc,tv(t,60)):tX(e.loc,function(e,t){let n=e;for(;62!==td.charCodeAt(n)&&n<td.length-1;)n++;return n}(t,0)+1),tI.inSFCRoot&&(e.children.length?e.innerLoc.end=a({},e.children[e.children.length-1].loc.end):e.innerLoc.end=a({},e.innerLoc.start),e.innerLoc.source=tA(e.innerLoc.start.offset,e.innerLoc.end.offset));let{tag:i,ns:s,children:r}=e;if(!tg&&("slot"===i?e.tagType=2:tL(e)?e.tagType=3:function({tag:e,props:t}){var n;if(th.isCustomElement(e))return!1;if("component"===e||(n=e.charCodeAt(0))>64&&n<91||eW(e)||th.isBuiltInComponent&&th.isBuiltInComponent(e)||th.isNativeTag&&!th.isNativeTag(e))return!0;for(let e=0;e<t.length;e++){let n=t[e];if(6===n.type){if("is"===n.name&&n.value&&(n.value.content.startsWith("vue:")||eU("COMPILER_IS_ON_ELEMENT",th,n.loc)))return!0}else if("bind"===n.name&&e9(n.arg,"is")&&eU("COMPILER_IS_ON_ELEMENT",th,n.loc))return!0}return!1}(e)&&(e.tagType=1)),tI.inRCDATA||(e.children=tD(r)),0===s&&th.isIgnoreNewlineTag(i)){let e=r[0];e&&2===e.type&&(e.content=e.content.replace(/^\r?\n/,""))}0===s&&th.isPreTag(i)&&tS--,tT===e&&(tg=tI.inVPre=!1,tT=null),tI.inXML&&(tN[0]?tN[0].ns:th.ns)===0&&(tI.inXML=!1);{let t=e.props;if(!tI.inSFCRoot&&ew("COMPILER_NATIVE_TEMPLATE",th)&&"template"===e.tag&&!tL(e)){let t=tN[0]||tp,n=t.children.indexOf(e);t.children.splice(n,1,...e.children)}let n=t.find(e=>6===e.type&&"inline-template"===e.name);n&&eU("COMPILER_INLINE_TEMPLATE",th,n.loc)&&e.children.length&&(n.value={type:2,content:tA(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:n.loc})}}function tv(e,t){let n=e;for(;td.charCodeAt(n)!==t&&n>=0;)n--;return n}let tx=new Set(["if","else","else-if","for","slot"]);function tL({tag:e,props:t}){if("template"===e){for(let e=0;e<t.length;e++)if(7===t[e].type&&tx.has(t[e].name))return!0}return!1}let tM=/\r\n/g;function tD(e,t){let n="preserve"!==th.whitespace,i=!1;for(let t=0;t<e.length;t++){let s=e[t];if(2===s.type){if(tS)s.content=s.content.replace(tM,"\n");else if(function(e){for(let t=0;t<e.length;t++)if(!eM(e.charCodeAt(t)))return!1;return!0}(s.content)){let r=e[t-1]&&e[t-1].type,o=e[t+1]&&e[t+1].type;!r||!o||n&&(3===r&&(3===o||1===o)||1===r&&(3===o||1===o&&function(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(10===n||13===n)return!0}return!1}(s.content)))?(i=!0,e[t]=null):s.content=" "}else n&&(s.content=tP(s.content))}}return i?e.filter(Boolean):e}function tP(e){let t="",n=!1;for(let i=0;i<e.length;i++)eM(e.charCodeAt(i))?n||(t+=" ",n=!0):(t+=e[i],n=!1);return t}function tV(e){(tN[0]||tp).children.push(e)}function tk(e,t){return{start:tI.getPos(e),end:null==t?t:tI.getPos(t),source:null==t?t:tA(e,t)}}function tX(e,t){e.end=tI.getPos(t),e.source=tA(e.start.offset,t)}function tw(e,t=!1,n,i=0,s=0){return eg(e,t,n,i)}function tU(e,t,n){th.onError(e$(e,tk(t,t)))}function tF(e,t){if(tI.reset(),tu=null,tf=null,tE="",t_=-1,tm=-1,tN.length=0,td=e,th=a({},tc),t){let e;for(e in t)null!=t[e]&&(th[e]=t[e])}tI.mode="html"===th.parseMode?1:"sfc"===th.parseMode?2:0,tI.inXML=1===th.ns||2===th.ns;let n=t&&t.delimiters;n&&(tI.delimiterOpen=eP(n[0]),tI.delimiterClose=eP(n[1]));let i=tp=ef([],e);return tI.parse(td),i.loc=tk(0,e.length),i.children=tD(i.children),tp=null,i}function tB(e,t){let{children:n}=e;return 1===n.length&&1===t.type&&!tn(t)}function t$(e,t){let{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;let i=n.get(e);if(void 0!==i)return i;let s=e.codegenNode;if(13!==s.type||s.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag&&"math"!==e.tag)return 0;if(void 0!==s.patchFlag)return n.set(e,0),0;{let i=3,r=tG(e,t);if(0===r)return n.set(e,0),0;r<i&&(i=r);for(let s=0;s<e.children.length;s++){let r=t$(e.children[s],t);if(0===r)return n.set(e,0),0;r<i&&(i=r)}if(i>1)for(let s=0;s<e.props.length;s++){let r=e.props[s];if(7===r.type&&"bind"===r.name&&r.exp){let s=t$(r.exp,t);if(0===s)return n.set(e,0),0;s<i&&(i=s)}}if(s.isBlock){for(let t=0;t<e.props.length;t++)if(7===e.props[t].type)return n.set(e,0),0;t.removeHelper(L),t.removeHelper(eb(t.inSSR,s.isComponent)),s.isBlock=!1,t.helper(eC(t.inSSR,s.isComponent))}return n.set(e,i),i}case 2:case 3:return 3;case 9:case 11:case 10:default:return 0;case 5:case 12:return t$(e.content,t);case 4:return e.constType;case 8:let r=3;for(let n=0;n<e.children.length;n++){let i=e.children[n];if(c(i)||h(i))continue;let s=t$(i,t);if(0===s)return 0;s<r&&(r=s)}return r;case 20:return 2}}let tH=new Set([K,Y,Q,z]);function tG(e,t){let n=3,i=tq(e);if(i&&15===i.type){let{properties:e}=i;for(let i=0;i<e.length;i++){let s;let{key:r,value:o}=e[i],a=t$(r,t);if(0===a)return a;if(a<n&&(n=a),0===(s=4===o.type?t$(o,t):14===o.type?function e(t,n){if(14===t.type&&!c(t.callee)&&tH.has(t.callee)){let i=t.arguments[0];if(4===i.type)return t$(i,n);if(14===i.type)return e(i,n)}return 0}(o,t):0))return s;s<n&&(n=s)}}return n}function tq(e){let t=e.codegenNode;if(13===t.type)return t.props}function tJ(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:r=!1,hmr:o=!1,cacheHandlers:a=!1,nodeTransforms:l=[],directiveTransforms:h={},transformHoist:p=null,isBuiltInComponent:d=s,isCustomElement:u=s,expressionPlugins:f=[],scopeId:E=null,slotted:S=!0,ssr:g=!1,inSSR:T=!1,ssrCssVars:N="",bindingMetadata:I=i,inline:y=!1,isTS:O=!1,onError:A=eF,onWarn:C=eB,compatConfig:b}){let R=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),v={filename:t,selfName:R&&m(_(R[1])),prefixIdentifiers:n,hoistStatic:r,hmr:o,cacheHandlers:a,nodeTransforms:l,directiveTransforms:h,transformHoist:p,isBuiltInComponent:d,isCustomElement:u,expressionPlugins:f,scopeId:E,slotted:S,ssr:g,inSSR:T,ssrCssVars:N,bindingMetadata:I,inline:y,isTS:O,onError:A,onWarn:C,compatConfig:b,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){let t=v.helpers.get(e)||0;return v.helpers.set(e,t+1),e},removeHelper(e){let t=v.helpers.get(e);if(t){let n=t-1;n?v.helpers.set(e,n):v.helpers.delete(e)}},helperString:e=>`_${ep[v.helper(e)]}`,replaceNode(e){v.parent.children[v.childIndex]=v.currentNode=e},removeNode(e){let t=v.parent.children,n=e?t.indexOf(e):v.currentNode?v.childIndex:-1;e&&e!==v.currentNode?v.childIndex>n&&(v.childIndex--,v.onNodeRemoved()):(v.currentNode=null,v.onNodeRemoved()),v.parent.children.splice(n,1)},onNodeRemoved:s,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){c(e)&&(e=eg(e)),v.hoists.push(e);let t=eg(`_hoisted_${v.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1,n=!1){let i=eO(v.cached.length,e,t,n);return v.cached.push(i),i}};return v.filters=new Set,v}function tj(e,t){let n=tJ(e,t);tW(e,n),t.hoistStatic&&!function e(t,n,i,s=!1,r=!1){let{children:o}=t,a=[];for(let n=0;n<o.length;n++){let l=o[n];if(1===l.type&&0===l.tagType){let e=s?0:t$(l,i);if(e>0){if(e>=2){l.codegenNode.patchFlag=-1,a.push(l);continue}}else{let e=l.codegenNode;if(13===e.type){let t=e.patchFlag;if((void 0===t||512===t||1===t)&&tG(l,i)>=2){let t=tq(l);t&&(e.props=i.hoist(t))}e.dynamicProps&&(e.dynamicProps=i.hoist(e.dynamicProps))}}}else if(12===l.type&&(s?0:t$(l,i))>=2){a.push(l);continue}if(1===l.type){let n=1===l.tagType;n&&i.scopes.vSlot++,e(l,t,i,!1,r),n&&i.scopes.vSlot--}else if(11===l.type)e(l,t,i,1===l.children.length,!0);else if(9===l.type)for(let n=0;n<l.branches.length;n++)e(l.branches[n],t,i,1===l.branches[n].children.length,r)}let c=!1;if(a.length===o.length&&1===t.type){if(0===t.tagType&&t.codegenNode&&13===t.codegenNode.type&&l(t.codegenNode.children))t.codegenNode.children=h(e_(t.codegenNode.children)),c=!0;else if(1===t.tagType&&t.codegenNode&&13===t.codegenNode.type&&t.codegenNode.children&&!l(t.codegenNode.children)&&15===t.codegenNode.children.type){let e=p(t.codegenNode,"default");e&&(e.returns=h(e_(e.returns)),c=!0)}else if(3===t.tagType&&n&&1===n.type&&1===n.tagType&&n.codegenNode&&13===n.codegenNode.type&&n.codegenNode.children&&!l(n.codegenNode.children)&&15===n.codegenNode.children.type){let e=e6(t,"slot",!0),i=e&&e.arg&&p(n.codegenNode,e.arg);i&&(i.returns=h(e_(i.returns)),c=!0)}}if(!c)for(let e of a)e.codegenNode=i.cache(e.codegenNode);function h(e){let t=i.cache(e);return r&&i.hmr&&(t.needArraySpread=!0),t}function p(e,t){if(e.children&&!l(e.children)&&15===e.children.type){let n=e.children.properties.find(e=>e.key===t||e.key.content===t);return n&&n.value}}a.length&&i.transformHoist&&i.transformHoist(o,i,t)}(e,void 0,n,tB(e,e.children[0])),t.ssr||function(e,t){let{helper:n}=t,{children:i}=e;if(1===i.length){let n=i[0];if(tB(e,n)&&n.codegenNode){let i=n.codegenNode;13===i.type&&eR(i,t),e.codegenNode=i}else e.codegenNode=n}else i.length>1&&(e.codegenNode=eE(t,n(C),void 0,e.children,64,void 0,void 0,!0,void 0,!1))}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function tW(e,t){t.currentNode=e;let{nodeTransforms:n}=t,i=[];for(let s=0;s<n.length;s++){let r=n[s](e,t);if(r&&(l(r)?i.push(...r):i.push(r)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(k);break;case 5:t.ssr||t.helper(j);break;case 9:for(let n=0;n<e.branches.length;n++)tW(e.branches[n],t);break;case 10:case 11:case 1:case 0:!function(e,t){let n=0,i=()=>{n--};for(;n<e.children.length;n++){let s=e.children[n];c(s)||(t.grandParent=t.parent,t.parent=e,t.childIndex=n,t.onNodeRemoved=i,tW(s,t))}}(e,t)}t.currentNode=e;let s=i.length;for(;s--;)i[s]()}function tK(e,t){let n=c(e)?t=>t===e:t=>e.test(t);return(e,i)=>{if(1===e.type){let{props:s}=e;if(3===e.tagType&&s.some(te))return;let r=[];for(let o=0;o<s.length;o++){let a=s[o];if(7===a.type&&n(a.name)){s.splice(o,1),o--;let n=t(e,a,i);n&&r.push(n)}}return r}}}let tY="/*@__PURE__*/",tQ=e=>`${ep[e]}: _${ep[e]}`;function tz(e,t={}){let n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:i=!1,filename:s="template.vue.html",scopeId:r=null,optimizeImports:o=!1,runtimeGlobalName:a="Vue",runtimeModuleName:l="vue",ssrRuntimeModuleName:c="vue/server-renderer",ssr:h=!1,isTS:p=!1,inSSR:d=!1}){let u={mode:t,prefixIdentifiers:n,sourceMap:i,filename:s,scopeId:r,optimizeImports:o,runtimeGlobalName:a,runtimeModuleName:l,ssrRuntimeModuleName:c,ssr:h,isTS:p,inSSR:d,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${ep[e]}`,push(e,t=-2,n){u.code+=e},indent(){f(++u.indentLevel)},deindent(e=!1){e?--u.indentLevel:f(--u.indentLevel)},newline(){f(u.indentLevel)}};function f(e){u.push("\n"+" ".repeat(e),0)}return u}(e,t);t.onContextCreated&&t.onContextCreated(n);let{mode:i,push:s,prefixIdentifiers:r,indent:o,deindent:a,newline:l,scopeId:c,ssr:h}=n,p=Array.from(e.helpers),d=p.length>0,u=!r&&"module"!==i;!function(e,t){let{ssr:n,prefixIdentifiers:i,push:s,newline:r,runtimeModuleName:o,runtimeGlobalName:a,ssrRuntimeModuleName:l}=t,c=Array.from(e.helpers);if(c.length>0&&(s(`const _Vue = ${a} +`,-1),e.hoists.length)){let e=[P,V,k,X,w].filter(e=>c.includes(e)).map(tQ).join(", ");s(`const { ${e} } = _Vue +`,-1)}(function(e,t){if(!e.length)return;t.pure=!0;let{push:n,newline:i}=t;i();for(let s=0;s<e.length;s++){let r=e[s];r&&(n(`const _hoisted_${s+1} = `),t2(r,t),i())}t.pure=!1})(e.hoists,t),r(),s("return ")}(e,n);let f=(h?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(s(`function ${h?"ssrRender":"render"}(${f}) {`),o(),u&&(s("with (_ctx) {"),o(),d&&(s(`const { ${p.map(tQ).join(", ")} } = _Vue +`,-1),l())),e.components.length&&(tZ(e.components,"component",n),(e.directives.length||e.temps>0)&&l()),e.directives.length&&(tZ(e.directives,"directive",n),e.temps>0&&l()),e.filters&&e.filters.length&&(l(),tZ(e.filters,"filter",n),l()),e.temps>0){s("let ");for(let t=0;t<e.temps;t++)s(`${t>0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(s(` +`,0),l()),h||s("return "),e.codegenNode?t2(e.codegenNode,n):s("null"),u&&(a(),s("}")),a(),s("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function tZ(e,t,{helper:n,push:i,newline:s,isTS:r}){let o=n("filter"===t?$:"component"===t?U:B);for(let n=0;n<e.length;n++){let a=e[n],l=a.endsWith("__self");l&&(a=a.slice(0,-6)),i(`const ${to(a,t)} = ${o}(${JSON.stringify(a)}${l?", true":""})${r?"!":""}`),n<e.length-1&&s()}}function t1(e,t){let n=e.length>3;t.push("["),n&&t.indent(),t0(e,t,n),n&&t.deindent(),t.push("]")}function t0(e,t,n=!1,i=!0){let{push:s,newline:r}=t;for(let o=0;o<e.length;o++){let a=e[o];c(a)?s(a,-3):l(a)?t1(a,t):t2(a,t),o<e.length-1&&(n?(i&&s(","),r()):i&&s(", "))}}function t2(e,t){if(c(e)){t.push(e,-3);return}if(h(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:case 12:t2(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),-3,e)}(e,t);break;case 4:t3(e,t);break;case 5:!function(e,t){let{push:n,helper:i,pure:s}=t;s&&n(tY),n(`${i(j)}(`),t2(e.content,t),n(")")}(e,t);break;case 8:t4(e,t);break;case 3:!function(e,t){let{push:n,helper:i,pure:s}=t;s&&n(tY),n(`${i(k)}(${JSON.stringify(e.content)})`,-3,e)}(e,t);break;case 13:!function(e,t){let n;let{push:i,helper:s,pure:r}=t,{tag:o,props:a,children:l,patchFlag:c,dynamicProps:h,directives:p,isBlock:d,disableTracking:u,isComponent:f}=e;c&&(n=String(c)),p&&i(s(H)+"("),d&&i(`(${s(L)}(${u?"true":""}), `),r&&i(tY),i(s(d?eb(t.inSSR,f):eC(t.inSSR,f))+"(",-2,e),t0(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map(e=>e||"null")}([o,a,l,n,h]),t),i(")"),d&&i(")"),p&&(i(", "),t2(p,t),i(")"))}(e,t);break;case 14:!function(e,t){let{push:n,helper:i,pure:s}=t,r=c(e.callee)?e.callee:i(e.callee);s&&n(tY),n(r+"(",-2,e),t0(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){let{push:n,indent:i,deindent:s,newline:r}=t,{properties:o}=e;if(!o.length){n("{}",-2,e);return}let a=o.length>1;n(a?"{":"{ "),a&&i();for(let e=0;e<o.length;e++){let{key:i,value:s}=o[e];!function(e,t){let{push:n}=t;8===e.type?(n("["),t4(e,t),n("]")):e.isStatic?n(eY(e.content)?e.content:JSON.stringify(e.content),-2,e):n(`[${e.content}]`,-3,e)}(i,t),n(": "),t2(s,t),e<o.length-1&&(n(","),r())}a&&s(),n(a?"}":" }")}(e,t);break;case 17:t1(e.elements,t);break;case 18:!function(e,t){let{push:n,indent:i,deindent:s}=t,{params:r,returns:o,body:a,newline:c,isSlot:h}=e;h&&n(`_${ep[eo]}(`),n("(",-2,e),l(r)?t0(r,t):r&&t2(r,t),n(") => "),(c||a)&&(n("{"),i()),o?(c&&n("return "),l(o)?t1(o,t):t2(o,t)):a&&t2(a,t),(c||a)&&(s(),n("}")),h&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){let{test:n,consequent:i,alternate:s,newline:r}=e,{push:o,indent:a,deindent:l,newline:c}=t;if(4===n.type){let e=!eY(n.content);e&&o("("),t3(n,t),e&&o(")")}else o("("),t2(n,t),o(")");r&&a(),t.indentLevel++,r||o(" "),o("? "),t2(i,t),t.indentLevel--,r&&c(),r||o(" "),o(": ");let h=19===s.type;!h&&t.indentLevel++,t2(s,t),!h&&t.indentLevel--,r&&l(!0)}(e,t);break;case 20:!function(e,t){let{push:n,helper:i,indent:s,deindent:r,newline:o}=t,{needPauseTracking:a,needArraySpread:l}=e;l&&n("[...("),n(`_cache[${e.index}] || (`),a&&(s(),n(`${i(ei)}(-1`),e.inVOnce&&n(", true"),n("),"),o(),n("(")),n(`_cache[${e.index}] = `),t2(e.value,t),a&&(n(`).cacheIndex = ${e.index},`),o(),n(`${i(ei)}(1),`),o(),n(`_cache[${e.index}]`),r()),n(")"),l&&n(")]")}(e,t);break;case 21:t0(e.body,t,!0,!1)}}function t3(e,t){let{content:n,isStatic:i}=e;t.push(i?JSON.stringify(n):n,-3,e)}function t4(e,t){for(let n=0;n<e.children.length;n++){let i=e.children[n];c(i)?t.push(i,-3):t2(i,t)}}function t6(e,t,n=!1,i=!1,s=Object.create(t.identifiers)){return e}let t5=tK(/^(if|else|else-if)$/,(e,t,n)=>t9(e,t,n,(e,t,i)=>{let s=n.parent.children,r=s.indexOf(e),o=0;for(;r-- >=0;){let e=s[r];e&&9===e.type&&(o+=e.branches.length)}return()=>{i?e.codegenNode=t8(t,o,n):function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode).alternate=t8(t,o+e.branches.length-1,n)}}));function t9(e,t,n,i){if("else"!==t.name&&(!t.exp||!t.exp.content.trim())){let i=t.exp?t.exp.loc:e.loc;n.onError(e$(28,t.loc)),t.exp=eg("true",!1,i)}if("if"===t.name){var s;let r=t7(e,t),o={type:9,loc:tk((s=e.loc).start.offset,s.end.offset),branches:[r]};if(n.replaceNode(o),i)return i(o,r,!0)}else{let s=n.parent.children,r=s.indexOf(e);for(;r-- >=-1;){let o=s[r];if(o&&3===o.type||o&&2===o.type&&!o.content.trim().length){n.removeNode(o);continue}if(o&&9===o.type){"else-if"===t.name&&void 0===o.branches[o.branches.length-1].condition&&n.onError(e$(30,e.loc)),n.removeNode();let s=t7(e,t);o.branches.push(s);let r=i&&i(o,s,!1);tW(s,n),r&&r(),n.currentNode=null}else n.onError(e$(30,e.loc));break}}}function t7(e,t){let n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!e6(e,"for")?e.children:[e],userKey:e5(e,"key"),isTemplateIf:n}}function t8(e,t,n){return e.condition?ey(e.condition,ne(e,t,n),eN(n.helper(k),['""',"true"])):ne(e,t,n)}function ne(e,t,n){let{helper:i}=n,s=eS("key",eg(`${t}`,!1,eu,2)),{children:r}=e,o=r[0];if(1!==r.length||1!==o.type){if(1!==r.length||11!==o.type)return eE(n,i(C),em([s]),r,64,void 0,void 0,!0,!1,!1,e.loc);{let e=o.codegenNode;return ts(e,s,n),e}}{let e=o.codegenNode,t=ta(e);return 13===t.type&&eR(t,n),ts(t,s,n),e}}let nt=(e,t,n)=>{let{modifiers:i,loc:s}=e,r=e.arg,{exp:o}=e;if(o&&4===o.type&&!o.content.trim()&&(o=void 0),!o){if(4!==r.type||!r.isStatic)return n.onError(e$(52,r.loc)),{props:[eS(r,eg("",!0,s))]};nn(e),o=e.exp}return 4!==r.type?(r.children.unshift("("),r.children.push(') || ""')):r.isStatic||(r.content=`${r.content} || ""`),i.some(e=>"camel"===e.content)&&(4===r.type?r.isStatic?r.content=_(r.content):r.content=`${n.helperString(ee)}(${r.content})`:(r.children.unshift(`${n.helperString(ee)}(`),r.children.push(")"))),!n.inSSR&&(i.some(e=>"prop"===e.content)&&ni(r,"."),i.some(e=>"attr"===e.content)&&ni(r,"^")),{props:[eS(r,o)]}},nn=(e,t)=>{let n=e.arg,i=_(n.content);e.exp=eg(i,!1,n.loc)},ni=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},ns=tK("for",(e,t,n)=>{let{helper:i,removeHelper:s}=n;return nr(e,t,n,t=>{let r=eN(i(G),[t.source]),o=tt(e),a=e6(e,"memo"),l=e5(e,"key",!1,!0);l&&7===l.type&&!l.exp&&nn(l);let c=l&&(6===l.type?l.value?eg(l.value.content,!0):void 0:l.exp),h=l&&c?eS("key",c):null,p=4===t.source.type&&t.source.constType>0,d=p?64:l?128:256;return t.codegenNode=eE(n,i(C),void 0,r,d,void 0,void 0,!0,!p,!1,e.loc),()=>{let l;let{children:d}=t,u=1!==d.length||1!==d[0].type,f=tn(e)?e:o&&1===e.children.length&&tn(e.children[0])?e.children[0]:null;if(f?(l=f.codegenNode,o&&h&&ts(l,h,n)):u?l=eE(n,i(C),h?em([h]):void 0,e.children,64,void 0,void 0,!0,void 0,!1):(l=d[0].codegenNode,o&&h&&ts(l,h,n),!p!==l.isBlock&&(l.isBlock?(s(L),s(eb(n.inSSR,l.isComponent))):s(eC(n.inSSR,l.isComponent))),l.isBlock=!p,l.isBlock?(i(L),i(eb(n.inSSR,l.isComponent))):i(eC(n.inSSR,l.isComponent))),a){let e=eI(na(t.parseResult,[eg("_cached")]));e.body=eA([eT(["const _memo = (",a.exp,")"]),eT(["if (_cached",...c?[" && _cached.key === ",c]:[],` && ${n.helperString(eh)}(_cached, _memo)) return _cached`]),eT(["const _item = ",l]),eg("_item.memo = _memo"),eg("return _item")]),r.arguments.push(e,eg("_cache"),eg(String(n.cached.length))),n.cached.push(null)}else r.arguments.push(eI(na(t.parseResult),l,!0))}})});function nr(e,t,n,i){if(!t.exp){n.onError(e$(31,t.loc));return}let s=t.forParseResult;if(!s){n.onError(e$(32,t.loc));return}no(s);let{addIdentifiers:r,removeIdentifiers:o,scopes:a}=n,{source:l,value:c,key:h,index:p}=s,d={type:11,loc:t.loc,source:l,valueAlias:c,keyAlias:h,objectIndexAlias:p,parseResult:s,children:tt(e)?e.children:[e]};n.replaceNode(d),a.vFor++;let u=i&&i(d);return()=>{a.vFor--,u&&u()}}function no(e,t){e.finalized||(e.finalized=!0)}function na({value:e,key:t,index:n},i=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((e,t)=>e||eg("_".repeat(t+1),!1))}([e,t,n,...i])}let nl=eg("undefined",!1),nc=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){let n=e6(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},nh=(e,t,n,i)=>eI(e,n,!1,!0,n.length?n[0].loc:i);function np(e,t,n=nh){t.helper(eo);let{children:i,loc:s}=e,r=[],o=[],a=t.scopes.vSlot>0||t.scopes.vFor>0,l=e6(e,"slot",!0);if(l){let{arg:e,exp:t}=l;e&&!ej(e)&&(a=!0),r.push(eS(e||eg("default",!0),n(t,void 0,i,s)))}let c=!1,h=!1,p=[],d=new Set,u=0;for(let e=0;e<i.length;e++){let s,f,E,_;let m=i[e];if(!tt(m)||!(s=e6(m,"slot",!0))){3!==m.type&&p.push(m);continue}if(l){t.onError(e$(37,s.loc));break}c=!0;let{children:S,loc:g}=m,{arg:T=eg("default",!0),exp:N,loc:I}=s;ej(T)?f=T?T.content:"default":a=!0;let y=e6(m,"for"),O=n(N,y,S,g);if(E=e6(m,"if"))a=!0,o.push(ey(E.exp,nd(T,O,u++),nl));else if(_=e6(m,/^else(-if)?$/,!0)){let n,s=e;for(;s--&&3===(n=i[s]).type;);if(n&&tt(n)&&e6(n,/^(else-)?if$/)){let e=o[o.length-1];for(;19===e.alternate.type;)e=e.alternate;e.alternate=_.exp?ey(_.exp,nd(T,O,u++),nl):nd(T,O,u++)}else t.onError(e$(30,_.loc))}else if(y){a=!0;let e=y.forParseResult;e?(no(e),o.push(eN(t.helper(G),[e.source,eI(na(e),nd(T,O),!0)]))):t.onError(e$(32,y.loc))}else{if(f){if(d.has(f)){t.onError(e$(38,I));continue}d.add(f),"default"===f&&(h=!0)}r.push(eS(T,O))}}if(!l){let e=(e,i)=>{let r=n(e,void 0,i,s);return t.compatConfig&&(r.isNonScopedSlot=!0),eS("default",r)};c?p.length&&p.some(e=>(function e(t){return 2!==t.type&&12!==t.type||(2===t.type?!!t.content.trim():e(t.content))})(e))&&(h?t.onError(e$(39,p[0].loc)):r.push(e(void 0,p))):r.push(e(void 0,i))}let f=a?2:!function e(t){for(let n=0;n<t.length;n++){let i=t[n];switch(i.type){case 1:if(2===i.tagType||e(i.children))return!0;break;case 9:if(e(i.branches))return!0;break;case 10:case 11:if(e(i.children))return!0}}return!1}(e.children)?1:3,E=em(r.concat(eS("_",eg(f+"",!1))),s);return o.length&&(E=eN(t.helper(J),[E,e_(o)])),{slots:E,hasDynamicSlots:a}}function nd(e,t,n){let i=[eS("name",e),eS("fn",t)];return null!=n&&i.push(eS("key",eg(String(n),!0))),em(i)}let nu=new WeakMap,nf=(e,t)=>function(){let n,i,s,r,o;if(!(1===(e=t.currentNode).type&&(0===e.tagType||1===e.tagType)))return;let{tag:a,props:l}=e,c=1===e.tagType,h=c?nE(e,t):`"${a}"`,d=p(h)&&h.callee===F,u=0,f=d||h===b||h===R||!c&&("svg"===a||"foreignObject"===a||"math"===a);if(l.length>0){let i=n_(e,t,void 0,c,d);n=i.props,u=i.patchFlag,r=i.dynamicPropNames;let s=i.directives;o=s&&s.length?e_(s.map(e=>nS(e,t))):void 0,i.shouldUseBlock&&(f=!0)}if(e.children.length>0){if(h===v&&(f=!0,u|=1024),c&&h!==b&&h!==v){let{slots:n,hasDynamicSlots:s}=np(e,t);i=n,s&&(u|=1024)}else if(1===e.children.length&&h!==b){let n=e.children[0],s=n.type,r=5===s||8===s;r&&0===t$(n,t)&&(u|=1),i=r||2===s?n:e.children}else i=e.children}r&&r.length&&(s=function(e){let t="[";for(let n=0,i=e.length;n<i;n++)t+=JSON.stringify(e[n]),n<i-1&&(t+=", ");return t+"]"}(r)),e.codegenNode=eE(t,h,n,i,0===u?void 0:u,s,o,!!f,!1,c,e.loc)};function nE(e,t,n=!1){let{tag:i}=e,s=ng(i),r=e5(e,"is",!1,!0);if(r){if(s||ew("COMPILER_IS_ON_ELEMENT",t)){let e;if(6===r.type?e=r.value&&eg(r.value.content,!0):(e=r.exp)||(e=eg("is",!1,r.arg.loc)),e)return eN(t.helper(F),[e])}else 6===r.type&&r.value.content.startsWith("vue:")&&(i=r.value.content.slice(4))}let o=eW(i)||t.isBuiltInComponent(i);return o?(n||t.helper(o),o):(t.helper(U),t.components.add(i),to(i,"component"))}function n_(e,t,n=e.props,i,s,r=!1){let a;let{tag:l,loc:c,children:p}=e,f=[],E=[],_=[],m=p.length>0,S=!1,g=0,T=!1,N=!1,I=!1,y=!1,O=!1,A=!1,C=[],b=e=>{f.length&&(E.push(em(nm(f),c)),f=[]),e&&E.push(e)},R=()=>{t.scopes.vFor>0&&f.push(eS(eg("ref_for",!0),eg("true")))},v=({key:e,value:n})=>{if(ej(e)){let r=e.content,a=o(r);a&&(!i||s)&&"onclick"!==r.toLowerCase()&&"onUpdate:modelValue"!==r&&!d(r)&&(y=!0),a&&d(r)&&(A=!0),a&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&t$(n,t)>0||("ref"===r?T=!0:"class"===r?N=!0:"style"===r?I=!0:"key"===r||C.includes(r)||C.push(r),i&&("class"===r||"style"===r)&&!C.includes(r)&&C.push(r))}else O=!0};for(let s=0;s<n.length;s++){let o=n[s];if(6===o.type){let{loc:e,name:n,nameLoc:i,value:s}=o;if("ref"===n&&(T=!0,R()),"is"===n&&(ng(l)||s&&s.content.startsWith("vue:")||ew("COMPILER_IS_ON_ELEMENT",t)))continue;f.push(eS(eg(n,!0,i),eg(s?s.content:"",!0,s?s.loc:e)))}else{let{name:n,arg:s,exp:a,loc:p,modifiers:d}=o,T="bind"===n,N="on"===n;if("slot"===n){i||t.onError(e$(40,p));continue}if("once"===n||"memo"===n||"is"===n||T&&e9(s,"is")&&(ng(l)||ew("COMPILER_IS_ON_ELEMENT",t))||N&&r)continue;if((T&&e9(s,"key")||N&&m&&e9(s,"vue:before-update"))&&(S=!0),T&&e9(s,"ref")&&R(),!s&&(T||N)){if(O=!0,a){if(T){if(R(),b(),ew("COMPILER_V_BIND_OBJECT_ORDER",t)){E.unshift(a);continue}E.push(a)}else b({type:14,loc:p,callee:t.helper(Z),arguments:i?[a]:[a,"true"]})}else t.onError(e$(T?34:35,p));continue}T&&d.some(e=>"prop"===e.content)&&(g|=32);let I=t.directiveTransforms[n];if(I){let{props:n,needRuntime:i}=I(o,e,t);r||n.forEach(v),N&&s&&!ej(s)?b(em(n,c)):f.push(...n),i&&(_.push(o),h(i)&&nu.set(o,i))}else!u(n)&&(_.push(o),m&&(S=!0))}}if(E.length?(b(),a=E.length>1?eN(t.helper(W),E,c):E[0]):f.length&&(a=em(nm(f),c)),O?g|=16:(N&&!i&&(g|=2),I&&!i&&(g|=4),C.length&&(g|=8),y&&(g|=32)),!S&&(0===g||32===g)&&(T||A||_.length>0)&&(g|=512),!t.inSSR&&a)switch(a.type){case 15:let x=-1,L=-1,M=!1;for(let e=0;e<a.properties.length;e++){let t=a.properties[e].key;ej(t)?"class"===t.content?x=e:"style"===t.content&&(L=e):t.isHandlerKey||(M=!0)}let D=a.properties[x],P=a.properties[L];M?a=eN(t.helper(Q),[a]):(D&&!ej(D.value)&&(D.value=eN(t.helper(K),[D.value])),P&&(I||4===P.value.type&&"["===P.value.content.trim()[0]||17===P.value.type)&&(P.value=eN(t.helper(Y),[P.value])));break;case 14:break;default:a=eN(t.helper(Q),[eN(t.helper(z),[a])])}return{props:a,directives:_,patchFlag:g,dynamicPropNames:C,shouldUseBlock:S}}function nm(e){let t=new Map,n=[];for(let i=0;i<e.length;i++){let s=e[i];if(8===s.key.type||!s.key.isStatic){n.push(s);continue}let r=s.key.content,a=t.get(r);a?("style"===r||"class"===r||o(r))&&(17===a.value.type?a.value.elements.push(s.value):a.value=e_([a.value,s.value],a.loc)):(t.set(r,s),n.push(s))}return n}function nS(e,t){let n=[],i=nu.get(e);i?n.push(t.helperString(i)):(t.helper(B),t.directives.add(e.name),n.push(to(e.name,"directive")));let{loc:s}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));let t=eg("true",!1,s);n.push(em(e.modifiers.map(e=>eS(e,t)),s))}return e_(n,e.loc)}function ng(e){return"component"===e||"Component"===e}let nT=(e,t)=>{if(tn(e)){let{children:n,loc:i}=e,{slotName:s,slotProps:r}=nN(e,t),o=[t.prefixIdentifiers?"_ctx.$slots":"$slots",s,"{}","undefined","true"],a=2;r&&(o[2]=r,a=3),n.length&&(o[3]=eI([],n,!1,!1,i),a=4),t.scopeId&&!t.slotted&&(a=5),o.splice(a),e.codegenNode=eN(t.helper(q),o,i)}};function nN(e,t){let n,i='"default"',s=[];for(let t=0;t<e.props.length;t++){let n=e.props[t];if(6===n.type)n.value&&("name"===n.name?i=JSON.stringify(n.value.content):(n.name=_(n.name),s.push(n)));else if("bind"===n.name&&e9(n.arg,"name")){if(n.exp)i=n.exp;else if(n.arg&&4===n.arg.type){let e=_(n.arg.content);i=n.exp=eg(e,!1,n.arg.loc)}}else"bind"===n.name&&n.arg&&ej(n.arg)&&(n.arg.content=_(n.arg.content)),s.push(n)}if(s.length>0){let{props:i,directives:r}=n_(e,t,s,!1,!1);n=i,r.length&&t.onError(e$(36,r[0].loc))}return{slotName:i,slotProps:n}}let nI=(e,t,n,i)=>{let s;let{loc:r,modifiers:o,arg:a}=e;if(e.exp||o.length,4===a.type){if(a.isStatic){let e=a.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`),s=eg(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?S(_(e)):`on:${e}`,!0,a.loc)}else s=eT([`${n.helperString(en)}(`,a,")"])}else(s=a).children.unshift(`${n.helperString(en)}(`),s.children.push(")");let l=e.exp;l&&!l.content.trim()&&(l=void 0);let c=n.cacheHandlers&&!l&&!n.inVOnce;if(l){let e=e0(l),t=!(e||e3(l)),n=l.content.includes(";");(t||c&&e)&&(l=eT([`${t?"$event":"(...args)"} => ${n?"{":"("}`,l,n?"}":")"]))}let h={props:[eS(s,l||eg("() => {}",!1,r))]};return i&&(h=i(h)),c&&(h.props[0].value=n.cache(h.props[0].value)),h.props.forEach(e=>e.key.isHandlerKey=!0),h},ny=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{let n;let i=e.children,s=!1;for(let e=0;e<i.length;e++){let t=i[e];if(e8(t)){s=!0;for(let s=e+1;s<i.length;s++){let r=i[s];if(e8(r))n||(n=i[e]=eT([t],t.loc)),n.children.push(" + ",r),i.splice(s,1),s--;else{n=void 0;break}}}}if(s&&(1!==i.length||0!==e.type&&(1!==e.type||0!==e.tagType||e.props.find(e=>7===e.type&&!t.directiveTransforms[e.name])||"template"===e.tag)))for(let e=0;e<i.length;e++){let n=i[e];if(e8(n)||8===n.type){let s=[];(2!==n.type||" "!==n.content)&&s.push(n),t.ssr||0!==t$(n,t)||s.push("1"),i[e]={type:12,content:n,loc:n.loc,codegenNode:eN(t.helper(X),s)}}}}},nO=new WeakSet,nA=(e,t)=>{if(1===e.type&&e6(e,"once",!0)&&!nO.has(e)&&!t.inVOnce&&!t.inSSR)return nO.add(e),t.inVOnce=!0,t.helper(ei),()=>{t.inVOnce=!1;let e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0,!0))}},nC=(e,t,n)=>{let i;let{exp:s,arg:r}=e;if(!s)return n.onError(e$(41,e.loc)),nb();let o=s.loc.source.trim(),a=4===s.type?s.content:o,l=n.bindingMetadata[o];if("props"===l||"props-aliased"===l)return s.loc,nb();if(!a.trim()||!e0(s))return n.onError(e$(42,s.loc)),nb();let c=r||eg("modelValue",!0),h=r?ej(r)?`onUpdate:${_(r.content)}`:eT(['"onUpdate:" + ',r]):"onUpdate:modelValue",p=n.isTS?"($event: any)":"$event";i=eT([`${p} => ((`,s,") = $event)"]);let d=[eS(c,e.exp),eS(h,i)];if(e.modifiers.length&&1===t.tagType){let t=e.modifiers.map(e=>e.content).map(e=>(eY(e)?e:JSON.stringify(e))+": true").join(", "),n=r?ej(r)?`${r.content}Modifiers`:eT([r,' + "Modifiers"']):"modelModifiers";d.push(eS(n,eg(`{ ${t} }`,!1,e.loc,2)))}return nb(d)};function nb(e=[]){return{props:e}}let nR=/[\w).+\-_$\]]/,nv=(e,t)=>{ew("COMPILER_FILTERS",t)&&(5===e.type?nx(e.content,t):1===e.type&&e.props.forEach(e=>{7===e.type&&"for"!==e.name&&e.exp&&nx(e.exp,t)}))};function nx(e,t){if(4===e.type)nL(e,t);else for(let n=0;n<e.children.length;n++){let i=e.children[n];"object"==typeof i&&(4===i.type?nL(i,t):8===i.type?nx(e,t):5===i.type&&nx(i.content,t))}}function nL(e,t){let n=e.content,i=!1,s=!1,r=!1,o=!1,a=0,l=0,c=0,h=0,p,d,u,f,E=[];for(u=0;u<n.length;u++)if(d=p,p=n.charCodeAt(u),i)39===p&&92!==d&&(i=!1);else if(s)34===p&&92!==d&&(s=!1);else if(r)96===p&&92!==d&&(r=!1);else if(o)47===p&&92!==d&&(o=!1);else if(124!==p||124===n.charCodeAt(u+1)||124===n.charCodeAt(u-1)||a||l||c){switch(p){case 34:s=!0;break;case 39:i=!0;break;case 96:r=!0;break;case 40:c++;break;case 41:c--;break;case 91:l++;break;case 93:l--;break;case 123:a++;break;case 125:a--}if(47===p){let e,t=u-1;for(;t>=0&&" "===(e=n.charAt(t));t--);e&&nR.test(e)||(o=!0)}}else void 0===f?(h=u+1,f=n.slice(0,u).trim()):_();function _(){E.push(n.slice(h,u).trim()),h=u+1}if(void 0===f?f=n.slice(0,u).trim():0!==h&&_(),E.length){for(u=0;u<E.length;u++)f=function(e,t,n){n.helper($);let i=t.indexOf("(");if(i<0)return n.filters.add(t),`${to(t,"filter")}(${e})`;{let s=t.slice(0,i),r=t.slice(i+1);return n.filters.add(s),`${to(s,"filter")}(${e}${")"!==r?","+r:r}`}}(f,E[u],t);e.content=f,e.ast=void 0}}let nM=new WeakSet,nD=(e,t)=>{if(1===e.type){let n=e6(e,"memo");if(!(!n||nM.has(e)))return nM.add(e),()=>{let i=e.codegenNode||t.currentNode.codegenNode;i&&13===i.type&&(1!==e.tagType&&eR(i,t),e.codegenNode=eN(t.helper(ec),[n.exp,eI(void 0,i),"_cache",String(t.cached.length)]),t.cached.push(null))}}};function nP(e){return[[nA,t5,nD,ns,nv,nT,nf,nc,ny],{on:nI,bind:nt,model:nC}]}function nV(e,t={}){let n=t.onError||eF,i="module"===t.mode;!0===t.prefixIdentifiers?n(e$(47)):i&&n(e$(48)),t.cacheHandlers&&n(e$(49)),t.scopeId&&!i&&n(e$(50));let s=a({},t,{prefixIdentifiers:!1}),r=c(e)?tF(e,s):e,[o,l]=nP();return tj(r,a({},s,{nodeTransforms:[...o,...t.nodeTransforms||[]],directiveTransforms:a({},l,t.directiveTransforms||{})})),tz(r,s)}let nk=()=>({props:[]}),nX=Symbol(""),nw=Symbol(""),nU=Symbol(""),nF=Symbol(""),nB=Symbol(""),n$=Symbol(""),nH=Symbol(""),nG=Symbol(""),nq=Symbol(""),nJ=Symbol("");ed({[nX]:"vModelRadio",[nw]:"vModelCheckbox",[nU]:"vModelText",[nF]:"vModelSelect",[nB]:"vModelDynamic",[n$]:"withModifiers",[nH]:"withKeys",[nG]:"vShow",[nq]:"Transition",[nJ]:"TransitionGroup"});let nj={parseMode:"html",isVoidTag:A,isNativeTag:e=>I(e)||y(e)||O(e),isPreTag:e=>"pre"===e,isIgnoreNewlineTag:e=>"pre"===e||"textarea"===e,decodeEntities:function(e,n=!1){return(t||(t=document.createElement("div")),n)?(t.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,t.children[0].getAttribute("foo")):(t.innerHTML=e,t.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?nq:"TransitionGroup"===e||"transition-group"===e?nJ:void 0,getNamespace(e,t,n){let i=t?t.ns:n;if(t&&2===i){if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some(e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content))&&(i=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(i=0)}else t&&1===i&&("foreignObject"===t.tag||"desc"===t.tag||"title"===t.tag)&&(i=0);if(0===i){if("svg"===e)return 1;if("math"===e)return 2}return i}},nW=e=>{1===e.type&&e.props.forEach((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:eg("style",!0,t.loc),exp:nK(t.value.content,t.loc),modifiers:[],loc:t.loc})})},nK=(e,t)=>eg(JSON.stringify(function(e){let t={};return e.replace(N,"").split(g).forEach(e=>{if(e){let n=e.split(T);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}(e)),!1,t,3),nY=n("passive,once,capture"),nQ=n("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),nz=n("left,right"),nZ=n("onkeyup,onkeydown,onkeypress"),n1=(e,t,n,i)=>{let s=[],r=[],o=[];for(let i=0;i<t.length;i++){let a=t[i].content;"native"===a&&eU("COMPILER_V_ON_NATIVE",n)?o.push(a):nY(a)?o.push(a):nz(a)?ej(e)?nZ(e.content.toLowerCase())?s.push(a):r.push(a):(s.push(a),r.push(a)):nQ(a)?r.push(a):s.push(a)}return{keyModifiers:s,nonKeyModifiers:r,eventOptionModifiers:o}},n0=(e,t)=>ej(e)&&"onclick"===e.content.toLowerCase()?eg(t,!0):4!==e.type?eT(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,n2=(e,t)=>{1===e.type&&0===e.tagType&&("script"===e.tag||"style"===e.tag)&&t.removeNode()},n3=[nW],n4={cloak:nk,html:(e,t,n)=>{let{exp:i,loc:s}=e;return i||n.onError(e$(53,s)),t.children.length&&(n.onError(e$(54,s)),t.children.length=0),{props:[eS(eg("innerHTML",!0,s),i||eg("",!0))]}},text:(e,t,n)=>{let{exp:i,loc:s}=e;return i||n.onError(e$(55,s)),t.children.length&&(n.onError(e$(56,s)),t.children.length=0),{props:[eS(eg("textContent",!0),i?t$(i,n)>0?i:eN(n.helperString(j),[i],s):eg("",!0))]}},model:(e,t,n)=>{let i=nC(e,t,n);if(!i.props.length||1===t.tagType)return i;e.arg&&n.onError(e$(58,e.arg.loc));let{tag:s}=t,r=n.isCustomElement(s);if("input"===s||"textarea"===s||"select"===s||r){let o=nU,a=!1;if("input"===s||r){let i=e5(t,"type");if(i){if(7===i.type)o=nB;else if(i.value)switch(i.value.content){case"radio":o=nX;break;case"checkbox":o=nw;break;case"file":a=!0,n.onError(e$(59,e.loc))}}else e7(t)&&(o=nB)}else"select"===s&&(o=nF);a||(i.needRuntime=n.helper(o))}else n.onError(e$(57,e.loc));return i.props=i.props.filter(e=>!(4===e.key.type&&"modelValue"===e.key.content)),i},on:(e,t,n)=>nI(e,t,n,t=>{let{modifiers:i}=e;if(!i.length)return t;let{key:s,value:r}=t.props[0],{keyModifiers:o,nonKeyModifiers:a,eventOptionModifiers:l}=n1(s,i,n,e.loc);if(a.includes("right")&&(s=n0(s,"onContextmenu")),a.includes("middle")&&(s=n0(s,"onMouseup")),a.length&&(r=eN(n.helper(n$),[r,JSON.stringify(a)])),o.length&&(!ej(s)||nZ(s.content.toLowerCase()))&&(r=eN(n.helper(nH),[r,JSON.stringify(o)])),l.length){let e=l.map(m).join("");s=ej(s)?eg(`${s.content}${e}`,!0):eT(["(",s,`) + "${e}"`])}return{props:[eS(s,r)]}}),show:(e,t,n)=>{let{exp:i,loc:s}=e;return!i&&n.onError(e$(61,s)),{props:[],needRuntime:n.helper(nG)}}};return e.BASE_TRANSITION=x,e.BindingTypes={DATA:"data",PROPS:"props",PROPS_ALIASED:"props-aliased",SETUP_LET:"setup-let",SETUP_CONST:"setup-const",SETUP_REACTIVE_CONST:"setup-reactive-const",SETUP_MAYBE_REF:"setup-maybe-ref",SETUP_REF:"setup-ref",OPTIONS:"options",LITERAL_CONST:"literal-const"},e.CAMELIZE=ee,e.CAPITALIZE=et,e.CREATE_BLOCK=M,e.CREATE_COMMENT=k,e.CREATE_ELEMENT_BLOCK=D,e.CREATE_ELEMENT_VNODE=V,e.CREATE_SLOTS=J,e.CREATE_STATIC=w,e.CREATE_TEXT=X,e.CREATE_VNODE=P,e.CompilerDeprecationTypes={COMPILER_IS_ON_ELEMENT:"COMPILER_IS_ON_ELEMENT",COMPILER_V_BIND_SYNC:"COMPILER_V_BIND_SYNC",COMPILER_V_BIND_OBJECT_ORDER:"COMPILER_V_BIND_OBJECT_ORDER",COMPILER_V_ON_NATIVE:"COMPILER_V_ON_NATIVE",COMPILER_V_IF_V_FOR_PRECEDENCE:"COMPILER_V_IF_V_FOR_PRECEDENCE",COMPILER_NATIVE_TEMPLATE:"COMPILER_NATIVE_TEMPLATE",COMPILER_INLINE_TEMPLATE:"COMPILER_INLINE_TEMPLATE",COMPILER_FILTERS:"COMPILER_FILTERS"},e.ConstantTypes={NOT_CONSTANT:0,0:"NOT_CONSTANT",CAN_SKIP_PATCH:1,1:"CAN_SKIP_PATCH",CAN_CACHE:2,2:"CAN_CACHE",CAN_STRINGIFY:3,3:"CAN_STRINGIFY"},e.DOMDirectiveTransforms=n4,e.DOMErrorCodes={X_V_HTML_NO_EXPRESSION:53,53:"X_V_HTML_NO_EXPRESSION",X_V_HTML_WITH_CHILDREN:54,54:"X_V_HTML_WITH_CHILDREN",X_V_TEXT_NO_EXPRESSION:55,55:"X_V_TEXT_NO_EXPRESSION",X_V_TEXT_WITH_CHILDREN:56,56:"X_V_TEXT_WITH_CHILDREN",X_V_MODEL_ON_INVALID_ELEMENT:57,57:"X_V_MODEL_ON_INVALID_ELEMENT",X_V_MODEL_ARG_ON_ELEMENT:58,58:"X_V_MODEL_ARG_ON_ELEMENT",X_V_MODEL_ON_FILE_INPUT_ELEMENT:59,59:"X_V_MODEL_ON_FILE_INPUT_ELEMENT",X_V_MODEL_UNNECESSARY_VALUE:60,60:"X_V_MODEL_UNNECESSARY_VALUE",X_V_SHOW_NO_EXPRESSION:61,61:"X_V_SHOW_NO_EXPRESSION",X_TRANSITION_INVALID_CHILDREN:62,62:"X_TRANSITION_INVALID_CHILDREN",X_IGNORED_SIDE_EFFECT_TAG:63,63:"X_IGNORED_SIDE_EFFECT_TAG",__EXTEND_POINT__:64,64:"__EXTEND_POINT__"},e.DOMErrorMessages={53:"v-html is missing expression.",54:"v-html will override element children.",55:"v-text is missing expression.",56:"v-text will override element children.",57:"v-model can only be used on <input>, <textarea> and <select> elements.",58:"v-model argument is not supported on plain elements.",59:"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",60:"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",61:"v-show is missing expression.",62:"<Transition> expects exactly one child element or component.",63:"Tags with side effect (<script> and <style>) are ignored in client component templates."},e.DOMNodeTransforms=n3,e.ElementTypes={ELEMENT:0,0:"ELEMENT",COMPONENT:1,1:"COMPONENT",SLOT:2,2:"SLOT",TEMPLATE:3,3:"TEMPLATE"},e.ErrorCodes={ABRUPT_CLOSING_OF_EMPTY_COMMENT:0,0:"ABRUPT_CLOSING_OF_EMPTY_COMMENT",CDATA_IN_HTML_CONTENT:1,1:"CDATA_IN_HTML_CONTENT",DUPLICATE_ATTRIBUTE:2,2:"DUPLICATE_ATTRIBUTE",END_TAG_WITH_ATTRIBUTES:3,3:"END_TAG_WITH_ATTRIBUTES",END_TAG_WITH_TRAILING_SOLIDUS:4,4:"END_TAG_WITH_TRAILING_SOLIDUS",EOF_BEFORE_TAG_NAME:5,5:"EOF_BEFORE_TAG_NAME",EOF_IN_CDATA:6,6:"EOF_IN_CDATA",EOF_IN_COMMENT:7,7:"EOF_IN_COMMENT",EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT:8,8:"EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT",EOF_IN_TAG:9,9:"EOF_IN_TAG",INCORRECTLY_CLOSED_COMMENT:10,10:"INCORRECTLY_CLOSED_COMMENT",INCORRECTLY_OPENED_COMMENT:11,11:"INCORRECTLY_OPENED_COMMENT",INVALID_FIRST_CHARACTER_OF_TAG_NAME:12,12:"INVALID_FIRST_CHARACTER_OF_TAG_NAME",MISSING_ATTRIBUTE_VALUE:13,13:"MISSING_ATTRIBUTE_VALUE",MISSING_END_TAG_NAME:14,14:"MISSING_END_TAG_NAME",MISSING_WHITESPACE_BETWEEN_ATTRIBUTES:15,15:"MISSING_WHITESPACE_BETWEEN_ATTRIBUTES",NESTED_COMMENT:16,16:"NESTED_COMMENT",UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME:17,17:"UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME",UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE:18,18:"UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE",UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME:19,19:"UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME",UNEXPECTED_NULL_CHARACTER:20,20:"UNEXPECTED_NULL_CHARACTER",UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME:21,21:"UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME",UNEXPECTED_SOLIDUS_IN_TAG:22,22:"UNEXPECTED_SOLIDUS_IN_TAG",X_INVALID_END_TAG:23,23:"X_INVALID_END_TAG",X_MISSING_END_TAG:24,24:"X_MISSING_END_TAG",X_MISSING_INTERPOLATION_END:25,25:"X_MISSING_INTERPOLATION_END",X_MISSING_DIRECTIVE_NAME:26,26:"X_MISSING_DIRECTIVE_NAME",X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END:27,27:"X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END",X_V_IF_NO_EXPRESSION:28,28:"X_V_IF_NO_EXPRESSION",X_V_IF_SAME_KEY:29,29:"X_V_IF_SAME_KEY",X_V_ELSE_NO_ADJACENT_IF:30,30:"X_V_ELSE_NO_ADJACENT_IF",X_V_FOR_NO_EXPRESSION:31,31:"X_V_FOR_NO_EXPRESSION",X_V_FOR_MALFORMED_EXPRESSION:32,32:"X_V_FOR_MALFORMED_EXPRESSION",X_V_FOR_TEMPLATE_KEY_PLACEMENT:33,33:"X_V_FOR_TEMPLATE_KEY_PLACEMENT",X_V_BIND_NO_EXPRESSION:34,34:"X_V_BIND_NO_EXPRESSION",X_V_ON_NO_EXPRESSION:35,35:"X_V_ON_NO_EXPRESSION",X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET:36,36:"X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET",X_V_SLOT_MIXED_SLOT_USAGE:37,37:"X_V_SLOT_MIXED_SLOT_USAGE",X_V_SLOT_DUPLICATE_SLOT_NAMES:38,38:"X_V_SLOT_DUPLICATE_SLOT_NAMES",X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN:39,39:"X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN",X_V_SLOT_MISPLACED:40,40:"X_V_SLOT_MISPLACED",X_V_MODEL_NO_EXPRESSION:41,41:"X_V_MODEL_NO_EXPRESSION",X_V_MODEL_MALFORMED_EXPRESSION:42,42:"X_V_MODEL_MALFORMED_EXPRESSION",X_V_MODEL_ON_SCOPE_VARIABLE:43,43:"X_V_MODEL_ON_SCOPE_VARIABLE",X_V_MODEL_ON_PROPS:44,44:"X_V_MODEL_ON_PROPS",X_INVALID_EXPRESSION:45,45:"X_INVALID_EXPRESSION",X_KEEP_ALIVE_INVALID_CHILDREN:46,46:"X_KEEP_ALIVE_INVALID_CHILDREN",X_PREFIX_ID_NOT_SUPPORTED:47,47:"X_PREFIX_ID_NOT_SUPPORTED",X_MODULE_MODE_NOT_SUPPORTED:48,48:"X_MODULE_MODE_NOT_SUPPORTED",X_CACHE_HANDLER_NOT_SUPPORTED:49,49:"X_CACHE_HANDLER_NOT_SUPPORTED",X_SCOPE_ID_NOT_SUPPORTED:50,50:"X_SCOPE_ID_NOT_SUPPORTED",X_VNODE_HOOKS:51,51:"X_VNODE_HOOKS",X_V_BIND_INVALID_SAME_NAME_ARGUMENT:52,52:"X_V_BIND_INVALID_SAME_NAME_ARGUMENT",__EXTEND_POINT__:53,53:"__EXTEND_POINT__"},e.FRAGMENT=C,e.GUARD_REACTIVE_PROPS=z,e.IS_MEMO_SAME=eh,e.IS_REF=el,e.KEEP_ALIVE=v,e.MERGE_PROPS=W,e.NORMALIZE_CLASS=K,e.NORMALIZE_PROPS=Q,e.NORMALIZE_STYLE=Y,e.Namespaces={HTML:0,0:"HTML",SVG:1,1:"SVG",MATH_ML:2,2:"MATH_ML"},e.NodeTypes={ROOT:0,0:"ROOT",ELEMENT:1,1:"ELEMENT",TEXT:2,2:"TEXT",COMMENT:3,3:"COMMENT",SIMPLE_EXPRESSION:4,4:"SIMPLE_EXPRESSION",INTERPOLATION:5,5:"INTERPOLATION",ATTRIBUTE:6,6:"ATTRIBUTE",DIRECTIVE:7,7:"DIRECTIVE",COMPOUND_EXPRESSION:8,8:"COMPOUND_EXPRESSION",IF:9,9:"IF",IF_BRANCH:10,10:"IF_BRANCH",FOR:11,11:"FOR",TEXT_CALL:12,12:"TEXT_CALL",VNODE_CALL:13,13:"VNODE_CALL",JS_CALL_EXPRESSION:14,14:"JS_CALL_EXPRESSION",JS_OBJECT_EXPRESSION:15,15:"JS_OBJECT_EXPRESSION",JS_PROPERTY:16,16:"JS_PROPERTY",JS_ARRAY_EXPRESSION:17,17:"JS_ARRAY_EXPRESSION",JS_FUNCTION_EXPRESSION:18,18:"JS_FUNCTION_EXPRESSION",JS_CONDITIONAL_EXPRESSION:19,19:"JS_CONDITIONAL_EXPRESSION",JS_CACHE_EXPRESSION:20,20:"JS_CACHE_EXPRESSION",JS_BLOCK_STATEMENT:21,21:"JS_BLOCK_STATEMENT",JS_TEMPLATE_LITERAL:22,22:"JS_TEMPLATE_LITERAL",JS_IF_STATEMENT:23,23:"JS_IF_STATEMENT",JS_ASSIGNMENT_EXPRESSION:24,24:"JS_ASSIGNMENT_EXPRESSION",JS_SEQUENCE_EXPRESSION:25,25:"JS_SEQUENCE_EXPRESSION",JS_RETURN_STATEMENT:26,26:"JS_RETURN_STATEMENT"},e.OPEN_BLOCK=L,e.POP_SCOPE_ID=er,e.PUSH_SCOPE_ID=es,e.RENDER_LIST=G,e.RENDER_SLOT=q,e.RESOLVE_COMPONENT=U,e.RESOLVE_DIRECTIVE=B,e.RESOLVE_DYNAMIC_COMPONENT=F,e.RESOLVE_FILTER=$,e.SET_BLOCK_TRACKING=ei,e.SUSPENSE=R,e.TELEPORT=b,e.TO_DISPLAY_STRING=j,e.TO_HANDLERS=Z,e.TO_HANDLER_KEY=en,e.TRANSITION=nq,e.TRANSITION_GROUP=nJ,e.TS_NODE_TYPES=eJ,e.UNREF=ea,e.V_MODEL_CHECKBOX=nw,e.V_MODEL_DYNAMIC=nB,e.V_MODEL_RADIO=nX,e.V_MODEL_SELECT=nF,e.V_MODEL_TEXT=nU,e.V_ON_WITH_KEYS=nH,e.V_ON_WITH_MODIFIERS=n$,e.V_SHOW=nG,e.WITH_CTX=eo,e.WITH_DIRECTIVES=H,e.WITH_MEMO=ec,e.advancePositionWithClone=function(e,t,n=t.length){return e4({offset:e.offset,line:e.line,column:e.column},t,n)},e.advancePositionWithMutation=e4,e.assert=function(e,t){if(!e)throw Error(t||"unexpected compiler condition")},e.baseCompile=nV,e.baseParse=tF,e.buildDirectiveArgs=nS,e.buildProps=n_,e.buildSlots=np,e.checkCompatEnabled=eU,e.compile=function(e,t={}){return nV(e,a({},nj,t,{nodeTransforms:[n2,...n3,...t.nodeTransforms||[]],directiveTransforms:a({},n4,t.directiveTransforms||{}),transformHoist:null}))},e.convertToBlock=eR,e.createArrayExpression=e_,e.createAssignmentExpression=function(e,t){return{type:24,left:e,right:t,loc:eu}},e.createBlockStatement=eA,e.createCacheExpression=eO,e.createCallExpression=eN,e.createCompilerError=e$,e.createCompoundExpression=eT,e.createConditionalExpression=ey,e.createDOMCompilerError=function(e,t){return e$(e,t)},e.createForLoopParams=na,e.createFunctionExpression=eI,e.createIfStatement=function(e,t,n){return{type:23,test:e,consequent:t,alternate:n,loc:eu}},e.createInterpolation=function(e,t){return{type:5,loc:t,content:c(e)?eg(e,!1,t):e}},e.createObjectExpression=em,e.createObjectProperty=eS,e.createReturnStatement=function(e){return{type:26,returns:e,loc:eu}},e.createRoot=ef,e.createSequenceExpression=function(e){return{type:25,expressions:e,loc:eu}},e.createSimpleExpression=eg,e.createStructuralDirectiveTransform=tK,e.createTemplateLiteral=function(e){return{type:22,elements:e,loc:eu}},e.createTransformContext=tJ,e.createVNodeCall=eE,e.errorMessages=eH,e.extractIdentifiers=eG,e.findDir=e6,e.findProp=e5,e.forAliasRE=tl,e.generate=tz,e.generateCodeFrame=function(e,t=0,n=e.length){if((t=Math.max(0,Math.min(t,e.length)))>(n=Math.max(0,Math.min(n,e.length))))return"";let i=e.split(/(\r?\n)/),s=i.filter((e,t)=>t%2==1);i=i.filter((e,t)=>t%2==0);let r=0,o=[];for(let e=0;e<i.length;e++)if((r+=i[e].length+(s[e]&&s[e].length||0))>=t){for(let a=e-2;a<=e+2||n>r;a++){if(a<0||a>=i.length)continue;let l=a+1;o.push(`${l}${" ".repeat(Math.max(3-String(l).length,0))}| ${i[a]}`);let c=i[a].length,h=s[a]&&s[a].length||0;if(a===e){let e=t-(r-(c+h)),i=Math.max(1,n>r?c-e:n-t);o.push(" | "+" ".repeat(e)+"^".repeat(i))}else if(a>e){if(n>r){let e=Math.max(Math.min(n-r,c),1);o.push(" | "+"^".repeat(e))}r+=c+h}}break}return o.join("\n")},e.getBaseTransformPreset=nP,e.getConstantType=t$,e.getMemoedVNodeCall=ta,e.getVNodeBlockHelper=eb,e.getVNodeHelper=eC,e.hasDynamicKeyVBind=e7,e.hasScopeRef=function e(t,n){if(!t||0===Object.keys(n).length)return!1;switch(t.type){case 1:for(let i=0;i<t.props.length;i++){let s=t.props[i];if(7===s.type&&(e(s.arg,n)||e(s.exp,n)))return!0}return t.children.some(t=>e(t,n));case 11:if(e(t.source,n))return!0;return t.children.some(t=>e(t,n));case 9:return t.branches.some(t=>e(t,n));case 10:if(e(t.condition,n))return!0;return t.children.some(t=>e(t,n));case 4:return!t.isStatic&&eY(t.content)&&!!n[t.content];case 8:return t.children.some(t=>p(t)&&e(t,n));case 5:case 12:return e(t.content,n);default:return!1}},e.helperNameMap=ep,e.injectProp=ts,e.isCoreComponent=eW,e.isFnExpression=e3,e.isFnExpressionBrowser=e3,e.isFnExpressionNode=s,e.isFunctionType=e=>/Function(?:Expression|Declaration)$|Method$/.test(e.type),e.isInDestructureAssignment=function(e,t){if(e&&("ObjectProperty"===e.type||"ArrayPattern"===e.type)){let e=t.length;for(;e--;){let n=t[e];if("AssignmentExpression"===n.type)return!0;if("ObjectProperty"!==n.type&&!n.type.endsWith("Pattern"))break}}return!1},e.isInNewExpression=function(e){let t=e.length;for(;t--;){let n=e[t];if("NewExpression"===n.type)return!0;if("MemberExpression"!==n.type)break}return!1},e.isMemberExpression=e0,e.isMemberExpressionBrowser=e0,e.isMemberExpressionNode=s,e.isReferencedIdentifier=function(e,t,n){return!1},e.isSimpleIdentifier=eY,e.isSlotOutlet=tn,e.isStaticArgOf=e9,e.isStaticExp=ej,e.isStaticProperty=eq,e.isStaticPropertyKey=(e,t)=>eq(t)&&t.key===e,e.isTemplateNode=tt,e.isText=e8,e.isVSlot=te,e.locStub=eu,e.noopDirectiveTransform=nk,e.parse=function(e,t={}){return tF(e,a({},nj,t))},e.parserOptions=nj,e.processExpression=t6,e.processFor=nr,e.processIf=t9,e.processSlotOutlet=nN,e.registerRuntimeHelpers=ed,e.resolveComponentType=nE,e.stringifyExpression=function e(t){return c(t)?t:4===t.type?t.content:t.children.map(e).join("")},e.toValidAssetId=to,e.trackSlotScopes=nc,e.trackVForSlotScopes=(e,t)=>{let n;if(tt(e)&&e.props.some(te)&&(n=e6(e,"for"))){let e=n.forParseResult;if(e){no(e);let{value:n,key:i,index:s}=e,{addIdentifiers:r,removeIdentifiers:o}=t;return n&&r(n),i&&r(i),s&&r(s),()=>{n&&o(n),i&&o(i),s&&o(s)}}}},e.transform=tj,e.transformBind=nt,e.transformElement=nf,e.transformExpression=(e,t)=>{if(5===e.type)e.content=t6(e.content,t);else if(1===e.type){let n=e6(e,"memo");for(let i=0;i<e.props.length;i++){let s=e.props[i];if(7===s.type&&"for"!==s.name){let e=s.exp,i=s.arg;!e||4!==e.type||"on"===s.name&&i||n&&i&&4===i.type&&"key"===i.content||(s.exp=t6(e,t,"slot"===s.name)),i&&4===i.type&&!i.isStatic&&(s.arg=t6(i,t))}}}},e.transformModel=nC,e.transformOn=nI,e.transformStyle=nW,e.traverseNode=tW,e.unwrapTSNode=function e(t){return eJ.includes(t.type)?e(t.expression):t},e.walkBlockDeclarations=function(e,t){for(let n of e.body)if("VariableDeclaration"===n.type){if(n.declare)continue;for(let e of n.declarations)for(let n of eG(e.id))t(n)}else if("FunctionDeclaration"===n.type||"ClassDeclaration"===n.type){if(n.declare||!n.id)continue;t(n.id)}else("ForOfStatement"===n.type||"ForInStatement"===n.type||"ForStatement"===n.type)&&function(e,t,n){let i="ForStatement"===e.type?e.init:e.left;if(i&&"VariableDeclaration"===i.type&&("var"===i.kind?t:!t))for(let e of i.declarations)for(let t of eG(e.id))n(t)}(n,!0,t)},e.walkFunctionParams=function(e,t){for(let n of e.params)for(let e of eG(n))t(e)},e.walkIdentifiers=function(e,t,n=!1,i=[],s=Object.create(null)){},e.warnDeprecation=function(e,t,n,...i){if("suppress-warning"===eX(e,t))return;let{message:s,link:r}=ek[e],o=SyntaxError(`(deprecation ${e}) ${"function"==typeof s?s(...i):s}${r?` + Details: ${r}`:""}`);o.code=e,n&&(o.loc=n),t.onWarn(o)},e}({}); diff --git a/vuetest/node_modules/@vue/compiler-dom/index.js b/vuetest/node_modules/@vue/compiler-dom/index.js new file mode 100644 index 0000000..b5f7a05 --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-dom/index.js @@ -0,0 +1,7 @@ +'use strict' + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/compiler-dom.cjs.prod.js') +} else { + module.exports = require('./dist/compiler-dom.cjs.js') +} diff --git a/vuetest/node_modules/@vue/compiler-dom/package.json b/vuetest/node_modules/@vue/compiler-dom/package.json new file mode 100644 index 0000000..f494774 --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-dom/package.json @@ -0,0 +1,57 @@ +{ + "name": "@vue/compiler-dom", + "version": "3.5.13", + "description": "@vue/compiler-dom", + "main": "index.js", + "module": "dist/compiler-dom.esm-bundler.js", + "types": "dist/compiler-dom.d.ts", + "unpkg": "dist/compiler-dom.global.js", + "jsdelivr": "dist/compiler-dom.global.js", + "files": [ + "index.js", + "dist" + ], + "exports": { + ".": { + "types": "./dist/compiler-dom.d.ts", + "node": { + "production": "./dist/compiler-dom.cjs.prod.js", + "development": "./dist/compiler-dom.cjs.js", + "default": "./index.js" + }, + "module": "./dist/compiler-dom.esm-bundler.js", + "import": "./dist/compiler-dom.esm-bundler.js", + "require": "./index.js" + }, + "./*": "./*" + }, + "sideEffects": false, + "buildOptions": { + "name": "VueCompilerDOM", + "compat": true, + "formats": [ + "esm-bundler", + "esm-browser", + "cjs", + "global" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/vuejs/core.git", + "directory": "packages/compiler-dom" + }, + "keywords": [ + "vue" + ], + "author": "Evan You", + "license": "MIT", + "bugs": { + "url": "https://github.com/vuejs/core/issues" + }, + "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-dom#readme", + "dependencies": { + "@vue/shared": "3.5.13", + "@vue/compiler-core": "3.5.13" + } +} \ No newline at end of file diff --git a/vuetest/node_modules/@vue/compiler-sfc/LICENSE b/vuetest/node_modules/@vue/compiler-sfc/LICENSE new file mode 100644 index 0000000..15f1f7e --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-sfc/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018-present, Yuxi (Evan) You + +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. diff --git a/vuetest/node_modules/@vue/compiler-sfc/README.md b/vuetest/node_modules/@vue/compiler-sfc/README.md new file mode 100644 index 0000000..4f8ff3a --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-sfc/README.md @@ -0,0 +1,80 @@ +# @vue/compiler-sfc + +> Lower level utilities for compiling Vue Single File Components + +**Note: as of 3.2.13+, this package is included as a dependency of the main `vue` package and can be accessed as `vue/compiler-sfc`. This means you no longer need to explicitly install this package and ensure its version match that of `vue`'s. Just use the main `vue/compiler-sfc` deep import instead.** + +This package contains lower level utilities that you can use if you are writing a plugin / transform for a bundler or module system that compiles Vue Single File Components (SFCs) into JavaScript. It is used in [vue-loader](https://github.com/vuejs/vue-loader) and [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue). + +## API + +The API is intentionally low-level due to the various considerations when integrating Vue SFCs in a build system: + +- Separate hot-module replacement (HMR) for script, template and styles + + - template updates should not reset component state + - style updates should be performed without component re-render + +- Leveraging the tool's plugin system for pre-processor handling. e.g. `<style lang="scss">` should be processed by the corresponding webpack loader. + +- In some cases, transformers of each block in an SFC do not share the same execution context. For example, when used with `thread-loader` or other parallelized configurations, the template sub-loader in `vue-loader` may not have access to the full SFC and its descriptor. + +The general idea is to generate a facade module that imports the individual blocks of the component. The trick is the module imports itself with different query strings so that the build system can handle each request as "virtual" modules: + +``` + +--------------------+ + | | + | script transform | + +----->+ | + | +--------------------+ + | ++--------------------+ | +--------------------+ +| | | | | +| facade transform +----------->+ template transform | +| | | | | ++--------------------+ | +--------------------+ + | + | +--------------------+ + +----->+ | + | style transform | + | | + +--------------------+ +``` + +Where the facade module looks like this: + +```js +// main script +import script from '/project/foo.vue?vue&type=script' +// template compiled to render function +import { render } from '/project/foo.vue?vue&type=template&id=xxxxxx' +// css +import '/project/foo.vue?vue&type=style&index=0&id=xxxxxx' + +// attach render function to script +script.render = render + +// attach additional metadata +// some of these should be dev only +script.__file = 'example.vue' +script.__scopeId = 'xxxxxx' + +// additional tooling-specific HMR handling code +// using __VUE_HMR_API__ global + +export default script +``` + +### High Level Workflow + +1. In facade transform, parse the source into descriptor with the `parse` API and generate the above facade module code based on the descriptor; + +2. In script transform, use `compileScript` to process the script. This handles features like `<script setup>` and CSS variable injection. Alternatively, this can be done directly in the facade module (with the code inlined instead of imported), but it will require rewriting `export default` to a temp variable (a `rewriteDefault` convenience API is provided for this purpose) so additional options can be attached to the exported object. + +3. In template transform, use `compileTemplate` to compile the raw template into render function code. + +4. In style transform, use `compileStyle` to compile raw CSS to handle `<style scoped>`, `<style module>` and CSS variable injection. + +Options needed for these APIs can be passed via the query string. + +For detailed API references and options, check out the source type definitions. For actual usage of these APIs, check out [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue) or [vue-loader](https://github.com/vuejs/vue-loader/tree/next). diff --git a/vuetest/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js b/vuetest/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js new file mode 100644 index 0000000..dc6a170 --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js @@ -0,0 +1,24970 @@ +/** +* @vue/compiler-sfc v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var compilerCore = require('@vue/compiler-core'); +var CompilerDOM = require('@vue/compiler-dom'); +var sourceMapJs = require('source-map-js'); +var shared = require('@vue/shared'); +var path$1 = require('path'); +var url = require('url'); +var CompilerSSR = require('@vue/compiler-ssr'); +var require$$2 = require('util'); +var require$$0 = require('fs'); +var require$$0$1 = require('postcss'); +var estreeWalker = require('estree-walker'); +var MagicString = require('magic-string'); +var parser$2 = require('@babel/parser'); +var process$1 = require('process'); + +function _interopNamespaceDefault(e) { + var n = Object.create(null); + if (e) { + for (var k in e) { + n[k] = e[k]; + } + } + n.default = e; + return Object.freeze(n); +} + +var CompilerDOM__namespace = /*#__PURE__*/_interopNamespaceDefault(CompilerDOM); +var CompilerSSR__namespace = /*#__PURE__*/_interopNamespaceDefault(CompilerSSR); +var process__namespace = /*#__PURE__*/_interopNamespaceDefault(process$1); + +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +function getDefaultExportFromCjs (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +var hashSum; +var hasRequiredHashSum; + +function requireHashSum () { + if (hasRequiredHashSum) return hashSum; + hasRequiredHashSum = 1; + + function pad (hash, len) { + while (hash.length < len) { + hash = '0' + hash; + } + return hash; + } + + function fold (hash, text) { + var i; + var chr; + var len; + if (text.length === 0) { + return hash; + } + for (i = 0, len = text.length; i < len; i++) { + chr = text.charCodeAt(i); + hash = ((hash << 5) - hash) + chr; + hash |= 0; + } + return hash < 0 ? hash * -2 : hash; + } + + function foldObject (hash, o, seen) { + return Object.keys(o).sort().reduce(foldKey, hash); + function foldKey (hash, key) { + return foldValue(hash, o[key], key, seen); + } + } + + function foldValue (input, value, key, seen) { + var hash = fold(fold(fold(input, key), toString(value)), typeof value); + if (value === null) { + return fold(hash, 'null'); + } + if (value === undefined) { + return fold(hash, 'undefined'); + } + if (typeof value === 'object' || typeof value === 'function') { + if (seen.indexOf(value) !== -1) { + return fold(hash, '[Circular]' + key); + } + seen.push(value); + + var objHash = foldObject(hash, value, seen); + + if (!('valueOf' in value) || typeof value.valueOf !== 'function') { + return objHash; + } + + try { + return fold(objHash, String(value.valueOf())) + } catch (err) { + return fold(objHash, '[valueOf exception]' + (err.stack || err.message)) + } + } + return fold(hash, value.toString()); + } + + function toString (o) { + return Object.prototype.toString.call(o); + } + + function sum (o) { + return pad(foldValue(0, o, '', []).toString(16), 8); + } + + hashSum = sum; + return hashSum; +} + +var hashSumExports = /*@__PURE__*/ requireHashSum(); +var hash = /*@__PURE__*/getDefaultExportFromCjs(hashSumExports); + +const CSS_VARS_HELPER = `useCssVars`; +function genCssVarsFromList(vars, id, isProd, isSSR = false) { + return `{ + ${vars.map( + (key) => `"${isSSR ? `--` : ``}${genVarName(id, key, isProd, isSSR)}": (${key})` + ).join(",\n ")} +}`; +} +function genVarName(id, raw, isProd, isSSR = false) { + if (isProd) { + return hash(id + raw); + } else { + return `${id}-${shared.getEscapedCssVarName(raw, isSSR)}`; + } +} +function normalizeExpression(exp) { + exp = exp.trim(); + if (exp[0] === `'` && exp[exp.length - 1] === `'` || exp[0] === `"` && exp[exp.length - 1] === `"`) { + return exp.slice(1, -1); + } + return exp; +} +const vBindRE = /v-bind\s*\(/g; +function parseCssVars(sfc) { + const vars = []; + sfc.styles.forEach((style) => { + let match; + const content = style.content.replace(/\/\*([\s\S]*?)\*\/|\/\/.*/g, ""); + while (match = vBindRE.exec(content)) { + const start = match.index + match[0].length; + const end = lexBinding(content, start); + if (end !== null) { + const variable = normalizeExpression(content.slice(start, end)); + if (!vars.includes(variable)) { + vars.push(variable); + } + } + } + }); + return vars; +} +function lexBinding(content, start) { + let state = 0 /* inParens */; + let parenDepth = 0; + for (let i = start; i < content.length; i++) { + const char = content.charAt(i); + switch (state) { + case 0 /* inParens */: + if (char === `'`) { + state = 1 /* inSingleQuoteString */; + } else if (char === `"`) { + state = 2 /* inDoubleQuoteString */; + } else if (char === `(`) { + parenDepth++; + } else if (char === `)`) { + if (parenDepth > 0) { + parenDepth--; + } else { + return i; + } + } + break; + case 1 /* inSingleQuoteString */: + if (char === `'`) { + state = 0 /* inParens */; + } + break; + case 2 /* inDoubleQuoteString */: + if (char === `"`) { + state = 0 /* inParens */; + } + break; + } + } + return null; +} +const cssVarsPlugin = (opts) => { + const { id, isProd } = opts; + return { + postcssPlugin: "vue-sfc-vars", + Declaration(decl) { + const value = decl.value; + if (vBindRE.test(value)) { + vBindRE.lastIndex = 0; + let transformed = ""; + let lastIndex = 0; + let match; + while (match = vBindRE.exec(value)) { + const start = match.index + match[0].length; + const end = lexBinding(value, start); + if (end !== null) { + const variable = normalizeExpression(value.slice(start, end)); + transformed += value.slice(lastIndex, match.index) + `var(--${genVarName(id, variable, isProd)})`; + lastIndex = end + 1; + } + } + decl.value = transformed + value.slice(lastIndex); + } + } + }; +}; +cssVarsPlugin.postcss = true; +function genCssVarsCode(vars, bindings, id, isProd) { + const varsExp = genCssVarsFromList(vars, id, isProd); + const exp = CompilerDOM.createSimpleExpression(varsExp, false); + const context = CompilerDOM.createTransformContext(CompilerDOM.createRoot([]), { + prefixIdentifiers: true, + inline: true, + bindingMetadata: bindings.__isScriptSetup === false ? void 0 : bindings + }); + const transformed = CompilerDOM.processExpression(exp, context); + const transformedString = transformed.type === 4 ? transformed.content : transformed.children.map((c) => { + return typeof c === "string" ? c : c.content; + }).join(""); + return `_${CSS_VARS_HELPER}(_ctx => (${transformedString}))`; +} +function genNormalScriptCssVarsCode(cssVars, bindings, id, isProd, defaultVar) { + return ` +import { ${CSS_VARS_HELPER} as _${CSS_VARS_HELPER} } from 'vue' +const __injectCSSVars__ = () => { +${genCssVarsCode( + cssVars, + bindings, + id, + isProd + )}} +const __setup__ = ${defaultVar}.setup +${defaultVar}.setup = __setup__ + ? (props, ctx) => { __injectCSSVars__();return __setup__(props, ctx) } + : __injectCSSVars__ +`; +} + +/** + * @module LRUCache + */ +const perf = typeof performance === 'object' && + performance && + typeof performance.now === 'function' + ? performance + : Date; +const warned = new Set(); +/* c8 ignore start */ +const PROCESS = (typeof process === 'object' && !!process ? process : {}); +/* c8 ignore start */ +const emitWarning = (msg, type, code, fn) => { + typeof PROCESS.emitWarning === 'function' + ? PROCESS.emitWarning(msg, type, code, fn) + : console.error(`[${code}] ${type}: ${msg}`); +}; +let AC = globalThis.AbortController; +let AS = globalThis.AbortSignal; +/* c8 ignore start */ +if (typeof AC === 'undefined') { + //@ts-ignore + AS = class AbortSignal { + onabort; + _onabort = []; + reason; + aborted = false; + addEventListener(_, fn) { + this._onabort.push(fn); + } + }; + //@ts-ignore + AC = class AbortController { + constructor() { + warnACPolyfill(); + } + signal = new AS(); + abort(reason) { + if (this.signal.aborted) + return; + //@ts-ignore + this.signal.reason = reason; + //@ts-ignore + this.signal.aborted = true; + //@ts-ignore + for (const fn of this.signal._onabort) { + fn(reason); + } + this.signal.onabort?.(reason); + } + }; + let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'; + const warnACPolyfill = () => { + if (!printACPolyfillWarning) + return; + printACPolyfillWarning = false; + emitWarning('AbortController is not defined. If using lru-cache in ' + + 'node 14, load an AbortController polyfill from the ' + + '`node-abort-controller` package. A minimal polyfill is ' + + 'provided for use by LRUCache.fetch(), but it should not be ' + + 'relied upon in other contexts (eg, passing it to other APIs that ' + + 'use AbortController/AbortSignal might have undesirable effects). ' + + 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.', 'NO_ABORT_CONTROLLER', 'ENOTSUP', warnACPolyfill); + }; +} +/* c8 ignore stop */ +const shouldWarn = (code) => !warned.has(code); +const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n); +/* c8 ignore start */ +// This is a little bit ridiculous, tbh. +// The maximum array length is 2^32-1 or thereabouts on most JS impls. +// And well before that point, you're caching the entire world, I mean, +// that's ~32GB of just integers for the next/prev links, plus whatever +// else to hold that many keys and values. Just filling the memory with +// zeroes at init time is brutal when you get that big. +// But why not be complete? +// Maybe in the future, these limits will have expanded. +const getUintArray = (max) => !isPosInt(max) + ? null + : max <= Math.pow(2, 8) + ? Uint8Array + : max <= Math.pow(2, 16) + ? Uint16Array + : max <= Math.pow(2, 32) + ? Uint32Array + : max <= Number.MAX_SAFE_INTEGER + ? ZeroArray + : null; +/* c8 ignore stop */ +class ZeroArray extends Array { + constructor(size) { + super(size); + this.fill(0); + } +} +class Stack { + heap; + length; + // private constructor + static #constructing = false; + static create(max) { + const HeapCls = getUintArray(max); + if (!HeapCls) + return []; + Stack.#constructing = true; + const s = new Stack(max, HeapCls); + Stack.#constructing = false; + return s; + } + constructor(max, HeapCls) { + /* c8 ignore start */ + if (!Stack.#constructing) { + throw new TypeError('instantiate Stack using Stack.create(n)'); + } + /* c8 ignore stop */ + this.heap = new HeapCls(max); + this.length = 0; + } + push(n) { + this.heap[this.length++] = n; + } + pop() { + return this.heap[--this.length]; + } +} +/** + * Default export, the thing you're using this module to get. + * + * All properties from the options object (with the exception of + * {@link OptionsBase.max} and {@link OptionsBase.maxSize}) are added as + * normal public members. (`max` and `maxBase` are read-only getters.) + * Changing any of these will alter the defaults for subsequent method calls, + * but is otherwise safe. + */ +class LRUCache { + // properties coming in from the options of these, only max and maxSize + // really *need* to be protected. The rest can be modified, as they just + // set defaults for various methods. + #max; + #maxSize; + #dispose; + #disposeAfter; + #fetchMethod; + /** + * {@link LRUCache.OptionsBase.ttl} + */ + ttl; + /** + * {@link LRUCache.OptionsBase.ttlResolution} + */ + ttlResolution; + /** + * {@link LRUCache.OptionsBase.ttlAutopurge} + */ + ttlAutopurge; + /** + * {@link LRUCache.OptionsBase.updateAgeOnGet} + */ + updateAgeOnGet; + /** + * {@link LRUCache.OptionsBase.updateAgeOnHas} + */ + updateAgeOnHas; + /** + * {@link LRUCache.OptionsBase.allowStale} + */ + allowStale; + /** + * {@link LRUCache.OptionsBase.noDisposeOnSet} + */ + noDisposeOnSet; + /** + * {@link LRUCache.OptionsBase.noUpdateTTL} + */ + noUpdateTTL; + /** + * {@link LRUCache.OptionsBase.maxEntrySize} + */ + maxEntrySize; + /** + * {@link LRUCache.OptionsBase.sizeCalculation} + */ + sizeCalculation; + /** + * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection} + */ + noDeleteOnFetchRejection; + /** + * {@link LRUCache.OptionsBase.noDeleteOnStaleGet} + */ + noDeleteOnStaleGet; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort} + */ + allowStaleOnFetchAbort; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} + */ + allowStaleOnFetchRejection; + /** + * {@link LRUCache.OptionsBase.ignoreFetchAbort} + */ + ignoreFetchAbort; + // computed properties + #size; + #calculatedSize; + #keyMap; + #keyList; + #valList; + #next; + #prev; + #head; + #tail; + #free; + #disposed; + #sizes; + #starts; + #ttls; + #hasDispose; + #hasFetchMethod; + #hasDisposeAfter; + /** + * Do not call this method unless you need to inspect the + * inner workings of the cache. If anything returned by this + * object is modified in any way, strange breakage may occur. + * + * These fields are private for a reason! + * + * @internal + */ + static unsafeExposeInternals(c) { + return { + // properties + starts: c.#starts, + ttls: c.#ttls, + sizes: c.#sizes, + keyMap: c.#keyMap, + keyList: c.#keyList, + valList: c.#valList, + next: c.#next, + prev: c.#prev, + get head() { + return c.#head; + }, + get tail() { + return c.#tail; + }, + free: c.#free, + // methods + isBackgroundFetch: (p) => c.#isBackgroundFetch(p), + backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context), + moveToTail: (index) => c.#moveToTail(index), + indexes: (options) => c.#indexes(options), + rindexes: (options) => c.#rindexes(options), + isStale: (index) => c.#isStale(index), + }; + } + // Protected read-only members + /** + * {@link LRUCache.OptionsBase.max} (read-only) + */ + get max() { + return this.#max; + } + /** + * {@link LRUCache.OptionsBase.maxSize} (read-only) + */ + get maxSize() { + return this.#maxSize; + } + /** + * The total computed size of items in the cache (read-only) + */ + get calculatedSize() { + return this.#calculatedSize; + } + /** + * The number of items stored in the cache (read-only) + */ + get size() { + return this.#size; + } + /** + * {@link LRUCache.OptionsBase.fetchMethod} (read-only) + */ + get fetchMethod() { + return this.#fetchMethod; + } + /** + * {@link LRUCache.OptionsBase.dispose} (read-only) + */ + get dispose() { + return this.#dispose; + } + /** + * {@link LRUCache.OptionsBase.disposeAfter} (read-only) + */ + get disposeAfter() { + return this.#disposeAfter; + } + constructor(options) { + const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, } = options; + if (max !== 0 && !isPosInt(max)) { + throw new TypeError('max option must be a nonnegative integer'); + } + const UintArray = max ? getUintArray(max) : Array; + if (!UintArray) { + throw new Error('invalid max value: ' + max); + } + this.#max = max; + this.#maxSize = maxSize; + this.maxEntrySize = maxEntrySize || this.#maxSize; + this.sizeCalculation = sizeCalculation; + if (this.sizeCalculation) { + if (!this.#maxSize && !this.maxEntrySize) { + throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize'); + } + if (typeof this.sizeCalculation !== 'function') { + throw new TypeError('sizeCalculation set to non-function'); + } + } + if (fetchMethod !== undefined && + typeof fetchMethod !== 'function') { + throw new TypeError('fetchMethod must be a function if specified'); + } + this.#fetchMethod = fetchMethod; + this.#hasFetchMethod = !!fetchMethod; + this.#keyMap = new Map(); + this.#keyList = new Array(max).fill(undefined); + this.#valList = new Array(max).fill(undefined); + this.#next = new UintArray(max); + this.#prev = new UintArray(max); + this.#head = 0; + this.#tail = 0; + this.#free = Stack.create(max); + this.#size = 0; + this.#calculatedSize = 0; + if (typeof dispose === 'function') { + this.#dispose = dispose; + } + if (typeof disposeAfter === 'function') { + this.#disposeAfter = disposeAfter; + this.#disposed = []; + } + else { + this.#disposeAfter = undefined; + this.#disposed = undefined; + } + this.#hasDispose = !!this.#dispose; + this.#hasDisposeAfter = !!this.#disposeAfter; + this.noDisposeOnSet = !!noDisposeOnSet; + this.noUpdateTTL = !!noUpdateTTL; + this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection; + this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection; + this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort; + this.ignoreFetchAbort = !!ignoreFetchAbort; + // NB: maxEntrySize is set to maxSize if it's set + if (this.maxEntrySize !== 0) { + if (this.#maxSize !== 0) { + if (!isPosInt(this.#maxSize)) { + throw new TypeError('maxSize must be a positive integer if specified'); + } + } + if (!isPosInt(this.maxEntrySize)) { + throw new TypeError('maxEntrySize must be a positive integer if specified'); + } + this.#initializeSizeTracking(); + } + this.allowStale = !!allowStale; + this.noDeleteOnStaleGet = !!noDeleteOnStaleGet; + this.updateAgeOnGet = !!updateAgeOnGet; + this.updateAgeOnHas = !!updateAgeOnHas; + this.ttlResolution = + isPosInt(ttlResolution) || ttlResolution === 0 + ? ttlResolution + : 1; + this.ttlAutopurge = !!ttlAutopurge; + this.ttl = ttl || 0; + if (this.ttl) { + if (!isPosInt(this.ttl)) { + throw new TypeError('ttl must be a positive integer if specified'); + } + this.#initializeTTLTracking(); + } + // do not allow completely unbounded caches + if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) { + throw new TypeError('At least one of max, maxSize, or ttl is required'); + } + if (!this.ttlAutopurge && !this.#max && !this.#maxSize) { + const code = 'LRU_CACHE_UNBOUNDED'; + if (shouldWarn(code)) { + warned.add(code); + const msg = 'TTL caching without ttlAutopurge, max, or maxSize can ' + + 'result in unbounded memory consumption.'; + emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache); + } + } + } + /** + * Return the remaining TTL time for a given entry key + */ + getRemainingTTL(key) { + return this.#keyMap.has(key) ? Infinity : 0; + } + #initializeTTLTracking() { + const ttls = new ZeroArray(this.#max); + const starts = new ZeroArray(this.#max); + this.#ttls = ttls; + this.#starts = starts; + this.#setItemTTL = (index, ttl, start = perf.now()) => { + starts[index] = ttl !== 0 ? start : 0; + ttls[index] = ttl; + if (ttl !== 0 && this.ttlAutopurge) { + const t = setTimeout(() => { + if (this.#isStale(index)) { + this.delete(this.#keyList[index]); + } + }, ttl + 1); + // unref() not supported on all platforms + /* c8 ignore start */ + if (t.unref) { + t.unref(); + } + /* c8 ignore stop */ + } + }; + this.#updateItemAge = index => { + starts[index] = ttls[index] !== 0 ? perf.now() : 0; + }; + this.#statusTTL = (status, index) => { + if (ttls[index]) { + const ttl = ttls[index]; + const start = starts[index]; + /* c8 ignore next */ + if (!ttl || !start) + return; + status.ttl = ttl; + status.start = start; + status.now = cachedNow || getNow(); + const age = status.now - start; + status.remainingTTL = ttl - age; + } + }; + // debounce calls to perf.now() to 1s so we're not hitting + // that costly call repeatedly. + let cachedNow = 0; + const getNow = () => { + const n = perf.now(); + if (this.ttlResolution > 0) { + cachedNow = n; + const t = setTimeout(() => (cachedNow = 0), this.ttlResolution); + // not available on all platforms + /* c8 ignore start */ + if (t.unref) { + t.unref(); + } + /* c8 ignore stop */ + } + return n; + }; + this.getRemainingTTL = key => { + const index = this.#keyMap.get(key); + if (index === undefined) { + return 0; + } + const ttl = ttls[index]; + const start = starts[index]; + if (!ttl || !start) { + return Infinity; + } + const age = (cachedNow || getNow()) - start; + return ttl - age; + }; + this.#isStale = index => { + const s = starts[index]; + const t = ttls[index]; + return !!t && !!s && (cachedNow || getNow()) - s > t; + }; + } + // conditionally set private methods related to TTL + #updateItemAge = () => { }; + #statusTTL = () => { }; + #setItemTTL = () => { }; + /* c8 ignore stop */ + #isStale = () => false; + #initializeSizeTracking() { + const sizes = new ZeroArray(this.#max); + this.#calculatedSize = 0; + this.#sizes = sizes; + this.#removeItemSize = index => { + this.#calculatedSize -= sizes[index]; + sizes[index] = 0; + }; + this.#requireSize = (k, v, size, sizeCalculation) => { + // provisionally accept background fetches. + // actual value size will be checked when they return. + if (this.#isBackgroundFetch(v)) { + return 0; + } + if (!isPosInt(size)) { + if (sizeCalculation) { + if (typeof sizeCalculation !== 'function') { + throw new TypeError('sizeCalculation must be a function'); + } + size = sizeCalculation(v, k); + if (!isPosInt(size)) { + throw new TypeError('sizeCalculation return invalid (expect positive integer)'); + } + } + else { + throw new TypeError('invalid size value (must be positive integer). ' + + 'When maxSize or maxEntrySize is used, sizeCalculation ' + + 'or size must be set.'); + } + } + return size; + }; + this.#addItemSize = (index, size, status) => { + sizes[index] = size; + if (this.#maxSize) { + const maxSize = this.#maxSize - sizes[index]; + while (this.#calculatedSize > maxSize) { + this.#evict(true); + } + } + this.#calculatedSize += sizes[index]; + if (status) { + status.entrySize = size; + status.totalCalculatedSize = this.#calculatedSize; + } + }; + } + #removeItemSize = _i => { }; + #addItemSize = (_i, _s, _st) => { }; + #requireSize = (_k, _v, size, sizeCalculation) => { + if (size || sizeCalculation) { + throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache'); + } + return 0; + }; + *#indexes({ allowStale = this.allowStale } = {}) { + if (this.#size) { + for (let i = this.#tail; true;) { + if (!this.#isValidIndex(i)) { + break; + } + if (allowStale || !this.#isStale(i)) { + yield i; + } + if (i === this.#head) { + break; + } + else { + i = this.#prev[i]; + } + } + } + } + *#rindexes({ allowStale = this.allowStale } = {}) { + if (this.#size) { + for (let i = this.#head; true;) { + if (!this.#isValidIndex(i)) { + break; + } + if (allowStale || !this.#isStale(i)) { + yield i; + } + if (i === this.#tail) { + break; + } + else { + i = this.#next[i]; + } + } + } + } + #isValidIndex(index) { + return (index !== undefined && + this.#keyMap.get(this.#keyList[index]) === index); + } + /** + * Return a generator yielding `[key, value]` pairs, + * in order from most recently used to least recently used. + */ + *entries() { + for (const i of this.#indexes()) { + if (this.#valList[i] !== undefined && + this.#keyList[i] !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield [this.#keyList[i], this.#valList[i]]; + } + } + } + /** + * Inverse order version of {@link LRUCache.entries} + * + * Return a generator yielding `[key, value]` pairs, + * in order from least recently used to most recently used. + */ + *rentries() { + for (const i of this.#rindexes()) { + if (this.#valList[i] !== undefined && + this.#keyList[i] !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield [this.#keyList[i], this.#valList[i]]; + } + } + } + /** + * Return a generator yielding the keys in the cache, + * in order from most recently used to least recently used. + */ + *keys() { + for (const i of this.#indexes()) { + const k = this.#keyList[i]; + if (k !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield k; + } + } + } + /** + * Inverse order version of {@link LRUCache.keys} + * + * Return a generator yielding the keys in the cache, + * in order from least recently used to most recently used. + */ + *rkeys() { + for (const i of this.#rindexes()) { + const k = this.#keyList[i]; + if (k !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield k; + } + } + } + /** + * Return a generator yielding the values in the cache, + * in order from most recently used to least recently used. + */ + *values() { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + if (v !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield this.#valList[i]; + } + } + } + /** + * Inverse order version of {@link LRUCache.values} + * + * Return a generator yielding the values in the cache, + * in order from least recently used to most recently used. + */ + *rvalues() { + for (const i of this.#rindexes()) { + const v = this.#valList[i]; + if (v !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield this.#valList[i]; + } + } + } + /** + * Iterating over the cache itself yields the same results as + * {@link LRUCache.entries} + */ + [Symbol.iterator]() { + return this.entries(); + } + /** + * Find a value for which the supplied fn method returns a truthy value, + * similar to Array.find(). fn is called as fn(value, key, cache). + */ + find(fn, getOptions = {}) { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + continue; + if (fn(value, this.#keyList[i], this)) { + return this.get(this.#keyList[i], getOptions); + } + } + } + /** + * Call the supplied function on each item in the cache, in order from + * most recently used to least recently used. fn is called as + * fn(value, key, cache). Does not update age or recenty of use. + * Does not iterate over stale values. + */ + forEach(fn, thisp = this) { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + continue; + fn.call(thisp, value, this.#keyList[i], this); + } + } + /** + * The same as {@link LRUCache.forEach} but items are iterated over in + * reverse order. (ie, less recently used items are iterated over first.) + */ + rforEach(fn, thisp = this) { + for (const i of this.#rindexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + continue; + fn.call(thisp, value, this.#keyList[i], this); + } + } + /** + * Delete any stale entries. Returns true if anything was removed, + * false otherwise. + */ + purgeStale() { + let deleted = false; + for (const i of this.#rindexes({ allowStale: true })) { + if (this.#isStale(i)) { + this.delete(this.#keyList[i]); + deleted = true; + } + } + return deleted; + } + /** + * Get the extended info about a given entry, to get its value, size, and + * TTL info simultaneously. Like {@link LRUCache#dump}, but just for a + * single key. Always returns stale values, if their info is found in the + * cache, so be sure to check for expired TTLs if relevant. + */ + info(key) { + const i = this.#keyMap.get(key); + if (i === undefined) + return undefined; + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + return undefined; + const entry = { value }; + if (this.#ttls && this.#starts) { + const ttl = this.#ttls[i]; + const start = this.#starts[i]; + if (ttl && start) { + const remain = ttl - (perf.now() - start); + entry.ttl = remain; + entry.start = Date.now(); + } + } + if (this.#sizes) { + entry.size = this.#sizes[i]; + } + return entry; + } + /** + * Return an array of [key, {@link LRUCache.Entry}] tuples which can be + * passed to cache.load() + */ + dump() { + const arr = []; + for (const i of this.#indexes({ allowStale: true })) { + const key = this.#keyList[i]; + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined || key === undefined) + continue; + const entry = { value }; + if (this.#ttls && this.#starts) { + entry.ttl = this.#ttls[i]; + // always dump the start relative to a portable timestamp + // it's ok for this to be a bit slow, it's a rare operation. + const age = perf.now() - this.#starts[i]; + entry.start = Math.floor(Date.now() - age); + } + if (this.#sizes) { + entry.size = this.#sizes[i]; + } + arr.unshift([key, entry]); + } + return arr; + } + /** + * Reset the cache and load in the items in entries in the order listed. + * Note that the shape of the resulting cache may be different if the + * same options are not used in both caches. + */ + load(arr) { + this.clear(); + for (const [key, entry] of arr) { + if (entry.start) { + // entry.start is a portable timestamp, but we may be using + // node's performance.now(), so calculate the offset, so that + // we get the intended remaining TTL, no matter how long it's + // been on ice. + // + // it's ok for this to be a bit slow, it's a rare operation. + const age = Date.now() - entry.start; + entry.start = perf.now() - age; + } + this.set(key, entry.value, entry); + } + } + /** + * Add a value to the cache. + * + * Note: if `undefined` is specified as a value, this is an alias for + * {@link LRUCache#delete} + */ + set(k, v, setOptions = {}) { + if (v === undefined) { + this.delete(k); + return this; + } + const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions; + let { noUpdateTTL = this.noUpdateTTL } = setOptions; + const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation); + // if the item doesn't fit, don't do anything + // NB: maxEntrySize set to maxSize by default + if (this.maxEntrySize && size > this.maxEntrySize) { + if (status) { + status.set = 'miss'; + status.maxEntrySizeExceeded = true; + } + // have to delete, in case something is there already. + this.delete(k); + return this; + } + let index = this.#size === 0 ? undefined : this.#keyMap.get(k); + if (index === undefined) { + // addition + index = (this.#size === 0 + ? this.#tail + : this.#free.length !== 0 + ? this.#free.pop() + : this.#size === this.#max + ? this.#evict(false) + : this.#size); + this.#keyList[index] = k; + this.#valList[index] = v; + this.#keyMap.set(k, index); + this.#next[this.#tail] = index; + this.#prev[index] = this.#tail; + this.#tail = index; + this.#size++; + this.#addItemSize(index, size, status); + if (status) + status.set = 'add'; + noUpdateTTL = false; + } + else { + // update + this.#moveToTail(index); + const oldVal = this.#valList[index]; + if (v !== oldVal) { + if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) { + oldVal.__abortController.abort(new Error('replaced')); + const { __staleWhileFetching: s } = oldVal; + if (s !== undefined && !noDisposeOnSet) { + if (this.#hasDispose) { + this.#dispose?.(s, k, 'set'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([s, k, 'set']); + } + } + } + else if (!noDisposeOnSet) { + if (this.#hasDispose) { + this.#dispose?.(oldVal, k, 'set'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([oldVal, k, 'set']); + } + } + this.#removeItemSize(index); + this.#addItemSize(index, size, status); + this.#valList[index] = v; + if (status) { + status.set = 'replace'; + const oldValue = oldVal && this.#isBackgroundFetch(oldVal) + ? oldVal.__staleWhileFetching + : oldVal; + if (oldValue !== undefined) + status.oldValue = oldValue; + } + } + else if (status) { + status.set = 'update'; + } + } + if (ttl !== 0 && !this.#ttls) { + this.#initializeTTLTracking(); + } + if (this.#ttls) { + if (!noUpdateTTL) { + this.#setItemTTL(index, ttl, start); + } + if (status) + this.#statusTTL(status, index); + } + if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + return this; + } + /** + * Evict the least recently used item, returning its value or + * `undefined` if cache is empty. + */ + pop() { + try { + while (this.#size) { + const val = this.#valList[this.#head]; + this.#evict(true); + if (this.#isBackgroundFetch(val)) { + if (val.__staleWhileFetching) { + return val.__staleWhileFetching; + } + } + else if (val !== undefined) { + return val; + } + } + } + finally { + if (this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + } + } + #evict(free) { + const head = this.#head; + const k = this.#keyList[head]; + const v = this.#valList[head]; + if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error('evicted')); + } + else if (this.#hasDispose || this.#hasDisposeAfter) { + if (this.#hasDispose) { + this.#dispose?.(v, k, 'evict'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([v, k, 'evict']); + } + } + this.#removeItemSize(head); + // if we aren't about to use the index, then null these out + if (free) { + this.#keyList[head] = undefined; + this.#valList[head] = undefined; + this.#free.push(head); + } + if (this.#size === 1) { + this.#head = this.#tail = 0; + this.#free.length = 0; + } + else { + this.#head = this.#next[head]; + } + this.#keyMap.delete(k); + this.#size--; + return head; + } + /** + * Check if a key is in the cache, without updating the recency of use. + * Will return false if the item is stale, even though it is technically + * in the cache. + * + * Will not update item age unless + * {@link LRUCache.OptionsBase.updateAgeOnHas} is set. + */ + has(k, hasOptions = {}) { + const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions; + const index = this.#keyMap.get(k); + if (index !== undefined) { + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v) && + v.__staleWhileFetching === undefined) { + return false; + } + if (!this.#isStale(index)) { + if (updateAgeOnHas) { + this.#updateItemAge(index); + } + if (status) { + status.has = 'hit'; + this.#statusTTL(status, index); + } + return true; + } + else if (status) { + status.has = 'stale'; + this.#statusTTL(status, index); + } + } + else if (status) { + status.has = 'miss'; + } + return false; + } + /** + * Like {@link LRUCache#get} but doesn't update recency or delete stale + * items. + * + * Returns `undefined` if the item is stale, unless + * {@link LRUCache.OptionsBase.allowStale} is set. + */ + peek(k, peekOptions = {}) { + const { allowStale = this.allowStale } = peekOptions; + const index = this.#keyMap.get(k); + if (index === undefined || + (!allowStale && this.#isStale(index))) { + return; + } + const v = this.#valList[index]; + // either stale and allowed, or forcing a refresh of non-stale value + return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; + } + #backgroundFetch(k, index, options, context) { + const v = index === undefined ? undefined : this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + return v; + } + const ac = new AC(); + const { signal } = options; + // when/if our AC signals, then stop listening to theirs. + signal?.addEventListener('abort', () => ac.abort(signal.reason), { + signal: ac.signal, + }); + const fetchOpts = { + signal: ac.signal, + options, + context, + }; + const cb = (v, updateCache = false) => { + const { aborted } = ac.signal; + const ignoreAbort = options.ignoreFetchAbort && v !== undefined; + if (options.status) { + if (aborted && !updateCache) { + options.status.fetchAborted = true; + options.status.fetchError = ac.signal.reason; + if (ignoreAbort) + options.status.fetchAbortIgnored = true; + } + else { + options.status.fetchResolved = true; + } + } + if (aborted && !ignoreAbort && !updateCache) { + return fetchFail(ac.signal.reason); + } + // either we didn't abort, and are still here, or we did, and ignored + const bf = p; + if (this.#valList[index] === p) { + if (v === undefined) { + if (bf.__staleWhileFetching) { + this.#valList[index] = bf.__staleWhileFetching; + } + else { + this.delete(k); + } + } + else { + if (options.status) + options.status.fetchUpdated = true; + this.set(k, v, fetchOpts.options); + } + } + return v; + }; + const eb = (er) => { + if (options.status) { + options.status.fetchRejected = true; + options.status.fetchError = er; + } + return fetchFail(er); + }; + const fetchFail = (er) => { + const { aborted } = ac.signal; + const allowStaleAborted = aborted && options.allowStaleOnFetchAbort; + const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection; + const noDelete = allowStale || options.noDeleteOnFetchRejection; + const bf = p; + if (this.#valList[index] === p) { + // if we allow stale on fetch rejections, then we need to ensure that + // the stale value is not removed from the cache when the fetch fails. + const del = !noDelete || bf.__staleWhileFetching === undefined; + if (del) { + this.delete(k); + } + else if (!allowStaleAborted) { + // still replace the *promise* with the stale value, + // since we are done with the promise at this point. + // leave it untouched if we're still waiting for an + // aborted background fetch that hasn't yet returned. + this.#valList[index] = bf.__staleWhileFetching; + } + } + if (allowStale) { + if (options.status && bf.__staleWhileFetching !== undefined) { + options.status.returnedStale = true; + } + return bf.__staleWhileFetching; + } + else if (bf.__returned === bf) { + throw er; + } + }; + const pcall = (res, rej) => { + const fmp = this.#fetchMethod?.(k, v, fetchOpts); + if (fmp && fmp instanceof Promise) { + fmp.then(v => res(v === undefined ? undefined : v), rej); + } + // ignored, we go until we finish, regardless. + // defer check until we are actually aborting, + // so fetchMethod can override. + ac.signal.addEventListener('abort', () => { + if (!options.ignoreFetchAbort || + options.allowStaleOnFetchAbort) { + res(undefined); + // when it eventually resolves, update the cache. + if (options.allowStaleOnFetchAbort) { + res = v => cb(v, true); + } + } + }); + }; + if (options.status) + options.status.fetchDispatched = true; + const p = new Promise(pcall).then(cb, eb); + const bf = Object.assign(p, { + __abortController: ac, + __staleWhileFetching: v, + __returned: undefined, + }); + if (index === undefined) { + // internal, don't expose status. + this.set(k, bf, { ...fetchOpts.options, status: undefined }); + index = this.#keyMap.get(k); + } + else { + this.#valList[index] = bf; + } + return bf; + } + #isBackgroundFetch(p) { + if (!this.#hasFetchMethod) + return false; + const b = p; + return (!!b && + b instanceof Promise && + b.hasOwnProperty('__staleWhileFetching') && + b.__abortController instanceof AC); + } + async fetch(k, fetchOptions = {}) { + const { + // get options + allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, + // set options + ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL, + // fetch exclusive options + noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions; + if (!this.#hasFetchMethod) { + if (status) + status.fetch = 'get'; + return this.get(k, { + allowStale, + updateAgeOnGet, + noDeleteOnStaleGet, + status, + }); + } + const options = { + allowStale, + updateAgeOnGet, + noDeleteOnStaleGet, + ttl, + noDisposeOnSet, + size, + sizeCalculation, + noUpdateTTL, + noDeleteOnFetchRejection, + allowStaleOnFetchRejection, + allowStaleOnFetchAbort, + ignoreFetchAbort, + status, + signal, + }; + let index = this.#keyMap.get(k); + if (index === undefined) { + if (status) + status.fetch = 'miss'; + const p = this.#backgroundFetch(k, index, options, context); + return (p.__returned = p); + } + else { + // in cache, maybe already fetching + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + const stale = allowStale && v.__staleWhileFetching !== undefined; + if (status) { + status.fetch = 'inflight'; + if (stale) + status.returnedStale = true; + } + return stale ? v.__staleWhileFetching : (v.__returned = v); + } + // if we force a refresh, that means do NOT serve the cached value, + // unless we are already in the process of refreshing the cache. + const isStale = this.#isStale(index); + if (!forceRefresh && !isStale) { + if (status) + status.fetch = 'hit'; + this.#moveToTail(index); + if (updateAgeOnGet) { + this.#updateItemAge(index); + } + if (status) + this.#statusTTL(status, index); + return v; + } + // ok, it is stale or a forced refresh, and not already fetching. + // refresh the cache. + const p = this.#backgroundFetch(k, index, options, context); + const hasStale = p.__staleWhileFetching !== undefined; + const staleVal = hasStale && allowStale; + if (status) { + status.fetch = isStale ? 'stale' : 'refresh'; + if (staleVal && isStale) + status.returnedStale = true; + } + return staleVal ? p.__staleWhileFetching : (p.__returned = p); + } + } + /** + * Return a value from the cache. Will update the recency of the cache + * entry found. + * + * If the key is not found, get() will return `undefined`. + */ + get(k, getOptions = {}) { + const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status, } = getOptions; + const index = this.#keyMap.get(k); + if (index !== undefined) { + const value = this.#valList[index]; + const fetching = this.#isBackgroundFetch(value); + if (status) + this.#statusTTL(status, index); + if (this.#isStale(index)) { + if (status) + status.get = 'stale'; + // delete only if not an in-flight background fetch + if (!fetching) { + if (!noDeleteOnStaleGet) { + this.delete(k); + } + if (status && allowStale) + status.returnedStale = true; + return allowStale ? value : undefined; + } + else { + if (status && + allowStale && + value.__staleWhileFetching !== undefined) { + status.returnedStale = true; + } + return allowStale ? value.__staleWhileFetching : undefined; + } + } + else { + if (status) + status.get = 'hit'; + // if we're currently fetching it, we don't actually have it yet + // it's not stale, which means this isn't a staleWhileRefetching. + // If it's not stale, and fetching, AND has a __staleWhileFetching + // value, then that means the user fetched with {forceRefresh:true}, + // so it's safe to return that value. + if (fetching) { + return value.__staleWhileFetching; + } + this.#moveToTail(index); + if (updateAgeOnGet) { + this.#updateItemAge(index); + } + return value; + } + } + else if (status) { + status.get = 'miss'; + } + } + #connect(p, n) { + this.#prev[n] = p; + this.#next[p] = n; + } + #moveToTail(index) { + // if tail already, nothing to do + // if head, move head to next[index] + // else + // move next[prev[index]] to next[index] (head has no prev) + // move prev[next[index]] to prev[index] + // prev[index] = tail + // next[tail] = index + // tail = index + if (index !== this.#tail) { + if (index === this.#head) { + this.#head = this.#next[index]; + } + else { + this.#connect(this.#prev[index], this.#next[index]); + } + this.#connect(this.#tail, index); + this.#tail = index; + } + } + /** + * Deletes a key out of the cache. + * Returns true if the key was deleted, false otherwise. + */ + delete(k) { + let deleted = false; + if (this.#size !== 0) { + const index = this.#keyMap.get(k); + if (index !== undefined) { + deleted = true; + if (this.#size === 1) { + this.clear(); + } + else { + this.#removeItemSize(index); + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error('deleted')); + } + else if (this.#hasDispose || this.#hasDisposeAfter) { + if (this.#hasDispose) { + this.#dispose?.(v, k, 'delete'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([v, k, 'delete']); + } + } + this.#keyMap.delete(k); + this.#keyList[index] = undefined; + this.#valList[index] = undefined; + if (index === this.#tail) { + this.#tail = this.#prev[index]; + } + else if (index === this.#head) { + this.#head = this.#next[index]; + } + else { + const pi = this.#prev[index]; + this.#next[pi] = this.#next[index]; + const ni = this.#next[index]; + this.#prev[ni] = this.#prev[index]; + } + this.#size--; + this.#free.push(index); + } + } + } + if (this.#hasDisposeAfter && this.#disposed?.length) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + return deleted; + } + /** + * Clear the cache entirely, throwing away all values. + */ + clear() { + for (const index of this.#rindexes({ allowStale: true })) { + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error('deleted')); + } + else { + const k = this.#keyList[index]; + if (this.#hasDispose) { + this.#dispose?.(v, k, 'delete'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([v, k, 'delete']); + } + } + } + this.#keyMap.clear(); + this.#valList.fill(undefined); + this.#keyList.fill(undefined); + if (this.#ttls && this.#starts) { + this.#ttls.fill(0); + this.#starts.fill(0); + } + if (this.#sizes) { + this.#sizes.fill(0); + } + this.#head = 0; + this.#tail = 0; + this.#free.length = 0; + this.#calculatedSize = 0; + this.#size = 0; + if (this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + } +} + +function createCache(max = 500) { + return new LRUCache({ max }); +} + +function isImportUsed(local, sfc) { + return resolveTemplateUsedIdentifiers(sfc).has(local); +} +const templateUsageCheckCache = createCache(); +function resolveTemplateUsedIdentifiers(sfc) { + const { content, ast } = sfc.template; + const cached = templateUsageCheckCache.get(content); + if (cached) { + return cached; + } + const ids = /* @__PURE__ */ new Set(); + ast.children.forEach(walk); + function walk(node) { + var _a; + switch (node.type) { + case 1: + let tag = node.tag; + if (tag.includes(".")) tag = tag.split(".")[0].trim(); + if (!CompilerDOM.parserOptions.isNativeTag(tag) && !CompilerDOM.parserOptions.isBuiltInComponent(tag)) { + ids.add(shared.camelize(tag)); + ids.add(shared.capitalize(shared.camelize(tag))); + } + for (let i = 0; i < node.props.length; i++) { + const prop = node.props[i]; + if (prop.type === 7) { + if (!shared.isBuiltInDirective(prop.name)) { + ids.add(`v${shared.capitalize(shared.camelize(prop.name))}`); + } + if (prop.arg && !prop.arg.isStatic) { + extractIdentifiers(ids, prop.arg); + } + if (prop.name === "for") { + extractIdentifiers(ids, prop.forParseResult.source); + } else if (prop.exp) { + extractIdentifiers(ids, prop.exp); + } else if (prop.name === "bind" && !prop.exp) { + ids.add(shared.camelize(prop.arg.content)); + } + } + if (prop.type === 6 && prop.name === "ref" && ((_a = prop.value) == null ? void 0 : _a.content)) { + ids.add(prop.value.content); + } + } + node.children.forEach(walk); + break; + case 5: + extractIdentifiers(ids, node.content); + break; + } + } + templateUsageCheckCache.set(content, ids); + return ids; +} +function extractIdentifiers(ids, node) { + if (node.ast) { + CompilerDOM.walkIdentifiers(node.ast, (n) => ids.add(n.name)); + } else if (node.ast === null) { + ids.add(node.content); + } +} + +const DEFAULT_FILENAME = "anonymous.vue"; +const parseCache$1 = createCache(); +function parse$1(source, options = {}) { + var _a; + const sourceKey = shared.genCacheKey(source, { + ...options, + compiler: { parse: (_a = options.compiler) == null ? void 0 : _a.parse } + }); + const cache = parseCache$1.get(sourceKey); + if (cache) { + return cache; + } + const { + sourceMap = true, + filename = DEFAULT_FILENAME, + sourceRoot = "", + pad = false, + ignoreEmpty = true, + compiler = CompilerDOM__namespace, + templateParseOptions = {} + } = options; + const descriptor = { + filename, + source, + template: null, + script: null, + scriptSetup: null, + styles: [], + customBlocks: [], + cssVars: [], + slotted: false, + shouldForceReload: (prevImports) => hmrShouldReload(prevImports, descriptor) + }; + const errors = []; + const ast = compiler.parse(source, { + parseMode: "sfc", + prefixIdentifiers: true, + ...templateParseOptions, + onError: (e) => { + errors.push(e); + } + }); + ast.children.forEach((node) => { + if (node.type !== 1) { + return; + } + if (ignoreEmpty && node.tag !== "template" && isEmpty(node) && !hasSrc(node)) { + return; + } + switch (node.tag) { + case "template": + if (!descriptor.template) { + const templateBlock = descriptor.template = createBlock( + node, + source, + false + ); + if (!templateBlock.attrs.src) { + templateBlock.ast = compilerCore.createRoot(node.children, source); + } + if (templateBlock.attrs.functional) { + const err = new SyntaxError( + `<template functional> is no longer supported in Vue 3, since functional components no longer have significant performance difference from stateful ones. Just use a normal <template> instead.` + ); + err.loc = node.props.find( + (p) => p.type === 6 && p.name === "functional" + ).loc; + errors.push(err); + } + } else { + errors.push(createDuplicateBlockError(node)); + } + break; + case "script": + const scriptBlock = createBlock(node, source, pad); + const isSetup = !!scriptBlock.attrs.setup; + if (isSetup && !descriptor.scriptSetup) { + descriptor.scriptSetup = scriptBlock; + break; + } + if (!isSetup && !descriptor.script) { + descriptor.script = scriptBlock; + break; + } + errors.push(createDuplicateBlockError(node, isSetup)); + break; + case "style": + const styleBlock = createBlock(node, source, pad); + if (styleBlock.attrs.vars) { + errors.push( + new SyntaxError( + `<style vars> has been replaced by a new proposal: https://github.com/vuejs/rfcs/pull/231` + ) + ); + } + descriptor.styles.push(styleBlock); + break; + default: + descriptor.customBlocks.push(createBlock(node, source, pad)); + break; + } + }); + if (!descriptor.template && !descriptor.script && !descriptor.scriptSetup) { + errors.push( + new SyntaxError( + `At least one <template> or <script> is required in a single file component. ${descriptor.filename}` + ) + ); + } + if (descriptor.scriptSetup) { + if (descriptor.scriptSetup.src) { + errors.push( + new SyntaxError( + `<script setup> cannot use the "src" attribute because its syntax will be ambiguous outside of the component.` + ) + ); + descriptor.scriptSetup = null; + } + if (descriptor.script && descriptor.script.src) { + errors.push( + new SyntaxError( + `<script> cannot use the "src" attribute when <script setup> is also present because they must be processed together.` + ) + ); + descriptor.script = null; + } + } + let templateColumnOffset = 0; + if (descriptor.template && (descriptor.template.lang === "pug" || descriptor.template.lang === "jade")) { + [descriptor.template.content, templateColumnOffset] = dedent( + descriptor.template.content + ); + } + if (sourceMap) { + const genMap = (block, columnOffset = 0) => { + if (block && !block.src) { + block.map = generateSourceMap( + filename, + source, + block.content, + sourceRoot, + !pad || block.type === "template" ? block.loc.start.line - 1 : 0, + columnOffset + ); + } + }; + genMap(descriptor.template, templateColumnOffset); + genMap(descriptor.script); + descriptor.styles.forEach((s) => genMap(s)); + descriptor.customBlocks.forEach((s) => genMap(s)); + } + descriptor.cssVars = parseCssVars(descriptor); + const slottedRE = /(?:::v-|:)slotted\(/; + descriptor.slotted = descriptor.styles.some( + (s) => s.scoped && slottedRE.test(s.content) + ); + const result = { + descriptor, + errors + }; + parseCache$1.set(sourceKey, result); + return result; +} +function createDuplicateBlockError(node, isScriptSetup = false) { + const err = new SyntaxError( + `Single file component can contain only one <${node.tag}${isScriptSetup ? ` setup` : ``}> element` + ); + err.loc = node.loc; + return err; +} +function createBlock(node, source, pad) { + const type = node.tag; + const loc = node.innerLoc; + const attrs = {}; + const block = { + type, + content: source.slice(loc.start.offset, loc.end.offset), + loc, + attrs + }; + if (pad) { + block.content = padContent(source, block, pad) + block.content; + } + node.props.forEach((p) => { + if (p.type === 6) { + const name = p.name; + attrs[name] = p.value ? p.value.content || true : true; + if (name === "lang") { + block.lang = p.value && p.value.content; + } else if (name === "src") { + block.src = p.value && p.value.content; + } else if (type === "style") { + if (name === "scoped") { + block.scoped = true; + } else if (name === "module") { + block.module = attrs[name]; + } + } else if (type === "script" && name === "setup") { + block.setup = attrs.setup; + } + } + }); + return block; +} +const splitRE = /\r?\n/g; +const emptyRE = /^(?:\/\/)?\s*$/; +const replaceRE = /./g; +function generateSourceMap(filename, source, generated, sourceRoot, lineOffset, columnOffset) { + const map = new sourceMapJs.SourceMapGenerator({ + file: filename.replace(/\\/g, "/"), + sourceRoot: sourceRoot.replace(/\\/g, "/") + }); + map.setSourceContent(filename, source); + map._sources.add(filename); + generated.split(splitRE).forEach((line, index) => { + if (!emptyRE.test(line)) { + const originalLine = index + 1 + lineOffset; + const generatedLine = index + 1; + for (let i = 0; i < line.length; i++) { + if (!/\s/.test(line[i])) { + map._mappings.add({ + originalLine, + originalColumn: i + columnOffset, + generatedLine, + generatedColumn: i, + source: filename, + name: null + }); + } + } + } + }); + return map.toJSON(); +} +function padContent(content, block, pad) { + content = content.slice(0, block.loc.start.offset); + if (pad === "space") { + return content.replace(replaceRE, " "); + } else { + const offset = content.split(splitRE).length; + const padChar = block.type === "script" && !block.lang ? "//\n" : "\n"; + return Array(offset).join(padChar); + } +} +function hasSrc(node) { + return node.props.some((p) => { + if (p.type !== 6) { + return false; + } + return p.name === "src"; + }); +} +function isEmpty(node) { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (child.type !== 2 || child.content.trim() !== "") { + return false; + } + } + return true; +} +function hmrShouldReload(prevImports, next) { + if (!next.scriptSetup || next.scriptSetup.lang !== "ts" && next.scriptSetup.lang !== "tsx") { + return false; + } + for (const key in prevImports) { + if (!prevImports[key].isUsedInTemplate && isImportUsed(key, next)) { + return true; + } + } + return false; +} +function dedent(s) { + const lines = s.split("\n"); + const minIndent = lines.reduce(function(minIndent2, line) { + var _a, _b; + if (line.trim() === "") { + return minIndent2; + } + const indent = ((_b = (_a = line.match(/^\s*/)) == null ? void 0 : _a[0]) == null ? void 0 : _b.length) || 0; + return Math.min(indent, minIndent2); + }, Infinity); + if (minIndent === 0) { + return [s, minIndent]; + } + return [ + lines.map(function(line) { + return line.slice(minIndent); + }).join("\n"), + minIndent + ]; +} + +function isRelativeUrl(url) { + const firstChar = url.charAt(0); + return firstChar === "." || firstChar === "~" || firstChar === "@"; +} +const externalRE = /^(https?:)?\/\//; +function isExternalUrl(url) { + return externalRE.test(url); +} +const dataUrlRE = /^\s*data:/i; +function isDataUrl(url) { + return dataUrlRE.test(url); +} +function parseUrl(url) { + const firstChar = url.charAt(0); + if (firstChar === "~") { + const secondChar = url.charAt(1); + url = url.slice(secondChar === "/" ? 2 : 1); + } + return parseUriParts(url); +} +function parseUriParts(urlString) { + return url.parse(shared.isString(urlString) ? urlString : "", false, true); +} + +const defaultAssetUrlOptions = { + base: null, + includeAbsolute: false, + tags: { + video: ["src", "poster"], + source: ["src"], + img: ["src"], + image: ["xlink:href", "href"], + use: ["xlink:href", "href"] + } +}; +const normalizeOptions = (options) => { + if (Object.keys(options).some((key) => shared.isArray(options[key]))) { + return { + ...defaultAssetUrlOptions, + tags: options + }; + } + return { + ...defaultAssetUrlOptions, + ...options + }; +}; +const createAssetUrlTransformWithOptions = (options) => { + return (node, context) => transformAssetUrl(node, context, options); +}; +const transformAssetUrl = (node, context, options = defaultAssetUrlOptions) => { + if (node.type === 1) { + if (!node.props.length) { + return; + } + const tags = options.tags || defaultAssetUrlOptions.tags; + const attrs = tags[node.tag]; + const wildCardAttrs = tags["*"]; + if (!attrs && !wildCardAttrs) { + return; + } + const assetAttrs = (attrs || []).concat(wildCardAttrs || []); + node.props.forEach((attr, index) => { + if (attr.type !== 6 || !assetAttrs.includes(attr.name) || !attr.value || isExternalUrl(attr.value.content) || isDataUrl(attr.value.content) || attr.value.content[0] === "#" || !options.includeAbsolute && !isRelativeUrl(attr.value.content)) { + return; + } + const url = parseUrl(attr.value.content); + if (options.base && attr.value.content[0] === ".") { + const base = parseUrl(options.base); + const protocol = base.protocol || ""; + const host = base.host ? protocol + "//" + base.host : ""; + const basePath = base.path || "/"; + attr.value.content = host + (path$1.posix || path$1).join(basePath, url.path + (url.hash || "")); + return; + } + const exp = getImportsExpressionExp(url.path, url.hash, attr.loc, context); + node.props[index] = { + type: 7, + name: "bind", + arg: compilerCore.createSimpleExpression(attr.name, true, attr.loc), + exp, + modifiers: [], + loc: attr.loc + }; + }); + } +}; +function getImportsExpressionExp(path2, hash, loc, context) { + if (path2) { + let name; + let exp; + const existingIndex = context.imports.findIndex((i) => i.path === path2); + if (existingIndex > -1) { + name = `_imports_${existingIndex}`; + exp = context.imports[existingIndex].exp; + } else { + name = `_imports_${context.imports.length}`; + exp = compilerCore.createSimpleExpression( + name, + false, + loc, + 3 + ); + context.imports.push({ + exp, + path: decodeURIComponent(path2) + }); + } + if (!hash) { + return exp; + } + const hashExp = `${name} + '${hash}'`; + const finalExp = compilerCore.createSimpleExpression( + hashExp, + false, + loc, + 3 + ); + if (!context.hoistStatic) { + return finalExp; + } + const existingHoistIndex = context.hoists.findIndex((h) => { + return h && h.type === 4 && !h.isStatic && h.content === hashExp; + }); + if (existingHoistIndex > -1) { + return compilerCore.createSimpleExpression( + `_hoisted_${existingHoistIndex + 1}`, + false, + loc, + 3 + ); + } + return context.hoist(finalExp); + } else { + return compilerCore.createSimpleExpression(`''`, false, loc, 3); + } +} + +const srcsetTags = ["img", "source"]; +const escapedSpaceCharacters = /( |\\t|\\n|\\f|\\r)+/g; +const createSrcsetTransformWithOptions = (options) => { + return (node, context) => transformSrcset(node, context, options); +}; +const transformSrcset = (node, context, options = defaultAssetUrlOptions) => { + if (node.type === 1) { + if (srcsetTags.includes(node.tag) && node.props.length) { + node.props.forEach((attr, index) => { + if (attr.name === "srcset" && attr.type === 6) { + if (!attr.value) return; + const value = attr.value.content; + if (!value) return; + const imageCandidates = value.split(",").map((s) => { + const [url, descriptor] = s.replace(escapedSpaceCharacters, " ").trim().split(" ", 2); + return { url, descriptor }; + }); + for (let i = 0; i < imageCandidates.length; i++) { + const { url } = imageCandidates[i]; + if (isDataUrl(url)) { + imageCandidates[i + 1].url = url + "," + imageCandidates[i + 1].url; + imageCandidates.splice(i, 1); + } + } + const shouldProcessUrl = (url) => { + return !isExternalUrl(url) && !isDataUrl(url) && (options.includeAbsolute || isRelativeUrl(url)); + }; + if (!imageCandidates.some(({ url }) => shouldProcessUrl(url))) { + return; + } + if (options.base) { + const base = options.base; + const set = []; + let needImportTransform = false; + imageCandidates.forEach((candidate) => { + let { url, descriptor } = candidate; + descriptor = descriptor ? ` ${descriptor}` : ``; + if (url[0] === ".") { + candidate.url = (path$1.posix || path$1).join(base, url); + set.push(candidate.url + descriptor); + } else if (shouldProcessUrl(url)) { + needImportTransform = true; + } else { + set.push(url + descriptor); + } + }); + if (!needImportTransform) { + attr.value.content = set.join(", "); + return; + } + } + const compoundExpression = compilerCore.createCompoundExpression([], attr.loc); + imageCandidates.forEach(({ url, descriptor }, index2) => { + if (shouldProcessUrl(url)) { + const { path: path2 } = parseUrl(url); + let exp2; + if (path2) { + const existingImportsIndex = context.imports.findIndex( + (i) => i.path === path2 + ); + if (existingImportsIndex > -1) { + exp2 = compilerCore.createSimpleExpression( + `_imports_${existingImportsIndex}`, + false, + attr.loc, + 3 + ); + } else { + exp2 = compilerCore.createSimpleExpression( + `_imports_${context.imports.length}`, + false, + attr.loc, + 3 + ); + context.imports.push({ exp: exp2, path: path2 }); + } + compoundExpression.children.push(exp2); + } + } else { + const exp2 = compilerCore.createSimpleExpression( + `"${url}"`, + false, + attr.loc, + 3 + ); + compoundExpression.children.push(exp2); + } + const isNotLast = imageCandidates.length - 1 > index2; + if (descriptor && isNotLast) { + compoundExpression.children.push(` + ' ${descriptor}, ' + `); + } else if (descriptor) { + compoundExpression.children.push(` + ' ${descriptor}'`); + } else if (isNotLast) { + compoundExpression.children.push(` + ', ' + `); + } + }); + let exp = compoundExpression; + if (context.hoistStatic) { + exp = context.hoist(compoundExpression); + exp.constType = 3; + } + node.props[index] = { + type: 7, + name: "bind", + arg: compilerCore.createSimpleExpression("srcset", true, attr.loc), + exp, + modifiers: [], + loc: attr.loc + }; + } + }); + } + } +}; + +function commonjsRequire(path) { + throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); +} + +var consolidate$2 = {exports: {}}; + +var hasRequiredConsolidate$1; + +function requireConsolidate$1 () { + if (hasRequiredConsolidate$1) return consolidate$2.exports; + hasRequiredConsolidate$1 = 1; + (function (module, exports) { + /* + * Engines which do not support caching of their file contents + * should use the `read()` function defined in consolidate.js + * On top of this, when an engine compiles to a `Function`, + * these functions should either be cached within consolidate.js + * or the engine itself via `options.cache`. This will allow + * users and frameworks to pass `options.cache = true` for + * `NODE_ENV=production`, however edit the file(s) without + * re-loading the application in development. + */ + + /** + * Module dependencies. + */ + + var fs = require$$0; + var path = path$1; + var util = require$$2; + + var join = path.join; + var resolve = path.resolve; + var extname = path.extname; + var dirname = path.dirname; + var isAbsolute = path.isAbsolute; + + var readCache = {}; + + /** + * Require cache. + */ + + var cacheStore = {}; + + /** + * Require cache. + */ + + var requires = {}; + + /** + * Clear the cache. + * + * @api public + */ + + exports.clearCache = function() { + readCache = {}; + cacheStore = {}; + }; + + /** + * Conditionally cache `compiled` template based + * on the `options` filename and `.cache` boolean. + * + * @param {Object} options + * @param {Function} compiled + * @return {Function} + * @api private + */ + + function cache(options, compiled) { + // cachable + if (compiled && options.filename && options.cache) { + delete readCache[options.filename]; + cacheStore[options.filename] = compiled; + return compiled; + } + + // check cache + if (options.filename && options.cache) { + return cacheStore[options.filename]; + } + + return compiled; + } + + /** + * Read `path` with `options` with + * callback `(err, str)`. When `options.cache` + * is true the template string will be cached. + * + * @param {String} options + * @param {Function} cb + * @api private + */ + + function read(path, options, cb) { + var str = readCache[path]; + var cached = options.cache && str && typeof str === 'string'; + + // cached (only if cached is a string and not a compiled template function) + if (cached) return cb(null, str); + + // read + fs.readFile(path, 'utf8', function(err, str) { + if (err) return cb(err); + // remove extraneous utf8 BOM marker + str = str.replace(/^\uFEFF/, ''); + if (options.cache) readCache[path] = str; + cb(null, str); + }); + } + + /** + * Read `path` with `options` with + * callback `(err, str)`. When `options.cache` + * is true the partial string will be cached. + * + * @param {String} options + * @param {Function} fn + * @api private + */ + + function readPartials(path, options, cb) { + if (!options.partials) return cb(); + var keys = Object.keys(options.partials); + var partials = {}; + + function next(index) { + if (index === keys.length) return cb(null, partials); + var key = keys[index]; + var partialPath = options.partials[key]; + + if (partialPath === undefined || partialPath === null || partialPath === false) { + return next(++index); + } + + var file; + if (isAbsolute(partialPath)) { + if (extname(partialPath) !== '') { + file = partialPath; + } else { + file = join(partialPath + extname(path)); + } + } else { + file = join(dirname(path), partialPath + extname(path)); + } + + read(file, options, function(err, str) { + if (err) return cb(err); + partials[key] = str; + next(++index); + }); + } + + next(0); + } + + /** + * promisify + */ + function promisify(cb, fn) { + return new Promise(function(resolve, reject) { + cb = cb || function(err, html) { + if (err) { + return reject(err); + } + resolve(html); + }; + fn(cb); + }); + } + + /** + * fromStringRenderer + */ + + function fromStringRenderer(name) { + return function(path, options, cb) { + options.filename = path; + + return promisify(cb, function(cb) { + readPartials(path, options, function(err, partials) { + var extend = (requires.extend || (requires.extend = require$$2._extend)); + var opts = extend({}, options); + opts.partials = partials; + if (err) return cb(err); + if (cache(opts)) { + exports[name].render('', opts, cb); + } else { + read(path, opts, function(err, str) { + if (err) return cb(err); + exports[name].render(str, opts, cb); + }); + } + }); + }); + }; + } + + /** + * velocity support. + */ + + exports.velocityjs = fromStringRenderer('velocityjs'); + + /** + * velocity string support. + */ + + exports.velocityjs.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.velocityjs || (requires.velocityjs = require('velocityjs')); + try { + options.locals = options; + cb(null, engine.render(str, options).trimLeft()); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Liquid support. + */ + + exports.liquid = fromStringRenderer('liquid'); + + /** + * Liquid string support. + */ + + /** + * Note that in order to get filters and custom tags we've had to push + * all user-defined locals down into @locals. However, just to make things + * backwards-compatible, any property of `options` that is left after + * processing and removing `locals`, `meta`, `filters`, `customTags` and + * `includeDir` will also become a local. + */ + + function _renderTinyliquid(engine, str, options, cb) { + var context = engine.newContext(); + var k; + + /** + * Note that there's a bug in the library that doesn't allow us to pass + * the locals to newContext(), hence looping through the keys: + */ + + if (options.locals) { + for (k in options.locals) { + context.setLocals(k, options.locals[k]); + } + delete options.locals; + } + + if (options.meta) { + context.setLocals('page', options.meta); + delete options.meta; + } + + /** + * Add any defined filters: + */ + + if (options.filters) { + for (k in options.filters) { + context.setFilter(k, options.filters[k]); + } + delete options.filters; + } + + /** + * Set up a callback for the include directory: + */ + + var includeDir = options.includeDir || process.cwd(); + + context.onInclude(function(name, callback) { + var extname = path.extname(name) ? '' : '.liquid'; + var filename = path.resolve(includeDir, name + extname); + + fs.readFile(filename, {encoding: 'utf8'}, function(err, data) { + if (err) return callback(err); + callback(null, engine.parse(data)); + }); + }); + delete options.includeDir; + + /** + * The custom tag functions need to have their results pushed back + * through the parser, so set up a shim before calling the provided + * callback: + */ + + var compileOptions = { + customTags: {} + }; + + if (options.customTags) { + var tagFunctions = options.customTags; + + for (k in options.customTags) { + /*Tell jshint there's no problem with having this function in the loop */ + /*jshint -W083 */ + compileOptions.customTags[k] = function(context, name, body) { + var tpl = tagFunctions[name](body.trim()); + context.astStack.push(engine.parse(tpl)); + }; + /*jshint +W083 */ + } + delete options.customTags; + } + + /** + * Now anything left in `options` becomes a local: + */ + + for (k in options) { + context.setLocals(k, options[k]); + } + + /** + * Finally, execute the template: + */ + + var tmpl = cache(context) || cache(context, engine.compile(str, compileOptions)); + tmpl(context, cb); + } + + exports.liquid.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.liquid; + var Liquid; + + try { + // set up tinyliquid engine + engine = requires.liquid = require('tinyliquid'); + + // use tinyliquid engine + _renderTinyliquid(engine, str, options, cb); + + return; + + } catch (err) { + + // set up liquid-node engine + try { + Liquid = requires.liquid = require('liquid-node'); + engine = new Liquid.Engine(); + } catch (err) { + throw err; + } + + } + + // use liquid-node engine + try { + var locals = options.locals || {}; + + if (options.meta) { + locals.pages = options.meta; + delete options.meta; + } + + /** + * Add any defined filters: + */ + + if (options.filters) { + engine.registerFilters(options.filters); + delete options.filters; + } + + /** + * Set up a callback for the include directory: + */ + + var includeDir = options.includeDir || process.cwd(); + engine.fileSystem = new Liquid.LocalFileSystem(includeDir, 'liquid'); + delete options.includeDir; + + /** + * The custom tag functions need to have their results pushed back + * through the parser, so set up a shim before calling the provided + * callback: + */ + + if (options.customTags) { + var tagFunctions = options.customTags; + + for (k in options.customTags) { + engine.registerTag(k, tagFunctions[k]); + } + delete options.customTags; + } + + /** + * Now anything left in `options` becomes a local: + */ + + for (var k in options) { + locals[k] = options[k]; + } + + /** + * Finally, execute the template: + */ + + return engine + .parseAndRender(str, locals) + .nodeify(function(err, result) { + if (err) { + throw new Error(err); + } else { + return cb(null, result); + } + }); + + } catch (err) { + cb(err); + } + }); + }; + + /** + * Jade support. + */ + + exports.jade = function(path, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.jade; + if (!engine) { + try { + engine = requires.jade = require('jade'); + } catch (err) { + try { + engine = requires.jade = require('then-jade'); + } catch (otherError) { + throw err; + } + } + } + + try { + var tmpl = cache(options) || cache(options, engine.compileFile(path, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Jade string support. + */ + + exports.jade.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.jade; + if (!engine) { + try { + engine = requires.jade = require('jade'); + } catch (err) { + try { + engine = requires.jade = require('then-jade'); + } catch (otherError) { + throw err; + } + } + } + + try { + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Dust support. + */ + + exports.dust = fromStringRenderer('dust'); + + /** + * Dust string support. + */ + + exports.dust.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.dust; + if (!engine) { + try { + engine = requires.dust = require('dust'); + } catch (err) { + try { + engine = requires.dust = require('dustjs-helpers'); + } catch (err) { + engine = requires.dust = require('dustjs-linkedin'); + } + } + } + + var ext = 'dust'; + var views = '.'; + + if (options) { + if (options.ext) ext = options.ext; + if (options.views) views = options.views; + if (options.settings && options.settings.views) views = options.settings.views; + } + if (!options || (options && !options.cache)) engine.cache = {}; + + engine.onLoad = function(path, callback) { + if (extname(path) === '') path += '.' + ext; + if (path[0] !== '/') path = views + '/' + path; + read(path, options, callback); + }; + + try { + var templateName; + if (options.filename) { + templateName = options.filename.replace(new RegExp('^' + views + '/'), '').replace(new RegExp('\\.' + ext), ''); + } + + var tmpl = cache(options) || cache(options, engine.compileFn(str, templateName)); + tmpl(options, cb); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Swig support. + */ + + exports.swig = fromStringRenderer('swig'); + + /** + * Swig string support. + */ + + exports.swig.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.swig; + if (!engine) { + try { + engine = requires.swig = require('swig'); + } catch (err) { + try { + engine = requires.swig = require('swig-templates'); + } catch (otherError) { + throw err; + } + } + } + + try { + if (options.cache === true) options.cache = 'memory'; + engine.setDefaults({ cache: options.cache }); + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Razor support. + */ + + exports.razor = function(path, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.razor; + if (!engine) { + try { + engine = requires.razor = require('razor-tmpl'); + + } catch (err) { + + throw err; + + } + } + try { + + var tmpl = cache(options) || cache(options, (locals) => { + console.log('Rendering razor file', path); + return engine.renderFileSync(path, locals); + }); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * razor string support. + */ + + exports.razor.render = function(str, options, cb) { + return promisify(cb, function(cb) { + + try { + var engine = requires.razor = require('razor-tmpl'); + } catch (err) { + throw err; + } + + try { + var tf = engine.compile(str); + var tmpl = cache(options) || cache(options, tf); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Atpl support. + */ + + exports.atpl = fromStringRenderer('atpl'); + + /** + * Atpl string support. + */ + + exports.atpl.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.atpl || (requires.atpl = require('atpl')); + try { + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Liquor support, + */ + + exports.liquor = fromStringRenderer('liquor'); + + /** + * Liquor string support. + */ + + exports.liquor.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.liquor || (requires.liquor = require('liquor')); + try { + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Twig support. + */ + + exports.twig = fromStringRenderer('twig'); + + /** + * Twig string support. + */ + + exports.twig.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.twig || (requires.twig = require('twig').twig); + var templateData = { + data: str, + allowInlineIncludes: options.allowInlineIncludes, + namespaces: options.namespaces, + path: options.path + }; + try { + var tmpl = cache(templateData) || cache(templateData, engine(templateData)); + cb(null, tmpl.render(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * EJS support. + */ + + exports.ejs = fromStringRenderer('ejs'); + + /** + * EJS string support. + */ + + exports.ejs.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.ejs || (requires.ejs = require('ejs')); + try { + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Eco support. + */ + + exports.eco = fromStringRenderer('eco'); + + /** + * Eco string support. + */ + + exports.eco.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.eco || (requires.eco = require('eco')); + try { + cb(null, engine.render(str, options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Jazz support. + */ + + exports.jazz = fromStringRenderer('jazz'); + + /** + * Jazz string support. + */ + + exports.jazz.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.jazz || (requires.jazz = require('jazz')); + try { + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + tmpl.eval(options, function(str) { + cb(null, str); + }); + } catch (err) { + cb(err); + } + }); + }; + + /** + * JQTPL support. + */ + + exports.jqtpl = fromStringRenderer('jqtpl'); + + /** + * JQTPL string support. + */ + + exports.jqtpl.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.jqtpl || (requires.jqtpl = require('jqtpl')); + try { + engine.template(str, str); + cb(null, engine.tmpl(str, options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Haml support. + */ + + exports.haml = fromStringRenderer('haml'); + + /** + * Haml string support. + */ + + exports.haml.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.haml || (requires.haml = require('hamljs')); + try { + options.locals = options; + cb(null, engine.render(str, options).trimLeft()); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Hamlet support. + */ + + exports.hamlet = fromStringRenderer('hamlet'); + + /** + * Hamlet string support. + */ + + exports.hamlet.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.hamlet || (requires.hamlet = require('hamlet')); + try { + options.locals = options; + cb(null, engine.render(str, options).trimLeft()); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Whiskers support. + */ + + exports.whiskers = function(path, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.whiskers || (requires.whiskers = require('whiskers')); + engine.__express(path, options, cb); + }); + }; + + /** + * Whiskers string support. + */ + + exports.whiskers.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.whiskers || (requires.whiskers = require('whiskers')); + try { + cb(null, engine.render(str, options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Coffee-HAML support. + */ + + exports['haml-coffee'] = fromStringRenderer('haml-coffee'); + + /** + * Coffee-HAML string support. + */ + + exports['haml-coffee'].render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires['haml-coffee'] || (requires['haml-coffee'] = require('haml-coffee')); + try { + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Hogan support. + */ + + exports.hogan = fromStringRenderer('hogan'); + + /** + * Hogan string support. + */ + + exports.hogan.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.hogan || (requires.hogan = require('hogan.js')); + try { + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl.render(options, options.partials)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * templayed.js support. + */ + + exports.templayed = fromStringRenderer('templayed'); + + /** + * templayed.js string support. + */ + + exports.templayed.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.templayed || (requires.templayed = require('templayed')); + try { + var tmpl = cache(options) || cache(options, engine(str)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Handlebars support. + */ + + exports.handlebars = fromStringRenderer('handlebars'); + + /** + * Handlebars string support. + */ + + exports.handlebars.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.handlebars || (requires.handlebars = require('handlebars')); + try { + for (var partial in options.partials) { + engine.registerPartial(partial, options.partials[partial]); + } + for (var helper in options.helpers) { + engine.registerHelper(helper, options.helpers[helper]); + } + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Underscore support. + */ + + exports.underscore = fromStringRenderer('underscore'); + + /** + * Underscore string support. + */ + + exports.underscore.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.underscore || (requires.underscore = require('underscore')); + try { + const partials = {}; + for (var partial in options.partials) { + partials[partial] = engine.template(options.partials[partial]); + } + options.partials = partials; + var tmpl = cache(options) || cache(options, engine.template(str, null, options)); + cb(null, tmpl(options).replace(/\n$/, '')); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Lodash support. + */ + + exports.lodash = fromStringRenderer('lodash'); + + /** + * Lodash string support. + */ + + exports.lodash.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.lodash || (requires.lodash = require('lodash')); + try { + var tmpl = cache(options) || cache(options, engine.template(str, options)); + cb(null, tmpl(options).replace(/\n$/, '')); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Pug support. (formerly Jade) + */ + + exports.pug = function(path, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.pug; + if (!engine) { + try { + engine = requires.pug = require('pug'); + } catch (err) { + try { + engine = requires.pug = require('then-pug'); + } catch (otherError) { + throw err; + } + } + } + + try { + var tmpl = cache(options) || cache(options, engine.compileFile(path, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Pug string support. + */ + + exports.pug.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.pug; + if (!engine) { + try { + engine = requires.pug = require('pug'); + } catch (err) { + try { + engine = requires.pug = require('then-pug'); + } catch (otherError) { + throw err; + } + } + } + + try { + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * QEJS support. + */ + + exports.qejs = fromStringRenderer('qejs'); + + /** + * QEJS string support. + */ + + exports.qejs.render = function(str, options, cb) { + return promisify(cb, function(cb) { + try { + var engine = requires.qejs || (requires.qejs = require('qejs')); + engine.render(str, options).then(function(result) { + cb(null, result); + }, function(err) { + cb(err); + }).done(); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Walrus support. + */ + + exports.walrus = fromStringRenderer('walrus'); + + /** + * Walrus string support. + */ + + exports.walrus.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.walrus || (requires.walrus = require('walrus')); + try { + var tmpl = cache(options) || cache(options, engine.parse(str)); + cb(null, tmpl.compile(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Mustache support. + */ + + exports.mustache = fromStringRenderer('mustache'); + + /** + * Mustache string support. + */ + + exports.mustache.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.mustache || (requires.mustache = require('mustache')); + try { + cb(null, engine.render(str, options, options.partials)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Just support. + */ + + exports.just = function(path, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.just; + if (!engine) { + var JUST = require('just'); + engine = requires.just = new JUST(); + } + engine.configure({ useCache: options.cache }); + engine.render(path, options, cb); + }); + }; + + /** + * Just string support. + */ + + exports.just.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var JUST = require('just'); + var engine = new JUST({ root: { page: str }}); + engine.render('page', options, cb); + }); + }; + + /** + * ECT support. + */ + + exports.ect = function(path, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.ect; + if (!engine) { + var ECT = require('ect'); + engine = requires.ect = new ECT(options); + } + engine.configure({ cache: options.cache }); + engine.render(path, options, cb); + }); + }; + + /** + * ECT string support. + */ + + exports.ect.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var ECT = require('ect'); + var engine = new ECT({ root: { page: str }}); + engine.render('page', options, cb); + }); + }; + + /** + * mote support. + */ + + exports.mote = fromStringRenderer('mote'); + + /** + * mote string support. + */ + + exports.mote.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.mote || (requires.mote = require('mote')); + try { + var tmpl = cache(options) || cache(options, engine.compile(str)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Toffee support. + */ + + exports.toffee = function(path, options, cb) { + return promisify(cb, function(cb) { + var toffee = requires.toffee || (requires.toffee = require('toffee')); + toffee.__consolidate_engine_render(path, options, cb); + }); + }; + + /** + * Toffee string support. + */ + + exports.toffee.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.toffee || (requires.toffee = require('toffee')); + try { + engine.str_render(str, options, cb); + } catch (err) { + cb(err); + } + }); + }; + + /** + * doT support. + */ + + exports.dot = fromStringRenderer('dot'); + + /** + * doT string support. + */ + + exports.dot.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.dot || (requires.dot = require('dot')); + var extend = (requires.extend || (requires.extend = require$$2._extend)); + try { + var settings = {}; + settings = extend(settings, engine.templateSettings); + settings = extend(settings, options ? options.dot : {}); + var tmpl = cache(options) || cache(options, engine.template(str, settings, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * bracket support. + */ + + exports.bracket = fromStringRenderer('bracket'); + + /** + * bracket string support. + */ + + exports.bracket.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.bracket || (requires.bracket = require('bracket-template')); + try { + var tmpl = cache(options) || cache(options, engine.default.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Ractive support. + */ + + exports.ractive = fromStringRenderer('ractive'); + + /** + * Ractive string support. + */ + + exports.ractive.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var Engine = requires.ractive || (requires.ractive = require('ractive')); + + var template = cache(options) || cache(options, Engine.parse(str)); + options.template = template; + + if (options.data === null || options.data === undefined) { + var extend = (requires.extend || (requires.extend = require$$2._extend)); + + // Shallow clone the options object + options.data = extend({}, options); + + // Remove consolidate-specific properties from the clone + var i; + var length; + var properties = ['template', 'filename', 'cache', 'partials']; + for (i = 0, length = properties.length; i < length; i++) { + var property = properties[i]; + delete options.data[property]; + } + } + + try { + cb(null, new Engine(options).toHTML()); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Nunjucks support. + */ + + exports.nunjucks = fromStringRenderer('nunjucks'); + + /** + * Nunjucks string support. + */ + + exports.nunjucks.render = function(str, options, cb) { + return promisify(cb, function(cb) { + + try { + + var engine = options.nunjucksEnv || requires.nunjucks || (requires.nunjucks = require('nunjucks')); + + var env = engine; + + // deprecated fallback support for express + // <https://github.com/tj/consolidate.js/pull/152> + // <https://github.com/tj/consolidate.js/pull/224> + if (options.settings && options.settings.views) { + env = engine.configure(options.settings.views); + } else if (options.nunjucks && options.nunjucks.configure) { + env = engine.configure.apply(engine, options.nunjucks.configure); + } + + // + // because `renderString` does not initiate loaders + // we must manually create a loader for it based off + // either `options.settings.views` or `options.nunjucks` or `options.nunjucks.root` + // + // <https://github.com/mozilla/nunjucks/issues/730> + // <https://github.com/crocodilejs/node-email-templates/issues/182> + // + + // so instead we simply check if we passed a custom loader + // otherwise we create a simple file based loader + if (options.loader) { + env = new engine.Environment(options.loader); + } else if (options.settings && options.settings.views) { + env = new engine.Environment( + new engine.FileSystemLoader(options.settings.views) + ); + } else if (options.nunjucks && options.nunjucks.loader) { + if (typeof options.nunjucks.loader === 'string') { + env = new engine.Environment(new engine.FileSystemLoader(options.nunjucks.loader)); + } else { + env = new engine.Environment( + new engine.FileSystemLoader( + options.nunjucks.loader[0], + options.nunjucks.loader[1] + ) + ); + } + } + + env.renderString(str, options, cb); + } catch (err) { + throw cb(err); + } + }); + }; + + /** + * HTMLing support. + */ + + exports.htmling = fromStringRenderer('htmling'); + + /** + * HTMLing string support. + */ + + exports.htmling.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.htmling || (requires.htmling = require('htmling')); + try { + var tmpl = cache(options) || cache(options, engine.string(str)); + cb(null, tmpl.render(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Rendering function + */ + function requireReact(module, filename) { + var babel = requires.babel || (requires.babel = require('babel-core')); + + var compiled = babel.transformFileSync(filename, { presets: [ 'react' ] }).code; + + return module._compile(compiled, filename); + } + + exports.requireReact = requireReact; + + /** + * Converting a string into a node module. + */ + function requireReactString(src, filename) { + var babel = requires.babel || (requires.babel = require('babel-core')); + + if (!filename) filename = ''; + var m = new module.constructor(); + filename = filename || ''; + + // Compile Using React + var compiled = babel.transform(src, { presets: [ 'react' ] }).code; + + // Compile as a module + m.paths = module.paths; + m._compile(compiled, filename); + + return m.exports; + } + + /** + * A naive helper to replace {{tags}} with options.tags content + */ + function reactBaseTmpl(data, options) { + + var exp; + var regex; + + // Iterates through the keys in file object + // and interpolate / replace {{key}} with it's value + for (var k in options) { + if (options.hasOwnProperty(k)) { + exp = '{{' + k + '}}'; + regex = new RegExp(exp, 'g'); + if (data.match(regex)) { + data = data.replace(regex, options[k]); + } + } + } + + return data; + } + + /** + * Plates Support. + */ + + exports.plates = fromStringRenderer('plates'); + + /** + * Plates string support. + */ + + exports.plates.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.plates || (requires.plates = require('plates')); + var map = options.map || undefined; + try { + var tmpl = engine.bind(str, options, map); + cb(null, tmpl); + } catch (err) { + cb(err); + } + }); + }; + + /** + * The main render parser for React bsaed templates + */ + function reactRenderer(type) { + + if (commonjsRequire.extensions) { + + // Ensure JSX is transformed on require + if (!commonjsRequire.extensions['.jsx']) { + commonjsRequire.extensions['.jsx'] = requireReact; + } + + // Supporting .react extension as well as test cases + // Using .react extension is not recommended. + if (!commonjsRequire.extensions['.react']) { + commonjsRequire.extensions['.react'] = requireReact; + } + + } + + // Return rendering fx + return function(str, options, cb) { + return promisify(cb, function(cb) { + // React Import + var ReactDOM = requires.ReactDOM || (requires.ReactDOM = require('react-dom/server')); + var react = requires.react || (requires.react = require('react')); + + // Assign HTML Base + var base = options.base; + delete options.base; + + var enableCache = options.cache; + delete options.cache; + + var isNonStatic = options.isNonStatic; + delete options.isNonStatic; + + // Start Conversion + try { + + var Code; + var Factory; + + var baseStr; + var content; + var parsed; + + if (!cache(options)) { + // Parsing + if (type === 'path') { + var path = resolve(str); + delete require.cache[path]; + Code = commonjsRequire(path); + } else { + Code = requireReactString(str); + } + Factory = cache(options, react.createFactory(Code)); + + } else { + Factory = cache(options); + } + + parsed = new Factory(options); + content = (isNonStatic) ? ReactDOM.renderToString(parsed) : ReactDOM.renderToStaticMarkup(parsed); + + if (base) { + baseStr = readCache[str] || fs.readFileSync(resolve(base), 'utf8'); + + if (enableCache) { + readCache[str] = baseStr; + } + + options.content = content; + content = reactBaseTmpl(baseStr, options); + } + + cb(null, content); + + } catch (err) { + cb(err); + } + }); + }; + } + + /** + * React JS Support + */ + exports.react = reactRenderer('path'); + + /** + * React JS string support. + */ + exports.react.render = reactRenderer('string'); + + /** + * ARC-templates support. + */ + + exports['arc-templates'] = fromStringRenderer('arc-templates'); + + /** + * ARC-templates string support. + */ + + exports['arc-templates'].render = function(str, options, cb) { + var readFileWithOptions = util.promisify(read); + var consolidateFileSystem = {}; + consolidateFileSystem.readFile = function(path) { + return readFileWithOptions(path, options); + }; + + return promisify(cb, function(cb) { + try { + var engine = requires['arc-templates']; + if (!engine) { + var Engine = require('arc-templates/dist/es5'); + engine = requires['arc-templates'] = new Engine({ filesystem: consolidateFileSystem }); + } + + var compiler = cache(options) || cache(options, engine.compileString(str, options.filename)); + compiler.then(function(func) { return func(options); }) + .then(function(result) { cb(null, result.content); }) + .catch(cb); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Vash support + */ + exports.vash = fromStringRenderer('vash'); + + /** + * Vash string support + */ + exports.vash.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.vash || (requires.vash = require('vash')); + + try { + // helper system : https://github.com/kirbysayshi/vash#helper-system + if (options.helpers) { + for (var key in options.helpers) { + if (!options.helpers.hasOwnProperty(key) || typeof options.helpers[key] !== 'function') { + continue; + } + engine.helpers[key] = options.helpers[key]; + } + } + + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + tmpl(options, function sealLayout(err, ctx) { + if (err) cb(err); + ctx.finishLayout(); + cb(null, ctx.toString().replace(/\n$/, '')); + }); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Slm support. + */ + + exports.slm = fromStringRenderer('slm'); + + /** + * Slm string support. + */ + + exports.slm.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.slm || (requires.slm = require('slm')); + + try { + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Marko support. + */ + + exports.marko = function(path, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.marko || (requires.marko = require('marko')); + options.writeToDisk = !!options.cache; + + try { + var tmpl = cache(options) || cache(options, engine.load(path, options)); + tmpl.renderToString(options, cb); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Marko string support. + */ + + exports.marko.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.marko || (requires.marko = require('marko')); + options.writeToDisk = !!options.cache; + options.filename = options.filename || 'string.marko'; + + try { + var tmpl = cache(options) || cache(options, engine.load(options.filename, str, options)); + tmpl.renderToString(options, cb); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Teacup support. + */ + exports.teacup = function(path, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.teacup || (requires.teacup = require('teacup/lib/express')); + commonjsRequire.extensions['.teacup'] = commonjsRequire.extensions['.coffee']; + if (path[0] !== '/') { + path = join(process.cwd(), path); + } + if (!options.cache) { + var callback = cb; + cb = function() { + delete require.cache[path]; + callback.apply(this, arguments); + }; + } + engine.renderFile(path, options, cb); + }); + }; + + /** + * Teacup string support. + */ + exports.teacup.render = function(str, options, cb) { + var coffee = require('coffee-script'); + var vm = require('vm'); + var sandbox = { + module: {exports: {}}, + require: commonjsRequire + }; + return promisify(cb, function(cb) { + vm.runInNewContext(coffee.compile(str), sandbox); + var tmpl = sandbox.module.exports; + cb(null, tmpl(options)); + }); + }; + + /** + * Squirrelly support. + */ + + exports.squirrelly = fromStringRenderer('squirrelly'); + + /** + * Squirrelly string support. + */ + + exports.squirrelly.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.squirrelly || (requires.squirrelly = require('squirrelly')); + try { + for (var partial in options.partials) { + engine.definePartial(partial, options.partials[partial]); + } + for (var helper in options.helpers) { + engine.defineHelper(helper, options.helpers[helper]); + } + var tmpl = cache(options) || cache(options, engine.Compile(str, options)); + cb(null, tmpl(options, engine)); + } catch (err) { + cb(err); + } + }); + }; + /** + * Twing support. + */ + + exports.twing = fromStringRenderer('twing'); + + /** + * Twing string support. + */ + + exports.twing.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.twing || (requires.twing = require('twing')); + try { + new engine.TwingEnvironment(new engine.TwingLoaderNull()).createTemplate(str).then((twingTemplate) => { + twingTemplate.render(options).then((rendTmpl) => { + var tmpl = cache(options) || cache(options, rendTmpl); + cb(null, tmpl); + }); + }); + } catch (err) { + cb(err); + } + }); + }; + /** + * expose the instance of the engine + */ + exports.requires = requires; + } (consolidate$2, consolidate$2.exports)); + return consolidate$2.exports; +} + +var consolidate$1; +var hasRequiredConsolidate; + +function requireConsolidate () { + if (hasRequiredConsolidate) return consolidate$1; + hasRequiredConsolidate = 1; + consolidate$1 = /*@__PURE__*/ requireConsolidate$1(); + return consolidate$1; +} + +var consolidateExports = /*@__PURE__*/ requireConsolidate(); +var consolidate = /*@__PURE__*/getDefaultExportFromCjs(consolidateExports); + +const hasWarned = {}; +function warnOnce(msg) { + const isNodeProd = typeof process !== "undefined" && process.env.NODE_ENV === "production"; + if (!isNodeProd && true && !hasWarned[msg]) { + hasWarned[msg] = true; + warn(msg); + } +} +function warn(msg) { + console.warn( + `\x1B[1m\x1B[33m[@vue/compiler-sfc]\x1B[0m\x1B[33m ${msg}\x1B[0m +` + ); +} + +function preprocess$1({ source, filename, preprocessOptions }, preprocessor) { + let res = ""; + let err = null; + preprocessor.render( + source, + { filename, ...preprocessOptions }, + (_err, _res) => { + if (_err) err = _err; + res = _res; + } + ); + if (err) throw err; + return res; +} +function compileTemplate(options) { + const { preprocessLang, preprocessCustomRequire } = options; + const preprocessor = preprocessLang ? preprocessCustomRequire ? preprocessCustomRequire(preprocessLang) : consolidate[preprocessLang] : false; + if (preprocessor) { + try { + return doCompileTemplate({ + ...options, + source: preprocess$1(options, preprocessor), + ast: void 0 + // invalidate AST if template goes through preprocessor + }); + } catch (e) { + return { + code: `export default function render() {}`, + source: options.source, + tips: [], + errors: [e] + }; + } + } else if (preprocessLang) { + return { + code: `export default function render() {}`, + source: options.source, + tips: [ + `Component ${options.filename} uses lang ${preprocessLang} for template. Please install the language preprocessor.` + ], + errors: [ + `Component ${options.filename} uses lang ${preprocessLang} for template, however it is not installed.` + ] + }; + } else { + return doCompileTemplate(options); + } +} +function doCompileTemplate({ + filename, + id, + scoped, + slotted, + inMap, + source, + ast: inAST, + ssr = false, + ssrCssVars, + isProd = false, + compiler, + compilerOptions = {}, + transformAssetUrls +}) { + const errors = []; + const warnings = []; + let nodeTransforms = []; + if (shared.isObject(transformAssetUrls)) { + const assetOptions = normalizeOptions(transformAssetUrls); + nodeTransforms = [ + createAssetUrlTransformWithOptions(assetOptions), + createSrcsetTransformWithOptions(assetOptions) + ]; + } else if (transformAssetUrls !== false) { + nodeTransforms = [transformAssetUrl, transformSrcset]; + } + if (ssr && !ssrCssVars) { + warnOnce( + `compileTemplate is called with \`ssr: true\` but no corresponding \`cssVars\` option.` + ); + } + if (!id) { + warnOnce(`compileTemplate now requires the \`id\` option.`); + id = ""; + } + const shortId = id.replace(/^data-v-/, ""); + const longId = `data-v-${shortId}`; + const defaultCompiler = ssr ? CompilerSSR__namespace : CompilerDOM__namespace; + compiler = compiler || defaultCompiler; + if (compiler !== defaultCompiler) { + inAST = void 0; + } + if (inAST == null ? void 0 : inAST.transformed) { + const newAST = (ssr ? CompilerDOM__namespace : compiler).parse(inAST.source, { + prefixIdentifiers: true, + ...compilerOptions, + parseMode: "sfc", + onError: (e) => errors.push(e) + }); + const template = newAST.children.find( + (node) => node.type === 1 && node.tag === "template" + ); + inAST = compilerCore.createRoot(template.children, inAST.source); + } + let { code, ast, preamble, map } = compiler.compile(inAST || source, { + mode: "module", + prefixIdentifiers: true, + hoistStatic: true, + cacheHandlers: true, + ssrCssVars: ssr && ssrCssVars && ssrCssVars.length ? genCssVarsFromList(ssrCssVars, shortId, isProd, true) : "", + scopeId: scoped ? longId : void 0, + slotted, + sourceMap: true, + ...compilerOptions, + hmr: !isProd, + nodeTransforms: nodeTransforms.concat(compilerOptions.nodeTransforms || []), + filename, + onError: (e) => errors.push(e), + onWarn: (w) => warnings.push(w) + }); + if (inMap && !inAST) { + if (map) { + map = mapLines(inMap, map); + } + if (errors.length) { + patchErrors(errors, source, inMap); + } + } + const tips = warnings.map((w) => { + let msg = w.message; + if (w.loc) { + msg += ` +${shared.generateCodeFrame( + (inAST == null ? void 0 : inAST.source) || source, + w.loc.start.offset, + w.loc.end.offset + )}`; + } + return msg; + }); + return { code, ast, preamble, source, errors, tips, map }; +} +function mapLines(oldMap, newMap) { + if (!oldMap) return newMap; + if (!newMap) return oldMap; + const oldMapConsumer = new sourceMapJs.SourceMapConsumer(oldMap); + const newMapConsumer = new sourceMapJs.SourceMapConsumer(newMap); + const mergedMapGenerator = new sourceMapJs.SourceMapGenerator(); + newMapConsumer.eachMapping((m) => { + if (m.originalLine == null) { + return; + } + const origPosInOldMap = oldMapConsumer.originalPositionFor({ + line: m.originalLine, + column: m.originalColumn + }); + if (origPosInOldMap.source == null) { + return; + } + mergedMapGenerator.addMapping({ + generated: { + line: m.generatedLine, + column: m.generatedColumn + }, + original: { + line: origPosInOldMap.line, + // map line + // use current column, since the oldMap produced by @vue/compiler-sfc + // does not + column: m.originalColumn + }, + source: origPosInOldMap.source, + name: origPosInOldMap.name + }); + }); + const generator = mergedMapGenerator; + oldMapConsumer.sources.forEach((sourceFile) => { + generator._sources.add(sourceFile); + const sourceContent = oldMapConsumer.sourceContentFor(sourceFile); + if (sourceContent != null) { + mergedMapGenerator.setSourceContent(sourceFile, sourceContent); + } + }); + generator._sourceRoot = oldMap.sourceRoot; + generator._file = oldMap.file; + return generator.toJSON(); +} +function patchErrors(errors, source, inMap) { + const originalSource = inMap.sourcesContent[0]; + const offset = originalSource.indexOf(source); + const lineOffset = originalSource.slice(0, offset).split(/\r?\n/).length - 1; + errors.forEach((err) => { + if (err.loc) { + err.loc.start.line += lineOffset; + err.loc.start.offset += offset; + if (err.loc.end !== err.loc.start) { + err.loc.end.line += lineOffset; + err.loc.end.offset += offset; + } + } + }); +} + +const trimPlugin = () => { + return { + postcssPlugin: "vue-sfc-trim", + Once(root) { + root.walk(({ type, raws }) => { + if (type === "rule" || type === "atrule") { + if (raws.before) raws.before = "\n"; + if ("after" in raws && raws.after) raws.after = "\n"; + } + }); + } + }; +}; +trimPlugin.postcss = true; + +var dist$1 = {exports: {}}; + +var processor$1 = {exports: {}}; + +var parser$1 = {exports: {}}; + +var root$1 = {exports: {}}; + +var container$1 = {exports: {}}; + +var node$2 = {exports: {}}; + +var util$2 = {}; + +var unesc$1 = {exports: {}}; + +var hasRequiredUnesc$1; + +function requireUnesc$1 () { + if (hasRequiredUnesc$1) return unesc$1.exports; + hasRequiredUnesc$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = unesc; + // Many thanks for this post which made this migration much easier. + // https://mathiasbynens.be/notes/css-escapes + + /** + * + * @param {string} str + * @returns {[string, number]|undefined} + */ + function gobbleHex(str) { + var lower = str.toLowerCase(); + var hex = ''; + var spaceTerminated = false; + for (var i = 0; i < 6 && lower[i] !== undefined; i++) { + var code = lower.charCodeAt(i); + // check to see if we are dealing with a valid hex char [a-f|0-9] + var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57; + // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point + spaceTerminated = code === 32; + if (!valid) { + break; + } + hex += lower[i]; + } + if (hex.length === 0) { + return undefined; + } + var codePoint = parseInt(hex, 16); + var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF; + // Add special case for + // "If this number is zero, or is for a surrogate, or is greater than the maximum allowed code point" + // https://drafts.csswg.org/css-syntax/#maximum-allowed-code-point + if (isSurrogate || codePoint === 0x0000 || codePoint > 0x10FFFF) { + return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)]; + } + return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)]; + } + var CONTAINS_ESCAPE = /\\/; + function unesc(str) { + var needToProcess = CONTAINS_ESCAPE.test(str); + if (!needToProcess) { + return str; + } + var ret = ""; + for (var i = 0; i < str.length; i++) { + if (str[i] === "\\") { + var gobbled = gobbleHex(str.slice(i + 1, i + 7)); + if (gobbled !== undefined) { + ret += gobbled[0]; + i += gobbled[1]; + continue; + } + + // Retain a pair of \\ if double escaped `\\\\` + // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e + if (str[i + 1] === "\\") { + ret += "\\"; + i++; + continue; + } + + // if \\ is at the end of the string retain it + // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb + if (str.length === i + 1) { + ret += str[i]; + } + continue; + } + ret += str[i]; + } + return ret; + } + module.exports = exports.default; + } (unesc$1, unesc$1.exports)); + return unesc$1.exports; +} + +var getProp$1 = {exports: {}}; + +var hasRequiredGetProp$1; + +function requireGetProp$1 () { + if (hasRequiredGetProp$1) return getProp$1.exports; + hasRequiredGetProp$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = getProp; + function getProp(obj) { + for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + props[_key - 1] = arguments[_key]; + } + while (props.length > 0) { + var prop = props.shift(); + if (!obj[prop]) { + return undefined; + } + obj = obj[prop]; + } + return obj; + } + module.exports = exports.default; + } (getProp$1, getProp$1.exports)); + return getProp$1.exports; +} + +var ensureObject$1 = {exports: {}}; + +var hasRequiredEnsureObject$1; + +function requireEnsureObject$1 () { + if (hasRequiredEnsureObject$1) return ensureObject$1.exports; + hasRequiredEnsureObject$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = ensureObject; + function ensureObject(obj) { + for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + props[_key - 1] = arguments[_key]; + } + while (props.length > 0) { + var prop = props.shift(); + if (!obj[prop]) { + obj[prop] = {}; + } + obj = obj[prop]; + } + } + module.exports = exports.default; + } (ensureObject$1, ensureObject$1.exports)); + return ensureObject$1.exports; +} + +var stripComments$1 = {exports: {}}; + +var hasRequiredStripComments$1; + +function requireStripComments$1 () { + if (hasRequiredStripComments$1) return stripComments$1.exports; + hasRequiredStripComments$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = stripComments; + function stripComments(str) { + var s = ""; + var commentStart = str.indexOf("/*"); + var lastEnd = 0; + while (commentStart >= 0) { + s = s + str.slice(lastEnd, commentStart); + var commentEnd = str.indexOf("*/", commentStart + 2); + if (commentEnd < 0) { + return s; + } + lastEnd = commentEnd + 2; + commentStart = str.indexOf("/*", lastEnd); + } + s = s + str.slice(lastEnd); + return s; + } + module.exports = exports.default; + } (stripComments$1, stripComments$1.exports)); + return stripComments$1.exports; +} + +var hasRequiredUtil$2; + +function requireUtil$2 () { + if (hasRequiredUtil$2) return util$2; + hasRequiredUtil$2 = 1; + + util$2.__esModule = true; + util$2.unesc = util$2.stripComments = util$2.getProp = util$2.ensureObject = void 0; + var _unesc = _interopRequireDefault(/*@__PURE__*/ requireUnesc$1()); + util$2.unesc = _unesc["default"]; + var _getProp = _interopRequireDefault(/*@__PURE__*/ requireGetProp$1()); + util$2.getProp = _getProp["default"]; + var _ensureObject = _interopRequireDefault(/*@__PURE__*/ requireEnsureObject$1()); + util$2.ensureObject = _ensureObject["default"]; + var _stripComments = _interopRequireDefault(/*@__PURE__*/ requireStripComments$1()); + util$2.stripComments = _stripComments["default"]; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + return util$2; +} + +var hasRequiredNode$2; + +function requireNode$2 () { + if (hasRequiredNode$2) return node$2.exports; + hasRequiredNode$2 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _util = /*@__PURE__*/ requireUtil$2(); + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + var cloneNode = function cloneNode(obj, parent) { + if (typeof obj !== 'object' || obj === null) { + return obj; + } + var cloned = new obj.constructor(); + for (var i in obj) { + if (!obj.hasOwnProperty(i)) { + continue; + } + var value = obj[i]; + var type = typeof value; + if (i === 'parent' && type === 'object') { + if (parent) { + cloned[i] = parent; + } + } else if (value instanceof Array) { + cloned[i] = value.map(function (j) { + return cloneNode(j, cloned); + }); + } else { + cloned[i] = cloneNode(value, cloned); + } + } + return cloned; + }; + var Node = /*#__PURE__*/function () { + function Node(opts) { + if (opts === void 0) { + opts = {}; + } + Object.assign(this, opts); + this.spaces = this.spaces || {}; + this.spaces.before = this.spaces.before || ''; + this.spaces.after = this.spaces.after || ''; + } + var _proto = Node.prototype; + _proto.remove = function remove() { + if (this.parent) { + this.parent.removeChild(this); + } + this.parent = undefined; + return this; + }; + _proto.replaceWith = function replaceWith() { + if (this.parent) { + for (var index in arguments) { + this.parent.insertBefore(this, arguments[index]); + } + this.remove(); + } + return this; + }; + _proto.next = function next() { + return this.parent.at(this.parent.index(this) + 1); + }; + _proto.prev = function prev() { + return this.parent.at(this.parent.index(this) - 1); + }; + _proto.clone = function clone(overrides) { + if (overrides === void 0) { + overrides = {}; + } + var cloned = cloneNode(this); + for (var name in overrides) { + cloned[name] = overrides[name]; + } + return cloned; + } + + /** + * Some non-standard syntax doesn't follow normal escaping rules for css. + * This allows non standard syntax to be appended to an existing property + * by specifying the escaped value. By specifying the escaped value, + * illegal characters are allowed to be directly inserted into css output. + * @param {string} name the property to set + * @param {any} value the unescaped value of the property + * @param {string} valueEscaped optional. the escaped value of the property. + */; + _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) { + if (!this.raws) { + this.raws = {}; + } + var originalValue = this[name]; + var originalEscaped = this.raws[name]; + this[name] = originalValue + value; // this may trigger a setter that updates raws, so it has to be set first. + if (originalEscaped || valueEscaped !== value) { + this.raws[name] = (originalEscaped || originalValue) + valueEscaped; + } else { + delete this.raws[name]; // delete any escaped value that was created by the setter. + } + } + + /** + * Some non-standard syntax doesn't follow normal escaping rules for css. + * This allows the escaped value to be specified directly, allowing illegal + * characters to be directly inserted into css output. + * @param {string} name the property to set + * @param {any} value the unescaped value of the property + * @param {string} valueEscaped the escaped value of the property. + */; + _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) { + if (!this.raws) { + this.raws = {}; + } + this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. + this.raws[name] = valueEscaped; + } + + /** + * When you want a value to passed through to CSS directly. This method + * deletes the corresponding raw value causing the stringifier to fallback + * to the unescaped value. + * @param {string} name the property to set. + * @param {any} value The value that is both escaped and unescaped. + */; + _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) { + this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. + if (this.raws) { + delete this.raws[name]; + } + } + + /** + * + * @param {number} line The number (starting with 1) + * @param {number} column The column number (starting with 1) + */; + _proto.isAtPosition = function isAtPosition(line, column) { + if (this.source && this.source.start && this.source.end) { + if (this.source.start.line > line) { + return false; + } + if (this.source.end.line < line) { + return false; + } + if (this.source.start.line === line && this.source.start.column > column) { + return false; + } + if (this.source.end.line === line && this.source.end.column < column) { + return false; + } + return true; + } + return undefined; + }; + _proto.stringifyProperty = function stringifyProperty(name) { + return this.raws && this.raws[name] || this[name]; + }; + _proto.valueToString = function valueToString() { + return String(this.stringifyProperty("value")); + }; + _proto.toString = function toString() { + return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join(''); + }; + _createClass(Node, [{ + key: "rawSpaceBefore", + get: function get() { + var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before; + if (rawSpace === undefined) { + rawSpace = this.spaces && this.spaces.before; + } + return rawSpace || ""; + }, + set: function set(raw) { + (0, _util.ensureObject)(this, "raws", "spaces"); + this.raws.spaces.before = raw; + } + }, { + key: "rawSpaceAfter", + get: function get() { + var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after; + if (rawSpace === undefined) { + rawSpace = this.spaces.after; + } + return rawSpace || ""; + }, + set: function set(raw) { + (0, _util.ensureObject)(this, "raws", "spaces"); + this.raws.spaces.after = raw; + } + }]); + return Node; + }(); + exports["default"] = Node; + module.exports = exports.default; + } (node$2, node$2.exports)); + return node$2.exports; +} + +var types$2 = {}; + +var hasRequiredTypes$1; + +function requireTypes$1 () { + if (hasRequiredTypes$1) return types$2; + hasRequiredTypes$1 = 1; + + types$2.__esModule = true; + types$2.UNIVERSAL = types$2.TAG = types$2.STRING = types$2.SELECTOR = types$2.ROOT = types$2.PSEUDO = types$2.NESTING = types$2.ID = types$2.COMMENT = types$2.COMBINATOR = types$2.CLASS = types$2.ATTRIBUTE = void 0; + var TAG = 'tag'; + types$2.TAG = TAG; + var STRING = 'string'; + types$2.STRING = STRING; + var SELECTOR = 'selector'; + types$2.SELECTOR = SELECTOR; + var ROOT = 'root'; + types$2.ROOT = ROOT; + var PSEUDO = 'pseudo'; + types$2.PSEUDO = PSEUDO; + var NESTING = 'nesting'; + types$2.NESTING = NESTING; + var ID = 'id'; + types$2.ID = ID; + var COMMENT = 'comment'; + types$2.COMMENT = COMMENT; + var COMBINATOR = 'combinator'; + types$2.COMBINATOR = COMBINATOR; + var CLASS = 'class'; + types$2.CLASS = CLASS; + var ATTRIBUTE = 'attribute'; + types$2.ATTRIBUTE = ATTRIBUTE; + var UNIVERSAL = 'universal'; + types$2.UNIVERSAL = UNIVERSAL; + return types$2; +} + +var hasRequiredContainer$1; + +function requireContainer$1 () { + if (hasRequiredContainer$1) return container$1.exports; + hasRequiredContainer$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$2()); + var types = _interopRequireWildcard(/*@__PURE__*/ requireTypes$1()); + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike) { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } 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 _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Container = /*#__PURE__*/function (_Node) { + _inheritsLoose(Container, _Node); + function Container(opts) { + var _this; + _this = _Node.call(this, opts) || this; + if (!_this.nodes) { + _this.nodes = []; + } + return _this; + } + var _proto = Container.prototype; + _proto.append = function append(selector) { + selector.parent = this; + this.nodes.push(selector); + return this; + }; + _proto.prepend = function prepend(selector) { + selector.parent = this; + this.nodes.unshift(selector); + for (var id in this.indexes) { + this.indexes[id]++; + } + return this; + }; + _proto.at = function at(index) { + return this.nodes[index]; + }; + _proto.index = function index(child) { + if (typeof child === 'number') { + return child; + } + return this.nodes.indexOf(child); + }; + _proto.removeChild = function removeChild(child) { + child = this.index(child); + this.at(child).parent = undefined; + this.nodes.splice(child, 1); + var index; + for (var id in this.indexes) { + index = this.indexes[id]; + if (index >= child) { + this.indexes[id] = index - 1; + } + } + return this; + }; + _proto.removeAll = function removeAll() { + for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) { + var node = _step.value; + node.parent = undefined; + } + this.nodes = []; + return this; + }; + _proto.empty = function empty() { + return this.removeAll(); + }; + _proto.insertAfter = function insertAfter(oldNode, newNode) { + newNode.parent = this; + var oldIndex = this.index(oldNode); + this.nodes.splice(oldIndex + 1, 0, newNode); + newNode.parent = this; + var index; + for (var id in this.indexes) { + index = this.indexes[id]; + if (oldIndex < index) { + this.indexes[id] = index + 1; + } + } + return this; + }; + _proto.insertBefore = function insertBefore(oldNode, newNode) { + newNode.parent = this; + var oldIndex = this.index(oldNode); + this.nodes.splice(oldIndex, 0, newNode); + newNode.parent = this; + var index; + for (var id in this.indexes) { + index = this.indexes[id]; + if (index >= oldIndex) { + this.indexes[id] = index + 1; + } + } + return this; + }; + _proto._findChildAtPosition = function _findChildAtPosition(line, col) { + var found = undefined; + this.each(function (node) { + if (node.atPosition) { + var foundChild = node.atPosition(line, col); + if (foundChild) { + found = foundChild; + return false; + } + } else if (node.isAtPosition(line, col)) { + found = node; + return false; + } + }); + return found; + } + + /** + * Return the most specific node at the line and column number given. + * The source location is based on the original parsed location, locations aren't + * updated as selector nodes are mutated. + * + * Note that this location is relative to the location of the first character + * of the selector, and not the location of the selector in the overall document + * when used in conjunction with postcss. + * + * If not found, returns undefined. + * @param {number} line The line number of the node to find. (1-based index) + * @param {number} col The column number of the node to find. (1-based index) + */; + _proto.atPosition = function atPosition(line, col) { + if (this.isAtPosition(line, col)) { + return this._findChildAtPosition(line, col) || this; + } else { + return undefined; + } + }; + _proto._inferEndPosition = function _inferEndPosition() { + if (this.last && this.last.source && this.last.source.end) { + this.source = this.source || {}; + this.source.end = this.source.end || {}; + Object.assign(this.source.end, this.last.source.end); + } + }; + _proto.each = function each(callback) { + if (!this.lastEach) { + this.lastEach = 0; + } + if (!this.indexes) { + this.indexes = {}; + } + this.lastEach++; + var id = this.lastEach; + this.indexes[id] = 0; + if (!this.length) { + return undefined; + } + var index, result; + while (this.indexes[id] < this.length) { + index = this.indexes[id]; + result = callback(this.at(index), index); + if (result === false) { + break; + } + this.indexes[id] += 1; + } + delete this.indexes[id]; + if (result === false) { + return false; + } + }; + _proto.walk = function walk(callback) { + return this.each(function (node, i) { + var result = callback(node, i); + if (result !== false && node.length) { + result = node.walk(callback); + } + if (result === false) { + return false; + } + }); + }; + _proto.walkAttributes = function walkAttributes(callback) { + var _this2 = this; + return this.walk(function (selector) { + if (selector.type === types.ATTRIBUTE) { + return callback.call(_this2, selector); + } + }); + }; + _proto.walkClasses = function walkClasses(callback) { + var _this3 = this; + return this.walk(function (selector) { + if (selector.type === types.CLASS) { + return callback.call(_this3, selector); + } + }); + }; + _proto.walkCombinators = function walkCombinators(callback) { + var _this4 = this; + return this.walk(function (selector) { + if (selector.type === types.COMBINATOR) { + return callback.call(_this4, selector); + } + }); + }; + _proto.walkComments = function walkComments(callback) { + var _this5 = this; + return this.walk(function (selector) { + if (selector.type === types.COMMENT) { + return callback.call(_this5, selector); + } + }); + }; + _proto.walkIds = function walkIds(callback) { + var _this6 = this; + return this.walk(function (selector) { + if (selector.type === types.ID) { + return callback.call(_this6, selector); + } + }); + }; + _proto.walkNesting = function walkNesting(callback) { + var _this7 = this; + return this.walk(function (selector) { + if (selector.type === types.NESTING) { + return callback.call(_this7, selector); + } + }); + }; + _proto.walkPseudos = function walkPseudos(callback) { + var _this8 = this; + return this.walk(function (selector) { + if (selector.type === types.PSEUDO) { + return callback.call(_this8, selector); + } + }); + }; + _proto.walkTags = function walkTags(callback) { + var _this9 = this; + return this.walk(function (selector) { + if (selector.type === types.TAG) { + return callback.call(_this9, selector); + } + }); + }; + _proto.walkUniversals = function walkUniversals(callback) { + var _this10 = this; + return this.walk(function (selector) { + if (selector.type === types.UNIVERSAL) { + return callback.call(_this10, selector); + } + }); + }; + _proto.split = function split(callback) { + var _this11 = this; + var current = []; + return this.reduce(function (memo, node, index) { + var split = callback.call(_this11, node); + current.push(node); + if (split) { + memo.push(current); + current = []; + } else if (index === _this11.length - 1) { + memo.push(current); + } + return memo; + }, []); + }; + _proto.map = function map(callback) { + return this.nodes.map(callback); + }; + _proto.reduce = function reduce(callback, memo) { + return this.nodes.reduce(callback, memo); + }; + _proto.every = function every(callback) { + return this.nodes.every(callback); + }; + _proto.some = function some(callback) { + return this.nodes.some(callback); + }; + _proto.filter = function filter(callback) { + return this.nodes.filter(callback); + }; + _proto.sort = function sort(callback) { + return this.nodes.sort(callback); + }; + _proto.toString = function toString() { + return this.map(String).join(''); + }; + _createClass(Container, [{ + key: "first", + get: function get() { + return this.at(0); + } + }, { + key: "last", + get: function get() { + return this.at(this.length - 1); + } + }, { + key: "length", + get: function get() { + return this.nodes.length; + } + }]); + return Container; + }(_node["default"]); + exports["default"] = Container; + module.exports = exports.default; + } (container$1, container$1.exports)); + return container$1.exports; +} + +var hasRequiredRoot$1; + +function requireRoot$1 () { + if (hasRequiredRoot$1) return root$1.exports; + hasRequiredRoot$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer$1()); + var _types = /*@__PURE__*/ requireTypes$1(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Root = /*#__PURE__*/function (_Container) { + _inheritsLoose(Root, _Container); + function Root(opts) { + var _this; + _this = _Container.call(this, opts) || this; + _this.type = _types.ROOT; + return _this; + } + var _proto = Root.prototype; + _proto.toString = function toString() { + var str = this.reduce(function (memo, selector) { + memo.push(String(selector)); + return memo; + }, []).join(','); + return this.trailingComma ? str + ',' : str; + }; + _proto.error = function error(message, options) { + if (this._error) { + return this._error(message, options); + } else { + return new Error(message); + } + }; + _createClass(Root, [{ + key: "errorGenerator", + set: function set(handler) { + this._error = handler; + } + }]); + return Root; + }(_container["default"]); + exports["default"] = Root; + module.exports = exports.default; + } (root$1, root$1.exports)); + return root$1.exports; +} + +var selector$1 = {exports: {}}; + +var hasRequiredSelector$1; + +function requireSelector$1 () { + if (hasRequiredSelector$1) return selector$1.exports; + hasRequiredSelector$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer$1()); + var _types = /*@__PURE__*/ requireTypes$1(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Selector = /*#__PURE__*/function (_Container) { + _inheritsLoose(Selector, _Container); + function Selector(opts) { + var _this; + _this = _Container.call(this, opts) || this; + _this.type = _types.SELECTOR; + return _this; + } + return Selector; + }(_container["default"]); + exports["default"] = Selector; + module.exports = exports.default; + } (selector$1, selector$1.exports)); + return selector$1.exports; +} + +var className$1 = {exports: {}}; + +/*! https://mths.be/cssesc v3.0.0 by @mathias */ + +var cssesc_1; +var hasRequiredCssesc; + +function requireCssesc () { + if (hasRequiredCssesc) return cssesc_1; + hasRequiredCssesc = 1; + + var object = {}; + var hasOwnProperty = object.hasOwnProperty; + var merge = function merge(options, defaults) { + if (!options) { + return defaults; + } + var result = {}; + for (var key in defaults) { + // `if (defaults.hasOwnProperty(key) { … }` is not needed here, since + // only recognized option names are used. + result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key]; + } + return result; + }; + + var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/; + var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/; + var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g; + + // https://mathiasbynens.be/notes/css-escapes#css + var cssesc = function cssesc(string, options) { + options = merge(options, cssesc.options); + if (options.quotes != 'single' && options.quotes != 'double') { + options.quotes = 'single'; + } + var quote = options.quotes == 'double' ? '"' : '\''; + var isIdentifier = options.isIdentifier; + + var firstChar = string.charAt(0); + var output = ''; + var counter = 0; + var length = string.length; + while (counter < length) { + var character = string.charAt(counter++); + var codePoint = character.charCodeAt(); + var value = void 0; + // If it’s not a printable ASCII character… + if (codePoint < 0x20 || codePoint > 0x7E) { + if (codePoint >= 0xD800 && codePoint <= 0xDBFF && counter < length) { + // It’s a high surrogate, and there is a next character. + var extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { + // next character is low surrogate + codePoint = ((codePoint & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000; + } else { + // It’s an unmatched surrogate; only append this code unit, in case + // the next code unit is the high surrogate of a surrogate pair. + counter--; + } + } + value = '\\' + codePoint.toString(16).toUpperCase() + ' '; + } else { + if (options.escapeEverything) { + if (regexAnySingleEscape.test(character)) { + value = '\\' + character; + } else { + value = '\\' + codePoint.toString(16).toUpperCase() + ' '; + } + } else if (/[\t\n\f\r\x0B]/.test(character)) { + value = '\\' + codePoint.toString(16).toUpperCase() + ' '; + } else if (character == '\\' || !isIdentifier && (character == '"' && quote == character || character == '\'' && quote == character) || isIdentifier && regexSingleEscape.test(character)) { + value = '\\' + character; + } else { + value = character; + } + } + output += value; + } + + if (isIdentifier) { + if (/^-[-\d]/.test(output)) { + output = '\\-' + output.slice(1); + } else if (/\d/.test(firstChar)) { + output = '\\3' + firstChar + ' ' + output.slice(1); + } + } + + // Remove spaces after `\HEX` escapes that are not followed by a hex digit, + // since they’re redundant. Note that this is only possible if the escape + // sequence isn’t preceded by an odd number of backslashes. + output = output.replace(regexExcessiveSpaces, function ($0, $1, $2) { + if ($1 && $1.length % 2) { + // It’s not safe to remove the space, so don’t. + return $0; + } + // Strip the space. + return ($1 || '') + $2; + }); + + if (!isIdentifier && options.wrap) { + return quote + output + quote; + } + return output; + }; + + // Expose default options (so they can be overridden globally). + cssesc.options = { + 'escapeEverything': false, + 'isIdentifier': false, + 'quotes': 'single', + 'wrap': false + }; + + cssesc.version = '3.0.0'; + + cssesc_1 = cssesc; + return cssesc_1; +} + +var hasRequiredClassName$1; + +function requireClassName$1 () { + if (hasRequiredClassName$1) return className$1.exports; + hasRequiredClassName$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc()); + var _util = /*@__PURE__*/ requireUtil$2(); + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$2()); + var _types = /*@__PURE__*/ requireTypes$1(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var ClassName = /*#__PURE__*/function (_Node) { + _inheritsLoose(ClassName, _Node); + function ClassName(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.CLASS; + _this._constructed = true; + return _this; + } + var _proto = ClassName.prototype; + _proto.valueToString = function valueToString() { + return '.' + _Node.prototype.valueToString.call(this); + }; + _createClass(ClassName, [{ + key: "value", + get: function get() { + return this._value; + }, + set: function set(v) { + if (this._constructed) { + var escaped = (0, _cssesc["default"])(v, { + isIdentifier: true + }); + if (escaped !== v) { + (0, _util.ensureObject)(this, "raws"); + this.raws.value = escaped; + } else if (this.raws) { + delete this.raws.value; + } + } + this._value = v; + } + }]); + return ClassName; + }(_node["default"]); + exports["default"] = ClassName; + module.exports = exports.default; + } (className$1, className$1.exports)); + return className$1.exports; +} + +var comment$1 = {exports: {}}; + +var hasRequiredComment$1; + +function requireComment$1 () { + if (hasRequiredComment$1) return comment$1.exports; + hasRequiredComment$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$2()); + var _types = /*@__PURE__*/ requireTypes$1(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Comment = /*#__PURE__*/function (_Node) { + _inheritsLoose(Comment, _Node); + function Comment(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.COMMENT; + return _this; + } + return Comment; + }(_node["default"]); + exports["default"] = Comment; + module.exports = exports.default; + } (comment$1, comment$1.exports)); + return comment$1.exports; +} + +var id$1 = {exports: {}}; + +var hasRequiredId$1; + +function requireId$1 () { + if (hasRequiredId$1) return id$1.exports; + hasRequiredId$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$2()); + var _types = /*@__PURE__*/ requireTypes$1(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var ID = /*#__PURE__*/function (_Node) { + _inheritsLoose(ID, _Node); + function ID(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.ID; + return _this; + } + var _proto = ID.prototype; + _proto.valueToString = function valueToString() { + return '#' + _Node.prototype.valueToString.call(this); + }; + return ID; + }(_node["default"]); + exports["default"] = ID; + module.exports = exports.default; + } (id$1, id$1.exports)); + return id$1.exports; +} + +var tag$1 = {exports: {}}; + +var namespace$1 = {exports: {}}; + +var hasRequiredNamespace$1; + +function requireNamespace$1 () { + if (hasRequiredNamespace$1) return namespace$1.exports; + hasRequiredNamespace$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc()); + var _util = /*@__PURE__*/ requireUtil$2(); + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$2()); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Namespace = /*#__PURE__*/function (_Node) { + _inheritsLoose(Namespace, _Node); + function Namespace() { + return _Node.apply(this, arguments) || this; + } + var _proto = Namespace.prototype; + _proto.qualifiedName = function qualifiedName(value) { + if (this.namespace) { + return this.namespaceString + "|" + value; + } else { + return value; + } + }; + _proto.valueToString = function valueToString() { + return this.qualifiedName(_Node.prototype.valueToString.call(this)); + }; + _createClass(Namespace, [{ + key: "namespace", + get: function get() { + return this._namespace; + }, + set: function set(namespace) { + if (namespace === true || namespace === "*" || namespace === "&") { + this._namespace = namespace; + if (this.raws) { + delete this.raws.namespace; + } + return; + } + var escaped = (0, _cssesc["default"])(namespace, { + isIdentifier: true + }); + this._namespace = namespace; + if (escaped !== namespace) { + (0, _util.ensureObject)(this, "raws"); + this.raws.namespace = escaped; + } else if (this.raws) { + delete this.raws.namespace; + } + } + }, { + key: "ns", + get: function get() { + return this._namespace; + }, + set: function set(namespace) { + this.namespace = namespace; + } + }, { + key: "namespaceString", + get: function get() { + if (this.namespace) { + var ns = this.stringifyProperty("namespace"); + if (ns === true) { + return ''; + } else { + return ns; + } + } else { + return ''; + } + } + }]); + return Namespace; + }(_node["default"]); + exports["default"] = Namespace; + module.exports = exports.default; + } (namespace$1, namespace$1.exports)); + return namespace$1.exports; +} + +var hasRequiredTag$1; + +function requireTag$1 () { + if (hasRequiredTag$1) return tag$1.exports; + hasRequiredTag$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace$1()); + var _types = /*@__PURE__*/ requireTypes$1(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Tag = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Tag, _Namespace); + function Tag(opts) { + var _this; + _this = _Namespace.call(this, opts) || this; + _this.type = _types.TAG; + return _this; + } + return Tag; + }(_namespace["default"]); + exports["default"] = Tag; + module.exports = exports.default; + } (tag$1, tag$1.exports)); + return tag$1.exports; +} + +var string$1 = {exports: {}}; + +var hasRequiredString$1; + +function requireString$1 () { + if (hasRequiredString$1) return string$1.exports; + hasRequiredString$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$2()); + var _types = /*@__PURE__*/ requireTypes$1(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var String = /*#__PURE__*/function (_Node) { + _inheritsLoose(String, _Node); + function String(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.STRING; + return _this; + } + return String; + }(_node["default"]); + exports["default"] = String; + module.exports = exports.default; + } (string$1, string$1.exports)); + return string$1.exports; +} + +var pseudo$1 = {exports: {}}; + +var hasRequiredPseudo$1; + +function requirePseudo$1 () { + if (hasRequiredPseudo$1) return pseudo$1.exports; + hasRequiredPseudo$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer$1()); + var _types = /*@__PURE__*/ requireTypes$1(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Pseudo = /*#__PURE__*/function (_Container) { + _inheritsLoose(Pseudo, _Container); + function Pseudo(opts) { + var _this; + _this = _Container.call(this, opts) || this; + _this.type = _types.PSEUDO; + return _this; + } + var _proto = Pseudo.prototype; + _proto.toString = function toString() { + var params = this.length ? '(' + this.map(String).join(',') + ')' : ''; + return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join(''); + }; + return Pseudo; + }(_container["default"]); + exports["default"] = Pseudo; + module.exports = exports.default; + } (pseudo$1, pseudo$1.exports)); + return pseudo$1.exports; +} + +var attribute$1 = {}; + +var node$1; +var hasRequiredNode$1; + +function requireNode$1 () { + if (hasRequiredNode$1) return node$1; + hasRequiredNode$1 = 1; + /** + * For Node.js, simply re-export the core `util.deprecate` function. + */ + + node$1 = require$$2.deprecate; + return node$1; +} + +var hasRequiredAttribute$1; + +function requireAttribute$1 () { + if (hasRequiredAttribute$1) return attribute$1; + hasRequiredAttribute$1 = 1; + (function (exports) { + + exports.__esModule = true; + exports["default"] = void 0; + exports.unescapeValue = unescapeValue; + var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc()); + var _unesc = _interopRequireDefault(/*@__PURE__*/ requireUnesc$1()); + var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace$1()); + var _types = /*@__PURE__*/ requireTypes$1(); + var _CSSESC_QUOTE_OPTIONS; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var deprecate = /*@__PURE__*/ requireNode$1(); + var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/; + var warnOfDeprecatedValueAssignment = deprecate(function () {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. " + "Call attribute.setValue() instead."); + var warnOfDeprecatedQuotedAssignment = deprecate(function () {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."); + var warnOfDeprecatedConstructor = deprecate(function () {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now."); + function unescapeValue(value) { + var deprecatedUsage = false; + var quoteMark = null; + var unescaped = value; + var m = unescaped.match(WRAPPED_IN_QUOTES); + if (m) { + quoteMark = m[1]; + unescaped = m[2]; + } + unescaped = (0, _unesc["default"])(unescaped); + if (unescaped !== value) { + deprecatedUsage = true; + } + return { + deprecatedUsage: deprecatedUsage, + unescaped: unescaped, + quoteMark: quoteMark + }; + } + function handleDeprecatedContructorOpts(opts) { + if (opts.quoteMark !== undefined) { + return opts; + } + if (opts.value === undefined) { + return opts; + } + warnOfDeprecatedConstructor(); + var _unescapeValue = unescapeValue(opts.value), + quoteMark = _unescapeValue.quoteMark, + unescaped = _unescapeValue.unescaped; + if (!opts.raws) { + opts.raws = {}; + } + if (opts.raws.value === undefined) { + opts.raws.value = opts.value; + } + opts.value = unescaped; + opts.quoteMark = quoteMark; + return opts; + } + var Attribute = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Attribute, _Namespace); + function Attribute(opts) { + var _this; + if (opts === void 0) { + opts = {}; + } + _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this; + _this.type = _types.ATTRIBUTE; + _this.raws = _this.raws || {}; + Object.defineProperty(_this.raws, 'unquoted', { + get: deprecate(function () { + return _this.value; + }, "attr.raws.unquoted is deprecated. Call attr.value instead."), + set: deprecate(function () { + return _this.value; + }, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.") + }); + _this._constructed = true; + return _this; + } + + /** + * Returns the Attribute's value quoted such that it would be legal to use + * in the value of a css file. The original value's quotation setting + * used for stringification is left unchanged. See `setValue(value, options)` + * if you want to control the quote settings of a new value for the attribute. + * + * You can also change the quotation used for the current value by setting quoteMark. + * + * Options: + * * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this + * option is not set, the original value for quoteMark will be used. If + * indeterminate, a double quote is used. The legal values are: + * * `null` - the value will be unquoted and characters will be escaped as necessary. + * * `'` - the value will be quoted with a single quote and single quotes are escaped. + * * `"` - the value will be quoted with a double quote and double quotes are escaped. + * * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark + * over the quoteMark option value. + * * smart {boolean} - if true, will select a quote mark based on the value + * and the other options specified here. See the `smartQuoteMark()` + * method. + **/ + var _proto = Attribute.prototype; + _proto.getQuotedValue = function getQuotedValue(options) { + if (options === void 0) { + options = {}; + } + var quoteMark = this._determineQuoteMark(options); + var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark]; + var escaped = (0, _cssesc["default"])(this._value, cssescopts); + return escaped; + }; + _proto._determineQuoteMark = function _determineQuoteMark(options) { + return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options); + } + + /** + * Set the unescaped value with the specified quotation options. The value + * provided must not include any wrapping quote marks -- those quotes will + * be interpreted as part of the value and escaped accordingly. + */; + _proto.setValue = function setValue(value, options) { + if (options === void 0) { + options = {}; + } + this._value = value; + this._quoteMark = this._determineQuoteMark(options); + this._syncRawValue(); + } + + /** + * Intelligently select a quoteMark value based on the value's contents. If + * the value is a legal CSS ident, it will not be quoted. Otherwise a quote + * mark will be picked that minimizes the number of escapes. + * + * If there's no clear winner, the quote mark from these options is used, + * then the source quote mark (this is inverted if `preferCurrentQuoteMark` is + * true). If the quoteMark is unspecified, a double quote is used. + * + * @param options This takes the quoteMark and preferCurrentQuoteMark options + * from the quoteValue method. + */; + _proto.smartQuoteMark = function smartQuoteMark(options) { + var v = this.value; + var numSingleQuotes = v.replace(/[^']/g, '').length; + var numDoubleQuotes = v.replace(/[^"]/g, '').length; + if (numSingleQuotes + numDoubleQuotes === 0) { + var escaped = (0, _cssesc["default"])(v, { + isIdentifier: true + }); + if (escaped === v) { + return Attribute.NO_QUOTE; + } else { + var pref = this.preferredQuoteMark(options); + if (pref === Attribute.NO_QUOTE) { + // pick a quote mark that isn't none and see if it's smaller + var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE; + var opts = CSSESC_QUOTE_OPTIONS[quote]; + var quoteValue = (0, _cssesc["default"])(v, opts); + if (quoteValue.length < escaped.length) { + return quote; + } + } + return pref; + } + } else if (numDoubleQuotes === numSingleQuotes) { + return this.preferredQuoteMark(options); + } else if (numDoubleQuotes < numSingleQuotes) { + return Attribute.DOUBLE_QUOTE; + } else { + return Attribute.SINGLE_QUOTE; + } + } + + /** + * Selects the preferred quote mark based on the options and the current quote mark value. + * If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)` + * instead. + */; + _proto.preferredQuoteMark = function preferredQuoteMark(options) { + var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark; + if (quoteMark === undefined) { + quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark; + } + if (quoteMark === undefined) { + quoteMark = Attribute.DOUBLE_QUOTE; + } + return quoteMark; + }; + _proto._syncRawValue = function _syncRawValue() { + var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]); + if (rawValue === this._value) { + if (this.raws) { + delete this.raws.value; + } + } else { + this.raws.value = rawValue; + } + }; + _proto._handleEscapes = function _handleEscapes(prop, value) { + if (this._constructed) { + var escaped = (0, _cssesc["default"])(value, { + isIdentifier: true + }); + if (escaped !== value) { + this.raws[prop] = escaped; + } else { + delete this.raws[prop]; + } + } + }; + _proto._spacesFor = function _spacesFor(name) { + var attrSpaces = { + before: '', + after: '' + }; + var spaces = this.spaces[name] || {}; + var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {}; + return Object.assign(attrSpaces, spaces, rawSpaces); + }; + _proto._stringFor = function _stringFor(name, spaceName, concat) { + if (spaceName === void 0) { + spaceName = name; + } + if (concat === void 0) { + concat = defaultAttrConcat; + } + var attrSpaces = this._spacesFor(spaceName); + return concat(this.stringifyProperty(name), attrSpaces); + } + + /** + * returns the offset of the attribute part specified relative to the + * start of the node of the output string. + * + * * "ns" - alias for "namespace" + * * "namespace" - the namespace if it exists. + * * "attribute" - the attribute name + * * "attributeNS" - the start of the attribute or its namespace + * * "operator" - the match operator of the attribute + * * "value" - The value (string or identifier) + * * "insensitive" - the case insensitivity flag; + * @param part One of the possible values inside an attribute. + * @returns -1 if the name is invalid or the value doesn't exist in this attribute. + */; + _proto.offsetOf = function offsetOf(name) { + var count = 1; + var attributeSpaces = this._spacesFor("attribute"); + count += attributeSpaces.before.length; + if (name === "namespace" || name === "ns") { + return this.namespace ? count : -1; + } + if (name === "attributeNS") { + return count; + } + count += this.namespaceString.length; + if (this.namespace) { + count += 1; + } + if (name === "attribute") { + return count; + } + count += this.stringifyProperty("attribute").length; + count += attributeSpaces.after.length; + var operatorSpaces = this._spacesFor("operator"); + count += operatorSpaces.before.length; + var operator = this.stringifyProperty("operator"); + if (name === "operator") { + return operator ? count : -1; + } + count += operator.length; + count += operatorSpaces.after.length; + var valueSpaces = this._spacesFor("value"); + count += valueSpaces.before.length; + var value = this.stringifyProperty("value"); + if (name === "value") { + return value ? count : -1; + } + count += value.length; + count += valueSpaces.after.length; + var insensitiveSpaces = this._spacesFor("insensitive"); + count += insensitiveSpaces.before.length; + if (name === "insensitive") { + return this.insensitive ? count : -1; + } + return -1; + }; + _proto.toString = function toString() { + var _this2 = this; + var selector = [this.rawSpaceBefore, '[']; + selector.push(this._stringFor('qualifiedAttribute', 'attribute')); + if (this.operator && (this.value || this.value === '')) { + selector.push(this._stringFor('operator')); + selector.push(this._stringFor('value')); + selector.push(this._stringFor('insensitiveFlag', 'insensitive', function (attrValue, attrSpaces) { + if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) { + attrSpaces.before = " "; + } + return defaultAttrConcat(attrValue, attrSpaces); + })); + } + selector.push(']'); + selector.push(this.rawSpaceAfter); + return selector.join(''); + }; + _createClass(Attribute, [{ + key: "quoted", + get: function get() { + var qm = this.quoteMark; + return qm === "'" || qm === '"'; + }, + set: function set(value) { + warnOfDeprecatedQuotedAssignment(); + } + + /** + * returns a single (`'`) or double (`"`) quote character if the value is quoted. + * returns `null` if the value is not quoted. + * returns `undefined` if the quotation state is unknown (this can happen when + * the attribute is constructed without specifying a quote mark.) + */ + }, { + key: "quoteMark", + get: function get() { + return this._quoteMark; + } + + /** + * Set the quote mark to be used by this attribute's value. + * If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute + * value is updated accordingly. + * + * @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted. + */, + set: function set(quoteMark) { + if (!this._constructed) { + this._quoteMark = quoteMark; + return; + } + if (this._quoteMark !== quoteMark) { + this._quoteMark = quoteMark; + this._syncRawValue(); + } + } + }, { + key: "qualifiedAttribute", + get: function get() { + return this.qualifiedName(this.raws.attribute || this.attribute); + } + }, { + key: "insensitiveFlag", + get: function get() { + return this.insensitive ? 'i' : ''; + } + }, { + key: "value", + get: function get() { + return this._value; + }, + set: + /** + * Before 3.0, the value had to be set to an escaped value including any wrapped + * quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value + * is unescaped during parsing and any quote marks are removed. + * + * Because the ambiguity of this semantic change, if you set `attr.value = newValue`, + * a deprecation warning is raised when the new value contains any characters that would + * require escaping (including if it contains wrapped quotes). + * + * Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe + * how the new value is quoted. + */ + function set(v) { + if (this._constructed) { + var _unescapeValue2 = unescapeValue(v), + deprecatedUsage = _unescapeValue2.deprecatedUsage, + unescaped = _unescapeValue2.unescaped, + quoteMark = _unescapeValue2.quoteMark; + if (deprecatedUsage) { + warnOfDeprecatedValueAssignment(); + } + if (unescaped === this._value && quoteMark === this._quoteMark) { + return; + } + this._value = unescaped; + this._quoteMark = quoteMark; + this._syncRawValue(); + } else { + this._value = v; + } + } + }, { + key: "insensitive", + get: function get() { + return this._insensitive; + } + + /** + * Set the case insensitive flag. + * If the case insensitive flag changes, the raw (escaped) value at `attr.raws.insensitiveFlag` + * of the attribute is updated accordingly. + * + * @param {true | false} insensitive true if the attribute should match case-insensitively. + */, + set: function set(insensitive) { + if (!insensitive) { + this._insensitive = false; + + // "i" and "I" can be used in "this.raws.insensitiveFlag" to store the original notation. + // When setting `attr.insensitive = false` both should be erased to ensure correct serialization. + if (this.raws && (this.raws.insensitiveFlag === 'I' || this.raws.insensitiveFlag === 'i')) { + this.raws.insensitiveFlag = undefined; + } + } + this._insensitive = insensitive; + } + }, { + key: "attribute", + get: function get() { + return this._attribute; + }, + set: function set(name) { + this._handleEscapes("attribute", name); + this._attribute = name; + } + }]); + return Attribute; + }(_namespace["default"]); + exports["default"] = Attribute; + Attribute.NO_QUOTE = null; + Attribute.SINGLE_QUOTE = "'"; + Attribute.DOUBLE_QUOTE = '"'; + var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = { + "'": { + quotes: 'single', + wrap: true + }, + '"': { + quotes: 'double', + wrap: true + } + }, _CSSESC_QUOTE_OPTIONS[null] = { + isIdentifier: true + }, _CSSESC_QUOTE_OPTIONS); + function defaultAttrConcat(attrValue, attrSpaces) { + return "" + attrSpaces.before + attrValue + attrSpaces.after; + } + } (attribute$1)); + return attribute$1; +} + +var universal$1 = {exports: {}}; + +var hasRequiredUniversal$1; + +function requireUniversal$1 () { + if (hasRequiredUniversal$1) return universal$1.exports; + hasRequiredUniversal$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace$1()); + var _types = /*@__PURE__*/ requireTypes$1(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Universal = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Universal, _Namespace); + function Universal(opts) { + var _this; + _this = _Namespace.call(this, opts) || this; + _this.type = _types.UNIVERSAL; + _this.value = '*'; + return _this; + } + return Universal; + }(_namespace["default"]); + exports["default"] = Universal; + module.exports = exports.default; + } (universal$1, universal$1.exports)); + return universal$1.exports; +} + +var combinator$1 = {exports: {}}; + +var hasRequiredCombinator$1; + +function requireCombinator$1 () { + if (hasRequiredCombinator$1) return combinator$1.exports; + hasRequiredCombinator$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$2()); + var _types = /*@__PURE__*/ requireTypes$1(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Combinator = /*#__PURE__*/function (_Node) { + _inheritsLoose(Combinator, _Node); + function Combinator(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.COMBINATOR; + return _this; + } + return Combinator; + }(_node["default"]); + exports["default"] = Combinator; + module.exports = exports.default; + } (combinator$1, combinator$1.exports)); + return combinator$1.exports; +} + +var nesting$1 = {exports: {}}; + +var hasRequiredNesting$1; + +function requireNesting$1 () { + if (hasRequiredNesting$1) return nesting$1.exports; + hasRequiredNesting$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$2()); + var _types = /*@__PURE__*/ requireTypes$1(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Nesting = /*#__PURE__*/function (_Node) { + _inheritsLoose(Nesting, _Node); + function Nesting(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.NESTING; + _this.value = '&'; + return _this; + } + return Nesting; + }(_node["default"]); + exports["default"] = Nesting; + module.exports = exports.default; + } (nesting$1, nesting$1.exports)); + return nesting$1.exports; +} + +var sortAscending$1 = {exports: {}}; + +var hasRequiredSortAscending$1; + +function requireSortAscending$1 () { + if (hasRequiredSortAscending$1) return sortAscending$1.exports; + hasRequiredSortAscending$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = sortAscending; + function sortAscending(list) { + return list.sort(function (a, b) { + return a - b; + }); + } + module.exports = exports.default; + } (sortAscending$1, sortAscending$1.exports)); + return sortAscending$1.exports; +} + +var tokenize$1 = {}; + +var tokenTypes$1 = {}; + +var hasRequiredTokenTypes$1; + +function requireTokenTypes$1 () { + if (hasRequiredTokenTypes$1) return tokenTypes$1; + hasRequiredTokenTypes$1 = 1; + + tokenTypes$1.__esModule = true; + tokenTypes$1.word = tokenTypes$1.tilde = tokenTypes$1.tab = tokenTypes$1.str = tokenTypes$1.space = tokenTypes$1.slash = tokenTypes$1.singleQuote = tokenTypes$1.semicolon = tokenTypes$1.plus = tokenTypes$1.pipe = tokenTypes$1.openSquare = tokenTypes$1.openParenthesis = tokenTypes$1.newline = tokenTypes$1.greaterThan = tokenTypes$1.feed = tokenTypes$1.equals = tokenTypes$1.doubleQuote = tokenTypes$1.dollar = tokenTypes$1.cr = tokenTypes$1.comment = tokenTypes$1.comma = tokenTypes$1.combinator = tokenTypes$1.colon = tokenTypes$1.closeSquare = tokenTypes$1.closeParenthesis = tokenTypes$1.caret = tokenTypes$1.bang = tokenTypes$1.backslash = tokenTypes$1.at = tokenTypes$1.asterisk = tokenTypes$1.ampersand = void 0; + var ampersand = 38; // `&`.charCodeAt(0); + tokenTypes$1.ampersand = ampersand; + var asterisk = 42; // `*`.charCodeAt(0); + tokenTypes$1.asterisk = asterisk; + var at = 64; // `@`.charCodeAt(0); + tokenTypes$1.at = at; + var comma = 44; // `,`.charCodeAt(0); + tokenTypes$1.comma = comma; + var colon = 58; // `:`.charCodeAt(0); + tokenTypes$1.colon = colon; + var semicolon = 59; // `;`.charCodeAt(0); + tokenTypes$1.semicolon = semicolon; + var openParenthesis = 40; // `(`.charCodeAt(0); + tokenTypes$1.openParenthesis = openParenthesis; + var closeParenthesis = 41; // `)`.charCodeAt(0); + tokenTypes$1.closeParenthesis = closeParenthesis; + var openSquare = 91; // `[`.charCodeAt(0); + tokenTypes$1.openSquare = openSquare; + var closeSquare = 93; // `]`.charCodeAt(0); + tokenTypes$1.closeSquare = closeSquare; + var dollar = 36; // `$`.charCodeAt(0); + tokenTypes$1.dollar = dollar; + var tilde = 126; // `~`.charCodeAt(0); + tokenTypes$1.tilde = tilde; + var caret = 94; // `^`.charCodeAt(0); + tokenTypes$1.caret = caret; + var plus = 43; // `+`.charCodeAt(0); + tokenTypes$1.plus = plus; + var equals = 61; // `=`.charCodeAt(0); + tokenTypes$1.equals = equals; + var pipe = 124; // `|`.charCodeAt(0); + tokenTypes$1.pipe = pipe; + var greaterThan = 62; // `>`.charCodeAt(0); + tokenTypes$1.greaterThan = greaterThan; + var space = 32; // ` `.charCodeAt(0); + tokenTypes$1.space = space; + var singleQuote = 39; // `'`.charCodeAt(0); + tokenTypes$1.singleQuote = singleQuote; + var doubleQuote = 34; // `"`.charCodeAt(0); + tokenTypes$1.doubleQuote = doubleQuote; + var slash = 47; // `/`.charCodeAt(0); + tokenTypes$1.slash = slash; + var bang = 33; // `!`.charCodeAt(0); + tokenTypes$1.bang = bang; + var backslash = 92; // '\\'.charCodeAt(0); + tokenTypes$1.backslash = backslash; + var cr = 13; // '\r'.charCodeAt(0); + tokenTypes$1.cr = cr; + var feed = 12; // '\f'.charCodeAt(0); + tokenTypes$1.feed = feed; + var newline = 10; // '\n'.charCodeAt(0); + tokenTypes$1.newline = newline; + var tab = 9; // '\t'.charCodeAt(0); + + // Expose aliases primarily for readability. + tokenTypes$1.tab = tab; + var str = singleQuote; + + // No good single character representation! + tokenTypes$1.str = str; + var comment = -1; + tokenTypes$1.comment = comment; + var word = -2; + tokenTypes$1.word = word; + var combinator = -3; + tokenTypes$1.combinator = combinator; + return tokenTypes$1; +} + +var hasRequiredTokenize$1; + +function requireTokenize$1 () { + if (hasRequiredTokenize$1) return tokenize$1; + hasRequiredTokenize$1 = 1; + (function (exports) { + + exports.__esModule = true; + exports.FIELDS = void 0; + exports["default"] = tokenize; + var t = _interopRequireWildcard(/*@__PURE__*/ requireTokenTypes$1()); + var _unescapable, _wordDelimiters; + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable); + var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters); + var hex = {}; + var hexChars = "0123456789abcdefABCDEF"; + for (var i = 0; i < hexChars.length; i++) { + hex[hexChars.charCodeAt(i)] = true; + } + + /** + * Returns the last index of the bar css word + * @param {string} css The string in which the word begins + * @param {number} start The index into the string where word's first letter occurs + */ + function consumeWord(css, start) { + var next = start; + var code; + do { + code = css.charCodeAt(next); + if (wordDelimiters[code]) { + return next - 1; + } else if (code === t.backslash) { + next = consumeEscape(css, next) + 1; + } else { + // All other characters are part of the word + next++; + } + } while (next < css.length); + return next - 1; + } + + /** + * Returns the last index of the escape sequence + * @param {string} css The string in which the sequence begins + * @param {number} start The index into the string where escape character (`\`) occurs. + */ + function consumeEscape(css, start) { + var next = start; + var code = css.charCodeAt(next + 1); + if (unescapable[code]) ; else if (hex[code]) { + var hexDigits = 0; + // consume up to 6 hex chars + do { + next++; + hexDigits++; + code = css.charCodeAt(next + 1); + } while (hex[code] && hexDigits < 6); + // if fewer than 6 hex chars, a trailing space ends the escape + if (hexDigits < 6 && code === t.space) { + next++; + } + } else { + // the next char is part of the current word + next++; + } + return next; + } + var FIELDS = { + TYPE: 0, + START_LINE: 1, + START_COL: 2, + END_LINE: 3, + END_COL: 4, + START_POS: 5, + END_POS: 6 + }; + exports.FIELDS = FIELDS; + function tokenize(input) { + var tokens = []; + var css = input.css.valueOf(); + var _css = css, + length = _css.length; + var offset = -1; + var line = 1; + var start = 0; + var end = 0; + var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType; + function unclosed(what, fix) { + if (input.safe) { + // fyi: this is never set to true. + css += fix; + next = css.length - 1; + } else { + throw input.error('Unclosed ' + what, line, start - offset, start); + } + } + while (start < length) { + code = css.charCodeAt(start); + if (code === t.newline) { + offset = start; + line += 1; + } + switch (code) { + case t.space: + case t.tab: + case t.newline: + case t.cr: + case t.feed: + next = start; + do { + next += 1; + code = css.charCodeAt(next); + if (code === t.newline) { + offset = next; + line += 1; + } + } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed); + tokenType = t.space; + endLine = line; + endColumn = next - offset - 1; + end = next; + break; + case t.plus: + case t.greaterThan: + case t.tilde: + case t.pipe: + next = start; + do { + next += 1; + code = css.charCodeAt(next); + } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe); + tokenType = t.combinator; + endLine = line; + endColumn = start - offset; + end = next; + break; + + // Consume these characters as single tokens. + case t.asterisk: + case t.ampersand: + case t.bang: + case t.comma: + case t.equals: + case t.dollar: + case t.caret: + case t.openSquare: + case t.closeSquare: + case t.colon: + case t.semicolon: + case t.openParenthesis: + case t.closeParenthesis: + next = start; + tokenType = code; + endLine = line; + endColumn = start - offset; + end = next + 1; + break; + case t.singleQuote: + case t.doubleQuote: + quote = code === t.singleQuote ? "'" : '"'; + next = start; + do { + escaped = false; + next = css.indexOf(quote, next + 1); + if (next === -1) { + unclosed('quote', quote); + } + escapePos = next; + while (css.charCodeAt(escapePos - 1) === t.backslash) { + escapePos -= 1; + escaped = !escaped; + } + } while (escaped); + tokenType = t.str; + endLine = line; + endColumn = start - offset; + end = next + 1; + break; + default: + if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) { + next = css.indexOf('*/', start + 2) + 1; + if (next === 0) { + unclosed('comment', '*/'); + } + content = css.slice(start, next + 1); + lines = content.split('\n'); + last = lines.length - 1; + if (last > 0) { + nextLine = line + last; + nextOffset = next - lines[last].length; + } else { + nextLine = line; + nextOffset = offset; + } + tokenType = t.comment; + line = nextLine; + endLine = nextLine; + endColumn = next - nextOffset; + } else if (code === t.slash) { + next = start; + tokenType = code; + endLine = line; + endColumn = start - offset; + end = next + 1; + } else { + next = consumeWord(css, start); + tokenType = t.word; + endLine = line; + endColumn = next - offset; + } + end = next + 1; + break; + } + + // Ensure that the token structure remains consistent + tokens.push([tokenType, + // [0] Token type + line, + // [1] Starting line + start - offset, + // [2] Starting column + endLine, + // [3] Ending line + endColumn, + // [4] Ending column + start, + // [5] Start position / Source index + end // [6] End position + ]); + + // Reset offset for the next token + if (nextOffset) { + offset = nextOffset; + nextOffset = null; + } + start = end; + } + return tokens; + } + } (tokenize$1)); + return tokenize$1; +} + +var hasRequiredParser$2; + +function requireParser$2 () { + if (hasRequiredParser$2) return parser$1.exports; + hasRequiredParser$2 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _root = _interopRequireDefault(/*@__PURE__*/ requireRoot$1()); + var _selector = _interopRequireDefault(/*@__PURE__*/ requireSelector$1()); + var _className = _interopRequireDefault(/*@__PURE__*/ requireClassName$1()); + var _comment = _interopRequireDefault(/*@__PURE__*/ requireComment$1()); + var _id = _interopRequireDefault(/*@__PURE__*/ requireId$1()); + var _tag = _interopRequireDefault(/*@__PURE__*/ requireTag$1()); + var _string = _interopRequireDefault(/*@__PURE__*/ requireString$1()); + var _pseudo = _interopRequireDefault(/*@__PURE__*/ requirePseudo$1()); + var _attribute = _interopRequireWildcard(/*@__PURE__*/ requireAttribute$1()); + var _universal = _interopRequireDefault(/*@__PURE__*/ requireUniversal$1()); + var _combinator = _interopRequireDefault(/*@__PURE__*/ requireCombinator$1()); + var _nesting = _interopRequireDefault(/*@__PURE__*/ requireNesting$1()); + var _sortAscending = _interopRequireDefault(/*@__PURE__*/ requireSortAscending$1()); + var _tokenize = _interopRequireWildcard(/*@__PURE__*/ requireTokenize$1()); + var tokens = _interopRequireWildcard(/*@__PURE__*/ requireTokenTypes$1()); + var types = _interopRequireWildcard(/*@__PURE__*/ requireTypes$1()); + var _util = /*@__PURE__*/ requireUtil$2(); + var _WHITESPACE_TOKENS, _Object$assign; + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS); + var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign)); + function tokenStart(token) { + return { + line: token[_tokenize.FIELDS.START_LINE], + column: token[_tokenize.FIELDS.START_COL] + }; + } + function tokenEnd(token) { + return { + line: token[_tokenize.FIELDS.END_LINE], + column: token[_tokenize.FIELDS.END_COL] + }; + } + function getSource(startLine, startColumn, endLine, endColumn) { + return { + start: { + line: startLine, + column: startColumn + }, + end: { + line: endLine, + column: endColumn + } + }; + } + function getTokenSource(token) { + return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]); + } + function getTokenSourceSpan(startToken, endToken) { + if (!startToken) { + return undefined; + } + return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]); + } + function unescapeProp(node, prop) { + var value = node[prop]; + if (typeof value !== "string") { + return; + } + if (value.indexOf("\\") !== -1) { + (0, _util.ensureObject)(node, 'raws'); + node[prop] = (0, _util.unesc)(value); + if (node.raws[prop] === undefined) { + node.raws[prop] = value; + } + } + return node; + } + function indexesOf(array, item) { + var i = -1; + var indexes = []; + while ((i = array.indexOf(item, i + 1)) !== -1) { + indexes.push(i); + } + return indexes; + } + function uniqs() { + var list = Array.prototype.concat.apply([], arguments); + return list.filter(function (item, i) { + return i === list.indexOf(item); + }); + } + var Parser = /*#__PURE__*/function () { + function Parser(rule, options) { + if (options === void 0) { + options = {}; + } + this.rule = rule; + this.options = Object.assign({ + lossy: false, + safe: false + }, options); + this.position = 0; + this.css = typeof this.rule === 'string' ? this.rule : this.rule.selector; + this.tokens = (0, _tokenize["default"])({ + css: this.css, + error: this._errorGenerator(), + safe: this.options.safe + }); + var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]); + this.root = new _root["default"]({ + source: rootSource + }); + this.root.errorGenerator = this._errorGenerator(); + var selector = new _selector["default"]({ + source: { + start: { + line: 1, + column: 1 + } + }, + sourceIndex: 0 + }); + this.root.append(selector); + this.current = selector; + this.loop(); + } + var _proto = Parser.prototype; + _proto._errorGenerator = function _errorGenerator() { + var _this = this; + return function (message, errorOptions) { + if (typeof _this.rule === 'string') { + return new Error(message); + } + return _this.rule.error(message, errorOptions); + }; + }; + _proto.attribute = function attribute() { + var attr = []; + var startingToken = this.currToken; + this.position++; + while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { + attr.push(this.currToken); + this.position++; + } + if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { + return this.expected('closing square bracket', this.currToken[_tokenize.FIELDS.START_POS]); + } + var len = attr.length; + var node = { + source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]), + sourceIndex: startingToken[_tokenize.FIELDS.START_POS] + }; + if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) { + return this.expected('attribute', attr[0][_tokenize.FIELDS.START_POS]); + } + var pos = 0; + var spaceBefore = ''; + var commentBefore = ''; + var lastAdded = null; + var spaceAfterMeaningfulToken = false; + while (pos < len) { + var token = attr[pos]; + var content = this.content(token); + var next = attr[pos + 1]; + switch (token[_tokenize.FIELDS.TYPE]) { + case tokens.space: + // if ( + // len === 1 || + // pos === 0 && this.content(next) === '|' + // ) { + // return this.expected('attribute', token[TOKEN.START_POS], content); + // } + spaceAfterMeaningfulToken = true; + if (this.options.lossy) { + break; + } + if (lastAdded) { + (0, _util.ensureObject)(node, 'spaces', lastAdded); + var prevContent = node.spaces[lastAdded].after || ''; + node.spaces[lastAdded].after = prevContent + content; + var existingComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || null; + if (existingComment) { + node.raws.spaces[lastAdded].after = existingComment + content; + } + } else { + spaceBefore = spaceBefore + content; + commentBefore = commentBefore + content; + } + break; + case tokens.asterisk: + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) { + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'attribute'); + node.spaces.attribute.before = spaceBefore; + spaceBefore = ''; + } + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); + node.raws.spaces.attribute.before = spaceBefore; + commentBefore = ''; + } + node.namespace = (node.namespace || "") + content; + var rawValue = (0, _util.getProp)(node, 'raws', 'namespace') || null; + if (rawValue) { + node.raws.namespace += content; + } + lastAdded = 'namespace'; + } + spaceAfterMeaningfulToken = false; + break; + case tokens.dollar: + if (lastAdded === "value") { + var oldRawValue = (0, _util.getProp)(node, 'raws', 'value'); + node.value += "$"; + if (oldRawValue) { + node.raws.value = oldRawValue + "$"; + } + break; + } + // Falls through + case tokens.caret: + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } + spaceAfterMeaningfulToken = false; + break; + case tokens.combinator: + if (content === '~' && next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } + if (content !== '|') { + spaceAfterMeaningfulToken = false; + break; + } + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } else if (!node.namespace && !node.attribute) { + node.namespace = true; + } + spaceAfterMeaningfulToken = false; + break; + case tokens.word: + if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && + // this look-ahead probably fails with comment nodes involved. + !node.operator && !node.namespace) { + node.namespace = content; + lastAdded = 'namespace'; + } else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) { + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'attribute'); + node.spaces.attribute.before = spaceBefore; + spaceBefore = ''; + } + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); + node.raws.spaces.attribute.before = commentBefore; + commentBefore = ''; + } + node.attribute = (node.attribute || "") + content; + var _rawValue = (0, _util.getProp)(node, 'raws', 'attribute') || null; + if (_rawValue) { + node.raws.attribute += content; + } + lastAdded = 'attribute'; + } else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) { + var _unescaped = (0, _util.unesc)(content); + var _oldRawValue = (0, _util.getProp)(node, 'raws', 'value') || ''; + var oldValue = node.value || ''; + node.value = oldValue + _unescaped; + node.quoteMark = null; + if (_unescaped !== content || _oldRawValue) { + (0, _util.ensureObject)(node, 'raws'); + node.raws.value = (_oldRawValue || oldValue) + content; + } + lastAdded = 'value'; + } else { + var insensitive = content === 'i' || content === "I"; + if ((node.value || node.value === '') && (node.quoteMark || spaceAfterMeaningfulToken)) { + node.insensitive = insensitive; + if (!insensitive || content === "I") { + (0, _util.ensureObject)(node, 'raws'); + node.raws.insensitiveFlag = content; + } + lastAdded = 'insensitive'; + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'insensitive'); + node.spaces.insensitive.before = spaceBefore; + spaceBefore = ''; + } + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'insensitive'); + node.raws.spaces.insensitive.before = commentBefore; + commentBefore = ''; + } + } else if (node.value || node.value === '') { + lastAdded = 'value'; + node.value += content; + if (node.raws.value) { + node.raws.value += content; + } + } + } + spaceAfterMeaningfulToken = false; + break; + case tokens.str: + if (!node.attribute || !node.operator) { + return this.error("Expected an attribute followed by an operator preceding the string.", { + index: token[_tokenize.FIELDS.START_POS] + }); + } + var _unescapeValue = (0, _attribute.unescapeValue)(content), + unescaped = _unescapeValue.unescaped, + quoteMark = _unescapeValue.quoteMark; + node.value = unescaped; + node.quoteMark = quoteMark; + lastAdded = 'value'; + (0, _util.ensureObject)(node, 'raws'); + node.raws.value = content; + spaceAfterMeaningfulToken = false; + break; + case tokens.equals: + if (!node.attribute) { + return this.expected('attribute', token[_tokenize.FIELDS.START_POS], content); + } + if (node.value) { + return this.error('Unexpected "=" found; an operator was already defined.', { + index: token[_tokenize.FIELDS.START_POS] + }); + } + node.operator = node.operator ? node.operator + content : content; + lastAdded = 'operator'; + spaceAfterMeaningfulToken = false; + break; + case tokens.comment: + if (lastAdded) { + if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === 'insensitive') { + var lastComment = (0, _util.getProp)(node, 'spaces', lastAdded, 'after') || ''; + var rawLastComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || lastComment; + (0, _util.ensureObject)(node, 'raws', 'spaces', lastAdded); + node.raws.spaces[lastAdded].after = rawLastComment + content; + } else { + var lastValue = node[lastAdded] || ''; + var rawLastValue = (0, _util.getProp)(node, 'raws', lastAdded) || lastValue; + (0, _util.ensureObject)(node, 'raws'); + node.raws[lastAdded] = rawLastValue + content; + } + } else { + commentBefore = commentBefore + content; + } + break; + default: + return this.error("Unexpected \"" + content + "\" found.", { + index: token[_tokenize.FIELDS.START_POS] + }); + } + pos++; + } + unescapeProp(node, "attribute"); + unescapeProp(node, "namespace"); + this.newNode(new _attribute["default"](node)); + this.position++; + } + + /** + * return a node containing meaningless garbage up to (but not including) the specified token position. + * if the token position is negative, all remaining tokens are consumed. + * + * This returns an array containing a single string node if all whitespace, + * otherwise an array of comment nodes with space before and after. + * + * These tokens are not added to the current selector, the caller can add them or use them to amend + * a previous node's space metadata. + * + * In lossy mode, this returns only comments. + */; + _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) { + if (stopPosition < 0) { + stopPosition = this.tokens.length; + } + var startPosition = this.position; + var nodes = []; + var space = ""; + var lastComment = undefined; + do { + if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) { + if (!this.options.lossy) { + space += this.content(); + } + } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) { + var spaces = {}; + if (space) { + spaces.before = space; + space = ""; + } + lastComment = new _comment["default"]({ + value: this.content(), + source: getTokenSource(this.currToken), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], + spaces: spaces + }); + nodes.push(lastComment); + } + } while (++this.position < stopPosition); + if (space) { + if (lastComment) { + lastComment.spaces.after = space; + } else if (!this.options.lossy) { + var firstToken = this.tokens[startPosition]; + var lastToken = this.tokens[this.position - 1]; + nodes.push(new _string["default"]({ + value: '', + source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]), + sourceIndex: firstToken[_tokenize.FIELDS.START_POS], + spaces: { + before: space, + after: '' + } + })); + } + } + return nodes; + } + + /** + * + * @param {*} nodes + */; + _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) { + var _this2 = this; + if (requiredSpace === void 0) { + requiredSpace = false; + } + var space = ""; + var rawSpace = ""; + nodes.forEach(function (n) { + var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace); + var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace); + space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0); + rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0); + }); + if (rawSpace === space) { + rawSpace = undefined; + } + var result = { + space: space, + rawSpace: rawSpace + }; + return result; + }; + _proto.isNamedCombinator = function isNamedCombinator(position) { + if (position === void 0) { + position = this.position; + } + return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash; + }; + _proto.namedCombinator = function namedCombinator() { + if (this.isNamedCombinator()) { + var nameRaw = this.content(this.tokens[this.position + 1]); + var name = (0, _util.unesc)(nameRaw).toLowerCase(); + var raws = {}; + if (name !== nameRaw) { + raws.value = "/" + nameRaw + "/"; + } + var node = new _combinator["default"]({ + value: "/" + name + "/", + source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], + raws: raws + }); + this.position = this.position + 3; + return node; + } else { + this.unexpected(); + } + }; + _proto.combinator = function combinator() { + var _this3 = this; + if (this.content() === '|') { + return this.namespace(); + } + // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector. + var nextSigTokenPos = this.locateNextMeaningfulToken(this.position); + if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); + if (nodes.length > 0) { + var last = this.current.last; + if (last) { + var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), + space = _this$convertWhitespa.space, + rawSpace = _this$convertWhitespa.rawSpace; + if (rawSpace !== undefined) { + last.rawSpaceAfter += rawSpace; + } + last.spaces.after += space; + } else { + nodes.forEach(function (n) { + return _this3.newNode(n); + }); + } + } + return; + } + var firstToken = this.currToken; + var spaceOrDescendantSelectorNodes = undefined; + if (nextSigTokenPos > this.position) { + spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); + } + var node; + if (this.isNamedCombinator()) { + node = this.namedCombinator(); + } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) { + node = new _combinator["default"]({ + value: this.content(), + source: getTokenSource(this.currToken), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS] + }); + this.position++; + } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) ; else if (!spaceOrDescendantSelectorNodes) { + this.unexpected(); + } + if (node) { + if (spaceOrDescendantSelectorNodes) { + var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), + _space = _this$convertWhitespa2.space, + _rawSpace = _this$convertWhitespa2.rawSpace; + node.spaces.before = _space; + node.rawSpaceBefore = _rawSpace; + } + } else { + // descendant combinator + var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), + _space2 = _this$convertWhitespa3.space, + _rawSpace2 = _this$convertWhitespa3.rawSpace; + if (!_rawSpace2) { + _rawSpace2 = _space2; + } + var spaces = {}; + var raws = { + spaces: {} + }; + if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) { + spaces.before = _space2.slice(0, _space2.length - 1); + raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1); + } else if (_space2.startsWith(' ') && _rawSpace2.startsWith(' ')) { + spaces.after = _space2.slice(1); + raws.spaces.after = _rawSpace2.slice(1); + } else { + raws.value = _rawSpace2; + } + node = new _combinator["default"]({ + value: ' ', + source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]), + sourceIndex: firstToken[_tokenize.FIELDS.START_POS], + spaces: spaces, + raws: raws + }); + } + if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) { + node.spaces.after = this.optionalSpace(this.content()); + this.position++; + } + return this.newNode(node); + }; + _proto.comma = function comma() { + if (this.position === this.tokens.length - 1) { + this.root.trailingComma = true; + this.position++; + return; + } + this.current._inferEndPosition(); + var selector = new _selector["default"]({ + source: { + start: tokenStart(this.tokens[this.position + 1]) + }, + sourceIndex: this.tokens[this.position + 1][_tokenize.FIELDS.START_POS] + }); + this.current.parent.append(selector); + this.current = selector; + this.position++; + }; + _proto.comment = function comment() { + var current = this.currToken; + this.newNode(new _comment["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + _proto.error = function error(message, opts) { + throw this.root.error(message, opts); + }; + _proto.missingBackslash = function missingBackslash() { + return this.error('Expected a backslash preceding the semicolon.', { + index: this.currToken[_tokenize.FIELDS.START_POS] + }); + }; + _proto.missingParenthesis = function missingParenthesis() { + return this.expected('opening parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.missingSquareBracket = function missingSquareBracket() { + return this.expected('opening square bracket', this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.unexpected = function unexpected() { + return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.unexpectedPipe = function unexpectedPipe() { + return this.error("Unexpected '|'.", this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.namespace = function namespace() { + var before = this.prevToken && this.content(this.prevToken) || true; + if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) { + this.position++; + return this.word(before); + } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) { + this.position++; + return this.universal(before); + } + this.unexpectedPipe(); + }; + _proto.nesting = function nesting() { + if (this.nextToken) { + var nextContent = this.content(this.nextToken); + if (nextContent === "|") { + this.position++; + return; + } + } + var current = this.currToken; + this.newNode(new _nesting["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + _proto.parentheses = function parentheses() { + var last = this.current.last; + var unbalanced = 1; + this.position++; + if (last && last.type === types.PSEUDO) { + var selector = new _selector["default"]({ + source: { + start: tokenStart(this.tokens[this.position]) + }, + sourceIndex: this.tokens[this.position][_tokenize.FIELDS.START_POS] + }); + var cache = this.current; + last.append(selector); + this.current = selector; + while (this.position < this.tokens.length && unbalanced) { + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + unbalanced++; + } + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + unbalanced--; + } + if (unbalanced) { + this.parse(); + } else { + this.current.source.end = tokenEnd(this.currToken); + this.current.parent.source.end = tokenEnd(this.currToken); + this.position++; + } + } + this.current = cache; + } else { + // I think this case should be an error. It's used to implement a basic parse of media queries + // but I don't think it's a good idea. + var parenStart = this.currToken; + var parenValue = "("; + var parenEnd; + while (this.position < this.tokens.length && unbalanced) { + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + unbalanced++; + } + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + unbalanced--; + } + parenEnd = this.currToken; + parenValue += this.parseParenthesisToken(this.currToken); + this.position++; + } + if (last) { + last.appendToPropertyAndEscape("value", parenValue, parenValue); + } else { + this.newNode(new _string["default"]({ + value: parenValue, + source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]), + sourceIndex: parenStart[_tokenize.FIELDS.START_POS] + })); + } + } + if (unbalanced) { + return this.expected('closing parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); + } + }; + _proto.pseudo = function pseudo() { + var _this4 = this; + var pseudoStr = ''; + var startingToken = this.currToken; + while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) { + pseudoStr += this.content(); + this.position++; + } + if (!this.currToken) { + return this.expected(['pseudo-class', 'pseudo-element'], this.position - 1); + } + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) { + this.splitWord(false, function (first, length) { + pseudoStr += first; + _this4.newNode(new _pseudo["default"]({ + value: pseudoStr, + source: getTokenSourceSpan(startingToken, _this4.currToken), + sourceIndex: startingToken[_tokenize.FIELDS.START_POS] + })); + if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + _this4.error('Misplaced parenthesis.', { + index: _this4.nextToken[_tokenize.FIELDS.START_POS] + }); + } + }); + } else { + return this.expected(['pseudo-class', 'pseudo-element'], this.currToken[_tokenize.FIELDS.START_POS]); + } + }; + _proto.space = function space() { + var content = this.content(); + // Handle space before and after the selector + if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function (node) { + return node.type === 'comment'; + })) { + this.spaces = this.optionalSpace(content); + this.position++; + } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + this.current.last.spaces.after = this.optionalSpace(content); + this.position++; + } else { + this.combinator(); + } + }; + _proto.string = function string() { + var current = this.currToken; + this.newNode(new _string["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + _proto.universal = function universal(namespace) { + var nextToken = this.nextToken; + if (nextToken && this.content(nextToken) === '|') { + this.position++; + return this.namespace(); + } + var current = this.currToken; + this.newNode(new _universal["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + }), namespace); + this.position++; + }; + _proto.splitWord = function splitWord(namespace, firstCallback) { + var _this5 = this; + var nextToken = this.nextToken; + var word = this.content(); + while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[_tokenize.FIELDS.TYPE])) { + this.position++; + var current = this.content(); + word += current; + if (current.lastIndexOf('\\') === current.length - 1) { + var next = this.nextToken; + if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) { + word += this.requiredSpace(this.content(next)); + this.position++; + } + } + nextToken = this.nextToken; + } + var hasClass = indexesOf(word, '.').filter(function (i) { + // Allow escaped dot within class name + var escapedDot = word[i - 1] === '\\'; + // Allow decimal numbers percent in @keyframes + var isKeyframesPercent = /^\d+\.\d+%$/.test(word); + return !escapedDot && !isKeyframesPercent; + }); + var hasId = indexesOf(word, '#').filter(function (i) { + return word[i - 1] !== '\\'; + }); + // Eliminate Sass interpolations from the list of id indexes + var interpolations = indexesOf(word, '#{'); + if (interpolations.length) { + hasId = hasId.filter(function (hashIndex) { + return !~interpolations.indexOf(hashIndex); + }); + } + var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId))); + indices.forEach(function (ind, i) { + var index = indices[i + 1] || word.length; + var value = word.slice(ind, index); + if (i === 0 && firstCallback) { + return firstCallback.call(_this5, value, indices.length); + } + var node; + var current = _this5.currToken; + var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i]; + var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1)); + if (~hasClass.indexOf(ind)) { + var classNameOpts = { + value: value.slice(1), + source: source, + sourceIndex: sourceIndex + }; + node = new _className["default"](unescapeProp(classNameOpts, "value")); + } else if (~hasId.indexOf(ind)) { + var idOpts = { + value: value.slice(1), + source: source, + sourceIndex: sourceIndex + }; + node = new _id["default"](unescapeProp(idOpts, "value")); + } else { + var tagOpts = { + value: value, + source: source, + sourceIndex: sourceIndex + }; + unescapeProp(tagOpts, "value"); + node = new _tag["default"](tagOpts); + } + _this5.newNode(node, namespace); + // Ensure that the namespace is used only once + namespace = null; + }); + this.position++; + }; + _proto.word = function word(namespace) { + var nextToken = this.nextToken; + if (nextToken && this.content(nextToken) === '|') { + this.position++; + return this.namespace(); + } + return this.splitWord(namespace); + }; + _proto.loop = function loop() { + while (this.position < this.tokens.length) { + this.parse(true); + } + this.current._inferEndPosition(); + return this.root; + }; + _proto.parse = function parse(throwOnParenthesis) { + switch (this.currToken[_tokenize.FIELDS.TYPE]) { + case tokens.space: + this.space(); + break; + case tokens.comment: + this.comment(); + break; + case tokens.openParenthesis: + this.parentheses(); + break; + case tokens.closeParenthesis: + if (throwOnParenthesis) { + this.missingParenthesis(); + } + break; + case tokens.openSquare: + this.attribute(); + break; + case tokens.dollar: + case tokens.caret: + case tokens.equals: + case tokens.word: + this.word(); + break; + case tokens.colon: + this.pseudo(); + break; + case tokens.comma: + this.comma(); + break; + case tokens.asterisk: + this.universal(); + break; + case tokens.ampersand: + this.nesting(); + break; + case tokens.slash: + case tokens.combinator: + this.combinator(); + break; + case tokens.str: + this.string(); + break; + // These cases throw; no break needed. + case tokens.closeSquare: + this.missingSquareBracket(); + case tokens.semicolon: + this.missingBackslash(); + default: + this.unexpected(); + } + } + + /** + * Helpers + */; + _proto.expected = function expected(description, index, found) { + if (Array.isArray(description)) { + var last = description.pop(); + description = description.join(', ') + " or " + last; + } + var an = /^[aeiou]/.test(description[0]) ? 'an' : 'a'; + if (!found) { + return this.error("Expected " + an + " " + description + ".", { + index: index + }); + } + return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { + index: index + }); + }; + _proto.requiredSpace = function requiredSpace(space) { + return this.options.lossy ? ' ' : space; + }; + _proto.optionalSpace = function optionalSpace(space) { + return this.options.lossy ? '' : space; + }; + _proto.lossySpace = function lossySpace(space, required) { + if (this.options.lossy) { + return required ? ' ' : ''; + } else { + return space; + } + }; + _proto.parseParenthesisToken = function parseParenthesisToken(token) { + var content = this.content(token); + if (token[_tokenize.FIELDS.TYPE] === tokens.space) { + return this.requiredSpace(content); + } else { + return content; + } + }; + _proto.newNode = function newNode(node, namespace) { + if (namespace) { + if (/^ +$/.test(namespace)) { + if (!this.options.lossy) { + this.spaces = (this.spaces || '') + namespace; + } + namespace = true; + } + node.namespace = namespace; + unescapeProp(node, "namespace"); + } + if (this.spaces) { + node.spaces.before = this.spaces; + this.spaces = ''; + } + return this.current.append(node); + }; + _proto.content = function content(token) { + if (token === void 0) { + token = this.currToken; + } + return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]); + }; + /** + * returns the index of the next non-whitespace, non-comment token. + * returns -1 if no meaningful token is found. + */ + _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) { + if (startPosition === void 0) { + startPosition = this.position + 1; + } + var searchPosition = startPosition; + while (searchPosition < this.tokens.length) { + if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) { + searchPosition++; + continue; + } else { + return searchPosition; + } + } + return -1; + }; + _createClass(Parser, [{ + key: "currToken", + get: function get() { + return this.tokens[this.position]; + } + }, { + key: "nextToken", + get: function get() { + return this.tokens[this.position + 1]; + } + }, { + key: "prevToken", + get: function get() { + return this.tokens[this.position - 1]; + } + }]); + return Parser; + }(); + exports["default"] = Parser; + module.exports = exports.default; + } (parser$1, parser$1.exports)); + return parser$1.exports; +} + +var hasRequiredProcessor$1; + +function requireProcessor$1 () { + if (hasRequiredProcessor$1) return processor$1.exports; + hasRequiredProcessor$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _parser = _interopRequireDefault(/*@__PURE__*/ requireParser$2()); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var Processor = /*#__PURE__*/function () { + function Processor(func, options) { + this.func = func || function noop() {}; + this.funcRes = null; + this.options = options; + } + var _proto = Processor.prototype; + _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) { + if (options === void 0) { + options = {}; + } + var merged = Object.assign({}, this.options, options); + if (merged.updateSelector === false) { + return false; + } else { + return typeof rule !== "string"; + } + }; + _proto._isLossy = function _isLossy(options) { + if (options === void 0) { + options = {}; + } + var merged = Object.assign({}, this.options, options); + if (merged.lossless === false) { + return true; + } else { + return false; + } + }; + _proto._root = function _root(rule, options) { + if (options === void 0) { + options = {}; + } + var parser = new _parser["default"](rule, this._parseOptions(options)); + return parser.root; + }; + _proto._parseOptions = function _parseOptions(options) { + return { + lossy: this._isLossy(options) + }; + }; + _proto._run = function _run(rule, options) { + var _this = this; + if (options === void 0) { + options = {}; + } + return new Promise(function (resolve, reject) { + try { + var root = _this._root(rule, options); + Promise.resolve(_this.func(root)).then(function (transform) { + var string = undefined; + if (_this._shouldUpdateSelector(rule, options)) { + string = root.toString(); + rule.selector = string; + } + return { + transform: transform, + root: root, + string: string + }; + }).then(resolve, reject); + } catch (e) { + reject(e); + return; + } + }); + }; + _proto._runSync = function _runSync(rule, options) { + if (options === void 0) { + options = {}; + } + var root = this._root(rule, options); + var transform = this.func(root); + if (transform && typeof transform.then === "function") { + throw new Error("Selector processor returned a promise to a synchronous call."); + } + var string = undefined; + if (options.updateSelector && typeof rule !== "string") { + string = root.toString(); + rule.selector = string; + } + return { + transform: transform, + root: root, + string: string + }; + } + + /** + * Process rule into a selector AST. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {Promise<parser.Root>} The AST of the selector after processing it. + */; + _proto.ast = function ast(rule, options) { + return this._run(rule, options).then(function (result) { + return result.root; + }); + } + + /** + * Process rule into a selector AST synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {parser.Root} The AST of the selector after processing it. + */; + _proto.astSync = function astSync(rule, options) { + return this._runSync(rule, options).root; + } + + /** + * Process a selector into a transformed value asynchronously + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {Promise<any>} The value returned by the processor. + */; + _proto.transform = function transform(rule, options) { + return this._run(rule, options).then(function (result) { + return result.transform; + }); + } + + /** + * Process a selector into a transformed value synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {any} The value returned by the processor. + */; + _proto.transformSync = function transformSync(rule, options) { + return this._runSync(rule, options).transform; + } + + /** + * Process a selector into a new selector string asynchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {string} the selector after processing. + */; + _proto.process = function process(rule, options) { + return this._run(rule, options).then(function (result) { + return result.string || result.root.toString(); + }); + } + + /** + * Process a selector into a new selector string synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {string} the selector after processing. + */; + _proto.processSync = function processSync(rule, options) { + var result = this._runSync(rule, options); + return result.string || result.root.toString(); + }; + return Processor; + }(); + exports["default"] = Processor; + module.exports = exports.default; + } (processor$1, processor$1.exports)); + return processor$1.exports; +} + +var selectors$1 = {}; + +var constructors$1 = {}; + +var hasRequiredConstructors$1; + +function requireConstructors$1 () { + if (hasRequiredConstructors$1) return constructors$1; + hasRequiredConstructors$1 = 1; + + constructors$1.__esModule = true; + constructors$1.universal = constructors$1.tag = constructors$1.string = constructors$1.selector = constructors$1.root = constructors$1.pseudo = constructors$1.nesting = constructors$1.id = constructors$1.comment = constructors$1.combinator = constructors$1.className = constructors$1.attribute = void 0; + var _attribute = _interopRequireDefault(/*@__PURE__*/ requireAttribute$1()); + var _className = _interopRequireDefault(/*@__PURE__*/ requireClassName$1()); + var _combinator = _interopRequireDefault(/*@__PURE__*/ requireCombinator$1()); + var _comment = _interopRequireDefault(/*@__PURE__*/ requireComment$1()); + var _id = _interopRequireDefault(/*@__PURE__*/ requireId$1()); + var _nesting = _interopRequireDefault(/*@__PURE__*/ requireNesting$1()); + var _pseudo = _interopRequireDefault(/*@__PURE__*/ requirePseudo$1()); + var _root = _interopRequireDefault(/*@__PURE__*/ requireRoot$1()); + var _selector = _interopRequireDefault(/*@__PURE__*/ requireSelector$1()); + var _string = _interopRequireDefault(/*@__PURE__*/ requireString$1()); + var _tag = _interopRequireDefault(/*@__PURE__*/ requireTag$1()); + var _universal = _interopRequireDefault(/*@__PURE__*/ requireUniversal$1()); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var attribute = function attribute(opts) { + return new _attribute["default"](opts); + }; + constructors$1.attribute = attribute; + var className = function className(opts) { + return new _className["default"](opts); + }; + constructors$1.className = className; + var combinator = function combinator(opts) { + return new _combinator["default"](opts); + }; + constructors$1.combinator = combinator; + var comment = function comment(opts) { + return new _comment["default"](opts); + }; + constructors$1.comment = comment; + var id = function id(opts) { + return new _id["default"](opts); + }; + constructors$1.id = id; + var nesting = function nesting(opts) { + return new _nesting["default"](opts); + }; + constructors$1.nesting = nesting; + var pseudo = function pseudo(opts) { + return new _pseudo["default"](opts); + }; + constructors$1.pseudo = pseudo; + var root = function root(opts) { + return new _root["default"](opts); + }; + constructors$1.root = root; + var selector = function selector(opts) { + return new _selector["default"](opts); + }; + constructors$1.selector = selector; + var string = function string(opts) { + return new _string["default"](opts); + }; + constructors$1.string = string; + var tag = function tag(opts) { + return new _tag["default"](opts); + }; + constructors$1.tag = tag; + var universal = function universal(opts) { + return new _universal["default"](opts); + }; + constructors$1.universal = universal; + return constructors$1; +} + +var guards$1 = {}; + +var hasRequiredGuards$1; + +function requireGuards$1 () { + if (hasRequiredGuards$1) return guards$1; + hasRequiredGuards$1 = 1; + + guards$1.__esModule = true; + guards$1.isComment = guards$1.isCombinator = guards$1.isClassName = guards$1.isAttribute = void 0; + guards$1.isContainer = isContainer; + guards$1.isIdentifier = void 0; + guards$1.isNamespace = isNamespace; + guards$1.isNesting = void 0; + guards$1.isNode = isNode; + guards$1.isPseudo = void 0; + guards$1.isPseudoClass = isPseudoClass; + guards$1.isPseudoElement = isPseudoElement; + guards$1.isUniversal = guards$1.isTag = guards$1.isString = guards$1.isSelector = guards$1.isRoot = void 0; + var _types = /*@__PURE__*/ requireTypes$1(); + var _IS_TYPE; + var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE); + function isNode(node) { + return typeof node === "object" && IS_TYPE[node.type]; + } + function isNodeType(type, node) { + return isNode(node) && node.type === type; + } + var isAttribute = isNodeType.bind(null, _types.ATTRIBUTE); + guards$1.isAttribute = isAttribute; + var isClassName = isNodeType.bind(null, _types.CLASS); + guards$1.isClassName = isClassName; + var isCombinator = isNodeType.bind(null, _types.COMBINATOR); + guards$1.isCombinator = isCombinator; + var isComment = isNodeType.bind(null, _types.COMMENT); + guards$1.isComment = isComment; + var isIdentifier = isNodeType.bind(null, _types.ID); + guards$1.isIdentifier = isIdentifier; + var isNesting = isNodeType.bind(null, _types.NESTING); + guards$1.isNesting = isNesting; + var isPseudo = isNodeType.bind(null, _types.PSEUDO); + guards$1.isPseudo = isPseudo; + var isRoot = isNodeType.bind(null, _types.ROOT); + guards$1.isRoot = isRoot; + var isSelector = isNodeType.bind(null, _types.SELECTOR); + guards$1.isSelector = isSelector; + var isString = isNodeType.bind(null, _types.STRING); + guards$1.isString = isString; + var isTag = isNodeType.bind(null, _types.TAG); + guards$1.isTag = isTag; + var isUniversal = isNodeType.bind(null, _types.UNIVERSAL); + guards$1.isUniversal = isUniversal; + function isPseudoElement(node) { + return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line"); + } + function isPseudoClass(node) { + return isPseudo(node) && !isPseudoElement(node); + } + function isContainer(node) { + return !!(isNode(node) && node.walk); + } + function isNamespace(node) { + return isAttribute(node) || isTag(node); + } + return guards$1; +} + +var hasRequiredSelectors$1; + +function requireSelectors$1 () { + if (hasRequiredSelectors$1) return selectors$1; + hasRequiredSelectors$1 = 1; + (function (exports) { + + exports.__esModule = true; + var _types = /*@__PURE__*/ requireTypes$1(); + Object.keys(_types).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _types[key]) return; + exports[key] = _types[key]; + }); + var _constructors = /*@__PURE__*/ requireConstructors$1(); + Object.keys(_constructors).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _constructors[key]) return; + exports[key] = _constructors[key]; + }); + var _guards = /*@__PURE__*/ requireGuards$1(); + Object.keys(_guards).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _guards[key]) return; + exports[key] = _guards[key]; + }); + } (selectors$1)); + return selectors$1; +} + +var hasRequiredDist$1; + +function requireDist$1 () { + if (hasRequiredDist$1) return dist$1.exports; + hasRequiredDist$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _processor = _interopRequireDefault(/*@__PURE__*/ requireProcessor$1()); + var selectors = _interopRequireWildcard(/*@__PURE__*/ requireSelectors$1()); + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var parser = function parser(processor) { + return new _processor["default"](processor); + }; + Object.assign(parser, selectors); + delete parser.__esModule; + var _default = parser; + exports["default"] = _default; + module.exports = exports.default; + } (dist$1, dist$1.exports)); + return dist$1.exports; +} + +var distExports = /*@__PURE__*/ requireDist$1(); +var selectorParser = /*@__PURE__*/getDefaultExportFromCjs(distExports); + +const animationNameRE = /^(-\w+-)?animation-name$/; +const animationRE = /^(-\w+-)?animation$/; +const scopedPlugin = (id = "") => { + const keyframes = /* @__PURE__ */ Object.create(null); + const shortId = id.replace(/^data-v-/, ""); + return { + postcssPlugin: "vue-sfc-scoped", + Rule(rule) { + processRule(id, rule); + }, + AtRule(node) { + if (/-?keyframes$/.test(node.name) && !node.params.endsWith(`-${shortId}`)) { + keyframes[node.params] = node.params = node.params + "-" + shortId; + } + }, + OnceExit(root) { + if (Object.keys(keyframes).length) { + root.walkDecls((decl) => { + if (animationNameRE.test(decl.prop)) { + decl.value = decl.value.split(",").map((v) => keyframes[v.trim()] || v.trim()).join(","); + } + if (animationRE.test(decl.prop)) { + decl.value = decl.value.split(",").map((v) => { + const vals = v.trim().split(/\s+/); + const i = vals.findIndex((val) => keyframes[val]); + if (i !== -1) { + vals.splice(i, 1, keyframes[vals[i]]); + return vals.join(" "); + } else { + return v; + } + }).join(","); + } + }); + } + } + }; +}; +const processedRules = /* @__PURE__ */ new WeakSet(); +function processRule(id, rule) { + if (processedRules.has(rule) || rule.parent && rule.parent.type === "atrule" && /-?keyframes$/.test(rule.parent.name)) { + return; + } + processedRules.add(rule); + let deep = false; + let parent = rule.parent; + while (parent && parent.type !== "root") { + if (parent.__deep) { + deep = true; + break; + } + parent = parent.parent; + } + rule.selector = selectorParser((selectorRoot) => { + selectorRoot.each((selector) => { + rewriteSelector(id, rule, selector, selectorRoot, deep); + }); + }).processSync(rule.selector); +} +function rewriteSelector(id, rule, selector, selectorRoot, deep, slotted = false) { + let node = null; + let shouldInject = !deep; + selector.each((n) => { + if (n.type === "combinator" && (n.value === ">>>" || n.value === "/deep/")) { + n.value = " "; + n.spaces.before = n.spaces.after = ""; + warn( + `the >>> and /deep/ combinators have been deprecated. Use :deep() instead.` + ); + return false; + } + if (n.type === "pseudo") { + const { value } = n; + if (value === ":deep" || value === "::v-deep") { + rule.__deep = true; + if (n.nodes.length) { + let last = n; + n.nodes[0].each((ss) => { + selector.insertAfter(last, ss); + last = ss; + }); + const prev = selector.at(selector.index(n) - 1); + if (!prev || !isSpaceCombinator(prev)) { + selector.insertAfter( + n, + selectorParser.combinator({ + value: " " + }) + ); + } + selector.removeChild(n); + } else { + warn( + `${value} usage as a combinator has been deprecated. Use :deep(<inner-selector>) instead of ${value} <inner-selector>.` + ); + const prev = selector.at(selector.index(n) - 1); + if (prev && isSpaceCombinator(prev)) { + selector.removeChild(prev); + } + selector.removeChild(n); + } + return false; + } + if (value === ":slotted" || value === "::v-slotted") { + rewriteSelector( + id, + rule, + n.nodes[0], + selectorRoot, + deep, + true + ); + let last = n; + n.nodes[0].each((ss) => { + selector.insertAfter(last, ss); + last = ss; + }); + selector.removeChild(n); + shouldInject = false; + return false; + } + if (value === ":global" || value === "::v-global") { + selector.replaceWith(n.nodes[0]); + return false; + } + } + if (n.type === "universal") { + const prev = selector.at(selector.index(n) - 1); + const next = selector.at(selector.index(n) + 1); + if (!prev) { + if (next) { + if (next.type === "combinator" && next.value === " ") { + selector.removeChild(next); + } + selector.removeChild(n); + return; + } else { + node = selectorParser.combinator({ + value: "" + }); + selector.insertBefore(n, node); + selector.removeChild(n); + return false; + } + } + if (node) return; + } + if (n.type !== "pseudo" && n.type !== "combinator" || n.type === "pseudo" && (n.value === ":is" || n.value === ":where") && !node) { + node = n; + } + }); + if (rule.nodes.some((node2) => node2.type === "rule")) { + const deep2 = rule.__deep; + if (!deep2) { + extractAndWrapNodes(rule); + const atruleNodes = rule.nodes.filter((node2) => node2.type === "atrule"); + for (const atnode of atruleNodes) { + extractAndWrapNodes(atnode); + } + } + shouldInject = deep2; + } + if (node) { + const { type, value } = node; + if (type === "pseudo" && (value === ":is" || value === ":where")) { + node.nodes.forEach( + (value2) => rewriteSelector(id, rule, value2, selectorRoot, deep, slotted) + ); + shouldInject = false; + } + } + if (node) { + node.spaces.after = ""; + } else { + selector.first.spaces.before = ""; + } + if (shouldInject) { + const idToAdd = slotted ? id + "-s" : id; + selector.insertAfter( + // If node is null it means we need to inject [id] at the start + // insertAfter can handle `null` here + node, + selectorParser.attribute({ + attribute: idToAdd, + value: idToAdd, + raws: {}, + quoteMark: `"` + }) + ); + } +} +function isSpaceCombinator(node) { + return node.type === "combinator" && /^\s+$/.test(node.value); +} +function extractAndWrapNodes(parentNode) { + if (!parentNode.nodes) return; + const nodes = parentNode.nodes.filter( + (node) => node.type === "decl" || node.type === "comment" + ); + if (nodes.length) { + for (const node of nodes) { + parentNode.removeChild(node); + } + const wrappedRule = new require$$0$1.Rule({ + nodes, + selector: "&" + }); + parentNode.prepend(wrappedRule); + } +} +scopedPlugin.postcss = true; + +var sourceMap = {}; + +var sourceMapGenerator = {}; + +var base64Vlq = {}; + +var base64 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredBase64; + +function requireBase64 () { + if (hasRequiredBase64) return base64; + hasRequiredBase64 = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + base64.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + base64.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; + return base64; +} + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredBase64Vlq; + +function requireBase64Vlq () { + if (hasRequiredBase64Vlq) return base64Vlq; + hasRequiredBase64Vlq = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + var base64 = /*@__PURE__*/ requireBase64(); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + base64Vlq.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + base64Vlq.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + return base64Vlq; +} + +var util$1 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredUtil$1; + +function requireUtil$1 () { + if (hasRequiredUtil$1) return util$1; + hasRequiredUtil$1 = 1; + (function (exports) { + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port; + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '<dir>/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); + }()); + + function identity (s) { + return s; + } + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; + } + exports.toSetString = supportsNullProto ? identity : toSetString; + + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; + } + exports.fromSetString = supportsNullProto ? identity : fromSetString; + + function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 === null) { + return 1; // aStr2 !== null + } + + if (aStr2 === null) { + return -1; // aStr1 !== null + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + + /** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ + function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); + } + exports.parseSourceMapInput = parseSourceMapInput; + + /** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ + function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } + + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + + return normalize(sourceURL); + } + exports.computeSourceURL = computeSourceURL; + } (util$1)); + return util$1; +} + +var arraySet = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredArraySet; + +function requireArraySet () { + if (hasRequiredArraySet) return arraySet; + hasRequiredArraySet = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = /*@__PURE__*/ requireUtil$1(); + var has = Object.prototype.hasOwnProperty; + var hasNativeMap = typeof Map !== "undefined"; + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + arraySet.ArraySet = ArraySet; + return arraySet; +} + +var mappingList = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredMappingList; + +function requireMappingList () { + if (hasRequiredMappingList) return mappingList; + hasRequiredMappingList = 1; + /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = /*@__PURE__*/ requireUtil$1(); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + mappingList.MappingList = MappingList; + return mappingList; +} + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredSourceMapGenerator; + +function requireSourceMapGenerator () { + if (hasRequiredSourceMapGenerator) return sourceMapGenerator; + hasRequiredSourceMapGenerator = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var base64VLQ = /*@__PURE__*/ requireBase64Vlq(); + var util = /*@__PURE__*/ requireUtil$1(); + var ArraySet = /*@__PURE__*/ requireArraySet().ArraySet; + var MappingList = /*@__PURE__*/ requireMappingList().MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source); + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + throw new Error( + 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = ''; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + sourceMapGenerator.SourceMapGenerator = SourceMapGenerator; + return sourceMapGenerator; +} + +var sourceMapConsumer = {}; + +var binarySearch = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredBinarySearch; + +function requireBinarySearch () { + if (hasRequiredBinarySearch) return binarySearch; + hasRequiredBinarySearch = 1; + (function (exports) { + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + } (binarySearch)); + return binarySearch; +} + +var quickSort = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredQuickSort; + +function requireQuickSort () { + if (hasRequiredQuickSort) return quickSort; + hasRequiredQuickSort = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + quickSort.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + return quickSort; +} + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredSourceMapConsumer; + +function requireSourceMapConsumer () { + if (hasRequiredSourceMapConsumer) return sourceMapConsumer; + hasRequiredSourceMapConsumer = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = /*@__PURE__*/ requireUtil$1(); + var binarySearch = /*@__PURE__*/ requireBinarySearch(); + var ArraySet = /*@__PURE__*/ requireArraySet().ArraySet; + var base64VLQ = /*@__PURE__*/ requireBase64Vlq(); + var quickSort = /*@__PURE__*/ requireQuickSort().quickSort; + + function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) + : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + sourceMapConsumer.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this._absoluteSources = this._sources.toArray().map(function (s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ + BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + + // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + + return -1; + }; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function (s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._absoluteSources.slice(); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + sourceMapConsumer.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + sourceMapConsumer.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + return sourceMapConsumer; +} + +var sourceNode = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredSourceNode; + +function requireSourceNode () { + if (hasRequiredSourceNode) return sourceNode; + hasRequiredSourceNode = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var SourceMapGenerator = /*@__PURE__*/ requireSourceMapGenerator().SourceMapGenerator; + var util = /*@__PURE__*/ requireUtil$1(); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + sourceNode.SourceNode = SourceNode; + return sourceNode; +} + +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var hasRequiredSourceMap; + +function requireSourceMap () { + if (hasRequiredSourceMap) return sourceMap; + hasRequiredSourceMap = 1; + sourceMap.SourceMapGenerator = /*@__PURE__*/ requireSourceMapGenerator().SourceMapGenerator; + sourceMap.SourceMapConsumer = /*@__PURE__*/ requireSourceMapConsumer().SourceMapConsumer; + sourceMap.SourceNode = /*@__PURE__*/ requireSourceNode().SourceNode; + return sourceMap; +} + +var mergeSourceMap; +var hasRequiredMergeSourceMap; + +function requireMergeSourceMap () { + if (hasRequiredMergeSourceMap) return mergeSourceMap; + hasRequiredMergeSourceMap = 1; + var sourceMap = /*@__PURE__*/ requireSourceMap(); + var SourceMapConsumer = sourceMap.SourceMapConsumer; + var SourceMapGenerator = sourceMap.SourceMapGenerator; + + mergeSourceMap = merge; + + /** + * Merge old source map and new source map and return merged. + * If old or new source map value is falsy, return another one as it is. + * + * @param {object|string} [oldMap] old source map object + * @param {object|string} [newmap] new source map object + * @return {object|undefined} merged source map object, or undefined when both old and new source map are undefined + */ + function merge(oldMap, newMap) { + if (!oldMap) return newMap + if (!newMap) return oldMap + + var oldMapConsumer = new SourceMapConsumer(oldMap); + var newMapConsumer = new SourceMapConsumer(newMap); + var mergedMapGenerator = new SourceMapGenerator(); + + // iterate on new map and overwrite original position of new map with one of old map + newMapConsumer.eachMapping(function(m) { + // pass when `originalLine` is null. + // It occurs in case that the node does not have origin in original code. + if (m.originalLine == null) return + + var origPosInOldMap = oldMapConsumer.originalPositionFor({ + line: m.originalLine, + column: m.originalColumn + }); + + if (origPosInOldMap.source == null) return + + mergedMapGenerator.addMapping({ + original: { + line: origPosInOldMap.line, + column: origPosInOldMap.column + }, + generated: { + line: m.generatedLine, + column: m.generatedColumn + }, + source: origPosInOldMap.source, + name: origPosInOldMap.name + }); + }); + + var consumers = [oldMapConsumer, newMapConsumer]; + consumers.forEach(function(consumer) { + consumer.sources.forEach(function(sourceFile) { + mergedMapGenerator._sources.add(sourceFile); + var sourceContent = consumer.sourceContentFor(sourceFile); + if (sourceContent != null) { + mergedMapGenerator.setSourceContent(sourceFile, sourceContent); + } + }); + }); + + mergedMapGenerator._sourceRoot = oldMap.sourceRoot; + mergedMapGenerator._file = oldMap.file; + + return JSON.parse(mergedMapGenerator.toString()) + } + return mergeSourceMap; +} + +var mergeSourceMapExports = /*@__PURE__*/ requireMergeSourceMap(); +var merge = /*@__PURE__*/getDefaultExportFromCjs(mergeSourceMapExports); + +const scss = (source, map, options, load = require) => { + const nodeSass = load("sass"); + const { compileString, renderSync } = nodeSass; + const data = getSource(source, options.filename, options.additionalData); + let css; + let dependencies; + let sourceMap; + try { + if (compileString) { + const { pathToFileURL, fileURLToPath } = load("url"); + const result = compileString(data, { + ...options, + url: pathToFileURL(options.filename), + sourceMap: !!map + }); + css = result.css; + dependencies = result.loadedUrls.map((url) => fileURLToPath(url)); + sourceMap = map ? result.sourceMap : void 0; + } else { + const result = renderSync({ + ...options, + data, + file: options.filename, + outFile: options.filename, + sourceMap: !!map + }); + css = result.css.toString(); + dependencies = result.stats.includedFiles; + sourceMap = map ? JSON.parse(result.map.toString()) : void 0; + } + if (map) { + return { + code: css, + errors: [], + dependencies, + map: merge(map, sourceMap) + }; + } + return { code: css, errors: [], dependencies }; + } catch (e) { + return { code: "", errors: [e], dependencies: [] }; + } +}; +const sass = (source, map, options, load) => scss( + source, + map, + { + ...options, + indentedSyntax: true + }, + load +); +const less = (source, map, options, load = require) => { + const nodeLess = load("less"); + let result; + let error = null; + nodeLess.render( + getSource(source, options.filename, options.additionalData), + { ...options, syncImport: true }, + (err, output) => { + error = err; + result = output; + } + ); + if (error) return { code: "", errors: [error], dependencies: [] }; + const dependencies = result.imports; + if (map) { + return { + code: result.css.toString(), + map: merge(map, result.map), + errors: [], + dependencies + }; + } + return { + code: result.css.toString(), + errors: [], + dependencies + }; +}; +const styl = (source, map, options, load = require) => { + const nodeStylus = load("stylus"); + try { + const ref = nodeStylus(source, options); + if (map) ref.set("sourcemap", { inline: false, comment: false }); + const result = ref.render(); + const dependencies = ref.deps(); + if (map) { + return { + code: result, + map: merge(map, ref.sourcemap), + errors: [], + dependencies + }; + } + return { code: result, errors: [], dependencies }; + } catch (e) { + return { code: "", errors: [e], dependencies: [] }; + } +}; +function getSource(source, filename, additionalData) { + if (!additionalData) return source; + if (shared.isFunction(additionalData)) { + return additionalData(source, filename); + } + return additionalData + source; +} +const processors = { + less, + sass, + scss, + styl, + stylus: styl +}; + +var build = {exports: {}}; + +var fs = {}; + +var hasRequiredFs; + +function requireFs () { + if (hasRequiredFs) return fs; + hasRequiredFs = 1; + + Object.defineProperty(fs, "__esModule", { + value: true + }); + fs.getFileSystem = getFileSystem; + fs.setFileSystem = setFileSystem; + let fileSystem = { + readFile: () => { + throw Error("readFile not implemented"); + }, + writeFile: () => { + throw Error("writeFile not implemented"); + } + }; + + function setFileSystem(fs) { + fileSystem.readFile = fs.readFile; + fileSystem.writeFile = fs.writeFile; + } + + function getFileSystem() { + return fileSystem; + } + return fs; +} + +var pluginFactory = {}; + +var unquote = {}; + +var hasRequiredUnquote; + +function requireUnquote () { + if (hasRequiredUnquote) return unquote; + hasRequiredUnquote = 1; + + Object.defineProperty(unquote, "__esModule", { + value: true + }); + unquote.default = unquote$1; + // copied from https://github.com/lakenen/node-unquote + const reg = /['"]/; + + function unquote$1(str) { + if (!str) { + return ""; + } + + if (reg.test(str.charAt(0))) { + str = str.substr(1); + } + + if (reg.test(str.charAt(str.length - 1))) { + str = str.substr(0, str.length - 1); + } + + return str; + } + return unquote; +} + +var Parser = {}; + +var replaceValueSymbols_1; +var hasRequiredReplaceValueSymbols; + +function requireReplaceValueSymbols () { + if (hasRequiredReplaceValueSymbols) return replaceValueSymbols_1; + hasRequiredReplaceValueSymbols = 1; + const matchValueName = /[$]?[\w-]+/g; + + const replaceValueSymbols = (value, replacements) => { + let matches; + + while ((matches = matchValueName.exec(value))) { + const replacement = replacements[matches[0]]; + + if (replacement) { + value = + value.slice(0, matches.index) + + replacement + + value.slice(matchValueName.lastIndex); + + matchValueName.lastIndex -= matches[0].length - replacement.length; + } + } + + return value; + }; + + replaceValueSymbols_1 = replaceValueSymbols; + return replaceValueSymbols_1; +} + +var replaceSymbols_1; +var hasRequiredReplaceSymbols; + +function requireReplaceSymbols () { + if (hasRequiredReplaceSymbols) return replaceSymbols_1; + hasRequiredReplaceSymbols = 1; + const replaceValueSymbols = /*@__PURE__*/ requireReplaceValueSymbols(); + + const replaceSymbols = (css, replacements) => { + css.walk((node) => { + if (node.type === "decl" && node.value) { + node.value = replaceValueSymbols(node.value.toString(), replacements); + } else if (node.type === "rule" && node.selector) { + node.selector = replaceValueSymbols( + node.selector.toString(), + replacements + ); + } else if (node.type === "atrule" && node.params) { + node.params = replaceValueSymbols(node.params.toString(), replacements); + } + }); + }; + + replaceSymbols_1 = replaceSymbols; + return replaceSymbols_1; +} + +var extractICSS_1; +var hasRequiredExtractICSS; + +function requireExtractICSS () { + if (hasRequiredExtractICSS) return extractICSS_1; + hasRequiredExtractICSS = 1; + const importPattern = /^:import\(("[^"]*"|'[^']*'|[^"']+)\)$/; + const balancedQuotes = /^("[^"]*"|'[^']*'|[^"']+)$/; + + const getDeclsObject = (rule) => { + const object = {}; + + rule.walkDecls((decl) => { + const before = decl.raws.before ? decl.raws.before.trim() : ""; + + object[before + decl.prop] = decl.value; + }); + + return object; + }; + /** + * + * @param {string} css + * @param {boolean} removeRules + * @param {'auto' | 'rule' | 'at-rule'} mode + */ + const extractICSS = (css, removeRules = true, mode = "auto") => { + const icssImports = {}; + const icssExports = {}; + + function addImports(node, path) { + const unquoted = path.replace(/'|"/g, ""); + icssImports[unquoted] = Object.assign( + icssImports[unquoted] || {}, + getDeclsObject(node) + ); + + if (removeRules) { + node.remove(); + } + } + + function addExports(node) { + Object.assign(icssExports, getDeclsObject(node)); + if (removeRules) { + node.remove(); + } + } + + css.each((node) => { + if (node.type === "rule" && mode !== "at-rule") { + if (node.selector.slice(0, 7) === ":import") { + const matches = importPattern.exec(node.selector); + + if (matches) { + addImports(node, matches[1]); + } + } + + if (node.selector === ":export") { + addExports(node); + } + } + + if (node.type === "atrule" && mode !== "rule") { + if (node.name === "icss-import") { + const matches = balancedQuotes.exec(node.params); + + if (matches) { + addImports(node, matches[1]); + } + } + if (node.name === "icss-export") { + addExports(node); + } + } + }); + + return { icssImports, icssExports }; + }; + + extractICSS_1 = extractICSS; + return extractICSS_1; +} + +var createICSSRules_1; +var hasRequiredCreateICSSRules; + +function requireCreateICSSRules () { + if (hasRequiredCreateICSSRules) return createICSSRules_1; + hasRequiredCreateICSSRules = 1; + const createImports = (imports, postcss, mode = "rule") => { + return Object.keys(imports).map((path) => { + const aliases = imports[path]; + const declarations = Object.keys(aliases).map((key) => + postcss.decl({ + prop: key, + value: aliases[key], + raws: { before: "\n " }, + }) + ); + + const hasDeclarations = declarations.length > 0; + + const rule = + mode === "rule" + ? postcss.rule({ + selector: `:import('${path}')`, + raws: { after: hasDeclarations ? "\n" : "" }, + }) + : postcss.atRule({ + name: "icss-import", + params: `'${path}'`, + raws: { after: hasDeclarations ? "\n" : "" }, + }); + + if (hasDeclarations) { + rule.append(declarations); + } + + return rule; + }); + }; + + const createExports = (exports, postcss, mode = "rule") => { + const declarations = Object.keys(exports).map((key) => + postcss.decl({ + prop: key, + value: exports[key], + raws: { before: "\n " }, + }) + ); + + if (declarations.length === 0) { + return []; + } + const rule = + mode === "rule" + ? postcss.rule({ + selector: `:export`, + raws: { after: "\n" }, + }) + : postcss.atRule({ + name: "icss-export", + raws: { after: "\n" }, + }); + + rule.append(declarations); + + return [rule]; + }; + + const createICSSRules = (imports, exports, postcss, mode) => [ + ...createImports(imports, postcss, mode), + ...createExports(exports, postcss, mode), + ]; + + createICSSRules_1 = createICSSRules; + return createICSSRules_1; +} + +var src$4; +var hasRequiredSrc$4; + +function requireSrc$4 () { + if (hasRequiredSrc$4) return src$4; + hasRequiredSrc$4 = 1; + const replaceValueSymbols = /*@__PURE__*/ requireReplaceValueSymbols(); + const replaceSymbols = /*@__PURE__*/ requireReplaceSymbols(); + const extractICSS = /*@__PURE__*/ requireExtractICSS(); + const createICSSRules = /*@__PURE__*/ requireCreateICSSRules(); + + src$4 = { + replaceValueSymbols, + replaceSymbols, + extractICSS, + createICSSRules, + }; + return src$4; +} + +var hasRequiredParser$1; + +function requireParser$1 () { + if (hasRequiredParser$1) return Parser; + hasRequiredParser$1 = 1; + + Object.defineProperty(Parser, "__esModule", { + value: true + }); + Parser.default = void 0; + + var _icssUtils = /*@__PURE__*/ requireSrc$4(); + + // Initially copied from https://github.com/css-modules/css-modules-loader-core + const importRegexp = /^:import\((.+)\)$/; + + let Parser$1 = class Parser { + constructor(pathFetcher, trace) { + this.pathFetcher = pathFetcher; + this.plugin = this.plugin.bind(this); + this.exportTokens = {}; + this.translations = {}; + this.trace = trace; + } + + plugin() { + const parser = this; + return { + postcssPlugin: "css-modules-parser", + + async OnceExit(css) { + await Promise.all(parser.fetchAllImports(css)); + parser.linkImportedSymbols(css); + return parser.extractExports(css); + } + + }; + } + + fetchAllImports(css) { + let imports = []; + css.each(node => { + if (node.type == "rule" && node.selector.match(importRegexp)) { + imports.push(this.fetchImport(node, css.source.input.from, imports.length)); + } + }); + return imports; + } + + linkImportedSymbols(css) { + (0, _icssUtils.replaceSymbols)(css, this.translations); + } + + extractExports(css) { + css.each(node => { + if (node.type == "rule" && node.selector == ":export") this.handleExport(node); + }); + } + + handleExport(exportNode) { + exportNode.each(decl => { + if (decl.type == "decl") { + Object.keys(this.translations).forEach(translation => { + decl.value = decl.value.replace(translation, this.translations[translation]); + }); + this.exportTokens[decl.prop] = decl.value; + } + }); + exportNode.remove(); + } + + async fetchImport(importNode, relativeTo, depNr) { + const file = importNode.selector.match(importRegexp)[1]; + const depTrace = this.trace + String.fromCharCode(depNr); + const exports = await this.pathFetcher(file, relativeTo, depTrace); + + try { + importNode.each(decl => { + if (decl.type == "decl") { + this.translations[decl.prop] = exports[decl.value]; + } + }); + importNode.remove(); + } catch (err) { + console.log(err); + } + } + + }; + + Parser.default = Parser$1; + return Parser; +} + +var saveJSON = {}; + +var hasRequiredSaveJSON; + +function requireSaveJSON () { + if (hasRequiredSaveJSON) return saveJSON; + hasRequiredSaveJSON = 1; + + Object.defineProperty(saveJSON, "__esModule", { + value: true + }); + saveJSON.default = saveJSON$1; + + var _fs = /*@__PURE__*/ requireFs(); + + function saveJSON$1(cssFile, json) { + return new Promise((resolve, reject) => { + const { + writeFile + } = (0, _fs.getFileSystem)(); + writeFile(`${cssFile}.json`, JSON.stringify(json), e => e ? reject(e) : resolve(json)); + }); + } + return saveJSON; +} + +var localsConvention = {}; + +/** + * lodash (Custom Build) <https://lodash.com/> + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors <https://jquery.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +var lodash_camelcase; +var hasRequiredLodash_camelcase; + +function requireLodash_camelcase () { + if (hasRequiredLodash_camelcase) return lodash_camelcase; + hasRequiredLodash_camelcase = 1; + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0; + + /** `Object#toString` result references. */ + var symbolTag = '[object Symbol]'; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', + rsComboSymbolsRange = '\\u20d0-\\u20f0', + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + + /** Used to compose unicode regexes. */ + var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')', + rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')', + rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr, + rsUpper + '+' + rsOptUpperContr, + rsDigits, + rsEmoji + ].join('|'), 'g'); + + /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']'); + + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 'ss' + }; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array ? array.length : 0; + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); + + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } + + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** Built-in value references. */ + var Symbol = root.Symbol; + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); + } + + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; + } + + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); + } + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); + }); + + /** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } + + /** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } + + /** + * Converts the first character of `string` to upper case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.upperFirst('fred'); + * // => 'Fred' + * + * _.upperFirst('FRED'); + * // => 'FRED' + */ + var upperFirst = createCaseFirst('toUpperCase'); + + /** + * Splits `string` into an array of its words. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {RegExp|string} [pattern] The pattern to match words. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the words of `string`. + * @example + * + * _.words('fred, barney, & pebbles'); + * // => ['fred', 'barney', 'pebbles'] + * + * _.words('fred, barney, & pebbles', /[^, ]+/g); + * // => ['fred', 'barney', '&', 'pebbles'] + */ + function words(string, pattern, guard) { + string = toString(string); + pattern = pattern; + + if (pattern === undefined) { + return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); + } + return string.match(pattern) || []; + } + + lodash_camelcase = camelCase; + return lodash_camelcase; +} + +var hasRequiredLocalsConvention; + +function requireLocalsConvention () { + if (hasRequiredLocalsConvention) return localsConvention; + hasRequiredLocalsConvention = 1; + + Object.defineProperty(localsConvention, "__esModule", { + value: true + }); + localsConvention.makeLocalsConventionReducer = makeLocalsConventionReducer; + + var _lodash = _interopRequireDefault(/*@__PURE__*/ requireLodash_camelcase()); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function dashesCamelCase(string) { + return string.replace(/-+(\w)/g, (_, firstLetter) => firstLetter.toUpperCase()); + } + + function makeLocalsConventionReducer(localsConvention, inputFile) { + const isFunc = typeof localsConvention === "function"; + return (tokens, [className, value]) => { + if (isFunc) { + const convention = localsConvention(className, value, inputFile); + tokens[convention] = value; + return tokens; + } + + switch (localsConvention) { + case "camelCase": + tokens[className] = value; + tokens[(0, _lodash.default)(className)] = value; + break; + + case "camelCaseOnly": + tokens[(0, _lodash.default)(className)] = value; + break; + + case "dashes": + tokens[className] = value; + tokens[dashesCamelCase(className)] = value; + break; + + case "dashesOnly": + tokens[dashesCamelCase(className)] = value; + break; + } + + return tokens; + }; + } + return localsConvention; +} + +var FileSystemLoader = {}; + +var hasRequiredFileSystemLoader; + +function requireFileSystemLoader () { + if (hasRequiredFileSystemLoader) return FileSystemLoader; + hasRequiredFileSystemLoader = 1; + + Object.defineProperty(FileSystemLoader, "__esModule", { + value: true + }); + FileSystemLoader.default = void 0; + + var _postcss = _interopRequireDefault(require$$0$1); + + var _path = _interopRequireDefault(path$1); + + var _Parser = _interopRequireDefault(/*@__PURE__*/ requireParser$1()); + + var _fs = /*@__PURE__*/ requireFs(); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + // Initially copied from https://github.com/css-modules/css-modules-loader-core + class Core { + constructor(plugins) { + this.plugins = plugins || Core.defaultPlugins; + } + + async load(sourceString, sourcePath, trace, pathFetcher) { + const parser = new _Parser.default(pathFetcher, trace); + const plugins = this.plugins.concat([parser.plugin()]); + const result = await (0, _postcss.default)(plugins).process(sourceString, { + from: sourcePath + }); + return { + injectableSource: result.css, + exportTokens: parser.exportTokens + }; + } + + } // Sorts dependencies in the following way: + // AAA comes before AA and A + // AB comes after AA and before A + // All Bs come after all As + // This ensures that the files are always returned in the following order: + // - In the order they were required, except + // - After all their dependencies + + + const traceKeySorter = (a, b) => { + if (a.length < b.length) { + return a < b.substring(0, a.length) ? -1 : 1; + } + + if (a.length > b.length) { + return a.substring(0, b.length) <= b ? -1 : 1; + } + + return a < b ? -1 : 1; + }; + + let FileSystemLoader$1 = class FileSystemLoader { + constructor(root, plugins, fileResolve) { + if (root === "/" && process.platform === "win32") { + const cwdDrive = process.cwd().slice(0, 3); + + if (!/^[A-Za-z]:\\$/.test(cwdDrive)) { + throw new Error(`Failed to obtain root from "${process.cwd()}".`); + } + + root = cwdDrive; + } + + this.root = root; + this.fileResolve = fileResolve; + this.sources = {}; + this.traces = {}; + this.importNr = 0; + this.core = new Core(plugins); + this.tokensByFile = {}; + this.fs = (0, _fs.getFileSystem)(); + } + + async fetch(_newPath, relativeTo, _trace) { + const newPath = _newPath.replace(/^["']|["']$/g, ""); + + const trace = _trace || String.fromCharCode(this.importNr++); + + const useFileResolve = typeof this.fileResolve === "function"; + const fileResolvedPath = useFileResolve ? await this.fileResolve(newPath, relativeTo) : await Promise.resolve(); + + if (fileResolvedPath && !_path.default.isAbsolute(fileResolvedPath)) { + throw new Error('The returned path from the "fileResolve" option must be absolute.'); + } + + const relativeDir = _path.default.dirname(relativeTo); + + const rootRelativePath = fileResolvedPath || _path.default.resolve(relativeDir, newPath); + + let fileRelativePath = fileResolvedPath || _path.default.resolve(_path.default.resolve(this.root, relativeDir), newPath); // if the path is not relative or absolute, try to resolve it in node_modules + + + if (!useFileResolve && newPath[0] !== "." && !_path.default.isAbsolute(newPath)) { + try { + fileRelativePath = require.resolve(newPath); + } catch (e) {// noop + } + } + + const tokens = this.tokensByFile[fileRelativePath]; + if (tokens) return tokens; + return new Promise((resolve, reject) => { + this.fs.readFile(fileRelativePath, "utf-8", async (err, source) => { + if (err) reject(err); + const { + injectableSource, + exportTokens + } = await this.core.load(source, rootRelativePath, trace, this.fetch.bind(this)); + this.sources[fileRelativePath] = injectableSource; + this.traces[trace] = fileRelativePath; + this.tokensByFile[fileRelativePath] = exportTokens; + resolve(exportTokens); + }); + }); + } + + get finalSource() { + const traces = this.traces; + const sources = this.sources; + let written = new Set(); + return Object.keys(traces).sort(traceKeySorter).map(key => { + const filename = traces[key]; + + if (written.has(filename)) { + return null; + } + + written.add(filename); + return sources[filename]; + }).join(""); + } + + }; + + FileSystemLoader.default = FileSystemLoader$1; + return FileSystemLoader; +} + +var scoping = {}; + +var src$3 = {exports: {}}; + +var topologicalSort_1; +var hasRequiredTopologicalSort; + +function requireTopologicalSort () { + if (hasRequiredTopologicalSort) return topologicalSort_1; + hasRequiredTopologicalSort = 1; + const PERMANENT_MARKER = 2; + const TEMPORARY_MARKER = 1; + + function createError(node, graph) { + const er = new Error("Nondeterministic import's order"); + + const related = graph[node]; + const relatedNode = related.find( + (relatedNode) => graph[relatedNode].indexOf(node) > -1 + ); + + er.nodes = [node, relatedNode]; + + return er; + } + + function walkGraph(node, graph, state, result, strict) { + if (state[node] === PERMANENT_MARKER) { + return; + } + + if (state[node] === TEMPORARY_MARKER) { + if (strict) { + return createError(node, graph); + } + + return; + } + + state[node] = TEMPORARY_MARKER; + + const children = graph[node]; + const length = children.length; + + for (let i = 0; i < length; ++i) { + const error = walkGraph(children[i], graph, state, result, strict); + + if (error instanceof Error) { + return error; + } + } + + state[node] = PERMANENT_MARKER; + + result.push(node); + } + + function topologicalSort(graph, strict) { + const result = []; + const state = {}; + + const nodes = Object.keys(graph); + const length = nodes.length; + + for (let i = 0; i < length; ++i) { + const er = walkGraph(nodes[i], graph, state, result, strict); + + if (er instanceof Error) { + return er; + } + } + + return result; + } + + topologicalSort_1 = topologicalSort; + return topologicalSort_1; +} + +var hasRequiredSrc$3; + +function requireSrc$3 () { + if (hasRequiredSrc$3) return src$3.exports; + hasRequiredSrc$3 = 1; + const topologicalSort = /*@__PURE__*/ requireTopologicalSort(); + + const matchImports = /^(.+?)\s+from\s+(?:"([^"]+)"|'([^']+)'|(global))$/; + const icssImport = /^:import\((?:"([^"]+)"|'([^']+)')\)/; + + const VISITED_MARKER = 1; + + /** + * :import('G') {} + * + * Rule + * composes: ... from 'A' + * composes: ... from 'B' + + * Rule + * composes: ... from 'A' + * composes: ... from 'A' + * composes: ... from 'C' + * + * Results in: + * + * graph: { + * G: [], + * A: [], + * B: ['A'], + * C: ['A'], + * } + */ + function addImportToGraph(importId, parentId, graph, visited) { + const siblingsId = parentId + "_" + "siblings"; + const visitedId = parentId + "_" + importId; + + if (visited[visitedId] !== VISITED_MARKER) { + if (!Array.isArray(visited[siblingsId])) { + visited[siblingsId] = []; + } + + const siblings = visited[siblingsId]; + + if (Array.isArray(graph[importId])) { + graph[importId] = graph[importId].concat(siblings); + } else { + graph[importId] = siblings.slice(); + } + + visited[visitedId] = VISITED_MARKER; + + siblings.push(importId); + } + } + + src$3.exports = (options = {}) => { + let importIndex = 0; + const createImportedName = + typeof options.createImportedName !== "function" + ? (importName /*, path*/) => + `i__imported_${importName.replace(/\W/g, "_")}_${importIndex++}` + : options.createImportedName; + const failOnWrongOrder = options.failOnWrongOrder; + + return { + postcssPlugin: "postcss-modules-extract-imports", + prepare() { + const graph = {}; + const visited = {}; + const existingImports = {}; + const importDecls = {}; + const imports = {}; + + return { + Once(root, postcss) { + // Check the existing imports order and save refs + root.walkRules((rule) => { + const matches = icssImport.exec(rule.selector); + + if (matches) { + const [, /*match*/ doubleQuotePath, singleQuotePath] = matches; + const importPath = doubleQuotePath || singleQuotePath; + + addImportToGraph(importPath, "root", graph, visited); + + existingImports[importPath] = rule; + } + }); + + root.walkDecls(/^composes$/, (declaration) => { + const multiple = declaration.value.split(","); + const values = []; + + multiple.forEach((value) => { + const matches = value.trim().match(matchImports); + + if (!matches) { + values.push(value); + + return; + } + + let tmpSymbols; + let [ + , + /*match*/ symbols, + doubleQuotePath, + singleQuotePath, + global, + ] = matches; + + if (global) { + // Composing globals simply means changing these classes to wrap them in global(name) + tmpSymbols = symbols.split(/\s+/).map((s) => `global(${s})`); + } else { + const importPath = doubleQuotePath || singleQuotePath; + + let parent = declaration.parent; + let parentIndexes = ""; + + while (parent.type !== "root") { + parentIndexes = + parent.parent.index(parent) + "_" + parentIndexes; + parent = parent.parent; + } + + const { selector } = declaration.parent; + const parentRule = `_${parentIndexes}${selector}`; + + addImportToGraph(importPath, parentRule, graph, visited); + + importDecls[importPath] = declaration; + imports[importPath] = imports[importPath] || {}; + + tmpSymbols = symbols.split(/\s+/).map((s) => { + if (!imports[importPath][s]) { + imports[importPath][s] = createImportedName(s, importPath); + } + + return imports[importPath][s]; + }); + } + + values.push(tmpSymbols.join(" ")); + }); + + declaration.value = values.join(", "); + }); + + const importsOrder = topologicalSort(graph, failOnWrongOrder); + + if (importsOrder instanceof Error) { + const importPath = importsOrder.nodes.find((importPath) => + // eslint-disable-next-line no-prototype-builtins + importDecls.hasOwnProperty(importPath) + ); + const decl = importDecls[importPath]; + + throw decl.error( + "Failed to resolve order of composed modules " + + importsOrder.nodes + .map((importPath) => "`" + importPath + "`") + .join(", ") + + ".", + { + plugin: "postcss-modules-extract-imports", + word: "composes", + } + ); + } + + let lastImportRule; + + importsOrder.forEach((path) => { + const importedSymbols = imports[path]; + let rule = existingImports[path]; + + if (!rule && importedSymbols) { + rule = postcss.rule({ + selector: `:import("${path}")`, + raws: { after: "\n" }, + }); + + if (lastImportRule) { + root.insertAfter(lastImportRule, rule); + } else { + root.prepend(rule); + } + } + + lastImportRule = rule; + + if (!importedSymbols) { + return; + } + + Object.keys(importedSymbols).forEach((importedSymbol) => { + rule.append( + postcss.decl({ + value: importedSymbol, + prop: importedSymbols[importedSymbol], + raws: { before: "\n " }, + }) + ); + }); + }); + }, + }; + }, + }; + }; + + src$3.exports.postcss = true; + return src$3.exports; +} + +var wasmHash = {exports: {}}; + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +var hasRequiredWasmHash; + +function requireWasmHash () { + if (hasRequiredWasmHash) return wasmHash.exports; + hasRequiredWasmHash = 1; + + // 65536 is the size of a wasm memory page + // 64 is the maximum chunk size for every possible wasm hash implementation + // 4 is the maximum number of bytes per char for string encoding (max is utf-8) + // ~3 makes sure that it's always a block of 4 chars, so avoid partially encoded bytes for base64 + const MAX_SHORT_STRING = Math.floor((65536 - 64) / 4) & ~3; + + class WasmHash { + /** + * @param {WebAssembly.Instance} instance wasm instance + * @param {WebAssembly.Instance[]} instancesPool pool of instances + * @param {number} chunkSize size of data chunks passed to wasm + * @param {number} digestSize size of digest returned by wasm + */ + constructor(instance, instancesPool, chunkSize, digestSize) { + const exports = /** @type {any} */ (instance.exports); + + exports.init(); + + this.exports = exports; + this.mem = Buffer.from(exports.memory.buffer, 0, 65536); + this.buffered = 0; + this.instancesPool = instancesPool; + this.chunkSize = chunkSize; + this.digestSize = digestSize; + } + + reset() { + this.buffered = 0; + this.exports.init(); + } + + /** + * @param {Buffer | string} data data + * @param {BufferEncoding=} encoding encoding + * @returns {this} itself + */ + update(data, encoding) { + if (typeof data === "string") { + while (data.length > MAX_SHORT_STRING) { + this._updateWithShortString(data.slice(0, MAX_SHORT_STRING), encoding); + data = data.slice(MAX_SHORT_STRING); + } + + this._updateWithShortString(data, encoding); + + return this; + } + + this._updateWithBuffer(data); + + return this; + } + + /** + * @param {string} data data + * @param {BufferEncoding=} encoding encoding + * @returns {void} + */ + _updateWithShortString(data, encoding) { + const { exports, buffered, mem, chunkSize } = this; + + let endPos; + + if (data.length < 70) { + if (!encoding || encoding === "utf-8" || encoding === "utf8") { + endPos = buffered; + for (let i = 0; i < data.length; i++) { + const cc = data.charCodeAt(i); + + if (cc < 0x80) { + mem[endPos++] = cc; + } else if (cc < 0x800) { + mem[endPos] = (cc >> 6) | 0xc0; + mem[endPos + 1] = (cc & 0x3f) | 0x80; + endPos += 2; + } else { + // bail-out for weird chars + endPos += mem.write(data.slice(i), endPos, encoding); + break; + } + } + } else if (encoding === "latin1") { + endPos = buffered; + + for (let i = 0; i < data.length; i++) { + const cc = data.charCodeAt(i); + + mem[endPos++] = cc; + } + } else { + endPos = buffered + mem.write(data, buffered, encoding); + } + } else { + endPos = buffered + mem.write(data, buffered, encoding); + } + + if (endPos < chunkSize) { + this.buffered = endPos; + } else { + const l = endPos & ~(this.chunkSize - 1); + + exports.update(l); + + const newBuffered = endPos - l; + + this.buffered = newBuffered; + + if (newBuffered > 0) { + mem.copyWithin(0, l, endPos); + } + } + } + + /** + * @param {Buffer} data data + * @returns {void} + */ + _updateWithBuffer(data) { + const { exports, buffered, mem } = this; + const length = data.length; + + if (buffered + length < this.chunkSize) { + data.copy(mem, buffered, 0, length); + + this.buffered += length; + } else { + const l = (buffered + length) & ~(this.chunkSize - 1); + + if (l > 65536) { + let i = 65536 - buffered; + + data.copy(mem, buffered, 0, i); + exports.update(65536); + + const stop = l - buffered - 65536; + + while (i < stop) { + data.copy(mem, 0, i, i + 65536); + exports.update(65536); + i += 65536; + } + + data.copy(mem, 0, i, l - buffered); + + exports.update(l - buffered - i); + } else { + data.copy(mem, buffered, 0, l - buffered); + + exports.update(l); + } + + const newBuffered = length + buffered - l; + + this.buffered = newBuffered; + + if (newBuffered > 0) { + data.copy(mem, 0, length - newBuffered, length); + } + } + } + + digest(type) { + const { exports, buffered, mem, digestSize } = this; + + exports.final(buffered); + + this.instancesPool.push(this); + + const hex = mem.toString("latin1", 0, digestSize); + + if (type === "hex") { + return hex; + } + + if (type === "binary" || !type) { + return Buffer.from(hex, "hex"); + } + + return Buffer.from(hex, "hex").toString(type); + } + } + + const create = (wasmModule, instancesPool, chunkSize, digestSize) => { + if (instancesPool.length > 0) { + const old = instancesPool.pop(); + + old.reset(); + + return old; + } else { + return new WasmHash( + new WebAssembly.Instance(wasmModule), + instancesPool, + chunkSize, + digestSize + ); + } + }; + + wasmHash.exports = create; + wasmHash.exports.MAX_SHORT_STRING = MAX_SHORT_STRING; + return wasmHash.exports; +} + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +var xxhash64_1; +var hasRequiredXxhash64; + +function requireXxhash64 () { + if (hasRequiredXxhash64) return xxhash64_1; + hasRequiredXxhash64 = 1; + + const create = /*@__PURE__*/ requireWasmHash(); + + //#region wasm code: xxhash64 (../../../assembly/hash/xxhash64.asm.ts) --initialMemory 1 + const xxhash64 = new WebAssembly.Module( + Buffer.from( + // 1173 bytes + "AGFzbQEAAAABCAJgAX8AYAAAAwQDAQAABQMBAAEGGgV+AUIAC34BQgALfgFCAAt+AUIAC34BQgALByIEBGluaXQAAAZ1cGRhdGUAAQVmaW5hbAACBm1lbW9yeQIACrUIAzAAQtbrgu7q/Yn14AAkAELP1tO+0ser2UIkAUIAJAJC+erQ0OfJoeThACQDQgAkBAvUAQIBfwR+IABFBEAPCyMEIACtfCQEIwAhAiMBIQMjAiEEIwMhBQNAIAIgASkDAELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiECIAMgASkDCELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEDIAQgASkDEELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEEIAUgASkDGELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEFIAAgAUEgaiIBSw0ACyACJAAgAyQBIAQkAiAFJAMLqwYCAX8EfiMEQgBSBH4jACICQgGJIwEiA0IHiXwjAiIEQgyJfCMDIgVCEol8IAJCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0gA0LP1tO+0ser2UJ+Qh+JQoeVr6+Ytt6bnn9+hUKHla+vmLbem55/fkKdo7Xqg7GNivoAfSAEQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IAVCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0FQsXP2bLx5brqJwsjBCAArXx8IQIDQCABQQhqIABNBEAgAiABKQMAQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQhuJQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IQIgAUEIaiEBDAELCyABQQRqIABNBEACfyACIAE1AgBCh5Wvr5i23puef36FQheJQs/W077Sx6vZQn5C+fPd8Zn2masWfCECIAFBBGoLIQELA0AgACABRwRAIAIgATEAAELFz9my8eW66id+hUILiUKHla+vmLbem55/fiECIAFBAWohAQwBCwtBACACIAJCIYiFQs/W077Sx6vZQn4iAiACQh2IhUL5893xmfaZqxZ+IgIgAkIgiIUiAkIgiCIDQv//A4NCIIYgA0KAgPz/D4NCEIiEIgNC/4GAgPAfg0IQhiADQoD+g4CA4D+DQgiIhCIDQo+AvIDwgcAHg0IIhiADQvCBwIeAnoD4AINCBIiEIgNChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IANCsODAgYOGjJgwhHw3AwBBCCACQv////8PgyICQv//A4NCIIYgAkKAgPz/D4NCEIiEIgJC/4GAgPAfg0IQhiACQoD+g4CA4D+DQgiIhCICQo+AvIDwgcAHg0IIhiACQvCBwIeAnoD4AINCBIiEIgJChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IAJCsODAgYOGjJgwhHw3AwAL", + "base64" + ) + ); + //#endregion + + xxhash64_1 = create.bind(null, xxhash64, [], 32, 16); + return xxhash64_1; +} + +var BatchedHash_1; +var hasRequiredBatchedHash; + +function requireBatchedHash () { + if (hasRequiredBatchedHash) return BatchedHash_1; + hasRequiredBatchedHash = 1; + const MAX_SHORT_STRING = /*@__PURE__*/ requireWasmHash().MAX_SHORT_STRING; + + class BatchedHash { + constructor(hash) { + this.string = undefined; + this.encoding = undefined; + this.hash = hash; + } + + /** + * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding} + * @param {string|Buffer} data data + * @param {string=} inputEncoding data encoding + * @returns {this} updated hash + */ + update(data, inputEncoding) { + if (this.string !== undefined) { + if ( + typeof data === "string" && + inputEncoding === this.encoding && + this.string.length + data.length < MAX_SHORT_STRING + ) { + this.string += data; + + return this; + } + + this.hash.update(this.string, this.encoding); + this.string = undefined; + } + + if (typeof data === "string") { + if ( + data.length < MAX_SHORT_STRING && + // base64 encoding is not valid since it may contain padding chars + (!inputEncoding || !inputEncoding.startsWith("ba")) + ) { + this.string = data; + this.encoding = inputEncoding; + } else { + this.hash.update(data, inputEncoding); + } + } else { + this.hash.update(data); + } + + return this; + } + + /** + * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding} + * @param {string=} encoding encoding of the return value + * @returns {string|Buffer} digest + */ + digest(encoding) { + if (this.string !== undefined) { + this.hash.update(this.string, this.encoding); + } + + return this.hash.digest(encoding); + } + } + + BatchedHash_1 = BatchedHash; + return BatchedHash_1; +} + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +var md4_1; +var hasRequiredMd4; + +function requireMd4 () { + if (hasRequiredMd4) return md4_1; + hasRequiredMd4 = 1; + + const create = /*@__PURE__*/ requireWasmHash(); + + //#region wasm code: md4 (../../../assembly/hash/md4.asm.ts) --initialMemory 1 + const md4 = new WebAssembly.Module( + Buffer.from( + // 2150 bytes + "AGFzbQEAAAABCAJgAX8AYAAAAwUEAQAAAAUDAQABBhoFfwFBAAt/AUEAC38BQQALfwFBAAt/AUEACwciBARpbml0AAAGdXBkYXRlAAIFZmluYWwAAwZtZW1vcnkCAAqFEAQmAEGBxpS6BiQBQYnXtv5+JAJB/rnrxXkkA0H2qMmBASQEQQAkAAvMCgEYfyMBIQojAiEGIwMhByMEIQgDQCAAIAVLBEAgBSgCCCINIAcgBiAFKAIEIgsgCCAHIAUoAgAiDCAKIAggBiAHIAhzcXNqakEDdyIDIAYgB3Nxc2pqQQd3IgEgAyAGc3FzampBC3chAiAFKAIUIg8gASACIAUoAhAiCSADIAEgBSgCDCIOIAYgAyACIAEgA3Nxc2pqQRN3IgQgASACc3FzampBA3ciAyACIARzcXNqakEHdyEBIAUoAiAiEiADIAEgBSgCHCIRIAQgAyAFKAIYIhAgAiAEIAEgAyAEc3FzampBC3ciAiABIANzcXNqakETdyIEIAEgAnNxc2pqQQN3IQMgBSgCLCIVIAQgAyAFKAIoIhQgAiAEIAUoAiQiEyABIAIgAyACIARzcXNqakEHdyIBIAMgBHNxc2pqQQt3IgIgASADc3FzampBE3chBCAPIBAgCSAVIBQgEyAFKAI4IhYgAiAEIAUoAjQiFyABIAIgBSgCMCIYIAMgASAEIAEgAnNxc2pqQQN3IgEgAiAEc3FzampBB3ciAiABIARzcXNqakELdyIDIAkgAiAMIAEgBSgCPCIJIAQgASADIAEgAnNxc2pqQRN3IgEgAiADcnEgAiADcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyaiASakGZ84nUBWpBCXciAyAPIAQgCyACIBggASADIAIgBHJxIAIgBHFyampBmfOJ1AVqQQ13IgEgAyAEcnEgAyAEcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyampBmfOJ1AVqQQl3IgMgECAEIAIgFyABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmogDWpBmfOJ1AVqQQN3IgIgASADcnEgASADcXJqakGZ84nUBWpBBXciBCABIAJycSABIAJxcmpqQZnzidQFakEJdyIDIBEgBCAOIAIgFiABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmpqQZnzidQFakEDdyICIAEgA3JxIAEgA3FyampBmfOJ1AVqQQV3IgQgASACcnEgASACcXJqakGZ84nUBWpBCXciAyAMIAIgAyAJIAEgAyACIARycSACIARxcmpqQZnzidQFakENdyIBcyAEc2pqQaHX5/YGakEDdyICIAQgASACcyADc2ogEmpBodfn9gZqQQl3IgRzIAFzampBodfn9gZqQQt3IgMgAiADIBggASADIARzIAJzampBodfn9gZqQQ93IgFzIARzaiANakGh1+f2BmpBA3ciAiAUIAQgASACcyADc2pqQaHX5/YGakEJdyIEcyABc2pqQaHX5/YGakELdyIDIAsgAiADIBYgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgIgEyAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3chAyAKIA4gAiADIBcgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgJqIQogBiAJIAEgESADIAIgFSAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3ciAyAEcyACc2pqQaHX5/YGakEPd2ohBiADIAdqIQcgBCAIaiEIIAVBQGshBQwBCwsgCiQBIAYkAiAHJAMgCCQECw0AIAAQASMAIABqJAAL/wQCA38BfiMAIABqrUIDhiEEIABByABqQUBxIgJBCGshAyAAIgFBAWohACABQYABOgAAA0AgACACSUEAIABBB3EbBEAgAEEAOgAAIABBAWohAAwBCwsDQCAAIAJJBEAgAEIANwMAIABBCGohAAwBCwsgAyAENwMAIAIQAUEAIwGtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEIIwKtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEQIwOtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEYIwStIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAAs=", + "base64" + ) + ); + //#endregion + + md4_1 = create.bind(null, md4, [], 64, 32); + return md4_1; +} + +var BulkUpdateDecorator_1; +var hasRequiredBulkUpdateDecorator; + +function requireBulkUpdateDecorator () { + if (hasRequiredBulkUpdateDecorator) return BulkUpdateDecorator_1; + hasRequiredBulkUpdateDecorator = 1; + const BULK_SIZE = 2000; + + // We are using an object instead of a Map as this will stay static during the runtime + // so access to it can be optimized by v8 + const digestCaches = {}; + + class BulkUpdateDecorator { + /** + * @param {Hash | function(): Hash} hashOrFactory function to create a hash + * @param {string=} hashKey key for caching + */ + constructor(hashOrFactory, hashKey) { + this.hashKey = hashKey; + + if (typeof hashOrFactory === "function") { + this.hashFactory = hashOrFactory; + this.hash = undefined; + } else { + this.hashFactory = undefined; + this.hash = hashOrFactory; + } + + this.buffer = ""; + } + + /** + * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding} + * @param {string|Buffer} data data + * @param {string=} inputEncoding data encoding + * @returns {this} updated hash + */ + update(data, inputEncoding) { + if ( + inputEncoding !== undefined || + typeof data !== "string" || + data.length > BULK_SIZE + ) { + if (this.hash === undefined) { + this.hash = this.hashFactory(); + } + + if (this.buffer.length > 0) { + this.hash.update(this.buffer); + this.buffer = ""; + } + + this.hash.update(data, inputEncoding); + } else { + this.buffer += data; + + if (this.buffer.length > BULK_SIZE) { + if (this.hash === undefined) { + this.hash = this.hashFactory(); + } + + this.hash.update(this.buffer); + this.buffer = ""; + } + } + + return this; + } + + /** + * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding} + * @param {string=} encoding encoding of the return value + * @returns {string|Buffer} digest + */ + digest(encoding) { + let digestCache; + + const buffer = this.buffer; + + if (this.hash === undefined) { + // short data for hash, we can use caching + const cacheKey = `${this.hashKey}-${encoding}`; + + digestCache = digestCaches[cacheKey]; + + if (digestCache === undefined) { + digestCache = digestCaches[cacheKey] = new Map(); + } + + const cacheEntry = digestCache.get(buffer); + + if (cacheEntry !== undefined) { + return cacheEntry; + } + + this.hash = this.hashFactory(); + } + + if (buffer.length > 0) { + this.hash.update(buffer); + } + + const digestResult = this.hash.digest(encoding); + + if (digestCache !== undefined) { + digestCache.set(buffer, digestResult); + } + + return digestResult; + } + } + + BulkUpdateDecorator_1 = BulkUpdateDecorator; + return BulkUpdateDecorator_1; +} + +var getHashDigest_1; +var hasRequiredGetHashDigest; + +function requireGetHashDigest () { + if (hasRequiredGetHashDigest) return getHashDigest_1; + hasRequiredGetHashDigest = 1; + + const baseEncodeTables = { + 26: "abcdefghijklmnopqrstuvwxyz", + 32: "123456789abcdefghjkmnpqrstuvwxyz", // no 0lio + 36: "0123456789abcdefghijklmnopqrstuvwxyz", + 49: "abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ", // no lIO + 52: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", + 58: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ", // no 0lIO + 62: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", + 64: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_", + }; + + /** + * @param {Uint32Array} uint32Array Treated as a long base-0x100000000 number, little endian + * @param {number} divisor The divisor + * @return {number} Modulo (remainder) of the division + */ + function divmod32(uint32Array, divisor) { + let carry = 0; + for (let i = uint32Array.length - 1; i >= 0; i--) { + const value = carry * 0x100000000 + uint32Array[i]; + carry = value % divisor; + uint32Array[i] = Math.floor(value / divisor); + } + return carry; + } + + function encodeBufferToBase(buffer, base, length) { + const encodeTable = baseEncodeTables[base]; + + if (!encodeTable) { + throw new Error("Unknown encoding base" + base); + } + + // Input bits are only enough to generate this many characters + const limit = Math.ceil((buffer.length * 8) / Math.log2(base)); + length = Math.min(length, limit); + + // Most of the crypto digests (if not all) has length a multiple of 4 bytes. + // Fewer numbers in the array means faster math. + const uint32Array = new Uint32Array(Math.ceil(buffer.length / 4)); + + // Make sure the input buffer data is copied and is not mutated by reference. + // divmod32() would corrupt the BulkUpdateDecorator cache otherwise. + buffer.copy(Buffer.from(uint32Array.buffer)); + + let output = ""; + + for (let i = 0; i < length; i++) { + output = encodeTable[divmod32(uint32Array, base)] + output; + } + + return output; + } + + let crypto = undefined; + let createXXHash64 = undefined; + let createMd4 = undefined; + let BatchedHash = undefined; + let BulkUpdateDecorator = undefined; + + function getHashDigest(buffer, algorithm, digestType, maxLength) { + algorithm = algorithm || "xxhash64"; + maxLength = maxLength || 9999; + + let hash; + + if (algorithm === "xxhash64") { + if (createXXHash64 === undefined) { + createXXHash64 = /*@__PURE__*/ requireXxhash64(); + + if (BatchedHash === undefined) { + BatchedHash = /*@__PURE__*/ requireBatchedHash(); + } + } + + hash = new BatchedHash(createXXHash64()); + } else if (algorithm === "md4") { + if (createMd4 === undefined) { + createMd4 = /*@__PURE__*/ requireMd4(); + + if (BatchedHash === undefined) { + BatchedHash = /*@__PURE__*/ requireBatchedHash(); + } + } + + hash = new BatchedHash(createMd4()); + } else if (algorithm === "native-md4") { + if (typeof crypto === "undefined") { + crypto = require("crypto"); + + if (BulkUpdateDecorator === undefined) { + BulkUpdateDecorator = /*@__PURE__*/ requireBulkUpdateDecorator(); + } + } + + hash = new BulkUpdateDecorator(() => crypto.createHash("md4"), "md4"); + } else { + if (typeof crypto === "undefined") { + crypto = require("crypto"); + + if (BulkUpdateDecorator === undefined) { + BulkUpdateDecorator = /*@__PURE__*/ requireBulkUpdateDecorator(); + } + } + + hash = new BulkUpdateDecorator( + () => crypto.createHash(algorithm), + algorithm + ); + } + + hash.update(buffer); + + if ( + digestType === "base26" || + digestType === "base32" || + digestType === "base36" || + digestType === "base49" || + digestType === "base52" || + digestType === "base58" || + digestType === "base62" || + digestType === "base64safe" + ) { + return encodeBufferToBase( + hash.digest(), + digestType === "base64safe" ? 64 : digestType.substr(4), + maxLength + ); + } + + return hash.digest(digestType || "hex").substr(0, maxLength); + } + + getHashDigest_1 = getHashDigest; + return getHashDigest_1; +} + +var interpolateName_1; +var hasRequiredInterpolateName; + +function requireInterpolateName () { + if (hasRequiredInterpolateName) return interpolateName_1; + hasRequiredInterpolateName = 1; + + const path = path$1; + const getHashDigest = /*@__PURE__*/ requireGetHashDigest(); + + function interpolateName(loaderContext, name, options = {}) { + let filename; + + const hasQuery = + loaderContext.resourceQuery && loaderContext.resourceQuery.length > 1; + + if (typeof name === "function") { + filename = name( + loaderContext.resourcePath, + hasQuery ? loaderContext.resourceQuery : undefined + ); + } else { + filename = name || "[hash].[ext]"; + } + + const context = options.context; + const content = options.content; + const regExp = options.regExp; + + let ext = "bin"; + let basename = "file"; + let directory = ""; + let folder = ""; + let query = ""; + + if (loaderContext.resourcePath) { + const parsed = path.parse(loaderContext.resourcePath); + let resourcePath = loaderContext.resourcePath; + + if (parsed.ext) { + ext = parsed.ext.substr(1); + } + + if (parsed.dir) { + basename = parsed.name; + resourcePath = parsed.dir + path.sep; + } + + if (typeof context !== "undefined") { + directory = path + .relative(context, resourcePath + "_") + .replace(/\\/g, "/") + .replace(/\.\.(\/)?/g, "_$1"); + directory = directory.substr(0, directory.length - 1); + } else { + directory = resourcePath.replace(/\\/g, "/").replace(/\.\.(\/)?/g, "_$1"); + } + + if (directory.length <= 1) { + directory = ""; + } else { + // directory.length > 1 + folder = path.basename(directory); + } + } + + if (loaderContext.resourceQuery && loaderContext.resourceQuery.length > 1) { + query = loaderContext.resourceQuery; + + const hashIdx = query.indexOf("#"); + + if (hashIdx >= 0) { + query = query.substr(0, hashIdx); + } + } + + let url = filename; + + if (content) { + // Match hash template + url = url + // `hash` and `contenthash` are same in `loader-utils` context + // let's keep `hash` for backward compatibility + .replace( + /\[(?:([^[:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*(?:safe)?))?(?::(\d+))?\]/gi, + (all, hashType, digestType, maxLength) => + getHashDigest(content, hashType, digestType, parseInt(maxLength, 10)) + ); + } + + url = url + .replace(/\[ext\]/gi, () => ext) + .replace(/\[name\]/gi, () => basename) + .replace(/\[path\]/gi, () => directory) + .replace(/\[folder\]/gi, () => folder) + .replace(/\[query\]/gi, () => query); + + if (regExp && loaderContext.resourcePath) { + const match = loaderContext.resourcePath.match(new RegExp(regExp)); + + match && + match.forEach((matched, i) => { + url = url.replace(new RegExp("\\[" + i + "\\]", "ig"), matched); + }); + } + + if ( + typeof loaderContext.options === "object" && + typeof loaderContext.options.customInterpolateName === "function" + ) { + url = loaderContext.options.customInterpolateName.call( + loaderContext, + url, + name, + options + ); + } + + return url; + } + + interpolateName_1 = interpolateName; + return interpolateName_1; +} + +var genericNames; +var hasRequiredGenericNames; + +function requireGenericNames () { + if (hasRequiredGenericNames) return genericNames; + hasRequiredGenericNames = 1; + + var interpolateName = /*@__PURE__*/ requireInterpolateName(); + var path = path$1; + + /** + * @param {string} pattern + * @param {object} options + * @param {string} options.context + * @param {string} options.hashPrefix + * @return {function} + */ + genericNames = function createGenerator(pattern, options) { + options = options || {}; + var context = + options && typeof options.context === "string" + ? options.context + : process.cwd(); + var hashPrefix = + options && typeof options.hashPrefix === "string" ? options.hashPrefix : ""; + + /** + * @param {string} localName Usually a class name + * @param {string} filepath Absolute path + * @return {string} + */ + return function generate(localName, filepath) { + var name = pattern.replace(/\[local\]/gi, localName); + var loaderContext = { + resourcePath: filepath, + }; + + var loaderOptions = { + content: + hashPrefix + + path.relative(context, filepath).replace(/\\/g, "/") + + "\x00" + + localName, + context: context, + }; + + var genericName = interpolateName(loaderContext, name, loaderOptions); + return genericName + .replace(new RegExp("[^a-zA-Z0-9\\-_\u00A0-\uFFFF]", "g"), "-") + .replace(/^((-?[0-9])|--)/, "_$1"); + }; + }; + return genericNames; +} + +var src$2 = {exports: {}}; + +var dist = {exports: {}}; + +var processor = {exports: {}}; + +var parser = {exports: {}}; + +var root = {exports: {}}; + +var container = {exports: {}}; + +var node = {exports: {}}; + +var util = {}; + +var unesc = {exports: {}}; + +var hasRequiredUnesc; + +function requireUnesc () { + if (hasRequiredUnesc) return unesc.exports; + hasRequiredUnesc = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = unesc; + // Many thanks for this post which made this migration much easier. + // https://mathiasbynens.be/notes/css-escapes + + /** + * + * @param {string} str + * @returns {[string, number]|undefined} + */ + function gobbleHex(str) { + var lower = str.toLowerCase(); + var hex = ''; + var spaceTerminated = false; + for (var i = 0; i < 6 && lower[i] !== undefined; i++) { + var code = lower.charCodeAt(i); + // check to see if we are dealing with a valid hex char [a-f|0-9] + var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57; + // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point + spaceTerminated = code === 32; + if (!valid) { + break; + } + hex += lower[i]; + } + if (hex.length === 0) { + return undefined; + } + var codePoint = parseInt(hex, 16); + var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF; + // Add special case for + // "If this number is zero, or is for a surrogate, or is greater than the maximum allowed code point" + // https://drafts.csswg.org/css-syntax/#maximum-allowed-code-point + if (isSurrogate || codePoint === 0x0000 || codePoint > 0x10FFFF) { + return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)]; + } + return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)]; + } + var CONTAINS_ESCAPE = /\\/; + function unesc(str) { + var needToProcess = CONTAINS_ESCAPE.test(str); + if (!needToProcess) { + return str; + } + var ret = ""; + for (var i = 0; i < str.length; i++) { + if (str[i] === "\\") { + var gobbled = gobbleHex(str.slice(i + 1, i + 7)); + if (gobbled !== undefined) { + ret += gobbled[0]; + i += gobbled[1]; + continue; + } + + // Retain a pair of \\ if double escaped `\\\\` + // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e + if (str[i + 1] === "\\") { + ret += "\\"; + i++; + continue; + } + + // if \\ is at the end of the string retain it + // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb + if (str.length === i + 1) { + ret += str[i]; + } + continue; + } + ret += str[i]; + } + return ret; + } + module.exports = exports.default; + } (unesc, unesc.exports)); + return unesc.exports; +} + +var getProp = {exports: {}}; + +var hasRequiredGetProp; + +function requireGetProp () { + if (hasRequiredGetProp) return getProp.exports; + hasRequiredGetProp = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = getProp; + function getProp(obj) { + for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + props[_key - 1] = arguments[_key]; + } + while (props.length > 0) { + var prop = props.shift(); + if (!obj[prop]) { + return undefined; + } + obj = obj[prop]; + } + return obj; + } + module.exports = exports.default; + } (getProp, getProp.exports)); + return getProp.exports; +} + +var ensureObject = {exports: {}}; + +var hasRequiredEnsureObject; + +function requireEnsureObject () { + if (hasRequiredEnsureObject) return ensureObject.exports; + hasRequiredEnsureObject = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = ensureObject; + function ensureObject(obj) { + for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + props[_key - 1] = arguments[_key]; + } + while (props.length > 0) { + var prop = props.shift(); + if (!obj[prop]) { + obj[prop] = {}; + } + obj = obj[prop]; + } + } + module.exports = exports.default; + } (ensureObject, ensureObject.exports)); + return ensureObject.exports; +} + +var stripComments = {exports: {}}; + +var hasRequiredStripComments; + +function requireStripComments () { + if (hasRequiredStripComments) return stripComments.exports; + hasRequiredStripComments = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = stripComments; + function stripComments(str) { + var s = ""; + var commentStart = str.indexOf("/*"); + var lastEnd = 0; + while (commentStart >= 0) { + s = s + str.slice(lastEnd, commentStart); + var commentEnd = str.indexOf("*/", commentStart + 2); + if (commentEnd < 0) { + return s; + } + lastEnd = commentEnd + 2; + commentStart = str.indexOf("/*", lastEnd); + } + s = s + str.slice(lastEnd); + return s; + } + module.exports = exports.default; + } (stripComments, stripComments.exports)); + return stripComments.exports; +} + +var hasRequiredUtil; + +function requireUtil () { + if (hasRequiredUtil) return util; + hasRequiredUtil = 1; + + util.__esModule = true; + util.unesc = util.stripComments = util.getProp = util.ensureObject = void 0; + var _unesc = _interopRequireDefault(/*@__PURE__*/ requireUnesc()); + util.unesc = _unesc["default"]; + var _getProp = _interopRequireDefault(/*@__PURE__*/ requireGetProp()); + util.getProp = _getProp["default"]; + var _ensureObject = _interopRequireDefault(/*@__PURE__*/ requireEnsureObject()); + util.ensureObject = _ensureObject["default"]; + var _stripComments = _interopRequireDefault(/*@__PURE__*/ requireStripComments()); + util.stripComments = _stripComments["default"]; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + return util; +} + +var hasRequiredNode; + +function requireNode () { + if (hasRequiredNode) return node.exports; + hasRequiredNode = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _util = /*@__PURE__*/ requireUtil(); + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + var cloneNode = function cloneNode(obj, parent) { + if (typeof obj !== 'object' || obj === null) { + return obj; + } + var cloned = new obj.constructor(); + for (var i in obj) { + if (!obj.hasOwnProperty(i)) { + continue; + } + var value = obj[i]; + var type = typeof value; + if (i === 'parent' && type === 'object') { + if (parent) { + cloned[i] = parent; + } + } else if (value instanceof Array) { + cloned[i] = value.map(function (j) { + return cloneNode(j, cloned); + }); + } else { + cloned[i] = cloneNode(value, cloned); + } + } + return cloned; + }; + var Node = /*#__PURE__*/function () { + function Node(opts) { + if (opts === void 0) { + opts = {}; + } + Object.assign(this, opts); + this.spaces = this.spaces || {}; + this.spaces.before = this.spaces.before || ''; + this.spaces.after = this.spaces.after || ''; + } + var _proto = Node.prototype; + _proto.remove = function remove() { + if (this.parent) { + this.parent.removeChild(this); + } + this.parent = undefined; + return this; + }; + _proto.replaceWith = function replaceWith() { + if (this.parent) { + for (var index in arguments) { + this.parent.insertBefore(this, arguments[index]); + } + this.remove(); + } + return this; + }; + _proto.next = function next() { + return this.parent.at(this.parent.index(this) + 1); + }; + _proto.prev = function prev() { + return this.parent.at(this.parent.index(this) - 1); + }; + _proto.clone = function clone(overrides) { + if (overrides === void 0) { + overrides = {}; + } + var cloned = cloneNode(this); + for (var name in overrides) { + cloned[name] = overrides[name]; + } + return cloned; + } + + /** + * Some non-standard syntax doesn't follow normal escaping rules for css. + * This allows non standard syntax to be appended to an existing property + * by specifying the escaped value. By specifying the escaped value, + * illegal characters are allowed to be directly inserted into css output. + * @param {string} name the property to set + * @param {any} value the unescaped value of the property + * @param {string} valueEscaped optional. the escaped value of the property. + */; + _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) { + if (!this.raws) { + this.raws = {}; + } + var originalValue = this[name]; + var originalEscaped = this.raws[name]; + this[name] = originalValue + value; // this may trigger a setter that updates raws, so it has to be set first. + if (originalEscaped || valueEscaped !== value) { + this.raws[name] = (originalEscaped || originalValue) + valueEscaped; + } else { + delete this.raws[name]; // delete any escaped value that was created by the setter. + } + } + + /** + * Some non-standard syntax doesn't follow normal escaping rules for css. + * This allows the escaped value to be specified directly, allowing illegal + * characters to be directly inserted into css output. + * @param {string} name the property to set + * @param {any} value the unescaped value of the property + * @param {string} valueEscaped the escaped value of the property. + */; + _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) { + if (!this.raws) { + this.raws = {}; + } + this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. + this.raws[name] = valueEscaped; + } + + /** + * When you want a value to passed through to CSS directly. This method + * deletes the corresponding raw value causing the stringifier to fallback + * to the unescaped value. + * @param {string} name the property to set. + * @param {any} value The value that is both escaped and unescaped. + */; + _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) { + this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. + if (this.raws) { + delete this.raws[name]; + } + } + + /** + * + * @param {number} line The number (starting with 1) + * @param {number} column The column number (starting with 1) + */; + _proto.isAtPosition = function isAtPosition(line, column) { + if (this.source && this.source.start && this.source.end) { + if (this.source.start.line > line) { + return false; + } + if (this.source.end.line < line) { + return false; + } + if (this.source.start.line === line && this.source.start.column > column) { + return false; + } + if (this.source.end.line === line && this.source.end.column < column) { + return false; + } + return true; + } + return undefined; + }; + _proto.stringifyProperty = function stringifyProperty(name) { + return this.raws && this.raws[name] || this[name]; + }; + _proto.valueToString = function valueToString() { + return String(this.stringifyProperty("value")); + }; + _proto.toString = function toString() { + return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join(''); + }; + _createClass(Node, [{ + key: "rawSpaceBefore", + get: function get() { + var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before; + if (rawSpace === undefined) { + rawSpace = this.spaces && this.spaces.before; + } + return rawSpace || ""; + }, + set: function set(raw) { + (0, _util.ensureObject)(this, "raws", "spaces"); + this.raws.spaces.before = raw; + } + }, { + key: "rawSpaceAfter", + get: function get() { + var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after; + if (rawSpace === undefined) { + rawSpace = this.spaces.after; + } + return rawSpace || ""; + }, + set: function set(raw) { + (0, _util.ensureObject)(this, "raws", "spaces"); + this.raws.spaces.after = raw; + } + }]); + return Node; + }(); + exports["default"] = Node; + module.exports = exports.default; + } (node, node.exports)); + return node.exports; +} + +var types$1 = {}; + +var hasRequiredTypes; + +function requireTypes () { + if (hasRequiredTypes) return types$1; + hasRequiredTypes = 1; + + types$1.__esModule = true; + types$1.UNIVERSAL = types$1.TAG = types$1.STRING = types$1.SELECTOR = types$1.ROOT = types$1.PSEUDO = types$1.NESTING = types$1.ID = types$1.COMMENT = types$1.COMBINATOR = types$1.CLASS = types$1.ATTRIBUTE = void 0; + var TAG = 'tag'; + types$1.TAG = TAG; + var STRING = 'string'; + types$1.STRING = STRING; + var SELECTOR = 'selector'; + types$1.SELECTOR = SELECTOR; + var ROOT = 'root'; + types$1.ROOT = ROOT; + var PSEUDO = 'pseudo'; + types$1.PSEUDO = PSEUDO; + var NESTING = 'nesting'; + types$1.NESTING = NESTING; + var ID = 'id'; + types$1.ID = ID; + var COMMENT = 'comment'; + types$1.COMMENT = COMMENT; + var COMBINATOR = 'combinator'; + types$1.COMBINATOR = COMBINATOR; + var CLASS = 'class'; + types$1.CLASS = CLASS; + var ATTRIBUTE = 'attribute'; + types$1.ATTRIBUTE = ATTRIBUTE; + var UNIVERSAL = 'universal'; + types$1.UNIVERSAL = UNIVERSAL; + return types$1; +} + +var hasRequiredContainer; + +function requireContainer () { + if (hasRequiredContainer) return container.exports; + hasRequiredContainer = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode()); + var types = _interopRequireWildcard(/*@__PURE__*/ requireTypes()); + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike) { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } 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 _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Container = /*#__PURE__*/function (_Node) { + _inheritsLoose(Container, _Node); + function Container(opts) { + var _this; + _this = _Node.call(this, opts) || this; + if (!_this.nodes) { + _this.nodes = []; + } + return _this; + } + var _proto = Container.prototype; + _proto.append = function append(selector) { + selector.parent = this; + this.nodes.push(selector); + return this; + }; + _proto.prepend = function prepend(selector) { + selector.parent = this; + this.nodes.unshift(selector); + return this; + }; + _proto.at = function at(index) { + return this.nodes[index]; + }; + _proto.index = function index(child) { + if (typeof child === 'number') { + return child; + } + return this.nodes.indexOf(child); + }; + _proto.removeChild = function removeChild(child) { + child = this.index(child); + this.at(child).parent = undefined; + this.nodes.splice(child, 1); + var index; + for (var id in this.indexes) { + index = this.indexes[id]; + if (index >= child) { + this.indexes[id] = index - 1; + } + } + return this; + }; + _proto.removeAll = function removeAll() { + for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) { + var node = _step.value; + node.parent = undefined; + } + this.nodes = []; + return this; + }; + _proto.empty = function empty() { + return this.removeAll(); + }; + _proto.insertAfter = function insertAfter(oldNode, newNode) { + newNode.parent = this; + var oldIndex = this.index(oldNode); + this.nodes.splice(oldIndex + 1, 0, newNode); + newNode.parent = this; + var index; + for (var id in this.indexes) { + index = this.indexes[id]; + if (oldIndex <= index) { + this.indexes[id] = index + 1; + } + } + return this; + }; + _proto.insertBefore = function insertBefore(oldNode, newNode) { + newNode.parent = this; + var oldIndex = this.index(oldNode); + this.nodes.splice(oldIndex, 0, newNode); + newNode.parent = this; + var index; + for (var id in this.indexes) { + index = this.indexes[id]; + if (index <= oldIndex) { + this.indexes[id] = index + 1; + } + } + return this; + }; + _proto._findChildAtPosition = function _findChildAtPosition(line, col) { + var found = undefined; + this.each(function (node) { + if (node.atPosition) { + var foundChild = node.atPosition(line, col); + if (foundChild) { + found = foundChild; + return false; + } + } else if (node.isAtPosition(line, col)) { + found = node; + return false; + } + }); + return found; + } + + /** + * Return the most specific node at the line and column number given. + * The source location is based on the original parsed location, locations aren't + * updated as selector nodes are mutated. + * + * Note that this location is relative to the location of the first character + * of the selector, and not the location of the selector in the overall document + * when used in conjunction with postcss. + * + * If not found, returns undefined. + * @param {number} line The line number of the node to find. (1-based index) + * @param {number} col The column number of the node to find. (1-based index) + */; + _proto.atPosition = function atPosition(line, col) { + if (this.isAtPosition(line, col)) { + return this._findChildAtPosition(line, col) || this; + } else { + return undefined; + } + }; + _proto._inferEndPosition = function _inferEndPosition() { + if (this.last && this.last.source && this.last.source.end) { + this.source = this.source || {}; + this.source.end = this.source.end || {}; + Object.assign(this.source.end, this.last.source.end); + } + }; + _proto.each = function each(callback) { + if (!this.lastEach) { + this.lastEach = 0; + } + if (!this.indexes) { + this.indexes = {}; + } + this.lastEach++; + var id = this.lastEach; + this.indexes[id] = 0; + if (!this.length) { + return undefined; + } + var index, result; + while (this.indexes[id] < this.length) { + index = this.indexes[id]; + result = callback(this.at(index), index); + if (result === false) { + break; + } + this.indexes[id] += 1; + } + delete this.indexes[id]; + if (result === false) { + return false; + } + }; + _proto.walk = function walk(callback) { + return this.each(function (node, i) { + var result = callback(node, i); + if (result !== false && node.length) { + result = node.walk(callback); + } + if (result === false) { + return false; + } + }); + }; + _proto.walkAttributes = function walkAttributes(callback) { + var _this2 = this; + return this.walk(function (selector) { + if (selector.type === types.ATTRIBUTE) { + return callback.call(_this2, selector); + } + }); + }; + _proto.walkClasses = function walkClasses(callback) { + var _this3 = this; + return this.walk(function (selector) { + if (selector.type === types.CLASS) { + return callback.call(_this3, selector); + } + }); + }; + _proto.walkCombinators = function walkCombinators(callback) { + var _this4 = this; + return this.walk(function (selector) { + if (selector.type === types.COMBINATOR) { + return callback.call(_this4, selector); + } + }); + }; + _proto.walkComments = function walkComments(callback) { + var _this5 = this; + return this.walk(function (selector) { + if (selector.type === types.COMMENT) { + return callback.call(_this5, selector); + } + }); + }; + _proto.walkIds = function walkIds(callback) { + var _this6 = this; + return this.walk(function (selector) { + if (selector.type === types.ID) { + return callback.call(_this6, selector); + } + }); + }; + _proto.walkNesting = function walkNesting(callback) { + var _this7 = this; + return this.walk(function (selector) { + if (selector.type === types.NESTING) { + return callback.call(_this7, selector); + } + }); + }; + _proto.walkPseudos = function walkPseudos(callback) { + var _this8 = this; + return this.walk(function (selector) { + if (selector.type === types.PSEUDO) { + return callback.call(_this8, selector); + } + }); + }; + _proto.walkTags = function walkTags(callback) { + var _this9 = this; + return this.walk(function (selector) { + if (selector.type === types.TAG) { + return callback.call(_this9, selector); + } + }); + }; + _proto.walkUniversals = function walkUniversals(callback) { + var _this10 = this; + return this.walk(function (selector) { + if (selector.type === types.UNIVERSAL) { + return callback.call(_this10, selector); + } + }); + }; + _proto.split = function split(callback) { + var _this11 = this; + var current = []; + return this.reduce(function (memo, node, index) { + var split = callback.call(_this11, node); + current.push(node); + if (split) { + memo.push(current); + current = []; + } else if (index === _this11.length - 1) { + memo.push(current); + } + return memo; + }, []); + }; + _proto.map = function map(callback) { + return this.nodes.map(callback); + }; + _proto.reduce = function reduce(callback, memo) { + return this.nodes.reduce(callback, memo); + }; + _proto.every = function every(callback) { + return this.nodes.every(callback); + }; + _proto.some = function some(callback) { + return this.nodes.some(callback); + }; + _proto.filter = function filter(callback) { + return this.nodes.filter(callback); + }; + _proto.sort = function sort(callback) { + return this.nodes.sort(callback); + }; + _proto.toString = function toString() { + return this.map(String).join(''); + }; + _createClass(Container, [{ + key: "first", + get: function get() { + return this.at(0); + } + }, { + key: "last", + get: function get() { + return this.at(this.length - 1); + } + }, { + key: "length", + get: function get() { + return this.nodes.length; + } + }]); + return Container; + }(_node["default"]); + exports["default"] = Container; + module.exports = exports.default; + } (container, container.exports)); + return container.exports; +} + +var hasRequiredRoot; + +function requireRoot () { + if (hasRequiredRoot) return root.exports; + hasRequiredRoot = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Root = /*#__PURE__*/function (_Container) { + _inheritsLoose(Root, _Container); + function Root(opts) { + var _this; + _this = _Container.call(this, opts) || this; + _this.type = _types.ROOT; + return _this; + } + var _proto = Root.prototype; + _proto.toString = function toString() { + var str = this.reduce(function (memo, selector) { + memo.push(String(selector)); + return memo; + }, []).join(','); + return this.trailingComma ? str + ',' : str; + }; + _proto.error = function error(message, options) { + if (this._error) { + return this._error(message, options); + } else { + return new Error(message); + } + }; + _createClass(Root, [{ + key: "errorGenerator", + set: function set(handler) { + this._error = handler; + } + }]); + return Root; + }(_container["default"]); + exports["default"] = Root; + module.exports = exports.default; + } (root, root.exports)); + return root.exports; +} + +var selector = {exports: {}}; + +var hasRequiredSelector; + +function requireSelector () { + if (hasRequiredSelector) return selector.exports; + hasRequiredSelector = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Selector = /*#__PURE__*/function (_Container) { + _inheritsLoose(Selector, _Container); + function Selector(opts) { + var _this; + _this = _Container.call(this, opts) || this; + _this.type = _types.SELECTOR; + return _this; + } + return Selector; + }(_container["default"]); + exports["default"] = Selector; + module.exports = exports.default; + } (selector, selector.exports)); + return selector.exports; +} + +var className = {exports: {}}; + +var hasRequiredClassName; + +function requireClassName () { + if (hasRequiredClassName) return className.exports; + hasRequiredClassName = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc()); + var _util = /*@__PURE__*/ requireUtil(); + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var ClassName = /*#__PURE__*/function (_Node) { + _inheritsLoose(ClassName, _Node); + function ClassName(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.CLASS; + _this._constructed = true; + return _this; + } + var _proto = ClassName.prototype; + _proto.valueToString = function valueToString() { + return '.' + _Node.prototype.valueToString.call(this); + }; + _createClass(ClassName, [{ + key: "value", + get: function get() { + return this._value; + }, + set: function set(v) { + if (this._constructed) { + var escaped = (0, _cssesc["default"])(v, { + isIdentifier: true + }); + if (escaped !== v) { + (0, _util.ensureObject)(this, "raws"); + this.raws.value = escaped; + } else if (this.raws) { + delete this.raws.value; + } + } + this._value = v; + } + }]); + return ClassName; + }(_node["default"]); + exports["default"] = ClassName; + module.exports = exports.default; + } (className, className.exports)); + return className.exports; +} + +var comment = {exports: {}}; + +var hasRequiredComment; + +function requireComment () { + if (hasRequiredComment) return comment.exports; + hasRequiredComment = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Comment = /*#__PURE__*/function (_Node) { + _inheritsLoose(Comment, _Node); + function Comment(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.COMMENT; + return _this; + } + return Comment; + }(_node["default"]); + exports["default"] = Comment; + module.exports = exports.default; + } (comment, comment.exports)); + return comment.exports; +} + +var id = {exports: {}}; + +var hasRequiredId; + +function requireId () { + if (hasRequiredId) return id.exports; + hasRequiredId = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var ID = /*#__PURE__*/function (_Node) { + _inheritsLoose(ID, _Node); + function ID(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.ID; + return _this; + } + var _proto = ID.prototype; + _proto.valueToString = function valueToString() { + return '#' + _Node.prototype.valueToString.call(this); + }; + return ID; + }(_node["default"]); + exports["default"] = ID; + module.exports = exports.default; + } (id, id.exports)); + return id.exports; +} + +var tag = {exports: {}}; + +var namespace = {exports: {}}; + +var hasRequiredNamespace; + +function requireNamespace () { + if (hasRequiredNamespace) return namespace.exports; + hasRequiredNamespace = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc()); + var _util = /*@__PURE__*/ requireUtil(); + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode()); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Namespace = /*#__PURE__*/function (_Node) { + _inheritsLoose(Namespace, _Node); + function Namespace() { + return _Node.apply(this, arguments) || this; + } + var _proto = Namespace.prototype; + _proto.qualifiedName = function qualifiedName(value) { + if (this.namespace) { + return this.namespaceString + "|" + value; + } else { + return value; + } + }; + _proto.valueToString = function valueToString() { + return this.qualifiedName(_Node.prototype.valueToString.call(this)); + }; + _createClass(Namespace, [{ + key: "namespace", + get: function get() { + return this._namespace; + }, + set: function set(namespace) { + if (namespace === true || namespace === "*" || namespace === "&") { + this._namespace = namespace; + if (this.raws) { + delete this.raws.namespace; + } + return; + } + var escaped = (0, _cssesc["default"])(namespace, { + isIdentifier: true + }); + this._namespace = namespace; + if (escaped !== namespace) { + (0, _util.ensureObject)(this, "raws"); + this.raws.namespace = escaped; + } else if (this.raws) { + delete this.raws.namespace; + } + } + }, { + key: "ns", + get: function get() { + return this._namespace; + }, + set: function set(namespace) { + this.namespace = namespace; + } + }, { + key: "namespaceString", + get: function get() { + if (this.namespace) { + var ns = this.stringifyProperty("namespace"); + if (ns === true) { + return ''; + } else { + return ns; + } + } else { + return ''; + } + } + }]); + return Namespace; + }(_node["default"]); + exports["default"] = Namespace; + module.exports = exports.default; + } (namespace, namespace.exports)); + return namespace.exports; +} + +var hasRequiredTag; + +function requireTag () { + if (hasRequiredTag) return tag.exports; + hasRequiredTag = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Tag = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Tag, _Namespace); + function Tag(opts) { + var _this; + _this = _Namespace.call(this, opts) || this; + _this.type = _types.TAG; + return _this; + } + return Tag; + }(_namespace["default"]); + exports["default"] = Tag; + module.exports = exports.default; + } (tag, tag.exports)); + return tag.exports; +} + +var string = {exports: {}}; + +var hasRequiredString; + +function requireString () { + if (hasRequiredString) return string.exports; + hasRequiredString = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var String = /*#__PURE__*/function (_Node) { + _inheritsLoose(String, _Node); + function String(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.STRING; + return _this; + } + return String; + }(_node["default"]); + exports["default"] = String; + module.exports = exports.default; + } (string, string.exports)); + return string.exports; +} + +var pseudo = {exports: {}}; + +var hasRequiredPseudo; + +function requirePseudo () { + if (hasRequiredPseudo) return pseudo.exports; + hasRequiredPseudo = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Pseudo = /*#__PURE__*/function (_Container) { + _inheritsLoose(Pseudo, _Container); + function Pseudo(opts) { + var _this; + _this = _Container.call(this, opts) || this; + _this.type = _types.PSEUDO; + return _this; + } + var _proto = Pseudo.prototype; + _proto.toString = function toString() { + var params = this.length ? '(' + this.map(String).join(',') + ')' : ''; + return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join(''); + }; + return Pseudo; + }(_container["default"]); + exports["default"] = Pseudo; + module.exports = exports.default; + } (pseudo, pseudo.exports)); + return pseudo.exports; +} + +var attribute = {}; + +var hasRequiredAttribute; + +function requireAttribute () { + if (hasRequiredAttribute) return attribute; + hasRequiredAttribute = 1; + (function (exports) { + + exports.__esModule = true; + exports["default"] = void 0; + exports.unescapeValue = unescapeValue; + var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc()); + var _unesc = _interopRequireDefault(/*@__PURE__*/ requireUnesc()); + var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace()); + var _types = /*@__PURE__*/ requireTypes(); + var _CSSESC_QUOTE_OPTIONS; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var deprecate = /*@__PURE__*/ requireNode$1(); + var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/; + var warnOfDeprecatedValueAssignment = deprecate(function () {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. " + "Call attribute.setValue() instead."); + var warnOfDeprecatedQuotedAssignment = deprecate(function () {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."); + var warnOfDeprecatedConstructor = deprecate(function () {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now."); + function unescapeValue(value) { + var deprecatedUsage = false; + var quoteMark = null; + var unescaped = value; + var m = unescaped.match(WRAPPED_IN_QUOTES); + if (m) { + quoteMark = m[1]; + unescaped = m[2]; + } + unescaped = (0, _unesc["default"])(unescaped); + if (unescaped !== value) { + deprecatedUsage = true; + } + return { + deprecatedUsage: deprecatedUsage, + unescaped: unescaped, + quoteMark: quoteMark + }; + } + function handleDeprecatedContructorOpts(opts) { + if (opts.quoteMark !== undefined) { + return opts; + } + if (opts.value === undefined) { + return opts; + } + warnOfDeprecatedConstructor(); + var _unescapeValue = unescapeValue(opts.value), + quoteMark = _unescapeValue.quoteMark, + unescaped = _unescapeValue.unescaped; + if (!opts.raws) { + opts.raws = {}; + } + if (opts.raws.value === undefined) { + opts.raws.value = opts.value; + } + opts.value = unescaped; + opts.quoteMark = quoteMark; + return opts; + } + var Attribute = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Attribute, _Namespace); + function Attribute(opts) { + var _this; + if (opts === void 0) { + opts = {}; + } + _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this; + _this.type = _types.ATTRIBUTE; + _this.raws = _this.raws || {}; + Object.defineProperty(_this.raws, 'unquoted', { + get: deprecate(function () { + return _this.value; + }, "attr.raws.unquoted is deprecated. Call attr.value instead."), + set: deprecate(function () { + return _this.value; + }, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.") + }); + _this._constructed = true; + return _this; + } + + /** + * Returns the Attribute's value quoted such that it would be legal to use + * in the value of a css file. The original value's quotation setting + * used for stringification is left unchanged. See `setValue(value, options)` + * if you want to control the quote settings of a new value for the attribute. + * + * You can also change the quotation used for the current value by setting quoteMark. + * + * Options: + * * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this + * option is not set, the original value for quoteMark will be used. If + * indeterminate, a double quote is used. The legal values are: + * * `null` - the value will be unquoted and characters will be escaped as necessary. + * * `'` - the value will be quoted with a single quote and single quotes are escaped. + * * `"` - the value will be quoted with a double quote and double quotes are escaped. + * * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark + * over the quoteMark option value. + * * smart {boolean} - if true, will select a quote mark based on the value + * and the other options specified here. See the `smartQuoteMark()` + * method. + **/ + var _proto = Attribute.prototype; + _proto.getQuotedValue = function getQuotedValue(options) { + if (options === void 0) { + options = {}; + } + var quoteMark = this._determineQuoteMark(options); + var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark]; + var escaped = (0, _cssesc["default"])(this._value, cssescopts); + return escaped; + }; + _proto._determineQuoteMark = function _determineQuoteMark(options) { + return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options); + } + + /** + * Set the unescaped value with the specified quotation options. The value + * provided must not include any wrapping quote marks -- those quotes will + * be interpreted as part of the value and escaped accordingly. + */; + _proto.setValue = function setValue(value, options) { + if (options === void 0) { + options = {}; + } + this._value = value; + this._quoteMark = this._determineQuoteMark(options); + this._syncRawValue(); + } + + /** + * Intelligently select a quoteMark value based on the value's contents. If + * the value is a legal CSS ident, it will not be quoted. Otherwise a quote + * mark will be picked that minimizes the number of escapes. + * + * If there's no clear winner, the quote mark from these options is used, + * then the source quote mark (this is inverted if `preferCurrentQuoteMark` is + * true). If the quoteMark is unspecified, a double quote is used. + * + * @param options This takes the quoteMark and preferCurrentQuoteMark options + * from the quoteValue method. + */; + _proto.smartQuoteMark = function smartQuoteMark(options) { + var v = this.value; + var numSingleQuotes = v.replace(/[^']/g, '').length; + var numDoubleQuotes = v.replace(/[^"]/g, '').length; + if (numSingleQuotes + numDoubleQuotes === 0) { + var escaped = (0, _cssesc["default"])(v, { + isIdentifier: true + }); + if (escaped === v) { + return Attribute.NO_QUOTE; + } else { + var pref = this.preferredQuoteMark(options); + if (pref === Attribute.NO_QUOTE) { + // pick a quote mark that isn't none and see if it's smaller + var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE; + var opts = CSSESC_QUOTE_OPTIONS[quote]; + var quoteValue = (0, _cssesc["default"])(v, opts); + if (quoteValue.length < escaped.length) { + return quote; + } + } + return pref; + } + } else if (numDoubleQuotes === numSingleQuotes) { + return this.preferredQuoteMark(options); + } else if (numDoubleQuotes < numSingleQuotes) { + return Attribute.DOUBLE_QUOTE; + } else { + return Attribute.SINGLE_QUOTE; + } + } + + /** + * Selects the preferred quote mark based on the options and the current quote mark value. + * If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)` + * instead. + */; + _proto.preferredQuoteMark = function preferredQuoteMark(options) { + var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark; + if (quoteMark === undefined) { + quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark; + } + if (quoteMark === undefined) { + quoteMark = Attribute.DOUBLE_QUOTE; + } + return quoteMark; + }; + _proto._syncRawValue = function _syncRawValue() { + var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]); + if (rawValue === this._value) { + if (this.raws) { + delete this.raws.value; + } + } else { + this.raws.value = rawValue; + } + }; + _proto._handleEscapes = function _handleEscapes(prop, value) { + if (this._constructed) { + var escaped = (0, _cssesc["default"])(value, { + isIdentifier: true + }); + if (escaped !== value) { + this.raws[prop] = escaped; + } else { + delete this.raws[prop]; + } + } + }; + _proto._spacesFor = function _spacesFor(name) { + var attrSpaces = { + before: '', + after: '' + }; + var spaces = this.spaces[name] || {}; + var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {}; + return Object.assign(attrSpaces, spaces, rawSpaces); + }; + _proto._stringFor = function _stringFor(name, spaceName, concat) { + if (spaceName === void 0) { + spaceName = name; + } + if (concat === void 0) { + concat = defaultAttrConcat; + } + var attrSpaces = this._spacesFor(spaceName); + return concat(this.stringifyProperty(name), attrSpaces); + } + + /** + * returns the offset of the attribute part specified relative to the + * start of the node of the output string. + * + * * "ns" - alias for "namespace" + * * "namespace" - the namespace if it exists. + * * "attribute" - the attribute name + * * "attributeNS" - the start of the attribute or its namespace + * * "operator" - the match operator of the attribute + * * "value" - The value (string or identifier) + * * "insensitive" - the case insensitivity flag; + * @param part One of the possible values inside an attribute. + * @returns -1 if the name is invalid or the value doesn't exist in this attribute. + */; + _proto.offsetOf = function offsetOf(name) { + var count = 1; + var attributeSpaces = this._spacesFor("attribute"); + count += attributeSpaces.before.length; + if (name === "namespace" || name === "ns") { + return this.namespace ? count : -1; + } + if (name === "attributeNS") { + return count; + } + count += this.namespaceString.length; + if (this.namespace) { + count += 1; + } + if (name === "attribute") { + return count; + } + count += this.stringifyProperty("attribute").length; + count += attributeSpaces.after.length; + var operatorSpaces = this._spacesFor("operator"); + count += operatorSpaces.before.length; + var operator = this.stringifyProperty("operator"); + if (name === "operator") { + return operator ? count : -1; + } + count += operator.length; + count += operatorSpaces.after.length; + var valueSpaces = this._spacesFor("value"); + count += valueSpaces.before.length; + var value = this.stringifyProperty("value"); + if (name === "value") { + return value ? count : -1; + } + count += value.length; + count += valueSpaces.after.length; + var insensitiveSpaces = this._spacesFor("insensitive"); + count += insensitiveSpaces.before.length; + if (name === "insensitive") { + return this.insensitive ? count : -1; + } + return -1; + }; + _proto.toString = function toString() { + var _this2 = this; + var selector = [this.rawSpaceBefore, '[']; + selector.push(this._stringFor('qualifiedAttribute', 'attribute')); + if (this.operator && (this.value || this.value === '')) { + selector.push(this._stringFor('operator')); + selector.push(this._stringFor('value')); + selector.push(this._stringFor('insensitiveFlag', 'insensitive', function (attrValue, attrSpaces) { + if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) { + attrSpaces.before = " "; + } + return defaultAttrConcat(attrValue, attrSpaces); + })); + } + selector.push(']'); + selector.push(this.rawSpaceAfter); + return selector.join(''); + }; + _createClass(Attribute, [{ + key: "quoted", + get: function get() { + var qm = this.quoteMark; + return qm === "'" || qm === '"'; + }, + set: function set(value) { + warnOfDeprecatedQuotedAssignment(); + } + + /** + * returns a single (`'`) or double (`"`) quote character if the value is quoted. + * returns `null` if the value is not quoted. + * returns `undefined` if the quotation state is unknown (this can happen when + * the attribute is constructed without specifying a quote mark.) + */ + }, { + key: "quoteMark", + get: function get() { + return this._quoteMark; + } + + /** + * Set the quote mark to be used by this attribute's value. + * If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute + * value is updated accordingly. + * + * @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted. + */, + set: function set(quoteMark) { + if (!this._constructed) { + this._quoteMark = quoteMark; + return; + } + if (this._quoteMark !== quoteMark) { + this._quoteMark = quoteMark; + this._syncRawValue(); + } + } + }, { + key: "qualifiedAttribute", + get: function get() { + return this.qualifiedName(this.raws.attribute || this.attribute); + } + }, { + key: "insensitiveFlag", + get: function get() { + return this.insensitive ? 'i' : ''; + } + }, { + key: "value", + get: function get() { + return this._value; + }, + set: + /** + * Before 3.0, the value had to be set to an escaped value including any wrapped + * quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value + * is unescaped during parsing and any quote marks are removed. + * + * Because the ambiguity of this semantic change, if you set `attr.value = newValue`, + * a deprecation warning is raised when the new value contains any characters that would + * require escaping (including if it contains wrapped quotes). + * + * Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe + * how the new value is quoted. + */ + function set(v) { + if (this._constructed) { + var _unescapeValue2 = unescapeValue(v), + deprecatedUsage = _unescapeValue2.deprecatedUsage, + unescaped = _unescapeValue2.unescaped, + quoteMark = _unescapeValue2.quoteMark; + if (deprecatedUsage) { + warnOfDeprecatedValueAssignment(); + } + if (unescaped === this._value && quoteMark === this._quoteMark) { + return; + } + this._value = unescaped; + this._quoteMark = quoteMark; + this._syncRawValue(); + } else { + this._value = v; + } + } + }, { + key: "insensitive", + get: function get() { + return this._insensitive; + } + + /** + * Set the case insensitive flag. + * If the case insensitive flag changes, the raw (escaped) value at `attr.raws.insensitiveFlag` + * of the attribute is updated accordingly. + * + * @param {true | false} insensitive true if the attribute should match case-insensitively. + */, + set: function set(insensitive) { + if (!insensitive) { + this._insensitive = false; + + // "i" and "I" can be used in "this.raws.insensitiveFlag" to store the original notation. + // When setting `attr.insensitive = false` both should be erased to ensure correct serialization. + if (this.raws && (this.raws.insensitiveFlag === 'I' || this.raws.insensitiveFlag === 'i')) { + this.raws.insensitiveFlag = undefined; + } + } + this._insensitive = insensitive; + } + }, { + key: "attribute", + get: function get() { + return this._attribute; + }, + set: function set(name) { + this._handleEscapes("attribute", name); + this._attribute = name; + } + }]); + return Attribute; + }(_namespace["default"]); + exports["default"] = Attribute; + Attribute.NO_QUOTE = null; + Attribute.SINGLE_QUOTE = "'"; + Attribute.DOUBLE_QUOTE = '"'; + var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = { + "'": { + quotes: 'single', + wrap: true + }, + '"': { + quotes: 'double', + wrap: true + } + }, _CSSESC_QUOTE_OPTIONS[null] = { + isIdentifier: true + }, _CSSESC_QUOTE_OPTIONS); + function defaultAttrConcat(attrValue, attrSpaces) { + return "" + attrSpaces.before + attrValue + attrSpaces.after; + } + } (attribute)); + return attribute; +} + +var universal = {exports: {}}; + +var hasRequiredUniversal; + +function requireUniversal () { + if (hasRequiredUniversal) return universal.exports; + hasRequiredUniversal = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Universal = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Universal, _Namespace); + function Universal(opts) { + var _this; + _this = _Namespace.call(this, opts) || this; + _this.type = _types.UNIVERSAL; + _this.value = '*'; + return _this; + } + return Universal; + }(_namespace["default"]); + exports["default"] = Universal; + module.exports = exports.default; + } (universal, universal.exports)); + return universal.exports; +} + +var combinator = {exports: {}}; + +var hasRequiredCombinator; + +function requireCombinator () { + if (hasRequiredCombinator) return combinator.exports; + hasRequiredCombinator = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Combinator = /*#__PURE__*/function (_Node) { + _inheritsLoose(Combinator, _Node); + function Combinator(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.COMBINATOR; + return _this; + } + return Combinator; + }(_node["default"]); + exports["default"] = Combinator; + module.exports = exports.default; + } (combinator, combinator.exports)); + return combinator.exports; +} + +var nesting = {exports: {}}; + +var hasRequiredNesting; + +function requireNesting () { + if (hasRequiredNesting) return nesting.exports; + hasRequiredNesting = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Nesting = /*#__PURE__*/function (_Node) { + _inheritsLoose(Nesting, _Node); + function Nesting(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.NESTING; + _this.value = '&'; + return _this; + } + return Nesting; + }(_node["default"]); + exports["default"] = Nesting; + module.exports = exports.default; + } (nesting, nesting.exports)); + return nesting.exports; +} + +var sortAscending = {exports: {}}; + +var hasRequiredSortAscending; + +function requireSortAscending () { + if (hasRequiredSortAscending) return sortAscending.exports; + hasRequiredSortAscending = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = sortAscending; + function sortAscending(list) { + return list.sort(function (a, b) { + return a - b; + }); + } + module.exports = exports.default; + } (sortAscending, sortAscending.exports)); + return sortAscending.exports; +} + +var tokenize = {}; + +var tokenTypes = {}; + +var hasRequiredTokenTypes; + +function requireTokenTypes () { + if (hasRequiredTokenTypes) return tokenTypes; + hasRequiredTokenTypes = 1; + + tokenTypes.__esModule = true; + tokenTypes.word = tokenTypes.tilde = tokenTypes.tab = tokenTypes.str = tokenTypes.space = tokenTypes.slash = tokenTypes.singleQuote = tokenTypes.semicolon = tokenTypes.plus = tokenTypes.pipe = tokenTypes.openSquare = tokenTypes.openParenthesis = tokenTypes.newline = tokenTypes.greaterThan = tokenTypes.feed = tokenTypes.equals = tokenTypes.doubleQuote = tokenTypes.dollar = tokenTypes.cr = tokenTypes.comment = tokenTypes.comma = tokenTypes.combinator = tokenTypes.colon = tokenTypes.closeSquare = tokenTypes.closeParenthesis = tokenTypes.caret = tokenTypes.bang = tokenTypes.backslash = tokenTypes.at = tokenTypes.asterisk = tokenTypes.ampersand = void 0; + var ampersand = 38; // `&`.charCodeAt(0); + tokenTypes.ampersand = ampersand; + var asterisk = 42; // `*`.charCodeAt(0); + tokenTypes.asterisk = asterisk; + var at = 64; // `@`.charCodeAt(0); + tokenTypes.at = at; + var comma = 44; // `,`.charCodeAt(0); + tokenTypes.comma = comma; + var colon = 58; // `:`.charCodeAt(0); + tokenTypes.colon = colon; + var semicolon = 59; // `;`.charCodeAt(0); + tokenTypes.semicolon = semicolon; + var openParenthesis = 40; // `(`.charCodeAt(0); + tokenTypes.openParenthesis = openParenthesis; + var closeParenthesis = 41; // `)`.charCodeAt(0); + tokenTypes.closeParenthesis = closeParenthesis; + var openSquare = 91; // `[`.charCodeAt(0); + tokenTypes.openSquare = openSquare; + var closeSquare = 93; // `]`.charCodeAt(0); + tokenTypes.closeSquare = closeSquare; + var dollar = 36; // `$`.charCodeAt(0); + tokenTypes.dollar = dollar; + var tilde = 126; // `~`.charCodeAt(0); + tokenTypes.tilde = tilde; + var caret = 94; // `^`.charCodeAt(0); + tokenTypes.caret = caret; + var plus = 43; // `+`.charCodeAt(0); + tokenTypes.plus = plus; + var equals = 61; // `=`.charCodeAt(0); + tokenTypes.equals = equals; + var pipe = 124; // `|`.charCodeAt(0); + tokenTypes.pipe = pipe; + var greaterThan = 62; // `>`.charCodeAt(0); + tokenTypes.greaterThan = greaterThan; + var space = 32; // ` `.charCodeAt(0); + tokenTypes.space = space; + var singleQuote = 39; // `'`.charCodeAt(0); + tokenTypes.singleQuote = singleQuote; + var doubleQuote = 34; // `"`.charCodeAt(0); + tokenTypes.doubleQuote = doubleQuote; + var slash = 47; // `/`.charCodeAt(0); + tokenTypes.slash = slash; + var bang = 33; // `!`.charCodeAt(0); + tokenTypes.bang = bang; + var backslash = 92; // '\\'.charCodeAt(0); + tokenTypes.backslash = backslash; + var cr = 13; // '\r'.charCodeAt(0); + tokenTypes.cr = cr; + var feed = 12; // '\f'.charCodeAt(0); + tokenTypes.feed = feed; + var newline = 10; // '\n'.charCodeAt(0); + tokenTypes.newline = newline; + var tab = 9; // '\t'.charCodeAt(0); + + // Expose aliases primarily for readability. + tokenTypes.tab = tab; + var str = singleQuote; + + // No good single character representation! + tokenTypes.str = str; + var comment = -1; + tokenTypes.comment = comment; + var word = -2; + tokenTypes.word = word; + var combinator = -3; + tokenTypes.combinator = combinator; + return tokenTypes; +} + +var hasRequiredTokenize; + +function requireTokenize () { + if (hasRequiredTokenize) return tokenize; + hasRequiredTokenize = 1; + (function (exports) { + + exports.__esModule = true; + exports.FIELDS = void 0; + exports["default"] = tokenize; + var t = _interopRequireWildcard(/*@__PURE__*/ requireTokenTypes()); + var _unescapable, _wordDelimiters; + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable); + var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters); + var hex = {}; + var hexChars = "0123456789abcdefABCDEF"; + for (var i = 0; i < hexChars.length; i++) { + hex[hexChars.charCodeAt(i)] = true; + } + + /** + * Returns the last index of the bar css word + * @param {string} css The string in which the word begins + * @param {number} start The index into the string where word's first letter occurs + */ + function consumeWord(css, start) { + var next = start; + var code; + do { + code = css.charCodeAt(next); + if (wordDelimiters[code]) { + return next - 1; + } else if (code === t.backslash) { + next = consumeEscape(css, next) + 1; + } else { + // All other characters are part of the word + next++; + } + } while (next < css.length); + return next - 1; + } + + /** + * Returns the last index of the escape sequence + * @param {string} css The string in which the sequence begins + * @param {number} start The index into the string where escape character (`\`) occurs. + */ + function consumeEscape(css, start) { + var next = start; + var code = css.charCodeAt(next + 1); + if (unescapable[code]) ; else if (hex[code]) { + var hexDigits = 0; + // consume up to 6 hex chars + do { + next++; + hexDigits++; + code = css.charCodeAt(next + 1); + } while (hex[code] && hexDigits < 6); + // if fewer than 6 hex chars, a trailing space ends the escape + if (hexDigits < 6 && code === t.space) { + next++; + } + } else { + // the next char is part of the current word + next++; + } + return next; + } + var FIELDS = { + TYPE: 0, + START_LINE: 1, + START_COL: 2, + END_LINE: 3, + END_COL: 4, + START_POS: 5, + END_POS: 6 + }; + exports.FIELDS = FIELDS; + function tokenize(input) { + var tokens = []; + var css = input.css.valueOf(); + var _css = css, + length = _css.length; + var offset = -1; + var line = 1; + var start = 0; + var end = 0; + var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType; + function unclosed(what, fix) { + if (input.safe) { + // fyi: this is never set to true. + css += fix; + next = css.length - 1; + } else { + throw input.error('Unclosed ' + what, line, start - offset, start); + } + } + while (start < length) { + code = css.charCodeAt(start); + if (code === t.newline) { + offset = start; + line += 1; + } + switch (code) { + case t.space: + case t.tab: + case t.newline: + case t.cr: + case t.feed: + next = start; + do { + next += 1; + code = css.charCodeAt(next); + if (code === t.newline) { + offset = next; + line += 1; + } + } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed); + tokenType = t.space; + endLine = line; + endColumn = next - offset - 1; + end = next; + break; + case t.plus: + case t.greaterThan: + case t.tilde: + case t.pipe: + next = start; + do { + next += 1; + code = css.charCodeAt(next); + } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe); + tokenType = t.combinator; + endLine = line; + endColumn = start - offset; + end = next; + break; + + // Consume these characters as single tokens. + case t.asterisk: + case t.ampersand: + case t.bang: + case t.comma: + case t.equals: + case t.dollar: + case t.caret: + case t.openSquare: + case t.closeSquare: + case t.colon: + case t.semicolon: + case t.openParenthesis: + case t.closeParenthesis: + next = start; + tokenType = code; + endLine = line; + endColumn = start - offset; + end = next + 1; + break; + case t.singleQuote: + case t.doubleQuote: + quote = code === t.singleQuote ? "'" : '"'; + next = start; + do { + escaped = false; + next = css.indexOf(quote, next + 1); + if (next === -1) { + unclosed('quote', quote); + } + escapePos = next; + while (css.charCodeAt(escapePos - 1) === t.backslash) { + escapePos -= 1; + escaped = !escaped; + } + } while (escaped); + tokenType = t.str; + endLine = line; + endColumn = start - offset; + end = next + 1; + break; + default: + if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) { + next = css.indexOf('*/', start + 2) + 1; + if (next === 0) { + unclosed('comment', '*/'); + } + content = css.slice(start, next + 1); + lines = content.split('\n'); + last = lines.length - 1; + if (last > 0) { + nextLine = line + last; + nextOffset = next - lines[last].length; + } else { + nextLine = line; + nextOffset = offset; + } + tokenType = t.comment; + line = nextLine; + endLine = nextLine; + endColumn = next - nextOffset; + } else if (code === t.slash) { + next = start; + tokenType = code; + endLine = line; + endColumn = start - offset; + end = next + 1; + } else { + next = consumeWord(css, start); + tokenType = t.word; + endLine = line; + endColumn = next - offset; + } + end = next + 1; + break; + } + + // Ensure that the token structure remains consistent + tokens.push([tokenType, + // [0] Token type + line, + // [1] Starting line + start - offset, + // [2] Starting column + endLine, + // [3] Ending line + endColumn, + // [4] Ending column + start, + // [5] Start position / Source index + end // [6] End position + ]); + + // Reset offset for the next token + if (nextOffset) { + offset = nextOffset; + nextOffset = null; + } + start = end; + } + return tokens; + } + } (tokenize)); + return tokenize; +} + +var hasRequiredParser; + +function requireParser () { + if (hasRequiredParser) return parser.exports; + hasRequiredParser = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _root = _interopRequireDefault(/*@__PURE__*/ requireRoot()); + var _selector = _interopRequireDefault(/*@__PURE__*/ requireSelector()); + var _className = _interopRequireDefault(/*@__PURE__*/ requireClassName()); + var _comment = _interopRequireDefault(/*@__PURE__*/ requireComment()); + var _id = _interopRequireDefault(/*@__PURE__*/ requireId()); + var _tag = _interopRequireDefault(/*@__PURE__*/ requireTag()); + var _string = _interopRequireDefault(/*@__PURE__*/ requireString()); + var _pseudo = _interopRequireDefault(/*@__PURE__*/ requirePseudo()); + var _attribute = _interopRequireWildcard(/*@__PURE__*/ requireAttribute()); + var _universal = _interopRequireDefault(/*@__PURE__*/ requireUniversal()); + var _combinator = _interopRequireDefault(/*@__PURE__*/ requireCombinator()); + var _nesting = _interopRequireDefault(/*@__PURE__*/ requireNesting()); + var _sortAscending = _interopRequireDefault(/*@__PURE__*/ requireSortAscending()); + var _tokenize = _interopRequireWildcard(/*@__PURE__*/ requireTokenize()); + var tokens = _interopRequireWildcard(/*@__PURE__*/ requireTokenTypes()); + var types = _interopRequireWildcard(/*@__PURE__*/ requireTypes()); + var _util = /*@__PURE__*/ requireUtil(); + var _WHITESPACE_TOKENS, _Object$assign; + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS); + var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign)); + function tokenStart(token) { + return { + line: token[_tokenize.FIELDS.START_LINE], + column: token[_tokenize.FIELDS.START_COL] + }; + } + function tokenEnd(token) { + return { + line: token[_tokenize.FIELDS.END_LINE], + column: token[_tokenize.FIELDS.END_COL] + }; + } + function getSource(startLine, startColumn, endLine, endColumn) { + return { + start: { + line: startLine, + column: startColumn + }, + end: { + line: endLine, + column: endColumn + } + }; + } + function getTokenSource(token) { + return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]); + } + function getTokenSourceSpan(startToken, endToken) { + if (!startToken) { + return undefined; + } + return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]); + } + function unescapeProp(node, prop) { + var value = node[prop]; + if (typeof value !== "string") { + return; + } + if (value.indexOf("\\") !== -1) { + (0, _util.ensureObject)(node, 'raws'); + node[prop] = (0, _util.unesc)(value); + if (node.raws[prop] === undefined) { + node.raws[prop] = value; + } + } + return node; + } + function indexesOf(array, item) { + var i = -1; + var indexes = []; + while ((i = array.indexOf(item, i + 1)) !== -1) { + indexes.push(i); + } + return indexes; + } + function uniqs() { + var list = Array.prototype.concat.apply([], arguments); + return list.filter(function (item, i) { + return i === list.indexOf(item); + }); + } + var Parser = /*#__PURE__*/function () { + function Parser(rule, options) { + if (options === void 0) { + options = {}; + } + this.rule = rule; + this.options = Object.assign({ + lossy: false, + safe: false + }, options); + this.position = 0; + this.css = typeof this.rule === 'string' ? this.rule : this.rule.selector; + this.tokens = (0, _tokenize["default"])({ + css: this.css, + error: this._errorGenerator(), + safe: this.options.safe + }); + var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]); + this.root = new _root["default"]({ + source: rootSource + }); + this.root.errorGenerator = this._errorGenerator(); + var selector = new _selector["default"]({ + source: { + start: { + line: 1, + column: 1 + } + }, + sourceIndex: 0 + }); + this.root.append(selector); + this.current = selector; + this.loop(); + } + var _proto = Parser.prototype; + _proto._errorGenerator = function _errorGenerator() { + var _this = this; + return function (message, errorOptions) { + if (typeof _this.rule === 'string') { + return new Error(message); + } + return _this.rule.error(message, errorOptions); + }; + }; + _proto.attribute = function attribute() { + var attr = []; + var startingToken = this.currToken; + this.position++; + while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { + attr.push(this.currToken); + this.position++; + } + if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { + return this.expected('closing square bracket', this.currToken[_tokenize.FIELDS.START_POS]); + } + var len = attr.length; + var node = { + source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]), + sourceIndex: startingToken[_tokenize.FIELDS.START_POS] + }; + if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) { + return this.expected('attribute', attr[0][_tokenize.FIELDS.START_POS]); + } + var pos = 0; + var spaceBefore = ''; + var commentBefore = ''; + var lastAdded = null; + var spaceAfterMeaningfulToken = false; + while (pos < len) { + var token = attr[pos]; + var content = this.content(token); + var next = attr[pos + 1]; + switch (token[_tokenize.FIELDS.TYPE]) { + case tokens.space: + // if ( + // len === 1 || + // pos === 0 && this.content(next) === '|' + // ) { + // return this.expected('attribute', token[TOKEN.START_POS], content); + // } + spaceAfterMeaningfulToken = true; + if (this.options.lossy) { + break; + } + if (lastAdded) { + (0, _util.ensureObject)(node, 'spaces', lastAdded); + var prevContent = node.spaces[lastAdded].after || ''; + node.spaces[lastAdded].after = prevContent + content; + var existingComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || null; + if (existingComment) { + node.raws.spaces[lastAdded].after = existingComment + content; + } + } else { + spaceBefore = spaceBefore + content; + commentBefore = commentBefore + content; + } + break; + case tokens.asterisk: + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) { + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'attribute'); + node.spaces.attribute.before = spaceBefore; + spaceBefore = ''; + } + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); + node.raws.spaces.attribute.before = spaceBefore; + commentBefore = ''; + } + node.namespace = (node.namespace || "") + content; + var rawValue = (0, _util.getProp)(node, 'raws', 'namespace') || null; + if (rawValue) { + node.raws.namespace += content; + } + lastAdded = 'namespace'; + } + spaceAfterMeaningfulToken = false; + break; + case tokens.dollar: + if (lastAdded === "value") { + var oldRawValue = (0, _util.getProp)(node, 'raws', 'value'); + node.value += "$"; + if (oldRawValue) { + node.raws.value = oldRawValue + "$"; + } + break; + } + // Falls through + case tokens.caret: + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } + spaceAfterMeaningfulToken = false; + break; + case tokens.combinator: + if (content === '~' && next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } + if (content !== '|') { + spaceAfterMeaningfulToken = false; + break; + } + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } else if (!node.namespace && !node.attribute) { + node.namespace = true; + } + spaceAfterMeaningfulToken = false; + break; + case tokens.word: + if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && + // this look-ahead probably fails with comment nodes involved. + !node.operator && !node.namespace) { + node.namespace = content; + lastAdded = 'namespace'; + } else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) { + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'attribute'); + node.spaces.attribute.before = spaceBefore; + spaceBefore = ''; + } + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); + node.raws.spaces.attribute.before = commentBefore; + commentBefore = ''; + } + node.attribute = (node.attribute || "") + content; + var _rawValue = (0, _util.getProp)(node, 'raws', 'attribute') || null; + if (_rawValue) { + node.raws.attribute += content; + } + lastAdded = 'attribute'; + } else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) { + var _unescaped = (0, _util.unesc)(content); + var _oldRawValue = (0, _util.getProp)(node, 'raws', 'value') || ''; + var oldValue = node.value || ''; + node.value = oldValue + _unescaped; + node.quoteMark = null; + if (_unescaped !== content || _oldRawValue) { + (0, _util.ensureObject)(node, 'raws'); + node.raws.value = (_oldRawValue || oldValue) + content; + } + lastAdded = 'value'; + } else { + var insensitive = content === 'i' || content === "I"; + if ((node.value || node.value === '') && (node.quoteMark || spaceAfterMeaningfulToken)) { + node.insensitive = insensitive; + if (!insensitive || content === "I") { + (0, _util.ensureObject)(node, 'raws'); + node.raws.insensitiveFlag = content; + } + lastAdded = 'insensitive'; + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'insensitive'); + node.spaces.insensitive.before = spaceBefore; + spaceBefore = ''; + } + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'insensitive'); + node.raws.spaces.insensitive.before = commentBefore; + commentBefore = ''; + } + } else if (node.value || node.value === '') { + lastAdded = 'value'; + node.value += content; + if (node.raws.value) { + node.raws.value += content; + } + } + } + spaceAfterMeaningfulToken = false; + break; + case tokens.str: + if (!node.attribute || !node.operator) { + return this.error("Expected an attribute followed by an operator preceding the string.", { + index: token[_tokenize.FIELDS.START_POS] + }); + } + var _unescapeValue = (0, _attribute.unescapeValue)(content), + unescaped = _unescapeValue.unescaped, + quoteMark = _unescapeValue.quoteMark; + node.value = unescaped; + node.quoteMark = quoteMark; + lastAdded = 'value'; + (0, _util.ensureObject)(node, 'raws'); + node.raws.value = content; + spaceAfterMeaningfulToken = false; + break; + case tokens.equals: + if (!node.attribute) { + return this.expected('attribute', token[_tokenize.FIELDS.START_POS], content); + } + if (node.value) { + return this.error('Unexpected "=" found; an operator was already defined.', { + index: token[_tokenize.FIELDS.START_POS] + }); + } + node.operator = node.operator ? node.operator + content : content; + lastAdded = 'operator'; + spaceAfterMeaningfulToken = false; + break; + case tokens.comment: + if (lastAdded) { + if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === 'insensitive') { + var lastComment = (0, _util.getProp)(node, 'spaces', lastAdded, 'after') || ''; + var rawLastComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || lastComment; + (0, _util.ensureObject)(node, 'raws', 'spaces', lastAdded); + node.raws.spaces[lastAdded].after = rawLastComment + content; + } else { + var lastValue = node[lastAdded] || ''; + var rawLastValue = (0, _util.getProp)(node, 'raws', lastAdded) || lastValue; + (0, _util.ensureObject)(node, 'raws'); + node.raws[lastAdded] = rawLastValue + content; + } + } else { + commentBefore = commentBefore + content; + } + break; + default: + return this.error("Unexpected \"" + content + "\" found.", { + index: token[_tokenize.FIELDS.START_POS] + }); + } + pos++; + } + unescapeProp(node, "attribute"); + unescapeProp(node, "namespace"); + this.newNode(new _attribute["default"](node)); + this.position++; + } + + /** + * return a node containing meaningless garbage up to (but not including) the specified token position. + * if the token position is negative, all remaining tokens are consumed. + * + * This returns an array containing a single string node if all whitespace, + * otherwise an array of comment nodes with space before and after. + * + * These tokens are not added to the current selector, the caller can add them or use them to amend + * a previous node's space metadata. + * + * In lossy mode, this returns only comments. + */; + _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) { + if (stopPosition < 0) { + stopPosition = this.tokens.length; + } + var startPosition = this.position; + var nodes = []; + var space = ""; + var lastComment = undefined; + do { + if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) { + if (!this.options.lossy) { + space += this.content(); + } + } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) { + var spaces = {}; + if (space) { + spaces.before = space; + space = ""; + } + lastComment = new _comment["default"]({ + value: this.content(), + source: getTokenSource(this.currToken), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], + spaces: spaces + }); + nodes.push(lastComment); + } + } while (++this.position < stopPosition); + if (space) { + if (lastComment) { + lastComment.spaces.after = space; + } else if (!this.options.lossy) { + var firstToken = this.tokens[startPosition]; + var lastToken = this.tokens[this.position - 1]; + nodes.push(new _string["default"]({ + value: '', + source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]), + sourceIndex: firstToken[_tokenize.FIELDS.START_POS], + spaces: { + before: space, + after: '' + } + })); + } + } + return nodes; + } + + /** + * + * @param {*} nodes + */; + _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) { + var _this2 = this; + if (requiredSpace === void 0) { + requiredSpace = false; + } + var space = ""; + var rawSpace = ""; + nodes.forEach(function (n) { + var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace); + var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace); + space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0); + rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0); + }); + if (rawSpace === space) { + rawSpace = undefined; + } + var result = { + space: space, + rawSpace: rawSpace + }; + return result; + }; + _proto.isNamedCombinator = function isNamedCombinator(position) { + if (position === void 0) { + position = this.position; + } + return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash; + }; + _proto.namedCombinator = function namedCombinator() { + if (this.isNamedCombinator()) { + var nameRaw = this.content(this.tokens[this.position + 1]); + var name = (0, _util.unesc)(nameRaw).toLowerCase(); + var raws = {}; + if (name !== nameRaw) { + raws.value = "/" + nameRaw + "/"; + } + var node = new _combinator["default"]({ + value: "/" + name + "/", + source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], + raws: raws + }); + this.position = this.position + 3; + return node; + } else { + this.unexpected(); + } + }; + _proto.combinator = function combinator() { + var _this3 = this; + if (this.content() === '|') { + return this.namespace(); + } + // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector. + var nextSigTokenPos = this.locateNextMeaningfulToken(this.position); + if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); + if (nodes.length > 0) { + var last = this.current.last; + if (last) { + var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), + space = _this$convertWhitespa.space, + rawSpace = _this$convertWhitespa.rawSpace; + if (rawSpace !== undefined) { + last.rawSpaceAfter += rawSpace; + } + last.spaces.after += space; + } else { + nodes.forEach(function (n) { + return _this3.newNode(n); + }); + } + } + return; + } + var firstToken = this.currToken; + var spaceOrDescendantSelectorNodes = undefined; + if (nextSigTokenPos > this.position) { + spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); + } + var node; + if (this.isNamedCombinator()) { + node = this.namedCombinator(); + } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) { + node = new _combinator["default"]({ + value: this.content(), + source: getTokenSource(this.currToken), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS] + }); + this.position++; + } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) ; else if (!spaceOrDescendantSelectorNodes) { + this.unexpected(); + } + if (node) { + if (spaceOrDescendantSelectorNodes) { + var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), + _space = _this$convertWhitespa2.space, + _rawSpace = _this$convertWhitespa2.rawSpace; + node.spaces.before = _space; + node.rawSpaceBefore = _rawSpace; + } + } else { + // descendant combinator + var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), + _space2 = _this$convertWhitespa3.space, + _rawSpace2 = _this$convertWhitespa3.rawSpace; + if (!_rawSpace2) { + _rawSpace2 = _space2; + } + var spaces = {}; + var raws = { + spaces: {} + }; + if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) { + spaces.before = _space2.slice(0, _space2.length - 1); + raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1); + } else if (_space2.startsWith(' ') && _rawSpace2.startsWith(' ')) { + spaces.after = _space2.slice(1); + raws.spaces.after = _rawSpace2.slice(1); + } else { + raws.value = _rawSpace2; + } + node = new _combinator["default"]({ + value: ' ', + source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]), + sourceIndex: firstToken[_tokenize.FIELDS.START_POS], + spaces: spaces, + raws: raws + }); + } + if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) { + node.spaces.after = this.optionalSpace(this.content()); + this.position++; + } + return this.newNode(node); + }; + _proto.comma = function comma() { + if (this.position === this.tokens.length - 1) { + this.root.trailingComma = true; + this.position++; + return; + } + this.current._inferEndPosition(); + var selector = new _selector["default"]({ + source: { + start: tokenStart(this.tokens[this.position + 1]) + }, + sourceIndex: this.tokens[this.position + 1][_tokenize.FIELDS.START_POS] + }); + this.current.parent.append(selector); + this.current = selector; + this.position++; + }; + _proto.comment = function comment() { + var current = this.currToken; + this.newNode(new _comment["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + _proto.error = function error(message, opts) { + throw this.root.error(message, opts); + }; + _proto.missingBackslash = function missingBackslash() { + return this.error('Expected a backslash preceding the semicolon.', { + index: this.currToken[_tokenize.FIELDS.START_POS] + }); + }; + _proto.missingParenthesis = function missingParenthesis() { + return this.expected('opening parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.missingSquareBracket = function missingSquareBracket() { + return this.expected('opening square bracket', this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.unexpected = function unexpected() { + return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.unexpectedPipe = function unexpectedPipe() { + return this.error("Unexpected '|'.", this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.namespace = function namespace() { + var before = this.prevToken && this.content(this.prevToken) || true; + if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) { + this.position++; + return this.word(before); + } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) { + this.position++; + return this.universal(before); + } + this.unexpectedPipe(); + }; + _proto.nesting = function nesting() { + if (this.nextToken) { + var nextContent = this.content(this.nextToken); + if (nextContent === "|") { + this.position++; + return; + } + } + var current = this.currToken; + this.newNode(new _nesting["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + _proto.parentheses = function parentheses() { + var last = this.current.last; + var unbalanced = 1; + this.position++; + if (last && last.type === types.PSEUDO) { + var selector = new _selector["default"]({ + source: { + start: tokenStart(this.tokens[this.position]) + }, + sourceIndex: this.tokens[this.position][_tokenize.FIELDS.START_POS] + }); + var cache = this.current; + last.append(selector); + this.current = selector; + while (this.position < this.tokens.length && unbalanced) { + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + unbalanced++; + } + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + unbalanced--; + } + if (unbalanced) { + this.parse(); + } else { + this.current.source.end = tokenEnd(this.currToken); + this.current.parent.source.end = tokenEnd(this.currToken); + this.position++; + } + } + this.current = cache; + } else { + // I think this case should be an error. It's used to implement a basic parse of media queries + // but I don't think it's a good idea. + var parenStart = this.currToken; + var parenValue = "("; + var parenEnd; + while (this.position < this.tokens.length && unbalanced) { + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + unbalanced++; + } + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + unbalanced--; + } + parenEnd = this.currToken; + parenValue += this.parseParenthesisToken(this.currToken); + this.position++; + } + if (last) { + last.appendToPropertyAndEscape("value", parenValue, parenValue); + } else { + this.newNode(new _string["default"]({ + value: parenValue, + source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]), + sourceIndex: parenStart[_tokenize.FIELDS.START_POS] + })); + } + } + if (unbalanced) { + return this.expected('closing parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); + } + }; + _proto.pseudo = function pseudo() { + var _this4 = this; + var pseudoStr = ''; + var startingToken = this.currToken; + while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) { + pseudoStr += this.content(); + this.position++; + } + if (!this.currToken) { + return this.expected(['pseudo-class', 'pseudo-element'], this.position - 1); + } + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) { + this.splitWord(false, function (first, length) { + pseudoStr += first; + _this4.newNode(new _pseudo["default"]({ + value: pseudoStr, + source: getTokenSourceSpan(startingToken, _this4.currToken), + sourceIndex: startingToken[_tokenize.FIELDS.START_POS] + })); + if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + _this4.error('Misplaced parenthesis.', { + index: _this4.nextToken[_tokenize.FIELDS.START_POS] + }); + } + }); + } else { + return this.expected(['pseudo-class', 'pseudo-element'], this.currToken[_tokenize.FIELDS.START_POS]); + } + }; + _proto.space = function space() { + var content = this.content(); + // Handle space before and after the selector + if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function (node) { + return node.type === 'comment'; + })) { + this.spaces = this.optionalSpace(content); + this.position++; + } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + this.current.last.spaces.after = this.optionalSpace(content); + this.position++; + } else { + this.combinator(); + } + }; + _proto.string = function string() { + var current = this.currToken; + this.newNode(new _string["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + _proto.universal = function universal(namespace) { + var nextToken = this.nextToken; + if (nextToken && this.content(nextToken) === '|') { + this.position++; + return this.namespace(); + } + var current = this.currToken; + this.newNode(new _universal["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + }), namespace); + this.position++; + }; + _proto.splitWord = function splitWord(namespace, firstCallback) { + var _this5 = this; + var nextToken = this.nextToken; + var word = this.content(); + while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[_tokenize.FIELDS.TYPE])) { + this.position++; + var current = this.content(); + word += current; + if (current.lastIndexOf('\\') === current.length - 1) { + var next = this.nextToken; + if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) { + word += this.requiredSpace(this.content(next)); + this.position++; + } + } + nextToken = this.nextToken; + } + var hasClass = indexesOf(word, '.').filter(function (i) { + // Allow escaped dot within class name + var escapedDot = word[i - 1] === '\\'; + // Allow decimal numbers percent in @keyframes + var isKeyframesPercent = /^\d+\.\d+%$/.test(word); + return !escapedDot && !isKeyframesPercent; + }); + var hasId = indexesOf(word, '#').filter(function (i) { + return word[i - 1] !== '\\'; + }); + // Eliminate Sass interpolations from the list of id indexes + var interpolations = indexesOf(word, '#{'); + if (interpolations.length) { + hasId = hasId.filter(function (hashIndex) { + return !~interpolations.indexOf(hashIndex); + }); + } + var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId))); + indices.forEach(function (ind, i) { + var index = indices[i + 1] || word.length; + var value = word.slice(ind, index); + if (i === 0 && firstCallback) { + return firstCallback.call(_this5, value, indices.length); + } + var node; + var current = _this5.currToken; + var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i]; + var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1)); + if (~hasClass.indexOf(ind)) { + var classNameOpts = { + value: value.slice(1), + source: source, + sourceIndex: sourceIndex + }; + node = new _className["default"](unescapeProp(classNameOpts, "value")); + } else if (~hasId.indexOf(ind)) { + var idOpts = { + value: value.slice(1), + source: source, + sourceIndex: sourceIndex + }; + node = new _id["default"](unescapeProp(idOpts, "value")); + } else { + var tagOpts = { + value: value, + source: source, + sourceIndex: sourceIndex + }; + unescapeProp(tagOpts, "value"); + node = new _tag["default"](tagOpts); + } + _this5.newNode(node, namespace); + // Ensure that the namespace is used only once + namespace = null; + }); + this.position++; + }; + _proto.word = function word(namespace) { + var nextToken = this.nextToken; + if (nextToken && this.content(nextToken) === '|') { + this.position++; + return this.namespace(); + } + return this.splitWord(namespace); + }; + _proto.loop = function loop() { + while (this.position < this.tokens.length) { + this.parse(true); + } + this.current._inferEndPosition(); + return this.root; + }; + _proto.parse = function parse(throwOnParenthesis) { + switch (this.currToken[_tokenize.FIELDS.TYPE]) { + case tokens.space: + this.space(); + break; + case tokens.comment: + this.comment(); + break; + case tokens.openParenthesis: + this.parentheses(); + break; + case tokens.closeParenthesis: + if (throwOnParenthesis) { + this.missingParenthesis(); + } + break; + case tokens.openSquare: + this.attribute(); + break; + case tokens.dollar: + case tokens.caret: + case tokens.equals: + case tokens.word: + this.word(); + break; + case tokens.colon: + this.pseudo(); + break; + case tokens.comma: + this.comma(); + break; + case tokens.asterisk: + this.universal(); + break; + case tokens.ampersand: + this.nesting(); + break; + case tokens.slash: + case tokens.combinator: + this.combinator(); + break; + case tokens.str: + this.string(); + break; + // These cases throw; no break needed. + case tokens.closeSquare: + this.missingSquareBracket(); + case tokens.semicolon: + this.missingBackslash(); + default: + this.unexpected(); + } + } + + /** + * Helpers + */; + _proto.expected = function expected(description, index, found) { + if (Array.isArray(description)) { + var last = description.pop(); + description = description.join(', ') + " or " + last; + } + var an = /^[aeiou]/.test(description[0]) ? 'an' : 'a'; + if (!found) { + return this.error("Expected " + an + " " + description + ".", { + index: index + }); + } + return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { + index: index + }); + }; + _proto.requiredSpace = function requiredSpace(space) { + return this.options.lossy ? ' ' : space; + }; + _proto.optionalSpace = function optionalSpace(space) { + return this.options.lossy ? '' : space; + }; + _proto.lossySpace = function lossySpace(space, required) { + if (this.options.lossy) { + return required ? ' ' : ''; + } else { + return space; + } + }; + _proto.parseParenthesisToken = function parseParenthesisToken(token) { + var content = this.content(token); + if (token[_tokenize.FIELDS.TYPE] === tokens.space) { + return this.requiredSpace(content); + } else { + return content; + } + }; + _proto.newNode = function newNode(node, namespace) { + if (namespace) { + if (/^ +$/.test(namespace)) { + if (!this.options.lossy) { + this.spaces = (this.spaces || '') + namespace; + } + namespace = true; + } + node.namespace = namespace; + unescapeProp(node, "namespace"); + } + if (this.spaces) { + node.spaces.before = this.spaces; + this.spaces = ''; + } + return this.current.append(node); + }; + _proto.content = function content(token) { + if (token === void 0) { + token = this.currToken; + } + return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]); + }; + /** + * returns the index of the next non-whitespace, non-comment token. + * returns -1 if no meaningful token is found. + */ + _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) { + if (startPosition === void 0) { + startPosition = this.position + 1; + } + var searchPosition = startPosition; + while (searchPosition < this.tokens.length) { + if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) { + searchPosition++; + continue; + } else { + return searchPosition; + } + } + return -1; + }; + _createClass(Parser, [{ + key: "currToken", + get: function get() { + return this.tokens[this.position]; + } + }, { + key: "nextToken", + get: function get() { + return this.tokens[this.position + 1]; + } + }, { + key: "prevToken", + get: function get() { + return this.tokens[this.position - 1]; + } + }]); + return Parser; + }(); + exports["default"] = Parser; + module.exports = exports.default; + } (parser, parser.exports)); + return parser.exports; +} + +var hasRequiredProcessor; + +function requireProcessor () { + if (hasRequiredProcessor) return processor.exports; + hasRequiredProcessor = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _parser = _interopRequireDefault(/*@__PURE__*/ requireParser()); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var Processor = /*#__PURE__*/function () { + function Processor(func, options) { + this.func = func || function noop() {}; + this.funcRes = null; + this.options = options; + } + var _proto = Processor.prototype; + _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) { + if (options === void 0) { + options = {}; + } + var merged = Object.assign({}, this.options, options); + if (merged.updateSelector === false) { + return false; + } else { + return typeof rule !== "string"; + } + }; + _proto._isLossy = function _isLossy(options) { + if (options === void 0) { + options = {}; + } + var merged = Object.assign({}, this.options, options); + if (merged.lossless === false) { + return true; + } else { + return false; + } + }; + _proto._root = function _root(rule, options) { + if (options === void 0) { + options = {}; + } + var parser = new _parser["default"](rule, this._parseOptions(options)); + return parser.root; + }; + _proto._parseOptions = function _parseOptions(options) { + return { + lossy: this._isLossy(options) + }; + }; + _proto._run = function _run(rule, options) { + var _this = this; + if (options === void 0) { + options = {}; + } + return new Promise(function (resolve, reject) { + try { + var root = _this._root(rule, options); + Promise.resolve(_this.func(root)).then(function (transform) { + var string = undefined; + if (_this._shouldUpdateSelector(rule, options)) { + string = root.toString(); + rule.selector = string; + } + return { + transform: transform, + root: root, + string: string + }; + }).then(resolve, reject); + } catch (e) { + reject(e); + return; + } + }); + }; + _proto._runSync = function _runSync(rule, options) { + if (options === void 0) { + options = {}; + } + var root = this._root(rule, options); + var transform = this.func(root); + if (transform && typeof transform.then === "function") { + throw new Error("Selector processor returned a promise to a synchronous call."); + } + var string = undefined; + if (options.updateSelector && typeof rule !== "string") { + string = root.toString(); + rule.selector = string; + } + return { + transform: transform, + root: root, + string: string + }; + } + + /** + * Process rule into a selector AST. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {Promise<parser.Root>} The AST of the selector after processing it. + */; + _proto.ast = function ast(rule, options) { + return this._run(rule, options).then(function (result) { + return result.root; + }); + } + + /** + * Process rule into a selector AST synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {parser.Root} The AST of the selector after processing it. + */; + _proto.astSync = function astSync(rule, options) { + return this._runSync(rule, options).root; + } + + /** + * Process a selector into a transformed value asynchronously + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {Promise<any>} The value returned by the processor. + */; + _proto.transform = function transform(rule, options) { + return this._run(rule, options).then(function (result) { + return result.transform; + }); + } + + /** + * Process a selector into a transformed value synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {any} The value returned by the processor. + */; + _proto.transformSync = function transformSync(rule, options) { + return this._runSync(rule, options).transform; + } + + /** + * Process a selector into a new selector string asynchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {string} the selector after processing. + */; + _proto.process = function process(rule, options) { + return this._run(rule, options).then(function (result) { + return result.string || result.root.toString(); + }); + } + + /** + * Process a selector into a new selector string synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {string} the selector after processing. + */; + _proto.processSync = function processSync(rule, options) { + var result = this._runSync(rule, options); + return result.string || result.root.toString(); + }; + return Processor; + }(); + exports["default"] = Processor; + module.exports = exports.default; + } (processor, processor.exports)); + return processor.exports; +} + +var selectors = {}; + +var constructors = {}; + +var hasRequiredConstructors; + +function requireConstructors () { + if (hasRequiredConstructors) return constructors; + hasRequiredConstructors = 1; + + constructors.__esModule = true; + constructors.universal = constructors.tag = constructors.string = constructors.selector = constructors.root = constructors.pseudo = constructors.nesting = constructors.id = constructors.comment = constructors.combinator = constructors.className = constructors.attribute = void 0; + var _attribute = _interopRequireDefault(/*@__PURE__*/ requireAttribute()); + var _className = _interopRequireDefault(/*@__PURE__*/ requireClassName()); + var _combinator = _interopRequireDefault(/*@__PURE__*/ requireCombinator()); + var _comment = _interopRequireDefault(/*@__PURE__*/ requireComment()); + var _id = _interopRequireDefault(/*@__PURE__*/ requireId()); + var _nesting = _interopRequireDefault(/*@__PURE__*/ requireNesting()); + var _pseudo = _interopRequireDefault(/*@__PURE__*/ requirePseudo()); + var _root = _interopRequireDefault(/*@__PURE__*/ requireRoot()); + var _selector = _interopRequireDefault(/*@__PURE__*/ requireSelector()); + var _string = _interopRequireDefault(/*@__PURE__*/ requireString()); + var _tag = _interopRequireDefault(/*@__PURE__*/ requireTag()); + var _universal = _interopRequireDefault(/*@__PURE__*/ requireUniversal()); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var attribute = function attribute(opts) { + return new _attribute["default"](opts); + }; + constructors.attribute = attribute; + var className = function className(opts) { + return new _className["default"](opts); + }; + constructors.className = className; + var combinator = function combinator(opts) { + return new _combinator["default"](opts); + }; + constructors.combinator = combinator; + var comment = function comment(opts) { + return new _comment["default"](opts); + }; + constructors.comment = comment; + var id = function id(opts) { + return new _id["default"](opts); + }; + constructors.id = id; + var nesting = function nesting(opts) { + return new _nesting["default"](opts); + }; + constructors.nesting = nesting; + var pseudo = function pseudo(opts) { + return new _pseudo["default"](opts); + }; + constructors.pseudo = pseudo; + var root = function root(opts) { + return new _root["default"](opts); + }; + constructors.root = root; + var selector = function selector(opts) { + return new _selector["default"](opts); + }; + constructors.selector = selector; + var string = function string(opts) { + return new _string["default"](opts); + }; + constructors.string = string; + var tag = function tag(opts) { + return new _tag["default"](opts); + }; + constructors.tag = tag; + var universal = function universal(opts) { + return new _universal["default"](opts); + }; + constructors.universal = universal; + return constructors; +} + +var guards = {}; + +var hasRequiredGuards; + +function requireGuards () { + if (hasRequiredGuards) return guards; + hasRequiredGuards = 1; + + guards.__esModule = true; + guards.isComment = guards.isCombinator = guards.isClassName = guards.isAttribute = void 0; + guards.isContainer = isContainer; + guards.isIdentifier = void 0; + guards.isNamespace = isNamespace; + guards.isNesting = void 0; + guards.isNode = isNode; + guards.isPseudo = void 0; + guards.isPseudoClass = isPseudoClass; + guards.isPseudoElement = isPseudoElement; + guards.isUniversal = guards.isTag = guards.isString = guards.isSelector = guards.isRoot = void 0; + var _types = /*@__PURE__*/ requireTypes(); + var _IS_TYPE; + var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE); + function isNode(node) { + return typeof node === "object" && IS_TYPE[node.type]; + } + function isNodeType(type, node) { + return isNode(node) && node.type === type; + } + var isAttribute = isNodeType.bind(null, _types.ATTRIBUTE); + guards.isAttribute = isAttribute; + var isClassName = isNodeType.bind(null, _types.CLASS); + guards.isClassName = isClassName; + var isCombinator = isNodeType.bind(null, _types.COMBINATOR); + guards.isCombinator = isCombinator; + var isComment = isNodeType.bind(null, _types.COMMENT); + guards.isComment = isComment; + var isIdentifier = isNodeType.bind(null, _types.ID); + guards.isIdentifier = isIdentifier; + var isNesting = isNodeType.bind(null, _types.NESTING); + guards.isNesting = isNesting; + var isPseudo = isNodeType.bind(null, _types.PSEUDO); + guards.isPseudo = isPseudo; + var isRoot = isNodeType.bind(null, _types.ROOT); + guards.isRoot = isRoot; + var isSelector = isNodeType.bind(null, _types.SELECTOR); + guards.isSelector = isSelector; + var isString = isNodeType.bind(null, _types.STRING); + guards.isString = isString; + var isTag = isNodeType.bind(null, _types.TAG); + guards.isTag = isTag; + var isUniversal = isNodeType.bind(null, _types.UNIVERSAL); + guards.isUniversal = isUniversal; + function isPseudoElement(node) { + return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line"); + } + function isPseudoClass(node) { + return isPseudo(node) && !isPseudoElement(node); + } + function isContainer(node) { + return !!(isNode(node) && node.walk); + } + function isNamespace(node) { + return isAttribute(node) || isTag(node); + } + return guards; +} + +var hasRequiredSelectors; + +function requireSelectors () { + if (hasRequiredSelectors) return selectors; + hasRequiredSelectors = 1; + (function (exports) { + + exports.__esModule = true; + var _types = /*@__PURE__*/ requireTypes(); + Object.keys(_types).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _types[key]) return; + exports[key] = _types[key]; + }); + var _constructors = /*@__PURE__*/ requireConstructors(); + Object.keys(_constructors).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _constructors[key]) return; + exports[key] = _constructors[key]; + }); + var _guards = /*@__PURE__*/ requireGuards(); + Object.keys(_guards).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _guards[key]) return; + exports[key] = _guards[key]; + }); + } (selectors)); + return selectors; +} + +var hasRequiredDist; + +function requireDist () { + if (hasRequiredDist) return dist.exports; + hasRequiredDist = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _processor = _interopRequireDefault(/*@__PURE__*/ requireProcessor()); + var selectors = _interopRequireWildcard(/*@__PURE__*/ requireSelectors()); + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var parser = function parser(processor) { + return new _processor["default"](processor); + }; + Object.assign(parser, selectors); + delete parser.__esModule; + var _default = parser; + exports["default"] = _default; + module.exports = exports.default; + } (dist, dist.exports)); + return dist.exports; +} + +var parse; +var hasRequiredParse; + +function requireParse () { + if (hasRequiredParse) return parse; + hasRequiredParse = 1; + var openParentheses = "(".charCodeAt(0); + var closeParentheses = ")".charCodeAt(0); + var singleQuote = "'".charCodeAt(0); + var doubleQuote = '"'.charCodeAt(0); + var backslash = "\\".charCodeAt(0); + var slash = "/".charCodeAt(0); + var comma = ",".charCodeAt(0); + var colon = ":".charCodeAt(0); + var star = "*".charCodeAt(0); + var uLower = "u".charCodeAt(0); + var uUpper = "U".charCodeAt(0); + var plus = "+".charCodeAt(0); + var isUnicodeRange = /^[a-f0-9?-]+$/i; + + parse = function(input) { + var tokens = []; + var value = input; + + var next, + quote, + prev, + token, + escape, + escapePos, + whitespacePos, + parenthesesOpenPos; + var pos = 0; + var code = value.charCodeAt(pos); + var max = value.length; + var stack = [{ nodes: tokens }]; + var balanced = 0; + var parent; + + var name = ""; + var before = ""; + var after = ""; + + while (pos < max) { + // Whitespaces + if (code <= 32) { + next = pos; + do { + next += 1; + code = value.charCodeAt(next); + } while (code <= 32); + token = value.slice(pos, next); + + prev = tokens[tokens.length - 1]; + if (code === closeParentheses && balanced) { + after = token; + } else if (prev && prev.type === "div") { + prev.after = token; + prev.sourceEndIndex += token.length; + } else if ( + code === comma || + code === colon || + (code === slash && + value.charCodeAt(next + 1) !== star && + (!parent || + (parent && parent.type === "function" && parent.value !== "calc"))) + ) { + before = token; + } else { + tokens.push({ + type: "space", + sourceIndex: pos, + sourceEndIndex: next, + value: token + }); + } + + pos = next; + + // Quotes + } else if (code === singleQuote || code === doubleQuote) { + next = pos; + quote = code === singleQuote ? "'" : '"'; + token = { + type: "string", + sourceIndex: pos, + quote: quote + }; + do { + escape = false; + next = value.indexOf(quote, next + 1); + if (~next) { + escapePos = next; + while (value.charCodeAt(escapePos - 1) === backslash) { + escapePos -= 1; + escape = !escape; + } + } else { + value += quote; + next = value.length - 1; + token.unclosed = true; + } + } while (escape); + token.value = value.slice(pos + 1, next); + token.sourceEndIndex = token.unclosed ? next : next + 1; + tokens.push(token); + pos = next + 1; + code = value.charCodeAt(pos); + + // Comments + } else if (code === slash && value.charCodeAt(pos + 1) === star) { + next = value.indexOf("*/", pos); + + token = { + type: "comment", + sourceIndex: pos, + sourceEndIndex: next + 2 + }; + + if (next === -1) { + token.unclosed = true; + next = value.length; + token.sourceEndIndex = next; + } + + token.value = value.slice(pos + 2, next); + tokens.push(token); + + pos = next + 2; + code = value.charCodeAt(pos); + + // Operation within calc + } else if ( + (code === slash || code === star) && + parent && + parent.type === "function" && + parent.value === "calc" + ) { + token = value[pos]; + tokens.push({ + type: "word", + sourceIndex: pos - before.length, + sourceEndIndex: pos + token.length, + value: token + }); + pos += 1; + code = value.charCodeAt(pos); + + // Dividers + } else if (code === slash || code === comma || code === colon) { + token = value[pos]; + + tokens.push({ + type: "div", + sourceIndex: pos - before.length, + sourceEndIndex: pos + token.length, + value: token, + before: before, + after: "" + }); + before = ""; + + pos += 1; + code = value.charCodeAt(pos); + + // Open parentheses + } else if (openParentheses === code) { + // Whitespaces after open parentheses + next = pos; + do { + next += 1; + code = value.charCodeAt(next); + } while (code <= 32); + parenthesesOpenPos = pos; + token = { + type: "function", + sourceIndex: pos - name.length, + value: name, + before: value.slice(parenthesesOpenPos + 1, next) + }; + pos = next; + + if (name === "url" && code !== singleQuote && code !== doubleQuote) { + next -= 1; + do { + escape = false; + next = value.indexOf(")", next + 1); + if (~next) { + escapePos = next; + while (value.charCodeAt(escapePos - 1) === backslash) { + escapePos -= 1; + escape = !escape; + } + } else { + value += ")"; + next = value.length - 1; + token.unclosed = true; + } + } while (escape); + // Whitespaces before closed + whitespacePos = next; + do { + whitespacePos -= 1; + code = value.charCodeAt(whitespacePos); + } while (code <= 32); + if (parenthesesOpenPos < whitespacePos) { + if (pos !== whitespacePos + 1) { + token.nodes = [ + { + type: "word", + sourceIndex: pos, + sourceEndIndex: whitespacePos + 1, + value: value.slice(pos, whitespacePos + 1) + } + ]; + } else { + token.nodes = []; + } + if (token.unclosed && whitespacePos + 1 !== next) { + token.after = ""; + token.nodes.push({ + type: "space", + sourceIndex: whitespacePos + 1, + sourceEndIndex: next, + value: value.slice(whitespacePos + 1, next) + }); + } else { + token.after = value.slice(whitespacePos + 1, next); + token.sourceEndIndex = next; + } + } else { + token.after = ""; + token.nodes = []; + } + pos = next + 1; + token.sourceEndIndex = token.unclosed ? next : pos; + code = value.charCodeAt(pos); + tokens.push(token); + } else { + balanced += 1; + token.after = ""; + token.sourceEndIndex = pos + 1; + tokens.push(token); + stack.push(token); + tokens = token.nodes = []; + parent = token; + } + name = ""; + + // Close parentheses + } else if (closeParentheses === code && balanced) { + pos += 1; + code = value.charCodeAt(pos); + + parent.after = after; + parent.sourceEndIndex += after.length; + after = ""; + balanced -= 1; + stack[stack.length - 1].sourceEndIndex = pos; + stack.pop(); + parent = stack[balanced]; + tokens = parent.nodes; + + // Words + } else { + next = pos; + do { + if (code === backslash) { + next += 1; + } + next += 1; + code = value.charCodeAt(next); + } while ( + next < max && + !( + code <= 32 || + code === singleQuote || + code === doubleQuote || + code === comma || + code === colon || + code === slash || + code === openParentheses || + (code === star && + parent && + parent.type === "function" && + parent.value === "calc") || + (code === slash && + parent.type === "function" && + parent.value === "calc") || + (code === closeParentheses && balanced) + ) + ); + token = value.slice(pos, next); + + if (openParentheses === code) { + name = token; + } else if ( + (uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) && + plus === token.charCodeAt(1) && + isUnicodeRange.test(token.slice(2)) + ) { + tokens.push({ + type: "unicode-range", + sourceIndex: pos, + sourceEndIndex: next, + value: token + }); + } else { + tokens.push({ + type: "word", + sourceIndex: pos, + sourceEndIndex: next, + value: token + }); + } + + pos = next; + } + } + + for (pos = stack.length - 1; pos; pos -= 1) { + stack[pos].unclosed = true; + stack[pos].sourceEndIndex = value.length; + } + + return stack[0].nodes; + }; + return parse; +} + +var walk$1; +var hasRequiredWalk; + +function requireWalk () { + if (hasRequiredWalk) return walk$1; + hasRequiredWalk = 1; + walk$1 = function walk(nodes, cb, bubble) { + var i, max, node, result; + + for (i = 0, max = nodes.length; i < max; i += 1) { + node = nodes[i]; + if (!bubble) { + result = cb(node, i, nodes); + } + + if ( + result !== false && + node.type === "function" && + Array.isArray(node.nodes) + ) { + walk(node.nodes, cb, bubble); + } + + if (bubble) { + cb(node, i, nodes); + } + } + }; + return walk$1; +} + +var stringify_1; +var hasRequiredStringify; + +function requireStringify () { + if (hasRequiredStringify) return stringify_1; + hasRequiredStringify = 1; + function stringifyNode(node, custom) { + var type = node.type; + var value = node.value; + var buf; + var customResult; + + if (custom && (customResult = custom(node)) !== undefined) { + return customResult; + } else if (type === "word" || type === "space") { + return value; + } else if (type === "string") { + buf = node.quote || ""; + return buf + value + (node.unclosed ? "" : buf); + } else if (type === "comment") { + return "/*" + value + (node.unclosed ? "" : "*/"); + } else if (type === "div") { + return (node.before || "") + value + (node.after || ""); + } else if (Array.isArray(node.nodes)) { + buf = stringify(node.nodes, custom); + if (type !== "function") { + return buf; + } + return ( + value + + "(" + + (node.before || "") + + buf + + (node.after || "") + + (node.unclosed ? "" : ")") + ); + } + return value; + } + + function stringify(nodes, custom) { + var result, i; + + if (Array.isArray(nodes)) { + result = ""; + for (i = nodes.length - 1; ~i; i -= 1) { + result = stringifyNode(nodes[i], custom) + result; + } + return result; + } + return stringifyNode(nodes, custom); + } + + stringify_1 = stringify; + return stringify_1; +} + +var unit; +var hasRequiredUnit; + +function requireUnit () { + if (hasRequiredUnit) return unit; + hasRequiredUnit = 1; + var minus = "-".charCodeAt(0); + var plus = "+".charCodeAt(0); + var dot = ".".charCodeAt(0); + var exp = "e".charCodeAt(0); + var EXP = "E".charCodeAt(0); + + // Check if three code points would start a number + // https://www.w3.org/TR/css-syntax-3/#starts-with-a-number + function likeNumber(value) { + var code = value.charCodeAt(0); + var nextCode; + + if (code === plus || code === minus) { + nextCode = value.charCodeAt(1); + + if (nextCode >= 48 && nextCode <= 57) { + return true; + } + + var nextNextCode = value.charCodeAt(2); + + if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) { + return true; + } + + return false; + } + + if (code === dot) { + nextCode = value.charCodeAt(1); + + if (nextCode >= 48 && nextCode <= 57) { + return true; + } + + return false; + } + + if (code >= 48 && code <= 57) { + return true; + } + + return false; + } + + // Consume a number + // https://www.w3.org/TR/css-syntax-3/#consume-number + unit = function(value) { + var pos = 0; + var length = value.length; + var code; + var nextCode; + var nextNextCode; + + if (length === 0 || !likeNumber(value)) { + return false; + } + + code = value.charCodeAt(pos); + + if (code === plus || code === minus) { + pos++; + } + + while (pos < length) { + code = value.charCodeAt(pos); + + if (code < 48 || code > 57) { + break; + } + + pos += 1; + } + + code = value.charCodeAt(pos); + nextCode = value.charCodeAt(pos + 1); + + if (code === dot && nextCode >= 48 && nextCode <= 57) { + pos += 2; + + while (pos < length) { + code = value.charCodeAt(pos); + + if (code < 48 || code > 57) { + break; + } + + pos += 1; + } + } + + code = value.charCodeAt(pos); + nextCode = value.charCodeAt(pos + 1); + nextNextCode = value.charCodeAt(pos + 2); + + if ( + (code === exp || code === EXP) && + ((nextCode >= 48 && nextCode <= 57) || + ((nextCode === plus || nextCode === minus) && + nextNextCode >= 48 && + nextNextCode <= 57)) + ) { + pos += nextCode === plus || nextCode === minus ? 3 : 2; + + while (pos < length) { + code = value.charCodeAt(pos); + + if (code < 48 || code > 57) { + break; + } + + pos += 1; + } + } + + return { + number: value.slice(0, pos), + unit: value.slice(pos) + }; + }; + return unit; +} + +var lib; +var hasRequiredLib; + +function requireLib () { + if (hasRequiredLib) return lib; + hasRequiredLib = 1; + var parse = /*@__PURE__*/ requireParse(); + var walk = /*@__PURE__*/ requireWalk(); + var stringify = /*@__PURE__*/ requireStringify(); + + function ValueParser(value) { + if (this instanceof ValueParser) { + this.nodes = parse(value); + return this; + } + return new ValueParser(value); + } + + ValueParser.prototype.toString = function() { + return Array.isArray(this.nodes) ? stringify(this.nodes) : ""; + }; + + ValueParser.prototype.walk = function(cb, bubble) { + walk(this.nodes, cb, bubble); + return this; + }; + + ValueParser.unit = /*@__PURE__*/ requireUnit(); + + ValueParser.walk = walk; + + ValueParser.stringify = stringify; + + lib = ValueParser; + return lib; +} + +var hasRequiredSrc$2; + +function requireSrc$2 () { + if (hasRequiredSrc$2) return src$2.exports; + hasRequiredSrc$2 = 1; + + const selectorParser = /*@__PURE__*/ requireDist(); + const valueParser = /*@__PURE__*/ requireLib(); + const { extractICSS } = /*@__PURE__*/ requireSrc$4(); + + const isSpacing = (node) => node.type === "combinator" && node.value === " "; + + function normalizeNodeArray(nodes) { + const array = []; + + nodes.forEach((x) => { + if (Array.isArray(x)) { + normalizeNodeArray(x).forEach((item) => { + array.push(item); + }); + } else if (x) { + array.push(x); + } + }); + + if (array.length > 0 && isSpacing(array[array.length - 1])) { + array.pop(); + } + return array; + } + + function localizeNode(rule, mode, localAliasMap) { + const transform = (node, context) => { + if (context.ignoreNextSpacing && !isSpacing(node)) { + throw new Error("Missing whitespace after " + context.ignoreNextSpacing); + } + + if (context.enforceNoSpacing && isSpacing(node)) { + throw new Error("Missing whitespace before " + context.enforceNoSpacing); + } + + let newNodes; + + switch (node.type) { + case "root": { + let resultingGlobal; + + context.hasPureGlobals = false; + + newNodes = node.nodes.map((n) => { + const nContext = { + global: context.global, + lastWasSpacing: true, + hasLocals: false, + explicit: false, + }; + + n = transform(n, nContext); + + if (typeof resultingGlobal === "undefined") { + resultingGlobal = nContext.global; + } else if (resultingGlobal !== nContext.global) { + throw new Error( + 'Inconsistent rule global/local result in rule "' + + node + + '" (multiple selectors must result in the same mode for the rule)' + ); + } + + if (!nContext.hasLocals) { + context.hasPureGlobals = true; + } + + return n; + }); + + context.global = resultingGlobal; + + node.nodes = normalizeNodeArray(newNodes); + break; + } + case "selector": { + newNodes = node.map((childNode) => transform(childNode, context)); + + node = node.clone(); + node.nodes = normalizeNodeArray(newNodes); + break; + } + case "combinator": { + if (isSpacing(node)) { + if (context.ignoreNextSpacing) { + context.ignoreNextSpacing = false; + context.lastWasSpacing = false; + context.enforceNoSpacing = false; + return null; + } + context.lastWasSpacing = true; + return node; + } + break; + } + case "pseudo": { + let childContext; + const isNested = !!node.length; + const isScoped = node.value === ":local" || node.value === ":global"; + const isImportExport = + node.value === ":import" || node.value === ":export"; + + if (isImportExport) { + context.hasLocals = true; + // :local(.foo) + } else if (isNested) { + if (isScoped) { + if (node.nodes.length === 0) { + throw new Error(`${node.value}() can't be empty`); + } + + if (context.inside) { + throw new Error( + `A ${node.value} is not allowed inside of a ${context.inside}(...)` + ); + } + + childContext = { + global: node.value === ":global", + inside: node.value, + hasLocals: false, + explicit: true, + }; + + newNodes = node + .map((childNode) => transform(childNode, childContext)) + .reduce((acc, next) => acc.concat(next.nodes), []); + + if (newNodes.length) { + const { before, after } = node.spaces; + + const first = newNodes[0]; + const last = newNodes[newNodes.length - 1]; + + first.spaces = { before, after: first.spaces.after }; + last.spaces = { before: last.spaces.before, after }; + } + + node = newNodes; + + break; + } else { + childContext = { + global: context.global, + inside: context.inside, + lastWasSpacing: true, + hasLocals: false, + explicit: context.explicit, + }; + newNodes = node.map((childNode) => { + const newContext = { + ...childContext, + enforceNoSpacing: false, + }; + + const result = transform(childNode, newContext); + + childContext.global = newContext.global; + childContext.hasLocals = newContext.hasLocals; + + return result; + }); + + node = node.clone(); + node.nodes = normalizeNodeArray(newNodes); + + if (childContext.hasLocals) { + context.hasLocals = true; + } + } + break; + + //:local .foo .bar + } else if (isScoped) { + if (context.inside) { + throw new Error( + `A ${node.value} is not allowed inside of a ${context.inside}(...)` + ); + } + + const addBackSpacing = !!node.spaces.before; + + context.ignoreNextSpacing = context.lastWasSpacing + ? node.value + : false; + + context.enforceNoSpacing = context.lastWasSpacing + ? false + : node.value; + + context.global = node.value === ":global"; + context.explicit = true; + + // because this node has spacing that is lost when we remove it + // we make up for it by adding an extra combinator in since adding + // spacing on the parent selector doesn't work + return addBackSpacing + ? selectorParser.combinator({ value: " " }) + : null; + } + break; + } + case "id": + case "class": { + if (!node.value) { + throw new Error("Invalid class or id selector syntax"); + } + + if (context.global) { + break; + } + + const isImportedValue = localAliasMap.has(node.value); + const isImportedWithExplicitScope = isImportedValue && context.explicit; + + if (!isImportedValue || isImportedWithExplicitScope) { + const innerNode = node.clone(); + innerNode.spaces = { before: "", after: "" }; + + node = selectorParser.pseudo({ + value: ":local", + nodes: [innerNode], + spaces: node.spaces, + }); + + context.hasLocals = true; + } + + break; + } + case "nesting": { + if (node.value === "&") { + context.hasLocals = true; + } + } + } + + context.lastWasSpacing = false; + context.ignoreNextSpacing = false; + context.enforceNoSpacing = false; + + return node; + }; + + const rootContext = { + global: mode === "global", + hasPureGlobals: false, + }; + + rootContext.selector = selectorParser((root) => { + transform(root, rootContext); + }).processSync(rule, { updateSelector: false, lossless: true }); + + return rootContext; + } + + function localizeDeclNode(node, context) { + switch (node.type) { + case "word": + if (context.localizeNextItem) { + if (!context.localAliasMap.has(node.value)) { + node.value = ":local(" + node.value + ")"; + context.localizeNextItem = false; + } + } + break; + + case "function": + if ( + context.options && + context.options.rewriteUrl && + node.value.toLowerCase() === "url" + ) { + node.nodes.map((nestedNode) => { + if (nestedNode.type !== "string" && nestedNode.type !== "word") { + return; + } + + let newUrl = context.options.rewriteUrl( + context.global, + nestedNode.value + ); + + switch (nestedNode.type) { + case "string": + if (nestedNode.quote === "'") { + newUrl = newUrl.replace(/(\\)/g, "\\$1").replace(/'/g, "\\'"); + } + + if (nestedNode.quote === '"') { + newUrl = newUrl.replace(/(\\)/g, "\\$1").replace(/"/g, '\\"'); + } + + break; + case "word": + newUrl = newUrl.replace(/("|'|\)|\\)/g, "\\$1"); + break; + } + + nestedNode.value = newUrl; + }); + } + break; + } + return node; + } + + // `none` is special value, other is global values + const specialKeywords = [ + "none", + "inherit", + "initial", + "revert", + "revert-layer", + "unset", + ]; + + function localizeDeclarationValues(localize, declaration, context) { + const valueNodes = valueParser(declaration.value); + + valueNodes.walk((node, index, nodes) => { + if ( + node.type === "function" && + (node.value.toLowerCase() === "var" || node.value.toLowerCase() === "env") + ) { + return false; + } + + if ( + node.type === "word" && + specialKeywords.includes(node.value.toLowerCase()) + ) { + return; + } + + const subContext = { + options: context.options, + global: context.global, + localizeNextItem: localize && !context.global, + localAliasMap: context.localAliasMap, + }; + nodes[index] = localizeDeclNode(node, subContext); + }); + + declaration.value = valueNodes.toString(); + } + + function localizeDeclaration(declaration, context) { + const isAnimation = /animation$/i.test(declaration.prop); + + if (isAnimation) { + // letter + // An uppercase letter or a lowercase letter. + // + // ident-start code point + // A letter, a non-ASCII code point, or U+005F LOW LINE (_). + // + // ident code point + // An ident-start code point, a digit, or U+002D HYPHEN-MINUS (-). + + // We don't validate `hex digits`, because we don't need it, it is work of linters. + const validIdent = + /^-?([a-z\u0080-\uFFFF_]|(\\[^\r\n\f])|-(?![0-9]))((\\[^\r\n\f])|[a-z\u0080-\uFFFF_0-9-])*$/i; + + /* + The spec defines some keywords that you can use to describe properties such as the timing + function. These are still valid animation names, so as long as there is a property that accepts + a keyword, it is given priority. Only when all the properties that can take a keyword are + exhausted can the animation name be set to the keyword. I.e. + + animation: infinite infinite; + + The animation will repeat an infinite number of times from the first argument, and will have an + animation name of infinite from the second. + */ + const animationKeywords = { + // animation-direction + $normal: 1, + $reverse: 1, + $alternate: 1, + "$alternate-reverse": 1, + // animation-fill-mode + $forwards: 1, + $backwards: 1, + $both: 1, + // animation-iteration-count + $infinite: 1, + // animation-play-state + $paused: 1, + $running: 1, + // animation-timing-function + $ease: 1, + "$ease-in": 1, + "$ease-out": 1, + "$ease-in-out": 1, + $linear: 1, + "$step-end": 1, + "$step-start": 1, + // Special + $none: Infinity, // No matter how many times you write none, it will never be an animation name + // Global values + $initial: Infinity, + $inherit: Infinity, + $unset: Infinity, + $revert: Infinity, + "$revert-layer": Infinity, + }; + let parsedAnimationKeywords = {}; + const valueNodes = valueParser(declaration.value).walk((node) => { + // If div-token appeared (represents as comma ','), a possibility of an animation-keywords should be reflesh. + if (node.type === "div") { + parsedAnimationKeywords = {}; + + return; + } + // Do not handle nested functions + else if (node.type === "function") { + return false; + } + // Ignore all except word + else if (node.type !== "word") { + return; + } + + const value = node.type === "word" ? node.value.toLowerCase() : null; + + let shouldParseAnimationName = false; + + if (value && validIdent.test(value)) { + if ("$" + value in animationKeywords) { + parsedAnimationKeywords["$" + value] = + "$" + value in parsedAnimationKeywords + ? parsedAnimationKeywords["$" + value] + 1 + : 0; + + shouldParseAnimationName = + parsedAnimationKeywords["$" + value] >= + animationKeywords["$" + value]; + } else { + shouldParseAnimationName = true; + } + } + + const subContext = { + options: context.options, + global: context.global, + localizeNextItem: shouldParseAnimationName && !context.global, + localAliasMap: context.localAliasMap, + }; + + return localizeDeclNode(node, subContext); + }); + + declaration.value = valueNodes.toString(); + + return; + } + + const isAnimationName = /animation(-name)?$/i.test(declaration.prop); + + if (isAnimationName) { + return localizeDeclarationValues(true, declaration, context); + } + + const hasUrl = /url\(/i.test(declaration.value); + + if (hasUrl) { + return localizeDeclarationValues(false, declaration, context); + } + } + + src$2.exports = (options = {}) => { + if ( + options && + options.mode && + options.mode !== "global" && + options.mode !== "local" && + options.mode !== "pure" + ) { + throw new Error( + 'options.mode must be either "global", "local" or "pure" (default "local")' + ); + } + + const pureMode = options && options.mode === "pure"; + const globalMode = options && options.mode === "global"; + + return { + postcssPlugin: "postcss-modules-local-by-default", + prepare() { + const localAliasMap = new Map(); + + return { + Once(root) { + const { icssImports } = extractICSS(root, false); + + Object.keys(icssImports).forEach((key) => { + Object.keys(icssImports[key]).forEach((prop) => { + localAliasMap.set(prop, icssImports[key][prop]); + }); + }); + + root.walkAtRules((atRule) => { + if (/keyframes$/i.test(atRule.name)) { + const globalMatch = /^\s*:global\s*\((.+)\)\s*$/.exec( + atRule.params + ); + const localMatch = /^\s*:local\s*\((.+)\)\s*$/.exec( + atRule.params + ); + + let globalKeyframes = globalMode; + + if (globalMatch) { + if (pureMode) { + throw atRule.error( + "@keyframes :global(...) is not allowed in pure mode" + ); + } + atRule.params = globalMatch[1]; + globalKeyframes = true; + } else if (localMatch) { + atRule.params = localMatch[0]; + globalKeyframes = false; + } else if ( + atRule.params && + !globalMode && + !localAliasMap.has(atRule.params) + ) { + atRule.params = ":local(" + atRule.params + ")"; + } + + atRule.walkDecls((declaration) => { + localizeDeclaration(declaration, { + localAliasMap, + options: options, + global: globalKeyframes, + }); + }); + } else if (/scope$/i.test(atRule.name)) { + if (atRule.params) { + atRule.params = atRule.params + .split("to") + .map((item) => { + const selector = item.trim().slice(1, -1).trim(); + const context = localizeNode( + selector, + options.mode, + localAliasMap + ); + + context.options = options; + context.localAliasMap = localAliasMap; + + if (pureMode && context.hasPureGlobals) { + throw atRule.error( + 'Selector in at-rule"' + + selector + + '" is not pure ' + + "(pure selectors must contain at least one local class or id)" + ); + } + + return `(${context.selector})`; + }) + .join(" to "); + } + + atRule.nodes.forEach((declaration) => { + if (declaration.type === "decl") { + localizeDeclaration(declaration, { + localAliasMap, + options: options, + global: globalMode, + }); + } + }); + } else if (atRule.nodes) { + atRule.nodes.forEach((declaration) => { + if (declaration.type === "decl") { + localizeDeclaration(declaration, { + localAliasMap, + options: options, + global: globalMode, + }); + } + }); + } + }); + + root.walkRules((rule) => { + if ( + rule.parent && + rule.parent.type === "atrule" && + /keyframes$/i.test(rule.parent.name) + ) { + // ignore keyframe rules + return; + } + + const context = localizeNode(rule, options.mode, localAliasMap); + + context.options = options; + context.localAliasMap = localAliasMap; + + if (pureMode && context.hasPureGlobals) { + throw rule.error( + 'Selector "' + + rule.selector + + '" is not pure ' + + "(pure selectors must contain at least one local class or id)" + ); + } + + rule.selector = context.selector; + + // Less-syntax mixins parse as rules with no nodes + if (rule.nodes) { + rule.nodes.forEach((declaration) => + localizeDeclaration(declaration, context) + ); + } + }); + }, + }; + }, + }; + }; + src$2.exports.postcss = true; + return src$2.exports; +} + +var src$1; +var hasRequiredSrc$1; + +function requireSrc$1 () { + if (hasRequiredSrc$1) return src$1; + hasRequiredSrc$1 = 1; + + const selectorParser = /*@__PURE__*/ requireDist(); + + const hasOwnProperty = Object.prototype.hasOwnProperty; + + function isNestedRule(rule) { + if (!rule.parent || rule.parent.type === "root") { + return false; + } + + if (rule.parent.type === "rule") { + return true; + } + + return isNestedRule(rule.parent); + } + + function getSingleLocalNamesForComposes(root, rule) { + if (isNestedRule(rule)) { + throw new Error(`composition is not allowed in nested rule \n\n${rule}`); + } + + return root.nodes.map((node) => { + if (node.type !== "selector" || node.nodes.length !== 1) { + throw new Error( + `composition is only allowed when selector is single :local class name not in "${root}"` + ); + } + + node = node.nodes[0]; + + if ( + node.type !== "pseudo" || + node.value !== ":local" || + node.nodes.length !== 1 + ) { + throw new Error( + 'composition is only allowed when selector is single :local class name not in "' + + root + + '", "' + + node + + '" is weird' + ); + } + + node = node.first; + + if (node.type !== "selector" || node.length !== 1) { + throw new Error( + 'composition is only allowed when selector is single :local class name not in "' + + root + + '", "' + + node + + '" is weird' + ); + } + + node = node.first; + + if (node.type !== "class") { + // 'id' is not possible, because you can't compose ids + throw new Error( + 'composition is only allowed when selector is single :local class name not in "' + + root + + '", "' + + node + + '" is weird' + ); + } + + return node.value; + }); + } + + const whitespace = "[\\x20\\t\\r\\n\\f]"; + const unescapeRegExp = new RegExp( + "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", + "ig" + ); + + function unescape(str) { + return str.replace(unescapeRegExp, (_, escaped, escapedWhitespace) => { + const high = "0x" + escaped - 0x10000; + + // NaN means non-codepoint + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace + ? escaped + : high < 0 + ? // BMP codepoint + String.fromCharCode(high + 0x10000) + : // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode((high >> 10) | 0xd800, (high & 0x3ff) | 0xdc00); + }); + } + + const plugin = (options = {}) => { + const generateScopedName = + (options && options.generateScopedName) || plugin.generateScopedName; + const generateExportEntry = + (options && options.generateExportEntry) || plugin.generateExportEntry; + const exportGlobals = options && options.exportGlobals; + + return { + postcssPlugin: "postcss-modules-scope", + Once(root, { rule }) { + const exports = Object.create(null); + + function exportScopedName(name, rawName, node) { + const scopedName = generateScopedName( + rawName ? rawName : name, + root.source.input.from, + root.source.input.css, + node + ); + const exportEntry = generateExportEntry( + rawName ? rawName : name, + scopedName, + root.source.input.from, + root.source.input.css, + node + ); + const { key, value } = exportEntry; + + exports[key] = exports[key] || []; + + if (exports[key].indexOf(value) < 0) { + exports[key].push(value); + } + + return scopedName; + } + + function localizeNode(node) { + switch (node.type) { + case "selector": + node.nodes = node.map((item) => localizeNode(item)); + return node; + case "class": + return selectorParser.className({ + value: exportScopedName( + node.value, + node.raws && node.raws.value ? node.raws.value : null, + node + ), + }); + case "id": { + return selectorParser.id({ + value: exportScopedName( + node.value, + node.raws && node.raws.value ? node.raws.value : null, + node + ), + }); + } + case "attribute": { + if (node.attribute === "class" && node.operator === "=") { + return selectorParser.attribute({ + attribute: node.attribute, + operator: node.operator, + quoteMark: "'", + value: exportScopedName(node.value, null, null), + }); + } + } + } + + throw new Error( + `${node.type} ("${node}") is not allowed in a :local block` + ); + } + + function traverseNode(node) { + switch (node.type) { + case "pseudo": + if (node.value === ":local") { + if (node.nodes.length !== 1) { + throw new Error('Unexpected comma (",") in :local block'); + } + + const selector = localizeNode(node.first); + // move the spaces that were around the pseudo selector to the first + // non-container node + selector.first.spaces = node.spaces; + + const nextNode = node.next(); + + if ( + nextNode && + nextNode.type === "combinator" && + nextNode.value === " " && + /\\[A-F0-9]{1,6}$/.test(selector.last.value) + ) { + selector.last.spaces.after = " "; + } + + node.replaceWith(selector); + + return; + } + /* falls through */ + case "root": + case "selector": { + node.each((item) => traverseNode(item)); + break; + } + case "id": + case "class": + if (exportGlobals) { + exports[node.value] = [node.value]; + } + break; + } + return node; + } + + // Find any :import and remember imported names + const importedNames = {}; + + root.walkRules(/^:import\(.+\)$/, (rule) => { + rule.walkDecls((decl) => { + importedNames[decl.prop] = true; + }); + }); + + // Find any :local selectors + root.walkRules((rule) => { + let parsedSelector = selectorParser().astSync(rule); + + rule.selector = traverseNode(parsedSelector.clone()).toString(); + + rule.walkDecls(/^(composes|compose-with)$/i, (decl) => { + const localNames = getSingleLocalNamesForComposes( + parsedSelector, + decl.parent + ); + const multiple = decl.value.split(","); + + multiple.forEach((value) => { + const classes = value.trim().split(/\s+/); + + classes.forEach((className) => { + const global = /^global\(([^)]+)\)$/.exec(className); + + if (global) { + localNames.forEach((exportedName) => { + exports[exportedName].push(global[1]); + }); + } else if (hasOwnProperty.call(importedNames, className)) { + localNames.forEach((exportedName) => { + exports[exportedName].push(className); + }); + } else if (hasOwnProperty.call(exports, className)) { + localNames.forEach((exportedName) => { + exports[className].forEach((item) => { + exports[exportedName].push(item); + }); + }); + } else { + throw decl.error( + `referenced class name "${className}" in ${decl.prop} not found` + ); + } + }); + }); + + decl.remove(); + }); + + // Find any :local values + rule.walkDecls((decl) => { + if (!/:local\s*\((.+?)\)/.test(decl.value)) { + return; + } + + let tokens = decl.value.split(/(,|'[^']*'|"[^"]*")/); + + tokens = tokens.map((token, idx) => { + if (idx === 0 || tokens[idx - 1] === ",") { + let result = token; + + const localMatch = /:local\s*\((.+?)\)/.exec(token); + + if (localMatch) { + const input = localMatch.input; + const matchPattern = localMatch[0]; + const matchVal = localMatch[1]; + const newVal = exportScopedName(matchVal); + + result = input.replace(matchPattern, newVal); + } else { + return token; + } + + return result; + } else { + return token; + } + }); + + decl.value = tokens.join(""); + }); + }); + + // Find any :local keyframes + root.walkAtRules(/keyframes$/i, (atRule) => { + const localMatch = /^\s*:local\s*\((.+?)\)\s*$/.exec(atRule.params); + + if (!localMatch) { + return; + } + + atRule.params = exportScopedName(localMatch[1]); + }); + + root.walkAtRules(/scope$/i, (atRule) => { + if (atRule.params) { + atRule.params = atRule.params + .split("to") + .map((item) => { + const selector = item.trim().slice(1, -1).trim(); + + const localMatch = /^\s*:local\s*\((.+?)\)\s*$/.exec(selector); + + if (!localMatch) { + return `(${selector})`; + } + + let parsedSelector = selectorParser().astSync(selector); + + return `(${traverseNode(parsedSelector).toString()})`; + }) + .join(" to "); + } + }); + + // If we found any :locals, insert an :export rule + const exportedNames = Object.keys(exports); + + if (exportedNames.length > 0) { + const exportRule = rule({ selector: ":export" }); + + exportedNames.forEach((exportedName) => + exportRule.append({ + prop: exportedName, + value: exports[exportedName].join(" "), + raws: { before: "\n " }, + }) + ); + + root.append(exportRule); + } + }, + }; + }; + + plugin.postcss = true; + + plugin.generateScopedName = function (name, path) { + const sanitisedPath = path + .replace(/\.[^./\\]+$/, "") + .replace(/[\W_]+/g, "_") + .replace(/^_|_$/g, ""); + + return `_${sanitisedPath}__${name}`.trim(); + }; + + plugin.generateExportEntry = function (name, scopedName) { + return { + key: unescape(name), + value: unescape(scopedName), + }; + }; + + src$1 = plugin; + return src$1; +} + +var stringHash; +var hasRequiredStringHash; + +function requireStringHash () { + if (hasRequiredStringHash) return stringHash; + hasRequiredStringHash = 1; + + function hash(str) { + var hash = 5381, + i = str.length; + + while(i) { + hash = (hash * 33) ^ str.charCodeAt(--i); + } + + /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed + * integers. Since we want the results to be always positive, convert the + * signed int to an unsigned by doing an unsigned bitshift. */ + return hash >>> 0; + } + + stringHash = hash; + return stringHash; +} + +var src = {exports: {}}; + +var hasRequiredSrc; + +function requireSrc () { + if (hasRequiredSrc) return src.exports; + hasRequiredSrc = 1; + + const ICSSUtils = /*@__PURE__*/ requireSrc$4(); + + const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/; + const matchValueDefinition = /(?:\s+|^)([\w-]+):?(.*?)$/; + const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/; + + src.exports = (options) => { + let importIndex = 0; + const createImportedName = + (options && options.createImportedName) || + ((importName /*, path*/) => + `i__const_${importName.replace(/\W/g, "_")}_${importIndex++}`); + + return { + postcssPlugin: "postcss-modules-values", + prepare(result) { + const importAliases = []; + const definitions = {}; + + return { + Once(root, postcss) { + root.walkAtRules(/value/i, (atRule) => { + const matches = atRule.params.match(matchImports); + + if (matches) { + let [, /*match*/ aliases, path] = matches; + + // We can use constants for path names + if (definitions[path]) { + path = definitions[path]; + } + + const imports = aliases + .replace(/^\(\s*([\s\S]+)\s*\)$/, "$1") + .split(/\s*,\s*/) + .map((alias) => { + const tokens = matchImport.exec(alias); + + if (tokens) { + const [, /*match*/ theirName, myName = theirName] = tokens; + const importedName = createImportedName(myName); + definitions[myName] = importedName; + return { theirName, importedName }; + } else { + throw new Error(`@import statement "${alias}" is invalid!`); + } + }); + + importAliases.push({ path, imports }); + + atRule.remove(); + + return; + } + + if (atRule.params.indexOf("@value") !== -1) { + result.warn("Invalid value definition: " + atRule.params); + } + + let [, key, value] = `${atRule.params}${atRule.raws.between}`.match( + matchValueDefinition + ); + + const normalizedValue = value.replace(/\/\*((?!\*\/).*?)\*\//g, ""); + + if (normalizedValue.length === 0) { + result.warn("Invalid value definition: " + atRule.params); + atRule.remove(); + + return; + } + + let isOnlySpace = /^\s+$/.test(normalizedValue); + + if (!isOnlySpace) { + value = value.trim(); + } + + // Add to the definitions, knowing that values can refer to each other + definitions[key] = ICSSUtils.replaceValueSymbols( + value, + definitions + ); + + atRule.remove(); + }); + + /* If we have no definitions, don't continue */ + if (!Object.keys(definitions).length) { + return; + } + + /* Perform replacements */ + ICSSUtils.replaceSymbols(root, definitions); + + /* We want to export anything defined by now, but don't add it to the CSS yet or it well get picked up by the replacement stuff */ + const exportDeclarations = Object.keys(definitions).map((key) => + postcss.decl({ + value: definitions[key], + prop: key, + raws: { before: "\n " }, + }) + ); + + /* Add export rules if any */ + if (exportDeclarations.length > 0) { + const exportRule = postcss.rule({ + selector: ":export", + raws: { after: "\n" }, + }); + + exportRule.append(exportDeclarations); + + root.prepend(exportRule); + } + + /* Add import rules */ + importAliases.reverse().forEach(({ path, imports }) => { + const importRule = postcss.rule({ + selector: `:import(${path})`, + raws: { after: "\n" }, + }); + + imports.forEach(({ theirName, importedName }) => { + importRule.append({ + value: theirName, + prop: importedName, + raws: { before: "\n " }, + }); + }); + + root.prepend(importRule); + }); + }, + }; + }, + }; + }; + + src.exports.postcss = true; + return src.exports; +} + +var hasRequiredScoping; + +function requireScoping () { + if (hasRequiredScoping) return scoping; + hasRequiredScoping = 1; + + Object.defineProperty(scoping, "__esModule", { + value: true + }); + scoping.behaviours = void 0; + scoping.getDefaultPlugins = getDefaultPlugins; + scoping.getDefaultScopeBehaviour = getDefaultScopeBehaviour; + scoping.getScopedNameGenerator = getScopedNameGenerator; + + var _postcssModulesExtractImports = _interopRequireDefault(/*@__PURE__*/ requireSrc$3()); + + var _genericNames = _interopRequireDefault(/*@__PURE__*/ requireGenericNames()); + + var _postcssModulesLocalByDefault = _interopRequireDefault(/*@__PURE__*/ requireSrc$2()); + + var _postcssModulesScope = _interopRequireDefault(/*@__PURE__*/ requireSrc$1()); + + var _stringHash = _interopRequireDefault(/*@__PURE__*/ requireStringHash()); + + var _postcssModulesValues = _interopRequireDefault(/*@__PURE__*/ requireSrc()); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + const behaviours = { + LOCAL: "local", + GLOBAL: "global" + }; + scoping.behaviours = behaviours; + + function getDefaultPlugins({ + behaviour, + generateScopedName, + exportGlobals + }) { + const scope = (0, _postcssModulesScope.default)({ + generateScopedName, + exportGlobals + }); + const plugins = { + [behaviours.LOCAL]: [_postcssModulesValues.default, (0, _postcssModulesLocalByDefault.default)({ + mode: "local" + }), _postcssModulesExtractImports.default, scope], + [behaviours.GLOBAL]: [_postcssModulesValues.default, (0, _postcssModulesLocalByDefault.default)({ + mode: "global" + }), _postcssModulesExtractImports.default, scope] + }; + return plugins[behaviour]; + } + + function isValidBehaviour(behaviour) { + return Object.keys(behaviours).map(key => behaviours[key]).indexOf(behaviour) > -1; + } + + function getDefaultScopeBehaviour(scopeBehaviour) { + return scopeBehaviour && isValidBehaviour(scopeBehaviour) ? scopeBehaviour : behaviours.LOCAL; + } + + function generateScopedNameDefault(name, filename, css) { + const i = css.indexOf(`.${name}`); + const lineNumber = css.substr(0, i).split(/[\r\n]/).length; + const hash = (0, _stringHash.default)(css).toString(36).substr(0, 5); + return `_${name}_${hash}_${lineNumber}`; + } + + function getScopedNameGenerator(generateScopedName, hashPrefix) { + const scopedNameGenerator = generateScopedName || generateScopedNameDefault; + + if (typeof scopedNameGenerator === "function") { + return scopedNameGenerator; + } + + return (0, _genericNames.default)(scopedNameGenerator, { + context: process.cwd(), + hashPrefix: hashPrefix + }); + } + return scoping; +} + +var hasRequiredPluginFactory; + +function requirePluginFactory () { + if (hasRequiredPluginFactory) return pluginFactory; + hasRequiredPluginFactory = 1; + + Object.defineProperty(pluginFactory, "__esModule", { + value: true + }); + pluginFactory.makePlugin = makePlugin; + + var _postcss = _interopRequireDefault(require$$0$1); + + var _unquote = _interopRequireDefault(/*@__PURE__*/ requireUnquote()); + + var _Parser = _interopRequireDefault(/*@__PURE__*/ requireParser$1()); + + var _saveJSON = _interopRequireDefault(/*@__PURE__*/ requireSaveJSON()); + + var _localsConvention = /*@__PURE__*/ requireLocalsConvention(); + + var _FileSystemLoader = _interopRequireDefault(/*@__PURE__*/ requireFileSystemLoader()); + + var _scoping = /*@__PURE__*/ requireScoping(); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + const PLUGIN_NAME = "postcss-modules"; + + function isGlobalModule(globalModules, inputFile) { + return globalModules.some(regex => inputFile.match(regex)); + } + + function getDefaultPluginsList(opts, inputFile) { + const globalModulesList = opts.globalModulePaths || null; + const exportGlobals = opts.exportGlobals || false; + const defaultBehaviour = (0, _scoping.getDefaultScopeBehaviour)(opts.scopeBehaviour); + const generateScopedName = (0, _scoping.getScopedNameGenerator)(opts.generateScopedName, opts.hashPrefix); + + if (globalModulesList && isGlobalModule(globalModulesList, inputFile)) { + return (0, _scoping.getDefaultPlugins)({ + behaviour: _scoping.behaviours.GLOBAL, + generateScopedName, + exportGlobals + }); + } + + return (0, _scoping.getDefaultPlugins)({ + behaviour: defaultBehaviour, + generateScopedName, + exportGlobals + }); + } + + function getLoader(opts, plugins) { + const root = typeof opts.root === "undefined" ? "/" : opts.root; + return typeof opts.Loader === "function" ? new opts.Loader(root, plugins, opts.resolve) : new _FileSystemLoader.default(root, plugins, opts.resolve); + } + + function isOurPlugin(plugin) { + return plugin.postcssPlugin === PLUGIN_NAME; + } + + function makePlugin(opts) { + return { + postcssPlugin: PLUGIN_NAME, + + async OnceExit(css, { + result + }) { + const getJSON = opts.getJSON || _saveJSON.default; + const inputFile = css.source.input.file; + const pluginList = getDefaultPluginsList(opts, inputFile); + const resultPluginIndex = result.processor.plugins.findIndex(plugin => isOurPlugin(plugin)); + + if (resultPluginIndex === -1) { + throw new Error("Plugin missing from options."); + } + + const earlierPlugins = result.processor.plugins.slice(0, resultPluginIndex); + const loaderPlugins = [...earlierPlugins, ...pluginList]; + const loader = getLoader(opts, loaderPlugins); + + const fetcher = async (file, relativeTo, depTrace) => { + const unquoteFile = (0, _unquote.default)(file); + return loader.fetch.call(loader, unquoteFile, relativeTo, depTrace); + }; + + const parser = new _Parser.default(fetcher); + await (0, _postcss.default)([...pluginList, parser.plugin()]).process(css, { + from: inputFile + }); + const out = loader.finalSource; + if (out) css.prepend(out); + + if (opts.localsConvention) { + const reducer = (0, _localsConvention.makeLocalsConventionReducer)(opts.localsConvention, inputFile); + parser.exportTokens = Object.entries(parser.exportTokens).reduce(reducer, {}); + } + + result.messages.push({ + type: "export", + plugin: "postcss-modules", + exportTokens: parser.exportTokens + }); // getJSON may return a promise + + return getJSON(css.source.input.file, parser.exportTokens, result.opts.to); + } + + }; + } + return pluginFactory; +} + +var hasRequiredBuild; + +function requireBuild () { + if (hasRequiredBuild) return build.exports; + hasRequiredBuild = 1; + + var _fs = require$$0; + + var _fs2 = /*@__PURE__*/ requireFs(); + + var _pluginFactory = /*@__PURE__*/ requirePluginFactory(); + + (0, _fs2.setFileSystem)({ + readFile: _fs.readFile, + writeFile: _fs.writeFile + }); + + build.exports = (opts = {}) => (0, _pluginFactory.makePlugin)(opts); + + build.exports.postcss = true; + return build.exports; +} + +var buildExports = /*@__PURE__*/ requireBuild(); +var postcssModules = /*@__PURE__*/getDefaultExportFromCjs(buildExports); + +function compileStyle(options) { + return doCompileStyle({ + ...options, + isAsync: false + }); +} +function compileStyleAsync(options) { + return doCompileStyle({ + ...options, + isAsync: true + }); +} +function doCompileStyle(options) { + const { + filename, + id, + scoped = false, + trim = true, + isProd = false, + modules = false, + modulesOptions = {}, + preprocessLang, + postcssOptions, + postcssPlugins + } = options; + const preprocessor = preprocessLang && processors[preprocessLang]; + const preProcessedSource = preprocessor && preprocess(options, preprocessor); + const map = preProcessedSource ? preProcessedSource.map : options.inMap || options.map; + const source = preProcessedSource ? preProcessedSource.code : options.source; + const shortId = id.replace(/^data-v-/, ""); + const longId = `data-v-${shortId}`; + const plugins = (postcssPlugins || []).slice(); + plugins.unshift(cssVarsPlugin({ id: shortId, isProd })); + if (trim) { + plugins.push(trimPlugin()); + } + if (scoped) { + plugins.push(scopedPlugin(longId)); + } + let cssModules; + if (modules) { + if (!options.isAsync) { + throw new Error( + "[@vue/compiler-sfc] `modules` option can only be used with compileStyleAsync()." + ); + } + plugins.push( + postcssModules({ + ...modulesOptions, + getJSON: (_cssFileName, json) => { + cssModules = json; + } + }) + ); + } + const postCSSOptions = { + ...postcssOptions, + to: filename, + from: filename + }; + if (map) { + postCSSOptions.map = { + inline: false, + annotation: false, + prev: map + }; + } + let result; + let code; + let outMap; + const dependencies = new Set( + preProcessedSource ? preProcessedSource.dependencies : [] + ); + dependencies.delete(filename); + const errors = []; + if (preProcessedSource && preProcessedSource.errors.length) { + errors.push(...preProcessedSource.errors); + } + const recordPlainCssDependencies = (messages) => { + messages.forEach((msg) => { + if (msg.type === "dependency") { + dependencies.add(msg.file); + } + }); + return dependencies; + }; + try { + result = require$$0$1(plugins).process(source, postCSSOptions); + if (options.isAsync) { + return result.then((result2) => ({ + code: result2.css || "", + map: result2.map && result2.map.toJSON(), + errors, + modules: cssModules, + rawResult: result2, + dependencies: recordPlainCssDependencies(result2.messages) + })).catch((error) => ({ + code: "", + map: void 0, + errors: [...errors, error], + rawResult: void 0, + dependencies + })); + } + recordPlainCssDependencies(result.messages); + code = result.css; + outMap = result.map; + } catch (e) { + errors.push(e); + } + return { + code: code || ``, + map: outMap && outMap.toJSON(), + errors, + rawResult: result, + dependencies + }; +} +function preprocess(options, preprocessor) { + return preprocessor( + options.source, + options.inMap || options.map, + { + filename: options.filename, + ...options.preprocessOptions + }, + options.preprocessCustomRequire + ); +} + +const UNKNOWN_TYPE = "Unknown"; +function resolveObjectKey(node, computed) { + switch (node.type) { + case "StringLiteral": + case "NumericLiteral": + return String(node.value); + case "Identifier": + if (!computed) return node.name; + } + return void 0; +} +function concatStrings(strs) { + return strs.filter((s) => !!s).join(", "); +} +function isLiteralNode(node) { + return node.type.endsWith("Literal"); +} +function isCallOf(node, test) { + return !!(node && test && node.type === "CallExpression" && node.callee.type === "Identifier" && (typeof test === "string" ? node.callee.name === test : test(node.callee.name))); +} +function toRuntimeTypeString(types) { + return types.length > 1 ? `[${types.join(", ")}]` : types[0]; +} +function getImportedName(specifier) { + if (specifier.type === "ImportSpecifier") + return specifier.imported.type === "Identifier" ? specifier.imported.name : specifier.imported.value; + else if (specifier.type === "ImportNamespaceSpecifier") return "*"; + return "default"; +} +function getId(node) { + return node.type === "Identifier" ? node.name : node.type === "StringLiteral" ? node.value : null; +} +const identity = (str) => str; +const fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; +const toLowerCase = (str) => str.toLowerCase(); +function toFileNameLowerCase(x) { + return fileNameLowerCaseRegExp.test(x) ? x.replace(fileNameLowerCaseRegExp, toLowerCase) : x; +} +function createGetCanonicalFileName(useCaseSensitiveFileNames) { + return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; +} +const normalize = (path$1.posix || path$1).normalize; +const windowsSlashRE = /\\/g; +function normalizePath(p) { + return normalize(p.replace(windowsSlashRE, "/")); +} +const joinPaths = (path$1.posix || path$1).join; +const propNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~\-]/; +function getEscapedPropName(key) { + return propNameEscapeSymbolsRE.test(key) ? JSON.stringify(key) : key; +} + +function analyzeScriptBindings(ast) { + for (const node of ast) { + if (node.type === "ExportDefaultDeclaration" && node.declaration.type === "ObjectExpression") { + return analyzeBindingsFromOptions(node.declaration); + } + } + return {}; +} +function analyzeBindingsFromOptions(node) { + const bindings = {}; + Object.defineProperty(bindings, "__isScriptSetup", { + enumerable: false, + value: false + }); + for (const property of node.properties) { + if (property.type === "ObjectProperty" && !property.computed && property.key.type === "Identifier") { + if (property.key.name === "props") { + for (const key of getObjectOrArrayExpressionKeys(property.value)) { + bindings[key] = "props"; + } + } else if (property.key.name === "inject") { + for (const key of getObjectOrArrayExpressionKeys(property.value)) { + bindings[key] = "options"; + } + } else if (property.value.type === "ObjectExpression" && (property.key.name === "computed" || property.key.name === "methods")) { + for (const key of getObjectExpressionKeys(property.value)) { + bindings[key] = "options"; + } + } + } else if (property.type === "ObjectMethod" && property.key.type === "Identifier" && (property.key.name === "setup" || property.key.name === "data")) { + for (const bodyItem of property.body.body) { + if (bodyItem.type === "ReturnStatement" && bodyItem.argument && bodyItem.argument.type === "ObjectExpression") { + for (const key of getObjectExpressionKeys(bodyItem.argument)) { + bindings[key] = property.key.name === "setup" ? "setup-maybe-ref" : "data"; + } + } + } + } + } + return bindings; +} +function getObjectExpressionKeys(node) { + const keys = []; + for (const prop of node.properties) { + if (prop.type === "SpreadElement") continue; + const key = resolveObjectKey(prop.key, prop.computed); + if (key) keys.push(String(key)); + } + return keys; +} +function getArrayExpressionKeys(node) { + const keys = []; + for (const element of node.elements) { + if (element && element.type === "StringLiteral") { + keys.push(element.value); + } + } + return keys; +} +function getObjectOrArrayExpressionKeys(value) { + if (value.type === "ArrayExpression") { + return getArrayExpressionKeys(value); + } + if (value.type === "ObjectExpression") { + return getObjectExpressionKeys(value); + } + return []; +} + +var _a, _b; +class ScriptCompileContext { + constructor(descriptor, options) { + this.descriptor = descriptor; + this.options = options; + this.isCE = false; + this.source = this.descriptor.source; + this.filename = this.descriptor.filename; + this.s = new MagicString(this.source); + this.startOffset = (_a = this.descriptor.scriptSetup) == null ? void 0 : _a.loc.start.offset; + this.endOffset = (_b = this.descriptor.scriptSetup) == null ? void 0 : _b.loc.end.offset; + this.userImports = /* @__PURE__ */ Object.create(null); + // macros presence check + this.hasDefinePropsCall = false; + this.hasDefineEmitCall = false; + this.hasDefineExposeCall = false; + this.hasDefaultExportName = false; + this.hasDefaultExportRender = false; + this.hasDefineOptionsCall = false; + this.hasDefineSlotsCall = false; + this.hasDefineModelCall = false; + this.propsDestructuredBindings = /* @__PURE__ */ Object.create(null); + // defineModel + this.modelDecls = /* @__PURE__ */ Object.create(null); + // codegen + this.bindingMetadata = {}; + this.helperImports = /* @__PURE__ */ new Set(); + const { script, scriptSetup } = descriptor; + const scriptLang = script && script.lang; + const scriptSetupLang = scriptSetup && scriptSetup.lang; + this.isJS = scriptLang === "js" || scriptLang === "jsx" || scriptSetupLang === "js" || scriptSetupLang === "jsx"; + this.isTS = scriptLang === "ts" || scriptLang === "tsx" || scriptSetupLang === "ts" || scriptSetupLang === "tsx"; + const customElement = options.customElement; + const filename = this.descriptor.filename; + if (customElement) { + this.isCE = typeof customElement === "boolean" ? customElement : customElement(filename); + } + const plugins = resolveParserPlugins( + scriptLang || scriptSetupLang, + options.babelParserPlugins + ); + function parse(input, offset) { + try { + return parser$2.parse(input, { + plugins, + sourceType: "module" + }).program; + } catch (e) { + e.message = `[vue/compiler-sfc] ${e.message} + +${descriptor.filename} +${shared.generateCodeFrame( + descriptor.source, + e.pos + offset, + e.pos + offset + 1 + )}`; + throw e; + } + } + this.scriptAst = descriptor.script && parse(descriptor.script.content, descriptor.script.loc.start.offset); + this.scriptSetupAst = descriptor.scriptSetup && parse(descriptor.scriptSetup.content, this.startOffset); + } + helper(key) { + this.helperImports.add(key); + return `_${key}`; + } + getString(node, scriptSetup = true) { + const block = scriptSetup ? this.descriptor.scriptSetup : this.descriptor.script; + return block.content.slice(node.start, node.end); + } + warn(msg, node, scope) { + warn(generateError(msg, node, this, scope)); + } + error(msg, node, scope) { + throw new Error( + `[@vue/compiler-sfc] ${generateError(msg, node, this, scope)}` + ); + } +} +function generateError(msg, node, ctx, scope) { + const offset = scope ? scope.offset : ctx.startOffset; + return `${msg} + +${(scope || ctx.descriptor).filename} +${shared.generateCodeFrame( + (scope || ctx.descriptor).source, + node.start + offset, + node.end + offset + )}`; +} +function resolveParserPlugins(lang, userPlugins, dts = false) { + const plugins = []; + if (!userPlugins || !userPlugins.some( + (p) => p === "importAssertions" || p === "importAttributes" || shared.isArray(p) && p[0] === "importAttributes" + )) { + plugins.push("importAttributes"); + } + if (lang === "jsx" || lang === "tsx" || lang === "mtsx") { + plugins.push("jsx"); + } else if (userPlugins) { + userPlugins = userPlugins.filter((p) => p !== "jsx"); + } + if (lang === "ts" || lang === "mts" || lang === "tsx" || lang === "mtsx") { + plugins.push(["typescript", { dts }], "explicitResourceManagement"); + if (!userPlugins || !userPlugins.includes("decorators")) { + plugins.push("decorators-legacy"); + } + } + if (userPlugins) { + plugins.push(...userPlugins); + } + return plugins; +} + +function rewriteDefault(input, as, parserPlugins) { + const ast = parser$2.parse(input, { + sourceType: "module", + plugins: resolveParserPlugins("js", parserPlugins) + }).program.body; + const s = new MagicString(input); + rewriteDefaultAST(ast, s, as); + return s.toString(); +} +function rewriteDefaultAST(ast, s, as) { + if (!hasDefaultExport(ast)) { + s.append(` +const ${as} = {}`); + return; + } + ast.forEach((node) => { + if (node.type === "ExportDefaultDeclaration") { + if (node.declaration.type === "ClassDeclaration" && node.declaration.id) { + let start = node.declaration.decorators && node.declaration.decorators.length > 0 ? node.declaration.decorators[node.declaration.decorators.length - 1].end : node.start; + s.overwrite(start, node.declaration.id.start, ` class `); + s.append(` +const ${as} = ${node.declaration.id.name}`); + } else { + s.overwrite(node.start, node.declaration.start, `const ${as} = `); + } + } else if (node.type === "ExportNamedDeclaration") { + for (const specifier of node.specifiers) { + if (specifier.type === "ExportSpecifier" && specifier.exported.type === "Identifier" && specifier.exported.name === "default") { + if (node.source) { + if (specifier.local.name === "default") { + s.prepend( + `import { default as __VUE_DEFAULT__ } from '${node.source.value}' +` + ); + const end2 = specifierEnd(s, specifier.local.end, node.end); + s.remove(specifier.start, end2); + s.append(` +const ${as} = __VUE_DEFAULT__`); + continue; + } else { + s.prepend( + `import { ${s.slice( + specifier.local.start, + specifier.local.end + )} as __VUE_DEFAULT__ } from '${node.source.value}' +` + ); + const end2 = specifierEnd(s, specifier.exported.end, node.end); + s.remove(specifier.start, end2); + s.append(` +const ${as} = __VUE_DEFAULT__`); + continue; + } + } + const end = specifierEnd(s, specifier.end, node.end); + s.remove(specifier.start, end); + s.append(` +const ${as} = ${specifier.local.name}`); + } + } + } + }); +} +function hasDefaultExport(ast) { + for (const stmt of ast) { + if (stmt.type === "ExportDefaultDeclaration") { + return true; + } else if (stmt.type === "ExportNamedDeclaration" && stmt.specifiers.some( + (spec) => spec.exported.name === "default" + )) { + return true; + } + } + return false; +} +function specifierEnd(s, end, nodeEnd) { + let hasCommas = false; + let oldEnd = end; + while (end < nodeEnd) { + if (/\s/.test(s.slice(end, end + 1))) { + end++; + } else if (s.slice(end, end + 1) === ",") { + end++; + hasCommas = true; + break; + } else if (s.slice(end, end + 1) === "}") { + break; + } + } + return hasCommas ? end : oldEnd; +} + +const normalScriptDefaultVar = `__default__`; +function processNormalScript(ctx, scopeId) { + var _a; + const script = ctx.descriptor.script; + if (script.lang && !ctx.isJS && !ctx.isTS) { + return script; + } + try { + let content = script.content; + let map = script.map; + const scriptAst = ctx.scriptAst; + const bindings = analyzeScriptBindings(scriptAst.body); + const { cssVars } = ctx.descriptor; + const { genDefaultAs, isProd } = ctx.options; + if (cssVars.length || genDefaultAs) { + const defaultVar = genDefaultAs || normalScriptDefaultVar; + const s = new MagicString(content); + rewriteDefaultAST(scriptAst.body, s, defaultVar); + content = s.toString(); + if (cssVars.length && !((_a = ctx.options.templateOptions) == null ? void 0 : _a.ssr)) { + content += genNormalScriptCssVarsCode( + cssVars, + bindings, + scopeId, + !!isProd, + defaultVar + ); + } + if (!genDefaultAs) { + content += ` +export default ${defaultVar}`; + } + } + return { + ...script, + content, + map, + bindings, + scriptAst: scriptAst.body + }; + } catch (e) { + return script; + } +} + +var balancedMatch; +var hasRequiredBalancedMatch; + +function requireBalancedMatch () { + if (hasRequiredBalancedMatch) return balancedMatch; + hasRequiredBalancedMatch = 1; + balancedMatch = balanced; + function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; + } + + function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; + } + + balanced.range = range; + function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + if(a===b) { + return [ai, bi]; + } + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; + } + return balancedMatch; +} + +var braceExpansion; +var hasRequiredBraceExpansion; + +function requireBraceExpansion () { + if (hasRequiredBraceExpansion) return braceExpansion; + hasRequiredBraceExpansion = 1; + var balanced = /*@__PURE__*/ requireBalancedMatch(); + + braceExpansion = expandTop; + + var escSlash = '\0SLASH'+Math.random()+'\0'; + var escOpen = '\0OPEN'+Math.random()+'\0'; + var escClose = '\0CLOSE'+Math.random()+'\0'; + var escComma = '\0COMMA'+Math.random()+'\0'; + var escPeriod = '\0PERIOD'+Math.random()+'\0'; + + function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); + } + + function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); + } + + function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); + } + + + // Basically just str.split(","), but handling cases + // where we have nested braced sections, which should be + // treated as individual members, like {a,{b,c},d} + function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; + } + + function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); + } + + function embrace(str) { + return '{' + str + '}'; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + + function lte(i, y) { + return i <= y; + } + function gte(i, y) { + return i >= y; + } + + function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m) return [str]; + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + if (/\$$/.test(m.pre)) { + for (var k = 0; k < post.length; k++) { + var expansion = pre+ '{' + m.body + '}' + post[k]; + expansions.push(expansion); + } + } else { + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = []; + + for (var j = 0; j < n.length; j++) { + N.push.apply(N, expand(n[j], false)); + } + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + } + + return expansions; + } + return braceExpansion; +} + +var braceExpansionExports = /*@__PURE__*/ requireBraceExpansion(); +var expand = /*@__PURE__*/getDefaultExportFromCjs(braceExpansionExports); + +const MAX_PATTERN_LENGTH = 1024 * 64; +const assertValidPattern = (pattern) => { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern'); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long'); + } +}; + +// translate the various posix character classes into unicode properties +// this works across all unicode locales +// { <posix class>: [<translation>, /u flag required, negated] +const posixClasses = { + '[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}', true], + '[:alpha:]': ['\\p{L}\\p{Nl}', true], + '[:ascii:]': ['\\x' + '00-\\x' + '7f', false], + '[:blank:]': ['\\p{Zs}\\t', true], + '[:cntrl:]': ['\\p{Cc}', true], + '[:digit:]': ['\\p{Nd}', true], + '[:graph:]': ['\\p{Z}\\p{C}', true, true], + '[:lower:]': ['\\p{Ll}', true], + '[:print:]': ['\\p{C}', true], + '[:punct:]': ['\\p{P}', true], + '[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f', true], + '[:upper:]': ['\\p{Lu}', true], + '[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}', true], + '[:xdigit:]': ['A-Fa-f0-9', false], +}; +// only need to escape a few things inside of brace expressions +// escapes: [ \ ] - +const braceEscape = (s) => s.replace(/[[\]\\-]/g, '\\$&'); +// escape all regexp magic characters +const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +// everything has already been escaped, we just have to join +const rangesToString = (ranges) => ranges.join(''); +// takes a glob string at a posix brace expression, and returns +// an equivalent regular expression source, and boolean indicating +// whether the /u flag needs to be applied, and the number of chars +// consumed to parse the character class. +// This also removes out of order ranges, and returns ($.) if the +// entire class just no good. +const parseClass = (glob, position) => { + const pos = position; + /* c8 ignore start */ + if (glob.charAt(pos) !== '[') { + throw new Error('not in a brace expression'); + } + /* c8 ignore stop */ + const ranges = []; + const negs = []; + let i = pos + 1; + let sawStart = false; + let uflag = false; + let escaping = false; + let negate = false; + let endPos = pos; + let rangeStart = ''; + WHILE: while (i < glob.length) { + const c = glob.charAt(i); + if ((c === '!' || c === '^') && i === pos + 1) { + negate = true; + i++; + continue; + } + if (c === ']' && sawStart && !escaping) { + endPos = i + 1; + break; + } + sawStart = true; + if (c === '\\') { + if (!escaping) { + escaping = true; + i++; + continue; + } + // escaped \ char, fall through and treat like normal char + } + if (c === '[' && !escaping) { + // either a posix class, a collation equivalent, or just a [ + for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) { + if (glob.startsWith(cls, i)) { + // invalid, [a-[] is fine, but not [a-[:alpha]] + if (rangeStart) { + return ['$.', false, glob.length - pos, true]; + } + i += cls.length; + if (neg) + negs.push(unip); + else + ranges.push(unip); + uflag = uflag || u; + continue WHILE; + } + } + } + // now it's just a normal character, effectively + escaping = false; + if (rangeStart) { + // throw this range away if it's not valid, but others + // can still match. + if (c > rangeStart) { + ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c)); + } + else if (c === rangeStart) { + ranges.push(braceEscape(c)); + } + rangeStart = ''; + i++; + continue; + } + // now might be the start of a range. + // can be either c-d or c-] or c<more...>] or c] at this point + if (glob.startsWith('-]', i + 1)) { + ranges.push(braceEscape(c + '-')); + i += 2; + continue; + } + if (glob.startsWith('-', i + 1)) { + rangeStart = c; + i += 2; + continue; + } + // not the start of a range, just a single character + ranges.push(braceEscape(c)); + i++; + } + if (endPos < i) { + // didn't see the end of the class, not a valid class, + // but might still be valid as a literal match. + return ['', false, 0, false]; + } + // if we got no ranges and no negates, then we have a range that + // cannot possibly match anything, and that poisons the whole glob + if (!ranges.length && !negs.length) { + return ['$.', false, glob.length - pos, true]; + } + // if we got one positive range, and it's a single character, then that's + // not actually a magic pattern, it's just that one literal character. + // we should not treat that as "magic", we should just return the literal + // character. [_] is a perfectly valid way to escape glob magic chars. + if (negs.length === 0 && + ranges.length === 1 && + /^\\?.$/.test(ranges[0]) && + !negate) { + const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]; + return [regexpEscape(r), false, endPos - pos, false]; + } + const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'; + const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'; + const comb = ranges.length && negs.length + ? '(' + sranges + '|' + snegs + ')' + : ranges.length + ? sranges + : snegs; + return [comb, uflag, endPos - pos, true]; +}; + +/** + * Un-escape a string that has been escaped with {@link escape}. + * + * If the {@link windowsPathsNoEscape} option is used, then square-brace + * escapes are removed, but not backslash escapes. For example, it will turn + * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`, + * becuase `\` is a path separator in `windowsPathsNoEscape` mode. + * + * When `windowsPathsNoEscape` is not set, then both brace escapes and + * backslash escapes are removed. + * + * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped + * or unescaped. + */ +const unescape = (s, { windowsPathsNoEscape = false, } = {}) => { + return windowsPathsNoEscape + ? s.replace(/\[([^\/\\])\]/g, '$1') + : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2').replace(/\\([^\/])/g, '$1'); +}; + +// parse a single path portion +const types = new Set(['!', '?', '+', '*', '@']); +const isExtglobType = (c) => types.has(c); +// Patterns that get prepended to bind to the start of either the +// entire string, or just a single path portion, to prevent dots +// and/or traversal patterns, when needed. +// Exts don't need the ^ or / bit, because the root binds that already. +const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))'; +const startNoDot = '(?!\\.)'; +// characters that indicate a start of pattern needs the "no dots" bit, +// because a dot *might* be matched. ( is not in the list, because in +// the case of a child extglob, it will handle the prevention itself. +const addPatternStart = new Set(['[', '.']); +// cases where traversal is A-OK, no dot prevention needed +const justDots = new Set(['..', '.']); +const reSpecials = new Set('().*{}+?[]^$\\!'); +const regExpEscape$1 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +// any single thing other than / +const qmark$1 = '[^/]'; +// * => any number of characters +const star$1 = qmark$1 + '*?'; +// use + when we need to ensure that *something* matches, because the * is +// the only thing in the path portion. +const starNoEmpty = qmark$1 + '+?'; +// remove the \ chars that we added if we end up doing a nonmagic compare +// const deslash = (s: string) => s.replace(/\\(.)/g, '$1') +class AST { + type; + #root; + #hasMagic; + #uflag = false; + #parts = []; + #parent; + #parentIndex; + #negs; + #filledNegs = false; + #options; + #toString; + // set to true if it's an extglob with no children + // (which really means one child of '') + #emptyExt = false; + constructor(type, parent, options = {}) { + this.type = type; + // extglobs are inherently magical + if (type) + this.#hasMagic = true; + this.#parent = parent; + this.#root = this.#parent ? this.#parent.#root : this; + this.#options = this.#root === this ? options : this.#root.#options; + this.#negs = this.#root === this ? [] : this.#root.#negs; + if (type === '!' && !this.#root.#filledNegs) + this.#negs.push(this); + this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0; + } + get hasMagic() { + /* c8 ignore start */ + if (this.#hasMagic !== undefined) + return this.#hasMagic; + /* c8 ignore stop */ + for (const p of this.#parts) { + if (typeof p === 'string') + continue; + if (p.type || p.hasMagic) + return (this.#hasMagic = true); + } + // note: will be undefined until we generate the regexp src and find out + return this.#hasMagic; + } + // reconstructs the pattern + toString() { + if (this.#toString !== undefined) + return this.#toString; + if (!this.type) { + return (this.#toString = this.#parts.map(p => String(p)).join('')); + } + else { + return (this.#toString = + this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')'); + } + } + #fillNegs() { + /* c8 ignore start */ + if (this !== this.#root) + throw new Error('should only call on root'); + if (this.#filledNegs) + return this; + /* c8 ignore stop */ + // call toString() once to fill this out + this.toString(); + this.#filledNegs = true; + let n; + while ((n = this.#negs.pop())) { + if (n.type !== '!') + continue; + // walk up the tree, appending everthing that comes AFTER parentIndex + let p = n; + let pp = p.#parent; + while (pp) { + for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) { + for (const part of n.#parts) { + /* c8 ignore start */ + if (typeof part === 'string') { + throw new Error('string part in extglob AST??'); + } + /* c8 ignore stop */ + part.copyIn(pp.#parts[i]); + } + } + p = pp; + pp = p.#parent; + } + } + return this; + } + push(...parts) { + for (const p of parts) { + if (p === '') + continue; + /* c8 ignore start */ + if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) { + throw new Error('invalid part: ' + p); + } + /* c8 ignore stop */ + this.#parts.push(p); + } + } + toJSON() { + const ret = this.type === null + ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON())) + : [this.type, ...this.#parts.map(p => p.toJSON())]; + if (this.isStart() && !this.type) + ret.unshift([]); + if (this.isEnd() && + (this === this.#root || + (this.#root.#filledNegs && this.#parent?.type === '!'))) { + ret.push({}); + } + return ret; + } + isStart() { + if (this.#root === this) + return true; + // if (this.type) return !!this.#parent?.isStart() + if (!this.#parent?.isStart()) + return false; + if (this.#parentIndex === 0) + return true; + // if everything AHEAD of this is a negation, then it's still the "start" + const p = this.#parent; + for (let i = 0; i < this.#parentIndex; i++) { + const pp = p.#parts[i]; + if (!(pp instanceof AST && pp.type === '!')) { + return false; + } + } + return true; + } + isEnd() { + if (this.#root === this) + return true; + if (this.#parent?.type === '!') + return true; + if (!this.#parent?.isEnd()) + return false; + if (!this.type) + return this.#parent?.isEnd(); + // if not root, it'll always have a parent + /* c8 ignore start */ + const pl = this.#parent ? this.#parent.#parts.length : 0; + /* c8 ignore stop */ + return this.#parentIndex === pl - 1; + } + copyIn(part) { + if (typeof part === 'string') + this.push(part); + else + this.push(part.clone(this)); + } + clone(parent) { + const c = new AST(this.type, parent); + for (const p of this.#parts) { + c.copyIn(p); + } + return c; + } + static #parseAST(str, ast, pos, opt) { + let escaping = false; + let inBrace = false; + let braceStart = -1; + let braceNeg = false; + if (ast.type === null) { + // outside of a extglob, append until we find a start + let i = pos; + let acc = ''; + while (i < str.length) { + const c = str.charAt(i++); + // still accumulate escapes at this point, but we do ignore + // starts that are escaped + if (escaping || c === '\\') { + escaping = !escaping; + acc += c; + continue; + } + if (inBrace) { + if (i === braceStart + 1) { + if (c === '^' || c === '!') { + braceNeg = true; + } + } + else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { + inBrace = false; + } + acc += c; + continue; + } + else if (c === '[') { + inBrace = true; + braceStart = i; + braceNeg = false; + acc += c; + continue; + } + if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') { + ast.push(acc); + acc = ''; + const ext = new AST(c, ast); + i = AST.#parseAST(str, ext, i, opt); + ast.push(ext); + continue; + } + acc += c; + } + ast.push(acc); + return i; + } + // some kind of extglob, pos is at the ( + // find the next | or ) + let i = pos + 1; + let part = new AST(null, ast); + const parts = []; + let acc = ''; + while (i < str.length) { + const c = str.charAt(i++); + // still accumulate escapes at this point, but we do ignore + // starts that are escaped + if (escaping || c === '\\') { + escaping = !escaping; + acc += c; + continue; + } + if (inBrace) { + if (i === braceStart + 1) { + if (c === '^' || c === '!') { + braceNeg = true; + } + } + else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { + inBrace = false; + } + acc += c; + continue; + } + else if (c === '[') { + inBrace = true; + braceStart = i; + braceNeg = false; + acc += c; + continue; + } + if (isExtglobType(c) && str.charAt(i) === '(') { + part.push(acc); + acc = ''; + const ext = new AST(c, part); + part.push(ext); + i = AST.#parseAST(str, ext, i, opt); + continue; + } + if (c === '|') { + part.push(acc); + acc = ''; + parts.push(part); + part = new AST(null, ast); + continue; + } + if (c === ')') { + if (acc === '' && ast.#parts.length === 0) { + ast.#emptyExt = true; + } + part.push(acc); + acc = ''; + ast.push(...parts, part); + return i; + } + acc += c; + } + // unfinished extglob + // if we got here, it was a malformed extglob! not an extglob, but + // maybe something else in there. + ast.type = null; + ast.#hasMagic = undefined; + ast.#parts = [str.substring(pos - 1)]; + return i; + } + static fromGlob(pattern, options = {}) { + const ast = new AST(null, undefined, options); + AST.#parseAST(pattern, ast, 0, options); + return ast; + } + // returns the regular expression if there's magic, or the unescaped + // string if not. + toMMPattern() { + // should only be called on root + /* c8 ignore start */ + if (this !== this.#root) + return this.#root.toMMPattern(); + /* c8 ignore stop */ + const glob = this.toString(); + const [re, body, hasMagic, uflag] = this.toRegExpSource(); + // if we're in nocase mode, and not nocaseMagicOnly, then we do + // still need a regular expression if we have to case-insensitively + // match capital/lowercase characters. + const anyMagic = hasMagic || + this.#hasMagic || + (this.#options.nocase && + !this.#options.nocaseMagicOnly && + glob.toUpperCase() !== glob.toLowerCase()); + if (!anyMagic) { + return body; + } + const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : ''); + return Object.assign(new RegExp(`^${re}$`, flags), { + _src: re, + _glob: glob, + }); + } + get options() { + return this.#options; + } + // returns the string match, the regexp source, whether there's magic + // in the regexp (so a regular expression is required) and whether or + // not the uflag is needed for the regular expression (for posix classes) + // TODO: instead of injecting the start/end at this point, just return + // the BODY of the regexp, along with the start/end portions suitable + // for binding the start/end in either a joined full-path makeRe context + // (where we bind to (^|/), or a standalone matchPart context (where + // we bind to ^, and not /). Otherwise slashes get duped! + // + // In part-matching mode, the start is: + // - if not isStart: nothing + // - if traversal possible, but not allowed: ^(?!\.\.?$) + // - if dots allowed or not possible: ^ + // - if dots possible and not allowed: ^(?!\.) + // end is: + // - if not isEnd(): nothing + // - else: $ + // + // In full-path matching mode, we put the slash at the START of the + // pattern, so start is: + // - if first pattern: same as part-matching mode + // - if not isStart(): nothing + // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/)) + // - if dots allowed or not possible: / + // - if dots possible and not allowed: /(?!\.) + // end is: + // - if last pattern, same as part-matching mode + // - else nothing + // + // Always put the (?:$|/) on negated tails, though, because that has to be + // there to bind the end of the negated pattern portion, and it's easier to + // just stick it in now rather than try to inject it later in the middle of + // the pattern. + // + // We can just always return the same end, and leave it up to the caller + // to know whether it's going to be used joined or in parts. + // And, if the start is adjusted slightly, can do the same there: + // - if not isStart: nothing + // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$) + // - if dots allowed or not possible: (?:/|^) + // - if dots possible and not allowed: (?:/|^)(?!\.) + // + // But it's better to have a simpler binding without a conditional, for + // performance, so probably better to return both start options. + // + // Then the caller just ignores the end if it's not the first pattern, + // and the start always gets applied. + // + // But that's always going to be $ if it's the ending pattern, or nothing, + // so the caller can just attach $ at the end of the pattern when building. + // + // So the todo is: + // - better detect what kind of start is needed + // - return both flavors of starting pattern + // - attach $ at the end of the pattern when creating the actual RegExp + // + // Ah, but wait, no, that all only applies to the root when the first pattern + // is not an extglob. If the first pattern IS an extglob, then we need all + // that dot prevention biz to live in the extglob portions, because eg + // +(*|.x*) can match .xy but not .yx. + // + // So, return the two flavors if it's #root and the first child is not an + // AST, otherwise leave it to the child AST to handle it, and there, + // use the (?:^|/) style of start binding. + // + // Even simplified further: + // - Since the start for a join is eg /(?!\.) and the start for a part + // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root + // or start or whatever) and prepend ^ or / at the Regexp construction. + toRegExpSource(allowDot) { + const dot = allowDot ?? !!this.#options.dot; + if (this.#root === this) + this.#fillNegs(); + if (!this.type) { + const noEmpty = this.isStart() && this.isEnd(); + const src = this.#parts + .map(p => { + const [re, _, hasMagic, uflag] = typeof p === 'string' + ? AST.#parseGlob(p, this.#hasMagic, noEmpty) + : p.toRegExpSource(allowDot); + this.#hasMagic = this.#hasMagic || hasMagic; + this.#uflag = this.#uflag || uflag; + return re; + }) + .join(''); + let start = ''; + if (this.isStart()) { + if (typeof this.#parts[0] === 'string') { + // this is the string that will match the start of the pattern, + // so we need to protect against dots and such. + // '.' and '..' cannot match unless the pattern is that exactly, + // even if it starts with . or dot:true is set. + const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]); + if (!dotTravAllowed) { + const aps = addPatternStart; + // check if we have a possibility of matching . or .., + // and prevent that. + const needNoTrav = + // dots are allowed, and the pattern starts with [ or . + (dot && aps.has(src.charAt(0))) || + // the pattern starts with \., and then [ or . + (src.startsWith('\\.') && aps.has(src.charAt(2))) || + // the pattern starts with \.\., and then [ or . + (src.startsWith('\\.\\.') && aps.has(src.charAt(4))); + // no need to prevent dots if it can't match a dot, or if a + // sub-pattern will be preventing it anyway. + const needNoDot = !dot && !allowDot && aps.has(src.charAt(0)); + start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''; + } + } + } + // append the "end of path portion" pattern to negation tails + let end = ''; + if (this.isEnd() && + this.#root.#filledNegs && + this.#parent?.type === '!') { + end = '(?:$|\\/)'; + } + const final = start + src + end; + return [ + final, + unescape(src), + (this.#hasMagic = !!this.#hasMagic), + this.#uflag, + ]; + } + // We need to calculate the body *twice* if it's a repeat pattern + // at the start, once in nodot mode, then again in dot mode, so a + // pattern like *(?) can match 'x.y' + const repeated = this.type === '*' || this.type === '+'; + // some kind of extglob + const start = this.type === '!' ? '(?:(?!(?:' : '(?:'; + let body = this.#partsToRegExp(dot); + if (this.isStart() && this.isEnd() && !body && this.type !== '!') { + // invalid extglob, has to at least be *something* present, if it's + // the entire path portion. + const s = this.toString(); + this.#parts = [s]; + this.type = null; + this.#hasMagic = undefined; + return [s, unescape(this.toString()), false, false]; + } + // XXX abstract out this map method + let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot + ? '' + : this.#partsToRegExp(true); + if (bodyDotAllowed === body) { + bodyDotAllowed = ''; + } + if (bodyDotAllowed) { + body = `(?:${body})(?:${bodyDotAllowed})*?`; + } + // an empty !() is exactly equivalent to a starNoEmpty + let final = ''; + if (this.type === '!' && this.#emptyExt) { + final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty; + } + else { + const close = this.type === '!' + ? // !() must match something,but !(x) can match '' + '))' + + (this.isStart() && !dot && !allowDot ? startNoDot : '') + + star$1 + + ')' + : this.type === '@' + ? ')' + : this.type === '?' + ? ')?' + : this.type === '+' && bodyDotAllowed + ? ')' + : this.type === '*' && bodyDotAllowed + ? `)?` + : `)${this.type}`; + final = start + body + close; + } + return [ + final, + unescape(body), + (this.#hasMagic = !!this.#hasMagic), + this.#uflag, + ]; + } + #partsToRegExp(dot) { + return this.#parts + .map(p => { + // extglob ASTs should only contain parent ASTs + /* c8 ignore start */ + if (typeof p === 'string') { + throw new Error('string type in extglob ast??'); + } + /* c8 ignore stop */ + // can ignore hasMagic, because extglobs are already always magic + const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot); + this.#uflag = this.#uflag || uflag; + return re; + }) + .filter(p => !(this.isStart() && this.isEnd()) || !!p) + .join('|'); + } + static #parseGlob(glob, hasMagic, noEmpty = false) { + let escaping = false; + let re = ''; + let uflag = false; + for (let i = 0; i < glob.length; i++) { + const c = glob.charAt(i); + if (escaping) { + escaping = false; + re += (reSpecials.has(c) ? '\\' : '') + c; + continue; + } + if (c === '\\') { + if (i === glob.length - 1) { + re += '\\\\'; + } + else { + escaping = true; + } + continue; + } + if (c === '[') { + const [src, needUflag, consumed, magic] = parseClass(glob, i); + if (consumed) { + re += src; + uflag = uflag || needUflag; + i += consumed - 1; + hasMagic = hasMagic || magic; + continue; + } + } + if (c === '*') { + if (noEmpty && glob === '*') + re += starNoEmpty; + else + re += star$1; + hasMagic = true; + continue; + } + if (c === '?') { + re += qmark$1; + hasMagic = true; + continue; + } + re += regExpEscape$1(c); + } + return [re, unescape(glob), !!hasMagic, uflag]; + } +} + +/** + * Escape all magic characters in a glob pattern. + * + * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape} + * option is used, then characters are escaped by wrapping in `[]`, because + * a magic character wrapped in a character class can only be satisfied by + * that exact character. In this mode, `\` is _not_ escaped, because it is + * not interpreted as a magic character, but instead as a path separator. + */ +const escape = (s, { windowsPathsNoEscape = false, } = {}) => { + // don't need to escape +@! because we escape the parens + // that make those magic, and escaping ! as [!] isn't valid, + // because [!]] is a valid glob class meaning not ']'. + return windowsPathsNoEscape + ? s.replace(/[?*()[\]]/g, '[$&]') + : s.replace(/[?*()[\]\\]/g, '\\$&'); +}; + +const minimatch = (p, pattern, options = {}) => { + assertValidPattern(pattern); + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false; + } + return new Minimatch(pattern, options).match(p); +}; +// Optimized checking for the most common glob patterns. +const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/; +const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext); +const starDotExtTestDot = (ext) => (f) => f.endsWith(ext); +const starDotExtTestNocase = (ext) => { + ext = ext.toLowerCase(); + return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext); +}; +const starDotExtTestNocaseDot = (ext) => { + ext = ext.toLowerCase(); + return (f) => f.toLowerCase().endsWith(ext); +}; +const starDotStarRE = /^\*+\.\*+$/; +const starDotStarTest = (f) => !f.startsWith('.') && f.includes('.'); +const starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.'); +const dotStarRE = /^\.\*+$/; +const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.'); +const starRE = /^\*+$/; +const starTest = (f) => f.length !== 0 && !f.startsWith('.'); +const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..'; +const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/; +const qmarksTestNocase = ([$0, ext = '']) => { + const noext = qmarksTestNoExt([$0]); + if (!ext) + return noext; + ext = ext.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext); +}; +const qmarksTestNocaseDot = ([$0, ext = '']) => { + const noext = qmarksTestNoExtDot([$0]); + if (!ext) + return noext; + ext = ext.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext); +}; +const qmarksTestDot = ([$0, ext = '']) => { + const noext = qmarksTestNoExtDot([$0]); + return !ext ? noext : (f) => noext(f) && f.endsWith(ext); +}; +const qmarksTest = ([$0, ext = '']) => { + const noext = qmarksTestNoExt([$0]); + return !ext ? noext : (f) => noext(f) && f.endsWith(ext); +}; +const qmarksTestNoExt = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && !f.startsWith('.'); +}; +const qmarksTestNoExtDot = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && f !== '.' && f !== '..'; +}; +/* c8 ignore start */ +const defaultPlatform = (typeof process === 'object' && process + ? (typeof process.env === 'object' && + process.env && + process.env.__MINIMATCH_TESTING_PLATFORM__) || + process.platform + : 'posix'); +const path = { + win32: { sep: '\\' }, + posix: { sep: '/' }, +}; +/* c8 ignore stop */ +const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep; +minimatch.sep = sep; +const GLOBSTAR = Symbol('globstar **'); +minimatch.GLOBSTAR = GLOBSTAR; +// any single thing other than / +// don't need to escape / when using new RegExp() +const qmark = '[^/]'; +// * => any number of characters +const star = qmark + '*?'; +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?'; +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?'; +const filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options); +minimatch.filter = filter; +const ext = (a, b = {}) => Object.assign({}, a, b); +const defaults = (def) => { + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch; + } + const orig = minimatch; + const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options)); + return Object.assign(m, { + Minimatch: class Minimatch extends orig.Minimatch { + constructor(pattern, options = {}) { + super(pattern, ext(def, options)); + } + static defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + } + }, + AST: class AST extends orig.AST { + /* c8 ignore start */ + constructor(type, parent, options = {}) { + super(type, parent, ext(def, options)); + } + /* c8 ignore stop */ + static fromGlob(pattern, options = {}) { + return orig.AST.fromGlob(pattern, ext(def, options)); + } + }, + unescape: (s, options = {}) => orig.unescape(s, ext(def, options)), + escape: (s, options = {}) => orig.escape(s, ext(def, options)), + filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)), + defaults: (options) => orig.defaults(ext(def, options)), + makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)), + braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)), + match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)), + sep: orig.sep, + GLOBSTAR: GLOBSTAR, + }); +}; +minimatch.defaults = defaults; +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +const braceExpand = (pattern, options = {}) => { + assertValidPattern(pattern); + // Thanks to Yeting Li <https://github.com/yetingli> for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + // shortcut. no need to expand. + return [pattern]; + } + return expand(pattern); +}; +minimatch.braceExpand = braceExpand; +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe(); +minimatch.makeRe = makeRe; +const match = (list, pattern, options = {}) => { + const mm = new Minimatch(pattern, options); + list = list.filter(f => mm.match(f)); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; +}; +minimatch.match = match; +// replace stuff like \* with * +const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/; +const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +class Minimatch { + options; + set; + pattern; + windowsPathsNoEscape; + nonegate; + negate; + comment; + empty; + preserveMultipleSlashes; + partial; + globSet; + globParts; + nocase; + isWindows; + platform; + windowsNoMagicRoot; + regexp; + constructor(pattern, options = {}) { + assertValidPattern(pattern); + options = options || {}; + this.options = options; + this.pattern = pattern; + this.platform = options.platform || defaultPlatform; + this.isWindows = this.platform === 'win32'; + this.windowsPathsNoEscape = + !!options.windowsPathsNoEscape || options.allowWindowsEscape === false; + if (this.windowsPathsNoEscape) { + this.pattern = this.pattern.replace(/\\/g, '/'); + } + this.preserveMultipleSlashes = !!options.preserveMultipleSlashes; + this.regexp = null; + this.negate = false; + this.nonegate = !!options.nonegate; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.nocase = !!this.options.nocase; + this.windowsNoMagicRoot = + options.windowsNoMagicRoot !== undefined + ? options.windowsNoMagicRoot + : !!(this.isWindows && this.nocase); + this.globSet = []; + this.globParts = []; + this.set = []; + // make the set of regexps etc. + this.make(); + } + hasMagic() { + if (this.options.magicalBraces && this.set.length > 1) { + return true; + } + for (const pattern of this.set) { + for (const part of pattern) { + if (typeof part !== 'string') + return true; + } + } + return false; + } + debug(..._) { } + make() { + const pattern = this.pattern; + const options = this.options; + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + // step 1: figure out negation, etc. + this.parseNegate(); + // step 2: expand braces + this.globSet = [...new Set(this.braceExpand())]; + if (options.debug) { + this.debug = (...args) => console.error(...args); + } + this.debug(this.pattern, this.globSet); + // step 3: now we have a set, so turn each one into a series of + // path-portion matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + // + // First, we preprocess to make the glob pattern sets a bit simpler + // and deduped. There are some perf-killing patterns that can cause + // problems with a glob walk, but we can simplify them down a bit. + const rawGlobParts = this.globSet.map(s => this.slashSplit(s)); + this.globParts = this.preprocess(rawGlobParts); + this.debug(this.pattern, this.globParts); + // glob --> regexps + let set = this.globParts.map((s, _, __) => { + if (this.isWindows && this.windowsNoMagicRoot) { + // check if it's a drive or unc path. + const isUNC = s[0] === '' && + s[1] === '' && + (s[2] === '?' || !globMagic.test(s[2])) && + !globMagic.test(s[3]); + const isDrive = /^[a-z]:/i.test(s[0]); + if (isUNC) { + return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]; + } + else if (isDrive) { + return [s[0], ...s.slice(1).map(ss => this.parse(ss))]; + } + } + return s.map(ss => this.parse(ss)); + }); + this.debug(this.pattern, set); + // filter out everything that didn't compile properly. + this.set = set.filter(s => s.indexOf(false) === -1); + // do not treat the ? in UNC paths as magic + if (this.isWindows) { + for (let i = 0; i < this.set.length; i++) { + const p = this.set[i]; + if (p[0] === '' && + p[1] === '' && + this.globParts[i][2] === '?' && + typeof p[3] === 'string' && + /^[a-z]:$/i.test(p[3])) { + p[2] = '?'; + } + } + } + this.debug(this.pattern, this.set); + } + // various transforms to equivalent pattern sets that are + // faster to process in a filesystem walk. The goal is to + // eliminate what we can, and push all ** patterns as far + // to the right as possible, even if it increases the number + // of patterns that we have to process. + preprocess(globParts) { + // if we're not in globstar mode, then turn all ** into * + if (this.options.noglobstar) { + for (let i = 0; i < globParts.length; i++) { + for (let j = 0; j < globParts[i].length; j++) { + if (globParts[i][j] === '**') { + globParts[i][j] = '*'; + } + } + } + } + const { optimizationLevel = 1 } = this.options; + if (optimizationLevel >= 2) { + // aggressive optimization for the purpose of fs walking + globParts = this.firstPhasePreProcess(globParts); + globParts = this.secondPhasePreProcess(globParts); + } + else if (optimizationLevel >= 1) { + // just basic optimizations to remove some .. parts + globParts = this.levelOneOptimize(globParts); + } + else { + // just collapse multiple ** portions into one + globParts = this.adjascentGlobstarOptimize(globParts); + } + return globParts; + } + // just get rid of adjascent ** portions + adjascentGlobstarOptimize(globParts) { + return globParts.map(parts => { + let gs = -1; + while (-1 !== (gs = parts.indexOf('**', gs + 1))) { + let i = gs; + while (parts[i + 1] === '**') { + i++; + } + if (i !== gs) { + parts.splice(gs, i - gs); + } + } + return parts; + }); + } + // get rid of adjascent ** and resolve .. portions + levelOneOptimize(globParts) { + return globParts.map(parts => { + parts = parts.reduce((set, part) => { + const prev = set[set.length - 1]; + if (part === '**' && prev === '**') { + return set; + } + if (part === '..') { + if (prev && prev !== '..' && prev !== '.' && prev !== '**') { + set.pop(); + return set; + } + } + set.push(part); + return set; + }, []); + return parts.length === 0 ? [''] : parts; + }); + } + levelTwoFileOptimize(parts) { + if (!Array.isArray(parts)) { + parts = this.slashSplit(parts); + } + let didSomething = false; + do { + didSomething = false; + // <pre>/<e>/<rest> -> <pre>/<rest> + if (!this.preserveMultipleSlashes) { + for (let i = 1; i < parts.length - 1; i++) { + const p = parts[i]; + // don't squeeze out UNC patterns + if (i === 1 && p === '' && parts[0] === '') + continue; + if (p === '.' || p === '') { + didSomething = true; + parts.splice(i, 1); + i--; + } + } + if (parts[0] === '.' && + parts.length === 2 && + (parts[1] === '.' || parts[1] === '')) { + didSomething = true; + parts.pop(); + } + } + // <pre>/<p>/../<rest> -> <pre>/<rest> + let dd = 0; + while (-1 !== (dd = parts.indexOf('..', dd + 1))) { + const p = parts[dd - 1]; + if (p && p !== '.' && p !== '..' && p !== '**') { + didSomething = true; + parts.splice(dd - 1, 2); + dd -= 2; + } + } + } while (didSomething); + return parts.length === 0 ? [''] : parts; + } + // First phase: single-pattern processing + // <pre> is 1 or more portions + // <rest> is 1 or more portions + // <p> is any portion other than ., .., '', or ** + // <e> is . or '' + // + // **/.. is *brutal* for filesystem walking performance, because + // it effectively resets the recursive walk each time it occurs, + // and ** cannot be reduced out by a .. pattern part like a regexp + // or most strings (other than .., ., and '') can be. + // + // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>} + // <pre>/<e>/<rest> -> <pre>/<rest> + // <pre>/<p>/../<rest> -> <pre>/<rest> + // **/**/<rest> -> **/<rest> + // + // **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow + // this WOULD be allowed if ** did follow symlinks, or * didn't + firstPhasePreProcess(globParts) { + let didSomething = false; + do { + didSomething = false; + // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>} + for (let parts of globParts) { + let gs = -1; + while (-1 !== (gs = parts.indexOf('**', gs + 1))) { + let gss = gs; + while (parts[gss + 1] === '**') { + // <pre>/**/**/<rest> -> <pre>/**/<rest> + gss++; + } + // eg, if gs is 2 and gss is 4, that means we have 3 ** + // parts, and can remove 2 of them. + if (gss > gs) { + parts.splice(gs + 1, gss - gs); + } + let next = parts[gs + 1]; + const p = parts[gs + 2]; + const p2 = parts[gs + 3]; + if (next !== '..') + continue; + if (!p || + p === '.' || + p === '..' || + !p2 || + p2 === '.' || + p2 === '..') { + continue; + } + didSomething = true; + // edit parts in place, and push the new one + parts.splice(gs, 1); + const other = parts.slice(0); + other[gs] = '**'; + globParts.push(other); + gs--; + } + // <pre>/<e>/<rest> -> <pre>/<rest> + if (!this.preserveMultipleSlashes) { + for (let i = 1; i < parts.length - 1; i++) { + const p = parts[i]; + // don't squeeze out UNC patterns + if (i === 1 && p === '' && parts[0] === '') + continue; + if (p === '.' || p === '') { + didSomething = true; + parts.splice(i, 1); + i--; + } + } + if (parts[0] === '.' && + parts.length === 2 && + (parts[1] === '.' || parts[1] === '')) { + didSomething = true; + parts.pop(); + } + } + // <pre>/<p>/../<rest> -> <pre>/<rest> + let dd = 0; + while (-1 !== (dd = parts.indexOf('..', dd + 1))) { + const p = parts[dd - 1]; + if (p && p !== '.' && p !== '..' && p !== '**') { + didSomething = true; + const needDot = dd === 1 && parts[dd + 1] === '**'; + const splin = needDot ? ['.'] : []; + parts.splice(dd - 1, 2, ...splin); + if (parts.length === 0) + parts.push(''); + dd -= 2; + } + } + } + } while (didSomething); + return globParts; + } + // second phase: multi-pattern dedupes + // {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest> + // {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest> + // {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest> + // + // {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest> + // ^-- not valid because ** doens't follow symlinks + secondPhasePreProcess(globParts) { + for (let i = 0; i < globParts.length - 1; i++) { + for (let j = i + 1; j < globParts.length; j++) { + const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes); + if (matched) { + globParts[i] = []; + globParts[j] = matched; + break; + } + } + } + return globParts.filter(gs => gs.length); + } + partsMatch(a, b, emptyGSMatch = false) { + let ai = 0; + let bi = 0; + let result = []; + let which = ''; + while (ai < a.length && bi < b.length) { + if (a[ai] === b[bi]) { + result.push(which === 'b' ? b[bi] : a[ai]); + ai++; + bi++; + } + else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) { + result.push(a[ai]); + ai++; + } + else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) { + result.push(b[bi]); + bi++; + } + else if (a[ai] === '*' && + b[bi] && + (this.options.dot || !b[bi].startsWith('.')) && + b[bi] !== '**') { + if (which === 'b') + return false; + which = 'a'; + result.push(a[ai]); + ai++; + bi++; + } + else if (b[bi] === '*' && + a[ai] && + (this.options.dot || !a[ai].startsWith('.')) && + a[ai] !== '**') { + if (which === 'a') + return false; + which = 'b'; + result.push(b[bi]); + ai++; + bi++; + } + else { + return false; + } + } + // if we fall out of the loop, it means they two are identical + // as long as their lengths match + return a.length === b.length && result; + } + parseNegate() { + if (this.nonegate) + return; + const pattern = this.pattern; + let negate = false; + let negateOffset = 0; + for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) + this.pattern = pattern.slice(negateOffset); + this.negate = negate; + } + // set partial to true to test if, for example, + // "/a/b" matches the start of "/*/b/*/d" + // Partial means, if you run out of file before you run + // out of pattern, then that's fine, as long as all + // the parts match. + matchOne(file, pattern, partial = false) { + const options = this.options; + // UNC paths like //?/X:/... can match X:/... and vice versa + // Drive letters in absolute drive or unc paths are always compared + // case-insensitively. + if (this.isWindows) { + const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]); + const fileUNC = !fileDrive && + file[0] === '' && + file[1] === '' && + file[2] === '?' && + /^[a-z]:$/i.test(file[3]); + const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]); + const patternUNC = !patternDrive && + pattern[0] === '' && + pattern[1] === '' && + pattern[2] === '?' && + typeof pattern[3] === 'string' && + /^[a-z]:$/i.test(pattern[3]); + const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined; + const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined; + if (typeof fdi === 'number' && typeof pdi === 'number') { + const [fd, pd] = [file[fdi], pattern[pdi]]; + if (fd.toLowerCase() === pd.toLowerCase()) { + pattern[pdi] = fd; + if (pdi > fdi) { + pattern = pattern.slice(pdi); + } + else if (fdi > pdi) { + file = file.slice(fdi); + } + } + } + } + // resolve and reduce . and .. portions in the file as well. + // dont' need to do the second phase, because it's only one string[] + const { optimizationLevel = 1 } = this.options; + if (optimizationLevel >= 2) { + file = this.levelTwoFileOptimize(file); + } + this.debug('matchOne', this, { file, pattern }); + this.debug('matchOne', file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug('matchOne loop'); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + // should be impossible. + // some invalid regexp stuff in the set. + /* c8 ignore start */ + if (p === false) { + return false; + } + /* c8 ignore stop */ + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]); + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug('** at the end'); + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || + file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) + return false; + } + return true; + } + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr]; + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee); + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee); + // found a match. + return true; + } + else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || + swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr); + break; + } + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue'); + fr++; + } + } + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + /* c8 ignore start */ + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr); + if (fr === fl) { + return true; + } + } + /* c8 ignore stop */ + return false; + } + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + let hit; + if (typeof p === 'string') { + hit = f === p; + this.debug('string match', p, f, hit); + } + else { + hit = p.test(f); + this.debug('pattern match', p, f, hit); + } + if (!hit) + return false; + } + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true; + } + else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial; + } + else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + return fi === fl - 1 && file[fi] === ''; + /* c8 ignore start */ + } + else { + // should be unreachable. + throw new Error('wtf?'); + } + /* c8 ignore stop */ + } + braceExpand() { + return braceExpand(this.pattern, this.options); + } + parse(pattern) { + assertValidPattern(pattern); + const options = this.options; + // shortcuts + if (pattern === '**') + return GLOBSTAR; + if (pattern === '') + return ''; + // far and away, the most common glob pattern parts are + // *, *.*, and *.<ext> Add a fast check method for those. + let m; + let fastTest = null; + if ((m = pattern.match(starRE))) { + fastTest = options.dot ? starTestDot : starTest; + } + else if ((m = pattern.match(starDotExtRE))) { + fastTest = (options.nocase + ? options.dot + ? starDotExtTestNocaseDot + : starDotExtTestNocase + : options.dot + ? starDotExtTestDot + : starDotExtTest)(m[1]); + } + else if ((m = pattern.match(qmarksRE))) { + fastTest = (options.nocase + ? options.dot + ? qmarksTestNocaseDot + : qmarksTestNocase + : options.dot + ? qmarksTestDot + : qmarksTest)(m); + } + else if ((m = pattern.match(starDotStarRE))) { + fastTest = options.dot ? starDotStarTestDot : starDotStarTest; + } + else if ((m = pattern.match(dotStarRE))) { + fastTest = dotStarTest; + } + const re = AST.fromGlob(pattern, this.options).toMMPattern(); + if (fastTest && typeof re === 'object') { + // Avoids overriding in frozen environments + Reflect.defineProperty(re, 'test', { value: fastTest }); + } + return re; + } + makeRe() { + if (this.regexp || this.regexp === false) + return this.regexp; + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + const set = this.set; + if (!set.length) { + this.regexp = false; + return this.regexp; + } + const options = this.options; + const twoStar = options.noglobstar + ? star + : options.dot + ? twoStarDot + : twoStarNoDot; + const flags = new Set(options.nocase ? ['i'] : []); + // regexpify non-globstar patterns + // if ** is only item, then we just do one twoStar + // if ** is first, and there are more, prepend (\/|twoStar\/)? to next + // if ** is last, append (\/twoStar|) to previous + // if ** is in the middle, append (\/|\/twoStar\/) to previous + // then filter out GLOBSTAR symbols + let re = set + .map(pattern => { + const pp = pattern.map(p => { + if (p instanceof RegExp) { + for (const f of p.flags.split('')) + flags.add(f); + } + return typeof p === 'string' + ? regExpEscape(p) + : p === GLOBSTAR + ? GLOBSTAR + : p._src; + }); + pp.forEach((p, i) => { + const next = pp[i + 1]; + const prev = pp[i - 1]; + if (p !== GLOBSTAR || prev === GLOBSTAR) { + return; + } + if (prev === undefined) { + if (next !== undefined && next !== GLOBSTAR) { + pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next; + } + else { + pp[i] = twoStar; + } + } + else if (next === undefined) { + pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?'; + } + else if (next !== GLOBSTAR) { + pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next; + pp[i + 1] = GLOBSTAR; + } + }); + return pp.filter(p => p !== GLOBSTAR).join('/'); + }) + .join('|'); + // need to wrap in parens if we had more than one thing with |, + // otherwise only the first will be anchored to ^ and the last to $ + const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']; + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^' + open + re + close + '$'; + // can match anything, as long as it's not this. + if (this.negate) + re = '^(?!' + re + ').+$'; + try { + this.regexp = new RegExp(re, [...flags].join('')); + /* c8 ignore start */ + } + catch (ex) { + // should be impossible + this.regexp = false; + } + /* c8 ignore stop */ + return this.regexp; + } + slashSplit(p) { + // if p starts with // on windows, we preserve that + // so that UNC paths aren't broken. Otherwise, any number of + // / characters are coalesced into one, unless + // preserveMultipleSlashes is set to true. + if (this.preserveMultipleSlashes) { + return p.split('/'); + } + else if (this.isWindows && /^\/\/[^\/]+/.test(p)) { + // add an extra '' for the one we lose + return ['', ...p.split(/\/+/)]; + } + else { + return p.split(/\/+/); + } + } + match(f, partial = this.partial) { + this.debug('match', f, this.pattern); + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) { + return false; + } + if (this.empty) { + return f === ''; + } + if (f === '/' && partial) { + return true; + } + const options = this.options; + // windows: need to use /, not \ + if (this.isWindows) { + f = f.split('\\').join('/'); + } + // treat the test path as a set of pathparts. + const ff = this.slashSplit(f); + this.debug(this.pattern, 'split', ff); + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + const set = this.set; + this.debug(this.pattern, 'set', set); + // Find the basename of the path by looking for the last non-empty segment + let filename = ff[ff.length - 1]; + if (!filename) { + for (let i = ff.length - 2; !filename && i >= 0; i--) { + filename = ff[i]; + } + } + for (let i = 0; i < set.length; i++) { + const pattern = set[i]; + let file = ff; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + const hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) { + return true; + } + return !this.negate; + } + } + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) { + return false; + } + return this.negate; + } + static defaults(def) { + return minimatch.defaults(def).Minimatch; + } +} +/* c8 ignore stop */ +minimatch.AST = AST; +minimatch.Minimatch = Minimatch; +minimatch.escape = escape; +minimatch.unescape = unescape; + +class TypeScope { + constructor(filename, source, offset = 0, imports = /* @__PURE__ */ Object.create(null), types = /* @__PURE__ */ Object.create(null), declares = /* @__PURE__ */ Object.create(null)) { + this.filename = filename; + this.source = source; + this.offset = offset; + this.imports = imports; + this.types = types; + this.declares = declares; + this.isGenericScope = false; + this.resolvedImportSources = /* @__PURE__ */ Object.create(null); + this.exportedTypes = /* @__PURE__ */ Object.create(null); + this.exportedDeclares = /* @__PURE__ */ Object.create(null); + } +} +function resolveTypeElements(ctx, node, scope, typeParameters) { + const canCache = !typeParameters; + if (canCache && node._resolvedElements) { + return node._resolvedElements; + } + const resolved = innerResolveTypeElements( + ctx, + node, + node._ownerScope || scope || ctxToScope(ctx), + typeParameters + ); + return canCache ? node._resolvedElements = resolved : resolved; +} +function innerResolveTypeElements(ctx, node, scope, typeParameters) { + var _a, _b; + if (node.leadingComments && node.leadingComments.some((c) => c.value.includes("@vue-ignore"))) { + return { props: {} }; + } + switch (node.type) { + case "TSTypeLiteral": + return typeElementsToMap(ctx, node.members, scope, typeParameters); + case "TSInterfaceDeclaration": + return resolveInterfaceMembers(ctx, node, scope, typeParameters); + case "TSTypeAliasDeclaration": + case "TSTypeAnnotation": + case "TSParenthesizedType": + return resolveTypeElements( + ctx, + node.typeAnnotation, + scope, + typeParameters + ); + case "TSFunctionType": { + return { props: {}, calls: [node] }; + } + case "TSUnionType": + case "TSIntersectionType": + return mergeElements( + node.types.map((t) => resolveTypeElements(ctx, t, scope, typeParameters)), + node.type + ); + case "TSMappedType": + return resolveMappedType(ctx, node, scope, typeParameters); + case "TSIndexedAccessType": { + const types = resolveIndexType(ctx, node, scope); + return mergeElements( + types.map((t) => resolveTypeElements(ctx, t, t._ownerScope)), + "TSUnionType" + ); + } + case "TSExpressionWithTypeArguments": + // referenced by interface extends + case "TSTypeReference": { + const typeName = getReferenceName(node); + if ((typeName === "ExtractPropTypes" || typeName === "ExtractPublicPropTypes") && node.typeParameters && ((_a = scope.imports[typeName]) == null ? void 0 : _a.source) === "vue") { + return resolveExtractPropTypes( + resolveTypeElements( + ctx, + node.typeParameters.params[0], + scope, + typeParameters + ), + scope + ); + } + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + let typeParams; + if ((resolved.type === "TSTypeAliasDeclaration" || resolved.type === "TSInterfaceDeclaration") && resolved.typeParameters && node.typeParameters) { + typeParams = /* @__PURE__ */ Object.create(null); + resolved.typeParameters.params.forEach((p, i) => { + let param = typeParameters && typeParameters[p.name]; + if (!param) param = node.typeParameters.params[i]; + typeParams[p.name] = param; + }); + } + return resolveTypeElements( + ctx, + resolved, + resolved._ownerScope, + typeParams + ); + } else { + if (typeof typeName === "string") { + if (typeParameters && typeParameters[typeName]) { + return resolveTypeElements( + ctx, + typeParameters[typeName], + scope, + typeParameters + ); + } + if ( + // @ts-expect-error + SupportedBuiltinsSet.has(typeName) + ) { + return resolveBuiltin( + ctx, + node, + typeName, + scope, + typeParameters + ); + } else if (typeName === "ReturnType" && node.typeParameters) { + const ret = resolveReturnType( + ctx, + node.typeParameters.params[0], + scope + ); + if (ret) { + return resolveTypeElements(ctx, ret, scope); + } + } + } + return ctx.error( + `Unresolvable type reference or unsupported built-in utility type`, + node, + scope + ); + } + } + case "TSImportType": { + if (getId(node.argument) === "vue" && ((_b = node.qualifier) == null ? void 0 : _b.type) === "Identifier" && node.qualifier.name === "ExtractPropTypes" && node.typeParameters) { + return resolveExtractPropTypes( + resolveTypeElements(ctx, node.typeParameters.params[0], scope), + scope + ); + } + const sourceScope = importSourceToScope( + ctx, + node.argument, + scope, + node.argument.value + ); + const resolved = resolveTypeReference(ctx, node, sourceScope); + if (resolved) { + return resolveTypeElements(ctx, resolved, resolved._ownerScope); + } + break; + } + case "TSTypeQuery": + { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + return resolveTypeElements(ctx, resolved, resolved._ownerScope); + } + } + break; + } + return ctx.error(`Unresolvable type: ${node.type}`, node, scope); +} +function typeElementsToMap(ctx, elements, scope = ctxToScope(ctx), typeParameters) { + const res = { props: {} }; + for (const e of elements) { + if (e.type === "TSPropertySignature" || e.type === "TSMethodSignature") { + if (typeParameters) { + scope = createChildScope(scope); + scope.isGenericScope = true; + Object.assign(scope.types, typeParameters); + } + e._ownerScope = scope; + const name = getId(e.key); + if (name && !e.computed) { + res.props[name] = e; + } else if (e.key.type === "TemplateLiteral") { + for (const key of resolveTemplateKeys(ctx, e.key, scope)) { + res.props[key] = e; + } + } else { + ctx.error( + `Unsupported computed key in type referenced by a macro`, + e.key, + scope + ); + } + } else if (e.type === "TSCallSignatureDeclaration") { + (res.calls || (res.calls = [])).push(e); + } + } + return res; +} +function mergeElements(maps, type) { + if (maps.length === 1) return maps[0]; + const res = { props: {} }; + const { props: baseProps } = res; + for (const { props, calls } of maps) { + for (const key in props) { + if (!shared.hasOwn(baseProps, key)) { + baseProps[key] = props[key]; + } else { + baseProps[key] = createProperty( + baseProps[key].key, + { + type, + // @ts-expect-error + types: [baseProps[key], props[key]] + }, + baseProps[key]._ownerScope, + baseProps[key].optional || props[key].optional + ); + } + } + if (calls) { + (res.calls || (res.calls = [])).push(...calls); + } + } + return res; +} +function createProperty(key, typeAnnotation, scope, optional) { + return { + type: "TSPropertySignature", + key, + kind: "get", + optional, + typeAnnotation: { + type: "TSTypeAnnotation", + typeAnnotation + }, + _ownerScope: scope + }; +} +function resolveInterfaceMembers(ctx, node, scope, typeParameters) { + const base = typeElementsToMap( + ctx, + node.body.body, + node._ownerScope, + typeParameters + ); + if (node.extends) { + for (const ext of node.extends) { + try { + const { props, calls } = resolveTypeElements(ctx, ext, scope); + for (const key in props) { + if (!shared.hasOwn(base.props, key)) { + base.props[key] = props[key]; + } + } + if (calls) { + ; + (base.calls || (base.calls = [])).push(...calls); + } + } catch (e) { + ctx.error( + `Failed to resolve extends base type. +If this previously worked in 3.2, you can instruct the compiler to ignore this extend by adding /* @vue-ignore */ before it, for example: + +interface Props extends /* @vue-ignore */ Base {} + +Note: both in 3.2 or with the ignore, the properties in the base type are treated as fallthrough attrs at runtime.`, + ext, + scope + ); + } + } + } + return base; +} +function resolveMappedType(ctx, node, scope, typeParameters) { + const res = { props: {} }; + let keys; + if (node.nameType) { + const { name, constraint } = node.typeParameter; + scope = createChildScope(scope); + Object.assign(scope.types, { ...typeParameters, [name]: constraint }); + keys = resolveStringType(ctx, node.nameType, scope); + } else { + keys = resolveStringType(ctx, node.typeParameter.constraint, scope); + } + for (const key of keys) { + res.props[key] = createProperty( + { + type: "Identifier", + name: key + }, + node.typeAnnotation, + scope, + !!node.optional + ); + } + return res; +} +function resolveIndexType(ctx, node, scope) { + var _a, _b; + if (node.indexType.type === "TSNumberKeyword") { + return resolveArrayElementType(ctx, node.objectType, scope); + } + const { indexType, objectType } = node; + const types = []; + let keys; + let resolved; + if (indexType.type === "TSStringKeyword") { + resolved = resolveTypeElements(ctx, objectType, scope); + keys = Object.keys(resolved.props); + } else { + keys = resolveStringType(ctx, indexType, scope); + resolved = resolveTypeElements(ctx, objectType, scope); + } + for (const key of keys) { + const targetType = (_b = (_a = resolved.props[key]) == null ? void 0 : _a.typeAnnotation) == null ? void 0 : _b.typeAnnotation; + if (targetType) { + targetType._ownerScope = resolved.props[key]._ownerScope; + types.push(targetType); + } + } + return types; +} +function resolveArrayElementType(ctx, node, scope) { + if (node.type === "TSArrayType") { + return [node.elementType]; + } + if (node.type === "TSTupleType") { + return node.elementTypes.map( + (t) => t.type === "TSNamedTupleMember" ? t.elementType : t + ); + } + if (node.type === "TSTypeReference") { + if (getReferenceName(node) === "Array" && node.typeParameters) { + return node.typeParameters.params; + } else { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + return resolveArrayElementType(ctx, resolved, scope); + } + } + } + return ctx.error( + "Failed to resolve element type from target type", + node, + scope + ); +} +function resolveStringType(ctx, node, scope) { + switch (node.type) { + case "StringLiteral": + return [node.value]; + case "TSLiteralType": + return resolveStringType(ctx, node.literal, scope); + case "TSUnionType": + return node.types.map((t) => resolveStringType(ctx, t, scope)).flat(); + case "TemplateLiteral": { + return resolveTemplateKeys(ctx, node, scope); + } + case "TSTypeReference": { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + return resolveStringType(ctx, resolved, scope); + } + if (node.typeName.type === "Identifier") { + const getParam = (index = 0) => resolveStringType(ctx, node.typeParameters.params[index], scope); + switch (node.typeName.name) { + case "Extract": + return getParam(1); + case "Exclude": { + const excluded = getParam(1); + return getParam().filter((s) => !excluded.includes(s)); + } + case "Uppercase": + return getParam().map((s) => s.toUpperCase()); + case "Lowercase": + return getParam().map((s) => s.toLowerCase()); + case "Capitalize": + return getParam().map(shared.capitalize); + case "Uncapitalize": + return getParam().map((s) => s[0].toLowerCase() + s.slice(1)); + default: + ctx.error( + "Unsupported type when resolving index type", + node.typeName, + scope + ); + } + } + } + } + return ctx.error("Failed to resolve index type into finite keys", node, scope); +} +function resolveTemplateKeys(ctx, node, scope) { + if (!node.expressions.length) { + return [node.quasis[0].value.raw]; + } + const res = []; + const e = node.expressions[0]; + const q = node.quasis[0]; + const leading = q ? q.value.raw : ``; + const resolved = resolveStringType(ctx, e, scope); + const restResolved = resolveTemplateKeys( + ctx, + { + ...node, + expressions: node.expressions.slice(1), + quasis: q ? node.quasis.slice(1) : node.quasis + }, + scope + ); + for (const r of resolved) { + for (const rr of restResolved) { + res.push(leading + r + rr); + } + } + return res; +} +const SupportedBuiltinsSet = /* @__PURE__ */ new Set([ + "Partial", + "Required", + "Readonly", + "Pick", + "Omit" +]); +function resolveBuiltin(ctx, node, name, scope, typeParameters) { + const t = resolveTypeElements( + ctx, + node.typeParameters.params[0], + scope, + typeParameters + ); + switch (name) { + case "Partial": { + const res2 = { props: {}, calls: t.calls }; + Object.keys(t.props).forEach((key) => { + res2.props[key] = { ...t.props[key], optional: true }; + }); + return res2; + } + case "Required": { + const res2 = { props: {}, calls: t.calls }; + Object.keys(t.props).forEach((key) => { + res2.props[key] = { ...t.props[key], optional: false }; + }); + return res2; + } + case "Readonly": + return t; + case "Pick": { + const picked = resolveStringType( + ctx, + node.typeParameters.params[1], + scope + ); + const res2 = { props: {}, calls: t.calls }; + for (const key of picked) { + res2.props[key] = t.props[key]; + } + return res2; + } + case "Omit": + const omitted = resolveStringType( + ctx, + node.typeParameters.params[1], + scope + ); + const res = { props: {}, calls: t.calls }; + for (const key in t.props) { + if (!omitted.includes(key)) { + res.props[key] = t.props[key]; + } + } + return res; + } +} +function resolveTypeReference(ctx, node, scope, name, onlyExported = false) { + const canCache = !(scope == null ? void 0 : scope.isGenericScope); + if (canCache && node._resolvedReference) { + return node._resolvedReference; + } + const resolved = innerResolveTypeReference( + ctx, + scope || ctxToScope(ctx), + name || getReferenceName(node), + node, + onlyExported + ); + return canCache ? node._resolvedReference = resolved : resolved; +} +function innerResolveTypeReference(ctx, scope, name, node, onlyExported) { + if (typeof name === "string") { + if (scope.imports[name]) { + return resolveTypeFromImport(ctx, node, name, scope); + } else { + const lookupSource = node.type === "TSTypeQuery" ? onlyExported ? scope.exportedDeclares : scope.declares : onlyExported ? scope.exportedTypes : scope.types; + if (lookupSource[name]) { + return lookupSource[name]; + } else { + const globalScopes = resolveGlobalScope(ctx); + if (globalScopes) { + for (const s of globalScopes) { + const src = node.type === "TSTypeQuery" ? s.declares : s.types; + if (src[name]) { + (ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(s.filename); + return src[name]; + } + } + } + } + } + } else { + let ns = innerResolveTypeReference(ctx, scope, name[0], node, onlyExported); + if (ns) { + if (ns.type !== "TSModuleDeclaration") { + ns = ns._ns; + } + if (ns) { + const childScope = moduleDeclToScope(ctx, ns, ns._ownerScope || scope); + return innerResolveTypeReference( + ctx, + childScope, + name.length > 2 ? name.slice(1) : name[name.length - 1], + node, + !ns.declare + ); + } + } + } +} +function getReferenceName(node) { + const ref = node.type === "TSTypeReference" ? node.typeName : node.type === "TSExpressionWithTypeArguments" ? node.expression : node.type === "TSImportType" ? node.qualifier : node.exprName; + if ((ref == null ? void 0 : ref.type) === "Identifier") { + return ref.name; + } else if ((ref == null ? void 0 : ref.type) === "TSQualifiedName") { + return qualifiedNameToPath(ref); + } else { + return "default"; + } +} +function qualifiedNameToPath(node) { + if (node.type === "Identifier") { + return [node.name]; + } else { + return [...qualifiedNameToPath(node.left), node.right.name]; + } +} +function resolveGlobalScope(ctx) { + if (ctx.options.globalTypeFiles) { + const fs = resolveFS(ctx); + if (!fs) { + throw new Error("[vue/compiler-sfc] globalTypeFiles requires fs access."); + } + return ctx.options.globalTypeFiles.map( + (file) => fileToScope(ctx, normalizePath(file), true) + ); + } +} +let ts; +let loadTS; +function registerTS(_loadTS) { + loadTS = () => { + try { + return _loadTS(); + } catch (err) { + if (typeof err.message === "string" && err.message.includes("Cannot find module")) { + throw new Error( + 'Failed to load TypeScript, which is required for resolving imported types. Please make sure "typescript" is installed as a project dependency.' + ); + } else { + throw new Error( + "Failed to load TypeScript for resolving imported types." + ); + } + } + }; +} +function resolveFS(ctx) { + if (ctx.fs) { + return ctx.fs; + } + if (!ts && loadTS) { + ts = loadTS(); + } + const fs = ctx.options.fs || (ts == null ? void 0 : ts.sys); + if (!fs) { + return; + } + return ctx.fs = { + fileExists(file) { + if (file.endsWith(".vue.ts")) { + file = file.replace(/\.ts$/, ""); + } + return fs.fileExists(file); + }, + readFile(file) { + if (file.endsWith(".vue.ts")) { + file = file.replace(/\.ts$/, ""); + } + return fs.readFile(file); + }, + realpath: fs.realpath + }; +} +function resolveTypeFromImport(ctx, node, name, scope) { + const { source, imported } = scope.imports[name]; + const sourceScope = importSourceToScope(ctx, node, scope, source); + return resolveTypeReference(ctx, node, sourceScope, imported, true); +} +function importSourceToScope(ctx, node, scope, source) { + let fs; + try { + fs = resolveFS(ctx); + } catch (err) { + return ctx.error(err.message, node, scope); + } + if (!fs) { + return ctx.error( + `No fs option provided to \`compileScript\` in non-Node environment. File system access is required for resolving imported types.`, + node, + scope + ); + } + let resolved = scope.resolvedImportSources[source]; + if (!resolved) { + if (source.startsWith("..")) { + const osSpecificJoinFn = process__namespace.platform === "win32" ? path$1.join : joinPaths; + const filename = osSpecificJoinFn(path$1.dirname(scope.filename), source); + resolved = resolveExt(filename, fs); + } else if (source[0] === ".") { + const filename = joinPaths(path$1.dirname(scope.filename), source); + resolved = resolveExt(filename, fs); + } else { + if (!ts) { + if (loadTS) ts = loadTS(); + if (!ts) { + return ctx.error( + `Failed to resolve import source ${JSON.stringify(source)}. typescript is required as a peer dep for vue in order to support resolving types from module imports.`, + node, + scope + ); + } + } + resolved = resolveWithTS(scope.filename, source, ts, fs); + } + if (resolved) { + resolved = scope.resolvedImportSources[source] = normalizePath(resolved); + } + } + if (resolved) { + (ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(resolved); + return fileToScope(ctx, resolved); + } else { + return ctx.error( + `Failed to resolve import source ${JSON.stringify(source)}.`, + node, + scope + ); + } +} +function resolveExt(filename, fs) { + filename = filename.replace(/\.js$/, ""); + const tryResolve = (filename2) => { + if (fs.fileExists(filename2)) return filename2; + }; + return tryResolve(filename) || tryResolve(filename + `.ts`) || tryResolve(filename + `.tsx`) || tryResolve(filename + `.d.ts`) || tryResolve(joinPaths(filename, `index.ts`)) || tryResolve(joinPaths(filename, `index.tsx`)) || tryResolve(joinPaths(filename, `index.d.ts`)); +} +const tsConfigCache = createCache(); +const tsConfigRefMap = /* @__PURE__ */ new Map(); +function resolveWithTS(containingFile, source, ts2, fs) { + var _a, _b; + const configPath = ts2.findConfigFile(containingFile, fs.fileExists); + let tsCompilerOptions; + let tsResolveCache; + if (configPath) { + let configs; + const normalizedConfigPath = normalizePath(configPath); + const cached = tsConfigCache.get(normalizedConfigPath); + if (!cached) { + configs = loadTSConfig(configPath, ts2, fs).map((config) => ({ config })); + tsConfigCache.set(normalizedConfigPath, configs); + } else { + configs = cached; + } + let matchedConfig; + if (configs.length === 1) { + matchedConfig = configs[0]; + } else { + for (const c of configs) { + const base = normalizePath( + c.config.options.pathsBasePath || path$1.dirname(c.config.options.configFilePath) + ); + const included = (_a = c.config.raw) == null ? void 0 : _a.include; + const excluded = (_b = c.config.raw) == null ? void 0 : _b.exclude; + if (!included && (!base || containingFile.startsWith(base)) || (included == null ? void 0 : included.some((p) => minimatch(containingFile, joinPaths(base, p))))) { + if (excluded && excluded.some((p) => minimatch(containingFile, joinPaths(base, p)))) { + continue; + } + matchedConfig = c; + break; + } + } + if (!matchedConfig) { + matchedConfig = configs[configs.length - 1]; + } + } + tsCompilerOptions = matchedConfig.config.options; + tsResolveCache = matchedConfig.cache || (matchedConfig.cache = ts2.createModuleResolutionCache( + process__namespace.cwd(), + createGetCanonicalFileName(ts2.sys.useCaseSensitiveFileNames), + tsCompilerOptions + )); + } else { + tsCompilerOptions = {}; + } + const res = ts2.resolveModuleName( + source, + containingFile, + tsCompilerOptions, + fs, + tsResolveCache + ); + if (res.resolvedModule) { + let filename = res.resolvedModule.resolvedFileName; + if (filename.endsWith(".vue.ts")) { + filename = filename.replace(/\.ts$/, ""); + } + return fs.realpath ? fs.realpath(filename) : filename; + } +} +function loadTSConfig(configPath, ts2, fs, visited = /* @__PURE__ */ new Set()) { + const parseConfigHost = ts2.sys; + const config = ts2.parseJsonConfigFileContent( + ts2.readConfigFile(configPath, fs.readFile).config, + parseConfigHost, + path$1.dirname(configPath), + void 0, + configPath + ); + const res = [config]; + visited.add(configPath); + if (config.projectReferences) { + for (const ref of config.projectReferences) { + const refPath = ts2.resolveProjectReferencePath(ref); + if (visited.has(refPath) || !fs.fileExists(refPath)) { + continue; + } + tsConfigRefMap.set(refPath, configPath); + res.unshift(...loadTSConfig(refPath, ts2, fs, visited)); + } + } + return res; +} +const fileToScopeCache = createCache(); +function invalidateTypeCache(filename) { + filename = normalizePath(filename); + fileToScopeCache.delete(filename); + tsConfigCache.delete(filename); + const affectedConfig = tsConfigRefMap.get(filename); + if (affectedConfig) tsConfigCache.delete(affectedConfig); +} +function fileToScope(ctx, filename, asGlobal = false) { + const cached = fileToScopeCache.get(filename); + if (cached) { + return cached; + } + const fs = resolveFS(ctx); + const source = fs.readFile(filename) || ""; + const body = parseFile(filename, source, ctx.options.babelParserPlugins); + const scope = new TypeScope(filename, source, 0, recordImports(body)); + recordTypes(ctx, body, scope, asGlobal); + fileToScopeCache.set(filename, scope); + return scope; +} +function parseFile(filename, content, parserPlugins) { + const ext = path$1.extname(filename); + if (ext === ".ts" || ext === ".mts" || ext === ".tsx" || ext === ".mtsx") { + return parser$2.parse(content, { + plugins: resolveParserPlugins( + ext.slice(1), + parserPlugins, + /\.d\.m?ts$/.test(filename) + ), + sourceType: "module" + }).program.body; + } else if (ext === ".vue") { + const { + descriptor: { script, scriptSetup } + } = parse$1(content); + if (!script && !scriptSetup) { + return []; + } + const scriptOffset = script ? script.loc.start.offset : Infinity; + const scriptSetupOffset = scriptSetup ? scriptSetup.loc.start.offset : Infinity; + const firstBlock = scriptOffset < scriptSetupOffset ? script : scriptSetup; + const secondBlock = scriptOffset < scriptSetupOffset ? scriptSetup : script; + let scriptContent = " ".repeat(Math.min(scriptOffset, scriptSetupOffset)) + firstBlock.content; + if (secondBlock) { + scriptContent += " ".repeat(secondBlock.loc.start.offset - script.loc.end.offset) + secondBlock.content; + } + const lang = (script == null ? void 0 : script.lang) || (scriptSetup == null ? void 0 : scriptSetup.lang); + return parser$2.parse(scriptContent, { + plugins: resolveParserPlugins(lang, parserPlugins), + sourceType: "module" + }).program.body; + } + return []; +} +function ctxToScope(ctx) { + if (ctx.scope) { + return ctx.scope; + } + const body = "ast" in ctx ? ctx.ast : ctx.scriptAst ? [...ctx.scriptAst.body, ...ctx.scriptSetupAst.body] : ctx.scriptSetupAst.body; + const scope = new TypeScope( + ctx.filename, + ctx.source, + "startOffset" in ctx ? ctx.startOffset : 0, + "userImports" in ctx ? Object.create(ctx.userImports) : recordImports(body) + ); + recordTypes(ctx, body, scope); + return ctx.scope = scope; +} +function moduleDeclToScope(ctx, node, parentScope) { + if (node._resolvedChildScope) { + return node._resolvedChildScope; + } + const scope = createChildScope(parentScope); + if (node.body.type === "TSModuleDeclaration") { + const decl = node.body; + decl._ownerScope = scope; + const id = getId(decl.id); + scope.types[id] = scope.exportedTypes[id] = decl; + } else { + recordTypes(ctx, node.body.body, scope); + } + return node._resolvedChildScope = scope; +} +function createChildScope(parentScope) { + return new TypeScope( + parentScope.filename, + parentScope.source, + parentScope.offset, + Object.create(parentScope.imports), + Object.create(parentScope.types), + Object.create(parentScope.declares) + ); +} +const importExportRE = /^Import|^Export/; +function recordTypes(ctx, body, scope, asGlobal = false) { + const { types, declares, exportedTypes, exportedDeclares, imports } = scope; + const isAmbient = asGlobal ? !body.some((s) => importExportRE.test(s.type)) : false; + for (const stmt of body) { + if (asGlobal) { + if (isAmbient) { + if (stmt.declare) { + recordType(stmt, types, declares); + } + } else if (stmt.type === "TSModuleDeclaration" && stmt.global) { + for (const s of stmt.body.body) { + recordType(s, types, declares); + } + } + } else { + recordType(stmt, types, declares); + } + } + if (!asGlobal) { + for (const stmt of body) { + if (stmt.type === "ExportNamedDeclaration") { + if (stmt.declaration) { + recordType(stmt.declaration, types, declares); + recordType(stmt.declaration, exportedTypes, exportedDeclares); + } else { + for (const spec of stmt.specifiers) { + if (spec.type === "ExportSpecifier") { + const local = spec.local.name; + const exported = getId(spec.exported); + if (stmt.source) { + imports[exported] = { + source: stmt.source.value, + imported: local + }; + exportedTypes[exported] = { + type: "TSTypeReference", + typeName: { + type: "Identifier", + name: local + }, + _ownerScope: scope + }; + } else if (types[local]) { + exportedTypes[exported] = types[local]; + } + } + } + } + } else if (stmt.type === "ExportAllDeclaration") { + const sourceScope = importSourceToScope( + ctx, + stmt.source, + scope, + stmt.source.value + ); + Object.assign(scope.exportedTypes, sourceScope.exportedTypes); + } else if (stmt.type === "ExportDefaultDeclaration" && stmt.declaration) { + if (stmt.declaration.type !== "Identifier") { + recordType(stmt.declaration, types, declares, "default"); + recordType( + stmt.declaration, + exportedTypes, + exportedDeclares, + "default" + ); + } else if (types[stmt.declaration.name]) { + exportedTypes["default"] = types[stmt.declaration.name]; + } + } + } + } + for (const key of Object.keys(types)) { + const node = types[key]; + node._ownerScope = scope; + if (node._ns) node._ns._ownerScope = scope; + } + for (const key of Object.keys(declares)) { + declares[key]._ownerScope = scope; + } +} +function recordType(node, types, declares, overwriteId) { + switch (node.type) { + case "TSInterfaceDeclaration": + case "TSEnumDeclaration": + case "TSModuleDeclaration": { + const id = overwriteId || getId(node.id); + let existing = types[id]; + if (existing) { + if (node.type === "TSModuleDeclaration") { + if (existing.type === "TSModuleDeclaration") { + mergeNamespaces(existing, node); + } else { + attachNamespace(existing, node); + } + break; + } + if (existing.type === "TSModuleDeclaration") { + types[id] = node; + attachNamespace(node, existing); + break; + } + if (existing.type !== node.type) { + break; + } + if (node.type === "TSInterfaceDeclaration") { + existing.body.body.push(...node.body.body); + } else { + existing.members.push(...node.members); + } + } else { + types[id] = node; + } + break; + } + case "ClassDeclaration": + if (overwriteId || node.id) types[overwriteId || getId(node.id)] = node; + break; + case "TSTypeAliasDeclaration": + types[node.id.name] = node.typeParameters ? node : node.typeAnnotation; + break; + case "TSDeclareFunction": + if (node.id) declares[node.id.name] = node; + break; + case "VariableDeclaration": { + if (node.declare) { + for (const decl of node.declarations) { + if (decl.id.type === "Identifier" && decl.id.typeAnnotation) { + declares[decl.id.name] = decl.id.typeAnnotation.typeAnnotation; + } + } + } + break; + } + } +} +function mergeNamespaces(to, from) { + const toBody = to.body; + const fromBody = from.body; + if (toBody.type === "TSModuleDeclaration") { + if (fromBody.type === "TSModuleDeclaration") { + mergeNamespaces(toBody, fromBody); + } else { + fromBody.body.push({ + type: "ExportNamedDeclaration", + declaration: toBody, + exportKind: "type", + specifiers: [] + }); + } + } else if (fromBody.type === "TSModuleDeclaration") { + toBody.body.push({ + type: "ExportNamedDeclaration", + declaration: fromBody, + exportKind: "type", + specifiers: [] + }); + } else { + toBody.body.push(...fromBody.body); + } +} +function attachNamespace(to, ns) { + if (!to._ns) { + to._ns = ns; + } else { + mergeNamespaces(to._ns, ns); + } +} +function recordImports(body) { + const imports = /* @__PURE__ */ Object.create(null); + for (const s of body) { + recordImport(s, imports); + } + return imports; +} +function recordImport(node, imports) { + if (node.type !== "ImportDeclaration") { + return; + } + for (const s of node.specifiers) { + imports[s.local.name] = { + imported: getImportedName(s), + source: node.source.value + }; + } +} +function inferRuntimeType(ctx, node, scope = node._ownerScope || ctxToScope(ctx), isKeyOf = false) { + try { + switch (node.type) { + case "TSStringKeyword": + return ["String"]; + case "TSNumberKeyword": + return ["Number"]; + case "TSBooleanKeyword": + return ["Boolean"]; + case "TSObjectKeyword": + return ["Object"]; + case "TSNullKeyword": + return ["null"]; + case "TSTypeLiteral": + case "TSInterfaceDeclaration": { + const types = /* @__PURE__ */ new Set(); + const members = node.type === "TSTypeLiteral" ? node.members : node.body.body; + for (const m of members) { + if (isKeyOf) { + if (m.type === "TSPropertySignature" && m.key.type === "NumericLiteral") { + types.add("Number"); + } else if (m.type === "TSIndexSignature") { + const annotation = m.parameters[0].typeAnnotation; + if (annotation && annotation.type !== "Noop") { + const type = inferRuntimeType( + ctx, + annotation.typeAnnotation, + scope + )[0]; + if (type === UNKNOWN_TYPE) return [UNKNOWN_TYPE]; + types.add(type); + } + } else { + types.add("String"); + } + } else if (m.type === "TSCallSignatureDeclaration" || m.type === "TSConstructSignatureDeclaration") { + types.add("Function"); + } else { + types.add("Object"); + } + } + return types.size ? Array.from(types) : [isKeyOf ? UNKNOWN_TYPE : "Object"]; + } + case "TSPropertySignature": + if (node.typeAnnotation) { + return inferRuntimeType( + ctx, + node.typeAnnotation.typeAnnotation, + scope + ); + } + break; + case "TSMethodSignature": + case "TSFunctionType": + return ["Function"]; + case "TSArrayType": + case "TSTupleType": + return ["Array"]; + case "TSLiteralType": + switch (node.literal.type) { + case "StringLiteral": + return ["String"]; + case "BooleanLiteral": + return ["Boolean"]; + case "NumericLiteral": + case "BigIntLiteral": + return ["Number"]; + default: + return [UNKNOWN_TYPE]; + } + case "TSTypeReference": { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + return inferRuntimeType(ctx, resolved, resolved._ownerScope, isKeyOf); + } + if (node.typeName.type === "Identifier") { + if (isKeyOf) { + switch (node.typeName.name) { + case "String": + case "Array": + case "ArrayLike": + case "Parameters": + case "ConstructorParameters": + case "ReadonlyArray": + return ["String", "Number"]; + // TS built-in utility types + case "Record": + case "Partial": + case "Required": + case "Readonly": + if (node.typeParameters && node.typeParameters.params[0]) { + return inferRuntimeType( + ctx, + node.typeParameters.params[0], + scope, + true + ); + } + break; + case "Pick": + case "Extract": + if (node.typeParameters && node.typeParameters.params[1]) { + return inferRuntimeType( + ctx, + node.typeParameters.params[1], + scope + ); + } + break; + case "Function": + case "Object": + case "Set": + case "Map": + case "WeakSet": + case "WeakMap": + case "Date": + case "Promise": + case "Error": + case "Uppercase": + case "Lowercase": + case "Capitalize": + case "Uncapitalize": + case "ReadonlyMap": + case "ReadonlySet": + return ["String"]; + } + } else { + switch (node.typeName.name) { + case "Array": + case "Function": + case "Object": + case "Set": + case "Map": + case "WeakSet": + case "WeakMap": + case "Date": + case "Promise": + case "Error": + return [node.typeName.name]; + // TS built-in utility types + // https://www.typescriptlang.org/docs/handbook/utility-types.html + case "Partial": + case "Required": + case "Readonly": + case "Record": + case "Pick": + case "Omit": + case "InstanceType": + return ["Object"]; + case "Uppercase": + case "Lowercase": + case "Capitalize": + case "Uncapitalize": + return ["String"]; + case "Parameters": + case "ConstructorParameters": + case "ReadonlyArray": + return ["Array"]; + case "ReadonlyMap": + return ["Map"]; + case "ReadonlySet": + return ["Set"]; + case "NonNullable": + if (node.typeParameters && node.typeParameters.params[0]) { + return inferRuntimeType( + ctx, + node.typeParameters.params[0], + scope + ).filter((t) => t !== "null"); + } + break; + case "Extract": + if (node.typeParameters && node.typeParameters.params[1]) { + return inferRuntimeType( + ctx, + node.typeParameters.params[1], + scope + ); + } + break; + case "Exclude": + case "OmitThisParameter": + if (node.typeParameters && node.typeParameters.params[0]) { + return inferRuntimeType( + ctx, + node.typeParameters.params[0], + scope + ); + } + break; + } + } + } + break; + } + case "TSParenthesizedType": + return inferRuntimeType(ctx, node.typeAnnotation, scope); + case "TSUnionType": + return flattenTypes(ctx, node.types, scope, isKeyOf); + case "TSIntersectionType": { + return flattenTypes(ctx, node.types, scope, isKeyOf).filter( + (t) => t !== UNKNOWN_TYPE + ); + } + case "TSEnumDeclaration": + return inferEnumType(node); + case "TSSymbolKeyword": + return ["Symbol"]; + case "TSIndexedAccessType": { + const types = resolveIndexType(ctx, node, scope); + return flattenTypes(ctx, types, scope, isKeyOf); + } + case "ClassDeclaration": + return ["Object"]; + case "TSImportType": { + const sourceScope = importSourceToScope( + ctx, + node.argument, + scope, + node.argument.value + ); + const resolved = resolveTypeReference(ctx, node, sourceScope); + if (resolved) { + return inferRuntimeType(ctx, resolved, resolved._ownerScope); + } + break; + } + case "TSTypeQuery": { + const id = node.exprName; + if (id.type === "Identifier") { + const matched = scope.declares[id.name]; + if (matched) { + return inferRuntimeType(ctx, matched, matched._ownerScope, isKeyOf); + } + } + break; + } + // e.g. readonly + case "TSTypeOperator": { + return inferRuntimeType( + ctx, + node.typeAnnotation, + scope, + node.operator === "keyof" + ); + } + case "TSAnyKeyword": { + if (isKeyOf) { + return ["String", "Number", "Symbol"]; + } + break; + } + } + } catch (e) { + } + return [UNKNOWN_TYPE]; +} +function flattenTypes(ctx, types, scope, isKeyOf = false) { + if (types.length === 1) { + return inferRuntimeType(ctx, types[0], scope, isKeyOf); + } + return [ + ...new Set( + [].concat( + ...types.map((t) => inferRuntimeType(ctx, t, scope, isKeyOf)) + ) + ) + ]; +} +function inferEnumType(node) { + const types = /* @__PURE__ */ new Set(); + for (const m of node.members) { + if (m.initializer) { + switch (m.initializer.type) { + case "StringLiteral": + types.add("String"); + break; + case "NumericLiteral": + types.add("Number"); + break; + } + } + } + return types.size ? [...types] : ["Number"]; +} +function resolveExtractPropTypes({ props }, scope) { + const res = { props: {} }; + for (const key in props) { + const raw = props[key]; + res.props[key] = reverseInferType( + raw.key, + raw.typeAnnotation.typeAnnotation, + scope + ); + } + return res; +} +function reverseInferType(key, node, scope, optional = true, checkObjectSyntax = true) { + if (checkObjectSyntax && node.type === "TSTypeLiteral") { + const typeType = findStaticPropertyType(node, "type"); + if (typeType) { + const requiredType = findStaticPropertyType(node, "required"); + const optional2 = requiredType && requiredType.type === "TSLiteralType" && requiredType.literal.type === "BooleanLiteral" ? !requiredType.literal.value : true; + return reverseInferType(key, typeType, scope, optional2, false); + } + } else if (node.type === "TSTypeReference" && node.typeName.type === "Identifier") { + if (node.typeName.name.endsWith("Constructor")) { + return createProperty( + key, + ctorToType(node.typeName.name), + scope, + optional + ); + } else if (node.typeName.name === "PropType" && node.typeParameters) { + return createProperty(key, node.typeParameters.params[0], scope, optional); + } + } + if ((node.type === "TSTypeReference" || node.type === "TSImportType") && node.typeParameters) { + for (const t of node.typeParameters.params) { + const inferred = reverseInferType(key, t, scope, optional); + if (inferred) return inferred; + } + } + return createProperty(key, { type: `TSNullKeyword` }, scope, optional); +} +function ctorToType(ctorType) { + const ctor = ctorType.slice(0, -11); + switch (ctor) { + case "String": + case "Number": + case "Boolean": + return { type: `TS${ctor}Keyword` }; + case "Array": + case "Function": + case "Object": + case "Set": + case "Map": + case "WeakSet": + case "WeakMap": + case "Date": + case "Promise": + return { + type: "TSTypeReference", + typeName: { type: "Identifier", name: ctor } + }; + } + return { type: `TSNullKeyword` }; +} +function findStaticPropertyType(node, key) { + const prop = node.members.find( + (m) => m.type === "TSPropertySignature" && !m.computed && getId(m.key) === key && m.typeAnnotation + ); + return prop && prop.typeAnnotation.typeAnnotation; +} +function resolveReturnType(ctx, arg, scope) { + var _a; + let resolved = arg; + if (arg.type === "TSTypeReference" || arg.type === "TSTypeQuery" || arg.type === "TSImportType") { + resolved = resolveTypeReference(ctx, arg, scope); + } + if (!resolved) return; + if (resolved.type === "TSFunctionType") { + return (_a = resolved.typeAnnotation) == null ? void 0 : _a.typeAnnotation; + } + if (resolved.type === "TSDeclareFunction") { + return resolved.returnType; + } +} +function resolveUnionType(ctx, node, scope) { + if (node.type === "TSTypeReference") { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) node = resolved; + } + let types; + if (node.type === "TSUnionType") { + types = node.types.flatMap((node2) => resolveUnionType(ctx, node2, scope)); + } else { + types = [node]; + } + return types; +} + +const DEFINE_MODEL = "defineModel"; +function processDefineModel(ctx, node, declId) { + if (!isCallOf(node, DEFINE_MODEL)) { + return false; + } + ctx.hasDefineModelCall = true; + const type = node.typeParameters && node.typeParameters.params[0] || void 0; + let modelName; + let options; + const arg0 = node.arguments[0] && CompilerDOM.unwrapTSNode(node.arguments[0]); + const hasName = arg0 && arg0.type === "StringLiteral"; + if (hasName) { + modelName = arg0.value; + options = node.arguments[1]; + } else { + modelName = "modelValue"; + options = arg0; + } + if (ctx.modelDecls[modelName]) { + ctx.error(`duplicate model name ${JSON.stringify(modelName)}`, node); + } + let optionsString = options && ctx.getString(options); + let optionsRemoved = !options; + const runtimeOptionNodes = []; + if (options && options.type === "ObjectExpression" && !options.properties.some((p) => p.type === "SpreadElement" || p.computed)) { + let removed = 0; + for (let i = options.properties.length - 1; i >= 0; i--) { + const p = options.properties[i]; + const next = options.properties[i + 1]; + const start = p.start; + const end = next ? next.start : options.end - 1; + if ((p.type === "ObjectProperty" || p.type === "ObjectMethod") && (p.key.type === "Identifier" && (p.key.name === "get" || p.key.name === "set") || p.key.type === "StringLiteral" && (p.key.value === "get" || p.key.value === "set"))) { + optionsString = optionsString.slice(0, start - options.start) + optionsString.slice(end - options.start); + } else { + removed++; + ctx.s.remove(ctx.startOffset + start, ctx.startOffset + end); + runtimeOptionNodes.push(p); + } + } + if (removed === options.properties.length) { + optionsRemoved = true; + ctx.s.remove( + ctx.startOffset + (hasName ? arg0.end : options.start), + ctx.startOffset + options.end + ); + } + } + ctx.modelDecls[modelName] = { + type, + options: optionsString, + runtimeOptionNodes, + identifier: declId && declId.type === "Identifier" ? declId.name : void 0 + }; + ctx.bindingMetadata[modelName] = "props"; + ctx.s.overwrite( + ctx.startOffset + node.callee.start, + ctx.startOffset + node.callee.end, + ctx.helper("useModel") + ); + ctx.s.appendLeft( + ctx.startOffset + (node.arguments.length ? node.arguments[0].start : node.end - 1), + `__props, ` + (hasName ? `` : `${JSON.stringify(modelName)}${optionsRemoved ? `` : `, `}`) + ); + return true; +} +function genModelProps(ctx) { + if (!ctx.hasDefineModelCall) return; + const isProd = !!ctx.options.isProd; + let modelPropsDecl = ""; + for (const [name, { type, options: runtimeOptions }] of Object.entries( + ctx.modelDecls + )) { + let skipCheck = false; + let codegenOptions = ``; + let runtimeTypes = type && inferRuntimeType(ctx, type); + if (runtimeTypes) { + const hasBoolean = runtimeTypes.includes("Boolean"); + const hasFunction = runtimeTypes.includes("Function"); + const hasUnknownType = runtimeTypes.includes(UNKNOWN_TYPE); + if (hasUnknownType) { + if (hasBoolean || hasFunction) { + runtimeTypes = runtimeTypes.filter((t) => t !== UNKNOWN_TYPE); + skipCheck = true; + } else { + runtimeTypes = ["null"]; + } + } + if (!isProd) { + codegenOptions = `type: ${toRuntimeTypeString(runtimeTypes)}` + (skipCheck ? ", skipCheck: true" : ""); + } else if (hasBoolean || runtimeOptions && hasFunction) { + codegenOptions = `type: ${toRuntimeTypeString(runtimeTypes)}`; + } else ; + } + let decl; + if (codegenOptions && runtimeOptions) { + decl = ctx.isTS ? `{ ${codegenOptions}, ...${runtimeOptions} }` : `Object.assign({ ${codegenOptions} }, ${runtimeOptions})`; + } else if (codegenOptions) { + decl = `{ ${codegenOptions} }`; + } else if (runtimeOptions) { + decl = runtimeOptions; + } else { + decl = `{}`; + } + modelPropsDecl += ` + ${JSON.stringify(name)}: ${decl},`; + const modifierPropName = JSON.stringify( + name === "modelValue" ? `modelModifiers` : `${name}Modifiers` + ); + modelPropsDecl += ` + ${modifierPropName}: {},`; + } + return `{${modelPropsDecl} + }`; +} + +const DEFINE_PROPS = "defineProps"; +const WITH_DEFAULTS = "withDefaults"; +function processDefineProps(ctx, node, declId, isWithDefaults = false) { + if (!isCallOf(node, DEFINE_PROPS)) { + return processWithDefaults(ctx, node, declId); + } + if (ctx.hasDefinePropsCall) { + ctx.error(`duplicate ${DEFINE_PROPS}() call`, node); + } + ctx.hasDefinePropsCall = true; + ctx.propsRuntimeDecl = node.arguments[0]; + if (ctx.propsRuntimeDecl) { + for (const key of getObjectOrArrayExpressionKeys(ctx.propsRuntimeDecl)) { + if (!(key in ctx.bindingMetadata)) { + ctx.bindingMetadata[key] = "props"; + } + } + } + if (node.typeParameters) { + if (ctx.propsRuntimeDecl) { + ctx.error( + `${DEFINE_PROPS}() cannot accept both type and non-type arguments at the same time. Use one or the other.`, + node + ); + } + ctx.propsTypeDecl = node.typeParameters.params[0]; + } + if (!isWithDefaults && declId && declId.type === "ObjectPattern") { + processPropsDestructure(ctx, declId); + } + ctx.propsCall = node; + ctx.propsDecl = declId; + return true; +} +function processWithDefaults(ctx, node, declId) { + if (!isCallOf(node, WITH_DEFAULTS)) { + return false; + } + if (!processDefineProps( + ctx, + node.arguments[0], + declId, + true + )) { + ctx.error( + `${WITH_DEFAULTS}' first argument must be a ${DEFINE_PROPS} call.`, + node.arguments[0] || node + ); + } + if (ctx.propsRuntimeDecl) { + ctx.error( + `${WITH_DEFAULTS} can only be used with type-based ${DEFINE_PROPS} declaration.`, + node + ); + } + if (declId && declId.type === "ObjectPattern") { + ctx.warn( + `${WITH_DEFAULTS}() is unnecessary when using destructure with ${DEFINE_PROPS}(). +Reactive destructure will be disabled when using withDefaults(). +Prefer using destructure default values, e.g. const { foo = 1 } = defineProps(...). `, + node.callee + ); + } + ctx.propsRuntimeDefaults = node.arguments[1]; + if (!ctx.propsRuntimeDefaults) { + ctx.error(`The 2nd argument of ${WITH_DEFAULTS} is required.`, node); + } + ctx.propsCall = node; + return true; +} +function genRuntimeProps(ctx) { + let propsDecls; + if (ctx.propsRuntimeDecl) { + propsDecls = ctx.getString(ctx.propsRuntimeDecl).trim(); + if (ctx.propsDestructureDecl) { + const defaults = []; + for (const key in ctx.propsDestructuredBindings) { + const d = genDestructuredDefaultValue(ctx, key); + const finalKey = getEscapedPropName(key); + if (d) + defaults.push( + `${finalKey}: ${d.valueString}${d.needSkipFactory ? `, __skip_${finalKey}: true` : ``}` + ); + } + if (defaults.length) { + propsDecls = `/*@__PURE__*/${ctx.helper( + `mergeDefaults` + )}(${propsDecls}, { + ${defaults.join(",\n ")} +})`; + } + } + } else if (ctx.propsTypeDecl) { + propsDecls = extractRuntimeProps(ctx); + } + const modelsDecls = genModelProps(ctx); + if (propsDecls && modelsDecls) { + return `/*@__PURE__*/${ctx.helper( + "mergeModels" + )}(${propsDecls}, ${modelsDecls})`; + } else { + return modelsDecls || propsDecls; + } +} +function extractRuntimeProps(ctx) { + const props = resolveRuntimePropsFromType(ctx, ctx.propsTypeDecl); + if (!props.length) { + return; + } + const propStrings = []; + const hasStaticDefaults = hasStaticWithDefaults(ctx); + for (const prop of props) { + propStrings.push(genRuntimePropFromType(ctx, prop, hasStaticDefaults)); + if ("bindingMetadata" in ctx && !(prop.key in ctx.bindingMetadata)) { + ctx.bindingMetadata[prop.key] = "props"; + } + } + let propsDecls = `{ + ${propStrings.join(",\n ")} + }`; + if (ctx.propsRuntimeDefaults && !hasStaticDefaults) { + propsDecls = `/*@__PURE__*/${ctx.helper( + "mergeDefaults" + )}(${propsDecls}, ${ctx.getString(ctx.propsRuntimeDefaults)})`; + } + return propsDecls; +} +function resolveRuntimePropsFromType(ctx, node) { + const props = []; + const elements = resolveTypeElements(ctx, node); + for (const key in elements.props) { + const e = elements.props[key]; + let type = inferRuntimeType(ctx, e); + let skipCheck = false; + if (type.includes(UNKNOWN_TYPE)) { + if (type.includes("Boolean") || type.includes("Function")) { + type = type.filter((t) => t !== UNKNOWN_TYPE); + skipCheck = true; + } else { + type = ["null"]; + } + } + props.push({ + key, + required: !e.optional, + type: type || [`null`], + skipCheck + }); + } + return props; +} +function genRuntimePropFromType(ctx, { key, required, type, skipCheck }, hasStaticDefaults) { + let defaultString; + const destructured = genDestructuredDefaultValue(ctx, key, type); + if (destructured) { + defaultString = `default: ${destructured.valueString}${destructured.needSkipFactory ? `, skipFactory: true` : ``}`; + } else if (hasStaticDefaults) { + const prop = ctx.propsRuntimeDefaults.properties.find( + (node) => { + if (node.type === "SpreadElement") return false; + return resolveObjectKey(node.key, node.computed) === key; + } + ); + if (prop) { + if (prop.type === "ObjectProperty") { + defaultString = `default: ${ctx.getString(prop.value)}`; + } else { + defaultString = `${prop.async ? "async " : ""}${prop.kind !== "method" ? `${prop.kind} ` : ""}default() ${ctx.getString(prop.body)}`; + } + } + } + const finalKey = getEscapedPropName(key); + if (!ctx.options.isProd) { + return `${finalKey}: { ${concatStrings([ + `type: ${toRuntimeTypeString(type)}`, + `required: ${required}`, + skipCheck && "skipCheck: true", + defaultString + ])} }`; + } else if (type.some( + (el) => el === "Boolean" || (!hasStaticDefaults || defaultString) && el === "Function" + )) { + return `${finalKey}: { ${concatStrings([ + `type: ${toRuntimeTypeString(type)}`, + defaultString + ])} }`; + } else { + if (ctx.isCE) { + if (defaultString) { + return `${finalKey}: ${`{ ${defaultString}, type: ${toRuntimeTypeString( + type + )} }`}`; + } else { + return `${finalKey}: {type: ${toRuntimeTypeString(type)}}`; + } + } + return `${finalKey}: ${defaultString ? `{ ${defaultString} }` : `{}`}`; + } +} +function hasStaticWithDefaults(ctx) { + return !!(ctx.propsRuntimeDefaults && ctx.propsRuntimeDefaults.type === "ObjectExpression" && ctx.propsRuntimeDefaults.properties.every( + (node) => node.type !== "SpreadElement" && (!node.computed || node.key.type.endsWith("Literal")) + )); +} +function genDestructuredDefaultValue(ctx, key, inferredType) { + const destructured = ctx.propsDestructuredBindings[key]; + const defaultVal = destructured && destructured.default; + if (defaultVal) { + const value = ctx.getString(defaultVal); + const unwrapped = CompilerDOM.unwrapTSNode(defaultVal); + if (inferredType && inferredType.length && !inferredType.includes("null")) { + const valueType = inferValueType(unwrapped); + if (valueType && !inferredType.includes(valueType)) { + ctx.error( + `Default value of prop "${key}" does not match declared type.`, + unwrapped + ); + } + } + const needSkipFactory = !inferredType && (CompilerDOM.isFunctionType(unwrapped) || unwrapped.type === "Identifier"); + const needFactoryWrap = !needSkipFactory && !isLiteralNode(unwrapped) && !(inferredType == null ? void 0 : inferredType.includes("Function")); + return { + valueString: needFactoryWrap ? `() => (${value})` : value, + needSkipFactory + }; + } +} +function inferValueType(node) { + switch (node.type) { + case "StringLiteral": + return "String"; + case "NumericLiteral": + return "Number"; + case "BooleanLiteral": + return "Boolean"; + case "ObjectExpression": + return "Object"; + case "ArrayExpression": + return "Array"; + case "FunctionExpression": + case "ArrowFunctionExpression": + return "Function"; + } +} + +function processPropsDestructure(ctx, declId) { + if (ctx.options.propsDestructure === "error") { + ctx.error(`Props destructure is explicitly prohibited via config.`, declId); + } else if (ctx.options.propsDestructure === false) { + return; + } + ctx.propsDestructureDecl = declId; + const registerBinding = (key, local, defaultValue) => { + ctx.propsDestructuredBindings[key] = { local, default: defaultValue }; + if (local !== key) { + ctx.bindingMetadata[local] = "props-aliased"; + (ctx.bindingMetadata.__propsAliases || (ctx.bindingMetadata.__propsAliases = {}))[local] = key; + } + }; + for (const prop of declId.properties) { + if (prop.type === "ObjectProperty") { + const propKey = resolveObjectKey(prop.key, prop.computed); + if (!propKey) { + ctx.error( + `${DEFINE_PROPS}() destructure cannot use computed key.`, + prop.key + ); + } + if (prop.value.type === "AssignmentPattern") { + const { left, right } = prop.value; + if (left.type !== "Identifier") { + ctx.error( + `${DEFINE_PROPS}() destructure does not support nested patterns.`, + left + ); + } + registerBinding(propKey, left.name, right); + } else if (prop.value.type === "Identifier") { + registerBinding(propKey, prop.value.name); + } else { + ctx.error( + `${DEFINE_PROPS}() destructure does not support nested patterns.`, + prop.value + ); + } + } else { + ctx.propsDestructureRestId = prop.argument.name; + ctx.bindingMetadata[ctx.propsDestructureRestId] = "setup-reactive-const"; + } + } +} +function transformDestructuredProps(ctx, vueImportAliases) { + if (ctx.options.propsDestructure === false) { + return; + } + const rootScope = /* @__PURE__ */ Object.create(null); + const scopeStack = [rootScope]; + let currentScope = rootScope; + const excludedIds = /* @__PURE__ */ new WeakSet(); + const parentStack = []; + const propsLocalToPublicMap = /* @__PURE__ */ Object.create(null); + for (const key in ctx.propsDestructuredBindings) { + const { local } = ctx.propsDestructuredBindings[key]; + rootScope[local] = true; + propsLocalToPublicMap[local] = key; + } + function pushScope() { + scopeStack.push(currentScope = Object.create(currentScope)); + } + function popScope() { + scopeStack.pop(); + currentScope = scopeStack[scopeStack.length - 1] || null; + } + function registerLocalBinding(id) { + excludedIds.add(id); + if (currentScope) { + currentScope[id.name] = false; + } else { + ctx.error( + "registerBinding called without active scope, something is wrong.", + id + ); + } + } + function walkScope(node, isRoot = false) { + for (const stmt of node.body) { + if (stmt.type === "VariableDeclaration") { + walkVariableDeclaration(stmt, isRoot); + } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { + if (stmt.declare || !stmt.id) continue; + registerLocalBinding(stmt.id); + } else if ((stmt.type === "ForOfStatement" || stmt.type === "ForInStatement") && stmt.left.type === "VariableDeclaration") { + walkVariableDeclaration(stmt.left); + } else if (stmt.type === "ExportNamedDeclaration" && stmt.declaration && stmt.declaration.type === "VariableDeclaration") { + walkVariableDeclaration(stmt.declaration, isRoot); + } else if (stmt.type === "LabeledStatement" && stmt.body.type === "VariableDeclaration") { + walkVariableDeclaration(stmt.body, isRoot); + } + } + } + function walkVariableDeclaration(stmt, isRoot = false) { + if (stmt.declare) { + return; + } + for (const decl of stmt.declarations) { + const isDefineProps = isRoot && decl.init && isCallOf(CompilerDOM.unwrapTSNode(decl.init), "defineProps"); + for (const id of CompilerDOM.extractIdentifiers(decl.id)) { + if (isDefineProps) { + excludedIds.add(id); + } else { + registerLocalBinding(id); + } + } + } + } + function rewriteId(id, parent, parentStack2) { + if (parent.type === "AssignmentExpression" && id === parent.left || parent.type === "UpdateExpression") { + ctx.error(`Cannot assign to destructured props as they are readonly.`, id); + } + if (CompilerDOM.isStaticProperty(parent) && parent.shorthand) { + if (!parent.inPattern || CompilerDOM.isInDestructureAssignment(parent, parentStack2)) { + ctx.s.appendLeft( + id.end + ctx.startOffset, + `: ${shared.genPropsAccessExp(propsLocalToPublicMap[id.name])}` + ); + } + } else { + ctx.s.overwrite( + id.start + ctx.startOffset, + id.end + ctx.startOffset, + shared.genPropsAccessExp(propsLocalToPublicMap[id.name]) + ); + } + } + function checkUsage(node, method, alias = method) { + if (isCallOf(node, alias)) { + const arg = CompilerDOM.unwrapTSNode(node.arguments[0]); + if (arg.type === "Identifier" && currentScope[arg.name]) { + ctx.error( + `"${arg.name}" is a destructured prop and should not be passed directly to ${method}(). Pass a getter () => ${arg.name} instead.`, + arg + ); + } + } + } + const ast = ctx.scriptSetupAst; + walkScope(ast, true); + estreeWalker.walk(ast, { + enter(node, parent) { + parent && parentStack.push(parent); + if (parent && parent.type.startsWith("TS") && !CompilerDOM.TS_NODE_TYPES.includes(parent.type)) { + return this.skip(); + } + checkUsage(node, "watch", vueImportAliases.watch); + checkUsage(node, "toRef", vueImportAliases.toRef); + if (CompilerDOM.isFunctionType(node)) { + pushScope(); + CompilerDOM.walkFunctionParams(node, registerLocalBinding); + if (node.body.type === "BlockStatement") { + walkScope(node.body); + } + return; + } + if (node.type === "CatchClause") { + pushScope(); + if (node.param && node.param.type === "Identifier") { + registerLocalBinding(node.param); + } + walkScope(node.body); + return; + } + if (node.type === "BlockStatement" && !CompilerDOM.isFunctionType(parent)) { + pushScope(); + walkScope(node); + return; + } + if (node.type === "Identifier") { + if (CompilerDOM.isReferencedIdentifier(node, parent, parentStack) && !excludedIds.has(node)) { + if (currentScope[node.name]) { + rewriteId(node, parent, parentStack); + } + } + } + }, + leave(node, parent) { + parent && parentStack.pop(); + if (node.type === "BlockStatement" && !CompilerDOM.isFunctionType(parent) || CompilerDOM.isFunctionType(node)) { + popScope(); + } + } + }); +} + +const DEFINE_EMITS = "defineEmits"; +function processDefineEmits(ctx, node, declId) { + if (!isCallOf(node, DEFINE_EMITS)) { + return false; + } + if (ctx.hasDefineEmitCall) { + ctx.error(`duplicate ${DEFINE_EMITS}() call`, node); + } + ctx.hasDefineEmitCall = true; + ctx.emitsRuntimeDecl = node.arguments[0]; + if (node.typeParameters) { + if (ctx.emitsRuntimeDecl) { + ctx.error( + `${DEFINE_EMITS}() cannot accept both type and non-type arguments at the same time. Use one or the other.`, + node + ); + } + ctx.emitsTypeDecl = node.typeParameters.params[0]; + } + ctx.emitDecl = declId; + return true; +} +function genRuntimeEmits(ctx) { + let emitsDecl = ""; + if (ctx.emitsRuntimeDecl) { + emitsDecl = ctx.getString(ctx.emitsRuntimeDecl).trim(); + } else if (ctx.emitsTypeDecl) { + const typeDeclaredEmits = extractRuntimeEmits(ctx); + emitsDecl = typeDeclaredEmits.size ? `[${Array.from(typeDeclaredEmits).map((k) => JSON.stringify(k)).join(", ")}]` : ``; + } + if (ctx.hasDefineModelCall) { + let modelEmitsDecl = `[${Object.keys(ctx.modelDecls).map((n) => JSON.stringify(`update:${n}`)).join(", ")}]`; + emitsDecl = emitsDecl ? `/*@__PURE__*/${ctx.helper( + "mergeModels" + )}(${emitsDecl}, ${modelEmitsDecl})` : modelEmitsDecl; + } + return emitsDecl; +} +function extractRuntimeEmits(ctx) { + const emits = /* @__PURE__ */ new Set(); + const node = ctx.emitsTypeDecl; + if (node.type === "TSFunctionType") { + extractEventNames(ctx, node.parameters[0], emits); + return emits; + } + const { props, calls } = resolveTypeElements(ctx, node); + let hasProperty = false; + for (const key in props) { + emits.add(key); + hasProperty = true; + } + if (calls) { + if (hasProperty) { + ctx.error( + `defineEmits() type cannot mixed call signature and property syntax.`, + node + ); + } + for (const call of calls) { + extractEventNames(ctx, call.parameters[0], emits); + } + } + return emits; +} +function extractEventNames(ctx, eventName, emits) { + if (eventName.type === "Identifier" && eventName.typeAnnotation && eventName.typeAnnotation.type === "TSTypeAnnotation") { + const types = resolveUnionType(ctx, eventName.typeAnnotation.typeAnnotation); + for (const type of types) { + if (type.type === "TSLiteralType") { + if (type.literal.type !== "UnaryExpression" && type.literal.type !== "TemplateLiteral") { + emits.add(String(type.literal.value)); + } + } + } + } +} + +const DEFINE_EXPOSE = "defineExpose"; +function processDefineExpose(ctx, node) { + if (isCallOf(node, DEFINE_EXPOSE)) { + if (ctx.hasDefineExposeCall) { + ctx.error(`duplicate ${DEFINE_EXPOSE}() call`, node); + } + ctx.hasDefineExposeCall = true; + return true; + } + return false; +} + +const DEFINE_SLOTS = "defineSlots"; +function processDefineSlots(ctx, node, declId) { + if (!isCallOf(node, DEFINE_SLOTS)) { + return false; + } + if (ctx.hasDefineSlotsCall) { + ctx.error(`duplicate ${DEFINE_SLOTS}() call`, node); + } + ctx.hasDefineSlotsCall = true; + if (node.arguments.length > 0) { + ctx.error(`${DEFINE_SLOTS}() cannot accept arguments`, node); + } + if (declId) { + ctx.s.overwrite( + ctx.startOffset + node.start, + ctx.startOffset + node.end, + `${ctx.helper("useSlots")}()` + ); + } + return true; +} + +const DEFINE_OPTIONS = "defineOptions"; +function processDefineOptions(ctx, node) { + if (!isCallOf(node, DEFINE_OPTIONS)) { + return false; + } + if (ctx.hasDefineOptionsCall) { + ctx.error(`duplicate ${DEFINE_OPTIONS}() call`, node); + } + if (node.typeParameters) { + ctx.error(`${DEFINE_OPTIONS}() cannot accept type arguments`, node); + } + if (!node.arguments[0]) return true; + ctx.hasDefineOptionsCall = true; + ctx.optionsRuntimeDecl = CompilerDOM.unwrapTSNode(node.arguments[0]); + let propsOption = void 0; + let emitsOption = void 0; + let exposeOption = void 0; + let slotsOption = void 0; + if (ctx.optionsRuntimeDecl.type === "ObjectExpression") { + for (const prop of ctx.optionsRuntimeDecl.properties) { + if ((prop.type === "ObjectProperty" || prop.type === "ObjectMethod") && prop.key.type === "Identifier") { + switch (prop.key.name) { + case "props": + propsOption = prop; + break; + case "emits": + emitsOption = prop; + break; + case "expose": + exposeOption = prop; + break; + case "slots": + slotsOption = prop; + break; + } + } + } + } + if (propsOption) { + ctx.error( + `${DEFINE_OPTIONS}() cannot be used to declare props. Use ${DEFINE_PROPS}() instead.`, + propsOption + ); + } + if (emitsOption) { + ctx.error( + `${DEFINE_OPTIONS}() cannot be used to declare emits. Use ${DEFINE_EMITS}() instead.`, + emitsOption + ); + } + if (exposeOption) { + ctx.error( + `${DEFINE_OPTIONS}() cannot be used to declare expose. Use ${DEFINE_EXPOSE}() instead.`, + exposeOption + ); + } + if (slotsOption) { + ctx.error( + `${DEFINE_OPTIONS}() cannot be used to declare slots. Use ${DEFINE_SLOTS}() instead.`, + slotsOption + ); + } + return true; +} + +function processAwait(ctx, node, needSemi, isStatement) { + const argumentStart = node.argument.extra && node.argument.extra.parenthesized ? node.argument.extra.parenStart : node.argument.start; + const startOffset = ctx.startOffset; + const argumentStr = ctx.descriptor.source.slice( + argumentStart + startOffset, + node.argument.end + startOffset + ); + const containsNestedAwait = /\bawait\b/.test(argumentStr); + ctx.s.overwrite( + node.start + startOffset, + argumentStart + startOffset, + `${needSemi ? `;` : ``}( + ([__temp,__restore] = ${ctx.helper( + `withAsyncContext` + )}(${containsNestedAwait ? `async ` : ``}() => ` + ); + ctx.s.appendLeft( + node.end + startOffset, + `)), + ${isStatement ? `` : `__temp = `}await __temp, + __restore()${isStatement ? `` : `, + __temp`} +)` + ); +} + +const MACROS = [ + DEFINE_PROPS, + DEFINE_EMITS, + DEFINE_EXPOSE, + DEFINE_OPTIONS, + DEFINE_SLOTS, + DEFINE_MODEL, + WITH_DEFAULTS +]; +function compileScript(sfc, options) { + var _a, _b, _c; + if (!options.id) { + warnOnce( + `compileScript now requires passing the \`id\` option. +Upgrade your vite or vue-loader version for compatibility with the latest experimental proposals.` + ); + } + const ctx = new ScriptCompileContext(sfc, options); + const { script, scriptSetup, source, filename } = sfc; + const hoistStatic = options.hoistStatic !== false && !script; + const scopeId = options.id ? options.id.replace(/^data-v-/, "") : ""; + const scriptLang = script && script.lang; + const scriptSetupLang = scriptSetup && scriptSetup.lang; + if (!scriptSetup) { + if (!script) { + throw new Error(`[@vue/compiler-sfc] SFC contains no <script> tags.`); + } + return processNormalScript(ctx, scopeId); + } + if (script && scriptLang !== scriptSetupLang) { + throw new Error( + `[@vue/compiler-sfc] <script> and <script setup> must have the same language type.` + ); + } + if (scriptSetupLang && !ctx.isJS && !ctx.isTS) { + return scriptSetup; + } + const scriptBindings = /* @__PURE__ */ Object.create(null); + const setupBindings = /* @__PURE__ */ Object.create(null); + let defaultExport; + let hasAwait = false; + let hasInlinedSsrRenderFn = false; + const startOffset = ctx.startOffset; + const endOffset = ctx.endOffset; + const scriptStartOffset = script && script.loc.start.offset; + const scriptEndOffset = script && script.loc.end.offset; + function hoistNode(node) { + const start = node.start + startOffset; + let end = node.end + startOffset; + if (node.trailingComments && node.trailingComments.length > 0) { + const lastCommentNode = node.trailingComments[node.trailingComments.length - 1]; + end = lastCommentNode.end + startOffset; + } + while (end <= source.length) { + if (!/\s/.test(source.charAt(end))) { + break; + } + end++; + } + ctx.s.move(start, end, 0); + } + function registerUserImport(source2, local, imported, isType, isFromSetup, needTemplateUsageCheck) { + let isUsedInTemplate = needTemplateUsageCheck; + if (needTemplateUsageCheck && ctx.isTS && sfc.template && !sfc.template.src && !sfc.template.lang) { + isUsedInTemplate = isImportUsed(local, sfc); + } + ctx.userImports[local] = { + isType, + imported, + local, + source: source2, + isFromSetup, + isUsedInTemplate + }; + } + function checkInvalidScopeReference(node, method) { + if (!node) return; + CompilerDOM.walkIdentifiers(node, (id) => { + const binding = setupBindings[id.name]; + if (binding && binding !== "literal-const") { + ctx.error( + `\`${method}()\` in <script setup> cannot reference locally declared variables because it will be hoisted outside of the setup() function. If your component options require initialization in the module scope, use a separate normal <script> to export the options instead.`, + id + ); + } + }); + } + const scriptAst = ctx.scriptAst; + const scriptSetupAst = ctx.scriptSetupAst; + if (scriptAst) { + for (const node of scriptAst.body) { + if (node.type === "ImportDeclaration") { + for (const specifier of node.specifiers) { + const imported = getImportedName(specifier); + registerUserImport( + node.source.value, + specifier.local.name, + imported, + node.importKind === "type" || specifier.type === "ImportSpecifier" && specifier.importKind === "type", + false, + !options.inlineTemplate + ); + } + } + } + } + for (const node of scriptSetupAst.body) { + if (node.type === "ImportDeclaration") { + hoistNode(node); + let removed = 0; + const removeSpecifier = (i) => { + const removeLeft = i > removed; + removed++; + const current = node.specifiers[i]; + const next = node.specifiers[i + 1]; + ctx.s.remove( + removeLeft ? node.specifiers[i - 1].end + startOffset : current.start + startOffset, + next && !removeLeft ? next.start + startOffset : current.end + startOffset + ); + }; + for (let i = 0; i < node.specifiers.length; i++) { + const specifier = node.specifiers[i]; + const local = specifier.local.name; + const imported = getImportedName(specifier); + const source2 = node.source.value; + const existing = ctx.userImports[local]; + if (source2 === "vue" && MACROS.includes(imported)) { + if (local === imported) { + warnOnce( + `\`${imported}\` is a compiler macro and no longer needs to be imported.` + ); + } else { + ctx.error( + `\`${imported}\` is a compiler macro and cannot be aliased to a different name.`, + specifier + ); + } + removeSpecifier(i); + } else if (existing) { + if (existing.source === source2 && existing.imported === imported) { + removeSpecifier(i); + } else { + ctx.error( + `different imports aliased to same local name.`, + specifier + ); + } + } else { + registerUserImport( + source2, + local, + imported, + node.importKind === "type" || specifier.type === "ImportSpecifier" && specifier.importKind === "type", + true, + !options.inlineTemplate + ); + } + } + if (node.specifiers.length && removed === node.specifiers.length) { + ctx.s.remove(node.start + startOffset, node.end + startOffset); + } + } + } + const vueImportAliases = {}; + for (const key in ctx.userImports) { + const { source: source2, imported, local } = ctx.userImports[key]; + if (source2 === "vue") vueImportAliases[imported] = local; + } + if (script && scriptAst) { + for (const node of scriptAst.body) { + if (node.type === "ExportDefaultDeclaration") { + defaultExport = node; + let optionProperties; + if (defaultExport.declaration.type === "ObjectExpression") { + optionProperties = defaultExport.declaration.properties; + } else if (defaultExport.declaration.type === "CallExpression" && defaultExport.declaration.arguments[0] && defaultExport.declaration.arguments[0].type === "ObjectExpression") { + optionProperties = defaultExport.declaration.arguments[0].properties; + } + if (optionProperties) { + for (const p of optionProperties) { + if (p.type === "ObjectProperty" && p.key.type === "Identifier" && p.key.name === "name") { + ctx.hasDefaultExportName = true; + } + if ((p.type === "ObjectMethod" || p.type === "ObjectProperty") && p.key.type === "Identifier" && p.key.name === "render") { + ctx.hasDefaultExportRender = true; + } + } + } + const start = node.start + scriptStartOffset; + const end = node.declaration.start + scriptStartOffset; + ctx.s.overwrite(start, end, `const ${normalScriptDefaultVar} = `); + } else if (node.type === "ExportNamedDeclaration") { + const defaultSpecifier = node.specifiers.find( + (s) => s.exported.type === "Identifier" && s.exported.name === "default" + ); + if (defaultSpecifier) { + defaultExport = node; + if (node.specifiers.length > 1) { + ctx.s.remove( + defaultSpecifier.start + scriptStartOffset, + defaultSpecifier.end + scriptStartOffset + ); + } else { + ctx.s.remove( + node.start + scriptStartOffset, + node.end + scriptStartOffset + ); + } + if (node.source) { + ctx.s.prepend( + `import { ${defaultSpecifier.local.name} as ${normalScriptDefaultVar} } from '${node.source.value}' +` + ); + } else { + ctx.s.appendLeft( + scriptEndOffset, + ` +const ${normalScriptDefaultVar} = ${defaultSpecifier.local.name} +` + ); + } + } + if (node.declaration) { + walkDeclaration( + "script", + node.declaration, + scriptBindings, + vueImportAliases, + hoistStatic + ); + } + } else if ((node.type === "VariableDeclaration" || node.type === "FunctionDeclaration" || node.type === "ClassDeclaration" || node.type === "TSEnumDeclaration") && !node.declare) { + walkDeclaration( + "script", + node, + scriptBindings, + vueImportAliases, + hoistStatic + ); + } + } + if (scriptStartOffset > startOffset) { + if (!/\n$/.test(script.content.trim())) { + ctx.s.appendLeft(scriptEndOffset, ` +`); + } + ctx.s.move(scriptStartOffset, scriptEndOffset, 0); + } + } + for (const node of scriptSetupAst.body) { + if (node.type === "ExpressionStatement") { + const expr = CompilerDOM.unwrapTSNode(node.expression); + if (processDefineProps(ctx, expr) || processDefineEmits(ctx, expr) || processDefineOptions(ctx, expr) || processDefineSlots(ctx, expr)) { + ctx.s.remove(node.start + startOffset, node.end + startOffset); + } else if (processDefineExpose(ctx, expr)) { + const callee = expr.callee; + ctx.s.overwrite( + callee.start + startOffset, + callee.end + startOffset, + "__expose" + ); + } else { + processDefineModel(ctx, expr); + } + } + if (node.type === "VariableDeclaration" && !node.declare) { + const total = node.declarations.length; + let left = total; + let lastNonRemoved; + for (let i = 0; i < total; i++) { + const decl = node.declarations[i]; + const init = decl.init && CompilerDOM.unwrapTSNode(decl.init); + if (init) { + if (processDefineOptions(ctx, init)) { + ctx.error( + `${DEFINE_OPTIONS}() has no returning value, it cannot be assigned.`, + node + ); + } + const isDefineProps = processDefineProps(ctx, init, decl.id); + if (ctx.propsDestructureRestId) { + setupBindings[ctx.propsDestructureRestId] = "setup-reactive-const"; + } + const isDefineEmits = !isDefineProps && processDefineEmits(ctx, init, decl.id); + !isDefineEmits && (processDefineSlots(ctx, init, decl.id) || processDefineModel(ctx, init, decl.id)); + if (isDefineProps && !ctx.propsDestructureRestId && ctx.propsDestructureDecl) { + if (left === 1) { + ctx.s.remove(node.start + startOffset, node.end + startOffset); + } else { + let start = decl.start + startOffset; + let end = decl.end + startOffset; + if (i === total - 1) { + start = node.declarations[lastNonRemoved].end + startOffset; + } else { + end = node.declarations[i + 1].start + startOffset; + } + ctx.s.remove(start, end); + left--; + } + } else if (isDefineEmits) { + ctx.s.overwrite( + startOffset + init.start, + startOffset + init.end, + "__emit" + ); + } else { + lastNonRemoved = i; + } + } + } + } + let isAllLiteral = false; + if ((node.type === "VariableDeclaration" || node.type === "FunctionDeclaration" || node.type === "ClassDeclaration" || node.type === "TSEnumDeclaration") && !node.declare) { + isAllLiteral = walkDeclaration( + "scriptSetup", + node, + setupBindings, + vueImportAliases, + hoistStatic, + !!ctx.propsDestructureDecl + ); + } + if (hoistStatic && isAllLiteral) { + hoistNode(node); + } + if (node.type === "VariableDeclaration" && !node.declare || node.type.endsWith("Statement")) { + const scope = [scriptSetupAst.body]; + estreeWalker.walk(node, { + enter(child, parent) { + if (CompilerDOM.isFunctionType(child)) { + this.skip(); + } + if (child.type === "BlockStatement") { + scope.push(child.body); + } + if (child.type === "AwaitExpression") { + hasAwait = true; + const currentScope = scope[scope.length - 1]; + const needsSemi = currentScope.some((n, i) => { + return (scope.length === 1 || i > 0) && n.type === "ExpressionStatement" && n.start === child.start; + }); + processAwait( + ctx, + child, + needsSemi, + parent.type === "ExpressionStatement" + ); + } + }, + exit(node2) { + if (node2.type === "BlockStatement") scope.pop(); + } + }); + } + if (node.type === "ExportNamedDeclaration" && node.exportKind !== "type" || node.type === "ExportAllDeclaration" || node.type === "ExportDefaultDeclaration") { + ctx.error( + `<script setup> cannot contain ES module exports. If you are using a previous version of <script setup>, please consult the updated RFC at https://github.com/vuejs/rfcs/pull/227.`, + node + ); + } + if (ctx.isTS) { + if (node.type.startsWith("TS") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "VariableDeclaration" && node.declare) { + if (node.type !== "TSEnumDeclaration") { + hoistNode(node); + } + } + } + } + if (ctx.propsDestructureDecl) { + transformDestructuredProps(ctx, vueImportAliases); + } + checkInvalidScopeReference(ctx.propsRuntimeDecl, DEFINE_PROPS); + checkInvalidScopeReference(ctx.propsRuntimeDefaults, DEFINE_PROPS); + checkInvalidScopeReference(ctx.propsDestructureDecl, DEFINE_PROPS); + checkInvalidScopeReference(ctx.emitsRuntimeDecl, DEFINE_EMITS); + checkInvalidScopeReference(ctx.optionsRuntimeDecl, DEFINE_OPTIONS); + for (const { runtimeOptionNodes } of Object.values(ctx.modelDecls)) { + for (const node of runtimeOptionNodes) { + checkInvalidScopeReference(node, DEFINE_MODEL); + } + } + if (script) { + if (startOffset < scriptStartOffset) { + ctx.s.remove(0, startOffset); + ctx.s.remove(endOffset, scriptStartOffset); + ctx.s.remove(scriptEndOffset, source.length); + } else { + ctx.s.remove(0, scriptStartOffset); + ctx.s.remove(scriptEndOffset, startOffset); + ctx.s.remove(endOffset, source.length); + } + } else { + ctx.s.remove(0, startOffset); + ctx.s.remove(endOffset, source.length); + } + if (scriptAst) { + Object.assign(ctx.bindingMetadata, analyzeScriptBindings(scriptAst.body)); + } + for (const [key, { isType, imported, source: source2 }] of Object.entries( + ctx.userImports + )) { + if (isType) continue; + ctx.bindingMetadata[key] = imported === "*" || imported === "default" && source2.endsWith(".vue") || source2 === "vue" ? "setup-const" : "setup-maybe-ref"; + } + for (const key in scriptBindings) { + ctx.bindingMetadata[key] = scriptBindings[key]; + } + for (const key in setupBindings) { + ctx.bindingMetadata[key] = setupBindings[key]; + } + if (sfc.cssVars.length && // no need to do this when targeting SSR + !((_a = options.templateOptions) == null ? void 0 : _a.ssr)) { + ctx.helperImports.add(CSS_VARS_HELPER); + ctx.helperImports.add("unref"); + ctx.s.prependLeft( + startOffset, + ` +${genCssVarsCode( + sfc.cssVars, + ctx.bindingMetadata, + scopeId, + !!options.isProd + )} +` + ); + } + let args = `__props`; + if (ctx.propsTypeDecl) { + args += `: any`; + } + if (ctx.propsDecl) { + if (ctx.propsDestructureRestId) { + ctx.s.overwrite( + startOffset + ctx.propsCall.start, + startOffset + ctx.propsCall.end, + `${ctx.helper(`createPropsRestProxy`)}(__props, ${JSON.stringify( + Object.keys(ctx.propsDestructuredBindings) + )})` + ); + ctx.s.overwrite( + startOffset + ctx.propsDestructureDecl.start, + startOffset + ctx.propsDestructureDecl.end, + ctx.propsDestructureRestId + ); + } else if (!ctx.propsDestructureDecl) { + ctx.s.overwrite( + startOffset + ctx.propsCall.start, + startOffset + ctx.propsCall.end, + "__props" + ); + } + } + if (hasAwait) { + const any = ctx.isTS ? `: any` : ``; + ctx.s.prependLeft(startOffset, ` +let __temp${any}, __restore${any} +`); + } + const destructureElements = ctx.hasDefineExposeCall || !options.inlineTemplate ? [`expose: __expose`] : []; + if (ctx.emitDecl) { + destructureElements.push(`emit: __emit`); + } + if (destructureElements.length) { + args += `, { ${destructureElements.join(", ")} }`; + } + let returned; + if (!options.inlineTemplate || !sfc.template && ctx.hasDefaultExportRender) { + const allBindings = { + ...scriptBindings, + ...setupBindings + }; + for (const key in ctx.userImports) { + if (!ctx.userImports[key].isType && ctx.userImports[key].isUsedInTemplate) { + allBindings[key] = true; + } + } + returned = `{ `; + for (const key in allBindings) { + if (allBindings[key] === true && ctx.userImports[key].source !== "vue" && !ctx.userImports[key].source.endsWith(".vue")) { + returned += `get ${key}() { return ${key} }, `; + } else if (ctx.bindingMetadata[key] === "setup-let") { + const setArg = key === "v" ? `_v` : `v`; + returned += `get ${key}() { return ${key} }, set ${key}(${setArg}) { ${key} = ${setArg} }, `; + } else { + returned += `${key}, `; + } + } + returned = returned.replace(/, $/, "") + ` }`; + } else { + if (sfc.template && !sfc.template.src) { + if (options.templateOptions && options.templateOptions.ssr) { + hasInlinedSsrRenderFn = true; + } + const { code, ast, preamble, tips, errors } = compileTemplate({ + filename, + ast: sfc.template.ast, + source: sfc.template.content, + inMap: sfc.template.map, + ...options.templateOptions, + id: scopeId, + scoped: sfc.styles.some((s) => s.scoped), + isProd: options.isProd, + ssrCssVars: sfc.cssVars, + compilerOptions: { + ...options.templateOptions && options.templateOptions.compilerOptions, + inline: true, + isTS: ctx.isTS, + bindingMetadata: ctx.bindingMetadata + } + }); + if (tips.length) { + tips.forEach(warnOnce); + } + const err = errors[0]; + if (typeof err === "string") { + throw new Error(err); + } else if (err) { + if (err.loc) { + err.message += ` + +` + sfc.filename + "\n" + shared.generateCodeFrame( + source, + err.loc.start.offset, + err.loc.end.offset + ) + ` +`; + } + throw err; + } + if (preamble) { + ctx.s.prepend(preamble); + } + if (ast && ast.helpers.has(CompilerDOM.UNREF)) { + ctx.helperImports.delete("unref"); + } + returned = code; + } else { + returned = `() => {}`; + } + } + if (!options.inlineTemplate && true) { + ctx.s.appendRight( + endOffset, + ` +const __returned__ = ${returned} +Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true }) +return __returned__ +} + +` + ); + } else { + ctx.s.appendRight(endOffset, ` +return ${returned} +} + +`); + } + const genDefaultAs = options.genDefaultAs ? `const ${options.genDefaultAs} =` : `export default`; + let runtimeOptions = ``; + if (!ctx.hasDefaultExportName && filename && filename !== DEFAULT_FILENAME) { + const match = filename.match(/([^/\\]+)\.\w+$/); + if (match) { + runtimeOptions += ` + __name: '${match[1]}',`; + } + } + if (hasInlinedSsrRenderFn) { + runtimeOptions += ` + __ssrInlineRender: true,`; + } + const propsDecl = genRuntimeProps(ctx); + if (propsDecl) runtimeOptions += ` + props: ${propsDecl},`; + const emitsDecl = genRuntimeEmits(ctx); + if (emitsDecl) runtimeOptions += ` + emits: ${emitsDecl},`; + let definedOptions = ""; + if (ctx.optionsRuntimeDecl) { + definedOptions = scriptSetup.content.slice(ctx.optionsRuntimeDecl.start, ctx.optionsRuntimeDecl.end).trim(); + } + const exposeCall = ctx.hasDefineExposeCall || options.inlineTemplate ? `` : ` __expose(); +`; + if (ctx.isTS) { + const def = (defaultExport ? ` + ...${normalScriptDefaultVar},` : ``) + (definedOptions ? ` + ...${definedOptions},` : ""); + ctx.s.prependLeft( + startOffset, + ` +${genDefaultAs} /*@__PURE__*/${ctx.helper( + `defineComponent` + )}({${def}${runtimeOptions} + ${hasAwait ? `async ` : ``}setup(${args}) { +${exposeCall}` + ); + ctx.s.appendRight(endOffset, `})`); + } else { + if (defaultExport || definedOptions) { + ctx.s.prependLeft( + startOffset, + ` +${genDefaultAs} /*@__PURE__*/Object.assign(${defaultExport ? `${normalScriptDefaultVar}, ` : ""}${definedOptions ? `${definedOptions}, ` : ""}{${runtimeOptions} + ${hasAwait ? `async ` : ``}setup(${args}) { +${exposeCall}` + ); + ctx.s.appendRight(endOffset, `})`); + } else { + ctx.s.prependLeft( + startOffset, + ` +${genDefaultAs} {${runtimeOptions} + ${hasAwait ? `async ` : ``}setup(${args}) { +${exposeCall}` + ); + ctx.s.appendRight(endOffset, `}`); + } + } + if (ctx.helperImports.size > 0) { + const runtimeModuleName = (_c = (_b = options.templateOptions) == null ? void 0 : _b.compilerOptions) == null ? void 0 : _c.runtimeModuleName; + const importSrc = runtimeModuleName ? JSON.stringify(runtimeModuleName) : `'vue'`; + ctx.s.prepend( + `import { ${[...ctx.helperImports].map((h) => `${h} as _${h}`).join(", ")} } from ${importSrc} +` + ); + } + return { + ...scriptSetup, + bindings: ctx.bindingMetadata, + imports: ctx.userImports, + content: ctx.s.toString(), + map: options.sourceMap !== false ? ctx.s.generateMap({ + source: filename, + hires: true, + includeContent: true + }) : void 0, + scriptAst: scriptAst == null ? void 0 : scriptAst.body, + scriptSetupAst: scriptSetupAst == null ? void 0 : scriptSetupAst.body, + deps: ctx.deps ? [...ctx.deps] : void 0 + }; +} +function registerBinding(bindings, node, type) { + bindings[node.name] = type; +} +function walkDeclaration(from, node, bindings, userImportAliases, hoistStatic, isPropsDestructureEnabled = false) { + let isAllLiteral = false; + if (node.type === "VariableDeclaration") { + const isConst = node.kind === "const"; + isAllLiteral = isConst && node.declarations.every( + (decl) => decl.id.type === "Identifier" && isStaticNode(decl.init) + ); + for (const { id, init: _init } of node.declarations) { + const init = _init && CompilerDOM.unwrapTSNode(_init); + const isConstMacroCall = isConst && isCallOf( + init, + (c) => c === DEFINE_PROPS || c === DEFINE_EMITS || c === WITH_DEFAULTS || c === DEFINE_SLOTS + ); + if (id.type === "Identifier") { + let bindingType; + const userReactiveBinding = userImportAliases["reactive"]; + if ((hoistStatic || from === "script") && (isAllLiteral || isConst && isStaticNode(init))) { + bindingType = "literal-const"; + } else if (isCallOf(init, userReactiveBinding)) { + bindingType = isConst ? "setup-reactive-const" : "setup-let"; + } else if ( + // if a declaration is a const literal, we can mark it so that + // the generated render fn code doesn't need to unref() it + isConstMacroCall || isConst && canNeverBeRef(init, userReactiveBinding) + ) { + bindingType = isCallOf(init, DEFINE_PROPS) ? "setup-reactive-const" : "setup-const"; + } else if (isConst) { + if (isCallOf( + init, + (m) => m === userImportAliases["ref"] || m === userImportAliases["computed"] || m === userImportAliases["shallowRef"] || m === userImportAliases["customRef"] || m === userImportAliases["toRef"] || m === DEFINE_MODEL + )) { + bindingType = "setup-ref"; + } else { + bindingType = "setup-maybe-ref"; + } + } else { + bindingType = "setup-let"; + } + registerBinding(bindings, id, bindingType); + } else { + if (isCallOf(init, DEFINE_PROPS) && isPropsDestructureEnabled) { + continue; + } + if (id.type === "ObjectPattern") { + walkObjectPattern(id, bindings, isConst, isConstMacroCall); + } else if (id.type === "ArrayPattern") { + walkArrayPattern(id, bindings, isConst, isConstMacroCall); + } + } + } + } else if (node.type === "TSEnumDeclaration") { + isAllLiteral = node.members.every( + (member) => !member.initializer || isStaticNode(member.initializer) + ); + bindings[node.id.name] = isAllLiteral ? "literal-const" : "setup-const"; + } else if (node.type === "FunctionDeclaration" || node.type === "ClassDeclaration") { + bindings[node.id.name] = "setup-const"; + } + return isAllLiteral; +} +function walkObjectPattern(node, bindings, isConst, isDefineCall = false) { + for (const p of node.properties) { + if (p.type === "ObjectProperty") { + if (p.key.type === "Identifier" && p.key === p.value) { + const type = isDefineCall ? "setup-const" : isConst ? "setup-maybe-ref" : "setup-let"; + registerBinding(bindings, p.key, type); + } else { + walkPattern(p.value, bindings, isConst, isDefineCall); + } + } else { + const type = isConst ? "setup-const" : "setup-let"; + registerBinding(bindings, p.argument, type); + } + } +} +function walkArrayPattern(node, bindings, isConst, isDefineCall = false) { + for (const e of node.elements) { + e && walkPattern(e, bindings, isConst, isDefineCall); + } +} +function walkPattern(node, bindings, isConst, isDefineCall = false) { + if (node.type === "Identifier") { + const type = isDefineCall ? "setup-const" : isConst ? "setup-maybe-ref" : "setup-let"; + registerBinding(bindings, node, type); + } else if (node.type === "RestElement") { + const type = isConst ? "setup-const" : "setup-let"; + registerBinding(bindings, node.argument, type); + } else if (node.type === "ObjectPattern") { + walkObjectPattern(node, bindings, isConst); + } else if (node.type === "ArrayPattern") { + walkArrayPattern(node, bindings, isConst); + } else if (node.type === "AssignmentPattern") { + if (node.left.type === "Identifier") { + const type = isDefineCall ? "setup-const" : isConst ? "setup-maybe-ref" : "setup-let"; + registerBinding(bindings, node.left, type); + } else { + walkPattern(node.left, bindings, isConst); + } + } +} +function canNeverBeRef(node, userReactiveImport) { + if (isCallOf(node, userReactiveImport)) { + return true; + } + switch (node.type) { + case "UnaryExpression": + case "BinaryExpression": + case "ArrayExpression": + case "ObjectExpression": + case "FunctionExpression": + case "ArrowFunctionExpression": + case "UpdateExpression": + case "ClassExpression": + case "TaggedTemplateExpression": + return true; + case "SequenceExpression": + return canNeverBeRef( + node.expressions[node.expressions.length - 1], + userReactiveImport + ); + default: + if (isLiteralNode(node)) { + return true; + } + return false; + } +} +function isStaticNode(node) { + node = CompilerDOM.unwrapTSNode(node); + switch (node.type) { + case "UnaryExpression": + return isStaticNode(node.argument); + case "LogicalExpression": + // 1 > 2 + case "BinaryExpression": + return isStaticNode(node.left) && isStaticNode(node.right); + case "ConditionalExpression": { + return isStaticNode(node.test) && isStaticNode(node.consequent) && isStaticNode(node.alternate); + } + case "SequenceExpression": + // (1, 2) + case "TemplateLiteral": + return node.expressions.every((expr) => isStaticNode(expr)); + case "ParenthesizedExpression": + return isStaticNode(node.expression); + case "StringLiteral": + case "NumericLiteral": + case "BooleanLiteral": + case "NullLiteral": + case "BigIntLiteral": + return true; + } + return false; +} + +const version = "3.5.13"; +const parseCache = parseCache$1; +const errorMessages = { + ...CompilerDOM.errorMessages, + ...CompilerDOM.DOMErrorMessages +}; +const walk = estreeWalker.walk; +const shouldTransformRef = () => false; + +exports.extractIdentifiers = compilerCore.extractIdentifiers; +exports.generateCodeFrame = compilerCore.generateCodeFrame; +exports.isInDestructureAssignment = compilerCore.isInDestructureAssignment; +exports.isStaticProperty = compilerCore.isStaticProperty; +exports.walkIdentifiers = compilerCore.walkIdentifiers; +exports.MagicString = MagicString; +exports.babelParse = parser$2.parse; +exports.compileScript = compileScript; +exports.compileStyle = compileStyle; +exports.compileStyleAsync = compileStyleAsync; +exports.compileTemplate = compileTemplate; +exports.errorMessages = errorMessages; +exports.extractRuntimeEmits = extractRuntimeEmits; +exports.extractRuntimeProps = extractRuntimeProps; +exports.inferRuntimeType = inferRuntimeType; +exports.invalidateTypeCache = invalidateTypeCache; +exports.parse = parse$1; +exports.parseCache = parseCache; +exports.registerTS = registerTS; +exports.resolveTypeElements = resolveTypeElements; +exports.rewriteDefault = rewriteDefault; +exports.rewriteDefaultAST = rewriteDefaultAST; +exports.shouldTransformRef = shouldTransformRef; +exports.version = version; +exports.walk = walk; diff --git a/vuetest/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts b/vuetest/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts new file mode 100644 index 0000000..3b9d50c --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts @@ -0,0 +1,484 @@ +import * as _babel_types from '@babel/types'; +import { Statement, Expression, TSType, Node, Program, CallExpression, ObjectPattern, TSModuleDeclaration, TSPropertySignature, TSMethodSignature, TSCallSignatureDeclaration, TSFunctionType } from '@babel/types'; +import { RootNode, CompilerOptions, CodegenResult, ParserOptions, CompilerError, RawSourceMap, SourceLocation, BindingMetadata as BindingMetadata$1 } from '@vue/compiler-core'; +export { BindingMetadata, CompilerError, CompilerOptions, extractIdentifiers, generateCodeFrame, isInDestructureAssignment, isStaticProperty, walkIdentifiers } from '@vue/compiler-core'; +import { ParserPlugin } from '@babel/parser'; +export { parse as babelParse } from '@babel/parser'; +import { Result, LazyResult } from 'postcss'; +import MagicString from 'magic-string'; +export { default as MagicString } from 'magic-string'; +import TS from 'typescript'; + +export interface AssetURLTagConfig { + [name: string]: string[]; +} +export interface AssetURLOptions { + /** + * If base is provided, instead of transforming relative asset urls into + * imports, they will be directly rewritten to absolute urls. + */ + base?: string | null; + /** + * If true, also processes absolute urls. + */ + includeAbsolute?: boolean; + tags?: AssetURLTagConfig; +} + +export interface TemplateCompiler { + compile(source: string | RootNode, options: CompilerOptions): CodegenResult; + parse(template: string, options: ParserOptions): RootNode; +} +export interface SFCTemplateCompileResults { + code: string; + ast?: RootNode; + preamble?: string; + source: string; + tips: string[]; + errors: (string | CompilerError)[]; + map?: RawSourceMap; +} +export interface SFCTemplateCompileOptions { + source: string; + ast?: RootNode; + filename: string; + id: string; + scoped?: boolean; + slotted?: boolean; + isProd?: boolean; + ssr?: boolean; + ssrCssVars?: string[]; + inMap?: RawSourceMap; + compiler?: TemplateCompiler; + compilerOptions?: CompilerOptions; + preprocessLang?: string; + preprocessOptions?: any; + /** + * In some cases, compiler-sfc may not be inside the project root (e.g. when + * linked or globally installed). In such cases a custom `require` can be + * passed to correctly resolve the preprocessors. + */ + preprocessCustomRequire?: (id: string) => any; + /** + * Configure what tags/attributes to transform into asset url imports, + * or disable the transform altogether with `false`. + */ + transformAssetUrls?: AssetURLOptions | AssetURLTagConfig | boolean; +} +export declare function compileTemplate(options: SFCTemplateCompileOptions): SFCTemplateCompileResults; + +export interface SFCScriptCompileOptions { + /** + * Scope ID for prefixing injected CSS variables. + * This must be consistent with the `id` passed to `compileStyle`. + */ + id: string; + /** + * Production mode. Used to determine whether to generate hashed CSS variables + */ + isProd?: boolean; + /** + * Enable/disable source map. Defaults to true. + */ + sourceMap?: boolean; + /** + * https://babeljs.io/docs/en/babel-parser#plugins + */ + babelParserPlugins?: ParserPlugin[]; + /** + * A list of files to parse for global types to be made available for type + * resolving in SFC macros. The list must be fully resolved file system paths. + */ + globalTypeFiles?: string[]; + /** + * Compile the template and inline the resulting render function + * directly inside setup(). + * - Only affects `<script setup>` + * - This should only be used in production because it prevents the template + * from being hot-reloaded separately from component state. + */ + inlineTemplate?: boolean; + /** + * Generate the final component as a variable instead of default export. + * This is useful in e.g. @vitejs/plugin-vue where the script needs to be + * placed inside the main module. + */ + genDefaultAs?: string; + /** + * Options for template compilation when inlining. Note these are options that + * would normally be passed to `compiler-sfc`'s own `compileTemplate()`, not + * options passed to `compiler-dom`. + */ + templateOptions?: Partial<SFCTemplateCompileOptions>; + /** + * Hoist <script setup> static constants. + * - Only enables when one `<script setup>` exists. + * @default true + */ + hoistStatic?: boolean; + /** + * Set to `false` to disable reactive destructure for `defineProps` (pre-3.5 + * behavior), or set to `'error'` to throw hard error on props destructures. + * @default true + */ + propsDestructure?: boolean | 'error'; + /** + * File system access methods to be used when resolving types + * imported in SFC macros. Defaults to ts.sys in Node.js, can be overwritten + * to use a virtual file system for use in browsers (e.g. in REPLs) + */ + fs?: { + fileExists(file: string): boolean; + readFile(file: string): string | undefined; + realpath?(file: string): string; + }; + /** + * Transform Vue SFCs into custom elements. + */ + customElement?: boolean | ((filename: string) => boolean); +} +interface ImportBinding { + isType: boolean; + imported: string; + local: string; + source: string; + isFromSetup: boolean; + isUsedInTemplate: boolean; +} +/** + * Compile `<script setup>` + * It requires the whole SFC descriptor because we need to handle and merge + * normal `<script>` + `<script setup>` if both are present. + */ +export declare function compileScript(sfc: SFCDescriptor, options: SFCScriptCompileOptions): SFCScriptBlock; + +export interface SFCParseOptions { + filename?: string; + sourceMap?: boolean; + sourceRoot?: string; + pad?: boolean | 'line' | 'space'; + ignoreEmpty?: boolean; + compiler?: TemplateCompiler; + templateParseOptions?: ParserOptions; +} +export interface SFCBlock { + type: string; + content: string; + attrs: Record<string, string | true>; + loc: SourceLocation; + map?: RawSourceMap; + lang?: string; + src?: string; +} +export interface SFCTemplateBlock extends SFCBlock { + type: 'template'; + ast?: RootNode; +} +export interface SFCScriptBlock extends SFCBlock { + type: 'script'; + setup?: string | boolean; + bindings?: BindingMetadata$1; + imports?: Record<string, ImportBinding>; + scriptAst?: _babel_types.Statement[]; + scriptSetupAst?: _babel_types.Statement[]; + warnings?: string[]; + /** + * Fully resolved dependency file paths (unix slashes) with imported types + * used in macros, used for HMR cache busting in @vitejs/plugin-vue and + * vue-loader. + */ + deps?: string[]; +} +export interface SFCStyleBlock extends SFCBlock { + type: 'style'; + scoped?: boolean; + module?: string | boolean; +} +export interface SFCDescriptor { + filename: string; + source: string; + template: SFCTemplateBlock | null; + script: SFCScriptBlock | null; + scriptSetup: SFCScriptBlock | null; + styles: SFCStyleBlock[]; + customBlocks: SFCBlock[]; + cssVars: string[]; + /** + * whether the SFC uses :slotted() modifier. + * this is used as a compiler optimization hint. + */ + slotted: boolean; + /** + * compare with an existing descriptor to determine whether HMR should perform + * a reload vs. re-render. + * + * Note: this comparison assumes the prev/next script are already identical, + * and only checks the special case where <script setup lang="ts"> unused import + * pruning result changes due to template changes. + */ + shouldForceReload: (prevImports: Record<string, ImportBinding>) => boolean; +} +export interface SFCParseResult { + descriptor: SFCDescriptor; + errors: (CompilerError | SyntaxError)[]; +} +export declare function parse(source: string, options?: SFCParseOptions): SFCParseResult; + +type PreprocessLang = 'less' | 'sass' | 'scss' | 'styl' | 'stylus'; + +export interface SFCStyleCompileOptions { + source: string; + filename: string; + id: string; + scoped?: boolean; + trim?: boolean; + isProd?: boolean; + inMap?: RawSourceMap; + preprocessLang?: PreprocessLang; + preprocessOptions?: any; + preprocessCustomRequire?: (id: string) => any; + postcssOptions?: any; + postcssPlugins?: any[]; + /** + * @deprecated use `inMap` instead. + */ + map?: RawSourceMap; +} +/** + * Aligns with postcss-modules + * https://github.com/css-modules/postcss-modules + */ +interface CSSModulesOptions { + scopeBehaviour?: 'global' | 'local'; + generateScopedName?: string | ((name: string, filename: string, css: string) => string); + hashPrefix?: string; + localsConvention?: 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly'; + exportGlobals?: boolean; + globalModulePaths?: RegExp[]; +} +export interface SFCAsyncStyleCompileOptions extends SFCStyleCompileOptions { + isAsync?: boolean; + modules?: boolean; + modulesOptions?: CSSModulesOptions; +} +export interface SFCStyleCompileResults { + code: string; + map: RawSourceMap | undefined; + rawResult: Result | LazyResult | undefined; + errors: Error[]; + modules?: Record<string, string>; + dependencies: Set<string>; +} +export declare function compileStyle(options: SFCStyleCompileOptions): SFCStyleCompileResults; +export declare function compileStyleAsync(options: SFCAsyncStyleCompileOptions): Promise<SFCStyleCompileResults>; + +export declare function rewriteDefault(input: string, as: string, parserPlugins?: ParserPlugin[]): string; +/** + * Utility for rewriting `export default` in a script block into a variable + * declaration so that we can inject things into it + */ +export declare function rewriteDefaultAST(ast: Statement[], s: MagicString, as: string): void; + +type PropsDestructureBindings = Record<string, // public prop key +{ + local: string; + default?: Expression; +}>; +export declare function extractRuntimeProps(ctx: TypeResolveContext): string | undefined; + +interface ModelDecl { + type: TSType | undefined; + options: string | undefined; + identifier: string | undefined; + runtimeOptionNodes: Node[]; +} + +declare enum BindingTypes { + /** + * returned from data() + */ + DATA = "data", + /** + * declared as a prop + */ + PROPS = "props", + /** + * a local alias of a `<script setup>` destructured prop. + * the original is stored in __propsAliases of the bindingMetadata object. + */ + PROPS_ALIASED = "props-aliased", + /** + * a let binding (may or may not be a ref) + */ + SETUP_LET = "setup-let", + /** + * a const binding that can never be a ref. + * these bindings don't need `unref()` calls when processed in inlined + * template expressions. + */ + SETUP_CONST = "setup-const", + /** + * a const binding that does not need `unref()`, but may be mutated. + */ + SETUP_REACTIVE_CONST = "setup-reactive-const", + /** + * a const binding that may be a ref. + */ + SETUP_MAYBE_REF = "setup-maybe-ref", + /** + * bindings that are guaranteed to be refs + */ + SETUP_REF = "setup-ref", + /** + * declared by other options, e.g. computed, inject + */ + OPTIONS = "options", + /** + * a literal constant, e.g. 'foo', 1, true + */ + LITERAL_CONST = "literal-const" +} +type BindingMetadata = { + [key: string]: BindingTypes | undefined; +} & { + __isScriptSetup?: boolean; + __propsAliases?: Record<string, string>; +}; + +export declare class ScriptCompileContext { + descriptor: SFCDescriptor; + options: Partial<SFCScriptCompileOptions>; + isJS: boolean; + isTS: boolean; + isCE: boolean; + scriptAst: Program | null; + scriptSetupAst: Program | null; + source: string; + filename: string; + s: MagicString; + startOffset: number | undefined; + endOffset: number | undefined; + scope?: TypeScope; + globalScopes?: TypeScope[]; + userImports: Record<string, ImportBinding>; + hasDefinePropsCall: boolean; + hasDefineEmitCall: boolean; + hasDefineExposeCall: boolean; + hasDefaultExportName: boolean; + hasDefaultExportRender: boolean; + hasDefineOptionsCall: boolean; + hasDefineSlotsCall: boolean; + hasDefineModelCall: boolean; + propsCall: CallExpression | undefined; + propsDecl: Node | undefined; + propsRuntimeDecl: Node | undefined; + propsTypeDecl: Node | undefined; + propsDestructureDecl: ObjectPattern | undefined; + propsDestructuredBindings: PropsDestructureBindings; + propsDestructureRestId: string | undefined; + propsRuntimeDefaults: Node | undefined; + emitsRuntimeDecl: Node | undefined; + emitsTypeDecl: Node | undefined; + emitDecl: Node | undefined; + modelDecls: Record<string, ModelDecl>; + optionsRuntimeDecl: Node | undefined; + bindingMetadata: BindingMetadata; + helperImports: Set<string>; + helper(key: string): string; + /** + * to be exposed on compiled script block for HMR cache busting + */ + deps?: Set<string>; + /** + * cache for resolved fs + */ + fs?: NonNullable<SFCScriptCompileOptions['fs']>; + constructor(descriptor: SFCDescriptor, options: Partial<SFCScriptCompileOptions>); + getString(node: Node, scriptSetup?: boolean): string; + warn(msg: string, node: Node, scope?: TypeScope): void; + error(msg: string, node: Node, scope?: TypeScope): never; +} + +export type SimpleTypeResolveOptions = Partial<Pick<SFCScriptCompileOptions, 'globalTypeFiles' | 'fs' | 'babelParserPlugins' | 'isProd'>>; +/** + * TypeResolveContext is compatible with ScriptCompileContext + * but also allows a simpler version of it with minimal required properties + * when resolveType needs to be used in a non-SFC context, e.g. in a babel + * plugin. The simplest context can be just: + * ```ts + * const ctx: SimpleTypeResolveContext = { + * filename: '...', + * source: '...', + * options: {}, + * error() {}, + * ast: [] + * } + * ``` + */ +export type SimpleTypeResolveContext = Pick<ScriptCompileContext, 'source' | 'filename' | 'error' | 'helper' | 'getString' | 'propsTypeDecl' | 'propsRuntimeDefaults' | 'propsDestructuredBindings' | 'emitsTypeDecl' | 'isCE'> & Partial<Pick<ScriptCompileContext, 'scope' | 'globalScopes' | 'deps' | 'fs'>> & { + ast: Statement[]; + options: SimpleTypeResolveOptions; +}; +export type TypeResolveContext = ScriptCompileContext | SimpleTypeResolveContext; +type Import = Pick<ImportBinding, 'source' | 'imported'>; +interface WithScope { + _ownerScope: TypeScope; +} +type ScopeTypeNode = Node & WithScope & { + _ns?: TSModuleDeclaration & WithScope; +}; +declare class TypeScope { + filename: string; + source: string; + offset: number; + imports: Record<string, Import>; + types: Record<string, ScopeTypeNode>; + declares: Record<string, ScopeTypeNode>; + constructor(filename: string, source: string, offset?: number, imports?: Record<string, Import>, types?: Record<string, ScopeTypeNode>, declares?: Record<string, ScopeTypeNode>); + isGenericScope: boolean; + resolvedImportSources: Record<string, string>; + exportedTypes: Record<string, ScopeTypeNode>; + exportedDeclares: Record<string, ScopeTypeNode>; +} +interface MaybeWithScope { + _ownerScope?: TypeScope; +} +interface ResolvedElements { + props: Record<string, (TSPropertySignature | TSMethodSignature) & { + _ownerScope: TypeScope; + }>; + calls?: (TSCallSignatureDeclaration | TSFunctionType)[]; +} +/** + * Resolve arbitrary type node to a list of type elements that can be then + * mapped to runtime props or emits. + */ +export declare function resolveTypeElements(ctx: TypeResolveContext, node: Node & MaybeWithScope & { + _resolvedElements?: ResolvedElements; +}, scope?: TypeScope, typeParameters?: Record<string, Node>): ResolvedElements; +/** + * @private + */ +export declare function registerTS(_loadTS: () => typeof TS): void; +/** + * @private + */ +export declare function invalidateTypeCache(filename: string): void; +export declare function inferRuntimeType(ctx: TypeResolveContext, node: Node & MaybeWithScope, scope?: TypeScope, isKeyOf?: boolean): string[]; + +export declare function extractRuntimeEmits(ctx: TypeResolveContext): Set<string>; + +export declare const version: string; + +export declare const parseCache: Map<string, SFCParseResult>; +export declare const errorMessages: Record<number, string>; + +export declare const walk: any; + +/** + * @deprecated this is preserved to avoid breaking vite-plugin-vue < 5.0 + * with reactivityTransform: true. The desired behavior should be silently + * ignoring the option instead of breaking. + */ +export declare const shouldTransformRef: () => boolean; + diff --git a/vuetest/node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js b/vuetest/node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js new file mode 100644 index 0000000..a7cf8b0 --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js @@ -0,0 +1,53043 @@ +/** +* @vue/compiler-sfc v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function makeMap(str) { + const map = /* @__PURE__ */ Object.create(null); + for (const key of str.split(",")) map[key] = 1; + return (val) => val in map; +} + +const EMPTY_OBJ = Object.freeze({}) ; +const NOOP = () => { +}; +const NO = () => false; +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +const extend = Object.assign; +const hasOwnProperty$3 = Object.prototype.hasOwnProperty; +const hasOwn = (val, key) => hasOwnProperty$3.call(val, key); +const isArray$3 = Array.isArray; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isFunction$1 = (val) => typeof val === "function"; +const isString$1 = (val) => typeof val === "string"; +const isSymbol$1 = (val) => typeof val === "symbol"; +const isObject$2 = (val) => val !== null && typeof val === "object"; +const objectToString$1 = Object.prototype.toString; +const toTypeString = (value) => objectToString$1.call(value); +const isPlainObject = (val) => toTypeString(val) === "[object Object]"; +const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); +const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +}; +const camelizeRE = /-(\w)/g; +const camelize = cacheStringFunction( + (str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); + } +); +const hyphenateRE = /\B([A-Z])/g; +const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() +); +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const toHandlerKey = cacheStringFunction( + (str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + } +); +const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/; +function genPropsAccessExp(name) { + return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`; +} +function genCacheKey(source, options) { + return source + JSON.stringify( + options, + (_, val) => typeof val === "function" ? val.toString() : val + ); +} + +const PatchFlagNames = { + [1]: `TEXT`, + [2]: `CLASS`, + [4]: `STYLE`, + [8]: `PROPS`, + [16]: `FULL_PROPS`, + [32]: `NEED_HYDRATION`, + [64]: `STABLE_FRAGMENT`, + [128]: `KEYED_FRAGMENT`, + [256]: `UNKEYED_FRAGMENT`, + [512]: `NEED_PATCH`, + [1024]: `DYNAMIC_SLOTS`, + [2048]: `DEV_ROOT_FRAGMENT`, + [-1]: `HOISTED`, + [-2]: `BAIL` +}; + +const slotFlagsText = { + [1]: "STABLE", + [2]: "DYNAMIC", + [3]: "FORWARDED" +}; + +const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; +const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); + +const range = 2; +function generateCodeFrame(source, start = 0, end = source.length) { + start = Math.max(0, Math.min(start, source.length)); + end = Math.max(0, Math.min(end, source.length)); + if (start > end) return ""; + let lines = source.split(/(\r?\n)/); + const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); + lines = lines.filter((_, idx) => idx % 2 === 0); + let count = 0; + const res = []; + for (let i = 0; i < lines.length; i++) { + count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); + if (count >= start) { + for (let j = i - range; j <= i + range || end > count; j++) { + if (j < 0 || j >= lines.length) continue; + const line = j + 1; + res.push( + `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` + ); + const lineLength = lines[j].length; + const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; + if (j === i) { + const pad = start - (count - (lineLength + newLineSeqLength)); + const length = Math.max( + 1, + end > count ? lineLength - pad : end - start + ); + res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); + } else if (j > i) { + if (end > count) { + const length = Math.max(Math.min(end - count, lineLength), 1); + res.push(` | ` + "^".repeat(length)); + } + count += lineLength + newLineSeqLength; + } + } + break; + } + } + return res.join("\n"); +} + +function normalizeStyle(value) { + if (isArray$3(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString$1(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString$1(value) || isObject$2(value)) { + return value; + } +} +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:([^]+)/; +const styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function stringifyStyle(styles) { + if (!styles) return ""; + if (isString$1(styles)) return styles; + let ret = ""; + for (const key in styles) { + const value = styles[key]; + if (isString$1(value) || typeof value === "number") { + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + ret += `${normalizedKey}:${value};`; + } + } + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString$1(value)) { + res = value; + } else if (isArray$3(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject$2(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} + +const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; +const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); +const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); +const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); +const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); + +const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` +); +const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; +const attrValidationCache = {}; +function isSSRSafeAttrName(name) { + if (attrValidationCache.hasOwnProperty(name)) { + return attrValidationCache[name]; + } + const isUnsafe = unsafeAttrCharRE.test(name); + if (isUnsafe) { + console.error(`unsafe attribute name: ${name}`); + } + return attrValidationCache[name] = !isUnsafe; +} +const propsToAttrMap = { + acceptCharset: "accept-charset", + className: "class", + htmlFor: "for", + httpEquiv: "http-equiv" +}; +const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` +); +const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` +); +const isKnownMathMLAttr = /* @__PURE__ */ makeMap( + `accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns` +); + +const escapeRE = /["'&<>]/; +function escapeHtml(string) { + const str = "" + string; + const match = escapeRE.exec(str); + if (!match) { + return str; + } + let html = ""; + let escaped; + let index; + let lastIndex = 0; + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + escaped = """; + break; + case 38: + escaped = "&"; + break; + case 39: + escaped = "'"; + break; + case 60: + escaped = "<"; + break; + case 62: + escaped = ">"; + break; + default: + continue; + } + if (lastIndex !== index) { + html += str.slice(lastIndex, index); + } + lastIndex = index + 1; + html += escaped; + } + return lastIndex !== index ? html + str.slice(lastIndex, index) : html; +} +const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; +function getEscapedCssVarName(key, doubleEscape) { + return key.replace( + cssVarNameEscapeSymbolsRE, + (s) => doubleEscape ? s === '"' ? '\\\\\\"' : `\\\\${s}` : `\\${s}` + ); +} + +const isRef = (val) => { + return !!(val && val["__v_isRef"] === true); +}; +const toDisplayString = (val) => { + return isString$1(val) ? val : val == null ? "" : isArray$3(val) || isObject$2(val) && (val.toString === objectToString$1 || !isFunction$1(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); +}; +const replacer = (_key, val) => { + if (isRef(val)) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol$1(val)) { + return stringifySymbol(val); + } else if (isObject$2(val) && !isArray$3(val) && !isPlainObject(val)) { + return String(val); + } + return val; +}; +const stringifySymbol = (v, i = "") => { + var _a; + return ( + // Symbol.description in es2019+ so we need to cast here to pass + // the lib: es2016 check + isSymbol$1(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v + ); +}; + +const FRAGMENT = Symbol(`Fragment` ); +const TELEPORT = Symbol(`Teleport` ); +const SUSPENSE = Symbol(`Suspense` ); +const KEEP_ALIVE = Symbol(`KeepAlive` ); +const BASE_TRANSITION = Symbol( + `BaseTransition` +); +const OPEN_BLOCK = Symbol(`openBlock` ); +const CREATE_BLOCK = Symbol(`createBlock` ); +const CREATE_ELEMENT_BLOCK = Symbol( + `createElementBlock` +); +const CREATE_VNODE = Symbol(`createVNode` ); +const CREATE_ELEMENT_VNODE = Symbol( + `createElementVNode` +); +const CREATE_COMMENT = Symbol( + `createCommentVNode` +); +const CREATE_TEXT = Symbol( + `createTextVNode` +); +const CREATE_STATIC = Symbol( + `createStaticVNode` +); +const RESOLVE_COMPONENT = Symbol( + `resolveComponent` +); +const RESOLVE_DYNAMIC_COMPONENT = Symbol( + `resolveDynamicComponent` +); +const RESOLVE_DIRECTIVE = Symbol( + `resolveDirective` +); +const RESOLVE_FILTER = Symbol( + `resolveFilter` +); +const WITH_DIRECTIVES = Symbol( + `withDirectives` +); +const RENDER_LIST = Symbol(`renderList` ); +const RENDER_SLOT = Symbol(`renderSlot` ); +const CREATE_SLOTS = Symbol(`createSlots` ); +const TO_DISPLAY_STRING = Symbol( + `toDisplayString` +); +const MERGE_PROPS = Symbol(`mergeProps` ); +const NORMALIZE_CLASS = Symbol( + `normalizeClass` +); +const NORMALIZE_STYLE = Symbol( + `normalizeStyle` +); +const NORMALIZE_PROPS = Symbol( + `normalizeProps` +); +const GUARD_REACTIVE_PROPS = Symbol( + `guardReactiveProps` +); +const TO_HANDLERS = Symbol(`toHandlers` ); +const CAMELIZE = Symbol(`camelize` ); +const CAPITALIZE = Symbol(`capitalize` ); +const TO_HANDLER_KEY = Symbol( + `toHandlerKey` +); +const SET_BLOCK_TRACKING = Symbol( + `setBlockTracking` +); +const PUSH_SCOPE_ID = Symbol(`pushScopeId` ); +const POP_SCOPE_ID = Symbol(`popScopeId` ); +const WITH_CTX = Symbol(`withCtx` ); +const UNREF = Symbol(`unref` ); +const IS_REF = Symbol(`isRef` ); +const WITH_MEMO = Symbol(`withMemo` ); +const IS_MEMO_SAME = Symbol(`isMemoSame` ); +const helperNameMap = { + [FRAGMENT]: `Fragment`, + [TELEPORT]: `Teleport`, + [SUSPENSE]: `Suspense`, + [KEEP_ALIVE]: `KeepAlive`, + [BASE_TRANSITION]: `BaseTransition`, + [OPEN_BLOCK]: `openBlock`, + [CREATE_BLOCK]: `createBlock`, + [CREATE_ELEMENT_BLOCK]: `createElementBlock`, + [CREATE_VNODE]: `createVNode`, + [CREATE_ELEMENT_VNODE]: `createElementVNode`, + [CREATE_COMMENT]: `createCommentVNode`, + [CREATE_TEXT]: `createTextVNode`, + [CREATE_STATIC]: `createStaticVNode`, + [RESOLVE_COMPONENT]: `resolveComponent`, + [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, + [RESOLVE_DIRECTIVE]: `resolveDirective`, + [RESOLVE_FILTER]: `resolveFilter`, + [WITH_DIRECTIVES]: `withDirectives`, + [RENDER_LIST]: `renderList`, + [RENDER_SLOT]: `renderSlot`, + [CREATE_SLOTS]: `createSlots`, + [TO_DISPLAY_STRING]: `toDisplayString`, + [MERGE_PROPS]: `mergeProps`, + [NORMALIZE_CLASS]: `normalizeClass`, + [NORMALIZE_STYLE]: `normalizeStyle`, + [NORMALIZE_PROPS]: `normalizeProps`, + [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, + [TO_HANDLERS]: `toHandlers`, + [CAMELIZE]: `camelize`, + [CAPITALIZE]: `capitalize`, + [TO_HANDLER_KEY]: `toHandlerKey`, + [SET_BLOCK_TRACKING]: `setBlockTracking`, + [PUSH_SCOPE_ID]: `pushScopeId`, + [POP_SCOPE_ID]: `popScopeId`, + [WITH_CTX]: `withCtx`, + [UNREF]: `unref`, + [IS_REF]: `isRef`, + [WITH_MEMO]: `withMemo`, + [IS_MEMO_SAME]: `isMemoSame` +}; +function registerRuntimeHelpers(helpers) { + Object.getOwnPropertySymbols(helpers).forEach((s) => { + helperNameMap[s] = helpers[s]; + }); +} + +const Namespaces = { + "HTML": 0, + "0": "HTML", + "SVG": 1, + "1": "SVG", + "MATH_ML": 2, + "2": "MATH_ML" +}; +const NodeTypes = { + "ROOT": 0, + "0": "ROOT", + "ELEMENT": 1, + "1": "ELEMENT", + "TEXT": 2, + "2": "TEXT", + "COMMENT": 3, + "3": "COMMENT", + "SIMPLE_EXPRESSION": 4, + "4": "SIMPLE_EXPRESSION", + "INTERPOLATION": 5, + "5": "INTERPOLATION", + "ATTRIBUTE": 6, + "6": "ATTRIBUTE", + "DIRECTIVE": 7, + "7": "DIRECTIVE", + "COMPOUND_EXPRESSION": 8, + "8": "COMPOUND_EXPRESSION", + "IF": 9, + "9": "IF", + "IF_BRANCH": 10, + "10": "IF_BRANCH", + "FOR": 11, + "11": "FOR", + "TEXT_CALL": 12, + "12": "TEXT_CALL", + "VNODE_CALL": 13, + "13": "VNODE_CALL", + "JS_CALL_EXPRESSION": 14, + "14": "JS_CALL_EXPRESSION", + "JS_OBJECT_EXPRESSION": 15, + "15": "JS_OBJECT_EXPRESSION", + "JS_PROPERTY": 16, + "16": "JS_PROPERTY", + "JS_ARRAY_EXPRESSION": 17, + "17": "JS_ARRAY_EXPRESSION", + "JS_FUNCTION_EXPRESSION": 18, + "18": "JS_FUNCTION_EXPRESSION", + "JS_CONDITIONAL_EXPRESSION": 19, + "19": "JS_CONDITIONAL_EXPRESSION", + "JS_CACHE_EXPRESSION": 20, + "20": "JS_CACHE_EXPRESSION", + "JS_BLOCK_STATEMENT": 21, + "21": "JS_BLOCK_STATEMENT", + "JS_TEMPLATE_LITERAL": 22, + "22": "JS_TEMPLATE_LITERAL", + "JS_IF_STATEMENT": 23, + "23": "JS_IF_STATEMENT", + "JS_ASSIGNMENT_EXPRESSION": 24, + "24": "JS_ASSIGNMENT_EXPRESSION", + "JS_SEQUENCE_EXPRESSION": 25, + "25": "JS_SEQUENCE_EXPRESSION", + "JS_RETURN_STATEMENT": 26, + "26": "JS_RETURN_STATEMENT" +}; +const ElementTypes = { + "ELEMENT": 0, + "0": "ELEMENT", + "COMPONENT": 1, + "1": "COMPONENT", + "SLOT": 2, + "2": "SLOT", + "TEMPLATE": 3, + "3": "TEMPLATE" +}; +const ConstantTypes = { + "NOT_CONSTANT": 0, + "0": "NOT_CONSTANT", + "CAN_SKIP_PATCH": 1, + "1": "CAN_SKIP_PATCH", + "CAN_CACHE": 2, + "2": "CAN_CACHE", + "CAN_STRINGIFY": 3, + "3": "CAN_STRINGIFY" +}; +const locStub = { + start: { line: 1, column: 1, offset: 0 }, + end: { line: 1, column: 1, offset: 0 }, + source: "" +}; +function createRoot(children, source = "") { + return { + type: 0, + source, + children, + helpers: /* @__PURE__ */ new Set(), + components: [], + directives: [], + hoists: [], + imports: [], + cached: [], + temps: 0, + codegenNode: void 0, + loc: locStub + }; +} +function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) { + if (context) { + if (isBlock) { + context.helper(OPEN_BLOCK); + context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); + } else { + context.helper(getVNodeHelper(context.inSSR, isComponent)); + } + if (directives) { + context.helper(WITH_DIRECTIVES); + } + } + return { + type: 13, + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent, + loc + }; +} +function createArrayExpression(elements, loc = locStub) { + return { + type: 17, + loc, + elements + }; +} +function createObjectExpression(properties, loc = locStub) { + return { + type: 15, + loc, + properties + }; +} +function createObjectProperty(key, value) { + return { + type: 16, + loc: locStub, + key: isString$1(key) ? createSimpleExpression(key, true) : key, + value + }; +} +function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { + return { + type: 4, + loc, + content, + isStatic, + constType: isStatic ? 3 : constType + }; +} +function createInterpolation(content, loc) { + return { + type: 5, + loc, + content: isString$1(content) ? createSimpleExpression(content, false, loc) : content + }; +} +function createCompoundExpression(children, loc = locStub) { + return { + type: 8, + loc, + children + }; +} +function createCallExpression(callee, args = [], loc = locStub) { + return { + type: 14, + loc, + callee, + arguments: args + }; +} +function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { + return { + type: 18, + params, + returns, + newline, + isSlot, + loc + }; +} +function createConditionalExpression(test, consequent, alternate, newline = true) { + return { + type: 19, + test, + consequent, + alternate, + newline, + loc: locStub + }; +} +function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) { + return { + type: 20, + index, + value, + needPauseTracking, + inVOnce, + needArraySpread: false, + loc: locStub + }; +} +function createBlockStatement(body) { + return { + type: 21, + body, + loc: locStub + }; +} +function createTemplateLiteral(elements) { + return { + type: 22, + elements, + loc: locStub + }; +} +function createIfStatement(test, consequent, alternate) { + return { + type: 23, + test, + consequent, + alternate, + loc: locStub + }; +} +function createAssignmentExpression(left, right) { + return { + type: 24, + left, + right, + loc: locStub + }; +} +function createSequenceExpression(expressions) { + return { + type: 25, + expressions, + loc: locStub + }; +} +function createReturnStatement(returns) { + return { + type: 26, + returns, + loc: locStub + }; +} +function getVNodeHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; +} +function getVNodeBlockHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; +} +function convertToBlock(node, { helper, removeHelper, inSSR }) { + if (!node.isBlock) { + node.isBlock = true; + removeHelper(getVNodeHelper(inSSR, node.isComponent)); + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(inSSR, node.isComponent)); + } +} + +// Generated using scripts/write-decode-map.ts +var htmlDecodeTree = new Uint16Array( +// prettier-ignore +"\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\u40cc\u0180;ap\u0720\u072f\u073f\u0100cg\u0734\u0737r;\u412ainaryI;\u6148lie\xf3\u03dd\u01f4\u0749\0\u0762\u0100;e\u074d\u074e\u622c\u0100gr\u0753\u0758ral;\u622bsection;\u62c2isible\u0100CT\u076c\u0772omma;\u6063imes;\u6062\u0180gpt\u077f\u0783\u0788on;\u412ef;\uc000\ud835\udd40a;\u4399cr;\u6110ilde;\u4128\u01eb\u079a\0\u079ecy;\u4406l\u803b\xcf\u40cf\u0280cfosu\u07ac\u07b7\u07bc\u07c2\u07d0\u0100iy\u07b1\u07b5rc;\u4134;\u4419r;\uc000\ud835\udd0dpf;\uc000\ud835\udd41\u01e3\u07c7\0\u07ccr;\uc000\ud835\udca5rcy;\u4408kcy;\u4404\u0380HJacfos\u07e4\u07e8\u07ec\u07f1\u07fd\u0802\u0808cy;\u4425cy;\u440cppa;\u439a\u0100ey\u07f6\u07fbdil;\u4136;\u441ar;\uc000\ud835\udd0epf;\uc000\ud835\udd42cr;\uc000\ud835\udca6\u0580JTaceflmost\u0825\u0829\u082c\u0850\u0863\u09b3\u09b8\u09c7\u09cd\u0a37\u0a47cy;\u4409\u803b<\u403c\u0280cmnpr\u0837\u083c\u0841\u0844\u084dute;\u4139bda;\u439bg;\u67ealacetrf;\u6112r;\u619e\u0180aey\u0857\u085c\u0861ron;\u413ddil;\u413b;\u441b\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087e\u08a9\u08b1\u08e0\u08e6\u08fc\u092f\u095b\u0390\u096a\u0100nr\u0883\u088fgleBracket;\u67e8row\u0180;BR\u0899\u089a\u089e\u6190ar;\u61e4ightArrow;\u61c6eiling;\u6308o\u01f5\u08b7\0\u08c3bleBracket;\u67e6n\u01d4\u08c8\0\u08d2eeVector;\u6961ector\u0100;B\u08db\u08dc\u61c3ar;\u6959loor;\u630aight\u0100AV\u08ef\u08f5rrow;\u6194ector;\u694e\u0100er\u0901\u0917e\u0180;AV\u0909\u090a\u0910\u62a3rrow;\u61a4ector;\u695aiangle\u0180;BE\u0924\u0925\u0929\u62b2ar;\u69cfqual;\u62b4p\u0180DTV\u0937\u0942\u094cownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61bfar;\u6958ector\u0100;B\u0965\u0966\u61bcar;\u6952ight\xe1\u039cs\u0300EFGLST\u097e\u098b\u0995\u099d\u09a2\u09adqualGreater;\u62daullEqual;\u6266reater;\u6276ess;\u6aa1lantEqual;\u6a7dilde;\u6272r;\uc000\ud835\udd0f\u0100;e\u09bd\u09be\u62d8ftarrow;\u61daidot;\u413f\u0180npw\u09d4\u0a16\u0a1bg\u0200LRlr\u09de\u09f7\u0a02\u0a10eft\u0100AR\u09e6\u09ecrrow;\u67f5ightArrow;\u67f7ightArrow;\u67f6eft\u0100ar\u03b3\u0a0aight\xe1\u03bfight\xe1\u03caf;\uc000\ud835\udd43er\u0100LR\u0a22\u0a2ceftArrow;\u6199ightArrow;\u6198\u0180cht\u0a3e\u0a40\u0a42\xf2\u084c;\u61b0rok;\u4141;\u626a\u0400acefiosu\u0a5a\u0a5d\u0a60\u0a77\u0a7c\u0a85\u0a8b\u0a8ep;\u6905y;\u441c\u0100dl\u0a65\u0a6fiumSpace;\u605flintrf;\u6133r;\uc000\ud835\udd10nusPlus;\u6213pf;\uc000\ud835\udd44c\xf2\u0a76;\u439c\u0480Jacefostu\u0aa3\u0aa7\u0aad\u0ac0\u0b14\u0b19\u0d91\u0d97\u0d9ecy;\u440acute;\u4143\u0180aey\u0ab4\u0ab9\u0aberon;\u4147dil;\u4145;\u441d\u0180gsw\u0ac7\u0af0\u0b0eative\u0180MTV\u0ad3\u0adf\u0ae8ediumSpace;\u600bhi\u0100cn\u0ae6\u0ad8\xeb\u0ad9eryThi\xee\u0ad9ted\u0100GL\u0af8\u0b06reaterGreate\xf2\u0673essLes\xf3\u0a48Line;\u400ar;\uc000\ud835\udd11\u0200Bnpt\u0b22\u0b28\u0b37\u0b3areak;\u6060BreakingSpace;\u40a0f;\u6115\u0680;CDEGHLNPRSTV\u0b55\u0b56\u0b6a\u0b7c\u0ba1\u0beb\u0c04\u0c5e\u0c84\u0ca6\u0cd8\u0d61\u0d85\u6aec\u0100ou\u0b5b\u0b64ngruent;\u6262pCap;\u626doubleVerticalBar;\u6226\u0180lqx\u0b83\u0b8a\u0b9bement;\u6209ual\u0100;T\u0b92\u0b93\u6260ilde;\uc000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0bb6\u0bb7\u0bbd\u0bc9\u0bd3\u0bd8\u0be5\u626fqual;\u6271ullEqual;\uc000\u2267\u0338reater;\uc000\u226b\u0338ess;\u6279lantEqual;\uc000\u2a7e\u0338ilde;\u6275ump\u0144\u0bf2\u0bfdownHump;\uc000\u224e\u0338qual;\uc000\u224f\u0338e\u0100fs\u0c0a\u0c27tTriangle\u0180;BE\u0c1a\u0c1b\u0c21\u62eaar;\uc000\u29cf\u0338qual;\u62ecs\u0300;EGLST\u0c35\u0c36\u0c3c\u0c44\u0c4b\u0c58\u626equal;\u6270reater;\u6278ess;\uc000\u226a\u0338lantEqual;\uc000\u2a7d\u0338ilde;\u6274ested\u0100GL\u0c68\u0c79reaterGreater;\uc000\u2aa2\u0338essLess;\uc000\u2aa1\u0338recedes\u0180;ES\u0c92\u0c93\u0c9b\u6280qual;\uc000\u2aaf\u0338lantEqual;\u62e0\u0100ei\u0cab\u0cb9verseElement;\u620cghtTriangle\u0180;BE\u0ccb\u0ccc\u0cd2\u62ebar;\uc000\u29d0\u0338qual;\u62ed\u0100qu\u0cdd\u0d0cuareSu\u0100bp\u0ce8\u0cf9set\u0100;E\u0cf0\u0cf3\uc000\u228f\u0338qual;\u62e2erset\u0100;E\u0d03\u0d06\uc000\u2290\u0338qual;\u62e3\u0180bcp\u0d13\u0d24\u0d4eset\u0100;E\u0d1b\u0d1e\uc000\u2282\u20d2qual;\u6288ceeds\u0200;EST\u0d32\u0d33\u0d3b\u0d46\u6281qual;\uc000\u2ab0\u0338lantEqual;\u62e1ilde;\uc000\u227f\u0338erset\u0100;E\u0d58\u0d5b\uc000\u2283\u20d2qual;\u6289ilde\u0200;EFT\u0d6e\u0d6f\u0d75\u0d7f\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uc000\ud835\udca9ilde\u803b\xd1\u40d1;\u439d\u0700Eacdfgmoprstuv\u0dbd\u0dc2\u0dc9\u0dd5\u0ddb\u0de0\u0de7\u0dfc\u0e02\u0e20\u0e22\u0e32\u0e3f\u0e44lig;\u4152cute\u803b\xd3\u40d3\u0100iy\u0dce\u0dd3rc\u803b\xd4\u40d4;\u441eblac;\u4150r;\uc000\ud835\udd12rave\u803b\xd2\u40d2\u0180aei\u0dee\u0df2\u0df6cr;\u414cga;\u43a9cron;\u439fpf;\uc000\ud835\udd46enCurly\u0100DQ\u0e0e\u0e1aoubleQuote;\u601cuote;\u6018;\u6a54\u0100cl\u0e27\u0e2cr;\uc000\ud835\udcaaash\u803b\xd8\u40d8i\u016c\u0e37\u0e3cde\u803b\xd5\u40d5es;\u6a37ml\u803b\xd6\u40d6er\u0100BP\u0e4b\u0e60\u0100ar\u0e50\u0e53r;\u603eac\u0100ek\u0e5a\u0e5c;\u63deet;\u63b4arenthesis;\u63dc\u0480acfhilors\u0e7f\u0e87\u0e8a\u0e8f\u0e92\u0e94\u0e9d\u0eb0\u0efcrtialD;\u6202y;\u441fr;\uc000\ud835\udd13i;\u43a6;\u43a0usMinus;\u40b1\u0100ip\u0ea2\u0eadncareplan\xe5\u069df;\u6119\u0200;eio\u0eb9\u0eba\u0ee0\u0ee4\u6abbcedes\u0200;EST\u0ec8\u0ec9\u0ecf\u0eda\u627aqual;\u6aaflantEqual;\u627cilde;\u627eme;\u6033\u0100dp\u0ee9\u0eeeuct;\u620fortion\u0100;a\u0225\u0ef9l;\u621d\u0100ci\u0f01\u0f06r;\uc000\ud835\udcab;\u43a8\u0200Ufos\u0f11\u0f16\u0f1b\u0f1fOT\u803b\"\u4022r;\uc000\ud835\udd14pf;\u611acr;\uc000\ud835\udcac\u0600BEacefhiorsu\u0f3e\u0f43\u0f47\u0f60\u0f73\u0fa7\u0faa\u0fad\u1096\u10a9\u10b4\u10bearr;\u6910G\u803b\xae\u40ae\u0180cnr\u0f4e\u0f53\u0f56ute;\u4154g;\u67ebr\u0100;t\u0f5c\u0f5d\u61a0l;\u6916\u0180aey\u0f67\u0f6c\u0f71ron;\u4158dil;\u4156;\u4420\u0100;v\u0f78\u0f79\u611cerse\u0100EU\u0f82\u0f99\u0100lq\u0f87\u0f8eement;\u620builibrium;\u61cbpEquilibrium;\u696fr\xbb\u0f79o;\u43a1ght\u0400ACDFTUVa\u0fc1\u0feb\u0ff3\u1022\u1028\u105b\u1087\u03d8\u0100nr\u0fc6\u0fd2gleBracket;\u67e9row\u0180;BL\u0fdc\u0fdd\u0fe1\u6192ar;\u61e5eftArrow;\u61c4eiling;\u6309o\u01f5\u0ff9\0\u1005bleBracket;\u67e7n\u01d4\u100a\0\u1014eeVector;\u695dector\u0100;B\u101d\u101e\u61c2ar;\u6955loor;\u630b\u0100er\u102d\u1043e\u0180;AV\u1035\u1036\u103c\u62a2rrow;\u61a6ector;\u695biangle\u0180;BE\u1050\u1051\u1055\u62b3ar;\u69d0qual;\u62b5p\u0180DTV\u1063\u106e\u1078ownVector;\u694feeVector;\u695cector\u0100;B\u1082\u1083\u61bear;\u6954ector\u0100;B\u1091\u1092\u61c0ar;\u6953\u0100pu\u109b\u109ef;\u611dndImplies;\u6970ightarrow;\u61db\u0100ch\u10b9\u10bcr;\u611b;\u61b1leDelayed;\u69f4\u0680HOacfhimoqstu\u10e4\u10f1\u10f7\u10fd\u1119\u111e\u1151\u1156\u1161\u1167\u11b5\u11bb\u11bf\u0100Cc\u10e9\u10eeHcy;\u4429y;\u4428FTcy;\u442ccute;\u415a\u0280;aeiy\u1108\u1109\u110e\u1113\u1117\u6abcron;\u4160dil;\u415erc;\u415c;\u4421r;\uc000\ud835\udd16ort\u0200DLRU\u112a\u1134\u113e\u1149ownArrow\xbb\u041eeftArrow\xbb\u089aightArrow\xbb\u0fddpArrow;\u6191gma;\u43a3allCircle;\u6218pf;\uc000\ud835\udd4a\u0272\u116d\0\0\u1170t;\u621aare\u0200;ISU\u117b\u117c\u1189\u11af\u65a1ntersection;\u6293u\u0100bp\u118f\u119eset\u0100;E\u1197\u1198\u628fqual;\u6291erset\u0100;E\u11a8\u11a9\u6290qual;\u6292nion;\u6294cr;\uc000\ud835\udcaear;\u62c6\u0200bcmp\u11c8\u11db\u1209\u120b\u0100;s\u11cd\u11ce\u62d0et\u0100;E\u11cd\u11d5qual;\u6286\u0100ch\u11e0\u1205eeds\u0200;EST\u11ed\u11ee\u11f4\u11ff\u627bqual;\u6ab0lantEqual;\u627dilde;\u627fTh\xe1\u0f8c;\u6211\u0180;es\u1212\u1213\u1223\u62d1rset\u0100;E\u121c\u121d\u6283qual;\u6287et\xbb\u1213\u0580HRSacfhiors\u123e\u1244\u1249\u1255\u125e\u1271\u1276\u129f\u12c2\u12c8\u12d1ORN\u803b\xde\u40deADE;\u6122\u0100Hc\u124e\u1252cy;\u440by;\u4426\u0100bu\u125a\u125c;\u4009;\u43a4\u0180aey\u1265\u126a\u126fron;\u4164dil;\u4162;\u4422r;\uc000\ud835\udd17\u0100ei\u127b\u1289\u01f2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128e\u1298kSpace;\uc000\u205f\u200aSpace;\u6009lde\u0200;EFT\u12ab\u12ac\u12b2\u12bc\u623cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uc000\ud835\udd4bipleDot;\u60db\u0100ct\u12d6\u12dbr;\uc000\ud835\udcafrok;\u4166\u0ae1\u12f7\u130e\u131a\u1326\0\u132c\u1331\0\0\0\0\0\u1338\u133d\u1377\u1385\0\u13ff\u1404\u140a\u1410\u0100cr\u12fb\u1301ute\u803b\xda\u40dar\u0100;o\u1307\u1308\u619fcir;\u6949r\u01e3\u1313\0\u1316y;\u440eve;\u416c\u0100iy\u131e\u1323rc\u803b\xdb\u40db;\u4423blac;\u4170r;\uc000\ud835\udd18rave\u803b\xd9\u40d9acr;\u416a\u0100di\u1341\u1369er\u0100BP\u1348\u135d\u0100ar\u134d\u1350r;\u405fac\u0100ek\u1357\u1359;\u63dfet;\u63b5arenthesis;\u63ddon\u0100;P\u1370\u1371\u62c3lus;\u628e\u0100gp\u137b\u137fon;\u4172f;\uc000\ud835\udd4c\u0400ADETadps\u1395\u13ae\u13b8\u13c4\u03e8\u13d2\u13d7\u13f3rrow\u0180;BD\u1150\u13a0\u13a4ar;\u6912ownArrow;\u61c5ownArrow;\u6195quilibrium;\u696eee\u0100;A\u13cb\u13cc\u62a5rrow;\u61a5own\xe1\u03f3er\u0100LR\u13de\u13e8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13f9\u13fa\u43d2on;\u43a5ing;\u416ecr;\uc000\ud835\udcb0ilde;\u4168ml\u803b\xdc\u40dc\u0480Dbcdefosv\u1427\u142c\u1430\u1433\u143e\u1485\u148a\u1490\u1496ash;\u62abar;\u6aeby;\u4412ash\u0100;l\u143b\u143c\u62a9;\u6ae6\u0100er\u1443\u1445;\u62c1\u0180bty\u144c\u1450\u147aar;\u6016\u0100;i\u144f\u1455cal\u0200BLST\u1461\u1465\u146a\u1474ar;\u6223ine;\u407ceparator;\u6758ilde;\u6240ThinSpace;\u600ar;\uc000\ud835\udd19pf;\uc000\ud835\udd4dcr;\uc000\ud835\udcb1dash;\u62aa\u0280cefos\u14a7\u14ac\u14b1\u14b6\u14bcirc;\u4174dge;\u62c0r;\uc000\ud835\udd1apf;\uc000\ud835\udd4ecr;\uc000\ud835\udcb2\u0200fios\u14cb\u14d0\u14d2\u14d8r;\uc000\ud835\udd1b;\u439epf;\uc000\ud835\udd4fcr;\uc000\ud835\udcb3\u0480AIUacfosu\u14f1\u14f5\u14f9\u14fd\u1504\u150f\u1514\u151a\u1520cy;\u442fcy;\u4407cy;\u442ecute\u803b\xdd\u40dd\u0100iy\u1509\u150drc;\u4176;\u442br;\uc000\ud835\udd1cpf;\uc000\ud835\udd50cr;\uc000\ud835\udcb4ml;\u4178\u0400Hacdefos\u1535\u1539\u153f\u154b\u154f\u155d\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417d;\u4417ot;\u417b\u01f2\u1554\0\u155boWidt\xe8\u0ad9a;\u4396r;\u6128pf;\u6124cr;\uc000\ud835\udcb5\u0be1\u1583\u158a\u1590\0\u15b0\u15b6\u15bf\0\0\0\0\u15c6\u15db\u15eb\u165f\u166d\0\u1695\u169b\u16b2\u16b9\0\u16becute\u803b\xe1\u40e1reve;\u4103\u0300;Ediuy\u159c\u159d\u15a1\u15a3\u15a8\u15ad\u623e;\uc000\u223e\u0333;\u623frc\u803b\xe2\u40e2te\u80bb\xb4\u0306;\u4430lig\u803b\xe6\u40e6\u0100;r\xb2\u15ba;\uc000\ud835\udd1erave\u803b\xe0\u40e0\u0100ep\u15ca\u15d6\u0100fp\u15cf\u15d4sym;\u6135\xe8\u15d3ha;\u43b1\u0100ap\u15dfc\u0100cl\u15e4\u15e7r;\u4101g;\u6a3f\u0264\u15f0\0\0\u160a\u0280;adsv\u15fa\u15fb\u15ff\u1601\u1607\u6227nd;\u6a55;\u6a5clope;\u6a58;\u6a5a\u0380;elmrsz\u1618\u1619\u161b\u161e\u163f\u164f\u1659\u6220;\u69a4e\xbb\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163a\u163c\u163e;\u69a8;\u69a9;\u69aa;\u69ab;\u69ac;\u69ad;\u69ae;\u69aft\u0100;v\u1645\u1646\u621fb\u0100;d\u164c\u164d\u62be;\u699d\u0100pt\u1654\u1657h;\u6222\xbb\xb9arr;\u637c\u0100gp\u1663\u1667on;\u4105f;\uc000\ud835\udd52\u0380;Eaeiop\u12c1\u167b\u167d\u1682\u1684\u1687\u168a;\u6a70cir;\u6a6f;\u624ad;\u624bs;\u4027rox\u0100;e\u12c1\u1692\xf1\u1683ing\u803b\xe5\u40e5\u0180cty\u16a1\u16a6\u16a8r;\uc000\ud835\udcb6;\u402amp\u0100;e\u12c1\u16af\xf1\u0288ilde\u803b\xe3\u40e3ml\u803b\xe4\u40e4\u0100ci\u16c2\u16c8onin\xf4\u0272nt;\u6a11\u0800Nabcdefiklnoprsu\u16ed\u16f1\u1730\u173c\u1743\u1748\u1778\u177d\u17e0\u17e6\u1839\u1850\u170d\u193d\u1948\u1970ot;\u6aed\u0100cr\u16f6\u171ek\u0200ceps\u1700\u1705\u170d\u1713ong;\u624cpsilon;\u43f6rime;\u6035im\u0100;e\u171a\u171b\u623dq;\u62cd\u0176\u1722\u1726ee;\u62bded\u0100;g\u172c\u172d\u6305e\xbb\u172drk\u0100;t\u135c\u1737brk;\u63b6\u0100oy\u1701\u1741;\u4431quo;\u601e\u0280cmprt\u1753\u175b\u1761\u1764\u1768aus\u0100;e\u010a\u0109ptyv;\u69b0s\xe9\u170cno\xf5\u0113\u0180ahw\u176f\u1771\u1773;\u43b2;\u6136een;\u626cr;\uc000\ud835\udd1fg\u0380costuvw\u178d\u179d\u17b3\u17c1\u17d5\u17db\u17de\u0180aiu\u1794\u1796\u179a\xf0\u0760rc;\u65efp\xbb\u1371\u0180dpt\u17a4\u17a8\u17adot;\u6a00lus;\u6a01imes;\u6a02\u0271\u17b9\0\0\u17becup;\u6a06ar;\u6605riangle\u0100du\u17cd\u17d2own;\u65bdp;\u65b3plus;\u6a04e\xe5\u1444\xe5\u14adarow;\u690d\u0180ako\u17ed\u1826\u1835\u0100cn\u17f2\u1823k\u0180lst\u17fa\u05ab\u1802ozenge;\u69ebriangle\u0200;dlr\u1812\u1813\u1818\u181d\u65b4own;\u65beeft;\u65c2ight;\u65b8k;\u6423\u01b1\u182b\0\u1833\u01b2\u182f\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183e\u184d\u0100;q\u1843\u1846\uc000=\u20e5uiv;\uc000\u2261\u20e5t;\u6310\u0200ptwx\u1859\u185e\u1867\u186cf;\uc000\ud835\udd53\u0100;t\u13cb\u1863om\xbb\u13cctie;\u62c8\u0600DHUVbdhmptuv\u1885\u1896\u18aa\u18bb\u18d7\u18db\u18ec\u18ff\u1905\u190a\u1910\u1921\u0200LRlr\u188e\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18a1\u18a2\u18a4\u18a6\u18a8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18b3\u18b5\u18b7\u18b9;\u655d;\u655a;\u655c;\u6559\u0380;HLRhlr\u18ca\u18cb\u18cd\u18cf\u18d1\u18d3\u18d5\u6551;\u656c;\u6563;\u6560;\u656b;\u6562;\u655fox;\u69c9\u0200LRlr\u18e4\u18e6\u18e8\u18ea;\u6555;\u6552;\u6510;\u650c\u0280;DUdu\u06bd\u18f7\u18f9\u18fb\u18fd;\u6565;\u6568;\u652c;\u6534inus;\u629flus;\u629eimes;\u62a0\u0200LRlr\u1919\u191b\u191d\u191f;\u655b;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193b\u6502;\u656a;\u6561;\u655e;\u653c;\u6524;\u651c\u0100ev\u0123\u1942bar\u803b\xa6\u40a6\u0200ceio\u1951\u1956\u195a\u1960r;\uc000\ud835\udcb7mi;\u604fm\u0100;e\u171a\u171cl\u0180;bh\u1968\u1969\u196b\u405c;\u69c5sub;\u67c8\u016c\u1974\u197el\u0100;e\u1979\u197a\u6022t\xbb\u197ap\u0180;Ee\u012f\u1985\u1987;\u6aae\u0100;q\u06dc\u06db\u0ce1\u19a7\0\u19e8\u1a11\u1a15\u1a32\0\u1a37\u1a50\0\0\u1ab4\0\0\u1ac1\0\0\u1b21\u1b2e\u1b4d\u1b52\0\u1bfd\0\u1c0c\u0180cpr\u19ad\u19b2\u19ddute;\u4107\u0300;abcds\u19bf\u19c0\u19c4\u19ca\u19d5\u19d9\u6229nd;\u6a44rcup;\u6a49\u0100au\u19cf\u19d2p;\u6a4bp;\u6a47ot;\u6a40;\uc000\u2229\ufe00\u0100eo\u19e2\u19e5t;\u6041\xee\u0693\u0200aeiu\u19f0\u19fb\u1a01\u1a05\u01f0\u19f5\0\u19f8s;\u6a4don;\u410ddil\u803b\xe7\u40e7rc;\u4109ps\u0100;s\u1a0c\u1a0d\u6a4cm;\u6a50ot;\u410b\u0180dmn\u1a1b\u1a20\u1a26il\u80bb\xb8\u01adptyv;\u69b2t\u8100\xa2;e\u1a2d\u1a2e\u40a2r\xe4\u01b2r;\uc000\ud835\udd20\u0180cei\u1a3d\u1a40\u1a4dy;\u4447ck\u0100;m\u1a47\u1a48\u6713ark\xbb\u1a48;\u43c7r\u0380;Ecefms\u1a5f\u1a60\u1a62\u1a6b\u1aa4\u1aaa\u1aae\u65cb;\u69c3\u0180;el\u1a69\u1a6a\u1a6d\u42c6q;\u6257e\u0261\u1a74\0\0\u1a88rrow\u0100lr\u1a7c\u1a81eft;\u61baight;\u61bb\u0280RSacd\u1a92\u1a94\u1a96\u1a9a\u1a9f\xbb\u0f47;\u64c8st;\u629birc;\u629aash;\u629dnint;\u6a10id;\u6aefcir;\u69c2ubs\u0100;u\u1abb\u1abc\u6663it\xbb\u1abc\u02ec\u1ac7\u1ad4\u1afa\0\u1b0aon\u0100;e\u1acd\u1ace\u403a\u0100;q\xc7\xc6\u026d\u1ad9\0\0\u1ae2a\u0100;t\u1ade\u1adf\u402c;\u4040\u0180;fl\u1ae8\u1ae9\u1aeb\u6201\xee\u1160e\u0100mx\u1af1\u1af6ent\xbb\u1ae9e\xf3\u024d\u01e7\u1afe\0\u1b07\u0100;d\u12bb\u1b02ot;\u6a6dn\xf4\u0246\u0180fry\u1b10\u1b14\u1b17;\uc000\ud835\udd54o\xe4\u0254\u8100\xa9;s\u0155\u1b1dr;\u6117\u0100ao\u1b25\u1b29rr;\u61b5ss;\u6717\u0100cu\u1b32\u1b37r;\uc000\ud835\udcb8\u0100bp\u1b3c\u1b44\u0100;e\u1b41\u1b42\u6acf;\u6ad1\u0100;e\u1b49\u1b4a\u6ad0;\u6ad2dot;\u62ef\u0380delprvw\u1b60\u1b6c\u1b77\u1b82\u1bac\u1bd4\u1bf9arr\u0100lr\u1b68\u1b6a;\u6938;\u6935\u0270\u1b72\0\0\u1b75r;\u62dec;\u62dfarr\u0100;p\u1b7f\u1b80\u61b6;\u693d\u0300;bcdos\u1b8f\u1b90\u1b96\u1ba1\u1ba5\u1ba8\u622arcap;\u6a48\u0100au\u1b9b\u1b9ep;\u6a46p;\u6a4aot;\u628dr;\u6a45;\uc000\u222a\ufe00\u0200alrv\u1bb5\u1bbf\u1bde\u1be3rr\u0100;m\u1bbc\u1bbd\u61b7;\u693cy\u0180evw\u1bc7\u1bd4\u1bd8q\u0270\u1bce\0\0\u1bd2re\xe3\u1b73u\xe3\u1b75ee;\u62ceedge;\u62cfen\u803b\xa4\u40a4earrow\u0100lr\u1bee\u1bf3eft\xbb\u1b80ight\xbb\u1bbde\xe4\u1bdd\u0100ci\u1c01\u1c07onin\xf4\u01f7nt;\u6231lcty;\u632d\u0980AHabcdefhijlorstuwz\u1c38\u1c3b\u1c3f\u1c5d\u1c69\u1c75\u1c8a\u1c9e\u1cac\u1cb7\u1cfb\u1cff\u1d0d\u1d7b\u1d91\u1dab\u1dbb\u1dc6\u1dcdr\xf2\u0381ar;\u6965\u0200glrs\u1c48\u1c4d\u1c52\u1c54ger;\u6020eth;\u6138\xf2\u1133h\u0100;v\u1c5a\u1c5b\u6010\xbb\u090a\u016b\u1c61\u1c67arow;\u690fa\xe3\u0315\u0100ay\u1c6e\u1c73ron;\u410f;\u4434\u0180;ao\u0332\u1c7c\u1c84\u0100gr\u02bf\u1c81r;\u61catseq;\u6a77\u0180glm\u1c91\u1c94\u1c98\u803b\xb0\u40b0ta;\u43b4ptyv;\u69b1\u0100ir\u1ca3\u1ca8sht;\u697f;\uc000\ud835\udd21ar\u0100lr\u1cb3\u1cb5\xbb\u08dc\xbb\u101e\u0280aegsv\u1cc2\u0378\u1cd6\u1cdc\u1ce0m\u0180;os\u0326\u1cca\u1cd4nd\u0100;s\u0326\u1cd1uit;\u6666amma;\u43ddin;\u62f2\u0180;io\u1ce7\u1ce8\u1cf8\u40f7de\u8100\xf7;o\u1ce7\u1cf0ntimes;\u62c7n\xf8\u1cf7cy;\u4452c\u026f\u1d06\0\0\u1d0arn;\u631eop;\u630d\u0280lptuw\u1d18\u1d1d\u1d22\u1d49\u1d55lar;\u4024f;\uc000\ud835\udd55\u0280;emps\u030b\u1d2d\u1d37\u1d3d\u1d42q\u0100;d\u0352\u1d33ot;\u6251inus;\u6238lus;\u6214quare;\u62a1blebarwedg\xe5\xfan\u0180adh\u112e\u1d5d\u1d67ownarrow\xf3\u1c83arpoon\u0100lr\u1d72\u1d76ef\xf4\u1cb4igh\xf4\u1cb6\u0162\u1d7f\u1d85karo\xf7\u0f42\u026f\u1d8a\0\0\u1d8ern;\u631fop;\u630c\u0180cot\u1d98\u1da3\u1da6\u0100ry\u1d9d\u1da1;\uc000\ud835\udcb9;\u4455l;\u69f6rok;\u4111\u0100dr\u1db0\u1db4ot;\u62f1i\u0100;f\u1dba\u1816\u65bf\u0100ah\u1dc0\u1dc3r\xf2\u0429a\xf2\u0fa6angle;\u69a6\u0100ci\u1dd2\u1dd5y;\u445fgrarr;\u67ff\u0900Dacdefglmnopqrstux\u1e01\u1e09\u1e19\u1e38\u0578\u1e3c\u1e49\u1e61\u1e7e\u1ea5\u1eaf\u1ebd\u1ee1\u1f2a\u1f37\u1f44\u1f4e\u1f5a\u0100Do\u1e06\u1d34o\xf4\u1c89\u0100cs\u1e0e\u1e14ute\u803b\xe9\u40e9ter;\u6a6e\u0200aioy\u1e22\u1e27\u1e31\u1e36ron;\u411br\u0100;c\u1e2d\u1e2e\u6256\u803b\xea\u40ealon;\u6255;\u444dot;\u4117\u0100Dr\u1e41\u1e45ot;\u6252;\uc000\ud835\udd22\u0180;rs\u1e50\u1e51\u1e57\u6a9aave\u803b\xe8\u40e8\u0100;d\u1e5c\u1e5d\u6a96ot;\u6a98\u0200;ils\u1e6a\u1e6b\u1e72\u1e74\u6a99nters;\u63e7;\u6113\u0100;d\u1e79\u1e7a\u6a95ot;\u6a97\u0180aps\u1e85\u1e89\u1e97cr;\u4113ty\u0180;sv\u1e92\u1e93\u1e95\u6205et\xbb\u1e93p\u01001;\u1e9d\u1ea4\u0133\u1ea1\u1ea3;\u6004;\u6005\u6003\u0100gs\u1eaa\u1eac;\u414bp;\u6002\u0100gp\u1eb4\u1eb8on;\u4119f;\uc000\ud835\udd56\u0180als\u1ec4\u1ece\u1ed2r\u0100;s\u1eca\u1ecb\u62d5l;\u69e3us;\u6a71i\u0180;lv\u1eda\u1edb\u1edf\u43b5on\xbb\u1edb;\u43f5\u0200csuv\u1eea\u1ef3\u1f0b\u1f23\u0100io\u1eef\u1e31rc\xbb\u1e2e\u0269\u1ef9\0\0\u1efb\xed\u0548ant\u0100gl\u1f02\u1f06tr\xbb\u1e5dess\xbb\u1e7a\u0180aei\u1f12\u1f16\u1f1als;\u403dst;\u625fv\u0100;D\u0235\u1f20D;\u6a78parsl;\u69e5\u0100Da\u1f2f\u1f33ot;\u6253rr;\u6971\u0180cdi\u1f3e\u1f41\u1ef8r;\u612fo\xf4\u0352\u0100ah\u1f49\u1f4b;\u43b7\u803b\xf0\u40f0\u0100mr\u1f53\u1f57l\u803b\xeb\u40ebo;\u60ac\u0180cip\u1f61\u1f64\u1f67l;\u4021s\xf4\u056e\u0100eo\u1f6c\u1f74ctatio\xee\u0559nential\xe5\u0579\u09e1\u1f92\0\u1f9e\0\u1fa1\u1fa7\0\0\u1fc6\u1fcc\0\u1fd3\0\u1fe6\u1fea\u2000\0\u2008\u205allingdotse\xf1\u1e44y;\u4444male;\u6640\u0180ilr\u1fad\u1fb3\u1fc1lig;\u8000\ufb03\u0269\u1fb9\0\0\u1fbdg;\u8000\ufb00ig;\u8000\ufb04;\uc000\ud835\udd23lig;\u8000\ufb01lig;\uc000fj\u0180alt\u1fd9\u1fdc\u1fe1t;\u666dig;\u8000\ufb02ns;\u65b1of;\u4192\u01f0\u1fee\0\u1ff3f;\uc000\ud835\udd57\u0100ak\u05bf\u1ff7\u0100;v\u1ffc\u1ffd\u62d4;\u6ad9artint;\u6a0d\u0100ao\u200c\u2055\u0100cs\u2011\u2052\u03b1\u201a\u2030\u2038\u2045\u2048\0\u2050\u03b2\u2022\u2025\u2027\u202a\u202c\0\u202e\u803b\xbd\u40bd;\u6153\u803b\xbc\u40bc;\u6155;\u6159;\u615b\u01b3\u2034\0\u2036;\u6154;\u6156\u02b4\u203e\u2041\0\0\u2043\u803b\xbe\u40be;\u6157;\u615c5;\u6158\u01b6\u204c\0\u204e;\u615a;\u615d8;\u615el;\u6044wn;\u6322cr;\uc000\ud835\udcbb\u0880Eabcdefgijlnorstv\u2082\u2089\u209f\u20a5\u20b0\u20b4\u20f0\u20f5\u20fa\u20ff\u2103\u2112\u2138\u0317\u213e\u2152\u219e\u0100;l\u064d\u2087;\u6a8c\u0180cmp\u2090\u2095\u209dute;\u41f5ma\u0100;d\u209c\u1cda\u43b3;\u6a86reve;\u411f\u0100iy\u20aa\u20aerc;\u411d;\u4433ot;\u4121\u0200;lqs\u063e\u0642\u20bd\u20c9\u0180;qs\u063e\u064c\u20c4lan\xf4\u0665\u0200;cdl\u0665\u20d2\u20d5\u20e5c;\u6aa9ot\u0100;o\u20dc\u20dd\u6a80\u0100;l\u20e2\u20e3\u6a82;\u6a84\u0100;e\u20ea\u20ed\uc000\u22db\ufe00s;\u6a94r;\uc000\ud835\udd24\u0100;g\u0673\u061bmel;\u6137cy;\u4453\u0200;Eaj\u065a\u210c\u210e\u2110;\u6a92;\u6aa5;\u6aa4\u0200Eaes\u211b\u211d\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6a8arox\xbb\u2124\u0100;q\u212e\u212f\u6a88\u0100;q\u212e\u211bim;\u62e7pf;\uc000\ud835\udd58\u0100ci\u2143\u2146r;\u610am\u0180;el\u066b\u214e\u2150;\u6a8e;\u6a90\u8300>;cdlqr\u05ee\u2160\u216a\u216e\u2173\u2179\u0100ci\u2165\u2167;\u6aa7r;\u6a7aot;\u62d7Par;\u6995uest;\u6a7c\u0280adels\u2184\u216a\u2190\u0656\u219b\u01f0\u2189\0\u218epro\xf8\u209er;\u6978q\u0100lq\u063f\u2196les\xf3\u2088i\xed\u066b\u0100en\u21a3\u21adrtneqq;\uc000\u2269\ufe00\xc5\u21aa\u0500Aabcefkosy\u21c4\u21c7\u21f1\u21f5\u21fa\u2218\u221d\u222f\u2268\u227dr\xf2\u03a0\u0200ilmr\u21d0\u21d4\u21d7\u21dbrs\xf0\u1484f\xbb\u2024il\xf4\u06a9\u0100dr\u21e0\u21e4cy;\u444a\u0180;cw\u08f4\u21eb\u21efir;\u6948;\u61adar;\u610firc;\u4125\u0180alr\u2201\u220e\u2213rts\u0100;u\u2209\u220a\u6665it\xbb\u220alip;\u6026con;\u62b9r;\uc000\ud835\udd25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223a\u223e\u2243\u225e\u2263rr;\u61fftht;\u623bk\u0100lr\u2249\u2253eftarrow;\u61a9ightarrow;\u61aaf;\uc000\ud835\udd59bar;\u6015\u0180clt\u226f\u2274\u2278r;\uc000\ud835\udcbdas\xe8\u21f4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xbb\u1c5b\u0ae1\u22a3\0\u22aa\0\u22b8\u22c5\u22ce\0\u22d5\u22f3\0\0\u22f8\u2322\u2367\u2362\u237f\0\u2386\u23aa\u23b4cute\u803b\xed\u40ed\u0180;iy\u0771\u22b0\u22b5rc\u803b\xee\u40ee;\u4438\u0100cx\u22bc\u22bfy;\u4435cl\u803b\xa1\u40a1\u0100fr\u039f\u22c9;\uc000\ud835\udd26rave\u803b\xec\u40ec\u0200;ino\u073e\u22dd\u22e9\u22ee\u0100in\u22e2\u22e6nt;\u6a0ct;\u622dfin;\u69dcta;\u6129lig;\u4133\u0180aop\u22fe\u231a\u231d\u0180cgt\u2305\u2308\u2317r;\u412b\u0180elp\u071f\u230f\u2313in\xe5\u078ear\xf4\u0720h;\u4131f;\u62b7ed;\u41b5\u0280;cfot\u04f4\u232c\u2331\u233d\u2341are;\u6105in\u0100;t\u2338\u2339\u621eie;\u69dddo\xf4\u2319\u0280;celp\u0757\u234c\u2350\u235b\u2361al;\u62ba\u0100gr\u2355\u2359er\xf3\u1563\xe3\u234darhk;\u6a17rod;\u6a3c\u0200cgpt\u236f\u2372\u2376\u237by;\u4451on;\u412ff;\uc000\ud835\udd5aa;\u43b9uest\u803b\xbf\u40bf\u0100ci\u238a\u238fr;\uc000\ud835\udcben\u0280;Edsv\u04f4\u239b\u239d\u23a1\u04f3;\u62f9ot;\u62f5\u0100;v\u23a6\u23a7\u62f4;\u62f3\u0100;i\u0777\u23aelde;\u4129\u01eb\u23b8\0\u23bccy;\u4456l\u803b\xef\u40ef\u0300cfmosu\u23cc\u23d7\u23dc\u23e1\u23e7\u23f5\u0100iy\u23d1\u23d5rc;\u4135;\u4439r;\uc000\ud835\udd27ath;\u4237pf;\uc000\ud835\udd5b\u01e3\u23ec\0\u23f1r;\uc000\ud835\udcbfrcy;\u4458kcy;\u4454\u0400acfghjos\u240b\u2416\u2422\u2427\u242d\u2431\u2435\u243bppa\u0100;v\u2413\u2414\u43ba;\u43f0\u0100ey\u241b\u2420dil;\u4137;\u443ar;\uc000\ud835\udd28reen;\u4138cy;\u4445cy;\u445cpf;\uc000\ud835\udd5ccr;\uc000\ud835\udcc0\u0b80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248d\u2491\u250e\u253d\u255a\u2580\u264e\u265e\u2665\u2679\u267d\u269a\u26b2\u26d8\u275d\u2768\u278b\u27c0\u2801\u2812\u0180art\u2477\u247a\u247cr\xf2\u09c6\xf2\u0395ail;\u691barr;\u690e\u0100;g\u0994\u248b;\u6a8bar;\u6962\u0963\u24a5\0\u24aa\0\u24b1\0\0\0\0\0\u24b5\u24ba\0\u24c6\u24c8\u24cd\0\u24f9ute;\u413amptyv;\u69b4ra\xee\u084cbda;\u43bbg\u0180;dl\u088e\u24c1\u24c3;\u6991\xe5\u088e;\u6a85uo\u803b\xab\u40abr\u0400;bfhlpst\u0899\u24de\u24e6\u24e9\u24eb\u24ee\u24f1\u24f5\u0100;f\u089d\u24e3s;\u691fs;\u691d\xeb\u2252p;\u61abl;\u6939im;\u6973l;\u61a2\u0180;ae\u24ff\u2500\u2504\u6aabil;\u6919\u0100;s\u2509\u250a\u6aad;\uc000\u2aad\ufe00\u0180abr\u2515\u2519\u251drr;\u690crk;\u6772\u0100ak\u2522\u252cc\u0100ek\u2528\u252a;\u407b;\u405b\u0100es\u2531\u2533;\u698bl\u0100du\u2539\u253b;\u698f;\u698d\u0200aeuy\u2546\u254b\u2556\u2558ron;\u413e\u0100di\u2550\u2554il;\u413c\xec\u08b0\xe2\u2529;\u443b\u0200cqrs\u2563\u2566\u256d\u257da;\u6936uo\u0100;r\u0e19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694bh;\u61b2\u0280;fgqs\u258b\u258c\u0989\u25f3\u25ff\u6264t\u0280ahlrt\u2598\u25a4\u25b7\u25c2\u25e8rrow\u0100;t\u0899\u25a1a\xe9\u24f6arpoon\u0100du\u25af\u25b4own\xbb\u045ap\xbb\u0966eftarrows;\u61c7ight\u0180ahs\u25cd\u25d6\u25derrow\u0100;s\u08f4\u08a7arpoon\xf3\u0f98quigarro\xf7\u21f0hreetimes;\u62cb\u0180;qs\u258b\u0993\u25falan\xf4\u09ac\u0280;cdgs\u09ac\u260a\u260d\u261d\u2628c;\u6aa8ot\u0100;o\u2614\u2615\u6a7f\u0100;r\u261a\u261b\u6a81;\u6a83\u0100;e\u2622\u2625\uc000\u22da\ufe00s;\u6a93\u0280adegs\u2633\u2639\u263d\u2649\u264bppro\xf8\u24c6ot;\u62d6q\u0100gq\u2643\u2645\xf4\u0989gt\xf2\u248c\xf4\u099bi\xed\u09b2\u0180ilr\u2655\u08e1\u265asht;\u697c;\uc000\ud835\udd29\u0100;E\u099c\u2663;\u6a91\u0161\u2669\u2676r\u0100du\u25b2\u266e\u0100;l\u0965\u2673;\u696alk;\u6584cy;\u4459\u0280;acht\u0a48\u2688\u268b\u2691\u2696r\xf2\u25c1orne\xf2\u1d08ard;\u696bri;\u65fa\u0100io\u269f\u26a4dot;\u4140ust\u0100;a\u26ac\u26ad\u63b0che\xbb\u26ad\u0200Eaes\u26bb\u26bd\u26c9\u26d4;\u6268p\u0100;p\u26c3\u26c4\u6a89rox\xbb\u26c4\u0100;q\u26ce\u26cf\u6a87\u0100;q\u26ce\u26bbim;\u62e6\u0400abnoptwz\u26e9\u26f4\u26f7\u271a\u272f\u2741\u2747\u2750\u0100nr\u26ee\u26f1g;\u67ecr;\u61fdr\xeb\u08c1g\u0180lmr\u26ff\u270d\u2714eft\u0100ar\u09e6\u2707ight\xe1\u09f2apsto;\u67fcight\xe1\u09fdparrow\u0100lr\u2725\u2729ef\xf4\u24edight;\u61ac\u0180afl\u2736\u2739\u273dr;\u6985;\uc000\ud835\udd5dus;\u6a2dimes;\u6a34\u0161\u274b\u274fst;\u6217\xe1\u134e\u0180;ef\u2757\u2758\u1800\u65cange\xbb\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277c\u2785\u2787r\xf2\u08a8orne\xf2\u1d8car\u0100;d\u0f98\u2783;\u696d;\u600eri;\u62bf\u0300achiqt\u2798\u279d\u0a40\u27a2\u27ae\u27bbquo;\u6039r;\uc000\ud835\udcc1m\u0180;eg\u09b2\u27aa\u27ac;\u6a8d;\u6a8f\u0100bu\u252a\u27b3o\u0100;r\u0e1f\u27b9;\u601arok;\u4142\u8400<;cdhilqr\u082b\u27d2\u2639\u27dc\u27e0\u27e5\u27ea\u27f0\u0100ci\u27d7\u27d9;\u6aa6r;\u6a79re\xe5\u25f2mes;\u62c9arr;\u6976uest;\u6a7b\u0100Pi\u27f5\u27f9ar;\u6996\u0180;ef\u2800\u092d\u181b\u65c3r\u0100du\u2807\u280dshar;\u694ahar;\u6966\u0100en\u2817\u2821rtneqq;\uc000\u2268\ufe00\xc5\u281e\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288e\u2893\u28a0\u28a5\u28a8\u28da\u28e2\u28e4\u0a83\u28f3\u2902Dot;\u623a\u0200clpr\u284e\u2852\u2863\u287dr\u803b\xaf\u40af\u0100et\u2857\u2859;\u6642\u0100;e\u285e\u285f\u6720se\xbb\u285f\u0100;s\u103b\u2868to\u0200;dlu\u103b\u2873\u2877\u287bow\xee\u048cef\xf4\u090f\xf0\u13d1ker;\u65ae\u0100oy\u2887\u288cmma;\u6a29;\u443cash;\u6014asuredangle\xbb\u1626r;\uc000\ud835\udd2ao;\u6127\u0180cdn\u28af\u28b4\u28c9ro\u803b\xb5\u40b5\u0200;acd\u1464\u28bd\u28c0\u28c4s\xf4\u16a7ir;\u6af0ot\u80bb\xb7\u01b5us\u0180;bd\u28d2\u1903\u28d3\u6212\u0100;u\u1d3c\u28d8;\u6a2a\u0163\u28de\u28e1p;\u6adb\xf2\u2212\xf0\u0a81\u0100dp\u28e9\u28eeels;\u62a7f;\uc000\ud835\udd5e\u0100ct\u28f8\u28fdr;\uc000\ud835\udcc2pos\xbb\u159d\u0180;lm\u2909\u290a\u290d\u43bctimap;\u62b8\u0c00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297e\u2989\u2998\u29da\u29e9\u2a15\u2a1a\u2a58\u2a5d\u2a83\u2a95\u2aa4\u2aa8\u2b04\u2b07\u2b44\u2b7f\u2bae\u2c34\u2c67\u2c7c\u2ce9\u0100gt\u2947\u294b;\uc000\u22d9\u0338\u0100;v\u2950\u0bcf\uc000\u226b\u20d2\u0180elt\u295a\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61cdightarrow;\u61ce;\uc000\u22d8\u0338\u0100;v\u297b\u0c47\uc000\u226a\u20d2ightarrow;\u61cf\u0100Dd\u298e\u2993ash;\u62afash;\u62ae\u0280bcnpt\u29a3\u29a7\u29ac\u29b1\u29ccla\xbb\u02deute;\u4144g;\uc000\u2220\u20d2\u0280;Eiop\u0d84\u29bc\u29c0\u29c5\u29c8;\uc000\u2a70\u0338d;\uc000\u224b\u0338s;\u4149ro\xf8\u0d84ur\u0100;a\u29d3\u29d4\u666el\u0100;s\u29d3\u0b38\u01f3\u29df\0\u29e3p\u80bb\xa0\u0b37mp\u0100;e\u0bf9\u0c00\u0280aeouy\u29f4\u29fe\u2a03\u2a10\u2a13\u01f0\u29f9\0\u29fb;\u6a43on;\u4148dil;\u4146ng\u0100;d\u0d7e\u2a0aot;\uc000\u2a6d\u0338p;\u6a42;\u443dash;\u6013\u0380;Aadqsx\u0b92\u2a29\u2a2d\u2a3b\u2a41\u2a45\u2a50rr;\u61d7r\u0100hr\u2a33\u2a36k;\u6924\u0100;o\u13f2\u13f0ot;\uc000\u2250\u0338ui\xf6\u0b63\u0100ei\u2a4a\u2a4ear;\u6928\xed\u0b98ist\u0100;s\u0ba0\u0b9fr;\uc000\ud835\udd2b\u0200Eest\u0bc5\u2a66\u2a79\u2a7c\u0180;qs\u0bbc\u2a6d\u0be1\u0180;qs\u0bbc\u0bc5\u2a74lan\xf4\u0be2i\xed\u0bea\u0100;r\u0bb6\u2a81\xbb\u0bb7\u0180Aap\u2a8a\u2a8d\u2a91r\xf2\u2971rr;\u61aear;\u6af2\u0180;sv\u0f8d\u2a9c\u0f8c\u0100;d\u2aa1\u2aa2\u62fc;\u62facy;\u445a\u0380AEadest\u2ab7\u2aba\u2abe\u2ac2\u2ac5\u2af6\u2af9r\xf2\u2966;\uc000\u2266\u0338rr;\u619ar;\u6025\u0200;fqs\u0c3b\u2ace\u2ae3\u2aeft\u0100ar\u2ad4\u2ad9rro\xf7\u2ac1ightarro\xf7\u2a90\u0180;qs\u0c3b\u2aba\u2aealan\xf4\u0c55\u0100;s\u0c55\u2af4\xbb\u0c36i\xed\u0c5d\u0100;r\u0c35\u2afei\u0100;e\u0c1a\u0c25i\xe4\u0d90\u0100pt\u2b0c\u2b11f;\uc000\ud835\udd5f\u8180\xac;in\u2b19\u2b1a\u2b36\u40acn\u0200;Edv\u0b89\u2b24\u2b28\u2b2e;\uc000\u22f9\u0338ot;\uc000\u22f5\u0338\u01e1\u0b89\u2b33\u2b35;\u62f7;\u62f6i\u0100;v\u0cb8\u2b3c\u01e1\u0cb8\u2b41\u2b43;\u62fe;\u62fd\u0180aor\u2b4b\u2b63\u2b69r\u0200;ast\u0b7b\u2b55\u2b5a\u2b5flle\xec\u0b7bl;\uc000\u2afd\u20e5;\uc000\u2202\u0338lint;\u6a14\u0180;ce\u0c92\u2b70\u2b73u\xe5\u0ca5\u0100;c\u0c98\u2b78\u0100;e\u0c92\u2b7d\xf1\u0c98\u0200Aait\u2b88\u2b8b\u2b9d\u2ba7r\xf2\u2988rr\u0180;cw\u2b94\u2b95\u2b99\u619b;\uc000\u2933\u0338;\uc000\u219d\u0338ghtarrow\xbb\u2b95ri\u0100;e\u0ccb\u0cd6\u0380chimpqu\u2bbd\u2bcd\u2bd9\u2b04\u0b78\u2be4\u2bef\u0200;cer\u0d32\u2bc6\u0d37\u2bc9u\xe5\u0d45;\uc000\ud835\udcc3ort\u026d\u2b05\0\0\u2bd6ar\xe1\u2b56m\u0100;e\u0d6e\u2bdf\u0100;q\u0d74\u0d73su\u0100bp\u2beb\u2bed\xe5\u0cf8\xe5\u0d0b\u0180bcp\u2bf6\u2c11\u2c19\u0200;Ees\u2bff\u2c00\u0d22\u2c04\u6284;\uc000\u2ac5\u0338et\u0100;e\u0d1b\u2c0bq\u0100;q\u0d23\u2c00c\u0100;e\u0d32\u2c17\xf1\u0d38\u0200;Ees\u2c22\u2c23\u0d5f\u2c27\u6285;\uc000\u2ac6\u0338et\u0100;e\u0d58\u2c2eq\u0100;q\u0d60\u2c23\u0200gilr\u2c3d\u2c3f\u2c45\u2c47\xec\u0bd7lde\u803b\xf1\u40f1\xe7\u0c43iangle\u0100lr\u2c52\u2c5ceft\u0100;e\u0c1a\u2c5a\xf1\u0c26ight\u0100;e\u0ccb\u2c65\xf1\u0cd7\u0100;m\u2c6c\u2c6d\u43bd\u0180;es\u2c74\u2c75\u2c79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2c8f\u2c94\u2c99\u2c9e\u2ca3\u2cb0\u2cb6\u2cd3\u2ce3ash;\u62adarr;\u6904p;\uc000\u224d\u20d2ash;\u62ac\u0100et\u2ca8\u2cac;\uc000\u2265\u20d2;\uc000>\u20d2nfin;\u69de\u0180Aet\u2cbd\u2cc1\u2cc5rr;\u6902;\uc000\u2264\u20d2\u0100;r\u2cca\u2ccd\uc000<\u20d2ie;\uc000\u22b4\u20d2\u0100At\u2cd8\u2cdcrr;\u6903rie;\uc000\u22b5\u20d2im;\uc000\u223c\u20d2\u0180Aan\u2cf0\u2cf4\u2d02rr;\u61d6r\u0100hr\u2cfa\u2cfdk;\u6923\u0100;o\u13e7\u13e5ear;\u6927\u1253\u1a95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2d2d\0\u2d38\u2d48\u2d60\u2d65\u2d72\u2d84\u1b07\0\0\u2d8d\u2dab\0\u2dc8\u2dce\0\u2ddc\u2e19\u2e2b\u2e3e\u2e43\u0100cs\u2d31\u1a97ute\u803b\xf3\u40f3\u0100iy\u2d3c\u2d45r\u0100;c\u1a9e\u2d42\u803b\xf4\u40f4;\u443e\u0280abios\u1aa0\u2d52\u2d57\u01c8\u2d5alac;\u4151v;\u6a38old;\u69bclig;\u4153\u0100cr\u2d69\u2d6dir;\u69bf;\uc000\ud835\udd2c\u036f\u2d79\0\0\u2d7c\0\u2d82n;\u42dbave\u803b\xf2\u40f2;\u69c1\u0100bm\u2d88\u0df4ar;\u69b5\u0200acit\u2d95\u2d98\u2da5\u2da8r\xf2\u1a80\u0100ir\u2d9d\u2da0r;\u69beoss;\u69bbn\xe5\u0e52;\u69c0\u0180aei\u2db1\u2db5\u2db9cr;\u414dga;\u43c9\u0180cdn\u2dc0\u2dc5\u01cdron;\u43bf;\u69b6pf;\uc000\ud835\udd60\u0180ael\u2dd4\u2dd7\u01d2r;\u69b7rp;\u69b9\u0380;adiosv\u2dea\u2deb\u2dee\u2e08\u2e0d\u2e10\u2e16\u6228r\xf2\u1a86\u0200;efm\u2df7\u2df8\u2e02\u2e05\u6a5dr\u0100;o\u2dfe\u2dff\u6134f\xbb\u2dff\u803b\xaa\u40aa\u803b\xba\u40bagof;\u62b6r;\u6a56lope;\u6a57;\u6a5b\u0180clo\u2e1f\u2e21\u2e27\xf2\u2e01ash\u803b\xf8\u40f8l;\u6298i\u016c\u2e2f\u2e34de\u803b\xf5\u40f5es\u0100;a\u01db\u2e3as;\u6a36ml\u803b\xf6\u40f6bar;\u633d\u0ae1\u2e5e\0\u2e7d\0\u2e80\u2e9d\0\u2ea2\u2eb9\0\0\u2ecb\u0e9c\0\u2f13\0\0\u2f2b\u2fbc\0\u2fc8r\u0200;ast\u0403\u2e67\u2e72\u0e85\u8100\xb6;l\u2e6d\u2e6e\u40b6le\xec\u0403\u0269\u2e78\0\0\u2e7bm;\u6af3;\u6afdy;\u443fr\u0280cimpt\u2e8b\u2e8f\u2e93\u1865\u2e97nt;\u4025od;\u402eil;\u6030enk;\u6031r;\uc000\ud835\udd2d\u0180imo\u2ea8\u2eb0\u2eb4\u0100;v\u2ead\u2eae\u43c6;\u43d5ma\xf4\u0a76ne;\u660e\u0180;tv\u2ebf\u2ec0\u2ec8\u43c0chfork\xbb\u1ffd;\u43d6\u0100au\u2ecf\u2edfn\u0100ck\u2ed5\u2eddk\u0100;h\u21f4\u2edb;\u610e\xf6\u21f4s\u0480;abcdemst\u2ef3\u2ef4\u1908\u2ef9\u2efd\u2f04\u2f06\u2f0a\u2f0e\u402bcir;\u6a23ir;\u6a22\u0100ou\u1d40\u2f02;\u6a25;\u6a72n\u80bb\xb1\u0e9dim;\u6a26wo;\u6a27\u0180ipu\u2f19\u2f20\u2f25ntint;\u6a15f;\uc000\ud835\udd61nd\u803b\xa3\u40a3\u0500;Eaceinosu\u0ec8\u2f3f\u2f41\u2f44\u2f47\u2f81\u2f89\u2f92\u2f7e\u2fb6;\u6ab3p;\u6ab7u\xe5\u0ed9\u0100;c\u0ece\u2f4c\u0300;acens\u0ec8\u2f59\u2f5f\u2f66\u2f68\u2f7eppro\xf8\u2f43urlye\xf1\u0ed9\xf1\u0ece\u0180aes\u2f6f\u2f76\u2f7approx;\u6ab9qq;\u6ab5im;\u62e8i\xed\u0edfme\u0100;s\u2f88\u0eae\u6032\u0180Eas\u2f78\u2f90\u2f7a\xf0\u2f75\u0180dfp\u0eec\u2f99\u2faf\u0180als\u2fa0\u2fa5\u2faalar;\u632eine;\u6312urf;\u6313\u0100;t\u0efb\u2fb4\xef\u0efbrel;\u62b0\u0100ci\u2fc0\u2fc5r;\uc000\ud835\udcc5;\u43c8ncsp;\u6008\u0300fiopsu\u2fda\u22e2\u2fdf\u2fe5\u2feb\u2ff1r;\uc000\ud835\udd2epf;\uc000\ud835\udd62rime;\u6057cr;\uc000\ud835\udcc6\u0180aeo\u2ff8\u3009\u3013t\u0100ei\u2ffe\u3005rnion\xf3\u06b0nt;\u6a16st\u0100;e\u3010\u3011\u403f\xf1\u1f19\xf4\u0f14\u0a80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30e0\u310e\u312b\u3147\u3162\u3172\u318e\u3206\u3215\u3224\u3229\u3258\u326e\u3272\u3290\u32b0\u32b7\u0180art\u3047\u304a\u304cr\xf2\u10b3\xf2\u03ddail;\u691car\xf2\u1c65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307f\u308f\u3094\u30cc\u0100eu\u306d\u3071;\uc000\u223d\u0331te;\u4155i\xe3\u116emptyv;\u69b3g\u0200;del\u0fd1\u3089\u308b\u308d;\u6992;\u69a5\xe5\u0fd1uo\u803b\xbb\u40bbr\u0580;abcfhlpstw\u0fdc\u30ac\u30af\u30b7\u30b9\u30bc\u30be\u30c0\u30c3\u30c7\u30cap;\u6975\u0100;f\u0fe0\u30b4s;\u6920;\u6933s;\u691e\xeb\u225d\xf0\u272el;\u6945im;\u6974l;\u61a3;\u619d\u0100ai\u30d1\u30d5il;\u691ao\u0100;n\u30db\u30dc\u6236al\xf3\u0f1e\u0180abr\u30e7\u30ea\u30eer\xf2\u17e5rk;\u6773\u0100ak\u30f3\u30fdc\u0100ek\u30f9\u30fb;\u407d;\u405d\u0100es\u3102\u3104;\u698cl\u0100du\u310a\u310c;\u698e;\u6990\u0200aeuy\u3117\u311c\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xec\u0ff2\xe2\u30fa;\u4440\u0200clqs\u3134\u3137\u313d\u3144a;\u6937dhar;\u6969uo\u0100;r\u020e\u020dh;\u61b3\u0180acg\u314e\u315f\u0f44l\u0200;ips\u0f78\u3158\u315b\u109cn\xe5\u10bbar\xf4\u0fa9t;\u65ad\u0180ilr\u3169\u1023\u316esht;\u697d;\uc000\ud835\udd2f\u0100ao\u3177\u3186r\u0100du\u317d\u317f\xbb\u047b\u0100;l\u1091\u3184;\u696c\u0100;v\u318b\u318c\u43c1;\u43f1\u0180gns\u3195\u31f9\u31fcht\u0300ahlrst\u31a4\u31b0\u31c2\u31d8\u31e4\u31eerrow\u0100;t\u0fdc\u31ada\xe9\u30c8arpoon\u0100du\u31bb\u31bfow\xee\u317ep\xbb\u1092eft\u0100ah\u31ca\u31d0rrow\xf3\u0feaarpoon\xf3\u0551ightarrows;\u61c9quigarro\xf7\u30cbhreetimes;\u62ccg;\u42daingdotse\xf1\u1f32\u0180ahm\u320d\u3210\u3213r\xf2\u0feaa\xf2\u0551;\u600foust\u0100;a\u321e\u321f\u63b1che\xbb\u321fmid;\u6aee\u0200abpt\u3232\u323d\u3240\u3252\u0100nr\u3237\u323ag;\u67edr;\u61fer\xeb\u1003\u0180afl\u3247\u324a\u324er;\u6986;\uc000\ud835\udd63us;\u6a2eimes;\u6a35\u0100ap\u325d\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6a12ar\xf2\u31e3\u0200achq\u327b\u3280\u10bc\u3285quo;\u603ar;\uc000\ud835\udcc7\u0100bu\u30fb\u328ao\u0100;r\u0214\u0213\u0180hir\u3297\u329b\u32a0re\xe5\u31f8mes;\u62cai\u0200;efl\u32aa\u1059\u1821\u32ab\u65b9tri;\u69celuhar;\u6968;\u611e\u0d61\u32d5\u32db\u32df\u332c\u3338\u3371\0\u337a\u33a4\0\0\u33ec\u33f0\0\u3428\u3448\u345a\u34ad\u34b1\u34ca\u34f1\0\u3616\0\0\u3633cute;\u415bqu\xef\u27ba\u0500;Eaceinpsy\u11ed\u32f3\u32f5\u32ff\u3302\u330b\u330f\u331f\u3326\u3329;\u6ab4\u01f0\u32fa\0\u32fc;\u6ab8on;\u4161u\xe5\u11fe\u0100;d\u11f3\u3307il;\u415frc;\u415d\u0180Eas\u3316\u3318\u331b;\u6ab6p;\u6abaim;\u62e9olint;\u6a13i\xed\u1204;\u4441ot\u0180;be\u3334\u1d47\u3335\u62c5;\u6a66\u0380Aacmstx\u3346\u334a\u3357\u335b\u335e\u3363\u336drr;\u61d8r\u0100hr\u3350\u3352\xeb\u2228\u0100;o\u0a36\u0a34t\u803b\xa7\u40a7i;\u403bwar;\u6929m\u0100in\u3369\xf0nu\xf3\xf1t;\u6736r\u0100;o\u3376\u2055\uc000\ud835\udd30\u0200acoy\u3382\u3386\u3391\u33a0rp;\u666f\u0100hy\u338b\u338fcy;\u4449;\u4448rt\u026d\u3399\0\0\u339ci\xe4\u1464ara\xec\u2e6f\u803b\xad\u40ad\u0100gm\u33a8\u33b4ma\u0180;fv\u33b1\u33b2\u33b2\u43c3;\u43c2\u0400;deglnpr\u12ab\u33c5\u33c9\u33ce\u33d6\u33de\u33e1\u33e6ot;\u6a6a\u0100;q\u12b1\u12b0\u0100;E\u33d3\u33d4\u6a9e;\u6aa0\u0100;E\u33db\u33dc\u6a9d;\u6a9fe;\u6246lus;\u6a24arr;\u6972ar\xf2\u113d\u0200aeit\u33f8\u3408\u340f\u3417\u0100ls\u33fd\u3404lsetm\xe9\u336ahp;\u6a33parsl;\u69e4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341c\u341d\u6aaa\u0100;s\u3422\u3423\u6aac;\uc000\u2aac\ufe00\u0180flp\u342e\u3433\u3442tcy;\u444c\u0100;b\u3438\u3439\u402f\u0100;a\u343e\u343f\u69c4r;\u633ff;\uc000\ud835\udd64a\u0100dr\u344d\u0402es\u0100;u\u3454\u3455\u6660it\xbb\u3455\u0180csu\u3460\u3479\u349f\u0100au\u3465\u346fp\u0100;s\u1188\u346b;\uc000\u2293\ufe00p\u0100;s\u11b4\u3475;\uc000\u2294\ufe00u\u0100bp\u347f\u348f\u0180;es\u1197\u119c\u3486et\u0100;e\u1197\u348d\xf1\u119d\u0180;es\u11a8\u11ad\u3496et\u0100;e\u11a8\u349d\xf1\u11ae\u0180;af\u117b\u34a6\u05b0r\u0165\u34ab\u05b1\xbb\u117car\xf2\u1148\u0200cemt\u34b9\u34be\u34c2\u34c5r;\uc000\ud835\udcc8tm\xee\xf1i\xec\u3415ar\xe6\u11be\u0100ar\u34ce\u34d5r\u0100;f\u34d4\u17bf\u6606\u0100an\u34da\u34edight\u0100ep\u34e3\u34eapsilo\xee\u1ee0h\xe9\u2eafs\xbb\u2852\u0280bcmnp\u34fb\u355e\u1209\u358b\u358e\u0480;Edemnprs\u350e\u350f\u3511\u3515\u351e\u3523\u352c\u3531\u3536\u6282;\u6ac5ot;\u6abd\u0100;d\u11da\u351aot;\u6ac3ult;\u6ac1\u0100Ee\u3528\u352a;\u6acb;\u628alus;\u6abfarr;\u6979\u0180eiu\u353d\u3552\u3555t\u0180;en\u350e\u3545\u354bq\u0100;q\u11da\u350feq\u0100;q\u352b\u3528m;\u6ac7\u0100bp\u355a\u355c;\u6ad5;\u6ad3c\u0300;acens\u11ed\u356c\u3572\u3579\u357b\u3326ppro\xf8\u32faurlye\xf1\u11fe\xf1\u11f3\u0180aes\u3582\u3588\u331bppro\xf8\u331aq\xf1\u3317g;\u666a\u0680123;Edehlmnps\u35a9\u35ac\u35af\u121c\u35b2\u35b4\u35c0\u35c9\u35d5\u35da\u35df\u35e8\u35ed\u803b\xb9\u40b9\u803b\xb2\u40b2\u803b\xb3\u40b3;\u6ac6\u0100os\u35b9\u35bct;\u6abeub;\u6ad8\u0100;d\u1222\u35c5ot;\u6ac4s\u0100ou\u35cf\u35d2l;\u67c9b;\u6ad7arr;\u697bult;\u6ac2\u0100Ee\u35e4\u35e6;\u6acc;\u628blus;\u6ac0\u0180eiu\u35f4\u3609\u360ct\u0180;en\u121c\u35fc\u3602q\u0100;q\u1222\u35b2eq\u0100;q\u35e7\u35e4m;\u6ac8\u0100bp\u3611\u3613;\u6ad4;\u6ad6\u0180Aan\u361c\u3620\u362drr;\u61d9r\u0100hr\u3626\u3628\xeb\u222e\u0100;o\u0a2b\u0a29war;\u692alig\u803b\xdf\u40df\u0be1\u3651\u365d\u3660\u12ce\u3673\u3679\0\u367e\u36c2\0\0\0\0\0\u36db\u3703\0\u3709\u376c\0\0\0\u3787\u0272\u3656\0\0\u365bget;\u6316;\u43c4r\xeb\u0e5f\u0180aey\u3666\u366b\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uc000\ud835\udd31\u0200eiko\u3686\u369d\u36b5\u36bc\u01f2\u368b\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369b\u43b8ym;\u43d1\u0100cn\u36a2\u36b2k\u0100as\u36a8\u36aeppro\xf8\u12c1im\xbb\u12acs\xf0\u129e\u0100as\u36ba\u36ae\xf0\u12c1rn\u803b\xfe\u40fe\u01ec\u031f\u36c6\u22e7es\u8180\xd7;bd\u36cf\u36d0\u36d8\u40d7\u0100;a\u190f\u36d5r;\u6a31;\u6a30\u0180eps\u36e1\u36e3\u3700\xe1\u2a4d\u0200;bcf\u0486\u36ec\u36f0\u36f4ot;\u6336ir;\u6af1\u0100;o\u36f9\u36fc\uc000\ud835\udd65rk;\u6ada\xe1\u3362rime;\u6034\u0180aip\u370f\u3712\u3764d\xe5\u1248\u0380adempst\u3721\u374d\u3740\u3751\u3757\u375c\u375fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65b5own\xbb\u1dbbeft\u0100;e\u2800\u373e\xf1\u092e;\u625cight\u0100;e\u32aa\u374b\xf1\u105aot;\u65ecinus;\u6a3alus;\u6a39b;\u69cdime;\u6a3bezium;\u63e2\u0180cht\u3772\u377d\u3781\u0100ry\u3777\u377b;\uc000\ud835\udcc9;\u4446cy;\u445brok;\u4167\u0100io\u378b\u378ex\xf4\u1777head\u0100lr\u3797\u37a0eftarro\xf7\u084fightarrow\xbb\u0f5d\u0900AHabcdfghlmoprstuw\u37d0\u37d3\u37d7\u37e4\u37f0\u37fc\u380e\u381c\u3823\u3834\u3851\u385d\u386b\u38a9\u38cc\u38d2\u38ea\u38f6r\xf2\u03edar;\u6963\u0100cr\u37dc\u37e2ute\u803b\xfa\u40fa\xf2\u1150r\u01e3\u37ea\0\u37edy;\u445eve;\u416d\u0100iy\u37f5\u37farc\u803b\xfb\u40fb;\u4443\u0180abh\u3803\u3806\u380br\xf2\u13adlac;\u4171a\xf2\u13c3\u0100ir\u3813\u3818sht;\u697e;\uc000\ud835\udd32rave\u803b\xf9\u40f9\u0161\u3827\u3831r\u0100lr\u382c\u382e\xbb\u0957\xbb\u1083lk;\u6580\u0100ct\u3839\u384d\u026f\u383f\0\0\u384arn\u0100;e\u3845\u3846\u631cr\xbb\u3846op;\u630fri;\u65f8\u0100al\u3856\u385acr;\u416b\u80bb\xa8\u0349\u0100gp\u3862\u3866on;\u4173f;\uc000\ud835\udd66\u0300adhlsu\u114b\u3878\u387d\u1372\u3891\u38a0own\xe1\u13b3arpoon\u0100lr\u3888\u388cef\xf4\u382digh\xf4\u382fi\u0180;hl\u3899\u389a\u389c\u43c5\xbb\u13faon\xbb\u389aparrows;\u61c8\u0180cit\u38b0\u38c4\u38c8\u026f\u38b6\0\0\u38c1rn\u0100;e\u38bc\u38bd\u631dr\xbb\u38bdop;\u630eng;\u416fri;\u65f9cr;\uc000\ud835\udcca\u0180dir\u38d9\u38dd\u38e2ot;\u62f0lde;\u4169i\u0100;f\u3730\u38e8\xbb\u1813\u0100am\u38ef\u38f2r\xf2\u38a8l\u803b\xfc\u40fcangle;\u69a7\u0780ABDacdeflnoprsz\u391c\u391f\u3929\u392d\u39b5\u39b8\u39bd\u39df\u39e4\u39e8\u39f3\u39f9\u39fd\u3a01\u3a20r\xf2\u03f7ar\u0100;v\u3926\u3927\u6ae8;\u6ae9as\xe8\u03e1\u0100nr\u3932\u3937grt;\u699c\u0380eknprst\u34e3\u3946\u394b\u3952\u395d\u3964\u3996app\xe1\u2415othin\xe7\u1e96\u0180hir\u34eb\u2ec8\u3959op\xf4\u2fb5\u0100;h\u13b7\u3962\xef\u318d\u0100iu\u3969\u396dgm\xe1\u33b3\u0100bp\u3972\u3984setneq\u0100;q\u397d\u3980\uc000\u228a\ufe00;\uc000\u2acb\ufe00setneq\u0100;q\u398f\u3992\uc000\u228b\ufe00;\uc000\u2acc\ufe00\u0100hr\u399b\u399fet\xe1\u369ciangle\u0100lr\u39aa\u39afeft\xbb\u0925ight\xbb\u1051y;\u4432ash\xbb\u1036\u0180elr\u39c4\u39d2\u39d7\u0180;be\u2dea\u39cb\u39cfar;\u62bbq;\u625alip;\u62ee\u0100bt\u39dc\u1468a\xf2\u1469r;\uc000\ud835\udd33tr\xe9\u39aesu\u0100bp\u39ef\u39f1\xbb\u0d1c\xbb\u0d59pf;\uc000\ud835\udd67ro\xf0\u0efbtr\xe9\u39b4\u0100cu\u3a06\u3a0br;\uc000\ud835\udccb\u0100bp\u3a10\u3a18n\u0100Ee\u3980\u3a16\xbb\u397en\u0100Ee\u3992\u3a1e\xbb\u3990igzag;\u699a\u0380cefoprs\u3a36\u3a3b\u3a56\u3a5b\u3a54\u3a61\u3a6airc;\u4175\u0100di\u3a40\u3a51\u0100bg\u3a45\u3a49ar;\u6a5fe\u0100;q\u15fa\u3a4f;\u6259erp;\u6118r;\uc000\ud835\udd34pf;\uc000\ud835\udd68\u0100;e\u1479\u3a66at\xe8\u1479cr;\uc000\ud835\udccc\u0ae3\u178e\u3a87\0\u3a8b\0\u3a90\u3a9b\0\0\u3a9d\u3aa8\u3aab\u3aaf\0\0\u3ac3\u3ace\0\u3ad8\u17dc\u17dftr\xe9\u17d1r;\uc000\ud835\udd35\u0100Aa\u3a94\u3a97r\xf2\u03c3r\xf2\u09f6;\u43be\u0100Aa\u3aa1\u3aa4r\xf2\u03b8r\xf2\u09eba\xf0\u2713is;\u62fb\u0180dpt\u17a4\u3ab5\u3abe\u0100fl\u3aba\u17a9;\uc000\ud835\udd69im\xe5\u17b2\u0100Aa\u3ac7\u3acar\xf2\u03cer\xf2\u0a01\u0100cq\u3ad2\u17b8r;\uc000\ud835\udccd\u0100pt\u17d6\u3adcr\xe9\u17d4\u0400acefiosu\u3af0\u3afd\u3b08\u3b0c\u3b11\u3b15\u3b1b\u3b21c\u0100uy\u3af6\u3afbte\u803b\xfd\u40fd;\u444f\u0100iy\u3b02\u3b06rc;\u4177;\u444bn\u803b\xa5\u40a5r;\uc000\ud835\udd36cy;\u4457pf;\uc000\ud835\udd6acr;\uc000\ud835\udcce\u0100cm\u3b26\u3b29y;\u444el\u803b\xff\u40ff\u0500acdefhiosw\u3b42\u3b48\u3b54\u3b58\u3b64\u3b69\u3b6d\u3b74\u3b7a\u3b80cute;\u417a\u0100ay\u3b4d\u3b52ron;\u417e;\u4437ot;\u417c\u0100et\u3b5d\u3b61tr\xe6\u155fa;\u43b6r;\uc000\ud835\udd37cy;\u4436grarr;\u61ddpf;\uc000\ud835\udd6bcr;\uc000\ud835\udccf\u0100jn\u3b85\u3b87;\u600dj;\u600c" + .split("") + .map((c) => c.charCodeAt(0))); + +// Generated using scripts/write-decode-map.ts +var xmlDecodeTree = new Uint16Array( +// prettier-ignore +"\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022" + .split("") + .map((c) => c.charCodeAt(0))); + +// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134 +var _a$1; +const decodeMap = new Map([ + [0, 65533], + // C1 Unicode control character reference replacements + [128, 8364], + [130, 8218], + [131, 402], + [132, 8222], + [133, 8230], + [134, 8224], + [135, 8225], + [136, 710], + [137, 8240], + [138, 352], + [139, 8249], + [140, 338], + [142, 381], + [145, 8216], + [146, 8217], + [147, 8220], + [148, 8221], + [149, 8226], + [150, 8211], + [151, 8212], + [152, 732], + [153, 8482], + [154, 353], + [155, 8250], + [156, 339], + [158, 382], + [159, 376], +]); +/** + * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. + */ +const fromCodePoint = +// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins +(_a$1 = String.fromCodePoint) !== null && _a$1 !== void 0 ? _a$1 : function (codePoint) { + let output = ""; + if (codePoint > 0xffff) { + codePoint -= 0x10000; + output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800); + codePoint = 0xdc00 | (codePoint & 0x3ff); + } + output += String.fromCharCode(codePoint); + return output; +}; +/** + * Replace the given code point with a replacement character if it is a + * surrogate or is outside the valid range. Otherwise return the code + * point unchanged. + */ +function replaceCodePoint(codePoint) { + var _a; + if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) { + return 0xfffd; + } + return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint; +} + +var CharCodes; +(function (CharCodes) { + CharCodes[CharCodes["NUM"] = 35] = "NUM"; + CharCodes[CharCodes["SEMI"] = 59] = "SEMI"; + CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS"; + CharCodes[CharCodes["ZERO"] = 48] = "ZERO"; + CharCodes[CharCodes["NINE"] = 57] = "NINE"; + CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A"; + CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F"; + CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X"; + CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z"; + CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A"; + CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F"; + CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z"; +})(CharCodes || (CharCodes = {})); +/** Bit that needs to be set to convert an upper case ASCII character to lower case */ +const TO_LOWER_BIT = 0b100000; +var BinTrieFlags; +(function (BinTrieFlags) { + BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH"; + BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH"; + BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE"; +})(BinTrieFlags || (BinTrieFlags = {})); +function isNumber$1(code) { + return code >= CharCodes.ZERO && code <= CharCodes.NINE; +} +function isHexadecimalCharacter(code) { + return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) || + (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F)); +} +function isAsciiAlphaNumeric(code) { + return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) || + (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) || + isNumber$1(code)); +} +/** + * Checks if the given character is a valid end character for an entity in an attribute. + * + * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error. + * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state + */ +function isEntityInAttributeInvalidEnd(code) { + return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code); +} +var EntityDecoderState; +(function (EntityDecoderState) { + EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart"; + EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart"; + EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal"; + EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex"; + EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity"; +})(EntityDecoderState || (EntityDecoderState = {})); +var DecodingMode; +(function (DecodingMode) { + /** Entities in text nodes that can end with any character. */ + DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy"; + /** Only allow entities terminated with a semicolon. */ + DecodingMode[DecodingMode["Strict"] = 1] = "Strict"; + /** Entities in attributes have limitations on ending characters. */ + DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute"; +})(DecodingMode || (DecodingMode = {})); +/** + * Token decoder with support of writing partial entities. + */ +class EntityDecoder { + constructor( + /** The tree used to decode entities. */ + decodeTree, + /** + * The function that is called when a codepoint is decoded. + * + * For multi-byte named entities, this will be called multiple times, + * with the second codepoint, and the same `consumed` value. + * + * @param codepoint The decoded codepoint. + * @param consumed The number of bytes consumed by the decoder. + */ + emitCodePoint, + /** An object that is used to produce errors. */ + errors) { + this.decodeTree = decodeTree; + this.emitCodePoint = emitCodePoint; + this.errors = errors; + /** The current state of the decoder. */ + this.state = EntityDecoderState.EntityStart; + /** Characters that were consumed while parsing an entity. */ + this.consumed = 1; + /** + * The result of the entity. + * + * Either the result index of a numeric entity, or the codepoint of a + * numeric entity. + */ + this.result = 0; + /** The current index in the decode tree. */ + this.treeIndex = 0; + /** The number of characters that were consumed in excess. */ + this.excess = 1; + /** The mode in which the decoder is operating. */ + this.decodeMode = DecodingMode.Strict; + } + /** Resets the instance to make it reusable. */ + startEntity(decodeMode) { + this.decodeMode = decodeMode; + this.state = EntityDecoderState.EntityStart; + this.result = 0; + this.treeIndex = 0; + this.excess = 1; + this.consumed = 1; + } + /** + * Write an entity to the decoder. This can be called multiple times with partial entities. + * If the entity is incomplete, the decoder will return -1. + * + * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the + * entity is incomplete, and resume when the next string is written. + * + * @param string The string containing the entity (or a continuation of the entity). + * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + write(str, offset) { + switch (this.state) { + case EntityDecoderState.EntityStart: { + if (str.charCodeAt(offset) === CharCodes.NUM) { + this.state = EntityDecoderState.NumericStart; + this.consumed += 1; + return this.stateNumericStart(str, offset + 1); + } + this.state = EntityDecoderState.NamedEntity; + return this.stateNamedEntity(str, offset); + } + case EntityDecoderState.NumericStart: { + return this.stateNumericStart(str, offset); + } + case EntityDecoderState.NumericDecimal: { + return this.stateNumericDecimal(str, offset); + } + case EntityDecoderState.NumericHex: { + return this.stateNumericHex(str, offset); + } + case EntityDecoderState.NamedEntity: { + return this.stateNamedEntity(str, offset); + } + } + } + /** + * Switches between the numeric decimal and hexadecimal states. + * + * Equivalent to the `Numeric character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNumericStart(str, offset) { + if (offset >= str.length) { + return -1; + } + if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) { + this.state = EntityDecoderState.NumericHex; + this.consumed += 1; + return this.stateNumericHex(str, offset + 1); + } + this.state = EntityDecoderState.NumericDecimal; + return this.stateNumericDecimal(str, offset); + } + addToNumericResult(str, start, end, base) { + if (start !== end) { + const digitCount = end - start; + this.result = + this.result * Math.pow(base, digitCount) + + parseInt(str.substr(start, digitCount), base); + this.consumed += digitCount; + } + } + /** + * Parses a hexadecimal numeric entity. + * + * Equivalent to the `Hexademical character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNumericHex(str, offset) { + const startIdx = offset; + while (offset < str.length) { + const char = str.charCodeAt(offset); + if (isNumber$1(char) || isHexadecimalCharacter(char)) { + offset += 1; + } + else { + this.addToNumericResult(str, startIdx, offset, 16); + return this.emitNumericEntity(char, 3); + } + } + this.addToNumericResult(str, startIdx, offset, 16); + return -1; + } + /** + * Parses a decimal numeric entity. + * + * Equivalent to the `Decimal character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNumericDecimal(str, offset) { + const startIdx = offset; + while (offset < str.length) { + const char = str.charCodeAt(offset); + if (isNumber$1(char)) { + offset += 1; + } + else { + this.addToNumericResult(str, startIdx, offset, 10); + return this.emitNumericEntity(char, 2); + } + } + this.addToNumericResult(str, startIdx, offset, 10); + return -1; + } + /** + * Validate and emit a numeric entity. + * + * Implements the logic from the `Hexademical character reference start + * state` and `Numeric character reference end state` in the HTML spec. + * + * @param lastCp The last code point of the entity. Used to see if the + * entity was terminated with a semicolon. + * @param expectedLength The minimum number of characters that should be + * consumed. Used to validate that at least one digit + * was consumed. + * @returns The number of characters that were consumed. + */ + emitNumericEntity(lastCp, expectedLength) { + var _a; + // Ensure we consumed at least one digit. + if (this.consumed <= expectedLength) { + (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); + return 0; + } + // Figure out if this is a legit end of the entity + if (lastCp === CharCodes.SEMI) { + this.consumed += 1; + } + else if (this.decodeMode === DecodingMode.Strict) { + return 0; + } + this.emitCodePoint(replaceCodePoint(this.result), this.consumed); + if (this.errors) { + if (lastCp !== CharCodes.SEMI) { + this.errors.missingSemicolonAfterCharacterReference(); + } + this.errors.validateNumericCharacterReference(this.result); + } + return this.consumed; + } + /** + * Parses a named entity. + * + * Equivalent to the `Named character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNamedEntity(str, offset) { + const { decodeTree } = this; + let current = decodeTree[this.treeIndex]; + // The mask is the number of bytes of the value, including the current byte. + let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; + for (; offset < str.length; offset++, this.excess++) { + const char = str.charCodeAt(offset); + this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); + if (this.treeIndex < 0) { + return this.result === 0 || + // If we are parsing an attribute + (this.decodeMode === DecodingMode.Attribute && + // We shouldn't have consumed any characters after the entity, + (valueLength === 0 || + // And there should be no invalid characters. + isEntityInAttributeInvalidEnd(char))) + ? 0 + : this.emitNotTerminatedNamedEntity(); + } + current = decodeTree[this.treeIndex]; + valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; + // If the branch is a value, store it and continue + if (valueLength !== 0) { + // If the entity is terminated by a semicolon, we are done. + if (char === CharCodes.SEMI) { + return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); + } + // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it. + if (this.decodeMode !== DecodingMode.Strict) { + this.result = this.treeIndex; + this.consumed += this.excess; + this.excess = 0; + } + } + } + return -1; + } + /** + * Emit a named entity that was not terminated with a semicolon. + * + * @returns The number of characters consumed. + */ + emitNotTerminatedNamedEntity() { + var _a; + const { result, decodeTree } = this; + const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14; + this.emitNamedEntityData(result, valueLength, this.consumed); + (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference(); + return this.consumed; + } + /** + * Emit a named entity. + * + * @param result The index of the entity in the decode tree. + * @param valueLength The number of bytes in the entity. + * @param consumed The number of characters consumed. + * + * @returns The number of characters consumed. + */ + emitNamedEntityData(result, valueLength, consumed) { + const { decodeTree } = this; + this.emitCodePoint(valueLength === 1 + ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH + : decodeTree[result + 1], consumed); + if (valueLength === 3) { + // For multi-byte values, we need to emit the second byte. + this.emitCodePoint(decodeTree[result + 2], consumed); + } + return consumed; + } + /** + * Signal to the parser that the end of the input was reached. + * + * Remaining data will be emitted and relevant errors will be produced. + * + * @returns The number of characters consumed. + */ + end() { + var _a; + switch (this.state) { + case EntityDecoderState.NamedEntity: { + // Emit a named entity if we have one. + return this.result !== 0 && + (this.decodeMode !== DecodingMode.Attribute || + this.result === this.treeIndex) + ? this.emitNotTerminatedNamedEntity() + : 0; + } + // Otherwise, emit a numeric entity if we have one. + case EntityDecoderState.NumericDecimal: { + return this.emitNumericEntity(0, 2); + } + case EntityDecoderState.NumericHex: { + return this.emitNumericEntity(0, 3); + } + case EntityDecoderState.NumericStart: { + (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); + return 0; + } + case EntityDecoderState.EntityStart: { + // Return 0 if we have no entity. + return 0; + } + } + } +} +/** + * Creates a function that decodes entities in a string. + * + * @param decodeTree The decode tree. + * @returns A function that decodes entities in a string. + */ +function getDecoder(decodeTree) { + let ret = ""; + const decoder = new EntityDecoder(decodeTree, (str) => (ret += fromCodePoint(str))); + return function decodeWithTrie(str, decodeMode) { + let lastIndex = 0; + let offset = 0; + while ((offset = str.indexOf("&", offset)) >= 0) { + ret += str.slice(lastIndex, offset); + decoder.startEntity(decodeMode); + const len = decoder.write(str, + // Skip the "&" + offset + 1); + if (len < 0) { + lastIndex = offset + decoder.end(); + break; + } + lastIndex = offset + len; + // If `len` is 0, skip the current `&` and continue. + offset = len === 0 ? lastIndex + 1 : lastIndex; + } + const result = ret + str.slice(lastIndex); + // Make sure we don't keep a reference to the final string. + ret = ""; + return result; + }; +} +/** + * Determines the branch of the current node that is taken given the current + * character. This function is used to traverse the trie. + * + * @param decodeTree The trie. + * @param current The current node. + * @param nodeIdx The index right after the current node and its value. + * @param char The current character. + * @returns The index of the next node, or -1 if no branch is taken. + */ +function determineBranch(decodeTree, current, nodeIdx, char) { + const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; + const jumpOffset = current & BinTrieFlags.JUMP_TABLE; + // Case 1: Single branch encoded in jump offset + if (branchCount === 0) { + return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1; + } + // Case 2: Multiple branches encoded in jump table + if (jumpOffset) { + const value = char - jumpOffset; + return value < 0 || value >= branchCount + ? -1 + : decodeTree[nodeIdx + value] - 1; + } + // Case 3: Multiple branches encoded in dictionary + // Binary search for the character. + let lo = nodeIdx; + let hi = lo + branchCount - 1; + while (lo <= hi) { + const mid = (lo + hi) >>> 1; + const midVal = decodeTree[mid]; + if (midVal < char) { + lo = mid + 1; + } + else if (midVal > char) { + hi = mid - 1; + } + else { + return decodeTree[mid + branchCount]; + } + } + return -1; +} +const htmlDecoder = getDecoder(htmlDecodeTree); +getDecoder(xmlDecodeTree); +/** + * Decodes an HTML string. + * + * @param str The string to decode. + * @param mode The decoding mode. + * @returns The decoded string. + */ +function decodeHTML(str, mode = DecodingMode.Legacy) { + return htmlDecoder(str, mode); +} + +const defaultDelimitersOpen = new Uint8Array([123, 123]); +const defaultDelimitersClose = new Uint8Array([125, 125]); +function isTagStartChar(c) { + return c >= 97 && c <= 122 || c >= 65 && c <= 90; +} +function isWhitespace(c) { + return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; +} +function isEndOfTagSection(c) { + return c === 47 || c === 62 || isWhitespace(c); +} +function toCharCodes(str) { + const ret = new Uint8Array(str.length); + for (let i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret; +} +const Sequences = { + Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), + // CDATA[ + CdataEnd: new Uint8Array([93, 93, 62]), + // ]]> + CommentEnd: new Uint8Array([45, 45, 62]), + // `-->` + ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), + // `<\/script` + StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), + // `</style` + TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), + // `</title` + TextareaEnd: new Uint8Array([ + 60, + 47, + 116, + 101, + 120, + 116, + 97, + 114, + 101, + 97 + ]) + // `</textarea +}; +class Tokenizer { + constructor(stack, cbs) { + this.stack = stack; + this.cbs = cbs; + /** The current state the tokenizer is in. */ + this.state = 1; + /** The read buffer. */ + this.buffer = ""; + /** The beginning of the section that is currently being read. */ + this.sectionStart = 0; + /** The index within the buffer that we are currently looking at. */ + this.index = 0; + /** The start of the last entity. */ + this.entityStart = 0; + /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ + this.baseState = 1; + /** For special parsing behavior inside of script and style tags. */ + this.inRCDATA = false; + /** For disabling RCDATA tags handling */ + this.inXML = false; + /** For disabling interpolation parsing in v-pre */ + this.inVPre = false; + /** Record newline positions for fast line / column calculation */ + this.newlines = []; + this.mode = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + this.delimiterIndex = -1; + this.currentSequence = void 0; + this.sequenceIndex = 0; + { + this.entityDecoder = new EntityDecoder( + htmlDecodeTree, + (cp, consumed) => this.emitCodePoint(cp, consumed) + ); + } + } + get inSFCRoot() { + return this.mode === 2 && this.stack.length === 0; + } + reset() { + this.state = 1; + this.mode = 0; + this.buffer = ""; + this.sectionStart = 0; + this.index = 0; + this.baseState = 1; + this.inRCDATA = false; + this.currentSequence = void 0; + this.newlines.length = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + } + /** + * Generate Position object with line / column information using recorded + * newline positions. We know the index is always going to be an already + * processed index, so all the newlines up to this index should have been + * recorded. + */ + getPos(index) { + let line = 1; + let column = index + 1; + for (let i = this.newlines.length - 1; i >= 0; i--) { + const newlineIndex = this.newlines[i]; + if (index > newlineIndex) { + line = i + 2; + column = index - newlineIndex; + break; + } + } + return { + column, + line, + offset: index + }; + } + peek() { + return this.buffer.charCodeAt(this.index + 1); + } + stateText(c) { + if (c === 60) { + if (this.index > this.sectionStart) { + this.cbs.ontext(this.sectionStart, this.index); + } + this.state = 5; + this.sectionStart = this.index; + } else if (c === 38) { + this.startEntity(); + } else if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } + stateInterpolationOpen(c) { + if (c === this.delimiterOpen[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterOpen.length - 1) { + const start = this.index + 1 - this.delimiterOpen.length; + if (start > this.sectionStart) { + this.cbs.ontext(this.sectionStart, start); + } + this.state = 3; + this.sectionStart = start; + } else { + this.delimiterIndex++; + } + } else if (this.inRCDATA) { + this.state = 32; + this.stateInRCDATA(c); + } else { + this.state = 1; + this.stateText(c); + } + } + stateInterpolation(c) { + if (c === this.delimiterClose[0]) { + this.state = 4; + this.delimiterIndex = 0; + this.stateInterpolationClose(c); + } + } + stateInterpolationClose(c) { + if (c === this.delimiterClose[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterClose.length - 1) { + this.cbs.oninterpolation(this.sectionStart, this.index + 1); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else { + this.delimiterIndex++; + } + } else { + this.state = 3; + this.stateInterpolation(c); + } + } + stateSpecialStartSequence(c) { + const isEnd = this.sequenceIndex === this.currentSequence.length; + const isMatch = isEnd ? ( + // If we are at the end of the sequence, make sure the tag name has ended + isEndOfTagSection(c) + ) : ( + // Otherwise, do a case-insensitive comparison + (c | 32) === this.currentSequence[this.sequenceIndex] + ); + if (!isMatch) { + this.inRCDATA = false; + } else if (!isEnd) { + this.sequenceIndex++; + return; + } + this.sequenceIndex = 0; + this.state = 6; + this.stateInTagName(c); + } + /** Look for an end tag. For <title> and <textarea>, also decode entities. */ + stateInRCDATA(c) { + if (this.sequenceIndex === this.currentSequence.length) { + if (c === 62 || isWhitespace(c)) { + const endOfText = this.index - this.currentSequence.length; + if (this.sectionStart < endOfText) { + const actualIndex = this.index; + this.index = endOfText; + this.cbs.ontext(this.sectionStart, endOfText); + this.index = actualIndex; + } + this.sectionStart = endOfText + 2; + this.stateInClosingTagName(c); + this.inRCDATA = false; + return; + } + this.sequenceIndex = 0; + } + if ((c | 32) === this.currentSequence[this.sequenceIndex]) { + this.sequenceIndex += 1; + } else if (this.sequenceIndex === 0) { + if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { + if (c === 38) { + this.startEntity(); + } else if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } else if (this.fastForwardTo(60)) { + this.sequenceIndex = 1; + } + } else { + this.sequenceIndex = Number(c === 60); + } + } + stateCDATASequence(c) { + if (c === Sequences.Cdata[this.sequenceIndex]) { + if (++this.sequenceIndex === Sequences.Cdata.length) { + this.state = 28; + this.currentSequence = Sequences.CdataEnd; + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + } + } else { + this.sequenceIndex = 0; + this.state = 23; + this.stateInDeclaration(c); + } + } + /** + * When we wait for one specific character, we can speed things up + * by skipping through the buffer until we find it. + * + * @returns Whether the character was found. + */ + fastForwardTo(c) { + while (++this.index < this.buffer.length) { + const cc = this.buffer.charCodeAt(this.index); + if (cc === 10) { + this.newlines.push(this.index); + } + if (cc === c) { + return true; + } + } + this.index = this.buffer.length - 1; + return false; + } + /** + * Comments and CDATA end with `-->` and `]]>`. + * + * Their common qualities are: + * - Their end sequences have a distinct character they start with. + * - That character is then repeated, so we have to check multiple repeats. + * - All characters but the start character of the sequence can be skipped. + */ + stateInCommentLike(c) { + if (c === this.currentSequence[this.sequenceIndex]) { + if (++this.sequenceIndex === this.currentSequence.length) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, this.index - 2); + } else { + this.cbs.oncomment(this.sectionStart, this.index - 2); + } + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + this.state = 1; + } + } else if (this.sequenceIndex === 0) { + if (this.fastForwardTo(this.currentSequence[0])) { + this.sequenceIndex = 1; + } + } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { + this.sequenceIndex = 0; + } + } + startSpecial(sequence, offset) { + this.enterRCDATA(sequence, offset); + this.state = 31; + } + enterRCDATA(sequence, offset) { + this.inRCDATA = true; + this.currentSequence = sequence; + this.sequenceIndex = offset; + } + stateBeforeTagName(c) { + if (c === 33) { + this.state = 22; + this.sectionStart = this.index + 1; + } else if (c === 63) { + this.state = 24; + this.sectionStart = this.index + 1; + } else if (isTagStartChar(c)) { + this.sectionStart = this.index; + if (this.mode === 0) { + this.state = 6; + } else if (this.inSFCRoot) { + this.state = 34; + } else if (!this.inXML) { + if (c === 116) { + this.state = 30; + } else { + this.state = c === 115 ? 29 : 6; + } + } else { + this.state = 6; + } + } else if (c === 47) { + this.state = 8; + } else { + this.state = 1; + this.stateText(c); + } + } + stateInTagName(c) { + if (isEndOfTagSection(c)) { + this.handleTagName(c); + } + } + stateInSFCRootTagName(c) { + if (isEndOfTagSection(c)) { + const tag = this.buffer.slice(this.sectionStart, this.index); + if (tag !== "template") { + this.enterRCDATA(toCharCodes(`</` + tag), 0); + } + this.handleTagName(c); + } + } + handleTagName(c) { + this.cbs.onopentagname(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } + stateBeforeClosingTagName(c) { + if (isWhitespace(c)) ; else if (c === 62) { + { + this.cbs.onerr(14, this.index); + } + this.state = 1; + this.sectionStart = this.index + 1; + } else { + this.state = isTagStartChar(c) ? 9 : 27; + this.sectionStart = this.index; + } + } + stateInClosingTagName(c) { + if (c === 62 || isWhitespace(c)) { + this.cbs.onclosetag(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 10; + this.stateAfterClosingTagName(c); + } + } + stateAfterClosingTagName(c) { + if (c === 62) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeAttrName(c) { + if (c === 62) { + this.cbs.onopentagend(this.index); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else if (c === 47) { + this.state = 7; + if (this.peek() !== 62) { + this.cbs.onerr(22, this.index); + } + } else if (c === 60 && this.peek() === 47) { + this.cbs.onopentagend(this.index); + this.state = 5; + this.sectionStart = this.index; + } else if (!isWhitespace(c)) { + if (c === 61) { + this.cbs.onerr( + 19, + this.index + ); + } + this.handleAttrStart(c); + } + } + handleAttrStart(c) { + if (c === 118 && this.peek() === 45) { + this.state = 13; + this.sectionStart = this.index; + } else if (c === 46 || c === 58 || c === 64 || c === 35) { + this.cbs.ondirname(this.index, this.index + 1); + this.state = 14; + this.sectionStart = this.index + 1; + } else { + this.state = 12; + this.sectionStart = this.index; + } + } + stateInSelfClosingTag(c) { + if (c === 62) { + this.cbs.onselfclosingtag(this.index); + this.state = 1; + this.sectionStart = this.index + 1; + this.inRCDATA = false; + } else if (!isWhitespace(c)) { + this.state = 11; + this.stateBeforeAttrName(c); + } + } + stateInAttrName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.onattribname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 34 || c === 39 || c === 60) { + this.cbs.onerr( + 17, + this.index + ); + } + } + stateInDirName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 58) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 14; + this.sectionStart = this.index + 1; + } else if (c === 46) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDirArg(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 91) { + this.state = 15; + } else if (c === 46) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDynamicDirArg(c) { + if (c === 93) { + this.state = 14; + } else if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index + 1); + this.handleAttrNameEnd(c); + { + this.cbs.onerr( + 27, + this.index + ); + } + } + } + stateInDirModifier(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 46) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.sectionStart = this.index + 1; + } + } + handleAttrNameEnd(c) { + this.sectionStart = this.index; + this.state = 17; + this.cbs.onattribnameend(this.index); + this.stateAfterAttrName(c); + } + stateAfterAttrName(c) { + if (c === 61) { + this.state = 18; + } else if (c === 47 || c === 62) { + this.cbs.onattribend(0, this.sectionStart); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } else if (!isWhitespace(c)) { + this.cbs.onattribend(0, this.sectionStart); + this.handleAttrStart(c); + } + } + stateBeforeAttrValue(c) { + if (c === 34) { + this.state = 19; + this.sectionStart = this.index + 1; + } else if (c === 39) { + this.state = 20; + this.sectionStart = this.index + 1; + } else if (!isWhitespace(c)) { + this.sectionStart = this.index; + this.state = 21; + this.stateInAttrValueNoQuotes(c); + } + } + handleInAttrValue(c, quote) { + if (c === quote || false) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend( + quote === 34 ? 3 : 2, + this.index + 1 + ); + this.state = 11; + } else if (c === 38) { + this.startEntity(); + } + } + stateInAttrValueDoubleQuotes(c) { + this.handleInAttrValue(c, 34); + } + stateInAttrValueSingleQuotes(c) { + this.handleInAttrValue(c, 39); + } + stateInAttrValueNoQuotes(c) { + if (isWhitespace(c) || c === 62) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend(1, this.index); + this.state = 11; + this.stateBeforeAttrName(c); + } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { + this.cbs.onerr( + 18, + this.index + ); + } else if (c === 38) { + this.startEntity(); + } + } + stateBeforeDeclaration(c) { + if (c === 91) { + this.state = 26; + this.sequenceIndex = 0; + } else { + this.state = c === 45 ? 25 : 23; + } + } + stateInDeclaration(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateInProcessingInstruction(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.onprocessinginstruction(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeComment(c) { + if (c === 45) { + this.state = 28; + this.currentSequence = Sequences.CommentEnd; + this.sequenceIndex = 2; + this.sectionStart = this.index + 1; + } else { + this.state = 23; + } + } + stateInSpecialComment(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.oncomment(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeSpecialS(c) { + if (c === Sequences.ScriptEnd[3]) { + this.startSpecial(Sequences.ScriptEnd, 4); + } else if (c === Sequences.StyleEnd[3]) { + this.startSpecial(Sequences.StyleEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + stateBeforeSpecialT(c) { + if (c === Sequences.TitleEnd[3]) { + this.startSpecial(Sequences.TitleEnd, 4); + } else if (c === Sequences.TextareaEnd[3]) { + this.startSpecial(Sequences.TextareaEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + startEntity() { + { + this.baseState = this.state; + this.state = 33; + this.entityStart = this.index; + this.entityDecoder.startEntity( + this.baseState === 1 || this.baseState === 32 ? DecodingMode.Legacy : DecodingMode.Attribute + ); + } + } + stateInEntity() { + { + const length = this.entityDecoder.write(this.buffer, this.index); + if (length >= 0) { + this.state = this.baseState; + if (length === 0) { + this.index = this.entityStart; + } + } else { + this.index = this.buffer.length - 1; + } + } + } + /** + * Iterates through the buffer, calling the function corresponding to the current state. + * + * States that are more likely to be hit are higher up, as a performance improvement. + */ + parse(input) { + this.buffer = input; + while (this.index < this.buffer.length) { + const c = this.buffer.charCodeAt(this.index); + if (c === 10) { + this.newlines.push(this.index); + } + switch (this.state) { + case 1: { + this.stateText(c); + break; + } + case 2: { + this.stateInterpolationOpen(c); + break; + } + case 3: { + this.stateInterpolation(c); + break; + } + case 4: { + this.stateInterpolationClose(c); + break; + } + case 31: { + this.stateSpecialStartSequence(c); + break; + } + case 32: { + this.stateInRCDATA(c); + break; + } + case 26: { + this.stateCDATASequence(c); + break; + } + case 19: { + this.stateInAttrValueDoubleQuotes(c); + break; + } + case 12: { + this.stateInAttrName(c); + break; + } + case 13: { + this.stateInDirName(c); + break; + } + case 14: { + this.stateInDirArg(c); + break; + } + case 15: { + this.stateInDynamicDirArg(c); + break; + } + case 16: { + this.stateInDirModifier(c); + break; + } + case 28: { + this.stateInCommentLike(c); + break; + } + case 27: { + this.stateInSpecialComment(c); + break; + } + case 11: { + this.stateBeforeAttrName(c); + break; + } + case 6: { + this.stateInTagName(c); + break; + } + case 34: { + this.stateInSFCRootTagName(c); + break; + } + case 9: { + this.stateInClosingTagName(c); + break; + } + case 5: { + this.stateBeforeTagName(c); + break; + } + case 17: { + this.stateAfterAttrName(c); + break; + } + case 20: { + this.stateInAttrValueSingleQuotes(c); + break; + } + case 18: { + this.stateBeforeAttrValue(c); + break; + } + case 8: { + this.stateBeforeClosingTagName(c); + break; + } + case 10: { + this.stateAfterClosingTagName(c); + break; + } + case 29: { + this.stateBeforeSpecialS(c); + break; + } + case 30: { + this.stateBeforeSpecialT(c); + break; + } + case 21: { + this.stateInAttrValueNoQuotes(c); + break; + } + case 7: { + this.stateInSelfClosingTag(c); + break; + } + case 23: { + this.stateInDeclaration(c); + break; + } + case 22: { + this.stateBeforeDeclaration(c); + break; + } + case 25: { + this.stateBeforeComment(c); + break; + } + case 24: { + this.stateInProcessingInstruction(c); + break; + } + case 33: { + this.stateInEntity(); + break; + } + } + this.index++; + } + this.cleanup(); + this.finish(); + } + /** + * Remove data that has already been consumed from the buffer. + */ + cleanup() { + if (this.sectionStart !== this.index) { + if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { + this.cbs.ontext(this.sectionStart, this.index); + this.sectionStart = this.index; + } else if (this.state === 19 || this.state === 20 || this.state === 21) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = this.index; + } + } + } + finish() { + if (this.state === 33) { + this.entityDecoder.end(); + this.state = this.baseState; + } + this.handleTrailingData(); + this.cbs.onend(); + } + /** Handle any trailing data. */ + handleTrailingData() { + const endIndex = this.buffer.length; + if (this.sectionStart >= endIndex) { + return; + } + if (this.state === 28) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, endIndex); + } else { + this.cbs.oncomment(this.sectionStart, endIndex); + } + } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { + this.cbs.ontext(this.sectionStart, endIndex); + } + } + emitCodePoint(cp, consumed) { + { + if (this.baseState !== 1 && this.baseState !== 32) { + if (this.sectionStart < this.entityStart) { + this.cbs.onattribdata(this.sectionStart, this.entityStart); + } + this.sectionStart = this.entityStart + consumed; + this.index = this.sectionStart - 1; + this.cbs.onattribentity( + fromCodePoint(cp), + this.entityStart, + this.sectionStart + ); + } else { + if (this.sectionStart < this.entityStart) { + this.cbs.ontext(this.sectionStart, this.entityStart); + } + this.sectionStart = this.entityStart + consumed; + this.index = this.sectionStart - 1; + this.cbs.ontextentity( + fromCodePoint(cp), + this.entityStart, + this.sectionStart + ); + } + } + } +} + +const CompilerDeprecationTypes = { + "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT", + "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC", + "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER", + "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE", + "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE", + "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE", + "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE", + "COMPILER_FILTERS": "COMPILER_FILTERS" +}; +const deprecationData = { + ["COMPILER_IS_ON_ELEMENT"]: { + message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`, + link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` + }, + ["COMPILER_V_BIND_SYNC"]: { + message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` + }, + ["COMPILER_V_BIND_OBJECT_ORDER"]: { + message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` + }, + ["COMPILER_V_ON_NATIVE"]: { + message: `.native modifier for v-on has been removed as is no longer necessary.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` + }, + ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: { + message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` + }, + ["COMPILER_NATIVE_TEMPLATE"]: { + message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.` + }, + ["COMPILER_INLINE_TEMPLATE"]: { + message: `"inline-template" has been removed in Vue 3.`, + link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` + }, + ["COMPILER_FILTERS"]: { + message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`, + link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` + } +}; +function getCompatValue(key, { compatConfig }) { + const value = compatConfig && compatConfig[key]; + if (key === "MODE") { + return value || 3; + } else { + return value; + } +} +function isCompatEnabled(key, context) { + const mode = getCompatValue("MODE", context); + const value = getCompatValue(key, context); + return mode === 3 ? value === true : value !== false; +} +function checkCompatEnabled(key, context, loc, ...args) { + const enabled = isCompatEnabled(key, context); + if (enabled) { + warnDeprecation(key, context, loc, ...args); + } + return enabled; +} +function warnDeprecation(key, context, loc, ...args) { + const val = getCompatValue(key, context); + if (val === "suppress-warning") { + return; + } + const { message, link } = deprecationData[key]; + const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? ` + Details: ${link}` : ``}`; + const err = new SyntaxError(msg); + err.code = key; + if (loc) err.loc = loc; + context.onWarn(err); +} + +function defaultOnError(error) { + throw error; +} +function defaultOnWarn(msg) { + console.warn(`[Vue warn] ${msg.message}`); +} +function createCompilerError(code, loc, messages, additionalMessage) { + const msg = (messages || errorMessages$1)[code] + (additionalMessage || ``) ; + const error = new SyntaxError(String(msg)); + error.code = code; + error.loc = loc; + return error; +} +const ErrorCodes = { + "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0, + "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT", + "CDATA_IN_HTML_CONTENT": 1, + "1": "CDATA_IN_HTML_CONTENT", + "DUPLICATE_ATTRIBUTE": 2, + "2": "DUPLICATE_ATTRIBUTE", + "END_TAG_WITH_ATTRIBUTES": 3, + "3": "END_TAG_WITH_ATTRIBUTES", + "END_TAG_WITH_TRAILING_SOLIDUS": 4, + "4": "END_TAG_WITH_TRAILING_SOLIDUS", + "EOF_BEFORE_TAG_NAME": 5, + "5": "EOF_BEFORE_TAG_NAME", + "EOF_IN_CDATA": 6, + "6": "EOF_IN_CDATA", + "EOF_IN_COMMENT": 7, + "7": "EOF_IN_COMMENT", + "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8, + "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT", + "EOF_IN_TAG": 9, + "9": "EOF_IN_TAG", + "INCORRECTLY_CLOSED_COMMENT": 10, + "10": "INCORRECTLY_CLOSED_COMMENT", + "INCORRECTLY_OPENED_COMMENT": 11, + "11": "INCORRECTLY_OPENED_COMMENT", + "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12, + "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME", + "MISSING_ATTRIBUTE_VALUE": 13, + "13": "MISSING_ATTRIBUTE_VALUE", + "MISSING_END_TAG_NAME": 14, + "14": "MISSING_END_TAG_NAME", + "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15, + "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES", + "NESTED_COMMENT": 16, + "16": "NESTED_COMMENT", + "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17, + "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME", + "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18, + "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE", + "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19, + "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME", + "UNEXPECTED_NULL_CHARACTER": 20, + "20": "UNEXPECTED_NULL_CHARACTER", + "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21, + "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME", + "UNEXPECTED_SOLIDUS_IN_TAG": 22, + "22": "UNEXPECTED_SOLIDUS_IN_TAG", + "X_INVALID_END_TAG": 23, + "23": "X_INVALID_END_TAG", + "X_MISSING_END_TAG": 24, + "24": "X_MISSING_END_TAG", + "X_MISSING_INTERPOLATION_END": 25, + "25": "X_MISSING_INTERPOLATION_END", + "X_MISSING_DIRECTIVE_NAME": 26, + "26": "X_MISSING_DIRECTIVE_NAME", + "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27, + "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END", + "X_V_IF_NO_EXPRESSION": 28, + "28": "X_V_IF_NO_EXPRESSION", + "X_V_IF_SAME_KEY": 29, + "29": "X_V_IF_SAME_KEY", + "X_V_ELSE_NO_ADJACENT_IF": 30, + "30": "X_V_ELSE_NO_ADJACENT_IF", + "X_V_FOR_NO_EXPRESSION": 31, + "31": "X_V_FOR_NO_EXPRESSION", + "X_V_FOR_MALFORMED_EXPRESSION": 32, + "32": "X_V_FOR_MALFORMED_EXPRESSION", + "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33, + "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT", + "X_V_BIND_NO_EXPRESSION": 34, + "34": "X_V_BIND_NO_EXPRESSION", + "X_V_ON_NO_EXPRESSION": 35, + "35": "X_V_ON_NO_EXPRESSION", + "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36, + "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET", + "X_V_SLOT_MIXED_SLOT_USAGE": 37, + "37": "X_V_SLOT_MIXED_SLOT_USAGE", + "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38, + "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES", + "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39, + "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN", + "X_V_SLOT_MISPLACED": 40, + "40": "X_V_SLOT_MISPLACED", + "X_V_MODEL_NO_EXPRESSION": 41, + "41": "X_V_MODEL_NO_EXPRESSION", + "X_V_MODEL_MALFORMED_EXPRESSION": 42, + "42": "X_V_MODEL_MALFORMED_EXPRESSION", + "X_V_MODEL_ON_SCOPE_VARIABLE": 43, + "43": "X_V_MODEL_ON_SCOPE_VARIABLE", + "X_V_MODEL_ON_PROPS": 44, + "44": "X_V_MODEL_ON_PROPS", + "X_INVALID_EXPRESSION": 45, + "45": "X_INVALID_EXPRESSION", + "X_KEEP_ALIVE_INVALID_CHILDREN": 46, + "46": "X_KEEP_ALIVE_INVALID_CHILDREN", + "X_PREFIX_ID_NOT_SUPPORTED": 47, + "47": "X_PREFIX_ID_NOT_SUPPORTED", + "X_MODULE_MODE_NOT_SUPPORTED": 48, + "48": "X_MODULE_MODE_NOT_SUPPORTED", + "X_CACHE_HANDLER_NOT_SUPPORTED": 49, + "49": "X_CACHE_HANDLER_NOT_SUPPORTED", + "X_SCOPE_ID_NOT_SUPPORTED": 50, + "50": "X_SCOPE_ID_NOT_SUPPORTED", + "X_VNODE_HOOKS": 51, + "51": "X_VNODE_HOOKS", + "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52, + "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT", + "__EXTEND_POINT__": 53, + "53": "__EXTEND_POINT__" +}; +const errorMessages$1 = { + // parse errors + [0]: "Illegal comment.", + [1]: "CDATA section is allowed only in XML context.", + [2]: "Duplicate attribute.", + [3]: "End tag cannot have attributes.", + [4]: "Illegal '/' in tags.", + [5]: "Unexpected EOF in tag.", + [6]: "Unexpected EOF in CDATA section.", + [7]: "Unexpected EOF in comment.", + [8]: "Unexpected EOF in script.", + [9]: "Unexpected EOF in tag.", + [10]: "Incorrectly closed comment.", + [11]: "Incorrectly opened comment.", + [12]: "Illegal tag name. Use '<' to print '<'.", + [13]: "Attribute value was expected.", + [14]: "End tag name was expected.", + [15]: "Whitespace was expected.", + [16]: "Unexpected '<!--' in comment.", + [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, + [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", + [19]: "Attribute name cannot start with '='.", + [21]: "'<?' is allowed only in XML context.", + [20]: `Unexpected null character.`, + [22]: "Illegal '/' in tags.", + // Vue-specific parse errors + [23]: "Invalid end tag.", + [24]: "Element is missing end tag.", + [25]: "Interpolation end sign was not found.", + [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", + [26]: "Legal directive name was expected.", + // transform errors + [28]: `v-if/v-else-if is missing expression.`, + [29]: `v-if/else branches must use unique keys.`, + [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, + [31]: `v-for is missing expression.`, + [32]: `v-for has invalid expression.`, + [33]: `<template v-for> key should be placed on the <template> tag.`, + [34]: `v-bind is missing expression.`, + [52]: `v-bind with same-name shorthand only allows static argument.`, + [35]: `v-on is missing expression.`, + [36]: `Unexpected custom directive on <slot> outlet.`, + [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, + [38]: `Duplicate slot names found. `, + [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, + [40]: `v-slot can only be used on components or <template> tags.`, + [41]: `v-model is missing expression.`, + [42]: `v-model value must be a valid JavaScript member expression.`, + [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, + [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. +Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, + [45]: `Error parsing JavaScript expression: `, + [46]: `<KeepAlive> expects exactly one child component.`, + [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, + // generic errors + [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, + [48]: `ES module mode is not supported in this build of compiler.`, + [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, + [50]: `"scopeId" option is only supported in module mode.`, + // just to fulfill types + [53]: `` +}; + +function getDefaultExportFromCjs (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +function getAugmentedNamespace(n) { + if (n.__esModule) return n; + var f = n.default; + if (typeof f == "function") { + var a = function a () { + if (this instanceof a) { + return Reflect.construct(f, arguments, this.constructor); + } + return f.apply(this, arguments); + }; + a.prototype = f.prototype; + } else a = {}; + Object.defineProperty(a, '__esModule', {value: true}); + Object.keys(n).forEach(function (k) { + var d = Object.getOwnPropertyDescriptor(n, k); + Object.defineProperty(a, k, d.get ? d : { + enumerable: true, + get: function () { + return n[k]; + } + }); + }); + return a; +} + +var lib = {}; + +var hasRequiredLib; + +function requireLib () { + if (hasRequiredLib) return lib; + hasRequiredLib = 1; + + Object.defineProperty(lib, '__esModule', { + value: true + }); + function _objectWithoutPropertiesLoose(r, e) { + if (null == r) return {}; + var t = {}; + for (var n in r) if ({}.hasOwnProperty.call(r, n)) { + if (e.includes(n)) continue; + t[n] = r[n]; + } + return t; + } + class Position { + constructor(line, col, index) { + this.line = void 0; + this.column = void 0; + this.index = void 0; + this.line = line; + this.column = col; + this.index = index; + } + } + class SourceLocation { + constructor(start, end) { + this.start = void 0; + this.end = void 0; + this.filename = void 0; + this.identifierName = void 0; + this.start = start; + this.end = end; + } + } + function createPositionWithColumnOffset(position, columnOffset) { + const { + line, + column, + index + } = position; + return new Position(line, column + columnOffset, index + columnOffset); + } + const code = "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"; + var ModuleErrors = { + ImportMetaOutsideModule: { + message: `import.meta may appear only with 'sourceType: "module"'`, + code + }, + ImportOutsideModule: { + message: `'import' and 'export' may appear only with 'sourceType: "module"'`, + code + } + }; + const NodeDescriptions = { + ArrayPattern: "array destructuring pattern", + AssignmentExpression: "assignment expression", + AssignmentPattern: "assignment expression", + ArrowFunctionExpression: "arrow function expression", + ConditionalExpression: "conditional expression", + CatchClause: "catch clause", + ForOfStatement: "for-of statement", + ForInStatement: "for-in statement", + ForStatement: "for-loop", + FormalParameters: "function parameter list", + Identifier: "identifier", + ImportSpecifier: "import specifier", + ImportDefaultSpecifier: "import default specifier", + ImportNamespaceSpecifier: "import namespace specifier", + ObjectPattern: "object destructuring pattern", + ParenthesizedExpression: "parenthesized expression", + RestElement: "rest element", + UpdateExpression: { + true: "prefix operation", + false: "postfix operation" + }, + VariableDeclarator: "variable declaration", + YieldExpression: "yield expression" + }; + const toNodeDescription = node => node.type === "UpdateExpression" ? NodeDescriptions.UpdateExpression[`${node.prefix}`] : NodeDescriptions[node.type]; + var StandardErrors = { + AccessorIsGenerator: ({ + kind + }) => `A ${kind}ter cannot be a generator.`, + ArgumentsInClass: "'arguments' is only allowed in functions and class methods.", + AsyncFunctionInSingleStatementContext: "Async functions can only be declared at the top level or inside a block.", + AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function.", + AwaitBindingIdentifierInStaticBlock: "Can not use 'await' as identifier inside a static block.", + AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.", + AwaitUsingNotInAsyncContext: "'await using' is only allowed within async functions and at the top levels of modules.", + AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.", + AwaitNotInAsyncFunction: "'await' is only allowed within async functions.", + BadGetterArity: "A 'get' accessor must not have any formal parameters.", + BadSetterArity: "A 'set' accessor must have exactly one formal parameter.", + BadSetterRestParameter: "A 'set' accessor function argument must not be a rest parameter.", + ConstructorClassField: "Classes may not have a field named 'constructor'.", + ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.", + ConstructorIsAccessor: "Class constructor may not be an accessor.", + ConstructorIsAsync: "Constructor can't be an async function.", + ConstructorIsGenerator: "Constructor can't be a generator.", + DeclarationMissingInitializer: ({ + kind + }) => `Missing initializer in ${kind} declaration.`, + DecoratorArgumentsOutsideParentheses: "Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.", + DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.", + DecoratorsBeforeAfterExport: "Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.", + DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?", + DecoratorExportClass: "Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.", + DecoratorSemicolon: "Decorators must not be followed by a semicolon.", + DecoratorStaticBlock: "Decorators can't be used with a static block.", + DeferImportRequiresNamespace: 'Only `import defer * as x from "./module"` is valid.', + DeletePrivateField: "Deleting a private field is not allowed.", + DestructureNamedImport: "ES2015 named imports do not destructure. Use another statement for destructuring after the import.", + DuplicateConstructor: "Duplicate constructor in the same class.", + DuplicateDefaultExport: "Only one default export allowed per module.", + DuplicateExport: ({ + exportName + }) => `\`${exportName}\` has already been exported. Exported identifiers must be unique.`, + DuplicateProto: "Redefinition of __proto__ property.", + DuplicateRegExpFlags: "Duplicate regular expression flag.", + DynamicImportPhaseRequiresImportExpressions: ({ + phase + }) => `'import.${phase}(...)' can only be parsed when using the 'createImportExpressions' option.`, + ElementAfterRest: "Rest element must be last element.", + EscapedCharNotAnIdentifier: "Invalid Unicode escape.", + ExportBindingIsString: ({ + localName, + exportName + }) => `A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${localName}' as '${exportName}' } from 'some-module'\`?`, + ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.", + ForInOfLoopInitializer: ({ + type + }) => `'${type === "ForInStatement" ? "for-in" : "for-of"}' loop variable declaration may not have an initializer.`, + ForInUsing: "For-in loop may not start with 'using' declaration.", + ForOfAsync: "The left-hand side of a for-of loop may not be 'async'.", + ForOfLet: "The left-hand side of a for-of loop may not start with 'let'.", + GeneratorInSingleStatementContext: "Generators can only be declared at the top level or inside a block.", + IllegalBreakContinue: ({ + type + }) => `Unsyntactic ${type === "BreakStatement" ? "break" : "continue"}.`, + IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.", + IllegalReturn: "'return' outside of function.", + ImportAttributesUseAssert: "The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.", + ImportBindingIsString: ({ + importName + }) => `A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${importName}" as foo }\`?`, + ImportCallArgumentTrailingComma: "Trailing comma is disallowed inside import(...) arguments.", + ImportCallArity: ({ + maxArgumentCount + }) => `\`import()\` requires exactly ${maxArgumentCount === 1 ? "one argument" : "one or two arguments"}.`, + ImportCallNotNewExpression: "Cannot use new with import(...).", + ImportCallSpreadArgument: "`...` is not allowed in `import()`.", + ImportJSONBindingNotDefault: "A JSON module can only be imported with `default`.", + ImportReflectionHasAssertion: "`import module x` cannot have assertions.", + ImportReflectionNotBinding: 'Only `import module x from "./module"` is valid.', + IncompatibleRegExpUVFlags: "The 'u' and 'v' regular expression flags cannot be enabled at the same time.", + InvalidBigIntLiteral: "Invalid BigIntLiteral.", + InvalidCodePoint: "Code point out of bounds.", + InvalidCoverInitializedName: "Invalid shorthand property initializer.", + InvalidDecimal: "Invalid decimal.", + InvalidDigit: ({ + radix + }) => `Expected number in radix ${radix}.`, + InvalidEscapeSequence: "Bad character escape sequence.", + InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.", + InvalidEscapedReservedWord: ({ + reservedWord + }) => `Escape sequence in keyword ${reservedWord}.`, + InvalidIdentifier: ({ + identifierName + }) => `Invalid identifier ${identifierName}.`, + InvalidLhs: ({ + ancestor + }) => `Invalid left-hand side in ${toNodeDescription(ancestor)}.`, + InvalidLhsBinding: ({ + ancestor + }) => `Binding invalid left-hand side in ${toNodeDescription(ancestor)}.`, + InvalidLhsOptionalChaining: ({ + ancestor + }) => `Invalid optional chaining in the left-hand side of ${toNodeDescription(ancestor)}.`, + InvalidNumber: "Invalid number.", + InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.", + InvalidOrUnexpectedToken: ({ + unexpected + }) => `Unexpected character '${unexpected}'.`, + InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.", + InvalidPrivateFieldResolution: ({ + identifierName + }) => `Private name #${identifierName} is not defined.`, + InvalidPropertyBindingPattern: "Binding member expression.", + InvalidRecordProperty: "Only properties and spread elements are allowed in record definitions.", + InvalidRestAssignmentPattern: "Invalid rest operator's argument.", + LabelRedeclaration: ({ + labelName + }) => `Label '${labelName}' is already declared.`, + LetInLexicalBinding: "'let' is disallowed as a lexically bound name.", + LineTerminatorBeforeArrow: "No line break is allowed before '=>'.", + MalformedRegExpFlags: "Invalid regular expression flag.", + MissingClassName: "A class name is required.", + MissingEqInAssignment: "Only '=' operator can be used for specifying default value.", + MissingSemicolon: "Missing semicolon.", + MissingPlugin: ({ + missingPlugin + }) => `This experimental syntax requires enabling the parser plugin: ${missingPlugin.map(name => JSON.stringify(name)).join(", ")}.`, + MissingOneOfPlugins: ({ + missingPlugin + }) => `This experimental syntax requires enabling one of the following parser plugin(s): ${missingPlugin.map(name => JSON.stringify(name)).join(", ")}.`, + MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX.", + MixingCoalesceWithLogical: "Nullish coalescing operator(??) requires parens when mixing with logical operators.", + ModuleAttributeDifferentFromType: "The only accepted module attribute is `type`.", + ModuleAttributeInvalidValue: "Only string literals are allowed as module attribute values.", + ModuleAttributesWithDuplicateKeys: ({ + key + }) => `Duplicate key "${key}" is not allowed in module attributes.`, + ModuleExportNameHasLoneSurrogate: ({ + surrogateCharCode + }) => `An export name cannot include a lone surrogate, found '\\u${surrogateCharCode.toString(16)}'.`, + ModuleExportUndefined: ({ + localName + }) => `Export '${localName}' is not defined.`, + MultipleDefaultsInSwitch: "Multiple default clauses.", + NewlineAfterThrow: "Illegal newline after throw.", + NoCatchOrFinally: "Missing catch or finally clause.", + NumberIdentifier: "Identifier directly after number.", + NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.", + ObsoleteAwaitStar: "'await*' has been removed from the async functions proposal. Use Promise.all() instead.", + OptionalChainingNoNew: "Constructors in/after an Optional Chain are not allowed.", + OptionalChainingNoTemplate: "Tagged Template Literals are not allowed in optionalChain.", + OverrideOnConstructor: "'override' modifier cannot appear on a constructor declaration.", + ParamDupe: "Argument name clash.", + PatternHasAccessor: "Object pattern can't contain getter or setter.", + PatternHasMethod: "Object pattern can't contain methods.", + PrivateInExpectedIn: ({ + identifierName + }) => `Private names are only allowed in property accesses (\`obj.#${identifierName}\`) or in \`in\` expressions (\`#${identifierName} in obj\`).`, + PrivateNameRedeclaration: ({ + identifierName + }) => `Duplicate private name #${identifierName}.`, + RecordExpressionBarIncorrectEndSyntaxType: "Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + RecordExpressionBarIncorrectStartSyntaxType: "Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + RecordExpressionHashIncorrectStartSyntaxType: "Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.", + RecordNoProto: "'__proto__' is not allowed in Record expressions.", + RestTrailingComma: "Unexpected trailing comma after rest element.", + SloppyFunction: "In non-strict mode code, functions can only be declared at top level or inside a block.", + SloppyFunctionAnnexB: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.", + SourcePhaseImportRequiresDefault: 'Only `import source x from "./module"` is valid.', + StaticPrototype: "Classes may not have static property named prototype.", + SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?", + SuperPrivateField: "Private fields can't be accessed on super.", + TrailingDecorator: "Decorators must be attached to a class element.", + TupleExpressionBarIncorrectEndSyntaxType: "Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + TupleExpressionBarIncorrectStartSyntaxType: "Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + TupleExpressionHashIncorrectStartSyntaxType: "Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.", + UnexpectedArgumentPlaceholder: "Unexpected argument placeholder.", + UnexpectedAwaitAfterPipelineBody: 'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.', + UnexpectedDigitAfterHash: "Unexpected digit after hash token.", + UnexpectedImportExport: "'import' and 'export' may only appear at the top level.", + UnexpectedKeyword: ({ + keyword + }) => `Unexpected keyword '${keyword}'.`, + UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration.", + UnexpectedLexicalDeclaration: "Lexical declaration cannot appear in a single-statement context.", + UnexpectedNewTarget: "`new.target` can only be used in functions or class properties.", + UnexpectedNumericSeparator: "A numeric separator is only allowed between two digits.", + UnexpectedPrivateField: "Unexpected private name.", + UnexpectedReservedWord: ({ + reservedWord + }) => `Unexpected reserved word '${reservedWord}'.`, + UnexpectedSuper: "'super' is only allowed in object methods and classes.", + UnexpectedToken: ({ + expected, + unexpected + }) => `Unexpected token${unexpected ? ` '${unexpected}'.` : ""}${expected ? `, expected "${expected}"` : ""}`, + UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.", + UnexpectedUsingDeclaration: "Using declaration cannot appear in the top level when source type is `script`.", + UnsupportedBind: "Binding should be performed on object property.", + UnsupportedDecoratorExport: "A decorated export must export a class declaration.", + UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.", + UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.", + UnsupportedMetaProperty: ({ + target, + onlyValidPropertyName + }) => `The only valid meta property for ${target} is ${target}.${onlyValidPropertyName}.`, + UnsupportedParameterDecorator: "Decorators cannot be used to decorate parameters.", + UnsupportedPropertyDecorator: "Decorators cannot be used to decorate object literal properties.", + UnsupportedSuper: "'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).", + UnterminatedComment: "Unterminated comment.", + UnterminatedRegExp: "Unterminated regular expression.", + UnterminatedString: "Unterminated string constant.", + UnterminatedTemplate: "Unterminated template.", + UsingDeclarationExport: "Using declaration cannot be exported.", + UsingDeclarationHasBindingPattern: "Using declaration cannot have destructuring patterns.", + VarRedeclaration: ({ + identifierName + }) => `Identifier '${identifierName}' has already been declared.`, + YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator.", + YieldInParameter: "Yield expression is not allowed in formal parameters.", + ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0." + }; + var StrictModeErrors = { + StrictDelete: "Deleting local variable in strict mode.", + StrictEvalArguments: ({ + referenceName + }) => `Assigning to '${referenceName}' in strict mode.`, + StrictEvalArgumentsBinding: ({ + bindingName + }) => `Binding '${bindingName}' in strict mode.`, + StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block.", + StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'.", + StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.", + StrictWith: "'with' in strict mode." + }; + const UnparenthesizedPipeBodyDescriptions = new Set(["ArrowFunctionExpression", "AssignmentExpression", "ConditionalExpression", "YieldExpression"]); + var PipelineOperatorErrors = { + PipeBodyIsTighter: "Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.", + PipeTopicRequiresHackPipes: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.', + PipeTopicUnbound: "Topic reference is unbound; it must be inside a pipe body.", + PipeTopicUnconfiguredToken: ({ + token + }) => `Invalid topic token ${token}. In order to use ${token} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${token}" }.`, + PipeTopicUnused: "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.", + PipeUnparenthesizedBody: ({ + type + }) => `Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({ + type + })}; please wrap it in parentheses.`, + PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.', + PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression.", + PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression.", + PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference.", + PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.", + PrimaryTopicRequiresSmartPipeline: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.' + }; + const _excluded = ["message"]; + function defineHidden(obj, key, value) { + Object.defineProperty(obj, key, { + enumerable: false, + configurable: true, + value + }); + } + function toParseErrorConstructor({ + toMessage, + code, + reasonCode, + syntaxPlugin + }) { + const hasMissingPlugin = reasonCode === "MissingPlugin" || reasonCode === "MissingOneOfPlugins"; + return function constructor(loc, details) { + const error = new SyntaxError(); + error.code = code; + error.reasonCode = reasonCode; + error.loc = loc; + error.pos = loc.index; + error.syntaxPlugin = syntaxPlugin; + if (hasMissingPlugin) { + error.missingPlugin = details.missingPlugin; + } + defineHidden(error, "clone", function clone(overrides = {}) { + var _overrides$loc; + const { + line, + column, + index + } = (_overrides$loc = overrides.loc) != null ? _overrides$loc : loc; + return constructor(new Position(line, column, index), Object.assign({}, details, overrides.details)); + }); + defineHidden(error, "details", details); + Object.defineProperty(error, "message", { + configurable: true, + get() { + const message = `${toMessage(details)} (${loc.line}:${loc.column})`; + this.message = message; + return message; + }, + set(value) { + Object.defineProperty(this, "message", { + value, + writable: true + }); + } + }); + return error; + }; + } + function ParseErrorEnum(argument, syntaxPlugin) { + if (Array.isArray(argument)) { + return parseErrorTemplates => ParseErrorEnum(parseErrorTemplates, argument[0]); + } + const ParseErrorConstructors = {}; + for (const reasonCode of Object.keys(argument)) { + const template = argument[reasonCode]; + const _ref = typeof template === "string" ? { + message: () => template + } : typeof template === "function" ? { + message: template + } : template, + { + message + } = _ref, + rest = _objectWithoutPropertiesLoose(_ref, _excluded); + const toMessage = typeof message === "string" ? () => message : message; + ParseErrorConstructors[reasonCode] = toParseErrorConstructor(Object.assign({ + code: "BABEL_PARSER_SYNTAX_ERROR", + reasonCode, + toMessage + }, syntaxPlugin ? { + syntaxPlugin + } : {}, rest)); + } + return ParseErrorConstructors; + } + const Errors = Object.assign({}, ParseErrorEnum(ModuleErrors), ParseErrorEnum(StandardErrors), ParseErrorEnum(StrictModeErrors), ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors)); + const { + defineProperty + } = Object; + const toUnenumerable = (object, key) => { + if (object) { + defineProperty(object, key, { + enumerable: false, + value: object[key] + }); + } + }; + function toESTreeLocation(node) { + toUnenumerable(node.loc.start, "index"); + toUnenumerable(node.loc.end, "index"); + return node; + } + var estree = superClass => class ESTreeParserMixin extends superClass { + parse() { + const file = toESTreeLocation(super.parse()); + if (this.options.tokens) { + file.tokens = file.tokens.map(toESTreeLocation); + } + return file; + } + parseRegExpLiteral({ + pattern, + flags + }) { + let regex = null; + try { + regex = new RegExp(pattern, flags); + } catch (_) {} + const node = this.estreeParseLiteral(regex); + node.regex = { + pattern, + flags + }; + return node; + } + parseBigIntLiteral(value) { + let bigInt; + try { + bigInt = BigInt(value); + } catch (_unused) { + bigInt = null; + } + const node = this.estreeParseLiteral(bigInt); + node.bigint = String(node.value || value); + return node; + } + parseDecimalLiteral(value) { + const decimal = null; + const node = this.estreeParseLiteral(decimal); + node.decimal = String(node.value || value); + return node; + } + estreeParseLiteral(value) { + return this.parseLiteral(value, "Literal"); + } + parseStringLiteral(value) { + return this.estreeParseLiteral(value); + } + parseNumericLiteral(value) { + return this.estreeParseLiteral(value); + } + parseNullLiteral() { + return this.estreeParseLiteral(null); + } + parseBooleanLiteral(value) { + return this.estreeParseLiteral(value); + } + directiveToStmt(directive) { + const expression = directive.value; + delete directive.value; + expression.type = "Literal"; + expression.raw = expression.extra.raw; + expression.value = expression.extra.expressionValue; + const stmt = directive; + stmt.type = "ExpressionStatement"; + stmt.expression = expression; + stmt.directive = expression.extra.rawValue; + delete expression.extra; + return stmt; + } + initFunction(node, isAsync) { + super.initFunction(node, isAsync); + node.expression = false; + } + checkDeclaration(node) { + if (node != null && this.isObjectProperty(node)) { + this.checkDeclaration(node.value); + } else { + super.checkDeclaration(node); + } + } + getObjectOrClassMethodParams(method) { + return method.value.params; + } + isValidDirective(stmt) { + var _stmt$expression$extr; + return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && !((_stmt$expression$extr = stmt.expression.extra) != null && _stmt$expression$extr.parenthesized); + } + parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) { + super.parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse); + const directiveStatements = node.directives.map(d => this.directiveToStmt(d)); + node.body = directiveStatements.concat(node.body); + delete node.directives; + } + pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { + this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true); + if (method.typeParameters) { + method.value.typeParameters = method.typeParameters; + delete method.typeParameters; + } + classBody.body.push(method); + } + parsePrivateName() { + const node = super.parsePrivateName(); + { + if (!this.getPluginOption("estree", "classFeatures")) { + return node; + } + } + return this.convertPrivateNameToPrivateIdentifier(node); + } + convertPrivateNameToPrivateIdentifier(node) { + const name = super.getPrivateNameSV(node); + node = node; + delete node.id; + node.name = name; + node.type = "PrivateIdentifier"; + return node; + } + isPrivateName(node) { + { + if (!this.getPluginOption("estree", "classFeatures")) { + return super.isPrivateName(node); + } + } + return node.type === "PrivateIdentifier"; + } + getPrivateNameSV(node) { + { + if (!this.getPluginOption("estree", "classFeatures")) { + return super.getPrivateNameSV(node); + } + } + return node.name; + } + parseLiteral(value, type) { + const node = super.parseLiteral(value, type); + node.raw = node.extra.raw; + delete node.extra; + return node; + } + parseFunctionBody(node, allowExpression, isMethod = false) { + super.parseFunctionBody(node, allowExpression, isMethod); + node.expression = node.body.type !== "BlockStatement"; + } + parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { + let funcNode = this.startNode(); + funcNode.kind = node.kind; + funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope); + funcNode.type = "FunctionExpression"; + delete funcNode.kind; + node.value = funcNode; + if (type === "ClassPrivateMethod") { + node.computed = false; + } + return this.finishNode(node, "MethodDefinition"); + } + nameIsConstructor(key) { + if (key.type === "Literal") return key.value === "constructor"; + return super.nameIsConstructor(key); + } + parseClassProperty(...args) { + const propertyNode = super.parseClassProperty(...args); + { + if (!this.getPluginOption("estree", "classFeatures")) { + return propertyNode; + } + } + propertyNode.type = "PropertyDefinition"; + return propertyNode; + } + parseClassPrivateProperty(...args) { + const propertyNode = super.parseClassPrivateProperty(...args); + { + if (!this.getPluginOption("estree", "classFeatures")) { + return propertyNode; + } + } + propertyNode.type = "PropertyDefinition"; + propertyNode.computed = false; + return propertyNode; + } + parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) { + const node = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor); + if (node) { + node.type = "Property"; + if (node.kind === "method") { + node.kind = "init"; + } + node.shorthand = false; + } + return node; + } + parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors) { + const node = super.parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors); + if (node) { + node.kind = "init"; + node.type = "Property"; + } + return node; + } + isValidLVal(type, isUnparenthesizedInAssign, binding) { + return type === "Property" ? "value" : super.isValidLVal(type, isUnparenthesizedInAssign, binding); + } + isAssignable(node, isBinding) { + if (node != null && this.isObjectProperty(node)) { + return this.isAssignable(node.value, isBinding); + } + return super.isAssignable(node, isBinding); + } + toAssignable(node, isLHS = false) { + if (node != null && this.isObjectProperty(node)) { + const { + key, + value + } = node; + if (this.isPrivateName(key)) { + this.classScope.usePrivateName(this.getPrivateNameSV(key), key.loc.start); + } + this.toAssignable(value, isLHS); + } else { + super.toAssignable(node, isLHS); + } + } + toAssignableObjectExpressionProp(prop, isLast, isLHS) { + if (prop.type === "Property" && (prop.kind === "get" || prop.kind === "set")) { + this.raise(Errors.PatternHasAccessor, prop.key); + } else if (prop.type === "Property" && prop.method) { + this.raise(Errors.PatternHasMethod, prop.key); + } else { + super.toAssignableObjectExpressionProp(prop, isLast, isLHS); + } + } + finishCallExpression(unfinished, optional) { + const node = super.finishCallExpression(unfinished, optional); + if (node.callee.type === "Import") { + node.type = "ImportExpression"; + node.source = node.arguments[0]; + if (this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions")) { + var _ref, _ref2; + node.options = (_ref = node.arguments[1]) != null ? _ref : null; + node.attributes = (_ref2 = node.arguments[1]) != null ? _ref2 : null; + } + delete node.arguments; + delete node.callee; + } + return node; + } + toReferencedArguments(node) { + if (node.type === "ImportExpression") { + return; + } + super.toReferencedArguments(node); + } + parseExport(unfinished, decorators) { + const exportStartLoc = this.state.lastTokStartLoc; + const node = super.parseExport(unfinished, decorators); + switch (node.type) { + case "ExportAllDeclaration": + node.exported = null; + break; + case "ExportNamedDeclaration": + if (node.specifiers.length === 1 && node.specifiers[0].type === "ExportNamespaceSpecifier") { + node.type = "ExportAllDeclaration"; + node.exported = node.specifiers[0].exported; + delete node.specifiers; + } + case "ExportDefaultDeclaration": + { + var _declaration$decorato; + const { + declaration + } = node; + if ((declaration == null ? void 0 : declaration.type) === "ClassDeclaration" && ((_declaration$decorato = declaration.decorators) == null ? void 0 : _declaration$decorato.length) > 0 && declaration.start === node.start) { + this.resetStartLocation(node, exportStartLoc); + } + } + break; + } + return node; + } + parseSubscript(base, startLoc, noCalls, state) { + const node = super.parseSubscript(base, startLoc, noCalls, state); + if (state.optionalChainMember) { + if (node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression") { + node.type = node.type.substring(8); + } + if (state.stop) { + const chain = this.startNodeAtNode(node); + chain.expression = node; + return this.finishNode(chain, "ChainExpression"); + } + } else if (node.type === "MemberExpression" || node.type === "CallExpression") { + node.optional = false; + } + return node; + } + isOptionalMemberExpression(node) { + if (node.type === "ChainExpression") { + return node.expression.type === "MemberExpression"; + } + return super.isOptionalMemberExpression(node); + } + hasPropertyAsPrivateName(node) { + if (node.type === "ChainExpression") { + node = node.expression; + } + return super.hasPropertyAsPrivateName(node); + } + isObjectProperty(node) { + return node.type === "Property" && node.kind === "init" && !node.method; + } + isObjectMethod(node) { + return node.type === "Property" && (node.method || node.kind === "get" || node.kind === "set"); + } + finishNodeAt(node, type, endLoc) { + return toESTreeLocation(super.finishNodeAt(node, type, endLoc)); + } + resetStartLocation(node, startLoc) { + super.resetStartLocation(node, startLoc); + toESTreeLocation(node); + } + resetEndLocation(node, endLoc = this.state.lastTokEndLoc) { + super.resetEndLocation(node, endLoc); + toESTreeLocation(node); + } + }; + class TokContext { + constructor(token, preserveSpace) { + this.token = void 0; + this.preserveSpace = void 0; + this.token = token; + this.preserveSpace = !!preserveSpace; + } + } + const types = { + brace: new TokContext("{"), + j_oTag: new TokContext("<tag"), + j_cTag: new TokContext("</tag"), + j_expr: new TokContext("<tag>...</tag>", true) + }; + { + types.template = new TokContext("`", true); + } + const beforeExpr = true; + const startsExpr = true; + const isLoop = true; + const isAssign = true; + const prefix = true; + const postfix = true; + class ExportedTokenType { + constructor(label, conf = {}) { + this.label = void 0; + this.keyword = void 0; + this.beforeExpr = void 0; + this.startsExpr = void 0; + this.rightAssociative = void 0; + this.isLoop = void 0; + this.isAssign = void 0; + this.prefix = void 0; + this.postfix = void 0; + this.binop = void 0; + this.label = label; + this.keyword = conf.keyword; + this.beforeExpr = !!conf.beforeExpr; + this.startsExpr = !!conf.startsExpr; + this.rightAssociative = !!conf.rightAssociative; + this.isLoop = !!conf.isLoop; + this.isAssign = !!conf.isAssign; + this.prefix = !!conf.prefix; + this.postfix = !!conf.postfix; + this.binop = conf.binop != null ? conf.binop : null; + { + this.updateContext = null; + } + } + } + const keywords$1 = new Map(); + function createKeyword(name, options = {}) { + options.keyword = name; + const token = createToken(name, options); + keywords$1.set(name, token); + return token; + } + function createBinop(name, binop) { + return createToken(name, { + beforeExpr, + binop + }); + } + let tokenTypeCounter = -1; + const tokenTypes = []; + const tokenLabels = []; + const tokenBinops = []; + const tokenBeforeExprs = []; + const tokenStartsExprs = []; + const tokenPrefixes = []; + function createToken(name, options = {}) { + var _options$binop, _options$beforeExpr, _options$startsExpr, _options$prefix; + ++tokenTypeCounter; + tokenLabels.push(name); + tokenBinops.push((_options$binop = options.binop) != null ? _options$binop : -1); + tokenBeforeExprs.push((_options$beforeExpr = options.beforeExpr) != null ? _options$beforeExpr : false); + tokenStartsExprs.push((_options$startsExpr = options.startsExpr) != null ? _options$startsExpr : false); + tokenPrefixes.push((_options$prefix = options.prefix) != null ? _options$prefix : false); + tokenTypes.push(new ExportedTokenType(name, options)); + return tokenTypeCounter; + } + function createKeywordLike(name, options = {}) { + var _options$binop2, _options$beforeExpr2, _options$startsExpr2, _options$prefix2; + ++tokenTypeCounter; + keywords$1.set(name, tokenTypeCounter); + tokenLabels.push(name); + tokenBinops.push((_options$binop2 = options.binop) != null ? _options$binop2 : -1); + tokenBeforeExprs.push((_options$beforeExpr2 = options.beforeExpr) != null ? _options$beforeExpr2 : false); + tokenStartsExprs.push((_options$startsExpr2 = options.startsExpr) != null ? _options$startsExpr2 : false); + tokenPrefixes.push((_options$prefix2 = options.prefix) != null ? _options$prefix2 : false); + tokenTypes.push(new ExportedTokenType("name", options)); + return tokenTypeCounter; + } + const tt = { + bracketL: createToken("[", { + beforeExpr, + startsExpr + }), + bracketHashL: createToken("#[", { + beforeExpr, + startsExpr + }), + bracketBarL: createToken("[|", { + beforeExpr, + startsExpr + }), + bracketR: createToken("]"), + bracketBarR: createToken("|]"), + braceL: createToken("{", { + beforeExpr, + startsExpr + }), + braceBarL: createToken("{|", { + beforeExpr, + startsExpr + }), + braceHashL: createToken("#{", { + beforeExpr, + startsExpr + }), + braceR: createToken("}"), + braceBarR: createToken("|}"), + parenL: createToken("(", { + beforeExpr, + startsExpr + }), + parenR: createToken(")"), + comma: createToken(",", { + beforeExpr + }), + semi: createToken(";", { + beforeExpr + }), + colon: createToken(":", { + beforeExpr + }), + doubleColon: createToken("::", { + beforeExpr + }), + dot: createToken("."), + question: createToken("?", { + beforeExpr + }), + questionDot: createToken("?."), + arrow: createToken("=>", { + beforeExpr + }), + template: createToken("template"), + ellipsis: createToken("...", { + beforeExpr + }), + backQuote: createToken("`", { + startsExpr + }), + dollarBraceL: createToken("${", { + beforeExpr, + startsExpr + }), + templateTail: createToken("...`", { + startsExpr + }), + templateNonTail: createToken("...${", { + beforeExpr, + startsExpr + }), + at: createToken("@"), + hash: createToken("#", { + startsExpr + }), + interpreterDirective: createToken("#!..."), + eq: createToken("=", { + beforeExpr, + isAssign + }), + assign: createToken("_=", { + beforeExpr, + isAssign + }), + slashAssign: createToken("_=", { + beforeExpr, + isAssign + }), + xorAssign: createToken("_=", { + beforeExpr, + isAssign + }), + moduloAssign: createToken("_=", { + beforeExpr, + isAssign + }), + incDec: createToken("++/--", { + prefix, + postfix, + startsExpr + }), + bang: createToken("!", { + beforeExpr, + prefix, + startsExpr + }), + tilde: createToken("~", { + beforeExpr, + prefix, + startsExpr + }), + doubleCaret: createToken("^^", { + startsExpr + }), + doubleAt: createToken("@@", { + startsExpr + }), + pipeline: createBinop("|>", 0), + nullishCoalescing: createBinop("??", 1), + logicalOR: createBinop("||", 1), + logicalAND: createBinop("&&", 2), + bitwiseOR: createBinop("|", 3), + bitwiseXOR: createBinop("^", 4), + bitwiseAND: createBinop("&", 5), + equality: createBinop("==/!=/===/!==", 6), + lt: createBinop("</>/<=/>=", 7), + gt: createBinop("</>/<=/>=", 7), + relational: createBinop("</>/<=/>=", 7), + bitShift: createBinop("<</>>/>>>", 8), + bitShiftL: createBinop("<</>>/>>>", 8), + bitShiftR: createBinop("<</>>/>>>", 8), + plusMin: createToken("+/-", { + beforeExpr, + binop: 9, + prefix, + startsExpr + }), + modulo: createToken("%", { + binop: 10, + startsExpr + }), + star: createToken("*", { + binop: 10 + }), + slash: createBinop("/", 10), + exponent: createToken("**", { + beforeExpr, + binop: 11, + rightAssociative: true + }), + _in: createKeyword("in", { + beforeExpr, + binop: 7 + }), + _instanceof: createKeyword("instanceof", { + beforeExpr, + binop: 7 + }), + _break: createKeyword("break"), + _case: createKeyword("case", { + beforeExpr + }), + _catch: createKeyword("catch"), + _continue: createKeyword("continue"), + _debugger: createKeyword("debugger"), + _default: createKeyword("default", { + beforeExpr + }), + _else: createKeyword("else", { + beforeExpr + }), + _finally: createKeyword("finally"), + _function: createKeyword("function", { + startsExpr + }), + _if: createKeyword("if"), + _return: createKeyword("return", { + beforeExpr + }), + _switch: createKeyword("switch"), + _throw: createKeyword("throw", { + beforeExpr, + prefix, + startsExpr + }), + _try: createKeyword("try"), + _var: createKeyword("var"), + _const: createKeyword("const"), + _with: createKeyword("with"), + _new: createKeyword("new", { + beforeExpr, + startsExpr + }), + _this: createKeyword("this", { + startsExpr + }), + _super: createKeyword("super", { + startsExpr + }), + _class: createKeyword("class", { + startsExpr + }), + _extends: createKeyword("extends", { + beforeExpr + }), + _export: createKeyword("export"), + _import: createKeyword("import", { + startsExpr + }), + _null: createKeyword("null", { + startsExpr + }), + _true: createKeyword("true", { + startsExpr + }), + _false: createKeyword("false", { + startsExpr + }), + _typeof: createKeyword("typeof", { + beforeExpr, + prefix, + startsExpr + }), + _void: createKeyword("void", { + beforeExpr, + prefix, + startsExpr + }), + _delete: createKeyword("delete", { + beforeExpr, + prefix, + startsExpr + }), + _do: createKeyword("do", { + isLoop, + beforeExpr + }), + _for: createKeyword("for", { + isLoop + }), + _while: createKeyword("while", { + isLoop + }), + _as: createKeywordLike("as", { + startsExpr + }), + _assert: createKeywordLike("assert", { + startsExpr + }), + _async: createKeywordLike("async", { + startsExpr + }), + _await: createKeywordLike("await", { + startsExpr + }), + _defer: createKeywordLike("defer", { + startsExpr + }), + _from: createKeywordLike("from", { + startsExpr + }), + _get: createKeywordLike("get", { + startsExpr + }), + _let: createKeywordLike("let", { + startsExpr + }), + _meta: createKeywordLike("meta", { + startsExpr + }), + _of: createKeywordLike("of", { + startsExpr + }), + _sent: createKeywordLike("sent", { + startsExpr + }), + _set: createKeywordLike("set", { + startsExpr + }), + _source: createKeywordLike("source", { + startsExpr + }), + _static: createKeywordLike("static", { + startsExpr + }), + _using: createKeywordLike("using", { + startsExpr + }), + _yield: createKeywordLike("yield", { + startsExpr + }), + _asserts: createKeywordLike("asserts", { + startsExpr + }), + _checks: createKeywordLike("checks", { + startsExpr + }), + _exports: createKeywordLike("exports", { + startsExpr + }), + _global: createKeywordLike("global", { + startsExpr + }), + _implements: createKeywordLike("implements", { + startsExpr + }), + _intrinsic: createKeywordLike("intrinsic", { + startsExpr + }), + _infer: createKeywordLike("infer", { + startsExpr + }), + _is: createKeywordLike("is", { + startsExpr + }), + _mixins: createKeywordLike("mixins", { + startsExpr + }), + _proto: createKeywordLike("proto", { + startsExpr + }), + _require: createKeywordLike("require", { + startsExpr + }), + _satisfies: createKeywordLike("satisfies", { + startsExpr + }), + _keyof: createKeywordLike("keyof", { + startsExpr + }), + _readonly: createKeywordLike("readonly", { + startsExpr + }), + _unique: createKeywordLike("unique", { + startsExpr + }), + _abstract: createKeywordLike("abstract", { + startsExpr + }), + _declare: createKeywordLike("declare", { + startsExpr + }), + _enum: createKeywordLike("enum", { + startsExpr + }), + _module: createKeywordLike("module", { + startsExpr + }), + _namespace: createKeywordLike("namespace", { + startsExpr + }), + _interface: createKeywordLike("interface", { + startsExpr + }), + _type: createKeywordLike("type", { + startsExpr + }), + _opaque: createKeywordLike("opaque", { + startsExpr + }), + name: createToken("name", { + startsExpr + }), + string: createToken("string", { + startsExpr + }), + num: createToken("num", { + startsExpr + }), + bigint: createToken("bigint", { + startsExpr + }), + decimal: createToken("decimal", { + startsExpr + }), + regexp: createToken("regexp", { + startsExpr + }), + privateName: createToken("#name", { + startsExpr + }), + eof: createToken("eof"), + jsxName: createToken("jsxName"), + jsxText: createToken("jsxText", { + beforeExpr: true + }), + jsxTagStart: createToken("jsxTagStart", { + startsExpr: true + }), + jsxTagEnd: createToken("jsxTagEnd"), + placeholder: createToken("%%", { + startsExpr: true + }) + }; + function tokenIsIdentifier(token) { + return token >= 93 && token <= 132; + } + function tokenKeywordOrIdentifierIsKeyword(token) { + return token <= 92; + } + function tokenIsKeywordOrIdentifier(token) { + return token >= 58 && token <= 132; + } + function tokenIsLiteralPropertyName(token) { + return token >= 58 && token <= 136; + } + function tokenComesBeforeExpression(token) { + return tokenBeforeExprs[token]; + } + function tokenCanStartExpression(token) { + return tokenStartsExprs[token]; + } + function tokenIsAssignment(token) { + return token >= 29 && token <= 33; + } + function tokenIsFlowInterfaceOrTypeOrOpaque(token) { + return token >= 129 && token <= 131; + } + function tokenIsLoop(token) { + return token >= 90 && token <= 92; + } + function tokenIsKeyword(token) { + return token >= 58 && token <= 92; + } + function tokenIsOperator(token) { + return token >= 39 && token <= 59; + } + function tokenIsPostfix(token) { + return token === 34; + } + function tokenIsPrefix(token) { + return tokenPrefixes[token]; + } + function tokenIsTSTypeOperator(token) { + return token >= 121 && token <= 123; + } + function tokenIsTSDeclarationStart(token) { + return token >= 124 && token <= 130; + } + function tokenLabelName(token) { + return tokenLabels[token]; + } + function tokenOperatorPrecedence(token) { + return tokenBinops[token]; + } + function tokenIsRightAssociative(token) { + return token === 57; + } + function tokenIsTemplate(token) { + return token >= 24 && token <= 25; + } + function getExportedToken(token) { + return tokenTypes[token]; + } + { + tokenTypes[8].updateContext = context => { + context.pop(); + }; + tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = context => { + context.push(types.brace); + }; + tokenTypes[22].updateContext = context => { + if (context[context.length - 1] === types.template) { + context.pop(); + } else { + context.push(types.template); + } + }; + tokenTypes[142].updateContext = context => { + context.push(types.j_expr, types.j_oTag); + }; + } + let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; + let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65"; + const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); + const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; + const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; + const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; + function isInAstralSet(code, set) { + let pos = 0x10000; + for (let i = 0, length = set.length; i < length; i += 2) { + pos += set[i]; + if (pos > code) return false; + pos += set[i + 1]; + if (pos >= code) return true; + } + return false; + } + function isIdentifierStart(code) { + if (code < 65) return code === 36; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + if (code <= 0xffff) { + return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes); + } + function isIdentifierChar(code) { + if (code < 48) return code === 36; + if (code < 58) return true; + if (code < 65) return false; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + if (code <= 0xffff) { + return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); + } + const reservedWords = { + keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], + strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], + strictBind: ["eval", "arguments"] + }; + const keywords = new Set(reservedWords.keyword); + const reservedWordsStrictSet = new Set(reservedWords.strict); + const reservedWordsStrictBindSet = new Set(reservedWords.strictBind); + function isReservedWord(word, inModule) { + return inModule && word === "await" || word === "enum"; + } + function isStrictReservedWord(word, inModule) { + return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); + } + function isStrictBindOnlyReservedWord(word) { + return reservedWordsStrictBindSet.has(word); + } + function isStrictBindReservedWord(word, inModule) { + return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); + } + function isKeyword(word) { + return keywords.has(word); + } + function isIteratorStart(current, next, next2) { + return current === 64 && next === 64 && isIdentifierStart(next2); + } + const reservedWordLikeSet = new Set(["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "eval", "arguments", "enum", "await"]); + function canBeReservedWord(word) { + return reservedWordLikeSet.has(word); + } + class Scope { + constructor(flags) { + this.flags = 0; + this.names = new Map(); + this.firstLexicalName = ""; + this.flags = flags; + } + } + class ScopeHandler { + constructor(parser, inModule) { + this.parser = void 0; + this.scopeStack = []; + this.inModule = void 0; + this.undefinedExports = new Map(); + this.parser = parser; + this.inModule = inModule; + } + get inTopLevel() { + return (this.currentScope().flags & 1) > 0; + } + get inFunction() { + return (this.currentVarScopeFlags() & 2) > 0; + } + get allowSuper() { + return (this.currentThisScopeFlags() & 16) > 0; + } + get allowDirectSuper() { + return (this.currentThisScopeFlags() & 32) > 0; + } + get inClass() { + return (this.currentThisScopeFlags() & 64) > 0; + } + get inClassAndNotInNonArrowFunction() { + const flags = this.currentThisScopeFlags(); + return (flags & 64) > 0 && (flags & 2) === 0; + } + get inStaticBlock() { + for (let i = this.scopeStack.length - 1;; i--) { + const { + flags + } = this.scopeStack[i]; + if (flags & 128) { + return true; + } + if (flags & (387 | 64)) { + return false; + } + } + } + get inNonArrowFunction() { + return (this.currentThisScopeFlags() & 2) > 0; + } + get treatFunctionsAsVar() { + return this.treatFunctionsAsVarInScope(this.currentScope()); + } + createScope(flags) { + return new Scope(flags); + } + enter(flags) { + this.scopeStack.push(this.createScope(flags)); + } + exit() { + const scope = this.scopeStack.pop(); + return scope.flags; + } + treatFunctionsAsVarInScope(scope) { + return !!(scope.flags & (2 | 128) || !this.parser.inModule && scope.flags & 1); + } + declareName(name, bindingType, loc) { + let scope = this.currentScope(); + if (bindingType & 8 || bindingType & 16) { + this.checkRedeclarationInScope(scope, name, bindingType, loc); + let type = scope.names.get(name) || 0; + if (bindingType & 16) { + type = type | 4; + } else { + if (!scope.firstLexicalName) { + scope.firstLexicalName = name; + } + type = type | 2; + } + scope.names.set(name, type); + if (bindingType & 8) { + this.maybeExportDefined(scope, name); + } + } else if (bindingType & 4) { + for (let i = this.scopeStack.length - 1; i >= 0; --i) { + scope = this.scopeStack[i]; + this.checkRedeclarationInScope(scope, name, bindingType, loc); + scope.names.set(name, (scope.names.get(name) || 0) | 1); + this.maybeExportDefined(scope, name); + if (scope.flags & 387) break; + } + } + if (this.parser.inModule && scope.flags & 1) { + this.undefinedExports.delete(name); + } + } + maybeExportDefined(scope, name) { + if (this.parser.inModule && scope.flags & 1) { + this.undefinedExports.delete(name); + } + } + checkRedeclarationInScope(scope, name, bindingType, loc) { + if (this.isRedeclaredInScope(scope, name, bindingType)) { + this.parser.raise(Errors.VarRedeclaration, loc, { + identifierName: name + }); + } + } + isRedeclaredInScope(scope, name, bindingType) { + if (!(bindingType & 1)) return false; + if (bindingType & 8) { + return scope.names.has(name); + } + const type = scope.names.get(name); + if (bindingType & 16) { + return (type & 2) > 0 || !this.treatFunctionsAsVarInScope(scope) && (type & 1) > 0; + } + return (type & 2) > 0 && !(scope.flags & 8 && scope.firstLexicalName === name) || !this.treatFunctionsAsVarInScope(scope) && (type & 4) > 0; + } + checkLocalExport(id) { + const { + name + } = id; + const topLevelScope = this.scopeStack[0]; + if (!topLevelScope.names.has(name)) { + this.undefinedExports.set(name, id.loc.start); + } + } + currentScope() { + return this.scopeStack[this.scopeStack.length - 1]; + } + currentVarScopeFlags() { + for (let i = this.scopeStack.length - 1;; i--) { + const { + flags + } = this.scopeStack[i]; + if (flags & 387) { + return flags; + } + } + } + currentThisScopeFlags() { + for (let i = this.scopeStack.length - 1;; i--) { + const { + flags + } = this.scopeStack[i]; + if (flags & (387 | 64) && !(flags & 4)) { + return flags; + } + } + } + } + class FlowScope extends Scope { + constructor(...args) { + super(...args); + this.declareFunctions = new Set(); + } + } + class FlowScopeHandler extends ScopeHandler { + createScope(flags) { + return new FlowScope(flags); + } + declareName(name, bindingType, loc) { + const scope = this.currentScope(); + if (bindingType & 2048) { + this.checkRedeclarationInScope(scope, name, bindingType, loc); + this.maybeExportDefined(scope, name); + scope.declareFunctions.add(name); + return; + } + super.declareName(name, bindingType, loc); + } + isRedeclaredInScope(scope, name, bindingType) { + if (super.isRedeclaredInScope(scope, name, bindingType)) return true; + if (bindingType & 2048 && !scope.declareFunctions.has(name)) { + const type = scope.names.get(name); + return (type & 4) > 0 || (type & 2) > 0; + } + return false; + } + checkLocalExport(id) { + if (!this.scopeStack[0].declareFunctions.has(id.name)) { + super.checkLocalExport(id); + } + } + } + class BaseParser { + constructor() { + this.sawUnambiguousESM = false; + this.ambiguousScriptDifferentAst = false; + } + hasPlugin(pluginConfig) { + if (typeof pluginConfig === "string") { + return this.plugins.has(pluginConfig); + } else { + const [pluginName, pluginOptions] = pluginConfig; + if (!this.hasPlugin(pluginName)) { + return false; + } + const actualOptions = this.plugins.get(pluginName); + for (const key of Object.keys(pluginOptions)) { + if ((actualOptions == null ? void 0 : actualOptions[key]) !== pluginOptions[key]) { + return false; + } + } + return true; + } + } + getPluginOption(plugin, name) { + var _this$plugins$get; + return (_this$plugins$get = this.plugins.get(plugin)) == null ? void 0 : _this$plugins$get[name]; + } + } + function setTrailingComments(node, comments) { + if (node.trailingComments === undefined) { + node.trailingComments = comments; + } else { + node.trailingComments.unshift(...comments); + } + } + function setLeadingComments(node, comments) { + if (node.leadingComments === undefined) { + node.leadingComments = comments; + } else { + node.leadingComments.unshift(...comments); + } + } + function setInnerComments(node, comments) { + if (node.innerComments === undefined) { + node.innerComments = comments; + } else { + node.innerComments.unshift(...comments); + } + } + function adjustInnerComments(node, elements, commentWS) { + let lastElement = null; + let i = elements.length; + while (lastElement === null && i > 0) { + lastElement = elements[--i]; + } + if (lastElement === null || lastElement.start > commentWS.start) { + setInnerComments(node, commentWS.comments); + } else { + setTrailingComments(lastElement, commentWS.comments); + } + } + class CommentsParser extends BaseParser { + addComment(comment) { + if (this.filename) comment.loc.filename = this.filename; + const { + commentsLen + } = this.state; + if (this.comments.length !== commentsLen) { + this.comments.length = commentsLen; + } + this.comments.push(comment); + this.state.commentsLen++; + } + processComment(node) { + const { + commentStack + } = this.state; + const commentStackLength = commentStack.length; + if (commentStackLength === 0) return; + let i = commentStackLength - 1; + const lastCommentWS = commentStack[i]; + if (lastCommentWS.start === node.end) { + lastCommentWS.leadingNode = node; + i--; + } + const { + start: nodeStart + } = node; + for (; i >= 0; i--) { + const commentWS = commentStack[i]; + const commentEnd = commentWS.end; + if (commentEnd > nodeStart) { + commentWS.containingNode = node; + this.finalizeComment(commentWS); + commentStack.splice(i, 1); + } else { + if (commentEnd === nodeStart) { + commentWS.trailingNode = node; + } + break; + } + } + } + finalizeComment(commentWS) { + const { + comments + } = commentWS; + if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) { + if (commentWS.leadingNode !== null) { + setTrailingComments(commentWS.leadingNode, comments); + } + if (commentWS.trailingNode !== null) { + setLeadingComments(commentWS.trailingNode, comments); + } + } else { + const { + containingNode: node, + start: commentStart + } = commentWS; + if (this.input.charCodeAt(commentStart - 1) === 44) { + switch (node.type) { + case "ObjectExpression": + case "ObjectPattern": + case "RecordExpression": + adjustInnerComments(node, node.properties, commentWS); + break; + case "CallExpression": + case "OptionalCallExpression": + adjustInnerComments(node, node.arguments, commentWS); + break; + case "FunctionDeclaration": + case "FunctionExpression": + case "ArrowFunctionExpression": + case "ObjectMethod": + case "ClassMethod": + case "ClassPrivateMethod": + adjustInnerComments(node, node.params, commentWS); + break; + case "ArrayExpression": + case "ArrayPattern": + case "TupleExpression": + adjustInnerComments(node, node.elements, commentWS); + break; + case "ExportNamedDeclaration": + case "ImportDeclaration": + adjustInnerComments(node, node.specifiers, commentWS); + break; + default: + { + setInnerComments(node, comments); + } + } + } else { + setInnerComments(node, comments); + } + } + } + finalizeRemainingComments() { + const { + commentStack + } = this.state; + for (let i = commentStack.length - 1; i >= 0; i--) { + this.finalizeComment(commentStack[i]); + } + this.state.commentStack = []; + } + resetPreviousNodeTrailingComments(node) { + const { + commentStack + } = this.state; + const { + length + } = commentStack; + if (length === 0) return; + const commentWS = commentStack[length - 1]; + if (commentWS.leadingNode === node) { + commentWS.leadingNode = null; + } + } + resetPreviousIdentifierLeadingComments(node) { + const { + commentStack + } = this.state; + const { + length + } = commentStack; + if (length === 0) return; + if (commentStack[length - 1].trailingNode === node) { + commentStack[length - 1].trailingNode = null; + } else if (length >= 2 && commentStack[length - 2].trailingNode === node) { + commentStack[length - 2].trailingNode = null; + } + } + takeSurroundingComments(node, start, end) { + const { + commentStack + } = this.state; + const commentStackLength = commentStack.length; + if (commentStackLength === 0) return; + let i = commentStackLength - 1; + for (; i >= 0; i--) { + const commentWS = commentStack[i]; + const commentEnd = commentWS.end; + const commentStart = commentWS.start; + if (commentStart === end) { + commentWS.leadingNode = node; + } else if (commentEnd === start) { + commentWS.trailingNode = node; + } else if (commentEnd < start) { + break; + } + } + } + } + const lineBreak = /\r\n|[\r\n\u2028\u2029]/; + const lineBreakG = new RegExp(lineBreak.source, "g"); + function isNewLine(code) { + switch (code) { + case 10: + case 13: + case 8232: + case 8233: + return true; + default: + return false; + } + } + function hasNewLine(input, start, end) { + for (let i = start; i < end; i++) { + if (isNewLine(input.charCodeAt(i))) { + return true; + } + } + return false; + } + const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; + const skipWhiteSpaceInLine = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g; + function isWhitespace(code) { + switch (code) { + case 0x0009: + case 0x000b: + case 0x000c: + case 32: + case 160: + case 5760: + case 0x2000: + case 0x2001: + case 0x2002: + case 0x2003: + case 0x2004: + case 0x2005: + case 0x2006: + case 0x2007: + case 0x2008: + case 0x2009: + case 0x200a: + case 0x202f: + case 0x205f: + case 0x3000: + case 0xfeff: + return true; + default: + return false; + } + } + class State { + constructor() { + this.flags = 1024; + this.curLine = void 0; + this.lineStart = void 0; + this.startLoc = void 0; + this.endLoc = void 0; + this.errors = []; + this.potentialArrowAt = -1; + this.noArrowAt = []; + this.noArrowParamsConversionAt = []; + this.topicContext = { + maxNumOfResolvableTopics: 0, + maxTopicIndex: null + }; + this.labels = []; + this.commentsLen = 0; + this.commentStack = []; + this.pos = 0; + this.type = 139; + this.value = null; + this.start = 0; + this.end = 0; + this.lastTokEndLoc = null; + this.lastTokStartLoc = null; + this.context = [types.brace]; + this.firstInvalidTemplateEscapePos = null; + this.strictErrors = new Map(); + this.tokensLength = 0; + } + get strict() { + return (this.flags & 1) > 0; + } + set strict(v) { + if (v) this.flags |= 1;else this.flags &= -2; + } + init({ + strictMode, + sourceType, + startLine, + startColumn + }) { + this.strict = strictMode === false ? false : strictMode === true ? true : sourceType === "module"; + this.curLine = startLine; + this.lineStart = -startColumn; + this.startLoc = this.endLoc = new Position(startLine, startColumn, 0); + } + get maybeInArrowParameters() { + return (this.flags & 2) > 0; + } + set maybeInArrowParameters(v) { + if (v) this.flags |= 2;else this.flags &= -3; + } + get inType() { + return (this.flags & 4) > 0; + } + set inType(v) { + if (v) this.flags |= 4;else this.flags &= -5; + } + get noAnonFunctionType() { + return (this.flags & 8) > 0; + } + set noAnonFunctionType(v) { + if (v) this.flags |= 8;else this.flags &= -9; + } + get hasFlowComment() { + return (this.flags & 16) > 0; + } + set hasFlowComment(v) { + if (v) this.flags |= 16;else this.flags &= -17; + } + get isAmbientContext() { + return (this.flags & 32) > 0; + } + set isAmbientContext(v) { + if (v) this.flags |= 32;else this.flags &= -33; + } + get inAbstractClass() { + return (this.flags & 64) > 0; + } + set inAbstractClass(v) { + if (v) this.flags |= 64;else this.flags &= -65; + } + get inDisallowConditionalTypesContext() { + return (this.flags & 128) > 0; + } + set inDisallowConditionalTypesContext(v) { + if (v) this.flags |= 128;else this.flags &= -129; + } + get soloAwait() { + return (this.flags & 256) > 0; + } + set soloAwait(v) { + if (v) this.flags |= 256;else this.flags &= -257; + } + get inFSharpPipelineDirectBody() { + return (this.flags & 512) > 0; + } + set inFSharpPipelineDirectBody(v) { + if (v) this.flags |= 512;else this.flags &= -513; + } + get canStartJSXElement() { + return (this.flags & 1024) > 0; + } + set canStartJSXElement(v) { + if (v) this.flags |= 1024;else this.flags &= -1025; + } + get containsEsc() { + return (this.flags & 2048) > 0; + } + set containsEsc(v) { + if (v) this.flags |= 2048;else this.flags &= -2049; + } + get hasTopLevelAwait() { + return (this.flags & 4096) > 0; + } + set hasTopLevelAwait(v) { + if (v) this.flags |= 4096;else this.flags &= -4097; + } + curPosition() { + return new Position(this.curLine, this.pos - this.lineStart, this.pos); + } + clone() { + const state = new State(); + state.flags = this.flags; + state.curLine = this.curLine; + state.lineStart = this.lineStart; + state.startLoc = this.startLoc; + state.endLoc = this.endLoc; + state.errors = this.errors.slice(); + state.potentialArrowAt = this.potentialArrowAt; + state.noArrowAt = this.noArrowAt.slice(); + state.noArrowParamsConversionAt = this.noArrowParamsConversionAt.slice(); + state.topicContext = this.topicContext; + state.labels = this.labels.slice(); + state.commentsLen = this.commentsLen; + state.commentStack = this.commentStack.slice(); + state.pos = this.pos; + state.type = this.type; + state.value = this.value; + state.start = this.start; + state.end = this.end; + state.lastTokEndLoc = this.lastTokEndLoc; + state.lastTokStartLoc = this.lastTokStartLoc; + state.context = this.context.slice(); + state.firstInvalidTemplateEscapePos = this.firstInvalidTemplateEscapePos; + state.strictErrors = this.strictErrors; + state.tokensLength = this.tokensLength; + return state; + } + } + var _isDigit = function isDigit(code) { + return code >= 48 && code <= 57; + }; + const forbiddenNumericSeparatorSiblings = { + decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]), + hex: new Set([46, 88, 95, 120]) + }; + const isAllowedNumericSeparatorSibling = { + bin: ch => ch === 48 || ch === 49, + oct: ch => ch >= 48 && ch <= 55, + dec: ch => ch >= 48 && ch <= 57, + hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102 + }; + function readStringContents(type, input, pos, lineStart, curLine, errors) { + const initialPos = pos; + const initialLineStart = lineStart; + const initialCurLine = curLine; + let out = ""; + let firstInvalidLoc = null; + let chunkStart = pos; + const { + length + } = input; + for (;;) { + if (pos >= length) { + errors.unterminated(initialPos, initialLineStart, initialCurLine); + out += input.slice(chunkStart, pos); + break; + } + const ch = input.charCodeAt(pos); + if (isStringEnd(type, ch, input, pos)) { + out += input.slice(chunkStart, pos); + break; + } + if (ch === 92) { + out += input.slice(chunkStart, pos); + const res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors); + if (res.ch === null && !firstInvalidLoc) { + firstInvalidLoc = { + pos, + lineStart, + curLine + }; + } else { + out += res.ch; + } + ({ + pos, + lineStart, + curLine + } = res); + chunkStart = pos; + } else if (ch === 8232 || ch === 8233) { + ++pos; + ++curLine; + lineStart = pos; + } else if (ch === 10 || ch === 13) { + if (type === "template") { + out += input.slice(chunkStart, pos) + "\n"; + ++pos; + if (ch === 13 && input.charCodeAt(pos) === 10) { + ++pos; + } + ++curLine; + chunkStart = lineStart = pos; + } else { + errors.unterminated(initialPos, initialLineStart, initialCurLine); + } + } else { + ++pos; + } + } + return { + pos, + str: out, + firstInvalidLoc, + lineStart, + curLine, + containsInvalid: !!firstInvalidLoc + }; + } + function isStringEnd(type, ch, input, pos) { + if (type === "template") { + return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123; + } + return ch === (type === "double" ? 34 : 39); + } + function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) { + const throwOnInvalid = !inTemplate; + pos++; + const res = ch => ({ + pos, + ch, + lineStart, + curLine + }); + const ch = input.charCodeAt(pos++); + switch (ch) { + case 110: + return res("\n"); + case 114: + return res("\r"); + case 120: + { + let code; + ({ + code, + pos + } = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors)); + return res(code === null ? null : String.fromCharCode(code)); + } + case 117: + { + let code; + ({ + code, + pos + } = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors)); + return res(code === null ? null : String.fromCodePoint(code)); + } + case 116: + return res("\t"); + case 98: + return res("\b"); + case 118: + return res("\u000b"); + case 102: + return res("\f"); + case 13: + if (input.charCodeAt(pos) === 10) { + ++pos; + } + case 10: + lineStart = pos; + ++curLine; + case 8232: + case 8233: + return res(""); + case 56: + case 57: + if (inTemplate) { + return res(null); + } else { + errors.strictNumericEscape(pos - 1, lineStart, curLine); + } + default: + if (ch >= 48 && ch <= 55) { + const startPos = pos - 1; + const match = /^[0-7]+/.exec(input.slice(startPos, pos + 2)); + let octalStr = match[0]; + let octal = parseInt(octalStr, 8); + if (octal > 255) { + octalStr = octalStr.slice(0, -1); + octal = parseInt(octalStr, 8); + } + pos += octalStr.length - 1; + const next = input.charCodeAt(pos); + if (octalStr !== "0" || next === 56 || next === 57) { + if (inTemplate) { + return res(null); + } else { + errors.strictNumericEscape(startPos, lineStart, curLine); + } + } + return res(String.fromCharCode(octal)); + } + return res(String.fromCharCode(ch)); + } + } + function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) { + const initialPos = pos; + let n; + ({ + n, + pos + } = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid)); + if (n === null) { + if (throwOnInvalid) { + errors.invalidEscapeSequence(initialPos, lineStart, curLine); + } else { + pos = initialPos - 1; + } + } + return { + code: n, + pos + }; + } + function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) { + const start = pos; + const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct; + const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin; + let invalid = false; + let total = 0; + for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) { + const code = input.charCodeAt(pos); + let val; + if (code === 95 && allowNumSeparator !== "bail") { + const prev = input.charCodeAt(pos - 1); + const next = input.charCodeAt(pos + 1); + if (!allowNumSeparator) { + if (bailOnError) return { + n: null, + pos + }; + errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine); + } else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) { + if (bailOnError) return { + n: null, + pos + }; + errors.unexpectedNumericSeparator(pos, lineStart, curLine); + } + ++pos; + continue; + } + if (code >= 97) { + val = code - 97 + 10; + } else if (code >= 65) { + val = code - 65 + 10; + } else if (_isDigit(code)) { + val = code - 48; + } else { + val = Infinity; + } + if (val >= radix) { + if (val <= 9 && bailOnError) { + return { + n: null, + pos + }; + } else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) { + val = 0; + } else if (forceLen) { + val = 0; + invalid = true; + } else { + break; + } + } + ++pos; + total = total * radix + val; + } + if (pos === start || len != null && pos - start !== len || invalid) { + return { + n: null, + pos + }; + } + return { + n: total, + pos + }; + } + function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) { + const ch = input.charCodeAt(pos); + let code; + if (ch === 123) { + ++pos; + ({ + code, + pos + } = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors)); + ++pos; + if (code !== null && code > 0x10ffff) { + if (throwOnInvalid) { + errors.invalidCodePoint(pos, lineStart, curLine); + } else { + return { + code: null, + pos + }; + } + } + } else { + ({ + code, + pos + } = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors)); + } + return { + code, + pos + }; + } + function buildPosition(pos, lineStart, curLine) { + return new Position(curLine, pos - lineStart, pos); + } + const VALID_REGEX_FLAGS = new Set([103, 109, 115, 105, 121, 117, 100, 118]); + class Token { + constructor(state) { + this.type = state.type; + this.value = state.value; + this.start = state.start; + this.end = state.end; + this.loc = new SourceLocation(state.startLoc, state.endLoc); + } + } + class Tokenizer extends CommentsParser { + constructor(options, input) { + super(); + this.isLookahead = void 0; + this.tokens = []; + this.errorHandlers_readInt = { + invalidDigit: (pos, lineStart, curLine, radix) => { + if (!this.options.errorRecovery) return false; + this.raise(Errors.InvalidDigit, buildPosition(pos, lineStart, curLine), { + radix + }); + return true; + }, + numericSeparatorInEscapeSequence: this.errorBuilder(Errors.NumericSeparatorInEscapeSequence), + unexpectedNumericSeparator: this.errorBuilder(Errors.UnexpectedNumericSeparator) + }; + this.errorHandlers_readCodePoint = Object.assign({}, this.errorHandlers_readInt, { + invalidEscapeSequence: this.errorBuilder(Errors.InvalidEscapeSequence), + invalidCodePoint: this.errorBuilder(Errors.InvalidCodePoint) + }); + this.errorHandlers_readStringContents_string = Object.assign({}, this.errorHandlers_readCodePoint, { + strictNumericEscape: (pos, lineStart, curLine) => { + this.recordStrictModeErrors(Errors.StrictNumericEscape, buildPosition(pos, lineStart, curLine)); + }, + unterminated: (pos, lineStart, curLine) => { + throw this.raise(Errors.UnterminatedString, buildPosition(pos - 1, lineStart, curLine)); + } + }); + this.errorHandlers_readStringContents_template = Object.assign({}, this.errorHandlers_readCodePoint, { + strictNumericEscape: this.errorBuilder(Errors.StrictNumericEscape), + unterminated: (pos, lineStart, curLine) => { + throw this.raise(Errors.UnterminatedTemplate, buildPosition(pos, lineStart, curLine)); + } + }); + this.state = new State(); + this.state.init(options); + this.input = input; + this.length = input.length; + this.comments = []; + this.isLookahead = false; + } + pushToken(token) { + this.tokens.length = this.state.tokensLength; + this.tokens.push(token); + ++this.state.tokensLength; + } + next() { + this.checkKeywordEscapes(); + if (this.options.tokens) { + this.pushToken(new Token(this.state)); + } + this.state.lastTokEndLoc = this.state.endLoc; + this.state.lastTokStartLoc = this.state.startLoc; + this.nextToken(); + } + eat(type) { + if (this.match(type)) { + this.next(); + return true; + } else { + return false; + } + } + match(type) { + return this.state.type === type; + } + createLookaheadState(state) { + return { + pos: state.pos, + value: null, + type: state.type, + start: state.start, + end: state.end, + context: [this.curContext()], + inType: state.inType, + startLoc: state.startLoc, + lastTokEndLoc: state.lastTokEndLoc, + curLine: state.curLine, + lineStart: state.lineStart, + curPosition: state.curPosition + }; + } + lookahead() { + const old = this.state; + this.state = this.createLookaheadState(old); + this.isLookahead = true; + this.nextToken(); + this.isLookahead = false; + const curr = this.state; + this.state = old; + return curr; + } + nextTokenStart() { + return this.nextTokenStartSince(this.state.pos); + } + nextTokenStartSince(pos) { + skipWhiteSpace.lastIndex = pos; + return skipWhiteSpace.test(this.input) ? skipWhiteSpace.lastIndex : pos; + } + lookaheadCharCode() { + return this.input.charCodeAt(this.nextTokenStart()); + } + nextTokenInLineStart() { + return this.nextTokenInLineStartSince(this.state.pos); + } + nextTokenInLineStartSince(pos) { + skipWhiteSpaceInLine.lastIndex = pos; + return skipWhiteSpaceInLine.test(this.input) ? skipWhiteSpaceInLine.lastIndex : pos; + } + lookaheadInLineCharCode() { + return this.input.charCodeAt(this.nextTokenInLineStart()); + } + codePointAtPos(pos) { + let cp = this.input.charCodeAt(pos); + if ((cp & 0xfc00) === 0xd800 && ++pos < this.input.length) { + const trail = this.input.charCodeAt(pos); + if ((trail & 0xfc00) === 0xdc00) { + cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff); + } + } + return cp; + } + setStrict(strict) { + this.state.strict = strict; + if (strict) { + this.state.strictErrors.forEach(([toParseError, at]) => this.raise(toParseError, at)); + this.state.strictErrors.clear(); + } + } + curContext() { + return this.state.context[this.state.context.length - 1]; + } + nextToken() { + this.skipSpace(); + this.state.start = this.state.pos; + if (!this.isLookahead) this.state.startLoc = this.state.curPosition(); + if (this.state.pos >= this.length) { + this.finishToken(139); + return; + } + this.getTokenFromCode(this.codePointAtPos(this.state.pos)); + } + skipBlockComment(commentEnd) { + let startLoc; + if (!this.isLookahead) startLoc = this.state.curPosition(); + const start = this.state.pos; + const end = this.input.indexOf(commentEnd, start + 2); + if (end === -1) { + throw this.raise(Errors.UnterminatedComment, this.state.curPosition()); + } + this.state.pos = end + commentEnd.length; + lineBreakG.lastIndex = start + 2; + while (lineBreakG.test(this.input) && lineBreakG.lastIndex <= end) { + ++this.state.curLine; + this.state.lineStart = lineBreakG.lastIndex; + } + if (this.isLookahead) return; + const comment = { + type: "CommentBlock", + value: this.input.slice(start + 2, end), + start, + end: end + commentEnd.length, + loc: new SourceLocation(startLoc, this.state.curPosition()) + }; + if (this.options.tokens) this.pushToken(comment); + return comment; + } + skipLineComment(startSkip) { + const start = this.state.pos; + let startLoc; + if (!this.isLookahead) startLoc = this.state.curPosition(); + let ch = this.input.charCodeAt(this.state.pos += startSkip); + if (this.state.pos < this.length) { + while (!isNewLine(ch) && ++this.state.pos < this.length) { + ch = this.input.charCodeAt(this.state.pos); + } + } + if (this.isLookahead) return; + const end = this.state.pos; + const value = this.input.slice(start + startSkip, end); + const comment = { + type: "CommentLine", + value, + start, + end, + loc: new SourceLocation(startLoc, this.state.curPosition()) + }; + if (this.options.tokens) this.pushToken(comment); + return comment; + } + skipSpace() { + const spaceStart = this.state.pos; + const comments = []; + loop: while (this.state.pos < this.length) { + const ch = this.input.charCodeAt(this.state.pos); + switch (ch) { + case 32: + case 160: + case 9: + ++this.state.pos; + break; + case 13: + if (this.input.charCodeAt(this.state.pos + 1) === 10) { + ++this.state.pos; + } + case 10: + case 8232: + case 8233: + ++this.state.pos; + ++this.state.curLine; + this.state.lineStart = this.state.pos; + break; + case 47: + switch (this.input.charCodeAt(this.state.pos + 1)) { + case 42: + { + const comment = this.skipBlockComment("*/"); + if (comment !== undefined) { + this.addComment(comment); + if (this.options.attachComment) comments.push(comment); + } + break; + } + case 47: + { + const comment = this.skipLineComment(2); + if (comment !== undefined) { + this.addComment(comment); + if (this.options.attachComment) comments.push(comment); + } + break; + } + default: + break loop; + } + break; + default: + if (isWhitespace(ch)) { + ++this.state.pos; + } else if (ch === 45 && !this.inModule && this.options.annexB) { + const pos = this.state.pos; + if (this.input.charCodeAt(pos + 1) === 45 && this.input.charCodeAt(pos + 2) === 62 && (spaceStart === 0 || this.state.lineStart > spaceStart)) { + const comment = this.skipLineComment(3); + if (comment !== undefined) { + this.addComment(comment); + if (this.options.attachComment) comments.push(comment); + } + } else { + break loop; + } + } else if (ch === 60 && !this.inModule && this.options.annexB) { + const pos = this.state.pos; + if (this.input.charCodeAt(pos + 1) === 33 && this.input.charCodeAt(pos + 2) === 45 && this.input.charCodeAt(pos + 3) === 45) { + const comment = this.skipLineComment(4); + if (comment !== undefined) { + this.addComment(comment); + if (this.options.attachComment) comments.push(comment); + } + } else { + break loop; + } + } else { + break loop; + } + } + } + if (comments.length > 0) { + const end = this.state.pos; + const commentWhitespace = { + start: spaceStart, + end, + comments, + leadingNode: null, + trailingNode: null, + containingNode: null + }; + this.state.commentStack.push(commentWhitespace); + } + } + finishToken(type, val) { + this.state.end = this.state.pos; + this.state.endLoc = this.state.curPosition(); + const prevType = this.state.type; + this.state.type = type; + this.state.value = val; + if (!this.isLookahead) { + this.updateContext(prevType); + } + } + replaceToken(type) { + this.state.type = type; + this.updateContext(); + } + readToken_numberSign() { + if (this.state.pos === 0 && this.readToken_interpreter()) { + return; + } + const nextPos = this.state.pos + 1; + const next = this.codePointAtPos(nextPos); + if (next >= 48 && next <= 57) { + throw this.raise(Errors.UnexpectedDigitAfterHash, this.state.curPosition()); + } + if (next === 123 || next === 91 && this.hasPlugin("recordAndTuple")) { + this.expectPlugin("recordAndTuple"); + if (this.getPluginOption("recordAndTuple", "syntaxType") === "bar") { + throw this.raise(next === 123 ? Errors.RecordExpressionHashIncorrectStartSyntaxType : Errors.TupleExpressionHashIncorrectStartSyntaxType, this.state.curPosition()); + } + this.state.pos += 2; + if (next === 123) { + this.finishToken(7); + } else { + this.finishToken(1); + } + } else if (isIdentifierStart(next)) { + ++this.state.pos; + this.finishToken(138, this.readWord1(next)); + } else if (next === 92) { + ++this.state.pos; + this.finishToken(138, this.readWord1()); + } else { + this.finishOp(27, 1); + } + } + readToken_dot() { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next >= 48 && next <= 57) { + this.readNumber(true); + return; + } + if (next === 46 && this.input.charCodeAt(this.state.pos + 2) === 46) { + this.state.pos += 3; + this.finishToken(21); + } else { + ++this.state.pos; + this.finishToken(16); + } + } + readToken_slash() { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === 61) { + this.finishOp(31, 2); + } else { + this.finishOp(56, 1); + } + } + readToken_interpreter() { + if (this.state.pos !== 0 || this.length < 2) return false; + let ch = this.input.charCodeAt(this.state.pos + 1); + if (ch !== 33) return false; + const start = this.state.pos; + this.state.pos += 1; + while (!isNewLine(ch) && ++this.state.pos < this.length) { + ch = this.input.charCodeAt(this.state.pos); + } + const value = this.input.slice(start + 2, this.state.pos); + this.finishToken(28, value); + return true; + } + readToken_mult_modulo(code) { + let type = code === 42 ? 55 : 54; + let width = 1; + let next = this.input.charCodeAt(this.state.pos + 1); + if (code === 42 && next === 42) { + width++; + next = this.input.charCodeAt(this.state.pos + 2); + type = 57; + } + if (next === 61 && !this.state.inType) { + width++; + type = code === 37 ? 33 : 30; + } + this.finishOp(type, width); + } + readToken_pipe_amp(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === code) { + if (this.input.charCodeAt(this.state.pos + 2) === 61) { + this.finishOp(30, 3); + } else { + this.finishOp(code === 124 ? 41 : 42, 2); + } + return; + } + if (code === 124) { + if (next === 62) { + this.finishOp(39, 2); + return; + } + if (this.hasPlugin("recordAndTuple") && next === 125) { + if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { + throw this.raise(Errors.RecordExpressionBarIncorrectEndSyntaxType, this.state.curPosition()); + } + this.state.pos += 2; + this.finishToken(9); + return; + } + if (this.hasPlugin("recordAndTuple") && next === 93) { + if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { + throw this.raise(Errors.TupleExpressionBarIncorrectEndSyntaxType, this.state.curPosition()); + } + this.state.pos += 2; + this.finishToken(4); + return; + } + } + if (next === 61) { + this.finishOp(30, 2); + return; + } + this.finishOp(code === 124 ? 43 : 45, 1); + } + readToken_caret() { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === 61 && !this.state.inType) { + this.finishOp(32, 2); + } else if (next === 94 && this.hasPlugin(["pipelineOperator", { + proposal: "hack", + topicToken: "^^" + }])) { + this.finishOp(37, 2); + const lookaheadCh = this.input.codePointAt(this.state.pos); + if (lookaheadCh === 94) { + this.unexpected(); + } + } else { + this.finishOp(44, 1); + } + } + readToken_atSign() { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === 64 && this.hasPlugin(["pipelineOperator", { + proposal: "hack", + topicToken: "@@" + }])) { + this.finishOp(38, 2); + } else { + this.finishOp(26, 1); + } + } + readToken_plus_min(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === code) { + this.finishOp(34, 2); + return; + } + if (next === 61) { + this.finishOp(30, 2); + } else { + this.finishOp(53, 1); + } + } + readToken_lt() { + const { + pos + } = this.state; + const next = this.input.charCodeAt(pos + 1); + if (next === 60) { + if (this.input.charCodeAt(pos + 2) === 61) { + this.finishOp(30, 3); + return; + } + this.finishOp(51, 2); + return; + } + if (next === 61) { + this.finishOp(49, 2); + return; + } + this.finishOp(47, 1); + } + readToken_gt() { + const { + pos + } = this.state; + const next = this.input.charCodeAt(pos + 1); + if (next === 62) { + const size = this.input.charCodeAt(pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(pos + size) === 61) { + this.finishOp(30, size + 1); + return; + } + this.finishOp(52, size); + return; + } + if (next === 61) { + this.finishOp(49, 2); + return; + } + this.finishOp(48, 1); + } + readToken_eq_excl(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === 61) { + this.finishOp(46, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2); + return; + } + if (code === 61 && next === 62) { + this.state.pos += 2; + this.finishToken(19); + return; + } + this.finishOp(code === 61 ? 29 : 35, 1); + } + readToken_question() { + const next = this.input.charCodeAt(this.state.pos + 1); + const next2 = this.input.charCodeAt(this.state.pos + 2); + if (next === 63) { + if (next2 === 61) { + this.finishOp(30, 3); + } else { + this.finishOp(40, 2); + } + } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) { + this.state.pos += 2; + this.finishToken(18); + } else { + ++this.state.pos; + this.finishToken(17); + } + } + getTokenFromCode(code) { + switch (code) { + case 46: + this.readToken_dot(); + return; + case 40: + ++this.state.pos; + this.finishToken(10); + return; + case 41: + ++this.state.pos; + this.finishToken(11); + return; + case 59: + ++this.state.pos; + this.finishToken(13); + return; + case 44: + ++this.state.pos; + this.finishToken(12); + return; + case 91: + if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) { + if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { + throw this.raise(Errors.TupleExpressionBarIncorrectStartSyntaxType, this.state.curPosition()); + } + this.state.pos += 2; + this.finishToken(2); + } else { + ++this.state.pos; + this.finishToken(0); + } + return; + case 93: + ++this.state.pos; + this.finishToken(3); + return; + case 123: + if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) { + if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { + throw this.raise(Errors.RecordExpressionBarIncorrectStartSyntaxType, this.state.curPosition()); + } + this.state.pos += 2; + this.finishToken(6); + } else { + ++this.state.pos; + this.finishToken(5); + } + return; + case 125: + ++this.state.pos; + this.finishToken(8); + return; + case 58: + if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) { + this.finishOp(15, 2); + } else { + ++this.state.pos; + this.finishToken(14); + } + return; + case 63: + this.readToken_question(); + return; + case 96: + this.readTemplateToken(); + return; + case 48: + { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === 120 || next === 88) { + this.readRadixNumber(16); + return; + } + if (next === 111 || next === 79) { + this.readRadixNumber(8); + return; + } + if (next === 98 || next === 66) { + this.readRadixNumber(2); + return; + } + } + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + this.readNumber(false); + return; + case 34: + case 39: + this.readString(code); + return; + case 47: + this.readToken_slash(); + return; + case 37: + case 42: + this.readToken_mult_modulo(code); + return; + case 124: + case 38: + this.readToken_pipe_amp(code); + return; + case 94: + this.readToken_caret(); + return; + case 43: + case 45: + this.readToken_plus_min(code); + return; + case 60: + this.readToken_lt(); + return; + case 62: + this.readToken_gt(); + return; + case 61: + case 33: + this.readToken_eq_excl(code); + return; + case 126: + this.finishOp(36, 1); + return; + case 64: + this.readToken_atSign(); + return; + case 35: + this.readToken_numberSign(); + return; + case 92: + this.readWord(); + return; + default: + if (isIdentifierStart(code)) { + this.readWord(code); + return; + } + } + throw this.raise(Errors.InvalidOrUnexpectedToken, this.state.curPosition(), { + unexpected: String.fromCodePoint(code) + }); + } + finishOp(type, size) { + const str = this.input.slice(this.state.pos, this.state.pos + size); + this.state.pos += size; + this.finishToken(type, str); + } + readRegexp() { + const startLoc = this.state.startLoc; + const start = this.state.start + 1; + let escaped, inClass; + let { + pos + } = this.state; + for (;; ++pos) { + if (pos >= this.length) { + throw this.raise(Errors.UnterminatedRegExp, createPositionWithColumnOffset(startLoc, 1)); + } + const ch = this.input.charCodeAt(pos); + if (isNewLine(ch)) { + throw this.raise(Errors.UnterminatedRegExp, createPositionWithColumnOffset(startLoc, 1)); + } + if (escaped) { + escaped = false; + } else { + if (ch === 91) { + inClass = true; + } else if (ch === 93 && inClass) { + inClass = false; + } else if (ch === 47 && !inClass) { + break; + } + escaped = ch === 92; + } + } + const content = this.input.slice(start, pos); + ++pos; + let mods = ""; + const nextPos = () => createPositionWithColumnOffset(startLoc, pos + 2 - start); + while (pos < this.length) { + const cp = this.codePointAtPos(pos); + const char = String.fromCharCode(cp); + if (VALID_REGEX_FLAGS.has(cp)) { + if (cp === 118) { + if (mods.includes("u")) { + this.raise(Errors.IncompatibleRegExpUVFlags, nextPos()); + } + } else if (cp === 117) { + if (mods.includes("v")) { + this.raise(Errors.IncompatibleRegExpUVFlags, nextPos()); + } + } + if (mods.includes(char)) { + this.raise(Errors.DuplicateRegExpFlags, nextPos()); + } + } else if (isIdentifierChar(cp) || cp === 92) { + this.raise(Errors.MalformedRegExpFlags, nextPos()); + } else { + break; + } + ++pos; + mods += char; + } + this.state.pos = pos; + this.finishToken(137, { + pattern: content, + flags: mods + }); + } + readInt(radix, len, forceLen = false, allowNumSeparator = true) { + const { + n, + pos + } = readInt(this.input, this.state.pos, this.state.lineStart, this.state.curLine, radix, len, forceLen, allowNumSeparator, this.errorHandlers_readInt, false); + this.state.pos = pos; + return n; + } + readRadixNumber(radix) { + const startLoc = this.state.curPosition(); + let isBigInt = false; + this.state.pos += 2; + const val = this.readInt(radix); + if (val == null) { + this.raise(Errors.InvalidDigit, createPositionWithColumnOffset(startLoc, 2), { + radix + }); + } + const next = this.input.charCodeAt(this.state.pos); + if (next === 110) { + ++this.state.pos; + isBigInt = true; + } else if (next === 109) { + throw this.raise(Errors.InvalidDecimal, startLoc); + } + if (isIdentifierStart(this.codePointAtPos(this.state.pos))) { + throw this.raise(Errors.NumberIdentifier, this.state.curPosition()); + } + if (isBigInt) { + const str = this.input.slice(startLoc.index, this.state.pos).replace(/[_n]/g, ""); + this.finishToken(135, str); + return; + } + this.finishToken(134, val); + } + readNumber(startsWithDot) { + const start = this.state.pos; + const startLoc = this.state.curPosition(); + let isFloat = false; + let isBigInt = false; + let isDecimal = false; + let hasExponent = false; + let isOctal = false; + if (!startsWithDot && this.readInt(10) === null) { + this.raise(Errors.InvalidNumber, this.state.curPosition()); + } + const hasLeadingZero = this.state.pos - start >= 2 && this.input.charCodeAt(start) === 48; + if (hasLeadingZero) { + const integer = this.input.slice(start, this.state.pos); + this.recordStrictModeErrors(Errors.StrictOctalLiteral, startLoc); + if (!this.state.strict) { + const underscorePos = integer.indexOf("_"); + if (underscorePos > 0) { + this.raise(Errors.ZeroDigitNumericSeparator, createPositionWithColumnOffset(startLoc, underscorePos)); + } + } + isOctal = hasLeadingZero && !/[89]/.test(integer); + } + let next = this.input.charCodeAt(this.state.pos); + if (next === 46 && !isOctal) { + ++this.state.pos; + this.readInt(10); + isFloat = true; + next = this.input.charCodeAt(this.state.pos); + } + if ((next === 69 || next === 101) && !isOctal) { + next = this.input.charCodeAt(++this.state.pos); + if (next === 43 || next === 45) { + ++this.state.pos; + } + if (this.readInt(10) === null) { + this.raise(Errors.InvalidOrMissingExponent, startLoc); + } + isFloat = true; + hasExponent = true; + next = this.input.charCodeAt(this.state.pos); + } + if (next === 110) { + if (isFloat || hasLeadingZero) { + this.raise(Errors.InvalidBigIntLiteral, startLoc); + } + ++this.state.pos; + isBigInt = true; + } + if (next === 109) { + this.expectPlugin("decimal", this.state.curPosition()); + if (hasExponent || hasLeadingZero) { + this.raise(Errors.InvalidDecimal, startLoc); + } + ++this.state.pos; + isDecimal = true; + } + if (isIdentifierStart(this.codePointAtPos(this.state.pos))) { + throw this.raise(Errors.NumberIdentifier, this.state.curPosition()); + } + const str = this.input.slice(start, this.state.pos).replace(/[_mn]/g, ""); + if (isBigInt) { + this.finishToken(135, str); + return; + } + if (isDecimal) { + this.finishToken(136, str); + return; + } + const val = isOctal ? parseInt(str, 8) : parseFloat(str); + this.finishToken(134, val); + } + readCodePoint(throwOnInvalid) { + const { + code, + pos + } = readCodePoint(this.input, this.state.pos, this.state.lineStart, this.state.curLine, throwOnInvalid, this.errorHandlers_readCodePoint); + this.state.pos = pos; + return code; + } + readString(quote) { + const { + str, + pos, + curLine, + lineStart + } = readStringContents(quote === 34 ? "double" : "single", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_string); + this.state.pos = pos + 1; + this.state.lineStart = lineStart; + this.state.curLine = curLine; + this.finishToken(133, str); + } + readTemplateContinuation() { + if (!this.match(8)) { + this.unexpected(null, 8); + } + this.state.pos--; + this.readTemplateToken(); + } + readTemplateToken() { + const opening = this.input[this.state.pos]; + const { + str, + firstInvalidLoc, + pos, + curLine, + lineStart + } = readStringContents("template", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_template); + this.state.pos = pos + 1; + this.state.lineStart = lineStart; + this.state.curLine = curLine; + if (firstInvalidLoc) { + this.state.firstInvalidTemplateEscapePos = new Position(firstInvalidLoc.curLine, firstInvalidLoc.pos - firstInvalidLoc.lineStart, firstInvalidLoc.pos); + } + if (this.input.codePointAt(pos) === 96) { + this.finishToken(24, firstInvalidLoc ? null : opening + str + "`"); + } else { + this.state.pos++; + this.finishToken(25, firstInvalidLoc ? null : opening + str + "${"); + } + } + recordStrictModeErrors(toParseError, at) { + const index = at.index; + if (this.state.strict && !this.state.strictErrors.has(index)) { + this.raise(toParseError, at); + } else { + this.state.strictErrors.set(index, [toParseError, at]); + } + } + readWord1(firstCode) { + this.state.containsEsc = false; + let word = ""; + const start = this.state.pos; + let chunkStart = this.state.pos; + if (firstCode !== undefined) { + this.state.pos += firstCode <= 0xffff ? 1 : 2; + } + while (this.state.pos < this.length) { + const ch = this.codePointAtPos(this.state.pos); + if (isIdentifierChar(ch)) { + this.state.pos += ch <= 0xffff ? 1 : 2; + } else if (ch === 92) { + this.state.containsEsc = true; + word += this.input.slice(chunkStart, this.state.pos); + const escStart = this.state.curPosition(); + const identifierCheck = this.state.pos === start ? isIdentifierStart : isIdentifierChar; + if (this.input.charCodeAt(++this.state.pos) !== 117) { + this.raise(Errors.MissingUnicodeEscape, this.state.curPosition()); + chunkStart = this.state.pos - 1; + continue; + } + ++this.state.pos; + const esc = this.readCodePoint(true); + if (esc !== null) { + if (!identifierCheck(esc)) { + this.raise(Errors.EscapedCharNotAnIdentifier, escStart); + } + word += String.fromCodePoint(esc); + } + chunkStart = this.state.pos; + } else { + break; + } + } + return word + this.input.slice(chunkStart, this.state.pos); + } + readWord(firstCode) { + const word = this.readWord1(firstCode); + const type = keywords$1.get(word); + if (type !== undefined) { + this.finishToken(type, tokenLabelName(type)); + } else { + this.finishToken(132, word); + } + } + checkKeywordEscapes() { + const { + type + } = this.state; + if (tokenIsKeyword(type) && this.state.containsEsc) { + this.raise(Errors.InvalidEscapedReservedWord, this.state.startLoc, { + reservedWord: tokenLabelName(type) + }); + } + } + raise(toParseError, at, details = {}) { + const loc = at instanceof Position ? at : at.loc.start; + const error = toParseError(loc, details); + if (!this.options.errorRecovery) throw error; + if (!this.isLookahead) this.state.errors.push(error); + return error; + } + raiseOverwrite(toParseError, at, details = {}) { + const loc = at instanceof Position ? at : at.loc.start; + const pos = loc.index; + const errors = this.state.errors; + for (let i = errors.length - 1; i >= 0; i--) { + const error = errors[i]; + if (error.loc.index === pos) { + return errors[i] = toParseError(loc, details); + } + if (error.loc.index < pos) break; + } + return this.raise(toParseError, at, details); + } + updateContext(prevType) {} + unexpected(loc, type) { + throw this.raise(Errors.UnexpectedToken, loc != null ? loc : this.state.startLoc, { + expected: type ? tokenLabelName(type) : null + }); + } + expectPlugin(pluginName, loc) { + if (this.hasPlugin(pluginName)) { + return true; + } + throw this.raise(Errors.MissingPlugin, loc != null ? loc : this.state.startLoc, { + missingPlugin: [pluginName] + }); + } + expectOnePlugin(pluginNames) { + if (!pluginNames.some(name => this.hasPlugin(name))) { + throw this.raise(Errors.MissingOneOfPlugins, this.state.startLoc, { + missingPlugin: pluginNames + }); + } + } + errorBuilder(error) { + return (pos, lineStart, curLine) => { + this.raise(error, buildPosition(pos, lineStart, curLine)); + }; + } + } + class ClassScope { + constructor() { + this.privateNames = new Set(); + this.loneAccessors = new Map(); + this.undefinedPrivateNames = new Map(); + } + } + class ClassScopeHandler { + constructor(parser) { + this.parser = void 0; + this.stack = []; + this.undefinedPrivateNames = new Map(); + this.parser = parser; + } + current() { + return this.stack[this.stack.length - 1]; + } + enter() { + this.stack.push(new ClassScope()); + } + exit() { + const oldClassScope = this.stack.pop(); + const current = this.current(); + for (const [name, loc] of Array.from(oldClassScope.undefinedPrivateNames)) { + if (current) { + if (!current.undefinedPrivateNames.has(name)) { + current.undefinedPrivateNames.set(name, loc); + } + } else { + this.parser.raise(Errors.InvalidPrivateFieldResolution, loc, { + identifierName: name + }); + } + } + } + declarePrivateName(name, elementType, loc) { + const { + privateNames, + loneAccessors, + undefinedPrivateNames + } = this.current(); + let redefined = privateNames.has(name); + if (elementType & 3) { + const accessor = redefined && loneAccessors.get(name); + if (accessor) { + const oldStatic = accessor & 4; + const newStatic = elementType & 4; + const oldKind = accessor & 3; + const newKind = elementType & 3; + redefined = oldKind === newKind || oldStatic !== newStatic; + if (!redefined) loneAccessors.delete(name); + } else if (!redefined) { + loneAccessors.set(name, elementType); + } + } + if (redefined) { + this.parser.raise(Errors.PrivateNameRedeclaration, loc, { + identifierName: name + }); + } + privateNames.add(name); + undefinedPrivateNames.delete(name); + } + usePrivateName(name, loc) { + let classScope; + for (classScope of this.stack) { + if (classScope.privateNames.has(name)) return; + } + if (classScope) { + classScope.undefinedPrivateNames.set(name, loc); + } else { + this.parser.raise(Errors.InvalidPrivateFieldResolution, loc, { + identifierName: name + }); + } + } + } + class ExpressionScope { + constructor(type = 0) { + this.type = type; + } + canBeArrowParameterDeclaration() { + return this.type === 2 || this.type === 1; + } + isCertainlyParameterDeclaration() { + return this.type === 3; + } + } + class ArrowHeadParsingScope extends ExpressionScope { + constructor(type) { + super(type); + this.declarationErrors = new Map(); + } + recordDeclarationError(ParsingErrorClass, at) { + const index = at.index; + this.declarationErrors.set(index, [ParsingErrorClass, at]); + } + clearDeclarationError(index) { + this.declarationErrors.delete(index); + } + iterateErrors(iterator) { + this.declarationErrors.forEach(iterator); + } + } + class ExpressionScopeHandler { + constructor(parser) { + this.parser = void 0; + this.stack = [new ExpressionScope()]; + this.parser = parser; + } + enter(scope) { + this.stack.push(scope); + } + exit() { + this.stack.pop(); + } + recordParameterInitializerError(toParseError, node) { + const origin = node.loc.start; + const { + stack + } = this; + let i = stack.length - 1; + let scope = stack[i]; + while (!scope.isCertainlyParameterDeclaration()) { + if (scope.canBeArrowParameterDeclaration()) { + scope.recordDeclarationError(toParseError, origin); + } else { + return; + } + scope = stack[--i]; + } + this.parser.raise(toParseError, origin); + } + recordArrowParameterBindingError(error, node) { + const { + stack + } = this; + const scope = stack[stack.length - 1]; + const origin = node.loc.start; + if (scope.isCertainlyParameterDeclaration()) { + this.parser.raise(error, origin); + } else if (scope.canBeArrowParameterDeclaration()) { + scope.recordDeclarationError(error, origin); + } else { + return; + } + } + recordAsyncArrowParametersError(at) { + const { + stack + } = this; + let i = stack.length - 1; + let scope = stack[i]; + while (scope.canBeArrowParameterDeclaration()) { + if (scope.type === 2) { + scope.recordDeclarationError(Errors.AwaitBindingIdentifier, at); + } + scope = stack[--i]; + } + } + validateAsPattern() { + const { + stack + } = this; + const currentScope = stack[stack.length - 1]; + if (!currentScope.canBeArrowParameterDeclaration()) return; + currentScope.iterateErrors(([toParseError, loc]) => { + this.parser.raise(toParseError, loc); + let i = stack.length - 2; + let scope = stack[i]; + while (scope.canBeArrowParameterDeclaration()) { + scope.clearDeclarationError(loc.index); + scope = stack[--i]; + } + }); + } + } + function newParameterDeclarationScope() { + return new ExpressionScope(3); + } + function newArrowHeadScope() { + return new ArrowHeadParsingScope(1); + } + function newAsyncArrowScope() { + return new ArrowHeadParsingScope(2); + } + function newExpressionScope() { + return new ExpressionScope(); + } + class ProductionParameterHandler { + constructor() { + this.stacks = []; + } + enter(flags) { + this.stacks.push(flags); + } + exit() { + this.stacks.pop(); + } + currentFlags() { + return this.stacks[this.stacks.length - 1]; + } + get hasAwait() { + return (this.currentFlags() & 2) > 0; + } + get hasYield() { + return (this.currentFlags() & 1) > 0; + } + get hasReturn() { + return (this.currentFlags() & 4) > 0; + } + get hasIn() { + return (this.currentFlags() & 8) > 0; + } + } + function functionFlags(isAsync, isGenerator) { + return (isAsync ? 2 : 0) | (isGenerator ? 1 : 0); + } + class UtilParser extends Tokenizer { + addExtra(node, key, value, enumerable = true) { + if (!node) return; + let { + extra + } = node; + if (extra == null) { + extra = {}; + node.extra = extra; + } + if (enumerable) { + extra[key] = value; + } else { + Object.defineProperty(extra, key, { + enumerable, + value + }); + } + } + isContextual(token) { + return this.state.type === token && !this.state.containsEsc; + } + isUnparsedContextual(nameStart, name) { + const nameEnd = nameStart + name.length; + if (this.input.slice(nameStart, nameEnd) === name) { + const nextCh = this.input.charCodeAt(nameEnd); + return !(isIdentifierChar(nextCh) || (nextCh & 0xfc00) === 0xd800); + } + return false; + } + isLookaheadContextual(name) { + const next = this.nextTokenStart(); + return this.isUnparsedContextual(next, name); + } + eatContextual(token) { + if (this.isContextual(token)) { + this.next(); + return true; + } + return false; + } + expectContextual(token, toParseError) { + if (!this.eatContextual(token)) { + if (toParseError != null) { + throw this.raise(toParseError, this.state.startLoc); + } + this.unexpected(null, token); + } + } + canInsertSemicolon() { + return this.match(139) || this.match(8) || this.hasPrecedingLineBreak(); + } + hasPrecedingLineBreak() { + return hasNewLine(this.input, this.state.lastTokEndLoc.index, this.state.start); + } + hasFollowingLineBreak() { + return hasNewLine(this.input, this.state.end, this.nextTokenStart()); + } + isLineTerminator() { + return this.eat(13) || this.canInsertSemicolon(); + } + semicolon(allowAsi = true) { + if (allowAsi ? this.isLineTerminator() : this.eat(13)) return; + this.raise(Errors.MissingSemicolon, this.state.lastTokEndLoc); + } + expect(type, loc) { + if (!this.eat(type)) { + this.unexpected(loc, type); + } + } + tryParse(fn, oldState = this.state.clone()) { + const abortSignal = { + node: null + }; + try { + const node = fn((node = null) => { + abortSignal.node = node; + throw abortSignal; + }); + if (this.state.errors.length > oldState.errors.length) { + const failState = this.state; + this.state = oldState; + this.state.tokensLength = failState.tokensLength; + return { + node, + error: failState.errors[oldState.errors.length], + thrown: false, + aborted: false, + failState + }; + } + return { + node, + error: null, + thrown: false, + aborted: false, + failState: null + }; + } catch (error) { + const failState = this.state; + this.state = oldState; + if (error instanceof SyntaxError) { + return { + node: null, + error, + thrown: true, + aborted: false, + failState + }; + } + if (error === abortSignal) { + return { + node: abortSignal.node, + error: null, + thrown: false, + aborted: true, + failState + }; + } + throw error; + } + } + checkExpressionErrors(refExpressionErrors, andThrow) { + if (!refExpressionErrors) return false; + const { + shorthandAssignLoc, + doubleProtoLoc, + privateKeyLoc, + optionalParametersLoc + } = refExpressionErrors; + const hasErrors = !!shorthandAssignLoc || !!doubleProtoLoc || !!optionalParametersLoc || !!privateKeyLoc; + if (!andThrow) { + return hasErrors; + } + if (shorthandAssignLoc != null) { + this.raise(Errors.InvalidCoverInitializedName, shorthandAssignLoc); + } + if (doubleProtoLoc != null) { + this.raise(Errors.DuplicateProto, doubleProtoLoc); + } + if (privateKeyLoc != null) { + this.raise(Errors.UnexpectedPrivateField, privateKeyLoc); + } + if (optionalParametersLoc != null) { + this.unexpected(optionalParametersLoc); + } + } + isLiteralPropertyName() { + return tokenIsLiteralPropertyName(this.state.type); + } + isPrivateName(node) { + return node.type === "PrivateName"; + } + getPrivateNameSV(node) { + return node.id.name; + } + hasPropertyAsPrivateName(node) { + return (node.type === "MemberExpression" || node.type === "OptionalMemberExpression") && this.isPrivateName(node.property); + } + isObjectProperty(node) { + return node.type === "ObjectProperty"; + } + isObjectMethod(node) { + return node.type === "ObjectMethod"; + } + initializeScopes(inModule = this.options.sourceType === "module") { + const oldLabels = this.state.labels; + this.state.labels = []; + const oldExportedIdentifiers = this.exportedIdentifiers; + this.exportedIdentifiers = new Set(); + const oldInModule = this.inModule; + this.inModule = inModule; + const oldScope = this.scope; + const ScopeHandler = this.getScopeHandler(); + this.scope = new ScopeHandler(this, inModule); + const oldProdParam = this.prodParam; + this.prodParam = new ProductionParameterHandler(); + const oldClassScope = this.classScope; + this.classScope = new ClassScopeHandler(this); + const oldExpressionScope = this.expressionScope; + this.expressionScope = new ExpressionScopeHandler(this); + return () => { + this.state.labels = oldLabels; + this.exportedIdentifiers = oldExportedIdentifiers; + this.inModule = oldInModule; + this.scope = oldScope; + this.prodParam = oldProdParam; + this.classScope = oldClassScope; + this.expressionScope = oldExpressionScope; + }; + } + enterInitialScopes() { + let paramFlags = 0; + if (this.inModule) { + paramFlags |= 2; + } + this.scope.enter(1); + this.prodParam.enter(paramFlags); + } + checkDestructuringPrivate(refExpressionErrors) { + const { + privateKeyLoc + } = refExpressionErrors; + if (privateKeyLoc !== null) { + this.expectPlugin("destructuringPrivate", privateKeyLoc); + } + } + } + class ExpressionErrors { + constructor() { + this.shorthandAssignLoc = null; + this.doubleProtoLoc = null; + this.privateKeyLoc = null; + this.optionalParametersLoc = null; + } + } + class Node { + constructor(parser, pos, loc) { + this.type = ""; + this.start = pos; + this.end = 0; + this.loc = new SourceLocation(loc); + if (parser != null && parser.options.ranges) this.range = [pos, 0]; + if (parser != null && parser.filename) this.loc.filename = parser.filename; + } + } + const NodePrototype = Node.prototype; + { + NodePrototype.__clone = function () { + const newNode = new Node(undefined, this.start, this.loc.start); + const keys = Object.keys(this); + for (let i = 0, length = keys.length; i < length; i++) { + const key = keys[i]; + if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") { + newNode[key] = this[key]; + } + } + return newNode; + }; + } + function clonePlaceholder(node) { + return cloneIdentifier(node); + } + function cloneIdentifier(node) { + const { + type, + start, + end, + loc, + range, + extra, + name + } = node; + const cloned = Object.create(NodePrototype); + cloned.type = type; + cloned.start = start; + cloned.end = end; + cloned.loc = loc; + cloned.range = range; + cloned.extra = extra; + cloned.name = name; + if (type === "Placeholder") { + cloned.expectedNode = node.expectedNode; + } + return cloned; + } + function cloneStringLiteral(node) { + const { + type, + start, + end, + loc, + range, + extra + } = node; + if (type === "Placeholder") { + return clonePlaceholder(node); + } + const cloned = Object.create(NodePrototype); + cloned.type = type; + cloned.start = start; + cloned.end = end; + cloned.loc = loc; + cloned.range = range; + if (node.raw !== undefined) { + cloned.raw = node.raw; + } else { + cloned.extra = extra; + } + cloned.value = node.value; + return cloned; + } + class NodeUtils extends UtilParser { + startNode() { + const loc = this.state.startLoc; + return new Node(this, loc.index, loc); + } + startNodeAt(loc) { + return new Node(this, loc.index, loc); + } + startNodeAtNode(type) { + return this.startNodeAt(type.loc.start); + } + finishNode(node, type) { + return this.finishNodeAt(node, type, this.state.lastTokEndLoc); + } + finishNodeAt(node, type, endLoc) { + node.type = type; + node.end = endLoc.index; + node.loc.end = endLoc; + if (this.options.ranges) node.range[1] = endLoc.index; + if (this.options.attachComment) this.processComment(node); + return node; + } + resetStartLocation(node, startLoc) { + node.start = startLoc.index; + node.loc.start = startLoc; + if (this.options.ranges) node.range[0] = startLoc.index; + } + resetEndLocation(node, endLoc = this.state.lastTokEndLoc) { + node.end = endLoc.index; + node.loc.end = endLoc; + if (this.options.ranges) node.range[1] = endLoc.index; + } + resetStartLocationFromNode(node, locationNode) { + this.resetStartLocation(node, locationNode.loc.start); + } + } + const reservedTypes = new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]); + const FlowErrors = ParseErrorEnum`flow`({ + AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.", + AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.", + AssignReservedType: ({ + reservedType + }) => `Cannot overwrite reserved type ${reservedType}.`, + DeclareClassElement: "The `declare` modifier can only appear on class fields.", + DeclareClassFieldInitializer: "Initializers are not allowed in fields with the `declare` modifier.", + DuplicateDeclareModuleExports: "Duplicate `declare module.exports` statement.", + EnumBooleanMemberNotInitialized: ({ + memberName, + enumName + }) => `Boolean enum members need to be initialized. Use either \`${memberName} = true,\` or \`${memberName} = false,\` in enum \`${enumName}\`.`, + EnumDuplicateMemberName: ({ + memberName, + enumName + }) => `Enum member names need to be unique, but the name \`${memberName}\` has already been used before in enum \`${enumName}\`.`, + EnumInconsistentMemberValues: ({ + enumName + }) => `Enum \`${enumName}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`, + EnumInvalidExplicitType: ({ + invalidEnumType, + enumName + }) => `Enum type \`${invalidEnumType}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${enumName}\`.`, + EnumInvalidExplicitTypeUnknownSupplied: ({ + enumName + }) => `Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${enumName}\`.`, + EnumInvalidMemberInitializerPrimaryType: ({ + enumName, + memberName, + explicitType + }) => `Enum \`${enumName}\` has type \`${explicitType}\`, so the initializer of \`${memberName}\` needs to be a ${explicitType} literal.`, + EnumInvalidMemberInitializerSymbolType: ({ + enumName, + memberName + }) => `Symbol enum members cannot be initialized. Use \`${memberName},\` in enum \`${enumName}\`.`, + EnumInvalidMemberInitializerUnknownType: ({ + enumName, + memberName + }) => `The enum member initializer for \`${memberName}\` needs to be a literal (either a boolean, number, or string) in enum \`${enumName}\`.`, + EnumInvalidMemberName: ({ + enumName, + memberName, + suggestion + }) => `Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${memberName}\`, consider using \`${suggestion}\`, in enum \`${enumName}\`.`, + EnumNumberMemberNotInitialized: ({ + enumName, + memberName + }) => `Number enum members need to be initialized, e.g. \`${memberName} = 1\` in enum \`${enumName}\`.`, + EnumStringMemberInconsistentlyInitialized: ({ + enumName + }) => `String enum members need to consistently either all use initializers, or use no initializers, in enum \`${enumName}\`.`, + GetterMayNotHaveThisParam: "A getter cannot have a `this` parameter.", + ImportReflectionHasImportType: "An `import module` declaration can not use `type` or `typeof` keyword.", + ImportTypeShorthandOnlyInPureImport: "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.", + InexactInsideExact: "Explicit inexact syntax cannot appear inside an explicit exact object type.", + InexactInsideNonObject: "Explicit inexact syntax cannot appear in class or interface definitions.", + InexactVariance: "Explicit inexact syntax cannot have variance.", + InvalidNonTypeImportInDeclareModule: "Imports within a `declare module` body must always be `import type` or `import typeof`.", + MissingTypeParamDefault: "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.", + NestedDeclareModule: "`declare module` cannot be used inside another `declare module`.", + NestedFlowComment: "Cannot have a flow comment inside another flow comment.", + PatternIsOptional: Object.assign({ + message: "A binding pattern parameter cannot be optional in an implementation signature." + }, { + reasonCode: "OptionalBindingPattern" + }), + SetterMayNotHaveThisParam: "A setter cannot have a `this` parameter.", + SpreadVariance: "Spread properties cannot have variance.", + ThisParamAnnotationRequired: "A type annotation is required for the `this` parameter.", + ThisParamBannedInConstructor: "Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.", + ThisParamMayNotBeOptional: "The `this` parameter cannot be optional.", + ThisParamMustBeFirst: "The `this` parameter must be the first function parameter.", + ThisParamNoDefault: "The `this` parameter may not have a default value.", + TypeBeforeInitializer: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", + TypeCastInPattern: "The type cast expression is expected to be wrapped with parenthesis.", + UnexpectedExplicitInexactInObject: "Explicit inexact syntax must appear at the end of an inexact object.", + UnexpectedReservedType: ({ + reservedType + }) => `Unexpected reserved type ${reservedType}.`, + UnexpectedReservedUnderscore: "`_` is only allowed as a type argument to call or new.", + UnexpectedSpaceBetweenModuloChecks: "Spaces between `%` and `checks` are not allowed here.", + UnexpectedSpreadType: "Spread operator cannot appear in class or interface definitions.", + UnexpectedSubtractionOperand: 'Unexpected token, expected "number" or "bigint".', + UnexpectedTokenAfterTypeParameter: "Expected an arrow function after this type parameter declaration.", + UnexpectedTypeParameterBeforeAsyncArrowFunction: "Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.", + UnsupportedDeclareExportKind: ({ + unsupportedExportKind, + suggestion + }) => `\`declare export ${unsupportedExportKind}\` is not supported. Use \`${suggestion}\` instead.`, + UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.", + UnterminatedFlowComment: "Unterminated flow-comment." + }); + function isEsModuleType(bodyElement) { + return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration"); + } + function hasTypeImportKind(node) { + return node.importKind === "type" || node.importKind === "typeof"; + } + const exportSuggestions = { + const: "declare export var", + let: "declare export var", + type: "export type", + interface: "export interface" + }; + function partition(list, test) { + const list1 = []; + const list2 = []; + for (let i = 0; i < list.length; i++) { + (test(list[i], i, list) ? list1 : list2).push(list[i]); + } + return [list1, list2]; + } + const FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/; + var flow = superClass => class FlowParserMixin extends superClass { + constructor(...args) { + super(...args); + this.flowPragma = undefined; + } + getScopeHandler() { + return FlowScopeHandler; + } + shouldParseTypes() { + return this.getPluginOption("flow", "all") || this.flowPragma === "flow"; + } + shouldParseEnums() { + return !!this.getPluginOption("flow", "enums"); + } + finishToken(type, val) { + if (type !== 133 && type !== 13 && type !== 28) { + if (this.flowPragma === undefined) { + this.flowPragma = null; + } + } + super.finishToken(type, val); + } + addComment(comment) { + if (this.flowPragma === undefined) { + const matches = FLOW_PRAGMA_REGEX.exec(comment.value); + if (!matches) ;else if (matches[1] === "flow") { + this.flowPragma = "flow"; + } else if (matches[1] === "noflow") { + this.flowPragma = "noflow"; + } else { + throw new Error("Unexpected flow pragma"); + } + } + super.addComment(comment); + } + flowParseTypeInitialiser(tok) { + const oldInType = this.state.inType; + this.state.inType = true; + this.expect(tok || 14); + const type = this.flowParseType(); + this.state.inType = oldInType; + return type; + } + flowParsePredicate() { + const node = this.startNode(); + const moduloLoc = this.state.startLoc; + this.next(); + this.expectContextual(110); + if (this.state.lastTokStartLoc.index > moduloLoc.index + 1) { + this.raise(FlowErrors.UnexpectedSpaceBetweenModuloChecks, moduloLoc); + } + if (this.eat(10)) { + node.value = super.parseExpression(); + this.expect(11); + return this.finishNode(node, "DeclaredPredicate"); + } else { + return this.finishNode(node, "InferredPredicate"); + } + } + flowParseTypeAndPredicateInitialiser() { + const oldInType = this.state.inType; + this.state.inType = true; + this.expect(14); + let type = null; + let predicate = null; + if (this.match(54)) { + this.state.inType = oldInType; + predicate = this.flowParsePredicate(); + } else { + type = this.flowParseType(); + this.state.inType = oldInType; + if (this.match(54)) { + predicate = this.flowParsePredicate(); + } + } + return [type, predicate]; + } + flowParseDeclareClass(node) { + this.next(); + this.flowParseInterfaceish(node, true); + return this.finishNode(node, "DeclareClass"); + } + flowParseDeclareFunction(node) { + this.next(); + const id = node.id = this.parseIdentifier(); + const typeNode = this.startNode(); + const typeContainer = this.startNode(); + if (this.match(47)) { + typeNode.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + typeNode.typeParameters = null; + } + this.expect(10); + const tmp = this.flowParseFunctionTypeParams(); + typeNode.params = tmp.params; + typeNode.rest = tmp.rest; + typeNode.this = tmp._this; + this.expect(11); + [typeNode.returnType, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); + typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation"); + id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation"); + this.resetEndLocation(id); + this.semicolon(); + this.scope.declareName(node.id.name, 2048, node.id.loc.start); + return this.finishNode(node, "DeclareFunction"); + } + flowParseDeclare(node, insideModule) { + if (this.match(80)) { + return this.flowParseDeclareClass(node); + } else if (this.match(68)) { + return this.flowParseDeclareFunction(node); + } else if (this.match(74)) { + return this.flowParseDeclareVariable(node); + } else if (this.eatContextual(127)) { + if (this.match(16)) { + return this.flowParseDeclareModuleExports(node); + } else { + if (insideModule) { + this.raise(FlowErrors.NestedDeclareModule, this.state.lastTokStartLoc); + } + return this.flowParseDeclareModule(node); + } + } else if (this.isContextual(130)) { + return this.flowParseDeclareTypeAlias(node); + } else if (this.isContextual(131)) { + return this.flowParseDeclareOpaqueType(node); + } else if (this.isContextual(129)) { + return this.flowParseDeclareInterface(node); + } else if (this.match(82)) { + return this.flowParseDeclareExportDeclaration(node, insideModule); + } else { + this.unexpected(); + } + } + flowParseDeclareVariable(node) { + this.next(); + node.id = this.flowParseTypeAnnotatableIdentifier(true); + this.scope.declareName(node.id.name, 5, node.id.loc.start); + this.semicolon(); + return this.finishNode(node, "DeclareVariable"); + } + flowParseDeclareModule(node) { + this.scope.enter(0); + if (this.match(133)) { + node.id = super.parseExprAtom(); + } else { + node.id = this.parseIdentifier(); + } + const bodyNode = node.body = this.startNode(); + const body = bodyNode.body = []; + this.expect(5); + while (!this.match(8)) { + let bodyNode = this.startNode(); + if (this.match(83)) { + this.next(); + if (!this.isContextual(130) && !this.match(87)) { + this.raise(FlowErrors.InvalidNonTypeImportInDeclareModule, this.state.lastTokStartLoc); + } + super.parseImport(bodyNode); + } else { + this.expectContextual(125, FlowErrors.UnsupportedStatementInDeclareModule); + bodyNode = this.flowParseDeclare(bodyNode, true); + } + body.push(bodyNode); + } + this.scope.exit(); + this.expect(8); + this.finishNode(bodyNode, "BlockStatement"); + let kind = null; + let hasModuleExport = false; + body.forEach(bodyElement => { + if (isEsModuleType(bodyElement)) { + if (kind === "CommonJS") { + this.raise(FlowErrors.AmbiguousDeclareModuleKind, bodyElement); + } + kind = "ES"; + } else if (bodyElement.type === "DeclareModuleExports") { + if (hasModuleExport) { + this.raise(FlowErrors.DuplicateDeclareModuleExports, bodyElement); + } + if (kind === "ES") { + this.raise(FlowErrors.AmbiguousDeclareModuleKind, bodyElement); + } + kind = "CommonJS"; + hasModuleExport = true; + } + }); + node.kind = kind || "CommonJS"; + return this.finishNode(node, "DeclareModule"); + } + flowParseDeclareExportDeclaration(node, insideModule) { + this.expect(82); + if (this.eat(65)) { + if (this.match(68) || this.match(80)) { + node.declaration = this.flowParseDeclare(this.startNode()); + } else { + node.declaration = this.flowParseType(); + this.semicolon(); + } + node.default = true; + return this.finishNode(node, "DeclareExportDeclaration"); + } else { + if (this.match(75) || this.isLet() || (this.isContextual(130) || this.isContextual(129)) && !insideModule) { + const label = this.state.value; + throw this.raise(FlowErrors.UnsupportedDeclareExportKind, this.state.startLoc, { + unsupportedExportKind: label, + suggestion: exportSuggestions[label] + }); + } + if (this.match(74) || this.match(68) || this.match(80) || this.isContextual(131)) { + node.declaration = this.flowParseDeclare(this.startNode()); + node.default = false; + return this.finishNode(node, "DeclareExportDeclaration"); + } else if (this.match(55) || this.match(5) || this.isContextual(129) || this.isContextual(130) || this.isContextual(131)) { + node = this.parseExport(node, null); + if (node.type === "ExportNamedDeclaration") { + node.type = "ExportDeclaration"; + node.default = false; + delete node.exportKind; + } + node.type = "Declare" + node.type; + return node; + } + } + this.unexpected(); + } + flowParseDeclareModuleExports(node) { + this.next(); + this.expectContextual(111); + node.typeAnnotation = this.flowParseTypeAnnotation(); + this.semicolon(); + return this.finishNode(node, "DeclareModuleExports"); + } + flowParseDeclareTypeAlias(node) { + this.next(); + const finished = this.flowParseTypeAlias(node); + finished.type = "DeclareTypeAlias"; + return finished; + } + flowParseDeclareOpaqueType(node) { + this.next(); + const finished = this.flowParseOpaqueType(node, true); + finished.type = "DeclareOpaqueType"; + return finished; + } + flowParseDeclareInterface(node) { + this.next(); + this.flowParseInterfaceish(node, false); + return this.finishNode(node, "DeclareInterface"); + } + flowParseInterfaceish(node, isClass) { + node.id = this.flowParseRestrictedIdentifier(!isClass, true); + this.scope.declareName(node.id.name, isClass ? 17 : 8201, node.id.loc.start); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + node.typeParameters = null; + } + node.extends = []; + if (this.eat(81)) { + do { + node.extends.push(this.flowParseInterfaceExtends()); + } while (!isClass && this.eat(12)); + } + if (isClass) { + node.implements = []; + node.mixins = []; + if (this.eatContextual(117)) { + do { + node.mixins.push(this.flowParseInterfaceExtends()); + } while (this.eat(12)); + } + if (this.eatContextual(113)) { + do { + node.implements.push(this.flowParseInterfaceExtends()); + } while (this.eat(12)); + } + } + node.body = this.flowParseObjectType({ + allowStatic: isClass, + allowExact: false, + allowSpread: false, + allowProto: isClass, + allowInexact: false + }); + } + flowParseInterfaceExtends() { + const node = this.startNode(); + node.id = this.flowParseQualifiedTypeIdentifier(); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterInstantiation(); + } else { + node.typeParameters = null; + } + return this.finishNode(node, "InterfaceExtends"); + } + flowParseInterface(node) { + this.flowParseInterfaceish(node, false); + return this.finishNode(node, "InterfaceDeclaration"); + } + checkNotUnderscore(word) { + if (word === "_") { + this.raise(FlowErrors.UnexpectedReservedUnderscore, this.state.startLoc); + } + } + checkReservedType(word, startLoc, declaration) { + if (!reservedTypes.has(word)) return; + this.raise(declaration ? FlowErrors.AssignReservedType : FlowErrors.UnexpectedReservedType, startLoc, { + reservedType: word + }); + } + flowParseRestrictedIdentifier(liberal, declaration) { + this.checkReservedType(this.state.value, this.state.startLoc, declaration); + return this.parseIdentifier(liberal); + } + flowParseTypeAlias(node) { + node.id = this.flowParseRestrictedIdentifier(false, true); + this.scope.declareName(node.id.name, 8201, node.id.loc.start); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + node.typeParameters = null; + } + node.right = this.flowParseTypeInitialiser(29); + this.semicolon(); + return this.finishNode(node, "TypeAlias"); + } + flowParseOpaqueType(node, declare) { + this.expectContextual(130); + node.id = this.flowParseRestrictedIdentifier(true, true); + this.scope.declareName(node.id.name, 8201, node.id.loc.start); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + node.typeParameters = null; + } + node.supertype = null; + if (this.match(14)) { + node.supertype = this.flowParseTypeInitialiser(14); + } + node.impltype = null; + if (!declare) { + node.impltype = this.flowParseTypeInitialiser(29); + } + this.semicolon(); + return this.finishNode(node, "OpaqueType"); + } + flowParseTypeParameter(requireDefault = false) { + const nodeStartLoc = this.state.startLoc; + const node = this.startNode(); + const variance = this.flowParseVariance(); + const ident = this.flowParseTypeAnnotatableIdentifier(); + node.name = ident.name; + node.variance = variance; + node.bound = ident.typeAnnotation; + if (this.match(29)) { + this.eat(29); + node.default = this.flowParseType(); + } else { + if (requireDefault) { + this.raise(FlowErrors.MissingTypeParamDefault, nodeStartLoc); + } + } + return this.finishNode(node, "TypeParameter"); + } + flowParseTypeParameterDeclaration() { + const oldInType = this.state.inType; + const node = this.startNode(); + node.params = []; + this.state.inType = true; + if (this.match(47) || this.match(142)) { + this.next(); + } else { + this.unexpected(); + } + let defaultRequired = false; + do { + const typeParameter = this.flowParseTypeParameter(defaultRequired); + node.params.push(typeParameter); + if (typeParameter.default) { + defaultRequired = true; + } + if (!this.match(48)) { + this.expect(12); + } + } while (!this.match(48)); + this.expect(48); + this.state.inType = oldInType; + return this.finishNode(node, "TypeParameterDeclaration"); + } + flowParseTypeParameterInstantiation() { + const node = this.startNode(); + const oldInType = this.state.inType; + node.params = []; + this.state.inType = true; + this.expect(47); + const oldNoAnonFunctionType = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = false; + while (!this.match(48)) { + node.params.push(this.flowParseType()); + if (!this.match(48)) { + this.expect(12); + } + } + this.state.noAnonFunctionType = oldNoAnonFunctionType; + this.expect(48); + this.state.inType = oldInType; + return this.finishNode(node, "TypeParameterInstantiation"); + } + flowParseTypeParameterInstantiationCallOrNew() { + const node = this.startNode(); + const oldInType = this.state.inType; + node.params = []; + this.state.inType = true; + this.expect(47); + while (!this.match(48)) { + node.params.push(this.flowParseTypeOrImplicitInstantiation()); + if (!this.match(48)) { + this.expect(12); + } + } + this.expect(48); + this.state.inType = oldInType; + return this.finishNode(node, "TypeParameterInstantiation"); + } + flowParseInterfaceType() { + const node = this.startNode(); + this.expectContextual(129); + node.extends = []; + if (this.eat(81)) { + do { + node.extends.push(this.flowParseInterfaceExtends()); + } while (this.eat(12)); + } + node.body = this.flowParseObjectType({ + allowStatic: false, + allowExact: false, + allowSpread: false, + allowProto: false, + allowInexact: false + }); + return this.finishNode(node, "InterfaceTypeAnnotation"); + } + flowParseObjectPropertyKey() { + return this.match(134) || this.match(133) ? super.parseExprAtom() : this.parseIdentifier(true); + } + flowParseObjectTypeIndexer(node, isStatic, variance) { + node.static = isStatic; + if (this.lookahead().type === 14) { + node.id = this.flowParseObjectPropertyKey(); + node.key = this.flowParseTypeInitialiser(); + } else { + node.id = null; + node.key = this.flowParseType(); + } + this.expect(3); + node.value = this.flowParseTypeInitialiser(); + node.variance = variance; + return this.finishNode(node, "ObjectTypeIndexer"); + } + flowParseObjectTypeInternalSlot(node, isStatic) { + node.static = isStatic; + node.id = this.flowParseObjectPropertyKey(); + this.expect(3); + this.expect(3); + if (this.match(47) || this.match(10)) { + node.method = true; + node.optional = false; + node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.loc.start)); + } else { + node.method = false; + if (this.eat(17)) { + node.optional = true; + } + node.value = this.flowParseTypeInitialiser(); + } + return this.finishNode(node, "ObjectTypeInternalSlot"); + } + flowParseObjectTypeMethodish(node) { + node.params = []; + node.rest = null; + node.typeParameters = null; + node.this = null; + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } + this.expect(10); + if (this.match(78)) { + node.this = this.flowParseFunctionTypeParam(true); + node.this.name = null; + if (!this.match(11)) { + this.expect(12); + } + } + while (!this.match(11) && !this.match(21)) { + node.params.push(this.flowParseFunctionTypeParam(false)); + if (!this.match(11)) { + this.expect(12); + } + } + if (this.eat(21)) { + node.rest = this.flowParseFunctionTypeParam(false); + } + this.expect(11); + node.returnType = this.flowParseTypeInitialiser(); + return this.finishNode(node, "FunctionTypeAnnotation"); + } + flowParseObjectTypeCallProperty(node, isStatic) { + const valueNode = this.startNode(); + node.static = isStatic; + node.value = this.flowParseObjectTypeMethodish(valueNode); + return this.finishNode(node, "ObjectTypeCallProperty"); + } + flowParseObjectType({ + allowStatic, + allowExact, + allowSpread, + allowProto, + allowInexact + }) { + const oldInType = this.state.inType; + this.state.inType = true; + const nodeStart = this.startNode(); + nodeStart.callProperties = []; + nodeStart.properties = []; + nodeStart.indexers = []; + nodeStart.internalSlots = []; + let endDelim; + let exact; + let inexact = false; + if (allowExact && this.match(6)) { + this.expect(6); + endDelim = 9; + exact = true; + } else { + this.expect(5); + endDelim = 8; + exact = false; + } + nodeStart.exact = exact; + while (!this.match(endDelim)) { + let isStatic = false; + let protoStartLoc = null; + let inexactStartLoc = null; + const node = this.startNode(); + if (allowProto && this.isContextual(118)) { + const lookahead = this.lookahead(); + if (lookahead.type !== 14 && lookahead.type !== 17) { + this.next(); + protoStartLoc = this.state.startLoc; + allowStatic = false; + } + } + if (allowStatic && this.isContextual(106)) { + const lookahead = this.lookahead(); + if (lookahead.type !== 14 && lookahead.type !== 17) { + this.next(); + isStatic = true; + } + } + const variance = this.flowParseVariance(); + if (this.eat(0)) { + if (protoStartLoc != null) { + this.unexpected(protoStartLoc); + } + if (this.eat(0)) { + if (variance) { + this.unexpected(variance.loc.start); + } + nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic)); + } else { + nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance)); + } + } else if (this.match(10) || this.match(47)) { + if (protoStartLoc != null) { + this.unexpected(protoStartLoc); + } + if (variance) { + this.unexpected(variance.loc.start); + } + nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic)); + } else { + let kind = "init"; + if (this.isContextual(99) || this.isContextual(104)) { + const lookahead = this.lookahead(); + if (tokenIsLiteralPropertyName(lookahead.type)) { + kind = this.state.value; + this.next(); + } + } + const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStartLoc, variance, kind, allowSpread, allowInexact != null ? allowInexact : !exact); + if (propOrInexact === null) { + inexact = true; + inexactStartLoc = this.state.lastTokStartLoc; + } else { + nodeStart.properties.push(propOrInexact); + } + } + this.flowObjectTypeSemicolon(); + if (inexactStartLoc && !this.match(8) && !this.match(9)) { + this.raise(FlowErrors.UnexpectedExplicitInexactInObject, inexactStartLoc); + } + } + this.expect(endDelim); + if (allowSpread) { + nodeStart.inexact = inexact; + } + const out = this.finishNode(nodeStart, "ObjectTypeAnnotation"); + this.state.inType = oldInType; + return out; + } + flowParseObjectTypeProperty(node, isStatic, protoStartLoc, variance, kind, allowSpread, allowInexact) { + if (this.eat(21)) { + const isInexactToken = this.match(12) || this.match(13) || this.match(8) || this.match(9); + if (isInexactToken) { + if (!allowSpread) { + this.raise(FlowErrors.InexactInsideNonObject, this.state.lastTokStartLoc); + } else if (!allowInexact) { + this.raise(FlowErrors.InexactInsideExact, this.state.lastTokStartLoc); + } + if (variance) { + this.raise(FlowErrors.InexactVariance, variance); + } + return null; + } + if (!allowSpread) { + this.raise(FlowErrors.UnexpectedSpreadType, this.state.lastTokStartLoc); + } + if (protoStartLoc != null) { + this.unexpected(protoStartLoc); + } + if (variance) { + this.raise(FlowErrors.SpreadVariance, variance); + } + node.argument = this.flowParseType(); + return this.finishNode(node, "ObjectTypeSpreadProperty"); + } else { + node.key = this.flowParseObjectPropertyKey(); + node.static = isStatic; + node.proto = protoStartLoc != null; + node.kind = kind; + let optional = false; + if (this.match(47) || this.match(10)) { + node.method = true; + if (protoStartLoc != null) { + this.unexpected(protoStartLoc); + } + if (variance) { + this.unexpected(variance.loc.start); + } + node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.loc.start)); + if (kind === "get" || kind === "set") { + this.flowCheckGetterSetterParams(node); + } + if (!allowSpread && node.key.name === "constructor" && node.value.this) { + this.raise(FlowErrors.ThisParamBannedInConstructor, node.value.this); + } + } else { + if (kind !== "init") this.unexpected(); + node.method = false; + if (this.eat(17)) { + optional = true; + } + node.value = this.flowParseTypeInitialiser(); + node.variance = variance; + } + node.optional = optional; + return this.finishNode(node, "ObjectTypeProperty"); + } + } + flowCheckGetterSetterParams(property) { + const paramCount = property.kind === "get" ? 0 : 1; + const length = property.value.params.length + (property.value.rest ? 1 : 0); + if (property.value.this) { + this.raise(property.kind === "get" ? FlowErrors.GetterMayNotHaveThisParam : FlowErrors.SetterMayNotHaveThisParam, property.value.this); + } + if (length !== paramCount) { + this.raise(property.kind === "get" ? Errors.BadGetterArity : Errors.BadSetterArity, property); + } + if (property.kind === "set" && property.value.rest) { + this.raise(Errors.BadSetterRestParameter, property); + } + } + flowObjectTypeSemicolon() { + if (!this.eat(13) && !this.eat(12) && !this.match(8) && !this.match(9)) { + this.unexpected(); + } + } + flowParseQualifiedTypeIdentifier(startLoc, id) { + var _startLoc; + (_startLoc = startLoc) != null ? _startLoc : startLoc = this.state.startLoc; + let node = id || this.flowParseRestrictedIdentifier(true); + while (this.eat(16)) { + const node2 = this.startNodeAt(startLoc); + node2.qualification = node; + node2.id = this.flowParseRestrictedIdentifier(true); + node = this.finishNode(node2, "QualifiedTypeIdentifier"); + } + return node; + } + flowParseGenericType(startLoc, id) { + const node = this.startNodeAt(startLoc); + node.typeParameters = null; + node.id = this.flowParseQualifiedTypeIdentifier(startLoc, id); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterInstantiation(); + } + return this.finishNode(node, "GenericTypeAnnotation"); + } + flowParseTypeofType() { + const node = this.startNode(); + this.expect(87); + node.argument = this.flowParsePrimaryType(); + return this.finishNode(node, "TypeofTypeAnnotation"); + } + flowParseTupleType() { + const node = this.startNode(); + node.types = []; + this.expect(0); + while (this.state.pos < this.length && !this.match(3)) { + node.types.push(this.flowParseType()); + if (this.match(3)) break; + this.expect(12); + } + this.expect(3); + return this.finishNode(node, "TupleTypeAnnotation"); + } + flowParseFunctionTypeParam(first) { + let name = null; + let optional = false; + let typeAnnotation = null; + const node = this.startNode(); + const lh = this.lookahead(); + const isThis = this.state.type === 78; + if (lh.type === 14 || lh.type === 17) { + if (isThis && !first) { + this.raise(FlowErrors.ThisParamMustBeFirst, node); + } + name = this.parseIdentifier(isThis); + if (this.eat(17)) { + optional = true; + if (isThis) { + this.raise(FlowErrors.ThisParamMayNotBeOptional, node); + } + } + typeAnnotation = this.flowParseTypeInitialiser(); + } else { + typeAnnotation = this.flowParseType(); + } + node.name = name; + node.optional = optional; + node.typeAnnotation = typeAnnotation; + return this.finishNode(node, "FunctionTypeParam"); + } + reinterpretTypeAsFunctionTypeParam(type) { + const node = this.startNodeAt(type.loc.start); + node.name = null; + node.optional = false; + node.typeAnnotation = type; + return this.finishNode(node, "FunctionTypeParam"); + } + flowParseFunctionTypeParams(params = []) { + let rest = null; + let _this = null; + if (this.match(78)) { + _this = this.flowParseFunctionTypeParam(true); + _this.name = null; + if (!this.match(11)) { + this.expect(12); + } + } + while (!this.match(11) && !this.match(21)) { + params.push(this.flowParseFunctionTypeParam(false)); + if (!this.match(11)) { + this.expect(12); + } + } + if (this.eat(21)) { + rest = this.flowParseFunctionTypeParam(false); + } + return { + params, + rest, + _this + }; + } + flowIdentToTypeAnnotation(startLoc, node, id) { + switch (id.name) { + case "any": + return this.finishNode(node, "AnyTypeAnnotation"); + case "bool": + case "boolean": + return this.finishNode(node, "BooleanTypeAnnotation"); + case "mixed": + return this.finishNode(node, "MixedTypeAnnotation"); + case "empty": + return this.finishNode(node, "EmptyTypeAnnotation"); + case "number": + return this.finishNode(node, "NumberTypeAnnotation"); + case "string": + return this.finishNode(node, "StringTypeAnnotation"); + case "symbol": + return this.finishNode(node, "SymbolTypeAnnotation"); + default: + this.checkNotUnderscore(id.name); + return this.flowParseGenericType(startLoc, id); + } + } + flowParsePrimaryType() { + const startLoc = this.state.startLoc; + const node = this.startNode(); + let tmp; + let type; + let isGroupedType = false; + const oldNoAnonFunctionType = this.state.noAnonFunctionType; + switch (this.state.type) { + case 5: + return this.flowParseObjectType({ + allowStatic: false, + allowExact: false, + allowSpread: true, + allowProto: false, + allowInexact: true + }); + case 6: + return this.flowParseObjectType({ + allowStatic: false, + allowExact: true, + allowSpread: true, + allowProto: false, + allowInexact: false + }); + case 0: + this.state.noAnonFunctionType = false; + type = this.flowParseTupleType(); + this.state.noAnonFunctionType = oldNoAnonFunctionType; + return type; + case 47: + { + const node = this.startNode(); + node.typeParameters = this.flowParseTypeParameterDeclaration(); + this.expect(10); + tmp = this.flowParseFunctionTypeParams(); + node.params = tmp.params; + node.rest = tmp.rest; + node.this = tmp._this; + this.expect(11); + this.expect(19); + node.returnType = this.flowParseType(); + return this.finishNode(node, "FunctionTypeAnnotation"); + } + case 10: + { + const node = this.startNode(); + this.next(); + if (!this.match(11) && !this.match(21)) { + if (tokenIsIdentifier(this.state.type) || this.match(78)) { + const token = this.lookahead().type; + isGroupedType = token !== 17 && token !== 14; + } else { + isGroupedType = true; + } + } + if (isGroupedType) { + this.state.noAnonFunctionType = false; + type = this.flowParseType(); + this.state.noAnonFunctionType = oldNoAnonFunctionType; + if (this.state.noAnonFunctionType || !(this.match(12) || this.match(11) && this.lookahead().type === 19)) { + this.expect(11); + return type; + } else { + this.eat(12); + } + } + if (type) { + tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]); + } else { + tmp = this.flowParseFunctionTypeParams(); + } + node.params = tmp.params; + node.rest = tmp.rest; + node.this = tmp._this; + this.expect(11); + this.expect(19); + node.returnType = this.flowParseType(); + node.typeParameters = null; + return this.finishNode(node, "FunctionTypeAnnotation"); + } + case 133: + return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation"); + case 85: + case 86: + node.value = this.match(85); + this.next(); + return this.finishNode(node, "BooleanLiteralTypeAnnotation"); + case 53: + if (this.state.value === "-") { + this.next(); + if (this.match(134)) { + return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node); + } + if (this.match(135)) { + return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node); + } + throw this.raise(FlowErrors.UnexpectedSubtractionOperand, this.state.startLoc); + } + this.unexpected(); + return; + case 134: + return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation"); + case 135: + return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation"); + case 88: + this.next(); + return this.finishNode(node, "VoidTypeAnnotation"); + case 84: + this.next(); + return this.finishNode(node, "NullLiteralTypeAnnotation"); + case 78: + this.next(); + return this.finishNode(node, "ThisTypeAnnotation"); + case 55: + this.next(); + return this.finishNode(node, "ExistsTypeAnnotation"); + case 87: + return this.flowParseTypeofType(); + default: + if (tokenIsKeyword(this.state.type)) { + const label = tokenLabelName(this.state.type); + this.next(); + return super.createIdentifier(node, label); + } else if (tokenIsIdentifier(this.state.type)) { + if (this.isContextual(129)) { + return this.flowParseInterfaceType(); + } + return this.flowIdentToTypeAnnotation(startLoc, node, this.parseIdentifier()); + } + } + this.unexpected(); + } + flowParsePostfixType() { + const startLoc = this.state.startLoc; + let type = this.flowParsePrimaryType(); + let seenOptionalIndexedAccess = false; + while ((this.match(0) || this.match(18)) && !this.canInsertSemicolon()) { + const node = this.startNodeAt(startLoc); + const optional = this.eat(18); + seenOptionalIndexedAccess = seenOptionalIndexedAccess || optional; + this.expect(0); + if (!optional && this.match(3)) { + node.elementType = type; + this.next(); + type = this.finishNode(node, "ArrayTypeAnnotation"); + } else { + node.objectType = type; + node.indexType = this.flowParseType(); + this.expect(3); + if (seenOptionalIndexedAccess) { + node.optional = optional; + type = this.finishNode(node, "OptionalIndexedAccessType"); + } else { + type = this.finishNode(node, "IndexedAccessType"); + } + } + } + return type; + } + flowParsePrefixType() { + const node = this.startNode(); + if (this.eat(17)) { + node.typeAnnotation = this.flowParsePrefixType(); + return this.finishNode(node, "NullableTypeAnnotation"); + } else { + return this.flowParsePostfixType(); + } + } + flowParseAnonFunctionWithoutParens() { + const param = this.flowParsePrefixType(); + if (!this.state.noAnonFunctionType && this.eat(19)) { + const node = this.startNodeAt(param.loc.start); + node.params = [this.reinterpretTypeAsFunctionTypeParam(param)]; + node.rest = null; + node.this = null; + node.returnType = this.flowParseType(); + node.typeParameters = null; + return this.finishNode(node, "FunctionTypeAnnotation"); + } + return param; + } + flowParseIntersectionType() { + const node = this.startNode(); + this.eat(45); + const type = this.flowParseAnonFunctionWithoutParens(); + node.types = [type]; + while (this.eat(45)) { + node.types.push(this.flowParseAnonFunctionWithoutParens()); + } + return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); + } + flowParseUnionType() { + const node = this.startNode(); + this.eat(43); + const type = this.flowParseIntersectionType(); + node.types = [type]; + while (this.eat(43)) { + node.types.push(this.flowParseIntersectionType()); + } + return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); + } + flowParseType() { + const oldInType = this.state.inType; + this.state.inType = true; + const type = this.flowParseUnionType(); + this.state.inType = oldInType; + return type; + } + flowParseTypeOrImplicitInstantiation() { + if (this.state.type === 132 && this.state.value === "_") { + const startLoc = this.state.startLoc; + const node = this.parseIdentifier(); + return this.flowParseGenericType(startLoc, node); + } else { + return this.flowParseType(); + } + } + flowParseTypeAnnotation() { + const node = this.startNode(); + node.typeAnnotation = this.flowParseTypeInitialiser(); + return this.finishNode(node, "TypeAnnotation"); + } + flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) { + const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier(); + if (this.match(14)) { + ident.typeAnnotation = this.flowParseTypeAnnotation(); + this.resetEndLocation(ident); + } + return ident; + } + typeCastToParameter(node) { + node.expression.typeAnnotation = node.typeAnnotation; + this.resetEndLocation(node.expression, node.typeAnnotation.loc.end); + return node.expression; + } + flowParseVariance() { + let variance = null; + if (this.match(53)) { + variance = this.startNode(); + if (this.state.value === "+") { + variance.kind = "plus"; + } else { + variance.kind = "minus"; + } + this.next(); + return this.finishNode(variance, "Variance"); + } + return variance; + } + parseFunctionBody(node, allowExpressionBody, isMethod = false) { + if (allowExpressionBody) { + this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod)); + return; + } + super.parseFunctionBody(node, false, isMethod); + } + parseFunctionBodyAndFinish(node, type, isMethod = false) { + if (this.match(14)) { + const typeNode = this.startNode(); + [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); + node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; + } + return super.parseFunctionBodyAndFinish(node, type, isMethod); + } + parseStatementLike(flags) { + if (this.state.strict && this.isContextual(129)) { + const lookahead = this.lookahead(); + if (tokenIsKeywordOrIdentifier(lookahead.type)) { + const node = this.startNode(); + this.next(); + return this.flowParseInterface(node); + } + } else if (this.shouldParseEnums() && this.isContextual(126)) { + const node = this.startNode(); + this.next(); + return this.flowParseEnumDeclaration(node); + } + const stmt = super.parseStatementLike(flags); + if (this.flowPragma === undefined && !this.isValidDirective(stmt)) { + this.flowPragma = null; + } + return stmt; + } + parseExpressionStatement(node, expr, decorators) { + if (expr.type === "Identifier") { + if (expr.name === "declare") { + if (this.match(80) || tokenIsIdentifier(this.state.type) || this.match(68) || this.match(74) || this.match(82)) { + return this.flowParseDeclare(node); + } + } else if (tokenIsIdentifier(this.state.type)) { + if (expr.name === "interface") { + return this.flowParseInterface(node); + } else if (expr.name === "type") { + return this.flowParseTypeAlias(node); + } else if (expr.name === "opaque") { + return this.flowParseOpaqueType(node, false); + } + } + } + return super.parseExpressionStatement(node, expr, decorators); + } + shouldParseExportDeclaration() { + const { + type + } = this.state; + if (tokenIsFlowInterfaceOrTypeOrOpaque(type) || this.shouldParseEnums() && type === 126) { + return !this.state.containsEsc; + } + return super.shouldParseExportDeclaration(); + } + isExportDefaultSpecifier() { + const { + type + } = this.state; + if (tokenIsFlowInterfaceOrTypeOrOpaque(type) || this.shouldParseEnums() && type === 126) { + return this.state.containsEsc; + } + return super.isExportDefaultSpecifier(); + } + parseExportDefaultExpression() { + if (this.shouldParseEnums() && this.isContextual(126)) { + const node = this.startNode(); + this.next(); + return this.flowParseEnumDeclaration(node); + } + return super.parseExportDefaultExpression(); + } + parseConditional(expr, startLoc, refExpressionErrors) { + if (!this.match(17)) return expr; + if (this.state.maybeInArrowParameters) { + const nextCh = this.lookaheadCharCode(); + if (nextCh === 44 || nextCh === 61 || nextCh === 58 || nextCh === 41) { + this.setOptionalParametersError(refExpressionErrors); + return expr; + } + } + this.expect(17); + const state = this.state.clone(); + const originalNoArrowAt = this.state.noArrowAt; + const node = this.startNodeAt(startLoc); + let { + consequent, + failed + } = this.tryParseConditionalConsequent(); + let [valid, invalid] = this.getArrowLikeExpressions(consequent); + if (failed || invalid.length > 0) { + const noArrowAt = [...originalNoArrowAt]; + if (invalid.length > 0) { + this.state = state; + this.state.noArrowAt = noArrowAt; + for (let i = 0; i < invalid.length; i++) { + noArrowAt.push(invalid[i].start); + } + ({ + consequent, + failed + } = this.tryParseConditionalConsequent()); + [valid, invalid] = this.getArrowLikeExpressions(consequent); + } + if (failed && valid.length > 1) { + this.raise(FlowErrors.AmbiguousConditionalArrow, state.startLoc); + } + if (failed && valid.length === 1) { + this.state = state; + noArrowAt.push(valid[0].start); + this.state.noArrowAt = noArrowAt; + ({ + consequent, + failed + } = this.tryParseConditionalConsequent()); + } + } + this.getArrowLikeExpressions(consequent, true); + this.state.noArrowAt = originalNoArrowAt; + this.expect(14); + node.test = expr; + node.consequent = consequent; + node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(undefined, undefined)); + return this.finishNode(node, "ConditionalExpression"); + } + tryParseConditionalConsequent() { + this.state.noArrowParamsConversionAt.push(this.state.start); + const consequent = this.parseMaybeAssignAllowIn(); + const failed = !this.match(14); + this.state.noArrowParamsConversionAt.pop(); + return { + consequent, + failed + }; + } + getArrowLikeExpressions(node, disallowInvalid) { + const stack = [node]; + const arrows = []; + while (stack.length !== 0) { + const node = stack.pop(); + if (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement") { + if (node.typeParameters || !node.returnType) { + this.finishArrowValidation(node); + } else { + arrows.push(node); + } + stack.push(node.body); + } else if (node.type === "ConditionalExpression") { + stack.push(node.consequent); + stack.push(node.alternate); + } + } + if (disallowInvalid) { + arrows.forEach(node => this.finishArrowValidation(node)); + return [arrows, []]; + } + return partition(arrows, node => node.params.every(param => this.isAssignable(param, true))); + } + finishArrowValidation(node) { + var _node$extra; + this.toAssignableList(node.params, (_node$extra = node.extra) == null ? void 0 : _node$extra.trailingCommaLoc, false); + this.scope.enter(2 | 4); + super.checkParams(node, false, true); + this.scope.exit(); + } + forwardNoArrowParamsConversionAt(node, parse) { + let result; + if (this.state.noArrowParamsConversionAt.includes(node.start)) { + this.state.noArrowParamsConversionAt.push(this.state.start); + result = parse(); + this.state.noArrowParamsConversionAt.pop(); + } else { + result = parse(); + } + return result; + } + parseParenItem(node, startLoc) { + const newNode = super.parseParenItem(node, startLoc); + if (this.eat(17)) { + newNode.optional = true; + this.resetEndLocation(node); + } + if (this.match(14)) { + const typeCastNode = this.startNodeAt(startLoc); + typeCastNode.expression = newNode; + typeCastNode.typeAnnotation = this.flowParseTypeAnnotation(); + return this.finishNode(typeCastNode, "TypeCastExpression"); + } + return newNode; + } + assertModuleNodeAllowed(node) { + if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") { + return; + } + super.assertModuleNodeAllowed(node); + } + parseExportDeclaration(node) { + if (this.isContextual(130)) { + node.exportKind = "type"; + const declarationNode = this.startNode(); + this.next(); + if (this.match(5)) { + node.specifiers = this.parseExportSpecifiers(true); + super.parseExportFrom(node); + return null; + } else { + return this.flowParseTypeAlias(declarationNode); + } + } else if (this.isContextual(131)) { + node.exportKind = "type"; + const declarationNode = this.startNode(); + this.next(); + return this.flowParseOpaqueType(declarationNode, false); + } else if (this.isContextual(129)) { + node.exportKind = "type"; + const declarationNode = this.startNode(); + this.next(); + return this.flowParseInterface(declarationNode); + } else if (this.shouldParseEnums() && this.isContextual(126)) { + node.exportKind = "value"; + const declarationNode = this.startNode(); + this.next(); + return this.flowParseEnumDeclaration(declarationNode); + } else { + return super.parseExportDeclaration(node); + } + } + eatExportStar(node) { + if (super.eatExportStar(node)) return true; + if (this.isContextual(130) && this.lookahead().type === 55) { + node.exportKind = "type"; + this.next(); + this.next(); + return true; + } + return false; + } + maybeParseExportNamespaceSpecifier(node) { + const { + startLoc + } = this.state; + const hasNamespace = super.maybeParseExportNamespaceSpecifier(node); + if (hasNamespace && node.exportKind === "type") { + this.unexpected(startLoc); + } + return hasNamespace; + } + parseClassId(node, isStatement, optionalId) { + super.parseClassId(node, isStatement, optionalId); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } + } + parseClassMember(classBody, member, state) { + const { + startLoc + } = this.state; + if (this.isContextual(125)) { + if (super.parseClassMemberFromModifier(classBody, member)) { + return; + } + member.declare = true; + } + super.parseClassMember(classBody, member, state); + if (member.declare) { + if (member.type !== "ClassProperty" && member.type !== "ClassPrivateProperty" && member.type !== "PropertyDefinition") { + this.raise(FlowErrors.DeclareClassElement, startLoc); + } else if (member.value) { + this.raise(FlowErrors.DeclareClassFieldInitializer, member.value); + } + } + } + isIterator(word) { + return word === "iterator" || word === "asyncIterator"; + } + readIterator() { + const word = super.readWord1(); + const fullWord = "@@" + word; + if (!this.isIterator(word) || !this.state.inType) { + this.raise(Errors.InvalidIdentifier, this.state.curPosition(), { + identifierName: fullWord + }); + } + this.finishToken(132, fullWord); + } + getTokenFromCode(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + if (code === 123 && next === 124) { + this.finishOp(6, 2); + } else if (this.state.inType && (code === 62 || code === 60)) { + this.finishOp(code === 62 ? 48 : 47, 1); + } else if (this.state.inType && code === 63) { + if (next === 46) { + this.finishOp(18, 2); + } else { + this.finishOp(17, 1); + } + } else if (isIteratorStart(code, next, this.input.charCodeAt(this.state.pos + 2))) { + this.state.pos += 2; + this.readIterator(); + } else { + super.getTokenFromCode(code); + } + } + isAssignable(node, isBinding) { + if (node.type === "TypeCastExpression") { + return this.isAssignable(node.expression, isBinding); + } else { + return super.isAssignable(node, isBinding); + } + } + toAssignable(node, isLHS = false) { + if (!isLHS && node.type === "AssignmentExpression" && node.left.type === "TypeCastExpression") { + node.left = this.typeCastToParameter(node.left); + } + super.toAssignable(node, isLHS); + } + toAssignableList(exprList, trailingCommaLoc, isLHS) { + for (let i = 0; i < exprList.length; i++) { + const expr = exprList[i]; + if ((expr == null ? void 0 : expr.type) === "TypeCastExpression") { + exprList[i] = this.typeCastToParameter(expr); + } + } + super.toAssignableList(exprList, trailingCommaLoc, isLHS); + } + toReferencedList(exprList, isParenthesizedExpr) { + for (let i = 0; i < exprList.length; i++) { + var _expr$extra; + const expr = exprList[i]; + if (expr && expr.type === "TypeCastExpression" && !((_expr$extra = expr.extra) != null && _expr$extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) { + this.raise(FlowErrors.TypeCastInPattern, expr.typeAnnotation); + } + } + return exprList; + } + parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { + const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors); + if (canBePattern && !this.state.maybeInArrowParameters) { + this.toReferencedList(node.elements); + } + return node; + } + isValidLVal(type, isParenthesized, binding) { + return type === "TypeCastExpression" || super.isValidLVal(type, isParenthesized, binding); + } + parseClassProperty(node) { + if (this.match(14)) { + node.typeAnnotation = this.flowParseTypeAnnotation(); + } + return super.parseClassProperty(node); + } + parseClassPrivateProperty(node) { + if (this.match(14)) { + node.typeAnnotation = this.flowParseTypeAnnotation(); + } + return super.parseClassPrivateProperty(node); + } + isClassMethod() { + return this.match(47) || super.isClassMethod(); + } + isClassProperty() { + return this.match(14) || super.isClassProperty(); + } + isNonstaticConstructor(method) { + return !this.match(14) && super.isNonstaticConstructor(method); + } + pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { + if (method.variance) { + this.unexpected(method.variance.loc.start); + } + delete method.variance; + if (this.match(47)) { + method.typeParameters = this.flowParseTypeParameterDeclaration(); + } + super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); + if (method.params && isConstructor) { + const params = method.params; + if (params.length > 0 && this.isThisParam(params[0])) { + this.raise(FlowErrors.ThisParamBannedInConstructor, method); + } + } else if (method.type === "MethodDefinition" && isConstructor && method.value.params) { + const params = method.value.params; + if (params.length > 0 && this.isThisParam(params[0])) { + this.raise(FlowErrors.ThisParamBannedInConstructor, method); + } + } + } + pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { + if (method.variance) { + this.unexpected(method.variance.loc.start); + } + delete method.variance; + if (this.match(47)) { + method.typeParameters = this.flowParseTypeParameterDeclaration(); + } + super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); + } + parseClassSuper(node) { + super.parseClassSuper(node); + if (node.superClass && this.match(47)) { + node.superTypeParameters = this.flowParseTypeParameterInstantiation(); + } + if (this.isContextual(113)) { + this.next(); + const implemented = node.implements = []; + do { + const node = this.startNode(); + node.id = this.flowParseRestrictedIdentifier(true); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterInstantiation(); + } else { + node.typeParameters = null; + } + implemented.push(this.finishNode(node, "ClassImplements")); + } while (this.eat(12)); + } + } + checkGetterSetterParams(method) { + super.checkGetterSetterParams(method); + const params = this.getObjectOrClassMethodParams(method); + if (params.length > 0) { + const param = params[0]; + if (this.isThisParam(param) && method.kind === "get") { + this.raise(FlowErrors.GetterMayNotHaveThisParam, param); + } else if (this.isThisParam(param)) { + this.raise(FlowErrors.SetterMayNotHaveThisParam, param); + } + } + } + parsePropertyNamePrefixOperator(node) { + node.variance = this.flowParseVariance(); + } + parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { + if (prop.variance) { + this.unexpected(prop.variance.loc.start); + } + delete prop.variance; + let typeParameters; + if (this.match(47) && !isAccessor) { + typeParameters = this.flowParseTypeParameterDeclaration(); + if (!this.match(10)) this.unexpected(); + } + const result = super.parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors); + if (typeParameters) { + (result.value || result).typeParameters = typeParameters; + } + return result; + } + parseAssignableListItemTypes(param) { + if (this.eat(17)) { + if (param.type !== "Identifier") { + this.raise(FlowErrors.PatternIsOptional, param); + } + if (this.isThisParam(param)) { + this.raise(FlowErrors.ThisParamMayNotBeOptional, param); + } + param.optional = true; + } + if (this.match(14)) { + param.typeAnnotation = this.flowParseTypeAnnotation(); + } else if (this.isThisParam(param)) { + this.raise(FlowErrors.ThisParamAnnotationRequired, param); + } + if (this.match(29) && this.isThisParam(param)) { + this.raise(FlowErrors.ThisParamNoDefault, param); + } + this.resetEndLocation(param); + return param; + } + parseMaybeDefault(startLoc, left) { + const node = super.parseMaybeDefault(startLoc, left); + if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { + this.raise(FlowErrors.TypeBeforeInitializer, node.typeAnnotation); + } + return node; + } + checkImportReflection(node) { + super.checkImportReflection(node); + if (node.module && node.importKind !== "value") { + this.raise(FlowErrors.ImportReflectionHasImportType, node.specifiers[0].loc.start); + } + } + parseImportSpecifierLocal(node, specifier, type) { + specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true, true) : this.parseIdentifier(); + node.specifiers.push(this.finishImportSpecifier(specifier, type)); + } + isPotentialImportPhase(isExport) { + if (super.isPotentialImportPhase(isExport)) return true; + if (this.isContextual(130)) { + if (!isExport) return true; + const ch = this.lookaheadCharCode(); + return ch === 123 || ch === 42; + } + return !isExport && this.isContextual(87); + } + applyImportPhase(node, isExport, phase, loc) { + super.applyImportPhase(node, isExport, phase, loc); + if (isExport) { + if (!phase && this.match(65)) { + return; + } + node.exportKind = phase === "type" ? phase : "value"; + } else { + if (phase === "type" && this.match(55)) this.unexpected(); + node.importKind = phase === "type" || phase === "typeof" ? phase : "value"; + } + } + parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) { + const firstIdent = specifier.imported; + let specifierTypeKind = null; + if (firstIdent.type === "Identifier") { + if (firstIdent.name === "type") { + specifierTypeKind = "type"; + } else if (firstIdent.name === "typeof") { + specifierTypeKind = "typeof"; + } + } + let isBinding = false; + if (this.isContextual(93) && !this.isLookaheadContextual("as")) { + const as_ident = this.parseIdentifier(true); + if (specifierTypeKind !== null && !tokenIsKeywordOrIdentifier(this.state.type)) { + specifier.imported = as_ident; + specifier.importKind = specifierTypeKind; + specifier.local = cloneIdentifier(as_ident); + } else { + specifier.imported = firstIdent; + specifier.importKind = null; + specifier.local = this.parseIdentifier(); + } + } else { + if (specifierTypeKind !== null && tokenIsKeywordOrIdentifier(this.state.type)) { + specifier.imported = this.parseIdentifier(true); + specifier.importKind = specifierTypeKind; + } else { + if (importedIsString) { + throw this.raise(Errors.ImportBindingIsString, specifier, { + importName: firstIdent.value + }); + } + specifier.imported = firstIdent; + specifier.importKind = null; + } + if (this.eatContextual(93)) { + specifier.local = this.parseIdentifier(); + } else { + isBinding = true; + specifier.local = cloneIdentifier(specifier.imported); + } + } + const specifierIsTypeImport = hasTypeImportKind(specifier); + if (isInTypeOnlyImport && specifierIsTypeImport) { + this.raise(FlowErrors.ImportTypeShorthandOnlyInPureImport, specifier); + } + if (isInTypeOnlyImport || specifierIsTypeImport) { + this.checkReservedType(specifier.local.name, specifier.local.loc.start, true); + } + if (isBinding && !isInTypeOnlyImport && !specifierIsTypeImport) { + this.checkReservedWord(specifier.local.name, specifier.loc.start, true, true); + } + return this.finishImportSpecifier(specifier, "ImportSpecifier"); + } + parseBindingAtom() { + switch (this.state.type) { + case 78: + return this.parseIdentifier(true); + default: + return super.parseBindingAtom(); + } + } + parseFunctionParams(node, isConstructor) { + const kind = node.kind; + if (kind !== "get" && kind !== "set" && this.match(47)) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } + super.parseFunctionParams(node, isConstructor); + } + parseVarId(decl, kind) { + super.parseVarId(decl, kind); + if (this.match(14)) { + decl.id.typeAnnotation = this.flowParseTypeAnnotation(); + this.resetEndLocation(decl.id); + } + } + parseAsyncArrowFromCallExpression(node, call) { + if (this.match(14)) { + const oldNoAnonFunctionType = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = true; + node.returnType = this.flowParseTypeAnnotation(); + this.state.noAnonFunctionType = oldNoAnonFunctionType; + } + return super.parseAsyncArrowFromCallExpression(node, call); + } + shouldParseAsyncArrow() { + return this.match(14) || super.shouldParseAsyncArrow(); + } + parseMaybeAssign(refExpressionErrors, afterLeftParse) { + var _jsx; + let state = null; + let jsx; + if (this.hasPlugin("jsx") && (this.match(142) || this.match(47))) { + state = this.state.clone(); + jsx = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state); + if (!jsx.error) return jsx.node; + const { + context + } = this.state; + const currentContext = context[context.length - 1]; + if (currentContext === types.j_oTag || currentContext === types.j_expr) { + context.pop(); + } + } + if ((_jsx = jsx) != null && _jsx.error || this.match(47)) { + var _jsx2, _jsx3; + state = state || this.state.clone(); + let typeParameters; + const arrow = this.tryParse(abort => { + var _arrowExpression$extr; + typeParameters = this.flowParseTypeParameterDeclaration(); + const arrowExpression = this.forwardNoArrowParamsConversionAt(typeParameters, () => { + const result = super.parseMaybeAssign(refExpressionErrors, afterLeftParse); + this.resetStartLocationFromNode(result, typeParameters); + return result; + }); + if ((_arrowExpression$extr = arrowExpression.extra) != null && _arrowExpression$extr.parenthesized) abort(); + const expr = this.maybeUnwrapTypeCastExpression(arrowExpression); + if (expr.type !== "ArrowFunctionExpression") abort(); + expr.typeParameters = typeParameters; + this.resetStartLocationFromNode(expr, typeParameters); + return arrowExpression; + }, state); + let arrowExpression = null; + if (arrow.node && this.maybeUnwrapTypeCastExpression(arrow.node).type === "ArrowFunctionExpression") { + if (!arrow.error && !arrow.aborted) { + if (arrow.node.async) { + this.raise(FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction, typeParameters); + } + return arrow.node; + } + arrowExpression = arrow.node; + } + if ((_jsx2 = jsx) != null && _jsx2.node) { + this.state = jsx.failState; + return jsx.node; + } + if (arrowExpression) { + this.state = arrow.failState; + return arrowExpression; + } + if ((_jsx3 = jsx) != null && _jsx3.thrown) throw jsx.error; + if (arrow.thrown) throw arrow.error; + throw this.raise(FlowErrors.UnexpectedTokenAfterTypeParameter, typeParameters); + } + return super.parseMaybeAssign(refExpressionErrors, afterLeftParse); + } + parseArrow(node) { + if (this.match(14)) { + const result = this.tryParse(() => { + const oldNoAnonFunctionType = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = true; + const typeNode = this.startNode(); + [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); + this.state.noAnonFunctionType = oldNoAnonFunctionType; + if (this.canInsertSemicolon()) this.unexpected(); + if (!this.match(19)) this.unexpected(); + return typeNode; + }); + if (result.thrown) return null; + if (result.error) this.state = result.failState; + node.returnType = result.node.typeAnnotation ? this.finishNode(result.node, "TypeAnnotation") : null; + } + return super.parseArrow(node); + } + shouldParseArrow(params) { + return this.match(14) || super.shouldParseArrow(params); + } + setArrowFunctionParameters(node, params) { + if (this.state.noArrowParamsConversionAt.includes(node.start)) { + node.params = params; + } else { + super.setArrowFunctionParameters(node, params); + } + } + checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) { + if (isArrowFunction && this.state.noArrowParamsConversionAt.includes(node.start)) { + return; + } + for (let i = 0; i < node.params.length; i++) { + if (this.isThisParam(node.params[i]) && i > 0) { + this.raise(FlowErrors.ThisParamMustBeFirst, node.params[i]); + } + } + super.checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged); + } + parseParenAndDistinguishExpression(canBeArrow) { + return super.parseParenAndDistinguishExpression(canBeArrow && !this.state.noArrowAt.includes(this.state.start)); + } + parseSubscripts(base, startLoc, noCalls) { + if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.includes(startLoc.index)) { + this.next(); + const node = this.startNodeAt(startLoc); + node.callee = base; + node.arguments = super.parseCallExpressionArguments(11, false); + base = this.finishNode(node, "CallExpression"); + } else if (base.type === "Identifier" && base.name === "async" && this.match(47)) { + const state = this.state.clone(); + const arrow = this.tryParse(abort => this.parseAsyncArrowWithTypeParameters(startLoc) || abort(), state); + if (!arrow.error && !arrow.aborted) return arrow.node; + const result = this.tryParse(() => super.parseSubscripts(base, startLoc, noCalls), state); + if (result.node && !result.error) return result.node; + if (arrow.node) { + this.state = arrow.failState; + return arrow.node; + } + if (result.node) { + this.state = result.failState; + return result.node; + } + throw arrow.error || result.error; + } + return super.parseSubscripts(base, startLoc, noCalls); + } + parseSubscript(base, startLoc, noCalls, subscriptState) { + if (this.match(18) && this.isLookaheadToken_lt()) { + subscriptState.optionalChainMember = true; + if (noCalls) { + subscriptState.stop = true; + return base; + } + this.next(); + const node = this.startNodeAt(startLoc); + node.callee = base; + node.typeArguments = this.flowParseTypeParameterInstantiation(); + this.expect(10); + node.arguments = this.parseCallExpressionArguments(11, false); + node.optional = true; + return this.finishCallExpression(node, true); + } else if (!noCalls && this.shouldParseTypes() && this.match(47)) { + const node = this.startNodeAt(startLoc); + node.callee = base; + const result = this.tryParse(() => { + node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew(); + this.expect(10); + node.arguments = super.parseCallExpressionArguments(11, false); + if (subscriptState.optionalChainMember) { + node.optional = false; + } + return this.finishCallExpression(node, subscriptState.optionalChainMember); + }); + if (result.node) { + if (result.error) this.state = result.failState; + return result.node; + } + } + return super.parseSubscript(base, startLoc, noCalls, subscriptState); + } + parseNewCallee(node) { + super.parseNewCallee(node); + let targs = null; + if (this.shouldParseTypes() && this.match(47)) { + targs = this.tryParse(() => this.flowParseTypeParameterInstantiationCallOrNew()).node; + } + node.typeArguments = targs; + } + parseAsyncArrowWithTypeParameters(startLoc) { + const node = this.startNodeAt(startLoc); + this.parseFunctionParams(node, false); + if (!this.parseArrow(node)) return; + return super.parseArrowExpression(node, undefined, true); + } + readToken_mult_modulo(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + if (code === 42 && next === 47 && this.state.hasFlowComment) { + this.state.hasFlowComment = false; + this.state.pos += 2; + this.nextToken(); + return; + } + super.readToken_mult_modulo(code); + } + readToken_pipe_amp(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + if (code === 124 && next === 125) { + this.finishOp(9, 2); + return; + } + super.readToken_pipe_amp(code); + } + parseTopLevel(file, program) { + const fileNode = super.parseTopLevel(file, program); + if (this.state.hasFlowComment) { + this.raise(FlowErrors.UnterminatedFlowComment, this.state.curPosition()); + } + return fileNode; + } + skipBlockComment() { + if (this.hasPlugin("flowComments") && this.skipFlowComment()) { + if (this.state.hasFlowComment) { + throw this.raise(FlowErrors.NestedFlowComment, this.state.startLoc); + } + this.hasFlowCommentCompletion(); + const commentSkip = this.skipFlowComment(); + if (commentSkip) { + this.state.pos += commentSkip; + this.state.hasFlowComment = true; + } + return; + } + return super.skipBlockComment(this.state.hasFlowComment ? "*-/" : "*/"); + } + skipFlowComment() { + const { + pos + } = this.state; + let shiftToFirstNonWhiteSpace = 2; + while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) { + shiftToFirstNonWhiteSpace++; + } + const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos); + const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1); + if (ch2 === 58 && ch3 === 58) { + return shiftToFirstNonWhiteSpace + 2; + } + if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") { + return shiftToFirstNonWhiteSpace + 12; + } + if (ch2 === 58 && ch3 !== 58) { + return shiftToFirstNonWhiteSpace; + } + return false; + } + hasFlowCommentCompletion() { + const end = this.input.indexOf("*/", this.state.pos); + if (end === -1) { + throw this.raise(Errors.UnterminatedComment, this.state.curPosition()); + } + } + flowEnumErrorBooleanMemberNotInitialized(loc, { + enumName, + memberName + }) { + this.raise(FlowErrors.EnumBooleanMemberNotInitialized, loc, { + memberName, + enumName + }); + } + flowEnumErrorInvalidMemberInitializer(loc, enumContext) { + return this.raise(!enumContext.explicitType ? FlowErrors.EnumInvalidMemberInitializerUnknownType : enumContext.explicitType === "symbol" ? FlowErrors.EnumInvalidMemberInitializerSymbolType : FlowErrors.EnumInvalidMemberInitializerPrimaryType, loc, enumContext); + } + flowEnumErrorNumberMemberNotInitialized(loc, details) { + this.raise(FlowErrors.EnumNumberMemberNotInitialized, loc, details); + } + flowEnumErrorStringMemberInconsistentlyInitialized(node, details) { + this.raise(FlowErrors.EnumStringMemberInconsistentlyInitialized, node, details); + } + flowEnumMemberInit() { + const startLoc = this.state.startLoc; + const endOfInit = () => this.match(12) || this.match(8); + switch (this.state.type) { + case 134: + { + const literal = this.parseNumericLiteral(this.state.value); + if (endOfInit()) { + return { + type: "number", + loc: literal.loc.start, + value: literal + }; + } + return { + type: "invalid", + loc: startLoc + }; + } + case 133: + { + const literal = this.parseStringLiteral(this.state.value); + if (endOfInit()) { + return { + type: "string", + loc: literal.loc.start, + value: literal + }; + } + return { + type: "invalid", + loc: startLoc + }; + } + case 85: + case 86: + { + const literal = this.parseBooleanLiteral(this.match(85)); + if (endOfInit()) { + return { + type: "boolean", + loc: literal.loc.start, + value: literal + }; + } + return { + type: "invalid", + loc: startLoc + }; + } + default: + return { + type: "invalid", + loc: startLoc + }; + } + } + flowEnumMemberRaw() { + const loc = this.state.startLoc; + const id = this.parseIdentifier(true); + const init = this.eat(29) ? this.flowEnumMemberInit() : { + type: "none", + loc + }; + return { + id, + init + }; + } + flowEnumCheckExplicitTypeMismatch(loc, context, expectedType) { + const { + explicitType + } = context; + if (explicitType === null) { + return; + } + if (explicitType !== expectedType) { + this.flowEnumErrorInvalidMemberInitializer(loc, context); + } + } + flowEnumMembers({ + enumName, + explicitType + }) { + const seenNames = new Set(); + const members = { + booleanMembers: [], + numberMembers: [], + stringMembers: [], + defaultedMembers: [] + }; + let hasUnknownMembers = false; + while (!this.match(8)) { + if (this.eat(21)) { + hasUnknownMembers = true; + break; + } + const memberNode = this.startNode(); + const { + id, + init + } = this.flowEnumMemberRaw(); + const memberName = id.name; + if (memberName === "") { + continue; + } + if (/^[a-z]/.test(memberName)) { + this.raise(FlowErrors.EnumInvalidMemberName, id, { + memberName, + suggestion: memberName[0].toUpperCase() + memberName.slice(1), + enumName + }); + } + if (seenNames.has(memberName)) { + this.raise(FlowErrors.EnumDuplicateMemberName, id, { + memberName, + enumName + }); + } + seenNames.add(memberName); + const context = { + enumName, + explicitType, + memberName + }; + memberNode.id = id; + switch (init.type) { + case "boolean": + { + this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "boolean"); + memberNode.init = init.value; + members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember")); + break; + } + case "number": + { + this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "number"); + memberNode.init = init.value; + members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember")); + break; + } + case "string": + { + this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "string"); + memberNode.init = init.value; + members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember")); + break; + } + case "invalid": + { + throw this.flowEnumErrorInvalidMemberInitializer(init.loc, context); + } + case "none": + { + switch (explicitType) { + case "boolean": + this.flowEnumErrorBooleanMemberNotInitialized(init.loc, context); + break; + case "number": + this.flowEnumErrorNumberMemberNotInitialized(init.loc, context); + break; + default: + members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember")); + } + } + } + if (!this.match(8)) { + this.expect(12); + } + } + return { + members, + hasUnknownMembers + }; + } + flowEnumStringMembers(initializedMembers, defaultedMembers, { + enumName + }) { + if (initializedMembers.length === 0) { + return defaultedMembers; + } else if (defaultedMembers.length === 0) { + return initializedMembers; + } else if (defaultedMembers.length > initializedMembers.length) { + for (const member of initializedMembers) { + this.flowEnumErrorStringMemberInconsistentlyInitialized(member, { + enumName + }); + } + return defaultedMembers; + } else { + for (const member of defaultedMembers) { + this.flowEnumErrorStringMemberInconsistentlyInitialized(member, { + enumName + }); + } + return initializedMembers; + } + } + flowEnumParseExplicitType({ + enumName + }) { + if (!this.eatContextual(102)) return null; + if (!tokenIsIdentifier(this.state.type)) { + throw this.raise(FlowErrors.EnumInvalidExplicitTypeUnknownSupplied, this.state.startLoc, { + enumName + }); + } + const { + value + } = this.state; + this.next(); + if (value !== "boolean" && value !== "number" && value !== "string" && value !== "symbol") { + this.raise(FlowErrors.EnumInvalidExplicitType, this.state.startLoc, { + enumName, + invalidEnumType: value + }); + } + return value; + } + flowEnumBody(node, id) { + const enumName = id.name; + const nameLoc = id.loc.start; + const explicitType = this.flowEnumParseExplicitType({ + enumName + }); + this.expect(5); + const { + members, + hasUnknownMembers + } = this.flowEnumMembers({ + enumName, + explicitType + }); + node.hasUnknownMembers = hasUnknownMembers; + switch (explicitType) { + case "boolean": + node.explicitType = true; + node.members = members.booleanMembers; + this.expect(8); + return this.finishNode(node, "EnumBooleanBody"); + case "number": + node.explicitType = true; + node.members = members.numberMembers; + this.expect(8); + return this.finishNode(node, "EnumNumberBody"); + case "string": + node.explicitType = true; + node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, { + enumName + }); + this.expect(8); + return this.finishNode(node, "EnumStringBody"); + case "symbol": + node.members = members.defaultedMembers; + this.expect(8); + return this.finishNode(node, "EnumSymbolBody"); + default: + { + const empty = () => { + node.members = []; + this.expect(8); + return this.finishNode(node, "EnumStringBody"); + }; + node.explicitType = false; + const boolsLen = members.booleanMembers.length; + const numsLen = members.numberMembers.length; + const strsLen = members.stringMembers.length; + const defaultedLen = members.defaultedMembers.length; + if (!boolsLen && !numsLen && !strsLen && !defaultedLen) { + return empty(); + } else if (!boolsLen && !numsLen) { + node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, { + enumName + }); + this.expect(8); + return this.finishNode(node, "EnumStringBody"); + } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) { + for (const member of members.defaultedMembers) { + this.flowEnumErrorBooleanMemberNotInitialized(member.loc.start, { + enumName, + memberName: member.id.name + }); + } + node.members = members.booleanMembers; + this.expect(8); + return this.finishNode(node, "EnumBooleanBody"); + } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) { + for (const member of members.defaultedMembers) { + this.flowEnumErrorNumberMemberNotInitialized(member.loc.start, { + enumName, + memberName: member.id.name + }); + } + node.members = members.numberMembers; + this.expect(8); + return this.finishNode(node, "EnumNumberBody"); + } else { + this.raise(FlowErrors.EnumInconsistentMemberValues, nameLoc, { + enumName + }); + return empty(); + } + } + } + } + flowParseEnumDeclaration(node) { + const id = this.parseIdentifier(); + node.id = id; + node.body = this.flowEnumBody(this.startNode(), id); + return this.finishNode(node, "EnumDeclaration"); + } + isLookaheadToken_lt() { + const next = this.nextTokenStart(); + if (this.input.charCodeAt(next) === 60) { + const afterNext = this.input.charCodeAt(next + 1); + return afterNext !== 60 && afterNext !== 61; + } + return false; + } + maybeUnwrapTypeCastExpression(node) { + return node.type === "TypeCastExpression" ? node.expression : node; + } + }; + const entities = { + __proto__: null, + quot: "\u0022", + amp: "&", + apos: "\u0027", + lt: "<", + gt: ">", + nbsp: "\u00A0", + iexcl: "\u00A1", + cent: "\u00A2", + pound: "\u00A3", + curren: "\u00A4", + yen: "\u00A5", + brvbar: "\u00A6", + sect: "\u00A7", + uml: "\u00A8", + copy: "\u00A9", + ordf: "\u00AA", + laquo: "\u00AB", + not: "\u00AC", + shy: "\u00AD", + reg: "\u00AE", + macr: "\u00AF", + deg: "\u00B0", + plusmn: "\u00B1", + sup2: "\u00B2", + sup3: "\u00B3", + acute: "\u00B4", + micro: "\u00B5", + para: "\u00B6", + middot: "\u00B7", + cedil: "\u00B8", + sup1: "\u00B9", + ordm: "\u00BA", + raquo: "\u00BB", + frac14: "\u00BC", + frac12: "\u00BD", + frac34: "\u00BE", + iquest: "\u00BF", + Agrave: "\u00C0", + Aacute: "\u00C1", + Acirc: "\u00C2", + Atilde: "\u00C3", + Auml: "\u00C4", + Aring: "\u00C5", + AElig: "\u00C6", + Ccedil: "\u00C7", + Egrave: "\u00C8", + Eacute: "\u00C9", + Ecirc: "\u00CA", + Euml: "\u00CB", + Igrave: "\u00CC", + Iacute: "\u00CD", + Icirc: "\u00CE", + Iuml: "\u00CF", + ETH: "\u00D0", + Ntilde: "\u00D1", + Ograve: "\u00D2", + Oacute: "\u00D3", + Ocirc: "\u00D4", + Otilde: "\u00D5", + Ouml: "\u00D6", + times: "\u00D7", + Oslash: "\u00D8", + Ugrave: "\u00D9", + Uacute: "\u00DA", + Ucirc: "\u00DB", + Uuml: "\u00DC", + Yacute: "\u00DD", + THORN: "\u00DE", + szlig: "\u00DF", + agrave: "\u00E0", + aacute: "\u00E1", + acirc: "\u00E2", + atilde: "\u00E3", + auml: "\u00E4", + aring: "\u00E5", + aelig: "\u00E6", + ccedil: "\u00E7", + egrave: "\u00E8", + eacute: "\u00E9", + ecirc: "\u00EA", + euml: "\u00EB", + igrave: "\u00EC", + iacute: "\u00ED", + icirc: "\u00EE", + iuml: "\u00EF", + eth: "\u00F0", + ntilde: "\u00F1", + ograve: "\u00F2", + oacute: "\u00F3", + ocirc: "\u00F4", + otilde: "\u00F5", + ouml: "\u00F6", + divide: "\u00F7", + oslash: "\u00F8", + ugrave: "\u00F9", + uacute: "\u00FA", + ucirc: "\u00FB", + uuml: "\u00FC", + yacute: "\u00FD", + thorn: "\u00FE", + yuml: "\u00FF", + OElig: "\u0152", + oelig: "\u0153", + Scaron: "\u0160", + scaron: "\u0161", + Yuml: "\u0178", + fnof: "\u0192", + circ: "\u02C6", + tilde: "\u02DC", + Alpha: "\u0391", + Beta: "\u0392", + Gamma: "\u0393", + Delta: "\u0394", + Epsilon: "\u0395", + Zeta: "\u0396", + Eta: "\u0397", + Theta: "\u0398", + Iota: "\u0399", + Kappa: "\u039A", + Lambda: "\u039B", + Mu: "\u039C", + Nu: "\u039D", + Xi: "\u039E", + Omicron: "\u039F", + Pi: "\u03A0", + Rho: "\u03A1", + Sigma: "\u03A3", + Tau: "\u03A4", + Upsilon: "\u03A5", + Phi: "\u03A6", + Chi: "\u03A7", + Psi: "\u03A8", + Omega: "\u03A9", + alpha: "\u03B1", + beta: "\u03B2", + gamma: "\u03B3", + delta: "\u03B4", + epsilon: "\u03B5", + zeta: "\u03B6", + eta: "\u03B7", + theta: "\u03B8", + iota: "\u03B9", + kappa: "\u03BA", + lambda: "\u03BB", + mu: "\u03BC", + nu: "\u03BD", + xi: "\u03BE", + omicron: "\u03BF", + pi: "\u03C0", + rho: "\u03C1", + sigmaf: "\u03C2", + sigma: "\u03C3", + tau: "\u03C4", + upsilon: "\u03C5", + phi: "\u03C6", + chi: "\u03C7", + psi: "\u03C8", + omega: "\u03C9", + thetasym: "\u03D1", + upsih: "\u03D2", + piv: "\u03D6", + ensp: "\u2002", + emsp: "\u2003", + thinsp: "\u2009", + zwnj: "\u200C", + zwj: "\u200D", + lrm: "\u200E", + rlm: "\u200F", + ndash: "\u2013", + mdash: "\u2014", + lsquo: "\u2018", + rsquo: "\u2019", + sbquo: "\u201A", + ldquo: "\u201C", + rdquo: "\u201D", + bdquo: "\u201E", + dagger: "\u2020", + Dagger: "\u2021", + bull: "\u2022", + hellip: "\u2026", + permil: "\u2030", + prime: "\u2032", + Prime: "\u2033", + lsaquo: "\u2039", + rsaquo: "\u203A", + oline: "\u203E", + frasl: "\u2044", + euro: "\u20AC", + image: "\u2111", + weierp: "\u2118", + real: "\u211C", + trade: "\u2122", + alefsym: "\u2135", + larr: "\u2190", + uarr: "\u2191", + rarr: "\u2192", + darr: "\u2193", + harr: "\u2194", + crarr: "\u21B5", + lArr: "\u21D0", + uArr: "\u21D1", + rArr: "\u21D2", + dArr: "\u21D3", + hArr: "\u21D4", + forall: "\u2200", + part: "\u2202", + exist: "\u2203", + empty: "\u2205", + nabla: "\u2207", + isin: "\u2208", + notin: "\u2209", + ni: "\u220B", + prod: "\u220F", + sum: "\u2211", + minus: "\u2212", + lowast: "\u2217", + radic: "\u221A", + prop: "\u221D", + infin: "\u221E", + ang: "\u2220", + and: "\u2227", + or: "\u2228", + cap: "\u2229", + cup: "\u222A", + int: "\u222B", + there4: "\u2234", + sim: "\u223C", + cong: "\u2245", + asymp: "\u2248", + ne: "\u2260", + equiv: "\u2261", + le: "\u2264", + ge: "\u2265", + sub: "\u2282", + sup: "\u2283", + nsub: "\u2284", + sube: "\u2286", + supe: "\u2287", + oplus: "\u2295", + otimes: "\u2297", + perp: "\u22A5", + sdot: "\u22C5", + lceil: "\u2308", + rceil: "\u2309", + lfloor: "\u230A", + rfloor: "\u230B", + lang: "\u2329", + rang: "\u232A", + loz: "\u25CA", + spades: "\u2660", + clubs: "\u2663", + hearts: "\u2665", + diams: "\u2666" + }; + const JsxErrors = ParseErrorEnum`jsx`({ + AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.", + MissingClosingTagElement: ({ + openingTagName + }) => `Expected corresponding JSX closing tag for <${openingTagName}>.`, + MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>.", + UnexpectedSequenceExpression: "Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?", + UnexpectedToken: ({ + unexpected, + HTMLEntity + }) => `Unexpected token \`${unexpected}\`. Did you mean \`${HTMLEntity}\` or \`{'${unexpected}'}\`?`, + UnsupportedJsxValue: "JSX value should be either an expression or a quoted JSX text.", + UnterminatedJsxContent: "Unterminated JSX contents.", + UnwrappedAdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?" + }); + function isFragment(object) { + return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false; + } + function getQualifiedJSXName(object) { + if (object.type === "JSXIdentifier") { + return object.name; + } + if (object.type === "JSXNamespacedName") { + return object.namespace.name + ":" + object.name.name; + } + if (object.type === "JSXMemberExpression") { + return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property); + } + throw new Error("Node had unexpected type: " + object.type); + } + var jsx = superClass => class JSXParserMixin extends superClass { + jsxReadToken() { + let out = ""; + let chunkStart = this.state.pos; + for (;;) { + if (this.state.pos >= this.length) { + throw this.raise(JsxErrors.UnterminatedJsxContent, this.state.startLoc); + } + const ch = this.input.charCodeAt(this.state.pos); + switch (ch) { + case 60: + case 123: + if (this.state.pos === this.state.start) { + if (ch === 60 && this.state.canStartJSXElement) { + ++this.state.pos; + this.finishToken(142); + } else { + super.getTokenFromCode(ch); + } + return; + } + out += this.input.slice(chunkStart, this.state.pos); + this.finishToken(141, out); + return; + case 38: + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadEntity(); + chunkStart = this.state.pos; + break; + case 62: + case 125: + default: + if (isNewLine(ch)) { + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadNewLine(true); + chunkStart = this.state.pos; + } else { + ++this.state.pos; + } + } + } + } + jsxReadNewLine(normalizeCRLF) { + const ch = this.input.charCodeAt(this.state.pos); + let out; + ++this.state.pos; + if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) { + ++this.state.pos; + out = normalizeCRLF ? "\n" : "\r\n"; + } else { + out = String.fromCharCode(ch); + } + ++this.state.curLine; + this.state.lineStart = this.state.pos; + return out; + } + jsxReadString(quote) { + let out = ""; + let chunkStart = ++this.state.pos; + for (;;) { + if (this.state.pos >= this.length) { + throw this.raise(Errors.UnterminatedString, this.state.startLoc); + } + const ch = this.input.charCodeAt(this.state.pos); + if (ch === quote) break; + if (ch === 38) { + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadEntity(); + chunkStart = this.state.pos; + } else if (isNewLine(ch)) { + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadNewLine(false); + chunkStart = this.state.pos; + } else { + ++this.state.pos; + } + } + out += this.input.slice(chunkStart, this.state.pos++); + this.finishToken(133, out); + } + jsxReadEntity() { + const startPos = ++this.state.pos; + if (this.codePointAtPos(this.state.pos) === 35) { + ++this.state.pos; + let radix = 10; + if (this.codePointAtPos(this.state.pos) === 120) { + radix = 16; + ++this.state.pos; + } + const codePoint = this.readInt(radix, undefined, false, "bail"); + if (codePoint !== null && this.codePointAtPos(this.state.pos) === 59) { + ++this.state.pos; + return String.fromCodePoint(codePoint); + } + } else { + let count = 0; + let semi = false; + while (count++ < 10 && this.state.pos < this.length && !(semi = this.codePointAtPos(this.state.pos) === 59)) { + ++this.state.pos; + } + if (semi) { + const desc = this.input.slice(startPos, this.state.pos); + const entity = entities[desc]; + ++this.state.pos; + if (entity) { + return entity; + } + } + } + this.state.pos = startPos; + return "&"; + } + jsxReadWord() { + let ch; + const start = this.state.pos; + do { + ch = this.input.charCodeAt(++this.state.pos); + } while (isIdentifierChar(ch) || ch === 45); + this.finishToken(140, this.input.slice(start, this.state.pos)); + } + jsxParseIdentifier() { + const node = this.startNode(); + if (this.match(140)) { + node.name = this.state.value; + } else if (tokenIsKeyword(this.state.type)) { + node.name = tokenLabelName(this.state.type); + } else { + this.unexpected(); + } + this.next(); + return this.finishNode(node, "JSXIdentifier"); + } + jsxParseNamespacedName() { + const startLoc = this.state.startLoc; + const name = this.jsxParseIdentifier(); + if (!this.eat(14)) return name; + const node = this.startNodeAt(startLoc); + node.namespace = name; + node.name = this.jsxParseIdentifier(); + return this.finishNode(node, "JSXNamespacedName"); + } + jsxParseElementName() { + const startLoc = this.state.startLoc; + let node = this.jsxParseNamespacedName(); + if (node.type === "JSXNamespacedName") { + return node; + } + while (this.eat(16)) { + const newNode = this.startNodeAt(startLoc); + newNode.object = node; + newNode.property = this.jsxParseIdentifier(); + node = this.finishNode(newNode, "JSXMemberExpression"); + } + return node; + } + jsxParseAttributeValue() { + let node; + switch (this.state.type) { + case 5: + node = this.startNode(); + this.setContext(types.brace); + this.next(); + node = this.jsxParseExpressionContainer(node, types.j_oTag); + if (node.expression.type === "JSXEmptyExpression") { + this.raise(JsxErrors.AttributeIsEmpty, node); + } + return node; + case 142: + case 133: + return this.parseExprAtom(); + default: + throw this.raise(JsxErrors.UnsupportedJsxValue, this.state.startLoc); + } + } + jsxParseEmptyExpression() { + const node = this.startNodeAt(this.state.lastTokEndLoc); + return this.finishNodeAt(node, "JSXEmptyExpression", this.state.startLoc); + } + jsxParseSpreadChild(node) { + this.next(); + node.expression = this.parseExpression(); + this.setContext(types.j_expr); + this.state.canStartJSXElement = true; + this.expect(8); + return this.finishNode(node, "JSXSpreadChild"); + } + jsxParseExpressionContainer(node, previousContext) { + if (this.match(8)) { + node.expression = this.jsxParseEmptyExpression(); + } else { + const expression = this.parseExpression(); + node.expression = expression; + } + this.setContext(previousContext); + this.state.canStartJSXElement = true; + this.expect(8); + return this.finishNode(node, "JSXExpressionContainer"); + } + jsxParseAttribute() { + const node = this.startNode(); + if (this.match(5)) { + this.setContext(types.brace); + this.next(); + this.expect(21); + node.argument = this.parseMaybeAssignAllowIn(); + this.setContext(types.j_oTag); + this.state.canStartJSXElement = true; + this.expect(8); + return this.finishNode(node, "JSXSpreadAttribute"); + } + node.name = this.jsxParseNamespacedName(); + node.value = this.eat(29) ? this.jsxParseAttributeValue() : null; + return this.finishNode(node, "JSXAttribute"); + } + jsxParseOpeningElementAt(startLoc) { + const node = this.startNodeAt(startLoc); + if (this.eat(143)) { + return this.finishNode(node, "JSXOpeningFragment"); + } + node.name = this.jsxParseElementName(); + return this.jsxParseOpeningElementAfterName(node); + } + jsxParseOpeningElementAfterName(node) { + const attributes = []; + while (!this.match(56) && !this.match(143)) { + attributes.push(this.jsxParseAttribute()); + } + node.attributes = attributes; + node.selfClosing = this.eat(56); + this.expect(143); + return this.finishNode(node, "JSXOpeningElement"); + } + jsxParseClosingElementAt(startLoc) { + const node = this.startNodeAt(startLoc); + if (this.eat(143)) { + return this.finishNode(node, "JSXClosingFragment"); + } + node.name = this.jsxParseElementName(); + this.expect(143); + return this.finishNode(node, "JSXClosingElement"); + } + jsxParseElementAt(startLoc) { + const node = this.startNodeAt(startLoc); + const children = []; + const openingElement = this.jsxParseOpeningElementAt(startLoc); + let closingElement = null; + if (!openingElement.selfClosing) { + contents: for (;;) { + switch (this.state.type) { + case 142: + startLoc = this.state.startLoc; + this.next(); + if (this.eat(56)) { + closingElement = this.jsxParseClosingElementAt(startLoc); + break contents; + } + children.push(this.jsxParseElementAt(startLoc)); + break; + case 141: + children.push(this.parseLiteral(this.state.value, "JSXText")); + break; + case 5: + { + const node = this.startNode(); + this.setContext(types.brace); + this.next(); + if (this.match(21)) { + children.push(this.jsxParseSpreadChild(node)); + } else { + children.push(this.jsxParseExpressionContainer(node, types.j_expr)); + } + break; + } + default: + this.unexpected(); + } + } + if (isFragment(openingElement) && !isFragment(closingElement) && closingElement !== null) { + this.raise(JsxErrors.MissingClosingTagFragment, closingElement); + } else if (!isFragment(openingElement) && isFragment(closingElement)) { + this.raise(JsxErrors.MissingClosingTagElement, closingElement, { + openingTagName: getQualifiedJSXName(openingElement.name) + }); + } else if (!isFragment(openingElement) && !isFragment(closingElement)) { + if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) { + this.raise(JsxErrors.MissingClosingTagElement, closingElement, { + openingTagName: getQualifiedJSXName(openingElement.name) + }); + } + } + } + if (isFragment(openingElement)) { + node.openingFragment = openingElement; + node.closingFragment = closingElement; + } else { + node.openingElement = openingElement; + node.closingElement = closingElement; + } + node.children = children; + if (this.match(47)) { + throw this.raise(JsxErrors.UnwrappedAdjacentJSXElements, this.state.startLoc); + } + return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement"); + } + jsxParseElement() { + const startLoc = this.state.startLoc; + this.next(); + return this.jsxParseElementAt(startLoc); + } + setContext(newContext) { + const { + context + } = this.state; + context[context.length - 1] = newContext; + } + parseExprAtom(refExpressionErrors) { + if (this.match(142)) { + return this.jsxParseElement(); + } else if (this.match(47) && this.input.charCodeAt(this.state.pos) !== 33) { + this.replaceToken(142); + return this.jsxParseElement(); + } else { + return super.parseExprAtom(refExpressionErrors); + } + } + skipSpace() { + const curContext = this.curContext(); + if (!curContext.preserveSpace) super.skipSpace(); + } + getTokenFromCode(code) { + const context = this.curContext(); + if (context === types.j_expr) { + this.jsxReadToken(); + return; + } + if (context === types.j_oTag || context === types.j_cTag) { + if (isIdentifierStart(code)) { + this.jsxReadWord(); + return; + } + if (code === 62) { + ++this.state.pos; + this.finishToken(143); + return; + } + if ((code === 34 || code === 39) && context === types.j_oTag) { + this.jsxReadString(code); + return; + } + } + if (code === 60 && this.state.canStartJSXElement && this.input.charCodeAt(this.state.pos + 1) !== 33) { + ++this.state.pos; + this.finishToken(142); + return; + } + super.getTokenFromCode(code); + } + updateContext(prevType) { + const { + context, + type + } = this.state; + if (type === 56 && prevType === 142) { + context.splice(-2, 2, types.j_cTag); + this.state.canStartJSXElement = false; + } else if (type === 142) { + context.push(types.j_oTag); + } else if (type === 143) { + const out = context[context.length - 1]; + if (out === types.j_oTag && prevType === 56 || out === types.j_cTag) { + context.pop(); + this.state.canStartJSXElement = context[context.length - 1] === types.j_expr; + } else { + this.setContext(types.j_expr); + this.state.canStartJSXElement = true; + } + } else { + this.state.canStartJSXElement = tokenComesBeforeExpression(type); + } + } + }; + class TypeScriptScope extends Scope { + constructor(...args) { + super(...args); + this.tsNames = new Map(); + } + } + class TypeScriptScopeHandler extends ScopeHandler { + constructor(...args) { + super(...args); + this.importsStack = []; + } + createScope(flags) { + this.importsStack.push(new Set()); + return new TypeScriptScope(flags); + } + enter(flags) { + if (flags === 256) { + this.importsStack.push(new Set()); + } + super.enter(flags); + } + exit() { + const flags = super.exit(); + if (flags === 256) { + this.importsStack.pop(); + } + return flags; + } + hasImport(name, allowShadow) { + const len = this.importsStack.length; + if (this.importsStack[len - 1].has(name)) { + return true; + } + if (!allowShadow && len > 1) { + for (let i = 0; i < len - 1; i++) { + if (this.importsStack[i].has(name)) return true; + } + } + return false; + } + declareName(name, bindingType, loc) { + if (bindingType & 4096) { + if (this.hasImport(name, true)) { + this.parser.raise(Errors.VarRedeclaration, loc, { + identifierName: name + }); + } + this.importsStack[this.importsStack.length - 1].add(name); + return; + } + const scope = this.currentScope(); + let type = scope.tsNames.get(name) || 0; + if (bindingType & 1024) { + this.maybeExportDefined(scope, name); + scope.tsNames.set(name, type | 16); + return; + } + super.declareName(name, bindingType, loc); + if (bindingType & 2) { + if (!(bindingType & 1)) { + this.checkRedeclarationInScope(scope, name, bindingType, loc); + this.maybeExportDefined(scope, name); + } + type = type | 1; + } + if (bindingType & 256) { + type = type | 2; + } + if (bindingType & 512) { + type = type | 4; + } + if (bindingType & 128) { + type = type | 8; + } + if (type) scope.tsNames.set(name, type); + } + isRedeclaredInScope(scope, name, bindingType) { + const type = scope.tsNames.get(name); + if ((type & 2) > 0) { + if (bindingType & 256) { + const isConst = !!(bindingType & 512); + const wasConst = (type & 4) > 0; + return isConst !== wasConst; + } + return true; + } + if (bindingType & 128 && (type & 8) > 0) { + if (scope.names.get(name) & 2) { + return !!(bindingType & 1); + } else { + return false; + } + } + if (bindingType & 2 && (type & 1) > 0) { + return true; + } + return super.isRedeclaredInScope(scope, name, bindingType); + } + checkLocalExport(id) { + const { + name + } = id; + if (this.hasImport(name)) return; + const len = this.scopeStack.length; + for (let i = len - 1; i >= 0; i--) { + const scope = this.scopeStack[i]; + const type = scope.tsNames.get(name); + if ((type & 1) > 0 || (type & 16) > 0) { + return; + } + } + super.checkLocalExport(id); + } + } + const unwrapParenthesizedExpression = node => { + return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node; + }; + class LValParser extends NodeUtils { + toAssignable(node, isLHS = false) { + var _node$extra, _node$extra3; + let parenthesized = undefined; + if (node.type === "ParenthesizedExpression" || (_node$extra = node.extra) != null && _node$extra.parenthesized) { + parenthesized = unwrapParenthesizedExpression(node); + if (isLHS) { + if (parenthesized.type === "Identifier") { + this.expressionScope.recordArrowParameterBindingError(Errors.InvalidParenthesizedAssignment, node); + } else if (parenthesized.type !== "MemberExpression" && !this.isOptionalMemberExpression(parenthesized)) { + this.raise(Errors.InvalidParenthesizedAssignment, node); + } + } else { + this.raise(Errors.InvalidParenthesizedAssignment, node); + } + } + switch (node.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + case "RestElement": + break; + case "ObjectExpression": + node.type = "ObjectPattern"; + for (let i = 0, length = node.properties.length, last = length - 1; i < length; i++) { + var _node$extra2; + const prop = node.properties[i]; + const isLast = i === last; + this.toAssignableObjectExpressionProp(prop, isLast, isLHS); + if (isLast && prop.type === "RestElement" && (_node$extra2 = node.extra) != null && _node$extra2.trailingCommaLoc) { + this.raise(Errors.RestTrailingComma, node.extra.trailingCommaLoc); + } + } + break; + case "ObjectProperty": + { + const { + key, + value + } = node; + if (this.isPrivateName(key)) { + this.classScope.usePrivateName(this.getPrivateNameSV(key), key.loc.start); + } + this.toAssignable(value, isLHS); + break; + } + case "SpreadElement": + { + throw new Error("Internal @babel/parser error (this is a bug, please report it)." + " SpreadElement should be converted by .toAssignable's caller."); + } + case "ArrayExpression": + node.type = "ArrayPattern"; + this.toAssignableList(node.elements, (_node$extra3 = node.extra) == null ? void 0 : _node$extra3.trailingCommaLoc, isLHS); + break; + case "AssignmentExpression": + if (node.operator !== "=") { + this.raise(Errors.MissingEqInAssignment, node.left.loc.end); + } + node.type = "AssignmentPattern"; + delete node.operator; + this.toAssignable(node.left, isLHS); + break; + case "ParenthesizedExpression": + this.toAssignable(parenthesized, isLHS); + break; + } + } + toAssignableObjectExpressionProp(prop, isLast, isLHS) { + if (prop.type === "ObjectMethod") { + this.raise(prop.kind === "get" || prop.kind === "set" ? Errors.PatternHasAccessor : Errors.PatternHasMethod, prop.key); + } else if (prop.type === "SpreadElement") { + prop.type = "RestElement"; + const arg = prop.argument; + this.checkToRestConversion(arg, false); + this.toAssignable(arg, isLHS); + if (!isLast) { + this.raise(Errors.RestTrailingComma, prop); + } + } else { + this.toAssignable(prop, isLHS); + } + } + toAssignableList(exprList, trailingCommaLoc, isLHS) { + const end = exprList.length - 1; + for (let i = 0; i <= end; i++) { + const elt = exprList[i]; + if (!elt) continue; + if (elt.type === "SpreadElement") { + elt.type = "RestElement"; + const arg = elt.argument; + this.checkToRestConversion(arg, true); + this.toAssignable(arg, isLHS); + } else { + this.toAssignable(elt, isLHS); + } + if (elt.type === "RestElement") { + if (i < end) { + this.raise(Errors.RestTrailingComma, elt); + } else if (trailingCommaLoc) { + this.raise(Errors.RestTrailingComma, trailingCommaLoc); + } + } + } + } + isAssignable(node, isBinding) { + switch (node.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + case "RestElement": + return true; + case "ObjectExpression": + { + const last = node.properties.length - 1; + return node.properties.every((prop, i) => { + return prop.type !== "ObjectMethod" && (i === last || prop.type !== "SpreadElement") && this.isAssignable(prop); + }); + } + case "ObjectProperty": + return this.isAssignable(node.value); + case "SpreadElement": + return this.isAssignable(node.argument); + case "ArrayExpression": + return node.elements.every(element => element === null || this.isAssignable(element)); + case "AssignmentExpression": + return node.operator === "="; + case "ParenthesizedExpression": + return this.isAssignable(node.expression); + case "MemberExpression": + case "OptionalMemberExpression": + return !isBinding; + default: + return false; + } + } + toReferencedList(exprList, isParenthesizedExpr) { + return exprList; + } + toReferencedListDeep(exprList, isParenthesizedExpr) { + this.toReferencedList(exprList, isParenthesizedExpr); + for (const expr of exprList) { + if ((expr == null ? void 0 : expr.type) === "ArrayExpression") { + this.toReferencedListDeep(expr.elements); + } + } + } + parseSpread(refExpressionErrors) { + const node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssignAllowIn(refExpressionErrors, undefined); + return this.finishNode(node, "SpreadElement"); + } + parseRestBinding() { + const node = this.startNode(); + this.next(); + node.argument = this.parseBindingAtom(); + return this.finishNode(node, "RestElement"); + } + parseBindingAtom() { + switch (this.state.type) { + case 0: + { + const node = this.startNode(); + this.next(); + node.elements = this.parseBindingList(3, 93, 1); + return this.finishNode(node, "ArrayPattern"); + } + case 5: + return this.parseObjectLike(8, true); + } + return this.parseIdentifier(); + } + parseBindingList(close, closeCharCode, flags) { + const allowEmpty = flags & 1; + const elts = []; + let first = true; + while (!this.eat(close)) { + if (first) { + first = false; + } else { + this.expect(12); + } + if (allowEmpty && this.match(12)) { + elts.push(null); + } else if (this.eat(close)) { + break; + } else if (this.match(21)) { + elts.push(this.parseAssignableListItemTypes(this.parseRestBinding(), flags)); + if (!this.checkCommaAfterRest(closeCharCode)) { + this.expect(close); + break; + } + } else { + const decorators = []; + if (this.match(26) && this.hasPlugin("decorators")) { + this.raise(Errors.UnsupportedParameterDecorator, this.state.startLoc); + } + while (this.match(26)) { + decorators.push(this.parseDecorator()); + } + elts.push(this.parseAssignableListItem(flags, decorators)); + } + } + return elts; + } + parseBindingRestProperty(prop) { + this.next(); + prop.argument = this.parseIdentifier(); + this.checkCommaAfterRest(125); + return this.finishNode(prop, "RestElement"); + } + parseBindingProperty() { + const { + type, + startLoc + } = this.state; + if (type === 21) { + return this.parseBindingRestProperty(this.startNode()); + } + const prop = this.startNode(); + if (type === 138) { + this.expectPlugin("destructuringPrivate", startLoc); + this.classScope.usePrivateName(this.state.value, startLoc); + prop.key = this.parsePrivateName(); + } else { + this.parsePropertyName(prop); + } + prop.method = false; + return this.parseObjPropValue(prop, startLoc, false, false, true, false); + } + parseAssignableListItem(flags, decorators) { + const left = this.parseMaybeDefault(); + this.parseAssignableListItemTypes(left, flags); + const elt = this.parseMaybeDefault(left.loc.start, left); + if (decorators.length) { + left.decorators = decorators; + } + return elt; + } + parseAssignableListItemTypes(param, flags) { + return param; + } + parseMaybeDefault(startLoc, left) { + var _startLoc, _left; + (_startLoc = startLoc) != null ? _startLoc : startLoc = this.state.startLoc; + left = (_left = left) != null ? _left : this.parseBindingAtom(); + if (!this.eat(29)) return left; + const node = this.startNodeAt(startLoc); + node.left = left; + node.right = this.parseMaybeAssignAllowIn(); + return this.finishNode(node, "AssignmentPattern"); + } + isValidLVal(type, isUnparenthesizedInAssign, binding) { + switch (type) { + case "AssignmentPattern": + return "left"; + case "RestElement": + return "argument"; + case "ObjectProperty": + return "value"; + case "ParenthesizedExpression": + return "expression"; + case "ArrayPattern": + return "elements"; + case "ObjectPattern": + return "properties"; + } + return false; + } + isOptionalMemberExpression(expression) { + return expression.type === "OptionalMemberExpression"; + } + checkLVal(expression, ancestor, binding = 64, checkClashes = false, strictModeChanged = false, hasParenthesizedAncestor = false) { + var _expression$extra; + const type = expression.type; + if (this.isObjectMethod(expression)) return; + const isOptionalMemberExpression = this.isOptionalMemberExpression(expression); + if (isOptionalMemberExpression || type === "MemberExpression") { + if (isOptionalMemberExpression) { + this.expectPlugin("optionalChainingAssign", expression.loc.start); + if (ancestor.type !== "AssignmentExpression") { + this.raise(Errors.InvalidLhsOptionalChaining, expression, { + ancestor + }); + } + } + if (binding !== 64) { + this.raise(Errors.InvalidPropertyBindingPattern, expression); + } + return; + } + if (type === "Identifier") { + this.checkIdentifier(expression, binding, strictModeChanged); + const { + name + } = expression; + if (checkClashes) { + if (checkClashes.has(name)) { + this.raise(Errors.ParamDupe, expression); + } else { + checkClashes.add(name); + } + } + return; + } + const validity = this.isValidLVal(type, !(hasParenthesizedAncestor || (_expression$extra = expression.extra) != null && _expression$extra.parenthesized) && ancestor.type === "AssignmentExpression", binding); + if (validity === true) return; + if (validity === false) { + const ParseErrorClass = binding === 64 ? Errors.InvalidLhs : Errors.InvalidLhsBinding; + this.raise(ParseErrorClass, expression, { + ancestor + }); + return; + } + let key, isParenthesizedExpression; + if (typeof validity === "string") { + key = validity; + isParenthesizedExpression = type === "ParenthesizedExpression"; + } else { + [key, isParenthesizedExpression] = validity; + } + const nextAncestor = type === "ArrayPattern" || type === "ObjectPattern" ? { + type + } : ancestor; + const val = expression[key]; + if (Array.isArray(val)) { + for (const child of val) { + if (child) { + this.checkLVal(child, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression); + } + } + } else if (val) { + this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression); + } + } + checkIdentifier(at, bindingType, strictModeChanged = false) { + if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(at.name, this.inModule) : isStrictBindOnlyReservedWord(at.name))) { + if (bindingType === 64) { + this.raise(Errors.StrictEvalArguments, at, { + referenceName: at.name + }); + } else { + this.raise(Errors.StrictEvalArgumentsBinding, at, { + bindingName: at.name + }); + } + } + if (bindingType & 8192 && at.name === "let") { + this.raise(Errors.LetInLexicalBinding, at); + } + if (!(bindingType & 64)) { + this.declareNameFromIdentifier(at, bindingType); + } + } + declareNameFromIdentifier(identifier, binding) { + this.scope.declareName(identifier.name, binding, identifier.loc.start); + } + checkToRestConversion(node, allowPattern) { + switch (node.type) { + case "ParenthesizedExpression": + this.checkToRestConversion(node.expression, allowPattern); + break; + case "Identifier": + case "MemberExpression": + break; + case "ArrayExpression": + case "ObjectExpression": + if (allowPattern) break; + default: + this.raise(Errors.InvalidRestAssignmentPattern, node); + } + } + checkCommaAfterRest(close) { + if (!this.match(12)) { + return false; + } + this.raise(this.lookaheadCharCode() === close ? Errors.RestTrailingComma : Errors.ElementAfterRest, this.state.startLoc); + return true; + } + } + function nonNull(x) { + if (x == null) { + throw new Error(`Unexpected ${x} value.`); + } + return x; + } + function assert(x) { + if (!x) { + throw new Error("Assert fail"); + } + } + const TSErrors = ParseErrorEnum`typescript`({ + AbstractMethodHasImplementation: ({ + methodName + }) => `Method '${methodName}' cannot have an implementation because it is marked abstract.`, + AbstractPropertyHasInitializer: ({ + propertyName + }) => `Property '${propertyName}' cannot have an initializer because it is marked abstract.`, + AccesorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.", + AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.", + AccessorCannotBeOptional: "An 'accessor' property cannot be declared optional.", + ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.", + ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.", + ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference: "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.", + ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.", + DeclareAccessor: ({ + kind + }) => `'declare' is not allowed in ${kind}ters.`, + DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.", + DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.", + DuplicateAccessibilityModifier: ({ + modifier + }) => `Accessibility modifier already seen.`, + DuplicateModifier: ({ + modifier + }) => `Duplicate modifier: '${modifier}'.`, + EmptyHeritageClauseType: ({ + token + }) => `'${token}' list cannot be empty.`, + EmptyTypeArguments: "Type argument list cannot be empty.", + EmptyTypeParameters: "Type parameter list cannot be empty.", + ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.", + ImportAliasHasImportType: "An import alias can not use 'import type'.", + ImportReflectionHasImportType: "An `import module` declaration can not use `type` modifier", + IncompatibleModifiers: ({ + modifiers + }) => `'${modifiers[0]}' modifier cannot be used with '${modifiers[1]}' modifier.`, + IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.", + IndexSignatureHasAccessibility: ({ + modifier + }) => `Index signatures cannot have an accessibility modifier ('${modifier}').`, + IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.", + IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.", + IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.", + InitializerNotAllowedInAmbientContext: "Initializers are not allowed in ambient contexts.", + InvalidModifierOnTypeMember: ({ + modifier + }) => `'${modifier}' modifier cannot appear on a type member.`, + InvalidModifierOnTypeParameter: ({ + modifier + }) => `'${modifier}' modifier cannot appear on a type parameter.`, + InvalidModifierOnTypeParameterPositions: ({ + modifier + }) => `'${modifier}' modifier can only appear on a type parameter of a class, interface or type alias.`, + InvalidModifiersOrder: ({ + orderedModifiers + }) => `'${orderedModifiers[0]}' modifier must precede '${orderedModifiers[1]}' modifier.`, + InvalidPropertyAccessAfterInstantiationExpression: "Invalid property access after an instantiation expression. " + "You can either wrap the instantiation expression in parentheses, or delete the type arguments.", + InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.", + MissingInterfaceName: "'interface' declarations must be followed by an identifier.", + NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.", + NonClassMethodPropertyHasAbstractModifer: "'abstract' modifier can only appear on a class, method, or property declaration.", + OptionalTypeBeforeRequired: "A required element cannot follow an optional element.", + OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.", + PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.", + PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.", + PrivateElementHasAccessibility: ({ + modifier + }) => `Private elements cannot have an accessibility modifier ('${modifier}').`, + ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.", + ReservedArrowTypeParam: "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.", + ReservedTypeAssertion: "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.", + SetAccesorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.", + SetAccesorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.", + SetAccesorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.", + SingleTypeParameterWithoutTrailingComma: ({ + typeParameterName + }) => `Single type parameter ${typeParameterName} should have a trailing comma. Example usage: <${typeParameterName},>.`, + StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.", + TupleOptionalAfterType: "A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).", + TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", + TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.", + TypeModifierIsUsedInTypeExports: "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.", + TypeModifierIsUsedInTypeImports: "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.", + UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.", + UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.", + UnexpectedTypeAnnotation: "Did not expect a type annotation here.", + UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.", + UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.", + UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.", + UnsupportedSignatureParameterKind: ({ + type + }) => `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${type}.` + }); + function keywordTypeFromName(value) { + switch (value) { + case "any": + return "TSAnyKeyword"; + case "boolean": + return "TSBooleanKeyword"; + case "bigint": + return "TSBigIntKeyword"; + case "never": + return "TSNeverKeyword"; + case "number": + return "TSNumberKeyword"; + case "object": + return "TSObjectKeyword"; + case "string": + return "TSStringKeyword"; + case "symbol": + return "TSSymbolKeyword"; + case "undefined": + return "TSUndefinedKeyword"; + case "unknown": + return "TSUnknownKeyword"; + default: + return undefined; + } + } + function tsIsAccessModifier(modifier) { + return modifier === "private" || modifier === "public" || modifier === "protected"; + } + function tsIsVarianceAnnotations(modifier) { + return modifier === "in" || modifier === "out"; + } + var typescript = superClass => class TypeScriptParserMixin extends superClass { + constructor(...args) { + super(...args); + this.tsParseInOutModifiers = this.tsParseModifiers.bind(this, { + allowedModifiers: ["in", "out"], + disallowedModifiers: ["const", "public", "private", "protected", "readonly", "declare", "abstract", "override"], + errorTemplate: TSErrors.InvalidModifierOnTypeParameter + }); + this.tsParseConstModifier = this.tsParseModifiers.bind(this, { + allowedModifiers: ["const"], + disallowedModifiers: ["in", "out"], + errorTemplate: TSErrors.InvalidModifierOnTypeParameterPositions + }); + this.tsParseInOutConstModifiers = this.tsParseModifiers.bind(this, { + allowedModifiers: ["in", "out", "const"], + disallowedModifiers: ["public", "private", "protected", "readonly", "declare", "abstract", "override"], + errorTemplate: TSErrors.InvalidModifierOnTypeParameter + }); + } + getScopeHandler() { + return TypeScriptScopeHandler; + } + tsIsIdentifier() { + return tokenIsIdentifier(this.state.type); + } + tsTokenCanFollowModifier() { + return (this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(138) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak(); + } + tsNextTokenCanFollowModifier() { + this.next(); + return this.tsTokenCanFollowModifier(); + } + tsParseModifier(allowedModifiers, stopOnStartOfClassStaticBlock) { + if (!tokenIsIdentifier(this.state.type) && this.state.type !== 58 && this.state.type !== 75) { + return undefined; + } + const modifier = this.state.value; + if (allowedModifiers.includes(modifier)) { + if (stopOnStartOfClassStaticBlock && this.tsIsStartOfStaticBlocks()) { + return undefined; + } + if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) { + return modifier; + } + } + return undefined; + } + tsParseModifiers({ + allowedModifiers, + disallowedModifiers, + stopOnStartOfClassStaticBlock, + errorTemplate = TSErrors.InvalidModifierOnTypeMember + }, modified) { + const enforceOrder = (loc, modifier, before, after) => { + if (modifier === before && modified[after]) { + this.raise(TSErrors.InvalidModifiersOrder, loc, { + orderedModifiers: [before, after] + }); + } + }; + const incompatible = (loc, modifier, mod1, mod2) => { + if (modified[mod1] && modifier === mod2 || modified[mod2] && modifier === mod1) { + this.raise(TSErrors.IncompatibleModifiers, loc, { + modifiers: [mod1, mod2] + }); + } + }; + for (;;) { + const { + startLoc + } = this.state; + const modifier = this.tsParseModifier(allowedModifiers.concat(disallowedModifiers != null ? disallowedModifiers : []), stopOnStartOfClassStaticBlock); + if (!modifier) break; + if (tsIsAccessModifier(modifier)) { + if (modified.accessibility) { + this.raise(TSErrors.DuplicateAccessibilityModifier, startLoc, { + modifier + }); + } else { + enforceOrder(startLoc, modifier, modifier, "override"); + enforceOrder(startLoc, modifier, modifier, "static"); + enforceOrder(startLoc, modifier, modifier, "readonly"); + modified.accessibility = modifier; + } + } else if (tsIsVarianceAnnotations(modifier)) { + if (modified[modifier]) { + this.raise(TSErrors.DuplicateModifier, startLoc, { + modifier + }); + } + modified[modifier] = true; + enforceOrder(startLoc, modifier, "in", "out"); + } else { + if (hasOwnProperty.call(modified, modifier)) { + this.raise(TSErrors.DuplicateModifier, startLoc, { + modifier + }); + } else { + enforceOrder(startLoc, modifier, "static", "readonly"); + enforceOrder(startLoc, modifier, "static", "override"); + enforceOrder(startLoc, modifier, "override", "readonly"); + enforceOrder(startLoc, modifier, "abstract", "override"); + incompatible(startLoc, modifier, "declare", "override"); + incompatible(startLoc, modifier, "static", "abstract"); + } + modified[modifier] = true; + } + if (disallowedModifiers != null && disallowedModifiers.includes(modifier)) { + this.raise(errorTemplate, startLoc, { + modifier + }); + } + } + } + tsIsListTerminator(kind) { + switch (kind) { + case "EnumMembers": + case "TypeMembers": + return this.match(8); + case "HeritageClauseElement": + return this.match(5); + case "TupleElementTypes": + return this.match(3); + case "TypeParametersOrArguments": + return this.match(48); + } + } + tsParseList(kind, parseElement) { + const result = []; + while (!this.tsIsListTerminator(kind)) { + result.push(parseElement()); + } + return result; + } + tsParseDelimitedList(kind, parseElement, refTrailingCommaPos) { + return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true, refTrailingCommaPos)); + } + tsParseDelimitedListWorker(kind, parseElement, expectSuccess, refTrailingCommaPos) { + const result = []; + let trailingCommaPos = -1; + for (;;) { + if (this.tsIsListTerminator(kind)) { + break; + } + trailingCommaPos = -1; + const element = parseElement(); + if (element == null) { + return undefined; + } + result.push(element); + if (this.eat(12)) { + trailingCommaPos = this.state.lastTokStartLoc.index; + continue; + } + if (this.tsIsListTerminator(kind)) { + break; + } + if (expectSuccess) { + this.expect(12); + } + return undefined; + } + if (refTrailingCommaPos) { + refTrailingCommaPos.value = trailingCommaPos; + } + return result; + } + tsParseBracketedList(kind, parseElement, bracket, skipFirstToken, refTrailingCommaPos) { + if (!skipFirstToken) { + if (bracket) { + this.expect(0); + } else { + this.expect(47); + } + } + const result = this.tsParseDelimitedList(kind, parseElement, refTrailingCommaPos); + if (bracket) { + this.expect(3); + } else { + this.expect(48); + } + return result; + } + tsParseImportType() { + const node = this.startNode(); + this.expect(83); + this.expect(10); + if (!this.match(133)) { + this.raise(TSErrors.UnsupportedImportTypeArgument, this.state.startLoc); + } + node.argument = super.parseExprAtom(); + if (this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions")) { + node.options = null; + } + if (this.eat(12)) { + this.expectImportAttributesPlugin(); + if (!this.match(11)) { + node.options = super.parseMaybeAssignAllowIn(); + this.eat(12); + } + } + this.expect(11); + if (this.eat(16)) { + node.qualifier = this.tsParseEntityName(); + } + if (this.match(47)) { + node.typeParameters = this.tsParseTypeArguments(); + } + return this.finishNode(node, "TSImportType"); + } + tsParseEntityName(allowReservedWords = true) { + let entity = this.parseIdentifier(allowReservedWords); + while (this.eat(16)) { + const node = this.startNodeAtNode(entity); + node.left = entity; + node.right = this.parseIdentifier(allowReservedWords); + entity = this.finishNode(node, "TSQualifiedName"); + } + return entity; + } + tsParseTypeReference() { + const node = this.startNode(); + node.typeName = this.tsParseEntityName(); + if (!this.hasPrecedingLineBreak() && this.match(47)) { + node.typeParameters = this.tsParseTypeArguments(); + } + return this.finishNode(node, "TSTypeReference"); + } + tsParseThisTypePredicate(lhs) { + this.next(); + const node = this.startNodeAtNode(lhs); + node.parameterName = lhs; + node.typeAnnotation = this.tsParseTypeAnnotation(false); + node.asserts = false; + return this.finishNode(node, "TSTypePredicate"); + } + tsParseThisTypeNode() { + const node = this.startNode(); + this.next(); + return this.finishNode(node, "TSThisType"); + } + tsParseTypeQuery() { + const node = this.startNode(); + this.expect(87); + if (this.match(83)) { + node.exprName = this.tsParseImportType(); + } else { + node.exprName = this.tsParseEntityName(); + } + if (!this.hasPrecedingLineBreak() && this.match(47)) { + node.typeParameters = this.tsParseTypeArguments(); + } + return this.finishNode(node, "TSTypeQuery"); + } + tsParseTypeParameter(parseModifiers) { + const node = this.startNode(); + parseModifiers(node); + node.name = this.tsParseTypeParameterName(); + node.constraint = this.tsEatThenParseType(81); + node.default = this.tsEatThenParseType(29); + return this.finishNode(node, "TSTypeParameter"); + } + tsTryParseTypeParameters(parseModifiers) { + if (this.match(47)) { + return this.tsParseTypeParameters(parseModifiers); + } + } + tsParseTypeParameters(parseModifiers) { + const node = this.startNode(); + if (this.match(47) || this.match(142)) { + this.next(); + } else { + this.unexpected(); + } + const refTrailingCommaPos = { + value: -1 + }; + node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, parseModifiers), false, true, refTrailingCommaPos); + if (node.params.length === 0) { + this.raise(TSErrors.EmptyTypeParameters, node); + } + if (refTrailingCommaPos.value !== -1) { + this.addExtra(node, "trailingComma", refTrailingCommaPos.value); + } + return this.finishNode(node, "TSTypeParameterDeclaration"); + } + tsFillSignature(returnToken, signature) { + const returnTokenRequired = returnToken === 19; + const paramsKey = "parameters"; + const returnTypeKey = "typeAnnotation"; + signature.typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + this.expect(10); + signature[paramsKey] = this.tsParseBindingListForSignature(); + if (returnTokenRequired) { + signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken); + } else if (this.match(returnToken)) { + signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken); + } + } + tsParseBindingListForSignature() { + const list = super.parseBindingList(11, 41, 2); + for (const pattern of list) { + const { + type + } = pattern; + if (type === "AssignmentPattern" || type === "TSParameterProperty") { + this.raise(TSErrors.UnsupportedSignatureParameterKind, pattern, { + type + }); + } + } + return list; + } + tsParseTypeMemberSemicolon() { + if (!this.eat(12) && !this.isLineTerminator()) { + this.expect(13); + } + } + tsParseSignatureMember(kind, node) { + this.tsFillSignature(14, node); + this.tsParseTypeMemberSemicolon(); + return this.finishNode(node, kind); + } + tsIsUnambiguouslyIndexSignature() { + this.next(); + if (tokenIsIdentifier(this.state.type)) { + this.next(); + return this.match(14); + } + return false; + } + tsTryParseIndexSignature(node) { + if (!(this.match(0) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) { + return; + } + this.expect(0); + const id = this.parseIdentifier(); + id.typeAnnotation = this.tsParseTypeAnnotation(); + this.resetEndLocation(id); + this.expect(3); + node.parameters = [id]; + const type = this.tsTryParseTypeAnnotation(); + if (type) node.typeAnnotation = type; + this.tsParseTypeMemberSemicolon(); + return this.finishNode(node, "TSIndexSignature"); + } + tsParsePropertyOrMethodSignature(node, readonly) { + if (this.eat(17)) node.optional = true; + const nodeAny = node; + if (this.match(10) || this.match(47)) { + if (readonly) { + this.raise(TSErrors.ReadonlyForMethodSignature, node); + } + const method = nodeAny; + if (method.kind && this.match(47)) { + this.raise(TSErrors.AccesorCannotHaveTypeParameters, this.state.curPosition()); + } + this.tsFillSignature(14, method); + this.tsParseTypeMemberSemicolon(); + const paramsKey = "parameters"; + const returnTypeKey = "typeAnnotation"; + if (method.kind === "get") { + if (method[paramsKey].length > 0) { + this.raise(Errors.BadGetterArity, this.state.curPosition()); + if (this.isThisParam(method[paramsKey][0])) { + this.raise(TSErrors.AccesorCannotDeclareThisParameter, this.state.curPosition()); + } + } + } else if (method.kind === "set") { + if (method[paramsKey].length !== 1) { + this.raise(Errors.BadSetterArity, this.state.curPosition()); + } else { + const firstParameter = method[paramsKey][0]; + if (this.isThisParam(firstParameter)) { + this.raise(TSErrors.AccesorCannotDeclareThisParameter, this.state.curPosition()); + } + if (firstParameter.type === "Identifier" && firstParameter.optional) { + this.raise(TSErrors.SetAccesorCannotHaveOptionalParameter, this.state.curPosition()); + } + if (firstParameter.type === "RestElement") { + this.raise(TSErrors.SetAccesorCannotHaveRestParameter, this.state.curPosition()); + } + } + if (method[returnTypeKey]) { + this.raise(TSErrors.SetAccesorCannotHaveReturnType, method[returnTypeKey]); + } + } else { + method.kind = "method"; + } + return this.finishNode(method, "TSMethodSignature"); + } else { + const property = nodeAny; + if (readonly) property.readonly = true; + const type = this.tsTryParseTypeAnnotation(); + if (type) property.typeAnnotation = type; + this.tsParseTypeMemberSemicolon(); + return this.finishNode(property, "TSPropertySignature"); + } + } + tsParseTypeMember() { + const node = this.startNode(); + if (this.match(10) || this.match(47)) { + return this.tsParseSignatureMember("TSCallSignatureDeclaration", node); + } + if (this.match(77)) { + const id = this.startNode(); + this.next(); + if (this.match(10) || this.match(47)) { + return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node); + } else { + node.key = this.createIdentifier(id, "new"); + return this.tsParsePropertyOrMethodSignature(node, false); + } + } + this.tsParseModifiers({ + allowedModifiers: ["readonly"], + disallowedModifiers: ["declare", "abstract", "private", "protected", "public", "static", "override"] + }, node); + const idx = this.tsTryParseIndexSignature(node); + if (idx) { + return idx; + } + super.parsePropertyName(node); + if (!node.computed && node.key.type === "Identifier" && (node.key.name === "get" || node.key.name === "set") && this.tsTokenCanFollowModifier()) { + node.kind = node.key.name; + super.parsePropertyName(node); + } + return this.tsParsePropertyOrMethodSignature(node, !!node.readonly); + } + tsParseTypeLiteral() { + const node = this.startNode(); + node.members = this.tsParseObjectTypeMembers(); + return this.finishNode(node, "TSTypeLiteral"); + } + tsParseObjectTypeMembers() { + this.expect(5); + const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this)); + this.expect(8); + return members; + } + tsIsStartOfMappedType() { + this.next(); + if (this.eat(53)) { + return this.isContextual(122); + } + if (this.isContextual(122)) { + this.next(); + } + if (!this.match(0)) { + return false; + } + this.next(); + if (!this.tsIsIdentifier()) { + return false; + } + this.next(); + return this.match(58); + } + tsParseMappedTypeParameter() { + const node = this.startNode(); + node.name = this.tsParseTypeParameterName(); + node.constraint = this.tsExpectThenParseType(58); + return this.finishNode(node, "TSTypeParameter"); + } + tsParseMappedType() { + const node = this.startNode(); + this.expect(5); + if (this.match(53)) { + node.readonly = this.state.value; + this.next(); + this.expectContextual(122); + } else if (this.eatContextual(122)) { + node.readonly = true; + } + this.expect(0); + node.typeParameter = this.tsParseMappedTypeParameter(); + node.nameType = this.eatContextual(93) ? this.tsParseType() : null; + this.expect(3); + if (this.match(53)) { + node.optional = this.state.value; + this.next(); + this.expect(17); + } else if (this.eat(17)) { + node.optional = true; + } + node.typeAnnotation = this.tsTryParseType(); + this.semicolon(); + this.expect(8); + return this.finishNode(node, "TSMappedType"); + } + tsParseTupleType() { + const node = this.startNode(); + node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false); + let seenOptionalElement = false; + node.elementTypes.forEach(elementNode => { + const { + type + } = elementNode; + if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) { + this.raise(TSErrors.OptionalTypeBeforeRequired, elementNode); + } + seenOptionalElement || (seenOptionalElement = type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType"); + }); + return this.finishNode(node, "TSTupleType"); + } + tsParseTupleElementType() { + const { + startLoc + } = this.state; + const rest = this.eat(21); + let labeled; + let label; + let optional; + let type; + const isWord = tokenIsKeywordOrIdentifier(this.state.type); + const chAfterWord = isWord ? this.lookaheadCharCode() : null; + if (chAfterWord === 58) { + labeled = true; + optional = false; + label = this.parseIdentifier(true); + this.expect(14); + type = this.tsParseType(); + } else if (chAfterWord === 63) { + optional = true; + const startLoc = this.state.startLoc; + const wordName = this.state.value; + const typeOrLabel = this.tsParseNonArrayType(); + if (this.lookaheadCharCode() === 58) { + labeled = true; + label = this.createIdentifier(this.startNodeAt(startLoc), wordName); + this.expect(17); + this.expect(14); + type = this.tsParseType(); + } else { + labeled = false; + type = typeOrLabel; + this.expect(17); + } + } else { + type = this.tsParseType(); + optional = this.eat(17); + labeled = this.eat(14); + } + if (labeled) { + let labeledNode; + if (label) { + labeledNode = this.startNodeAtNode(label); + labeledNode.optional = optional; + labeledNode.label = label; + labeledNode.elementType = type; + if (this.eat(17)) { + labeledNode.optional = true; + this.raise(TSErrors.TupleOptionalAfterType, this.state.lastTokStartLoc); + } + } else { + labeledNode = this.startNodeAtNode(type); + labeledNode.optional = optional; + this.raise(TSErrors.InvalidTupleMemberLabel, type); + labeledNode.label = type; + labeledNode.elementType = this.tsParseType(); + } + type = this.finishNode(labeledNode, "TSNamedTupleMember"); + } else if (optional) { + const optionalTypeNode = this.startNodeAtNode(type); + optionalTypeNode.typeAnnotation = type; + type = this.finishNode(optionalTypeNode, "TSOptionalType"); + } + if (rest) { + const restNode = this.startNodeAt(startLoc); + restNode.typeAnnotation = type; + type = this.finishNode(restNode, "TSRestType"); + } + return type; + } + tsParseParenthesizedType() { + const node = this.startNode(); + this.expect(10); + node.typeAnnotation = this.tsParseType(); + this.expect(11); + return this.finishNode(node, "TSParenthesizedType"); + } + tsParseFunctionOrConstructorType(type, abstract) { + const node = this.startNode(); + if (type === "TSConstructorType") { + node.abstract = !!abstract; + if (abstract) this.next(); + this.next(); + } + this.tsInAllowConditionalTypesContext(() => this.tsFillSignature(19, node)); + return this.finishNode(node, type); + } + tsParseLiteralTypeNode() { + const node = this.startNode(); + switch (this.state.type) { + case 134: + case 135: + case 133: + case 85: + case 86: + node.literal = super.parseExprAtom(); + break; + default: + this.unexpected(); + } + return this.finishNode(node, "TSLiteralType"); + } + tsParseTemplateLiteralType() { + const node = this.startNode(); + node.literal = super.parseTemplate(false); + return this.finishNode(node, "TSLiteralType"); + } + parseTemplateSubstitution() { + if (this.state.inType) return this.tsParseType(); + return super.parseTemplateSubstitution(); + } + tsParseThisTypeOrThisTypePredicate() { + const thisKeyword = this.tsParseThisTypeNode(); + if (this.isContextual(116) && !this.hasPrecedingLineBreak()) { + return this.tsParseThisTypePredicate(thisKeyword); + } else { + return thisKeyword; + } + } + tsParseNonArrayType() { + switch (this.state.type) { + case 133: + case 134: + case 135: + case 85: + case 86: + return this.tsParseLiteralTypeNode(); + case 53: + if (this.state.value === "-") { + const node = this.startNode(); + const nextToken = this.lookahead(); + if (nextToken.type !== 134 && nextToken.type !== 135) { + this.unexpected(); + } + node.literal = this.parseMaybeUnary(); + return this.finishNode(node, "TSLiteralType"); + } + break; + case 78: + return this.tsParseThisTypeOrThisTypePredicate(); + case 87: + return this.tsParseTypeQuery(); + case 83: + return this.tsParseImportType(); + case 5: + return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral(); + case 0: + return this.tsParseTupleType(); + case 10: + return this.tsParseParenthesizedType(); + case 25: + case 24: + return this.tsParseTemplateLiteralType(); + default: + { + const { + type + } = this.state; + if (tokenIsIdentifier(type) || type === 88 || type === 84) { + const nodeType = type === 88 ? "TSVoidKeyword" : type === 84 ? "TSNullKeyword" : keywordTypeFromName(this.state.value); + if (nodeType !== undefined && this.lookaheadCharCode() !== 46) { + const node = this.startNode(); + this.next(); + return this.finishNode(node, nodeType); + } + return this.tsParseTypeReference(); + } + } + } + this.unexpected(); + } + tsParseArrayTypeOrHigher() { + let type = this.tsParseNonArrayType(); + while (!this.hasPrecedingLineBreak() && this.eat(0)) { + if (this.match(3)) { + const node = this.startNodeAtNode(type); + node.elementType = type; + this.expect(3); + type = this.finishNode(node, "TSArrayType"); + } else { + const node = this.startNodeAtNode(type); + node.objectType = type; + node.indexType = this.tsParseType(); + this.expect(3); + type = this.finishNode(node, "TSIndexedAccessType"); + } + } + return type; + } + tsParseTypeOperator() { + const node = this.startNode(); + const operator = this.state.value; + this.next(); + node.operator = operator; + node.typeAnnotation = this.tsParseTypeOperatorOrHigher(); + if (operator === "readonly") { + this.tsCheckTypeAnnotationForReadOnly(node); + } + return this.finishNode(node, "TSTypeOperator"); + } + tsCheckTypeAnnotationForReadOnly(node) { + switch (node.typeAnnotation.type) { + case "TSTupleType": + case "TSArrayType": + return; + default: + this.raise(TSErrors.UnexpectedReadonly, node); + } + } + tsParseInferType() { + const node = this.startNode(); + this.expectContextual(115); + const typeParameter = this.startNode(); + typeParameter.name = this.tsParseTypeParameterName(); + typeParameter.constraint = this.tsTryParse(() => this.tsParseConstraintForInferType()); + node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter"); + return this.finishNode(node, "TSInferType"); + } + tsParseConstraintForInferType() { + if (this.eat(81)) { + const constraint = this.tsInDisallowConditionalTypesContext(() => this.tsParseType()); + if (this.state.inDisallowConditionalTypesContext || !this.match(17)) { + return constraint; + } + } + } + tsParseTypeOperatorOrHigher() { + const isTypeOperator = tokenIsTSTypeOperator(this.state.type) && !this.state.containsEsc; + return isTypeOperator ? this.tsParseTypeOperator() : this.isContextual(115) ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(() => this.tsParseArrayTypeOrHigher()); + } + tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) { + const node = this.startNode(); + const hasLeadingOperator = this.eat(operator); + const types = []; + do { + types.push(parseConstituentType()); + } while (this.eat(operator)); + if (types.length === 1 && !hasLeadingOperator) { + return types[0]; + } + node.types = types; + return this.finishNode(node, kind); + } + tsParseIntersectionTypeOrHigher() { + return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), 45); + } + tsParseUnionTypeOrHigher() { + return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), 43); + } + tsIsStartOfFunctionType() { + if (this.match(47)) { + return true; + } + return this.match(10) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this)); + } + tsSkipParameterStart() { + if (tokenIsIdentifier(this.state.type) || this.match(78)) { + this.next(); + return true; + } + if (this.match(5)) { + const { + errors + } = this.state; + const previousErrorCount = errors.length; + try { + this.parseObjectLike(8, true); + return errors.length === previousErrorCount; + } catch (_unused) { + return false; + } + } + if (this.match(0)) { + this.next(); + const { + errors + } = this.state; + const previousErrorCount = errors.length; + try { + super.parseBindingList(3, 93, 1); + return errors.length === previousErrorCount; + } catch (_unused2) { + return false; + } + } + return false; + } + tsIsUnambiguouslyStartOfFunctionType() { + this.next(); + if (this.match(11) || this.match(21)) { + return true; + } + if (this.tsSkipParameterStart()) { + if (this.match(14) || this.match(12) || this.match(17) || this.match(29)) { + return true; + } + if (this.match(11)) { + this.next(); + if (this.match(19)) { + return true; + } + } + } + return false; + } + tsParseTypeOrTypePredicateAnnotation(returnToken) { + return this.tsInType(() => { + const t = this.startNode(); + this.expect(returnToken); + const node = this.startNode(); + const asserts = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this)); + if (asserts && this.match(78)) { + let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate(); + if (thisTypePredicate.type === "TSThisType") { + node.parameterName = thisTypePredicate; + node.asserts = true; + node.typeAnnotation = null; + thisTypePredicate = this.finishNode(node, "TSTypePredicate"); + } else { + this.resetStartLocationFromNode(thisTypePredicate, node); + thisTypePredicate.asserts = true; + } + t.typeAnnotation = thisTypePredicate; + return this.finishNode(t, "TSTypeAnnotation"); + } + const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this)); + if (!typePredicateVariable) { + if (!asserts) { + return this.tsParseTypeAnnotation(false, t); + } + node.parameterName = this.parseIdentifier(); + node.asserts = asserts; + node.typeAnnotation = null; + t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); + return this.finishNode(t, "TSTypeAnnotation"); + } + const type = this.tsParseTypeAnnotation(false); + node.parameterName = typePredicateVariable; + node.typeAnnotation = type; + node.asserts = asserts; + t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); + return this.finishNode(t, "TSTypeAnnotation"); + }); + } + tsTryParseTypeOrTypePredicateAnnotation() { + if (this.match(14)) { + return this.tsParseTypeOrTypePredicateAnnotation(14); + } + } + tsTryParseTypeAnnotation() { + if (this.match(14)) { + return this.tsParseTypeAnnotation(); + } + } + tsTryParseType() { + return this.tsEatThenParseType(14); + } + tsParseTypePredicatePrefix() { + const id = this.parseIdentifier(); + if (this.isContextual(116) && !this.hasPrecedingLineBreak()) { + this.next(); + return id; + } + } + tsParseTypePredicateAsserts() { + if (this.state.type !== 109) { + return false; + } + const containsEsc = this.state.containsEsc; + this.next(); + if (!tokenIsIdentifier(this.state.type) && !this.match(78)) { + return false; + } + if (containsEsc) { + this.raise(Errors.InvalidEscapedReservedWord, this.state.lastTokStartLoc, { + reservedWord: "asserts" + }); + } + return true; + } + tsParseTypeAnnotation(eatColon = true, t = this.startNode()) { + this.tsInType(() => { + if (eatColon) this.expect(14); + t.typeAnnotation = this.tsParseType(); + }); + return this.finishNode(t, "TSTypeAnnotation"); + } + tsParseType() { + assert(this.state.inType); + const type = this.tsParseNonConditionalType(); + if (this.state.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(81)) { + return type; + } + const node = this.startNodeAtNode(type); + node.checkType = type; + node.extendsType = this.tsInDisallowConditionalTypesContext(() => this.tsParseNonConditionalType()); + this.expect(17); + node.trueType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()); + this.expect(14); + node.falseType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()); + return this.finishNode(node, "TSConditionalType"); + } + isAbstractConstructorSignature() { + return this.isContextual(124) && this.lookahead().type === 77; + } + tsParseNonConditionalType() { + if (this.tsIsStartOfFunctionType()) { + return this.tsParseFunctionOrConstructorType("TSFunctionType"); + } + if (this.match(77)) { + return this.tsParseFunctionOrConstructorType("TSConstructorType"); + } else if (this.isAbstractConstructorSignature()) { + return this.tsParseFunctionOrConstructorType("TSConstructorType", true); + } + return this.tsParseUnionTypeOrHigher(); + } + tsParseTypeAssertion() { + if (this.getPluginOption("typescript", "disallowAmbiguousJSXLike")) { + this.raise(TSErrors.ReservedTypeAssertion, this.state.startLoc); + } + const node = this.startNode(); + node.typeAnnotation = this.tsInType(() => { + this.next(); + return this.match(75) ? this.tsParseTypeReference() : this.tsParseType(); + }); + this.expect(48); + node.expression = this.parseMaybeUnary(); + return this.finishNode(node, "TSTypeAssertion"); + } + tsParseHeritageClause(token) { + const originalStartLoc = this.state.startLoc; + const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", () => { + const node = this.startNode(); + node.expression = this.tsParseEntityName(); + if (this.match(47)) { + node.typeParameters = this.tsParseTypeArguments(); + } + return this.finishNode(node, "TSExpressionWithTypeArguments"); + }); + if (!delimitedList.length) { + this.raise(TSErrors.EmptyHeritageClauseType, originalStartLoc, { + token + }); + } + return delimitedList; + } + tsParseInterfaceDeclaration(node, properties = {}) { + if (this.hasFollowingLineBreak()) return null; + this.expectContextual(129); + if (properties.declare) node.declare = true; + if (tokenIsIdentifier(this.state.type)) { + node.id = this.parseIdentifier(); + this.checkIdentifier(node.id, 130); + } else { + node.id = null; + this.raise(TSErrors.MissingInterfaceName, this.state.startLoc); + } + node.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers); + if (this.eat(81)) { + node.extends = this.tsParseHeritageClause("extends"); + } + const body = this.startNode(); + body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)); + node.body = this.finishNode(body, "TSInterfaceBody"); + return this.finishNode(node, "TSInterfaceDeclaration"); + } + tsParseTypeAliasDeclaration(node) { + node.id = this.parseIdentifier(); + this.checkIdentifier(node.id, 2); + node.typeAnnotation = this.tsInType(() => { + node.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutModifiers); + this.expect(29); + if (this.isContextual(114) && this.lookahead().type !== 16) { + const node = this.startNode(); + this.next(); + return this.finishNode(node, "TSIntrinsicKeyword"); + } + return this.tsParseType(); + }); + this.semicolon(); + return this.finishNode(node, "TSTypeAliasDeclaration"); + } + tsInNoContext(cb) { + const oldContext = this.state.context; + this.state.context = [oldContext[0]]; + try { + return cb(); + } finally { + this.state.context = oldContext; + } + } + tsInType(cb) { + const oldInType = this.state.inType; + this.state.inType = true; + try { + return cb(); + } finally { + this.state.inType = oldInType; + } + } + tsInDisallowConditionalTypesContext(cb) { + const oldInDisallowConditionalTypesContext = this.state.inDisallowConditionalTypesContext; + this.state.inDisallowConditionalTypesContext = true; + try { + return cb(); + } finally { + this.state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; + } + } + tsInAllowConditionalTypesContext(cb) { + const oldInDisallowConditionalTypesContext = this.state.inDisallowConditionalTypesContext; + this.state.inDisallowConditionalTypesContext = false; + try { + return cb(); + } finally { + this.state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; + } + } + tsEatThenParseType(token) { + if (this.match(token)) { + return this.tsNextThenParseType(); + } + } + tsExpectThenParseType(token) { + return this.tsInType(() => { + this.expect(token); + return this.tsParseType(); + }); + } + tsNextThenParseType() { + return this.tsInType(() => { + this.next(); + return this.tsParseType(); + }); + } + tsParseEnumMember() { + const node = this.startNode(); + node.id = this.match(133) ? super.parseStringLiteral(this.state.value) : this.parseIdentifier(true); + if (this.eat(29)) { + node.initializer = super.parseMaybeAssignAllowIn(); + } + return this.finishNode(node, "TSEnumMember"); + } + tsParseEnumDeclaration(node, properties = {}) { + if (properties.const) node.const = true; + if (properties.declare) node.declare = true; + this.expectContextual(126); + node.id = this.parseIdentifier(); + this.checkIdentifier(node.id, node.const ? 8971 : 8459); + this.expect(5); + node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)); + this.expect(8); + return this.finishNode(node, "TSEnumDeclaration"); + } + tsParseModuleBlock() { + const node = this.startNode(); + this.scope.enter(0); + this.expect(5); + super.parseBlockOrModuleBlockBody(node.body = [], undefined, true, 8); + this.scope.exit(); + return this.finishNode(node, "TSModuleBlock"); + } + tsParseModuleOrNamespaceDeclaration(node, nested = false) { + node.id = this.parseIdentifier(); + if (!nested) { + this.checkIdentifier(node.id, 1024); + } + if (this.eat(16)) { + const inner = this.startNode(); + this.tsParseModuleOrNamespaceDeclaration(inner, true); + node.body = inner; + } else { + this.scope.enter(256); + this.prodParam.enter(0); + node.body = this.tsParseModuleBlock(); + this.prodParam.exit(); + this.scope.exit(); + } + return this.finishNode(node, "TSModuleDeclaration"); + } + tsParseAmbientExternalModuleDeclaration(node) { + if (this.isContextual(112)) { + node.global = true; + node.id = this.parseIdentifier(); + } else if (this.match(133)) { + node.id = super.parseStringLiteral(this.state.value); + } else { + this.unexpected(); + } + if (this.match(5)) { + this.scope.enter(256); + this.prodParam.enter(0); + node.body = this.tsParseModuleBlock(); + this.prodParam.exit(); + this.scope.exit(); + } else { + this.semicolon(); + } + return this.finishNode(node, "TSModuleDeclaration"); + } + tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier, isExport) { + node.isExport = isExport || false; + node.id = maybeDefaultIdentifier || this.parseIdentifier(); + this.checkIdentifier(node.id, 4096); + this.expect(29); + const moduleReference = this.tsParseModuleReference(); + if (node.importKind === "type" && moduleReference.type !== "TSExternalModuleReference") { + this.raise(TSErrors.ImportAliasHasImportType, moduleReference); + } + node.moduleReference = moduleReference; + this.semicolon(); + return this.finishNode(node, "TSImportEqualsDeclaration"); + } + tsIsExternalModuleReference() { + return this.isContextual(119) && this.lookaheadCharCode() === 40; + } + tsParseModuleReference() { + return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false); + } + tsParseExternalModuleReference() { + const node = this.startNode(); + this.expectContextual(119); + this.expect(10); + if (!this.match(133)) { + this.unexpected(); + } + node.expression = super.parseExprAtom(); + this.expect(11); + this.sawUnambiguousESM = true; + return this.finishNode(node, "TSExternalModuleReference"); + } + tsLookAhead(f) { + const state = this.state.clone(); + const res = f(); + this.state = state; + return res; + } + tsTryParseAndCatch(f) { + const result = this.tryParse(abort => f() || abort()); + if (result.aborted || !result.node) return; + if (result.error) this.state = result.failState; + return result.node; + } + tsTryParse(f) { + const state = this.state.clone(); + const result = f(); + if (result !== undefined && result !== false) { + return result; + } + this.state = state; + } + tsTryParseDeclare(nany) { + if (this.isLineTerminator()) { + return; + } + let startType = this.state.type; + let kind; + if (this.isContextual(100)) { + startType = 74; + kind = "let"; + } + return this.tsInAmbientContext(() => { + switch (startType) { + case 68: + nany.declare = true; + return super.parseFunctionStatement(nany, false, false); + case 80: + nany.declare = true; + return this.parseClass(nany, true, false); + case 126: + return this.tsParseEnumDeclaration(nany, { + declare: true + }); + case 112: + return this.tsParseAmbientExternalModuleDeclaration(nany); + case 75: + case 74: + if (!this.match(75) || !this.isLookaheadContextual("enum")) { + nany.declare = true; + return this.parseVarStatement(nany, kind || this.state.value, true); + } + this.expect(75); + return this.tsParseEnumDeclaration(nany, { + const: true, + declare: true + }); + case 129: + { + const result = this.tsParseInterfaceDeclaration(nany, { + declare: true + }); + if (result) return result; + } + default: + if (tokenIsIdentifier(startType)) { + return this.tsParseDeclaration(nany, this.state.value, true, null); + } + } + }); + } + tsTryParseExportDeclaration() { + return this.tsParseDeclaration(this.startNode(), this.state.value, true, null); + } + tsParseExpressionStatement(node, expr, decorators) { + switch (expr.name) { + case "declare": + { + const declaration = this.tsTryParseDeclare(node); + if (declaration) { + declaration.declare = true; + } + return declaration; + } + case "global": + if (this.match(5)) { + this.scope.enter(256); + this.prodParam.enter(0); + const mod = node; + mod.global = true; + mod.id = expr; + mod.body = this.tsParseModuleBlock(); + this.scope.exit(); + this.prodParam.exit(); + return this.finishNode(mod, "TSModuleDeclaration"); + } + break; + default: + return this.tsParseDeclaration(node, expr.name, false, decorators); + } + } + tsParseDeclaration(node, value, next, decorators) { + switch (value) { + case "abstract": + if (this.tsCheckLineTerminator(next) && (this.match(80) || tokenIsIdentifier(this.state.type))) { + return this.tsParseAbstractDeclaration(node, decorators); + } + break; + case "module": + if (this.tsCheckLineTerminator(next)) { + if (this.match(133)) { + return this.tsParseAmbientExternalModuleDeclaration(node); + } else if (tokenIsIdentifier(this.state.type)) { + return this.tsParseModuleOrNamespaceDeclaration(node); + } + } + break; + case "namespace": + if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) { + return this.tsParseModuleOrNamespaceDeclaration(node); + } + break; + case "type": + if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) { + return this.tsParseTypeAliasDeclaration(node); + } + break; + } + } + tsCheckLineTerminator(next) { + if (next) { + if (this.hasFollowingLineBreak()) return false; + this.next(); + return true; + } + return !this.isLineTerminator(); + } + tsTryParseGenericAsyncArrowFunction(startLoc) { + if (!this.match(47)) return; + const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + this.state.maybeInArrowParameters = true; + const res = this.tsTryParseAndCatch(() => { + const node = this.startNodeAt(startLoc); + node.typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier); + super.parseFunctionParams(node); + node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation(); + this.expect(19); + return node; + }); + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + if (!res) return; + return super.parseArrowExpression(res, null, true); + } + tsParseTypeArgumentsInExpression() { + if (this.reScan_lt() !== 47) return; + return this.tsParseTypeArguments(); + } + tsParseTypeArguments() { + const node = this.startNode(); + node.params = this.tsInType(() => this.tsInNoContext(() => { + this.expect(47); + return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this)); + })); + if (node.params.length === 0) { + this.raise(TSErrors.EmptyTypeArguments, node); + } else if (!this.state.inType && this.curContext() === types.brace) { + this.reScan_lt_gt(); + } + this.expect(48); + return this.finishNode(node, "TSTypeParameterInstantiation"); + } + tsIsDeclarationStart() { + return tokenIsTSDeclarationStart(this.state.type); + } + isExportDefaultSpecifier() { + if (this.tsIsDeclarationStart()) return false; + return super.isExportDefaultSpecifier(); + } + parseAssignableListItem(flags, decorators) { + const startLoc = this.state.startLoc; + const modified = {}; + this.tsParseModifiers({ + allowedModifiers: ["public", "private", "protected", "override", "readonly"] + }, modified); + const accessibility = modified.accessibility; + const override = modified.override; + const readonly = modified.readonly; + if (!(flags & 4) && (accessibility || readonly || override)) { + this.raise(TSErrors.UnexpectedParameterModifier, startLoc); + } + const left = this.parseMaybeDefault(); + this.parseAssignableListItemTypes(left, flags); + const elt = this.parseMaybeDefault(left.loc.start, left); + if (accessibility || readonly || override) { + const pp = this.startNodeAt(startLoc); + if (decorators.length) { + pp.decorators = decorators; + } + if (accessibility) pp.accessibility = accessibility; + if (readonly) pp.readonly = readonly; + if (override) pp.override = override; + if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") { + this.raise(TSErrors.UnsupportedParameterPropertyKind, pp); + } + pp.parameter = elt; + return this.finishNode(pp, "TSParameterProperty"); + } + if (decorators.length) { + left.decorators = decorators; + } + return elt; + } + isSimpleParameter(node) { + return node.type === "TSParameterProperty" && super.isSimpleParameter(node.parameter) || super.isSimpleParameter(node); + } + tsDisallowOptionalPattern(node) { + for (const param of node.params) { + if (param.type !== "Identifier" && param.optional && !this.state.isAmbientContext) { + this.raise(TSErrors.PatternIsOptional, param); + } + } + } + setArrowFunctionParameters(node, params, trailingCommaLoc) { + super.setArrowFunctionParameters(node, params, trailingCommaLoc); + this.tsDisallowOptionalPattern(node); + } + parseFunctionBodyAndFinish(node, type, isMethod = false) { + if (this.match(14)) { + node.returnType = this.tsParseTypeOrTypePredicateAnnotation(14); + } + const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" || type === "ClassPrivateMethod" ? "TSDeclareMethod" : undefined; + if (bodilessType && !this.match(5) && this.isLineTerminator()) { + return this.finishNode(node, bodilessType); + } + if (bodilessType === "TSDeclareFunction" && this.state.isAmbientContext) { + this.raise(TSErrors.DeclareFunctionHasImplementation, node); + if (node.declare) { + return super.parseFunctionBodyAndFinish(node, bodilessType, isMethod); + } + } + this.tsDisallowOptionalPattern(node); + return super.parseFunctionBodyAndFinish(node, type, isMethod); + } + registerFunctionStatementId(node) { + if (!node.body && node.id) { + this.checkIdentifier(node.id, 1024); + } else { + super.registerFunctionStatementId(node); + } + } + tsCheckForInvalidTypeCasts(items) { + items.forEach(node => { + if ((node == null ? void 0 : node.type) === "TSTypeCastExpression") { + this.raise(TSErrors.UnexpectedTypeAnnotation, node.typeAnnotation); + } + }); + } + toReferencedList(exprList, isInParens) { + this.tsCheckForInvalidTypeCasts(exprList); + return exprList; + } + parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { + const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors); + if (node.type === "ArrayExpression") { + this.tsCheckForInvalidTypeCasts(node.elements); + } + return node; + } + parseSubscript(base, startLoc, noCalls, state) { + if (!this.hasPrecedingLineBreak() && this.match(35)) { + this.state.canStartJSXElement = false; + this.next(); + const nonNullExpression = this.startNodeAt(startLoc); + nonNullExpression.expression = base; + return this.finishNode(nonNullExpression, "TSNonNullExpression"); + } + let isOptionalCall = false; + if (this.match(18) && this.lookaheadCharCode() === 60) { + if (noCalls) { + state.stop = true; + return base; + } + state.optionalChainMember = isOptionalCall = true; + this.next(); + } + if (this.match(47) || this.match(51)) { + let missingParenErrorLoc; + const result = this.tsTryParseAndCatch(() => { + if (!noCalls && this.atPossibleAsyncArrow(base)) { + const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startLoc); + if (asyncArrowFn) { + return asyncArrowFn; + } + } + const typeArguments = this.tsParseTypeArgumentsInExpression(); + if (!typeArguments) return; + if (isOptionalCall && !this.match(10)) { + missingParenErrorLoc = this.state.curPosition(); + return; + } + if (tokenIsTemplate(this.state.type)) { + const result = super.parseTaggedTemplateExpression(base, startLoc, state); + result.typeParameters = typeArguments; + return result; + } + if (!noCalls && this.eat(10)) { + const node = this.startNodeAt(startLoc); + node.callee = base; + node.arguments = this.parseCallExpressionArguments(11, false); + this.tsCheckForInvalidTypeCasts(node.arguments); + node.typeParameters = typeArguments; + if (state.optionalChainMember) { + node.optional = isOptionalCall; + } + return this.finishCallExpression(node, state.optionalChainMember); + } + const tokenType = this.state.type; + if (tokenType === 48 || tokenType === 52 || tokenType !== 10 && tokenCanStartExpression(tokenType) && !this.hasPrecedingLineBreak()) { + return; + } + const node = this.startNodeAt(startLoc); + node.expression = base; + node.typeParameters = typeArguments; + return this.finishNode(node, "TSInstantiationExpression"); + }); + if (missingParenErrorLoc) { + this.unexpected(missingParenErrorLoc, 10); + } + if (result) { + if (result.type === "TSInstantiationExpression" && (this.match(16) || this.match(18) && this.lookaheadCharCode() !== 40)) { + this.raise(TSErrors.InvalidPropertyAccessAfterInstantiationExpression, this.state.startLoc); + } + return result; + } + } + return super.parseSubscript(base, startLoc, noCalls, state); + } + parseNewCallee(node) { + var _callee$extra; + super.parseNewCallee(node); + const { + callee + } = node; + if (callee.type === "TSInstantiationExpression" && !((_callee$extra = callee.extra) != null && _callee$extra.parenthesized)) { + node.typeParameters = callee.typeParameters; + node.callee = callee.expression; + } + } + parseExprOp(left, leftStartLoc, minPrec) { + let isSatisfies; + if (tokenOperatorPrecedence(58) > minPrec && !this.hasPrecedingLineBreak() && (this.isContextual(93) || (isSatisfies = this.isContextual(120)))) { + const node = this.startNodeAt(leftStartLoc); + node.expression = left; + node.typeAnnotation = this.tsInType(() => { + this.next(); + if (this.match(75)) { + if (isSatisfies) { + this.raise(Errors.UnexpectedKeyword, this.state.startLoc, { + keyword: "const" + }); + } + return this.tsParseTypeReference(); + } + return this.tsParseType(); + }); + this.finishNode(node, isSatisfies ? "TSSatisfiesExpression" : "TSAsExpression"); + this.reScan_lt_gt(); + return this.parseExprOp(node, leftStartLoc, minPrec); + } + return super.parseExprOp(left, leftStartLoc, minPrec); + } + checkReservedWord(word, startLoc, checkKeywords, isBinding) { + if (!this.state.isAmbientContext) { + super.checkReservedWord(word, startLoc, checkKeywords, isBinding); + } + } + checkImportReflection(node) { + super.checkImportReflection(node); + if (node.module && node.importKind !== "value") { + this.raise(TSErrors.ImportReflectionHasImportType, node.specifiers[0].loc.start); + } + } + checkDuplicateExports() {} + isPotentialImportPhase(isExport) { + if (super.isPotentialImportPhase(isExport)) return true; + if (this.isContextual(130)) { + const ch = this.lookaheadCharCode(); + return isExport ? ch === 123 || ch === 42 : ch !== 61; + } + return !isExport && this.isContextual(87); + } + applyImportPhase(node, isExport, phase, loc) { + super.applyImportPhase(node, isExport, phase, loc); + if (isExport) { + node.exportKind = phase === "type" ? "type" : "value"; + } else { + node.importKind = phase === "type" || phase === "typeof" ? phase : "value"; + } + } + parseImport(node) { + if (this.match(133)) { + node.importKind = "value"; + return super.parseImport(node); + } + let importNode; + if (tokenIsIdentifier(this.state.type) && this.lookaheadCharCode() === 61) { + node.importKind = "value"; + return this.tsParseImportEqualsDeclaration(node); + } else if (this.isContextual(130)) { + const maybeDefaultIdentifier = this.parseMaybeImportPhase(node, false); + if (this.lookaheadCharCode() === 61) { + return this.tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier); + } else { + importNode = super.parseImportSpecifiersAndAfter(node, maybeDefaultIdentifier); + } + } else { + importNode = super.parseImport(node); + } + if (importNode.importKind === "type" && importNode.specifiers.length > 1 && importNode.specifiers[0].type === "ImportDefaultSpecifier") { + this.raise(TSErrors.TypeImportCannotSpecifyDefaultAndNamed, importNode); + } + return importNode; + } + parseExport(node, decorators) { + if (this.match(83)) { + this.next(); + const nodeImportEquals = node; + let maybeDefaultIdentifier = null; + if (this.isContextual(130) && this.isPotentialImportPhase(false)) { + maybeDefaultIdentifier = this.parseMaybeImportPhase(nodeImportEquals, false); + } else { + nodeImportEquals.importKind = "value"; + } + return this.tsParseImportEqualsDeclaration(nodeImportEquals, maybeDefaultIdentifier, true); + } else if (this.eat(29)) { + const assign = node; + assign.expression = super.parseExpression(); + this.semicolon(); + this.sawUnambiguousESM = true; + return this.finishNode(assign, "TSExportAssignment"); + } else if (this.eatContextual(93)) { + const decl = node; + this.expectContextual(128); + decl.id = this.parseIdentifier(); + this.semicolon(); + return this.finishNode(decl, "TSNamespaceExportDeclaration"); + } else { + return super.parseExport(node, decorators); + } + } + isAbstractClass() { + return this.isContextual(124) && this.lookahead().type === 80; + } + parseExportDefaultExpression() { + if (this.isAbstractClass()) { + const cls = this.startNode(); + this.next(); + cls.abstract = true; + return this.parseClass(cls, true, true); + } + if (this.match(129)) { + const result = this.tsParseInterfaceDeclaration(this.startNode()); + if (result) return result; + } + return super.parseExportDefaultExpression(); + } + parseVarStatement(node, kind, allowMissingInitializer = false) { + const { + isAmbientContext + } = this.state; + const declaration = super.parseVarStatement(node, kind, allowMissingInitializer || isAmbientContext); + if (!isAmbientContext) return declaration; + for (const { + id, + init + } of declaration.declarations) { + if (!init) continue; + if (kind !== "const" || !!id.typeAnnotation) { + this.raise(TSErrors.InitializerNotAllowedInAmbientContext, init); + } else if (!isValidAmbientConstInitializer(init, this.hasPlugin("estree"))) { + this.raise(TSErrors.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference, init); + } + } + return declaration; + } + parseStatementContent(flags, decorators) { + if (this.match(75) && this.isLookaheadContextual("enum")) { + const node = this.startNode(); + this.expect(75); + return this.tsParseEnumDeclaration(node, { + const: true + }); + } + if (this.isContextual(126)) { + return this.tsParseEnumDeclaration(this.startNode()); + } + if (this.isContextual(129)) { + const result = this.tsParseInterfaceDeclaration(this.startNode()); + if (result) return result; + } + return super.parseStatementContent(flags, decorators); + } + parseAccessModifier() { + return this.tsParseModifier(["public", "protected", "private"]); + } + tsHasSomeModifiers(member, modifiers) { + return modifiers.some(modifier => { + if (tsIsAccessModifier(modifier)) { + return member.accessibility === modifier; + } + return !!member[modifier]; + }); + } + tsIsStartOfStaticBlocks() { + return this.isContextual(106) && this.lookaheadCharCode() === 123; + } + parseClassMember(classBody, member, state) { + const modifiers = ["declare", "private", "public", "protected", "override", "abstract", "readonly", "static"]; + this.tsParseModifiers({ + allowedModifiers: modifiers, + disallowedModifiers: ["in", "out"], + stopOnStartOfClassStaticBlock: true, + errorTemplate: TSErrors.InvalidModifierOnTypeParameterPositions + }, member); + const callParseClassMemberWithIsStatic = () => { + if (this.tsIsStartOfStaticBlocks()) { + this.next(); + this.next(); + if (this.tsHasSomeModifiers(member, modifiers)) { + this.raise(TSErrors.StaticBlockCannotHaveModifier, this.state.curPosition()); + } + super.parseClassStaticBlock(classBody, member); + } else { + this.parseClassMemberWithIsStatic(classBody, member, state, !!member.static); + } + }; + if (member.declare) { + this.tsInAmbientContext(callParseClassMemberWithIsStatic); + } else { + callParseClassMemberWithIsStatic(); + } + } + parseClassMemberWithIsStatic(classBody, member, state, isStatic) { + const idx = this.tsTryParseIndexSignature(member); + if (idx) { + classBody.body.push(idx); + if (member.abstract) { + this.raise(TSErrors.IndexSignatureHasAbstract, member); + } + if (member.accessibility) { + this.raise(TSErrors.IndexSignatureHasAccessibility, member, { + modifier: member.accessibility + }); + } + if (member.declare) { + this.raise(TSErrors.IndexSignatureHasDeclare, member); + } + if (member.override) { + this.raise(TSErrors.IndexSignatureHasOverride, member); + } + return; + } + if (!this.state.inAbstractClass && member.abstract) { + this.raise(TSErrors.NonAbstractClassHasAbstractMethod, member); + } + if (member.override) { + if (!state.hadSuperClass) { + this.raise(TSErrors.OverrideNotInSubClass, member); + } + } + super.parseClassMemberWithIsStatic(classBody, member, state, isStatic); + } + parsePostMemberNameModifiers(methodOrProp) { + const optional = this.eat(17); + if (optional) methodOrProp.optional = true; + if (methodOrProp.readonly && this.match(10)) { + this.raise(TSErrors.ClassMethodHasReadonly, methodOrProp); + } + if (methodOrProp.declare && this.match(10)) { + this.raise(TSErrors.ClassMethodHasDeclare, methodOrProp); + } + } + parseExpressionStatement(node, expr, decorators) { + const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr, decorators) : undefined; + return decl || super.parseExpressionStatement(node, expr, decorators); + } + shouldParseExportDeclaration() { + if (this.tsIsDeclarationStart()) return true; + return super.shouldParseExportDeclaration(); + } + parseConditional(expr, startLoc, refExpressionErrors) { + if (!this.state.maybeInArrowParameters || !this.match(17)) { + return super.parseConditional(expr, startLoc, refExpressionErrors); + } + const result = this.tryParse(() => super.parseConditional(expr, startLoc)); + if (!result.node) { + if (result.error) { + super.setOptionalParametersError(refExpressionErrors, result.error); + } + return expr; + } + if (result.error) this.state = result.failState; + return result.node; + } + parseParenItem(node, startLoc) { + const newNode = super.parseParenItem(node, startLoc); + if (this.eat(17)) { + newNode.optional = true; + this.resetEndLocation(node); + } + if (this.match(14)) { + const typeCastNode = this.startNodeAt(startLoc); + typeCastNode.expression = node; + typeCastNode.typeAnnotation = this.tsParseTypeAnnotation(); + return this.finishNode(typeCastNode, "TSTypeCastExpression"); + } + return node; + } + parseExportDeclaration(node) { + if (!this.state.isAmbientContext && this.isContextual(125)) { + return this.tsInAmbientContext(() => this.parseExportDeclaration(node)); + } + const startLoc = this.state.startLoc; + const isDeclare = this.eatContextual(125); + if (isDeclare && (this.isContextual(125) || !this.shouldParseExportDeclaration())) { + throw this.raise(TSErrors.ExpectedAmbientAfterExportDeclare, this.state.startLoc); + } + const isIdentifier = tokenIsIdentifier(this.state.type); + const declaration = isIdentifier && this.tsTryParseExportDeclaration() || super.parseExportDeclaration(node); + if (!declaration) return null; + if (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare) { + node.exportKind = "type"; + } + if (isDeclare) { + this.resetStartLocation(declaration, startLoc); + declaration.declare = true; + } + return declaration; + } + parseClassId(node, isStatement, optionalId, bindingType) { + if ((!isStatement || optionalId) && this.isContextual(113)) { + return; + } + super.parseClassId(node, isStatement, optionalId, node.declare ? 1024 : 8331); + const typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers); + if (typeParameters) node.typeParameters = typeParameters; + } + parseClassPropertyAnnotation(node) { + if (!node.optional) { + if (this.eat(35)) { + node.definite = true; + } else if (this.eat(17)) { + node.optional = true; + } + } + const type = this.tsTryParseTypeAnnotation(); + if (type) node.typeAnnotation = type; + } + parseClassProperty(node) { + this.parseClassPropertyAnnotation(node); + if (this.state.isAmbientContext && !(node.readonly && !node.typeAnnotation) && this.match(29)) { + this.raise(TSErrors.DeclareClassFieldHasInitializer, this.state.startLoc); + } + if (node.abstract && this.match(29)) { + const { + key + } = node; + this.raise(TSErrors.AbstractPropertyHasInitializer, this.state.startLoc, { + propertyName: key.type === "Identifier" && !node.computed ? key.name : `[${this.input.slice(key.start, key.end)}]` + }); + } + return super.parseClassProperty(node); + } + parseClassPrivateProperty(node) { + if (node.abstract) { + this.raise(TSErrors.PrivateElementHasAbstract, node); + } + if (node.accessibility) { + this.raise(TSErrors.PrivateElementHasAccessibility, node, { + modifier: node.accessibility + }); + } + this.parseClassPropertyAnnotation(node); + return super.parseClassPrivateProperty(node); + } + parseClassAccessorProperty(node) { + this.parseClassPropertyAnnotation(node); + if (node.optional) { + this.raise(TSErrors.AccessorCannotBeOptional, node); + } + return super.parseClassAccessorProperty(node); + } + pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + if (typeParameters && isConstructor) { + this.raise(TSErrors.ConstructorHasTypeParameters, typeParameters); + } + const { + declare = false, + kind + } = method; + if (declare && (kind === "get" || kind === "set")) { + this.raise(TSErrors.DeclareAccessor, method, { + kind + }); + } + if (typeParameters) method.typeParameters = typeParameters; + super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); + } + pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + if (typeParameters) method.typeParameters = typeParameters; + super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); + } + declareClassPrivateMethodInScope(node, kind) { + if (node.type === "TSDeclareMethod") return; + if (node.type === "MethodDefinition" && !hasOwnProperty.call(node.value, "body")) { + return; + } + super.declareClassPrivateMethodInScope(node, kind); + } + parseClassSuper(node) { + super.parseClassSuper(node); + if (node.superClass && (this.match(47) || this.match(51))) { + node.superTypeParameters = this.tsParseTypeArgumentsInExpression(); + } + if (this.eatContextual(113)) { + node.implements = this.tsParseHeritageClause("implements"); + } + } + parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + if (typeParameters) prop.typeParameters = typeParameters; + return super.parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors); + } + parseFunctionParams(node, isConstructor) { + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + if (typeParameters) node.typeParameters = typeParameters; + super.parseFunctionParams(node, isConstructor); + } + parseVarId(decl, kind) { + super.parseVarId(decl, kind); + if (decl.id.type === "Identifier" && !this.hasPrecedingLineBreak() && this.eat(35)) { + decl.definite = true; + } + const type = this.tsTryParseTypeAnnotation(); + if (type) { + decl.id.typeAnnotation = type; + this.resetEndLocation(decl.id); + } + } + parseAsyncArrowFromCallExpression(node, call) { + if (this.match(14)) { + node.returnType = this.tsParseTypeAnnotation(); + } + return super.parseAsyncArrowFromCallExpression(node, call); + } + parseMaybeAssign(refExpressionErrors, afterLeftParse) { + var _jsx, _jsx2, _typeCast, _jsx3, _typeCast2; + let state; + let jsx; + let typeCast; + if (this.hasPlugin("jsx") && (this.match(142) || this.match(47))) { + state = this.state.clone(); + jsx = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state); + if (!jsx.error) return jsx.node; + const { + context + } = this.state; + const currentContext = context[context.length - 1]; + if (currentContext === types.j_oTag || currentContext === types.j_expr) { + context.pop(); + } + } + if (!((_jsx = jsx) != null && _jsx.error) && !this.match(47)) { + return super.parseMaybeAssign(refExpressionErrors, afterLeftParse); + } + if (!state || state === this.state) state = this.state.clone(); + let typeParameters; + const arrow = this.tryParse(abort => { + var _expr$extra, _typeParameters; + typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier); + const expr = super.parseMaybeAssign(refExpressionErrors, afterLeftParse); + if (expr.type !== "ArrowFunctionExpression" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) { + abort(); + } + if (((_typeParameters = typeParameters) == null ? void 0 : _typeParameters.params.length) !== 0) { + this.resetStartLocationFromNode(expr, typeParameters); + } + expr.typeParameters = typeParameters; + return expr; + }, state); + if (!arrow.error && !arrow.aborted) { + if (typeParameters) this.reportReservedArrowTypeParam(typeParameters); + return arrow.node; + } + if (!jsx) { + assert(!this.hasPlugin("jsx")); + typeCast = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state); + if (!typeCast.error) return typeCast.node; + } + if ((_jsx2 = jsx) != null && _jsx2.node) { + this.state = jsx.failState; + return jsx.node; + } + if (arrow.node) { + this.state = arrow.failState; + if (typeParameters) this.reportReservedArrowTypeParam(typeParameters); + return arrow.node; + } + if ((_typeCast = typeCast) != null && _typeCast.node) { + this.state = typeCast.failState; + return typeCast.node; + } + throw ((_jsx3 = jsx) == null ? void 0 : _jsx3.error) || arrow.error || ((_typeCast2 = typeCast) == null ? void 0 : _typeCast2.error); + } + reportReservedArrowTypeParam(node) { + var _node$extra; + if (node.params.length === 1 && !node.params[0].constraint && !((_node$extra = node.extra) != null && _node$extra.trailingComma) && this.getPluginOption("typescript", "disallowAmbiguousJSXLike")) { + this.raise(TSErrors.ReservedArrowTypeParam, node); + } + } + parseMaybeUnary(refExpressionErrors, sawUnary) { + if (!this.hasPlugin("jsx") && this.match(47)) { + return this.tsParseTypeAssertion(); + } + return super.parseMaybeUnary(refExpressionErrors, sawUnary); + } + parseArrow(node) { + if (this.match(14)) { + const result = this.tryParse(abort => { + const returnType = this.tsParseTypeOrTypePredicateAnnotation(14); + if (this.canInsertSemicolon() || !this.match(19)) abort(); + return returnType; + }); + if (result.aborted) return; + if (!result.thrown) { + if (result.error) this.state = result.failState; + node.returnType = result.node; + } + } + return super.parseArrow(node); + } + parseAssignableListItemTypes(param, flags) { + if (!(flags & 2)) return param; + if (this.eat(17)) { + param.optional = true; + } + const type = this.tsTryParseTypeAnnotation(); + if (type) param.typeAnnotation = type; + this.resetEndLocation(param); + return param; + } + isAssignable(node, isBinding) { + switch (node.type) { + case "TSTypeCastExpression": + return this.isAssignable(node.expression, isBinding); + case "TSParameterProperty": + return true; + default: + return super.isAssignable(node, isBinding); + } + } + toAssignable(node, isLHS = false) { + switch (node.type) { + case "ParenthesizedExpression": + this.toAssignableParenthesizedExpression(node, isLHS); + break; + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSNonNullExpression": + case "TSTypeAssertion": + if (isLHS) { + this.expressionScope.recordArrowParameterBindingError(TSErrors.UnexpectedTypeCastInParameter, node); + } else { + this.raise(TSErrors.UnexpectedTypeCastInParameter, node); + } + this.toAssignable(node.expression, isLHS); + break; + case "AssignmentExpression": + if (!isLHS && node.left.type === "TSTypeCastExpression") { + node.left = this.typeCastToParameter(node.left); + } + default: + super.toAssignable(node, isLHS); + } + } + toAssignableParenthesizedExpression(node, isLHS) { + switch (node.expression.type) { + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSNonNullExpression": + case "TSTypeAssertion": + case "ParenthesizedExpression": + this.toAssignable(node.expression, isLHS); + break; + default: + super.toAssignable(node, isLHS); + } + } + checkToRestConversion(node, allowPattern) { + switch (node.type) { + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSTypeAssertion": + case "TSNonNullExpression": + this.checkToRestConversion(node.expression, false); + break; + default: + super.checkToRestConversion(node, allowPattern); + } + } + isValidLVal(type, isUnparenthesizedInAssign, binding) { + switch (type) { + case "TSTypeCastExpression": + return true; + case "TSParameterProperty": + return "parameter"; + case "TSNonNullExpression": + case "TSInstantiationExpression": + return "expression"; + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSTypeAssertion": + return (binding !== 64 || !isUnparenthesizedInAssign) && ["expression", true]; + default: + return super.isValidLVal(type, isUnparenthesizedInAssign, binding); + } + } + parseBindingAtom() { + if (this.state.type === 78) { + return this.parseIdentifier(true); + } + return super.parseBindingAtom(); + } + parseMaybeDecoratorArguments(expr) { + if (this.match(47) || this.match(51)) { + const typeArguments = this.tsParseTypeArgumentsInExpression(); + if (this.match(10)) { + const call = super.parseMaybeDecoratorArguments(expr); + call.typeParameters = typeArguments; + return call; + } + this.unexpected(null, 10); + } + return super.parseMaybeDecoratorArguments(expr); + } + checkCommaAfterRest(close) { + if (this.state.isAmbientContext && this.match(12) && this.lookaheadCharCode() === close) { + this.next(); + return false; + } + return super.checkCommaAfterRest(close); + } + isClassMethod() { + return this.match(47) || super.isClassMethod(); + } + isClassProperty() { + return this.match(35) || this.match(14) || super.isClassProperty(); + } + parseMaybeDefault(startLoc, left) { + const node = super.parseMaybeDefault(startLoc, left); + if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { + this.raise(TSErrors.TypeAnnotationAfterAssign, node.typeAnnotation); + } + return node; + } + getTokenFromCode(code) { + if (this.state.inType) { + if (code === 62) { + this.finishOp(48, 1); + return; + } + if (code === 60) { + this.finishOp(47, 1); + return; + } + } + super.getTokenFromCode(code); + } + reScan_lt_gt() { + const { + type + } = this.state; + if (type === 47) { + this.state.pos -= 1; + this.readToken_lt(); + } else if (type === 48) { + this.state.pos -= 1; + this.readToken_gt(); + } + } + reScan_lt() { + const { + type + } = this.state; + if (type === 51) { + this.state.pos -= 2; + this.finishOp(47, 1); + return 47; + } + return type; + } + toAssignableList(exprList, trailingCommaLoc, isLHS) { + for (let i = 0; i < exprList.length; i++) { + const expr = exprList[i]; + if ((expr == null ? void 0 : expr.type) === "TSTypeCastExpression") { + exprList[i] = this.typeCastToParameter(expr); + } + } + super.toAssignableList(exprList, trailingCommaLoc, isLHS); + } + typeCastToParameter(node) { + node.expression.typeAnnotation = node.typeAnnotation; + this.resetEndLocation(node.expression, node.typeAnnotation.loc.end); + return node.expression; + } + shouldParseArrow(params) { + if (this.match(14)) { + return params.every(expr => this.isAssignable(expr, true)); + } + return super.shouldParseArrow(params); + } + shouldParseAsyncArrow() { + return this.match(14) || super.shouldParseAsyncArrow(); + } + canHaveLeadingDecorator() { + return super.canHaveLeadingDecorator() || this.isAbstractClass(); + } + jsxParseOpeningElementAfterName(node) { + if (this.match(47) || this.match(51)) { + const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArgumentsInExpression()); + if (typeArguments) node.typeParameters = typeArguments; + } + return super.jsxParseOpeningElementAfterName(node); + } + getGetterSetterExpectedParamCount(method) { + const baseCount = super.getGetterSetterExpectedParamCount(method); + const params = this.getObjectOrClassMethodParams(method); + const firstParam = params[0]; + const hasContextParam = firstParam && this.isThisParam(firstParam); + return hasContextParam ? baseCount + 1 : baseCount; + } + parseCatchClauseParam() { + const param = super.parseCatchClauseParam(); + const type = this.tsTryParseTypeAnnotation(); + if (type) { + param.typeAnnotation = type; + this.resetEndLocation(param); + } + return param; + } + tsInAmbientContext(cb) { + const { + isAmbientContext: oldIsAmbientContext, + strict: oldStrict + } = this.state; + this.state.isAmbientContext = true; + this.state.strict = false; + try { + return cb(); + } finally { + this.state.isAmbientContext = oldIsAmbientContext; + this.state.strict = oldStrict; + } + } + parseClass(node, isStatement, optionalId) { + const oldInAbstractClass = this.state.inAbstractClass; + this.state.inAbstractClass = !!node.abstract; + try { + return super.parseClass(node, isStatement, optionalId); + } finally { + this.state.inAbstractClass = oldInAbstractClass; + } + } + tsParseAbstractDeclaration(node, decorators) { + if (this.match(80)) { + node.abstract = true; + return this.maybeTakeDecorators(decorators, this.parseClass(node, true, false)); + } else if (this.isContextual(129)) { + if (!this.hasFollowingLineBreak()) { + node.abstract = true; + this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifer, node); + return this.tsParseInterfaceDeclaration(node); + } + } else { + this.unexpected(null, 80); + } + } + parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope) { + const method = super.parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope); + if (method.abstract) { + const hasBody = this.hasPlugin("estree") ? !!method.value.body : !!method.body; + if (hasBody) { + const { + key + } = method; + this.raise(TSErrors.AbstractMethodHasImplementation, method, { + methodName: key.type === "Identifier" && !method.computed ? key.name : `[${this.input.slice(key.start, key.end)}]` + }); + } + } + return method; + } + tsParseTypeParameterName() { + const typeName = this.parseIdentifier(); + return typeName.name; + } + shouldParseAsAmbientContext() { + return !!this.getPluginOption("typescript", "dts"); + } + parse() { + if (this.shouldParseAsAmbientContext()) { + this.state.isAmbientContext = true; + } + return super.parse(); + } + getExpression() { + if (this.shouldParseAsAmbientContext()) { + this.state.isAmbientContext = true; + } + return super.getExpression(); + } + parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly) { + if (!isString && isMaybeTypeOnly) { + this.parseTypeOnlyImportExportSpecifier(node, false, isInTypeExport); + return this.finishNode(node, "ExportSpecifier"); + } + node.exportKind = "value"; + return super.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly); + } + parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) { + if (!importedIsString && isMaybeTypeOnly) { + this.parseTypeOnlyImportExportSpecifier(specifier, true, isInTypeOnlyImport); + return this.finishNode(specifier, "ImportSpecifier"); + } + specifier.importKind = "value"; + return super.parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, isInTypeOnlyImport ? 4098 : 4096); + } + parseTypeOnlyImportExportSpecifier(node, isImport, isInTypeOnlyImportExport) { + const leftOfAsKey = isImport ? "imported" : "local"; + const rightOfAsKey = isImport ? "local" : "exported"; + let leftOfAs = node[leftOfAsKey]; + let rightOfAs; + let hasTypeSpecifier = false; + let canParseAsKeyword = true; + const loc = leftOfAs.loc.start; + if (this.isContextual(93)) { + const firstAs = this.parseIdentifier(); + if (this.isContextual(93)) { + const secondAs = this.parseIdentifier(); + if (tokenIsKeywordOrIdentifier(this.state.type)) { + hasTypeSpecifier = true; + leftOfAs = firstAs; + rightOfAs = isImport ? this.parseIdentifier() : this.parseModuleExportName(); + canParseAsKeyword = false; + } else { + rightOfAs = secondAs; + canParseAsKeyword = false; + } + } else if (tokenIsKeywordOrIdentifier(this.state.type)) { + canParseAsKeyword = false; + rightOfAs = isImport ? this.parseIdentifier() : this.parseModuleExportName(); + } else { + hasTypeSpecifier = true; + leftOfAs = firstAs; + } + } else if (tokenIsKeywordOrIdentifier(this.state.type)) { + hasTypeSpecifier = true; + if (isImport) { + leftOfAs = this.parseIdentifier(true); + if (!this.isContextual(93)) { + this.checkReservedWord(leftOfAs.name, leftOfAs.loc.start, true, true); + } + } else { + leftOfAs = this.parseModuleExportName(); + } + } + if (hasTypeSpecifier && isInTypeOnlyImportExport) { + this.raise(isImport ? TSErrors.TypeModifierIsUsedInTypeImports : TSErrors.TypeModifierIsUsedInTypeExports, loc); + } + node[leftOfAsKey] = leftOfAs; + node[rightOfAsKey] = rightOfAs; + const kindKey = isImport ? "importKind" : "exportKind"; + node[kindKey] = hasTypeSpecifier ? "type" : "value"; + if (canParseAsKeyword && this.eatContextual(93)) { + node[rightOfAsKey] = isImport ? this.parseIdentifier() : this.parseModuleExportName(); + } + if (!node[rightOfAsKey]) { + node[rightOfAsKey] = cloneIdentifier(node[leftOfAsKey]); + } + if (isImport) { + this.checkIdentifier(node[rightOfAsKey], hasTypeSpecifier ? 4098 : 4096); + } + } + }; + function isPossiblyLiteralEnum(expression) { + if (expression.type !== "MemberExpression") return false; + const { + computed, + property + } = expression; + if (computed && property.type !== "StringLiteral" && (property.type !== "TemplateLiteral" || property.expressions.length > 0)) { + return false; + } + return isUncomputedMemberExpressionChain(expression.object); + } + function isValidAmbientConstInitializer(expression, estree) { + var _expression$extra; + const { + type + } = expression; + if ((_expression$extra = expression.extra) != null && _expression$extra.parenthesized) { + return false; + } + if (estree) { + if (type === "Literal") { + const { + value + } = expression; + if (typeof value === "string" || typeof value === "boolean") { + return true; + } + } + } else { + if (type === "StringLiteral" || type === "BooleanLiteral") { + return true; + } + } + if (isNumber(expression, estree) || isNegativeNumber(expression, estree)) { + return true; + } + if (type === "TemplateLiteral" && expression.expressions.length === 0) { + return true; + } + if (isPossiblyLiteralEnum(expression)) { + return true; + } + return false; + } + function isNumber(expression, estree) { + if (estree) { + return expression.type === "Literal" && (typeof expression.value === "number" || "bigint" in expression); + } + return expression.type === "NumericLiteral" || expression.type === "BigIntLiteral"; + } + function isNegativeNumber(expression, estree) { + if (expression.type === "UnaryExpression") { + const { + operator, + argument + } = expression; + if (operator === "-" && isNumber(argument, estree)) { + return true; + } + } + return false; + } + function isUncomputedMemberExpressionChain(expression) { + if (expression.type === "Identifier") return true; + if (expression.type !== "MemberExpression" || expression.computed) { + return false; + } + return isUncomputedMemberExpressionChain(expression.object); + } + const PlaceholderErrors = ParseErrorEnum`placeholders`({ + ClassNameIsRequired: "A class name is required.", + UnexpectedSpace: "Unexpected space in placeholder." + }); + var placeholders = superClass => class PlaceholdersParserMixin extends superClass { + parsePlaceholder(expectedNode) { + if (this.match(144)) { + const node = this.startNode(); + this.next(); + this.assertNoSpace(); + node.name = super.parseIdentifier(true); + this.assertNoSpace(); + this.expect(144); + return this.finishPlaceholder(node, expectedNode); + } + } + finishPlaceholder(node, expectedNode) { + let placeholder = node; + if (!placeholder.expectedNode || !placeholder.type) { + placeholder = this.finishNode(placeholder, "Placeholder"); + } + placeholder.expectedNode = expectedNode; + return placeholder; + } + getTokenFromCode(code) { + if (code === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) { + this.finishOp(144, 2); + } else { + super.getTokenFromCode(code); + } + } + parseExprAtom(refExpressionErrors) { + return this.parsePlaceholder("Expression") || super.parseExprAtom(refExpressionErrors); + } + parseIdentifier(liberal) { + return this.parsePlaceholder("Identifier") || super.parseIdentifier(liberal); + } + checkReservedWord(word, startLoc, checkKeywords, isBinding) { + if (word !== undefined) { + super.checkReservedWord(word, startLoc, checkKeywords, isBinding); + } + } + parseBindingAtom() { + return this.parsePlaceholder("Pattern") || super.parseBindingAtom(); + } + isValidLVal(type, isParenthesized, binding) { + return type === "Placeholder" || super.isValidLVal(type, isParenthesized, binding); + } + toAssignable(node, isLHS) { + if (node && node.type === "Placeholder" && node.expectedNode === "Expression") { + node.expectedNode = "Pattern"; + } else { + super.toAssignable(node, isLHS); + } + } + chStartsBindingIdentifier(ch, pos) { + if (super.chStartsBindingIdentifier(ch, pos)) { + return true; + } + const nextToken = this.lookahead(); + if (nextToken.type === 144) { + return true; + } + return false; + } + verifyBreakContinue(node, isBreak) { + if (node.label && node.label.type === "Placeholder") return; + super.verifyBreakContinue(node, isBreak); + } + parseExpressionStatement(node, expr) { + var _expr$extra; + if (expr.type !== "Placeholder" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) { + return super.parseExpressionStatement(node, expr); + } + if (this.match(14)) { + const stmt = node; + stmt.label = this.finishPlaceholder(expr, "Identifier"); + this.next(); + stmt.body = super.parseStatementOrSloppyAnnexBFunctionDeclaration(); + return this.finishNode(stmt, "LabeledStatement"); + } + this.semicolon(); + const stmtPlaceholder = node; + stmtPlaceholder.name = expr.name; + return this.finishPlaceholder(stmtPlaceholder, "Statement"); + } + parseBlock(allowDirectives, createNewLexicalScope, afterBlockParse) { + return this.parsePlaceholder("BlockStatement") || super.parseBlock(allowDirectives, createNewLexicalScope, afterBlockParse); + } + parseFunctionId(requireId) { + return this.parsePlaceholder("Identifier") || super.parseFunctionId(requireId); + } + parseClass(node, isStatement, optionalId) { + const type = isStatement ? "ClassDeclaration" : "ClassExpression"; + this.next(); + const oldStrict = this.state.strict; + const placeholder = this.parsePlaceholder("Identifier"); + if (placeholder) { + if (this.match(81) || this.match(144) || this.match(5)) { + node.id = placeholder; + } else if (optionalId || !isStatement) { + node.id = null; + node.body = this.finishPlaceholder(placeholder, "ClassBody"); + return this.finishNode(node, type); + } else { + throw this.raise(PlaceholderErrors.ClassNameIsRequired, this.state.startLoc); + } + } else { + this.parseClassId(node, isStatement, optionalId); + } + super.parseClassSuper(node); + node.body = this.parsePlaceholder("ClassBody") || super.parseClassBody(!!node.superClass, oldStrict); + return this.finishNode(node, type); + } + parseExport(node, decorators) { + const placeholder = this.parsePlaceholder("Identifier"); + if (!placeholder) return super.parseExport(node, decorators); + const node2 = node; + if (!this.isContextual(98) && !this.match(12)) { + node2.specifiers = []; + node2.source = null; + node2.declaration = this.finishPlaceholder(placeholder, "Declaration"); + return this.finishNode(node2, "ExportNamedDeclaration"); + } + this.expectPlugin("exportDefaultFrom"); + const specifier = this.startNode(); + specifier.exported = placeholder; + node2.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; + return super.parseExport(node2, decorators); + } + isExportDefaultSpecifier() { + if (this.match(65)) { + const next = this.nextTokenStart(); + if (this.isUnparsedContextual(next, "from")) { + if (this.input.startsWith(tokenLabelName(144), this.nextTokenStartSince(next + 4))) { + return true; + } + } + } + return super.isExportDefaultSpecifier(); + } + maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier) { + var _specifiers; + if ((_specifiers = node.specifiers) != null && _specifiers.length) { + return true; + } + return super.maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier); + } + checkExport(node) { + const { + specifiers + } = node; + if (specifiers != null && specifiers.length) { + node.specifiers = specifiers.filter(node => node.exported.type === "Placeholder"); + } + super.checkExport(node); + node.specifiers = specifiers; + } + parseImport(node) { + const placeholder = this.parsePlaceholder("Identifier"); + if (!placeholder) return super.parseImport(node); + node.specifiers = []; + if (!this.isContextual(98) && !this.match(12)) { + node.source = this.finishPlaceholder(placeholder, "StringLiteral"); + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); + } + const specifier = this.startNodeAtNode(placeholder); + specifier.local = placeholder; + node.specifiers.push(this.finishNode(specifier, "ImportDefaultSpecifier")); + if (this.eat(12)) { + const hasStarImport = this.maybeParseStarImportSpecifier(node); + if (!hasStarImport) this.parseNamedImportSpecifiers(node); + } + this.expectContextual(98); + node.source = this.parseImportSource(); + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); + } + parseImportSource() { + return this.parsePlaceholder("StringLiteral") || super.parseImportSource(); + } + assertNoSpace() { + if (this.state.start > this.state.lastTokEndLoc.index) { + this.raise(PlaceholderErrors.UnexpectedSpace, this.state.lastTokEndLoc); + } + } + }; + var v8intrinsic = superClass => class V8IntrinsicMixin extends superClass { + parseV8Intrinsic() { + if (this.match(54)) { + const v8IntrinsicStartLoc = this.state.startLoc; + const node = this.startNode(); + this.next(); + if (tokenIsIdentifier(this.state.type)) { + const name = this.parseIdentifierName(); + const identifier = this.createIdentifier(node, name); + identifier.type = "V8IntrinsicIdentifier"; + if (this.match(10)) { + return identifier; + } + } + this.unexpected(v8IntrinsicStartLoc); + } + } + parseExprAtom(refExpressionErrors) { + return this.parseV8Intrinsic() || super.parseExprAtom(refExpressionErrors); + } + }; + const PIPELINE_PROPOSALS = ["minimal", "fsharp", "hack", "smart"]; + const TOPIC_TOKENS = ["^^", "@@", "^", "%", "#"]; + function validatePlugins(pluginsMap) { + if (pluginsMap.has("decorators")) { + if (pluginsMap.has("decorators-legacy")) { + throw new Error("Cannot use the decorators and decorators-legacy plugin together"); + } + const decoratorsBeforeExport = pluginsMap.get("decorators").decoratorsBeforeExport; + if (decoratorsBeforeExport != null && typeof decoratorsBeforeExport !== "boolean") { + throw new Error("'decoratorsBeforeExport' must be a boolean, if specified."); + } + const allowCallParenthesized = pluginsMap.get("decorators").allowCallParenthesized; + if (allowCallParenthesized != null && typeof allowCallParenthesized !== "boolean") { + throw new Error("'allowCallParenthesized' must be a boolean."); + } + } + if (pluginsMap.has("flow") && pluginsMap.has("typescript")) { + throw new Error("Cannot combine flow and typescript plugins."); + } + if (pluginsMap.has("placeholders") && pluginsMap.has("v8intrinsic")) { + throw new Error("Cannot combine placeholders and v8intrinsic plugins."); + } + if (pluginsMap.has("pipelineOperator")) { + var _pluginsMap$get; + const proposal = pluginsMap.get("pipelineOperator").proposal; + if (!PIPELINE_PROPOSALS.includes(proposal)) { + const proposalList = PIPELINE_PROPOSALS.map(p => `"${p}"`).join(", "); + throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${proposalList}.`); + } + const tupleSyntaxIsHash = ((_pluginsMap$get = pluginsMap.get("recordAndTuple")) == null ? void 0 : _pluginsMap$get.syntaxType) === "hash"; + if (proposal === "hack") { + if (pluginsMap.has("placeholders")) { + throw new Error("Cannot combine placeholders plugin and Hack-style pipes."); + } + if (pluginsMap.has("v8intrinsic")) { + throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes."); + } + const topicToken = pluginsMap.get("pipelineOperator").topicToken; + if (!TOPIC_TOKENS.includes(topicToken)) { + const tokenList = TOPIC_TOKENS.map(t => `"${t}"`).join(", "); + throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${tokenList}.`); + } + if (topicToken === "#" && tupleSyntaxIsHash) { + throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`); + } + } else if (proposal === "smart" && tupleSyntaxIsHash) { + throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`); + } + } + if (pluginsMap.has("moduleAttributes")) { + { + if (pluginsMap.has("importAttributes") || pluginsMap.has("importAssertions")) { + throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins."); + } + const moduleAttributesVersionPluginOption = pluginsMap.get("moduleAttributes").version; + if (moduleAttributesVersionPluginOption !== "may-2020") { + throw new Error("The 'moduleAttributes' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is 'may-2020'."); + } + } + } + if (pluginsMap.has("importAttributes") && pluginsMap.has("importAssertions")) { + throw new Error("Cannot combine importAssertions and importAttributes plugins."); + } + if (pluginsMap.has("recordAndTuple")) { + const syntaxType = pluginsMap.get("recordAndTuple").syntaxType; + if (syntaxType != null) { + { + const RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"]; + if (!RECORD_AND_TUPLE_SYNTAX_TYPES.includes(syntaxType)) { + throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map(p => `'${p}'`).join(", ")); + } + } + } + } + if (pluginsMap.has("asyncDoExpressions") && !pluginsMap.has("doExpressions")) { + const error = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins."); + error.missingPlugins = "doExpressions"; + throw error; + } + if (pluginsMap.has("optionalChainingAssign") && pluginsMap.get("optionalChainingAssign").version !== "2023-07") { + throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is '2023-07'."); + } + } + const mixinPlugins = { + estree, + jsx, + flow, + typescript, + v8intrinsic, + placeholders + }; + const mixinPluginNames = Object.keys(mixinPlugins); + const defaultOptions = { + sourceType: "script", + sourceFilename: undefined, + startColumn: 0, + startLine: 1, + allowAwaitOutsideFunction: false, + allowReturnOutsideFunction: false, + allowNewTargetOutsideFunction: false, + allowImportExportEverywhere: false, + allowSuperOutsideMethod: false, + allowUndeclaredExports: false, + plugins: [], + strictMode: null, + ranges: false, + tokens: false, + createImportExpressions: false, + createParenthesizedExpressions: false, + errorRecovery: false, + attachComment: true, + annexB: true + }; + function getOptions(opts) { + if (opts == null) { + return Object.assign({}, defaultOptions); + } + if (opts.annexB != null && opts.annexB !== false) { + throw new Error("The `annexB` option can only be set to `false`."); + } + const options = {}; + for (const key of Object.keys(defaultOptions)) { + var _opts$key; + options[key] = (_opts$key = opts[key]) != null ? _opts$key : defaultOptions[key]; + } + return options; + } + class ExpressionParser extends LValParser { + checkProto(prop, isRecord, protoRef, refExpressionErrors) { + if (prop.type === "SpreadElement" || this.isObjectMethod(prop) || prop.computed || prop.shorthand) { + return; + } + const key = prop.key; + const name = key.type === "Identifier" ? key.name : key.value; + if (name === "__proto__") { + if (isRecord) { + this.raise(Errors.RecordNoProto, key); + return; + } + if (protoRef.used) { + if (refExpressionErrors) { + if (refExpressionErrors.doubleProtoLoc === null) { + refExpressionErrors.doubleProtoLoc = key.loc.start; + } + } else { + this.raise(Errors.DuplicateProto, key); + } + } + protoRef.used = true; + } + } + shouldExitDescending(expr, potentialArrowAt) { + return expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt; + } + getExpression() { + this.enterInitialScopes(); + this.nextToken(); + const expr = this.parseExpression(); + if (!this.match(139)) { + this.unexpected(); + } + this.finalizeRemainingComments(); + expr.comments = this.comments; + expr.errors = this.state.errors; + if (this.options.tokens) { + expr.tokens = this.tokens; + } + return expr; + } + parseExpression(disallowIn, refExpressionErrors) { + if (disallowIn) { + return this.disallowInAnd(() => this.parseExpressionBase(refExpressionErrors)); + } + return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors)); + } + parseExpressionBase(refExpressionErrors) { + const startLoc = this.state.startLoc; + const expr = this.parseMaybeAssign(refExpressionErrors); + if (this.match(12)) { + const node = this.startNodeAt(startLoc); + node.expressions = [expr]; + while (this.eat(12)) { + node.expressions.push(this.parseMaybeAssign(refExpressionErrors)); + } + this.toReferencedList(node.expressions); + return this.finishNode(node, "SequenceExpression"); + } + return expr; + } + parseMaybeAssignDisallowIn(refExpressionErrors, afterLeftParse) { + return this.disallowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse)); + } + parseMaybeAssignAllowIn(refExpressionErrors, afterLeftParse) { + return this.allowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse)); + } + setOptionalParametersError(refExpressionErrors, resultError) { + var _resultError$loc; + refExpressionErrors.optionalParametersLoc = (_resultError$loc = resultError == null ? void 0 : resultError.loc) != null ? _resultError$loc : this.state.startLoc; + } + parseMaybeAssign(refExpressionErrors, afterLeftParse) { + const startLoc = this.state.startLoc; + if (this.isContextual(108)) { + if (this.prodParam.hasYield) { + let left = this.parseYield(); + if (afterLeftParse) { + left = afterLeftParse.call(this, left, startLoc); + } + return left; + } + } + let ownExpressionErrors; + if (refExpressionErrors) { + ownExpressionErrors = false; + } else { + refExpressionErrors = new ExpressionErrors(); + ownExpressionErrors = true; + } + const { + type + } = this.state; + if (type === 10 || tokenIsIdentifier(type)) { + this.state.potentialArrowAt = this.state.start; + } + let left = this.parseMaybeConditional(refExpressionErrors); + if (afterLeftParse) { + left = afterLeftParse.call(this, left, startLoc); + } + if (tokenIsAssignment(this.state.type)) { + const node = this.startNodeAt(startLoc); + const operator = this.state.value; + node.operator = operator; + if (this.match(29)) { + this.toAssignable(left, true); + node.left = left; + const startIndex = startLoc.index; + if (refExpressionErrors.doubleProtoLoc != null && refExpressionErrors.doubleProtoLoc.index >= startIndex) { + refExpressionErrors.doubleProtoLoc = null; + } + if (refExpressionErrors.shorthandAssignLoc != null && refExpressionErrors.shorthandAssignLoc.index >= startIndex) { + refExpressionErrors.shorthandAssignLoc = null; + } + if (refExpressionErrors.privateKeyLoc != null && refExpressionErrors.privateKeyLoc.index >= startIndex) { + this.checkDestructuringPrivate(refExpressionErrors); + refExpressionErrors.privateKeyLoc = null; + } + } else { + node.left = left; + } + this.next(); + node.right = this.parseMaybeAssign(); + this.checkLVal(left, this.finishNode(node, "AssignmentExpression")); + return node; + } else if (ownExpressionErrors) { + this.checkExpressionErrors(refExpressionErrors, true); + } + return left; + } + parseMaybeConditional(refExpressionErrors) { + const startLoc = this.state.startLoc; + const potentialArrowAt = this.state.potentialArrowAt; + const expr = this.parseExprOps(refExpressionErrors); + if (this.shouldExitDescending(expr, potentialArrowAt)) { + return expr; + } + return this.parseConditional(expr, startLoc, refExpressionErrors); + } + parseConditional(expr, startLoc, refExpressionErrors) { + if (this.eat(17)) { + const node = this.startNodeAt(startLoc); + node.test = expr; + node.consequent = this.parseMaybeAssignAllowIn(); + this.expect(14); + node.alternate = this.parseMaybeAssign(); + return this.finishNode(node, "ConditionalExpression"); + } + return expr; + } + parseMaybeUnaryOrPrivate(refExpressionErrors) { + return this.match(138) ? this.parsePrivateName() : this.parseMaybeUnary(refExpressionErrors); + } + parseExprOps(refExpressionErrors) { + const startLoc = this.state.startLoc; + const potentialArrowAt = this.state.potentialArrowAt; + const expr = this.parseMaybeUnaryOrPrivate(refExpressionErrors); + if (this.shouldExitDescending(expr, potentialArrowAt)) { + return expr; + } + return this.parseExprOp(expr, startLoc, -1); + } + parseExprOp(left, leftStartLoc, minPrec) { + if (this.isPrivateName(left)) { + const value = this.getPrivateNameSV(left); + if (minPrec >= tokenOperatorPrecedence(58) || !this.prodParam.hasIn || !this.match(58)) { + this.raise(Errors.PrivateInExpectedIn, left, { + identifierName: value + }); + } + this.classScope.usePrivateName(value, left.loc.start); + } + const op = this.state.type; + if (tokenIsOperator(op) && (this.prodParam.hasIn || !this.match(58))) { + let prec = tokenOperatorPrecedence(op); + if (prec > minPrec) { + if (op === 39) { + this.expectPlugin("pipelineOperator"); + if (this.state.inFSharpPipelineDirectBody) { + return left; + } + this.checkPipelineAtInfixOperator(left, leftStartLoc); + } + const node = this.startNodeAt(leftStartLoc); + node.left = left; + node.operator = this.state.value; + const logical = op === 41 || op === 42; + const coalesce = op === 40; + if (coalesce) { + prec = tokenOperatorPrecedence(42); + } + this.next(); + if (op === 39 && this.hasPlugin(["pipelineOperator", { + proposal: "minimal" + }])) { + if (this.state.type === 96 && this.prodParam.hasAwait) { + throw this.raise(Errors.UnexpectedAwaitAfterPipelineBody, this.state.startLoc); + } + } + node.right = this.parseExprOpRightExpr(op, prec); + const finishedNode = this.finishNode(node, logical || coalesce ? "LogicalExpression" : "BinaryExpression"); + const nextOp = this.state.type; + if (coalesce && (nextOp === 41 || nextOp === 42) || logical && nextOp === 40) { + throw this.raise(Errors.MixingCoalesceWithLogical, this.state.startLoc); + } + return this.parseExprOp(finishedNode, leftStartLoc, minPrec); + } + } + return left; + } + parseExprOpRightExpr(op, prec) { + const startLoc = this.state.startLoc; + switch (op) { + case 39: + switch (this.getPluginOption("pipelineOperator", "proposal")) { + case "hack": + return this.withTopicBindingContext(() => { + return this.parseHackPipeBody(); + }); + case "smart": + return this.withTopicBindingContext(() => { + if (this.prodParam.hasYield && this.isContextual(108)) { + throw this.raise(Errors.PipeBodyIsTighter, this.state.startLoc); + } + return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(op, prec), startLoc); + }); + case "fsharp": + return this.withSoloAwaitPermittingContext(() => { + return this.parseFSharpPipelineBody(prec); + }); + } + default: + return this.parseExprOpBaseRightExpr(op, prec); + } + } + parseExprOpBaseRightExpr(op, prec) { + const startLoc = this.state.startLoc; + return this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startLoc, tokenIsRightAssociative(op) ? prec - 1 : prec); + } + parseHackPipeBody() { + var _body$extra; + const { + startLoc + } = this.state; + const body = this.parseMaybeAssign(); + const requiredParentheses = UnparenthesizedPipeBodyDescriptions.has(body.type); + if (requiredParentheses && !((_body$extra = body.extra) != null && _body$extra.parenthesized)) { + this.raise(Errors.PipeUnparenthesizedBody, startLoc, { + type: body.type + }); + } + if (!this.topicReferenceWasUsedInCurrentContext()) { + this.raise(Errors.PipeTopicUnused, startLoc); + } + return body; + } + checkExponentialAfterUnary(node) { + if (this.match(57)) { + this.raise(Errors.UnexpectedTokenUnaryExponentiation, node.argument); + } + } + parseMaybeUnary(refExpressionErrors, sawUnary) { + const startLoc = this.state.startLoc; + const isAwait = this.isContextual(96); + if (isAwait && this.recordAwaitIfAllowed()) { + this.next(); + const expr = this.parseAwait(startLoc); + if (!sawUnary) this.checkExponentialAfterUnary(expr); + return expr; + } + const update = this.match(34); + const node = this.startNode(); + if (tokenIsPrefix(this.state.type)) { + node.operator = this.state.value; + node.prefix = true; + if (this.match(72)) { + this.expectPlugin("throwExpressions"); + } + const isDelete = this.match(89); + this.next(); + node.argument = this.parseMaybeUnary(null, true); + this.checkExpressionErrors(refExpressionErrors, true); + if (this.state.strict && isDelete) { + const arg = node.argument; + if (arg.type === "Identifier") { + this.raise(Errors.StrictDelete, node); + } else if (this.hasPropertyAsPrivateName(arg)) { + this.raise(Errors.DeletePrivateField, node); + } + } + if (!update) { + if (!sawUnary) { + this.checkExponentialAfterUnary(node); + } + return this.finishNode(node, "UnaryExpression"); + } + } + const expr = this.parseUpdate(node, update, refExpressionErrors); + if (isAwait) { + const { + type + } = this.state; + const startsExpr = this.hasPlugin("v8intrinsic") ? tokenCanStartExpression(type) : tokenCanStartExpression(type) && !this.match(54); + if (startsExpr && !this.isAmbiguousAwait()) { + this.raiseOverwrite(Errors.AwaitNotInAsyncContext, startLoc); + return this.parseAwait(startLoc); + } + } + return expr; + } + parseUpdate(node, update, refExpressionErrors) { + if (update) { + const updateExpressionNode = node; + this.checkLVal(updateExpressionNode.argument, this.finishNode(updateExpressionNode, "UpdateExpression")); + return node; + } + const startLoc = this.state.startLoc; + let expr = this.parseExprSubscripts(refExpressionErrors); + if (this.checkExpressionErrors(refExpressionErrors, false)) return expr; + while (tokenIsPostfix(this.state.type) && !this.canInsertSemicolon()) { + const node = this.startNodeAt(startLoc); + node.operator = this.state.value; + node.prefix = false; + node.argument = expr; + this.next(); + this.checkLVal(expr, expr = this.finishNode(node, "UpdateExpression")); + } + return expr; + } + parseExprSubscripts(refExpressionErrors) { + const startLoc = this.state.startLoc; + const potentialArrowAt = this.state.potentialArrowAt; + const expr = this.parseExprAtom(refExpressionErrors); + if (this.shouldExitDescending(expr, potentialArrowAt)) { + return expr; + } + return this.parseSubscripts(expr, startLoc); + } + parseSubscripts(base, startLoc, noCalls) { + const state = { + optionalChainMember: false, + maybeAsyncArrow: this.atPossibleAsyncArrow(base), + stop: false + }; + do { + base = this.parseSubscript(base, startLoc, noCalls, state); + state.maybeAsyncArrow = false; + } while (!state.stop); + return base; + } + parseSubscript(base, startLoc, noCalls, state) { + const { + type + } = this.state; + if (!noCalls && type === 15) { + return this.parseBind(base, startLoc, noCalls, state); + } else if (tokenIsTemplate(type)) { + return this.parseTaggedTemplateExpression(base, startLoc, state); + } + let optional = false; + if (type === 18) { + if (noCalls) { + this.raise(Errors.OptionalChainingNoNew, this.state.startLoc); + if (this.lookaheadCharCode() === 40) { + state.stop = true; + return base; + } + } + state.optionalChainMember = optional = true; + this.next(); + } + if (!noCalls && this.match(10)) { + return this.parseCoverCallAndAsyncArrowHead(base, startLoc, state, optional); + } else { + const computed = this.eat(0); + if (computed || optional || this.eat(16)) { + return this.parseMember(base, startLoc, state, computed, optional); + } else { + state.stop = true; + return base; + } + } + } + parseMember(base, startLoc, state, computed, optional) { + const node = this.startNodeAt(startLoc); + node.object = base; + node.computed = computed; + if (computed) { + node.property = this.parseExpression(); + this.expect(3); + } else if (this.match(138)) { + if (base.type === "Super") { + this.raise(Errors.SuperPrivateField, startLoc); + } + this.classScope.usePrivateName(this.state.value, this.state.startLoc); + node.property = this.parsePrivateName(); + } else { + node.property = this.parseIdentifier(true); + } + if (state.optionalChainMember) { + node.optional = optional; + return this.finishNode(node, "OptionalMemberExpression"); + } else { + return this.finishNode(node, "MemberExpression"); + } + } + parseBind(base, startLoc, noCalls, state) { + const node = this.startNodeAt(startLoc); + node.object = base; + this.next(); + node.callee = this.parseNoCallExpr(); + state.stop = true; + return this.parseSubscripts(this.finishNode(node, "BindExpression"), startLoc, noCalls); + } + parseCoverCallAndAsyncArrowHead(base, startLoc, state, optional) { + const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + let refExpressionErrors = null; + this.state.maybeInArrowParameters = true; + this.next(); + const node = this.startNodeAt(startLoc); + node.callee = base; + const { + maybeAsyncArrow, + optionalChainMember + } = state; + if (maybeAsyncArrow) { + this.expressionScope.enter(newAsyncArrowScope()); + refExpressionErrors = new ExpressionErrors(); + } + if (optionalChainMember) { + node.optional = optional; + } + if (optional) { + node.arguments = this.parseCallExpressionArguments(11); + } else { + node.arguments = this.parseCallExpressionArguments(11, base.type === "Import", base.type !== "Super", node, refExpressionErrors); + } + let finishedNode = this.finishCallExpression(node, optionalChainMember); + if (maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) { + state.stop = true; + this.checkDestructuringPrivate(refExpressionErrors); + this.expressionScope.validateAsPattern(); + this.expressionScope.exit(); + finishedNode = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startLoc), finishedNode); + } else { + if (maybeAsyncArrow) { + this.checkExpressionErrors(refExpressionErrors, true); + this.expressionScope.exit(); + } + this.toReferencedArguments(finishedNode); + } + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + return finishedNode; + } + toReferencedArguments(node, isParenthesizedExpr) { + this.toReferencedListDeep(node.arguments, isParenthesizedExpr); + } + parseTaggedTemplateExpression(base, startLoc, state) { + const node = this.startNodeAt(startLoc); + node.tag = base; + node.quasi = this.parseTemplate(true); + if (state.optionalChainMember) { + this.raise(Errors.OptionalChainingNoTemplate, startLoc); + } + return this.finishNode(node, "TaggedTemplateExpression"); + } + atPossibleAsyncArrow(base) { + return base.type === "Identifier" && base.name === "async" && this.state.lastTokEndLoc.index === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && base.start === this.state.potentialArrowAt; + } + expectImportAttributesPlugin() { + if (!this.hasPlugin("importAssertions")) { + this.expectPlugin("importAttributes"); + } + } + finishCallExpression(node, optional) { + if (node.callee.type === "Import") { + if (node.arguments.length === 2) { + { + if (!this.hasPlugin("moduleAttributes")) { + this.expectImportAttributesPlugin(); + } + } + } + if (node.arguments.length === 0 || node.arguments.length > 2) { + this.raise(Errors.ImportCallArity, node, { + maxArgumentCount: this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions") || this.hasPlugin("moduleAttributes") ? 2 : 1 + }); + } else { + for (const arg of node.arguments) { + if (arg.type === "SpreadElement") { + this.raise(Errors.ImportCallSpreadArgument, arg); + } + } + } + } + return this.finishNode(node, optional ? "OptionalCallExpression" : "CallExpression"); + } + parseCallExpressionArguments(close, dynamicImport, allowPlaceholder, nodeForExtra, refExpressionErrors) { + const elts = []; + let first = true; + const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; + this.state.inFSharpPipelineDirectBody = false; + while (!this.eat(close)) { + if (first) { + first = false; + } else { + this.expect(12); + if (this.match(close)) { + if (dynamicImport && !this.hasPlugin("importAttributes") && !this.hasPlugin("importAssertions") && !this.hasPlugin("moduleAttributes")) { + this.raise(Errors.ImportCallArgumentTrailingComma, this.state.lastTokStartLoc); + } + if (nodeForExtra) { + this.addTrailingCommaExtraToNode(nodeForExtra); + } + this.next(); + break; + } + } + elts.push(this.parseExprListItem(false, refExpressionErrors, allowPlaceholder)); + } + this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; + return elts; + } + shouldParseAsyncArrow() { + return this.match(19) && !this.canInsertSemicolon(); + } + parseAsyncArrowFromCallExpression(node, call) { + var _call$extra; + this.resetPreviousNodeTrailingComments(call); + this.expect(19); + this.parseArrowExpression(node, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingCommaLoc); + if (call.innerComments) { + setInnerComments(node, call.innerComments); + } + if (call.callee.trailingComments) { + setInnerComments(node, call.callee.trailingComments); + } + return node; + } + parseNoCallExpr() { + const startLoc = this.state.startLoc; + return this.parseSubscripts(this.parseExprAtom(), startLoc, true); + } + parseExprAtom(refExpressionErrors) { + let node; + let decorators = null; + const { + type + } = this.state; + switch (type) { + case 79: + return this.parseSuper(); + case 83: + node = this.startNode(); + this.next(); + if (this.match(16)) { + return this.parseImportMetaProperty(node); + } + if (this.match(10)) { + if (this.options.createImportExpressions) { + return this.parseImportCall(node); + } else { + return this.finishNode(node, "Import"); + } + } else { + this.raise(Errors.UnsupportedImport, this.state.lastTokStartLoc); + return this.finishNode(node, "Import"); + } + case 78: + node = this.startNode(); + this.next(); + return this.finishNode(node, "ThisExpression"); + case 90: + { + return this.parseDo(this.startNode(), false); + } + case 56: + case 31: + { + this.readRegexp(); + return this.parseRegExpLiteral(this.state.value); + } + case 134: + return this.parseNumericLiteral(this.state.value); + case 135: + return this.parseBigIntLiteral(this.state.value); + case 136: + return this.parseDecimalLiteral(this.state.value); + case 133: + return this.parseStringLiteral(this.state.value); + case 84: + return this.parseNullLiteral(); + case 85: + return this.parseBooleanLiteral(true); + case 86: + return this.parseBooleanLiteral(false); + case 10: + { + const canBeArrow = this.state.potentialArrowAt === this.state.start; + return this.parseParenAndDistinguishExpression(canBeArrow); + } + case 2: + case 1: + { + return this.parseArrayLike(this.state.type === 2 ? 4 : 3, false, true); + } + case 0: + { + return this.parseArrayLike(3, true, false, refExpressionErrors); + } + case 6: + case 7: + { + return this.parseObjectLike(this.state.type === 6 ? 9 : 8, false, true); + } + case 5: + { + return this.parseObjectLike(8, false, false, refExpressionErrors); + } + case 68: + return this.parseFunctionOrFunctionSent(); + case 26: + decorators = this.parseDecorators(); + case 80: + return this.parseClass(this.maybeTakeDecorators(decorators, this.startNode()), false); + case 77: + return this.parseNewOrNewTarget(); + case 25: + case 24: + return this.parseTemplate(false); + case 15: + { + node = this.startNode(); + this.next(); + node.object = null; + const callee = node.callee = this.parseNoCallExpr(); + if (callee.type === "MemberExpression") { + return this.finishNode(node, "BindExpression"); + } else { + throw this.raise(Errors.UnsupportedBind, callee); + } + } + case 138: + { + this.raise(Errors.PrivateInExpectedIn, this.state.startLoc, { + identifierName: this.state.value + }); + return this.parsePrivateName(); + } + case 33: + { + return this.parseTopicReferenceThenEqualsSign(54, "%"); + } + case 32: + { + return this.parseTopicReferenceThenEqualsSign(44, "^"); + } + case 37: + case 38: + { + return this.parseTopicReference("hack"); + } + case 44: + case 54: + case 27: + { + const pipeProposal = this.getPluginOption("pipelineOperator", "proposal"); + if (pipeProposal) { + return this.parseTopicReference(pipeProposal); + } + this.unexpected(); + break; + } + case 47: + { + const lookaheadCh = this.input.codePointAt(this.nextTokenStart()); + if (isIdentifierStart(lookaheadCh) || lookaheadCh === 62) { + this.expectOnePlugin(["jsx", "flow", "typescript"]); + } else { + this.unexpected(); + } + break; + } + default: + if (tokenIsIdentifier(type)) { + if (this.isContextual(127) && this.lookaheadInLineCharCode() === 123) { + return this.parseModuleExpression(); + } + const canBeArrow = this.state.potentialArrowAt === this.state.start; + const containsEsc = this.state.containsEsc; + const id = this.parseIdentifier(); + if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) { + const { + type + } = this.state; + if (type === 68) { + this.resetPreviousNodeTrailingComments(id); + this.next(); + return this.parseAsyncFunctionExpression(this.startNodeAtNode(id)); + } else if (tokenIsIdentifier(type)) { + if (this.lookaheadCharCode() === 61) { + return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(id)); + } else { + return id; + } + } else if (type === 90) { + this.resetPreviousNodeTrailingComments(id); + return this.parseDo(this.startNodeAtNode(id), true); + } + } + if (canBeArrow && this.match(19) && !this.canInsertSemicolon()) { + this.next(); + return this.parseArrowExpression(this.startNodeAtNode(id), [id], false); + } + return id; + } else { + this.unexpected(); + } + } + } + parseTopicReferenceThenEqualsSign(topicTokenType, topicTokenValue) { + const pipeProposal = this.getPluginOption("pipelineOperator", "proposal"); + if (pipeProposal) { + this.state.type = topicTokenType; + this.state.value = topicTokenValue; + this.state.pos--; + this.state.end--; + this.state.endLoc = createPositionWithColumnOffset(this.state.endLoc, -1); + return this.parseTopicReference(pipeProposal); + } else { + this.unexpected(); + } + } + parseTopicReference(pipeProposal) { + const node = this.startNode(); + const startLoc = this.state.startLoc; + const tokenType = this.state.type; + this.next(); + return this.finishTopicReference(node, startLoc, pipeProposal, tokenType); + } + finishTopicReference(node, startLoc, pipeProposal, tokenType) { + if (this.testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType)) { + const nodeType = pipeProposal === "smart" ? "PipelinePrimaryTopicReference" : "TopicReference"; + if (!this.topicReferenceIsAllowedInCurrentContext()) { + this.raise(pipeProposal === "smart" ? Errors.PrimaryTopicNotAllowed : Errors.PipeTopicUnbound, startLoc); + } + this.registerTopicReference(); + return this.finishNode(node, nodeType); + } else { + throw this.raise(Errors.PipeTopicUnconfiguredToken, startLoc, { + token: tokenLabelName(tokenType) + }); + } + } + testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType) { + switch (pipeProposal) { + case "hack": + { + return this.hasPlugin(["pipelineOperator", { + topicToken: tokenLabelName(tokenType) + }]); + } + case "smart": + return tokenType === 27; + default: + throw this.raise(Errors.PipeTopicRequiresHackPipes, startLoc); + } + } + parseAsyncArrowUnaryFunction(node) { + this.prodParam.enter(functionFlags(true, this.prodParam.hasYield)); + const params = [this.parseIdentifier()]; + this.prodParam.exit(); + if (this.hasPrecedingLineBreak()) { + this.raise(Errors.LineTerminatorBeforeArrow, this.state.curPosition()); + } + this.expect(19); + return this.parseArrowExpression(node, params, true); + } + parseDo(node, isAsync) { + this.expectPlugin("doExpressions"); + if (isAsync) { + this.expectPlugin("asyncDoExpressions"); + } + node.async = isAsync; + this.next(); + const oldLabels = this.state.labels; + this.state.labels = []; + if (isAsync) { + this.prodParam.enter(2); + node.body = this.parseBlock(); + this.prodParam.exit(); + } else { + node.body = this.parseBlock(); + } + this.state.labels = oldLabels; + return this.finishNode(node, "DoExpression"); + } + parseSuper() { + const node = this.startNode(); + this.next(); + if (this.match(10) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) { + this.raise(Errors.SuperNotAllowed, node); + } else if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) { + this.raise(Errors.UnexpectedSuper, node); + } + if (!this.match(10) && !this.match(0) && !this.match(16)) { + this.raise(Errors.UnsupportedSuper, node); + } + return this.finishNode(node, "Super"); + } + parsePrivateName() { + const node = this.startNode(); + const id = this.startNodeAt(createPositionWithColumnOffset(this.state.startLoc, 1)); + const name = this.state.value; + this.next(); + node.id = this.createIdentifier(id, name); + return this.finishNode(node, "PrivateName"); + } + parseFunctionOrFunctionSent() { + const node = this.startNode(); + this.next(); + if (this.prodParam.hasYield && this.match(16)) { + const meta = this.createIdentifier(this.startNodeAtNode(node), "function"); + this.next(); + if (this.match(103)) { + this.expectPlugin("functionSent"); + } else if (!this.hasPlugin("functionSent")) { + this.unexpected(); + } + return this.parseMetaProperty(node, meta, "sent"); + } + return this.parseFunction(node); + } + parseMetaProperty(node, meta, propertyName) { + node.meta = meta; + const containsEsc = this.state.containsEsc; + node.property = this.parseIdentifier(true); + if (node.property.name !== propertyName || containsEsc) { + this.raise(Errors.UnsupportedMetaProperty, node.property, { + target: meta.name, + onlyValidPropertyName: propertyName + }); + } + return this.finishNode(node, "MetaProperty"); + } + parseImportMetaProperty(node) { + const id = this.createIdentifier(this.startNodeAtNode(node), "import"); + this.next(); + if (this.isContextual(101)) { + if (!this.inModule) { + this.raise(Errors.ImportMetaOutsideModule, id); + } + this.sawUnambiguousESM = true; + } else if (this.isContextual(105) || this.isContextual(97)) { + const isSource = this.isContextual(105); + if (!isSource) this.unexpected(); + this.expectPlugin(isSource ? "sourcePhaseImports" : "deferredImportEvaluation"); + if (!this.options.createImportExpressions) { + throw this.raise(Errors.DynamicImportPhaseRequiresImportExpressions, this.state.startLoc, { + phase: this.state.value + }); + } + this.next(); + node.phase = isSource ? "source" : "defer"; + return this.parseImportCall(node); + } + return this.parseMetaProperty(node, id, "meta"); + } + parseLiteralAtNode(value, type, node) { + this.addExtra(node, "rawValue", value); + this.addExtra(node, "raw", this.input.slice(node.start, this.state.end)); + node.value = value; + this.next(); + return this.finishNode(node, type); + } + parseLiteral(value, type) { + const node = this.startNode(); + return this.parseLiteralAtNode(value, type, node); + } + parseStringLiteral(value) { + return this.parseLiteral(value, "StringLiteral"); + } + parseNumericLiteral(value) { + return this.parseLiteral(value, "NumericLiteral"); + } + parseBigIntLiteral(value) { + return this.parseLiteral(value, "BigIntLiteral"); + } + parseDecimalLiteral(value) { + return this.parseLiteral(value, "DecimalLiteral"); + } + parseRegExpLiteral(value) { + const node = this.startNode(); + this.addExtra(node, "raw", this.input.slice(node.start, this.state.end)); + node.pattern = value.pattern; + node.flags = value.flags; + this.next(); + return this.finishNode(node, "RegExpLiteral"); + } + parseBooleanLiteral(value) { + const node = this.startNode(); + node.value = value; + this.next(); + return this.finishNode(node, "BooleanLiteral"); + } + parseNullLiteral() { + const node = this.startNode(); + this.next(); + return this.finishNode(node, "NullLiteral"); + } + parseParenAndDistinguishExpression(canBeArrow) { + const startLoc = this.state.startLoc; + let val; + this.next(); + this.expressionScope.enter(newArrowHeadScope()); + const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; + this.state.maybeInArrowParameters = true; + this.state.inFSharpPipelineDirectBody = false; + const innerStartLoc = this.state.startLoc; + const exprList = []; + const refExpressionErrors = new ExpressionErrors(); + let first = true; + let spreadStartLoc; + let optionalCommaStartLoc; + while (!this.match(11)) { + if (first) { + first = false; + } else { + this.expect(12, refExpressionErrors.optionalParametersLoc === null ? null : refExpressionErrors.optionalParametersLoc); + if (this.match(11)) { + optionalCommaStartLoc = this.state.startLoc; + break; + } + } + if (this.match(21)) { + const spreadNodeStartLoc = this.state.startLoc; + spreadStartLoc = this.state.startLoc; + exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartLoc)); + if (!this.checkCommaAfterRest(41)) { + break; + } + } else { + exprList.push(this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem)); + } + } + const innerEndLoc = this.state.lastTokEndLoc; + this.expect(11); + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; + let arrowNode = this.startNodeAt(startLoc); + if (canBeArrow && this.shouldParseArrow(exprList) && (arrowNode = this.parseArrow(arrowNode))) { + this.checkDestructuringPrivate(refExpressionErrors); + this.expressionScope.validateAsPattern(); + this.expressionScope.exit(); + this.parseArrowExpression(arrowNode, exprList, false); + return arrowNode; + } + this.expressionScope.exit(); + if (!exprList.length) { + this.unexpected(this.state.lastTokStartLoc); + } + if (optionalCommaStartLoc) this.unexpected(optionalCommaStartLoc); + if (spreadStartLoc) this.unexpected(spreadStartLoc); + this.checkExpressionErrors(refExpressionErrors, true); + this.toReferencedListDeep(exprList, true); + if (exprList.length > 1) { + val = this.startNodeAt(innerStartLoc); + val.expressions = exprList; + this.finishNode(val, "SequenceExpression"); + this.resetEndLocation(val, innerEndLoc); + } else { + val = exprList[0]; + } + return this.wrapParenthesis(startLoc, val); + } + wrapParenthesis(startLoc, expression) { + if (!this.options.createParenthesizedExpressions) { + this.addExtra(expression, "parenthesized", true); + this.addExtra(expression, "parenStart", startLoc.index); + this.takeSurroundingComments(expression, startLoc.index, this.state.lastTokEndLoc.index); + return expression; + } + const parenExpression = this.startNodeAt(startLoc); + parenExpression.expression = expression; + return this.finishNode(parenExpression, "ParenthesizedExpression"); + } + shouldParseArrow(params) { + return !this.canInsertSemicolon(); + } + parseArrow(node) { + if (this.eat(19)) { + return node; + } + } + parseParenItem(node, startLoc) { + return node; + } + parseNewOrNewTarget() { + const node = this.startNode(); + this.next(); + if (this.match(16)) { + const meta = this.createIdentifier(this.startNodeAtNode(node), "new"); + this.next(); + const metaProp = this.parseMetaProperty(node, meta, "target"); + if (!this.scope.inNonArrowFunction && !this.scope.inClass && !this.options.allowNewTargetOutsideFunction) { + this.raise(Errors.UnexpectedNewTarget, metaProp); + } + return metaProp; + } + return this.parseNew(node); + } + parseNew(node) { + this.parseNewCallee(node); + if (this.eat(10)) { + const args = this.parseExprList(11); + this.toReferencedList(args); + node.arguments = args; + } else { + node.arguments = []; + } + return this.finishNode(node, "NewExpression"); + } + parseNewCallee(node) { + const isImport = this.match(83); + const callee = this.parseNoCallExpr(); + node.callee = callee; + if (isImport && (callee.type === "Import" || callee.type === "ImportExpression")) { + this.raise(Errors.ImportCallNotNewExpression, callee); + } + } + parseTemplateElement(isTagged) { + const { + start, + startLoc, + end, + value + } = this.state; + const elemStart = start + 1; + const elem = this.startNodeAt(createPositionWithColumnOffset(startLoc, 1)); + if (value === null) { + if (!isTagged) { + this.raise(Errors.InvalidEscapeSequenceTemplate, createPositionWithColumnOffset(this.state.firstInvalidTemplateEscapePos, 1)); + } + } + const isTail = this.match(24); + const endOffset = isTail ? -1 : -2; + const elemEnd = end + endOffset; + elem.value = { + raw: this.input.slice(elemStart, elemEnd).replace(/\r\n?/g, "\n"), + cooked: value === null ? null : value.slice(1, endOffset) + }; + elem.tail = isTail; + this.next(); + const finishedNode = this.finishNode(elem, "TemplateElement"); + this.resetEndLocation(finishedNode, createPositionWithColumnOffset(this.state.lastTokEndLoc, endOffset)); + return finishedNode; + } + parseTemplate(isTagged) { + const node = this.startNode(); + let curElt = this.parseTemplateElement(isTagged); + const quasis = [curElt]; + const substitutions = []; + while (!curElt.tail) { + substitutions.push(this.parseTemplateSubstitution()); + this.readTemplateContinuation(); + quasis.push(curElt = this.parseTemplateElement(isTagged)); + } + node.expressions = substitutions; + node.quasis = quasis; + return this.finishNode(node, "TemplateLiteral"); + } + parseTemplateSubstitution() { + return this.parseExpression(); + } + parseObjectLike(close, isPattern, isRecord, refExpressionErrors) { + if (isRecord) { + this.expectPlugin("recordAndTuple"); + } + const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; + this.state.inFSharpPipelineDirectBody = false; + const propHash = Object.create(null); + let first = true; + const node = this.startNode(); + node.properties = []; + this.next(); + while (!this.match(close)) { + if (first) { + first = false; + } else { + this.expect(12); + if (this.match(close)) { + this.addTrailingCommaExtraToNode(node); + break; + } + } + let prop; + if (isPattern) { + prop = this.parseBindingProperty(); + } else { + prop = this.parsePropertyDefinition(refExpressionErrors); + this.checkProto(prop, isRecord, propHash, refExpressionErrors); + } + if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") { + this.raise(Errors.InvalidRecordProperty, prop); + } + { + if (prop.shorthand) { + this.addExtra(prop, "shorthand", true); + } + } + node.properties.push(prop); + } + this.next(); + this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; + let type = "ObjectExpression"; + if (isPattern) { + type = "ObjectPattern"; + } else if (isRecord) { + type = "RecordExpression"; + } + return this.finishNode(node, type); + } + addTrailingCommaExtraToNode(node) { + this.addExtra(node, "trailingComma", this.state.lastTokStartLoc.index); + this.addExtra(node, "trailingCommaLoc", this.state.lastTokStartLoc, false); + } + maybeAsyncOrAccessorProp(prop) { + return !prop.computed && prop.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(0) || this.match(55)); + } + parsePropertyDefinition(refExpressionErrors) { + let decorators = []; + if (this.match(26)) { + if (this.hasPlugin("decorators")) { + this.raise(Errors.UnsupportedPropertyDecorator, this.state.startLoc); + } + while (this.match(26)) { + decorators.push(this.parseDecorator()); + } + } + const prop = this.startNode(); + let isAsync = false; + let isAccessor = false; + let startLoc; + if (this.match(21)) { + if (decorators.length) this.unexpected(); + return this.parseSpread(); + } + if (decorators.length) { + prop.decorators = decorators; + decorators = []; + } + prop.method = false; + if (refExpressionErrors) { + startLoc = this.state.startLoc; + } + let isGenerator = this.eat(55); + this.parsePropertyNamePrefixOperator(prop); + const containsEsc = this.state.containsEsc; + this.parsePropertyName(prop, refExpressionErrors); + if (!isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) { + const { + key + } = prop; + const keyName = key.name; + if (keyName === "async" && !this.hasPrecedingLineBreak()) { + isAsync = true; + this.resetPreviousNodeTrailingComments(key); + isGenerator = this.eat(55); + this.parsePropertyName(prop); + } + if (keyName === "get" || keyName === "set") { + isAccessor = true; + this.resetPreviousNodeTrailingComments(key); + prop.kind = keyName; + if (this.match(55)) { + isGenerator = true; + this.raise(Errors.AccessorIsGenerator, this.state.curPosition(), { + kind: keyName + }); + this.next(); + } + this.parsePropertyName(prop); + } + } + return this.parseObjPropValue(prop, startLoc, isGenerator, isAsync, false, isAccessor, refExpressionErrors); + } + getGetterSetterExpectedParamCount(method) { + return method.kind === "get" ? 0 : 1; + } + getObjectOrClassMethodParams(method) { + return method.params; + } + checkGetterSetterParams(method) { + var _params; + const paramCount = this.getGetterSetterExpectedParamCount(method); + const params = this.getObjectOrClassMethodParams(method); + if (params.length !== paramCount) { + this.raise(method.kind === "get" ? Errors.BadGetterArity : Errors.BadSetterArity, method); + } + if (method.kind === "set" && ((_params = params[params.length - 1]) == null ? void 0 : _params.type) === "RestElement") { + this.raise(Errors.BadSetterRestParameter, method); + } + } + parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) { + if (isAccessor) { + const finishedProp = this.parseMethod(prop, isGenerator, false, false, false, "ObjectMethod"); + this.checkGetterSetterParams(finishedProp); + return finishedProp; + } + if (isAsync || isGenerator || this.match(10)) { + if (isPattern) this.unexpected(); + prop.kind = "method"; + prop.method = true; + return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod"); + } + } + parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors) { + prop.shorthand = false; + if (this.eat(14)) { + prop.value = isPattern ? this.parseMaybeDefault(this.state.startLoc) : this.parseMaybeAssignAllowIn(refExpressionErrors); + return this.finishNode(prop, "ObjectProperty"); + } + if (!prop.computed && prop.key.type === "Identifier") { + this.checkReservedWord(prop.key.name, prop.key.loc.start, true, false); + if (isPattern) { + prop.value = this.parseMaybeDefault(startLoc, cloneIdentifier(prop.key)); + } else if (this.match(29)) { + const shorthandAssignLoc = this.state.startLoc; + if (refExpressionErrors != null) { + if (refExpressionErrors.shorthandAssignLoc === null) { + refExpressionErrors.shorthandAssignLoc = shorthandAssignLoc; + } + } else { + this.raise(Errors.InvalidCoverInitializedName, shorthandAssignLoc); + } + prop.value = this.parseMaybeDefault(startLoc, cloneIdentifier(prop.key)); + } else { + prop.value = cloneIdentifier(prop.key); + } + prop.shorthand = true; + return this.finishNode(prop, "ObjectProperty"); + } + } + parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { + const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) || this.parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors); + if (!node) this.unexpected(); + return node; + } + parsePropertyName(prop, refExpressionErrors) { + if (this.eat(0)) { + prop.computed = true; + prop.key = this.parseMaybeAssignAllowIn(); + this.expect(3); + } else { + const { + type, + value + } = this.state; + let key; + if (tokenIsKeywordOrIdentifier(type)) { + key = this.parseIdentifier(true); + } else { + switch (type) { + case 134: + key = this.parseNumericLiteral(value); + break; + case 133: + key = this.parseStringLiteral(value); + break; + case 135: + key = this.parseBigIntLiteral(value); + break; + case 136: + key = this.parseDecimalLiteral(value); + break; + case 138: + { + const privateKeyLoc = this.state.startLoc; + if (refExpressionErrors != null) { + if (refExpressionErrors.privateKeyLoc === null) { + refExpressionErrors.privateKeyLoc = privateKeyLoc; + } + } else { + this.raise(Errors.UnexpectedPrivateField, privateKeyLoc); + } + key = this.parsePrivateName(); + break; + } + default: + this.unexpected(); + } + } + prop.key = key; + if (type !== 138) { + prop.computed = false; + } + } + } + initFunction(node, isAsync) { + node.id = null; + node.generator = false; + node.async = isAsync; + } + parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { + this.initFunction(node, isAsync); + node.generator = isGenerator; + this.scope.enter(2 | 16 | (inClassScope ? 64 : 0) | (allowDirectSuper ? 32 : 0)); + this.prodParam.enter(functionFlags(isAsync, node.generator)); + this.parseFunctionParams(node, isConstructor); + const finishedNode = this.parseFunctionBodyAndFinish(node, type, true); + this.prodParam.exit(); + this.scope.exit(); + return finishedNode; + } + parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { + if (isTuple) { + this.expectPlugin("recordAndTuple"); + } + const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; + this.state.inFSharpPipelineDirectBody = false; + const node = this.startNode(); + this.next(); + node.elements = this.parseExprList(close, !isTuple, refExpressionErrors, node); + this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; + return this.finishNode(node, isTuple ? "TupleExpression" : "ArrayExpression"); + } + parseArrowExpression(node, params, isAsync, trailingCommaLoc) { + this.scope.enter(2 | 4); + let flags = functionFlags(isAsync, false); + if (!this.match(5) && this.prodParam.hasIn) { + flags |= 8; + } + this.prodParam.enter(flags); + this.initFunction(node, isAsync); + const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + if (params) { + this.state.maybeInArrowParameters = true; + this.setArrowFunctionParameters(node, params, trailingCommaLoc); + } + this.state.maybeInArrowParameters = false; + this.parseFunctionBody(node, true); + this.prodParam.exit(); + this.scope.exit(); + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + return this.finishNode(node, "ArrowFunctionExpression"); + } + setArrowFunctionParameters(node, params, trailingCommaLoc) { + this.toAssignableList(params, trailingCommaLoc, false); + node.params = params; + } + parseFunctionBodyAndFinish(node, type, isMethod = false) { + this.parseFunctionBody(node, false, isMethod); + return this.finishNode(node, type); + } + parseFunctionBody(node, allowExpression, isMethod = false) { + const isExpression = allowExpression && !this.match(5); + this.expressionScope.enter(newExpressionScope()); + if (isExpression) { + node.body = this.parseMaybeAssign(); + this.checkParams(node, false, allowExpression, false); + } else { + const oldStrict = this.state.strict; + const oldLabels = this.state.labels; + this.state.labels = []; + this.prodParam.enter(this.prodParam.currentFlags() | 4); + node.body = this.parseBlock(true, false, hasStrictModeDirective => { + const nonSimple = !this.isSimpleParamList(node.params); + if (hasStrictModeDirective && nonSimple) { + this.raise(Errors.IllegalLanguageModeDirective, (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.loc.end : node); + } + const strictModeChanged = !oldStrict && this.state.strict; + this.checkParams(node, !this.state.strict && !allowExpression && !isMethod && !nonSimple, allowExpression, strictModeChanged); + if (this.state.strict && node.id) { + this.checkIdentifier(node.id, 65, strictModeChanged); + } + }); + this.prodParam.exit(); + this.state.labels = oldLabels; + } + this.expressionScope.exit(); + } + isSimpleParameter(node) { + return node.type === "Identifier"; + } + isSimpleParamList(params) { + for (let i = 0, len = params.length; i < len; i++) { + if (!this.isSimpleParameter(params[i])) return false; + } + return true; + } + checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) { + const checkClashes = !allowDuplicates && new Set(); + const formalParameters = { + type: "FormalParameters" + }; + for (const param of node.params) { + this.checkLVal(param, formalParameters, 5, checkClashes, strictModeChanged); + } + } + parseExprList(close, allowEmpty, refExpressionErrors, nodeForExtra) { + const elts = []; + let first = true; + while (!this.eat(close)) { + if (first) { + first = false; + } else { + this.expect(12); + if (this.match(close)) { + if (nodeForExtra) { + this.addTrailingCommaExtraToNode(nodeForExtra); + } + this.next(); + break; + } + } + elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors)); + } + return elts; + } + parseExprListItem(allowEmpty, refExpressionErrors, allowPlaceholder) { + let elt; + if (this.match(12)) { + if (!allowEmpty) { + this.raise(Errors.UnexpectedToken, this.state.curPosition(), { + unexpected: "," + }); + } + elt = null; + } else if (this.match(21)) { + const spreadNodeStartLoc = this.state.startLoc; + elt = this.parseParenItem(this.parseSpread(refExpressionErrors), spreadNodeStartLoc); + } else if (this.match(17)) { + this.expectPlugin("partialApplication"); + if (!allowPlaceholder) { + this.raise(Errors.UnexpectedArgumentPlaceholder, this.state.startLoc); + } + const node = this.startNode(); + this.next(); + elt = this.finishNode(node, "ArgumentPlaceholder"); + } else { + elt = this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem); + } + return elt; + } + parseIdentifier(liberal) { + const node = this.startNode(); + const name = this.parseIdentifierName(liberal); + return this.createIdentifier(node, name); + } + createIdentifier(node, name) { + node.name = name; + node.loc.identifierName = name; + return this.finishNode(node, "Identifier"); + } + parseIdentifierName(liberal) { + let name; + const { + startLoc, + type + } = this.state; + if (tokenIsKeywordOrIdentifier(type)) { + name = this.state.value; + } else { + this.unexpected(); + } + const tokenIsKeyword = tokenKeywordOrIdentifierIsKeyword(type); + if (liberal) { + if (tokenIsKeyword) { + this.replaceToken(132); + } + } else { + this.checkReservedWord(name, startLoc, tokenIsKeyword, false); + } + this.next(); + return name; + } + checkReservedWord(word, startLoc, checkKeywords, isBinding) { + if (word.length > 10) { + return; + } + if (!canBeReservedWord(word)) { + return; + } + if (checkKeywords && isKeyword(word)) { + this.raise(Errors.UnexpectedKeyword, startLoc, { + keyword: word + }); + return; + } + const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord; + if (reservedTest(word, this.inModule)) { + this.raise(Errors.UnexpectedReservedWord, startLoc, { + reservedWord: word + }); + return; + } else if (word === "yield") { + if (this.prodParam.hasYield) { + this.raise(Errors.YieldBindingIdentifier, startLoc); + return; + } + } else if (word === "await") { + if (this.prodParam.hasAwait) { + this.raise(Errors.AwaitBindingIdentifier, startLoc); + return; + } + if (this.scope.inStaticBlock) { + this.raise(Errors.AwaitBindingIdentifierInStaticBlock, startLoc); + return; + } + this.expressionScope.recordAsyncArrowParametersError(startLoc); + } else if (word === "arguments") { + if (this.scope.inClassAndNotInNonArrowFunction) { + this.raise(Errors.ArgumentsInClass, startLoc); + return; + } + } + } + recordAwaitIfAllowed() { + const isAwaitAllowed = this.prodParam.hasAwait || this.options.allowAwaitOutsideFunction && !this.scope.inFunction; + if (isAwaitAllowed && !this.scope.inFunction) { + this.state.hasTopLevelAwait = true; + } + return isAwaitAllowed; + } + parseAwait(startLoc) { + const node = this.startNodeAt(startLoc); + this.expressionScope.recordParameterInitializerError(Errors.AwaitExpressionFormalParameter, node); + if (this.eat(55)) { + this.raise(Errors.ObsoleteAwaitStar, node); + } + if (!this.scope.inFunction && !this.options.allowAwaitOutsideFunction) { + if (this.isAmbiguousAwait()) { + this.ambiguousScriptDifferentAst = true; + } else { + this.sawUnambiguousESM = true; + } + } + if (!this.state.soloAwait) { + node.argument = this.parseMaybeUnary(null, true); + } + return this.finishNode(node, "AwaitExpression"); + } + isAmbiguousAwait() { + if (this.hasPrecedingLineBreak()) return true; + const { + type + } = this.state; + return type === 53 || type === 10 || type === 0 || tokenIsTemplate(type) || type === 102 && !this.state.containsEsc || type === 137 || type === 56 || this.hasPlugin("v8intrinsic") && type === 54; + } + parseYield() { + const node = this.startNode(); + this.expressionScope.recordParameterInitializerError(Errors.YieldInParameter, node); + this.next(); + let delegating = false; + let argument = null; + if (!this.hasPrecedingLineBreak()) { + delegating = this.eat(55); + switch (this.state.type) { + case 13: + case 139: + case 8: + case 11: + case 3: + case 9: + case 14: + case 12: + if (!delegating) break; + default: + argument = this.parseMaybeAssign(); + } + } + node.delegate = delegating; + node.argument = argument; + return this.finishNode(node, "YieldExpression"); + } + parseImportCall(node) { + this.next(); + node.source = this.parseMaybeAssignAllowIn(); + if (this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions")) { + node.options = null; + } + if (this.eat(12)) { + this.expectImportAttributesPlugin(); + if (!this.match(11)) { + node.options = this.parseMaybeAssignAllowIn(); + this.eat(12); + } + } + this.expect(11); + return this.finishNode(node, "ImportExpression"); + } + checkPipelineAtInfixOperator(left, leftStartLoc) { + if (this.hasPlugin(["pipelineOperator", { + proposal: "smart" + }])) { + if (left.type === "SequenceExpression") { + this.raise(Errors.PipelineHeadSequenceExpression, leftStartLoc); + } + } + } + parseSmartPipelineBodyInStyle(childExpr, startLoc) { + if (this.isSimpleReference(childExpr)) { + const bodyNode = this.startNodeAt(startLoc); + bodyNode.callee = childExpr; + return this.finishNode(bodyNode, "PipelineBareFunction"); + } else { + const bodyNode = this.startNodeAt(startLoc); + this.checkSmartPipeTopicBodyEarlyErrors(startLoc); + bodyNode.expression = childExpr; + return this.finishNode(bodyNode, "PipelineTopicExpression"); + } + } + isSimpleReference(expression) { + switch (expression.type) { + case "MemberExpression": + return !expression.computed && this.isSimpleReference(expression.object); + case "Identifier": + return true; + default: + return false; + } + } + checkSmartPipeTopicBodyEarlyErrors(startLoc) { + if (this.match(19)) { + throw this.raise(Errors.PipelineBodyNoArrow, this.state.startLoc); + } + if (!this.topicReferenceWasUsedInCurrentContext()) { + this.raise(Errors.PipelineTopicUnused, startLoc); + } + } + withTopicBindingContext(callback) { + const outerContextTopicState = this.state.topicContext; + this.state.topicContext = { + maxNumOfResolvableTopics: 1, + maxTopicIndex: null + }; + try { + return callback(); + } finally { + this.state.topicContext = outerContextTopicState; + } + } + withSmartMixTopicForbiddingContext(callback) { + if (this.hasPlugin(["pipelineOperator", { + proposal: "smart" + }])) { + const outerContextTopicState = this.state.topicContext; + this.state.topicContext = { + maxNumOfResolvableTopics: 0, + maxTopicIndex: null + }; + try { + return callback(); + } finally { + this.state.topicContext = outerContextTopicState; + } + } else { + return callback(); + } + } + withSoloAwaitPermittingContext(callback) { + const outerContextSoloAwaitState = this.state.soloAwait; + this.state.soloAwait = true; + try { + return callback(); + } finally { + this.state.soloAwait = outerContextSoloAwaitState; + } + } + allowInAnd(callback) { + const flags = this.prodParam.currentFlags(); + const prodParamToSet = 8 & ~flags; + if (prodParamToSet) { + this.prodParam.enter(flags | 8); + try { + return callback(); + } finally { + this.prodParam.exit(); + } + } + return callback(); + } + disallowInAnd(callback) { + const flags = this.prodParam.currentFlags(); + const prodParamToClear = 8 & flags; + if (prodParamToClear) { + this.prodParam.enter(flags & ~8); + try { + return callback(); + } finally { + this.prodParam.exit(); + } + } + return callback(); + } + registerTopicReference() { + this.state.topicContext.maxTopicIndex = 0; + } + topicReferenceIsAllowedInCurrentContext() { + return this.state.topicContext.maxNumOfResolvableTopics >= 1; + } + topicReferenceWasUsedInCurrentContext() { + return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0; + } + parseFSharpPipelineBody(prec) { + const startLoc = this.state.startLoc; + this.state.potentialArrowAt = this.state.start; + const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; + this.state.inFSharpPipelineDirectBody = true; + const ret = this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startLoc, prec); + this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; + return ret; + } + parseModuleExpression() { + this.expectPlugin("moduleBlocks"); + const node = this.startNode(); + this.next(); + if (!this.match(5)) { + this.unexpected(null, 5); + } + const program = this.startNodeAt(this.state.endLoc); + this.next(); + const revertScopes = this.initializeScopes(true); + this.enterInitialScopes(); + try { + node.body = this.parseProgram(program, 8, "module"); + } finally { + revertScopes(); + } + return this.finishNode(node, "ModuleExpression"); + } + parsePropertyNamePrefixOperator(prop) {} + } + const loopLabel = { + kind: 1 + }, + switchLabel = { + kind: 2 + }; + const loneSurrogate = /[\uD800-\uDFFF]/u; + const keywordRelationalOperator = /in(?:stanceof)?/y; + function babel7CompatTokens(tokens, input) { + for (let i = 0; i < tokens.length; i++) { + const token = tokens[i]; + const { + type + } = token; + if (typeof type === "number") { + { + if (type === 138) { + const { + loc, + start, + value, + end + } = token; + const hashEndPos = start + 1; + const hashEndLoc = createPositionWithColumnOffset(loc.start, 1); + tokens.splice(i, 1, new Token({ + type: getExportedToken(27), + value: "#", + start: start, + end: hashEndPos, + startLoc: loc.start, + endLoc: hashEndLoc + }), new Token({ + type: getExportedToken(132), + value: value, + start: hashEndPos, + end: end, + startLoc: hashEndLoc, + endLoc: loc.end + })); + i++; + continue; + } + if (tokenIsTemplate(type)) { + const { + loc, + start, + value, + end + } = token; + const backquoteEnd = start + 1; + const backquoteEndLoc = createPositionWithColumnOffset(loc.start, 1); + let startToken; + if (input.charCodeAt(start) === 96) { + startToken = new Token({ + type: getExportedToken(22), + value: "`", + start: start, + end: backquoteEnd, + startLoc: loc.start, + endLoc: backquoteEndLoc + }); + } else { + startToken = new Token({ + type: getExportedToken(8), + value: "}", + start: start, + end: backquoteEnd, + startLoc: loc.start, + endLoc: backquoteEndLoc + }); + } + let templateValue, templateElementEnd, templateElementEndLoc, endToken; + if (type === 24) { + templateElementEnd = end - 1; + templateElementEndLoc = createPositionWithColumnOffset(loc.end, -1); + templateValue = value === null ? null : value.slice(1, -1); + endToken = new Token({ + type: getExportedToken(22), + value: "`", + start: templateElementEnd, + end: end, + startLoc: templateElementEndLoc, + endLoc: loc.end + }); + } else { + templateElementEnd = end - 2; + templateElementEndLoc = createPositionWithColumnOffset(loc.end, -2); + templateValue = value === null ? null : value.slice(1, -2); + endToken = new Token({ + type: getExportedToken(23), + value: "${", + start: templateElementEnd, + end: end, + startLoc: templateElementEndLoc, + endLoc: loc.end + }); + } + tokens.splice(i, 1, startToken, new Token({ + type: getExportedToken(20), + value: templateValue, + start: backquoteEnd, + end: templateElementEnd, + startLoc: backquoteEndLoc, + endLoc: templateElementEndLoc + }), endToken); + i += 2; + continue; + } + } + token.type = getExportedToken(type); + } + } + return tokens; + } + class StatementParser extends ExpressionParser { + parseTopLevel(file, program) { + file.program = this.parseProgram(program); + file.comments = this.comments; + if (this.options.tokens) { + file.tokens = babel7CompatTokens(this.tokens, this.input); + } + return this.finishNode(file, "File"); + } + parseProgram(program, end = 139, sourceType = this.options.sourceType) { + program.sourceType = sourceType; + program.interpreter = this.parseInterpreterDirective(); + this.parseBlockBody(program, true, true, end); + if (this.inModule) { + if (!this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) { + for (const [localName, at] of Array.from(this.scope.undefinedExports)) { + this.raise(Errors.ModuleExportUndefined, at, { + localName + }); + } + } + this.addExtra(program, "topLevelAwait", this.state.hasTopLevelAwait); + } + let finishedProgram; + if (end === 139) { + finishedProgram = this.finishNode(program, "Program"); + } else { + finishedProgram = this.finishNodeAt(program, "Program", createPositionWithColumnOffset(this.state.startLoc, -1)); + } + return finishedProgram; + } + stmtToDirective(stmt) { + const directive = stmt; + directive.type = "Directive"; + directive.value = directive.expression; + delete directive.expression; + const directiveLiteral = directive.value; + const expressionValue = directiveLiteral.value; + const raw = this.input.slice(directiveLiteral.start, directiveLiteral.end); + const val = directiveLiteral.value = raw.slice(1, -1); + this.addExtra(directiveLiteral, "raw", raw); + this.addExtra(directiveLiteral, "rawValue", val); + this.addExtra(directiveLiteral, "expressionValue", expressionValue); + directiveLiteral.type = "DirectiveLiteral"; + return directive; + } + parseInterpreterDirective() { + if (!this.match(28)) { + return null; + } + const node = this.startNode(); + node.value = this.state.value; + this.next(); + return this.finishNode(node, "InterpreterDirective"); + } + isLet() { + if (!this.isContextual(100)) { + return false; + } + return this.hasFollowingBindingAtom(); + } + chStartsBindingIdentifier(ch, pos) { + if (isIdentifierStart(ch)) { + keywordRelationalOperator.lastIndex = pos; + if (keywordRelationalOperator.test(this.input)) { + const endCh = this.codePointAtPos(keywordRelationalOperator.lastIndex); + if (!isIdentifierChar(endCh) && endCh !== 92) { + return false; + } + } + return true; + } else if (ch === 92) { + return true; + } else { + return false; + } + } + chStartsBindingPattern(ch) { + return ch === 91 || ch === 123; + } + hasFollowingBindingAtom() { + const next = this.nextTokenStart(); + const nextCh = this.codePointAtPos(next); + return this.chStartsBindingPattern(nextCh) || this.chStartsBindingIdentifier(nextCh, next); + } + hasInLineFollowingBindingIdentifierOrBrace() { + const next = this.nextTokenInLineStart(); + const nextCh = this.codePointAtPos(next); + return nextCh === 123 || this.chStartsBindingIdentifier(nextCh, next); + } + startsUsingForOf() { + const { + type, + containsEsc + } = this.lookahead(); + if (type === 102 && !containsEsc) { + return false; + } else if (tokenIsIdentifier(type) && !this.hasFollowingLineBreak()) { + this.expectPlugin("explicitResourceManagement"); + return true; + } + } + startsAwaitUsing() { + let next = this.nextTokenInLineStart(); + if (this.isUnparsedContextual(next, "using")) { + next = this.nextTokenInLineStartSince(next + 5); + const nextCh = this.codePointAtPos(next); + if (this.chStartsBindingIdentifier(nextCh, next)) { + this.expectPlugin("explicitResourceManagement"); + return true; + } + } + return false; + } + parseModuleItem() { + return this.parseStatementLike(1 | 2 | 4 | 8); + } + parseStatementListItem() { + return this.parseStatementLike(2 | 4 | (!this.options.annexB || this.state.strict ? 0 : 8)); + } + parseStatementOrSloppyAnnexBFunctionDeclaration(allowLabeledFunction = false) { + let flags = 0; + if (this.options.annexB && !this.state.strict) { + flags |= 4; + if (allowLabeledFunction) { + flags |= 8; + } + } + return this.parseStatementLike(flags); + } + parseStatement() { + return this.parseStatementLike(0); + } + parseStatementLike(flags) { + let decorators = null; + if (this.match(26)) { + decorators = this.parseDecorators(true); + } + return this.parseStatementContent(flags, decorators); + } + parseStatementContent(flags, decorators) { + const startType = this.state.type; + const node = this.startNode(); + const allowDeclaration = !!(flags & 2); + const allowFunctionDeclaration = !!(flags & 4); + const topLevel = flags & 1; + switch (startType) { + case 60: + return this.parseBreakContinueStatement(node, true); + case 63: + return this.parseBreakContinueStatement(node, false); + case 64: + return this.parseDebuggerStatement(node); + case 90: + return this.parseDoWhileStatement(node); + case 91: + return this.parseForStatement(node); + case 68: + if (this.lookaheadCharCode() === 46) break; + if (!allowFunctionDeclaration) { + this.raise(this.state.strict ? Errors.StrictFunction : this.options.annexB ? Errors.SloppyFunctionAnnexB : Errors.SloppyFunction, this.state.startLoc); + } + return this.parseFunctionStatement(node, false, !allowDeclaration && allowFunctionDeclaration); + case 80: + if (!allowDeclaration) this.unexpected(); + return this.parseClass(this.maybeTakeDecorators(decorators, node), true); + case 69: + return this.parseIfStatement(node); + case 70: + return this.parseReturnStatement(node); + case 71: + return this.parseSwitchStatement(node); + case 72: + return this.parseThrowStatement(node); + case 73: + return this.parseTryStatement(node); + case 96: + if (!this.state.containsEsc && this.startsAwaitUsing()) { + if (!this.recordAwaitIfAllowed()) { + this.raise(Errors.AwaitUsingNotInAsyncContext, node); + } else if (!allowDeclaration) { + this.raise(Errors.UnexpectedLexicalDeclaration, node); + } + this.next(); + return this.parseVarStatement(node, "await using"); + } + break; + case 107: + if (this.state.containsEsc || !this.hasInLineFollowingBindingIdentifierOrBrace()) { + break; + } + this.expectPlugin("explicitResourceManagement"); + if (!this.scope.inModule && this.scope.inTopLevel) { + this.raise(Errors.UnexpectedUsingDeclaration, this.state.startLoc); + } else if (!allowDeclaration) { + this.raise(Errors.UnexpectedLexicalDeclaration, this.state.startLoc); + } + return this.parseVarStatement(node, "using"); + case 100: + { + if (this.state.containsEsc) { + break; + } + const next = this.nextTokenStart(); + const nextCh = this.codePointAtPos(next); + if (nextCh !== 91) { + if (!allowDeclaration && this.hasFollowingLineBreak()) break; + if (!this.chStartsBindingIdentifier(nextCh, next) && nextCh !== 123) { + break; + } + } + } + case 75: + { + if (!allowDeclaration) { + this.raise(Errors.UnexpectedLexicalDeclaration, this.state.startLoc); + } + } + case 74: + { + const kind = this.state.value; + return this.parseVarStatement(node, kind); + } + case 92: + return this.parseWhileStatement(node); + case 76: + return this.parseWithStatement(node); + case 5: + return this.parseBlock(); + case 13: + return this.parseEmptyStatement(node); + case 83: + { + const nextTokenCharCode = this.lookaheadCharCode(); + if (nextTokenCharCode === 40 || nextTokenCharCode === 46) { + break; + } + } + case 82: + { + if (!this.options.allowImportExportEverywhere && !topLevel) { + this.raise(Errors.UnexpectedImportExport, this.state.startLoc); + } + this.next(); + let result; + if (startType === 83) { + result = this.parseImport(node); + if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) { + this.sawUnambiguousESM = true; + } + } else { + result = this.parseExport(node, decorators); + if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") { + this.sawUnambiguousESM = true; + } + } + this.assertModuleNodeAllowed(result); + return result; + } + default: + { + if (this.isAsyncFunction()) { + if (!allowDeclaration) { + this.raise(Errors.AsyncFunctionInSingleStatementContext, this.state.startLoc); + } + this.next(); + return this.parseFunctionStatement(node, true, !allowDeclaration && allowFunctionDeclaration); + } + } + } + const maybeName = this.state.value; + const expr = this.parseExpression(); + if (tokenIsIdentifier(startType) && expr.type === "Identifier" && this.eat(14)) { + return this.parseLabeledStatement(node, maybeName, expr, flags); + } else { + return this.parseExpressionStatement(node, expr, decorators); + } + } + assertModuleNodeAllowed(node) { + if (!this.options.allowImportExportEverywhere && !this.inModule) { + this.raise(Errors.ImportOutsideModule, node); + } + } + decoratorsEnabledBeforeExport() { + if (this.hasPlugin("decorators-legacy")) return true; + return this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") !== false; + } + maybeTakeDecorators(maybeDecorators, classNode, exportNode) { + if (maybeDecorators) { + if (classNode.decorators && classNode.decorators.length > 0) { + if (typeof this.getPluginOption("decorators", "decoratorsBeforeExport") !== "boolean") { + this.raise(Errors.DecoratorsBeforeAfterExport, classNode.decorators[0]); + } + classNode.decorators.unshift(...maybeDecorators); + } else { + classNode.decorators = maybeDecorators; + } + this.resetStartLocationFromNode(classNode, maybeDecorators[0]); + if (exportNode) this.resetStartLocationFromNode(exportNode, classNode); + } + return classNode; + } + canHaveLeadingDecorator() { + return this.match(80); + } + parseDecorators(allowExport) { + const decorators = []; + do { + decorators.push(this.parseDecorator()); + } while (this.match(26)); + if (this.match(82)) { + if (!allowExport) { + this.unexpected(); + } + if (!this.decoratorsEnabledBeforeExport()) { + this.raise(Errors.DecoratorExportClass, this.state.startLoc); + } + } else if (!this.canHaveLeadingDecorator()) { + throw this.raise(Errors.UnexpectedLeadingDecorator, this.state.startLoc); + } + return decorators; + } + parseDecorator() { + this.expectOnePlugin(["decorators", "decorators-legacy"]); + const node = this.startNode(); + this.next(); + if (this.hasPlugin("decorators")) { + const startLoc = this.state.startLoc; + let expr; + if (this.match(10)) { + const startLoc = this.state.startLoc; + this.next(); + expr = this.parseExpression(); + this.expect(11); + expr = this.wrapParenthesis(startLoc, expr); + const paramsStartLoc = this.state.startLoc; + node.expression = this.parseMaybeDecoratorArguments(expr); + if (this.getPluginOption("decorators", "allowCallParenthesized") === false && node.expression !== expr) { + this.raise(Errors.DecoratorArgumentsOutsideParentheses, paramsStartLoc); + } + } else { + expr = this.parseIdentifier(false); + while (this.eat(16)) { + const node = this.startNodeAt(startLoc); + node.object = expr; + if (this.match(138)) { + this.classScope.usePrivateName(this.state.value, this.state.startLoc); + node.property = this.parsePrivateName(); + } else { + node.property = this.parseIdentifier(true); + } + node.computed = false; + expr = this.finishNode(node, "MemberExpression"); + } + node.expression = this.parseMaybeDecoratorArguments(expr); + } + } else { + node.expression = this.parseExprSubscripts(); + } + return this.finishNode(node, "Decorator"); + } + parseMaybeDecoratorArguments(expr) { + if (this.eat(10)) { + const node = this.startNodeAtNode(expr); + node.callee = expr; + node.arguments = this.parseCallExpressionArguments(11, false); + this.toReferencedList(node.arguments); + return this.finishNode(node, "CallExpression"); + } + return expr; + } + parseBreakContinueStatement(node, isBreak) { + this.next(); + if (this.isLineTerminator()) { + node.label = null; + } else { + node.label = this.parseIdentifier(); + this.semicolon(); + } + this.verifyBreakContinue(node, isBreak); + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); + } + verifyBreakContinue(node, isBreak) { + let i; + for (i = 0; i < this.state.labels.length; ++i) { + const lab = this.state.labels[i]; + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === 1)) { + break; + } + if (node.label && isBreak) break; + } + } + if (i === this.state.labels.length) { + const type = isBreak ? "BreakStatement" : "ContinueStatement"; + this.raise(Errors.IllegalBreakContinue, node, { + type + }); + } + } + parseDebuggerStatement(node) { + this.next(); + this.semicolon(); + return this.finishNode(node, "DebuggerStatement"); + } + parseHeaderExpression() { + this.expect(10); + const val = this.parseExpression(); + this.expect(11); + return val; + } + parseDoWhileStatement(node) { + this.next(); + this.state.labels.push(loopLabel); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); + this.state.labels.pop(); + this.expect(92); + node.test = this.parseHeaderExpression(); + this.eat(13); + return this.finishNode(node, "DoWhileStatement"); + } + parseForStatement(node) { + this.next(); + this.state.labels.push(loopLabel); + let awaitAt = null; + if (this.isContextual(96) && this.recordAwaitIfAllowed()) { + awaitAt = this.state.startLoc; + this.next(); + } + this.scope.enter(0); + this.expect(10); + if (this.match(13)) { + if (awaitAt !== null) { + this.unexpected(awaitAt); + } + return this.parseFor(node, null); + } + const startsWithLet = this.isContextual(100); + { + const startsWithAwaitUsing = this.isContextual(96) && this.startsAwaitUsing(); + const starsWithUsingDeclaration = startsWithAwaitUsing || this.isContextual(107) && this.startsUsingForOf(); + const isLetOrUsing = startsWithLet && this.hasFollowingBindingAtom() || starsWithUsingDeclaration; + if (this.match(74) || this.match(75) || isLetOrUsing) { + const initNode = this.startNode(); + let kind; + if (startsWithAwaitUsing) { + kind = "await using"; + if (!this.recordAwaitIfAllowed()) { + this.raise(Errors.AwaitUsingNotInAsyncContext, this.state.startLoc); + } + this.next(); + } else { + kind = this.state.value; + } + this.next(); + this.parseVar(initNode, true, kind); + const init = this.finishNode(initNode, "VariableDeclaration"); + const isForIn = this.match(58); + if (isForIn && starsWithUsingDeclaration) { + this.raise(Errors.ForInUsing, init); + } + if ((isForIn || this.isContextual(102)) && init.declarations.length === 1) { + return this.parseForIn(node, init, awaitAt); + } + if (awaitAt !== null) { + this.unexpected(awaitAt); + } + return this.parseFor(node, init); + } + } + const startsWithAsync = this.isContextual(95); + const refExpressionErrors = new ExpressionErrors(); + const init = this.parseExpression(true, refExpressionErrors); + const isForOf = this.isContextual(102); + if (isForOf) { + if (startsWithLet) { + this.raise(Errors.ForOfLet, init); + } + if (awaitAt === null && startsWithAsync && init.type === "Identifier") { + this.raise(Errors.ForOfAsync, init); + } + } + if (isForOf || this.match(58)) { + this.checkDestructuringPrivate(refExpressionErrors); + this.toAssignable(init, true); + const type = isForOf ? "ForOfStatement" : "ForInStatement"; + this.checkLVal(init, { + type + }); + return this.parseForIn(node, init, awaitAt); + } else { + this.checkExpressionErrors(refExpressionErrors, true); + } + if (awaitAt !== null) { + this.unexpected(awaitAt); + } + return this.parseFor(node, init); + } + parseFunctionStatement(node, isAsync, isHangingDeclaration) { + this.next(); + return this.parseFunction(node, 1 | (isHangingDeclaration ? 2 : 0) | (isAsync ? 8 : 0)); + } + parseIfStatement(node) { + this.next(); + node.test = this.parseHeaderExpression(); + node.consequent = this.parseStatementOrSloppyAnnexBFunctionDeclaration(); + node.alternate = this.eat(66) ? this.parseStatementOrSloppyAnnexBFunctionDeclaration() : null; + return this.finishNode(node, "IfStatement"); + } + parseReturnStatement(node) { + if (!this.prodParam.hasReturn && !this.options.allowReturnOutsideFunction) { + this.raise(Errors.IllegalReturn, this.state.startLoc); + } + this.next(); + if (this.isLineTerminator()) { + node.argument = null; + } else { + node.argument = this.parseExpression(); + this.semicolon(); + } + return this.finishNode(node, "ReturnStatement"); + } + parseSwitchStatement(node) { + this.next(); + node.discriminant = this.parseHeaderExpression(); + const cases = node.cases = []; + this.expect(5); + this.state.labels.push(switchLabel); + this.scope.enter(0); + let cur; + for (let sawDefault; !this.match(8);) { + if (this.match(61) || this.match(65)) { + const isCase = this.match(61); + if (cur) this.finishNode(cur, "SwitchCase"); + cases.push(cur = this.startNode()); + cur.consequent = []; + this.next(); + if (isCase) { + cur.test = this.parseExpression(); + } else { + if (sawDefault) { + this.raise(Errors.MultipleDefaultsInSwitch, this.state.lastTokStartLoc); + } + sawDefault = true; + cur.test = null; + } + this.expect(14); + } else { + if (cur) { + cur.consequent.push(this.parseStatementListItem()); + } else { + this.unexpected(); + } + } + } + this.scope.exit(); + if (cur) this.finishNode(cur, "SwitchCase"); + this.next(); + this.state.labels.pop(); + return this.finishNode(node, "SwitchStatement"); + } + parseThrowStatement(node) { + this.next(); + if (this.hasPrecedingLineBreak()) { + this.raise(Errors.NewlineAfterThrow, this.state.lastTokEndLoc); + } + node.argument = this.parseExpression(); + this.semicolon(); + return this.finishNode(node, "ThrowStatement"); + } + parseCatchClauseParam() { + const param = this.parseBindingAtom(); + this.scope.enter(this.options.annexB && param.type === "Identifier" ? 8 : 0); + this.checkLVal(param, { + type: "CatchClause" + }, 9); + return param; + } + parseTryStatement(node) { + this.next(); + node.block = this.parseBlock(); + node.handler = null; + if (this.match(62)) { + const clause = this.startNode(); + this.next(); + if (this.match(10)) { + this.expect(10); + clause.param = this.parseCatchClauseParam(); + this.expect(11); + } else { + clause.param = null; + this.scope.enter(0); + } + clause.body = this.withSmartMixTopicForbiddingContext(() => this.parseBlock(false, false)); + this.scope.exit(); + node.handler = this.finishNode(clause, "CatchClause"); + } + node.finalizer = this.eat(67) ? this.parseBlock() : null; + if (!node.handler && !node.finalizer) { + this.raise(Errors.NoCatchOrFinally, node); + } + return this.finishNode(node, "TryStatement"); + } + parseVarStatement(node, kind, allowMissingInitializer = false) { + this.next(); + this.parseVar(node, false, kind, allowMissingInitializer); + this.semicolon(); + return this.finishNode(node, "VariableDeclaration"); + } + parseWhileStatement(node) { + this.next(); + node.test = this.parseHeaderExpression(); + this.state.labels.push(loopLabel); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); + this.state.labels.pop(); + return this.finishNode(node, "WhileStatement"); + } + parseWithStatement(node) { + if (this.state.strict) { + this.raise(Errors.StrictWith, this.state.startLoc); + } + this.next(); + node.object = this.parseHeaderExpression(); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); + return this.finishNode(node, "WithStatement"); + } + parseEmptyStatement(node) { + this.next(); + return this.finishNode(node, "EmptyStatement"); + } + parseLabeledStatement(node, maybeName, expr, flags) { + for (const label of this.state.labels) { + if (label.name === maybeName) { + this.raise(Errors.LabelRedeclaration, expr, { + labelName: maybeName + }); + } + } + const kind = tokenIsLoop(this.state.type) ? 1 : this.match(71) ? 2 : null; + for (let i = this.state.labels.length - 1; i >= 0; i--) { + const label = this.state.labels[i]; + if (label.statementStart === node.start) { + label.statementStart = this.state.start; + label.kind = kind; + } else { + break; + } + } + this.state.labels.push({ + name: maybeName, + kind: kind, + statementStart: this.state.start + }); + node.body = flags & 8 ? this.parseStatementOrSloppyAnnexBFunctionDeclaration(true) : this.parseStatement(); + this.state.labels.pop(); + node.label = expr; + return this.finishNode(node, "LabeledStatement"); + } + parseExpressionStatement(node, expr, decorators) { + node.expression = expr; + this.semicolon(); + return this.finishNode(node, "ExpressionStatement"); + } + parseBlock(allowDirectives = false, createNewLexicalScope = true, afterBlockParse) { + const node = this.startNode(); + if (allowDirectives) { + this.state.strictErrors.clear(); + } + this.expect(5); + if (createNewLexicalScope) { + this.scope.enter(0); + } + this.parseBlockBody(node, allowDirectives, false, 8, afterBlockParse); + if (createNewLexicalScope) { + this.scope.exit(); + } + return this.finishNode(node, "BlockStatement"); + } + isValidDirective(stmt) { + return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized; + } + parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) { + const body = node.body = []; + const directives = node.directives = []; + this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end, afterBlockParse); + } + parseBlockOrModuleBlockBody(body, directives, topLevel, end, afterBlockParse) { + const oldStrict = this.state.strict; + let hasStrictModeDirective = false; + let parsedNonDirective = false; + while (!this.match(end)) { + const stmt = topLevel ? this.parseModuleItem() : this.parseStatementListItem(); + if (directives && !parsedNonDirective) { + if (this.isValidDirective(stmt)) { + const directive = this.stmtToDirective(stmt); + directives.push(directive); + if (!hasStrictModeDirective && directive.value.value === "use strict") { + hasStrictModeDirective = true; + this.setStrict(true); + } + continue; + } + parsedNonDirective = true; + this.state.strictErrors.clear(); + } + body.push(stmt); + } + afterBlockParse == null || afterBlockParse.call(this, hasStrictModeDirective); + if (!oldStrict) { + this.setStrict(false); + } + this.next(); + } + parseFor(node, init) { + node.init = init; + this.semicolon(false); + node.test = this.match(13) ? null : this.parseExpression(); + this.semicolon(false); + node.update = this.match(11) ? null : this.parseExpression(); + this.expect(11); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); + this.scope.exit(); + this.state.labels.pop(); + return this.finishNode(node, "ForStatement"); + } + parseForIn(node, init, awaitAt) { + const isForIn = this.match(58); + this.next(); + if (isForIn) { + if (awaitAt !== null) this.unexpected(awaitAt); + } else { + node.await = awaitAt !== null; + } + if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || !this.options.annexB || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) { + this.raise(Errors.ForInOfLoopInitializer, init, { + type: isForIn ? "ForInStatement" : "ForOfStatement" + }); + } + if (init.type === "AssignmentPattern") { + this.raise(Errors.InvalidLhs, init, { + ancestor: { + type: "ForStatement" + } + }); + } + node.left = init; + node.right = isForIn ? this.parseExpression() : this.parseMaybeAssignAllowIn(); + this.expect(11); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); + this.scope.exit(); + this.state.labels.pop(); + return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement"); + } + parseVar(node, isFor, kind, allowMissingInitializer = false) { + const declarations = node.declarations = []; + node.kind = kind; + for (;;) { + const decl = this.startNode(); + this.parseVarId(decl, kind); + decl.init = !this.eat(29) ? null : isFor ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn(); + if (decl.init === null && !allowMissingInitializer) { + if (decl.id.type !== "Identifier" && !(isFor && (this.match(58) || this.isContextual(102)))) { + this.raise(Errors.DeclarationMissingInitializer, this.state.lastTokEndLoc, { + kind: "destructuring" + }); + } else if ((kind === "const" || kind === "using" || kind === "await using") && !(this.match(58) || this.isContextual(102))) { + this.raise(Errors.DeclarationMissingInitializer, this.state.lastTokEndLoc, { + kind + }); + } + } + declarations.push(this.finishNode(decl, "VariableDeclarator")); + if (!this.eat(12)) break; + } + return node; + } + parseVarId(decl, kind) { + const id = this.parseBindingAtom(); + if (kind === "using" || kind === "await using") { + if (id.type === "ArrayPattern" || id.type === "ObjectPattern") { + this.raise(Errors.UsingDeclarationHasBindingPattern, id.loc.start); + } + } + this.checkLVal(id, { + type: "VariableDeclarator" + }, kind === "var" ? 5 : 8201); + decl.id = id; + } + parseAsyncFunctionExpression(node) { + return this.parseFunction(node, 8); + } + parseFunction(node, flags = 0) { + const hangingDeclaration = flags & 2; + const isDeclaration = !!(flags & 1); + const requireId = isDeclaration && !(flags & 4); + const isAsync = !!(flags & 8); + this.initFunction(node, isAsync); + if (this.match(55)) { + if (hangingDeclaration) { + this.raise(Errors.GeneratorInSingleStatementContext, this.state.startLoc); + } + this.next(); + node.generator = true; + } + if (isDeclaration) { + node.id = this.parseFunctionId(requireId); + } + const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + this.state.maybeInArrowParameters = false; + this.scope.enter(2); + this.prodParam.enter(functionFlags(isAsync, node.generator)); + if (!isDeclaration) { + node.id = this.parseFunctionId(); + } + this.parseFunctionParams(node, false); + this.withSmartMixTopicForbiddingContext(() => { + this.parseFunctionBodyAndFinish(node, isDeclaration ? "FunctionDeclaration" : "FunctionExpression"); + }); + this.prodParam.exit(); + this.scope.exit(); + if (isDeclaration && !hangingDeclaration) { + this.registerFunctionStatementId(node); + } + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + return node; + } + parseFunctionId(requireId) { + return requireId || tokenIsIdentifier(this.state.type) ? this.parseIdentifier() : null; + } + parseFunctionParams(node, isConstructor) { + this.expect(10); + this.expressionScope.enter(newParameterDeclarationScope()); + node.params = this.parseBindingList(11, 41, 2 | (isConstructor ? 4 : 0)); + this.expressionScope.exit(); + } + registerFunctionStatementId(node) { + if (!node.id) return; + this.scope.declareName(node.id.name, !this.options.annexB || this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? 5 : 8201 : 17, node.id.loc.start); + } + parseClass(node, isStatement, optionalId) { + this.next(); + const oldStrict = this.state.strict; + this.state.strict = true; + this.parseClassId(node, isStatement, optionalId); + this.parseClassSuper(node); + node.body = this.parseClassBody(!!node.superClass, oldStrict); + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); + } + isClassProperty() { + return this.match(29) || this.match(13) || this.match(8); + } + isClassMethod() { + return this.match(10); + } + nameIsConstructor(key) { + return key.type === "Identifier" && key.name === "constructor" || key.type === "StringLiteral" && key.value === "constructor"; + } + isNonstaticConstructor(method) { + return !method.computed && !method.static && this.nameIsConstructor(method.key); + } + parseClassBody(hadSuperClass, oldStrict) { + this.classScope.enter(); + const state = { + hadConstructor: false, + hadSuperClass + }; + let decorators = []; + const classBody = this.startNode(); + classBody.body = []; + this.expect(5); + this.withSmartMixTopicForbiddingContext(() => { + while (!this.match(8)) { + if (this.eat(13)) { + if (decorators.length > 0) { + throw this.raise(Errors.DecoratorSemicolon, this.state.lastTokEndLoc); + } + continue; + } + if (this.match(26)) { + decorators.push(this.parseDecorator()); + continue; + } + const member = this.startNode(); + if (decorators.length) { + member.decorators = decorators; + this.resetStartLocationFromNode(member, decorators[0]); + decorators = []; + } + this.parseClassMember(classBody, member, state); + if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) { + this.raise(Errors.DecoratorConstructor, member); + } + } + }); + this.state.strict = oldStrict; + this.next(); + if (decorators.length) { + throw this.raise(Errors.TrailingDecorator, this.state.startLoc); + } + this.classScope.exit(); + return this.finishNode(classBody, "ClassBody"); + } + parseClassMemberFromModifier(classBody, member) { + const key = this.parseIdentifier(true); + if (this.isClassMethod()) { + const method = member; + method.kind = "method"; + method.computed = false; + method.key = key; + method.static = false; + this.pushClassMethod(classBody, method, false, false, false, false); + return true; + } else if (this.isClassProperty()) { + const prop = member; + prop.computed = false; + prop.key = key; + prop.static = false; + classBody.body.push(this.parseClassProperty(prop)); + return true; + } + this.resetPreviousNodeTrailingComments(key); + return false; + } + parseClassMember(classBody, member, state) { + const isStatic = this.isContextual(106); + if (isStatic) { + if (this.parseClassMemberFromModifier(classBody, member)) { + return; + } + if (this.eat(5)) { + this.parseClassStaticBlock(classBody, member); + return; + } + } + this.parseClassMemberWithIsStatic(classBody, member, state, isStatic); + } + parseClassMemberWithIsStatic(classBody, member, state, isStatic) { + const publicMethod = member; + const privateMethod = member; + const publicProp = member; + const privateProp = member; + const accessorProp = member; + const method = publicMethod; + const publicMember = publicMethod; + member.static = isStatic; + this.parsePropertyNamePrefixOperator(member); + if (this.eat(55)) { + method.kind = "method"; + const isPrivateName = this.match(138); + this.parseClassElementName(method); + if (isPrivateName) { + this.pushClassPrivateMethod(classBody, privateMethod, true, false); + return; + } + if (this.isNonstaticConstructor(publicMethod)) { + this.raise(Errors.ConstructorIsGenerator, publicMethod.key); + } + this.pushClassMethod(classBody, publicMethod, true, false, false, false); + return; + } + const isContextual = !this.state.containsEsc && tokenIsIdentifier(this.state.type); + const key = this.parseClassElementName(member); + const maybeContextualKw = isContextual ? key.name : null; + const isPrivate = this.isPrivateName(key); + const maybeQuestionTokenStartLoc = this.state.startLoc; + this.parsePostMemberNameModifiers(publicMember); + if (this.isClassMethod()) { + method.kind = "method"; + if (isPrivate) { + this.pushClassPrivateMethod(classBody, privateMethod, false, false); + return; + } + const isConstructor = this.isNonstaticConstructor(publicMethod); + let allowsDirectSuper = false; + if (isConstructor) { + publicMethod.kind = "constructor"; + if (state.hadConstructor && !this.hasPlugin("typescript")) { + this.raise(Errors.DuplicateConstructor, key); + } + if (isConstructor && this.hasPlugin("typescript") && member.override) { + this.raise(Errors.OverrideOnConstructor, key); + } + state.hadConstructor = true; + allowsDirectSuper = state.hadSuperClass; + } + this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper); + } else if (this.isClassProperty()) { + if (isPrivate) { + this.pushClassPrivateProperty(classBody, privateProp); + } else { + this.pushClassProperty(classBody, publicProp); + } + } else if (maybeContextualKw === "async" && !this.isLineTerminator()) { + this.resetPreviousNodeTrailingComments(key); + const isGenerator = this.eat(55); + if (publicMember.optional) { + this.unexpected(maybeQuestionTokenStartLoc); + } + method.kind = "method"; + const isPrivate = this.match(138); + this.parseClassElementName(method); + this.parsePostMemberNameModifiers(publicMember); + if (isPrivate) { + this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true); + } else { + if (this.isNonstaticConstructor(publicMethod)) { + this.raise(Errors.ConstructorIsAsync, publicMethod.key); + } + this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false); + } + } else if ((maybeContextualKw === "get" || maybeContextualKw === "set") && !(this.match(55) && this.isLineTerminator())) { + this.resetPreviousNodeTrailingComments(key); + method.kind = maybeContextualKw; + const isPrivate = this.match(138); + this.parseClassElementName(publicMethod); + if (isPrivate) { + this.pushClassPrivateMethod(classBody, privateMethod, false, false); + } else { + if (this.isNonstaticConstructor(publicMethod)) { + this.raise(Errors.ConstructorIsAccessor, publicMethod.key); + } + this.pushClassMethod(classBody, publicMethod, false, false, false, false); + } + this.checkGetterSetterParams(publicMethod); + } else if (maybeContextualKw === "accessor" && !this.isLineTerminator()) { + this.expectPlugin("decoratorAutoAccessors"); + this.resetPreviousNodeTrailingComments(key); + const isPrivate = this.match(138); + this.parseClassElementName(publicProp); + this.pushClassAccessorProperty(classBody, accessorProp, isPrivate); + } else if (this.isLineTerminator()) { + if (isPrivate) { + this.pushClassPrivateProperty(classBody, privateProp); + } else { + this.pushClassProperty(classBody, publicProp); + } + } else { + this.unexpected(); + } + } + parseClassElementName(member) { + const { + type, + value + } = this.state; + if ((type === 132 || type === 133) && member.static && value === "prototype") { + this.raise(Errors.StaticPrototype, this.state.startLoc); + } + if (type === 138) { + if (value === "constructor") { + this.raise(Errors.ConstructorClassPrivateField, this.state.startLoc); + } + const key = this.parsePrivateName(); + member.key = key; + return key; + } + this.parsePropertyName(member); + return member.key; + } + parseClassStaticBlock(classBody, member) { + var _member$decorators; + this.scope.enter(64 | 128 | 16); + const oldLabels = this.state.labels; + this.state.labels = []; + this.prodParam.enter(0); + const body = member.body = []; + this.parseBlockOrModuleBlockBody(body, undefined, false, 8); + this.prodParam.exit(); + this.scope.exit(); + this.state.labels = oldLabels; + classBody.body.push(this.finishNode(member, "StaticBlock")); + if ((_member$decorators = member.decorators) != null && _member$decorators.length) { + this.raise(Errors.DecoratorStaticBlock, member); + } + } + pushClassProperty(classBody, prop) { + if (!prop.computed && this.nameIsConstructor(prop.key)) { + this.raise(Errors.ConstructorClassField, prop.key); + } + classBody.body.push(this.parseClassProperty(prop)); + } + pushClassPrivateProperty(classBody, prop) { + const node = this.parseClassPrivateProperty(prop); + classBody.body.push(node); + this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), 0, node.key.loc.start); + } + pushClassAccessorProperty(classBody, prop, isPrivate) { + if (!isPrivate && !prop.computed && this.nameIsConstructor(prop.key)) { + this.raise(Errors.ConstructorClassField, prop.key); + } + const node = this.parseClassAccessorProperty(prop); + classBody.body.push(node); + if (isPrivate) { + this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), 0, node.key.loc.start); + } + } + pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { + classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true)); + } + pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { + const node = this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true); + classBody.body.push(node); + const kind = node.kind === "get" ? node.static ? 6 : 2 : node.kind === "set" ? node.static ? 5 : 1 : 0; + this.declareClassPrivateMethodInScope(node, kind); + } + declareClassPrivateMethodInScope(node, kind) { + this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), kind, node.key.loc.start); + } + parsePostMemberNameModifiers(methodOrProp) {} + parseClassPrivateProperty(node) { + this.parseInitializer(node); + this.semicolon(); + return this.finishNode(node, "ClassPrivateProperty"); + } + parseClassProperty(node) { + this.parseInitializer(node); + this.semicolon(); + return this.finishNode(node, "ClassProperty"); + } + parseClassAccessorProperty(node) { + this.parseInitializer(node); + this.semicolon(); + return this.finishNode(node, "ClassAccessorProperty"); + } + parseInitializer(node) { + this.scope.enter(64 | 16); + this.expressionScope.enter(newExpressionScope()); + this.prodParam.enter(0); + node.value = this.eat(29) ? this.parseMaybeAssignAllowIn() : null; + this.expressionScope.exit(); + this.prodParam.exit(); + this.scope.exit(); + } + parseClassId(node, isStatement, optionalId, bindingType = 8331) { + if (tokenIsIdentifier(this.state.type)) { + node.id = this.parseIdentifier(); + if (isStatement) { + this.declareNameFromIdentifier(node.id, bindingType); + } + } else { + if (optionalId || !isStatement) { + node.id = null; + } else { + throw this.raise(Errors.MissingClassName, this.state.startLoc); + } + } + } + parseClassSuper(node) { + node.superClass = this.eat(81) ? this.parseExprSubscripts() : null; + } + parseExport(node, decorators) { + const maybeDefaultIdentifier = this.parseMaybeImportPhase(node, true); + const hasDefault = this.maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier); + const parseAfterDefault = !hasDefault || this.eat(12); + const hasStar = parseAfterDefault && this.eatExportStar(node); + const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node); + const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(12)); + const isFromRequired = hasDefault || hasStar; + if (hasStar && !hasNamespace) { + if (hasDefault) this.unexpected(); + if (decorators) { + throw this.raise(Errors.UnsupportedDecoratorExport, node); + } + this.parseExportFrom(node, true); + return this.finishNode(node, "ExportAllDeclaration"); + } + const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node); + if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers) { + this.unexpected(null, 5); + } + if (hasNamespace && parseAfterNamespace) { + this.unexpected(null, 98); + } + let hasDeclaration; + if (isFromRequired || hasSpecifiers) { + hasDeclaration = false; + if (decorators) { + throw this.raise(Errors.UnsupportedDecoratorExport, node); + } + this.parseExportFrom(node, isFromRequired); + } else { + hasDeclaration = this.maybeParseExportDeclaration(node); + } + if (isFromRequired || hasSpecifiers || hasDeclaration) { + var _node2$declaration; + const node2 = node; + this.checkExport(node2, true, false, !!node2.source); + if (((_node2$declaration = node2.declaration) == null ? void 0 : _node2$declaration.type) === "ClassDeclaration") { + this.maybeTakeDecorators(decorators, node2.declaration, node2); + } else if (decorators) { + throw this.raise(Errors.UnsupportedDecoratorExport, node); + } + return this.finishNode(node2, "ExportNamedDeclaration"); + } + if (this.eat(65)) { + const node2 = node; + const decl = this.parseExportDefaultExpression(); + node2.declaration = decl; + if (decl.type === "ClassDeclaration") { + this.maybeTakeDecorators(decorators, decl, node2); + } else if (decorators) { + throw this.raise(Errors.UnsupportedDecoratorExport, node); + } + this.checkExport(node2, true, true); + return this.finishNode(node2, "ExportDefaultDeclaration"); + } + this.unexpected(null, 5); + } + eatExportStar(node) { + return this.eat(55); + } + maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier) { + if (maybeDefaultIdentifier || this.isExportDefaultSpecifier()) { + this.expectPlugin("exportDefaultFrom", maybeDefaultIdentifier == null ? void 0 : maybeDefaultIdentifier.loc.start); + const id = maybeDefaultIdentifier || this.parseIdentifier(true); + const specifier = this.startNodeAtNode(id); + specifier.exported = id; + node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; + return true; + } + return false; + } + maybeParseExportNamespaceSpecifier(node) { + if (this.isContextual(93)) { + var _ref, _ref$specifiers; + (_ref$specifiers = (_ref = node).specifiers) != null ? _ref$specifiers : _ref.specifiers = []; + const specifier = this.startNodeAt(this.state.lastTokStartLoc); + this.next(); + specifier.exported = this.parseModuleExportName(); + node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier")); + return true; + } + return false; + } + maybeParseExportNamedSpecifiers(node) { + if (this.match(5)) { + const node2 = node; + if (!node2.specifiers) node2.specifiers = []; + const isTypeExport = node2.exportKind === "type"; + node2.specifiers.push(...this.parseExportSpecifiers(isTypeExport)); + node2.source = null; + node2.declaration = null; + if (this.hasPlugin("importAssertions")) { + node2.assertions = []; + } + return true; + } + return false; + } + maybeParseExportDeclaration(node) { + if (this.shouldParseExportDeclaration()) { + node.specifiers = []; + node.source = null; + if (this.hasPlugin("importAssertions")) { + node.assertions = []; + } + node.declaration = this.parseExportDeclaration(node); + return true; + } + return false; + } + isAsyncFunction() { + if (!this.isContextual(95)) return false; + const next = this.nextTokenInLineStart(); + return this.isUnparsedContextual(next, "function"); + } + parseExportDefaultExpression() { + const expr = this.startNode(); + if (this.match(68)) { + this.next(); + return this.parseFunction(expr, 1 | 4); + } else if (this.isAsyncFunction()) { + this.next(); + this.next(); + return this.parseFunction(expr, 1 | 4 | 8); + } + if (this.match(80)) { + return this.parseClass(expr, true, true); + } + if (this.match(26)) { + if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") === true) { + this.raise(Errors.DecoratorBeforeExport, this.state.startLoc); + } + return this.parseClass(this.maybeTakeDecorators(this.parseDecorators(false), this.startNode()), true, true); + } + if (this.match(75) || this.match(74) || this.isLet()) { + throw this.raise(Errors.UnsupportedDefaultExport, this.state.startLoc); + } + const res = this.parseMaybeAssignAllowIn(); + this.semicolon(); + return res; + } + parseExportDeclaration(node) { + if (this.match(80)) { + const node = this.parseClass(this.startNode(), true, false); + return node; + } + return this.parseStatementListItem(); + } + isExportDefaultSpecifier() { + const { + type + } = this.state; + if (tokenIsIdentifier(type)) { + if (type === 95 && !this.state.containsEsc || type === 100) { + return false; + } + if ((type === 130 || type === 129) && !this.state.containsEsc) { + const { + type: nextType + } = this.lookahead(); + if (tokenIsIdentifier(nextType) && nextType !== 98 || nextType === 5) { + this.expectOnePlugin(["flow", "typescript"]); + return false; + } + } + } else if (!this.match(65)) { + return false; + } + const next = this.nextTokenStart(); + const hasFrom = this.isUnparsedContextual(next, "from"); + if (this.input.charCodeAt(next) === 44 || tokenIsIdentifier(this.state.type) && hasFrom) { + return true; + } + if (this.match(65) && hasFrom) { + const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4)); + return nextAfterFrom === 34 || nextAfterFrom === 39; + } + return false; + } + parseExportFrom(node, expect) { + if (this.eatContextual(98)) { + node.source = this.parseImportSource(); + this.checkExport(node); + this.maybeParseImportAttributes(node); + this.checkJSONModuleImport(node); + } else if (expect) { + this.unexpected(); + } + this.semicolon(); + } + shouldParseExportDeclaration() { + const { + type + } = this.state; + if (type === 26) { + this.expectOnePlugin(["decorators", "decorators-legacy"]); + if (this.hasPlugin("decorators")) { + if (this.getPluginOption("decorators", "decoratorsBeforeExport") === true) { + this.raise(Errors.DecoratorBeforeExport, this.state.startLoc); + } + return true; + } + } + if (this.isContextual(107)) { + this.raise(Errors.UsingDeclarationExport, this.state.startLoc); + return true; + } + if (this.isContextual(96) && this.startsAwaitUsing()) { + this.raise(Errors.UsingDeclarationExport, this.state.startLoc); + return true; + } + return type === 74 || type === 75 || type === 68 || type === 80 || this.isLet() || this.isAsyncFunction(); + } + checkExport(node, checkNames, isDefault, isFrom) { + if (checkNames) { + var _node$specifiers; + if (isDefault) { + this.checkDuplicateExports(node, "default"); + if (this.hasPlugin("exportDefaultFrom")) { + var _declaration$extra; + const declaration = node.declaration; + if (declaration.type === "Identifier" && declaration.name === "from" && declaration.end - declaration.start === 4 && !((_declaration$extra = declaration.extra) != null && _declaration$extra.parenthesized)) { + this.raise(Errors.ExportDefaultFromAsIdentifier, declaration); + } + } + } else if ((_node$specifiers = node.specifiers) != null && _node$specifiers.length) { + for (const specifier of node.specifiers) { + const { + exported + } = specifier; + const exportName = exported.type === "Identifier" ? exported.name : exported.value; + this.checkDuplicateExports(specifier, exportName); + if (!isFrom && specifier.local) { + const { + local + } = specifier; + if (local.type !== "Identifier") { + this.raise(Errors.ExportBindingIsString, specifier, { + localName: local.value, + exportName + }); + } else { + this.checkReservedWord(local.name, local.loc.start, true, false); + this.scope.checkLocalExport(local); + } + } + } + } else if (node.declaration) { + const decl = node.declaration; + if (decl.type === "FunctionDeclaration" || decl.type === "ClassDeclaration") { + const { + id + } = decl; + if (!id) throw new Error("Assertion failure"); + this.checkDuplicateExports(node, id.name); + } else if (decl.type === "VariableDeclaration") { + for (const declaration of decl.declarations) { + this.checkDeclaration(declaration.id); + } + } + } + } + } + checkDeclaration(node) { + if (node.type === "Identifier") { + this.checkDuplicateExports(node, node.name); + } else if (node.type === "ObjectPattern") { + for (const prop of node.properties) { + this.checkDeclaration(prop); + } + } else if (node.type === "ArrayPattern") { + for (const elem of node.elements) { + if (elem) { + this.checkDeclaration(elem); + } + } + } else if (node.type === "ObjectProperty") { + this.checkDeclaration(node.value); + } else if (node.type === "RestElement") { + this.checkDeclaration(node.argument); + } else if (node.type === "AssignmentPattern") { + this.checkDeclaration(node.left); + } + } + checkDuplicateExports(node, exportName) { + if (this.exportedIdentifiers.has(exportName)) { + if (exportName === "default") { + this.raise(Errors.DuplicateDefaultExport, node); + } else { + this.raise(Errors.DuplicateExport, node, { + exportName + }); + } + } + this.exportedIdentifiers.add(exportName); + } + parseExportSpecifiers(isInTypeExport) { + const nodes = []; + let first = true; + this.expect(5); + while (!this.eat(8)) { + if (first) { + first = false; + } else { + this.expect(12); + if (this.eat(8)) break; + } + const isMaybeTypeOnly = this.isContextual(130); + const isString = this.match(133); + const node = this.startNode(); + node.local = this.parseModuleExportName(); + nodes.push(this.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly)); + } + return nodes; + } + parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly) { + if (this.eatContextual(93)) { + node.exported = this.parseModuleExportName(); + } else if (isString) { + node.exported = cloneStringLiteral(node.local); + } else if (!node.exported) { + node.exported = cloneIdentifier(node.local); + } + return this.finishNode(node, "ExportSpecifier"); + } + parseModuleExportName() { + if (this.match(133)) { + const result = this.parseStringLiteral(this.state.value); + const surrogate = loneSurrogate.exec(result.value); + if (surrogate) { + this.raise(Errors.ModuleExportNameHasLoneSurrogate, result, { + surrogateCharCode: surrogate[0].charCodeAt(0) + }); + } + return result; + } + return this.parseIdentifier(true); + } + isJSONModuleImport(node) { + if (node.assertions != null) { + return node.assertions.some(({ + key, + value + }) => { + return value.value === "json" && (key.type === "Identifier" ? key.name === "type" : key.value === "type"); + }); + } + return false; + } + checkImportReflection(node) { + const { + specifiers + } = node; + const singleBindingType = specifiers.length === 1 ? specifiers[0].type : null; + if (node.phase === "source") { + if (singleBindingType !== "ImportDefaultSpecifier") { + this.raise(Errors.SourcePhaseImportRequiresDefault, specifiers[0].loc.start); + } + } else if (node.phase === "defer") { + if (singleBindingType !== "ImportNamespaceSpecifier") { + this.raise(Errors.DeferImportRequiresNamespace, specifiers[0].loc.start); + } + } else if (node.module) { + var _node$assertions; + if (singleBindingType !== "ImportDefaultSpecifier") { + this.raise(Errors.ImportReflectionNotBinding, specifiers[0].loc.start); + } + if (((_node$assertions = node.assertions) == null ? void 0 : _node$assertions.length) > 0) { + this.raise(Errors.ImportReflectionHasAssertion, specifiers[0].loc.start); + } + } + } + checkJSONModuleImport(node) { + if (this.isJSONModuleImport(node) && node.type !== "ExportAllDeclaration") { + const { + specifiers + } = node; + if (specifiers != null) { + const nonDefaultNamedSpecifier = specifiers.find(specifier => { + let imported; + if (specifier.type === "ExportSpecifier") { + imported = specifier.local; + } else if (specifier.type === "ImportSpecifier") { + imported = specifier.imported; + } + if (imported !== undefined) { + return imported.type === "Identifier" ? imported.name !== "default" : imported.value !== "default"; + } + }); + if (nonDefaultNamedSpecifier !== undefined) { + this.raise(Errors.ImportJSONBindingNotDefault, nonDefaultNamedSpecifier.loc.start); + } + } + } + } + isPotentialImportPhase(isExport) { + if (isExport) return false; + return this.isContextual(105) || this.isContextual(97) || this.isContextual(127); + } + applyImportPhase(node, isExport, phase, loc) { + if (isExport) { + return; + } + if (phase === "module") { + this.expectPlugin("importReflection", loc); + node.module = true; + } else if (this.hasPlugin("importReflection")) { + node.module = false; + } + if (phase === "source") { + this.expectPlugin("sourcePhaseImports", loc); + node.phase = "source"; + } else if (phase === "defer") { + this.expectPlugin("deferredImportEvaluation", loc); + node.phase = "defer"; + } else if (this.hasPlugin("sourcePhaseImports")) { + node.phase = null; + } + } + parseMaybeImportPhase(node, isExport) { + if (!this.isPotentialImportPhase(isExport)) { + this.applyImportPhase(node, isExport, null); + return null; + } + const phaseIdentifier = this.parseIdentifier(true); + const { + type + } = this.state; + const isImportPhase = tokenIsKeywordOrIdentifier(type) ? type !== 98 || this.lookaheadCharCode() === 102 : type !== 12; + if (isImportPhase) { + this.resetPreviousIdentifierLeadingComments(phaseIdentifier); + this.applyImportPhase(node, isExport, phaseIdentifier.name, phaseIdentifier.loc.start); + return null; + } else { + this.applyImportPhase(node, isExport, null); + return phaseIdentifier; + } + } + isPrecedingIdImportPhase(phase) { + const { + type + } = this.state; + return tokenIsIdentifier(type) ? type !== 98 || this.lookaheadCharCode() === 102 : type !== 12; + } + parseImport(node) { + if (this.match(133)) { + return this.parseImportSourceAndAttributes(node); + } + return this.parseImportSpecifiersAndAfter(node, this.parseMaybeImportPhase(node, false)); + } + parseImportSpecifiersAndAfter(node, maybeDefaultIdentifier) { + node.specifiers = []; + const hasDefault = this.maybeParseDefaultImportSpecifier(node, maybeDefaultIdentifier); + const parseNext = !hasDefault || this.eat(12); + const hasStar = parseNext && this.maybeParseStarImportSpecifier(node); + if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node); + this.expectContextual(98); + return this.parseImportSourceAndAttributes(node); + } + parseImportSourceAndAttributes(node) { + var _node$specifiers2; + (_node$specifiers2 = node.specifiers) != null ? _node$specifiers2 : node.specifiers = []; + node.source = this.parseImportSource(); + this.maybeParseImportAttributes(node); + this.checkImportReflection(node); + this.checkJSONModuleImport(node); + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); + } + parseImportSource() { + if (!this.match(133)) this.unexpected(); + return this.parseExprAtom(); + } + parseImportSpecifierLocal(node, specifier, type) { + specifier.local = this.parseIdentifier(); + node.specifiers.push(this.finishImportSpecifier(specifier, type)); + } + finishImportSpecifier(specifier, type, bindingType = 8201) { + this.checkLVal(specifier.local, { + type + }, bindingType); + return this.finishNode(specifier, type); + } + parseImportAttributes() { + this.expect(5); + const attrs = []; + const attrNames = new Set(); + do { + if (this.match(8)) { + break; + } + const node = this.startNode(); + const keyName = this.state.value; + if (attrNames.has(keyName)) { + this.raise(Errors.ModuleAttributesWithDuplicateKeys, this.state.startLoc, { + key: keyName + }); + } + attrNames.add(keyName); + if (this.match(133)) { + node.key = this.parseStringLiteral(keyName); + } else { + node.key = this.parseIdentifier(true); + } + this.expect(14); + if (!this.match(133)) { + throw this.raise(Errors.ModuleAttributeInvalidValue, this.state.startLoc); + } + node.value = this.parseStringLiteral(this.state.value); + attrs.push(this.finishNode(node, "ImportAttribute")); + } while (this.eat(12)); + this.expect(8); + return attrs; + } + parseModuleAttributes() { + const attrs = []; + const attributes = new Set(); + do { + const node = this.startNode(); + node.key = this.parseIdentifier(true); + if (node.key.name !== "type") { + this.raise(Errors.ModuleAttributeDifferentFromType, node.key); + } + if (attributes.has(node.key.name)) { + this.raise(Errors.ModuleAttributesWithDuplicateKeys, node.key, { + key: node.key.name + }); + } + attributes.add(node.key.name); + this.expect(14); + if (!this.match(133)) { + throw this.raise(Errors.ModuleAttributeInvalidValue, this.state.startLoc); + } + node.value = this.parseStringLiteral(this.state.value); + attrs.push(this.finishNode(node, "ImportAttribute")); + } while (this.eat(12)); + return attrs; + } + maybeParseImportAttributes(node) { + let attributes; + let useWith = false; + if (this.match(76)) { + if (this.hasPrecedingLineBreak() && this.lookaheadCharCode() === 40) { + return; + } + this.next(); + { + if (this.hasPlugin("moduleAttributes")) { + attributes = this.parseModuleAttributes(); + } else { + this.expectImportAttributesPlugin(); + attributes = this.parseImportAttributes(); + } + } + useWith = true; + } else if (this.isContextual(94) && !this.hasPrecedingLineBreak()) { + if (this.hasPlugin("importAttributes")) { + if (this.getPluginOption("importAttributes", "deprecatedAssertSyntax") !== true) { + this.raise(Errors.ImportAttributesUseAssert, this.state.startLoc); + } + this.addExtra(node, "deprecatedAssertSyntax", true); + } else { + this.expectOnePlugin(["importAttributes", "importAssertions"]); + } + this.next(); + attributes = this.parseImportAttributes(); + } else if (this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions")) { + attributes = []; + } else { + if (this.hasPlugin("moduleAttributes")) { + attributes = []; + } else return; + } + if (!useWith && this.hasPlugin("importAssertions")) { + node.assertions = attributes; + } else { + node.attributes = attributes; + } + } + maybeParseDefaultImportSpecifier(node, maybeDefaultIdentifier) { + if (maybeDefaultIdentifier) { + const specifier = this.startNodeAtNode(maybeDefaultIdentifier); + specifier.local = maybeDefaultIdentifier; + node.specifiers.push(this.finishImportSpecifier(specifier, "ImportDefaultSpecifier")); + return true; + } else if (tokenIsKeywordOrIdentifier(this.state.type)) { + this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier"); + return true; + } + return false; + } + maybeParseStarImportSpecifier(node) { + if (this.match(55)) { + const specifier = this.startNode(); + this.next(); + this.expectContextual(93); + this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier"); + return true; + } + return false; + } + parseNamedImportSpecifiers(node) { + let first = true; + this.expect(5); + while (!this.eat(8)) { + if (first) { + first = false; + } else { + if (this.eat(14)) { + throw this.raise(Errors.DestructureNamedImport, this.state.startLoc); + } + this.expect(12); + if (this.eat(8)) break; + } + const specifier = this.startNode(); + const importedIsString = this.match(133); + const isMaybeTypeOnly = this.isContextual(130); + specifier.imported = this.parseModuleExportName(); + const importSpecifier = this.parseImportSpecifier(specifier, importedIsString, node.importKind === "type" || node.importKind === "typeof", isMaybeTypeOnly, undefined); + node.specifiers.push(importSpecifier); + } + } + parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) { + if (this.eatContextual(93)) { + specifier.local = this.parseIdentifier(); + } else { + const { + imported + } = specifier; + if (importedIsString) { + throw this.raise(Errors.ImportBindingIsString, specifier, { + importName: imported.value + }); + } + this.checkReservedWord(imported.name, specifier.loc.start, true, true); + if (!specifier.local) { + specifier.local = cloneIdentifier(imported); + } + } + return this.finishImportSpecifier(specifier, "ImportSpecifier", bindingType); + } + isThisParam(param) { + return param.type === "Identifier" && param.name === "this"; + } + } + class Parser extends StatementParser { + constructor(options, input, pluginsMap) { + options = getOptions(options); + super(options, input); + this.options = options; + this.initializeScopes(); + this.plugins = pluginsMap; + this.filename = options.sourceFilename; + } + getScopeHandler() { + return ScopeHandler; + } + parse() { + this.enterInitialScopes(); + const file = this.startNode(); + const program = this.startNode(); + this.nextToken(); + file.errors = null; + this.parseTopLevel(file, program); + file.errors = this.state.errors; + file.comments.length = this.state.commentsLen; + return file; + } + } + function parse(input, options) { + var _options; + if (((_options = options) == null ? void 0 : _options.sourceType) === "unambiguous") { + options = Object.assign({}, options); + try { + options.sourceType = "module"; + const parser = getParser(options, input); + const ast = parser.parse(); + if (parser.sawUnambiguousESM) { + return ast; + } + if (parser.ambiguousScriptDifferentAst) { + try { + options.sourceType = "script"; + return getParser(options, input).parse(); + } catch (_unused) {} + } else { + ast.program.sourceType = "script"; + } + return ast; + } catch (moduleError) { + try { + options.sourceType = "script"; + return getParser(options, input).parse(); + } catch (_unused2) {} + throw moduleError; + } + } else { + return getParser(options, input).parse(); + } + } + function parseExpression(input, options) { + const parser = getParser(options, input); + if (parser.options.strictMode) { + parser.state.strict = true; + } + return parser.getExpression(); + } + function generateExportedTokenTypes(internalTokenTypes) { + const tokenTypes = {}; + for (const typeName of Object.keys(internalTokenTypes)) { + tokenTypes[typeName] = getExportedToken(internalTokenTypes[typeName]); + } + return tokenTypes; + } + const tokTypes = generateExportedTokenTypes(tt); + function getParser(options, input) { + let cls = Parser; + const pluginsMap = new Map(); + if (options != null && options.plugins) { + for (const plugin of options.plugins) { + let name, opts; + if (typeof plugin === "string") { + name = plugin; + } else { + [name, opts] = plugin; + } + if (!pluginsMap.has(name)) { + pluginsMap.set(name, opts || {}); + } + } + validatePlugins(pluginsMap); + cls = getParserClass(pluginsMap); + } + return new cls(options, input, pluginsMap); + } + const parserClassCache = new Map(); + function getParserClass(pluginsMap) { + const pluginList = []; + for (const name of mixinPluginNames) { + if (pluginsMap.has(name)) { + pluginList.push(name); + } + } + const key = pluginList.join("|"); + let cls = parserClassCache.get(key); + if (!cls) { + cls = Parser; + for (const plugin of pluginList) { + cls = mixinPlugins[plugin](cls); + } + parserClassCache.set(key, cls); + } + return cls; + } + lib.parse = parse; + lib.parseExpression = parseExpression; + lib.tokTypes = tokTypes; + + return lib; +} + +var libExports = /*@__PURE__*/ requireLib(); + +// @ts-check +/** @typedef { import('estree').BaseNode} BaseNode */ + +/** @typedef {{ + skip: () => void; + remove: () => void; + replace: (node: BaseNode) => void; +}} WalkerContext */ + +class WalkerBase { + constructor() { + /** @type {boolean} */ + this.should_skip = false; + + /** @type {boolean} */ + this.should_remove = false; + + /** @type {BaseNode | null} */ + this.replacement = null; + + /** @type {WalkerContext} */ + this.context = { + skip: () => (this.should_skip = true), + remove: () => (this.should_remove = true), + replace: (node) => (this.replacement = node) + }; + } + + /** + * + * @param {any} parent + * @param {string} prop + * @param {number} index + * @param {BaseNode} node + */ + replace(parent, prop, index, node) { + if (parent) { + if (index !== null) { + parent[prop][index] = node; + } else { + parent[prop] = node; + } + } + } + + /** + * + * @param {any} parent + * @param {string} prop + * @param {number} index + */ + remove(parent, prop, index) { + if (parent) { + if (index !== null) { + parent[prop].splice(index, 1); + } else { + delete parent[prop]; + } + } + } +} + +// @ts-check + +/** @typedef { import('estree').BaseNode} BaseNode */ +/** @typedef { import('./walker.js').WalkerContext} WalkerContext */ + +/** @typedef {( + * this: WalkerContext, + * node: BaseNode, + * parent: BaseNode, + * key: string, + * index: number + * ) => void} SyncHandler */ + +class SyncWalker extends WalkerBase { + /** + * + * @param {SyncHandler} enter + * @param {SyncHandler} leave + */ + constructor(enter, leave) { + super(); + + /** @type {SyncHandler} */ + this.enter = enter; + + /** @type {SyncHandler} */ + this.leave = leave; + } + + /** + * + * @param {BaseNode} node + * @param {BaseNode} parent + * @param {string} [prop] + * @param {number} [index] + * @returns {BaseNode} + */ + visit(node, parent, prop, index) { + if (node) { + if (this.enter) { + const _should_skip = this.should_skip; + const _should_remove = this.should_remove; + const _replacement = this.replacement; + this.should_skip = false; + this.should_remove = false; + this.replacement = null; + + this.enter.call(this.context, node, parent, prop, index); + + if (this.replacement) { + node = this.replacement; + this.replace(parent, prop, index, node); + } + + if (this.should_remove) { + this.remove(parent, prop, index); + } + + const skipped = this.should_skip; + const removed = this.should_remove; + + this.should_skip = _should_skip; + this.should_remove = _should_remove; + this.replacement = _replacement; + + if (skipped) return node; + if (removed) return null; + } + + for (const key in node) { + const value = node[key]; + + if (typeof value !== "object") { + continue; + } else if (Array.isArray(value)) { + for (let i = 0; i < value.length; i += 1) { + if (value[i] !== null && typeof value[i].type === 'string') { + if (!this.visit(value[i], node, key, i)) { + // removed + i--; + } + } + } + } else if (value !== null && typeof value.type === "string") { + this.visit(value, node, key, null); + } + } + + if (this.leave) { + const _replacement = this.replacement; + const _should_remove = this.should_remove; + this.replacement = null; + this.should_remove = false; + + this.leave.call(this.context, node, parent, prop, index); + + if (this.replacement) { + node = this.replacement; + this.replace(parent, prop, index, node); + } + + if (this.should_remove) { + this.remove(parent, prop, index); + } + + const removed = this.should_remove; + + this.replacement = _replacement; + this.should_remove = _should_remove; + + if (removed) return null; + } + } + + return node; + } +} + +// @ts-check + +/** @typedef { import('estree').BaseNode} BaseNode */ +/** @typedef { import('./sync.js').SyncHandler} SyncHandler */ +/** @typedef { import('./async.js').AsyncHandler} AsyncHandler */ + +/** + * + * @param {BaseNode} ast + * @param {{ + * enter?: SyncHandler + * leave?: SyncHandler + * }} walker + * @returns {BaseNode} + */ +function walk$2(ast, { enter, leave }) { + const instance = new SyncWalker(enter, leave); + return instance.visit(ast, null); +} + +function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { + const rootExp = root.type === "Program" ? root.body[0].type === "ExpressionStatement" && root.body[0].expression : root; + walk$2(root, { + enter(node, parent) { + parent && parentStack.push(parent); + if (parent && parent.type.startsWith("TS") && !TS_NODE_TYPES.includes(parent.type)) { + return this.skip(); + } + if (node.type === "Identifier") { + const isLocal = !!knownIds[node.name]; + const isRefed = isReferencedIdentifier(node, parent, parentStack); + if (includeAll || isRefed && !isLocal) { + onIdentifier(node, parent, parentStack, isRefed, isLocal); + } + } else if (node.type === "ObjectProperty" && // eslint-disable-next-line no-restricted-syntax + (parent == null ? void 0 : parent.type) === "ObjectPattern") { + node.inPattern = true; + } else if (isFunctionType(node)) { + if (node.scopeIds) { + node.scopeIds.forEach((id) => markKnownIds(id, knownIds)); + } else { + walkFunctionParams( + node, + (id) => markScopeIdentifier(node, id, knownIds) + ); + } + } else if (node.type === "BlockStatement") { + if (node.scopeIds) { + node.scopeIds.forEach((id) => markKnownIds(id, knownIds)); + } else { + walkBlockDeclarations( + node, + (id) => markScopeIdentifier(node, id, knownIds) + ); + } + } else if (node.type === "CatchClause" && node.param) { + for (const id of extractIdentifiers$1(node.param)) { + markScopeIdentifier(node, id, knownIds); + } + } else if (isForStatement(node)) { + walkForStatement( + node, + false, + (id) => markScopeIdentifier(node, id, knownIds) + ); + } + }, + leave(node, parent) { + parent && parentStack.pop(); + if (node !== rootExp && node.scopeIds) { + for (const id of node.scopeIds) { + knownIds[id]--; + if (knownIds[id] === 0) { + delete knownIds[id]; + } + } + } + } + }); +} +function isReferencedIdentifier(id, parent, parentStack) { + if (!parent) { + return true; + } + if (id.name === "arguments") { + return false; + } + if (isReferenced(id, parent)) { + return true; + } + switch (parent.type) { + case "AssignmentExpression": + case "AssignmentPattern": + return true; + case "ObjectPattern": + case "ArrayPattern": + return isInDestructureAssignment(parent, parentStack); + } + return false; +} +function isInDestructureAssignment(parent, parentStack) { + if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "AssignmentExpression") { + return true; + } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) { + break; + } + } + } + return false; +} +function isInNewExpression(parentStack) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "NewExpression") { + return true; + } else if (p.type !== "MemberExpression") { + break; + } + } + return false; +} +function walkFunctionParams(node, onIdent) { + for (const p of node.params) { + for (const id of extractIdentifiers$1(p)) { + onIdent(id); + } + } +} +function walkBlockDeclarations(block, onIdent) { + for (const stmt of block.body) { + if (stmt.type === "VariableDeclaration") { + if (stmt.declare) continue; + for (const decl of stmt.declarations) { + for (const id of extractIdentifiers$1(decl.id)) { + onIdent(id); + } + } + } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { + if (stmt.declare || !stmt.id) continue; + onIdent(stmt.id); + } else if (isForStatement(stmt)) { + walkForStatement(stmt, true, onIdent); + } + } +} +function isForStatement(stmt) { + return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement"; +} +function walkForStatement(stmt, isVar, onIdent) { + const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left; + if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) { + for (const decl of variable.declarations) { + for (const id of extractIdentifiers$1(decl.id)) { + onIdent(id); + } + } + } +} +function extractIdentifiers$1(param, nodes = []) { + switch (param.type) { + case "Identifier": + nodes.push(param); + break; + case "MemberExpression": + let object = param; + while (object.type === "MemberExpression") { + object = object.object; + } + nodes.push(object); + break; + case "ObjectPattern": + for (const prop of param.properties) { + if (prop.type === "RestElement") { + extractIdentifiers$1(prop.argument, nodes); + } else { + extractIdentifiers$1(prop.value, nodes); + } + } + break; + case "ArrayPattern": + param.elements.forEach((element) => { + if (element) extractIdentifiers$1(element, nodes); + }); + break; + case "RestElement": + extractIdentifiers$1(param.argument, nodes); + break; + case "AssignmentPattern": + extractIdentifiers$1(param.left, nodes); + break; + } + return nodes; +} +function markKnownIds(name, knownIds) { + if (name in knownIds) { + knownIds[name]++; + } else { + knownIds[name] = 1; + } +} +function markScopeIdentifier(node, child, knownIds) { + const { name } = child; + if (node.scopeIds && node.scopeIds.has(name)) { + return; + } + markKnownIds(name, knownIds); + (node.scopeIds || (node.scopeIds = /* @__PURE__ */ new Set())).add(name); +} +const isFunctionType = (node) => { + return /Function(?:Expression|Declaration)$|Method$/.test(node.type); +}; +const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed; +const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; +function isReferenced(node, parent, grandparent) { + switch (parent.type) { + // yes: PARENT[NODE] + // yes: NODE.child + // no: parent.NODE + case "MemberExpression": + case "OptionalMemberExpression": + if (parent.property === node) { + return !!parent.computed; + } + return parent.object === node; + case "JSXMemberExpression": + return parent.object === node; + // no: let NODE = init; + // yes: let id = NODE; + case "VariableDeclarator": + return parent.init === node; + // yes: () => NODE + // no: (NODE) => {} + case "ArrowFunctionExpression": + return parent.body === node; + // no: class { #NODE; } + // no: class { get #NODE() {} } + // no: class { #NODE() {} } + // no: class { fn() { return this.#NODE; } } + case "PrivateName": + return false; + // no: class { NODE() {} } + // yes: class { [NODE]() {} } + // no: class { foo(NODE) {} } + case "ClassMethod": + case "ClassPrivateMethod": + case "ObjectMethod": + if (parent.key === node) { + return !!parent.computed; + } + return false; + // yes: { [NODE]: "" } + // no: { NODE: "" } + // depends: { NODE } + // depends: { key: NODE } + case "ObjectProperty": + if (parent.key === node) { + return !!parent.computed; + } + return !grandparent; + // no: class { NODE = value; } + // yes: class { [NODE] = value; } + // yes: class { key = NODE; } + case "ClassProperty": + if (parent.key === node) { + return !!parent.computed; + } + return true; + case "ClassPrivateProperty": + return parent.key !== node; + // no: class NODE {} + // yes: class Foo extends NODE {} + case "ClassDeclaration": + case "ClassExpression": + return parent.superClass === node; + // yes: left = NODE; + // no: NODE = right; + case "AssignmentExpression": + return parent.right === node; + // no: [NODE = foo] = []; + // yes: [foo = NODE] = []; + case "AssignmentPattern": + return parent.right === node; + // no: NODE: for (;;) {} + case "LabeledStatement": + return false; + // no: try {} catch (NODE) {} + case "CatchClause": + return false; + // no: function foo(...NODE) {} + case "RestElement": + return false; + case "BreakStatement": + case "ContinueStatement": + return false; + // no: function NODE() {} + // no: function foo(NODE) {} + case "FunctionDeclaration": + case "FunctionExpression": + return false; + // no: export NODE from "foo"; + // no: export * as NODE from "foo"; + case "ExportNamespaceSpecifier": + case "ExportDefaultSpecifier": + return false; + // no: export { foo as NODE }; + // yes: export { NODE as foo }; + // no: export { NODE as foo } from "foo"; + case "ExportSpecifier": + return parent.local === node; + // no: import NODE from "foo"; + // no: import * as NODE from "foo"; + // no: import { NODE as foo } from "foo"; + // no: import { foo as NODE } from "foo"; + // no: import NODE from "bar"; + case "ImportDefaultSpecifier": + case "ImportNamespaceSpecifier": + case "ImportSpecifier": + return false; + // no: import "foo" assert { NODE: "json" } + case "ImportAttribute": + return false; + // no: <div NODE="foo" /> + case "JSXAttribute": + return false; + // no: [NODE] = []; + // no: ({ NODE }) = []; + case "ObjectPattern": + case "ArrayPattern": + return false; + // no: new.NODE + // no: NODE.target + case "MetaProperty": + return false; + // yes: type X = { someProperty: NODE } + // no: type X = { NODE: OtherType } + case "ObjectTypeProperty": + return parent.key !== node; + // yes: enum X { Foo = NODE } + // no: enum X { NODE } + case "TSEnumMember": + return parent.id !== node; + // yes: { [NODE]: value } + // no: { NODE: value } + case "TSPropertySignature": + if (parent.key === node) { + return !!parent.computed; + } + return true; + } + return true; +} +const TS_NODE_TYPES = [ + "TSAsExpression", + // foo as number + "TSTypeAssertion", + // (<number>foo) + "TSNonNullExpression", + // foo! + "TSInstantiationExpression", + // foo<string> + "TSSatisfiesExpression" + // foo satisfies T +]; +function unwrapTSNode(node) { + if (TS_NODE_TYPES.includes(node.type)) { + return unwrapTSNode(node.expression); + } else { + return node; + } +} + +const isStaticExp = (p) => p.type === 4 && p.isStatic; +function isCoreComponent(tag) { + switch (tag) { + case "Teleport": + case "teleport": + return TELEPORT; + case "Suspense": + case "suspense": + return SUSPENSE; + case "KeepAlive": + case "keep-alive": + return KEEP_ALIVE; + case "BaseTransition": + case "base-transition": + return BASE_TRANSITION; + } +} +const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/; +const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); +const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; +const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; +const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; +const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source; +const isMemberExpressionBrowser = (exp) => { + const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim()); + let state = 0 /* inMemberExp */; + let stateStack = []; + let currentOpenBracketCount = 0; + let currentOpenParensCount = 0; + let currentStringType = null; + for (let i = 0; i < path.length; i++) { + const char = path.charAt(i); + switch (state) { + case 0 /* inMemberExp */: + if (char === "[") { + stateStack.push(state); + state = 1 /* inBrackets */; + currentOpenBracketCount++; + } else if (char === "(") { + stateStack.push(state); + state = 2 /* inParens */; + currentOpenParensCount++; + } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { + return false; + } + break; + case 1 /* inBrackets */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `[`) { + currentOpenBracketCount++; + } else if (char === `]`) { + if (!--currentOpenBracketCount) { + state = stateStack.pop(); + } + } + break; + case 2 /* inParens */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `(`) { + currentOpenParensCount++; + } else if (char === `)`) { + if (i === path.length - 1) { + return false; + } + if (!--currentOpenParensCount) { + state = stateStack.pop(); + } + } + break; + case 3 /* inString */: + if (char === currentStringType) { + state = stateStack.pop(); + currentStringType = null; + } + break; + } + } + return !currentOpenBracketCount && !currentOpenParensCount; +}; +const isMemberExpressionNode = (exp, context) => { + try { + let ret = exp.ast || libExports.parseExpression(getExpSource(exp), { + plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"] + }); + ret = unwrapTSNode(ret); + return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier" && ret.name !== "undefined"; + } catch (e) { + return false; + } +}; +const isMemberExpression = isMemberExpressionNode; +const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; +const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp)); +const isFnExpressionNode = (exp, context) => { + try { + let ret = exp.ast || libExports.parseExpression(getExpSource(exp), { + plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"] + }); + if (ret.type === "Program") { + ret = ret.body[0]; + if (ret.type === "ExpressionStatement") { + ret = ret.expression; + } + } + ret = unwrapTSNode(ret); + return ret.type === "FunctionExpression" || ret.type === "ArrowFunctionExpression"; + } catch (e) { + return false; + } +}; +const isFnExpression = isFnExpressionNode; +function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { + return advancePositionWithMutation( + { + offset: pos.offset, + line: pos.line, + column: pos.column + }, + source, + numberOfCharacters + ); +} +function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { + let linesCount = 0; + let lastNewLinePos = -1; + for (let i = 0; i < numberOfCharacters; i++) { + if (source.charCodeAt(i) === 10) { + linesCount++; + lastNewLinePos = i; + } + } + pos.offset += numberOfCharacters; + pos.line += linesCount; + pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos; + return pos; +} +function assert(condition, msg) { + if (!condition) { + throw new Error(msg || `unexpected compiler condition`); + } +} +function findDir(node, name, allowEmpty = false) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (allowEmpty || p.exp) && (isString$1(name) ? p.name === name : name.test(p.name))) { + return p; + } + } +} +function findProp(node, name, dynamicOnly = false, allowEmpty = false) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (dynamicOnly) continue; + if (p.name === name && (p.value || allowEmpty)) { + return p; + } + } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { + return p; + } + } +} +function isStaticArgOf(arg, name) { + return !!(arg && isStaticExp(arg) && arg.content === name); +} +function hasDynamicKeyVBind(node) { + return node.props.some( + (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" + p.arg.type !== 4 || // v-bind:[_ctx.foo] + !p.arg.isStatic) + // v-bind:[foo] + ); +} +function isText$1(node) { + return node.type === 5 || node.type === 2; +} +function isVSlot(p) { + return p.type === 7 && p.name === "slot"; +} +function isTemplateNode(node) { + return node.type === 1 && node.tagType === 3; +} +function isSlotOutlet(node) { + return node.type === 1 && node.tagType === 2; +} +const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); +function getUnnormalizedProps(props, callPath = []) { + if (props && !isString$1(props) && props.type === 14) { + const callee = props.callee; + if (!isString$1(callee) && propsHelperSet.has(callee)) { + return getUnnormalizedProps( + props.arguments[0], + callPath.concat(props) + ); + } + } + return [props, callPath]; +} +function injectProp(node, prop, context) { + let propsWithInjection; + let props = node.type === 13 ? node.props : node.arguments[2]; + let callPath = []; + let parentCall; + if (props && !isString$1(props) && props.type === 14) { + const ret = getUnnormalizedProps(props); + props = ret[0]; + callPath = ret[1]; + parentCall = callPath[callPath.length - 1]; + } + if (props == null || isString$1(props)) { + propsWithInjection = createObjectExpression([prop]); + } else if (props.type === 14) { + const first = props.arguments[0]; + if (!isString$1(first) && first.type === 15) { + if (!hasProp(prop, first)) { + first.properties.unshift(prop); + } + } else { + if (props.callee === TO_HANDLERS) { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + } else { + props.arguments.unshift(createObjectExpression([prop])); + } + } + !propsWithInjection && (propsWithInjection = props); + } else if (props.type === 15) { + if (!hasProp(prop, props)) { + props.properties.unshift(prop); + } + propsWithInjection = props; + } else { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { + parentCall = callPath[callPath.length - 2]; + } + } + if (node.type === 13) { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.props = propsWithInjection; + } + } else { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.arguments[2] = propsWithInjection; + } + } +} +function hasProp(prop, props) { + let result = false; + if (prop.key.type === 4) { + const propKeyName = prop.key.content; + result = props.properties.some( + (p) => p.key.type === 4 && p.key.content === propKeyName + ); + } + return result; +} +function toValidAssetId(name, type) { + return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { + return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); + })}`; +} +function hasScopeRef(node, ids) { + if (!node || Object.keys(ids).length === 0) { + return false; + } + switch (node.type) { + case 1: + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { + return true; + } + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 11: + if (hasScopeRef(node.source, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 9: + return node.branches.some((b) => hasScopeRef(b, ids)); + case 10: + if (hasScopeRef(node.condition, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 4: + return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content]; + case 8: + return node.children.some((c) => isObject$2(c) && hasScopeRef(c, ids)); + case 5: + case 12: + return hasScopeRef(node.content, ids); + case 2: + case 3: + case 20: + return false; + default: + return false; + } +} +function getMemoedVNodeCall(node) { + if (node.type === 14 && node.callee === WITH_MEMO) { + return node.arguments[1].returns; + } else { + return node; + } +} +const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/; + +const defaultParserOptions = { + parseMode: "base", + ns: 0, + delimiters: [`{{`, `}}`], + getNamespace: () => 0, + isVoidTag: NO, + isPreTag: NO, + isIgnoreNewlineTag: NO, + isCustomElement: NO, + onError: defaultOnError, + onWarn: defaultOnWarn, + comments: true, + prefixIdentifiers: false +}; +let currentOptions = defaultParserOptions; +let currentRoot = null; +let currentInput = ""; +let currentOpenTag = null; +let currentProp = null; +let currentAttrValue = ""; +let currentAttrStartIndex = -1; +let currentAttrEndIndex = -1; +let inPre = 0; +let inVPre = false; +let currentVPreBoundary = null; +const stack = []; +const tokenizer = new Tokenizer(stack, { + onerr: emitError, + ontext(start, end) { + onText(getSlice(start, end), start, end); + }, + ontextentity(char, start, end) { + onText(char, start, end); + }, + oninterpolation(start, end) { + if (inVPre) { + return onText(getSlice(start, end), start, end); + } + let innerStart = start + tokenizer.delimiterOpen.length; + let innerEnd = end - tokenizer.delimiterClose.length; + while (isWhitespace(currentInput.charCodeAt(innerStart))) { + innerStart++; + } + while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { + innerEnd--; + } + let exp = getSlice(innerStart, innerEnd); + if (exp.includes("&")) { + { + exp = decodeHTML(exp); + } + } + addNode({ + type: 5, + content: createExp(exp, false, getLoc(innerStart, innerEnd)), + loc: getLoc(start, end) + }); + }, + onopentagname(start, end) { + const name = getSlice(start, end); + currentOpenTag = { + type: 1, + tag: name, + ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), + tagType: 0, + // will be refined on tag close + props: [], + children: [], + loc: getLoc(start - 1, end), + codegenNode: void 0 + }; + }, + onopentagend(end) { + endOpenTag(end); + }, + onclosetag(start, end) { + const name = getSlice(start, end); + if (!currentOptions.isVoidTag(name)) { + let found = false; + for (let i = 0; i < stack.length; i++) { + const e = stack[i]; + if (e.tag.toLowerCase() === name.toLowerCase()) { + found = true; + if (i > 0) { + emitError(24, stack[0].loc.start.offset); + } + for (let j = 0; j <= i; j++) { + const el = stack.shift(); + onCloseTag(el, end, j < i); + } + break; + } + } + if (!found) { + emitError(23, backTrack(start, 60)); + } + } + }, + onselfclosingtag(end) { + const name = currentOpenTag.tag; + currentOpenTag.isSelfClosing = true; + endOpenTag(end); + if (stack[0] && stack[0].tag === name) { + onCloseTag(stack.shift(), end); + } + }, + onattribname(start, end) { + currentProp = { + type: 6, + name: getSlice(start, end), + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + }, + ondirname(start, end) { + const raw = getSlice(start, end); + const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); + if (!inVPre && name === "") { + emitError(26, start); + } + if (inVPre || name === "") { + currentProp = { + type: 6, + name: raw, + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + } else { + currentProp = { + type: 7, + name, + rawName: raw, + exp: void 0, + arg: void 0, + modifiers: raw === "." ? [createSimpleExpression("prop")] : [], + loc: getLoc(start) + }; + if (name === "pre") { + inVPre = tokenizer.inVPre = true; + currentVPreBoundary = currentOpenTag; + const props = currentOpenTag.props; + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7) { + props[i] = dirToAttr(props[i]); + } + } + } + } + }, + ondirarg(start, end) { + if (start === end) return; + const arg = getSlice(start, end); + if (inVPre) { + currentProp.name += arg; + setLocEnd(currentProp.nameLoc, end); + } else { + const isStatic = arg[0] !== `[`; + currentProp.arg = createExp( + isStatic ? arg : arg.slice(1, -1), + isStatic, + getLoc(start, end), + isStatic ? 3 : 0 + ); + } + }, + ondirmodifier(start, end) { + const mod = getSlice(start, end); + if (inVPre) { + currentProp.name += "." + mod; + setLocEnd(currentProp.nameLoc, end); + } else if (currentProp.name === "slot") { + const arg = currentProp.arg; + if (arg) { + arg.content += "." + mod; + setLocEnd(arg.loc, end); + } + } else { + const exp = createSimpleExpression(mod, true, getLoc(start, end)); + currentProp.modifiers.push(exp); + } + }, + onattribdata(start, end) { + currentAttrValue += getSlice(start, end); + if (currentAttrStartIndex < 0) currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribentity(char, start, end) { + currentAttrValue += char; + if (currentAttrStartIndex < 0) currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribnameend(end) { + const start = currentProp.loc.start.offset; + const name = getSlice(start, end); + if (currentProp.type === 7) { + currentProp.rawName = name; + } + if (currentOpenTag.props.some( + (p) => (p.type === 7 ? p.rawName : p.name) === name + )) { + emitError(2, start); + } + }, + onattribend(quote, end) { + if (currentOpenTag && currentProp) { + setLocEnd(currentProp.loc, end); + if (quote !== 0) { + if (currentProp.type === 6) { + if (currentProp.name === "class") { + currentAttrValue = condense(currentAttrValue).trim(); + } + if (quote === 1 && !currentAttrValue) { + emitError(13, end); + } + currentProp.value = { + type: 2, + content: currentAttrValue, + loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) + }; + if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { + tokenizer.enterRCDATA(toCharCodes(`</template`), 0); + } + } else { + let expParseMode = 0 /* Normal */; + { + if (currentProp.name === "for") { + expParseMode = 3 /* Skip */; + } else if (currentProp.name === "slot") { + expParseMode = 1 /* Params */; + } else if (currentProp.name === "on" && currentAttrValue.includes(";")) { + expParseMode = 2 /* Statements */; + } + } + currentProp.exp = createExp( + currentAttrValue, + false, + getLoc(currentAttrStartIndex, currentAttrEndIndex), + 0, + expParseMode + ); + if (currentProp.name === "for") { + currentProp.forParseResult = parseForExpression(currentProp.exp); + } + } + } + if (currentProp.type !== 7 || currentProp.name !== "pre") { + currentOpenTag.props.push(currentProp); + } + } + currentAttrValue = ""; + currentAttrStartIndex = currentAttrEndIndex = -1; + }, + oncomment(start, end) { + if (currentOptions.comments) { + addNode({ + type: 3, + content: getSlice(start, end), + loc: getLoc(start - 4, end + 3) + }); + } + }, + onend() { + const end = currentInput.length; + if (tokenizer.state !== 1) { + switch (tokenizer.state) { + case 5: + case 8: + emitError(5, end); + break; + case 3: + case 4: + emitError( + 25, + tokenizer.sectionStart + ); + break; + case 28: + if (tokenizer.currentSequence === Sequences.CdataEnd) { + emitError(6, end); + } else { + emitError(7, end); + } + break; + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + // " + case 20: + // ' + case 21: + emitError(9, end); + break; + } + } + for (let index = 0; index < stack.length; index++) { + onCloseTag(stack[index], end - 1); + emitError(24, stack[index].loc.start.offset); + } + }, + oncdata(start, end) { + if (stack[0].ns !== 0) { + onText(getSlice(start, end), start, end); + } else { + emitError(1, start - 9); + } + }, + onprocessinginstruction(start) { + if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + emitError( + 21, + start - 1 + ); + } + } +}); +const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; +const stripParensRE = /^\(|\)$/g; +function parseForExpression(input) { + const loc = input.loc; + const exp = input.content; + const inMatch = exp.match(forAliasRE); + if (!inMatch) return; + const [, LHS, RHS] = inMatch; + const createAliasExpression = (content, offset, asParam = false) => { + const start = loc.start.offset + offset; + const end = start + content.length; + return createExp( + content, + false, + getLoc(start, end), + 0, + asParam ? 1 /* Params */ : 0 /* Normal */ + ); + }; + const result = { + source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), + value: void 0, + key: void 0, + index: void 0, + finalized: false + }; + let valueContent = LHS.trim().replace(stripParensRE, "").trim(); + const trimmedOffset = LHS.indexOf(valueContent); + const iteratorMatch = valueContent.match(forIteratorRE); + if (iteratorMatch) { + valueContent = valueContent.replace(forIteratorRE, "").trim(); + const keyContent = iteratorMatch[1].trim(); + let keyOffset; + if (keyContent) { + keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); + result.key = createAliasExpression(keyContent, keyOffset, true); + } + if (iteratorMatch[2]) { + const indexContent = iteratorMatch[2].trim(); + if (indexContent) { + result.index = createAliasExpression( + indexContent, + exp.indexOf( + indexContent, + result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length + ), + true + ); + } + } + } + if (valueContent) { + result.value = createAliasExpression(valueContent, trimmedOffset, true); + } + return result; +} +function getSlice(start, end) { + return currentInput.slice(start, end); +} +function endOpenTag(end) { + if (tokenizer.inSFCRoot) { + currentOpenTag.innerLoc = getLoc(end + 1, end + 1); + } + addNode(currentOpenTag); + const { tag, ns } = currentOpenTag; + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre++; + } + if (currentOptions.isVoidTag(tag)) { + onCloseTag(currentOpenTag, end); + } else { + stack.unshift(currentOpenTag); + if (ns === 1 || ns === 2) { + tokenizer.inXML = true; + } + } + currentOpenTag = null; +} +function onText(content, start, end) { + const parent = stack[0] || currentRoot; + const lastNode = parent.children[parent.children.length - 1]; + if (lastNode && lastNode.type === 2) { + lastNode.content += content; + setLocEnd(lastNode.loc, end); + } else { + parent.children.push({ + type: 2, + content, + loc: getLoc(start, end) + }); + } +} +function onCloseTag(el, end, isImplied = false) { + if (isImplied) { + setLocEnd(el.loc, backTrack(end, 60)); + } else { + setLocEnd(el.loc, lookAhead(end, 62) + 1); + } + if (tokenizer.inSFCRoot) { + if (el.children.length) { + el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end); + } else { + el.innerLoc.end = extend({}, el.innerLoc.start); + } + el.innerLoc.source = getSlice( + el.innerLoc.start.offset, + el.innerLoc.end.offset + ); + } + const { tag, ns, children } = el; + if (!inVPre) { + if (tag === "slot") { + el.tagType = 2; + } else if (isFragmentTemplate(el)) { + el.tagType = 3; + } else if (isComponent(el)) { + el.tagType = 1; + } + } + if (!tokenizer.inRCDATA) { + el.children = condenseWhitespace(children); + } + if (ns === 0 && currentOptions.isIgnoreNewlineTag(tag)) { + const first = children[0]; + if (first && first.type === 2) { + first.content = first.content.replace(/^\r?\n/, ""); + } + } + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre--; + } + if (currentVPreBoundary === el) { + inVPre = tokenizer.inVPre = false; + currentVPreBoundary = null; + } + if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + tokenizer.inXML = false; + } +} +function lookAhead(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1) i++; + return i; +} +function backTrack(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i >= 0) i--; + return i; +} +const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); +function isFragmentTemplate({ tag, props }) { + if (tag === "template") { + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { + return true; + } + } + } + return false; +} +function isComponent({ tag, props }) { + if (currentOptions.isCustomElement(tag)) { + return false; + } + if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { + return true; + } + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 6) { + if (p.name === "is" && p.value) { + if (p.value.content.startsWith("vue:")) { + return true; + } + } + } + } + return false; +} +function isUpperCase(c) { + return c > 64 && c < 91; +} +const windowsNewlineRE = /\r\n/g; +function condenseWhitespace(nodes, tag) { + const shouldCondense = currentOptions.whitespace !== "preserve"; + let removedWhitespace = false; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (node.type === 2) { + if (!inPre) { + if (isAllWhitespace(node.content)) { + const prev = nodes[i - 1] && nodes[i - 1].type; + const next = nodes[i + 1] && nodes[i + 1].type; + if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { + removedWhitespace = true; + nodes[i] = null; + } else { + node.content = " "; + } + } else if (shouldCondense) { + node.content = condense(node.content); + } + } else { + node.content = node.content.replace(windowsNewlineRE, "\n"); + } + } + } + return removedWhitespace ? nodes.filter(Boolean) : nodes; +} +function isAllWhitespace(str) { + for (let i = 0; i < str.length; i++) { + if (!isWhitespace(str.charCodeAt(i))) { + return false; + } + } + return true; +} +function hasNewlineChar(str) { + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + if (c === 10 || c === 13) { + return true; + } + } + return false; +} +function condense(str) { + let ret = ""; + let prevCharIsWhitespace = false; + for (let i = 0; i < str.length; i++) { + if (isWhitespace(str.charCodeAt(i))) { + if (!prevCharIsWhitespace) { + ret += " "; + prevCharIsWhitespace = true; + } + } else { + ret += str[i]; + prevCharIsWhitespace = false; + } + } + return ret; +} +function addNode(node) { + (stack[0] || currentRoot).children.push(node); +} +function getLoc(start, end) { + return { + start: tokenizer.getPos(start), + // @ts-expect-error allow late attachment + end: end == null ? end : tokenizer.getPos(end), + // @ts-expect-error allow late attachment + source: end == null ? end : getSlice(start, end) + }; +} +function cloneLoc(loc) { + return getLoc(loc.start.offset, loc.end.offset); +} +function setLocEnd(loc, end) { + loc.end = tokenizer.getPos(end); + loc.source = getSlice(loc.start.offset, end); +} +function dirToAttr(dir) { + const attr = { + type: 6, + name: dir.rawName, + nameLoc: getLoc( + dir.loc.start.offset, + dir.loc.start.offset + dir.rawName.length + ), + value: void 0, + loc: dir.loc + }; + if (dir.exp) { + const loc = dir.exp.loc; + if (loc.end.offset < dir.loc.end.offset) { + loc.start.offset--; + loc.start.column--; + loc.end.offset++; + loc.end.column++; + } + attr.value = { + type: 2, + content: dir.exp.content, + loc + }; + } + return attr; +} +function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { + const exp = createSimpleExpression(content, isStatic, loc, constType); + if (!isStatic && currentOptions.prefixIdentifiers && parseMode !== 3 /* Skip */ && content.trim()) { + if (isSimpleIdentifier(content)) { + exp.ast = null; + return exp; + } + try { + const plugins = currentOptions.expressionPlugins; + const options = { + plugins: plugins ? [...plugins, "typescript"] : ["typescript"] + }; + if (parseMode === 2 /* Statements */) { + exp.ast = libExports.parse(` ${content} `, options).program; + } else if (parseMode === 1 /* Params */) { + exp.ast = libExports.parseExpression(`(${content})=>{}`, options); + } else { + exp.ast = libExports.parseExpression(`(${content})`, options); + } + } catch (e) { + exp.ast = false; + emitError(45, loc.start.offset, e.message); + } + } + return exp; +} +function emitError(code, index, message) { + currentOptions.onError( + createCompilerError(code, getLoc(index, index), void 0, message) + ); +} +function reset() { + tokenizer.reset(); + currentOpenTag = null; + currentProp = null; + currentAttrValue = ""; + currentAttrStartIndex = -1; + currentAttrEndIndex = -1; + stack.length = 0; +} +function baseParse(input, options) { + reset(); + currentInput = input; + currentOptions = extend({}, defaultParserOptions); + if (options) { + let key; + for (key in options) { + if (options[key] != null) { + currentOptions[key] = options[key]; + } + } + } + { + if (currentOptions.decodeEntities) { + console.warn( + `[@vue/compiler-core] decodeEntities option is passed but will be ignored in non-browser builds.` + ); + } + } + tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; + tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; + const delimiters = options && options.delimiters; + if (delimiters) { + tokenizer.delimiterOpen = toCharCodes(delimiters[0]); + tokenizer.delimiterClose = toCharCodes(delimiters[1]); + } + const root = currentRoot = createRoot([], input); + tokenizer.parse(currentInput); + root.loc = getLoc(0, input.length); + root.children = condenseWhitespace(root.children); + currentRoot = null; + return root; +} + +function cacheStatic(root, context) { + walk$1( + root, + void 0, + context, + // Root node is unfortunately non-hoistable due to potential parent + // fallthrough attributes. + isSingleElementRoot(root, root.children[0]) + ); +} +function isSingleElementRoot(root, child) { + const { children } = root; + return children.length === 1 && child.type === 1 && !isSlotOutlet(child); +} +function walk$1(node, parent, context, doNotHoistNode = false, inFor = false) { + const { children } = node; + const toCache = []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.type === 1 && child.tagType === 0) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType > 0) { + if (constantType >= 2) { + child.codegenNode.patchFlag = -1; + toCache.push(child); + continue; + } + } else { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + const flag = codegenNode.patchFlag; + if ((flag === void 0 || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { + const props = getNodeProps(child); + if (props) { + codegenNode.props = context.hoist(props); + } + } + if (codegenNode.dynamicProps) { + codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); + } + } + } + } else if (child.type === 12) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType >= 2) { + toCache.push(child); + continue; + } + } + if (child.type === 1) { + const isComponent = child.tagType === 1; + if (isComponent) { + context.scopes.vSlot++; + } + walk$1(child, node, context, false, inFor); + if (isComponent) { + context.scopes.vSlot--; + } + } else if (child.type === 11) { + walk$1(child, node, context, child.children.length === 1, true); + } else if (child.type === 9) { + for (let i2 = 0; i2 < child.branches.length; i2++) { + walk$1( + child.branches[i2], + node, + context, + child.branches[i2].children.length === 1, + inFor + ); + } + } + } + let cachedAsArray = false; + if (toCache.length === children.length && node.type === 1) { + if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray$3(node.codegenNode.children)) { + node.codegenNode.children = getCacheExpression( + createArrayExpression(node.codegenNode.children) + ); + cachedAsArray = true; + } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray$3(node.codegenNode.children) && node.codegenNode.children.type === 15) { + const slot = getSlotNode(node.codegenNode, "default"); + if (slot) { + slot.returns = getCacheExpression( + createArrayExpression(slot.returns) + ); + cachedAsArray = true; + } + } else if (node.tagType === 3 && parent && parent.type === 1 && parent.tagType === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !isArray$3(parent.codegenNode.children) && parent.codegenNode.children.type === 15) { + const slotName = findDir(node, "slot", true); + const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg); + if (slot) { + slot.returns = getCacheExpression( + createArrayExpression(slot.returns) + ); + cachedAsArray = true; + } + } + } + if (!cachedAsArray) { + for (const child of toCache) { + child.codegenNode = context.cache(child.codegenNode); + } + } + function getCacheExpression(value) { + const exp = context.cache(value); + if (inFor && context.hmr) { + exp.needArraySpread = true; + } + return exp; + } + function getSlotNode(node2, name) { + if (node2.children && !isArray$3(node2.children) && node2.children.type === 15) { + const slot = node2.children.properties.find( + (p) => p.key === name || p.key.content === name + ); + return slot && slot.value; + } + } + if (toCache.length && context.transformHoist) { + context.transformHoist(children, context, node); + } +} +function getConstantType(node, context) { + const { constantCache } = context; + switch (node.type) { + case 1: + if (node.tagType !== 0) { + return 0; + } + const cached = constantCache.get(node); + if (cached !== void 0) { + return cached; + } + const codegenNode = node.codegenNode; + if (codegenNode.type !== 13) { + return 0; + } + if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject" && node.tag !== "math") { + return 0; + } + if (codegenNode.patchFlag === void 0) { + let returnType2 = 3; + const generatedPropsType = getGeneratedPropsConstantType(node, context); + if (generatedPropsType === 0) { + constantCache.set(node, 0); + return 0; + } + if (generatedPropsType < returnType2) { + returnType2 = generatedPropsType; + } + for (let i = 0; i < node.children.length; i++) { + const childType = getConstantType(node.children[i], context); + if (childType === 0) { + constantCache.set(node, 0); + return 0; + } + if (childType < returnType2) { + returnType2 = childType; + } + } + if (returnType2 > 1) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && p.name === "bind" && p.exp) { + const expType = getConstantType(p.exp, context); + if (expType === 0) { + constantCache.set(node, 0); + return 0; + } + if (expType < returnType2) { + returnType2 = expType; + } + } + } + } + if (codegenNode.isBlock) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7) { + constantCache.set(node, 0); + return 0; + } + } + context.removeHelper(OPEN_BLOCK); + context.removeHelper( + getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) + ); + codegenNode.isBlock = false; + context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); + } + constantCache.set(node, returnType2); + return returnType2; + } else { + constantCache.set(node, 0); + return 0; + } + case 2: + case 3: + return 3; + case 9: + case 11: + case 10: + return 0; + case 5: + case 12: + return getConstantType(node.content, context); + case 4: + return node.constType; + case 8: + let returnType = 3; + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString$1(child) || isSymbol$1(child)) { + continue; + } + const childType = getConstantType(child, context); + if (childType === 0) { + return 0; + } else if (childType < returnType) { + returnType = childType; + } + } + return returnType; + case 20: + return 2; + default: + return 0; + } +} +const allowHoistedHelperSet = /* @__PURE__ */ new Set([ + NORMALIZE_CLASS, + NORMALIZE_STYLE, + NORMALIZE_PROPS, + GUARD_REACTIVE_PROPS +]); +function getConstantTypeOfHelperCall(value, context) { + if (value.type === 14 && !isString$1(value.callee) && allowHoistedHelperSet.has(value.callee)) { + const arg = value.arguments[0]; + if (arg.type === 4) { + return getConstantType(arg, context); + } else if (arg.type === 14) { + return getConstantTypeOfHelperCall(arg, context); + } + } + return 0; +} +function getGeneratedPropsConstantType(node, context) { + let returnType = 3; + const props = getNodeProps(node); + if (props && props.type === 15) { + const { properties } = props; + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + const keyType = getConstantType(key, context); + if (keyType === 0) { + return keyType; + } + if (keyType < returnType) { + returnType = keyType; + } + let valueType; + if (value.type === 4) { + valueType = getConstantType(value, context); + } else if (value.type === 14) { + valueType = getConstantTypeOfHelperCall(value, context); + } else { + valueType = 0; + } + if (valueType === 0) { + return valueType; + } + if (valueType < returnType) { + returnType = valueType; + } + } + } + return returnType; +} +function getNodeProps(node) { + const codegenNode = node.codegenNode; + if (codegenNode.type === 13) { + return codegenNode.props; + } +} + +function createTransformContext(root, { + filename = "", + prefixIdentifiers = false, + hoistStatic = false, + hmr = false, + cacheHandlers = false, + nodeTransforms = [], + directiveTransforms = {}, + transformHoist = null, + isBuiltInComponent = NOOP, + isCustomElement = NOOP, + expressionPlugins = [], + scopeId = null, + slotted = true, + ssr = false, + inSSR = false, + ssrCssVars = ``, + bindingMetadata = EMPTY_OBJ, + inline = false, + isTS = false, + onError = defaultOnError, + onWarn = defaultOnWarn, + compatConfig +}) { + const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); + const context = { + // options + filename, + selfName: nameMatch && capitalize(camelize(nameMatch[1])), + prefixIdentifiers, + hoistStatic, + hmr, + cacheHandlers, + nodeTransforms, + directiveTransforms, + transformHoist, + isBuiltInComponent, + isCustomElement, + expressionPlugins, + scopeId, + slotted, + ssr, + inSSR, + ssrCssVars, + bindingMetadata, + inline, + isTS, + onError, + onWarn, + compatConfig, + // state + root, + helpers: /* @__PURE__ */ new Map(), + components: /* @__PURE__ */ new Set(), + directives: /* @__PURE__ */ new Set(), + hoists: [], + imports: [], + cached: [], + constantCache: /* @__PURE__ */ new WeakMap(), + temps: 0, + identifiers: /* @__PURE__ */ Object.create(null), + scopes: { + vFor: 0, + vSlot: 0, + vPre: 0, + vOnce: 0 + }, + parent: null, + grandParent: null, + currentNode: root, + childIndex: 0, + inVOnce: false, + // methods + helper(name) { + const count = context.helpers.get(name) || 0; + context.helpers.set(name, count + 1); + return name; + }, + removeHelper(name) { + const count = context.helpers.get(name); + if (count) { + const currentCount = count - 1; + if (!currentCount) { + context.helpers.delete(name); + } else { + context.helpers.set(name, currentCount); + } + } + }, + helperString(name) { + return `_${helperNameMap[context.helper(name)]}`; + }, + replaceNode(node) { + { + if (!context.currentNode) { + throw new Error(`Node being replaced is already removed.`); + } + if (!context.parent) { + throw new Error(`Cannot replace root node.`); + } + } + context.parent.children[context.childIndex] = context.currentNode = node; + }, + removeNode(node) { + if (!context.parent) { + throw new Error(`Cannot remove root node.`); + } + const list = context.parent.children; + const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; + if (removalIndex < 0) { + throw new Error(`node being removed is not a child of current parent`); + } + if (!node || node === context.currentNode) { + context.currentNode = null; + context.onNodeRemoved(); + } else { + if (context.childIndex > removalIndex) { + context.childIndex--; + context.onNodeRemoved(); + } + } + context.parent.children.splice(removalIndex, 1); + }, + onNodeRemoved: NOOP, + addIdentifiers(exp) { + { + if (isString$1(exp)) { + addId(exp); + } else if (exp.identifiers) { + exp.identifiers.forEach(addId); + } else if (exp.type === 4) { + addId(exp.content); + } + } + }, + removeIdentifiers(exp) { + { + if (isString$1(exp)) { + removeId(exp); + } else if (exp.identifiers) { + exp.identifiers.forEach(removeId); + } else if (exp.type === 4) { + removeId(exp.content); + } + } + }, + hoist(exp) { + if (isString$1(exp)) exp = createSimpleExpression(exp); + context.hoists.push(exp); + const identifier = createSimpleExpression( + `_hoisted_${context.hoists.length}`, + false, + exp.loc, + 2 + ); + identifier.hoisted = exp; + return identifier; + }, + cache(exp, isVNode = false, inVOnce = false) { + const cacheExp = createCacheExpression( + context.cached.length, + exp, + isVNode, + inVOnce + ); + context.cached.push(cacheExp); + return cacheExp; + } + }; + function addId(id) { + const { identifiers } = context; + if (identifiers[id] === void 0) { + identifiers[id] = 0; + } + identifiers[id]++; + } + function removeId(id) { + context.identifiers[id]--; + } + return context; +} +function transform(root, options) { + const context = createTransformContext(root, options); + traverseNode(root, context); + if (options.hoistStatic) { + cacheStatic(root, context); + } + if (!options.ssr) { + createRootCodegen(root, context); + } + root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); + root.components = [...context.components]; + root.directives = [...context.directives]; + root.imports = context.imports; + root.hoists = context.hoists; + root.temps = context.temps; + root.cached = context.cached; + root.transformed = true; +} +function createRootCodegen(root, context) { + const { helper } = context; + const { children } = root; + if (children.length === 1) { + const child = children[0]; + if (isSingleElementRoot(root, child) && child.codegenNode) { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + convertToBlock(codegenNode, context); + } + root.codegenNode = codegenNode; + } else { + root.codegenNode = child; + } + } else if (children.length > 1) { + let patchFlag = 64; + if (children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + } + root.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + root.children, + patchFlag, + void 0, + void 0, + true, + void 0, + false + ); + } else ; +} +function traverseChildren(parent, context) { + let i = 0; + const nodeRemoved = () => { + i--; + }; + for (; i < parent.children.length; i++) { + const child = parent.children[i]; + if (isString$1(child)) continue; + context.grandParent = context.parent; + context.parent = parent; + context.childIndex = i; + context.onNodeRemoved = nodeRemoved; + traverseNode(child, context); + } +} +function traverseNode(node, context) { + context.currentNode = node; + const { nodeTransforms } = context; + const exitFns = []; + for (let i2 = 0; i2 < nodeTransforms.length; i2++) { + const onExit = nodeTransforms[i2](node, context); + if (onExit) { + if (isArray$3(onExit)) { + exitFns.push(...onExit); + } else { + exitFns.push(onExit); + } + } + if (!context.currentNode) { + return; + } else { + node = context.currentNode; + } + } + switch (node.type) { + case 3: + if (!context.ssr) { + context.helper(CREATE_COMMENT); + } + break; + case 5: + if (!context.ssr) { + context.helper(TO_DISPLAY_STRING); + } + break; + // for container types, further traverse downwards + case 9: + for (let i2 = 0; i2 < node.branches.length; i2++) { + traverseNode(node.branches[i2], context); + } + break; + case 10: + case 11: + case 1: + case 0: + traverseChildren(node, context); + break; + } + context.currentNode = node; + let i = exitFns.length; + while (i--) { + exitFns[i](); + } +} +function createStructuralDirectiveTransform(name, fn) { + const matches = isString$1(name) ? (n) => n === name : (n) => name.test(n); + return (node, context) => { + if (node.type === 1) { + const { props } = node; + if (node.tagType === 3 && props.some(isVSlot)) { + return; + } + const exitFns = []; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 7 && matches(prop.name)) { + props.splice(i, 1); + i--; + const onExit = fn(node, prop, context); + if (onExit) exitFns.push(onExit); + } + } + return exitFns; + } + }; +} + +var sourceMap$2 = {}; + +var sourceMapGenerator$2 = {}; + +var base64Vlq$2 = {}; + +var base64$2 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredBase64$2; + +function requireBase64$2 () { + if (hasRequiredBase64$2) return base64$2; + hasRequiredBase64$2 = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + base64$2.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + base64$2.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; + return base64$2; +} + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredBase64Vlq$2; + +function requireBase64Vlq$2 () { + if (hasRequiredBase64Vlq$2) return base64Vlq$2; + hasRequiredBase64Vlq$2 = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + var base64 = /*@__PURE__*/ requireBase64$2(); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + base64Vlq$2.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + base64Vlq$2.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + return base64Vlq$2; +} + +var util$3 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredUtil$3; + +function requireUtil$3 () { + if (hasRequiredUtil$3) return util$3; + hasRequiredUtil$3 = 1; + (function (exports) { + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port; + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + var MAX_CACHED_INPUTS = 32; + + /** + * Takes some function `f(input) -> result` and returns a memoized version of + * `f`. + * + * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The + * memoization is a dumb-simple, linear least-recently-used cache. + */ + function lruMemoize(f) { + var cache = []; + + return function(input) { + for (var i = 0; i < cache.length; i++) { + if (cache[i].input === input) { + var temp = cache[0]; + cache[0] = cache[i]; + cache[i] = temp; + return cache[0].result; + } + } + + var result = f(input); + + cache.unshift({ + input, + result, + }); + + if (cache.length > MAX_CACHED_INPUTS) { + cache.pop(); + } + + return result; + }; + } + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '<dir>/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + var normalize = lruMemoize(function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + // Split the path into parts between `/` characters. This is much faster than + // using `.split(/\/+/g)`. + var parts = []; + var start = 0; + var i = 0; + while (true) { + start = i; + i = path.indexOf("/", start); + if (i === -1) { + parts.push(path.slice(start)); + break; + } else { + parts.push(path.slice(start, i)); + while (i < path.length && path[i] === "/") { + i++; + } + } + } + + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + }); + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); + }()); + + function identity (s) { + return s; + } + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; + } + exports.toSetString = supportsNullProto ? identity : toSetString; + + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; + } + exports.fromSetString = supportsNullProto ? identity : fromSetString; + + function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) { + var cmp; + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 === null) { + return 1; // aStr2 !== null + } + + if (aStr2 === null) { + return -1; // aStr1 !== null + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + + /** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ + function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); + } + exports.parseSourceMapInput = parseSourceMapInput; + + /** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ + function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } + + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + + return normalize(sourceURL); + } + exports.computeSourceURL = computeSourceURL; + } (util$3)); + return util$3; +} + +var arraySet$2 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredArraySet$2; + +function requireArraySet$2 () { + if (hasRequiredArraySet$2) return arraySet$2; + hasRequiredArraySet$2 = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = /*@__PURE__*/ requireUtil$3(); + var has = Object.prototype.hasOwnProperty; + var hasNativeMap = typeof Map !== "undefined"; + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + arraySet$2.ArraySet = ArraySet; + return arraySet$2; +} + +var mappingList$2 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredMappingList$2; + +function requireMappingList$2 () { + if (hasRequiredMappingList$2) return mappingList$2; + hasRequiredMappingList$2 = 1; + /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = /*@__PURE__*/ requireUtil$3(); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + mappingList$2.MappingList = MappingList; + return mappingList$2; +} + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredSourceMapGenerator$2; + +function requireSourceMapGenerator$2 () { + if (hasRequiredSourceMapGenerator$2) return sourceMapGenerator$2; + hasRequiredSourceMapGenerator$2 = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var base64VLQ = /*@__PURE__*/ requireBase64Vlq$2(); + var util = /*@__PURE__*/ requireUtil$3(); + var ArraySet = /*@__PURE__*/ requireArraySet$2().ArraySet; + var MappingList = /*@__PURE__*/ requireMappingList$2().MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._ignoreInvalidMapping = util.getArg(aArgs, 'ignoreInvalidMapping', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator(Object.assign(generatorOps || {}, { + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + })); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + if (this._validateMapping(generated, original, source, name) === false) { + return; + } + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source); + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + var message = 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.'; + + if (this._ignoreInvalidMapping) { + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + return false; + } else { + throw new Error(message); + } + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + var message = 'Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + }); + + if (this._ignoreInvalidMapping) { + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + return false; + } else { + throw new Error(message) + } + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = ''; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + sourceMapGenerator$2.SourceMapGenerator = SourceMapGenerator; + return sourceMapGenerator$2; +} + +var sourceMapConsumer$2 = {}; + +var binarySearch$2 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredBinarySearch$2; + +function requireBinarySearch$2 () { + if (hasRequiredBinarySearch$2) return binarySearch$2; + hasRequiredBinarySearch$2 = 1; + (function (exports) { + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + } (binarySearch$2)); + return binarySearch$2; +} + +var quickSort$2 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredQuickSort$2; + +function requireQuickSort$2 () { + if (hasRequiredQuickSort$2) return quickSort$2; + hasRequiredQuickSort$2 = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + function SortTemplate(comparator) { + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot, false) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + return doQuickSort; + } + + function cloneSort(comparator) { + let template = SortTemplate.toString(); + let templateFn = new Function(`return ${template}`)(); + return templateFn(comparator); + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + + let sortCache = new WeakMap(); + quickSort$2.quickSort = function (ary, comparator, start = 0) { + let doQuickSort = sortCache.get(comparator); + if (doQuickSort === void 0) { + doQuickSort = cloneSort(comparator); + sortCache.set(comparator, doQuickSort); + } + doQuickSort(ary, comparator, start, ary.length - 1); + }; + return quickSort$2; +} + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredSourceMapConsumer$2; + +function requireSourceMapConsumer$2 () { + if (hasRequiredSourceMapConsumer$2) return sourceMapConsumer$2; + hasRequiredSourceMapConsumer$2 = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = /*@__PURE__*/ requireUtil$3(); + var binarySearch = /*@__PURE__*/ requireBinarySearch$2(); + var ArraySet = /*@__PURE__*/ requireArraySet$2().ArraySet; + var base64VLQ = /*@__PURE__*/ requireBase64Vlq$2(); + var quickSort = /*@__PURE__*/ requireQuickSort$2().quickSort; + + function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) + : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + var boundCallback = aCallback.bind(context); + var names = this._names; + var sources = this._sources; + var sourceMapURL = this._sourceMapURL; + + for (var i = 0, n = mappings.length; i < n; i++) { + var mapping = mappings[i]; + var source = mapping.source === null ? null : sources.at(mapping.source); + source = util.computeSourceURL(sourceRoot, source, sourceMapURL); + boundCallback({ + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : names.at(mapping.name) + }); + } + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + sourceMapConsumer$2.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this._absoluteSources = this._sources.toArray().map(function (s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ + BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + + // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + + return -1; + }; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function (s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._absoluteSources.slice(); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + + const compareGenerated = util.compareByGeneratedPositionsDeflatedNoLine; + function sortGenerated(array, start) { + let l = array.length; + let n = array.length - start; + if (n <= 1) { + return; + } else if (n == 2) { + let a = array[start]; + let b = array[start + 1]; + if (compareGenerated(a, b) > 0) { + array[start] = b; + array[start + 1] = a; + } + } else if (n < 20) { + for (let i = start; i < l; i++) { + for (let j = i; j > start; j--) { + let a = array[j - 1]; + let b = array[j]; + if (compareGenerated(a, b) <= 0) { + break; + } + array[j - 1] = b; + array[j] = a; + } + } + } else { + quickSort(array, compareGenerated, start); + } + } + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, segment, end, value; + + let subarrayStart = 0; + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + + sortGenerated(generatedMappings, subarrayStart); + subarrayStart = generatedMappings.length; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + aStr.slice(index, end); + + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + let currentSource = mapping.source; + while (originalMappings.length <= currentSource) { + originalMappings.push(null); + } + if (originalMappings[currentSource] === null) { + originalMappings[currentSource] = []; + } + originalMappings[currentSource].push(mapping); + } + } + } + + sortGenerated(generatedMappings, subarrayStart); + this.__generatedMappings = generatedMappings; + + for (var i = 0; i < originalMappings.length; i++) { + if (originalMappings[i] != null) { + quickSort(originalMappings[i], util.compareByOriginalPositionsNoSource); + } + } + this.__originalMappings = [].concat(...originalMappings); + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + sourceMapConsumer$2.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content || content === '') { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + sourceMapConsumer$2.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + return sourceMapConsumer$2; +} + +var sourceNode$2 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredSourceNode$2; + +function requireSourceNode$2 () { + if (hasRequiredSourceNode$2) return sourceNode$2; + hasRequiredSourceNode$2 = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var SourceMapGenerator = /*@__PURE__*/ requireSourceMapGenerator$2().SourceMapGenerator; + var util = /*@__PURE__*/ requireUtil$3(); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + sourceNode$2.SourceNode = SourceNode; + return sourceNode$2; +} + +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var hasRequiredSourceMap$2; + +function requireSourceMap$2 () { + if (hasRequiredSourceMap$2) return sourceMap$2; + hasRequiredSourceMap$2 = 1; + sourceMap$2.SourceMapGenerator = /*@__PURE__*/ requireSourceMapGenerator$2().SourceMapGenerator; + sourceMap$2.SourceMapConsumer = /*@__PURE__*/ requireSourceMapConsumer$2().SourceMapConsumer; + sourceMap$2.SourceNode = /*@__PURE__*/ requireSourceNode$2().SourceNode; + return sourceMap$2; +} + +var sourceMapExports = /*@__PURE__*/ requireSourceMap$2(); + +const PURE_ANNOTATION = `/*@__PURE__*/`; +const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; +function createCodegenContext(ast, { + mode = "function", + prefixIdentifiers = mode === "module", + sourceMap = false, + filename = `template.vue.html`, + scopeId = null, + optimizeImports = false, + runtimeGlobalName = `Vue`, + runtimeModuleName = `vue`, + ssrRuntimeModuleName = "vue/server-renderer", + ssr = false, + isTS = false, + inSSR = false +}) { + const context = { + mode, + prefixIdentifiers, + sourceMap, + filename, + scopeId, + optimizeImports, + runtimeGlobalName, + runtimeModuleName, + ssrRuntimeModuleName, + ssr, + isTS, + inSSR, + source: ast.source, + code: ``, + column: 1, + line: 1, + offset: 0, + indentLevel: 0, + pure: false, + map: void 0, + helper(key) { + return `_${helperNameMap[key]}`; + }, + push(code, newlineIndex = -2 /* None */, node) { + context.code += code; + if (context.map) { + if (node) { + let name; + if (node.type === 4 && !node.isStatic) { + const content = node.content.replace(/^_ctx\./, ""); + if (content !== node.content && isSimpleIdentifier(content)) { + name = content; + } + } + addMapping(node.loc.start, name); + } + if (newlineIndex === -3 /* Unknown */) { + advancePositionWithMutation(context, code); + } else { + context.offset += code.length; + if (newlineIndex === -2 /* None */) { + context.column += code.length; + } else { + if (newlineIndex === -1 /* End */) { + newlineIndex = code.length - 1; + } + context.line++; + context.column = code.length - newlineIndex; + } + } + if (node && node.loc !== locStub) { + addMapping(node.loc.end); + } + } + }, + indent() { + newline(++context.indentLevel); + }, + deindent(withoutNewLine = false) { + if (withoutNewLine) { + --context.indentLevel; + } else { + newline(--context.indentLevel); + } + }, + newline() { + newline(context.indentLevel); + } + }; + function newline(n) { + context.push("\n" + ` `.repeat(n), 0 /* Start */); + } + function addMapping(loc, name = null) { + const { _names, _mappings } = context.map; + if (name !== null && !_names.has(name)) _names.add(name); + _mappings.add({ + originalLine: loc.line, + originalColumn: loc.column - 1, + // source-map column is 0 based + generatedLine: context.line, + generatedColumn: context.column - 1, + source: filename, + name + }); + } + if (sourceMap) { + context.map = new sourceMapExports.SourceMapGenerator(); + context.map.setSourceContent(filename, context.source); + context.map._sources.add(filename); + } + return context; +} +function generate(ast, options = {}) { + const context = createCodegenContext(ast, options); + if (options.onContextCreated) options.onContextCreated(context); + const { + mode, + push, + prefixIdentifiers, + indent, + deindent, + newline, + scopeId, + ssr + } = context; + const helpers = Array.from(ast.helpers); + const hasHelpers = helpers.length > 0; + const useWithBlock = !prefixIdentifiers && mode !== "module"; + const genScopeId = scopeId != null && mode === "module"; + const isSetupInlined = !!options.inline; + const preambleContext = isSetupInlined ? createCodegenContext(ast, options) : context; + if (mode === "module") { + genModulePreamble(ast, preambleContext, genScopeId, isSetupInlined); + } else { + genFunctionPreamble(ast, preambleContext); + } + const functionName = ssr ? `ssrRender` : `render`; + const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; + if (options.bindingMetadata && !options.inline) { + args.push("$props", "$setup", "$data", "$options"); + } + const signature = options.isTS ? args.map((arg) => `${arg}: any`).join(",") : args.join(", "); + if (isSetupInlined) { + push(`(${signature}) => {`); + } else { + push(`function ${functionName}(${signature}) {`); + } + indent(); + if (useWithBlock) { + push(`with (_ctx) {`); + indent(); + if (hasHelpers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue +`, + -1 /* End */ + ); + newline(); + } + } + if (ast.components.length) { + genAssets(ast.components, "component", context); + if (ast.directives.length || ast.temps > 0) { + newline(); + } + } + if (ast.directives.length) { + genAssets(ast.directives, "directive", context); + if (ast.temps > 0) { + newline(); + } + } + if (ast.temps > 0) { + push(`let `); + for (let i = 0; i < ast.temps; i++) { + push(`${i > 0 ? `, ` : ``}_temp${i}`); + } + } + if (ast.components.length || ast.directives.length || ast.temps) { + push(` +`, 0 /* Start */); + newline(); + } + if (!ssr) { + push(`return `); + } + if (ast.codegenNode) { + genNode(ast.codegenNode, context); + } else { + push(`null`); + } + if (useWithBlock) { + deindent(); + push(`}`); + } + deindent(); + push(`}`); + return { + ast, + code: context.code, + preamble: isSetupInlined ? preambleContext.code : ``, + map: context.map ? context.map.toJSON() : void 0 + }; +} +function genFunctionPreamble(ast, context) { + const { + ssr, + prefixIdentifiers, + push, + newline, + runtimeModuleName, + runtimeGlobalName, + ssrRuntimeModuleName + } = context; + const VueBinding = ssr ? `require(${JSON.stringify(runtimeModuleName)})` : runtimeGlobalName; + const helpers = Array.from(ast.helpers); + if (helpers.length > 0) { + if (prefixIdentifiers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = ${VueBinding} +`, + -1 /* End */ + ); + } else { + push(`const _Vue = ${VueBinding} +`, -1 /* End */); + if (ast.hoists.length) { + const staticHelpers = [ + CREATE_VNODE, + CREATE_ELEMENT_VNODE, + CREATE_COMMENT, + CREATE_TEXT, + CREATE_STATIC + ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); + push(`const { ${staticHelpers} } = _Vue +`, -1 /* End */); + } + } + } + if (ast.ssrHelpers && ast.ssrHelpers.length) { + push( + `const { ${ast.ssrHelpers.map(aliasHelper).join(", ")} } = require("${ssrRuntimeModuleName}") +`, + -1 /* End */ + ); + } + genHoists(ast.hoists, context); + newline(); + push(`return `); +} +function genModulePreamble(ast, context, genScopeId, inline) { + const { + push, + newline, + optimizeImports, + runtimeModuleName, + ssrRuntimeModuleName + } = context; + if (ast.helpers.size) { + const helpers = Array.from(ast.helpers); + if (optimizeImports) { + push( + `import { ${helpers.map((s) => helperNameMap[s]).join(", ")} } from ${JSON.stringify(runtimeModuleName)} +`, + -1 /* End */ + ); + push( + ` +// Binding optimization for webpack code-split +const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(", ")} +`, + -1 /* End */ + ); + } else { + push( + `import { ${helpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from ${JSON.stringify(runtimeModuleName)} +`, + -1 /* End */ + ); + } + } + if (ast.ssrHelpers && ast.ssrHelpers.length) { + push( + `import { ${ast.ssrHelpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from "${ssrRuntimeModuleName}" +`, + -1 /* End */ + ); + } + if (ast.imports.length) { + genImports(ast.imports, context); + newline(); + } + genHoists(ast.hoists, context); + newline(); + if (!inline) { + push(`export `); + } +} +function genAssets(assets, type, { helper, push, newline, isTS }) { + const resolver = helper( + type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE + ); + for (let i = 0; i < assets.length; i++) { + let id = assets[i]; + const maybeSelfReference = id.endsWith("__self"); + if (maybeSelfReference) { + id = id.slice(0, -6); + } + push( + `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` + ); + if (i < assets.length - 1) { + newline(); + } + } +} +function genHoists(hoists, context) { + if (!hoists.length) { + return; + } + context.pure = true; + const { push, newline } = context; + newline(); + for (let i = 0; i < hoists.length; i++) { + const exp = hoists[i]; + if (exp) { + push(`const _hoisted_${i + 1} = `); + genNode(exp, context); + newline(); + } + } + context.pure = false; +} +function genImports(importsOptions, context) { + if (!importsOptions.length) { + return; + } + importsOptions.forEach((imports) => { + context.push(`import `); + genNode(imports.exp, context); + context.push(` from '${imports.path}'`); + context.newline(); + }); +} +function isText(n) { + return isString$1(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; +} +function genNodeListAsArray(nodes, context) { + const multilines = nodes.length > 3 || nodes.some((n) => isArray$3(n) || !isText(n)); + context.push(`[`); + multilines && context.indent(); + genNodeList(nodes, context, multilines); + multilines && context.deindent(); + context.push(`]`); +} +function genNodeList(nodes, context, multilines = false, comma = true) { + const { push, newline } = context; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (isString$1(node)) { + push(node, -3 /* Unknown */); + } else if (isArray$3(node)) { + genNodeListAsArray(node, context); + } else { + genNode(node, context); + } + if (i < nodes.length - 1) { + if (multilines) { + comma && push(","); + newline(); + } else { + comma && push(", "); + } + } + } +} +function genNode(node, context) { + if (isString$1(node)) { + context.push(node, -3 /* Unknown */); + return; + } + if (isSymbol$1(node)) { + context.push(context.helper(node)); + return; + } + switch (node.type) { + case 1: + case 9: + case 11: + assert( + node.codegenNode != null, + `Codegen node is missing for element/if/for node. Apply appropriate transforms first.` + ); + genNode(node.codegenNode, context); + break; + case 2: + genText(node, context); + break; + case 4: + genExpression(node, context); + break; + case 5: + genInterpolation(node, context); + break; + case 12: + genNode(node.codegenNode, context); + break; + case 8: + genCompoundExpression(node, context); + break; + case 3: + genComment(node, context); + break; + case 13: + genVNodeCall(node, context); + break; + case 14: + genCallExpression(node, context); + break; + case 15: + genObjectExpression(node, context); + break; + case 17: + genArrayExpression(node, context); + break; + case 18: + genFunctionExpression(node, context); + break; + case 19: + genConditionalExpression(node, context); + break; + case 20: + genCacheExpression(node, context); + break; + case 21: + genNodeList(node.body, context, true, false); + break; + // SSR only types + case 22: + genTemplateLiteral(node, context); + break; + case 23: + genIfStatement(node, context); + break; + case 24: + genAssignmentExpression(node, context); + break; + case 25: + genSequenceExpression(node, context); + break; + case 26: + genReturnStatement(node, context); + break; + /* v8 ignore start */ + case 10: + break; + default: + { + assert(false, `unhandled codegen node type: ${node.type}`); + const exhaustiveCheck = node; + return exhaustiveCheck; + } + } +} +function genText(node, context) { + context.push(JSON.stringify(node.content), -3 /* Unknown */, node); +} +function genExpression(node, context) { + const { content, isStatic } = node; + context.push( + isStatic ? JSON.stringify(content) : content, + -3 /* Unknown */, + node + ); +} +function genInterpolation(node, context) { + const { push, helper, pure } = context; + if (pure) push(PURE_ANNOTATION); + push(`${helper(TO_DISPLAY_STRING)}(`); + genNode(node.content, context); + push(`)`); +} +function genCompoundExpression(node, context) { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString$1(child)) { + context.push(child, -3 /* Unknown */); + } else { + genNode(child, context); + } + } +} +function genExpressionAsPropertyKey(node, context) { + const { push } = context; + if (node.type === 8) { + push(`[`); + genCompoundExpression(node, context); + push(`]`); + } else if (node.isStatic) { + const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); + push(text, -2 /* None */, node); + } else { + push(`[${node.content}]`, -3 /* Unknown */, node); + } +} +function genComment(node, context) { + const { push, helper, pure } = context; + if (pure) { + push(PURE_ANNOTATION); + } + push( + `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, + -3 /* Unknown */, + node + ); +} +function genVNodeCall(node, context) { + const { push, helper, pure } = context; + const { + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent + } = node; + let patchFlagString; + if (patchFlag) { + { + if (patchFlag < 0) { + patchFlagString = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; + } else { + const flagNames = Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `); + patchFlagString = patchFlag + ` /* ${flagNames} */`; + } + } + } + if (directives) { + push(helper(WITH_DIRECTIVES) + `(`); + } + if (isBlock) { + push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); + } + if (pure) { + push(PURE_ANNOTATION); + } + const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); + push(helper(callHelper) + `(`, -2 /* None */, node); + genNodeList( + genNullableArgs([tag, props, children, patchFlagString, dynamicProps]), + context + ); + push(`)`); + if (isBlock) { + push(`)`); + } + if (directives) { + push(`, `); + genNode(directives, context); + push(`)`); + } +} +function genNullableArgs(args) { + let i = args.length; + while (i--) { + if (args[i] != null) break; + } + return args.slice(0, i + 1).map((arg) => arg || `null`); +} +function genCallExpression(node, context) { + const { push, helper, pure } = context; + const callee = isString$1(node.callee) ? node.callee : helper(node.callee); + if (pure) { + push(PURE_ANNOTATION); + } + push(callee + `(`, -2 /* None */, node); + genNodeList(node.arguments, context); + push(`)`); +} +function genObjectExpression(node, context) { + const { push, indent, deindent, newline } = context; + const { properties } = node; + if (!properties.length) { + push(`{}`, -2 /* None */, node); + return; + } + const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4); + push(multilines ? `{` : `{ `); + multilines && indent(); + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + genExpressionAsPropertyKey(key, context); + push(`: `); + genNode(value, context); + if (i < properties.length - 1) { + push(`,`); + newline(); + } + } + multilines && deindent(); + push(multilines ? `}` : ` }`); +} +function genArrayExpression(node, context) { + genNodeListAsArray(node.elements, context); +} +function genFunctionExpression(node, context) { + const { push, indent, deindent } = context; + const { params, returns, body, newline, isSlot } = node; + if (isSlot) { + push(`_${helperNameMap[WITH_CTX]}(`); + } + push(`(`, -2 /* None */, node); + if (isArray$3(params)) { + genNodeList(params, context); + } else if (params) { + genNode(params, context); + } + push(`) => `); + if (newline || body) { + push(`{`); + indent(); + } + if (returns) { + if (newline) { + push(`return `); + } + if (isArray$3(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); + } + } else if (body) { + genNode(body, context); + } + if (newline || body) { + deindent(); + push(`}`); + } + if (isSlot) { + push(`)`); + } +} +function genConditionalExpression(node, context) { + const { test, consequent, alternate, newline: needNewline } = node; + const { push, indent, deindent, newline } = context; + if (test.type === 4) { + const needsParens = !isSimpleIdentifier(test.content); + needsParens && push(`(`); + genExpression(test, context); + needsParens && push(`)`); + } else { + push(`(`); + genNode(test, context); + push(`)`); + } + needNewline && indent(); + context.indentLevel++; + needNewline || push(` `); + push(`? `); + genNode(consequent, context); + context.indentLevel--; + needNewline && newline(); + needNewline || push(` `); + push(`: `); + const isNested = alternate.type === 19; + if (!isNested) { + context.indentLevel++; + } + genNode(alternate, context); + if (!isNested) { + context.indentLevel--; + } + needNewline && deindent( + true + /* without newline */ + ); +} +function genCacheExpression(node, context) { + const { push, helper, indent, deindent, newline } = context; + const { needPauseTracking, needArraySpread } = node; + if (needArraySpread) { + push(`[...(`); + } + push(`_cache[${node.index}] || (`); + if (needPauseTracking) { + indent(); + push(`${helper(SET_BLOCK_TRACKING)}(-1`); + if (node.inVOnce) push(`, true`); + push(`),`); + newline(); + push(`(`); + } + push(`_cache[${node.index}] = `); + genNode(node.value, context); + if (needPauseTracking) { + push(`).cacheIndex = ${node.index},`); + newline(); + push(`${helper(SET_BLOCK_TRACKING)}(1),`); + newline(); + push(`_cache[${node.index}]`); + deindent(); + } + push(`)`); + if (needArraySpread) { + push(`)]`); + } +} +function genTemplateLiteral(node, context) { + const { push, indent, deindent } = context; + push("`"); + const l = node.elements.length; + const multilines = l > 3; + for (let i = 0; i < l; i++) { + const e = node.elements[i]; + if (isString$1(e)) { + push(e.replace(/(`|\$|\\)/g, "\\$1"), -3 /* Unknown */); + } else { + push("${"); + if (multilines) indent(); + genNode(e, context); + if (multilines) deindent(); + push("}"); + } + } + push("`"); +} +function genIfStatement(node, context) { + const { push, indent, deindent } = context; + const { test, consequent, alternate } = node; + push(`if (`); + genNode(test, context); + push(`) {`); + indent(); + genNode(consequent, context); + deindent(); + push(`}`); + if (alternate) { + push(` else `); + if (alternate.type === 23) { + genIfStatement(alternate, context); + } else { + push(`{`); + indent(); + genNode(alternate, context); + deindent(); + push(`}`); + } + } +} +function genAssignmentExpression(node, context) { + genNode(node.left, context); + context.push(` = `); + genNode(node.right, context); +} +function genSequenceExpression(node, context) { + context.push(`(`); + genNodeList(node.expressions, context); + context.push(`)`); +} +function genReturnStatement({ returns }, context) { + context.push(`return `); + if (isArray$3(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); + } +} + +const isLiteralWhitelisted = /* @__PURE__ */ makeMap("true,false,null,this"); +const transformExpression = (node, context) => { + if (node.type === 5) { + node.content = processExpression( + node.content, + context + ); + } else if (node.type === 1) { + const memo = findDir(node, "memo"); + for (let i = 0; i < node.props.length; i++) { + const dir = node.props[i]; + if (dir.type === 7 && dir.name !== "for") { + const exp = dir.exp; + const arg = dir.arg; + if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor) + !(memo && arg && arg.type === 4 && arg.content === "key")) { + dir.exp = processExpression( + exp, + context, + // slot args must be processed as function params + dir.name === "slot" + ); + } + if (arg && arg.type === 4 && !arg.isStatic) { + dir.arg = processExpression(arg, context); + } + } + } + } +}; +function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { + if (!context.prefixIdentifiers || !node.content.trim()) { + return node; + } + const { inline, bindingMetadata } = context; + const rewriteIdentifier = (raw, parent, id) => { + const type = hasOwn(bindingMetadata, raw) && bindingMetadata[raw]; + if (inline) { + const isAssignmentLVal = parent && parent.type === "AssignmentExpression" && parent.left === id; + const isUpdateArg = parent && parent.type === "UpdateExpression" && parent.argument === id; + const isDestructureAssignment = parent && isInDestructureAssignment(parent, parentStack); + const isNewExpression = parent && isInNewExpression(parentStack); + const wrapWithUnref = (raw2) => { + const wrapped = `${context.helperString(UNREF)}(${raw2})`; + return isNewExpression ? `(${wrapped})` : wrapped; + }; + if (isConst(type) || type === "setup-reactive-const" || localVars[raw]) { + return raw; + } else if (type === "setup-ref") { + return `${raw}.value`; + } else if (type === "setup-maybe-ref") { + return isAssignmentLVal || isUpdateArg || isDestructureAssignment ? `${raw}.value` : wrapWithUnref(raw); + } else if (type === "setup-let") { + if (isAssignmentLVal) { + const { right: rVal, operator } = parent; + const rExp = rawExp.slice(rVal.start - 1, rVal.end - 1); + const rExpString = stringifyExpression( + processExpression( + createSimpleExpression(rExp, false), + context, + false, + false, + knownIds + ) + ); + return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore +` : ``} ? ${raw}.value ${operator} ${rExpString} : ${raw}`; + } else if (isUpdateArg) { + id.start = parent.start; + id.end = parent.end; + const { prefix: isPrefix, operator } = parent; + const prefix = isPrefix ? operator : ``; + const postfix = isPrefix ? `` : operator; + return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore +` : ``} ? ${prefix}${raw}.value${postfix} : ${prefix}${raw}${postfix}`; + } else if (isDestructureAssignment) { + return raw; + } else { + return wrapWithUnref(raw); + } + } else if (type === "props") { + return genPropsAccessExp(raw); + } else if (type === "props-aliased") { + return genPropsAccessExp(bindingMetadata.__propsAliases[raw]); + } + } else { + if (type && type.startsWith("setup") || type === "literal-const") { + return `$setup.${raw}`; + } else if (type === "props-aliased") { + return `$props['${bindingMetadata.__propsAliases[raw]}']`; + } else if (type) { + return `$${type}.${raw}`; + } + } + return `_ctx.${raw}`; + }; + const rawExp = node.content; + let ast = node.ast; + if (ast === false) { + return node; + } + if (ast === null || !ast && isSimpleIdentifier(rawExp)) { + const isScopeVarReference = context.identifiers[rawExp]; + const isAllowedGlobal = isGloballyAllowed(rawExp); + const isLiteral = isLiteralWhitelisted(rawExp); + if (!asParams && !isScopeVarReference && !isLiteral && (!isAllowedGlobal || bindingMetadata[rawExp])) { + if (isConst(bindingMetadata[rawExp])) { + node.constType = 1; + } + node.content = rewriteIdentifier(rawExp); + } else if (!isScopeVarReference) { + if (isLiteral) { + node.constType = 3; + } else { + node.constType = 2; + } + } + return node; + } + if (!ast) { + const source = asRawStatements ? ` ${rawExp} ` : `(${rawExp})${asParams ? `=>{}` : ``}`; + try { + ast = libExports.parseExpression(source, { + sourceType: "module", + plugins: context.expressionPlugins + }); + } catch (e) { + context.onError( + createCompilerError( + 45, + node.loc, + void 0, + e.message + ) + ); + return node; + } + } + const ids = []; + const parentStack = []; + const knownIds = Object.create(context.identifiers); + walkIdentifiers( + ast, + (node2, parent, _, isReferenced, isLocal) => { + if (isStaticPropertyKey(node2, parent)) { + return; + } + const needPrefix = isReferenced && canPrefix(node2); + if (needPrefix && !isLocal) { + if (isStaticProperty(parent) && parent.shorthand) { + node2.prefix = `${node2.name}: `; + } + node2.name = rewriteIdentifier(node2.name, parent, node2); + ids.push(node2); + } else { + if (!(needPrefix && isLocal) && (!parent || parent.type !== "CallExpression" && parent.type !== "NewExpression" && parent.type !== "MemberExpression")) { + node2.isConstant = true; + } + ids.push(node2); + } + }, + true, + // invoke on ALL identifiers + parentStack, + knownIds + ); + const children = []; + ids.sort((a, b) => a.start - b.start); + ids.forEach((id, i) => { + const start = id.start - 1; + const end = id.end - 1; + const last = ids[i - 1]; + const leadingText = rawExp.slice(last ? last.end - 1 : 0, start); + if (leadingText.length || id.prefix) { + children.push(leadingText + (id.prefix || ``)); + } + const source = rawExp.slice(start, end); + children.push( + createSimpleExpression( + id.name, + false, + { + start: advancePositionWithClone(node.loc.start, source, start), + end: advancePositionWithClone(node.loc.start, source, end), + source + }, + id.isConstant ? 3 : 0 + ) + ); + if (i === ids.length - 1 && end < rawExp.length) { + children.push(rawExp.slice(end)); + } + }); + let ret; + if (children.length) { + ret = createCompoundExpression(children, node.loc); + ret.ast = ast; + } else { + ret = node; + ret.constType = 3; + } + ret.identifiers = Object.keys(knownIds); + return ret; +} +function canPrefix(id) { + if (isGloballyAllowed(id.name)) { + return false; + } + if (id.name === "require") { + return false; + } + return true; +} +function stringifyExpression(exp) { + if (isString$1(exp)) { + return exp; + } else if (exp.type === 4) { + return exp.content; + } else { + return exp.children.map(stringifyExpression).join(""); + } +} +function isConst(type) { + return type === "setup-const" || type === "literal-const"; +} + +const transformIf = createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + (node, dir, context) => { + return processIf(node, dir, context, (ifNode, branch, isRoot) => { + const siblings = context.parent.children; + let i = siblings.indexOf(ifNode); + let key = 0; + while (i-- >= 0) { + const sibling = siblings[i]; + if (sibling && sibling.type === 9) { + key += sibling.branches.length; + } + } + return () => { + if (isRoot) { + ifNode.codegenNode = createCodegenNodeForBranch( + branch, + key, + context + ); + } else { + const parentCondition = getParentCondition(ifNode.codegenNode); + parentCondition.alternate = createCodegenNodeForBranch( + branch, + key + ifNode.branches.length - 1, + context + ); + } + }; + }); + } +); +function processIf(node, dir, context, processCodegen) { + if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { + const loc = dir.exp ? dir.exp.loc : node.loc; + context.onError( + createCompilerError(28, dir.loc) + ); + dir.exp = createSimpleExpression(`true`, false, loc); + } + if (context.prefixIdentifiers && dir.exp) { + dir.exp = processExpression(dir.exp, context); + } + if (dir.name === "if") { + const branch = createIfBranch(node, dir); + const ifNode = { + type: 9, + loc: cloneLoc(node.loc), + branches: [branch] + }; + context.replaceNode(ifNode); + if (processCodegen) { + return processCodegen(ifNode, branch, true); + } + } else { + const siblings = context.parent.children; + const comments = []; + let i = siblings.indexOf(node); + while (i-- >= -1) { + const sibling = siblings[i]; + if (sibling && sibling.type === 3) { + context.removeNode(sibling); + comments.unshift(sibling); + continue; + } + if (sibling && sibling.type === 2 && !sibling.content.trim().length) { + context.removeNode(sibling); + continue; + } + if (sibling && sibling.type === 9) { + if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { + context.onError( + createCompilerError(30, node.loc) + ); + } + context.removeNode(); + const branch = createIfBranch(node, dir); + if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition> + !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) { + branch.children = [...comments, ...branch.children]; + } + { + const key = branch.userKey; + if (key) { + sibling.branches.forEach(({ userKey }) => { + if (isSameKey(userKey, key)) { + context.onError( + createCompilerError( + 29, + branch.userKey.loc + ) + ); + } + }); + } + } + sibling.branches.push(branch); + const onExit = processCodegen && processCodegen(sibling, branch, false); + traverseNode(branch, context); + if (onExit) onExit(); + context.currentNode = null; + } else { + context.onError( + createCompilerError(30, node.loc) + ); + } + break; + } + } +} +function createIfBranch(node, dir) { + const isTemplateIf = node.tagType === 3; + return { + type: 10, + loc: node.loc, + condition: dir.name === "else" ? void 0 : dir.exp, + children: isTemplateIf && !findDir(node, "for") ? node.children : [node], + userKey: findProp(node, `key`), + isTemplateIf + }; +} +function createCodegenNodeForBranch(branch, keyIndex, context) { + if (branch.condition) { + return createConditionalExpression( + branch.condition, + createChildrenCodegenNode(branch, keyIndex, context), + // make sure to pass in asBlock: true so that the comment node call + // closes the current block. + createCallExpression(context.helper(CREATE_COMMENT), [ + '"v-if"' , + "true" + ]) + ); + } else { + return createChildrenCodegenNode(branch, keyIndex, context); + } +} +function createChildrenCodegenNode(branch, keyIndex, context) { + const { helper } = context; + const keyProperty = createObjectProperty( + `key`, + createSimpleExpression( + `${keyIndex}`, + false, + locStub, + 2 + ) + ); + const { children } = branch; + const firstChild = children[0]; + const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; + if (needFragmentWrapper) { + if (children.length === 1 && firstChild.type === 11) { + const vnodeCall = firstChild.codegenNode; + injectProp(vnodeCall, keyProperty, context); + return vnodeCall; + } else { + let patchFlag = 64; + if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + } + return createVNodeCall( + context, + helper(FRAGMENT), + createObjectExpression([keyProperty]), + children, + patchFlag, + void 0, + void 0, + true, + false, + false, + branch.loc + ); + } + } else { + const ret = firstChild.codegenNode; + const vnodeCall = getMemoedVNodeCall(ret); + if (vnodeCall.type === 13) { + convertToBlock(vnodeCall, context); + } + injectProp(vnodeCall, keyProperty, context); + return ret; + } +} +function isSameKey(a, b) { + if (!a || a.type !== b.type) { + return false; + } + if (a.type === 6) { + if (a.value.content !== b.value.content) { + return false; + } + } else { + const exp = a.exp; + const branchExp = b.exp; + if (exp.type !== branchExp.type) { + return false; + } + if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { + return false; + } + } + return true; +} +function getParentCondition(node) { + while (true) { + if (node.type === 19) { + if (node.alternate.type === 19) { + node = node.alternate; + } else { + return node; + } + } else if (node.type === 20) { + node = node.value; + } + } +} + +const transformBind = (dir, _node, context) => { + const { modifiers, loc } = dir; + const arg = dir.arg; + let { exp } = dir; + if (exp && exp.type === 4 && !exp.content.trim()) { + { + context.onError( + createCompilerError(34, loc) + ); + return { + props: [ + createObjectProperty(arg, createSimpleExpression("", true, loc)) + ] + }; + } + } + if (!exp) { + if (arg.type !== 4 || !arg.isStatic) { + context.onError( + createCompilerError( + 52, + arg.loc + ) + ); + return { + props: [ + createObjectProperty(arg, createSimpleExpression("", true, loc)) + ] + }; + } + transformBindShorthand(dir, context); + exp = dir.exp; + } + if (arg.type !== 4) { + arg.children.unshift(`(`); + arg.children.push(`) || ""`); + } else if (!arg.isStatic) { + arg.content = `${arg.content} || ""`; + } + if (modifiers.some((mod) => mod.content === "camel")) { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = camelize(arg.content); + } else { + arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; + } + } else { + arg.children.unshift(`${context.helperString(CAMELIZE)}(`); + arg.children.push(`)`); + } + } + if (!context.inSSR) { + if (modifiers.some((mod) => mod.content === "prop")) { + injectPrefix(arg, "."); + } + if (modifiers.some((mod) => mod.content === "attr")) { + injectPrefix(arg, "^"); + } + } + return { + props: [createObjectProperty(arg, exp)] + }; +}; +const transformBindShorthand = (dir, context) => { + const arg = dir.arg; + const propName = camelize(arg.content); + dir.exp = createSimpleExpression(propName, false, arg.loc); + { + dir.exp = processExpression(dir.exp, context); + } +}; +const injectPrefix = (arg, prefix) => { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = prefix + arg.content; + } else { + arg.content = `\`${prefix}\${${arg.content}}\``; + } + } else { + arg.children.unshift(`'${prefix}' + (`); + arg.children.push(`)`); + } +}; + +const transformFor = createStructuralDirectiveTransform( + "for", + (node, dir, context) => { + const { helper, removeHelper } = context; + return processFor(node, dir, context, (forNode) => { + const renderExp = createCallExpression(helper(RENDER_LIST), [ + forNode.source + ]); + const isTemplate = isTemplateNode(node); + const memo = findDir(node, "memo"); + const keyProp = findProp(node, `key`, false, true); + const isDirKey = keyProp && keyProp.type === 7; + if (isDirKey && !keyProp.exp) { + transformBindShorthand(keyProp, context); + } + let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp); + if (memo && keyExp && isDirKey) { + { + keyProp.exp = keyExp = processExpression( + keyExp, + context + ); + } + } + const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null; + if (isTemplate) { + if (memo) { + memo.exp = processExpression( + memo.exp, + context + ); + } + if (keyProperty && keyProp.type !== 6) { + keyProperty.value = processExpression( + keyProperty.value, + context + ); + } + } + const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; + const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; + forNode.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + renderExp, + fragmentFlag, + void 0, + void 0, + true, + !isStableFragment, + false, + node.loc + ); + return () => { + let childBlock; + const { children } = forNode; + if (isTemplate) { + node.children.some((c) => { + if (c.type === 1) { + const key = findProp(c, "key"); + if (key) { + context.onError( + createCompilerError( + 33, + key.loc + ) + ); + return true; + } + } + }); + } + const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; + const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; + if (slotOutlet) { + childBlock = slotOutlet.codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + } else if (needFragmentWrapper) { + childBlock = createVNodeCall( + context, + helper(FRAGMENT), + keyProperty ? createObjectExpression([keyProperty]) : void 0, + node.children, + 64, + void 0, + void 0, + true, + void 0, + false + ); + } else { + childBlock = children[0].codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + if (childBlock.isBlock !== !isStableFragment) { + if (childBlock.isBlock) { + removeHelper(OPEN_BLOCK); + removeHelper( + getVNodeBlockHelper(context.inSSR, childBlock.isComponent) + ); + } else { + removeHelper( + getVNodeHelper(context.inSSR, childBlock.isComponent) + ); + } + } + childBlock.isBlock = !isStableFragment; + if (childBlock.isBlock) { + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); + } else { + helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); + } + } + if (memo) { + const loop = createFunctionExpression( + createForLoopParams(forNode.parseResult, [ + createSimpleExpression(`_cached`) + ]) + ); + loop.body = createBlockStatement([ + createCompoundExpression([`const _memo = (`, memo.exp, `)`]), + createCompoundExpression([ + `if (_cached`, + ...keyExp ? [` && _cached.key === `, keyExp] : [], + ` && ${context.helperString( + IS_MEMO_SAME + )}(_cached, _memo)) return _cached` + ]), + createCompoundExpression([`const _item = `, childBlock]), + createSimpleExpression(`_item.memo = _memo`), + createSimpleExpression(`return _item`) + ]); + renderExp.arguments.push( + loop, + createSimpleExpression(`_cache`), + createSimpleExpression(String(context.cached.length)) + ); + context.cached.push(null); + } else { + renderExp.arguments.push( + createFunctionExpression( + createForLoopParams(forNode.parseResult), + childBlock, + true + ) + ); + } + }; + }); + } +); +function processFor(node, dir, context, processCodegen) { + if (!dir.exp) { + context.onError( + createCompilerError(31, dir.loc) + ); + return; + } + const parseResult = dir.forParseResult; + if (!parseResult) { + context.onError( + createCompilerError(32, dir.loc) + ); + return; + } + finalizeForParseResult(parseResult, context); + const { addIdentifiers, removeIdentifiers, scopes } = context; + const { source, value, key, index } = parseResult; + const forNode = { + type: 11, + loc: dir.loc, + source, + valueAlias: value, + keyAlias: key, + objectIndexAlias: index, + parseResult, + children: isTemplateNode(node) ? node.children : [node] + }; + context.replaceNode(forNode); + scopes.vFor++; + if (context.prefixIdentifiers) { + value && addIdentifiers(value); + key && addIdentifiers(key); + index && addIdentifiers(index); + } + const onExit = processCodegen && processCodegen(forNode); + return () => { + scopes.vFor--; + if (context.prefixIdentifiers) { + value && removeIdentifiers(value); + key && removeIdentifiers(key); + index && removeIdentifiers(index); + } + if (onExit) onExit(); + }; +} +function finalizeForParseResult(result, context) { + if (result.finalized) return; + if (context.prefixIdentifiers) { + result.source = processExpression( + result.source, + context + ); + if (result.key) { + result.key = processExpression( + result.key, + context, + true + ); + } + if (result.index) { + result.index = processExpression( + result.index, + context, + true + ); + } + if (result.value) { + result.value = processExpression( + result.value, + context, + true + ); + } + } + result.finalized = true; +} +function createForLoopParams({ value, key, index }, memoArgs = []) { + return createParamsList([value, key, index, ...memoArgs]); +} +function createParamsList(args) { + let i = args.length; + while (i--) { + if (args[i]) break; + } + return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); +} + +const defaultFallback = createSimpleExpression(`undefined`, false); +const trackSlotScopes = (node, context) => { + if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { + const vSlot = findDir(node, "slot"); + if (vSlot) { + const slotProps = vSlot.exp; + if (context.prefixIdentifiers) { + slotProps && context.addIdentifiers(slotProps); + } + context.scopes.vSlot++; + return () => { + if (context.prefixIdentifiers) { + slotProps && context.removeIdentifiers(slotProps); + } + context.scopes.vSlot--; + }; + } + } +}; +const trackVForSlotScopes = (node, context) => { + let vFor; + if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) { + const result = vFor.forParseResult; + if (result) { + finalizeForParseResult(result, context); + const { value, key, index } = result; + const { addIdentifiers, removeIdentifiers } = context; + value && addIdentifiers(value); + key && addIdentifiers(key); + index && addIdentifiers(index); + return () => { + value && removeIdentifiers(value); + key && removeIdentifiers(key); + index && removeIdentifiers(index); + }; + } + } +}; +const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( + props, + children, + false, + true, + children.length ? children[0].loc : loc +); +function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { + context.helper(WITH_CTX); + const { children, loc } = node; + const slotsProperties = []; + const dynamicSlots = []; + let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; + if (!context.ssr && context.prefixIdentifiers) { + hasDynamicSlots = hasScopeRef(node, context.identifiers); + } + const onComponentSlot = findDir(node, "slot", true); + if (onComponentSlot) { + const { arg, exp } = onComponentSlot; + if (arg && !isStaticExp(arg)) { + hasDynamicSlots = true; + } + slotsProperties.push( + createObjectProperty( + arg || createSimpleExpression("default", true), + buildSlotFn(exp, void 0, children, loc) + ) + ); + } + let hasTemplateSlots = false; + let hasNamedDefaultSlot = false; + const implicitDefaultChildren = []; + const seenSlotNames = /* @__PURE__ */ new Set(); + let conditionalBranchIndex = 0; + for (let i = 0; i < children.length; i++) { + const slotElement = children[i]; + let slotDir; + if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { + if (slotElement.type !== 3) { + implicitDefaultChildren.push(slotElement); + } + continue; + } + if (onComponentSlot) { + context.onError( + createCompilerError(37, slotDir.loc) + ); + break; + } + hasTemplateSlots = true; + const { children: slotChildren, loc: slotLoc } = slotElement; + const { + arg: slotName = createSimpleExpression(`default`, true), + exp: slotProps, + loc: dirLoc + } = slotDir; + let staticSlotName; + if (isStaticExp(slotName)) { + staticSlotName = slotName ? slotName.content : `default`; + } else { + hasDynamicSlots = true; + } + const vFor = findDir(slotElement, "for"); + const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); + let vIf; + let vElse; + if (vIf = findDir(slotElement, "if")) { + hasDynamicSlots = true; + dynamicSlots.push( + createConditionalExpression( + vIf.exp, + buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), + defaultFallback + ) + ); + } else if (vElse = findDir( + slotElement, + /^else(-if)?$/, + true + /* allowEmpty */ + )) { + let j = i; + let prev; + while (j--) { + prev = children[j]; + if (prev.type !== 3) { + break; + } + } + if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) { + let conditional = dynamicSlots[dynamicSlots.length - 1]; + while (conditional.alternate.type === 19) { + conditional = conditional.alternate; + } + conditional.alternate = vElse.exp ? createConditionalExpression( + vElse.exp, + buildDynamicSlot( + slotName, + slotFunction, + conditionalBranchIndex++ + ), + defaultFallback + ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); + } else { + context.onError( + createCompilerError(30, vElse.loc) + ); + } + } else if (vFor) { + hasDynamicSlots = true; + const parseResult = vFor.forParseResult; + if (parseResult) { + finalizeForParseResult(parseResult, context); + dynamicSlots.push( + createCallExpression(context.helper(RENDER_LIST), [ + parseResult.source, + createFunctionExpression( + createForLoopParams(parseResult), + buildDynamicSlot(slotName, slotFunction), + true + ) + ]) + ); + } else { + context.onError( + createCompilerError( + 32, + vFor.loc + ) + ); + } + } else { + if (staticSlotName) { + if (seenSlotNames.has(staticSlotName)) { + context.onError( + createCompilerError( + 38, + dirLoc + ) + ); + continue; + } + seenSlotNames.add(staticSlotName); + if (staticSlotName === "default") { + hasNamedDefaultSlot = true; + } + } + slotsProperties.push(createObjectProperty(slotName, slotFunction)); + } + } + if (!onComponentSlot) { + const buildDefaultSlotProperty = (props, children2) => { + const fn = buildSlotFn(props, void 0, children2, loc); + return createObjectProperty(`default`, fn); + }; + if (!hasTemplateSlots) { + slotsProperties.push(buildDefaultSlotProperty(void 0, children)); + } else if (implicitDefaultChildren.length && // #3766 + // with whitespace: 'preserve', whitespaces between slots will end up in + // implicitDefaultChildren. Ignore if all implicit children are whitespaces. + implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { + if (hasNamedDefaultSlot) { + context.onError( + createCompilerError( + 39, + implicitDefaultChildren[0].loc + ) + ); + } else { + slotsProperties.push( + buildDefaultSlotProperty(void 0, implicitDefaultChildren) + ); + } + } + } + const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; + let slots = createObjectExpression( + slotsProperties.concat( + createObjectProperty( + `_`, + // 2 = compiled but dynamic = can skip normalization, but must run diff + // 1 = compiled and static = can skip normalization AND diff as optimized + createSimpleExpression( + slotFlag + (` /* ${slotFlagsText[slotFlag]} */` ), + false + ) + ) + ), + loc + ); + if (dynamicSlots.length) { + slots = createCallExpression(context.helper(CREATE_SLOTS), [ + slots, + createArrayExpression(dynamicSlots) + ]); + } + return { + slots, + hasDynamicSlots + }; +} +function buildDynamicSlot(name, fn, index) { + const props = [ + createObjectProperty(`name`, name), + createObjectProperty(`fn`, fn) + ]; + if (index != null) { + props.push( + createObjectProperty(`key`, createSimpleExpression(String(index), true)) + ); + } + return createObjectExpression(props); +} +function hasForwardedSlots(children) { + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + if (child.tagType === 2 || hasForwardedSlots(child.children)) { + return true; + } + break; + case 9: + if (hasForwardedSlots(child.branches)) return true; + break; + case 10: + case 11: + if (hasForwardedSlots(child.children)) return true; + break; + } + } + return false; +} +function isNonWhitespaceContent(node) { + if (node.type !== 2 && node.type !== 12) + return true; + return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); +} + +const directiveImportMap = /* @__PURE__ */ new WeakMap(); +const transformElement = (node, context) => { + return function postTransformElement() { + node = context.currentNode; + if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { + return; + } + const { tag, props } = node; + const isComponent = node.tagType === 1; + let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; + const isDynamicComponent = isObject$2(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; + let vnodeProps; + let vnodeChildren; + let patchFlag = 0; + let vnodeDynamicProps; + let dynamicPropNames; + let vnodeDirectives; + let shouldUseBlock = ( + // dynamic component may resolve to plain elements + isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block + // updates inside get proper isSVG flag at runtime. (#639, #643) + // This is technically web-specific, but splitting the logic out of core + // leads to too much unnecessary complexity. + (tag === "svg" || tag === "foreignObject" || tag === "math") + ); + if (props.length > 0) { + const propsBuildResult = buildProps( + node, + context, + void 0, + isComponent, + isDynamicComponent + ); + vnodeProps = propsBuildResult.props; + patchFlag = propsBuildResult.patchFlag; + dynamicPropNames = propsBuildResult.dynamicPropNames; + const directives = propsBuildResult.directives; + vnodeDirectives = directives && directives.length ? createArrayExpression( + directives.map((dir) => buildDirectiveArgs(dir, context)) + ) : void 0; + if (propsBuildResult.shouldUseBlock) { + shouldUseBlock = true; + } + } + if (node.children.length > 0) { + if (vnodeTag === KEEP_ALIVE) { + shouldUseBlock = true; + patchFlag |= 1024; + if (node.children.length > 1) { + context.onError( + createCompilerError(46, { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + }) + ); + } + } + const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling + vnodeTag !== TELEPORT && // explained above. + vnodeTag !== KEEP_ALIVE; + if (shouldBuildAsSlots) { + const { slots, hasDynamicSlots } = buildSlots(node, context); + vnodeChildren = slots; + if (hasDynamicSlots) { + patchFlag |= 1024; + } + } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { + const child = node.children[0]; + const type = child.type; + const hasDynamicTextChild = type === 5 || type === 8; + if (hasDynamicTextChild && getConstantType(child, context) === 0) { + patchFlag |= 1; + } + if (hasDynamicTextChild || type === 2) { + vnodeChildren = child; + } else { + vnodeChildren = node.children; + } + } else { + vnodeChildren = node.children; + } + } + if (dynamicPropNames && dynamicPropNames.length) { + vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); + } + node.codegenNode = createVNodeCall( + context, + vnodeTag, + vnodeProps, + vnodeChildren, + patchFlag === 0 ? void 0 : patchFlag, + vnodeDynamicProps, + vnodeDirectives, + !!shouldUseBlock, + false, + isComponent, + node.loc + ); + }; +}; +function resolveComponentType(node, context, ssr = false) { + let { tag } = node; + const isExplicitDynamic = isComponentTag(tag); + const isProp = findProp( + node, + "is", + false, + true + /* allow empty */ + ); + if (isProp) { + if (isExplicitDynamic || false) { + let exp; + if (isProp.type === 6) { + exp = isProp.value && createSimpleExpression(isProp.value.content, true); + } else { + exp = isProp.exp; + if (!exp) { + exp = createSimpleExpression(`is`, false, isProp.arg.loc); + { + exp = isProp.exp = processExpression(exp, context); + } + } + } + if (exp) { + return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ + exp + ]); + } + } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { + tag = isProp.value.content.slice(4); + } + } + const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); + if (builtIn) { + if (!ssr) context.helper(builtIn); + return builtIn; + } + { + const fromSetup = resolveSetupReference(tag, context); + if (fromSetup) { + return fromSetup; + } + const dotIndex = tag.indexOf("."); + if (dotIndex > 0) { + const ns = resolveSetupReference(tag.slice(0, dotIndex), context); + if (ns) { + return ns + tag.slice(dotIndex); + } + } + } + if (context.selfName && capitalize(camelize(tag)) === context.selfName) { + context.helper(RESOLVE_COMPONENT); + context.components.add(tag + `__self`); + return toValidAssetId(tag, `component`); + } + context.helper(RESOLVE_COMPONENT); + context.components.add(tag); + return toValidAssetId(tag, `component`); +} +function resolveSetupReference(name, context) { + const bindings = context.bindingMetadata; + if (!bindings || bindings.__isScriptSetup === false) { + return; + } + const camelName = camelize(name); + const PascalName = capitalize(camelName); + const checkType = (type) => { + if (bindings[name] === type) { + return name; + } + if (bindings[camelName] === type) { + return camelName; + } + if (bindings[PascalName] === type) { + return PascalName; + } + }; + const fromConst = checkType("setup-const") || checkType("setup-reactive-const") || checkType("literal-const"); + if (fromConst) { + return context.inline ? ( + // in inline mode, const setup bindings (e.g. imports) can be used as-is + fromConst + ) : `$setup[${JSON.stringify(fromConst)}]`; + } + const fromMaybeRef = checkType("setup-let") || checkType("setup-ref") || checkType("setup-maybe-ref"); + if (fromMaybeRef) { + return context.inline ? ( + // setup scope bindings that may be refs need to be unrefed + `${context.helperString(UNREF)}(${fromMaybeRef})` + ) : `$setup[${JSON.stringify(fromMaybeRef)}]`; + } + const fromProps = checkType("props"); + if (fromProps) { + return `${context.helperString(UNREF)}(${context.inline ? "__props" : "$props"}[${JSON.stringify(fromProps)}])`; + } +} +function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { + const { tag, loc: elementLoc, children } = node; + let properties = []; + const mergeArgs = []; + const runtimeDirectives = []; + const hasChildren = children.length > 0; + let shouldUseBlock = false; + let patchFlag = 0; + let hasRef = false; + let hasClassBinding = false; + let hasStyleBinding = false; + let hasHydrationEventBinding = false; + let hasDynamicKeys = false; + let hasVnodeHook = false; + const dynamicPropNames = []; + const pushMergeArg = (arg) => { + if (properties.length) { + mergeArgs.push( + createObjectExpression(dedupeProperties(properties), elementLoc) + ); + properties = []; + } + if (arg) mergeArgs.push(arg); + }; + const pushRefVForMarker = () => { + if (context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); + } + }; + const analyzePatchFlag = ({ key, value }) => { + if (isStaticExp(key)) { + const name = key.content; + const isEventHandler = isOn(name); + if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click + // dedicated fast path. + name.toLowerCase() !== "onclick" && // omit v-model handlers + name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks + !isReservedProp(name)) { + hasHydrationEventBinding = true; + } + if (isEventHandler && isReservedProp(name)) { + hasVnodeHook = true; + } + if (isEventHandler && value.type === 14) { + value = value.arguments[0]; + } + if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { + return; + } + if (name === "ref") { + hasRef = true; + } else if (name === "class") { + hasClassBinding = true; + } else if (name === "style") { + hasStyleBinding = true; + } else if (name !== "key" && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + } else { + hasDynamicKeys = true; + } + }; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 6) { + const { loc, name, nameLoc, value } = prop; + let isStatic = true; + if (name === "ref") { + hasRef = true; + pushRefVForMarker(); + if (value && context.inline) { + const binding = context.bindingMetadata[value.content]; + if (binding === "setup-let" || binding === "setup-ref" || binding === "setup-maybe-ref") { + isStatic = false; + properties.push( + createObjectProperty( + createSimpleExpression("ref_key", true), + createSimpleExpression(value.content, true, value.loc) + ) + ); + } + } + } + if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || false)) { + continue; + } + properties.push( + createObjectProperty( + createSimpleExpression(name, true, nameLoc), + createSimpleExpression( + value ? value.content : "", + isStatic, + value ? value.loc : loc + ) + ) + ); + } else { + const { name, arg, exp, loc, modifiers } = prop; + const isVBind = name === "bind"; + const isVOn = name === "on"; + if (name === "slot") { + if (!isComponent) { + context.onError( + createCompilerError(40, loc) + ); + } + continue; + } + if (name === "once" || name === "memo") { + continue; + } + if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || false)) { + continue; + } + if (isVOn && ssr) { + continue; + } + if ( + // #938: elements with dynamic keys should be forced into blocks + isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked + // before children + isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") + ) { + shouldUseBlock = true; + } + if (isVBind && isStaticArgOf(arg, "ref")) { + pushRefVForMarker(); + } + if (!arg && (isVBind || isVOn)) { + hasDynamicKeys = true; + if (exp) { + if (isVBind) { + pushRefVForMarker(); + pushMergeArg(); + mergeArgs.push(exp); + } else { + pushMergeArg({ + type: 14, + loc, + callee: context.helper(TO_HANDLERS), + arguments: isComponent ? [exp] : [exp, `true`] + }); + } + } else { + context.onError( + createCompilerError( + isVBind ? 34 : 35, + loc + ) + ); + } + continue; + } + if (isVBind && modifiers.some((mod) => mod.content === "prop")) { + patchFlag |= 32; + } + const directiveTransform = context.directiveTransforms[name]; + if (directiveTransform) { + const { props: props2, needRuntime } = directiveTransform(prop, node, context); + !ssr && props2.forEach(analyzePatchFlag); + if (isVOn && arg && !isStaticExp(arg)) { + pushMergeArg(createObjectExpression(props2, elementLoc)); + } else { + properties.push(...props2); + } + if (needRuntime) { + runtimeDirectives.push(prop); + if (isSymbol$1(needRuntime)) { + directiveImportMap.set(prop, needRuntime); + } + } + } else if (!isBuiltInDirective(name)) { + runtimeDirectives.push(prop); + if (hasChildren) { + shouldUseBlock = true; + } + } + } + } + let propsExpression = void 0; + if (mergeArgs.length) { + pushMergeArg(); + if (mergeArgs.length > 1) { + propsExpression = createCallExpression( + context.helper(MERGE_PROPS), + mergeArgs, + elementLoc + ); + } else { + propsExpression = mergeArgs[0]; + } + } else if (properties.length) { + propsExpression = createObjectExpression( + dedupeProperties(properties), + elementLoc + ); + } + if (hasDynamicKeys) { + patchFlag |= 16; + } else { + if (hasClassBinding && !isComponent) { + patchFlag |= 2; + } + if (hasStyleBinding && !isComponent) { + patchFlag |= 4; + } + if (dynamicPropNames.length) { + patchFlag |= 8; + } + if (hasHydrationEventBinding) { + patchFlag |= 32; + } + } + if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { + patchFlag |= 512; + } + if (!context.inSSR && propsExpression) { + switch (propsExpression.type) { + case 15: + let classKeyIndex = -1; + let styleKeyIndex = -1; + let hasDynamicKey = false; + for (let i = 0; i < propsExpression.properties.length; i++) { + const key = propsExpression.properties[i].key; + if (isStaticExp(key)) { + if (key.content === "class") { + classKeyIndex = i; + } else if (key.content === "style") { + styleKeyIndex = i; + } + } else if (!key.isHandlerKey) { + hasDynamicKey = true; + } + } + const classProp = propsExpression.properties[classKeyIndex]; + const styleProp = propsExpression.properties[styleKeyIndex]; + if (!hasDynamicKey) { + if (classProp && !isStaticExp(classProp.value)) { + classProp.value = createCallExpression( + context.helper(NORMALIZE_CLASS), + [classProp.value] + ); + } + if (styleProp && // the static style is compiled into an object, + // so use `hasStyleBinding` to ensure that it is a dynamic style binding + (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, + // v-bind:style with static literal object + styleProp.value.type === 17)) { + styleProp.value = createCallExpression( + context.helper(NORMALIZE_STYLE), + [styleProp.value] + ); + } + } else { + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [propsExpression] + ); + } + break; + case 14: + break; + default: + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [ + createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ + propsExpression + ]) + ] + ); + break; + } + } + return { + props: propsExpression, + directives: runtimeDirectives, + patchFlag, + dynamicPropNames, + shouldUseBlock + }; +} +function dedupeProperties(properties) { + const knownProps = /* @__PURE__ */ new Map(); + const deduped = []; + for (let i = 0; i < properties.length; i++) { + const prop = properties[i]; + if (prop.key.type === 8 || !prop.key.isStatic) { + deduped.push(prop); + continue; + } + const name = prop.key.content; + const existing = knownProps.get(name); + if (existing) { + if (name === "style" || name === "class" || isOn(name)) { + mergeAsArray(existing, prop); + } + } else { + knownProps.set(name, prop); + deduped.push(prop); + } + } + return deduped; +} +function mergeAsArray(existing, incoming) { + if (existing.value.type === 17) { + existing.value.elements.push(incoming.value); + } else { + existing.value = createArrayExpression( + [existing.value, incoming.value], + existing.loc + ); + } +} +function buildDirectiveArgs(dir, context) { + const dirArgs = []; + const runtime = directiveImportMap.get(dir); + if (runtime) { + dirArgs.push(context.helperString(runtime)); + } else { + const fromSetup = resolveSetupReference("v-" + dir.name, context); + if (fromSetup) { + dirArgs.push(fromSetup); + } else { + context.helper(RESOLVE_DIRECTIVE); + context.directives.add(dir.name); + dirArgs.push(toValidAssetId(dir.name, `directive`)); + } + } + const { loc } = dir; + if (dir.exp) dirArgs.push(dir.exp); + if (dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(dir.arg); + } + if (Object.keys(dir.modifiers).length) { + if (!dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(`void 0`); + } + const trueExpression = createSimpleExpression(`true`, false, loc); + dirArgs.push( + createObjectExpression( + dir.modifiers.map( + (modifier) => createObjectProperty(modifier, trueExpression) + ), + loc + ) + ); + } + return createArrayExpression(dirArgs, dir.loc); +} +function stringifyDynamicPropNames(props) { + let propsNamesString = `[`; + for (let i = 0, l = props.length; i < l; i++) { + propsNamesString += JSON.stringify(props[i]); + if (i < l - 1) propsNamesString += ", "; + } + return propsNamesString + `]`; +} +function isComponentTag(tag) { + return tag === "component" || tag === "Component"; +} + +const transformSlotOutlet = (node, context) => { + if (isSlotOutlet(node)) { + const { children, loc } = node; + const { slotName, slotProps } = processSlotOutlet(node, context); + const slotArgs = [ + context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, + slotName, + "{}", + "undefined", + "true" + ]; + let expectedLen = 2; + if (slotProps) { + slotArgs[2] = slotProps; + expectedLen = 3; + } + if (children.length) { + slotArgs[3] = createFunctionExpression([], children, false, false, loc); + expectedLen = 4; + } + if (context.scopeId && !context.slotted) { + expectedLen = 5; + } + slotArgs.splice(expectedLen); + node.codegenNode = createCallExpression( + context.helper(RENDER_SLOT), + slotArgs, + loc + ); + } +}; +function processSlotOutlet(node, context) { + let slotName = `"default"`; + let slotProps = void 0; + const nonNameProps = []; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (p.value) { + if (p.name === "name") { + slotName = JSON.stringify(p.value.content); + } else { + p.name = camelize(p.name); + nonNameProps.push(p); + } + } + } else { + if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { + if (p.exp) { + slotName = p.exp; + } else if (p.arg && p.arg.type === 4) { + const name = camelize(p.arg.content); + slotName = p.exp = createSimpleExpression(name, false, p.arg.loc); + { + slotName = p.exp = processExpression(p.exp, context); + } + } + } else { + if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { + p.arg.content = camelize(p.arg.content); + } + nonNameProps.push(p); + } + } + } + if (nonNameProps.length > 0) { + const { props, directives } = buildProps( + node, + context, + nonNameProps, + false, + false + ); + slotProps = props; + if (directives.length) { + context.onError( + createCompilerError( + 36, + directives[0].loc + ) + ); + } + } + return { + slotName, + slotProps + }; +} + +const transformOn$1 = (dir, node, context, augmentor) => { + const { loc, modifiers, arg } = dir; + if (!dir.exp && !modifiers.length) { + context.onError(createCompilerError(35, loc)); + } + let eventName; + if (arg.type === 4) { + if (arg.isStatic) { + let rawName = arg.content; + if (rawName.startsWith("vnode")) { + context.onError(createCompilerError(51, arg.loc)); + } + if (rawName.startsWith("vue:")) { + rawName = `vnode-${rawName.slice(4)}`; + } + const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( + // for non-element and vnode lifecycle event listeners, auto convert + // it to camelCase. See issue #2249 + toHandlerKey(camelize(rawName)) + ) : ( + // preserve case for plain element listeners that have uppercase + // letters, as these may be custom elements' custom events + `on:${rawName}` + ); + eventName = createSimpleExpression(eventString, true, arg.loc); + } else { + eventName = createCompoundExpression([ + `${context.helperString(TO_HANDLER_KEY)}(`, + arg, + `)` + ]); + } + } else { + eventName = arg; + eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); + eventName.children.push(`)`); + } + let exp = dir.exp; + if (exp && !exp.content.trim()) { + exp = void 0; + } + let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; + if (exp) { + const isMemberExp = isMemberExpression(exp, context); + const isInlineStatement = !(isMemberExp || isFnExpression(exp, context)); + const hasMultipleStatements = exp.content.includes(`;`); + if (context.prefixIdentifiers) { + isInlineStatement && context.addIdentifiers(`$event`); + exp = dir.exp = processExpression( + exp, + context, + false, + hasMultipleStatements + ); + isInlineStatement && context.removeIdentifiers(`$event`); + shouldCache = context.cacheHandlers && // unnecessary to cache inside v-once + !context.inVOnce && // runtime constants don't need to be cached + // (this is analyzed by compileScript in SFC <script setup>) + !(exp.type === 4 && exp.constType > 0) && // #1541 bail if this is a member exp handler passed to a component - + // we need to use the original function to preserve arity, + // e.g. <transition> relies on checking cb.length to determine + // transition end handling. Inline function is ok since its arity + // is preserved even when cached. + !(isMemberExp && node.tagType === 1) && // bail if the function references closure variables (v-for, v-slot) + // it must be passed fresh to avoid stale values. + !hasScopeRef(exp, context.identifiers); + if (shouldCache && isMemberExp) { + if (exp.type === 4) { + exp.content = `${exp.content} && ${exp.content}(...args)`; + } else { + exp.children = [...exp.children, ` && `, ...exp.children, `(...args)`]; + } + } + } + if (isInlineStatement || shouldCache && isMemberExp) { + exp = createCompoundExpression([ + `${isInlineStatement ? context.isTS ? `($event: any)` : `$event` : `${context.isTS ? ` +//@ts-ignore +` : ``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, + exp, + hasMultipleStatements ? `}` : `)` + ]); + } + } + let ret = { + props: [ + createObjectProperty( + eventName, + exp || createSimpleExpression(`() => {}`, false, loc) + ) + ] + }; + if (augmentor) { + ret = augmentor(ret); + } + if (shouldCache) { + ret.props[0].value = context.cache(ret.props[0].value); + } + ret.props.forEach((p) => p.key.isHandlerKey = true); + return ret; +}; + +const transformText = (node, context) => { + if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { + return () => { + const children = node.children; + let currentContainer = void 0; + let hasText = false; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child)) { + hasText = true; + for (let j = i + 1; j < children.length; j++) { + const next = children[j]; + if (isText$1(next)) { + if (!currentContainer) { + currentContainer = children[i] = createCompoundExpression( + [child], + child.loc + ); + } + currentContainer.children.push(` + `, next); + children.splice(j, 1); + j--; + } else { + currentContainer = void 0; + break; + } + } + } + } + if (!hasText || // if this is a plain element with a single text child, leave it + // as-is since the runtime has dedicated fast path for this by directly + // setting textContent of the element. + // for component root it's always normalized anyway. + children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 + // custom directives can potentially add DOM elements arbitrarily, + // we need to avoid setting textContent of the element at runtime + // to avoid accidentally overwriting the DOM elements added + // by the user through custom directives. + !node.props.find( + (p) => p.type === 7 && !context.directiveTransforms[p.name] + ) && // in compat mode, <template> tags with no special directives + // will be rendered as a fragment so its children must be + // converted into vnodes. + true)) { + return; + } + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child) || child.type === 8) { + const callArgs = []; + if (child.type !== 2 || child.content !== " ") { + callArgs.push(child); + } + if (!context.ssr && getConstantType(child, context) === 0) { + callArgs.push( + 1 + (` /* ${PatchFlagNames[1]} */` ) + ); + } + children[i] = { + type: 12, + content: child, + loc: child.loc, + codegenNode: createCallExpression( + context.helper(CREATE_TEXT), + callArgs + ) + }; + } + } + }; + } +}; + +const seen$1 = /* @__PURE__ */ new WeakSet(); +const transformOnce = (node, context) => { + if (node.type === 1 && findDir(node, "once", true)) { + if (seen$1.has(node) || context.inVOnce || context.inSSR) { + return; + } + seen$1.add(node); + context.inVOnce = true; + context.helper(SET_BLOCK_TRACKING); + return () => { + context.inVOnce = false; + const cur = context.currentNode; + if (cur.codegenNode) { + cur.codegenNode = context.cache( + cur.codegenNode, + true, + true + ); + } + }; + } +}; + +const transformModel$1 = (dir, node, context) => { + const { exp, arg } = dir; + if (!exp) { + context.onError( + createCompilerError(41, dir.loc) + ); + return createTransformProps(); + } + const rawExp = exp.loc.source.trim(); + const expString = exp.type === 4 ? exp.content : rawExp; + const bindingType = context.bindingMetadata[rawExp]; + if (bindingType === "props" || bindingType === "props-aliased") { + context.onError(createCompilerError(44, exp.loc)); + return createTransformProps(); + } + const maybeRef = context.inline && (bindingType === "setup-let" || bindingType === "setup-ref" || bindingType === "setup-maybe-ref"); + if (!expString.trim() || !isMemberExpression(exp, context) && !maybeRef) { + context.onError( + createCompilerError(42, exp.loc) + ); + return createTransformProps(); + } + if (context.prefixIdentifiers && isSimpleIdentifier(expString) && context.identifiers[expString]) { + context.onError( + createCompilerError(43, exp.loc) + ); + return createTransformProps(); + } + const propName = arg ? arg : createSimpleExpression("modelValue", true); + const eventName = arg ? isStaticExp(arg) ? `onUpdate:${camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; + let assignmentExp; + const eventArg = context.isTS ? `($event: any)` : `$event`; + if (maybeRef) { + if (bindingType === "setup-ref") { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + createSimpleExpression(rawExp, false, exp.loc), + `).value = $event)` + ]); + } else { + const altAssignment = bindingType === "setup-let" ? `${rawExp} = $event` : `null`; + assignmentExp = createCompoundExpression([ + `${eventArg} => (${context.helperString(IS_REF)}(${rawExp}) ? (`, + createSimpleExpression(rawExp, false, exp.loc), + `).value = $event : ${altAssignment})` + ]); + } + } else { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + exp, + `) = $event)` + ]); + } + const props = [ + // modelValue: foo + createObjectProperty(propName, dir.exp), + // "onUpdate:modelValue": $event => (foo = $event) + createObjectProperty(eventName, assignmentExp) + ]; + if (context.prefixIdentifiers && !context.inVOnce && context.cacheHandlers && !hasScopeRef(exp, context.identifiers)) { + props[1].value = context.cache(props[1].value); + } + if (dir.modifiers.length && node.tagType === 1) { + const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); + const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; + props.push( + createObjectProperty( + modifiersKey, + createSimpleExpression( + `{ ${modifiers} }`, + false, + dir.loc, + 2 + ) + ) + ); + } + return createTransformProps(props); +}; +function createTransformProps(props = []) { + return { props }; +} + +const seen = /* @__PURE__ */ new WeakSet(); +const transformMemo = (node, context) => { + if (node.type === 1) { + const dir = findDir(node, "memo"); + if (!dir || seen.has(node)) { + return; + } + seen.add(node); + return () => { + const codegenNode = node.codegenNode || context.currentNode.codegenNode; + if (codegenNode && codegenNode.type === 13) { + if (node.tagType !== 1) { + convertToBlock(codegenNode, context); + } + node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ + dir.exp, + createFunctionExpression(void 0, codegenNode), + `_cache`, + String(context.cached.length) + ]); + context.cached.push(null); + } + }; + } +}; + +function getBaseTransformPreset(prefixIdentifiers) { + return [ + [ + transformOnce, + transformIf, + transformMemo, + transformFor, + ...[], + ...prefixIdentifiers ? [ + // order is important + trackVForSlotScopes, + transformExpression + ] : [], + transformSlotOutlet, + transformElement, + trackSlotScopes, + transformText + ], + { + on: transformOn$1, + bind: transformBind, + model: transformModel$1 + } + ]; +} +function baseCompile(source, options = {}) { + const onError = options.onError || defaultOnError; + const isModuleMode = options.mode === "module"; + const prefixIdentifiers = options.prefixIdentifiers === true || isModuleMode; + if (!prefixIdentifiers && options.cacheHandlers) { + onError(createCompilerError(49)); + } + if (options.scopeId && !isModuleMode) { + onError(createCompilerError(50)); + } + const resolvedOptions = extend({}, options, { + prefixIdentifiers + }); + const ast = isString$1(source) ? baseParse(source, resolvedOptions) : source; + const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(prefixIdentifiers); + if (options.isTS) { + const { expressionPlugins } = options; + if (!expressionPlugins || !expressionPlugins.includes("typescript")) { + options.expressionPlugins = [...expressionPlugins || [], "typescript"]; + } + } + transform( + ast, + extend({}, resolvedOptions, { + nodeTransforms: [ + ...nodeTransforms, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: extend( + {}, + directiveTransforms, + options.directiveTransforms || {} + // user transforms + ) + }) + ); + return generate(ast, resolvedOptions); +} + +const BindingTypes = { + "DATA": "data", + "PROPS": "props", + "PROPS_ALIASED": "props-aliased", + "SETUP_LET": "setup-let", + "SETUP_CONST": "setup-const", + "SETUP_REACTIVE_CONST": "setup-reactive-const", + "SETUP_MAYBE_REF": "setup-maybe-ref", + "SETUP_REF": "setup-ref", + "OPTIONS": "options", + "LITERAL_CONST": "literal-const" +}; + +const noopDirectiveTransform = () => ({ props: [] }); + +const V_MODEL_RADIO = Symbol(`vModelRadio` ); +const V_MODEL_CHECKBOX = Symbol( + `vModelCheckbox` +); +const V_MODEL_TEXT = Symbol(`vModelText` ); +const V_MODEL_SELECT = Symbol( + `vModelSelect` +); +const V_MODEL_DYNAMIC = Symbol( + `vModelDynamic` +); +const V_ON_WITH_MODIFIERS = Symbol( + `vOnModifiersGuard` +); +const V_ON_WITH_KEYS = Symbol( + `vOnKeysGuard` +); +const V_SHOW = Symbol(`vShow` ); +const TRANSITION = Symbol(`Transition` ); +const TRANSITION_GROUP = Symbol( + `TransitionGroup` +); +registerRuntimeHelpers({ + [V_MODEL_RADIO]: `vModelRadio`, + [V_MODEL_CHECKBOX]: `vModelCheckbox`, + [V_MODEL_TEXT]: `vModelText`, + [V_MODEL_SELECT]: `vModelSelect`, + [V_MODEL_DYNAMIC]: `vModelDynamic`, + [V_ON_WITH_MODIFIERS]: `withModifiers`, + [V_ON_WITH_KEYS]: `withKeys`, + [V_SHOW]: `vShow`, + [TRANSITION]: `Transition`, + [TRANSITION_GROUP]: `TransitionGroup` +}); + +const parserOptions = { + parseMode: "html", + isVoidTag, + isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + isPreTag: (tag) => tag === "pre", + isIgnoreNewlineTag: (tag) => tag === "pre" || tag === "textarea", + decodeEntities: void 0, + isBuiltInComponent: (tag) => { + if (tag === "Transition" || tag === "transition") { + return TRANSITION; + } else if (tag === "TransitionGroup" || tag === "transition-group") { + return TRANSITION_GROUP; + } + }, + // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher + getNamespace(tag, parent, rootNamespace) { + let ns = parent ? parent.ns : rootNamespace; + if (parent && ns === 2) { + if (parent.tag === "annotation-xml") { + if (tag === "svg") { + return 1; + } + if (parent.props.some( + (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") + )) { + ns = 0; + } + } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { + ns = 0; + } + } else if (parent && ns === 1) { + if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { + ns = 0; + } + } + if (ns === 0) { + if (tag === "svg") { + return 1; + } + if (tag === "math") { + return 2; + } + } + return ns; + } +}; + +const transformStyle = (node) => { + if (node.type === 1) { + node.props.forEach((p, i) => { + if (p.type === 6 && p.name === "style" && p.value) { + node.props[i] = { + type: 7, + name: `bind`, + arg: createSimpleExpression(`style`, true, p.loc), + exp: parseInlineCSS(p.value.content, p.loc), + modifiers: [], + loc: p.loc + }; + } + }); + } +}; +const parseInlineCSS = (cssText, loc) => { + const normalized = parseStringStyle(cssText); + return createSimpleExpression( + JSON.stringify(normalized), + false, + loc, + 3 + ); +}; + +function createDOMCompilerError(code, loc) { + return createCompilerError( + code, + loc, + DOMErrorMessages + ); +} +const DOMErrorCodes = { + "X_V_HTML_NO_EXPRESSION": 53, + "53": "X_V_HTML_NO_EXPRESSION", + "X_V_HTML_WITH_CHILDREN": 54, + "54": "X_V_HTML_WITH_CHILDREN", + "X_V_TEXT_NO_EXPRESSION": 55, + "55": "X_V_TEXT_NO_EXPRESSION", + "X_V_TEXT_WITH_CHILDREN": 56, + "56": "X_V_TEXT_WITH_CHILDREN", + "X_V_MODEL_ON_INVALID_ELEMENT": 57, + "57": "X_V_MODEL_ON_INVALID_ELEMENT", + "X_V_MODEL_ARG_ON_ELEMENT": 58, + "58": "X_V_MODEL_ARG_ON_ELEMENT", + "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59, + "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", + "X_V_MODEL_UNNECESSARY_VALUE": 60, + "60": "X_V_MODEL_UNNECESSARY_VALUE", + "X_V_SHOW_NO_EXPRESSION": 61, + "61": "X_V_SHOW_NO_EXPRESSION", + "X_TRANSITION_INVALID_CHILDREN": 62, + "62": "X_TRANSITION_INVALID_CHILDREN", + "X_IGNORED_SIDE_EFFECT_TAG": 63, + "63": "X_IGNORED_SIDE_EFFECT_TAG", + "__EXTEND_POINT__": 64, + "64": "__EXTEND_POINT__" +}; +const DOMErrorMessages = { + [53]: `v-html is missing expression.`, + [54]: `v-html will override element children.`, + [55]: `v-text is missing expression.`, + [56]: `v-text will override element children.`, + [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, + [58]: `v-model argument is not supported on plain elements.`, + [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, + [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, + [61]: `v-show is missing expression.`, + [62]: `<Transition> expects exactly one child element or component.`, + [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` +}; + +const transformVHtml = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(53, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(54, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`innerHTML`, true, loc), + exp || createSimpleExpression("", true) + ) + ] + }; +}; + +const transformVText = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(55, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(56, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`textContent`, true), + exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression( + context.helperString(TO_DISPLAY_STRING), + [exp], + loc + ) : createSimpleExpression("", true) + ) + ] + }; +}; + +const transformModel = (dir, node, context) => { + const baseResult = transformModel$1(dir, node, context); + if (!baseResult.props.length || node.tagType === 1) { + return baseResult; + } + if (dir.arg) { + context.onError( + createDOMCompilerError( + 58, + dir.arg.loc + ) + ); + } + function checkDuplicatedValue() { + const value = findDir(node, "bind"); + if (value && isStaticArgOf(value.arg, "value")) { + context.onError( + createDOMCompilerError( + 60, + value.loc + ) + ); + } + } + const { tag } = node; + const isCustomElement = context.isCustomElement(tag); + if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { + let directiveToUse = V_MODEL_TEXT; + let isInvalidType = false; + if (tag === "input" || isCustomElement) { + const type = findProp(node, `type`); + if (type) { + if (type.type === 7) { + directiveToUse = V_MODEL_DYNAMIC; + } else if (type.value) { + switch (type.value.content) { + case "radio": + directiveToUse = V_MODEL_RADIO; + break; + case "checkbox": + directiveToUse = V_MODEL_CHECKBOX; + break; + case "file": + isInvalidType = true; + context.onError( + createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + default: + checkDuplicatedValue(); + break; + } + } + } else if (hasDynamicKeyVBind(node)) { + directiveToUse = V_MODEL_DYNAMIC; + } else { + checkDuplicatedValue(); + } + } else if (tag === "select") { + directiveToUse = V_MODEL_SELECT; + } else { + checkDuplicatedValue(); + } + if (!isInvalidType) { + baseResult.needRuntime = context.helper(directiveToUse); + } + } else { + context.onError( + createDOMCompilerError( + 57, + dir.loc + ) + ); + } + baseResult.props = baseResult.props.filter( + (p) => !(p.key.type === 4 && p.key.content === "modelValue") + ); + return baseResult; +}; + +const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`); +const isNonKeyModifier = /* @__PURE__ */ makeMap( + // event propagation management + `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` +); +const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right"); +const isKeyboardEvent = /* @__PURE__ */ makeMap(`onkeyup,onkeydown,onkeypress`); +const resolveModifiers = (key, modifiers, context, loc) => { + const keyModifiers = []; + const nonKeyModifiers = []; + const eventOptionModifiers = []; + for (let i = 0; i < modifiers.length; i++) { + const modifier = modifiers[i].content; + if (isEventOptionModifier(modifier)) { + eventOptionModifiers.push(modifier); + } else { + if (maybeKeyModifier(modifier)) { + if (isStaticExp(key)) { + if (isKeyboardEvent(key.content.toLowerCase())) { + keyModifiers.push(modifier); + } else { + nonKeyModifiers.push(modifier); + } + } else { + keyModifiers.push(modifier); + nonKeyModifiers.push(modifier); + } + } else { + if (isNonKeyModifier(modifier)) { + nonKeyModifiers.push(modifier); + } else { + keyModifiers.push(modifier); + } + } + } + } + return { + keyModifiers, + nonKeyModifiers, + eventOptionModifiers + }; +}; +const transformClick = (key, event) => { + const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick"; + return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([ + `(`, + key, + `) === "onClick" ? "${event}" : (`, + key, + `)` + ]) : key; +}; +const transformOn = (dir, node, context) => { + return transformOn$1(dir, node, context, (baseResult) => { + const { modifiers } = dir; + if (!modifiers.length) return baseResult; + let { key, value: handlerExp } = baseResult.props[0]; + const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); + if (nonKeyModifiers.includes("right")) { + key = transformClick(key, `onContextmenu`); + } + if (nonKeyModifiers.includes("middle")) { + key = transformClick(key, `onMouseup`); + } + if (nonKeyModifiers.length) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ + handlerExp, + JSON.stringify(nonKeyModifiers) + ]); + } + if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard + (!isStaticExp(key) || isKeyboardEvent(key.content.toLowerCase()))) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ + handlerExp, + JSON.stringify(keyModifiers) + ]); + } + if (eventOptionModifiers.length) { + const modifierPostfix = eventOptionModifiers.map(capitalize).join(""); + key = isStaticExp(key) ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); + } + return { + props: [createObjectProperty(key, handlerExp)] + }; + }); +}; + +const transformShow = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(61, loc) + ); + } + return { + props: [], + needRuntime: context.helper(V_SHOW) + }; +}; + +const transformTransition = (node, context) => { + if (node.type === 1 && node.tagType === 1) { + const component = context.isBuiltInComponent(node.tag); + if (component === TRANSITION) { + return () => { + if (!node.children.length) { + return; + } + if (hasMultipleChildren(node)) { + context.onError( + createDOMCompilerError( + 62, + { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + } + ) + ); + } + const child = node.children[0]; + if (child.type === 1) { + for (const p of child.props) { + if (p.type === 7 && p.name === "show") { + node.props.push({ + type: 6, + name: "persisted", + nameLoc: node.loc, + value: void 0, + loc: node.loc + }); + } + } + } + }; + } + } +}; +function hasMultipleChildren(node) { + const children = node.children = node.children.filter( + (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()) + ); + const child = children[0]; + return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren); +} + +const expReplaceRE = /__VUE_EXP_START__(.*?)__VUE_EXP_END__/g; +const stringifyStatic = (children, context, parent) => { + if (context.scopes.vSlot > 0) { + return; + } + const isParentCached = parent.type === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !isArray$3(parent.codegenNode.children) && parent.codegenNode.children.type === 20; + let nc = 0; + let ec = 0; + const currentChunk = []; + const stringifyCurrentChunk = (currentIndex) => { + if (nc >= 20 || ec >= 5) { + const staticCall = createCallExpression(context.helper(CREATE_STATIC), [ + JSON.stringify( + currentChunk.map((node) => stringifyNode(node, context)).join("") + ).replace(expReplaceRE, `" + $1 + "`), + // the 2nd argument indicates the number of DOM nodes this static vnode + // will insert / hydrate + String(currentChunk.length) + ]); + const deleteCount = currentChunk.length - 1; + if (isParentCached) { + children.splice( + currentIndex - currentChunk.length, + currentChunk.length, + // @ts-expect-error + staticCall + ); + } else { + currentChunk[0].codegenNode.value = staticCall; + if (currentChunk.length > 1) { + children.splice(currentIndex - currentChunk.length + 1, deleteCount); + const cacheIndex = context.cached.indexOf( + currentChunk[currentChunk.length - 1].codegenNode + ); + if (cacheIndex > -1) { + for (let i2 = cacheIndex; i2 < context.cached.length; i2++) { + const c = context.cached[i2]; + if (c) c.index -= deleteCount; + } + context.cached.splice(cacheIndex - deleteCount + 1, deleteCount); + } + } + } + return deleteCount; + } + return 0; + }; + let i = 0; + for (; i < children.length; i++) { + const child = children[i]; + const isCached = isParentCached || getCachedNode(child); + if (isCached) { + const result = analyzeNode(child); + if (result) { + nc += result[0]; + ec += result[1]; + currentChunk.push(child); + continue; + } + } + i -= stringifyCurrentChunk(i); + nc = 0; + ec = 0; + currentChunk.length = 0; + } + stringifyCurrentChunk(i); +}; +const getCachedNode = (node) => { + if ((node.type === 1 && node.tagType === 0 || node.type === 12) && node.codegenNode && node.codegenNode.type === 20) { + return node.codegenNode; + } +}; +const dataAriaRE = /^(data|aria)-/; +const isStringifiableAttr = (name, ns) => { + return (ns === 0 ? isKnownHtmlAttr(name) : ns === 1 ? isKnownSvgAttr(name) : ns === 2 ? isKnownMathMLAttr(name) : false) || dataAriaRE.test(name); +}; +const isNonStringifiable = /* @__PURE__ */ makeMap( + `caption,thead,tr,th,tbody,td,tfoot,colgroup,col` +); +function analyzeNode(node) { + if (node.type === 1 && isNonStringifiable(node.tag)) { + return false; + } + if (node.type === 12) { + return [1, 0]; + } + let nc = 1; + let ec = node.props.length > 0 ? 1 : 0; + let bailed = false; + const bail = () => { + bailed = true; + return false; + }; + function walk(node2) { + const isOptionTag = node2.tag === "option" && node2.ns === 0; + for (let i = 0; i < node2.props.length; i++) { + const p = node2.props[i]; + if (p.type === 6 && !isStringifiableAttr(p.name, node2.ns)) { + return bail(); + } + if (p.type === 7 && p.name === "bind") { + if (p.arg && (p.arg.type === 8 || p.arg.isStatic && !isStringifiableAttr(p.arg.content, node2.ns))) { + return bail(); + } + if (p.exp && (p.exp.type === 8 || p.exp.constType < 3)) { + return bail(); + } + if (isOptionTag && isStaticArgOf(p.arg, "value") && p.exp && !p.exp.isStatic) { + return bail(); + } + } + } + for (let i = 0; i < node2.children.length; i++) { + nc++; + const child = node2.children[i]; + if (child.type === 1) { + if (child.props.length > 0) { + ec++; + } + walk(child); + if (bailed) { + return false; + } + } + } + return true; + } + return walk(node) ? [nc, ec] : false; +} +function stringifyNode(node, context) { + if (isString$1(node)) { + return node; + } + if (isSymbol$1(node)) { + return ``; + } + switch (node.type) { + case 1: + return stringifyElement(node, context); + case 2: + return escapeHtml(node.content); + case 3: + return `<!--${escapeHtml(node.content)}-->`; + case 5: + return escapeHtml(toDisplayString(evaluateConstant(node.content))); + case 8: + return escapeHtml(evaluateConstant(node)); + case 12: + return stringifyNode(node.content, context); + default: + return ""; + } +} +function stringifyElement(node, context) { + let res = `<${node.tag}`; + let innerHTML = ""; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + res += ` ${p.name}`; + if (p.value) { + res += `="${escapeHtml(p.value.content)}"`; + } + } else if (p.type === 7) { + if (p.name === "bind") { + const exp = p.exp; + if (exp.content[0] === "_") { + res += ` ${p.arg.content}="__VUE_EXP_START__${exp.content}__VUE_EXP_END__"`; + continue; + } + if (isBooleanAttr(p.arg.content) && exp.content === "false") { + continue; + } + let evaluated = evaluateConstant(exp); + if (evaluated != null) { + const arg = p.arg && p.arg.content; + if (arg === "class") { + evaluated = normalizeClass(evaluated); + } else if (arg === "style") { + evaluated = stringifyStyle(normalizeStyle(evaluated)); + } + res += ` ${p.arg.content}="${escapeHtml( + evaluated + )}"`; + } + } else if (p.name === "html") { + innerHTML = evaluateConstant(p.exp); + } else if (p.name === "text") { + innerHTML = escapeHtml( + toDisplayString(evaluateConstant(p.exp)) + ); + } + } + } + if (context.scopeId) { + res += ` ${context.scopeId}`; + } + res += `>`; + if (innerHTML) { + res += innerHTML; + } else { + for (let i = 0; i < node.children.length; i++) { + res += stringifyNode(node.children[i], context); + } + } + if (!isVoidTag(node.tag)) { + res += `</${node.tag}>`; + } + return res; +} +function evaluateConstant(exp) { + if (exp.type === 4) { + return new Function(`return (${exp.content})`)(); + } else { + let res = ``; + exp.children.forEach((c) => { + if (isString$1(c) || isSymbol$1(c)) { + return; + } + if (c.type === 2) { + res += c.content; + } else if (c.type === 5) { + res += toDisplayString(evaluateConstant(c.content)); + } else { + res += evaluateConstant(c); + } + }); + return res; + } +} + +const ignoreSideEffectTags = (node, context) => { + if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { + context.onError( + createDOMCompilerError( + 63, + node.loc + ) + ); + context.removeNode(); + } +}; + +function isValidHTMLNesting(parent, child) { + if (parent in onlyValidChildren) { + return onlyValidChildren[parent].has(child); + } + if (child in onlyValidParents) { + return onlyValidParents[child].has(parent); + } + if (parent in knownInvalidChildren) { + if (knownInvalidChildren[parent].has(child)) return false; + } + if (child in knownInvalidParents) { + if (knownInvalidParents[child].has(parent)) return false; + } + return true; +} +const headings = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]); +const emptySet = /* @__PURE__ */ new Set([]); +const onlyValidChildren = { + head: /* @__PURE__ */ new Set([ + "base", + "basefront", + "bgsound", + "link", + "meta", + "title", + "noscript", + "noframes", + "style", + "script", + "template" + ]), + optgroup: /* @__PURE__ */ new Set(["option"]), + select: /* @__PURE__ */ new Set(["optgroup", "option", "hr"]), + // table + table: /* @__PURE__ */ new Set(["caption", "colgroup", "tbody", "tfoot", "thead"]), + tr: /* @__PURE__ */ new Set(["td", "th"]), + colgroup: /* @__PURE__ */ new Set(["col"]), + tbody: /* @__PURE__ */ new Set(["tr"]), + thead: /* @__PURE__ */ new Set(["tr"]), + tfoot: /* @__PURE__ */ new Set(["tr"]), + // these elements can not have any children elements + script: emptySet, + iframe: emptySet, + option: emptySet, + textarea: emptySet, + style: emptySet, + title: emptySet +}; +const onlyValidParents = { + // sections + html: emptySet, + body: /* @__PURE__ */ new Set(["html"]), + head: /* @__PURE__ */ new Set(["html"]), + // table + td: /* @__PURE__ */ new Set(["tr"]), + colgroup: /* @__PURE__ */ new Set(["table"]), + caption: /* @__PURE__ */ new Set(["table"]), + tbody: /* @__PURE__ */ new Set(["table"]), + tfoot: /* @__PURE__ */ new Set(["table"]), + col: /* @__PURE__ */ new Set(["colgroup"]), + th: /* @__PURE__ */ new Set(["tr"]), + thead: /* @__PURE__ */ new Set(["table"]), + tr: /* @__PURE__ */ new Set(["tbody", "thead", "tfoot"]), + // data list + dd: /* @__PURE__ */ new Set(["dl", "div"]), + dt: /* @__PURE__ */ new Set(["dl", "div"]), + // other + figcaption: /* @__PURE__ */ new Set(["figure"]), + // li: new Set(["ul", "ol"]), + summary: /* @__PURE__ */ new Set(["details"]), + area: /* @__PURE__ */ new Set(["map"]) +}; +const knownInvalidChildren = { + p: /* @__PURE__ */ new Set([ + "address", + "article", + "aside", + "blockquote", + "center", + "details", + "dialog", + "dir", + "div", + "dl", + "fieldset", + "figure", + "footer", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "header", + "hgroup", + "hr", + "li", + "main", + "nav", + "menu", + "ol", + "p", + "pre", + "section", + "table", + "ul" + ]), + svg: /* @__PURE__ */ new Set([ + "b", + "blockquote", + "br", + "code", + "dd", + "div", + "dl", + "dt", + "em", + "embed", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "hr", + "i", + "img", + "li", + "menu", + "meta", + "ol", + "p", + "pre", + "ruby", + "s", + "small", + "span", + "strong", + "sub", + "sup", + "table", + "u", + "ul", + "var" + ]) +}; +const knownInvalidParents = { + a: /* @__PURE__ */ new Set(["a"]), + button: /* @__PURE__ */ new Set(["button"]), + dd: /* @__PURE__ */ new Set(["dd", "dt"]), + dt: /* @__PURE__ */ new Set(["dd", "dt"]), + form: /* @__PURE__ */ new Set(["form"]), + li: /* @__PURE__ */ new Set(["li"]), + h1: headings, + h2: headings, + h3: headings, + h4: headings, + h5: headings, + h6: headings +}; + +const validateHtmlNesting = (node, context) => { + if (node.type === 1 && node.tagType === 0 && context.parent && context.parent.type === 1 && context.parent.tagType === 0 && !isValidHTMLNesting(context.parent.tag, node.tag)) { + const error = new SyntaxError( + `<${node.tag}> cannot be child of <${context.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.` + ); + error.loc = node.loc; + context.onWarn(error); + } +}; + +const DOMNodeTransforms = [ + transformStyle, + ...[transformTransition, validateHtmlNesting] +]; +const DOMDirectiveTransforms = { + cloak: noopDirectiveTransform, + html: transformVHtml, + text: transformVText, + model: transformModel, + // override compiler-core + on: transformOn, + // override compiler-core + show: transformShow +}; +function compile$1(src, options = {}) { + return baseCompile( + src, + extend({}, parserOptions, options, { + nodeTransforms: [ + // ignore <script> and <tag> + // this is not put inside DOMNodeTransforms because that list is used + // by compiler-ssr to generate vnode fallback branches + ignoreSideEffectTags, + ...DOMNodeTransforms, + ...options.nodeTransforms || [] + ], + directiveTransforms: extend( + {}, + DOMDirectiveTransforms, + options.directiveTransforms || {} + ), + transformHoist: stringifyStatic + }) + ); +} +function parse$3(template, options = {}) { + return baseParse(template, extend({}, parserOptions, options)); +} + +var CompilerDOM = /*#__PURE__*/Object.freeze({ + __proto__: null, + BASE_TRANSITION: BASE_TRANSITION, + BindingTypes: BindingTypes, + CAMELIZE: CAMELIZE, + CAPITALIZE: CAPITALIZE, + CREATE_BLOCK: CREATE_BLOCK, + CREATE_COMMENT: CREATE_COMMENT, + CREATE_ELEMENT_BLOCK: CREATE_ELEMENT_BLOCK, + CREATE_ELEMENT_VNODE: CREATE_ELEMENT_VNODE, + CREATE_SLOTS: CREATE_SLOTS, + CREATE_STATIC: CREATE_STATIC, + CREATE_TEXT: CREATE_TEXT, + CREATE_VNODE: CREATE_VNODE, + CompilerDeprecationTypes: CompilerDeprecationTypes, + ConstantTypes: ConstantTypes, + DOMDirectiveTransforms: DOMDirectiveTransforms, + DOMErrorCodes: DOMErrorCodes, + DOMErrorMessages: DOMErrorMessages, + DOMNodeTransforms: DOMNodeTransforms, + ElementTypes: ElementTypes, + ErrorCodes: ErrorCodes, + FRAGMENT: FRAGMENT, + GUARD_REACTIVE_PROPS: GUARD_REACTIVE_PROPS, + IS_MEMO_SAME: IS_MEMO_SAME, + IS_REF: IS_REF, + KEEP_ALIVE: KEEP_ALIVE, + MERGE_PROPS: MERGE_PROPS, + NORMALIZE_CLASS: NORMALIZE_CLASS, + NORMALIZE_PROPS: NORMALIZE_PROPS, + NORMALIZE_STYLE: NORMALIZE_STYLE, + Namespaces: Namespaces, + NodeTypes: NodeTypes, + OPEN_BLOCK: OPEN_BLOCK, + POP_SCOPE_ID: POP_SCOPE_ID, + PUSH_SCOPE_ID: PUSH_SCOPE_ID, + RENDER_LIST: RENDER_LIST, + RENDER_SLOT: RENDER_SLOT, + RESOLVE_COMPONENT: RESOLVE_COMPONENT, + RESOLVE_DIRECTIVE: RESOLVE_DIRECTIVE, + RESOLVE_DYNAMIC_COMPONENT: RESOLVE_DYNAMIC_COMPONENT, + RESOLVE_FILTER: RESOLVE_FILTER, + SET_BLOCK_TRACKING: SET_BLOCK_TRACKING, + SUSPENSE: SUSPENSE, + TELEPORT: TELEPORT, + TO_DISPLAY_STRING: TO_DISPLAY_STRING, + TO_HANDLERS: TO_HANDLERS, + TO_HANDLER_KEY: TO_HANDLER_KEY, + TRANSITION: TRANSITION, + TRANSITION_GROUP: TRANSITION_GROUP, + TS_NODE_TYPES: TS_NODE_TYPES, + UNREF: UNREF, + V_MODEL_CHECKBOX: V_MODEL_CHECKBOX, + V_MODEL_DYNAMIC: V_MODEL_DYNAMIC, + V_MODEL_RADIO: V_MODEL_RADIO, + V_MODEL_SELECT: V_MODEL_SELECT, + V_MODEL_TEXT: V_MODEL_TEXT, + V_ON_WITH_KEYS: V_ON_WITH_KEYS, + V_ON_WITH_MODIFIERS: V_ON_WITH_MODIFIERS, + V_SHOW: V_SHOW, + WITH_CTX: WITH_CTX, + WITH_DIRECTIVES: WITH_DIRECTIVES, + WITH_MEMO: WITH_MEMO, + advancePositionWithClone: advancePositionWithClone, + advancePositionWithMutation: advancePositionWithMutation, + assert: assert, + baseCompile: baseCompile, + baseParse: baseParse, + buildDirectiveArgs: buildDirectiveArgs, + buildProps: buildProps, + buildSlots: buildSlots, + checkCompatEnabled: checkCompatEnabled, + compile: compile$1, + convertToBlock: convertToBlock, + createArrayExpression: createArrayExpression, + createAssignmentExpression: createAssignmentExpression, + createBlockStatement: createBlockStatement, + createCacheExpression: createCacheExpression, + createCallExpression: createCallExpression, + createCompilerError: createCompilerError, + createCompoundExpression: createCompoundExpression, + createConditionalExpression: createConditionalExpression, + createDOMCompilerError: createDOMCompilerError, + createForLoopParams: createForLoopParams, + createFunctionExpression: createFunctionExpression, + createIfStatement: createIfStatement, + createInterpolation: createInterpolation, + createObjectExpression: createObjectExpression, + createObjectProperty: createObjectProperty, + createReturnStatement: createReturnStatement, + createRoot: createRoot, + createSequenceExpression: createSequenceExpression, + createSimpleExpression: createSimpleExpression, + createStructuralDirectiveTransform: createStructuralDirectiveTransform, + createTemplateLiteral: createTemplateLiteral, + createTransformContext: createTransformContext, + createVNodeCall: createVNodeCall, + errorMessages: errorMessages$1, + extractIdentifiers: extractIdentifiers$1, + findDir: findDir, + findProp: findProp, + forAliasRE: forAliasRE, + generate: generate, + generateCodeFrame: generateCodeFrame, + getBaseTransformPreset: getBaseTransformPreset, + getConstantType: getConstantType, + getMemoedVNodeCall: getMemoedVNodeCall, + getVNodeBlockHelper: getVNodeBlockHelper, + getVNodeHelper: getVNodeHelper, + hasDynamicKeyVBind: hasDynamicKeyVBind, + hasScopeRef: hasScopeRef, + helperNameMap: helperNameMap, + injectProp: injectProp, + isCoreComponent: isCoreComponent, + isFnExpression: isFnExpression, + isFnExpressionBrowser: isFnExpressionBrowser, + isFnExpressionNode: isFnExpressionNode, + isFunctionType: isFunctionType, + isInDestructureAssignment: isInDestructureAssignment, + isInNewExpression: isInNewExpression, + isMemberExpression: isMemberExpression, + isMemberExpressionBrowser: isMemberExpressionBrowser, + isMemberExpressionNode: isMemberExpressionNode, + isReferencedIdentifier: isReferencedIdentifier, + isSimpleIdentifier: isSimpleIdentifier, + isSlotOutlet: isSlotOutlet, + isStaticArgOf: isStaticArgOf, + isStaticExp: isStaticExp, + isStaticProperty: isStaticProperty, + isStaticPropertyKey: isStaticPropertyKey, + isTemplateNode: isTemplateNode, + isText: isText$1, + isVSlot: isVSlot, + locStub: locStub, + noopDirectiveTransform: noopDirectiveTransform, + parse: parse$3, + parserOptions: parserOptions, + processExpression: processExpression, + processFor: processFor, + processIf: processIf, + processSlotOutlet: processSlotOutlet, + registerRuntimeHelpers: registerRuntimeHelpers, + resolveComponentType: resolveComponentType, + stringifyExpression: stringifyExpression, + toValidAssetId: toValidAssetId, + trackSlotScopes: trackSlotScopes, + trackVForSlotScopes: trackVForSlotScopes, + transform: transform, + transformBind: transformBind, + transformElement: transformElement, + transformExpression: transformExpression, + transformModel: transformModel$1, + transformOn: transformOn$1, + transformStyle: transformStyle, + traverseNode: traverseNode, + unwrapTSNode: unwrapTSNode, + walkBlockDeclarations: walkBlockDeclarations, + walkFunctionParams: walkFunctionParams, + walkIdentifiers: walkIdentifiers, + warnDeprecation: warnDeprecation +}); + +var hashSum; +var hasRequiredHashSum; + +function requireHashSum () { + if (hasRequiredHashSum) return hashSum; + hasRequiredHashSum = 1; + + function pad (hash, len) { + while (hash.length < len) { + hash = '0' + hash; + } + return hash; + } + + function fold (hash, text) { + var i; + var chr; + var len; + if (text.length === 0) { + return hash; + } + for (i = 0, len = text.length; i < len; i++) { + chr = text.charCodeAt(i); + hash = ((hash << 5) - hash) + chr; + hash |= 0; + } + return hash < 0 ? hash * -2 : hash; + } + + function foldObject (hash, o, seen) { + return Object.keys(o).sort().reduce(foldKey, hash); + function foldKey (hash, key) { + return foldValue(hash, o[key], key, seen); + } + } + + function foldValue (input, value, key, seen) { + var hash = fold(fold(fold(input, key), toString(value)), typeof value); + if (value === null) { + return fold(hash, 'null'); + } + if (value === undefined) { + return fold(hash, 'undefined'); + } + if (typeof value === 'object' || typeof value === 'function') { + if (seen.indexOf(value) !== -1) { + return fold(hash, '[Circular]' + key); + } + seen.push(value); + + var objHash = foldObject(hash, value, seen); + + if (!('valueOf' in value) || typeof value.valueOf !== 'function') { + return objHash; + } + + try { + return fold(objHash, String(value.valueOf())) + } catch (err) { + return fold(objHash, '[valueOf exception]' + (err.stack || err.message)) + } + } + return fold(hash, value.toString()); + } + + function toString (o) { + return Object.prototype.toString.call(o); + } + + function sum (o) { + return pad(foldValue(0, o, '', []).toString(16), 8); + } + + hashSum = sum; + return hashSum; +} + +var hashSumExports = /*@__PURE__*/ requireHashSum(); +var hash = /*@__PURE__*/getDefaultExportFromCjs(hashSumExports); + +const CSS_VARS_HELPER = `useCssVars`; +function genCssVarsFromList(vars, id, isProd, isSSR = false) { + return `{ + ${vars.map( + (key) => `"${isSSR ? `--` : ``}${genVarName(id, key, isProd, isSSR)}": (${key})` + ).join(",\n ")} +}`; +} +function genVarName(id, raw, isProd, isSSR = false) { + if (isProd) { + return hash(id + raw); + } else { + return `${id}-${getEscapedCssVarName(raw, isSSR)}`; + } +} +function normalizeExpression(exp) { + exp = exp.trim(); + if (exp[0] === `'` && exp[exp.length - 1] === `'` || exp[0] === `"` && exp[exp.length - 1] === `"`) { + return exp.slice(1, -1); + } + return exp; +} +const vBindRE = /v-bind\s*\(/g; +function parseCssVars(sfc) { + const vars = []; + sfc.styles.forEach((style) => { + let match; + const content = style.content.replace(/\/\*([\s\S]*?)\*\/|\/\/.*/g, ""); + while (match = vBindRE.exec(content)) { + const start = match.index + match[0].length; + const end = lexBinding(content, start); + if (end !== null) { + const variable = normalizeExpression(content.slice(start, end)); + if (!vars.includes(variable)) { + vars.push(variable); + } + } + } + }); + return vars; +} +function lexBinding(content, start) { + let state = 0 /* inParens */; + let parenDepth = 0; + for (let i = start; i < content.length; i++) { + const char = content.charAt(i); + switch (state) { + case 0 /* inParens */: + if (char === `'`) { + state = 1 /* inSingleQuoteString */; + } else if (char === `"`) { + state = 2 /* inDoubleQuoteString */; + } else if (char === `(`) { + parenDepth++; + } else if (char === `)`) { + if (parenDepth > 0) { + parenDepth--; + } else { + return i; + } + } + break; + case 1 /* inSingleQuoteString */: + if (char === `'`) { + state = 0 /* inParens */; + } + break; + case 2 /* inDoubleQuoteString */: + if (char === `"`) { + state = 0 /* inParens */; + } + break; + } + } + return null; +} +const cssVarsPlugin = (opts) => { + const { id, isProd } = opts; + return { + postcssPlugin: "vue-sfc-vars", + Declaration(decl) { + const value = decl.value; + if (vBindRE.test(value)) { + vBindRE.lastIndex = 0; + let transformed = ""; + let lastIndex = 0; + let match; + while (match = vBindRE.exec(value)) { + const start = match.index + match[0].length; + const end = lexBinding(value, start); + if (end !== null) { + const variable = normalizeExpression(value.slice(start, end)); + transformed += value.slice(lastIndex, match.index) + `var(--${genVarName(id, variable, isProd)})`; + lastIndex = end + 1; + } + } + decl.value = transformed + value.slice(lastIndex); + } + } + }; +}; +cssVarsPlugin.postcss = true; +function genCssVarsCode(vars, bindings, id, isProd) { + const varsExp = genCssVarsFromList(vars, id, isProd); + const exp = createSimpleExpression(varsExp, false); + const context = createTransformContext(createRoot([]), { + prefixIdentifiers: true, + inline: true, + bindingMetadata: bindings.__isScriptSetup === false ? void 0 : bindings + }); + const transformed = processExpression(exp, context); + const transformedString = transformed.type === 4 ? transformed.content : transformed.children.map((c) => { + return typeof c === "string" ? c : c.content; + }).join(""); + return `_${CSS_VARS_HELPER}(_ctx => (${transformedString}))`; +} +function genNormalScriptCssVarsCode(cssVars, bindings, id, isProd, defaultVar) { + return ` +import { ${CSS_VARS_HELPER} as _${CSS_VARS_HELPER} } from 'vue' +const __injectCSSVars__ = () => { +${genCssVarsCode( + cssVars, + bindings, + id, + isProd + )}} +const __setup__ = ${defaultVar}.setup +${defaultVar}.setup = __setup__ + ? (props, ctx) => { __injectCSSVars__();return __setup__(props, ctx) } + : __injectCSSVars__ +`; +} + +var global$1 = (typeof global !== "undefined" ? global : + typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : {}); + +// shim for using process in browser +// based off https://github.com/defunctzombie/node-process/blob/master/browser.js + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +var cachedSetTimeout = defaultSetTimout; +var cachedClearTimeout = defaultClearTimeout; +if (typeof global$1.setTimeout === 'function') { + cachedSetTimeout = setTimeout; +} +if (typeof global$1.clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; +} + +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} +function nextTick(fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +} +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +var title = 'browser'; +var platform = 'browser'; +var browser = true; +var env = {}; +var argv = []; +var version$1 = ''; // empty string to avoid regexp issues +var versions = {}; +var release = {}; +var config = {}; + +function noop() {} + +var on = noop; +var addListener = noop; +var once = noop; +var off = noop; +var removeListener = noop; +var removeAllListeners = noop; +var emit = noop; + +function binding(name) { + throw new Error('process.binding is not supported'); +} + +function cwd () { return '/' } +function chdir (dir) { + throw new Error('process.chdir is not supported'); +}function umask() { return 0; } + +// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js +var performance = global$1.performance || {}; +var performanceNow = + performance.now || + performance.mozNow || + performance.msNow || + performance.oNow || + performance.webkitNow || + function(){ return (new Date()).getTime() }; + +// generate timestamp or delta +// see http://nodejs.org/api/process.html#process_process_hrtime +function hrtime(previousTimestamp){ + var clocktime = performanceNow.call(performance)*1e-3; + var seconds = Math.floor(clocktime); + var nanoseconds = Math.floor((clocktime%1)*1e9); + if (previousTimestamp) { + seconds = seconds - previousTimestamp[0]; + nanoseconds = nanoseconds - previousTimestamp[1]; + if (nanoseconds<0) { + seconds--; + nanoseconds += 1e9; + } + } + return [seconds,nanoseconds] +} + +var startTime = new Date(); +function uptime() { + var currentTime = new Date(); + var dif = currentTime - startTime; + return dif / 1000; +} + +var browser$1 = { + nextTick: nextTick, + title: title, + browser: browser, + env: env, + argv: argv, + version: version$1, + versions: versions, + on: on, + addListener: addListener, + once: once, + off: off, + removeListener: removeListener, + removeAllListeners: removeAllListeners, + emit: emit, + binding: binding, + cwd: cwd, + chdir: chdir, + umask: umask, + hrtime: hrtime, + platform: platform, + release: release, + config: config, + uptime: uptime +}; + +function createCache(max = 500) { + { + return /* @__PURE__ */ new Map(); + } +} + +function isImportUsed(local, sfc) { + return resolveTemplateUsedIdentifiers(sfc).has(local); +} +const templateUsageCheckCache = createCache(); +function resolveTemplateUsedIdentifiers(sfc) { + const { content, ast } = sfc.template; + const cached = templateUsageCheckCache.get(content); + if (cached) { + return cached; + } + const ids = /* @__PURE__ */ new Set(); + ast.children.forEach(walk); + function walk(node) { + var _a; + switch (node.type) { + case 1: + let tag = node.tag; + if (tag.includes(".")) tag = tag.split(".")[0].trim(); + if (!parserOptions.isNativeTag(tag) && !parserOptions.isBuiltInComponent(tag)) { + ids.add(camelize(tag)); + ids.add(capitalize(camelize(tag))); + } + for (let i = 0; i < node.props.length; i++) { + const prop = node.props[i]; + if (prop.type === 7) { + if (!isBuiltInDirective(prop.name)) { + ids.add(`v${capitalize(camelize(prop.name))}`); + } + if (prop.arg && !prop.arg.isStatic) { + extractIdentifiers(ids, prop.arg); + } + if (prop.name === "for") { + extractIdentifiers(ids, prop.forParseResult.source); + } else if (prop.exp) { + extractIdentifiers(ids, prop.exp); + } else if (prop.name === "bind" && !prop.exp) { + ids.add(camelize(prop.arg.content)); + } + } + if (prop.type === 6 && prop.name === "ref" && ((_a = prop.value) == null ? void 0 : _a.content)) { + ids.add(prop.value.content); + } + } + node.children.forEach(walk); + break; + case 5: + extractIdentifiers(ids, node.content); + break; + } + } + templateUsageCheckCache.set(content, ids); + return ids; +} +function extractIdentifiers(ids, node) { + if (node.ast) { + walkIdentifiers(node.ast, (n) => ids.add(n.name)); + } else if (node.ast === null) { + ids.add(node.content); + } +} + +var __defProp$a = Object.defineProperty; +var __defProps$9 = Object.defineProperties; +var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$a = Object.getOwnPropertySymbols; +var __hasOwnProp$a = Object.prototype.hasOwnProperty; +var __propIsEnum$a = Object.prototype.propertyIsEnumerable; +var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$a = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$a.call(b, prop)) + __defNormalProp$a(a, prop, b[prop]); + if (__getOwnPropSymbols$a) + for (var prop of __getOwnPropSymbols$a(b)) { + if (__propIsEnum$a.call(b, prop)) + __defNormalProp$a(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b)); +const DEFAULT_FILENAME = "anonymous.vue"; +const parseCache$1 = createCache(); +function parse$2(source, options = {}) { + var _a; + const sourceKey = genCacheKey(source, __spreadProps$9(__spreadValues$a({}, options), { + compiler: { parse: (_a = options.compiler) == null ? void 0 : _a.parse } + })); + const cache = parseCache$1.get(sourceKey); + if (cache) { + return cache; + } + const { + sourceMap = true, + filename = DEFAULT_FILENAME, + sourceRoot = "", + pad = false, + ignoreEmpty = true, + compiler = CompilerDOM, + templateParseOptions = {} + } = options; + const descriptor = { + filename, + source, + template: null, + script: null, + scriptSetup: null, + styles: [], + customBlocks: [], + cssVars: [], + slotted: false, + shouldForceReload: (prevImports) => hmrShouldReload(prevImports, descriptor) + }; + const errors = []; + const ast = compiler.parse(source, __spreadProps$9(__spreadValues$a({ + parseMode: "sfc", + prefixIdentifiers: true + }, templateParseOptions), { + onError: (e) => { + errors.push(e); + } + })); + ast.children.forEach((node) => { + if (node.type !== 1) { + return; + } + if (ignoreEmpty && node.tag !== "template" && isEmpty(node) && !hasSrc(node)) { + return; + } + switch (node.tag) { + case "template": + if (!descriptor.template) { + const templateBlock = descriptor.template = createBlock( + node, + source, + false + ); + if (!templateBlock.attrs.src) { + templateBlock.ast = createRoot(node.children, source); + } + if (templateBlock.attrs.functional) { + const err = new SyntaxError( + `<template functional> is no longer supported in Vue 3, since functional components no longer have significant performance difference from stateful ones. Just use a normal <template> instead.` + ); + err.loc = node.props.find( + (p) => p.type === 6 && p.name === "functional" + ).loc; + errors.push(err); + } + } else { + errors.push(createDuplicateBlockError(node)); + } + break; + case "script": + const scriptBlock = createBlock(node, source, pad); + const isSetup = !!scriptBlock.attrs.setup; + if (isSetup && !descriptor.scriptSetup) { + descriptor.scriptSetup = scriptBlock; + break; + } + if (!isSetup && !descriptor.script) { + descriptor.script = scriptBlock; + break; + } + errors.push(createDuplicateBlockError(node, isSetup)); + break; + case "style": + const styleBlock = createBlock(node, source, pad); + if (styleBlock.attrs.vars) { + errors.push( + new SyntaxError( + `<style vars> has been replaced by a new proposal: https://github.com/vuejs/rfcs/pull/231` + ) + ); + } + descriptor.styles.push(styleBlock); + break; + default: + descriptor.customBlocks.push(createBlock(node, source, pad)); + break; + } + }); + if (!descriptor.template && !descriptor.script && !descriptor.scriptSetup) { + errors.push( + new SyntaxError( + `At least one <template> or <script> is required in a single file component. ${descriptor.filename}` + ) + ); + } + if (descriptor.scriptSetup) { + if (descriptor.scriptSetup.src) { + errors.push( + new SyntaxError( + `<script setup> cannot use the "src" attribute because its syntax will be ambiguous outside of the component.` + ) + ); + descriptor.scriptSetup = null; + } + if (descriptor.script && descriptor.script.src) { + errors.push( + new SyntaxError( + `<script> cannot use the "src" attribute when <script setup> is also present because they must be processed together.` + ) + ); + descriptor.script = null; + } + } + let templateColumnOffset = 0; + if (descriptor.template && (descriptor.template.lang === "pug" || descriptor.template.lang === "jade")) { + [descriptor.template.content, templateColumnOffset] = dedent( + descriptor.template.content + ); + } + if (sourceMap) { + const genMap = (block, columnOffset = 0) => { + if (block && !block.src) { + block.map = generateSourceMap( + filename, + source, + block.content, + sourceRoot, + !pad || block.type === "template" ? block.loc.start.line - 1 : 0, + columnOffset + ); + } + }; + genMap(descriptor.template, templateColumnOffset); + genMap(descriptor.script); + descriptor.styles.forEach((s) => genMap(s)); + descriptor.customBlocks.forEach((s) => genMap(s)); + } + descriptor.cssVars = parseCssVars(descriptor); + const slottedRE = /(?:::v-|:)slotted\(/; + descriptor.slotted = descriptor.styles.some( + (s) => s.scoped && slottedRE.test(s.content) + ); + const result = { + descriptor, + errors + }; + parseCache$1.set(sourceKey, result); + return result; +} +function createDuplicateBlockError(node, isScriptSetup = false) { + const err = new SyntaxError( + `Single file component can contain only one <${node.tag}${isScriptSetup ? ` setup` : ``}> element` + ); + err.loc = node.loc; + return err; +} +function createBlock(node, source, pad) { + const type = node.tag; + const loc = node.innerLoc; + const attrs = {}; + const block = { + type, + content: source.slice(loc.start.offset, loc.end.offset), + loc, + attrs + }; + if (pad) { + block.content = padContent(source, block, pad) + block.content; + } + node.props.forEach((p) => { + if (p.type === 6) { + const name = p.name; + attrs[name] = p.value ? p.value.content || true : true; + if (name === "lang") { + block.lang = p.value && p.value.content; + } else if (name === "src") { + block.src = p.value && p.value.content; + } else if (type === "style") { + if (name === "scoped") { + block.scoped = true; + } else if (name === "module") { + block.module = attrs[name]; + } + } else if (type === "script" && name === "setup") { + block.setup = attrs.setup; + } + } + }); + return block; +} +const splitRE = /\r?\n/g; +const emptyRE = /^(?:\/\/)?\s*$/; +const replaceRE = /./g; +function generateSourceMap(filename, source, generated, sourceRoot, lineOffset, columnOffset) { + const map = new sourceMapExports.SourceMapGenerator({ + file: filename.replace(/\\/g, "/"), + sourceRoot: sourceRoot.replace(/\\/g, "/") + }); + map.setSourceContent(filename, source); + map._sources.add(filename); + generated.split(splitRE).forEach((line, index) => { + if (!emptyRE.test(line)) { + const originalLine = index + 1 + lineOffset; + const generatedLine = index + 1; + for (let i = 0; i < line.length; i++) { + if (!/\s/.test(line[i])) { + map._mappings.add({ + originalLine, + originalColumn: i + columnOffset, + generatedLine, + generatedColumn: i, + source: filename, + name: null + }); + } + } + } + }); + return map.toJSON(); +} +function padContent(content, block, pad) { + content = content.slice(0, block.loc.start.offset); + if (pad === "space") { + return content.replace(replaceRE, " "); + } else { + const offset = content.split(splitRE).length; + const padChar = block.type === "script" && !block.lang ? "//\n" : "\n"; + return Array(offset).join(padChar); + } +} +function hasSrc(node) { + return node.props.some((p) => { + if (p.type !== 6) { + return false; + } + return p.name === "src"; + }); +} +function isEmpty(node) { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (child.type !== 2 || child.content.trim() !== "") { + return false; + } + } + return true; +} +function hmrShouldReload(prevImports, next) { + if (!next.scriptSetup || next.scriptSetup.lang !== "ts" && next.scriptSetup.lang !== "tsx") { + return false; + } + for (const key in prevImports) { + if (!prevImports[key].isUsedInTemplate && isImportUsed(key, next)) { + return true; + } + } + return false; +} +function dedent(s) { + const lines = s.split("\n"); + const minIndent = lines.reduce(function(minIndent2, line) { + var _a, _b; + if (line.trim() === "") { + return minIndent2; + } + const indent = ((_b = (_a = line.match(/^\s*/)) == null ? void 0 : _a[0]) == null ? void 0 : _b.length) || 0; + return Math.min(indent, minIndent2); + }, Infinity); + if (minIndent === 0) { + return [s, minIndent]; + } + return [ + lines.map(function(line) { + return line.slice(minIndent); + }).join("\n"), + minIndent + ]; +} + +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +// resolves . and .. elements in a path array with directory names there +// must be no slashes, empty elements, or device names (c:\) in the array +// (so also no leading and trailing slashes - it does not distinguish +// relative and absolute paths) +function normalizeArray(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); + } + } + + return parts; +} + +// Split a filename into [root, dir, basename, ext], unix version +// 'root' is just a slash, or nothing. +var splitPathRe = + /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; +var splitPath = function(filename) { + return splitPathRe.exec(filename).slice(1); +}; + +// path.resolve([from ...], to) +// posix version +function resolve() { + var resolvedPath = '', + resolvedAbsolute = false; + + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : '/'; + + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + continue; + } + + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } + + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + + // Normalize the path + resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); + + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; +} +// path.normalize(path) +// posix version +function normalize$1(path) { + var isPathAbsolute = isAbsolute(path), + trailingSlash = substr(path, -1) === '/'; + + // Normalize the path + path = normalizeArray(filter(path.split('/'), function(p) { + return !!p; + }), !isPathAbsolute).join('/'); + + if (!path && !isPathAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + + return (isPathAbsolute ? '/' : '') + path; +} +// posix version +function isAbsolute(path) { + return path.charAt(0) === '/'; +} + +// posix version +function join() { + var paths = Array.prototype.slice.call(arguments, 0); + return normalize$1(filter(paths, function(p, index) { + if (typeof p !== 'string') { + throw new TypeError('Arguments to path.join must be strings'); + } + return p; + }).join('/')); +} + + +// path.relative(from, to) +// posix version +function relative(from, to) { + from = resolve(from).substr(1); + to = resolve(to).substr(1); + + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + + return outputParts.join('/'); +} + +var sep = '/'; +var delimiter$1 = ':'; + +function dirname(path) { + var result = splitPath(path), + root = result[0], + dir = result[1]; + + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } + + return root + dir; +} + +function basename(path, ext) { + var f = splitPath(path)[2]; + // TODO: make this comparison case-insensitive on windows? + if (ext && f.substr(-1 * ext.length) === ext) { + f = f.substr(0, f.length - ext.length); + } + return f; +} + + +function extname(path) { + return splitPath(path)[3]; +} +var path = { + extname: extname, + basename: basename, + dirname: dirname, + sep: sep, + delimiter: delimiter$1, + relative: relative, + join: join, + isAbsolute: isAbsolute, + normalize: normalize$1, + resolve: resolve +}; +function filter (xs, f) { + if (xs.filter) return xs.filter(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + if (f(xs[i], i, xs)) res.push(xs[i]); + } + return res; +} + +// String.prototype.substr - negative index don't work in IE8 +var substr = 'ab'.substr(-1) === 'b' ? + function (str, start, len) { return str.substr(start, len) } : + function (str, start, len) { + if (start < 0) start = str.length + start; + return str.substr(start, len); + } +; + +var _polyfillNode_path = /*#__PURE__*/Object.freeze({ + __proto__: null, + basename: basename, + default: path, + delimiter: delimiter$1, + dirname: dirname, + extname: extname, + isAbsolute: isAbsolute, + join: join, + normalize: normalize$1, + relative: relative, + resolve: resolve, + sep: sep +}); + +/*! https://mths.be/punycode v1.4.1 by @mathias */ + + +/** Highest positive signed 32-bit float value */ +var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 + +/** Bootstring parameters */ +var base = 36; +var tMin = 1; +var tMax = 26; +var skew = 38; +var damp = 700; +var initialBias = 72; +var initialN = 128; // 0x80 +var delimiter = '-'; // '\x2D' +var regexNonASCII = /[^\x20-\x7E]/; // unprintable ASCII chars + non-ASCII chars +var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators + +/** Error messages */ +var errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' +}; + +/** Convenience shortcuts */ +var baseMinusTMin = base - tMin; +var floor = Math.floor; +var stringFromCharCode = String.fromCharCode; + +/*--------------------------------------------------------------------------*/ + +/** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ +function error(type) { + throw new RangeError(errors[type]); +} + +/** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ +function map$1(array, fn) { + var length = array.length; + var result = []; + while (length--) { + result[length] = fn(array[length]); + } + return result; +} + +/** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ +function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map$1(labels, fn).join('.'); + return result + encoded; +} + +/** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see <https://mathiasbynens.be/notes/javascript-encoding> + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ +function ucs2decode(string) { + var output = [], + counter = 0, + length = string.length, + value, + extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} + +/** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ +function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); +} + +/** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ +function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for ( /* no initialization */ ; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); +} + +/** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ +function encode$1(input) { + var n, + delta, + handledCPCount, + basicLength, + bias, + j, + m, + q, + k, + t, + currentValue, + output = [], + /** `inputLength` will hold the number of code points in `input`. */ + inputLength, + /** Cached calculation results */ + handledCPCountPlusOne, + baseMinusT, + qMinusT; + + // Convert the input in UCS-2 to Unicode + input = ucs2decode(input); + + // Cache the length + inputLength = input.length; + + // Initialize the state + n = initialN; + delta = 0; + bias = initialBias; + + // Handle the basic code points + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + handledCPCount = basicLength = output.length; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string - if it is not empty - with a delimiter + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + for (m = maxInt, j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, + // but guard against overflow + handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + + if (currentValue == n) { + // Represent delta as a generalized variable-length integer + for (q = delta, k = base; /* no condition */ ; k += base) { + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + qMinusT = q - t; + baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); +} + +/** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ +function toASCII(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) ? + 'xn--' + encode$1(string) : + string; + }); +} + +var lookup = []; +var revLookup = []; +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array; +var inited = false; +function init () { + inited = true; + var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i]; + revLookup[code.charCodeAt(i)] = i; + } + + revLookup['-'.charCodeAt(0)] = 62; + revLookup['_'.charCodeAt(0)] = 63; +} + +function toByteArray (b64) { + if (!inited) { + init(); + } + var i, j, l, tmp, placeHolders, arr; + var len = b64.length; + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0; + + // base64 is 4/3 + up to two characters of the original data + arr = new Arr(len * 3 / 4 - placeHolders); + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? len - 4 : len; + + var L = 0; + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]; + arr[L++] = (tmp >> 16) & 0xFF; + arr[L++] = (tmp >> 8) & 0xFF; + arr[L++] = tmp & 0xFF; + } + + if (placeHolders === 2) { + tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4); + arr[L++] = tmp & 0xFF; + } else if (placeHolders === 1) { + tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2); + arr[L++] = (tmp >> 8) & 0xFF; + arr[L++] = tmp & 0xFF; + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp; + var output = []; + for (var i = start; i < end; i += 3) { + tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]); + output.push(tripletToBase64(tmp)); + } + return output.join('') +} + +function fromByteArray (uint8) { + if (!inited) { + init(); + } + var tmp; + var len = uint8.length; + var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes + var output = ''; + var parts = []; + var maxChunkLength = 16383; // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))); + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1]; + output += lookup[tmp >> 2]; + output += lookup[(tmp << 4) & 0x3F]; + output += '=='; + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + (uint8[len - 1]); + output += lookup[tmp >> 10]; + output += lookup[(tmp >> 4) & 0x3F]; + output += lookup[(tmp << 2) & 0x3F]; + output += '='; + } + + parts.push(output); + + return parts.join('') +} + +function read (buffer, offset, isLE, mLen, nBytes) { + var e, m; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = -7; + var i = isLE ? (nBytes - 1) : 0; + var d = isLE ? -1 : 1; + var s = buffer[offset + i]; + + i += d; + + e = s & ((1 << (-nBits)) - 1); + s >>= (-nBits); + nBits += eLen; + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1); + e >>= (-nBits); + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen); + e = e - eBias; + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +function write (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0); + var i = isLE ? 0 : (nBytes - 1); + var d = isLE ? 1 : -1; + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; + + value = Math.abs(value); + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0; + e = eMax; + } else { + e = Math.floor(Math.log(value) / Math.LN2); + if (value * (c = Math.pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * Math.pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen); + e = e + eBias; + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); + e = 0; + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m; + eLen += mLen; + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128; +} + +var toString$1 = {}.toString; + +var isArray$2 = Array.isArray || function (arr) { + return toString$1.call(arr) == '[object Array]'; +}; + +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> + * @license MIT + */ +/* eslint-disable no-proto */ + + +var INSPECT_MAX_BYTES = 50; + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * + * Note: + * + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. + */ +Buffer$1.TYPED_ARRAY_SUPPORT = global$1.TYPED_ARRAY_SUPPORT !== undefined + ? global$1.TYPED_ARRAY_SUPPORT + : true; + +/* + * Export kMaxLength after typed array support is determined. + */ +kMaxLength(); + +function kMaxLength () { + return Buffer$1.TYPED_ARRAY_SUPPORT + ? 0x7fffffff + : 0x3fffffff +} + +function createBuffer (that, length) { + if (kMaxLength() < length) { + throw new RangeError('Invalid typed array length') + } + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = new Uint8Array(length); + that.__proto__ = Buffer$1.prototype; + } else { + // Fallback: Return an object instance of the Buffer class + if (that === null) { + that = new Buffer$1(length); + } + that.length = length; + } + + return that +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer$1 (arg, encodingOrOffset, length) { + if (!Buffer$1.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer$1)) { + return new Buffer$1(arg, encodingOrOffset, length) + } + + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new Error( + 'If encoding is specified then the first argument must be a string' + ) + } + return allocUnsafe(this, arg) + } + return from(this, arg, encodingOrOffset, length) +} + +Buffer$1.poolSize = 8192; // not used by this implementation + +// TODO: Legacy, not needed anymore. Remove in next major version. +Buffer$1._augment = function (arr) { + arr.__proto__ = Buffer$1.prototype; + return arr +}; + +function from (that, value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } + + if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { + return fromArrayBuffer(that, value, encodingOrOffset, length) + } + + if (typeof value === 'string') { + return fromString(that, value, encodingOrOffset) + } + + return fromObject(that, value) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer$1.from = function (value, encodingOrOffset, length) { + return from(null, value, encodingOrOffset, length) +}; + +if (Buffer$1.TYPED_ARRAY_SUPPORT) { + Buffer$1.prototype.__proto__ = Uint8Array.prototype; + Buffer$1.__proto__ = Uint8Array; + if (typeof Symbol !== 'undefined' && Symbol.species && + Buffer$1[Symbol.species] === Buffer$1) ; +} + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number') + } else if (size < 0) { + throw new RangeError('"size" argument must not be negative') + } +} + +function alloc (that, size, fill, encoding) { + assertSize(size); + if (size <= 0) { + return createBuffer(that, size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(that, size).fill(fill, encoding) + : createBuffer(that, size).fill(fill) + } + return createBuffer(that, size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer$1.alloc = function (size, fill, encoding) { + return alloc(null, size, fill, encoding) +}; + +function allocUnsafe (that, size) { + assertSize(size); + that = createBuffer(that, size < 0 ? 0 : checked(size) | 0); + if (!Buffer$1.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < size; ++i) { + that[i] = 0; + } + } + return that +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer$1.allocUnsafe = function (size) { + return allocUnsafe(null, size) +}; +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer$1.allocUnsafeSlow = function (size) { + return allocUnsafe(null, size) +}; + +function fromString (that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8'; + } + + if (!Buffer$1.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } + + var length = byteLength(string, encoding) | 0; + that = createBuffer(that, length); + + var actual = that.write(string, encoding); + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + that = that.slice(0, actual); + } + + return that +} + +function fromArrayLike (that, array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0; + that = createBuffer(that, length); + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255; + } + return that +} + +function fromArrayBuffer (that, array, byteOffset, length) { + array.byteLength; // this throws if `array` is not a valid ArrayBuffer + + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('\'offset\' is out of bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('\'length\' is out of bounds') + } + + if (byteOffset === undefined && length === undefined) { + array = new Uint8Array(array); + } else if (length === undefined) { + array = new Uint8Array(array, byteOffset); + } else { + array = new Uint8Array(array, byteOffset, length); + } + + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = array; + that.__proto__ = Buffer$1.prototype; + } else { + // Fallback: Return an object instance of the Buffer class + that = fromArrayLike(that, array); + } + return that +} + +function fromObject (that, obj) { + if (internalIsBuffer(obj)) { + var len = checked(obj.length) | 0; + that = createBuffer(that, len); + + if (that.length === 0) { + return that + } + + obj.copy(that, 0, 0, len); + return that + } + + if (obj) { + if ((typeof ArrayBuffer !== 'undefined' && + obj.buffer instanceof ArrayBuffer) || 'length' in obj) { + if (typeof obj.length !== 'number' || isnan(obj.length)) { + return createBuffer(that, 0) + } + return fromArrayLike(that, obj) + } + + if (obj.type === 'Buffer' && isArray$2(obj.data)) { + return fromArrayLike(that, obj.data) + } + } + + throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') +} + +function checked (length) { + // Note: cannot use `length < kMaxLength()` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + kMaxLength().toString(16) + ' bytes') + } + return length | 0 +} +Buffer$1.isBuffer = isBuffer$1; +function internalIsBuffer (b) { + return !!(b != null && b._isBuffer) +} + +Buffer$1.compare = function compare (a, b) { + if (!internalIsBuffer(a) || !internalIsBuffer(b)) { + throw new TypeError('Arguments must be Buffers') + } + + if (a === b) return 0 + + var x = a.length; + var y = b.length; + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i]; + y = b[i]; + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +}; + +Buffer$1.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +}; + +Buffer$1.concat = function concat (list, length) { + if (!isArray$2(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer$1.alloc(0) + } + + var i; + if (length === undefined) { + length = 0; + for (i = 0; i < list.length; ++i) { + length += list[i].length; + } + } + + var buffer = Buffer$1.allocUnsafe(length); + var pos = 0; + for (i = 0; i < list.length; ++i) { + var buf = list[i]; + if (!internalIsBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos); + pos += buf.length; + } + return buffer +}; + +function byteLength (string, encoding) { + if (internalIsBuffer(string)) { + return string.length + } + if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && + (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + string = '' + string; + } + + var len = string.length; + if (len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false; + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + case undefined: + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) return utf8ToBytes(string).length // assume utf8 + encoding = ('' + encoding).toLowerCase(); + loweredCase = true; + } + } +} +Buffer$1.byteLength = byteLength; + +function slowToString (encoding, start, end) { + var loweredCase = false; + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0; + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length; + } + + if (end <= 0) { + return '' + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0; + start >>>= 0; + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8'; + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase(); + loweredCase = true; + } + } +} + +// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect +// Buffer instances. +Buffer$1.prototype._isBuffer = true; + +function swap (b, n, m) { + var i = b[n]; + b[n] = b[m]; + b[m] = i; +} + +Buffer$1.prototype.swap16 = function swap16 () { + var len = this.length; + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1); + } + return this +}; + +Buffer$1.prototype.swap32 = function swap32 () { + var len = this.length; + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3); + swap(this, i + 1, i + 2); + } + return this +}; + +Buffer$1.prototype.swap64 = function swap64 () { + var len = this.length; + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7); + swap(this, i + 1, i + 6); + swap(this, i + 2, i + 5); + swap(this, i + 3, i + 4); + } + return this +}; + +Buffer$1.prototype.toString = function toString () { + var length = this.length | 0; + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +}; + +Buffer$1.prototype.equals = function equals (b) { + if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer$1.compare(this, b) === 0 +}; + +Buffer$1.prototype.inspect = function inspect () { + var str = ''; + var max = INSPECT_MAX_BYTES; + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' '); + if (this.length > max) str += ' ... '; + } + return '<Buffer ' + str + '>' +}; + +Buffer$1.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (!internalIsBuffer(target)) { + throw new TypeError('Argument must be a Buffer') + } + + if (start === undefined) { + start = 0; + } + if (end === undefined) { + end = target ? target.length : 0; + } + if (thisStart === undefined) { + thisStart = 0; + } + if (thisEnd === undefined) { + thisEnd = this.length; + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0; + end >>>= 0; + thisStart >>>= 0; + thisEnd >>>= 0; + + if (this === target) return 0 + + var x = thisEnd - thisStart; + var y = end - start; + var len = Math.min(x, y); + + var thisCopy = this.slice(thisStart, thisEnd); + var targetCopy = target.slice(start, end); + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i]; + y = targetCopy[i]; + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +}; + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset; + byteOffset = 0; + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff; + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000; + } + byteOffset = +byteOffset; // Coerce to Number. + if (isNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1); + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset; + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1; + } else if (byteOffset < 0) { + if (dir) byteOffset = 0; + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer$1.from(val, encoding); + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (internalIsBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF; // Search for a byte value [0-255] + if (Buffer$1.TYPED_ARRAY_SUPPORT && + typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1; + var arrLength = arr.length; + var valLength = val.length; + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase(); + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2; + arrLength /= 2; + valLength /= 2; + byteOffset /= 2; + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i; + if (dir) { + var foundIndex = -1; + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i; + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex; + foundIndex = -1; + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength; + for (i = byteOffset; i >= 0; i--) { + var found = true; + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false; + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer$1.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +}; + +Buffer$1.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +}; + +Buffer$1.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +}; + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0; + var remaining = buf.length - offset; + if (!length) { + length = remaining; + } else { + length = Number(length); + if (length > remaining) { + length = remaining; + } + } + + // must be an even number of digits + var strLen = string.length; + if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2; + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16); + if (isNaN(parsed)) return i + buf[offset + i] = parsed; + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer$1.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8'; + length = this.length; + offset = 0; + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset; + length = this.length; + offset = 0; + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0; + if (isFinite(length)) { + length = length | 0; + if (encoding === undefined) encoding = 'utf8'; + } else { + encoding = length; + length = undefined; + } + // legacy write(string, encoding, offset, length) - remove in v0.13 + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + var remaining = this.length - offset; + if (length === undefined || length > remaining) length = remaining; + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8'; + + var loweredCase = false; + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase(); + loweredCase = true; + } + } +}; + +Buffer$1.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +}; + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return fromByteArray(buf) + } else { + return fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end); + var res = []; + + var i = start; + while (i < end) { + var firstByte = buf[i]; + var codePoint = null; + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1; + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint; + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte; + } + break + case 2: + secondByte = buf[i + 1]; + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F); + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint; + } + } + break + case 3: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F); + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint; + } + } + break + case 4: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + fourthByte = buf[i + 3]; + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F); + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint; + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD; + bytesPerSequence = 1; + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000; + res.push(codePoint >>> 10 & 0x3FF | 0xD800); + codePoint = 0xDC00 | codePoint & 0x3FF; + } + + res.push(codePoint); + i += bytesPerSequence; + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000; + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length; + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = ''; + var i = 0; + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ); + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = ''; + end = Math.min(buf.length, end); + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F); + } + return ret +} + +function latin1Slice (buf, start, end) { + var ret = ''; + end = Math.min(buf.length, end); + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]); + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length; + + if (!start || start < 0) start = 0; + if (!end || end < 0 || end > len) end = len; + + var out = ''; + for (var i = start; i < end; ++i) { + out += toHex(buf[i]); + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end); + var res = ''; + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); + } + return res +} + +Buffer$1.prototype.slice = function slice (start, end) { + var len = this.length; + start = ~~start; + end = end === undefined ? len : ~~end; + + if (start < 0) { + start += len; + if (start < 0) start = 0; + } else if (start > len) { + start = len; + } + + if (end < 0) { + end += len; + if (end < 0) end = 0; + } else if (end > len) { + end = len; + } + + if (end < start) end = start; + + var newBuf; + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + newBuf = this.subarray(start, end); + newBuf.__proto__ = Buffer$1.prototype; + } else { + var sliceLen = end - start; + newBuf = new Buffer$1(sliceLen, undefined); + for (var i = 0; i < sliceLen; ++i) { + newBuf[i] = this[i + start]; + } + } + + return newBuf +}; + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer$1.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + + var val = this[offset]; + var mul = 1; + var i = 0; + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul; + } + + return val +}; + +Buffer$1.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) { + checkOffset(offset, byteLength, this.length); + } + + var val = this[offset + --byteLength]; + var mul = 1; + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul; + } + + return val +}; + +Buffer$1.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length); + return this[offset] +}; + +Buffer$1.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + return this[offset] | (this[offset + 1] << 8) +}; + +Buffer$1.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + return (this[offset] << 8) | this[offset + 1] +}; + +Buffer$1.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +}; + +Buffer$1.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +}; + +Buffer$1.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + + var val = this[offset]; + var mul = 1; + var i = 0; + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul; + } + mul *= 0x80; + + if (val >= mul) val -= Math.pow(2, 8 * byteLength); + + return val +}; + +Buffer$1.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + + var i = byteLength; + var mul = 1; + var val = this[offset + --i]; + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul; + } + mul *= 0x80; + + if (val >= mul) val -= Math.pow(2, 8 * byteLength); + + return val +}; + +Buffer$1.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length); + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +}; + +Buffer$1.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + var val = this[offset] | (this[offset + 1] << 8); + return (val & 0x8000) ? val | 0xFFFF0000 : val +}; + +Buffer$1.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + var val = this[offset + 1] | (this[offset] << 8); + return (val & 0x8000) ? val | 0xFFFF0000 : val +}; + +Buffer$1.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +}; + +Buffer$1.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +}; + +Buffer$1.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return read(this, offset, true, 23, 4) +}; + +Buffer$1.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return read(this, offset, false, 23, 4) +}; + +Buffer$1.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length); + return read(this, offset, true, 52, 8) +}; + +Buffer$1.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length); + return read(this, offset, false, 52, 8) +}; + +function checkInt (buf, value, offset, ext, max, min) { + if (!internalIsBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer$1.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1; + checkInt(this, value, offset, byteLength, maxBytes, 0); + } + + var mul = 1; + var i = 0; + this[offset] = value & 0xFF; + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF; + } + + return offset + byteLength +}; + +Buffer$1.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1; + checkInt(this, value, offset, byteLength, maxBytes, 0); + } + + var i = byteLength - 1; + var mul = 1; + this[offset + i] = value & 0xFF; + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF; + } + + return offset + byteLength +}; + +Buffer$1.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0); + if (!Buffer$1.TYPED_ARRAY_SUPPORT) value = Math.floor(value); + this[offset] = (value & 0xff); + return offset + 1 +}; + +function objectWriteUInt16 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1; + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8; + } +} + +Buffer$1.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff); + this[offset + 1] = (value >>> 8); + } else { + objectWriteUInt16(this, value, offset, true); + } + return offset + 2 +}; + +Buffer$1.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8); + this[offset + 1] = (value & 0xff); + } else { + objectWriteUInt16(this, value, offset, false); + } + return offset + 2 +}; + +function objectWriteUInt32 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1; + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff; + } +} + +Buffer$1.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24); + this[offset + 2] = (value >>> 16); + this[offset + 1] = (value >>> 8); + this[offset] = (value & 0xff); + } else { + objectWriteUInt32(this, value, offset, true); + } + return offset + 4 +}; + +Buffer$1.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24); + this[offset + 1] = (value >>> 16); + this[offset + 2] = (value >>> 8); + this[offset + 3] = (value & 0xff); + } else { + objectWriteUInt32(this, value, offset, false); + } + return offset + 4 +}; + +Buffer$1.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1); + + checkInt(this, value, offset, byteLength, limit - 1, -limit); + } + + var i = 0; + var mul = 1; + var sub = 0; + this[offset] = value & 0xFF; + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1; + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF; + } + + return offset + byteLength +}; + +Buffer$1.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1); + + checkInt(this, value, offset, byteLength, limit - 1, -limit); + } + + var i = byteLength - 1; + var mul = 1; + var sub = 0; + this[offset + i] = value & 0xFF; + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1; + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF; + } + + return offset + byteLength +}; + +Buffer$1.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80); + if (!Buffer$1.TYPED_ARRAY_SUPPORT) value = Math.floor(value); + if (value < 0) value = 0xff + value + 1; + this[offset] = (value & 0xff); + return offset + 1 +}; + +Buffer$1.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff); + this[offset + 1] = (value >>> 8); + } else { + objectWriteUInt16(this, value, offset, true); + } + return offset + 2 +}; + +Buffer$1.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8); + this[offset + 1] = (value & 0xff); + } else { + objectWriteUInt16(this, value, offset, false); + } + return offset + 2 +}; + +Buffer$1.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff); + this[offset + 1] = (value >>> 8); + this[offset + 2] = (value >>> 16); + this[offset + 3] = (value >>> 24); + } else { + objectWriteUInt32(this, value, offset, true); + } + return offset + 4 +}; + +Buffer$1.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); + if (value < 0) value = 0xffffffff + value + 1; + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24); + this[offset + 1] = (value >>> 16); + this[offset + 2] = (value >>> 8); + this[offset + 3] = (value & 0xff); + } else { + objectWriteUInt32(this, value, offset, false); + } + return offset + 4 +}; + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4); + } + write(buf, value, offset, littleEndian, 23, 4); + return offset + 4 +} + +Buffer$1.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +}; + +Buffer$1.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +}; + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8); + } + write(buf, value, offset, littleEndian, 52, 8); + return offset + 8 +} + +Buffer$1.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +}; + +Buffer$1.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +}; + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer$1.prototype.copy = function copy (target, targetStart, start, end) { + if (!start) start = 0; + if (!end && end !== 0) end = this.length; + if (targetStart >= target.length) targetStart = target.length; + if (!targetStart) targetStart = 0; + if (end > 0 && end < start) end = start; + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length; + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start; + } + + var len = end - start; + var i; + + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start]; + } + } else if (len < 1000 || !Buffer$1.TYPED_ARRAY_SUPPORT) { + // ascending copy from start + for (i = 0; i < len; ++i) { + target[i + targetStart] = this[i + start]; + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, start + len), + targetStart + ); + } + + return len +}; + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer$1.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start; + start = 0; + end = this.length; + } else if (typeof end === 'string') { + encoding = end; + end = this.length; + } + if (val.length === 1) { + var code = val.charCodeAt(0); + if (code < 256) { + val = code; + } + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer$1.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + } else if (typeof val === 'number') { + val = val & 255; + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0; + end = end === undefined ? this.length : end >>> 0; + + if (!val) val = 0; + + var i; + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val; + } + } else { + var bytes = internalIsBuffer(val) + ? val + : utf8ToBytes(new Buffer$1(val, encoding).toString()); + var len = bytes.length; + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len]; + } + } + + return this +}; + +// HELPER FUNCTIONS +// ================ + +var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g; + +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, ''); + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '='; + } + return str +} + +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity; + var codePoint; + var length = string.length; + var leadSurrogate = null; + var bytes = []; + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i); + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + continue + } + + // valid lead + leadSurrogate = codePoint; + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + leadSurrogate = codePoint; + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000; + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + } + + leadSurrogate = null; + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint); + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ); + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ); + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ); + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = []; + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF); + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo; + var byteArray = []; + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i); + hi = c >> 8; + lo = c % 256; + byteArray.push(lo); + byteArray.push(hi); + } + + return byteArray +} + + +function base64ToBytes (str) { + return toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i]; + } + return i +} + +function isnan (val) { + return val !== val // eslint-disable-line no-self-compare +} + + +// the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence +// The _isBuffer check is for Safari 5-7 support, because it's missing +// Object.prototype.constructor. Remove this eventually +function isBuffer$1(obj) { + return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj)) +} + +function isFastBuffer (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) +} + +// For Node v0.10 support. Remove this eventually. +function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0)) +} + +var inherits; +if (typeof Object.create === 'function'){ + inherits = function inherits(ctor, superCtor) { + // implementation from standard node.js 'util' module + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + inherits = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function () {}; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + }; +} + +var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || + function getOwnPropertyDescriptors(obj) { + var keys = Object.keys(obj); + var descriptors = {}; + for (var i = 0; i < keys.length; i++) { + descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]); + } + return descriptors; + }; + +var formatRegExp = /%[sdj%]/g; +function format$1(f) { + if (!isString(f)) { + var objects = []; + for (var i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); + } + return objects.join(' '); + } + + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function(x) { + if (x === '%%') return '%'; + if (i >= len) return x; + switch (x) { + case '%s': return String(args[i++]); + case '%d': return Number(args[i++]); + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + default: + return x; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + if (isNull(x) || !isObject$1(x)) { + str += ' ' + x; + } else { + str += ' ' + inspect(x); + } + } + return str; +} + +// Mark that a method should not be used. +// Returns a modified function which warns once by default. +// If --no-deprecation is set, then it is a no-op. +function deprecate(fn, msg) { + // Allow for deprecating things in the process of starting up. + if (isUndefined(global$1.process)) { + return function() { + return deprecate(fn, msg).apply(this, arguments); + }; + } + + if (browser$1.noDeprecation === true) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (browser$1.throwDeprecation) { + throw new Error(msg); + } else if (browser$1.traceDeprecation) { + console.trace(msg); + } else { + console.error(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +} + +var debugs = {}; +var debugEnviron; +function debuglog(set) { + if (isUndefined(debugEnviron)) + debugEnviron = browser$1.env.NODE_DEBUG || ''; + set = set.toUpperCase(); + if (!debugs[set]) { + if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { + var pid = 0; + debugs[set] = function() { + var msg = format$1.apply(null, arguments); + console.error('%s %d: %s', set, pid, msg); + }; + } else { + debugs[set] = function() {}; + } + } + return debugs[set]; +} + +/** + * Echos the value of a value. Trys to print the value out + * in the best way possible given the different types. + * + * @param {Object} obj The object to print out. + * @param {Object} opts Optional options object that alters the output. + */ +/* legacy: obj, showHidden, depth, colors*/ +function inspect(obj, opts) { + // default options + var ctx = { + seen: [], + stylize: stylizeNoColor + }; + // legacy... + if (arguments.length >= 3) ctx.depth = arguments[2]; + if (arguments.length >= 4) ctx.colors = arguments[3]; + if (isBoolean(opts)) { + // legacy... + ctx.showHidden = opts; + } else if (opts) { + // got an "options" object + _extend(ctx, opts); + } + // set default options + if (isUndefined(ctx.showHidden)) ctx.showHidden = false; + if (isUndefined(ctx.depth)) ctx.depth = 2; + if (isUndefined(ctx.colors)) ctx.colors = false; + if (isUndefined(ctx.customInspect)) ctx.customInspect = true; + if (ctx.colors) ctx.stylize = stylizeWithColor; + return formatValue(ctx, obj, ctx.depth); +} + +// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +inspect.colors = { + 'bold' : [1, 22], + 'italic' : [3, 23], + 'underline' : [4, 24], + 'inverse' : [7, 27], + 'white' : [37, 39], + 'grey' : [90, 39], + 'black' : [30, 39], + 'blue' : [34, 39], + 'cyan' : [36, 39], + 'green' : [32, 39], + 'magenta' : [35, 39], + 'red' : [31, 39], + 'yellow' : [33, 39] +}; + +// Don't use 'blue' not visible on cmd.exe +inspect.styles = { + 'special': 'cyan', + 'number': 'yellow', + 'boolean': 'yellow', + 'undefined': 'grey', + 'null': 'bold', + 'string': 'green', + 'date': 'magenta', + // "name": intentionally not styling + 'regexp': 'red' +}; + + +function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; + + if (style) { + return '\u001b[' + inspect.colors[style][0] + 'm' + str + + '\u001b[' + inspect.colors[style][1] + 'm'; + } else { + return str; + } +} + + +function stylizeNoColor(str, styleType) { + return str; +} + + +function arrayToHash(array) { + var hash = {}; + + array.forEach(function(val, idx) { + hash[val] = true; + }); + + return hash; +} + + +function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (ctx.customInspect && + value && + isFunction(value.inspect) && + // Filter out the util module, it's inspect function is special + value.inspect !== inspect && + // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (!isString(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // Look up the keys of the object. + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); + + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } + + // IE doesn't make error fields non-enumerable + // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx + if (isError(value) + && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { + return formatError(value); + } + + // Some type of object without properties can be shortcutted. + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ': ' + value.name : ''; + return ctx.stylize('[Function' + name + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), 'date'); + } + if (isError(value)) { + return formatError(value); + } + } + + var base = '', array = false, braces = ['{', '}']; + + // Make Array say that they are Array + if (isArray$1(value)) { + array = true; + braces = ['[', ']']; + } + + // Make functions say that they are functions + if (isFunction(value)) { + var n = value.name ? ': ' + value.name : ''; + base = ' [Function' + n + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + base = ' ' + formatError(value); + } + + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function(key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + + return reduceToSingleString(output, base, braces); +} + + +function formatPrimitive(ctx, value) { + if (isUndefined(value)) + return ctx.stylize('undefined', 'undefined'); + if (isString(value)) { + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + } + if (isNumber(value)) + return ctx.stylize('' + value, 'number'); + if (isBoolean(value)) + return ctx.stylize('' + value, 'boolean'); + // For some reason typeof null is "object", so special case here. + if (isNull(value)) + return ctx.stylize('null', 'null'); +} + + +function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; +} + + +function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty$2(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } + } + keys.forEach(function(key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; +} + + +function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; + if (desc.get) { + if (desc.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (desc.set) { + str = ctx.stylize('[Setter]', 'special'); + } + } + if (!hasOwnProperty$2(visibleKeys, key)) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; +} + + +function reduceToSingleString(output, base, braces) { + var length = output.reduce(function(prev, cur) { + if (cur.indexOf('\n') >= 0) ; + return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0); + + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +} + + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. +function isArray$1(ar) { + return Array.isArray(ar); +} + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} + +function isNull(arg) { + return arg === null; +} + +function isNullOrUndefined(arg) { + return arg == null; +} + +function isNumber(arg) { + return typeof arg === 'number'; +} + +function isString(arg) { + return typeof arg === 'string'; +} + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} + +function isUndefined(arg) { + return arg === void 0; +} + +function isRegExp(re) { + return isObject$1(re) && objectToString(re) === '[object RegExp]'; +} + +function isObject$1(arg) { + return typeof arg === 'object' && arg !== null; +} + +function isDate(d) { + return isObject$1(d) && objectToString(d) === '[object Date]'; +} + +function isError(e) { + return isObject$1(e) && + (objectToString(e) === '[object Error]' || e instanceof Error); +} + +function isFunction(arg) { + return typeof arg === 'function'; +} + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} + +function isBuffer(maybeBuf) { + return Buffer$1.isBuffer(maybeBuf); +} + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + + +function pad(n) { + return n < 10 ? '0' + n.toString(10) : n.toString(10); +} + + +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', + 'Oct', 'Nov', 'Dec']; + +// 26 Feb 16:19:34 +function timestamp() { + var d = new Date(); + var time = [pad(d.getHours()), + pad(d.getMinutes()), + pad(d.getSeconds())].join(':'); + return [d.getDate(), months[d.getMonth()], time].join(' '); +} + + +// log is just a thin wrapper to console.log that prepends a timestamp +function log() { + console.log('%s - %s', timestamp(), format$1.apply(null, arguments)); +} + +function _extend(origin, add) { + // Don't do anything if add isn't an object + if (!add || !isObject$1(add)) return origin; + + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; +} +function hasOwnProperty$2(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +var kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined; + +function promisify(original) { + if (typeof original !== 'function') + throw new TypeError('The "original" argument must be of type Function'); + + if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) { + var fn = original[kCustomPromisifiedSymbol]; + if (typeof fn !== 'function') { + throw new TypeError('The "util.promisify.custom" argument must be of type Function'); + } + Object.defineProperty(fn, kCustomPromisifiedSymbol, { + value: fn, enumerable: false, writable: false, configurable: true + }); + return fn; + } + + function fn() { + var promiseResolve, promiseReject; + var promise = new Promise(function (resolve, reject) { + promiseResolve = resolve; + promiseReject = reject; + }); + + var args = []; + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + args.push(function (err, value) { + if (err) { + promiseReject(err); + } else { + promiseResolve(value); + } + }); + + try { + original.apply(this, args); + } catch (err) { + promiseReject(err); + } + + return promise; + } + + Object.setPrototypeOf(fn, Object.getPrototypeOf(original)); + + if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, { + value: fn, enumerable: false, writable: false, configurable: true + }); + return Object.defineProperties( + fn, + getOwnPropertyDescriptors(original) + ); +} + +promisify.custom = kCustomPromisifiedSymbol; + +function callbackifyOnRejected(reason, cb) { + // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M). + // Because `null` is a special error value in callbacks which means "no error + // occurred", we error-wrap so the callback consumer can distinguish between + // "the promise rejected with null" or "the promise fulfilled with undefined". + if (!reason) { + var newReason = new Error('Promise was rejected with a falsy value'); + newReason.reason = reason; + reason = newReason; + } + return cb(reason); +} + +function callbackify(original) { + if (typeof original !== 'function') { + throw new TypeError('The "original" argument must be of type Function'); + } + + // We DO NOT return the promise as it gives the user a false sense that + // the promise is actually somehow related to the callback's execution + // and that the callback throwing will reject the promise. + function callbackified() { + var args = []; + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + + var maybeCb = args.pop(); + if (typeof maybeCb !== 'function') { + throw new TypeError('The last argument must be of type Function'); + } + var self = this; + var cb = function() { + return maybeCb.apply(self, arguments); + }; + // In true node style we process the callback on `nextTick` with all the + // implications (stack, `uncaughtException`, `async_hooks`) + original.apply(this, args) + .then(function(ret) { browser$1.nextTick(cb.bind(null, null, ret)); }, + function(rej) { browser$1.nextTick(callbackifyOnRejected.bind(null, rej, cb)); }); + } + + Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original)); + Object.defineProperties(callbackified, getOwnPropertyDescriptors(original)); + return callbackified; +} + +var _polyfillNode_util = { + inherits: inherits, + _extend: _extend, + log: log, + isBuffer: isBuffer, + isPrimitive: isPrimitive, + isFunction: isFunction, + isError: isError, + isDate: isDate, + isObject: isObject$1, + isRegExp: isRegExp, + isUndefined: isUndefined, + isSymbol: isSymbol, + isString: isString, + isNumber: isNumber, + isNullOrUndefined: isNullOrUndefined, + isNull: isNull, + isBoolean: isBoolean, + isArray: isArray$1, + inspect: inspect, + deprecate: deprecate, + format: format$1, + debuglog: debuglog, + promisify: promisify, + callbackify: callbackify, +}; + +var _polyfillNode_util$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + _extend: _extend, + callbackify: callbackify, + debuglog: debuglog, + default: _polyfillNode_util, + deprecate: deprecate, + format: format$1, + inherits: inherits, + inspect: inspect, + isArray: isArray$1, + isBoolean: isBoolean, + isBuffer: isBuffer, + isDate: isDate, + isError: isError, + isFunction: isFunction, + isNull: isNull, + isNullOrUndefined: isNullOrUndefined, + isNumber: isNumber, + isObject: isObject$1, + isPrimitive: isPrimitive, + isRegExp: isRegExp, + isString: isString, + isSymbol: isSymbol, + isUndefined: isUndefined, + log: log, + promisify: promisify +}); + +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + + +// If obj.hasOwnProperty has been overridden, then calling +// obj.hasOwnProperty(prop) will break. +// See: https://github.com/joyent/node/issues/1707 +function hasOwnProperty$1(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; +function stringifyPrimitive(v) { + switch (typeof v) { + case 'string': + return v; + + case 'boolean': + return v ? 'true' : 'false'; + + case 'number': + return isFinite(v) ? v : ''; + + default: + return ''; + } +} + +function stringify (obj, sep, eq, name) { + sep = sep || '&'; + eq = eq || '='; + if (obj === null) { + obj = undefined; + } + + if (typeof obj === 'object') { + return map(objectKeys(obj), function(k) { + var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; + if (isArray(obj[k])) { + return map(obj[k], function(v) { + return ks + encodeURIComponent(stringifyPrimitive(v)); + }).join(sep); + } else { + return ks + encodeURIComponent(stringifyPrimitive(obj[k])); + } + }).join(sep); + + } + + if (!name) return ''; + return encodeURIComponent(stringifyPrimitive(name)) + eq + + encodeURIComponent(stringifyPrimitive(obj)); +} +function map (xs, f) { + if (xs.map) return xs.map(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + res.push(f(xs[i], i)); + } + return res; +} + +var objectKeys = Object.keys || function (obj) { + var res = []; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); + } + return res; +}; + +function parse$1(qs, sep, eq, options) { + sep = sep || '&'; + eq = eq || '='; + var obj = {}; + + if (typeof qs !== 'string' || qs.length === 0) { + return obj; + } + + var regexp = /\+/g; + qs = qs.split(sep); + + var maxKeys = 1000; + if (options && typeof options.maxKeys === 'number') { + maxKeys = options.maxKeys; + } + + var len = qs.length; + // maxKeys <= 0 means that we should not limit keys count + if (maxKeys > 0 && len > maxKeys) { + len = maxKeys; + } + + for (var i = 0; i < len; ++i) { + var x = qs[i].replace(regexp, '%20'), + idx = x.indexOf(eq), + kstr, vstr, k, v; + + if (idx >= 0) { + kstr = x.substr(0, idx); + vstr = x.substr(idx + 1); + } else { + kstr = x; + vstr = ''; + } + + k = decodeURIComponent(kstr); + v = decodeURIComponent(vstr); + + if (!hasOwnProperty$1(obj, k)) { + obj[k] = v; + } else if (isArray(obj[k])) { + obj[k].push(v); + } else { + obj[k] = [obj[k], v]; + } + } + + return obj; +} + +// WHATWG API +const URL$1 = global$1.URL; +const URLSearchParams = global$1.URLSearchParams; +var _polyfillNode_url = { + parse: urlParse, + resolve: urlResolve, + resolveObject: urlResolveObject, + fileURLToPath: urlFileURLToPath, + format: urlFormat, + Url: Url, + + // WHATWG API + URL: URL$1, + URLSearchParams, +}; +function Url() { + this.protocol = null; + this.slashes = null; + this.auth = null; + this.host = null; + this.port = null; + this.hostname = null; + this.hash = null; + this.search = null; + this.query = null; + this.pathname = null; + this.path = null; + this.href = null; +} + +// Reference: RFC 3986, RFC 1808, RFC 2396 + +// define these here so at least they only have to be +// compiled once on the first module load. +var protocolPattern = /^([a-z0-9.+-]+:)/i, + portPattern = /:[0-9]*$/, + + // Special case for a simple path URL + simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, + + // RFC 2396: characters reserved for delimiting URLs. + // We actually just auto-escape these. + delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], + + // RFC 2396: characters not allowed for various reasons. + unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), + + // Allowed by RFCs, but cause of XSS attacks. Always escape these. + autoEscape = ['\''].concat(unwise), + // Characters that are never ever allowed in a hostname. + // Note that any invalid chars are also handled, but these + // are the ones that are *expected* to be seen, so we fast-path + // them. + nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), + hostEndingChars = ['/', '?', '#'], + hostnameMaxLen = 255, + hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, + hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, + // protocols that can allow "unsafe" and "unwise" chars. + unsafeProtocol = { + 'javascript': true, + 'javascript:': true + }, + // protocols that never have a hostname. + hostlessProtocol = { + 'javascript': true, + 'javascript:': true + }, + // protocols that always contain a // bit. + slashedProtocol = { + 'http': true, + 'https': true, + 'ftp': true, + 'gopher': true, + 'file': true, + 'http:': true, + 'https:': true, + 'ftp:': true, + 'gopher:': true, + 'file:': true + }; + +function urlParse(url, parseQueryString, slashesDenoteHost) { + if (url && isObject$1(url) && url instanceof Url) return url; + + var u = new Url; + u.parse(url, parseQueryString, slashesDenoteHost); + return u; +} +Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { + return parse(this, url, parseQueryString, slashesDenoteHost); +}; + +function parse(self, url, parseQueryString, slashesDenoteHost) { + if (!isString(url)) { + throw new TypeError('Parameter \'url\' must be a string, not ' + typeof url); + } + + // Copy chrome, IE, opera backslash-handling behavior. + // Back slashes before the query string get converted to forward slashes + // See: https://code.google.com/p/chromium/issues/detail?id=25916 + var queryIndex = url.indexOf('?'), + splitter = + (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#', + uSplit = url.split(splitter), + slashRegex = /\\/g; + uSplit[0] = uSplit[0].replace(slashRegex, '/'); + url = uSplit.join(splitter); + + var rest = url; + + // trim before proceeding. + // This is to support parse stuff like " http://foo.com \n" + rest = rest.trim(); + + if (!slashesDenoteHost && url.split('#').length === 1) { + // Try fast path regexp + var simplePath = simplePathPattern.exec(rest); + if (simplePath) { + self.path = rest; + self.href = rest; + self.pathname = simplePath[1]; + if (simplePath[2]) { + self.search = simplePath[2]; + if (parseQueryString) { + self.query = parse$1(self.search.substr(1)); + } else { + self.query = self.search.substr(1); + } + } else if (parseQueryString) { + self.search = ''; + self.query = {}; + } + return self; + } + } + + var proto = protocolPattern.exec(rest); + if (proto) { + proto = proto[0]; + var lowerProto = proto.toLowerCase(); + self.protocol = lowerProto; + rest = rest.substr(proto.length); + } + + // figure out if it's got a host + // user@server is *always* interpreted as a hostname, and url + // resolution will treat //foo/bar as host=foo,path=bar because that's + // how the browser resolves relative URLs. + if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { + var slashes = rest.substr(0, 2) === '//'; + if (slashes && !(proto && hostlessProtocol[proto])) { + rest = rest.substr(2); + self.slashes = true; + } + } + var i, hec, l, p; + if (!hostlessProtocol[proto] && + (slashes || (proto && !slashedProtocol[proto]))) { + + // there's a hostname. + // the first instance of /, ?, ;, or # ends the host. + // + // If there is an @ in the hostname, then non-host chars *are* allowed + // to the left of the last @ sign, unless some host-ending character + // comes *before* the @-sign. + // URLs are obnoxious. + // + // ex: + // http://a@b@c/ => user:a@b host:c + // http://a@b?@c => user:a host:c path:/?@c + + // v0.12 TODO(isaacs): This is not quite how Chrome does things. + // Review our test case against browsers more comprehensively. + + // find the first instance of any hostEndingChars + var hostEnd = -1; + for (i = 0; i < hostEndingChars.length; i++) { + hec = rest.indexOf(hostEndingChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + + // at this point, either we have an explicit point where the + // auth portion cannot go past, or the last @ char is the decider. + var auth, atSign; + if (hostEnd === -1) { + // atSign can be anywhere. + atSign = rest.lastIndexOf('@'); + } else { + // atSign must be in auth portion. + // http://a@b/c@d => host:b auth:a path:/c@d + atSign = rest.lastIndexOf('@', hostEnd); + } + + // Now we have a portion which is definitely the auth. + // Pull that off. + if (atSign !== -1) { + auth = rest.slice(0, atSign); + rest = rest.slice(atSign + 1); + self.auth = decodeURIComponent(auth); + } + + // the host is the remaining to the left of the first non-host char + hostEnd = -1; + for (i = 0; i < nonHostChars.length; i++) { + hec = rest.indexOf(nonHostChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + // if we still have not hit it, then the entire thing is a host. + if (hostEnd === -1) + hostEnd = rest.length; + + self.host = rest.slice(0, hostEnd); + rest = rest.slice(hostEnd); + + // pull out port. + parseHost(self); + + // we've indicated that there is a hostname, + // so even if it's empty, it has to be present. + self.hostname = self.hostname || ''; + + // if hostname begins with [ and ends with ] + // assume that it's an IPv6 address. + var ipv6Hostname = self.hostname[0] === '[' && + self.hostname[self.hostname.length - 1] === ']'; + + // validate a little. + if (!ipv6Hostname) { + var hostparts = self.hostname.split(/\./); + for (i = 0, l = hostparts.length; i < l; i++) { + var part = hostparts[i]; + if (!part) continue; + if (!part.match(hostnamePartPattern)) { + var newpart = ''; + for (var j = 0, k = part.length; j < k; j++) { + if (part.charCodeAt(j) > 127) { + // we replace non-ASCII char with a temporary placeholder + // we need this to make sure size of hostname is not + // broken by replacing non-ASCII by nothing + newpart += 'x'; + } else { + newpart += part[j]; + } + } + // we test again with ASCII char only + if (!newpart.match(hostnamePartPattern)) { + var validParts = hostparts.slice(0, i); + var notHost = hostparts.slice(i + 1); + var bit = part.match(hostnamePartStart); + if (bit) { + validParts.push(bit[1]); + notHost.unshift(bit[2]); + } + if (notHost.length) { + rest = '/' + notHost.join('.') + rest; + } + self.hostname = validParts.join('.'); + break; + } + } + } + } + + if (self.hostname.length > hostnameMaxLen) { + self.hostname = ''; + } else { + // hostnames are always lower case. + self.hostname = self.hostname.toLowerCase(); + } + + if (!ipv6Hostname) { + // IDNA Support: Returns a punycoded representation of "domain". + // It only converts parts of the domain name that + // have non-ASCII characters, i.e. it doesn't matter if + // you call it with a domain that already is ASCII-only. + self.hostname = toASCII(self.hostname); + } + + p = self.port ? ':' + self.port : ''; + var h = self.hostname || ''; + self.host = h + p; + self.href += self.host; + + // strip [ and ] from the hostname + // the host field still retains them, though + if (ipv6Hostname) { + self.hostname = self.hostname.substr(1, self.hostname.length - 2); + if (rest[0] !== '/') { + rest = '/' + rest; + } + } + } + + // now rest is set to the post-host stuff. + // chop off any delim chars. + if (!unsafeProtocol[lowerProto]) { + + // First, make 100% sure that any "autoEscape" chars get + // escaped, even if encodeURIComponent doesn't think they + // need to be. + for (i = 0, l = autoEscape.length; i < l; i++) { + var ae = autoEscape[i]; + if (rest.indexOf(ae) === -1) + continue; + var esc = encodeURIComponent(ae); + if (esc === ae) { + esc = escape(ae); + } + rest = rest.split(ae).join(esc); + } + } + + + // chop off from the tail first. + var hash = rest.indexOf('#'); + if (hash !== -1) { + // got a fragment string. + self.hash = rest.substr(hash); + rest = rest.slice(0, hash); + } + var qm = rest.indexOf('?'); + if (qm !== -1) { + self.search = rest.substr(qm); + self.query = rest.substr(qm + 1); + if (parseQueryString) { + self.query = parse$1(self.query); + } + rest = rest.slice(0, qm); + } else if (parseQueryString) { + // no query string, but parseQueryString still requested + self.search = ''; + self.query = {}; + } + if (rest) self.pathname = rest; + if (slashedProtocol[lowerProto] && + self.hostname && !self.pathname) { + self.pathname = '/'; + } + + //to support http.request + if (self.pathname || self.search) { + p = self.pathname || ''; + var s = self.search || ''; + self.path = p + s; + } + + // finally, reconstruct the href based on what has been validated. + self.href = format(self); + return self; +} + +function urlFileURLToPath(path) { + if (typeof path === 'string') + path = new Url().parse(path); + else if (!(path instanceof Url)) + throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type ' + (typeof path) + String(path)); + if (path.protocol !== 'file:') + throw new TypeError('The URL must be of scheme file'); + return getPathFromURLPosix(path); +} + +function getPathFromURLPosix(url) { + const pathname = url.pathname; + for (let n = 0; n < pathname.length; n++) { + if (pathname[n] === '%') { + const third = pathname.codePointAt(n + 2) | 0x20; + if (pathname[n + 1] === '2' && third === 102) { + throw new TypeError( + 'must not include encoded / characters' + ); + } + } + } + return decodeURIComponent(pathname); +} + +// format a parsed object into a url string +function urlFormat(obj) { + // ensure it's an object, and not a string url. + // If it's an obj, this is a no-op. + // this way, you can call url_format() on strings + // to clean up potentially wonky urls. + if (isString(obj)) obj = parse({}, obj); + return format(obj); +} + +function format(self) { + var auth = self.auth || ''; + if (auth) { + auth = encodeURIComponent(auth); + auth = auth.replace(/%3A/i, ':'); + auth += '@'; + } + + var protocol = self.protocol || '', + pathname = self.pathname || '', + hash = self.hash || '', + host = false, + query = ''; + + if (self.host) { + host = auth + self.host; + } else if (self.hostname) { + host = auth + (self.hostname.indexOf(':') === -1 ? + self.hostname : + '[' + this.hostname + ']'); + if (self.port) { + host += ':' + self.port; + } + } + + if (self.query && + isObject$1(self.query) && + Object.keys(self.query).length) { + query = stringify(self.query); + } + + var search = self.search || (query && ('?' + query)) || ''; + + if (protocol && protocol.substr(-1) !== ':') protocol += ':'; + + // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. + // unless they had them to begin with. + if (self.slashes || + (!protocol || slashedProtocol[protocol]) && host !== false) { + host = '//' + (host || ''); + if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname; + } else if (!host) { + host = ''; + } + + if (hash && hash.charAt(0) !== '#') hash = '#' + hash; + if (search && search.charAt(0) !== '?') search = '?' + search; + + pathname = pathname.replace(/[?#]/g, function(match) { + return encodeURIComponent(match); + }); + search = search.replace('#', '%23'); + + return protocol + host + pathname + search + hash; +} + +Url.prototype.format = function() { + return format(this); +}; + +function urlResolve(source, relative) { + return urlParse(source, false, true).resolve(relative); +} + +Url.prototype.resolve = function(relative) { + return this.resolveObject(urlParse(relative, false, true)).format(); +}; + +function urlResolveObject(source, relative) { + if (!source) return relative; + return urlParse(source, false, true).resolveObject(relative); +} + +Url.prototype.resolveObject = function(relative) { + if (isString(relative)) { + var rel = new Url(); + rel.parse(relative, false, true); + relative = rel; + } + + var result = new Url(); + var tkeys = Object.keys(this); + for (var tk = 0; tk < tkeys.length; tk++) { + var tkey = tkeys[tk]; + result[tkey] = this[tkey]; + } + + // hash is always overridden, no matter what. + // even href="" will remove it. + result.hash = relative.hash; + + // if the relative url is empty, then there's nothing left to do here. + if (relative.href === '') { + result.href = result.format(); + return result; + } + + // hrefs like //foo/bar always cut to the protocol. + if (relative.slashes && !relative.protocol) { + // take everything except the protocol from relative + var rkeys = Object.keys(relative); + for (var rk = 0; rk < rkeys.length; rk++) { + var rkey = rkeys[rk]; + if (rkey !== 'protocol') + result[rkey] = relative[rkey]; + } + + //urlParse appends trailing / to urls like http://www.example.com + if (slashedProtocol[result.protocol] && + result.hostname && !result.pathname) { + result.path = result.pathname = '/'; + } + + result.href = result.format(); + return result; + } + var relPath; + if (relative.protocol && relative.protocol !== result.protocol) { + // if it's a known url protocol, then changing + // the protocol does weird things + // first, if it's not file:, then we MUST have a host, + // and if there was a path + // to begin with, then we MUST have a path. + // if it is file:, then the host is dropped, + // because that's known to be hostless. + // anything else is assumed to be absolute. + if (!slashedProtocol[relative.protocol]) { + var keys = Object.keys(relative); + for (var v = 0; v < keys.length; v++) { + var k = keys[v]; + result[k] = relative[k]; + } + result.href = result.format(); + return result; + } + + result.protocol = relative.protocol; + if (!relative.host && !hostlessProtocol[relative.protocol]) { + relPath = (relative.pathname || '').split('/'); + while (relPath.length && !(relative.host = relPath.shift())); + if (!relative.host) relative.host = ''; + if (!relative.hostname) relative.hostname = ''; + if (relPath[0] !== '') relPath.unshift(''); + if (relPath.length < 2) relPath.unshift(''); + result.pathname = relPath.join('/'); + } else { + result.pathname = relative.pathname; + } + result.search = relative.search; + result.query = relative.query; + result.host = relative.host || ''; + result.auth = relative.auth; + result.hostname = relative.hostname || relative.host; + result.port = relative.port; + // to support http.request + if (result.pathname || result.search) { + var p = result.pathname || ''; + var s = result.search || ''; + result.path = p + s; + } + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; + } + + var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'), + isRelAbs = ( + relative.host || + relative.pathname && relative.pathname.charAt(0) === '/' + ), + mustEndAbs = (isRelAbs || isSourceAbs || + (result.host && relative.pathname)), + removeAllDots = mustEndAbs, + srcPath = result.pathname && result.pathname.split('/') || [], + psychotic = result.protocol && !slashedProtocol[result.protocol]; + relPath = relative.pathname && relative.pathname.split('/') || []; + // if the url is a non-slashed url, then relative + // links like ../.. should be able + // to crawl up to the hostname, as well. This is strange. + // result.protocol has already been set by now. + // Later on, put the first path part into the host field. + if (psychotic) { + result.hostname = ''; + result.port = null; + if (result.host) { + if (srcPath[0] === '') srcPath[0] = result.host; + else srcPath.unshift(result.host); + } + result.host = ''; + if (relative.protocol) { + relative.hostname = null; + relative.port = null; + if (relative.host) { + if (relPath[0] === '') relPath[0] = relative.host; + else relPath.unshift(relative.host); + } + relative.host = null; + } + mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); + } + var authInHost; + if (isRelAbs) { + // it's absolute. + result.host = (relative.host || relative.host === '') ? + relative.host : result.host; + result.hostname = (relative.hostname || relative.hostname === '') ? + relative.hostname : result.hostname; + result.search = relative.search; + result.query = relative.query; + srcPath = relPath; + // fall through to the dot-handling below. + } else if (relPath.length) { + // it's relative + // throw away the existing file, and take the new path instead. + if (!srcPath) srcPath = []; + srcPath.pop(); + srcPath = srcPath.concat(relPath); + result.search = relative.search; + result.query = relative.query; + } else if (!isNullOrUndefined(relative.search)) { + // just pull out the search. + // like href='?foo'. + // Put this after the other two cases because it simplifies the booleans + if (psychotic) { + result.hostname = result.host = srcPath.shift(); + //occationaly the auth can get stuck only in host + //this especially happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + authInHost = result.host && result.host.indexOf('@') > 0 ? + result.host.split('@') : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + result.search = relative.search; + result.query = relative.query; + //to support http.request + if (!isNull(result.pathname) || !isNull(result.search)) { + result.path = (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + result.href = result.format(); + return result; + } + + if (!srcPath.length) { + // no path at all. easy. + // we've already handled the other stuff above. + result.pathname = null; + //to support http.request + if (result.search) { + result.path = '/' + result.search; + } else { + result.path = null; + } + result.href = result.format(); + return result; + } + + // if a url ENDs in . or .., then it must get a trailing slash. + // however, if it ends in anything else non-slashy, + // then it must NOT get a trailing slash. + var last = srcPath.slice(-1)[0]; + var hasTrailingSlash = ( + (result.host || relative.host || srcPath.length > 1) && + (last === '.' || last === '..') || last === ''); + + // strip single dots, resolve double dots to parent dir + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = srcPath.length; i >= 0; i--) { + last = srcPath[i]; + if (last === '.') { + srcPath.splice(i, 1); + } else if (last === '..') { + srcPath.splice(i, 1); + up++; + } else if (up) { + srcPath.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (!mustEndAbs && !removeAllDots) { + for (; up--; up) { + srcPath.unshift('..'); + } + } + + if (mustEndAbs && srcPath[0] !== '' && + (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { + srcPath.unshift(''); + } + + if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) { + srcPath.push(''); + } + + var isAbsolute = srcPath[0] === '' || + (srcPath[0] && srcPath[0].charAt(0) === '/'); + + // put the host back + if (psychotic) { + result.hostname = result.host = isAbsolute ? '' : + srcPath.length ? srcPath.shift() : ''; + //occationaly the auth can get stuck only in host + //this especially happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + authInHost = result.host && result.host.indexOf('@') > 0 ? + result.host.split('@') : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + + mustEndAbs = mustEndAbs || (result.host && srcPath.length); + + if (mustEndAbs && !isAbsolute) { + srcPath.unshift(''); + } + + if (!srcPath.length) { + result.pathname = null; + result.path = null; + } else { + result.pathname = srcPath.join('/'); + } + + //to support request.http + if (!isNull(result.pathname) || !isNull(result.search)) { + result.path = (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + result.auth = relative.auth || result.auth; + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; +}; + +Url.prototype.parseHost = function() { + return parseHost(this); +}; + +function parseHost(self) { + var host = self.host; + var port = portPattern.exec(host); + if (port) { + port = port[0]; + if (port !== ':') { + self.port = port.substr(1); + } + host = host.substr(0, host.length - port.length); + } + if (host) self.hostname = host; +} + +var _polyfillNode_url$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + URL: URL$1, + URLSearchParams: URLSearchParams, + Url: Url, + default: _polyfillNode_url, + fileURLToPath: urlFileURLToPath, + format: urlFormat, + parse: urlParse, + resolve: urlResolve, + resolveObject: urlResolveObject +}); + +function isRelativeUrl(url) { + const firstChar = url.charAt(0); + return firstChar === "." || firstChar === "~" || firstChar === "@"; +} +const externalRE = /^(https?:)?\/\//; +function isExternalUrl(url) { + return externalRE.test(url); +} +const dataUrlRE = /^\s*data:/i; +function isDataUrl(url) { + return dataUrlRE.test(url); +} +function parseUrl(url) { + const firstChar = url.charAt(0); + if (firstChar === "~") { + const secondChar = url.charAt(1); + url = url.slice(secondChar === "/" ? 2 : 1); + } + return parseUriParts(url); +} +function parseUriParts(urlString) { + return urlParse(isString$1(urlString) ? urlString : "", false, true); +} + +var __defProp$9 = Object.defineProperty; +var __defProps$8 = Object.defineProperties; +var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols; +var __hasOwnProp$9 = Object.prototype.hasOwnProperty; +var __propIsEnum$9 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$9 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$9.call(b, prop)) + __defNormalProp$9(a, prop, b[prop]); + if (__getOwnPropSymbols$9) + for (var prop of __getOwnPropSymbols$9(b)) { + if (__propIsEnum$9.call(b, prop)) + __defNormalProp$9(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b)); +const defaultAssetUrlOptions = { + base: null, + includeAbsolute: false, + tags: { + video: ["src", "poster"], + source: ["src"], + img: ["src"], + image: ["xlink:href", "href"], + use: ["xlink:href", "href"] + } +}; +const normalizeOptions = (options) => { + if (Object.keys(options).some((key) => isArray$3(options[key]))) { + return __spreadProps$8(__spreadValues$9({}, defaultAssetUrlOptions), { + tags: options + }); + } + return __spreadValues$9(__spreadValues$9({}, defaultAssetUrlOptions), options); +}; +const createAssetUrlTransformWithOptions = (options) => { + return (node, context) => transformAssetUrl(node, context, options); +}; +const transformAssetUrl = (node, context, options = defaultAssetUrlOptions) => { + if (node.type === 1) { + if (!node.props.length) { + return; + } + const tags = options.tags || defaultAssetUrlOptions.tags; + const attrs = tags[node.tag]; + const wildCardAttrs = tags["*"]; + if (!attrs && !wildCardAttrs) { + return; + } + const assetAttrs = (attrs || []).concat(wildCardAttrs || []); + node.props.forEach((attr, index) => { + if (attr.type !== 6 || !assetAttrs.includes(attr.name) || !attr.value || isExternalUrl(attr.value.content) || isDataUrl(attr.value.content) || attr.value.content[0] === "#" || !options.includeAbsolute && !isRelativeUrl(attr.value.content)) { + return; + } + const url = parseUrl(attr.value.content); + if (options.base && attr.value.content[0] === ".") { + const base = parseUrl(options.base); + const protocol = base.protocol || ""; + const host = base.host ? protocol + "//" + base.host : ""; + const basePath = base.path || "/"; + attr.value.content = host + (path.posix || path).join(basePath, url.path + (url.hash || "")); + return; + } + const exp = getImportsExpressionExp(url.path, url.hash, attr.loc, context); + node.props[index] = { + type: 7, + name: "bind", + arg: createSimpleExpression(attr.name, true, attr.loc), + exp, + modifiers: [], + loc: attr.loc + }; + }); + } +}; +function getImportsExpressionExp(path2, hash, loc, context) { + if (path2) { + let name; + let exp; + const existingIndex = context.imports.findIndex((i) => i.path === path2); + if (existingIndex > -1) { + name = `_imports_${existingIndex}`; + exp = context.imports[existingIndex].exp; + } else { + name = `_imports_${context.imports.length}`; + exp = createSimpleExpression( + name, + false, + loc, + 3 + ); + context.imports.push({ + exp, + path: decodeURIComponent(path2) + }); + } + if (!hash) { + return exp; + } + const hashExp = `${name} + '${hash}'`; + const finalExp = createSimpleExpression( + hashExp, + false, + loc, + 3 + ); + if (!context.hoistStatic) { + return finalExp; + } + const existingHoistIndex = context.hoists.findIndex((h) => { + return h && h.type === 4 && !h.isStatic && h.content === hashExp; + }); + if (existingHoistIndex > -1) { + return createSimpleExpression( + `_hoisted_${existingHoistIndex + 1}`, + false, + loc, + 3 + ); + } + return context.hoist(finalExp); + } else { + return createSimpleExpression(`''`, false, loc, 3); + } +} + +const srcsetTags = ["img", "source"]; +const escapedSpaceCharacters = /( |\\t|\\n|\\f|\\r)+/g; +const createSrcsetTransformWithOptions = (options) => { + return (node, context) => transformSrcset(node, context, options); +}; +const transformSrcset = (node, context, options = defaultAssetUrlOptions) => { + if (node.type === 1) { + if (srcsetTags.includes(node.tag) && node.props.length) { + node.props.forEach((attr, index) => { + if (attr.name === "srcset" && attr.type === 6) { + if (!attr.value) return; + const value = attr.value.content; + if (!value) return; + const imageCandidates = value.split(",").map((s) => { + const [url, descriptor] = s.replace(escapedSpaceCharacters, " ").trim().split(" ", 2); + return { url, descriptor }; + }); + for (let i = 0; i < imageCandidates.length; i++) { + const { url } = imageCandidates[i]; + if (isDataUrl(url)) { + imageCandidates[i + 1].url = url + "," + imageCandidates[i + 1].url; + imageCandidates.splice(i, 1); + } + } + const shouldProcessUrl = (url) => { + return !isExternalUrl(url) && !isDataUrl(url) && (options.includeAbsolute || isRelativeUrl(url)); + }; + if (!imageCandidates.some(({ url }) => shouldProcessUrl(url))) { + return; + } + if (options.base) { + const base = options.base; + const set = []; + let needImportTransform = false; + imageCandidates.forEach((candidate) => { + let { url, descriptor } = candidate; + descriptor = descriptor ? ` ${descriptor}` : ``; + if (url[0] === ".") { + candidate.url = (path.posix || path).join(base, url); + set.push(candidate.url + descriptor); + } else if (shouldProcessUrl(url)) { + needImportTransform = true; + } else { + set.push(url + descriptor); + } + }); + if (!needImportTransform) { + attr.value.content = set.join(", "); + return; + } + } + const compoundExpression = createCompoundExpression([], attr.loc); + imageCandidates.forEach(({ url, descriptor }, index2) => { + if (shouldProcessUrl(url)) { + const { path: path2 } = parseUrl(url); + let exp2; + if (path2) { + const existingImportsIndex = context.imports.findIndex( + (i) => i.path === path2 + ); + if (existingImportsIndex > -1) { + exp2 = createSimpleExpression( + `_imports_${existingImportsIndex}`, + false, + attr.loc, + 3 + ); + } else { + exp2 = createSimpleExpression( + `_imports_${context.imports.length}`, + false, + attr.loc, + 3 + ); + context.imports.push({ exp: exp2, path: path2 }); + } + compoundExpression.children.push(exp2); + } + } else { + const exp2 = createSimpleExpression( + `"${url}"`, + false, + attr.loc, + 3 + ); + compoundExpression.children.push(exp2); + } + const isNotLast = imageCandidates.length - 1 > index2; + if (descriptor && isNotLast) { + compoundExpression.children.push(` + ' ${descriptor}, ' + `); + } else if (descriptor) { + compoundExpression.children.push(` + ' ${descriptor}'`); + } else if (isNotLast) { + compoundExpression.children.push(` + ', ' + `); + } + }); + let exp = compoundExpression; + if (context.hoistStatic) { + exp = context.hoist(compoundExpression); + exp.constType = 3; + } + node.props[index] = { + type: 7, + name: "bind", + arg: createSimpleExpression("srcset", true, attr.loc), + exp, + modifiers: [], + loc: attr.loc + }; + } + }); + } + } +}; + +const SSR_INTERPOLATE = Symbol(`ssrInterpolate`); +const SSR_RENDER_VNODE = Symbol(`ssrRenderVNode`); +const SSR_RENDER_COMPONENT = Symbol(`ssrRenderComponent`); +const SSR_RENDER_SLOT = Symbol(`ssrRenderSlot`); +const SSR_RENDER_SLOT_INNER = Symbol(`ssrRenderSlotInner`); +const SSR_RENDER_CLASS = Symbol(`ssrRenderClass`); +const SSR_RENDER_STYLE = Symbol(`ssrRenderStyle`); +const SSR_RENDER_ATTRS = Symbol(`ssrRenderAttrs`); +const SSR_RENDER_ATTR = Symbol(`ssrRenderAttr`); +const SSR_RENDER_DYNAMIC_ATTR = Symbol(`ssrRenderDynamicAttr`); +const SSR_RENDER_LIST = Symbol(`ssrRenderList`); +const SSR_INCLUDE_BOOLEAN_ATTR = Symbol( + `ssrIncludeBooleanAttr` +); +const SSR_LOOSE_EQUAL = Symbol(`ssrLooseEqual`); +const SSR_LOOSE_CONTAIN = Symbol(`ssrLooseContain`); +const SSR_RENDER_DYNAMIC_MODEL = Symbol( + `ssrRenderDynamicModel` +); +const SSR_GET_DYNAMIC_MODEL_PROPS = Symbol( + `ssrGetDynamicModelProps` +); +const SSR_RENDER_TELEPORT = Symbol(`ssrRenderTeleport`); +const SSR_RENDER_SUSPENSE = Symbol(`ssrRenderSuspense`); +const SSR_GET_DIRECTIVE_PROPS = Symbol(`ssrGetDirectiveProps`); +const ssrHelpers = { + [SSR_INTERPOLATE]: `ssrInterpolate`, + [SSR_RENDER_VNODE]: `ssrRenderVNode`, + [SSR_RENDER_COMPONENT]: `ssrRenderComponent`, + [SSR_RENDER_SLOT]: `ssrRenderSlot`, + [SSR_RENDER_SLOT_INNER]: `ssrRenderSlotInner`, + [SSR_RENDER_CLASS]: `ssrRenderClass`, + [SSR_RENDER_STYLE]: `ssrRenderStyle`, + [SSR_RENDER_ATTRS]: `ssrRenderAttrs`, + [SSR_RENDER_ATTR]: `ssrRenderAttr`, + [SSR_RENDER_DYNAMIC_ATTR]: `ssrRenderDynamicAttr`, + [SSR_RENDER_LIST]: `ssrRenderList`, + [SSR_INCLUDE_BOOLEAN_ATTR]: `ssrIncludeBooleanAttr`, + [SSR_LOOSE_EQUAL]: `ssrLooseEqual`, + [SSR_LOOSE_CONTAIN]: `ssrLooseContain`, + [SSR_RENDER_DYNAMIC_MODEL]: `ssrRenderDynamicModel`, + [SSR_GET_DYNAMIC_MODEL_PROPS]: `ssrGetDynamicModelProps`, + [SSR_RENDER_TELEPORT]: `ssrRenderTeleport`, + [SSR_RENDER_SUSPENSE]: `ssrRenderSuspense`, + [SSR_GET_DIRECTIVE_PROPS]: `ssrGetDirectiveProps` +}; +registerRuntimeHelpers(ssrHelpers); + +const ssrTransformIf = createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + processIf +); +function ssrProcessIf(node, context, disableNestedFragments = false, disableComment = false) { + const [rootBranch] = node.branches; + const ifStatement = createIfStatement( + rootBranch.condition, + processIfBranch(rootBranch, context, disableNestedFragments) + ); + context.pushStatement(ifStatement); + let currentIf = ifStatement; + for (let i = 1; i < node.branches.length; i++) { + const branch = node.branches[i]; + const branchBlockStatement = processIfBranch( + branch, + context, + disableNestedFragments + ); + if (branch.condition) { + currentIf = currentIf.alternate = createIfStatement( + branch.condition, + branchBlockStatement + ); + } else { + currentIf.alternate = branchBlockStatement; + } + } + if (!currentIf.alternate && !disableComment) { + currentIf.alternate = createBlockStatement([ + createCallExpression(`_push`, ["`<!---->`"]) + ]); + } +} +function processIfBranch(branch, context, disableNestedFragments = false) { + const { children } = branch; + const needFragmentWrapper = !disableNestedFragments && (children.length !== 1 || children[0].type !== 1) && // optimize away nested fragments when the only child is a ForNode + !(children.length === 1 && children[0].type === 11); + return processChildrenAsStatement(branch, context, needFragmentWrapper); +} + +const ssrTransformFor = createStructuralDirectiveTransform("for", processFor); +function ssrProcessFor(node, context, disableNestedFragments = false) { + const needFragmentWrapper = !disableNestedFragments && (node.children.length !== 1 || node.children[0].type !== 1); + const renderLoop = createFunctionExpression( + createForLoopParams(node.parseResult) + ); + renderLoop.body = processChildrenAsStatement( + node, + context, + needFragmentWrapper + ); + if (!disableNestedFragments) { + context.pushStringPart(`<!--[-->`); + } + context.pushStatement( + createCallExpression(context.helper(SSR_RENDER_LIST), [ + node.source, + renderLoop + ]) + ); + if (!disableNestedFragments) { + context.pushStringPart(`<!--]-->`); + } +} + +const ssrTransformSlotOutlet = (node, context) => { + if (isSlotOutlet(node)) { + const { slotName, slotProps } = processSlotOutlet(node, context); + const args = [ + `_ctx.$slots`, + slotName, + slotProps || `{}`, + // fallback content placeholder. will be replaced in the process phase + `null`, + `_push`, + `_parent` + ]; + if (context.scopeId && context.slotted !== false) { + args.push(`"${context.scopeId}-s"`); + } + let method = SSR_RENDER_SLOT; + let parent = context.parent; + if (parent) { + const children = parent.children; + if (parent.type === 10) { + parent = context.grandParent; + } + let componentType; + if (parent.type === 1 && parent.tagType === 1 && ((componentType = resolveComponentType(parent, context, true)) === TRANSITION || componentType === TRANSITION_GROUP) && children.filter((c) => c.type === 1).length === 1) { + method = SSR_RENDER_SLOT_INNER; + if (!(context.scopeId && context.slotted !== false)) { + args.push("null"); + } + args.push("true"); + } + } + node.ssrCodegenNode = createCallExpression(context.helper(method), args); + } +}; +function ssrProcessSlotOutlet(node, context) { + const renderCall = node.ssrCodegenNode; + if (node.children.length) { + const fallbackRenderFn = createFunctionExpression([]); + fallbackRenderFn.body = processChildrenAsStatement(node, context); + renderCall.arguments[3] = fallbackRenderFn; + } + if (context.withSlotScopeId) { + const slotScopeId = renderCall.arguments[6]; + renderCall.arguments[6] = slotScopeId ? `${slotScopeId} + _scopeId` : `_scopeId`; + } + context.pushStatement(node.ssrCodegenNode); +} + +function createSSRCompilerError(code, loc) { + return createCompilerError(code, loc, SSRErrorMessages); +} +const SSRErrorMessages = { + [65]: `Unsafe attribute name for SSR.`, + [66]: `Missing the 'to' prop on teleport element.`, + [67]: `Invalid AST node during SSR transform.` +}; + +function ssrProcessTeleport(node, context) { + const targetProp = findProp(node, "to"); + if (!targetProp) { + context.onError( + createSSRCompilerError(66, node.loc) + ); + return; + } + let target; + if (targetProp.type === 6) { + target = targetProp.value && createSimpleExpression(targetProp.value.content, true); + } else { + target = targetProp.exp; + } + if (!target) { + context.onError( + createSSRCompilerError( + 66, + targetProp.loc + ) + ); + return; + } + const disabledProp = findProp( + node, + "disabled", + false, + true + /* allow empty */ + ); + const disabled = disabledProp ? disabledProp.type === 6 ? `true` : disabledProp.exp || `false` : `false`; + const contentRenderFn = createFunctionExpression( + [`_push`], + void 0, + // Body is added later + true, + // newline + false, + // isSlot + node.loc + ); + contentRenderFn.body = processChildrenAsStatement(node, context); + context.pushStatement( + createCallExpression(context.helper(SSR_RENDER_TELEPORT), [ + `_push`, + contentRenderFn, + target, + disabled, + `_parent` + ]) + ); +} + +const wipMap$3 = /* @__PURE__ */ new WeakMap(); +function ssrTransformSuspense(node, context) { + return () => { + if (node.children.length) { + const wipEntry = { + slotsExp: null, + // to be immediately set + wipSlots: [] + }; + wipMap$3.set(node, wipEntry); + wipEntry.slotsExp = buildSlots( + node, + context, + (_props, _vForExp, children, loc) => { + const fn = createFunctionExpression( + [], + void 0, + // no return, assign body later + true, + // newline + false, + // suspense slots are not treated as normal slots + loc + ); + wipEntry.wipSlots.push({ + fn, + children + }); + return fn; + } + ).slots; + } + }; +} +function ssrProcessSuspense(node, context) { + const wipEntry = wipMap$3.get(node); + if (!wipEntry) { + return; + } + const { slotsExp, wipSlots } = wipEntry; + for (let i = 0; i < wipSlots.length; i++) { + const slot = wipSlots[i]; + slot.fn.body = processChildrenAsStatement(slot, context); + } + context.pushStatement( + createCallExpression(context.helper(SSR_RENDER_SUSPENSE), [ + `_push`, + slotsExp + ]) + ); +} + +const rawChildrenMap = /* @__PURE__ */ new WeakMap(); +const ssrTransformElement = (node, context) => { + if (node.type !== 1 || node.tagType !== 0) { + return; + } + return function ssrPostTransformElement() { + const openTag = [`<${node.tag}`]; + const needTagForRuntime = node.tag === "textarea" || node.tag.indexOf("-") > 0; + const hasDynamicVBind = hasDynamicKeyVBind(node); + const hasCustomDir = node.props.some( + (p) => p.type === 7 && !isBuiltInDirective(p.name) + ); + const needMergeProps = hasDynamicVBind || hasCustomDir; + if (needMergeProps) { + const { props, directives } = buildProps( + node, + context, + node.props, + false, + false, + true + ); + if (props || directives.length) { + const mergedProps = buildSSRProps(props, directives, context); + const propsExp = createCallExpression( + context.helper(SSR_RENDER_ATTRS), + [mergedProps] + ); + if (node.tag === "textarea") { + const existingText = node.children[0]; + if (!existingText || existingText.type !== 5) { + const tempId = `_temp${context.temps++}`; + propsExp.arguments = [ + createAssignmentExpression( + createSimpleExpression(tempId, false), + mergedProps + ) + ]; + rawChildrenMap.set( + node, + createCallExpression(context.helper(SSR_INTERPOLATE), [ + createConditionalExpression( + createSimpleExpression(`"value" in ${tempId}`, false), + createSimpleExpression(`${tempId}.value`, false), + createSimpleExpression( + existingText ? existingText.content : ``, + true + ), + false + ) + ]) + ); + } + } else if (node.tag === "input") { + const vModel = findVModel(node); + if (vModel) { + const tempId = `_temp${context.temps++}`; + const tempExp = createSimpleExpression(tempId, false); + propsExp.arguments = [ + createSequenceExpression([ + createAssignmentExpression(tempExp, mergedProps), + createCallExpression(context.helper(MERGE_PROPS), [ + tempExp, + createCallExpression( + context.helper(SSR_GET_DYNAMIC_MODEL_PROPS), + [ + tempExp, + // existing props + vModel.exp + // model + ] + ) + ]) + ]) + ]; + } + } else if (directives.length && !node.children.length) { + const vText = findDir(node, "text"); + if (!vText) { + const tempId = `_temp${context.temps++}`; + propsExp.arguments = [ + createAssignmentExpression( + createSimpleExpression(tempId, false), + mergedProps + ) + ]; + rawChildrenMap.set( + node, + createConditionalExpression( + createSimpleExpression(`"textContent" in ${tempId}`, false), + createCallExpression(context.helper(SSR_INTERPOLATE), [ + createSimpleExpression(`${tempId}.textContent`, false) + ]), + createSimpleExpression(`${tempId}.innerHTML ?? ''`, false), + false + ) + ); + } + } + if (needTagForRuntime) { + propsExp.arguments.push(`"${node.tag}"`); + } + openTag.push(propsExp); + } + } + let dynamicClassBinding = void 0; + let staticClassBinding = void 0; + let dynamicStyleBinding = void 0; + for (let i = 0; i < node.props.length; i++) { + const prop = node.props[i]; + if (node.tag === "input" && isTrueFalseValue(prop)) { + continue; + } + if (prop.type === 7) { + if (prop.name === "html" && prop.exp) { + rawChildrenMap.set( + node, + createCompoundExpression([`(`, prop.exp, `) ?? ''`]) + ); + } else if (prop.name === "text" && prop.exp) { + node.children = [createInterpolation(prop.exp, prop.loc)]; + } else if (prop.name === "slot") { + context.onError( + createCompilerError(40, prop.loc) + ); + } else if (isTextareaWithValue(node, prop) && prop.exp) { + if (!needMergeProps) { + node.children = [createInterpolation(prop.exp, prop.loc)]; + } + } else if (!needMergeProps && prop.name !== "on") { + const directiveTransform = context.directiveTransforms[prop.name]; + if (directiveTransform) { + const { props, ssrTagParts } = directiveTransform( + prop, + node, + context + ); + if (ssrTagParts) { + openTag.push(...ssrTagParts); + } + for (let j = 0; j < props.length; j++) { + const { key, value } = props[j]; + if (isStaticExp(key)) { + let attrName = key.content; + if (attrName === "key" || attrName === "ref") { + continue; + } + if (attrName === "class") { + openTag.push( + ` class="`, + dynamicClassBinding = createCallExpression( + context.helper(SSR_RENDER_CLASS), + [value] + ), + `"` + ); + } else if (attrName === "style") { + if (dynamicStyleBinding) { + mergeCall(dynamicStyleBinding, value); + } else { + openTag.push( + ` style="`, + dynamicStyleBinding = createCallExpression( + context.helper(SSR_RENDER_STYLE), + [value] + ), + `"` + ); + } + } else { + attrName = node.tag.indexOf("-") > 0 ? attrName : propsToAttrMap[attrName] || attrName.toLowerCase(); + if (isBooleanAttr(attrName)) { + openTag.push( + createConditionalExpression( + createCallExpression( + context.helper(SSR_INCLUDE_BOOLEAN_ATTR), + [value] + ), + createSimpleExpression(" " + attrName, true), + createSimpleExpression("", true), + false + ) + ); + } else if (isSSRSafeAttrName(attrName)) { + openTag.push( + createCallExpression(context.helper(SSR_RENDER_ATTR), [ + key, + value + ]) + ); + } else { + context.onError( + createSSRCompilerError( + 65, + key.loc + ) + ); + } + } + } else { + const args = [key, value]; + if (needTagForRuntime) { + args.push(`"${node.tag}"`); + } + openTag.push( + createCallExpression( + context.helper(SSR_RENDER_DYNAMIC_ATTR), + args + ) + ); + } + } + } + } + } else { + const name = prop.name; + if (node.tag === "textarea" && name === "value" && prop.value) { + rawChildrenMap.set(node, escapeHtml(prop.value.content)); + } else if (!needMergeProps) { + if (name === "key" || name === "ref") { + continue; + } + if (name === "class" && prop.value) { + staticClassBinding = JSON.stringify(prop.value.content); + } + openTag.push( + ` ${prop.name}` + (prop.value ? `="${escapeHtml(prop.value.content)}"` : ``) + ); + } + } + } + if (dynamicClassBinding && staticClassBinding) { + mergeCall(dynamicClassBinding, staticClassBinding); + removeStaticBinding(openTag, "class"); + } + if (context.scopeId) { + openTag.push(` ${context.scopeId}`); + } + node.ssrCodegenNode = createTemplateLiteral(openTag); + }; +}; +function buildSSRProps(props, directives, context) { + let mergePropsArgs = []; + if (props) { + if (props.type === 14) { + mergePropsArgs = props.arguments; + } else { + mergePropsArgs.push(props); + } + } + if (directives.length) { + for (const dir of directives) { + mergePropsArgs.push( + createCallExpression(context.helper(SSR_GET_DIRECTIVE_PROPS), [ + `_ctx`, + ...buildDirectiveArgs(dir, context).elements + ]) + ); + } + } + return mergePropsArgs.length > 1 ? createCallExpression(context.helper(MERGE_PROPS), mergePropsArgs) : mergePropsArgs[0]; +} +function isTrueFalseValue(prop) { + if (prop.type === 7) { + return prop.name === "bind" && prop.arg && isStaticExp(prop.arg) && (prop.arg.content === "true-value" || prop.arg.content === "false-value"); + } else { + return prop.name === "true-value" || prop.name === "false-value"; + } +} +function isTextareaWithValue(node, prop) { + return !!(node.tag === "textarea" && prop.name === "bind" && isStaticArgOf(prop.arg, "value")); +} +function mergeCall(call, arg) { + const existing = call.arguments[0]; + if (existing.type === 17) { + existing.elements.push(arg); + } else { + call.arguments[0] = createArrayExpression([existing, arg]); + } +} +function removeStaticBinding(tag, binding) { + const regExp = new RegExp(`^ ${binding}=".+"$`); + const i = tag.findIndex((e) => typeof e === "string" && regExp.test(e)); + if (i > -1) { + tag.splice(i, 1); + } +} +function findVModel(node) { + return node.props.find( + (p) => p.type === 7 && p.name === "model" && p.exp + ); +} +function ssrProcessElement(node, context) { + const isVoidTag = context.options.isVoidTag || NO; + const elementsToAdd = node.ssrCodegenNode.elements; + for (let j = 0; j < elementsToAdd.length; j++) { + context.pushStringPart(elementsToAdd[j]); + } + if (context.withSlotScopeId) { + context.pushStringPart(createSimpleExpression(`_scopeId`, false)); + } + context.pushStringPart(`>`); + const rawChildren = rawChildrenMap.get(node); + if (rawChildren) { + context.pushStringPart(rawChildren); + } else if (node.children.length) { + processChildren(node, context); + } + if (!isVoidTag(node.tag)) { + context.pushStringPart(`</${node.tag}>`); + } +} + +const wipMap$2 = /* @__PURE__ */ new WeakMap(); +function ssrTransformTransitionGroup(node, context) { + return () => { + const tag = findProp(node, "tag"); + if (tag) { + const otherProps = node.props.filter((p) => p !== tag); + const { props, directives } = buildProps( + node, + context, + otherProps, + true, + false, + true + ); + let propsExp = null; + if (props || directives.length) { + propsExp = createCallExpression(context.helper(SSR_RENDER_ATTRS), [ + buildSSRProps(props, directives, context) + ]); + } + wipMap$2.set(node, { + tag, + propsExp, + scopeId: context.scopeId || null + }); + } + }; +} +function ssrProcessTransitionGroup(node, context) { + const entry = wipMap$2.get(node); + if (entry) { + const { tag, propsExp, scopeId } = entry; + if (tag.type === 7) { + context.pushStringPart(`<`); + context.pushStringPart(tag.exp); + if (propsExp) { + context.pushStringPart(propsExp); + } + if (scopeId) { + context.pushStringPart(` ${scopeId}`); + } + context.pushStringPart(`>`); + processChildren( + node, + context, + false, + /** + * TransitionGroup has the special runtime behavior of flattening and + * concatenating all children into a single fragment (in order for them to + * be patched using the same key map) so we need to account for that here + * by disabling nested fragment wrappers from being generated. + */ + true, + /** + * TransitionGroup filters out comment children at runtime and thus + * doesn't expect comments to be present during hydration. We need to + * account for that by disabling the empty comment that is otherwise + * rendered for a falsy v-if that has no v-else specified. (#6715) + */ + true + ); + context.pushStringPart(`</`); + context.pushStringPart(tag.exp); + context.pushStringPart(`>`); + } else { + context.pushStringPart(`<${tag.value.content}`); + if (propsExp) { + context.pushStringPart(propsExp); + } + if (scopeId) { + context.pushStringPart(` ${scopeId}`); + } + context.pushStringPart(`>`); + processChildren(node, context, false, true, true); + context.pushStringPart(`</${tag.value.content}>`); + } + } else { + processChildren(node, context, true, true, true); + } +} + +const wipMap$1 = /* @__PURE__ */ new WeakMap(); +function ssrTransformTransition(node, context) { + return () => { + const appear = findProp(node, "appear", false, true); + wipMap$1.set(node, !!appear); + }; +} +function ssrProcessTransition(node, context) { + node.children = node.children.filter((c) => c.type !== 3); + const appear = wipMap$1.get(node); + if (appear) { + context.pushStringPart(`<template>`); + processChildren(node, context, false, true); + context.pushStringPart(`</template>`); + } else { + processChildren(node, context, false, true); + } +} + +var __defProp$8 = Object.defineProperty; +var __defProps$7 = Object.defineProperties; +var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols; +var __hasOwnProp$8 = Object.prototype.hasOwnProperty; +var __propIsEnum$8 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$8 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$8.call(b, prop)) + __defNormalProp$8(a, prop, b[prop]); + if (__getOwnPropSymbols$8) + for (var prop of __getOwnPropSymbols$8(b)) { + if (__propIsEnum$8.call(b, prop)) + __defNormalProp$8(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b)); +const wipMap = /* @__PURE__ */ new WeakMap(); +const WIP_SLOT = Symbol(); +const componentTypeMap = /* @__PURE__ */ new WeakMap(); +const ssrTransformComponent = (node, context) => { + if (node.type !== 1 || node.tagType !== 1) { + return; + } + const component = resolveComponentType( + node, + context, + true + /* ssr */ + ); + const isDynamicComponent = isObject$2(component) && component.callee === RESOLVE_DYNAMIC_COMPONENT; + componentTypeMap.set(node, component); + if (isSymbol$1(component)) { + if (component === SUSPENSE) { + return ssrTransformSuspense(node, context); + } else if (component === TRANSITION_GROUP) { + return ssrTransformTransitionGroup(node, context); + } else if (component === TRANSITION) { + return ssrTransformTransition(node); + } + return; + } + const vnodeBranches = []; + const clonedNode = clone(node); + return function ssrPostTransformComponent() { + if (clonedNode.children.length) { + buildSlots(clonedNode, context, (props, vFor, children) => { + vnodeBranches.push( + createVNodeSlotBranch(props, vFor, children, context) + ); + return createFunctionExpression(void 0); + }); + } + let propsExp = `null`; + if (node.props.length) { + const { props, directives } = buildProps( + node, + context, + void 0, + true, + isDynamicComponent + ); + if (props || directives.length) { + propsExp = buildSSRProps(props, directives, context); + } + } + const wipEntries = []; + wipMap.set(node, wipEntries); + const buildSSRSlotFn = (props, _vForExp, children, loc) => { + const param0 = props && stringifyExpression(props) || `_`; + const fn = createFunctionExpression( + [param0, `_push`, `_parent`, `_scopeId`], + void 0, + // no return, assign body later + true, + // newline + true, + // isSlot + loc + ); + wipEntries.push({ + type: WIP_SLOT, + fn, + children, + // also collect the corresponding vnode branch built earlier + vnodeBranch: vnodeBranches[wipEntries.length] + }); + return fn; + }; + const slots = node.children.length ? buildSlots(node, context, buildSSRSlotFn).slots : `null`; + if (typeof component !== "string") { + node.ssrCodegenNode = createCallExpression( + context.helper(SSR_RENDER_VNODE), + [ + `_push`, + createCallExpression(context.helper(CREATE_VNODE), [ + component, + propsExp, + slots + ]), + `_parent` + ] + ); + } else { + node.ssrCodegenNode = createCallExpression( + context.helper(SSR_RENDER_COMPONENT), + [component, propsExp, slots, `_parent`] + ); + } + }; +}; +function ssrProcessComponent(node, context, parent) { + const component = componentTypeMap.get(node); + if (!node.ssrCodegenNode) { + if (component === TELEPORT) { + return ssrProcessTeleport(node, context); + } else if (component === SUSPENSE) { + return ssrProcessSuspense(node, context); + } else if (component === TRANSITION_GROUP) { + return ssrProcessTransitionGroup(node, context); + } else { + if (parent.type === WIP_SLOT) { + context.pushStringPart(``); + } + if (component === TRANSITION) { + return ssrProcessTransition(node, context); + } + processChildren(node, context); + } + } else { + const wipEntries = wipMap.get(node) || []; + for (let i = 0; i < wipEntries.length; i++) { + const { fn, vnodeBranch } = wipEntries[i]; + fn.body = createIfStatement( + createSimpleExpression(`_push`, false), + processChildrenAsStatement( + wipEntries[i], + context, + false, + true + ), + vnodeBranch + ); + } + if (context.withSlotScopeId) { + node.ssrCodegenNode.arguments.push(`_scopeId`); + } + if (typeof component === "string") { + context.pushStatement( + createCallExpression(`_push`, [node.ssrCodegenNode]) + ); + } else { + context.pushStatement(node.ssrCodegenNode); + } + } +} +const rawOptionsMap = /* @__PURE__ */ new WeakMap(); +const [baseNodeTransforms, baseDirectiveTransforms] = getBaseTransformPreset(true); +const vnodeNodeTransforms = [...baseNodeTransforms, ...DOMNodeTransforms]; +const vnodeDirectiveTransforms = __spreadValues$8(__spreadValues$8({}, baseDirectiveTransforms), DOMDirectiveTransforms); +function createVNodeSlotBranch(slotProps, vFor, children, parentContext) { + const rawOptions = rawOptionsMap.get(parentContext.root); + const subOptions = __spreadProps$7(__spreadValues$8({}, rawOptions), { + // overwrite with vnode-based transforms + nodeTransforms: [ + ...vnodeNodeTransforms, + ...rawOptions.nodeTransforms || [] + ], + directiveTransforms: __spreadValues$8(__spreadValues$8({}, vnodeDirectiveTransforms), rawOptions.directiveTransforms || {}) + }); + const wrapperProps = []; + if (slotProps) { + wrapperProps.push({ + type: 7, + name: "slot", + exp: slotProps, + arg: void 0, + modifiers: [], + loc: locStub + }); + } + if (vFor) { + wrapperProps.push(extend({}, vFor)); + } + const wrapperNode = { + type: 1, + ns: 0, + tag: "template", + tagType: 3, + props: wrapperProps, + children, + loc: locStub, + codegenNode: void 0 + }; + subTransform(wrapperNode, subOptions, parentContext); + return createReturnStatement(children); +} +function subTransform(node, options, parentContext) { + const childRoot = createRoot([node]); + const childContext = createTransformContext(childRoot, options); + childContext.ssr = false; + childContext.scopes = __spreadValues$8({}, parentContext.scopes); + childContext.identifiers = __spreadValues$8({}, parentContext.identifiers); + childContext.imports = parentContext.imports; + traverseNode(childRoot, childContext); + ["helpers", "components", "directives"].forEach((key) => { + childContext[key].forEach((value, helperKey) => { + if (key === "helpers") { + const parentCount = parentContext.helpers.get(helperKey); + if (parentCount === void 0) { + parentContext.helpers.set(helperKey, value); + } else { + parentContext.helpers.set(helperKey, value + parentCount); + } + } else { + parentContext[key].add(value); + } + }); + }); +} +function clone(v) { + if (isArray$3(v)) { + return v.map(clone); + } else if (isPlainObject(v)) { + const res = {}; + for (const key in v) { + res[key] = clone(v[key]); + } + return res; + } else { + return v; + } +} + +function ssrCodegenTransform(ast, options) { + const context = createSSRTransformContext(ast, options); + if (options.ssrCssVars) { + const cssContext = createTransformContext(createRoot([]), options); + const varsExp = processExpression( + createSimpleExpression(options.ssrCssVars, false), + cssContext + ); + context.body.push( + createCompoundExpression([`const _cssVars = { style: `, varsExp, `}`]) + ); + Array.from(cssContext.helpers.keys()).forEach((helper) => { + ast.helpers.add(helper); + }); + } + const isFragment = ast.children.length > 1 && ast.children.some((c) => !isText$1(c)); + processChildren(ast, context, isFragment); + ast.codegenNode = createBlockStatement(context.body); + ast.ssrHelpers = Array.from( + /* @__PURE__ */ new Set([ + ...Array.from(ast.helpers).filter((h) => h in ssrHelpers), + ...context.helpers + ]) + ); + ast.helpers = new Set(Array.from(ast.helpers).filter((h) => !(h in ssrHelpers))); +} +function createSSRTransformContext(root, options, helpers = /* @__PURE__ */ new Set(), withSlotScopeId = false) { + const body = []; + let currentString = null; + return { + root, + options, + body, + helpers, + withSlotScopeId, + onError: options.onError || ((e) => { + throw e; + }), + helper(name) { + helpers.add(name); + return name; + }, + pushStringPart(part) { + if (!currentString) { + const currentCall = createCallExpression(`_push`); + body.push(currentCall); + currentString = createTemplateLiteral([]); + currentCall.arguments.push(currentString); + } + const bufferedElements = currentString.elements; + const lastItem = bufferedElements[bufferedElements.length - 1]; + if (isString$1(part) && isString$1(lastItem)) { + bufferedElements[bufferedElements.length - 1] += part; + } else { + bufferedElements.push(part); + } + }, + pushStatement(statement) { + currentString = null; + body.push(statement); + } + }; +} +function createChildContext(parent, withSlotScopeId = parent.withSlotScopeId) { + return createSSRTransformContext( + parent.root, + parent.options, + parent.helpers, + withSlotScopeId + ); +} +function processChildren(parent, context, asFragment = false, disableNestedFragments = false, disableComment = false) { + if (asFragment) { + context.pushStringPart(`<!--[-->`); + } + const { children } = parent; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + switch (child.tagType) { + case 0: + ssrProcessElement(child, context); + break; + case 1: + ssrProcessComponent(child, context, parent); + break; + case 2: + ssrProcessSlotOutlet(child, context); + break; + case 3: + break; + default: + context.onError( + createSSRCompilerError( + 67, + child.loc + ) + ); + const exhaustiveCheck2 = child; + return exhaustiveCheck2; + } + break; + case 2: + context.pushStringPart(escapeHtml(child.content)); + break; + case 3: + if (!disableComment) { + context.pushStringPart(`<!--${child.content}-->`); + } + break; + case 5: + context.pushStringPart( + createCallExpression(context.helper(SSR_INTERPOLATE), [ + child.content + ]) + ); + break; + case 9: + ssrProcessIf(child, context, disableNestedFragments, disableComment); + break; + case 11: + ssrProcessFor(child, context, disableNestedFragments); + break; + case 10: + break; + case 12: + case 8: + break; + default: + context.onError( + createSSRCompilerError( + 67, + child.loc + ) + ); + const exhaustiveCheck = child; + return exhaustiveCheck; + } + } + if (asFragment) { + context.pushStringPart(`<!--]-->`); + } +} +function processChildrenAsStatement(parent, parentContext, asFragment = false, withSlotScopeId = parentContext.withSlotScopeId) { + const childContext = createChildContext(parentContext, withSlotScopeId); + processChildren(parent, childContext, asFragment); + return createBlockStatement(childContext.body); +} + +const ssrTransformModel = (dir, node, context) => { + const model = dir.exp; + function checkDuplicatedValue() { + const value = findProp(node, "value"); + if (value) { + context.onError( + createDOMCompilerError( + 60, + value.loc + ) + ); + } + } + function processOption(plainNode) { + if (plainNode.tag === "option") { + if (plainNode.props.findIndex((p) => p.name === "selected") === -1) { + const value = findValueBinding(plainNode); + plainNode.ssrCodegenNode.elements.push( + createConditionalExpression( + createCallExpression(context.helper(SSR_INCLUDE_BOOLEAN_ATTR), [ + createConditionalExpression( + createCallExpression(`Array.isArray`, [model]), + createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [ + model, + value + ]), + createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ + model, + value + ]) + ) + ]), + createSimpleExpression(" selected", true), + createSimpleExpression("", true), + false + ) + ); + } + } else if (plainNode.tag === "optgroup") { + plainNode.children.forEach( + (option) => processOption(option) + ); + } + } + if (node.tagType === 0) { + const res = { props: [] }; + const defaultProps = [ + // default value binding for text type inputs + createObjectProperty(`value`, model) + ]; + if (node.tag === "input") { + const type = findProp(node, "type"); + if (type) { + const value = findValueBinding(node); + if (type.type === 7) { + res.ssrTagParts = [ + createCallExpression(context.helper(SSR_RENDER_DYNAMIC_MODEL), [ + type.exp, + model, + value + ]) + ]; + } else if (type.value) { + switch (type.value.content) { + case "radio": + res.props = [ + createObjectProperty( + `checked`, + createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ + model, + value + ]) + ) + ]; + break; + case "checkbox": + const trueValueBinding = findProp(node, "true-value"); + if (trueValueBinding) { + const trueValue = trueValueBinding.type === 6 ? JSON.stringify(trueValueBinding.value.content) : trueValueBinding.exp; + res.props = [ + createObjectProperty( + `checked`, + createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ + model, + trueValue + ]) + ) + ]; + } else { + res.props = [ + createObjectProperty( + `checked`, + createConditionalExpression( + createCallExpression(`Array.isArray`, [model]), + createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [ + model, + value + ]), + model + ) + ) + ]; + } + break; + case "file": + context.onError( + createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + default: + checkDuplicatedValue(); + res.props = defaultProps; + break; + } + } + } else if (hasDynamicKeyVBind(node)) ; else { + checkDuplicatedValue(); + res.props = defaultProps; + } + } else if (node.tag === "textarea") { + checkDuplicatedValue(); + node.children = [createInterpolation(model, model.loc)]; + } else if (node.tag === "select") { + const processChildren = (children) => { + children.forEach((child) => { + if (child.type === 1) { + processOption(child); + } else if (child.type === 11) { + processChildren(child.children); + } else if (child.type === 9) { + child.branches.forEach((b) => processChildren(b.children)); + } + }); + }; + processChildren(node.children); + } else { + context.onError( + createDOMCompilerError( + 57, + dir.loc + ) + ); + } + return res; + } else { + return transformModel$1(dir, node, context); + } +}; +function findValueBinding(node) { + const valueBinding = findProp(node, "value"); + return valueBinding ? valueBinding.type === 7 ? valueBinding.exp : createSimpleExpression(valueBinding.value.content, true) : createSimpleExpression(`null`, false); +} + +const ssrTransformShow = (dir, node, context) => { + if (!dir.exp) { + context.onError( + createDOMCompilerError(61) + ); + } + return { + props: [ + createObjectProperty( + `style`, + createConditionalExpression( + dir.exp, + createSimpleExpression(`null`, false), + createObjectExpression([ + createObjectProperty( + `display`, + createSimpleExpression(`none`, true) + ) + ]), + false + ) + ) + ] + }; +}; + +const filterChild = (node) => node.children.filter((n) => n.type !== 3); +const hasSingleChild = (node) => filterChild(node).length === 1; +const ssrInjectFallthroughAttrs = (node, context) => { + if (node.type === 0) { + context.identifiers._attrs = 1; + } + if (node.type === 1 && node.tagType === 1 && (node.tag === "transition" || node.tag === "Transition" || node.tag === "KeepAlive" || node.tag === "keep-alive")) { + const rootChildren = filterChild(context.root); + if (rootChildren.length === 1 && rootChildren[0] === node) { + if (hasSingleChild(node)) { + injectFallthroughAttrs(node.children[0]); + } + return; + } + } + const parent = context.parent; + if (!parent || parent.type !== 0) { + return; + } + if (node.type === 10 && hasSingleChild(node)) { + let hasEncounteredIf = false; + for (const c of filterChild(parent)) { + if (c.type === 9 || c.type === 1 && findDir(c, "if")) { + if (hasEncounteredIf) return; + hasEncounteredIf = true; + } else if ( + // node before v-if + !hasEncounteredIf || // non else nodes + !(c.type === 1 && findDir(c, /else/, true)) + ) { + return; + } + } + injectFallthroughAttrs(node.children[0]); + } else if (hasSingleChild(parent)) { + injectFallthroughAttrs(node); + } +}; +function injectFallthroughAttrs(node) { + if (node.type === 1 && (node.tagType === 0 || node.tagType === 1) && !findDir(node, "for")) { + node.props.push({ + type: 7, + name: "bind", + arg: void 0, + exp: createSimpleExpression(`_attrs`, false), + modifiers: [], + loc: locStub + }); + } +} + +const ssrInjectCssVars = (node, context) => { + if (!context.ssrCssVars) { + return; + } + if (node.type === 0) { + context.identifiers._cssVars = 1; + } + const parent = context.parent; + if (!parent || parent.type !== 0) { + return; + } + if (node.type === 10) { + for (const child of node.children) { + injectCssVars(child); + } + } else { + injectCssVars(node); + } +}; +function injectCssVars(node) { + if (node.type === 1 && (node.tagType === 0 || node.tagType === 1) && !findDir(node, "for")) { + if (node.tag === "suspense" || node.tag === "Suspense") { + for (const child of node.children) { + if (child.type === 1 && child.tagType === 3) { + child.children.forEach(injectCssVars); + } else { + injectCssVars(child); + } + } + } else { + node.props.push({ + type: 7, + name: "bind", + arg: void 0, + exp: createSimpleExpression(`_cssVars`, false), + modifiers: [], + loc: locStub + }); + } + } +} + +var __defProp$7 = Object.defineProperty; +var __defProps$6 = Object.defineProperties; +var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols; +var __hasOwnProp$7 = Object.prototype.hasOwnProperty; +var __propIsEnum$7 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$7 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$7.call(b, prop)) + __defNormalProp$7(a, prop, b[prop]); + if (__getOwnPropSymbols$7) + for (var prop of __getOwnPropSymbols$7(b)) { + if (__propIsEnum$7.call(b, prop)) + __defNormalProp$7(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b)); +function compile(source, options = {}) { + options = __spreadProps$6(__spreadValues$7(__spreadValues$7({}, options), parserOptions), { + ssr: true, + inSSR: true, + scopeId: options.mode === "function" ? null : options.scopeId, + // always prefix since compiler-ssr doesn't have size concern + prefixIdentifiers: true, + // disable optimizations that are unnecessary for ssr + cacheHandlers: false, + hoistStatic: false + }); + const ast = typeof source === "string" ? baseParse(source, options) : source; + rawOptionsMap.set(ast, options); + transform(ast, __spreadProps$6(__spreadValues$7({}, options), { + hoistStatic: false, + nodeTransforms: [ + ssrTransformIf, + ssrTransformFor, + trackVForSlotScopes, + transformExpression, + ssrTransformSlotOutlet, + ssrInjectFallthroughAttrs, + ssrInjectCssVars, + ssrTransformElement, + ssrTransformComponent, + trackSlotScopes, + transformStyle, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: __spreadValues$7({ + // reusing core v-bind + bind: transformBind, + on: transformOn$1, + // model and show have dedicated SSR handling + model: ssrTransformModel, + show: ssrTransformShow, + // the following are ignored during SSR + // on: noopDirectiveTransform, + cloak: noopDirectiveTransform, + once: noopDirectiveTransform, + memo: noopDirectiveTransform + }, options.directiveTransforms || {}) + })); + ssrCodegenTransform(ast, options); + return generate(ast, options); +} + +var CompilerSSR = /*#__PURE__*/Object.freeze({ + __proto__: null, + compile: compile +}); + +var _polyfillNode_fs = {}; + +var _polyfillNode_fs$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + default: _polyfillNode_fs +}); + +var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_fs$1); + +var require$$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_path); + +var require$$0 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_util$1); + +const hasWarned = {}; +function warnOnce$1(msg) { + const isNodeProd = typeof process !== "undefined" && process.env.NODE_ENV === "production"; + if (!isNodeProd && true && !hasWarned[msg]) { + hasWarned[msg] = true; + warn(msg); + } +} +function warn(msg) { + console.warn( + `\x1B[1m\x1B[33m[@vue/compiler-sfc]\x1B[0m\x1B[33m ${msg}\x1B[0m +` + ); +} + +var __defProp$6 = Object.defineProperty; +var __defProps$5 = Object.defineProperties; +var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols; +var __hasOwnProp$6 = Object.prototype.hasOwnProperty; +var __propIsEnum$6 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$6 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$6.call(b, prop)) + __defNormalProp$6(a, prop, b[prop]); + if (__getOwnPropSymbols$6) + for (var prop of __getOwnPropSymbols$6(b)) { + if (__propIsEnum$6.call(b, prop)) + __defNormalProp$6(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b)); +function preprocess$1({ source, filename, preprocessOptions }, preprocessor) { + let res = ""; + let err = null; + preprocessor.render( + source, + __spreadValues$6({ filename }, preprocessOptions), + (_err, _res) => { + if (_err) err = _err; + res = _res; + } + ); + if (err) throw err; + return res; +} +function compileTemplate(options) { + const { preprocessLang, preprocessCustomRequire } = options; + if (preprocessLang && !preprocessCustomRequire) { + throw new Error( + `[@vue/compiler-sfc] Template preprocessing in the browser build must provide the \`preprocessCustomRequire\` option to return the in-browser version of the preprocessor in the shape of { render(): string }.` + ); + } + const preprocessor = preprocessLang ? preprocessCustomRequire ? preprocessCustomRequire(preprocessLang) : void 0 : false; + if (preprocessor) { + try { + return doCompileTemplate(__spreadProps$5(__spreadValues$6({}, options), { + source: preprocess$1(options, preprocessor), + ast: void 0 + // invalidate AST if template goes through preprocessor + })); + } catch (e) { + return { + code: `export default function render() {}`, + source: options.source, + tips: [], + errors: [e] + }; + } + } else if (preprocessLang) { + return { + code: `export default function render() {}`, + source: options.source, + tips: [ + `Component ${options.filename} uses lang ${preprocessLang} for template. Please install the language preprocessor.` + ], + errors: [ + `Component ${options.filename} uses lang ${preprocessLang} for template, however it is not installed.` + ] + }; + } else { + return doCompileTemplate(options); + } +} +function doCompileTemplate({ + filename, + id, + scoped, + slotted, + inMap, + source, + ast: inAST, + ssr = false, + ssrCssVars, + isProd = false, + compiler, + compilerOptions = {}, + transformAssetUrls +}) { + const errors = []; + const warnings = []; + let nodeTransforms = []; + if (isObject$2(transformAssetUrls)) { + const assetOptions = normalizeOptions(transformAssetUrls); + nodeTransforms = [ + createAssetUrlTransformWithOptions(assetOptions), + createSrcsetTransformWithOptions(assetOptions) + ]; + } else if (transformAssetUrls !== false) { + nodeTransforms = [transformAssetUrl, transformSrcset]; + } + if (ssr && !ssrCssVars) { + warnOnce$1( + `compileTemplate is called with \`ssr: true\` but no corresponding \`cssVars\` option.` + ); + } + if (!id) { + warnOnce$1(`compileTemplate now requires the \`id\` option.`); + id = ""; + } + const shortId = id.replace(/^data-v-/, ""); + const longId = `data-v-${shortId}`; + const defaultCompiler = ssr ? CompilerSSR : CompilerDOM; + compiler = compiler || defaultCompiler; + if (compiler !== defaultCompiler) { + inAST = void 0; + } + if (inAST == null ? void 0 : inAST.transformed) { + const newAST = (ssr ? CompilerDOM : compiler).parse(inAST.source, __spreadProps$5(__spreadValues$6({ + prefixIdentifiers: true + }, compilerOptions), { + parseMode: "sfc", + onError: (e) => errors.push(e) + })); + const template = newAST.children.find( + (node) => node.type === 1 && node.tag === "template" + ); + inAST = createRoot(template.children, inAST.source); + } + let { code, ast, preamble, map } = compiler.compile(inAST || source, __spreadProps$5(__spreadValues$6({ + mode: "module", + prefixIdentifiers: true, + hoistStatic: true, + cacheHandlers: true, + ssrCssVars: ssr && ssrCssVars && ssrCssVars.length ? genCssVarsFromList(ssrCssVars, shortId, isProd, true) : "", + scopeId: scoped ? longId : void 0, + slotted, + sourceMap: true + }, compilerOptions), { + hmr: !isProd, + nodeTransforms: nodeTransforms.concat(compilerOptions.nodeTransforms || []), + filename, + onError: (e) => errors.push(e), + onWarn: (w) => warnings.push(w) + })); + if (inMap && !inAST) { + if (map) { + map = mapLines(inMap, map); + } + if (errors.length) { + patchErrors(errors, source, inMap); + } + } + const tips = warnings.map((w) => { + let msg = w.message; + if (w.loc) { + msg += ` +${generateCodeFrame( + (inAST == null ? void 0 : inAST.source) || source, + w.loc.start.offset, + w.loc.end.offset + )}`; + } + return msg; + }); + return { code, ast, preamble, source, errors, tips, map }; +} +function mapLines(oldMap, newMap) { + if (!oldMap) return newMap; + if (!newMap) return oldMap; + const oldMapConsumer = new sourceMapExports.SourceMapConsumer(oldMap); + const newMapConsumer = new sourceMapExports.SourceMapConsumer(newMap); + const mergedMapGenerator = new sourceMapExports.SourceMapGenerator(); + newMapConsumer.eachMapping((m) => { + if (m.originalLine == null) { + return; + } + const origPosInOldMap = oldMapConsumer.originalPositionFor({ + line: m.originalLine, + column: m.originalColumn + }); + if (origPosInOldMap.source == null) { + return; + } + mergedMapGenerator.addMapping({ + generated: { + line: m.generatedLine, + column: m.generatedColumn + }, + original: { + line: origPosInOldMap.line, + // map line + // use current column, since the oldMap produced by @vue/compiler-sfc + // does not + column: m.originalColumn + }, + source: origPosInOldMap.source, + name: origPosInOldMap.name + }); + }); + const generator = mergedMapGenerator; + oldMapConsumer.sources.forEach((sourceFile) => { + generator._sources.add(sourceFile); + const sourceContent = oldMapConsumer.sourceContentFor(sourceFile); + if (sourceContent != null) { + mergedMapGenerator.setSourceContent(sourceFile, sourceContent); + } + }); + generator._sourceRoot = oldMap.sourceRoot; + generator._file = oldMap.file; + return generator.toJSON(); +} +function patchErrors(errors, source, inMap) { + const originalSource = inMap.sourcesContent[0]; + const offset = originalSource.indexOf(source); + const lineOffset = originalSource.slice(0, offset).split(/\r?\n/).length - 1; + errors.forEach((err) => { + if (err.loc) { + err.loc.start.line += lineOffset; + err.loc.start.offset += offset; + if (err.loc.end !== err.loc.start) { + err.loc.end.line += lineOffset; + err.loc.end.offset += offset; + } + } + }); +} + +var picocolors = {exports: {}}; + +var hasRequiredPicocolors; + +function requirePicocolors () { + if (hasRequiredPicocolors) return picocolors.exports; + hasRequiredPicocolors = 1; + let p = browser$1 || {}, argv = p.argv || [], env = p.env || {}; + let isColorSupported = + !(!!env.NO_COLOR || argv.includes("--no-color")) && + (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || ((p.stdout || {}).isTTY && env.TERM !== "dumb") || !!env.CI); + + let formatter = (open, close, replace = open) => + input => { + let string = "" + input, index = string.indexOf(close, open.length); + return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close + }; + + let replaceClose = (string, close, replace, index) => { + let result = "", cursor = 0; + do { + result += string.substring(cursor, index) + replace; + cursor = index + close.length; + index = string.indexOf(close, cursor); + } while (~index) + return result + string.substring(cursor) + }; + + let createColors = (enabled = isColorSupported) => { + let f = enabled ? formatter : () => String; + return { + isColorSupported: enabled, + reset: f("\x1b[0m", "\x1b[0m"), + bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"), + dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"), + italic: f("\x1b[3m", "\x1b[23m"), + underline: f("\x1b[4m", "\x1b[24m"), + inverse: f("\x1b[7m", "\x1b[27m"), + hidden: f("\x1b[8m", "\x1b[28m"), + strikethrough: f("\x1b[9m", "\x1b[29m"), + + black: f("\x1b[30m", "\x1b[39m"), + red: f("\x1b[31m", "\x1b[39m"), + green: f("\x1b[32m", "\x1b[39m"), + yellow: f("\x1b[33m", "\x1b[39m"), + blue: f("\x1b[34m", "\x1b[39m"), + magenta: f("\x1b[35m", "\x1b[39m"), + cyan: f("\x1b[36m", "\x1b[39m"), + white: f("\x1b[37m", "\x1b[39m"), + gray: f("\x1b[90m", "\x1b[39m"), + + bgBlack: f("\x1b[40m", "\x1b[49m"), + bgRed: f("\x1b[41m", "\x1b[49m"), + bgGreen: f("\x1b[42m", "\x1b[49m"), + bgYellow: f("\x1b[43m", "\x1b[49m"), + bgBlue: f("\x1b[44m", "\x1b[49m"), + bgMagenta: f("\x1b[45m", "\x1b[49m"), + bgCyan: f("\x1b[46m", "\x1b[49m"), + bgWhite: f("\x1b[47m", "\x1b[49m"), + + blackBright: f("\x1b[90m", "\x1b[39m"), + redBright: f("\x1b[91m", "\x1b[39m"), + greenBright: f("\x1b[92m", "\x1b[39m"), + yellowBright: f("\x1b[93m", "\x1b[39m"), + blueBright: f("\x1b[94m", "\x1b[39m"), + magentaBright: f("\x1b[95m", "\x1b[39m"), + cyanBright: f("\x1b[96m", "\x1b[39m"), + whiteBright: f("\x1b[97m", "\x1b[39m"), + + bgBlackBright: f("\x1b[100m", "\x1b[49m"), + bgRedBright: f("\x1b[101m", "\x1b[49m"), + bgGreenBright: f("\x1b[102m", "\x1b[49m"), + bgYellowBright: f("\x1b[103m", "\x1b[49m"), + bgBlueBright: f("\x1b[104m", "\x1b[49m"), + bgMagentaBright: f("\x1b[105m", "\x1b[49m"), + bgCyanBright: f("\x1b[106m", "\x1b[49m"), + bgWhiteBright: f("\x1b[107m", "\x1b[49m"), + } + }; + + picocolors.exports = createColors(); + picocolors.exports.createColors = createColors; + return picocolors.exports; +} + +var tokenize$1; +var hasRequiredTokenize$1; + +function requireTokenize$1 () { + if (hasRequiredTokenize$1) return tokenize$1; + hasRequiredTokenize$1 = 1; + + const SINGLE_QUOTE = "'".charCodeAt(0); + const DOUBLE_QUOTE = '"'.charCodeAt(0); + const BACKSLASH = '\\'.charCodeAt(0); + const SLASH = '/'.charCodeAt(0); + const NEWLINE = '\n'.charCodeAt(0); + const SPACE = ' '.charCodeAt(0); + const FEED = '\f'.charCodeAt(0); + const TAB = '\t'.charCodeAt(0); + const CR = '\r'.charCodeAt(0); + const OPEN_SQUARE = '['.charCodeAt(0); + const CLOSE_SQUARE = ']'.charCodeAt(0); + const OPEN_PARENTHESES = '('.charCodeAt(0); + const CLOSE_PARENTHESES = ')'.charCodeAt(0); + const OPEN_CURLY = '{'.charCodeAt(0); + const CLOSE_CURLY = '}'.charCodeAt(0); + const SEMICOLON = ';'.charCodeAt(0); + const ASTERISK = '*'.charCodeAt(0); + const COLON = ':'.charCodeAt(0); + const AT = '@'.charCodeAt(0); + + const RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g; + const RE_WORD_END = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g; + const RE_BAD_BRACKET = /.[\r\n"'(/\\]/; + const RE_HEX_ESCAPE = /[\da-f]/i; + + tokenize$1 = function tokenizer(input, options = {}) { + let css = input.css.valueOf(); + let ignore = options.ignoreErrors; + + let code, content, escape, next, quote; + let currentToken, escaped, escapePos, n, prev; + + let length = css.length; + let pos = 0; + let buffer = []; + let returned = []; + + function position() { + return pos + } + + function unclosed(what) { + throw input.error('Unclosed ' + what, pos) + } + + function endOfFile() { + return returned.length === 0 && pos >= length + } + + function nextToken(opts) { + if (returned.length) return returned.pop() + if (pos >= length) return + + let ignoreUnclosed = opts ? opts.ignoreUnclosed : false; + + code = css.charCodeAt(pos); + + switch (code) { + case NEWLINE: + case SPACE: + case TAB: + case CR: + case FEED: { + next = pos; + do { + next += 1; + code = css.charCodeAt(next); + } while ( + code === SPACE || + code === NEWLINE || + code === TAB || + code === CR || + code === FEED + ) + + currentToken = ['space', css.slice(pos, next)]; + pos = next - 1; + break + } + + case OPEN_SQUARE: + case CLOSE_SQUARE: + case OPEN_CURLY: + case CLOSE_CURLY: + case COLON: + case SEMICOLON: + case CLOSE_PARENTHESES: { + let controlChar = String.fromCharCode(code); + currentToken = [controlChar, controlChar, pos]; + break + } + + case OPEN_PARENTHESES: { + prev = buffer.length ? buffer.pop()[1] : ''; + n = css.charCodeAt(pos + 1); + if ( + prev === 'url' && + n !== SINGLE_QUOTE && + n !== DOUBLE_QUOTE && + n !== SPACE && + n !== NEWLINE && + n !== TAB && + n !== FEED && + n !== CR + ) { + next = pos; + do { + escaped = false; + next = css.indexOf(')', next + 1); + if (next === -1) { + if (ignore || ignoreUnclosed) { + next = pos; + break + } else { + unclosed('bracket'); + } + } + escapePos = next; + while (css.charCodeAt(escapePos - 1) === BACKSLASH) { + escapePos -= 1; + escaped = !escaped; + } + } while (escaped) + + currentToken = ['brackets', css.slice(pos, next + 1), pos, next]; + + pos = next; + } else { + next = css.indexOf(')', pos + 1); + content = css.slice(pos, next + 1); + + if (next === -1 || RE_BAD_BRACKET.test(content)) { + currentToken = ['(', '(', pos]; + } else { + currentToken = ['brackets', content, pos, next]; + pos = next; + } + } + + break + } + + case SINGLE_QUOTE: + case DOUBLE_QUOTE: { + quote = code === SINGLE_QUOTE ? "'" : '"'; + next = pos; + do { + escaped = false; + next = css.indexOf(quote, next + 1); + if (next === -1) { + if (ignore || ignoreUnclosed) { + next = pos + 1; + break + } else { + unclosed('string'); + } + } + escapePos = next; + while (css.charCodeAt(escapePos - 1) === BACKSLASH) { + escapePos -= 1; + escaped = !escaped; + } + } while (escaped) + + currentToken = ['string', css.slice(pos, next + 1), pos, next]; + pos = next; + break + } + + case AT: { + RE_AT_END.lastIndex = pos + 1; + RE_AT_END.test(css); + if (RE_AT_END.lastIndex === 0) { + next = css.length - 1; + } else { + next = RE_AT_END.lastIndex - 2; + } + + currentToken = ['at-word', css.slice(pos, next + 1), pos, next]; + + pos = next; + break + } + + case BACKSLASH: { + next = pos; + escape = true; + while (css.charCodeAt(next + 1) === BACKSLASH) { + next += 1; + escape = !escape; + } + code = css.charCodeAt(next + 1); + if ( + escape && + code !== SLASH && + code !== SPACE && + code !== NEWLINE && + code !== TAB && + code !== CR && + code !== FEED + ) { + next += 1; + if (RE_HEX_ESCAPE.test(css.charAt(next))) { + while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) { + next += 1; + } + if (css.charCodeAt(next + 1) === SPACE) { + next += 1; + } + } + } + + currentToken = ['word', css.slice(pos, next + 1), pos, next]; + + pos = next; + break + } + + default: { + if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) { + next = css.indexOf('*/', pos + 2) + 1; + if (next === 0) { + if (ignore || ignoreUnclosed) { + next = css.length; + } else { + unclosed('comment'); + } + } + + currentToken = ['comment', css.slice(pos, next + 1), pos, next]; + pos = next; + } else { + RE_WORD_END.lastIndex = pos + 1; + RE_WORD_END.test(css); + if (RE_WORD_END.lastIndex === 0) { + next = css.length - 1; + } else { + next = RE_WORD_END.lastIndex - 2; + } + + currentToken = ['word', css.slice(pos, next + 1), pos, next]; + buffer.push(currentToken); + pos = next; + } + + break + } + } + + pos++; + return currentToken + } + + function back(token) { + returned.push(token); + } + + return { + back, + endOfFile, + nextToken, + position + } + }; + return tokenize$1; +} + +var terminalHighlight_1; +var hasRequiredTerminalHighlight; + +function requireTerminalHighlight () { + if (hasRequiredTerminalHighlight) return terminalHighlight_1; + hasRequiredTerminalHighlight = 1; + + let pico = /*@__PURE__*/ requirePicocolors(); + + let tokenizer = /*@__PURE__*/ requireTokenize$1(); + + let Input; + + function registerInput(dependant) { + Input = dependant; + } + + const HIGHLIGHT_THEME = { + ';': pico.yellow, + ':': pico.yellow, + '(': pico.cyan, + ')': pico.cyan, + '[': pico.yellow, + ']': pico.yellow, + '{': pico.yellow, + '}': pico.yellow, + 'at-word': pico.cyan, + 'brackets': pico.cyan, + 'call': pico.cyan, + 'class': pico.yellow, + 'comment': pico.gray, + 'hash': pico.magenta, + 'string': pico.green + }; + + function getTokenType([type, value], processor) { + if (type === 'word') { + if (value[0] === '.') { + return 'class' + } + if (value[0] === '#') { + return 'hash' + } + } + + if (!processor.endOfFile()) { + let next = processor.nextToken(); + processor.back(next); + if (next[0] === 'brackets' || next[0] === '(') return 'call' + } + + return type + } + + function terminalHighlight(css) { + let processor = tokenizer(new Input(css), { ignoreErrors: true }); + let result = ''; + while (!processor.endOfFile()) { + let token = processor.nextToken(); + let color = HIGHLIGHT_THEME[getTokenType(token, processor)]; + if (color) { + result += token[1] + .split(/\r?\n/) + .map(i => color(i)) + .join('\n'); + } else { + result += token[1]; + } + } + return result + } + + terminalHighlight.registerInput = registerInput; + + terminalHighlight_1 = terminalHighlight; + return terminalHighlight_1; +} + +var cssSyntaxError; +var hasRequiredCssSyntaxError; + +function requireCssSyntaxError () { + if (hasRequiredCssSyntaxError) return cssSyntaxError; + hasRequiredCssSyntaxError = 1; + + let pico = /*@__PURE__*/ requirePicocolors(); + + let terminalHighlight = /*@__PURE__*/ requireTerminalHighlight(); + + class CssSyntaxError extends Error { + constructor(message, line, column, source, file, plugin) { + super(message); + this.name = 'CssSyntaxError'; + this.reason = message; + + if (file) { + this.file = file; + } + if (source) { + this.source = source; + } + if (plugin) { + this.plugin = plugin; + } + if (typeof line !== 'undefined' && typeof column !== 'undefined') { + if (typeof line === 'number') { + this.line = line; + this.column = column; + } else { + this.line = line.line; + this.column = line.column; + this.endLine = column.line; + this.endColumn = column.column; + } + } + + this.setMessage(); + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, CssSyntaxError); + } + } + + setMessage() { + this.message = this.plugin ? this.plugin + ': ' : ''; + this.message += this.file ? this.file : '<css input>'; + if (typeof this.line !== 'undefined') { + this.message += ':' + this.line + ':' + this.column; + } + this.message += ': ' + this.reason; + } + + showSourceCode(color) { + if (!this.source) return '' + + let css = this.source; + if (color == null) color = pico.isColorSupported; + + let aside = text => text; + let mark = text => text; + let highlight = text => text; + if (color) { + let { bold, gray, red } = pico.createColors(true); + mark = text => bold(red(text)); + aside = text => gray(text); + if (terminalHighlight) { + highlight = text => terminalHighlight(text); + } + } + + let lines = css.split(/\r?\n/); + let start = Math.max(this.line - 3, 0); + let end = Math.min(this.line + 2, lines.length); + let maxWidth = String(end).length; + + return lines + .slice(start, end) + .map((line, index) => { + let number = start + 1 + index; + let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '; + if (number === this.line) { + if (line.length > 160) { + let padding = 20; + let subLineStart = Math.max(0, this.column - padding); + let subLineEnd = Math.max( + this.column + padding, + this.endColumn + padding + ); + let subLine = line.slice(subLineStart, subLineEnd); + + let spacing = + aside(gutter.replace(/\d/g, ' ')) + + line + .slice(0, Math.min(this.column - 1, padding - 1)) + .replace(/[^\t]/g, ' '); + + return ( + mark('>') + + aside(gutter) + + highlight(subLine) + + '\n ' + + spacing + + mark('^') + ) + } + + let spacing = + aside(gutter.replace(/\d/g, ' ')) + + line.slice(0, this.column - 1).replace(/[^\t]/g, ' '); + + return ( + mark('>') + + aside(gutter) + + highlight(line) + + '\n ' + + spacing + + mark('^') + ) + } + + return ' ' + aside(gutter) + highlight(line) + }) + .join('\n') + } + + toString() { + let code = this.showSourceCode(); + if (code) { + code = '\n\n' + code + '\n'; + } + return this.name + ': ' + this.message + code + } + } + + cssSyntaxError = CssSyntaxError; + CssSyntaxError.default = CssSyntaxError; + return cssSyntaxError; +} + +var stringifier; +var hasRequiredStringifier; + +function requireStringifier () { + if (hasRequiredStringifier) return stringifier; + hasRequiredStringifier = 1; + + const DEFAULT_RAW = { + after: '\n', + beforeClose: '\n', + beforeComment: '\n', + beforeDecl: '\n', + beforeOpen: ' ', + beforeRule: '\n', + colon: ': ', + commentLeft: ' ', + commentRight: ' ', + emptyBody: '', + indent: ' ', + semicolon: false + }; + + function capitalize(str) { + return str[0].toUpperCase() + str.slice(1) + } + + class Stringifier { + constructor(builder) { + this.builder = builder; + } + + atrule(node, semicolon) { + let name = '@' + node.name; + let params = node.params ? this.rawValue(node, 'params') : ''; + + if (typeof node.raws.afterName !== 'undefined') { + name += node.raws.afterName; + } else if (params) { + name += ' '; + } + + if (node.nodes) { + this.block(node, name + params); + } else { + let end = (node.raws.between || '') + (semicolon ? ';' : ''); + this.builder(name + params + end, node); + } + } + + beforeAfter(node, detect) { + let value; + if (node.type === 'decl') { + value = this.raw(node, null, 'beforeDecl'); + } else if (node.type === 'comment') { + value = this.raw(node, null, 'beforeComment'); + } else if (detect === 'before') { + value = this.raw(node, null, 'beforeRule'); + } else { + value = this.raw(node, null, 'beforeClose'); + } + + let buf = node.parent; + let depth = 0; + while (buf && buf.type !== 'root') { + depth += 1; + buf = buf.parent; + } + + if (value.includes('\n')) { + let indent = this.raw(node, null, 'indent'); + if (indent.length) { + for (let step = 0; step < depth; step++) value += indent; + } + } + + return value + } + + block(node, start) { + let between = this.raw(node, 'between', 'beforeOpen'); + this.builder(start + between + '{', node, 'start'); + + let after; + if (node.nodes && node.nodes.length) { + this.body(node); + after = this.raw(node, 'after'); + } else { + after = this.raw(node, 'after', 'emptyBody'); + } + + if (after) this.builder(after); + this.builder('}', node, 'end'); + } + + body(node) { + let last = node.nodes.length - 1; + while (last > 0) { + if (node.nodes[last].type !== 'comment') break + last -= 1; + } + + let semicolon = this.raw(node, 'semicolon'); + for (let i = 0; i < node.nodes.length; i++) { + let child = node.nodes[i]; + let before = this.raw(child, 'before'); + if (before) this.builder(before); + this.stringify(child, last !== i || semicolon); + } + } + + comment(node) { + let left = this.raw(node, 'left', 'commentLeft'); + let right = this.raw(node, 'right', 'commentRight'); + this.builder('/*' + left + node.text + right + '*/', node); + } + + decl(node, semicolon) { + let between = this.raw(node, 'between', 'colon'); + let string = node.prop + between + this.rawValue(node, 'value'); + + if (node.important) { + string += node.raws.important || ' !important'; + } + + if (semicolon) string += ';'; + this.builder(string, node); + } + + document(node) { + this.body(node); + } + + raw(node, own, detect) { + let value; + if (!detect) detect = own; + + // Already had + if (own) { + value = node.raws[own]; + if (typeof value !== 'undefined') return value + } + + let parent = node.parent; + + if (detect === 'before') { + // Hack for first rule in CSS + if (!parent || (parent.type === 'root' && parent.first === node)) { + return '' + } + + // `root` nodes in `document` should use only their own raws + if (parent && parent.type === 'document') { + return '' + } + } + + // Floating child without parent + if (!parent) return DEFAULT_RAW[detect] + + // Detect style by other nodes + let root = node.root(); + if (!root.rawCache) root.rawCache = {}; + if (typeof root.rawCache[detect] !== 'undefined') { + return root.rawCache[detect] + } + + if (detect === 'before' || detect === 'after') { + return this.beforeAfter(node, detect) + } else { + let method = 'raw' + capitalize(detect); + if (this[method]) { + value = this[method](root, node); + } else { + root.walk(i => { + value = i.raws[own]; + if (typeof value !== 'undefined') return false + }); + } + } + + if (typeof value === 'undefined') value = DEFAULT_RAW[detect]; + + root.rawCache[detect] = value; + return value + } + + rawBeforeClose(root) { + let value; + root.walk(i => { + if (i.nodes && i.nodes.length > 0) { + if (typeof i.raws.after !== 'undefined') { + value = i.raws.after; + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, ''); + } + return false + } + } + }); + if (value) value = value.replace(/\S/g, ''); + return value + } + + rawBeforeComment(root, node) { + let value; + root.walkComments(i => { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before; + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, ''); + } + return false + } + }); + if (typeof value === 'undefined') { + value = this.raw(node, null, 'beforeDecl'); + } else if (value) { + value = value.replace(/\S/g, ''); + } + return value + } + + rawBeforeDecl(root, node) { + let value; + root.walkDecls(i => { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before; + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, ''); + } + return false + } + }); + if (typeof value === 'undefined') { + value = this.raw(node, null, 'beforeRule'); + } else if (value) { + value = value.replace(/\S/g, ''); + } + return value + } + + rawBeforeOpen(root) { + let value; + root.walk(i => { + if (i.type !== 'decl') { + value = i.raws.between; + if (typeof value !== 'undefined') return false + } + }); + return value + } + + rawBeforeRule(root) { + let value; + root.walk(i => { + if (i.nodes && (i.parent !== root || root.first !== i)) { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before; + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, ''); + } + return false + } + } + }); + if (value) value = value.replace(/\S/g, ''); + return value + } + + rawColon(root) { + let value; + root.walkDecls(i => { + if (typeof i.raws.between !== 'undefined') { + value = i.raws.between.replace(/[^\s:]/g, ''); + return false + } + }); + return value + } + + rawEmptyBody(root) { + let value; + root.walk(i => { + if (i.nodes && i.nodes.length === 0) { + value = i.raws.after; + if (typeof value !== 'undefined') return false + } + }); + return value + } + + rawIndent(root) { + if (root.raws.indent) return root.raws.indent + let value; + root.walk(i => { + let p = i.parent; + if (p && p !== root && p.parent && p.parent === root) { + if (typeof i.raws.before !== 'undefined') { + let parts = i.raws.before.split('\n'); + value = parts[parts.length - 1]; + value = value.replace(/\S/g, ''); + return false + } + } + }); + return value + } + + rawSemicolon(root) { + let value; + root.walk(i => { + if (i.nodes && i.nodes.length && i.last.type === 'decl') { + value = i.raws.semicolon; + if (typeof value !== 'undefined') return false + } + }); + return value + } + + rawValue(node, prop) { + let value = node[prop]; + let raw = node.raws[prop]; + if (raw && raw.value === value) { + return raw.raw + } + + return value + } + + root(node) { + this.body(node); + if (node.raws.after) this.builder(node.raws.after); + } + + rule(node) { + this.block(node, this.rawValue(node, 'selector')); + if (node.raws.ownSemicolon) { + this.builder(node.raws.ownSemicolon, node, 'end'); + } + } + + stringify(node, semicolon) { + /* c8 ignore start */ + if (!this[node.type]) { + throw new Error( + 'Unknown AST node type ' + + node.type + + '. ' + + 'Maybe you need to change PostCSS stringifier.' + ) + } + /* c8 ignore stop */ + this[node.type](node, semicolon); + } + } + + stringifier = Stringifier; + Stringifier.default = Stringifier; + return stringifier; +} + +var stringify_1; +var hasRequiredStringify; + +function requireStringify () { + if (hasRequiredStringify) return stringify_1; + hasRequiredStringify = 1; + + let Stringifier = /*@__PURE__*/ requireStringifier(); + + function stringify(node, builder) { + let str = new Stringifier(builder); + str.stringify(node); + } + + stringify_1 = stringify; + stringify.default = stringify; + return stringify_1; +} + +var symbols = {}; + +var hasRequiredSymbols; + +function requireSymbols () { + if (hasRequiredSymbols) return symbols; + hasRequiredSymbols = 1; + + symbols.isClean = Symbol('isClean'); + + symbols.my = Symbol('my'); + return symbols; +} + +var node$2; +var hasRequiredNode$2; + +function requireNode$2 () { + if (hasRequiredNode$2) return node$2; + hasRequiredNode$2 = 1; + + let CssSyntaxError = /*@__PURE__*/ requireCssSyntaxError(); + let Stringifier = /*@__PURE__*/ requireStringifier(); + let stringify = /*@__PURE__*/ requireStringify(); + let { isClean, my } = /*@__PURE__*/ requireSymbols(); + + function cloneNode(obj, parent) { + let cloned = new obj.constructor(); + + for (let i in obj) { + if (!Object.prototype.hasOwnProperty.call(obj, i)) { + /* c8 ignore next 2 */ + continue + } + if (i === 'proxyCache') continue + let value = obj[i]; + let type = typeof value; + + if (i === 'parent' && type === 'object') { + if (parent) cloned[i] = parent; + } else if (i === 'source') { + cloned[i] = value; + } else if (Array.isArray(value)) { + cloned[i] = value.map(j => cloneNode(j, cloned)); + } else { + if (type === 'object' && value !== null) value = cloneNode(value); + cloned[i] = value; + } + } + + return cloned + } + + class Node { + constructor(defaults = {}) { + this.raws = {}; + this[isClean] = false; + this[my] = true; + + for (let name in defaults) { + if (name === 'nodes') { + this.nodes = []; + for (let node of defaults[name]) { + if (typeof node.clone === 'function') { + this.append(node.clone()); + } else { + this.append(node); + } + } + } else { + this[name] = defaults[name]; + } + } + } + + addToError(error) { + error.postcssNode = this; + if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) { + let s = this.source; + error.stack = error.stack.replace( + /\n\s{4}at /, + `$&${s.input.from}:${s.start.line}:${s.start.column}$&` + ); + } + return error + } + + after(add) { + this.parent.insertAfter(this, add); + return this + } + + assign(overrides = {}) { + for (let name in overrides) { + this[name] = overrides[name]; + } + return this + } + + before(add) { + this.parent.insertBefore(this, add); + return this + } + + cleanRaws(keepBetween) { + delete this.raws.before; + delete this.raws.after; + if (!keepBetween) delete this.raws.between; + } + + clone(overrides = {}) { + let cloned = cloneNode(this); + for (let name in overrides) { + cloned[name] = overrides[name]; + } + return cloned + } + + cloneAfter(overrides = {}) { + let cloned = this.clone(overrides); + this.parent.insertAfter(this, cloned); + return cloned + } + + cloneBefore(overrides = {}) { + let cloned = this.clone(overrides); + this.parent.insertBefore(this, cloned); + return cloned + } + + error(message, opts = {}) { + if (this.source) { + let { end, start } = this.rangeBy(opts); + return this.source.input.error( + message, + { column: start.column, line: start.line }, + { column: end.column, line: end.line }, + opts + ) + } + return new CssSyntaxError(message) + } + + getProxyProcessor() { + return { + get(node, prop) { + if (prop === 'proxyOf') { + return node + } else if (prop === 'root') { + return () => node.root().toProxy() + } else { + return node[prop] + } + }, + + set(node, prop, value) { + if (node[prop] === value) return true + node[prop] = value; + if ( + prop === 'prop' || + prop === 'value' || + prop === 'name' || + prop === 'params' || + prop === 'important' || + /* c8 ignore next */ + prop === 'text' + ) { + node.markDirty(); + } + return true + } + } + } + + /* c8 ignore next 3 */ + markClean() { + this[isClean] = true; + } + + markDirty() { + if (this[isClean]) { + this[isClean] = false; + let next = this; + while ((next = next.parent)) { + next[isClean] = false; + } + } + } + + next() { + if (!this.parent) return undefined + let index = this.parent.index(this); + return this.parent.nodes[index + 1] + } + + positionBy(opts, stringRepresentation) { + let pos = this.source.start; + if (opts.index) { + pos = this.positionInside(opts.index); + } else if (opts.word) { + stringRepresentation = this.source.input.css.slice(this.source.start.offset, this.source.end.offset); + let index = stringRepresentation.indexOf(opts.word); + if (index !== -1) pos = this.positionInside(index); + } + return pos + } + + positionInside(index) { + let column = this.source.start.column; + let line = this.source.start.line; + let offset = this.source.start.offset; + let end = offset + index; + + for (let i = offset; i < end; i++) { + if (this.source.input.css[i] === '\n') { + column = 1; + line += 1; + } else { + column += 1; + } + } + + return { column, line } + } + + prev() { + if (!this.parent) return undefined + let index = this.parent.index(this); + return this.parent.nodes[index - 1] + } + + rangeBy(opts) { + let start = { + column: this.source.start.column, + line: this.source.start.line + }; + let end = this.source.end + ? { + column: this.source.end.column + 1, + line: this.source.end.line + } + : { + column: start.column + 1, + line: start.line + }; + + if (opts.word) { + let stringRepresentation = this.source.input.css.slice(this.source.start.offset, this.source.end.offset); + let index = stringRepresentation.indexOf(opts.word); + if (index !== -1) { + start = this.positionInside(index, stringRepresentation); + end = this.positionInside( + index + opts.word.length, + stringRepresentation + ); + } + } else { + if (opts.start) { + start = { + column: opts.start.column, + line: opts.start.line + }; + } else if (opts.index) { + start = this.positionInside(opts.index); + } + + if (opts.end) { + end = { + column: opts.end.column, + line: opts.end.line + }; + } else if (typeof opts.endIndex === 'number') { + end = this.positionInside(opts.endIndex); + } else if (opts.index) { + end = this.positionInside(opts.index + 1); + } + } + + if ( + end.line < start.line || + (end.line === start.line && end.column <= start.column) + ) { + end = { column: start.column + 1, line: start.line }; + } + + return { end, start } + } + + raw(prop, defaultType) { + let str = new Stringifier(); + return str.raw(this, prop, defaultType) + } + + remove() { + if (this.parent) { + this.parent.removeChild(this); + } + this.parent = undefined; + return this + } + + replaceWith(...nodes) { + if (this.parent) { + let bookmark = this; + let foundSelf = false; + for (let node of nodes) { + if (node === this) { + foundSelf = true; + } else if (foundSelf) { + this.parent.insertAfter(bookmark, node); + bookmark = node; + } else { + this.parent.insertBefore(bookmark, node); + } + } + + if (!foundSelf) { + this.remove(); + } + } + + return this + } + + root() { + let result = this; + while (result.parent && result.parent.type !== 'document') { + result = result.parent; + } + return result + } + + toJSON(_, inputs) { + let fixed = {}; + let emitInputs = inputs == null; + inputs = inputs || new Map(); + let inputsNextIndex = 0; + + for (let name in this) { + if (!Object.prototype.hasOwnProperty.call(this, name)) { + /* c8 ignore next 2 */ + continue + } + if (name === 'parent' || name === 'proxyCache') continue + let value = this[name]; + + if (Array.isArray(value)) { + fixed[name] = value.map(i => { + if (typeof i === 'object' && i.toJSON) { + return i.toJSON(null, inputs) + } else { + return i + } + }); + } else if (typeof value === 'object' && value.toJSON) { + fixed[name] = value.toJSON(null, inputs); + } else if (name === 'source') { + let inputId = inputs.get(value.input); + if (inputId == null) { + inputId = inputsNextIndex; + inputs.set(value.input, inputsNextIndex); + inputsNextIndex++; + } + fixed[name] = { + end: value.end, + inputId, + start: value.start + }; + } else { + fixed[name] = value; + } + } + + if (emitInputs) { + fixed.inputs = [...inputs.keys()].map(input => input.toJSON()); + } + + return fixed + } + + toProxy() { + if (!this.proxyCache) { + this.proxyCache = new Proxy(this, this.getProxyProcessor()); + } + return this.proxyCache + } + + toString(stringifier = stringify) { + if (stringifier.stringify) stringifier = stringifier.stringify; + let result = ''; + stringifier(this, i => { + result += i; + }); + return result + } + + warn(result, text, opts) { + let data = { node: this }; + for (let i in opts) data[i] = opts[i]; + return result.warn(text, data) + } + + get proxyOf() { + return this + } + } + + node$2 = Node; + Node.default = Node; + return node$2; +} + +var comment$1; +var hasRequiredComment$1; + +function requireComment$1 () { + if (hasRequiredComment$1) return comment$1; + hasRequiredComment$1 = 1; + + let Node = /*@__PURE__*/ requireNode$2(); + + class Comment extends Node { + constructor(defaults) { + super(defaults); + this.type = 'comment'; + } + } + + comment$1 = Comment; + Comment.default = Comment; + return comment$1; +} + +var declaration; +var hasRequiredDeclaration; + +function requireDeclaration () { + if (hasRequiredDeclaration) return declaration; + hasRequiredDeclaration = 1; + + let Node = /*@__PURE__*/ requireNode$2(); + + class Declaration extends Node { + constructor(defaults) { + if ( + defaults && + typeof defaults.value !== 'undefined' && + typeof defaults.value !== 'string' + ) { + defaults = { ...defaults, value: String(defaults.value) }; + } + super(defaults); + this.type = 'decl'; + } + + get variable() { + return this.prop.startsWith('--') || this.prop[0] === '$' + } + } + + declaration = Declaration; + Declaration.default = Declaration; + return declaration; +} + +var container$1; +var hasRequiredContainer$1; + +function requireContainer$1 () { + if (hasRequiredContainer$1) return container$1; + hasRequiredContainer$1 = 1; + + let Comment = /*@__PURE__*/ requireComment$1(); + let Declaration = /*@__PURE__*/ requireDeclaration(); + let Node = /*@__PURE__*/ requireNode$2(); + let { isClean, my } = /*@__PURE__*/ requireSymbols(); + + let AtRule, parse, Root, Rule; + + function cleanSource(nodes) { + return nodes.map(i => { + if (i.nodes) i.nodes = cleanSource(i.nodes); + delete i.source; + return i + }) + } + + function markTreeDirty(node) { + node[isClean] = false; + if (node.proxyOf.nodes) { + for (let i of node.proxyOf.nodes) { + markTreeDirty(i); + } + } + } + + class Container extends Node { + append(...children) { + for (let child of children) { + let nodes = this.normalize(child, this.last); + for (let node of nodes) this.proxyOf.nodes.push(node); + } + + this.markDirty(); + + return this + } + + cleanRaws(keepBetween) { + super.cleanRaws(keepBetween); + if (this.nodes) { + for (let node of this.nodes) node.cleanRaws(keepBetween); + } + } + + each(callback) { + if (!this.proxyOf.nodes) return undefined + let iterator = this.getIterator(); + + let index, result; + while (this.indexes[iterator] < this.proxyOf.nodes.length) { + index = this.indexes[iterator]; + result = callback(this.proxyOf.nodes[index], index); + if (result === false) break + + this.indexes[iterator] += 1; + } + + delete this.indexes[iterator]; + return result + } + + every(condition) { + return this.nodes.every(condition) + } + + getIterator() { + if (!this.lastEach) this.lastEach = 0; + if (!this.indexes) this.indexes = {}; + + this.lastEach += 1; + let iterator = this.lastEach; + this.indexes[iterator] = 0; + + return iterator + } + + getProxyProcessor() { + return { + get(node, prop) { + if (prop === 'proxyOf') { + return node + } else if (!node[prop]) { + return node[prop] + } else if ( + prop === 'each' || + (typeof prop === 'string' && prop.startsWith('walk')) + ) { + return (...args) => { + return node[prop]( + ...args.map(i => { + if (typeof i === 'function') { + return (child, index) => i(child.toProxy(), index) + } else { + return i + } + }) + ) + } + } else if (prop === 'every' || prop === 'some') { + return cb => { + return node[prop]((child, ...other) => + cb(child.toProxy(), ...other) + ) + } + } else if (prop === 'root') { + return () => node.root().toProxy() + } else if (prop === 'nodes') { + return node.nodes.map(i => i.toProxy()) + } else if (prop === 'first' || prop === 'last') { + return node[prop].toProxy() + } else { + return node[prop] + } + }, + + set(node, prop, value) { + if (node[prop] === value) return true + node[prop] = value; + if (prop === 'name' || prop === 'params' || prop === 'selector') { + node.markDirty(); + } + return true + } + } + } + + index(child) { + if (typeof child === 'number') return child + if (child.proxyOf) child = child.proxyOf; + return this.proxyOf.nodes.indexOf(child) + } + + insertAfter(exist, add) { + let existIndex = this.index(exist); + let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse(); + existIndex = this.index(exist); + for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node); + + let index; + for (let id in this.indexes) { + index = this.indexes[id]; + if (existIndex < index) { + this.indexes[id] = index + nodes.length; + } + } + + this.markDirty(); + + return this + } + + insertBefore(exist, add) { + let existIndex = this.index(exist); + let type = existIndex === 0 ? 'prepend' : false; + let nodes = this.normalize( + add, + this.proxyOf.nodes[existIndex], + type + ).reverse(); + existIndex = this.index(exist); + for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node); + + let index; + for (let id in this.indexes) { + index = this.indexes[id]; + if (existIndex <= index) { + this.indexes[id] = index + nodes.length; + } + } + + this.markDirty(); + + return this + } + + normalize(nodes, sample) { + if (typeof nodes === 'string') { + nodes = cleanSource(parse(nodes).nodes); + } else if (typeof nodes === 'undefined') { + nodes = []; + } else if (Array.isArray(nodes)) { + nodes = nodes.slice(0); + for (let i of nodes) { + if (i.parent) i.parent.removeChild(i, 'ignore'); + } + } else if (nodes.type === 'root' && this.type !== 'document') { + nodes = nodes.nodes.slice(0); + for (let i of nodes) { + if (i.parent) i.parent.removeChild(i, 'ignore'); + } + } else if (nodes.type) { + nodes = [nodes]; + } else if (nodes.prop) { + if (typeof nodes.value === 'undefined') { + throw new Error('Value field is missed in node creation') + } else if (typeof nodes.value !== 'string') { + nodes.value = String(nodes.value); + } + nodes = [new Declaration(nodes)]; + } else if (nodes.selector || nodes.selectors) { + nodes = [new Rule(nodes)]; + } else if (nodes.name) { + nodes = [new AtRule(nodes)]; + } else if (nodes.text) { + nodes = [new Comment(nodes)]; + } else { + throw new Error('Unknown node type in node creation') + } + + let processed = nodes.map(i => { + /* c8 ignore next */ + if (!i[my]) Container.rebuild(i); + i = i.proxyOf; + if (i.parent) i.parent.removeChild(i); + if (i[isClean]) markTreeDirty(i); + + if (!i.raws) i.raws = {}; + if (typeof i.raws.before === 'undefined') { + if (sample && typeof sample.raws.before !== 'undefined') { + i.raws.before = sample.raws.before.replace(/\S/g, ''); + } + } + i.parent = this.proxyOf; + return i + }); + + return processed + } + + prepend(...children) { + children = children.reverse(); + for (let child of children) { + let nodes = this.normalize(child, this.first, 'prepend').reverse(); + for (let node of nodes) this.proxyOf.nodes.unshift(node); + for (let id in this.indexes) { + this.indexes[id] = this.indexes[id] + nodes.length; + } + } + + this.markDirty(); + + return this + } + + push(child) { + child.parent = this; + this.proxyOf.nodes.push(child); + return this + } + + removeAll() { + for (let node of this.proxyOf.nodes) node.parent = undefined; + this.proxyOf.nodes = []; + + this.markDirty(); + + return this + } + + removeChild(child) { + child = this.index(child); + this.proxyOf.nodes[child].parent = undefined; + this.proxyOf.nodes.splice(child, 1); + + let index; + for (let id in this.indexes) { + index = this.indexes[id]; + if (index >= child) { + this.indexes[id] = index - 1; + } + } + + this.markDirty(); + + return this + } + + replaceValues(pattern, opts, callback) { + if (!callback) { + callback = opts; + opts = {}; + } + + this.walkDecls(decl => { + if (opts.props && !opts.props.includes(decl.prop)) return + if (opts.fast && !decl.value.includes(opts.fast)) return + + decl.value = decl.value.replace(pattern, callback); + }); + + this.markDirty(); + + return this + } + + some(condition) { + return this.nodes.some(condition) + } + + walk(callback) { + return this.each((child, i) => { + let result; + try { + result = callback(child, i); + } catch (e) { + throw child.addToError(e) + } + if (result !== false && child.walk) { + result = child.walk(callback); + } + + return result + }) + } + + walkAtRules(name, callback) { + if (!callback) { + callback = name; + return this.walk((child, i) => { + if (child.type === 'atrule') { + return callback(child, i) + } + }) + } + if (name instanceof RegExp) { + return this.walk((child, i) => { + if (child.type === 'atrule' && name.test(child.name)) { + return callback(child, i) + } + }) + } + return this.walk((child, i) => { + if (child.type === 'atrule' && child.name === name) { + return callback(child, i) + } + }) + } + + walkComments(callback) { + return this.walk((child, i) => { + if (child.type === 'comment') { + return callback(child, i) + } + }) + } + + walkDecls(prop, callback) { + if (!callback) { + callback = prop; + return this.walk((child, i) => { + if (child.type === 'decl') { + return callback(child, i) + } + }) + } + if (prop instanceof RegExp) { + return this.walk((child, i) => { + if (child.type === 'decl' && prop.test(child.prop)) { + return callback(child, i) + } + }) + } + return this.walk((child, i) => { + if (child.type === 'decl' && child.prop === prop) { + return callback(child, i) + } + }) + } + + walkRules(selector, callback) { + if (!callback) { + callback = selector; + + return this.walk((child, i) => { + if (child.type === 'rule') { + return callback(child, i) + } + }) + } + if (selector instanceof RegExp) { + return this.walk((child, i) => { + if (child.type === 'rule' && selector.test(child.selector)) { + return callback(child, i) + } + }) + } + return this.walk((child, i) => { + if (child.type === 'rule' && child.selector === selector) { + return callback(child, i) + } + }) + } + + get first() { + if (!this.proxyOf.nodes) return undefined + return this.proxyOf.nodes[0] + } + + get last() { + if (!this.proxyOf.nodes) return undefined + return this.proxyOf.nodes[this.proxyOf.nodes.length - 1] + } + } + + Container.registerParse = dependant => { + parse = dependant; + }; + + Container.registerRule = dependant => { + Rule = dependant; + }; + + Container.registerAtRule = dependant => { + AtRule = dependant; + }; + + Container.registerRoot = dependant => { + Root = dependant; + }; + + container$1 = Container; + Container.default = Container; + + /* c8 ignore start */ + Container.rebuild = node => { + if (node.type === 'atrule') { + Object.setPrototypeOf(node, AtRule.prototype); + } else if (node.type === 'rule') { + Object.setPrototypeOf(node, Rule.prototype); + } else if (node.type === 'decl') { + Object.setPrototypeOf(node, Declaration.prototype); + } else if (node.type === 'comment') { + Object.setPrototypeOf(node, Comment.prototype); + } else if (node.type === 'root') { + Object.setPrototypeOf(node, Root.prototype); + } + + node[my] = true; + + if (node.nodes) { + node.nodes.forEach(child => { + Container.rebuild(child); + }); + } + }; + /* c8 ignore stop */ + return container$1; +} + +var atRule; +var hasRequiredAtRule; + +function requireAtRule () { + if (hasRequiredAtRule) return atRule; + hasRequiredAtRule = 1; + + let Container = /*@__PURE__*/ requireContainer$1(); + + class AtRule extends Container { + constructor(defaults) { + super(defaults); + this.type = 'atrule'; + } + + append(...children) { + if (!this.proxyOf.nodes) this.nodes = []; + return super.append(...children) + } + + prepend(...children) { + if (!this.proxyOf.nodes) this.nodes = []; + return super.prepend(...children) + } + } + + atRule = AtRule; + AtRule.default = AtRule; + + Container.registerAtRule(AtRule); + return atRule; +} + +var document; +var hasRequiredDocument; + +function requireDocument () { + if (hasRequiredDocument) return document; + hasRequiredDocument = 1; + + let Container = /*@__PURE__*/ requireContainer$1(); + + let LazyResult, Processor; + + class Document extends Container { + constructor(defaults) { + // type needs to be passed to super, otherwise child roots won't be normalized correctly + super({ type: 'document', ...defaults }); + + if (!this.nodes) { + this.nodes = []; + } + } + + toResult(opts = {}) { + let lazy = new LazyResult(new Processor(), this, opts); + + return lazy.stringify() + } + } + + Document.registerLazyResult = dependant => { + LazyResult = dependant; + }; + + Document.registerProcessor = dependant => { + Processor = dependant; + }; + + document = Document; + Document.default = Document; + return document; +} + +var nonSecure; +var hasRequiredNonSecure; + +function requireNonSecure () { + if (hasRequiredNonSecure) return nonSecure; + hasRequiredNonSecure = 1; + let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'; + let customAlphabet = (alphabet, defaultSize = 21) => { + return (size = defaultSize) => { + let id = ''; + let i = size; + while (i--) { + id += alphabet[(Math.random() * alphabet.length) | 0]; + } + return id + } + }; + let nanoid = (size = 21) => { + let id = ''; + let i = size; + while (i--) { + id += urlAlphabet[(Math.random() * 64) | 0]; + } + return id + }; + nonSecure = { nanoid, customAlphabet }; + return nonSecure; +} + +var sourceMap$1 = {}; + +var sourceMapGenerator$1 = {}; + +var base64Vlq$1 = {}; + +var base64$1 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredBase64$1; + +function requireBase64$1 () { + if (hasRequiredBase64$1) return base64$1; + hasRequiredBase64$1 = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + base64$1.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + base64$1.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; + return base64$1; +} + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredBase64Vlq$1; + +function requireBase64Vlq$1 () { + if (hasRequiredBase64Vlq$1) return base64Vlq$1; + hasRequiredBase64Vlq$1 = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + var base64 = /*@__PURE__*/ requireBase64$1(); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + base64Vlq$1.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + base64Vlq$1.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + return base64Vlq$1; +} + +var util$2 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredUtil$2; + +function requireUtil$2 () { + if (hasRequiredUtil$2) return util$2; + hasRequiredUtil$2 = 1; + (function (exports) { + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port; + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + var MAX_CACHED_INPUTS = 32; + + /** + * Takes some function `f(input) -> result` and returns a memoized version of + * `f`. + * + * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The + * memoization is a dumb-simple, linear least-recently-used cache. + */ + function lruMemoize(f) { + var cache = []; + + return function(input) { + for (var i = 0; i < cache.length; i++) { + if (cache[i].input === input) { + var temp = cache[0]; + cache[0] = cache[i]; + cache[i] = temp; + return cache[0].result; + } + } + + var result = f(input); + + cache.unshift({ + input, + result, + }); + + if (cache.length > MAX_CACHED_INPUTS) { + cache.pop(); + } + + return result; + }; + } + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '<dir>/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + var normalize = lruMemoize(function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + // Split the path into parts between `/` characters. This is much faster than + // using `.split(/\/+/g)`. + var parts = []; + var start = 0; + var i = 0; + while (true) { + start = i; + i = path.indexOf("/", start); + if (i === -1) { + parts.push(path.slice(start)); + break; + } else { + parts.push(path.slice(start, i)); + while (i < path.length && path[i] === "/") { + i++; + } + } + } + + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + }); + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); + }()); + + function identity (s) { + return s; + } + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; + } + exports.toSetString = supportsNullProto ? identity : toSetString; + + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; + } + exports.fromSetString = supportsNullProto ? identity : fromSetString; + + function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) { + var cmp; + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 === null) { + return 1; // aStr2 !== null + } + + if (aStr2 === null) { + return -1; // aStr1 !== null + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + + /** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ + function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); + } + exports.parseSourceMapInput = parseSourceMapInput; + + /** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ + function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } + + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + + return normalize(sourceURL); + } + exports.computeSourceURL = computeSourceURL; + } (util$2)); + return util$2; +} + +var arraySet$1 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredArraySet$1; + +function requireArraySet$1 () { + if (hasRequiredArraySet$1) return arraySet$1; + hasRequiredArraySet$1 = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = /*@__PURE__*/ requireUtil$2(); + var has = Object.prototype.hasOwnProperty; + var hasNativeMap = typeof Map !== "undefined"; + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + arraySet$1.ArraySet = ArraySet; + return arraySet$1; +} + +var mappingList$1 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredMappingList$1; + +function requireMappingList$1 () { + if (hasRequiredMappingList$1) return mappingList$1; + hasRequiredMappingList$1 = 1; + /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = /*@__PURE__*/ requireUtil$2(); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + mappingList$1.MappingList = MappingList; + return mappingList$1; +} + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredSourceMapGenerator$1; + +function requireSourceMapGenerator$1 () { + if (hasRequiredSourceMapGenerator$1) return sourceMapGenerator$1; + hasRequiredSourceMapGenerator$1 = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var base64VLQ = /*@__PURE__*/ requireBase64Vlq$1(); + var util = /*@__PURE__*/ requireUtil$2(); + var ArraySet = /*@__PURE__*/ requireArraySet$1().ArraySet; + var MappingList = /*@__PURE__*/ requireMappingList$1().MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._ignoreInvalidMapping = util.getArg(aArgs, 'ignoreInvalidMapping', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator(Object.assign(generatorOps || {}, { + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + })); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + if (this._validateMapping(generated, original, source, name) === false) { + return; + } + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source); + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + var message = 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.'; + + if (this._ignoreInvalidMapping) { + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + return false; + } else { + throw new Error(message); + } + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + var message = 'Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + }); + + if (this._ignoreInvalidMapping) { + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + return false; + } else { + throw new Error(message) + } + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = ''; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + sourceMapGenerator$1.SourceMapGenerator = SourceMapGenerator; + return sourceMapGenerator$1; +} + +var sourceMapConsumer$1 = {}; + +var binarySearch$1 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredBinarySearch$1; + +function requireBinarySearch$1 () { + if (hasRequiredBinarySearch$1) return binarySearch$1; + hasRequiredBinarySearch$1 = 1; + (function (exports) { + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + } (binarySearch$1)); + return binarySearch$1; +} + +var quickSort$1 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredQuickSort$1; + +function requireQuickSort$1 () { + if (hasRequiredQuickSort$1) return quickSort$1; + hasRequiredQuickSort$1 = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + function SortTemplate(comparator) { + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot, false) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + return doQuickSort; + } + + function cloneSort(comparator) { + let template = SortTemplate.toString(); + let templateFn = new Function(`return ${template}`)(); + return templateFn(comparator); + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + + let sortCache = new WeakMap(); + quickSort$1.quickSort = function (ary, comparator, start = 0) { + let doQuickSort = sortCache.get(comparator); + if (doQuickSort === void 0) { + doQuickSort = cloneSort(comparator); + sortCache.set(comparator, doQuickSort); + } + doQuickSort(ary, comparator, start, ary.length - 1); + }; + return quickSort$1; +} + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredSourceMapConsumer$1; + +function requireSourceMapConsumer$1 () { + if (hasRequiredSourceMapConsumer$1) return sourceMapConsumer$1; + hasRequiredSourceMapConsumer$1 = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = /*@__PURE__*/ requireUtil$2(); + var binarySearch = /*@__PURE__*/ requireBinarySearch$1(); + var ArraySet = /*@__PURE__*/ requireArraySet$1().ArraySet; + var base64VLQ = /*@__PURE__*/ requireBase64Vlq$1(); + var quickSort = /*@__PURE__*/ requireQuickSort$1().quickSort; + + function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) + : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + var boundCallback = aCallback.bind(context); + var names = this._names; + var sources = this._sources; + var sourceMapURL = this._sourceMapURL; + + for (var i = 0, n = mappings.length; i < n; i++) { + var mapping = mappings[i]; + var source = mapping.source === null ? null : sources.at(mapping.source); + if(source !== null) { + source = util.computeSourceURL(sourceRoot, source, sourceMapURL); + } + boundCallback({ + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : names.at(mapping.name) + }); + } + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + sourceMapConsumer$1.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this._absoluteSources = this._sources.toArray().map(function (s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ + BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + + // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + + return -1; + }; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function (s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._absoluteSources.slice(); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + + const compareGenerated = util.compareByGeneratedPositionsDeflatedNoLine; + function sortGenerated(array, start) { + let l = array.length; + let n = array.length - start; + if (n <= 1) { + return; + } else if (n == 2) { + let a = array[start]; + let b = array[start + 1]; + if (compareGenerated(a, b) > 0) { + array[start] = b; + array[start + 1] = a; + } + } else if (n < 20) { + for (let i = start; i < l; i++) { + for (let j = i; j > start; j--) { + let a = array[j - 1]; + let b = array[j]; + if (compareGenerated(a, b) <= 0) { + break; + } + array[j - 1] = b; + array[j] = a; + } + } + } else { + quickSort(array, compareGenerated, start); + } + } + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, segment, end, value; + + let subarrayStart = 0; + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + + sortGenerated(generatedMappings, subarrayStart); + subarrayStart = generatedMappings.length; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + aStr.slice(index, end); + + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + let currentSource = mapping.source; + while (originalMappings.length <= currentSource) { + originalMappings.push(null); + } + if (originalMappings[currentSource] === null) { + originalMappings[currentSource] = []; + } + originalMappings[currentSource].push(mapping); + } + } + } + + sortGenerated(generatedMappings, subarrayStart); + this.__generatedMappings = generatedMappings; + + for (var i = 0; i < originalMappings.length; i++) { + if (originalMappings[i] != null) { + quickSort(originalMappings[i], util.compareByOriginalPositionsNoSource); + } + } + this.__originalMappings = [].concat(...originalMappings); + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + sourceMapConsumer$1.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content || content === '') { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if(source !== null) { + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + sourceMapConsumer$1.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + return sourceMapConsumer$1; +} + +var sourceNode$1 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredSourceNode$1; + +function requireSourceNode$1 () { + if (hasRequiredSourceNode$1) return sourceNode$1; + hasRequiredSourceNode$1 = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var SourceMapGenerator = /*@__PURE__*/ requireSourceMapGenerator$1().SourceMapGenerator; + var util = /*@__PURE__*/ requireUtil$2(); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + sourceNode$1.SourceNode = SourceNode; + return sourceNode$1; +} + +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var hasRequiredSourceMap$1; + +function requireSourceMap$1 () { + if (hasRequiredSourceMap$1) return sourceMap$1; + hasRequiredSourceMap$1 = 1; + sourceMap$1.SourceMapGenerator = /*@__PURE__*/ requireSourceMapGenerator$1().SourceMapGenerator; + sourceMap$1.SourceMapConsumer = /*@__PURE__*/ requireSourceMapConsumer$1().SourceMapConsumer; + sourceMap$1.SourceNode = /*@__PURE__*/ requireSourceNode$1().SourceNode; + return sourceMap$1; +} + +var require$$2 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_url$1); + +var previousMap; +var hasRequiredPreviousMap; + +function requirePreviousMap () { + if (hasRequiredPreviousMap) return previousMap; + hasRequiredPreviousMap = 1; + + let { existsSync, readFileSync } = require$$0$1; + let { dirname, join } = require$$1; + let { SourceMapConsumer, SourceMapGenerator } = /*@__PURE__*/ requireSourceMap$1(); + + function fromBase64(str) { + if (Buffer$1) { + return Buffer$1.from(str, 'base64').toString() + } else { + /* c8 ignore next 2 */ + return window.atob(str) + } + } + + class PreviousMap { + constructor(css, opts) { + if (opts.map === false) return + this.loadAnnotation(css); + this.inline = this.startWith(this.annotation, 'data:'); + + let prev = opts.map ? opts.map.prev : undefined; + let text = this.loadMap(opts.from, prev); + if (!this.mapFile && opts.from) { + this.mapFile = opts.from; + } + if (this.mapFile) this.root = dirname(this.mapFile); + if (text) this.text = text; + } + + consumer() { + if (!this.consumerCache) { + this.consumerCache = new SourceMapConsumer(this.text); + } + return this.consumerCache + } + + decodeInline(text) { + let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/; + let baseUri = /^data:application\/json;base64,/; + let charsetUri = /^data:application\/json;charset=utf-?8,/; + let uri = /^data:application\/json,/; + + let uriMatch = text.match(charsetUri) || text.match(uri); + if (uriMatch) { + return decodeURIComponent(text.substr(uriMatch[0].length)) + } + + let baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri); + if (baseUriMatch) { + return fromBase64(text.substr(baseUriMatch[0].length)) + } + + let encoding = text.match(/data:application\/json;([^,]+),/)[1]; + throw new Error('Unsupported source map encoding ' + encoding) + } + + getAnnotationURL(sourceMapString) { + return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, '').trim() + } + + isMap(map) { + if (typeof map !== 'object') return false + return ( + typeof map.mappings === 'string' || + typeof map._mappings === 'string' || + Array.isArray(map.sections) + ) + } + + loadAnnotation(css) { + let comments = css.match(/\/\*\s*# sourceMappingURL=/g); + if (!comments) return + + // sourceMappingURLs from comments, strings, etc. + let start = css.lastIndexOf(comments.pop()); + let end = css.indexOf('*/', start); + + if (start > -1 && end > -1) { + // Locate the last sourceMappingURL to avoid pickin + this.annotation = this.getAnnotationURL(css.substring(start, end)); + } + } + + loadFile(path) { + this.root = dirname(path); + if (existsSync(path)) { + this.mapFile = path; + return readFileSync(path, 'utf-8').toString().trim() + } + } + + loadMap(file, prev) { + if (prev === false) return false + + if (prev) { + if (typeof prev === 'string') { + return prev + } else if (typeof prev === 'function') { + let prevPath = prev(file); + if (prevPath) { + let map = this.loadFile(prevPath); + if (!map) { + throw new Error( + 'Unable to load previous source map: ' + prevPath.toString() + ) + } + return map + } + } else if (prev instanceof SourceMapConsumer) { + return SourceMapGenerator.fromSourceMap(prev).toString() + } else if (prev instanceof SourceMapGenerator) { + return prev.toString() + } else if (this.isMap(prev)) { + return JSON.stringify(prev) + } else { + throw new Error( + 'Unsupported previous source map format: ' + prev.toString() + ) + } + } else if (this.inline) { + return this.decodeInline(this.annotation) + } else if (this.annotation) { + let map = this.annotation; + if (file) map = join(dirname(file), map); + return this.loadFile(map) + } + } + + startWith(string, start) { + if (!string) return false + return string.substr(0, start.length) === start + } + + withContent() { + return !!( + this.consumer().sourcesContent && + this.consumer().sourcesContent.length > 0 + ) + } + } + + previousMap = PreviousMap; + PreviousMap.default = PreviousMap; + return previousMap; +} + +var input; +var hasRequiredInput; + +function requireInput () { + if (hasRequiredInput) return input; + hasRequiredInput = 1; + + let { nanoid } = /*@__PURE__*/ requireNonSecure(); + let { isAbsolute, resolve } = require$$1; + let { SourceMapConsumer, SourceMapGenerator } = /*@__PURE__*/ requireSourceMap$1(); + let { fileURLToPath, pathToFileURL } = require$$2; + + let CssSyntaxError = /*@__PURE__*/ requireCssSyntaxError(); + let PreviousMap = /*@__PURE__*/ requirePreviousMap(); + let terminalHighlight = /*@__PURE__*/ requireTerminalHighlight(); + + let fromOffsetCache = Symbol('fromOffsetCache'); + + let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator); + let pathAvailable = Boolean(resolve && isAbsolute); + + class Input { + constructor(css, opts = {}) { + if ( + css === null || + typeof css === 'undefined' || + (typeof css === 'object' && !css.toString) + ) { + throw new Error(`PostCSS received ${css} instead of CSS string`) + } + + this.css = css.toString(); + + if (this.css[0] === '\uFEFF' || this.css[0] === '\uFFFE') { + this.hasBOM = true; + this.css = this.css.slice(1); + } else { + this.hasBOM = false; + } + + if (opts.from) { + if ( + !pathAvailable || + /^\w+:\/\//.test(opts.from) || + isAbsolute(opts.from) + ) { + this.file = opts.from; + } else { + this.file = resolve(opts.from); + } + } + + if (pathAvailable && sourceMapAvailable) { + let map = new PreviousMap(this.css, opts); + if (map.text) { + this.map = map; + let file = map.consumer().file; + if (!this.file && file) this.file = this.mapResolve(file); + } + } + + if (!this.file) { + this.id = '<input css ' + nanoid(6) + '>'; + } + if (this.map) this.map.file = this.from; + } + + error(message, line, column, opts = {}) { + let endColumn, endLine, result; + + if (line && typeof line === 'object') { + let start = line; + let end = column; + if (typeof start.offset === 'number') { + let pos = this.fromOffset(start.offset); + line = pos.line; + column = pos.col; + } else { + line = start.line; + column = start.column; + } + if (typeof end.offset === 'number') { + let pos = this.fromOffset(end.offset); + endLine = pos.line; + endColumn = pos.col; + } else { + endLine = end.line; + endColumn = end.column; + } + } else if (!column) { + let pos = this.fromOffset(line); + line = pos.line; + column = pos.col; + } + + let origin = this.origin(line, column, endLine, endColumn); + if (origin) { + result = new CssSyntaxError( + message, + origin.endLine === undefined + ? origin.line + : { column: origin.column, line: origin.line }, + origin.endLine === undefined + ? origin.column + : { column: origin.endColumn, line: origin.endLine }, + origin.source, + origin.file, + opts.plugin + ); + } else { + result = new CssSyntaxError( + message, + endLine === undefined ? line : { column, line }, + endLine === undefined ? column : { column: endColumn, line: endLine }, + this.css, + this.file, + opts.plugin + ); + } + + result.input = { column, endColumn, endLine, line, source: this.css }; + if (this.file) { + if (pathToFileURL) { + result.input.url = pathToFileURL(this.file).toString(); + } + result.input.file = this.file; + } + + return result + } + + fromOffset(offset) { + let lastLine, lineToIndex; + if (!this[fromOffsetCache]) { + let lines = this.css.split('\n'); + lineToIndex = new Array(lines.length); + let prevIndex = 0; + + for (let i = 0, l = lines.length; i < l; i++) { + lineToIndex[i] = prevIndex; + prevIndex += lines[i].length + 1; + } + + this[fromOffsetCache] = lineToIndex; + } else { + lineToIndex = this[fromOffsetCache]; + } + lastLine = lineToIndex[lineToIndex.length - 1]; + + let min = 0; + if (offset >= lastLine) { + min = lineToIndex.length - 1; + } else { + let max = lineToIndex.length - 2; + let mid; + while (min < max) { + mid = min + ((max - min) >> 1); + if (offset < lineToIndex[mid]) { + max = mid - 1; + } else if (offset >= lineToIndex[mid + 1]) { + min = mid + 1; + } else { + min = mid; + break + } + } + } + return { + col: offset - lineToIndex[min] + 1, + line: min + 1 + } + } + + mapResolve(file) { + if (/^\w+:\/\//.test(file)) { + return file + } + return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file) + } + + origin(line, column, endLine, endColumn) { + if (!this.map) return false + let consumer = this.map.consumer(); + + let from = consumer.originalPositionFor({ column, line }); + if (!from.source) return false + + let to; + if (typeof endLine === 'number') { + to = consumer.originalPositionFor({ column: endColumn, line: endLine }); + } + + let fromUrl; + + if (isAbsolute(from.source)) { + fromUrl = pathToFileURL(from.source); + } else { + fromUrl = new URL( + from.source, + this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile) + ); + } + + let result = { + column: from.column, + endColumn: to && to.column, + endLine: to && to.line, + line: from.line, + url: fromUrl.toString() + }; + + if (fromUrl.protocol === 'file:') { + if (fileURLToPath) { + result.file = fileURLToPath(fromUrl); + } else { + /* c8 ignore next 2 */ + throw new Error(`file: protocol is not available in this PostCSS build`) + } + } + + let source = consumer.sourceContentFor(from.source); + if (source) result.source = source; + + return result + } + + toJSON() { + let json = {}; + for (let name of ['hasBOM', 'css', 'file', 'id']) { + if (this[name] != null) { + json[name] = this[name]; + } + } + if (this.map) { + json.map = { ...this.map }; + if (json.map.consumerCache) { + json.map.consumerCache = undefined; + } + } + return json + } + + get from() { + return this.file || this.id + } + } + + input = Input; + Input.default = Input; + + if (terminalHighlight && terminalHighlight.registerInput) { + terminalHighlight.registerInput(Input); + } + return input; +} + +var root$1; +var hasRequiredRoot$1; + +function requireRoot$1 () { + if (hasRequiredRoot$1) return root$1; + hasRequiredRoot$1 = 1; + + let Container = /*@__PURE__*/ requireContainer$1(); + + let LazyResult, Processor; + + class Root extends Container { + constructor(defaults) { + super(defaults); + this.type = 'root'; + if (!this.nodes) this.nodes = []; + } + + normalize(child, sample, type) { + let nodes = super.normalize(child); + + if (sample) { + if (type === 'prepend') { + if (this.nodes.length > 1) { + sample.raws.before = this.nodes[1].raws.before; + } else { + delete sample.raws.before; + } + } else if (this.first !== sample) { + for (let node of nodes) { + node.raws.before = sample.raws.before; + } + } + } + + return nodes + } + + removeChild(child, ignore) { + let index = this.index(child); + + if (!ignore && index === 0 && this.nodes.length > 1) { + this.nodes[1].raws.before = this.nodes[index].raws.before; + } + + return super.removeChild(child) + } + + toResult(opts = {}) { + let lazy = new LazyResult(new Processor(), this, opts); + return lazy.stringify() + } + } + + Root.registerLazyResult = dependant => { + LazyResult = dependant; + }; + + Root.registerProcessor = dependant => { + Processor = dependant; + }; + + root$1 = Root; + Root.default = Root; + + Container.registerRoot(Root); + return root$1; +} + +var list_1; +var hasRequiredList; + +function requireList () { + if (hasRequiredList) return list_1; + hasRequiredList = 1; + + let list = { + comma(string) { + return list.split(string, [','], true) + }, + + space(string) { + let spaces = [' ', '\n', '\t']; + return list.split(string, spaces) + }, + + split(string, separators, last) { + let array = []; + let current = ''; + let split = false; + + let func = 0; + let inQuote = false; + let prevQuote = ''; + let escape = false; + + for (let letter of string) { + if (escape) { + escape = false; + } else if (letter === '\\') { + escape = true; + } else if (inQuote) { + if (letter === prevQuote) { + inQuote = false; + } + } else if (letter === '"' || letter === "'") { + inQuote = true; + prevQuote = letter; + } else if (letter === '(') { + func += 1; + } else if (letter === ')') { + if (func > 0) func -= 1; + } else if (func === 0) { + if (separators.includes(letter)) split = true; + } + + if (split) { + if (current !== '') array.push(current.trim()); + current = ''; + split = false; + } else { + current += letter; + } + } + + if (last || current !== '') array.push(current.trim()); + return array + } + }; + + list_1 = list; + list.default = list; + return list_1; +} + +var rule; +var hasRequiredRule; + +function requireRule () { + if (hasRequiredRule) return rule; + hasRequiredRule = 1; + + let Container = /*@__PURE__*/ requireContainer$1(); + let list = /*@__PURE__*/ requireList(); + + class Rule extends Container { + constructor(defaults) { + super(defaults); + this.type = 'rule'; + if (!this.nodes) this.nodes = []; + } + + get selectors() { + return list.comma(this.selector) + } + + set selectors(values) { + let match = this.selector ? this.selector.match(/,\s*/) : null; + let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen'); + this.selector = values.join(sep); + } + } + + rule = Rule; + Rule.default = Rule; + + Container.registerRule(Rule); + return rule; +} + +var fromJSON_1; +var hasRequiredFromJSON; + +function requireFromJSON () { + if (hasRequiredFromJSON) return fromJSON_1; + hasRequiredFromJSON = 1; + + let AtRule = /*@__PURE__*/ requireAtRule(); + let Comment = /*@__PURE__*/ requireComment$1(); + let Declaration = /*@__PURE__*/ requireDeclaration(); + let Input = /*@__PURE__*/ requireInput(); + let PreviousMap = /*@__PURE__*/ requirePreviousMap(); + let Root = /*@__PURE__*/ requireRoot$1(); + let Rule = /*@__PURE__*/ requireRule(); + + function fromJSON(json, inputs) { + if (Array.isArray(json)) return json.map(n => fromJSON(n)) + + let { inputs: ownInputs, ...defaults } = json; + if (ownInputs) { + inputs = []; + for (let input of ownInputs) { + let inputHydrated = { ...input, __proto__: Input.prototype }; + if (inputHydrated.map) { + inputHydrated.map = { + ...inputHydrated.map, + __proto__: PreviousMap.prototype + }; + } + inputs.push(inputHydrated); + } + } + if (defaults.nodes) { + defaults.nodes = json.nodes.map(n => fromJSON(n, inputs)); + } + if (defaults.source) { + let { inputId, ...source } = defaults.source; + defaults.source = source; + if (inputId != null) { + defaults.source.input = inputs[inputId]; + } + } + if (defaults.type === 'root') { + return new Root(defaults) + } else if (defaults.type === 'decl') { + return new Declaration(defaults) + } else if (defaults.type === 'rule') { + return new Rule(defaults) + } else if (defaults.type === 'comment') { + return new Comment(defaults) + } else if (defaults.type === 'atrule') { + return new AtRule(defaults) + } else { + throw new Error('Unknown node type: ' + json.type) + } + } + + fromJSON_1 = fromJSON; + fromJSON.default = fromJSON; + return fromJSON_1; +} + +var mapGenerator; +var hasRequiredMapGenerator; + +function requireMapGenerator () { + if (hasRequiredMapGenerator) return mapGenerator; + hasRequiredMapGenerator = 1; + + let { dirname, relative, resolve, sep } = require$$1; + let { SourceMapConsumer, SourceMapGenerator } = /*@__PURE__*/ requireSourceMap$1(); + let { pathToFileURL } = require$$2; + + let Input = /*@__PURE__*/ requireInput(); + + let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator); + let pathAvailable = Boolean(dirname && resolve && relative && sep); + + class MapGenerator { + constructor(stringify, root, opts, cssString) { + this.stringify = stringify; + this.mapOpts = opts.map || {}; + this.root = root; + this.opts = opts; + this.css = cssString; + this.originalCSS = cssString; + this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute; + + this.memoizedFileURLs = new Map(); + this.memoizedPaths = new Map(); + this.memoizedURLs = new Map(); + } + + addAnnotation() { + let content; + + if (this.isInline()) { + content = + 'data:application/json;base64,' + this.toBase64(this.map.toString()); + } else if (typeof this.mapOpts.annotation === 'string') { + content = this.mapOpts.annotation; + } else if (typeof this.mapOpts.annotation === 'function') { + content = this.mapOpts.annotation(this.opts.to, this.root); + } else { + content = this.outputFile() + '.map'; + } + let eol = '\n'; + if (this.css.includes('\r\n')) eol = '\r\n'; + + this.css += eol + '/*# sourceMappingURL=' + content + ' */'; + } + + applyPrevMaps() { + for (let prev of this.previous()) { + let from = this.toUrl(this.path(prev.file)); + let root = prev.root || dirname(prev.file); + let map; + + if (this.mapOpts.sourcesContent === false) { + map = new SourceMapConsumer(prev.text); + if (map.sourcesContent) { + map.sourcesContent = null; + } + } else { + map = prev.consumer(); + } + + this.map.applySourceMap(map, from, this.toUrl(this.path(root))); + } + } + + clearAnnotation() { + if (this.mapOpts.annotation === false) return + + if (this.root) { + let node; + for (let i = this.root.nodes.length - 1; i >= 0; i--) { + node = this.root.nodes[i]; + if (node.type !== 'comment') continue + if (node.text.startsWith('# sourceMappingURL=')) { + this.root.removeChild(i); + } + } + } else if (this.css) { + this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ''); + } + } + + generate() { + this.clearAnnotation(); + if (pathAvailable && sourceMapAvailable && this.isMap()) { + return this.generateMap() + } else { + let result = ''; + this.stringify(this.root, i => { + result += i; + }); + return [result] + } + } + + generateMap() { + if (this.root) { + this.generateString(); + } else if (this.previous().length === 1) { + let prev = this.previous()[0].consumer(); + prev.file = this.outputFile(); + this.map = SourceMapGenerator.fromSourceMap(prev, { + ignoreInvalidMapping: true + }); + } else { + this.map = new SourceMapGenerator({ + file: this.outputFile(), + ignoreInvalidMapping: true + }); + this.map.addMapping({ + generated: { column: 0, line: 1 }, + original: { column: 0, line: 1 }, + source: this.opts.from + ? this.toUrl(this.path(this.opts.from)) + : '<no source>' + }); + } + + if (this.isSourcesContent()) this.setSourcesContent(); + if (this.root && this.previous().length > 0) this.applyPrevMaps(); + if (this.isAnnotation()) this.addAnnotation(); + + if (this.isInline()) { + return [this.css] + } else { + return [this.css, this.map] + } + } + + generateString() { + this.css = ''; + this.map = new SourceMapGenerator({ + file: this.outputFile(), + ignoreInvalidMapping: true + }); + + let line = 1; + let column = 1; + + let noSource = '<no source>'; + let mapping = { + generated: { column: 0, line: 0 }, + original: { column: 0, line: 0 }, + source: '' + }; + + let last, lines; + this.stringify(this.root, (str, node, type) => { + this.css += str; + + if (node && type !== 'end') { + mapping.generated.line = line; + mapping.generated.column = column - 1; + if (node.source && node.source.start) { + mapping.source = this.sourcePath(node); + mapping.original.line = node.source.start.line; + mapping.original.column = node.source.start.column - 1; + this.map.addMapping(mapping); + } else { + mapping.source = noSource; + mapping.original.line = 1; + mapping.original.column = 0; + this.map.addMapping(mapping); + } + } + + lines = str.match(/\n/g); + if (lines) { + line += lines.length; + last = str.lastIndexOf('\n'); + column = str.length - last; + } else { + column += str.length; + } + + if (node && type !== 'start') { + let p = node.parent || { raws: {} }; + let childless = + node.type === 'decl' || (node.type === 'atrule' && !node.nodes); + if (!childless || node !== p.last || p.raws.semicolon) { + if (node.source && node.source.end) { + mapping.source = this.sourcePath(node); + mapping.original.line = node.source.end.line; + mapping.original.column = node.source.end.column - 1; + mapping.generated.line = line; + mapping.generated.column = column - 2; + this.map.addMapping(mapping); + } else { + mapping.source = noSource; + mapping.original.line = 1; + mapping.original.column = 0; + mapping.generated.line = line; + mapping.generated.column = column - 1; + this.map.addMapping(mapping); + } + } + } + }); + } + + isAnnotation() { + if (this.isInline()) { + return true + } + if (typeof this.mapOpts.annotation !== 'undefined') { + return this.mapOpts.annotation + } + if (this.previous().length) { + return this.previous().some(i => i.annotation) + } + return true + } + + isInline() { + if (typeof this.mapOpts.inline !== 'undefined') { + return this.mapOpts.inline + } + + let annotation = this.mapOpts.annotation; + if (typeof annotation !== 'undefined' && annotation !== true) { + return false + } + + if (this.previous().length) { + return this.previous().some(i => i.inline) + } + return true + } + + isMap() { + if (typeof this.opts.map !== 'undefined') { + return !!this.opts.map + } + return this.previous().length > 0 + } + + isSourcesContent() { + if (typeof this.mapOpts.sourcesContent !== 'undefined') { + return this.mapOpts.sourcesContent + } + if (this.previous().length) { + return this.previous().some(i => i.withContent()) + } + return true + } + + outputFile() { + if (this.opts.to) { + return this.path(this.opts.to) + } else if (this.opts.from) { + return this.path(this.opts.from) + } else { + return 'to.css' + } + } + + path(file) { + if (this.mapOpts.absolute) return file + if (file.charCodeAt(0) === 60 /* `<` */) return file + if (/^\w+:\/\//.test(file)) return file + let cached = this.memoizedPaths.get(file); + if (cached) return cached + + let from = this.opts.to ? dirname(this.opts.to) : '.'; + + if (typeof this.mapOpts.annotation === 'string') { + from = dirname(resolve(from, this.mapOpts.annotation)); + } + + let path = relative(from, file); + this.memoizedPaths.set(file, path); + + return path + } + + previous() { + if (!this.previousMaps) { + this.previousMaps = []; + if (this.root) { + this.root.walk(node => { + if (node.source && node.source.input.map) { + let map = node.source.input.map; + if (!this.previousMaps.includes(map)) { + this.previousMaps.push(map); + } + } + }); + } else { + let input = new Input(this.originalCSS, this.opts); + if (input.map) this.previousMaps.push(input.map); + } + } + + return this.previousMaps + } + + setSourcesContent() { + let already = {}; + if (this.root) { + this.root.walk(node => { + if (node.source) { + let from = node.source.input.from; + if (from && !already[from]) { + already[from] = true; + let fromUrl = this.usesFileUrls + ? this.toFileUrl(from) + : this.toUrl(this.path(from)); + this.map.setSourceContent(fromUrl, node.source.input.css); + } + } + }); + } else if (this.css) { + let from = this.opts.from + ? this.toUrl(this.path(this.opts.from)) + : '<no source>'; + this.map.setSourceContent(from, this.css); + } + } + + sourcePath(node) { + if (this.mapOpts.from) { + return this.toUrl(this.mapOpts.from) + } else if (this.usesFileUrls) { + return this.toFileUrl(node.source.input.from) + } else { + return this.toUrl(this.path(node.source.input.from)) + } + } + + toBase64(str) { + if (Buffer$1) { + return Buffer$1.from(str).toString('base64') + } else { + return window.btoa(unescape(encodeURIComponent(str))) + } + } + + toFileUrl(path) { + let cached = this.memoizedFileURLs.get(path); + if (cached) return cached + + if (pathToFileURL) { + let fileURL = pathToFileURL(path).toString(); + this.memoizedFileURLs.set(path, fileURL); + + return fileURL + } else { + throw new Error( + '`map.absolute` option is not available in this PostCSS build' + ) + } + } + + toUrl(path) { + let cached = this.memoizedURLs.get(path); + if (cached) return cached + + if (sep === '\\') { + path = path.replace(/\\/g, '/'); + } + + let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent); + this.memoizedURLs.set(path, url); + + return url + } + } + + mapGenerator = MapGenerator; + return mapGenerator; +} + +var parser$1; +var hasRequiredParser$1; + +function requireParser$1 () { + if (hasRequiredParser$1) return parser$1; + hasRequiredParser$1 = 1; + + let AtRule = /*@__PURE__*/ requireAtRule(); + let Comment = /*@__PURE__*/ requireComment$1(); + let Declaration = /*@__PURE__*/ requireDeclaration(); + let Root = /*@__PURE__*/ requireRoot$1(); + let Rule = /*@__PURE__*/ requireRule(); + let tokenizer = /*@__PURE__*/ requireTokenize$1(); + + const SAFE_COMMENT_NEIGHBOR = { + empty: true, + space: true + }; + + function findLastWithPosition(tokens) { + for (let i = tokens.length - 1; i >= 0; i--) { + let token = tokens[i]; + let pos = token[3] || token[2]; + if (pos) return pos + } + } + + class Parser { + constructor(input) { + this.input = input; + + this.root = new Root(); + this.current = this.root; + this.spaces = ''; + this.semicolon = false; + + this.createTokenizer(); + this.root.source = { input, start: { column: 1, line: 1, offset: 0 } }; + } + + atrule(token) { + let node = new AtRule(); + node.name = token[1].slice(1); + if (node.name === '') { + this.unnamedAtrule(node, token); + } + this.init(node, token[2]); + + let type; + let prev; + let shift; + let last = false; + let open = false; + let params = []; + let brackets = []; + + while (!this.tokenizer.endOfFile()) { + token = this.tokenizer.nextToken(); + type = token[0]; + + if (type === '(' || type === '[') { + brackets.push(type === '(' ? ')' : ']'); + } else if (type === '{' && brackets.length > 0) { + brackets.push('}'); + } else if (type === brackets[brackets.length - 1]) { + brackets.pop(); + } + + if (brackets.length === 0) { + if (type === ';') { + node.source.end = this.getPosition(token[2]); + node.source.end.offset++; + this.semicolon = true; + break + } else if (type === '{') { + open = true; + break + } else if (type === '}') { + if (params.length > 0) { + shift = params.length - 1; + prev = params[shift]; + while (prev && prev[0] === 'space') { + prev = params[--shift]; + } + if (prev) { + node.source.end = this.getPosition(prev[3] || prev[2]); + node.source.end.offset++; + } + } + this.end(token); + break + } else { + params.push(token); + } + } else { + params.push(token); + } + + if (this.tokenizer.endOfFile()) { + last = true; + break + } + } + + node.raws.between = this.spacesAndCommentsFromEnd(params); + if (params.length) { + node.raws.afterName = this.spacesAndCommentsFromStart(params); + this.raw(node, 'params', params); + if (last) { + token = params[params.length - 1]; + node.source.end = this.getPosition(token[3] || token[2]); + node.source.end.offset++; + this.spaces = node.raws.between; + node.raws.between = ''; + } + } else { + node.raws.afterName = ''; + node.params = ''; + } + + if (open) { + node.nodes = []; + this.current = node; + } + } + + checkMissedSemicolon(tokens) { + let colon = this.colon(tokens); + if (colon === false) return + + let founded = 0; + let token; + for (let j = colon - 1; j >= 0; j--) { + token = tokens[j]; + if (token[0] !== 'space') { + founded += 1; + if (founded === 2) break + } + } + // If the token is a word, e.g. `!important`, `red` or any other valid property's value. + // Then we need to return the colon after that word token. [3] is the "end" colon of that word. + // And because we need it after that one we do +1 to get the next one. + throw this.input.error( + 'Missed semicolon', + token[0] === 'word' ? token[3] + 1 : token[2] + ) + } + + colon(tokens) { + let brackets = 0; + let prev, token, type; + for (let [i, element] of tokens.entries()) { + token = element; + type = token[0]; + + if (type === '(') { + brackets += 1; + } + if (type === ')') { + brackets -= 1; + } + if (brackets === 0 && type === ':') { + if (!prev) { + this.doubleColon(token); + } else if (prev[0] === 'word' && prev[1] === 'progid') { + continue + } else { + return i + } + } + + prev = token; + } + return false + } + + comment(token) { + let node = new Comment(); + this.init(node, token[2]); + node.source.end = this.getPosition(token[3] || token[2]); + node.source.end.offset++; + + let text = token[1].slice(2, -2); + if (/^\s*$/.test(text)) { + node.text = ''; + node.raws.left = text; + node.raws.right = ''; + } else { + let match = text.match(/^(\s*)([^]*\S)(\s*)$/); + node.text = match[2]; + node.raws.left = match[1]; + node.raws.right = match[3]; + } + } + + createTokenizer() { + this.tokenizer = tokenizer(this.input); + } + + decl(tokens, customProperty) { + let node = new Declaration(); + this.init(node, tokens[0][2]); + + let last = tokens[tokens.length - 1]; + if (last[0] === ';') { + this.semicolon = true; + tokens.pop(); + } + + node.source.end = this.getPosition( + last[3] || last[2] || findLastWithPosition(tokens) + ); + node.source.end.offset++; + + while (tokens[0][0] !== 'word') { + if (tokens.length === 1) this.unknownWord(tokens); + node.raws.before += tokens.shift()[1]; + } + node.source.start = this.getPosition(tokens[0][2]); + + node.prop = ''; + while (tokens.length) { + let type = tokens[0][0]; + if (type === ':' || type === 'space' || type === 'comment') { + break + } + node.prop += tokens.shift()[1]; + } + + node.raws.between = ''; + + let token; + while (tokens.length) { + token = tokens.shift(); + + if (token[0] === ':') { + node.raws.between += token[1]; + break + } else { + if (token[0] === 'word' && /\w/.test(token[1])) { + this.unknownWord([token]); + } + node.raws.between += token[1]; + } + } + + if (node.prop[0] === '_' || node.prop[0] === '*') { + node.raws.before += node.prop[0]; + node.prop = node.prop.slice(1); + } + + let firstSpaces = []; + let next; + while (tokens.length) { + next = tokens[0][0]; + if (next !== 'space' && next !== 'comment') break + firstSpaces.push(tokens.shift()); + } + + this.precheckMissedSemicolon(tokens); + + for (let i = tokens.length - 1; i >= 0; i--) { + token = tokens[i]; + if (token[1].toLowerCase() === '!important') { + node.important = true; + let string = this.stringFrom(tokens, i); + string = this.spacesFromEnd(tokens) + string; + if (string !== ' !important') node.raws.important = string; + break + } else if (token[1].toLowerCase() === 'important') { + let cache = tokens.slice(0); + let str = ''; + for (let j = i; j > 0; j--) { + let type = cache[j][0]; + if (str.trim().startsWith('!') && type !== 'space') { + break + } + str = cache.pop()[1] + str; + } + if (str.trim().startsWith('!')) { + node.important = true; + node.raws.important = str; + tokens = cache; + } + } + + if (token[0] !== 'space' && token[0] !== 'comment') { + break + } + } + + let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment'); + + if (hasWord) { + node.raws.between += firstSpaces.map(i => i[1]).join(''); + firstSpaces = []; + } + this.raw(node, 'value', firstSpaces.concat(tokens), customProperty); + + if (node.value.includes(':') && !customProperty) { + this.checkMissedSemicolon(tokens); + } + } + + doubleColon(token) { + throw this.input.error( + 'Double colon', + { offset: token[2] }, + { offset: token[2] + token[1].length } + ) + } + + emptyRule(token) { + let node = new Rule(); + this.init(node, token[2]); + node.selector = ''; + node.raws.between = ''; + this.current = node; + } + + end(token) { + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon; + } + this.semicolon = false; + + this.current.raws.after = (this.current.raws.after || '') + this.spaces; + this.spaces = ''; + + if (this.current.parent) { + this.current.source.end = this.getPosition(token[2]); + this.current.source.end.offset++; + this.current = this.current.parent; + } else { + this.unexpectedClose(token); + } + } + + endFile() { + if (this.current.parent) this.unclosedBlock(); + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon; + } + this.current.raws.after = (this.current.raws.after || '') + this.spaces; + this.root.source.end = this.getPosition(this.tokenizer.position()); + } + + freeSemicolon(token) { + this.spaces += token[1]; + if (this.current.nodes) { + let prev = this.current.nodes[this.current.nodes.length - 1]; + if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) { + prev.raws.ownSemicolon = this.spaces; + this.spaces = ''; + } + } + } + + // Helpers + + getPosition(offset) { + let pos = this.input.fromOffset(offset); + return { + column: pos.col, + line: pos.line, + offset + } + } + + init(node, offset) { + this.current.push(node); + node.source = { + input: this.input, + start: this.getPosition(offset) + }; + node.raws.before = this.spaces; + this.spaces = ''; + if (node.type !== 'comment') this.semicolon = false; + } + + other(start) { + let end = false; + let type = null; + let colon = false; + let bracket = null; + let brackets = []; + let customProperty = start[1].startsWith('--'); + + let tokens = []; + let token = start; + while (token) { + type = token[0]; + tokens.push(token); + + if (type === '(' || type === '[') { + if (!bracket) bracket = token; + brackets.push(type === '(' ? ')' : ']'); + } else if (customProperty && colon && type === '{') { + if (!bracket) bracket = token; + brackets.push('}'); + } else if (brackets.length === 0) { + if (type === ';') { + if (colon) { + this.decl(tokens, customProperty); + return + } else { + break + } + } else if (type === '{') { + this.rule(tokens); + return + } else if (type === '}') { + this.tokenizer.back(tokens.pop()); + end = true; + break + } else if (type === ':') { + colon = true; + } + } else if (type === brackets[brackets.length - 1]) { + brackets.pop(); + if (brackets.length === 0) bracket = null; + } + + token = this.tokenizer.nextToken(); + } + + if (this.tokenizer.endOfFile()) end = true; + if (brackets.length > 0) this.unclosedBracket(bracket); + + if (end && colon) { + if (!customProperty) { + while (tokens.length) { + token = tokens[tokens.length - 1][0]; + if (token !== 'space' && token !== 'comment') break + this.tokenizer.back(tokens.pop()); + } + } + this.decl(tokens, customProperty); + } else { + this.unknownWord(tokens); + } + } + + parse() { + let token; + while (!this.tokenizer.endOfFile()) { + token = this.tokenizer.nextToken(); + + switch (token[0]) { + case 'space': + this.spaces += token[1]; + break + + case ';': + this.freeSemicolon(token); + break + + case '}': + this.end(token); + break + + case 'comment': + this.comment(token); + break + + case 'at-word': + this.atrule(token); + break + + case '{': + this.emptyRule(token); + break + + default: + this.other(token); + break + } + } + this.endFile(); + } + + precheckMissedSemicolon(/* tokens */) { + // Hook for Safe Parser + } + + raw(node, prop, tokens, customProperty) { + let token, type; + let length = tokens.length; + let value = ''; + let clean = true; + let next, prev; + + for (let i = 0; i < length; i += 1) { + token = tokens[i]; + type = token[0]; + if (type === 'space' && i === length - 1 && !customProperty) { + clean = false; + } else if (type === 'comment') { + prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty'; + next = tokens[i + 1] ? tokens[i + 1][0] : 'empty'; + if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) { + if (value.slice(-1) === ',') { + clean = false; + } else { + value += token[1]; + } + } else { + clean = false; + } + } else { + value += token[1]; + } + } + if (!clean) { + let raw = tokens.reduce((all, i) => all + i[1], ''); + node.raws[prop] = { raw, value }; + } + node[prop] = value; + } + + rule(tokens) { + tokens.pop(); + + let node = new Rule(); + this.init(node, tokens[0][2]); + + node.raws.between = this.spacesAndCommentsFromEnd(tokens); + this.raw(node, 'selector', tokens); + this.current = node; + } + + spacesAndCommentsFromEnd(tokens) { + let lastTokenType; + let spaces = ''; + while (tokens.length) { + lastTokenType = tokens[tokens.length - 1][0]; + if (lastTokenType !== 'space' && lastTokenType !== 'comment') break + spaces = tokens.pop()[1] + spaces; + } + return spaces + } + + // Errors + + spacesAndCommentsFromStart(tokens) { + let next; + let spaces = ''; + while (tokens.length) { + next = tokens[0][0]; + if (next !== 'space' && next !== 'comment') break + spaces += tokens.shift()[1]; + } + return spaces + } + + spacesFromEnd(tokens) { + let lastTokenType; + let spaces = ''; + while (tokens.length) { + lastTokenType = tokens[tokens.length - 1][0]; + if (lastTokenType !== 'space') break + spaces = tokens.pop()[1] + spaces; + } + return spaces + } + + stringFrom(tokens, from) { + let result = ''; + for (let i = from; i < tokens.length; i++) { + result += tokens[i][1]; + } + tokens.splice(from, tokens.length - from); + return result + } + + unclosedBlock() { + let pos = this.current.source.start; + throw this.input.error('Unclosed block', pos.line, pos.column) + } + + unclosedBracket(bracket) { + throw this.input.error( + 'Unclosed bracket', + { offset: bracket[2] }, + { offset: bracket[2] + 1 } + ) + } + + unexpectedClose(token) { + throw this.input.error( + 'Unexpected }', + { offset: token[2] }, + { offset: token[2] + 1 } + ) + } + + unknownWord(tokens) { + throw this.input.error( + 'Unknown word', + { offset: tokens[0][2] }, + { offset: tokens[0][2] + tokens[0][1].length } + ) + } + + unnamedAtrule(node, token) { + throw this.input.error( + 'At-rule without name', + { offset: token[2] }, + { offset: token[2] + token[1].length } + ) + } + } + + parser$1 = Parser; + return parser$1; +} + +var parse_1; +var hasRequiredParse; + +function requireParse () { + if (hasRequiredParse) return parse_1; + hasRequiredParse = 1; + + let Container = /*@__PURE__*/ requireContainer$1(); + let Input = /*@__PURE__*/ requireInput(); + let Parser = /*@__PURE__*/ requireParser$1(); + + function parse(css, opts) { + let input = new Input(css, opts); + let parser = new Parser(input); + try { + parser.parse(); + } catch (e) { + if (browser$1.env.NODE_ENV !== 'production') { + if (e.name === 'CssSyntaxError' && opts && opts.from) { + if (/\.scss$/i.test(opts.from)) { + e.message += + '\nYou tried to parse SCSS with ' + + 'the standard CSS parser; ' + + 'try again with the postcss-scss parser'; + } else if (/\.sass/i.test(opts.from)) { + e.message += + '\nYou tried to parse Sass with ' + + 'the standard CSS parser; ' + + 'try again with the postcss-sass parser'; + } else if (/\.less$/i.test(opts.from)) { + e.message += + '\nYou tried to parse Less with ' + + 'the standard CSS parser; ' + + 'try again with the postcss-less parser'; + } + } + } + throw e + } + + return parser.root + } + + parse_1 = parse; + parse.default = parse; + + Container.registerParse(parse); + return parse_1; +} + +var warning; +var hasRequiredWarning; + +function requireWarning () { + if (hasRequiredWarning) return warning; + hasRequiredWarning = 1; + + class Warning { + constructor(text, opts = {}) { + this.type = 'warning'; + this.text = text; + + if (opts.node && opts.node.source) { + let range = opts.node.rangeBy(opts); + this.line = range.start.line; + this.column = range.start.column; + this.endLine = range.end.line; + this.endColumn = range.end.column; + } + + for (let opt in opts) this[opt] = opts[opt]; + } + + toString() { + if (this.node) { + return this.node.error(this.text, { + index: this.index, + plugin: this.plugin, + word: this.word + }).message + } + + if (this.plugin) { + return this.plugin + ': ' + this.text + } + + return this.text + } + } + + warning = Warning; + Warning.default = Warning; + return warning; +} + +var result; +var hasRequiredResult; + +function requireResult () { + if (hasRequiredResult) return result; + hasRequiredResult = 1; + + let Warning = /*@__PURE__*/ requireWarning(); + + class Result { + constructor(processor, root, opts) { + this.processor = processor; + this.messages = []; + this.root = root; + this.opts = opts; + this.css = undefined; + this.map = undefined; + } + + toString() { + return this.css + } + + warn(text, opts = {}) { + if (!opts.plugin) { + if (this.lastPlugin && this.lastPlugin.postcssPlugin) { + opts.plugin = this.lastPlugin.postcssPlugin; + } + } + + let warning = new Warning(text, opts); + this.messages.push(warning); + + return warning + } + + warnings() { + return this.messages.filter(i => i.type === 'warning') + } + + get content() { + return this.css + } + } + + result = Result; + Result.default = Result; + return result; +} + +/* eslint-disable no-console */ + +var warnOnce; +var hasRequiredWarnOnce; + +function requireWarnOnce () { + if (hasRequiredWarnOnce) return warnOnce; + hasRequiredWarnOnce = 1; + + let printed = {}; + + warnOnce = function warnOnce(message) { + if (printed[message]) return + printed[message] = true; + + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + }; + return warnOnce; +} + +var lazyResult; +var hasRequiredLazyResult; + +function requireLazyResult () { + if (hasRequiredLazyResult) return lazyResult; + hasRequiredLazyResult = 1; + + let Container = /*@__PURE__*/ requireContainer$1(); + let Document = /*@__PURE__*/ requireDocument(); + let MapGenerator = /*@__PURE__*/ requireMapGenerator(); + let parse = /*@__PURE__*/ requireParse(); + let Result = /*@__PURE__*/ requireResult(); + let Root = /*@__PURE__*/ requireRoot$1(); + let stringify = /*@__PURE__*/ requireStringify(); + let { isClean, my } = /*@__PURE__*/ requireSymbols(); + let warnOnce = /*@__PURE__*/ requireWarnOnce(); + + const TYPE_TO_CLASS_NAME = { + atrule: 'AtRule', + comment: 'Comment', + decl: 'Declaration', + document: 'Document', + root: 'Root', + rule: 'Rule' + }; + + const PLUGIN_PROPS = { + AtRule: true, + AtRuleExit: true, + Comment: true, + CommentExit: true, + Declaration: true, + DeclarationExit: true, + Document: true, + DocumentExit: true, + Once: true, + OnceExit: true, + postcssPlugin: true, + prepare: true, + Root: true, + RootExit: true, + Rule: true, + RuleExit: true + }; + + const NOT_VISITORS = { + Once: true, + postcssPlugin: true, + prepare: true + }; + + const CHILDREN = 0; + + function isPromise(obj) { + return typeof obj === 'object' && typeof obj.then === 'function' + } + + function getEvents(node) { + let key = false; + let type = TYPE_TO_CLASS_NAME[node.type]; + if (node.type === 'decl') { + key = node.prop.toLowerCase(); + } else if (node.type === 'atrule') { + key = node.name.toLowerCase(); + } + + if (key && node.append) { + return [ + type, + type + '-' + key, + CHILDREN, + type + 'Exit', + type + 'Exit-' + key + ] + } else if (key) { + return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key] + } else if (node.append) { + return [type, CHILDREN, type + 'Exit'] + } else { + return [type, type + 'Exit'] + } + } + + function toStack(node) { + let events; + if (node.type === 'document') { + events = ['Document', CHILDREN, 'DocumentExit']; + } else if (node.type === 'root') { + events = ['Root', CHILDREN, 'RootExit']; + } else { + events = getEvents(node); + } + + return { + eventIndex: 0, + events, + iterator: 0, + node, + visitorIndex: 0, + visitors: [] + } + } + + function cleanMarks(node) { + node[isClean] = false; + if (node.nodes) node.nodes.forEach(i => cleanMarks(i)); + return node + } + + let postcss = {}; + + class LazyResult { + constructor(processor, css, opts) { + this.stringified = false; + this.processed = false; + + let root; + if ( + typeof css === 'object' && + css !== null && + (css.type === 'root' || css.type === 'document') + ) { + root = cleanMarks(css); + } else if (css instanceof LazyResult || css instanceof Result) { + root = cleanMarks(css.root); + if (css.map) { + if (typeof opts.map === 'undefined') opts.map = {}; + if (!opts.map.inline) opts.map.inline = false; + opts.map.prev = css.map; + } + } else { + let parser = parse; + if (opts.syntax) parser = opts.syntax.parse; + if (opts.parser) parser = opts.parser; + if (parser.parse) parser = parser.parse; + + try { + root = parser(css, opts); + } catch (error) { + this.processed = true; + this.error = error; + } + + if (root && !root[my]) { + /* c8 ignore next 2 */ + Container.rebuild(root); + } + } + + this.result = new Result(processor, root, opts); + this.helpers = { ...postcss, postcss, result: this.result }; + this.plugins = this.processor.plugins.map(plugin => { + if (typeof plugin === 'object' && plugin.prepare) { + return { ...plugin, ...plugin.prepare(this.result) } + } else { + return plugin + } + }); + } + + async() { + if (this.error) return Promise.reject(this.error) + if (this.processed) return Promise.resolve(this.result) + if (!this.processing) { + this.processing = this.runAsync(); + } + return this.processing + } + + catch(onRejected) { + return this.async().catch(onRejected) + } + + finally(onFinally) { + return this.async().then(onFinally, onFinally) + } + + getAsyncError() { + throw new Error('Use process(css).then(cb) to work with async plugins') + } + + handleError(error, node) { + let plugin = this.result.lastPlugin; + try { + if (node) node.addToError(error); + this.error = error; + if (error.name === 'CssSyntaxError' && !error.plugin) { + error.plugin = plugin.postcssPlugin; + error.setMessage(); + } else if (plugin.postcssVersion) { + if (browser$1.env.NODE_ENV !== 'production') { + let pluginName = plugin.postcssPlugin; + let pluginVer = plugin.postcssVersion; + let runtimeVer = this.result.processor.version; + let a = pluginVer.split('.'); + let b = runtimeVer.split('.'); + + if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) { + // eslint-disable-next-line no-console + console.error( + 'Unknown error from PostCSS plugin. Your current PostCSS ' + + 'version is ' + + runtimeVer + + ', but ' + + pluginName + + ' uses ' + + pluginVer + + '. Perhaps this is the source of the error below.' + ); + } + } + } + } catch (err) { + /* c8 ignore next 3 */ + // eslint-disable-next-line no-console + if (console && console.error) console.error(err); + } + return error + } + + prepareVisitors() { + this.listeners = {}; + let add = (plugin, type, cb) => { + if (!this.listeners[type]) this.listeners[type] = []; + this.listeners[type].push([plugin, cb]); + }; + for (let plugin of this.plugins) { + if (typeof plugin === 'object') { + for (let event in plugin) { + if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) { + throw new Error( + `Unknown event ${event} in ${plugin.postcssPlugin}. ` + + `Try to update PostCSS (${this.processor.version} now).` + ) + } + if (!NOT_VISITORS[event]) { + if (typeof plugin[event] === 'object') { + for (let filter in plugin[event]) { + if (filter === '*') { + add(plugin, event, plugin[event][filter]); + } else { + add( + plugin, + event + '-' + filter.toLowerCase(), + plugin[event][filter] + ); + } + } + } else if (typeof plugin[event] === 'function') { + add(plugin, event, plugin[event]); + } + } + } + } + } + this.hasListener = Object.keys(this.listeners).length > 0; + } + + async runAsync() { + this.plugin = 0; + for (let i = 0; i < this.plugins.length; i++) { + let plugin = this.plugins[i]; + let promise = this.runOnRoot(plugin); + if (isPromise(promise)) { + try { + await promise; + } catch (error) { + throw this.handleError(error) + } + } + } + + this.prepareVisitors(); + if (this.hasListener) { + let root = this.result.root; + while (!root[isClean]) { + root[isClean] = true; + let stack = [toStack(root)]; + while (stack.length > 0) { + let promise = this.visitTick(stack); + if (isPromise(promise)) { + try { + await promise; + } catch (e) { + let node = stack[stack.length - 1].node; + throw this.handleError(e, node) + } + } + } + } + + if (this.listeners.OnceExit) { + for (let [plugin, visitor] of this.listeners.OnceExit) { + this.result.lastPlugin = plugin; + try { + if (root.type === 'document') { + let roots = root.nodes.map(subRoot => + visitor(subRoot, this.helpers) + ); + + await Promise.all(roots); + } else { + await visitor(root, this.helpers); + } + } catch (e) { + throw this.handleError(e) + } + } + } + } + + this.processed = true; + return this.stringify() + } + + runOnRoot(plugin) { + this.result.lastPlugin = plugin; + try { + if (typeof plugin === 'object' && plugin.Once) { + if (this.result.root.type === 'document') { + let roots = this.result.root.nodes.map(root => + plugin.Once(root, this.helpers) + ); + + if (isPromise(roots[0])) { + return Promise.all(roots) + } + + return roots + } + + return plugin.Once(this.result.root, this.helpers) + } else if (typeof plugin === 'function') { + return plugin(this.result.root, this.result) + } + } catch (error) { + throw this.handleError(error) + } + } + + stringify() { + if (this.error) throw this.error + if (this.stringified) return this.result + this.stringified = true; + + this.sync(); + + let opts = this.result.opts; + let str = stringify; + if (opts.syntax) str = opts.syntax.stringify; + if (opts.stringifier) str = opts.stringifier; + if (str.stringify) str = str.stringify; + + let map = new MapGenerator(str, this.result.root, this.result.opts); + let data = map.generate(); + this.result.css = data[0]; + this.result.map = data[1]; + + return this.result + } + + sync() { + if (this.error) throw this.error + if (this.processed) return this.result + this.processed = true; + + if (this.processing) { + throw this.getAsyncError() + } + + for (let plugin of this.plugins) { + let promise = this.runOnRoot(plugin); + if (isPromise(promise)) { + throw this.getAsyncError() + } + } + + this.prepareVisitors(); + if (this.hasListener) { + let root = this.result.root; + while (!root[isClean]) { + root[isClean] = true; + this.walkSync(root); + } + if (this.listeners.OnceExit) { + if (root.type === 'document') { + for (let subRoot of root.nodes) { + this.visitSync(this.listeners.OnceExit, subRoot); + } + } else { + this.visitSync(this.listeners.OnceExit, root); + } + } + } + + return this.result + } + + then(onFulfilled, onRejected) { + if (browser$1.env.NODE_ENV !== 'production') { + if (!('from' in this.opts)) { + warnOnce( + 'Without `from` option PostCSS could generate wrong source map ' + + 'and will not find Browserslist config. Set it to CSS file path ' + + 'or to `undefined` to prevent this warning.' + ); + } + } + return this.async().then(onFulfilled, onRejected) + } + + toString() { + return this.css + } + + visitSync(visitors, node) { + for (let [plugin, visitor] of visitors) { + this.result.lastPlugin = plugin; + let promise; + try { + promise = visitor(node, this.helpers); + } catch (e) { + throw this.handleError(e, node.proxyOf) + } + if (node.type !== 'root' && node.type !== 'document' && !node.parent) { + return true + } + if (isPromise(promise)) { + throw this.getAsyncError() + } + } + } + + visitTick(stack) { + let visit = stack[stack.length - 1]; + let { node, visitors } = visit; + + if (node.type !== 'root' && node.type !== 'document' && !node.parent) { + stack.pop(); + return + } + + if (visitors.length > 0 && visit.visitorIndex < visitors.length) { + let [plugin, visitor] = visitors[visit.visitorIndex]; + visit.visitorIndex += 1; + if (visit.visitorIndex === visitors.length) { + visit.visitors = []; + visit.visitorIndex = 0; + } + this.result.lastPlugin = plugin; + try { + return visitor(node.toProxy(), this.helpers) + } catch (e) { + throw this.handleError(e, node) + } + } + + if (visit.iterator !== 0) { + let iterator = visit.iterator; + let child; + while ((child = node.nodes[node.indexes[iterator]])) { + node.indexes[iterator] += 1; + if (!child[isClean]) { + child[isClean] = true; + stack.push(toStack(child)); + return + } + } + visit.iterator = 0; + delete node.indexes[iterator]; + } + + let events = visit.events; + while (visit.eventIndex < events.length) { + let event = events[visit.eventIndex]; + visit.eventIndex += 1; + if (event === CHILDREN) { + if (node.nodes && node.nodes.length) { + node[isClean] = true; + visit.iterator = node.getIterator(); + } + return + } else if (this.listeners[event]) { + visit.visitors = this.listeners[event]; + return + } + } + stack.pop(); + } + + walkSync(node) { + node[isClean] = true; + let events = getEvents(node); + for (let event of events) { + if (event === CHILDREN) { + if (node.nodes) { + node.each(child => { + if (!child[isClean]) this.walkSync(child); + }); + } + } else { + let visitors = this.listeners[event]; + if (visitors) { + if (this.visitSync(visitors, node.toProxy())) return + } + } + } + } + + warnings() { + return this.sync().warnings() + } + + get content() { + return this.stringify().content + } + + get css() { + return this.stringify().css + } + + get map() { + return this.stringify().map + } + + get messages() { + return this.sync().messages + } + + get opts() { + return this.result.opts + } + + get processor() { + return this.result.processor + } + + get root() { + return this.sync().root + } + + get [Symbol.toStringTag]() { + return 'LazyResult' + } + } + + LazyResult.registerPostcss = dependant => { + postcss = dependant; + }; + + lazyResult = LazyResult; + LazyResult.default = LazyResult; + + Root.registerLazyResult(LazyResult); + Document.registerLazyResult(LazyResult); + return lazyResult; +} + +var noWorkResult; +var hasRequiredNoWorkResult; + +function requireNoWorkResult () { + if (hasRequiredNoWorkResult) return noWorkResult; + hasRequiredNoWorkResult = 1; + + let MapGenerator = /*@__PURE__*/ requireMapGenerator(); + let parse = /*@__PURE__*/ requireParse(); + const Result = /*@__PURE__*/ requireResult(); + let stringify = /*@__PURE__*/ requireStringify(); + let warnOnce = /*@__PURE__*/ requireWarnOnce(); + + class NoWorkResult { + constructor(processor, css, opts) { + css = css.toString(); + this.stringified = false; + + this._processor = processor; + this._css = css; + this._opts = opts; + this._map = undefined; + let root; + + let str = stringify; + this.result = new Result(this._processor, root, this._opts); + this.result.css = css; + + let self = this; + Object.defineProperty(this.result, 'root', { + get() { + return self.root + } + }); + + let map = new MapGenerator(str, root, this._opts, css); + if (map.isMap()) { + let [generatedCSS, generatedMap] = map.generate(); + if (generatedCSS) { + this.result.css = generatedCSS; + } + if (generatedMap) { + this.result.map = generatedMap; + } + } else { + map.clearAnnotation(); + this.result.css = map.css; + } + } + + async() { + if (this.error) return Promise.reject(this.error) + return Promise.resolve(this.result) + } + + catch(onRejected) { + return this.async().catch(onRejected) + } + + finally(onFinally) { + return this.async().then(onFinally, onFinally) + } + + sync() { + if (this.error) throw this.error + return this.result + } + + then(onFulfilled, onRejected) { + if (browser$1.env.NODE_ENV !== 'production') { + if (!('from' in this._opts)) { + warnOnce( + 'Without `from` option PostCSS could generate wrong source map ' + + 'and will not find Browserslist config. Set it to CSS file path ' + + 'or to `undefined` to prevent this warning.' + ); + } + } + + return this.async().then(onFulfilled, onRejected) + } + + toString() { + return this._css + } + + warnings() { + return [] + } + + get content() { + return this.result.css + } + + get css() { + return this.result.css + } + + get map() { + return this.result.map + } + + get messages() { + return [] + } + + get opts() { + return this.result.opts + } + + get processor() { + return this.result.processor + } + + get root() { + if (this._root) { + return this._root + } + + let root; + let parser = parse; + + try { + root = parser(this._css, this._opts); + } catch (error) { + this.error = error; + } + + if (this.error) { + throw this.error + } else { + this._root = root; + return root + } + } + + get [Symbol.toStringTag]() { + return 'NoWorkResult' + } + } + + noWorkResult = NoWorkResult; + NoWorkResult.default = NoWorkResult; + return noWorkResult; +} + +var processor$1; +var hasRequiredProcessor$1; + +function requireProcessor$1 () { + if (hasRequiredProcessor$1) return processor$1; + hasRequiredProcessor$1 = 1; + + let Document = /*@__PURE__*/ requireDocument(); + let LazyResult = /*@__PURE__*/ requireLazyResult(); + let NoWorkResult = /*@__PURE__*/ requireNoWorkResult(); + let Root = /*@__PURE__*/ requireRoot$1(); + + class Processor { + constructor(plugins = []) { + this.version = '8.4.48'; + this.plugins = this.normalize(plugins); + } + + normalize(plugins) { + let normalized = []; + for (let i of plugins) { + if (i.postcss === true) { + i = i(); + } else if (i.postcss) { + i = i.postcss; + } + + if (typeof i === 'object' && Array.isArray(i.plugins)) { + normalized = normalized.concat(i.plugins); + } else if (typeof i === 'object' && i.postcssPlugin) { + normalized.push(i); + } else if (typeof i === 'function') { + normalized.push(i); + } else if (typeof i === 'object' && (i.parse || i.stringify)) { + if (browser$1.env.NODE_ENV !== 'production') { + throw new Error( + 'PostCSS syntaxes cannot be used as plugins. Instead, please use ' + + 'one of the syntax/parser/stringifier options as outlined ' + + 'in your PostCSS runner documentation.' + ) + } + } else { + throw new Error(i + ' is not a PostCSS plugin') + } + } + return normalized + } + + process(css, opts = {}) { + if ( + !this.plugins.length && + !opts.parser && + !opts.stringifier && + !opts.syntax + ) { + return new NoWorkResult(this, css, opts) + } else { + return new LazyResult(this, css, opts) + } + } + + use(plugin) { + this.plugins = this.plugins.concat(this.normalize([plugin])); + return this + } + } + + processor$1 = Processor; + Processor.default = Processor; + + Root.registerProcessor(Processor); + Document.registerProcessor(Processor); + return processor$1; +} + +var postcss_1; +var hasRequiredPostcss; + +function requirePostcss () { + if (hasRequiredPostcss) return postcss_1; + hasRequiredPostcss = 1; + + let AtRule = /*@__PURE__*/ requireAtRule(); + let Comment = /*@__PURE__*/ requireComment$1(); + let Container = /*@__PURE__*/ requireContainer$1(); + let CssSyntaxError = /*@__PURE__*/ requireCssSyntaxError(); + let Declaration = /*@__PURE__*/ requireDeclaration(); + let Document = /*@__PURE__*/ requireDocument(); + let fromJSON = /*@__PURE__*/ requireFromJSON(); + let Input = /*@__PURE__*/ requireInput(); + let LazyResult = /*@__PURE__*/ requireLazyResult(); + let list = /*@__PURE__*/ requireList(); + let Node = /*@__PURE__*/ requireNode$2(); + let parse = /*@__PURE__*/ requireParse(); + let Processor = /*@__PURE__*/ requireProcessor$1(); + let Result = /*@__PURE__*/ requireResult(); + let Root = /*@__PURE__*/ requireRoot$1(); + let Rule = /*@__PURE__*/ requireRule(); + let stringify = /*@__PURE__*/ requireStringify(); + let Warning = /*@__PURE__*/ requireWarning(); + + function postcss(...plugins) { + if (plugins.length === 1 && Array.isArray(plugins[0])) { + plugins = plugins[0]; + } + return new Processor(plugins) + } + + postcss.plugin = function plugin(name, initializer) { + let warningPrinted = false; + function creator(...args) { + // eslint-disable-next-line no-console + if (console && console.warn && !warningPrinted) { + warningPrinted = true; + // eslint-disable-next-line no-console + console.warn( + name + + ': postcss.plugin was deprecated. Migration guide:\n' + + 'https://evilmartians.com/chronicles/postcss-8-plugin-migration' + ); + if (browser$1.env.LANG && browser$1.env.LANG.startsWith('cn')) { + /* c8 ignore next 7 */ + // eslint-disable-next-line no-console + console.warn( + name + + ': 里面 postcss.plugin 被弃用. 迁移指南:\n' + + 'https://www.w3ctech.com/topic/2226' + ); + } + } + let transformer = initializer(...args); + transformer.postcssPlugin = name; + transformer.postcssVersion = new Processor().version; + return transformer + } + + let cache; + Object.defineProperty(creator, 'postcss', { + get() { + if (!cache) cache = creator(); + return cache + } + }); + + creator.process = function (css, processOpts, pluginOpts) { + return postcss([creator(pluginOpts)]).process(css, processOpts) + }; + + return creator + }; + + postcss.stringify = stringify; + postcss.parse = parse; + postcss.fromJSON = fromJSON; + postcss.list = list; + + postcss.comment = defaults => new Comment(defaults); + postcss.atRule = defaults => new AtRule(defaults); + postcss.decl = defaults => new Declaration(defaults); + postcss.rule = defaults => new Rule(defaults); + postcss.root = defaults => new Root(defaults); + postcss.document = defaults => new Document(defaults); + + postcss.CssSyntaxError = CssSyntaxError; + postcss.Declaration = Declaration; + postcss.Container = Container; + postcss.Processor = Processor; + postcss.Document = Document; + postcss.Comment = Comment; + postcss.Warning = Warning; + postcss.AtRule = AtRule; + postcss.Result = Result; + postcss.Input = Input; + postcss.Rule = Rule; + postcss.Root = Root; + postcss.Node = Node; + + LazyResult.registerPostcss(postcss); + + postcss_1 = postcss; + postcss.default = postcss; + return postcss_1; +} + +var postcssExports = /*@__PURE__*/ requirePostcss(); +var postcss = /*@__PURE__*/getDefaultExportFromCjs(postcssExports); + +postcss.stringify; +postcss.fromJSON; +postcss.plugin; +postcss.parse; +postcss.list; + +postcss.document; +postcss.comment; +postcss.atRule; +postcss.rule; +postcss.decl; +postcss.root; + +postcss.CssSyntaxError; +postcss.Declaration; +postcss.Container; +postcss.Processor; +postcss.Document; +postcss.Comment; +postcss.Warning; +postcss.AtRule; +postcss.Result; +postcss.Input; +const Rule = postcss.Rule; +postcss.Root; +postcss.Node; + +const trimPlugin = () => { + return { + postcssPlugin: "vue-sfc-trim", + Once(root) { + root.walk(({ type, raws }) => { + if (type === "rule" || type === "atrule") { + if (raws.before) raws.before = "\n"; + if ("after" in raws && raws.after) raws.after = "\n"; + } + }); + } + }; +}; +trimPlugin.postcss = true; + +var dist = {exports: {}}; + +var processor = {exports: {}}; + +var parser = {exports: {}}; + +var root = {exports: {}}; + +var container = {exports: {}}; + +var node$1 = {exports: {}}; + +var util$1 = {}; + +var unesc = {exports: {}}; + +var hasRequiredUnesc; + +function requireUnesc () { + if (hasRequiredUnesc) return unesc.exports; + hasRequiredUnesc = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = unesc; + // Many thanks for this post which made this migration much easier. + // https://mathiasbynens.be/notes/css-escapes + + /** + * + * @param {string} str + * @returns {[string, number]|undefined} + */ + function gobbleHex(str) { + var lower = str.toLowerCase(); + var hex = ''; + var spaceTerminated = false; + for (var i = 0; i < 6 && lower[i] !== undefined; i++) { + var code = lower.charCodeAt(i); + // check to see if we are dealing with a valid hex char [a-f|0-9] + var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57; + // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point + spaceTerminated = code === 32; + if (!valid) { + break; + } + hex += lower[i]; + } + if (hex.length === 0) { + return undefined; + } + var codePoint = parseInt(hex, 16); + var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF; + // Add special case for + // "If this number is zero, or is for a surrogate, or is greater than the maximum allowed code point" + // https://drafts.csswg.org/css-syntax/#maximum-allowed-code-point + if (isSurrogate || codePoint === 0x0000 || codePoint > 0x10FFFF) { + return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)]; + } + return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)]; + } + var CONTAINS_ESCAPE = /\\/; + function unesc(str) { + var needToProcess = CONTAINS_ESCAPE.test(str); + if (!needToProcess) { + return str; + } + var ret = ""; + for (var i = 0; i < str.length; i++) { + if (str[i] === "\\") { + var gobbled = gobbleHex(str.slice(i + 1, i + 7)); + if (gobbled !== undefined) { + ret += gobbled[0]; + i += gobbled[1]; + continue; + } + + // Retain a pair of \\ if double escaped `\\\\` + // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e + if (str[i + 1] === "\\") { + ret += "\\"; + i++; + continue; + } + + // if \\ is at the end of the string retain it + // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb + if (str.length === i + 1) { + ret += str[i]; + } + continue; + } + ret += str[i]; + } + return ret; + } + module.exports = exports.default; + } (unesc, unesc.exports)); + return unesc.exports; +} + +var getProp = {exports: {}}; + +var hasRequiredGetProp; + +function requireGetProp () { + if (hasRequiredGetProp) return getProp.exports; + hasRequiredGetProp = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = getProp; + function getProp(obj) { + for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + props[_key - 1] = arguments[_key]; + } + while (props.length > 0) { + var prop = props.shift(); + if (!obj[prop]) { + return undefined; + } + obj = obj[prop]; + } + return obj; + } + module.exports = exports.default; + } (getProp, getProp.exports)); + return getProp.exports; +} + +var ensureObject = {exports: {}}; + +var hasRequiredEnsureObject; + +function requireEnsureObject () { + if (hasRequiredEnsureObject) return ensureObject.exports; + hasRequiredEnsureObject = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = ensureObject; + function ensureObject(obj) { + for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + props[_key - 1] = arguments[_key]; + } + while (props.length > 0) { + var prop = props.shift(); + if (!obj[prop]) { + obj[prop] = {}; + } + obj = obj[prop]; + } + } + module.exports = exports.default; + } (ensureObject, ensureObject.exports)); + return ensureObject.exports; +} + +var stripComments = {exports: {}}; + +var hasRequiredStripComments; + +function requireStripComments () { + if (hasRequiredStripComments) return stripComments.exports; + hasRequiredStripComments = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = stripComments; + function stripComments(str) { + var s = ""; + var commentStart = str.indexOf("/*"); + var lastEnd = 0; + while (commentStart >= 0) { + s = s + str.slice(lastEnd, commentStart); + var commentEnd = str.indexOf("*/", commentStart + 2); + if (commentEnd < 0) { + return s; + } + lastEnd = commentEnd + 2; + commentStart = str.indexOf("/*", lastEnd); + } + s = s + str.slice(lastEnd); + return s; + } + module.exports = exports.default; + } (stripComments, stripComments.exports)); + return stripComments.exports; +} + +var hasRequiredUtil$1; + +function requireUtil$1 () { + if (hasRequiredUtil$1) return util$1; + hasRequiredUtil$1 = 1; + + util$1.__esModule = true; + util$1.unesc = util$1.stripComments = util$1.getProp = util$1.ensureObject = void 0; + var _unesc = _interopRequireDefault(/*@__PURE__*/ requireUnesc()); + util$1.unesc = _unesc["default"]; + var _getProp = _interopRequireDefault(/*@__PURE__*/ requireGetProp()); + util$1.getProp = _getProp["default"]; + var _ensureObject = _interopRequireDefault(/*@__PURE__*/ requireEnsureObject()); + util$1.ensureObject = _ensureObject["default"]; + var _stripComments = _interopRequireDefault(/*@__PURE__*/ requireStripComments()); + util$1.stripComments = _stripComments["default"]; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + return util$1; +} + +var hasRequiredNode$1; + +function requireNode$1 () { + if (hasRequiredNode$1) return node$1.exports; + hasRequiredNode$1 = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _util = /*@__PURE__*/ requireUtil$1(); + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + var cloneNode = function cloneNode(obj, parent) { + if (typeof obj !== 'object' || obj === null) { + return obj; + } + var cloned = new obj.constructor(); + for (var i in obj) { + if (!obj.hasOwnProperty(i)) { + continue; + } + var value = obj[i]; + var type = typeof value; + if (i === 'parent' && type === 'object') { + if (parent) { + cloned[i] = parent; + } + } else if (value instanceof Array) { + cloned[i] = value.map(function (j) { + return cloneNode(j, cloned); + }); + } else { + cloned[i] = cloneNode(value, cloned); + } + } + return cloned; + }; + var Node = /*#__PURE__*/function () { + function Node(opts) { + if (opts === void 0) { + opts = {}; + } + Object.assign(this, opts); + this.spaces = this.spaces || {}; + this.spaces.before = this.spaces.before || ''; + this.spaces.after = this.spaces.after || ''; + } + var _proto = Node.prototype; + _proto.remove = function remove() { + if (this.parent) { + this.parent.removeChild(this); + } + this.parent = undefined; + return this; + }; + _proto.replaceWith = function replaceWith() { + if (this.parent) { + for (var index in arguments) { + this.parent.insertBefore(this, arguments[index]); + } + this.remove(); + } + return this; + }; + _proto.next = function next() { + return this.parent.at(this.parent.index(this) + 1); + }; + _proto.prev = function prev() { + return this.parent.at(this.parent.index(this) - 1); + }; + _proto.clone = function clone(overrides) { + if (overrides === void 0) { + overrides = {}; + } + var cloned = cloneNode(this); + for (var name in overrides) { + cloned[name] = overrides[name]; + } + return cloned; + } + + /** + * Some non-standard syntax doesn't follow normal escaping rules for css. + * This allows non standard syntax to be appended to an existing property + * by specifying the escaped value. By specifying the escaped value, + * illegal characters are allowed to be directly inserted into css output. + * @param {string} name the property to set + * @param {any} value the unescaped value of the property + * @param {string} valueEscaped optional. the escaped value of the property. + */; + _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) { + if (!this.raws) { + this.raws = {}; + } + var originalValue = this[name]; + var originalEscaped = this.raws[name]; + this[name] = originalValue + value; // this may trigger a setter that updates raws, so it has to be set first. + if (originalEscaped || valueEscaped !== value) { + this.raws[name] = (originalEscaped || originalValue) + valueEscaped; + } else { + delete this.raws[name]; // delete any escaped value that was created by the setter. + } + } + + /** + * Some non-standard syntax doesn't follow normal escaping rules for css. + * This allows the escaped value to be specified directly, allowing illegal + * characters to be directly inserted into css output. + * @param {string} name the property to set + * @param {any} value the unescaped value of the property + * @param {string} valueEscaped the escaped value of the property. + */; + _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) { + if (!this.raws) { + this.raws = {}; + } + this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. + this.raws[name] = valueEscaped; + } + + /** + * When you want a value to passed through to CSS directly. This method + * deletes the corresponding raw value causing the stringifier to fallback + * to the unescaped value. + * @param {string} name the property to set. + * @param {any} value The value that is both escaped and unescaped. + */; + _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) { + this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. + if (this.raws) { + delete this.raws[name]; + } + } + + /** + * + * @param {number} line The number (starting with 1) + * @param {number} column The column number (starting with 1) + */; + _proto.isAtPosition = function isAtPosition(line, column) { + if (this.source && this.source.start && this.source.end) { + if (this.source.start.line > line) { + return false; + } + if (this.source.end.line < line) { + return false; + } + if (this.source.start.line === line && this.source.start.column > column) { + return false; + } + if (this.source.end.line === line && this.source.end.column < column) { + return false; + } + return true; + } + return undefined; + }; + _proto.stringifyProperty = function stringifyProperty(name) { + return this.raws && this.raws[name] || this[name]; + }; + _proto.valueToString = function valueToString() { + return String(this.stringifyProperty("value")); + }; + _proto.toString = function toString() { + return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join(''); + }; + _createClass(Node, [{ + key: "rawSpaceBefore", + get: function get() { + var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before; + if (rawSpace === undefined) { + rawSpace = this.spaces && this.spaces.before; + } + return rawSpace || ""; + }, + set: function set(raw) { + (0, _util.ensureObject)(this, "raws", "spaces"); + this.raws.spaces.before = raw; + } + }, { + key: "rawSpaceAfter", + get: function get() { + var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after; + if (rawSpace === undefined) { + rawSpace = this.spaces.after; + } + return rawSpace || ""; + }, + set: function set(raw) { + (0, _util.ensureObject)(this, "raws", "spaces"); + this.raws.spaces.after = raw; + } + }]); + return Node; + }(); + exports["default"] = Node; + module.exports = exports.default; + } (node$1, node$1.exports)); + return node$1.exports; +} + +var types = {}; + +var hasRequiredTypes; + +function requireTypes () { + if (hasRequiredTypes) return types; + hasRequiredTypes = 1; + + types.__esModule = true; + types.UNIVERSAL = types.TAG = types.STRING = types.SELECTOR = types.ROOT = types.PSEUDO = types.NESTING = types.ID = types.COMMENT = types.COMBINATOR = types.CLASS = types.ATTRIBUTE = void 0; + var TAG = 'tag'; + types.TAG = TAG; + var STRING = 'string'; + types.STRING = STRING; + var SELECTOR = 'selector'; + types.SELECTOR = SELECTOR; + var ROOT = 'root'; + types.ROOT = ROOT; + var PSEUDO = 'pseudo'; + types.PSEUDO = PSEUDO; + var NESTING = 'nesting'; + types.NESTING = NESTING; + var ID = 'id'; + types.ID = ID; + var COMMENT = 'comment'; + types.COMMENT = COMMENT; + var COMBINATOR = 'combinator'; + types.COMBINATOR = COMBINATOR; + var CLASS = 'class'; + types.CLASS = CLASS; + var ATTRIBUTE = 'attribute'; + types.ATTRIBUTE = ATTRIBUTE; + var UNIVERSAL = 'universal'; + types.UNIVERSAL = UNIVERSAL; + return types; +} + +var hasRequiredContainer; + +function requireContainer () { + if (hasRequiredContainer) return container.exports; + hasRequiredContainer = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1()); + var types = _interopRequireWildcard(/*@__PURE__*/ requireTypes()); + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike) { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } 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 _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Container = /*#__PURE__*/function (_Node) { + _inheritsLoose(Container, _Node); + function Container(opts) { + var _this; + _this = _Node.call(this, opts) || this; + if (!_this.nodes) { + _this.nodes = []; + } + return _this; + } + var _proto = Container.prototype; + _proto.append = function append(selector) { + selector.parent = this; + this.nodes.push(selector); + return this; + }; + _proto.prepend = function prepend(selector) { + selector.parent = this; + this.nodes.unshift(selector); + for (var id in this.indexes) { + this.indexes[id]++; + } + return this; + }; + _proto.at = function at(index) { + return this.nodes[index]; + }; + _proto.index = function index(child) { + if (typeof child === 'number') { + return child; + } + return this.nodes.indexOf(child); + }; + _proto.removeChild = function removeChild(child) { + child = this.index(child); + this.at(child).parent = undefined; + this.nodes.splice(child, 1); + var index; + for (var id in this.indexes) { + index = this.indexes[id]; + if (index >= child) { + this.indexes[id] = index - 1; + } + } + return this; + }; + _proto.removeAll = function removeAll() { + for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) { + var node = _step.value; + node.parent = undefined; + } + this.nodes = []; + return this; + }; + _proto.empty = function empty() { + return this.removeAll(); + }; + _proto.insertAfter = function insertAfter(oldNode, newNode) { + newNode.parent = this; + var oldIndex = this.index(oldNode); + this.nodes.splice(oldIndex + 1, 0, newNode); + newNode.parent = this; + var index; + for (var id in this.indexes) { + index = this.indexes[id]; + if (oldIndex < index) { + this.indexes[id] = index + 1; + } + } + return this; + }; + _proto.insertBefore = function insertBefore(oldNode, newNode) { + newNode.parent = this; + var oldIndex = this.index(oldNode); + this.nodes.splice(oldIndex, 0, newNode); + newNode.parent = this; + var index; + for (var id in this.indexes) { + index = this.indexes[id]; + if (index >= oldIndex) { + this.indexes[id] = index + 1; + } + } + return this; + }; + _proto._findChildAtPosition = function _findChildAtPosition(line, col) { + var found = undefined; + this.each(function (node) { + if (node.atPosition) { + var foundChild = node.atPosition(line, col); + if (foundChild) { + found = foundChild; + return false; + } + } else if (node.isAtPosition(line, col)) { + found = node; + return false; + } + }); + return found; + } + + /** + * Return the most specific node at the line and column number given. + * The source location is based on the original parsed location, locations aren't + * updated as selector nodes are mutated. + * + * Note that this location is relative to the location of the first character + * of the selector, and not the location of the selector in the overall document + * when used in conjunction with postcss. + * + * If not found, returns undefined. + * @param {number} line The line number of the node to find. (1-based index) + * @param {number} col The column number of the node to find. (1-based index) + */; + _proto.atPosition = function atPosition(line, col) { + if (this.isAtPosition(line, col)) { + return this._findChildAtPosition(line, col) || this; + } else { + return undefined; + } + }; + _proto._inferEndPosition = function _inferEndPosition() { + if (this.last && this.last.source && this.last.source.end) { + this.source = this.source || {}; + this.source.end = this.source.end || {}; + Object.assign(this.source.end, this.last.source.end); + } + }; + _proto.each = function each(callback) { + if (!this.lastEach) { + this.lastEach = 0; + } + if (!this.indexes) { + this.indexes = {}; + } + this.lastEach++; + var id = this.lastEach; + this.indexes[id] = 0; + if (!this.length) { + return undefined; + } + var index, result; + while (this.indexes[id] < this.length) { + index = this.indexes[id]; + result = callback(this.at(index), index); + if (result === false) { + break; + } + this.indexes[id] += 1; + } + delete this.indexes[id]; + if (result === false) { + return false; + } + }; + _proto.walk = function walk(callback) { + return this.each(function (node, i) { + var result = callback(node, i); + if (result !== false && node.length) { + result = node.walk(callback); + } + if (result === false) { + return false; + } + }); + }; + _proto.walkAttributes = function walkAttributes(callback) { + var _this2 = this; + return this.walk(function (selector) { + if (selector.type === types.ATTRIBUTE) { + return callback.call(_this2, selector); + } + }); + }; + _proto.walkClasses = function walkClasses(callback) { + var _this3 = this; + return this.walk(function (selector) { + if (selector.type === types.CLASS) { + return callback.call(_this3, selector); + } + }); + }; + _proto.walkCombinators = function walkCombinators(callback) { + var _this4 = this; + return this.walk(function (selector) { + if (selector.type === types.COMBINATOR) { + return callback.call(_this4, selector); + } + }); + }; + _proto.walkComments = function walkComments(callback) { + var _this5 = this; + return this.walk(function (selector) { + if (selector.type === types.COMMENT) { + return callback.call(_this5, selector); + } + }); + }; + _proto.walkIds = function walkIds(callback) { + var _this6 = this; + return this.walk(function (selector) { + if (selector.type === types.ID) { + return callback.call(_this6, selector); + } + }); + }; + _proto.walkNesting = function walkNesting(callback) { + var _this7 = this; + return this.walk(function (selector) { + if (selector.type === types.NESTING) { + return callback.call(_this7, selector); + } + }); + }; + _proto.walkPseudos = function walkPseudos(callback) { + var _this8 = this; + return this.walk(function (selector) { + if (selector.type === types.PSEUDO) { + return callback.call(_this8, selector); + } + }); + }; + _proto.walkTags = function walkTags(callback) { + var _this9 = this; + return this.walk(function (selector) { + if (selector.type === types.TAG) { + return callback.call(_this9, selector); + } + }); + }; + _proto.walkUniversals = function walkUniversals(callback) { + var _this10 = this; + return this.walk(function (selector) { + if (selector.type === types.UNIVERSAL) { + return callback.call(_this10, selector); + } + }); + }; + _proto.split = function split(callback) { + var _this11 = this; + var current = []; + return this.reduce(function (memo, node, index) { + var split = callback.call(_this11, node); + current.push(node); + if (split) { + memo.push(current); + current = []; + } else if (index === _this11.length - 1) { + memo.push(current); + } + return memo; + }, []); + }; + _proto.map = function map(callback) { + return this.nodes.map(callback); + }; + _proto.reduce = function reduce(callback, memo) { + return this.nodes.reduce(callback, memo); + }; + _proto.every = function every(callback) { + return this.nodes.every(callback); + }; + _proto.some = function some(callback) { + return this.nodes.some(callback); + }; + _proto.filter = function filter(callback) { + return this.nodes.filter(callback); + }; + _proto.sort = function sort(callback) { + return this.nodes.sort(callback); + }; + _proto.toString = function toString() { + return this.map(String).join(''); + }; + _createClass(Container, [{ + key: "first", + get: function get() { + return this.at(0); + } + }, { + key: "last", + get: function get() { + return this.at(this.length - 1); + } + }, { + key: "length", + get: function get() { + return this.nodes.length; + } + }]); + return Container; + }(_node["default"]); + exports["default"] = Container; + module.exports = exports.default; + } (container, container.exports)); + return container.exports; +} + +var hasRequiredRoot; + +function requireRoot () { + if (hasRequiredRoot) return root.exports; + hasRequiredRoot = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Root = /*#__PURE__*/function (_Container) { + _inheritsLoose(Root, _Container); + function Root(opts) { + var _this; + _this = _Container.call(this, opts) || this; + _this.type = _types.ROOT; + return _this; + } + var _proto = Root.prototype; + _proto.toString = function toString() { + var str = this.reduce(function (memo, selector) { + memo.push(String(selector)); + return memo; + }, []).join(','); + return this.trailingComma ? str + ',' : str; + }; + _proto.error = function error(message, options) { + if (this._error) { + return this._error(message, options); + } else { + return new Error(message); + } + }; + _createClass(Root, [{ + key: "errorGenerator", + set: function set(handler) { + this._error = handler; + } + }]); + return Root; + }(_container["default"]); + exports["default"] = Root; + module.exports = exports.default; + } (root, root.exports)); + return root.exports; +} + +var selector = {exports: {}}; + +var hasRequiredSelector; + +function requireSelector () { + if (hasRequiredSelector) return selector.exports; + hasRequiredSelector = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Selector = /*#__PURE__*/function (_Container) { + _inheritsLoose(Selector, _Container); + function Selector(opts) { + var _this; + _this = _Container.call(this, opts) || this; + _this.type = _types.SELECTOR; + return _this; + } + return Selector; + }(_container["default"]); + exports["default"] = Selector; + module.exports = exports.default; + } (selector, selector.exports)); + return selector.exports; +} + +var className = {exports: {}}; + +/*! https://mths.be/cssesc v3.0.0 by @mathias */ + +var cssesc_1; +var hasRequiredCssesc; + +function requireCssesc () { + if (hasRequiredCssesc) return cssesc_1; + hasRequiredCssesc = 1; + + var object = {}; + var hasOwnProperty = object.hasOwnProperty; + var merge = function merge(options, defaults) { + if (!options) { + return defaults; + } + var result = {}; + for (var key in defaults) { + // `if (defaults.hasOwnProperty(key) { … }` is not needed here, since + // only recognized option names are used. + result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key]; + } + return result; + }; + + var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/; + var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/; + var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g; + + // https://mathiasbynens.be/notes/css-escapes#css + var cssesc = function cssesc(string, options) { + options = merge(options, cssesc.options); + if (options.quotes != 'single' && options.quotes != 'double') { + options.quotes = 'single'; + } + var quote = options.quotes == 'double' ? '"' : '\''; + var isIdentifier = options.isIdentifier; + + var firstChar = string.charAt(0); + var output = ''; + var counter = 0; + var length = string.length; + while (counter < length) { + var character = string.charAt(counter++); + var codePoint = character.charCodeAt(); + var value = void 0; + // If it’s not a printable ASCII character… + if (codePoint < 0x20 || codePoint > 0x7E) { + if (codePoint >= 0xD800 && codePoint <= 0xDBFF && counter < length) { + // It’s a high surrogate, and there is a next character. + var extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { + // next character is low surrogate + codePoint = ((codePoint & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000; + } else { + // It’s an unmatched surrogate; only append this code unit, in case + // the next code unit is the high surrogate of a surrogate pair. + counter--; + } + } + value = '\\' + codePoint.toString(16).toUpperCase() + ' '; + } else { + if (options.escapeEverything) { + if (regexAnySingleEscape.test(character)) { + value = '\\' + character; + } else { + value = '\\' + codePoint.toString(16).toUpperCase() + ' '; + } + } else if (/[\t\n\f\r\x0B]/.test(character)) { + value = '\\' + codePoint.toString(16).toUpperCase() + ' '; + } else if (character == '\\' || !isIdentifier && (character == '"' && quote == character || character == '\'' && quote == character) || isIdentifier && regexSingleEscape.test(character)) { + value = '\\' + character; + } else { + value = character; + } + } + output += value; + } + + if (isIdentifier) { + if (/^-[-\d]/.test(output)) { + output = '\\-' + output.slice(1); + } else if (/\d/.test(firstChar)) { + output = '\\3' + firstChar + ' ' + output.slice(1); + } + } + + // Remove spaces after `\HEX` escapes that are not followed by a hex digit, + // since they’re redundant. Note that this is only possible if the escape + // sequence isn’t preceded by an odd number of backslashes. + output = output.replace(regexExcessiveSpaces, function ($0, $1, $2) { + if ($1 && $1.length % 2) { + // It’s not safe to remove the space, so don’t. + return $0; + } + // Strip the space. + return ($1 || '') + $2; + }); + + if (!isIdentifier && options.wrap) { + return quote + output + quote; + } + return output; + }; + + // Expose default options (so they can be overridden globally). + cssesc.options = { + 'escapeEverything': false, + 'isIdentifier': false, + 'quotes': 'single', + 'wrap': false + }; + + cssesc.version = '3.0.0'; + + cssesc_1 = cssesc; + return cssesc_1; +} + +var hasRequiredClassName; + +function requireClassName () { + if (hasRequiredClassName) return className.exports; + hasRequiredClassName = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc()); + var _util = /*@__PURE__*/ requireUtil$1(); + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var ClassName = /*#__PURE__*/function (_Node) { + _inheritsLoose(ClassName, _Node); + function ClassName(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.CLASS; + _this._constructed = true; + return _this; + } + var _proto = ClassName.prototype; + _proto.valueToString = function valueToString() { + return '.' + _Node.prototype.valueToString.call(this); + }; + _createClass(ClassName, [{ + key: "value", + get: function get() { + return this._value; + }, + set: function set(v) { + if (this._constructed) { + var escaped = (0, _cssesc["default"])(v, { + isIdentifier: true + }); + if (escaped !== v) { + (0, _util.ensureObject)(this, "raws"); + this.raws.value = escaped; + } else if (this.raws) { + delete this.raws.value; + } + } + this._value = v; + } + }]); + return ClassName; + }(_node["default"]); + exports["default"] = ClassName; + module.exports = exports.default; + } (className, className.exports)); + return className.exports; +} + +var comment = {exports: {}}; + +var hasRequiredComment; + +function requireComment () { + if (hasRequiredComment) return comment.exports; + hasRequiredComment = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Comment = /*#__PURE__*/function (_Node) { + _inheritsLoose(Comment, _Node); + function Comment(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.COMMENT; + return _this; + } + return Comment; + }(_node["default"]); + exports["default"] = Comment; + module.exports = exports.default; + } (comment, comment.exports)); + return comment.exports; +} + +var id = {exports: {}}; + +var hasRequiredId; + +function requireId () { + if (hasRequiredId) return id.exports; + hasRequiredId = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var ID = /*#__PURE__*/function (_Node) { + _inheritsLoose(ID, _Node); + function ID(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.ID; + return _this; + } + var _proto = ID.prototype; + _proto.valueToString = function valueToString() { + return '#' + _Node.prototype.valueToString.call(this); + }; + return ID; + }(_node["default"]); + exports["default"] = ID; + module.exports = exports.default; + } (id, id.exports)); + return id.exports; +} + +var tag = {exports: {}}; + +var namespace = {exports: {}}; + +var hasRequiredNamespace; + +function requireNamespace () { + if (hasRequiredNamespace) return namespace.exports; + hasRequiredNamespace = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc()); + var _util = /*@__PURE__*/ requireUtil$1(); + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1()); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Namespace = /*#__PURE__*/function (_Node) { + _inheritsLoose(Namespace, _Node); + function Namespace() { + return _Node.apply(this, arguments) || this; + } + var _proto = Namespace.prototype; + _proto.qualifiedName = function qualifiedName(value) { + if (this.namespace) { + return this.namespaceString + "|" + value; + } else { + return value; + } + }; + _proto.valueToString = function valueToString() { + return this.qualifiedName(_Node.prototype.valueToString.call(this)); + }; + _createClass(Namespace, [{ + key: "namespace", + get: function get() { + return this._namespace; + }, + set: function set(namespace) { + if (namespace === true || namespace === "*" || namespace === "&") { + this._namespace = namespace; + if (this.raws) { + delete this.raws.namespace; + } + return; + } + var escaped = (0, _cssesc["default"])(namespace, { + isIdentifier: true + }); + this._namespace = namespace; + if (escaped !== namespace) { + (0, _util.ensureObject)(this, "raws"); + this.raws.namespace = escaped; + } else if (this.raws) { + delete this.raws.namespace; + } + } + }, { + key: "ns", + get: function get() { + return this._namespace; + }, + set: function set(namespace) { + this.namespace = namespace; + } + }, { + key: "namespaceString", + get: function get() { + if (this.namespace) { + var ns = this.stringifyProperty("namespace"); + if (ns === true) { + return ''; + } else { + return ns; + } + } else { + return ''; + } + } + }]); + return Namespace; + }(_node["default"]); + exports["default"] = Namespace; + module.exports = exports.default; + } (namespace, namespace.exports)); + return namespace.exports; +} + +var hasRequiredTag; + +function requireTag () { + if (hasRequiredTag) return tag.exports; + hasRequiredTag = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Tag = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Tag, _Namespace); + function Tag(opts) { + var _this; + _this = _Namespace.call(this, opts) || this; + _this.type = _types.TAG; + return _this; + } + return Tag; + }(_namespace["default"]); + exports["default"] = Tag; + module.exports = exports.default; + } (tag, tag.exports)); + return tag.exports; +} + +var string = {exports: {}}; + +var hasRequiredString; + +function requireString () { + if (hasRequiredString) return string.exports; + hasRequiredString = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var String = /*#__PURE__*/function (_Node) { + _inheritsLoose(String, _Node); + function String(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.STRING; + return _this; + } + return String; + }(_node["default"]); + exports["default"] = String; + module.exports = exports.default; + } (string, string.exports)); + return string.exports; +} + +var pseudo = {exports: {}}; + +var hasRequiredPseudo; + +function requirePseudo () { + if (hasRequiredPseudo) return pseudo.exports; + hasRequiredPseudo = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _container = _interopRequireDefault(/*@__PURE__*/ requireContainer()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Pseudo = /*#__PURE__*/function (_Container) { + _inheritsLoose(Pseudo, _Container); + function Pseudo(opts) { + var _this; + _this = _Container.call(this, opts) || this; + _this.type = _types.PSEUDO; + return _this; + } + var _proto = Pseudo.prototype; + _proto.toString = function toString() { + var params = this.length ? '(' + this.map(String).join(',') + ')' : ''; + return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join(''); + }; + return Pseudo; + }(_container["default"]); + exports["default"] = Pseudo; + module.exports = exports.default; + } (pseudo, pseudo.exports)); + return pseudo.exports; +} + +var attribute = {}; + +var node; +var hasRequiredNode; + +function requireNode () { + if (hasRequiredNode) return node; + hasRequiredNode = 1; + /** + * For Node.js, simply re-export the core `util.deprecate` function. + */ + + node = require$$0.deprecate; + return node; +} + +var hasRequiredAttribute; + +function requireAttribute () { + if (hasRequiredAttribute) return attribute; + hasRequiredAttribute = 1; + (function (exports) { + + exports.__esModule = true; + exports["default"] = void 0; + exports.unescapeValue = unescapeValue; + var _cssesc = _interopRequireDefault(/*@__PURE__*/ requireCssesc()); + var _unesc = _interopRequireDefault(/*@__PURE__*/ requireUnesc()); + var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace()); + var _types = /*@__PURE__*/ requireTypes(); + var _CSSESC_QUOTE_OPTIONS; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var deprecate = /*@__PURE__*/ requireNode(); + var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/; + var warnOfDeprecatedValueAssignment = deprecate(function () {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. " + "Call attribute.setValue() instead."); + var warnOfDeprecatedQuotedAssignment = deprecate(function () {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."); + var warnOfDeprecatedConstructor = deprecate(function () {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now."); + function unescapeValue(value) { + var deprecatedUsage = false; + var quoteMark = null; + var unescaped = value; + var m = unescaped.match(WRAPPED_IN_QUOTES); + if (m) { + quoteMark = m[1]; + unescaped = m[2]; + } + unescaped = (0, _unesc["default"])(unescaped); + if (unescaped !== value) { + deprecatedUsage = true; + } + return { + deprecatedUsage: deprecatedUsage, + unescaped: unescaped, + quoteMark: quoteMark + }; + } + function handleDeprecatedContructorOpts(opts) { + if (opts.quoteMark !== undefined) { + return opts; + } + if (opts.value === undefined) { + return opts; + } + warnOfDeprecatedConstructor(); + var _unescapeValue = unescapeValue(opts.value), + quoteMark = _unescapeValue.quoteMark, + unescaped = _unescapeValue.unescaped; + if (!opts.raws) { + opts.raws = {}; + } + if (opts.raws.value === undefined) { + opts.raws.value = opts.value; + } + opts.value = unescaped; + opts.quoteMark = quoteMark; + return opts; + } + var Attribute = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Attribute, _Namespace); + function Attribute(opts) { + var _this; + if (opts === void 0) { + opts = {}; + } + _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this; + _this.type = _types.ATTRIBUTE; + _this.raws = _this.raws || {}; + Object.defineProperty(_this.raws, 'unquoted', { + get: deprecate(function () { + return _this.value; + }, "attr.raws.unquoted is deprecated. Call attr.value instead."), + set: deprecate(function () { + return _this.value; + }, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.") + }); + _this._constructed = true; + return _this; + } + + /** + * Returns the Attribute's value quoted such that it would be legal to use + * in the value of a css file. The original value's quotation setting + * used for stringification is left unchanged. See `setValue(value, options)` + * if you want to control the quote settings of a new value for the attribute. + * + * You can also change the quotation used for the current value by setting quoteMark. + * + * Options: + * * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this + * option is not set, the original value for quoteMark will be used. If + * indeterminate, a double quote is used. The legal values are: + * * `null` - the value will be unquoted and characters will be escaped as necessary. + * * `'` - the value will be quoted with a single quote and single quotes are escaped. + * * `"` - the value will be quoted with a double quote and double quotes are escaped. + * * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark + * over the quoteMark option value. + * * smart {boolean} - if true, will select a quote mark based on the value + * and the other options specified here. See the `smartQuoteMark()` + * method. + **/ + var _proto = Attribute.prototype; + _proto.getQuotedValue = function getQuotedValue(options) { + if (options === void 0) { + options = {}; + } + var quoteMark = this._determineQuoteMark(options); + var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark]; + var escaped = (0, _cssesc["default"])(this._value, cssescopts); + return escaped; + }; + _proto._determineQuoteMark = function _determineQuoteMark(options) { + return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options); + } + + /** + * Set the unescaped value with the specified quotation options. The value + * provided must not include any wrapping quote marks -- those quotes will + * be interpreted as part of the value and escaped accordingly. + */; + _proto.setValue = function setValue(value, options) { + if (options === void 0) { + options = {}; + } + this._value = value; + this._quoteMark = this._determineQuoteMark(options); + this._syncRawValue(); + } + + /** + * Intelligently select a quoteMark value based on the value's contents. If + * the value is a legal CSS ident, it will not be quoted. Otherwise a quote + * mark will be picked that minimizes the number of escapes. + * + * If there's no clear winner, the quote mark from these options is used, + * then the source quote mark (this is inverted if `preferCurrentQuoteMark` is + * true). If the quoteMark is unspecified, a double quote is used. + * + * @param options This takes the quoteMark and preferCurrentQuoteMark options + * from the quoteValue method. + */; + _proto.smartQuoteMark = function smartQuoteMark(options) { + var v = this.value; + var numSingleQuotes = v.replace(/[^']/g, '').length; + var numDoubleQuotes = v.replace(/[^"]/g, '').length; + if (numSingleQuotes + numDoubleQuotes === 0) { + var escaped = (0, _cssesc["default"])(v, { + isIdentifier: true + }); + if (escaped === v) { + return Attribute.NO_QUOTE; + } else { + var pref = this.preferredQuoteMark(options); + if (pref === Attribute.NO_QUOTE) { + // pick a quote mark that isn't none and see if it's smaller + var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE; + var opts = CSSESC_QUOTE_OPTIONS[quote]; + var quoteValue = (0, _cssesc["default"])(v, opts); + if (quoteValue.length < escaped.length) { + return quote; + } + } + return pref; + } + } else if (numDoubleQuotes === numSingleQuotes) { + return this.preferredQuoteMark(options); + } else if (numDoubleQuotes < numSingleQuotes) { + return Attribute.DOUBLE_QUOTE; + } else { + return Attribute.SINGLE_QUOTE; + } + } + + /** + * Selects the preferred quote mark based on the options and the current quote mark value. + * If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)` + * instead. + */; + _proto.preferredQuoteMark = function preferredQuoteMark(options) { + var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark; + if (quoteMark === undefined) { + quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark; + } + if (quoteMark === undefined) { + quoteMark = Attribute.DOUBLE_QUOTE; + } + return quoteMark; + }; + _proto._syncRawValue = function _syncRawValue() { + var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]); + if (rawValue === this._value) { + if (this.raws) { + delete this.raws.value; + } + } else { + this.raws.value = rawValue; + } + }; + _proto._handleEscapes = function _handleEscapes(prop, value) { + if (this._constructed) { + var escaped = (0, _cssesc["default"])(value, { + isIdentifier: true + }); + if (escaped !== value) { + this.raws[prop] = escaped; + } else { + delete this.raws[prop]; + } + } + }; + _proto._spacesFor = function _spacesFor(name) { + var attrSpaces = { + before: '', + after: '' + }; + var spaces = this.spaces[name] || {}; + var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {}; + return Object.assign(attrSpaces, spaces, rawSpaces); + }; + _proto._stringFor = function _stringFor(name, spaceName, concat) { + if (spaceName === void 0) { + spaceName = name; + } + if (concat === void 0) { + concat = defaultAttrConcat; + } + var attrSpaces = this._spacesFor(spaceName); + return concat(this.stringifyProperty(name), attrSpaces); + } + + /** + * returns the offset of the attribute part specified relative to the + * start of the node of the output string. + * + * * "ns" - alias for "namespace" + * * "namespace" - the namespace if it exists. + * * "attribute" - the attribute name + * * "attributeNS" - the start of the attribute or its namespace + * * "operator" - the match operator of the attribute + * * "value" - The value (string or identifier) + * * "insensitive" - the case insensitivity flag; + * @param part One of the possible values inside an attribute. + * @returns -1 if the name is invalid or the value doesn't exist in this attribute. + */; + _proto.offsetOf = function offsetOf(name) { + var count = 1; + var attributeSpaces = this._spacesFor("attribute"); + count += attributeSpaces.before.length; + if (name === "namespace" || name === "ns") { + return this.namespace ? count : -1; + } + if (name === "attributeNS") { + return count; + } + count += this.namespaceString.length; + if (this.namespace) { + count += 1; + } + if (name === "attribute") { + return count; + } + count += this.stringifyProperty("attribute").length; + count += attributeSpaces.after.length; + var operatorSpaces = this._spacesFor("operator"); + count += operatorSpaces.before.length; + var operator = this.stringifyProperty("operator"); + if (name === "operator") { + return operator ? count : -1; + } + count += operator.length; + count += operatorSpaces.after.length; + var valueSpaces = this._spacesFor("value"); + count += valueSpaces.before.length; + var value = this.stringifyProperty("value"); + if (name === "value") { + return value ? count : -1; + } + count += value.length; + count += valueSpaces.after.length; + var insensitiveSpaces = this._spacesFor("insensitive"); + count += insensitiveSpaces.before.length; + if (name === "insensitive") { + return this.insensitive ? count : -1; + } + return -1; + }; + _proto.toString = function toString() { + var _this2 = this; + var selector = [this.rawSpaceBefore, '[']; + selector.push(this._stringFor('qualifiedAttribute', 'attribute')); + if (this.operator && (this.value || this.value === '')) { + selector.push(this._stringFor('operator')); + selector.push(this._stringFor('value')); + selector.push(this._stringFor('insensitiveFlag', 'insensitive', function (attrValue, attrSpaces) { + if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) { + attrSpaces.before = " "; + } + return defaultAttrConcat(attrValue, attrSpaces); + })); + } + selector.push(']'); + selector.push(this.rawSpaceAfter); + return selector.join(''); + }; + _createClass(Attribute, [{ + key: "quoted", + get: function get() { + var qm = this.quoteMark; + return qm === "'" || qm === '"'; + }, + set: function set(value) { + warnOfDeprecatedQuotedAssignment(); + } + + /** + * returns a single (`'`) or double (`"`) quote character if the value is quoted. + * returns `null` if the value is not quoted. + * returns `undefined` if the quotation state is unknown (this can happen when + * the attribute is constructed without specifying a quote mark.) + */ + }, { + key: "quoteMark", + get: function get() { + return this._quoteMark; + } + + /** + * Set the quote mark to be used by this attribute's value. + * If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute + * value is updated accordingly. + * + * @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted. + */, + set: function set(quoteMark) { + if (!this._constructed) { + this._quoteMark = quoteMark; + return; + } + if (this._quoteMark !== quoteMark) { + this._quoteMark = quoteMark; + this._syncRawValue(); + } + } + }, { + key: "qualifiedAttribute", + get: function get() { + return this.qualifiedName(this.raws.attribute || this.attribute); + } + }, { + key: "insensitiveFlag", + get: function get() { + return this.insensitive ? 'i' : ''; + } + }, { + key: "value", + get: function get() { + return this._value; + }, + set: + /** + * Before 3.0, the value had to be set to an escaped value including any wrapped + * quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value + * is unescaped during parsing and any quote marks are removed. + * + * Because the ambiguity of this semantic change, if you set `attr.value = newValue`, + * a deprecation warning is raised when the new value contains any characters that would + * require escaping (including if it contains wrapped quotes). + * + * Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe + * how the new value is quoted. + */ + function set(v) { + if (this._constructed) { + var _unescapeValue2 = unescapeValue(v), + deprecatedUsage = _unescapeValue2.deprecatedUsage, + unescaped = _unescapeValue2.unescaped, + quoteMark = _unescapeValue2.quoteMark; + if (deprecatedUsage) { + warnOfDeprecatedValueAssignment(); + } + if (unescaped === this._value && quoteMark === this._quoteMark) { + return; + } + this._value = unescaped; + this._quoteMark = quoteMark; + this._syncRawValue(); + } else { + this._value = v; + } + } + }, { + key: "insensitive", + get: function get() { + return this._insensitive; + } + + /** + * Set the case insensitive flag. + * If the case insensitive flag changes, the raw (escaped) value at `attr.raws.insensitiveFlag` + * of the attribute is updated accordingly. + * + * @param {true | false} insensitive true if the attribute should match case-insensitively. + */, + set: function set(insensitive) { + if (!insensitive) { + this._insensitive = false; + + // "i" and "I" can be used in "this.raws.insensitiveFlag" to store the original notation. + // When setting `attr.insensitive = false` both should be erased to ensure correct serialization. + if (this.raws && (this.raws.insensitiveFlag === 'I' || this.raws.insensitiveFlag === 'i')) { + this.raws.insensitiveFlag = undefined; + } + } + this._insensitive = insensitive; + } + }, { + key: "attribute", + get: function get() { + return this._attribute; + }, + set: function set(name) { + this._handleEscapes("attribute", name); + this._attribute = name; + } + }]); + return Attribute; + }(_namespace["default"]); + exports["default"] = Attribute; + Attribute.NO_QUOTE = null; + Attribute.SINGLE_QUOTE = "'"; + Attribute.DOUBLE_QUOTE = '"'; + var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = { + "'": { + quotes: 'single', + wrap: true + }, + '"': { + quotes: 'double', + wrap: true + } + }, _CSSESC_QUOTE_OPTIONS[null] = { + isIdentifier: true + }, _CSSESC_QUOTE_OPTIONS); + function defaultAttrConcat(attrValue, attrSpaces) { + return "" + attrSpaces.before + attrValue + attrSpaces.after; + } + } (attribute)); + return attribute; +} + +var universal = {exports: {}}; + +var hasRequiredUniversal; + +function requireUniversal () { + if (hasRequiredUniversal) return universal.exports; + hasRequiredUniversal = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _namespace = _interopRequireDefault(/*@__PURE__*/ requireNamespace()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Universal = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Universal, _Namespace); + function Universal(opts) { + var _this; + _this = _Namespace.call(this, opts) || this; + _this.type = _types.UNIVERSAL; + _this.value = '*'; + return _this; + } + return Universal; + }(_namespace["default"]); + exports["default"] = Universal; + module.exports = exports.default; + } (universal, universal.exports)); + return universal.exports; +} + +var combinator = {exports: {}}; + +var hasRequiredCombinator; + +function requireCombinator () { + if (hasRequiredCombinator) return combinator.exports; + hasRequiredCombinator = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Combinator = /*#__PURE__*/function (_Node) { + _inheritsLoose(Combinator, _Node); + function Combinator(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.COMBINATOR; + return _this; + } + return Combinator; + }(_node["default"]); + exports["default"] = Combinator; + module.exports = exports.default; + } (combinator, combinator.exports)); + return combinator.exports; +} + +var nesting = {exports: {}}; + +var hasRequiredNesting; + +function requireNesting () { + if (hasRequiredNesting) return nesting.exports; + hasRequiredNesting = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(/*@__PURE__*/ requireNode$1()); + var _types = /*@__PURE__*/ requireTypes(); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Nesting = /*#__PURE__*/function (_Node) { + _inheritsLoose(Nesting, _Node); + function Nesting(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.NESTING; + _this.value = '&'; + return _this; + } + return Nesting; + }(_node["default"]); + exports["default"] = Nesting; + module.exports = exports.default; + } (nesting, nesting.exports)); + return nesting.exports; +} + +var sortAscending = {exports: {}}; + +var hasRequiredSortAscending; + +function requireSortAscending () { + if (hasRequiredSortAscending) return sortAscending.exports; + hasRequiredSortAscending = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = sortAscending; + function sortAscending(list) { + return list.sort(function (a, b) { + return a - b; + }); + } + module.exports = exports.default; + } (sortAscending, sortAscending.exports)); + return sortAscending.exports; +} + +var tokenize = {}; + +var tokenTypes = {}; + +var hasRequiredTokenTypes; + +function requireTokenTypes () { + if (hasRequiredTokenTypes) return tokenTypes; + hasRequiredTokenTypes = 1; + + tokenTypes.__esModule = true; + tokenTypes.word = tokenTypes.tilde = tokenTypes.tab = tokenTypes.str = tokenTypes.space = tokenTypes.slash = tokenTypes.singleQuote = tokenTypes.semicolon = tokenTypes.plus = tokenTypes.pipe = tokenTypes.openSquare = tokenTypes.openParenthesis = tokenTypes.newline = tokenTypes.greaterThan = tokenTypes.feed = tokenTypes.equals = tokenTypes.doubleQuote = tokenTypes.dollar = tokenTypes.cr = tokenTypes.comment = tokenTypes.comma = tokenTypes.combinator = tokenTypes.colon = tokenTypes.closeSquare = tokenTypes.closeParenthesis = tokenTypes.caret = tokenTypes.bang = tokenTypes.backslash = tokenTypes.at = tokenTypes.asterisk = tokenTypes.ampersand = void 0; + var ampersand = 38; // `&`.charCodeAt(0); + tokenTypes.ampersand = ampersand; + var asterisk = 42; // `*`.charCodeAt(0); + tokenTypes.asterisk = asterisk; + var at = 64; // `@`.charCodeAt(0); + tokenTypes.at = at; + var comma = 44; // `,`.charCodeAt(0); + tokenTypes.comma = comma; + var colon = 58; // `:`.charCodeAt(0); + tokenTypes.colon = colon; + var semicolon = 59; // `;`.charCodeAt(0); + tokenTypes.semicolon = semicolon; + var openParenthesis = 40; // `(`.charCodeAt(0); + tokenTypes.openParenthesis = openParenthesis; + var closeParenthesis = 41; // `)`.charCodeAt(0); + tokenTypes.closeParenthesis = closeParenthesis; + var openSquare = 91; // `[`.charCodeAt(0); + tokenTypes.openSquare = openSquare; + var closeSquare = 93; // `]`.charCodeAt(0); + tokenTypes.closeSquare = closeSquare; + var dollar = 36; // `$`.charCodeAt(0); + tokenTypes.dollar = dollar; + var tilde = 126; // `~`.charCodeAt(0); + tokenTypes.tilde = tilde; + var caret = 94; // `^`.charCodeAt(0); + tokenTypes.caret = caret; + var plus = 43; // `+`.charCodeAt(0); + tokenTypes.plus = plus; + var equals = 61; // `=`.charCodeAt(0); + tokenTypes.equals = equals; + var pipe = 124; // `|`.charCodeAt(0); + tokenTypes.pipe = pipe; + var greaterThan = 62; // `>`.charCodeAt(0); + tokenTypes.greaterThan = greaterThan; + var space = 32; // ` `.charCodeAt(0); + tokenTypes.space = space; + var singleQuote = 39; // `'`.charCodeAt(0); + tokenTypes.singleQuote = singleQuote; + var doubleQuote = 34; // `"`.charCodeAt(0); + tokenTypes.doubleQuote = doubleQuote; + var slash = 47; // `/`.charCodeAt(0); + tokenTypes.slash = slash; + var bang = 33; // `!`.charCodeAt(0); + tokenTypes.bang = bang; + var backslash = 92; // '\\'.charCodeAt(0); + tokenTypes.backslash = backslash; + var cr = 13; // '\r'.charCodeAt(0); + tokenTypes.cr = cr; + var feed = 12; // '\f'.charCodeAt(0); + tokenTypes.feed = feed; + var newline = 10; // '\n'.charCodeAt(0); + tokenTypes.newline = newline; + var tab = 9; // '\t'.charCodeAt(0); + + // Expose aliases primarily for readability. + tokenTypes.tab = tab; + var str = singleQuote; + + // No good single character representation! + tokenTypes.str = str; + var comment = -1; + tokenTypes.comment = comment; + var word = -2; + tokenTypes.word = word; + var combinator = -3; + tokenTypes.combinator = combinator; + return tokenTypes; +} + +var hasRequiredTokenize; + +function requireTokenize () { + if (hasRequiredTokenize) return tokenize; + hasRequiredTokenize = 1; + (function (exports) { + + exports.__esModule = true; + exports.FIELDS = void 0; + exports["default"] = tokenize; + var t = _interopRequireWildcard(/*@__PURE__*/ requireTokenTypes()); + var _unescapable, _wordDelimiters; + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable); + var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters); + var hex = {}; + var hexChars = "0123456789abcdefABCDEF"; + for (var i = 0; i < hexChars.length; i++) { + hex[hexChars.charCodeAt(i)] = true; + } + + /** + * Returns the last index of the bar css word + * @param {string} css The string in which the word begins + * @param {number} start The index into the string where word's first letter occurs + */ + function consumeWord(css, start) { + var next = start; + var code; + do { + code = css.charCodeAt(next); + if (wordDelimiters[code]) { + return next - 1; + } else if (code === t.backslash) { + next = consumeEscape(css, next) + 1; + } else { + // All other characters are part of the word + next++; + } + } while (next < css.length); + return next - 1; + } + + /** + * Returns the last index of the escape sequence + * @param {string} css The string in which the sequence begins + * @param {number} start The index into the string where escape character (`\`) occurs. + */ + function consumeEscape(css, start) { + var next = start; + var code = css.charCodeAt(next + 1); + if (unescapable[code]) ; else if (hex[code]) { + var hexDigits = 0; + // consume up to 6 hex chars + do { + next++; + hexDigits++; + code = css.charCodeAt(next + 1); + } while (hex[code] && hexDigits < 6); + // if fewer than 6 hex chars, a trailing space ends the escape + if (hexDigits < 6 && code === t.space) { + next++; + } + } else { + // the next char is part of the current word + next++; + } + return next; + } + var FIELDS = { + TYPE: 0, + START_LINE: 1, + START_COL: 2, + END_LINE: 3, + END_COL: 4, + START_POS: 5, + END_POS: 6 + }; + exports.FIELDS = FIELDS; + function tokenize(input) { + var tokens = []; + var css = input.css.valueOf(); + var _css = css, + length = _css.length; + var offset = -1; + var line = 1; + var start = 0; + var end = 0; + var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType; + function unclosed(what, fix) { + if (input.safe) { + // fyi: this is never set to true. + css += fix; + next = css.length - 1; + } else { + throw input.error('Unclosed ' + what, line, start - offset, start); + } + } + while (start < length) { + code = css.charCodeAt(start); + if (code === t.newline) { + offset = start; + line += 1; + } + switch (code) { + case t.space: + case t.tab: + case t.newline: + case t.cr: + case t.feed: + next = start; + do { + next += 1; + code = css.charCodeAt(next); + if (code === t.newline) { + offset = next; + line += 1; + } + } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed); + tokenType = t.space; + endLine = line; + endColumn = next - offset - 1; + end = next; + break; + case t.plus: + case t.greaterThan: + case t.tilde: + case t.pipe: + next = start; + do { + next += 1; + code = css.charCodeAt(next); + } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe); + tokenType = t.combinator; + endLine = line; + endColumn = start - offset; + end = next; + break; + + // Consume these characters as single tokens. + case t.asterisk: + case t.ampersand: + case t.bang: + case t.comma: + case t.equals: + case t.dollar: + case t.caret: + case t.openSquare: + case t.closeSquare: + case t.colon: + case t.semicolon: + case t.openParenthesis: + case t.closeParenthesis: + next = start; + tokenType = code; + endLine = line; + endColumn = start - offset; + end = next + 1; + break; + case t.singleQuote: + case t.doubleQuote: + quote = code === t.singleQuote ? "'" : '"'; + next = start; + do { + escaped = false; + next = css.indexOf(quote, next + 1); + if (next === -1) { + unclosed('quote', quote); + } + escapePos = next; + while (css.charCodeAt(escapePos - 1) === t.backslash) { + escapePos -= 1; + escaped = !escaped; + } + } while (escaped); + tokenType = t.str; + endLine = line; + endColumn = start - offset; + end = next + 1; + break; + default: + if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) { + next = css.indexOf('*/', start + 2) + 1; + if (next === 0) { + unclosed('comment', '*/'); + } + content = css.slice(start, next + 1); + lines = content.split('\n'); + last = lines.length - 1; + if (last > 0) { + nextLine = line + last; + nextOffset = next - lines[last].length; + } else { + nextLine = line; + nextOffset = offset; + } + tokenType = t.comment; + line = nextLine; + endLine = nextLine; + endColumn = next - nextOffset; + } else if (code === t.slash) { + next = start; + tokenType = code; + endLine = line; + endColumn = start - offset; + end = next + 1; + } else { + next = consumeWord(css, start); + tokenType = t.word; + endLine = line; + endColumn = next - offset; + } + end = next + 1; + break; + } + + // Ensure that the token structure remains consistent + tokens.push([tokenType, + // [0] Token type + line, + // [1] Starting line + start - offset, + // [2] Starting column + endLine, + // [3] Ending line + endColumn, + // [4] Ending column + start, + // [5] Start position / Source index + end // [6] End position + ]); + + // Reset offset for the next token + if (nextOffset) { + offset = nextOffset; + nextOffset = null; + } + start = end; + } + return tokens; + } + } (tokenize)); + return tokenize; +} + +var hasRequiredParser; + +function requireParser () { + if (hasRequiredParser) return parser.exports; + hasRequiredParser = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _root = _interopRequireDefault(/*@__PURE__*/ requireRoot()); + var _selector = _interopRequireDefault(/*@__PURE__*/ requireSelector()); + var _className = _interopRequireDefault(/*@__PURE__*/ requireClassName()); + var _comment = _interopRequireDefault(/*@__PURE__*/ requireComment()); + var _id = _interopRequireDefault(/*@__PURE__*/ requireId()); + var _tag = _interopRequireDefault(/*@__PURE__*/ requireTag()); + var _string = _interopRequireDefault(/*@__PURE__*/ requireString()); + var _pseudo = _interopRequireDefault(/*@__PURE__*/ requirePseudo()); + var _attribute = _interopRequireWildcard(/*@__PURE__*/ requireAttribute()); + var _universal = _interopRequireDefault(/*@__PURE__*/ requireUniversal()); + var _combinator = _interopRequireDefault(/*@__PURE__*/ requireCombinator()); + var _nesting = _interopRequireDefault(/*@__PURE__*/ requireNesting()); + var _sortAscending = _interopRequireDefault(/*@__PURE__*/ requireSortAscending()); + var _tokenize = _interopRequireWildcard(/*@__PURE__*/ requireTokenize()); + var tokens = _interopRequireWildcard(/*@__PURE__*/ requireTokenTypes()); + var types = _interopRequireWildcard(/*@__PURE__*/ requireTypes()); + var _util = /*@__PURE__*/ requireUtil$1(); + var _WHITESPACE_TOKENS, _Object$assign; + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS); + var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign)); + function tokenStart(token) { + return { + line: token[_tokenize.FIELDS.START_LINE], + column: token[_tokenize.FIELDS.START_COL] + }; + } + function tokenEnd(token) { + return { + line: token[_tokenize.FIELDS.END_LINE], + column: token[_tokenize.FIELDS.END_COL] + }; + } + function getSource(startLine, startColumn, endLine, endColumn) { + return { + start: { + line: startLine, + column: startColumn + }, + end: { + line: endLine, + column: endColumn + } + }; + } + function getTokenSource(token) { + return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]); + } + function getTokenSourceSpan(startToken, endToken) { + if (!startToken) { + return undefined; + } + return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]); + } + function unescapeProp(node, prop) { + var value = node[prop]; + if (typeof value !== "string") { + return; + } + if (value.indexOf("\\") !== -1) { + (0, _util.ensureObject)(node, 'raws'); + node[prop] = (0, _util.unesc)(value); + if (node.raws[prop] === undefined) { + node.raws[prop] = value; + } + } + return node; + } + function indexesOf(array, item) { + var i = -1; + var indexes = []; + while ((i = array.indexOf(item, i + 1)) !== -1) { + indexes.push(i); + } + return indexes; + } + function uniqs() { + var list = Array.prototype.concat.apply([], arguments); + return list.filter(function (item, i) { + return i === list.indexOf(item); + }); + } + var Parser = /*#__PURE__*/function () { + function Parser(rule, options) { + if (options === void 0) { + options = {}; + } + this.rule = rule; + this.options = Object.assign({ + lossy: false, + safe: false + }, options); + this.position = 0; + this.css = typeof this.rule === 'string' ? this.rule : this.rule.selector; + this.tokens = (0, _tokenize["default"])({ + css: this.css, + error: this._errorGenerator(), + safe: this.options.safe + }); + var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]); + this.root = new _root["default"]({ + source: rootSource + }); + this.root.errorGenerator = this._errorGenerator(); + var selector = new _selector["default"]({ + source: { + start: { + line: 1, + column: 1 + } + }, + sourceIndex: 0 + }); + this.root.append(selector); + this.current = selector; + this.loop(); + } + var _proto = Parser.prototype; + _proto._errorGenerator = function _errorGenerator() { + var _this = this; + return function (message, errorOptions) { + if (typeof _this.rule === 'string') { + return new Error(message); + } + return _this.rule.error(message, errorOptions); + }; + }; + _proto.attribute = function attribute() { + var attr = []; + var startingToken = this.currToken; + this.position++; + while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { + attr.push(this.currToken); + this.position++; + } + if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { + return this.expected('closing square bracket', this.currToken[_tokenize.FIELDS.START_POS]); + } + var len = attr.length; + var node = { + source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]), + sourceIndex: startingToken[_tokenize.FIELDS.START_POS] + }; + if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) { + return this.expected('attribute', attr[0][_tokenize.FIELDS.START_POS]); + } + var pos = 0; + var spaceBefore = ''; + var commentBefore = ''; + var lastAdded = null; + var spaceAfterMeaningfulToken = false; + while (pos < len) { + var token = attr[pos]; + var content = this.content(token); + var next = attr[pos + 1]; + switch (token[_tokenize.FIELDS.TYPE]) { + case tokens.space: + // if ( + // len === 1 || + // pos === 0 && this.content(next) === '|' + // ) { + // return this.expected('attribute', token[TOKEN.START_POS], content); + // } + spaceAfterMeaningfulToken = true; + if (this.options.lossy) { + break; + } + if (lastAdded) { + (0, _util.ensureObject)(node, 'spaces', lastAdded); + var prevContent = node.spaces[lastAdded].after || ''; + node.spaces[lastAdded].after = prevContent + content; + var existingComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || null; + if (existingComment) { + node.raws.spaces[lastAdded].after = existingComment + content; + } + } else { + spaceBefore = spaceBefore + content; + commentBefore = commentBefore + content; + } + break; + case tokens.asterisk: + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) { + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'attribute'); + node.spaces.attribute.before = spaceBefore; + spaceBefore = ''; + } + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); + node.raws.spaces.attribute.before = spaceBefore; + commentBefore = ''; + } + node.namespace = (node.namespace || "") + content; + var rawValue = (0, _util.getProp)(node, 'raws', 'namespace') || null; + if (rawValue) { + node.raws.namespace += content; + } + lastAdded = 'namespace'; + } + spaceAfterMeaningfulToken = false; + break; + case tokens.dollar: + if (lastAdded === "value") { + var oldRawValue = (0, _util.getProp)(node, 'raws', 'value'); + node.value += "$"; + if (oldRawValue) { + node.raws.value = oldRawValue + "$"; + } + break; + } + // Falls through + case tokens.caret: + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } + spaceAfterMeaningfulToken = false; + break; + case tokens.combinator: + if (content === '~' && next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } + if (content !== '|') { + spaceAfterMeaningfulToken = false; + break; + } + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } else if (!node.namespace && !node.attribute) { + node.namespace = true; + } + spaceAfterMeaningfulToken = false; + break; + case tokens.word: + if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && + // this look-ahead probably fails with comment nodes involved. + !node.operator && !node.namespace) { + node.namespace = content; + lastAdded = 'namespace'; + } else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) { + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'attribute'); + node.spaces.attribute.before = spaceBefore; + spaceBefore = ''; + } + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); + node.raws.spaces.attribute.before = commentBefore; + commentBefore = ''; + } + node.attribute = (node.attribute || "") + content; + var _rawValue = (0, _util.getProp)(node, 'raws', 'attribute') || null; + if (_rawValue) { + node.raws.attribute += content; + } + lastAdded = 'attribute'; + } else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) { + var _unescaped = (0, _util.unesc)(content); + var _oldRawValue = (0, _util.getProp)(node, 'raws', 'value') || ''; + var oldValue = node.value || ''; + node.value = oldValue + _unescaped; + node.quoteMark = null; + if (_unescaped !== content || _oldRawValue) { + (0, _util.ensureObject)(node, 'raws'); + node.raws.value = (_oldRawValue || oldValue) + content; + } + lastAdded = 'value'; + } else { + var insensitive = content === 'i' || content === "I"; + if ((node.value || node.value === '') && (node.quoteMark || spaceAfterMeaningfulToken)) { + node.insensitive = insensitive; + if (!insensitive || content === "I") { + (0, _util.ensureObject)(node, 'raws'); + node.raws.insensitiveFlag = content; + } + lastAdded = 'insensitive'; + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'insensitive'); + node.spaces.insensitive.before = spaceBefore; + spaceBefore = ''; + } + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'insensitive'); + node.raws.spaces.insensitive.before = commentBefore; + commentBefore = ''; + } + } else if (node.value || node.value === '') { + lastAdded = 'value'; + node.value += content; + if (node.raws.value) { + node.raws.value += content; + } + } + } + spaceAfterMeaningfulToken = false; + break; + case tokens.str: + if (!node.attribute || !node.operator) { + return this.error("Expected an attribute followed by an operator preceding the string.", { + index: token[_tokenize.FIELDS.START_POS] + }); + } + var _unescapeValue = (0, _attribute.unescapeValue)(content), + unescaped = _unescapeValue.unescaped, + quoteMark = _unescapeValue.quoteMark; + node.value = unescaped; + node.quoteMark = quoteMark; + lastAdded = 'value'; + (0, _util.ensureObject)(node, 'raws'); + node.raws.value = content; + spaceAfterMeaningfulToken = false; + break; + case tokens.equals: + if (!node.attribute) { + return this.expected('attribute', token[_tokenize.FIELDS.START_POS], content); + } + if (node.value) { + return this.error('Unexpected "=" found; an operator was already defined.', { + index: token[_tokenize.FIELDS.START_POS] + }); + } + node.operator = node.operator ? node.operator + content : content; + lastAdded = 'operator'; + spaceAfterMeaningfulToken = false; + break; + case tokens.comment: + if (lastAdded) { + if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === 'insensitive') { + var lastComment = (0, _util.getProp)(node, 'spaces', lastAdded, 'after') || ''; + var rawLastComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || lastComment; + (0, _util.ensureObject)(node, 'raws', 'spaces', lastAdded); + node.raws.spaces[lastAdded].after = rawLastComment + content; + } else { + var lastValue = node[lastAdded] || ''; + var rawLastValue = (0, _util.getProp)(node, 'raws', lastAdded) || lastValue; + (0, _util.ensureObject)(node, 'raws'); + node.raws[lastAdded] = rawLastValue + content; + } + } else { + commentBefore = commentBefore + content; + } + break; + default: + return this.error("Unexpected \"" + content + "\" found.", { + index: token[_tokenize.FIELDS.START_POS] + }); + } + pos++; + } + unescapeProp(node, "attribute"); + unescapeProp(node, "namespace"); + this.newNode(new _attribute["default"](node)); + this.position++; + } + + /** + * return a node containing meaningless garbage up to (but not including) the specified token position. + * if the token position is negative, all remaining tokens are consumed. + * + * This returns an array containing a single string node if all whitespace, + * otherwise an array of comment nodes with space before and after. + * + * These tokens are not added to the current selector, the caller can add them or use them to amend + * a previous node's space metadata. + * + * In lossy mode, this returns only comments. + */; + _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) { + if (stopPosition < 0) { + stopPosition = this.tokens.length; + } + var startPosition = this.position; + var nodes = []; + var space = ""; + var lastComment = undefined; + do { + if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) { + if (!this.options.lossy) { + space += this.content(); + } + } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) { + var spaces = {}; + if (space) { + spaces.before = space; + space = ""; + } + lastComment = new _comment["default"]({ + value: this.content(), + source: getTokenSource(this.currToken), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], + spaces: spaces + }); + nodes.push(lastComment); + } + } while (++this.position < stopPosition); + if (space) { + if (lastComment) { + lastComment.spaces.after = space; + } else if (!this.options.lossy) { + var firstToken = this.tokens[startPosition]; + var lastToken = this.tokens[this.position - 1]; + nodes.push(new _string["default"]({ + value: '', + source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]), + sourceIndex: firstToken[_tokenize.FIELDS.START_POS], + spaces: { + before: space, + after: '' + } + })); + } + } + return nodes; + } + + /** + * + * @param {*} nodes + */; + _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) { + var _this2 = this; + if (requiredSpace === void 0) { + requiredSpace = false; + } + var space = ""; + var rawSpace = ""; + nodes.forEach(function (n) { + var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace); + var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace); + space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0); + rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0); + }); + if (rawSpace === space) { + rawSpace = undefined; + } + var result = { + space: space, + rawSpace: rawSpace + }; + return result; + }; + _proto.isNamedCombinator = function isNamedCombinator(position) { + if (position === void 0) { + position = this.position; + } + return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash; + }; + _proto.namedCombinator = function namedCombinator() { + if (this.isNamedCombinator()) { + var nameRaw = this.content(this.tokens[this.position + 1]); + var name = (0, _util.unesc)(nameRaw).toLowerCase(); + var raws = {}; + if (name !== nameRaw) { + raws.value = "/" + nameRaw + "/"; + } + var node = new _combinator["default"]({ + value: "/" + name + "/", + source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], + raws: raws + }); + this.position = this.position + 3; + return node; + } else { + this.unexpected(); + } + }; + _proto.combinator = function combinator() { + var _this3 = this; + if (this.content() === '|') { + return this.namespace(); + } + // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector. + var nextSigTokenPos = this.locateNextMeaningfulToken(this.position); + if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); + if (nodes.length > 0) { + var last = this.current.last; + if (last) { + var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), + space = _this$convertWhitespa.space, + rawSpace = _this$convertWhitespa.rawSpace; + if (rawSpace !== undefined) { + last.rawSpaceAfter += rawSpace; + } + last.spaces.after += space; + } else { + nodes.forEach(function (n) { + return _this3.newNode(n); + }); + } + } + return; + } + var firstToken = this.currToken; + var spaceOrDescendantSelectorNodes = undefined; + if (nextSigTokenPos > this.position) { + spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); + } + var node; + if (this.isNamedCombinator()) { + node = this.namedCombinator(); + } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) { + node = new _combinator["default"]({ + value: this.content(), + source: getTokenSource(this.currToken), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS] + }); + this.position++; + } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) ; else if (!spaceOrDescendantSelectorNodes) { + this.unexpected(); + } + if (node) { + if (spaceOrDescendantSelectorNodes) { + var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), + _space = _this$convertWhitespa2.space, + _rawSpace = _this$convertWhitespa2.rawSpace; + node.spaces.before = _space; + node.rawSpaceBefore = _rawSpace; + } + } else { + // descendant combinator + var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), + _space2 = _this$convertWhitespa3.space, + _rawSpace2 = _this$convertWhitespa3.rawSpace; + if (!_rawSpace2) { + _rawSpace2 = _space2; + } + var spaces = {}; + var raws = { + spaces: {} + }; + if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) { + spaces.before = _space2.slice(0, _space2.length - 1); + raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1); + } else if (_space2.startsWith(' ') && _rawSpace2.startsWith(' ')) { + spaces.after = _space2.slice(1); + raws.spaces.after = _rawSpace2.slice(1); + } else { + raws.value = _rawSpace2; + } + node = new _combinator["default"]({ + value: ' ', + source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]), + sourceIndex: firstToken[_tokenize.FIELDS.START_POS], + spaces: spaces, + raws: raws + }); + } + if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) { + node.spaces.after = this.optionalSpace(this.content()); + this.position++; + } + return this.newNode(node); + }; + _proto.comma = function comma() { + if (this.position === this.tokens.length - 1) { + this.root.trailingComma = true; + this.position++; + return; + } + this.current._inferEndPosition(); + var selector = new _selector["default"]({ + source: { + start: tokenStart(this.tokens[this.position + 1]) + }, + sourceIndex: this.tokens[this.position + 1][_tokenize.FIELDS.START_POS] + }); + this.current.parent.append(selector); + this.current = selector; + this.position++; + }; + _proto.comment = function comment() { + var current = this.currToken; + this.newNode(new _comment["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + _proto.error = function error(message, opts) { + throw this.root.error(message, opts); + }; + _proto.missingBackslash = function missingBackslash() { + return this.error('Expected a backslash preceding the semicolon.', { + index: this.currToken[_tokenize.FIELDS.START_POS] + }); + }; + _proto.missingParenthesis = function missingParenthesis() { + return this.expected('opening parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.missingSquareBracket = function missingSquareBracket() { + return this.expected('opening square bracket', this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.unexpected = function unexpected() { + return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.unexpectedPipe = function unexpectedPipe() { + return this.error("Unexpected '|'.", this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.namespace = function namespace() { + var before = this.prevToken && this.content(this.prevToken) || true; + if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) { + this.position++; + return this.word(before); + } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) { + this.position++; + return this.universal(before); + } + this.unexpectedPipe(); + }; + _proto.nesting = function nesting() { + if (this.nextToken) { + var nextContent = this.content(this.nextToken); + if (nextContent === "|") { + this.position++; + return; + } + } + var current = this.currToken; + this.newNode(new _nesting["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + _proto.parentheses = function parentheses() { + var last = this.current.last; + var unbalanced = 1; + this.position++; + if (last && last.type === types.PSEUDO) { + var selector = new _selector["default"]({ + source: { + start: tokenStart(this.tokens[this.position]) + }, + sourceIndex: this.tokens[this.position][_tokenize.FIELDS.START_POS] + }); + var cache = this.current; + last.append(selector); + this.current = selector; + while (this.position < this.tokens.length && unbalanced) { + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + unbalanced++; + } + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + unbalanced--; + } + if (unbalanced) { + this.parse(); + } else { + this.current.source.end = tokenEnd(this.currToken); + this.current.parent.source.end = tokenEnd(this.currToken); + this.position++; + } + } + this.current = cache; + } else { + // I think this case should be an error. It's used to implement a basic parse of media queries + // but I don't think it's a good idea. + var parenStart = this.currToken; + var parenValue = "("; + var parenEnd; + while (this.position < this.tokens.length && unbalanced) { + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + unbalanced++; + } + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + unbalanced--; + } + parenEnd = this.currToken; + parenValue += this.parseParenthesisToken(this.currToken); + this.position++; + } + if (last) { + last.appendToPropertyAndEscape("value", parenValue, parenValue); + } else { + this.newNode(new _string["default"]({ + value: parenValue, + source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]), + sourceIndex: parenStart[_tokenize.FIELDS.START_POS] + })); + } + } + if (unbalanced) { + return this.expected('closing parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); + } + }; + _proto.pseudo = function pseudo() { + var _this4 = this; + var pseudoStr = ''; + var startingToken = this.currToken; + while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) { + pseudoStr += this.content(); + this.position++; + } + if (!this.currToken) { + return this.expected(['pseudo-class', 'pseudo-element'], this.position - 1); + } + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) { + this.splitWord(false, function (first, length) { + pseudoStr += first; + _this4.newNode(new _pseudo["default"]({ + value: pseudoStr, + source: getTokenSourceSpan(startingToken, _this4.currToken), + sourceIndex: startingToken[_tokenize.FIELDS.START_POS] + })); + if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + _this4.error('Misplaced parenthesis.', { + index: _this4.nextToken[_tokenize.FIELDS.START_POS] + }); + } + }); + } else { + return this.expected(['pseudo-class', 'pseudo-element'], this.currToken[_tokenize.FIELDS.START_POS]); + } + }; + _proto.space = function space() { + var content = this.content(); + // Handle space before and after the selector + if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function (node) { + return node.type === 'comment'; + })) { + this.spaces = this.optionalSpace(content); + this.position++; + } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + this.current.last.spaces.after = this.optionalSpace(content); + this.position++; + } else { + this.combinator(); + } + }; + _proto.string = function string() { + var current = this.currToken; + this.newNode(new _string["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + _proto.universal = function universal(namespace) { + var nextToken = this.nextToken; + if (nextToken && this.content(nextToken) === '|') { + this.position++; + return this.namespace(); + } + var current = this.currToken; + this.newNode(new _universal["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + }), namespace); + this.position++; + }; + _proto.splitWord = function splitWord(namespace, firstCallback) { + var _this5 = this; + var nextToken = this.nextToken; + var word = this.content(); + while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[_tokenize.FIELDS.TYPE])) { + this.position++; + var current = this.content(); + word += current; + if (current.lastIndexOf('\\') === current.length - 1) { + var next = this.nextToken; + if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) { + word += this.requiredSpace(this.content(next)); + this.position++; + } + } + nextToken = this.nextToken; + } + var hasClass = indexesOf(word, '.').filter(function (i) { + // Allow escaped dot within class name + var escapedDot = word[i - 1] === '\\'; + // Allow decimal numbers percent in @keyframes + var isKeyframesPercent = /^\d+\.\d+%$/.test(word); + return !escapedDot && !isKeyframesPercent; + }); + var hasId = indexesOf(word, '#').filter(function (i) { + return word[i - 1] !== '\\'; + }); + // Eliminate Sass interpolations from the list of id indexes + var interpolations = indexesOf(word, '#{'); + if (interpolations.length) { + hasId = hasId.filter(function (hashIndex) { + return !~interpolations.indexOf(hashIndex); + }); + } + var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId))); + indices.forEach(function (ind, i) { + var index = indices[i + 1] || word.length; + var value = word.slice(ind, index); + if (i === 0 && firstCallback) { + return firstCallback.call(_this5, value, indices.length); + } + var node; + var current = _this5.currToken; + var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i]; + var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1)); + if (~hasClass.indexOf(ind)) { + var classNameOpts = { + value: value.slice(1), + source: source, + sourceIndex: sourceIndex + }; + node = new _className["default"](unescapeProp(classNameOpts, "value")); + } else if (~hasId.indexOf(ind)) { + var idOpts = { + value: value.slice(1), + source: source, + sourceIndex: sourceIndex + }; + node = new _id["default"](unescapeProp(idOpts, "value")); + } else { + var tagOpts = { + value: value, + source: source, + sourceIndex: sourceIndex + }; + unescapeProp(tagOpts, "value"); + node = new _tag["default"](tagOpts); + } + _this5.newNode(node, namespace); + // Ensure that the namespace is used only once + namespace = null; + }); + this.position++; + }; + _proto.word = function word(namespace) { + var nextToken = this.nextToken; + if (nextToken && this.content(nextToken) === '|') { + this.position++; + return this.namespace(); + } + return this.splitWord(namespace); + }; + _proto.loop = function loop() { + while (this.position < this.tokens.length) { + this.parse(true); + } + this.current._inferEndPosition(); + return this.root; + }; + _proto.parse = function parse(throwOnParenthesis) { + switch (this.currToken[_tokenize.FIELDS.TYPE]) { + case tokens.space: + this.space(); + break; + case tokens.comment: + this.comment(); + break; + case tokens.openParenthesis: + this.parentheses(); + break; + case tokens.closeParenthesis: + if (throwOnParenthesis) { + this.missingParenthesis(); + } + break; + case tokens.openSquare: + this.attribute(); + break; + case tokens.dollar: + case tokens.caret: + case tokens.equals: + case tokens.word: + this.word(); + break; + case tokens.colon: + this.pseudo(); + break; + case tokens.comma: + this.comma(); + break; + case tokens.asterisk: + this.universal(); + break; + case tokens.ampersand: + this.nesting(); + break; + case tokens.slash: + case tokens.combinator: + this.combinator(); + break; + case tokens.str: + this.string(); + break; + // These cases throw; no break needed. + case tokens.closeSquare: + this.missingSquareBracket(); + case tokens.semicolon: + this.missingBackslash(); + default: + this.unexpected(); + } + } + + /** + * Helpers + */; + _proto.expected = function expected(description, index, found) { + if (Array.isArray(description)) { + var last = description.pop(); + description = description.join(', ') + " or " + last; + } + var an = /^[aeiou]/.test(description[0]) ? 'an' : 'a'; + if (!found) { + return this.error("Expected " + an + " " + description + ".", { + index: index + }); + } + return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { + index: index + }); + }; + _proto.requiredSpace = function requiredSpace(space) { + return this.options.lossy ? ' ' : space; + }; + _proto.optionalSpace = function optionalSpace(space) { + return this.options.lossy ? '' : space; + }; + _proto.lossySpace = function lossySpace(space, required) { + if (this.options.lossy) { + return required ? ' ' : ''; + } else { + return space; + } + }; + _proto.parseParenthesisToken = function parseParenthesisToken(token) { + var content = this.content(token); + if (token[_tokenize.FIELDS.TYPE] === tokens.space) { + return this.requiredSpace(content); + } else { + return content; + } + }; + _proto.newNode = function newNode(node, namespace) { + if (namespace) { + if (/^ +$/.test(namespace)) { + if (!this.options.lossy) { + this.spaces = (this.spaces || '') + namespace; + } + namespace = true; + } + node.namespace = namespace; + unescapeProp(node, "namespace"); + } + if (this.spaces) { + node.spaces.before = this.spaces; + this.spaces = ''; + } + return this.current.append(node); + }; + _proto.content = function content(token) { + if (token === void 0) { + token = this.currToken; + } + return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]); + }; + /** + * returns the index of the next non-whitespace, non-comment token. + * returns -1 if no meaningful token is found. + */ + _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) { + if (startPosition === void 0) { + startPosition = this.position + 1; + } + var searchPosition = startPosition; + while (searchPosition < this.tokens.length) { + if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) { + searchPosition++; + continue; + } else { + return searchPosition; + } + } + return -1; + }; + _createClass(Parser, [{ + key: "currToken", + get: function get() { + return this.tokens[this.position]; + } + }, { + key: "nextToken", + get: function get() { + return this.tokens[this.position + 1]; + } + }, { + key: "prevToken", + get: function get() { + return this.tokens[this.position - 1]; + } + }]); + return Parser; + }(); + exports["default"] = Parser; + module.exports = exports.default; + } (parser, parser.exports)); + return parser.exports; +} + +var hasRequiredProcessor; + +function requireProcessor () { + if (hasRequiredProcessor) return processor.exports; + hasRequiredProcessor = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _parser = _interopRequireDefault(/*@__PURE__*/ requireParser()); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var Processor = /*#__PURE__*/function () { + function Processor(func, options) { + this.func = func || function noop() {}; + this.funcRes = null; + this.options = options; + } + var _proto = Processor.prototype; + _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) { + if (options === void 0) { + options = {}; + } + var merged = Object.assign({}, this.options, options); + if (merged.updateSelector === false) { + return false; + } else { + return typeof rule !== "string"; + } + }; + _proto._isLossy = function _isLossy(options) { + if (options === void 0) { + options = {}; + } + var merged = Object.assign({}, this.options, options); + if (merged.lossless === false) { + return true; + } else { + return false; + } + }; + _proto._root = function _root(rule, options) { + if (options === void 0) { + options = {}; + } + var parser = new _parser["default"](rule, this._parseOptions(options)); + return parser.root; + }; + _proto._parseOptions = function _parseOptions(options) { + return { + lossy: this._isLossy(options) + }; + }; + _proto._run = function _run(rule, options) { + var _this = this; + if (options === void 0) { + options = {}; + } + return new Promise(function (resolve, reject) { + try { + var root = _this._root(rule, options); + Promise.resolve(_this.func(root)).then(function (transform) { + var string = undefined; + if (_this._shouldUpdateSelector(rule, options)) { + string = root.toString(); + rule.selector = string; + } + return { + transform: transform, + root: root, + string: string + }; + }).then(resolve, reject); + } catch (e) { + reject(e); + return; + } + }); + }; + _proto._runSync = function _runSync(rule, options) { + if (options === void 0) { + options = {}; + } + var root = this._root(rule, options); + var transform = this.func(root); + if (transform && typeof transform.then === "function") { + throw new Error("Selector processor returned a promise to a synchronous call."); + } + var string = undefined; + if (options.updateSelector && typeof rule !== "string") { + string = root.toString(); + rule.selector = string; + } + return { + transform: transform, + root: root, + string: string + }; + } + + /** + * Process rule into a selector AST. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {Promise<parser.Root>} The AST of the selector after processing it. + */; + _proto.ast = function ast(rule, options) { + return this._run(rule, options).then(function (result) { + return result.root; + }); + } + + /** + * Process rule into a selector AST synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {parser.Root} The AST of the selector after processing it. + */; + _proto.astSync = function astSync(rule, options) { + return this._runSync(rule, options).root; + } + + /** + * Process a selector into a transformed value asynchronously + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {Promise<any>} The value returned by the processor. + */; + _proto.transform = function transform(rule, options) { + return this._run(rule, options).then(function (result) { + return result.transform; + }); + } + + /** + * Process a selector into a transformed value synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {any} The value returned by the processor. + */; + _proto.transformSync = function transformSync(rule, options) { + return this._runSync(rule, options).transform; + } + + /** + * Process a selector into a new selector string asynchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {string} the selector after processing. + */; + _proto.process = function process(rule, options) { + return this._run(rule, options).then(function (result) { + return result.string || result.root.toString(); + }); + } + + /** + * Process a selector into a new selector string synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {string} the selector after processing. + */; + _proto.processSync = function processSync(rule, options) { + var result = this._runSync(rule, options); + return result.string || result.root.toString(); + }; + return Processor; + }(); + exports["default"] = Processor; + module.exports = exports.default; + } (processor, processor.exports)); + return processor.exports; +} + +var selectors = {}; + +var constructors = {}; + +var hasRequiredConstructors; + +function requireConstructors () { + if (hasRequiredConstructors) return constructors; + hasRequiredConstructors = 1; + + constructors.__esModule = true; + constructors.universal = constructors.tag = constructors.string = constructors.selector = constructors.root = constructors.pseudo = constructors.nesting = constructors.id = constructors.comment = constructors.combinator = constructors.className = constructors.attribute = void 0; + var _attribute = _interopRequireDefault(/*@__PURE__*/ requireAttribute()); + var _className = _interopRequireDefault(/*@__PURE__*/ requireClassName()); + var _combinator = _interopRequireDefault(/*@__PURE__*/ requireCombinator()); + var _comment = _interopRequireDefault(/*@__PURE__*/ requireComment()); + var _id = _interopRequireDefault(/*@__PURE__*/ requireId()); + var _nesting = _interopRequireDefault(/*@__PURE__*/ requireNesting()); + var _pseudo = _interopRequireDefault(/*@__PURE__*/ requirePseudo()); + var _root = _interopRequireDefault(/*@__PURE__*/ requireRoot()); + var _selector = _interopRequireDefault(/*@__PURE__*/ requireSelector()); + var _string = _interopRequireDefault(/*@__PURE__*/ requireString()); + var _tag = _interopRequireDefault(/*@__PURE__*/ requireTag()); + var _universal = _interopRequireDefault(/*@__PURE__*/ requireUniversal()); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var attribute = function attribute(opts) { + return new _attribute["default"](opts); + }; + constructors.attribute = attribute; + var className = function className(opts) { + return new _className["default"](opts); + }; + constructors.className = className; + var combinator = function combinator(opts) { + return new _combinator["default"](opts); + }; + constructors.combinator = combinator; + var comment = function comment(opts) { + return new _comment["default"](opts); + }; + constructors.comment = comment; + var id = function id(opts) { + return new _id["default"](opts); + }; + constructors.id = id; + var nesting = function nesting(opts) { + return new _nesting["default"](opts); + }; + constructors.nesting = nesting; + var pseudo = function pseudo(opts) { + return new _pseudo["default"](opts); + }; + constructors.pseudo = pseudo; + var root = function root(opts) { + return new _root["default"](opts); + }; + constructors.root = root; + var selector = function selector(opts) { + return new _selector["default"](opts); + }; + constructors.selector = selector; + var string = function string(opts) { + return new _string["default"](opts); + }; + constructors.string = string; + var tag = function tag(opts) { + return new _tag["default"](opts); + }; + constructors.tag = tag; + var universal = function universal(opts) { + return new _universal["default"](opts); + }; + constructors.universal = universal; + return constructors; +} + +var guards = {}; + +var hasRequiredGuards; + +function requireGuards () { + if (hasRequiredGuards) return guards; + hasRequiredGuards = 1; + + guards.__esModule = true; + guards.isComment = guards.isCombinator = guards.isClassName = guards.isAttribute = void 0; + guards.isContainer = isContainer; + guards.isIdentifier = void 0; + guards.isNamespace = isNamespace; + guards.isNesting = void 0; + guards.isNode = isNode; + guards.isPseudo = void 0; + guards.isPseudoClass = isPseudoClass; + guards.isPseudoElement = isPseudoElement; + guards.isUniversal = guards.isTag = guards.isString = guards.isSelector = guards.isRoot = void 0; + var _types = /*@__PURE__*/ requireTypes(); + var _IS_TYPE; + var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE); + function isNode(node) { + return typeof node === "object" && IS_TYPE[node.type]; + } + function isNodeType(type, node) { + return isNode(node) && node.type === type; + } + var isAttribute = isNodeType.bind(null, _types.ATTRIBUTE); + guards.isAttribute = isAttribute; + var isClassName = isNodeType.bind(null, _types.CLASS); + guards.isClassName = isClassName; + var isCombinator = isNodeType.bind(null, _types.COMBINATOR); + guards.isCombinator = isCombinator; + var isComment = isNodeType.bind(null, _types.COMMENT); + guards.isComment = isComment; + var isIdentifier = isNodeType.bind(null, _types.ID); + guards.isIdentifier = isIdentifier; + var isNesting = isNodeType.bind(null, _types.NESTING); + guards.isNesting = isNesting; + var isPseudo = isNodeType.bind(null, _types.PSEUDO); + guards.isPseudo = isPseudo; + var isRoot = isNodeType.bind(null, _types.ROOT); + guards.isRoot = isRoot; + var isSelector = isNodeType.bind(null, _types.SELECTOR); + guards.isSelector = isSelector; + var isString = isNodeType.bind(null, _types.STRING); + guards.isString = isString; + var isTag = isNodeType.bind(null, _types.TAG); + guards.isTag = isTag; + var isUniversal = isNodeType.bind(null, _types.UNIVERSAL); + guards.isUniversal = isUniversal; + function isPseudoElement(node) { + return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line"); + } + function isPseudoClass(node) { + return isPseudo(node) && !isPseudoElement(node); + } + function isContainer(node) { + return !!(isNode(node) && node.walk); + } + function isNamespace(node) { + return isAttribute(node) || isTag(node); + } + return guards; +} + +var hasRequiredSelectors; + +function requireSelectors () { + if (hasRequiredSelectors) return selectors; + hasRequiredSelectors = 1; + (function (exports) { + + exports.__esModule = true; + var _types = /*@__PURE__*/ requireTypes(); + Object.keys(_types).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _types[key]) return; + exports[key] = _types[key]; + }); + var _constructors = /*@__PURE__*/ requireConstructors(); + Object.keys(_constructors).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _constructors[key]) return; + exports[key] = _constructors[key]; + }); + var _guards = /*@__PURE__*/ requireGuards(); + Object.keys(_guards).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _guards[key]) return; + exports[key] = _guards[key]; + }); + } (selectors)); + return selectors; +} + +var hasRequiredDist; + +function requireDist () { + if (hasRequiredDist) return dist.exports; + hasRequiredDist = 1; + (function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _processor = _interopRequireDefault(/*@__PURE__*/ requireProcessor()); + var selectors = _interopRequireWildcard(/*@__PURE__*/ requireSelectors()); + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var parser = function parser(processor) { + return new _processor["default"](processor); + }; + Object.assign(parser, selectors); + delete parser.__esModule; + var _default = parser; + exports["default"] = _default; + module.exports = exports.default; + } (dist, dist.exports)); + return dist.exports; +} + +var distExports = /*@__PURE__*/ requireDist(); +var selectorParser = /*@__PURE__*/getDefaultExportFromCjs(distExports); + +const animationNameRE = /^(-\w+-)?animation-name$/; +const animationRE = /^(-\w+-)?animation$/; +const scopedPlugin = (id = "") => { + const keyframes = /* @__PURE__ */ Object.create(null); + const shortId = id.replace(/^data-v-/, ""); + return { + postcssPlugin: "vue-sfc-scoped", + Rule(rule) { + processRule(id, rule); + }, + AtRule(node) { + if (/-?keyframes$/.test(node.name) && !node.params.endsWith(`-${shortId}`)) { + keyframes[node.params] = node.params = node.params + "-" + shortId; + } + }, + OnceExit(root) { + if (Object.keys(keyframes).length) { + root.walkDecls((decl) => { + if (animationNameRE.test(decl.prop)) { + decl.value = decl.value.split(",").map((v) => keyframes[v.trim()] || v.trim()).join(","); + } + if (animationRE.test(decl.prop)) { + decl.value = decl.value.split(",").map((v) => { + const vals = v.trim().split(/\s+/); + const i = vals.findIndex((val) => keyframes[val]); + if (i !== -1) { + vals.splice(i, 1, keyframes[vals[i]]); + return vals.join(" "); + } else { + return v; + } + }).join(","); + } + }); + } + } + }; +}; +const processedRules = /* @__PURE__ */ new WeakSet(); +function processRule(id, rule) { + if (processedRules.has(rule) || rule.parent && rule.parent.type === "atrule" && /-?keyframes$/.test(rule.parent.name)) { + return; + } + processedRules.add(rule); + let deep = false; + let parent = rule.parent; + while (parent && parent.type !== "root") { + if (parent.__deep) { + deep = true; + break; + } + parent = parent.parent; + } + rule.selector = selectorParser((selectorRoot) => { + selectorRoot.each((selector) => { + rewriteSelector(id, rule, selector, selectorRoot, deep); + }); + }).processSync(rule.selector); +} +function rewriteSelector(id, rule, selector, selectorRoot, deep, slotted = false) { + let node = null; + let shouldInject = !deep; + selector.each((n) => { + if (n.type === "combinator" && (n.value === ">>>" || n.value === "/deep/")) { + n.value = " "; + n.spaces.before = n.spaces.after = ""; + warn( + `the >>> and /deep/ combinators have been deprecated. Use :deep() instead.` + ); + return false; + } + if (n.type === "pseudo") { + const { value } = n; + if (value === ":deep" || value === "::v-deep") { + rule.__deep = true; + if (n.nodes.length) { + let last = n; + n.nodes[0].each((ss) => { + selector.insertAfter(last, ss); + last = ss; + }); + const prev = selector.at(selector.index(n) - 1); + if (!prev || !isSpaceCombinator(prev)) { + selector.insertAfter( + n, + selectorParser.combinator({ + value: " " + }) + ); + } + selector.removeChild(n); + } else { + warn( + `${value} usage as a combinator has been deprecated. Use :deep(<inner-selector>) instead of ${value} <inner-selector>.` + ); + const prev = selector.at(selector.index(n) - 1); + if (prev && isSpaceCombinator(prev)) { + selector.removeChild(prev); + } + selector.removeChild(n); + } + return false; + } + if (value === ":slotted" || value === "::v-slotted") { + rewriteSelector( + id, + rule, + n.nodes[0], + selectorRoot, + deep, + true + ); + let last = n; + n.nodes[0].each((ss) => { + selector.insertAfter(last, ss); + last = ss; + }); + selector.removeChild(n); + shouldInject = false; + return false; + } + if (value === ":global" || value === "::v-global") { + selector.replaceWith(n.nodes[0]); + return false; + } + } + if (n.type === "universal") { + const prev = selector.at(selector.index(n) - 1); + const next = selector.at(selector.index(n) + 1); + if (!prev) { + if (next) { + if (next.type === "combinator" && next.value === " ") { + selector.removeChild(next); + } + selector.removeChild(n); + return; + } else { + node = selectorParser.combinator({ + value: "" + }); + selector.insertBefore(n, node); + selector.removeChild(n); + return false; + } + } + if (node) return; + } + if (n.type !== "pseudo" && n.type !== "combinator" || n.type === "pseudo" && (n.value === ":is" || n.value === ":where") && !node) { + node = n; + } + }); + if (rule.nodes.some((node2) => node2.type === "rule")) { + const deep2 = rule.__deep; + if (!deep2) { + extractAndWrapNodes(rule); + const atruleNodes = rule.nodes.filter((node2) => node2.type === "atrule"); + for (const atnode of atruleNodes) { + extractAndWrapNodes(atnode); + } + } + shouldInject = deep2; + } + if (node) { + const { type, value } = node; + if (type === "pseudo" && (value === ":is" || value === ":where")) { + node.nodes.forEach( + (value2) => rewriteSelector(id, rule, value2, selectorRoot, deep, slotted) + ); + shouldInject = false; + } + } + if (node) { + node.spaces.after = ""; + } else { + selector.first.spaces.before = ""; + } + if (shouldInject) { + const idToAdd = slotted ? id + "-s" : id; + selector.insertAfter( + // If node is null it means we need to inject [id] at the start + // insertAfter can handle `null` here + node, + selectorParser.attribute({ + attribute: idToAdd, + value: idToAdd, + raws: {}, + quoteMark: `"` + }) + ); + } +} +function isSpaceCombinator(node) { + return node.type === "combinator" && /^\s+$/.test(node.value); +} +function extractAndWrapNodes(parentNode) { + if (!parentNode.nodes) return; + const nodes = parentNode.nodes.filter( + (node) => node.type === "decl" || node.type === "comment" + ); + if (nodes.length) { + for (const node of nodes) { + parentNode.removeChild(node); + } + const wrappedRule = new Rule({ + nodes, + selector: "&" + }); + parentNode.prepend(wrappedRule); + } +} +scopedPlugin.postcss = true; + +var sourceMap = {}; + +var sourceMapGenerator = {}; + +var base64Vlq = {}; + +var base64 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredBase64; + +function requireBase64 () { + if (hasRequiredBase64) return base64; + hasRequiredBase64 = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + base64.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + base64.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; + return base64; +} + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredBase64Vlq; + +function requireBase64Vlq () { + if (hasRequiredBase64Vlq) return base64Vlq; + hasRequiredBase64Vlq = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + var base64 = /*@__PURE__*/ requireBase64(); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + base64Vlq.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + base64Vlq.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + return base64Vlq; +} + +var util = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredUtil; + +function requireUtil () { + if (hasRequiredUtil) return util; + hasRequiredUtil = 1; + (function (exports) { + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port; + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '<dir>/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); + }()); + + function identity (s) { + return s; + } + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; + } + exports.toSetString = supportsNullProto ? identity : toSetString; + + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; + } + exports.fromSetString = supportsNullProto ? identity : fromSetString; + + function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 === null) { + return 1; // aStr2 !== null + } + + if (aStr2 === null) { + return -1; // aStr1 !== null + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + + /** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ + function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); + } + exports.parseSourceMapInput = parseSourceMapInput; + + /** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ + function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } + + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + + return normalize(sourceURL); + } + exports.computeSourceURL = computeSourceURL; + } (util)); + return util; +} + +var arraySet = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredArraySet; + +function requireArraySet () { + if (hasRequiredArraySet) return arraySet; + hasRequiredArraySet = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = /*@__PURE__*/ requireUtil(); + var has = Object.prototype.hasOwnProperty; + var hasNativeMap = typeof Map !== "undefined"; + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + arraySet.ArraySet = ArraySet; + return arraySet; +} + +var mappingList = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredMappingList; + +function requireMappingList () { + if (hasRequiredMappingList) return mappingList; + hasRequiredMappingList = 1; + /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = /*@__PURE__*/ requireUtil(); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + mappingList.MappingList = MappingList; + return mappingList; +} + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredSourceMapGenerator; + +function requireSourceMapGenerator () { + if (hasRequiredSourceMapGenerator) return sourceMapGenerator; + hasRequiredSourceMapGenerator = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var base64VLQ = /*@__PURE__*/ requireBase64Vlq(); + var util = /*@__PURE__*/ requireUtil(); + var ArraySet = /*@__PURE__*/ requireArraySet().ArraySet; + var MappingList = /*@__PURE__*/ requireMappingList().MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source); + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + throw new Error( + 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = ''; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + sourceMapGenerator.SourceMapGenerator = SourceMapGenerator; + return sourceMapGenerator; +} + +var sourceMapConsumer = {}; + +var binarySearch = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredBinarySearch; + +function requireBinarySearch () { + if (hasRequiredBinarySearch) return binarySearch; + hasRequiredBinarySearch = 1; + (function (exports) { + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + } (binarySearch)); + return binarySearch; +} + +var quickSort = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredQuickSort; + +function requireQuickSort () { + if (hasRequiredQuickSort) return quickSort; + hasRequiredQuickSort = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + quickSort.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + return quickSort; +} + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredSourceMapConsumer; + +function requireSourceMapConsumer () { + if (hasRequiredSourceMapConsumer) return sourceMapConsumer; + hasRequiredSourceMapConsumer = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = /*@__PURE__*/ requireUtil(); + var binarySearch = /*@__PURE__*/ requireBinarySearch(); + var ArraySet = /*@__PURE__*/ requireArraySet().ArraySet; + var base64VLQ = /*@__PURE__*/ requireBase64Vlq(); + var quickSort = /*@__PURE__*/ requireQuickSort().quickSort; + + function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) + : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + sourceMapConsumer.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this._absoluteSources = this._sources.toArray().map(function (s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ + BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + + // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + + return -1; + }; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function (s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._absoluteSources.slice(); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + sourceMapConsumer.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + sourceMapConsumer.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + return sourceMapConsumer; +} + +var sourceNode = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +var hasRequiredSourceNode; + +function requireSourceNode () { + if (hasRequiredSourceNode) return sourceNode; + hasRequiredSourceNode = 1; + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var SourceMapGenerator = /*@__PURE__*/ requireSourceMapGenerator().SourceMapGenerator; + var util = /*@__PURE__*/ requireUtil(); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + sourceNode.SourceNode = SourceNode; + return sourceNode; +} + +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var hasRequiredSourceMap; + +function requireSourceMap () { + if (hasRequiredSourceMap) return sourceMap; + hasRequiredSourceMap = 1; + sourceMap.SourceMapGenerator = /*@__PURE__*/ requireSourceMapGenerator().SourceMapGenerator; + sourceMap.SourceMapConsumer = /*@__PURE__*/ requireSourceMapConsumer().SourceMapConsumer; + sourceMap.SourceNode = /*@__PURE__*/ requireSourceNode().SourceNode; + return sourceMap; +} + +var mergeSourceMap; +var hasRequiredMergeSourceMap; + +function requireMergeSourceMap () { + if (hasRequiredMergeSourceMap) return mergeSourceMap; + hasRequiredMergeSourceMap = 1; + var sourceMap = /*@__PURE__*/ requireSourceMap(); + var SourceMapConsumer = sourceMap.SourceMapConsumer; + var SourceMapGenerator = sourceMap.SourceMapGenerator; + + mergeSourceMap = merge; + + /** + * Merge old source map and new source map and return merged. + * If old or new source map value is falsy, return another one as it is. + * + * @param {object|string} [oldMap] old source map object + * @param {object|string} [newmap] new source map object + * @return {object|undefined} merged source map object, or undefined when both old and new source map are undefined + */ + function merge(oldMap, newMap) { + if (!oldMap) return newMap + if (!newMap) return oldMap + + var oldMapConsumer = new SourceMapConsumer(oldMap); + var newMapConsumer = new SourceMapConsumer(newMap); + var mergedMapGenerator = new SourceMapGenerator(); + + // iterate on new map and overwrite original position of new map with one of old map + newMapConsumer.eachMapping(function(m) { + // pass when `originalLine` is null. + // It occurs in case that the node does not have origin in original code. + if (m.originalLine == null) return + + var origPosInOldMap = oldMapConsumer.originalPositionFor({ + line: m.originalLine, + column: m.originalColumn + }); + + if (origPosInOldMap.source == null) return + + mergedMapGenerator.addMapping({ + original: { + line: origPosInOldMap.line, + column: origPosInOldMap.column + }, + generated: { + line: m.generatedLine, + column: m.generatedColumn + }, + source: origPosInOldMap.source, + name: origPosInOldMap.name + }); + }); + + var consumers = [oldMapConsumer, newMapConsumer]; + consumers.forEach(function(consumer) { + consumer.sources.forEach(function(sourceFile) { + mergedMapGenerator._sources.add(sourceFile); + var sourceContent = consumer.sourceContentFor(sourceFile); + if (sourceContent != null) { + mergedMapGenerator.setSourceContent(sourceFile, sourceContent); + } + }); + }); + + mergedMapGenerator._sourceRoot = oldMap.sourceRoot; + mergedMapGenerator._file = oldMap.file; + + return JSON.parse(mergedMapGenerator.toString()) + } + return mergeSourceMap; +} + +var mergeSourceMapExports = /*@__PURE__*/ requireMergeSourceMap(); +var merge = /*@__PURE__*/getDefaultExportFromCjs(mergeSourceMapExports); + +var __defProp$5 = Object.defineProperty; +var __defProps$4 = Object.defineProperties; +var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols; +var __hasOwnProp$5 = Object.prototype.hasOwnProperty; +var __propIsEnum$5 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$5 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$5.call(b, prop)) + __defNormalProp$5(a, prop, b[prop]); + if (__getOwnPropSymbols$5) + for (var prop of __getOwnPropSymbols$5(b)) { + if (__propIsEnum$5.call(b, prop)) + __defNormalProp$5(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b)); +const scss = (source, map, options, load = require) => { + const nodeSass = load("sass"); + const { compileString, renderSync } = nodeSass; + const data = getSource(source, options.filename, options.additionalData); + let css; + let dependencies; + let sourceMap; + try { + if (compileString) { + const { pathToFileURL, fileURLToPath } = load("url"); + const result = compileString(data, __spreadProps$4(__spreadValues$5({}, options), { + url: pathToFileURL(options.filename), + sourceMap: !!map + })); + css = result.css; + dependencies = result.loadedUrls.map((url) => fileURLToPath(url)); + sourceMap = map ? result.sourceMap : void 0; + } else { + const result = renderSync(__spreadProps$4(__spreadValues$5({}, options), { + data, + file: options.filename, + outFile: options.filename, + sourceMap: !!map + })); + css = result.css.toString(); + dependencies = result.stats.includedFiles; + sourceMap = map ? JSON.parse(result.map.toString()) : void 0; + } + if (map) { + return { + code: css, + errors: [], + dependencies, + map: merge(map, sourceMap) + }; + } + return { code: css, errors: [], dependencies }; + } catch (e) { + return { code: "", errors: [e], dependencies: [] }; + } +}; +const sass = (source, map, options, load) => scss( + source, + map, + __spreadProps$4(__spreadValues$5({}, options), { + indentedSyntax: true + }), + load +); +const less = (source, map, options, load = require) => { + const nodeLess = load("less"); + let result; + let error = null; + nodeLess.render( + getSource(source, options.filename, options.additionalData), + __spreadProps$4(__spreadValues$5({}, options), { syncImport: true }), + (err, output) => { + error = err; + result = output; + } + ); + if (error) return { code: "", errors: [error], dependencies: [] }; + const dependencies = result.imports; + if (map) { + return { + code: result.css.toString(), + map: merge(map, result.map), + errors: [], + dependencies + }; + } + return { + code: result.css.toString(), + errors: [], + dependencies + }; +}; +const styl = (source, map, options, load = require) => { + const nodeStylus = load("stylus"); + try { + const ref = nodeStylus(source, options); + if (map) ref.set("sourcemap", { inline: false, comment: false }); + const result = ref.render(); + const dependencies = ref.deps(); + if (map) { + return { + code: result, + map: merge(map, ref.sourcemap), + errors: [], + dependencies + }; + } + return { code: result, errors: [], dependencies }; + } catch (e) { + return { code: "", errors: [e], dependencies: [] }; + } +}; +function getSource(source, filename, additionalData) { + if (!additionalData) return source; + if (isFunction$1(additionalData)) { + return additionalData(source, filename); + } + return additionalData + source; +} +const processors = { + less, + sass, + scss, + styl, + stylus: styl +}; + +var __defProp$4 = Object.defineProperty; +var __defProps$3 = Object.defineProperties; +var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols; +var __hasOwnProp$4 = Object.prototype.hasOwnProperty; +var __propIsEnum$4 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$4 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$4.call(b, prop)) + __defNormalProp$4(a, prop, b[prop]); + if (__getOwnPropSymbols$4) + for (var prop of __getOwnPropSymbols$4(b)) { + if (__propIsEnum$4.call(b, prop)) + __defNormalProp$4(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b)); +function compileStyle(options) { + return doCompileStyle(__spreadProps$3(__spreadValues$4({}, options), { + isAsync: false + })); +} +function compileStyleAsync(options) { + return doCompileStyle(__spreadProps$3(__spreadValues$4({}, options), { + isAsync: true + })); +} +function doCompileStyle(options) { + const { + filename, + id, + scoped = false, + trim = true, + isProd = false, + modules = false, + modulesOptions = {}, + preprocessLang, + postcssOptions, + postcssPlugins + } = options; + const preprocessor = preprocessLang && processors[preprocessLang]; + const preProcessedSource = preprocessor && preprocess(options, preprocessor); + const map = preProcessedSource ? preProcessedSource.map : options.inMap || options.map; + const source = preProcessedSource ? preProcessedSource.code : options.source; + const shortId = id.replace(/^data-v-/, ""); + const longId = `data-v-${shortId}`; + const plugins = (postcssPlugins || []).slice(); + plugins.unshift(cssVarsPlugin({ id: shortId, isProd })); + if (trim) { + plugins.push(trimPlugin()); + } + if (scoped) { + plugins.push(scopedPlugin(longId)); + } + let cssModules; + if (modules) { + { + throw new Error( + "[@vue/compiler-sfc] `modules` option is not supported in the browser build." + ); + } + } + const postCSSOptions = __spreadProps$3(__spreadValues$4({}, postcssOptions), { + to: filename, + from: filename + }); + if (map) { + postCSSOptions.map = { + inline: false, + annotation: false, + prev: map + }; + } + let result; + let code; + let outMap; + const dependencies = new Set( + preProcessedSource ? preProcessedSource.dependencies : [] + ); + dependencies.delete(filename); + const errors = []; + if (preProcessedSource && preProcessedSource.errors.length) { + errors.push(...preProcessedSource.errors); + } + const recordPlainCssDependencies = (messages) => { + messages.forEach((msg) => { + if (msg.type === "dependency") { + dependencies.add(msg.file); + } + }); + return dependencies; + }; + try { + result = postcss(plugins).process(source, postCSSOptions); + if (options.isAsync) { + return result.then((result2) => ({ + code: result2.css || "", + map: result2.map && result2.map.toJSON(), + errors, + modules: cssModules, + rawResult: result2, + dependencies: recordPlainCssDependencies(result2.messages) + })).catch((error) => ({ + code: "", + map: void 0, + errors: [...errors, error], + rawResult: void 0, + dependencies + })); + } + recordPlainCssDependencies(result.messages); + code = result.css; + outMap = result.map; + } catch (e) { + errors.push(e); + } + return { + code: code || ``, + map: outMap && outMap.toJSON(), + errors, + rawResult: result, + dependencies + }; +} +function preprocess(options, preprocessor) { + if (!options.preprocessCustomRequire) { + throw new Error( + `[@vue/compiler-sfc] Style preprocessing in the browser build must provide the \`preprocessCustomRequire\` option to return the in-browser version of the preprocessor.` + ); + } + return preprocessor( + options.source, + options.inMap || options.map, + __spreadValues$4({ + filename: options.filename + }, options.preprocessOptions), + options.preprocessCustomRequire + ); +} + +const UNKNOWN_TYPE = "Unknown"; +function resolveObjectKey(node, computed) { + switch (node.type) { + case "StringLiteral": + case "NumericLiteral": + return String(node.value); + case "Identifier": + if (!computed) return node.name; + } + return void 0; +} +function concatStrings(strs) { + return strs.filter((s) => !!s).join(", "); +} +function isLiteralNode(node) { + return node.type.endsWith("Literal"); +} +function isCallOf(node, test) { + return !!(node && test && node.type === "CallExpression" && node.callee.type === "Identifier" && (typeof test === "string" ? node.callee.name === test : test(node.callee.name))); +} +function toRuntimeTypeString(types) { + return types.length > 1 ? `[${types.join(", ")}]` : types[0]; +} +function getImportedName(specifier) { + if (specifier.type === "ImportSpecifier") + return specifier.imported.type === "Identifier" ? specifier.imported.name : specifier.imported.value; + else if (specifier.type === "ImportNamespaceSpecifier") return "*"; + return "default"; +} +function getId(node) { + return node.type === "Identifier" ? node.name : node.type === "StringLiteral" ? node.value : null; +} +const normalize = (path.posix || path).normalize; +const windowsSlashRE = /\\/g; +function normalizePath(p) { + return normalize(p.replace(windowsSlashRE, "/")); +} +const joinPaths = (path.posix || path).join; +const propNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~\-]/; +function getEscapedPropName(key) { + return propNameEscapeSymbolsRE.test(key) ? JSON.stringify(key) : key; +} + +function analyzeScriptBindings(ast) { + for (const node of ast) { + if (node.type === "ExportDefaultDeclaration" && node.declaration.type === "ObjectExpression") { + return analyzeBindingsFromOptions(node.declaration); + } + } + return {}; +} +function analyzeBindingsFromOptions(node) { + const bindings = {}; + Object.defineProperty(bindings, "__isScriptSetup", { + enumerable: false, + value: false + }); + for (const property of node.properties) { + if (property.type === "ObjectProperty" && !property.computed && property.key.type === "Identifier") { + if (property.key.name === "props") { + for (const key of getObjectOrArrayExpressionKeys(property.value)) { + bindings[key] = "props"; + } + } else if (property.key.name === "inject") { + for (const key of getObjectOrArrayExpressionKeys(property.value)) { + bindings[key] = "options"; + } + } else if (property.value.type === "ObjectExpression" && (property.key.name === "computed" || property.key.name === "methods")) { + for (const key of getObjectExpressionKeys(property.value)) { + bindings[key] = "options"; + } + } + } else if (property.type === "ObjectMethod" && property.key.type === "Identifier" && (property.key.name === "setup" || property.key.name === "data")) { + for (const bodyItem of property.body.body) { + if (bodyItem.type === "ReturnStatement" && bodyItem.argument && bodyItem.argument.type === "ObjectExpression") { + for (const key of getObjectExpressionKeys(bodyItem.argument)) { + bindings[key] = property.key.name === "setup" ? "setup-maybe-ref" : "data"; + } + } + } + } + } + return bindings; +} +function getObjectExpressionKeys(node) { + const keys = []; + for (const prop of node.properties) { + if (prop.type === "SpreadElement") continue; + const key = resolveObjectKey(prop.key, prop.computed); + if (key) keys.push(String(key)); + } + return keys; +} +function getArrayExpressionKeys(node) { + const keys = []; + for (const element of node.elements) { + if (element && element.type === "StringLiteral") { + keys.push(element.value); + } + } + return keys; +} +function getObjectOrArrayExpressionKeys(value) { + if (value.type === "ArrayExpression") { + return getArrayExpressionKeys(value); + } + if (value.type === "ObjectExpression") { + return getObjectExpressionKeys(value); + } + return []; +} + +const comma = ','.charCodeAt(0); +const semicolon = ';'.charCodeAt(0); +const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +const intToChar = new Uint8Array(64); // 64 possible chars. +const charToInt = new Uint8Array(128); // z is 122 in ASCII +for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; +} +function encodeInteger(builder, num, relative) { + let delta = num - relative; + delta = delta < 0 ? (-delta << 1) | 1 : delta << 1; + do { + let clamped = delta & 0b011111; + delta >>>= 5; + if (delta > 0) + clamped |= 0b100000; + builder.write(intToChar[clamped]); + } while (delta > 0); + return num; +} + +const bufLength = 1024 * 16; +// Provide a fallback for older environments. +const td = typeof TextDecoder !== 'undefined' + ? /* #__PURE__ */ new TextDecoder() + : typeof Buffer !== 'undefined' + ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + }, + } + : { + decode(buf) { + let out = ''; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + }, + }; +class StringWriter { + constructor() { + this.pos = 0; + this.out = ''; + this.buffer = new Uint8Array(bufLength); + } + write(v) { + const { buffer } = this; + buffer[this.pos++] = v; + if (this.pos === bufLength) { + this.out += td.decode(buffer); + this.pos = 0; + } + } + flush() { + const { buffer, out, pos } = this; + return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; + } +} +function encode(decoded) { + const writer = new StringWriter(); + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) + writer.write(semicolon); + if (line.length === 0) + continue; + let genColumn = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + if (j > 0) + writer.write(comma); + genColumn = encodeInteger(writer, segment[0], genColumn); + if (segment.length === 1) + continue; + sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); + sourceLine = encodeInteger(writer, segment[2], sourceLine); + sourceColumn = encodeInteger(writer, segment[3], sourceColumn); + if (segment.length === 4) + continue; + namesIndex = encodeInteger(writer, segment[4], namesIndex); + } + } + return writer.flush(); +} + +class BitSet { + constructor(arg) { + this.bits = arg instanceof BitSet ? arg.bits.slice() : []; + } + + add(n) { + this.bits[n >> 5] |= 1 << (n & 31); + } + + has(n) { + return !!(this.bits[n >> 5] & (1 << (n & 31))); + } +} + +class Chunk { + constructor(start, end, content) { + this.start = start; + this.end = end; + this.original = content; + + this.intro = ''; + this.outro = ''; + + this.content = content; + this.storeName = false; + this.edited = false; + + { + this.previous = null; + this.next = null; + } + } + + appendLeft(content) { + this.outro += content; + } + + appendRight(content) { + this.intro = this.intro + content; + } + + clone() { + const chunk = new Chunk(this.start, this.end, this.original); + + chunk.intro = this.intro; + chunk.outro = this.outro; + chunk.content = this.content; + chunk.storeName = this.storeName; + chunk.edited = this.edited; + + return chunk; + } + + contains(index) { + return this.start < index && index < this.end; + } + + eachNext(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.next; + } + } + + eachPrevious(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.previous; + } + } + + edit(content, storeName, contentOnly) { + this.content = content; + if (!contentOnly) { + this.intro = ''; + this.outro = ''; + } + this.storeName = storeName; + + this.edited = true; + + return this; + } + + prependLeft(content) { + this.outro = content + this.outro; + } + + prependRight(content) { + this.intro = content + this.intro; + } + + reset() { + this.intro = ''; + this.outro = ''; + if (this.edited) { + this.content = this.original; + this.storeName = false; + this.edited = false; + } + } + + split(index) { + const sliceIndex = index - this.start; + + const originalBefore = this.original.slice(0, sliceIndex); + const originalAfter = this.original.slice(sliceIndex); + + this.original = originalBefore; + + const newChunk = new Chunk(index, this.end, originalAfter); + newChunk.outro = this.outro; + this.outro = ''; + + this.end = index; + + if (this.edited) { + // after split we should save the edit content record into the correct chunk + // to make sure sourcemap correct + // For example: + // ' test'.trim() + // split -> ' ' + 'test' + // ✔️ edit -> '' + 'test' + // ✖️ edit -> 'test' + '' + // TODO is this block necessary?... + newChunk.edit('', false); + this.content = ''; + } else { + this.content = originalBefore; + } + + newChunk.next = this.next; + if (newChunk.next) newChunk.next.previous = newChunk; + newChunk.previous = this; + this.next = newChunk; + + return newChunk; + } + + toString() { + return this.intro + this.content + this.outro; + } + + trimEnd(rx) { + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + this.split(this.start + trimmed.length).edit('', undefined, true); + if (this.edited) { + // save the change, if it has been edited + this.edit(trimmed, this.storeName, true); + } + } + return true; + } else { + this.edit('', undefined, true); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + } + } + + trimStart(rx) { + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + const newChunk = this.split(this.end - trimmed.length); + if (this.edited) { + // save the change, if it has been edited + newChunk.edit(trimmed, this.storeName, true); + } + this.edit('', undefined, true); + } + return true; + } else { + this.edit('', undefined, true); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + } + } +} + +function getBtoa() { + if (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') { + return (str) => globalThis.btoa(unescape(encodeURIComponent(str))); + } else if (typeof Buffer === 'function') { + return (str) => Buffer.from(str, 'utf-8').toString('base64'); + } else { + return () => { + throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.'); + }; + } +} + +const btoa = /*#__PURE__*/ getBtoa(); + +class SourceMap { + constructor(properties) { + this.version = 3; + this.file = properties.file; + this.sources = properties.sources; + this.sourcesContent = properties.sourcesContent; + this.names = properties.names; + this.mappings = encode(properties.mappings); + if (typeof properties.x_google_ignoreList !== 'undefined') { + this.x_google_ignoreList = properties.x_google_ignoreList; + } + } + + toString() { + return JSON.stringify(this); + } + + toUrl() { + return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString()); + } +} + +function guessIndent(code) { + const lines = code.split('\n'); + + const tabbed = lines.filter((line) => /^\t+/.test(line)); + const spaced = lines.filter((line) => /^ {2,}/.test(line)); + + if (tabbed.length === 0 && spaced.length === 0) { + return null; + } + + // More lines tabbed than spaced? Assume tabs, and + // default to tabs in the case of a tie (or nothing + // to go on) + if (tabbed.length >= spaced.length) { + return '\t'; + } + + // Otherwise, we need to guess the multiple + const min = spaced.reduce((previous, current) => { + const numSpaces = /^ +/.exec(current)[0].length; + return Math.min(numSpaces, previous); + }, Infinity); + + return new Array(min + 1).join(' '); +} + +function getRelativePath(from, to) { + const fromParts = from.split(/[/\\]/); + const toParts = to.split(/[/\\]/); + + fromParts.pop(); // get dirname + + while (fromParts[0] === toParts[0]) { + fromParts.shift(); + toParts.shift(); + } + + if (fromParts.length) { + let i = fromParts.length; + while (i--) fromParts[i] = '..'; + } + + return fromParts.concat(toParts).join('/'); +} + +const toString = Object.prototype.toString; + +function isObject(thing) { + return toString.call(thing) === '[object Object]'; +} + +function getLocator(source) { + const originalLines = source.split('\n'); + const lineOffsets = []; + + for (let i = 0, pos = 0; i < originalLines.length; i++) { + lineOffsets.push(pos); + pos += originalLines[i].length + 1; + } + + return function locate(index) { + let i = 0; + let j = lineOffsets.length; + while (i < j) { + const m = (i + j) >> 1; + if (index < lineOffsets[m]) { + j = m; + } else { + i = m + 1; + } + } + const line = i - 1; + const column = index - lineOffsets[line]; + return { line, column }; + }; +} + +const wordRegex = /\w/; + +class Mappings { + constructor(hires) { + this.hires = hires; + this.generatedCodeLine = 0; + this.generatedCodeColumn = 0; + this.raw = []; + this.rawSegments = this.raw[this.generatedCodeLine] = []; + this.pending = null; + } + + addEdit(sourceIndex, content, loc, nameIndex) { + if (content.length) { + const contentLengthMinusOne = content.length - 1; + let contentLineEnd = content.indexOf('\n', 0); + let previousContentLineEnd = -1; + // Loop through each line in the content and add a segment, but stop if the last line is empty, + // else code afterwards would fill one line too many + while (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); + + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; + + previousContentLineEnd = contentLineEnd; + contentLineEnd = content.indexOf('\n', contentLineEnd + 1); + } + + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); + + this.advance(content.slice(previousContentLineEnd + 1)); + } else if (this.pending) { + this.rawSegments.push(this.pending); + this.advance(content); + } + + this.pending = null; + } + + addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) { + let originalCharIndex = chunk.start; + let first = true; + // when iterating each char, check if it's in a word boundary + let charInHiresBoundary = false; + + while (originalCharIndex < chunk.end) { + if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + + if (this.hires === 'boundary') { + // in hires "boundary", group segments per word boundary than per char + if (wordRegex.test(original[originalCharIndex])) { + // for first char in the boundary found, start the boundary by pushing a segment + if (!charInHiresBoundary) { + this.rawSegments.push(segment); + charInHiresBoundary = true; + } + } else { + // for non-word char, end the boundary by pushing a segment + this.rawSegments.push(segment); + charInHiresBoundary = false; + } + } else { + this.rawSegments.push(segment); + } + } + + if (original[originalCharIndex] === '\n') { + loc.line += 1; + loc.column = 0; + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; + first = true; + } else { + loc.column += 1; + this.generatedCodeColumn += 1; + first = false; + } + + originalCharIndex += 1; + } + + this.pending = null; + } + + advance(str) { + if (!str) return; + + const lines = str.split('\n'); + + if (lines.length > 1) { + for (let i = 0; i < lines.length - 1; i++) { + this.generatedCodeLine++; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + } + this.generatedCodeColumn = 0; + } + + this.generatedCodeColumn += lines[lines.length - 1].length; + } +} + +const n = '\n'; + +const warned = { + insertLeft: false, + insertRight: false, + storeName: false, +}; + +class MagicString { + constructor(string, options = {}) { + const chunk = new Chunk(0, string.length, string); + + Object.defineProperties(this, { + original: { writable: true, value: string }, + outro: { writable: true, value: '' }, + intro: { writable: true, value: '' }, + firstChunk: { writable: true, value: chunk }, + lastChunk: { writable: true, value: chunk }, + lastSearchedChunk: { writable: true, value: chunk }, + byStart: { writable: true, value: {} }, + byEnd: { writable: true, value: {} }, + filename: { writable: true, value: options.filename }, + indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, + sourcemapLocations: { writable: true, value: new BitSet() }, + storedNames: { writable: true, value: {} }, + indentStr: { writable: true, value: undefined }, + ignoreList: { writable: true, value: options.ignoreList }, + }); + + this.byStart[0] = chunk; + this.byEnd[string.length] = chunk; + } + + addSourcemapLocation(char) { + this.sourcemapLocations.add(char); + } + + append(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); + + this.outro += content; + return this; + } + + appendLeft(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byEnd[index]; + + if (chunk) { + chunk.appendLeft(content); + } else { + this.intro += content; + } + return this; + } + + appendRight(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byStart[index]; + + if (chunk) { + chunk.appendRight(content); + } else { + this.outro += content; + } + return this; + } + + clone() { + const cloned = new MagicString(this.original, { filename: this.filename }); + + let originalChunk = this.firstChunk; + let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone()); + + while (originalChunk) { + cloned.byStart[clonedChunk.start] = clonedChunk; + cloned.byEnd[clonedChunk.end] = clonedChunk; + + const nextOriginalChunk = originalChunk.next; + const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); + + if (nextClonedChunk) { + clonedChunk.next = nextClonedChunk; + nextClonedChunk.previous = clonedChunk; + + clonedChunk = nextClonedChunk; + } + + originalChunk = nextOriginalChunk; + } + + cloned.lastChunk = clonedChunk; + + if (this.indentExclusionRanges) { + cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); + } + + cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); + + cloned.intro = this.intro; + cloned.outro = this.outro; + + return cloned; + } + + generateDecodedMap(options) { + options = options || {}; + + const sourceIndex = 0; + const names = Object.keys(this.storedNames); + const mappings = new Mappings(options.hires); + + const locate = getLocator(this.original); + + if (this.intro) { + mappings.advance(this.intro); + } + + this.firstChunk.eachNext((chunk) => { + const loc = locate(chunk.start); + + if (chunk.intro.length) mappings.advance(chunk.intro); + + if (chunk.edited) { + mappings.addEdit( + sourceIndex, + chunk.content, + loc, + chunk.storeName ? names.indexOf(chunk.original) : -1, + ); + } else { + mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations); + } + + if (chunk.outro.length) mappings.advance(chunk.outro); + }); + + return { + file: options.file ? options.file.split(/[/\\]/).pop() : undefined, + sources: [ + options.source ? getRelativePath(options.file || '', options.source) : options.file || '', + ], + sourcesContent: options.includeContent ? [this.original] : undefined, + names, + mappings: mappings.raw, + x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined, + }; + } + + generateMap(options) { + return new SourceMap(this.generateDecodedMap(options)); + } + + _ensureindentStr() { + if (this.indentStr === undefined) { + this.indentStr = guessIndent(this.original); + } + } + + _getRawIndentString() { + this._ensureindentStr(); + return this.indentStr; + } + + getIndentString() { + this._ensureindentStr(); + return this.indentStr === null ? '\t' : this.indentStr; + } + + indent(indentStr, options) { + const pattern = /^[^\r\n]/gm; + + if (isObject(indentStr)) { + options = indentStr; + indentStr = undefined; + } + + if (indentStr === undefined) { + this._ensureindentStr(); + indentStr = this.indentStr || '\t'; + } + + if (indentStr === '') return this; // noop + + options = options || {}; + + // Process exclusion ranges + const isExcluded = {}; + + if (options.exclude) { + const exclusions = + typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude; + exclusions.forEach((exclusion) => { + for (let i = exclusion[0]; i < exclusion[1]; i += 1) { + isExcluded[i] = true; + } + }); + } + + let shouldIndentNextCharacter = options.indentStart !== false; + const replacer = (match) => { + if (shouldIndentNextCharacter) return `${indentStr}${match}`; + shouldIndentNextCharacter = true; + return match; + }; + + this.intro = this.intro.replace(pattern, replacer); + + let charIndex = 0; + let chunk = this.firstChunk; + + while (chunk) { + const end = chunk.end; + + if (chunk.edited) { + if (!isExcluded[charIndex]) { + chunk.content = chunk.content.replace(pattern, replacer); + + if (chunk.content.length) { + shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n'; + } + } + } else { + charIndex = chunk.start; + + while (charIndex < end) { + if (!isExcluded[charIndex]) { + const char = this.original[charIndex]; + + if (char === '\n') { + shouldIndentNextCharacter = true; + } else if (char !== '\r' && shouldIndentNextCharacter) { + shouldIndentNextCharacter = false; + + if (charIndex === chunk.start) { + chunk.prependRight(indentStr); + } else { + this._splitChunk(chunk, charIndex); + chunk = chunk.next; + chunk.prependRight(indentStr); + } + } + } + + charIndex += 1; + } + } + + charIndex = chunk.end; + chunk = chunk.next; + } + + this.outro = this.outro.replace(pattern, replacer); + + return this; + } + + insert() { + throw new Error( + 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)', + ); + } + + insertLeft(index, content) { + if (!warned.insertLeft) { + console.warn( + 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead', + ); // eslint-disable-line no-console + warned.insertLeft = true; + } + + return this.appendLeft(index, content); + } + + insertRight(index, content) { + if (!warned.insertRight) { + console.warn( + 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead', + ); // eslint-disable-line no-console + warned.insertRight = true; + } + + return this.prependRight(index, content); + } + + move(start, end, index) { + if (index >= start && index <= end) throw new Error('Cannot move a selection inside itself'); + + this._split(start); + this._split(end); + this._split(index); + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + const oldLeft = first.previous; + const oldRight = last.next; + + const newRight = this.byStart[index]; + if (!newRight && last === this.lastChunk) return this; + const newLeft = newRight ? newRight.previous : this.lastChunk; + + if (oldLeft) oldLeft.next = oldRight; + if (oldRight) oldRight.previous = oldLeft; + + if (newLeft) newLeft.next = first; + if (newRight) newRight.previous = last; + + if (!first.previous) this.firstChunk = last.next; + if (!last.next) { + this.lastChunk = first.previous; + this.lastChunk.next = null; + } + + first.previous = newLeft; + last.next = newRight || null; + + if (!newLeft) this.firstChunk = first; + if (!newRight) this.lastChunk = last; + return this; + } + + overwrite(start, end, content, options) { + options = options || {}; + return this.update(start, end, content, { ...options, overwrite: !options.contentOnly }); + } + + update(start, end, content, options) { + if (typeof content !== 'string') throw new TypeError('replacement content must be a string'); + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + if (end > this.original.length) throw new Error('end is out of bounds'); + if (start === end) + throw new Error( + 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead', + ); + + this._split(start); + this._split(end); + + if (options === true) { + if (!warned.storeName) { + console.warn( + 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string', + ); // eslint-disable-line no-console + warned.storeName = true; + } + + options = { storeName: true }; + } + const storeName = options !== undefined ? options.storeName : false; + const overwrite = options !== undefined ? options.overwrite : false; + + if (storeName) { + const original = this.original.slice(start, end); + Object.defineProperty(this.storedNames, original, { + writable: true, + value: true, + enumerable: true, + }); + } + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + if (first) { + let chunk = first; + while (chunk !== last) { + if (chunk.next !== this.byStart[chunk.end]) { + throw new Error('Cannot overwrite across a split point'); + } + chunk = chunk.next; + chunk.edit('', false); + } + + first.edit(content, storeName, !overwrite); + } else { + // must be inserting at the end + const newChunk = new Chunk(start, end, '').edit(content, storeName); + + // TODO last chunk in the array may not be the last chunk, if it's moved... + last.next = newChunk; + newChunk.previous = last; + } + return this; + } + + prepend(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); + + this.intro = content + this.intro; + return this; + } + + prependLeft(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byEnd[index]; + + if (chunk) { + chunk.prependLeft(content); + } else { + this.intro = content + this.intro; + } + return this; + } + + prependRight(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byStart[index]; + + if (chunk) { + chunk.prependRight(content); + } else { + this.outro = content + this.outro; + } + return this; + } + + remove(start, end) { + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + if (start === end) return this; + + if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); + if (start > end) throw new Error('end must be greater than start'); + + this._split(start); + this._split(end); + + let chunk = this.byStart[start]; + + while (chunk) { + chunk.intro = ''; + chunk.outro = ''; + chunk.edit(''); + + chunk = end > chunk.end ? this.byStart[chunk.end] : null; + } + return this; + } + + reset(start, end) { + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + if (start === end) return this; + + if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); + if (start > end) throw new Error('end must be greater than start'); + + this._split(start); + this._split(end); + + let chunk = this.byStart[start]; + + while (chunk) { + chunk.reset(); + + chunk = end > chunk.end ? this.byStart[chunk.end] : null; + } + return this; + } + + lastChar() { + if (this.outro.length) return this.outro[this.outro.length - 1]; + let chunk = this.lastChunk; + do { + if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1]; + if (chunk.content.length) return chunk.content[chunk.content.length - 1]; + if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1]; + } while ((chunk = chunk.previous)); + if (this.intro.length) return this.intro[this.intro.length - 1]; + return ''; + } + + lastLine() { + let lineIndex = this.outro.lastIndexOf(n); + if (lineIndex !== -1) return this.outro.substr(lineIndex + 1); + let lineStr = this.outro; + let chunk = this.lastChunk; + do { + if (chunk.outro.length > 0) { + lineIndex = chunk.outro.lastIndexOf(n); + if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.outro + lineStr; + } + + if (chunk.content.length > 0) { + lineIndex = chunk.content.lastIndexOf(n); + if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr; + lineStr = chunk.content + lineStr; + } + + if (chunk.intro.length > 0) { + lineIndex = chunk.intro.lastIndexOf(n); + if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.intro + lineStr; + } + } while ((chunk = chunk.previous)); + lineIndex = this.intro.lastIndexOf(n); + if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr; + return this.intro + lineStr; + } + + slice(start = 0, end = this.original.length) { + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + let result = ''; + + // find start chunk + let chunk = this.firstChunk; + while (chunk && (chunk.start > start || chunk.end <= start)) { + // found end chunk before start + if (chunk.start < end && chunk.end >= end) { + return result; + } + + chunk = chunk.next; + } + + if (chunk && chunk.edited && chunk.start !== start) + throw new Error(`Cannot use replaced character ${start} as slice start anchor.`); + + const startChunk = chunk; + while (chunk) { + if (chunk.intro && (startChunk !== chunk || chunk.start === start)) { + result += chunk.intro; + } + + const containsEnd = chunk.start < end && chunk.end >= end; + if (containsEnd && chunk.edited && chunk.end !== end) + throw new Error(`Cannot use replaced character ${end} as slice end anchor.`); + + const sliceStart = startChunk === chunk ? start - chunk.start : 0; + const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; + + result += chunk.content.slice(sliceStart, sliceEnd); + + if (chunk.outro && (!containsEnd || chunk.end === end)) { + result += chunk.outro; + } + + if (containsEnd) { + break; + } + + chunk = chunk.next; + } + + return result; + } + + // TODO deprecate this? not really very useful + snip(start, end) { + const clone = this.clone(); + clone.remove(0, start); + clone.remove(end, clone.original.length); + + return clone; + } + + _split(index) { + if (this.byStart[index] || this.byEnd[index]) return; + + let chunk = this.lastSearchedChunk; + const searchForward = index > chunk.end; + + while (chunk) { + if (chunk.contains(index)) return this._splitChunk(chunk, index); + + chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; + } + } + + _splitChunk(chunk, index) { + if (chunk.edited && chunk.content.length) { + // zero-length edited chunks are a special case (overlapping replacements) + const loc = getLocator(this.original)(index); + throw new Error( + `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`, + ); + } + + const newChunk = chunk.split(index); + + this.byEnd[index] = chunk; + this.byStart[index] = newChunk; + this.byEnd[newChunk.end] = newChunk; + + if (chunk === this.lastChunk) this.lastChunk = newChunk; + + this.lastSearchedChunk = chunk; + return true; + } + + toString() { + let str = this.intro; + + let chunk = this.firstChunk; + while (chunk) { + str += chunk.toString(); + chunk = chunk.next; + } + + return str + this.outro; + } + + isEmpty() { + let chunk = this.firstChunk; + do { + if ( + (chunk.intro.length && chunk.intro.trim()) || + (chunk.content.length && chunk.content.trim()) || + (chunk.outro.length && chunk.outro.trim()) + ) + return false; + } while ((chunk = chunk.next)); + return true; + } + + length() { + let chunk = this.firstChunk; + let length = 0; + do { + length += chunk.intro.length + chunk.content.length + chunk.outro.length; + } while ((chunk = chunk.next)); + return length; + } + + trimLines() { + return this.trim('[\\r\\n]'); + } + + trim(charType) { + return this.trimStart(charType).trimEnd(charType); + } + + trimEndAborted(charType) { + const rx = new RegExp((charType || '\\s') + '+$'); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + + let chunk = this.lastChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimEnd(rx); + + // if chunk was trimmed, we have a new lastChunk + if (chunk.end !== end) { + if (this.lastChunk === chunk) { + this.lastChunk = chunk.next; + } + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.previous; + } while (chunk); + + return false; + } + + trimEnd(charType) { + this.trimEndAborted(charType); + return this; + } + trimStartAborted(charType) { + const rx = new RegExp('^' + (charType || '\\s') + '+'); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + let chunk = this.firstChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimStart(rx); + + if (chunk.end !== end) { + // special case... + if (chunk === this.lastChunk) this.lastChunk = chunk.next; + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.next; + } while (chunk); + + return false; + } + + trimStart(charType) { + this.trimStartAborted(charType); + return this; + } + + hasChanged() { + return this.original !== this.toString(); + } + + _replaceRegexp(searchValue, replacement) { + function getReplacement(match, str) { + if (typeof replacement === 'string') { + return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => { + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter + if (i === '$') return '$'; + if (i === '&') return match[0]; + const num = +i; + if (num < match.length) return match[+i]; + return `$${i}`; + }); + } else { + return replacement(...match, match.index, str, match.groups); + } + } + function matchAll(re, str) { + let match; + const matches = []; + while ((match = re.exec(str))) { + matches.push(match); + } + return matches; + } + if (searchValue.global) { + const matches = matchAll(searchValue, this.original); + matches.forEach((match) => { + if (match.index != null) { + const replacement = getReplacement(match, this.original); + if (replacement !== match[0]) { + this.overwrite( + match.index, + match.index + match[0].length, + replacement + ); + } + } + }); + } else { + const match = this.original.match(searchValue); + if (match && match.index != null) { + const replacement = getReplacement(match, this.original); + if (replacement !== match[0]) { + this.overwrite( + match.index, + match.index + match[0].length, + replacement + ); + } + } + } + return this; + } + + _replaceString(string, replacement) { + const { original } = this; + const index = original.indexOf(string); + + if (index !== -1) { + this.overwrite(index, index + string.length, replacement); + } + + return this; + } + + replace(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceString(searchValue, replacement); + } + + return this._replaceRegexp(searchValue, replacement); + } + + _replaceAllString(string, replacement) { + const { original } = this; + const stringLength = string.length; + for ( + let index = original.indexOf(string); + index !== -1; + index = original.indexOf(string, index + stringLength) + ) { + const previous = original.slice(index, index + stringLength); + if (previous !== replacement) + this.overwrite(index, index + stringLength, replacement); + } + + return this; + } + + replaceAll(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceAllString(searchValue, replacement); + } + + if (!searchValue.global) { + throw new TypeError( + 'MagicString.prototype.replaceAll called with a non-global RegExp argument', + ); + } + + return this._replaceRegexp(searchValue, replacement); + } +} + +var _a, _b; +class ScriptCompileContext { + constructor(descriptor, options) { + this.descriptor = descriptor; + this.options = options; + this.isCE = false; + this.source = this.descriptor.source; + this.filename = this.descriptor.filename; + this.s = new MagicString(this.source); + this.startOffset = (_a = this.descriptor.scriptSetup) == null ? void 0 : _a.loc.start.offset; + this.endOffset = (_b = this.descriptor.scriptSetup) == null ? void 0 : _b.loc.end.offset; + this.userImports = /* @__PURE__ */ Object.create(null); + // macros presence check + this.hasDefinePropsCall = false; + this.hasDefineEmitCall = false; + this.hasDefineExposeCall = false; + this.hasDefaultExportName = false; + this.hasDefaultExportRender = false; + this.hasDefineOptionsCall = false; + this.hasDefineSlotsCall = false; + this.hasDefineModelCall = false; + this.propsDestructuredBindings = /* @__PURE__ */ Object.create(null); + // defineModel + this.modelDecls = /* @__PURE__ */ Object.create(null); + // codegen + this.bindingMetadata = {}; + this.helperImports = /* @__PURE__ */ new Set(); + const { script, scriptSetup } = descriptor; + const scriptLang = script && script.lang; + const scriptSetupLang = scriptSetup && scriptSetup.lang; + this.isJS = scriptLang === "js" || scriptLang === "jsx" || scriptSetupLang === "js" || scriptSetupLang === "jsx"; + this.isTS = scriptLang === "ts" || scriptLang === "tsx" || scriptSetupLang === "ts" || scriptSetupLang === "tsx"; + const customElement = options.customElement; + const filename = this.descriptor.filename; + if (customElement) { + this.isCE = typeof customElement === "boolean" ? customElement : customElement(filename); + } + const plugins = resolveParserPlugins( + scriptLang || scriptSetupLang, + options.babelParserPlugins + ); + function parse(input, offset) { + try { + return libExports.parse(input, { + plugins, + sourceType: "module" + }).program; + } catch (e) { + e.message = `[vue/compiler-sfc] ${e.message} + +${descriptor.filename} +${generateCodeFrame( + descriptor.source, + e.pos + offset, + e.pos + offset + 1 + )}`; + throw e; + } + } + this.scriptAst = descriptor.script && parse(descriptor.script.content, descriptor.script.loc.start.offset); + this.scriptSetupAst = descriptor.scriptSetup && parse(descriptor.scriptSetup.content, this.startOffset); + } + helper(key) { + this.helperImports.add(key); + return `_${key}`; + } + getString(node, scriptSetup = true) { + const block = scriptSetup ? this.descriptor.scriptSetup : this.descriptor.script; + return block.content.slice(node.start, node.end); + } + warn(msg, node, scope) { + warn(generateError(msg, node, this, scope)); + } + error(msg, node, scope) { + throw new Error( + `[@vue/compiler-sfc] ${generateError(msg, node, this, scope)}` + ); + } +} +function generateError(msg, node, ctx, scope) { + const offset = scope ? scope.offset : ctx.startOffset; + return `${msg} + +${(scope || ctx.descriptor).filename} +${generateCodeFrame( + (scope || ctx.descriptor).source, + node.start + offset, + node.end + offset + )}`; +} +function resolveParserPlugins(lang, userPlugins, dts = false) { + const plugins = []; + if (!userPlugins || !userPlugins.some( + (p) => p === "importAssertions" || p === "importAttributes" || isArray$3(p) && p[0] === "importAttributes" + )) { + plugins.push("importAttributes"); + } + if (lang === "jsx" || lang === "tsx" || lang === "mtsx") { + plugins.push("jsx"); + } else if (userPlugins) { + userPlugins = userPlugins.filter((p) => p !== "jsx"); + } + if (lang === "ts" || lang === "mts" || lang === "tsx" || lang === "mtsx") { + plugins.push(["typescript", { dts }], "explicitResourceManagement"); + if (!userPlugins || !userPlugins.includes("decorators")) { + plugins.push("decorators-legacy"); + } + } + if (userPlugins) { + plugins.push(...userPlugins); + } + return plugins; +} + +function rewriteDefault(input, as, parserPlugins) { + const ast = libExports.parse(input, { + sourceType: "module", + plugins: resolveParserPlugins("js", parserPlugins) + }).program.body; + const s = new MagicString(input); + rewriteDefaultAST(ast, s, as); + return s.toString(); +} +function rewriteDefaultAST(ast, s, as) { + if (!hasDefaultExport(ast)) { + s.append(` +const ${as} = {}`); + return; + } + ast.forEach((node) => { + if (node.type === "ExportDefaultDeclaration") { + if (node.declaration.type === "ClassDeclaration" && node.declaration.id) { + let start = node.declaration.decorators && node.declaration.decorators.length > 0 ? node.declaration.decorators[node.declaration.decorators.length - 1].end : node.start; + s.overwrite(start, node.declaration.id.start, ` class `); + s.append(` +const ${as} = ${node.declaration.id.name}`); + } else { + s.overwrite(node.start, node.declaration.start, `const ${as} = `); + } + } else if (node.type === "ExportNamedDeclaration") { + for (const specifier of node.specifiers) { + if (specifier.type === "ExportSpecifier" && specifier.exported.type === "Identifier" && specifier.exported.name === "default") { + if (node.source) { + if (specifier.local.name === "default") { + s.prepend( + `import { default as __VUE_DEFAULT__ } from '${node.source.value}' +` + ); + const end2 = specifierEnd(s, specifier.local.end, node.end); + s.remove(specifier.start, end2); + s.append(` +const ${as} = __VUE_DEFAULT__`); + continue; + } else { + s.prepend( + `import { ${s.slice( + specifier.local.start, + specifier.local.end + )} as __VUE_DEFAULT__ } from '${node.source.value}' +` + ); + const end2 = specifierEnd(s, specifier.exported.end, node.end); + s.remove(specifier.start, end2); + s.append(` +const ${as} = __VUE_DEFAULT__`); + continue; + } + } + const end = specifierEnd(s, specifier.end, node.end); + s.remove(specifier.start, end); + s.append(` +const ${as} = ${specifier.local.name}`); + } + } + } + }); +} +function hasDefaultExport(ast) { + for (const stmt of ast) { + if (stmt.type === "ExportDefaultDeclaration") { + return true; + } else if (stmt.type === "ExportNamedDeclaration" && stmt.specifiers.some( + (spec) => spec.exported.name === "default" + )) { + return true; + } + } + return false; +} +function specifierEnd(s, end, nodeEnd) { + let hasCommas = false; + let oldEnd = end; + while (end < nodeEnd) { + if (/\s/.test(s.slice(end, end + 1))) { + end++; + } else if (s.slice(end, end + 1) === ",") { + end++; + hasCommas = true; + break; + } else if (s.slice(end, end + 1) === "}") { + break; + } + } + return hasCommas ? end : oldEnd; +} + +var __defProp$3 = Object.defineProperty; +var __defProps$2 = Object.defineProperties; +var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols; +var __hasOwnProp$3 = Object.prototype.hasOwnProperty; +var __propIsEnum$3 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$3 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$3.call(b, prop)) + __defNormalProp$3(a, prop, b[prop]); + if (__getOwnPropSymbols$3) + for (var prop of __getOwnPropSymbols$3(b)) { + if (__propIsEnum$3.call(b, prop)) + __defNormalProp$3(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b)); +const normalScriptDefaultVar = `__default__`; +function processNormalScript(ctx, scopeId) { + var _a; + const script = ctx.descriptor.script; + if (script.lang && !ctx.isJS && !ctx.isTS) { + return script; + } + try { + let content = script.content; + let map = script.map; + const scriptAst = ctx.scriptAst; + const bindings = analyzeScriptBindings(scriptAst.body); + const { cssVars } = ctx.descriptor; + const { genDefaultAs, isProd } = ctx.options; + if (cssVars.length || genDefaultAs) { + const defaultVar = genDefaultAs || normalScriptDefaultVar; + const s = new MagicString(content); + rewriteDefaultAST(scriptAst.body, s, defaultVar); + content = s.toString(); + if (cssVars.length && !((_a = ctx.options.templateOptions) == null ? void 0 : _a.ssr)) { + content += genNormalScriptCssVarsCode( + cssVars, + bindings, + scopeId, + !!isProd, + defaultVar + ); + } + if (!genDefaultAs) { + content += ` +export default ${defaultVar}`; + } + } + return __spreadProps$2(__spreadValues$3({}, script), { + content, + map, + bindings, + scriptAst: scriptAst.body + }); + } catch (e) { + return script; + } +} + +var __defProp$2 = Object.defineProperty; +var __defProps$1 = Object.defineProperties; +var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols; +var __hasOwnProp$2 = Object.prototype.hasOwnProperty; +var __propIsEnum$2 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$2 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$2.call(b, prop)) + __defNormalProp$2(a, prop, b[prop]); + if (__getOwnPropSymbols$2) + for (var prop of __getOwnPropSymbols$2(b)) { + if (__propIsEnum$2.call(b, prop)) + __defNormalProp$2(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b)); +class TypeScope { + constructor(filename, source, offset = 0, imports = /* @__PURE__ */ Object.create(null), types = /* @__PURE__ */ Object.create(null), declares = /* @__PURE__ */ Object.create(null)) { + this.filename = filename; + this.source = source; + this.offset = offset; + this.imports = imports; + this.types = types; + this.declares = declares; + this.isGenericScope = false; + this.resolvedImportSources = /* @__PURE__ */ Object.create(null); + this.exportedTypes = /* @__PURE__ */ Object.create(null); + this.exportedDeclares = /* @__PURE__ */ Object.create(null); + } +} +function resolveTypeElements(ctx, node, scope, typeParameters) { + const canCache = !typeParameters; + if (canCache && node._resolvedElements) { + return node._resolvedElements; + } + const resolved = innerResolveTypeElements( + ctx, + node, + node._ownerScope || scope || ctxToScope(ctx), + typeParameters + ); + return canCache ? node._resolvedElements = resolved : resolved; +} +function innerResolveTypeElements(ctx, node, scope, typeParameters) { + var _a, _b; + if (node.leadingComments && node.leadingComments.some((c) => c.value.includes("@vue-ignore"))) { + return { props: {} }; + } + switch (node.type) { + case "TSTypeLiteral": + return typeElementsToMap(ctx, node.members, scope, typeParameters); + case "TSInterfaceDeclaration": + return resolveInterfaceMembers(ctx, node, scope, typeParameters); + case "TSTypeAliasDeclaration": + case "TSTypeAnnotation": + case "TSParenthesizedType": + return resolveTypeElements( + ctx, + node.typeAnnotation, + scope, + typeParameters + ); + case "TSFunctionType": { + return { props: {}, calls: [node] }; + } + case "TSUnionType": + case "TSIntersectionType": + return mergeElements( + node.types.map((t) => resolveTypeElements(ctx, t, scope, typeParameters)), + node.type + ); + case "TSMappedType": + return resolveMappedType(ctx, node, scope, typeParameters); + case "TSIndexedAccessType": { + const types = resolveIndexType(ctx, node, scope); + return mergeElements( + types.map((t) => resolveTypeElements(ctx, t, t._ownerScope)), + "TSUnionType" + ); + } + case "TSExpressionWithTypeArguments": + // referenced by interface extends + case "TSTypeReference": { + const typeName = getReferenceName(node); + if ((typeName === "ExtractPropTypes" || typeName === "ExtractPublicPropTypes") && node.typeParameters && ((_a = scope.imports[typeName]) == null ? void 0 : _a.source) === "vue") { + return resolveExtractPropTypes( + resolveTypeElements( + ctx, + node.typeParameters.params[0], + scope, + typeParameters + ), + scope + ); + } + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + let typeParams; + if ((resolved.type === "TSTypeAliasDeclaration" || resolved.type === "TSInterfaceDeclaration") && resolved.typeParameters && node.typeParameters) { + typeParams = /* @__PURE__ */ Object.create(null); + resolved.typeParameters.params.forEach((p, i) => { + let param = typeParameters && typeParameters[p.name]; + if (!param) param = node.typeParameters.params[i]; + typeParams[p.name] = param; + }); + } + return resolveTypeElements( + ctx, + resolved, + resolved._ownerScope, + typeParams + ); + } else { + if (typeof typeName === "string") { + if (typeParameters && typeParameters[typeName]) { + return resolveTypeElements( + ctx, + typeParameters[typeName], + scope, + typeParameters + ); + } + if ( + // @ts-expect-error + SupportedBuiltinsSet.has(typeName) + ) { + return resolveBuiltin( + ctx, + node, + typeName, + scope, + typeParameters + ); + } else if (typeName === "ReturnType" && node.typeParameters) { + const ret = resolveReturnType( + ctx, + node.typeParameters.params[0], + scope + ); + if (ret) { + return resolveTypeElements(ctx, ret, scope); + } + } + } + return ctx.error( + `Unresolvable type reference or unsupported built-in utility type`, + node, + scope + ); + } + } + case "TSImportType": { + if (getId(node.argument) === "vue" && ((_b = node.qualifier) == null ? void 0 : _b.type) === "Identifier" && node.qualifier.name === "ExtractPropTypes" && node.typeParameters) { + return resolveExtractPropTypes( + resolveTypeElements(ctx, node.typeParameters.params[0], scope), + scope + ); + } + const sourceScope = importSourceToScope( + ctx, + node.argument, + scope, + node.argument.value + ); + const resolved = resolveTypeReference(ctx, node, sourceScope); + if (resolved) { + return resolveTypeElements(ctx, resolved, resolved._ownerScope); + } + break; + } + case "TSTypeQuery": + { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + return resolveTypeElements(ctx, resolved, resolved._ownerScope); + } + } + break; + } + return ctx.error(`Unresolvable type: ${node.type}`, node, scope); +} +function typeElementsToMap(ctx, elements, scope = ctxToScope(ctx), typeParameters) { + const res = { props: {} }; + for (const e of elements) { + if (e.type === "TSPropertySignature" || e.type === "TSMethodSignature") { + if (typeParameters) { + scope = createChildScope(scope); + scope.isGenericScope = true; + Object.assign(scope.types, typeParameters); + } + e._ownerScope = scope; + const name = getId(e.key); + if (name && !e.computed) { + res.props[name] = e; + } else if (e.key.type === "TemplateLiteral") { + for (const key of resolveTemplateKeys(ctx, e.key, scope)) { + res.props[key] = e; + } + } else { + ctx.error( + `Unsupported computed key in type referenced by a macro`, + e.key, + scope + ); + } + } else if (e.type === "TSCallSignatureDeclaration") { + (res.calls || (res.calls = [])).push(e); + } + } + return res; +} +function mergeElements(maps, type) { + if (maps.length === 1) return maps[0]; + const res = { props: {} }; + const { props: baseProps } = res; + for (const { props, calls } of maps) { + for (const key in props) { + if (!hasOwn(baseProps, key)) { + baseProps[key] = props[key]; + } else { + baseProps[key] = createProperty( + baseProps[key].key, + { + type, + // @ts-expect-error + types: [baseProps[key], props[key]] + }, + baseProps[key]._ownerScope, + baseProps[key].optional || props[key].optional + ); + } + } + if (calls) { + (res.calls || (res.calls = [])).push(...calls); + } + } + return res; +} +function createProperty(key, typeAnnotation, scope, optional) { + return { + type: "TSPropertySignature", + key, + kind: "get", + optional, + typeAnnotation: { + type: "TSTypeAnnotation", + typeAnnotation + }, + _ownerScope: scope + }; +} +function resolveInterfaceMembers(ctx, node, scope, typeParameters) { + const base = typeElementsToMap( + ctx, + node.body.body, + node._ownerScope, + typeParameters + ); + if (node.extends) { + for (const ext of node.extends) { + try { + const { props, calls } = resolveTypeElements(ctx, ext, scope); + for (const key in props) { + if (!hasOwn(base.props, key)) { + base.props[key] = props[key]; + } + } + if (calls) { + ; + (base.calls || (base.calls = [])).push(...calls); + } + } catch (e) { + ctx.error( + `Failed to resolve extends base type. +If this previously worked in 3.2, you can instruct the compiler to ignore this extend by adding /* @vue-ignore */ before it, for example: + +interface Props extends /* @vue-ignore */ Base {} + +Note: both in 3.2 or with the ignore, the properties in the base type are treated as fallthrough attrs at runtime.`, + ext, + scope + ); + } + } + } + return base; +} +function resolveMappedType(ctx, node, scope, typeParameters) { + const res = { props: {} }; + let keys; + if (node.nameType) { + const { name, constraint } = node.typeParameter; + scope = createChildScope(scope); + Object.assign(scope.types, __spreadProps$1(__spreadValues$2({}, typeParameters), { [name]: constraint })); + keys = resolveStringType(ctx, node.nameType, scope); + } else { + keys = resolveStringType(ctx, node.typeParameter.constraint, scope); + } + for (const key of keys) { + res.props[key] = createProperty( + { + type: "Identifier", + name: key + }, + node.typeAnnotation, + scope, + !!node.optional + ); + } + return res; +} +function resolveIndexType(ctx, node, scope) { + var _a, _b; + if (node.indexType.type === "TSNumberKeyword") { + return resolveArrayElementType(ctx, node.objectType, scope); + } + const { indexType, objectType } = node; + const types = []; + let keys; + let resolved; + if (indexType.type === "TSStringKeyword") { + resolved = resolveTypeElements(ctx, objectType, scope); + keys = Object.keys(resolved.props); + } else { + keys = resolveStringType(ctx, indexType, scope); + resolved = resolveTypeElements(ctx, objectType, scope); + } + for (const key of keys) { + const targetType = (_b = (_a = resolved.props[key]) == null ? void 0 : _a.typeAnnotation) == null ? void 0 : _b.typeAnnotation; + if (targetType) { + targetType._ownerScope = resolved.props[key]._ownerScope; + types.push(targetType); + } + } + return types; +} +function resolveArrayElementType(ctx, node, scope) { + if (node.type === "TSArrayType") { + return [node.elementType]; + } + if (node.type === "TSTupleType") { + return node.elementTypes.map( + (t) => t.type === "TSNamedTupleMember" ? t.elementType : t + ); + } + if (node.type === "TSTypeReference") { + if (getReferenceName(node) === "Array" && node.typeParameters) { + return node.typeParameters.params; + } else { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + return resolveArrayElementType(ctx, resolved, scope); + } + } + } + return ctx.error( + "Failed to resolve element type from target type", + node, + scope + ); +} +function resolveStringType(ctx, node, scope) { + switch (node.type) { + case "StringLiteral": + return [node.value]; + case "TSLiteralType": + return resolveStringType(ctx, node.literal, scope); + case "TSUnionType": + return node.types.map((t) => resolveStringType(ctx, t, scope)).flat(); + case "TemplateLiteral": { + return resolveTemplateKeys(ctx, node, scope); + } + case "TSTypeReference": { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + return resolveStringType(ctx, resolved, scope); + } + if (node.typeName.type === "Identifier") { + const getParam = (index = 0) => resolveStringType(ctx, node.typeParameters.params[index], scope); + switch (node.typeName.name) { + case "Extract": + return getParam(1); + case "Exclude": { + const excluded = getParam(1); + return getParam().filter((s) => !excluded.includes(s)); + } + case "Uppercase": + return getParam().map((s) => s.toUpperCase()); + case "Lowercase": + return getParam().map((s) => s.toLowerCase()); + case "Capitalize": + return getParam().map(capitalize); + case "Uncapitalize": + return getParam().map((s) => s[0].toLowerCase() + s.slice(1)); + default: + ctx.error( + "Unsupported type when resolving index type", + node.typeName, + scope + ); + } + } + } + } + return ctx.error("Failed to resolve index type into finite keys", node, scope); +} +function resolveTemplateKeys(ctx, node, scope) { + if (!node.expressions.length) { + return [node.quasis[0].value.raw]; + } + const res = []; + const e = node.expressions[0]; + const q = node.quasis[0]; + const leading = q ? q.value.raw : ``; + const resolved = resolveStringType(ctx, e, scope); + const restResolved = resolveTemplateKeys( + ctx, + __spreadProps$1(__spreadValues$2({}, node), { + expressions: node.expressions.slice(1), + quasis: q ? node.quasis.slice(1) : node.quasis + }), + scope + ); + for (const r of resolved) { + for (const rr of restResolved) { + res.push(leading + r + rr); + } + } + return res; +} +const SupportedBuiltinsSet = /* @__PURE__ */ new Set([ + "Partial", + "Required", + "Readonly", + "Pick", + "Omit" +]); +function resolveBuiltin(ctx, node, name, scope, typeParameters) { + const t = resolveTypeElements( + ctx, + node.typeParameters.params[0], + scope, + typeParameters + ); + switch (name) { + case "Partial": { + const res2 = { props: {}, calls: t.calls }; + Object.keys(t.props).forEach((key) => { + res2.props[key] = __spreadProps$1(__spreadValues$2({}, t.props[key]), { optional: true }); + }); + return res2; + } + case "Required": { + const res2 = { props: {}, calls: t.calls }; + Object.keys(t.props).forEach((key) => { + res2.props[key] = __spreadProps$1(__spreadValues$2({}, t.props[key]), { optional: false }); + }); + return res2; + } + case "Readonly": + return t; + case "Pick": { + const picked = resolveStringType( + ctx, + node.typeParameters.params[1], + scope + ); + const res2 = { props: {}, calls: t.calls }; + for (const key of picked) { + res2.props[key] = t.props[key]; + } + return res2; + } + case "Omit": + const omitted = resolveStringType( + ctx, + node.typeParameters.params[1], + scope + ); + const res = { props: {}, calls: t.calls }; + for (const key in t.props) { + if (!omitted.includes(key)) { + res.props[key] = t.props[key]; + } + } + return res; + } +} +function resolveTypeReference(ctx, node, scope, name, onlyExported = false) { + const canCache = !(scope == null ? void 0 : scope.isGenericScope); + if (canCache && node._resolvedReference) { + return node._resolvedReference; + } + const resolved = innerResolveTypeReference( + ctx, + scope || ctxToScope(ctx), + name || getReferenceName(node), + node, + onlyExported + ); + return canCache ? node._resolvedReference = resolved : resolved; +} +function innerResolveTypeReference(ctx, scope, name, node, onlyExported) { + if (typeof name === "string") { + if (scope.imports[name]) { + return resolveTypeFromImport(ctx, node, name, scope); + } else { + const lookupSource = node.type === "TSTypeQuery" ? onlyExported ? scope.exportedDeclares : scope.declares : onlyExported ? scope.exportedTypes : scope.types; + if (lookupSource[name]) { + return lookupSource[name]; + } else { + const globalScopes = resolveGlobalScope(ctx); + if (globalScopes) { + for (const s of globalScopes) { + const src = node.type === "TSTypeQuery" ? s.declares : s.types; + if (src[name]) { + (ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(s.filename); + return src[name]; + } + } + } + } + } + } else { + let ns = innerResolveTypeReference(ctx, scope, name[0], node, onlyExported); + if (ns) { + if (ns.type !== "TSModuleDeclaration") { + ns = ns._ns; + } + if (ns) { + const childScope = moduleDeclToScope(ctx, ns, ns._ownerScope || scope); + return innerResolveTypeReference( + ctx, + childScope, + name.length > 2 ? name.slice(1) : name[name.length - 1], + node, + !ns.declare + ); + } + } + } +} +function getReferenceName(node) { + const ref = node.type === "TSTypeReference" ? node.typeName : node.type === "TSExpressionWithTypeArguments" ? node.expression : node.type === "TSImportType" ? node.qualifier : node.exprName; + if ((ref == null ? void 0 : ref.type) === "Identifier") { + return ref.name; + } else if ((ref == null ? void 0 : ref.type) === "TSQualifiedName") { + return qualifiedNameToPath(ref); + } else { + return "default"; + } +} +function qualifiedNameToPath(node) { + if (node.type === "Identifier") { + return [node.name]; + } else { + return [...qualifiedNameToPath(node.left), node.right.name]; + } +} +function resolveGlobalScope(ctx) { + if (ctx.options.globalTypeFiles) { + const fs = resolveFS(ctx); + if (!fs) { + throw new Error("[vue/compiler-sfc] globalTypeFiles requires fs access."); + } + return ctx.options.globalTypeFiles.map( + (file) => fileToScope(ctx, normalizePath(file), true) + ); + } +} +let ts; +let loadTS; +function registerTS(_loadTS) { + loadTS = () => { + try { + return _loadTS(); + } catch (err) { + if (typeof err.message === "string" && err.message.includes("Cannot find module")) { + throw new Error( + 'Failed to load TypeScript, which is required for resolving imported types. Please make sure "typescript" is installed as a project dependency.' + ); + } else { + throw new Error( + "Failed to load TypeScript for resolving imported types." + ); + } + } + }; +} +function resolveFS(ctx) { + if (ctx.fs) { + return ctx.fs; + } + if (!ts && loadTS) { + ts = loadTS(); + } + const fs = ctx.options.fs || (ts == null ? void 0 : ts.sys); + if (!fs) { + return; + } + return ctx.fs = { + fileExists(file) { + if (file.endsWith(".vue.ts")) { + file = file.replace(/\.ts$/, ""); + } + return fs.fileExists(file); + }, + readFile(file) { + if (file.endsWith(".vue.ts")) { + file = file.replace(/\.ts$/, ""); + } + return fs.readFile(file); + }, + realpath: fs.realpath + }; +} +function resolveTypeFromImport(ctx, node, name, scope) { + const { source, imported } = scope.imports[name]; + const sourceScope = importSourceToScope(ctx, node, scope, source); + return resolveTypeReference(ctx, node, sourceScope, imported, true); +} +function importSourceToScope(ctx, node, scope, source) { + let fs; + try { + fs = resolveFS(ctx); + } catch (err) { + return ctx.error(err.message, node, scope); + } + if (!fs) { + return ctx.error( + `No fs option provided to \`compileScript\` in non-Node environment. File system access is required for resolving imported types.`, + node, + scope + ); + } + let resolved = scope.resolvedImportSources[source]; + if (!resolved) { + if (source.startsWith("..")) { + const osSpecificJoinFn = joinPaths; + const filename = osSpecificJoinFn(dirname(scope.filename), source); + resolved = resolveExt(filename, fs); + } else if (source[0] === ".") { + const filename = joinPaths(dirname(scope.filename), source); + resolved = resolveExt(filename, fs); + } else { + { + return ctx.error( + `Type import from non-relative sources is not supported in the browser build.`, + node, + scope + ); + } + } + if (resolved) { + resolved = scope.resolvedImportSources[source] = normalizePath(resolved); + } + } + if (resolved) { + (ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(resolved); + return fileToScope(ctx, resolved); + } else { + return ctx.error( + `Failed to resolve import source ${JSON.stringify(source)}.`, + node, + scope + ); + } +} +function resolveExt(filename, fs) { + filename = filename.replace(/\.js$/, ""); + const tryResolve = (filename2) => { + if (fs.fileExists(filename2)) return filename2; + }; + return tryResolve(filename) || tryResolve(filename + `.ts`) || tryResolve(filename + `.tsx`) || tryResolve(filename + `.d.ts`) || tryResolve(joinPaths(filename, `index.ts`)) || tryResolve(joinPaths(filename, `index.tsx`)) || tryResolve(joinPaths(filename, `index.d.ts`)); +} +const tsConfigCache = createCache(); +const tsConfigRefMap = /* @__PURE__ */ new Map(); +const fileToScopeCache = createCache(); +function invalidateTypeCache(filename) { + filename = normalizePath(filename); + fileToScopeCache.delete(filename); + tsConfigCache.delete(filename); + const affectedConfig = tsConfigRefMap.get(filename); + if (affectedConfig) tsConfigCache.delete(affectedConfig); +} +function fileToScope(ctx, filename, asGlobal = false) { + const cached = fileToScopeCache.get(filename); + if (cached) { + return cached; + } + const fs = resolveFS(ctx); + const source = fs.readFile(filename) || ""; + const body = parseFile(filename, source, ctx.options.babelParserPlugins); + const scope = new TypeScope(filename, source, 0, recordImports(body)); + recordTypes(ctx, body, scope, asGlobal); + fileToScopeCache.set(filename, scope); + return scope; +} +function parseFile(filename, content, parserPlugins) { + const ext = extname(filename); + if (ext === ".ts" || ext === ".mts" || ext === ".tsx" || ext === ".mtsx") { + return libExports.parse(content, { + plugins: resolveParserPlugins( + ext.slice(1), + parserPlugins, + /\.d\.m?ts$/.test(filename) + ), + sourceType: "module" + }).program.body; + } else if (ext === ".vue") { + const { + descriptor: { script, scriptSetup } + } = parse$2(content); + if (!script && !scriptSetup) { + return []; + } + const scriptOffset = script ? script.loc.start.offset : Infinity; + const scriptSetupOffset = scriptSetup ? scriptSetup.loc.start.offset : Infinity; + const firstBlock = scriptOffset < scriptSetupOffset ? script : scriptSetup; + const secondBlock = scriptOffset < scriptSetupOffset ? scriptSetup : script; + let scriptContent = " ".repeat(Math.min(scriptOffset, scriptSetupOffset)) + firstBlock.content; + if (secondBlock) { + scriptContent += " ".repeat(secondBlock.loc.start.offset - script.loc.end.offset) + secondBlock.content; + } + const lang = (script == null ? void 0 : script.lang) || (scriptSetup == null ? void 0 : scriptSetup.lang); + return libExports.parse(scriptContent, { + plugins: resolveParserPlugins(lang, parserPlugins), + sourceType: "module" + }).program.body; + } + return []; +} +function ctxToScope(ctx) { + if (ctx.scope) { + return ctx.scope; + } + const body = "ast" in ctx ? ctx.ast : ctx.scriptAst ? [...ctx.scriptAst.body, ...ctx.scriptSetupAst.body] : ctx.scriptSetupAst.body; + const scope = new TypeScope( + ctx.filename, + ctx.source, + "startOffset" in ctx ? ctx.startOffset : 0, + "userImports" in ctx ? Object.create(ctx.userImports) : recordImports(body) + ); + recordTypes(ctx, body, scope); + return ctx.scope = scope; +} +function moduleDeclToScope(ctx, node, parentScope) { + if (node._resolvedChildScope) { + return node._resolvedChildScope; + } + const scope = createChildScope(parentScope); + if (node.body.type === "TSModuleDeclaration") { + const decl = node.body; + decl._ownerScope = scope; + const id = getId(decl.id); + scope.types[id] = scope.exportedTypes[id] = decl; + } else { + recordTypes(ctx, node.body.body, scope); + } + return node._resolvedChildScope = scope; +} +function createChildScope(parentScope) { + return new TypeScope( + parentScope.filename, + parentScope.source, + parentScope.offset, + Object.create(parentScope.imports), + Object.create(parentScope.types), + Object.create(parentScope.declares) + ); +} +const importExportRE = /^Import|^Export/; +function recordTypes(ctx, body, scope, asGlobal = false) { + const { types, declares, exportedTypes, exportedDeclares, imports } = scope; + const isAmbient = asGlobal ? !body.some((s) => importExportRE.test(s.type)) : false; + for (const stmt of body) { + if (asGlobal) { + if (isAmbient) { + if (stmt.declare) { + recordType(stmt, types, declares); + } + } else if (stmt.type === "TSModuleDeclaration" && stmt.global) { + for (const s of stmt.body.body) { + recordType(s, types, declares); + } + } + } else { + recordType(stmt, types, declares); + } + } + if (!asGlobal) { + for (const stmt of body) { + if (stmt.type === "ExportNamedDeclaration") { + if (stmt.declaration) { + recordType(stmt.declaration, types, declares); + recordType(stmt.declaration, exportedTypes, exportedDeclares); + } else { + for (const spec of stmt.specifiers) { + if (spec.type === "ExportSpecifier") { + const local = spec.local.name; + const exported = getId(spec.exported); + if (stmt.source) { + imports[exported] = { + source: stmt.source.value, + imported: local + }; + exportedTypes[exported] = { + type: "TSTypeReference", + typeName: { + type: "Identifier", + name: local + }, + _ownerScope: scope + }; + } else if (types[local]) { + exportedTypes[exported] = types[local]; + } + } + } + } + } else if (stmt.type === "ExportAllDeclaration") { + const sourceScope = importSourceToScope( + ctx, + stmt.source, + scope, + stmt.source.value + ); + Object.assign(scope.exportedTypes, sourceScope.exportedTypes); + } else if (stmt.type === "ExportDefaultDeclaration" && stmt.declaration) { + if (stmt.declaration.type !== "Identifier") { + recordType(stmt.declaration, types, declares, "default"); + recordType( + stmt.declaration, + exportedTypes, + exportedDeclares, + "default" + ); + } else if (types[stmt.declaration.name]) { + exportedTypes["default"] = types[stmt.declaration.name]; + } + } + } + } + for (const key of Object.keys(types)) { + const node = types[key]; + node._ownerScope = scope; + if (node._ns) node._ns._ownerScope = scope; + } + for (const key of Object.keys(declares)) { + declares[key]._ownerScope = scope; + } +} +function recordType(node, types, declares, overwriteId) { + switch (node.type) { + case "TSInterfaceDeclaration": + case "TSEnumDeclaration": + case "TSModuleDeclaration": { + const id = overwriteId || getId(node.id); + let existing = types[id]; + if (existing) { + if (node.type === "TSModuleDeclaration") { + if (existing.type === "TSModuleDeclaration") { + mergeNamespaces(existing, node); + } else { + attachNamespace(existing, node); + } + break; + } + if (existing.type === "TSModuleDeclaration") { + types[id] = node; + attachNamespace(node, existing); + break; + } + if (existing.type !== node.type) { + break; + } + if (node.type === "TSInterfaceDeclaration") { + existing.body.body.push(...node.body.body); + } else { + existing.members.push(...node.members); + } + } else { + types[id] = node; + } + break; + } + case "ClassDeclaration": + if (overwriteId || node.id) types[overwriteId || getId(node.id)] = node; + break; + case "TSTypeAliasDeclaration": + types[node.id.name] = node.typeParameters ? node : node.typeAnnotation; + break; + case "TSDeclareFunction": + if (node.id) declares[node.id.name] = node; + break; + case "VariableDeclaration": { + if (node.declare) { + for (const decl of node.declarations) { + if (decl.id.type === "Identifier" && decl.id.typeAnnotation) { + declares[decl.id.name] = decl.id.typeAnnotation.typeAnnotation; + } + } + } + break; + } + } +} +function mergeNamespaces(to, from) { + const toBody = to.body; + const fromBody = from.body; + if (toBody.type === "TSModuleDeclaration") { + if (fromBody.type === "TSModuleDeclaration") { + mergeNamespaces(toBody, fromBody); + } else { + fromBody.body.push({ + type: "ExportNamedDeclaration", + declaration: toBody, + exportKind: "type", + specifiers: [] + }); + } + } else if (fromBody.type === "TSModuleDeclaration") { + toBody.body.push({ + type: "ExportNamedDeclaration", + declaration: fromBody, + exportKind: "type", + specifiers: [] + }); + } else { + toBody.body.push(...fromBody.body); + } +} +function attachNamespace(to, ns) { + if (!to._ns) { + to._ns = ns; + } else { + mergeNamespaces(to._ns, ns); + } +} +function recordImports(body) { + const imports = /* @__PURE__ */ Object.create(null); + for (const s of body) { + recordImport(s, imports); + } + return imports; +} +function recordImport(node, imports) { + if (node.type !== "ImportDeclaration") { + return; + } + for (const s of node.specifiers) { + imports[s.local.name] = { + imported: getImportedName(s), + source: node.source.value + }; + } +} +function inferRuntimeType(ctx, node, scope = node._ownerScope || ctxToScope(ctx), isKeyOf = false) { + try { + switch (node.type) { + case "TSStringKeyword": + return ["String"]; + case "TSNumberKeyword": + return ["Number"]; + case "TSBooleanKeyword": + return ["Boolean"]; + case "TSObjectKeyword": + return ["Object"]; + case "TSNullKeyword": + return ["null"]; + case "TSTypeLiteral": + case "TSInterfaceDeclaration": { + const types = /* @__PURE__ */ new Set(); + const members = node.type === "TSTypeLiteral" ? node.members : node.body.body; + for (const m of members) { + if (isKeyOf) { + if (m.type === "TSPropertySignature" && m.key.type === "NumericLiteral") { + types.add("Number"); + } else if (m.type === "TSIndexSignature") { + const annotation = m.parameters[0].typeAnnotation; + if (annotation && annotation.type !== "Noop") { + const type = inferRuntimeType( + ctx, + annotation.typeAnnotation, + scope + )[0]; + if (type === UNKNOWN_TYPE) return [UNKNOWN_TYPE]; + types.add(type); + } + } else { + types.add("String"); + } + } else if (m.type === "TSCallSignatureDeclaration" || m.type === "TSConstructSignatureDeclaration") { + types.add("Function"); + } else { + types.add("Object"); + } + } + return types.size ? Array.from(types) : [isKeyOf ? UNKNOWN_TYPE : "Object"]; + } + case "TSPropertySignature": + if (node.typeAnnotation) { + return inferRuntimeType( + ctx, + node.typeAnnotation.typeAnnotation, + scope + ); + } + break; + case "TSMethodSignature": + case "TSFunctionType": + return ["Function"]; + case "TSArrayType": + case "TSTupleType": + return ["Array"]; + case "TSLiteralType": + switch (node.literal.type) { + case "StringLiteral": + return ["String"]; + case "BooleanLiteral": + return ["Boolean"]; + case "NumericLiteral": + case "BigIntLiteral": + return ["Number"]; + default: + return [UNKNOWN_TYPE]; + } + case "TSTypeReference": { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + return inferRuntimeType(ctx, resolved, resolved._ownerScope, isKeyOf); + } + if (node.typeName.type === "Identifier") { + if (isKeyOf) { + switch (node.typeName.name) { + case "String": + case "Array": + case "ArrayLike": + case "Parameters": + case "ConstructorParameters": + case "ReadonlyArray": + return ["String", "Number"]; + // TS built-in utility types + case "Record": + case "Partial": + case "Required": + case "Readonly": + if (node.typeParameters && node.typeParameters.params[0]) { + return inferRuntimeType( + ctx, + node.typeParameters.params[0], + scope, + true + ); + } + break; + case "Pick": + case "Extract": + if (node.typeParameters && node.typeParameters.params[1]) { + return inferRuntimeType( + ctx, + node.typeParameters.params[1], + scope + ); + } + break; + case "Function": + case "Object": + case "Set": + case "Map": + case "WeakSet": + case "WeakMap": + case "Date": + case "Promise": + case "Error": + case "Uppercase": + case "Lowercase": + case "Capitalize": + case "Uncapitalize": + case "ReadonlyMap": + case "ReadonlySet": + return ["String"]; + } + } else { + switch (node.typeName.name) { + case "Array": + case "Function": + case "Object": + case "Set": + case "Map": + case "WeakSet": + case "WeakMap": + case "Date": + case "Promise": + case "Error": + return [node.typeName.name]; + // TS built-in utility types + // https://www.typescriptlang.org/docs/handbook/utility-types.html + case "Partial": + case "Required": + case "Readonly": + case "Record": + case "Pick": + case "Omit": + case "InstanceType": + return ["Object"]; + case "Uppercase": + case "Lowercase": + case "Capitalize": + case "Uncapitalize": + return ["String"]; + case "Parameters": + case "ConstructorParameters": + case "ReadonlyArray": + return ["Array"]; + case "ReadonlyMap": + return ["Map"]; + case "ReadonlySet": + return ["Set"]; + case "NonNullable": + if (node.typeParameters && node.typeParameters.params[0]) { + return inferRuntimeType( + ctx, + node.typeParameters.params[0], + scope + ).filter((t) => t !== "null"); + } + break; + case "Extract": + if (node.typeParameters && node.typeParameters.params[1]) { + return inferRuntimeType( + ctx, + node.typeParameters.params[1], + scope + ); + } + break; + case "Exclude": + case "OmitThisParameter": + if (node.typeParameters && node.typeParameters.params[0]) { + return inferRuntimeType( + ctx, + node.typeParameters.params[0], + scope + ); + } + break; + } + } + } + break; + } + case "TSParenthesizedType": + return inferRuntimeType(ctx, node.typeAnnotation, scope); + case "TSUnionType": + return flattenTypes(ctx, node.types, scope, isKeyOf); + case "TSIntersectionType": { + return flattenTypes(ctx, node.types, scope, isKeyOf).filter( + (t) => t !== UNKNOWN_TYPE + ); + } + case "TSEnumDeclaration": + return inferEnumType(node); + case "TSSymbolKeyword": + return ["Symbol"]; + case "TSIndexedAccessType": { + const types = resolveIndexType(ctx, node, scope); + return flattenTypes(ctx, types, scope, isKeyOf); + } + case "ClassDeclaration": + return ["Object"]; + case "TSImportType": { + const sourceScope = importSourceToScope( + ctx, + node.argument, + scope, + node.argument.value + ); + const resolved = resolveTypeReference(ctx, node, sourceScope); + if (resolved) { + return inferRuntimeType(ctx, resolved, resolved._ownerScope); + } + break; + } + case "TSTypeQuery": { + const id = node.exprName; + if (id.type === "Identifier") { + const matched = scope.declares[id.name]; + if (matched) { + return inferRuntimeType(ctx, matched, matched._ownerScope, isKeyOf); + } + } + break; + } + // e.g. readonly + case "TSTypeOperator": { + return inferRuntimeType( + ctx, + node.typeAnnotation, + scope, + node.operator === "keyof" + ); + } + case "TSAnyKeyword": { + if (isKeyOf) { + return ["String", "Number", "Symbol"]; + } + break; + } + } + } catch (e) { + } + return [UNKNOWN_TYPE]; +} +function flattenTypes(ctx, types, scope, isKeyOf = false) { + if (types.length === 1) { + return inferRuntimeType(ctx, types[0], scope, isKeyOf); + } + return [ + ...new Set( + [].concat( + ...types.map((t) => inferRuntimeType(ctx, t, scope, isKeyOf)) + ) + ) + ]; +} +function inferEnumType(node) { + const types = /* @__PURE__ */ new Set(); + for (const m of node.members) { + if (m.initializer) { + switch (m.initializer.type) { + case "StringLiteral": + types.add("String"); + break; + case "NumericLiteral": + types.add("Number"); + break; + } + } + } + return types.size ? [...types] : ["Number"]; +} +function resolveExtractPropTypes({ props }, scope) { + const res = { props: {} }; + for (const key in props) { + const raw = props[key]; + res.props[key] = reverseInferType( + raw.key, + raw.typeAnnotation.typeAnnotation, + scope + ); + } + return res; +} +function reverseInferType(key, node, scope, optional = true, checkObjectSyntax = true) { + if (checkObjectSyntax && node.type === "TSTypeLiteral") { + const typeType = findStaticPropertyType(node, "type"); + if (typeType) { + const requiredType = findStaticPropertyType(node, "required"); + const optional2 = requiredType && requiredType.type === "TSLiteralType" && requiredType.literal.type === "BooleanLiteral" ? !requiredType.literal.value : true; + return reverseInferType(key, typeType, scope, optional2, false); + } + } else if (node.type === "TSTypeReference" && node.typeName.type === "Identifier") { + if (node.typeName.name.endsWith("Constructor")) { + return createProperty( + key, + ctorToType(node.typeName.name), + scope, + optional + ); + } else if (node.typeName.name === "PropType" && node.typeParameters) { + return createProperty(key, node.typeParameters.params[0], scope, optional); + } + } + if ((node.type === "TSTypeReference" || node.type === "TSImportType") && node.typeParameters) { + for (const t of node.typeParameters.params) { + const inferred = reverseInferType(key, t, scope, optional); + if (inferred) return inferred; + } + } + return createProperty(key, { type: `TSNullKeyword` }, scope, optional); +} +function ctorToType(ctorType) { + const ctor = ctorType.slice(0, -11); + switch (ctor) { + case "String": + case "Number": + case "Boolean": + return { type: `TS${ctor}Keyword` }; + case "Array": + case "Function": + case "Object": + case "Set": + case "Map": + case "WeakSet": + case "WeakMap": + case "Date": + case "Promise": + return { + type: "TSTypeReference", + typeName: { type: "Identifier", name: ctor } + }; + } + return { type: `TSNullKeyword` }; +} +function findStaticPropertyType(node, key) { + const prop = node.members.find( + (m) => m.type === "TSPropertySignature" && !m.computed && getId(m.key) === key && m.typeAnnotation + ); + return prop && prop.typeAnnotation.typeAnnotation; +} +function resolveReturnType(ctx, arg, scope) { + var _a; + let resolved = arg; + if (arg.type === "TSTypeReference" || arg.type === "TSTypeQuery" || arg.type === "TSImportType") { + resolved = resolveTypeReference(ctx, arg, scope); + } + if (!resolved) return; + if (resolved.type === "TSFunctionType") { + return (_a = resolved.typeAnnotation) == null ? void 0 : _a.typeAnnotation; + } + if (resolved.type === "TSDeclareFunction") { + return resolved.returnType; + } +} +function resolveUnionType(ctx, node, scope) { + if (node.type === "TSTypeReference") { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) node = resolved; + } + let types; + if (node.type === "TSUnionType") { + types = node.types.flatMap((node2) => resolveUnionType(ctx, node2, scope)); + } else { + types = [node]; + } + return types; +} + +const DEFINE_MODEL = "defineModel"; +function processDefineModel(ctx, node, declId) { + if (!isCallOf(node, DEFINE_MODEL)) { + return false; + } + ctx.hasDefineModelCall = true; + const type = node.typeParameters && node.typeParameters.params[0] || void 0; + let modelName; + let options; + const arg0 = node.arguments[0] && unwrapTSNode(node.arguments[0]); + const hasName = arg0 && arg0.type === "StringLiteral"; + if (hasName) { + modelName = arg0.value; + options = node.arguments[1]; + } else { + modelName = "modelValue"; + options = arg0; + } + if (ctx.modelDecls[modelName]) { + ctx.error(`duplicate model name ${JSON.stringify(modelName)}`, node); + } + let optionsString = options && ctx.getString(options); + let optionsRemoved = !options; + const runtimeOptionNodes = []; + if (options && options.type === "ObjectExpression" && !options.properties.some((p) => p.type === "SpreadElement" || p.computed)) { + let removed = 0; + for (let i = options.properties.length - 1; i >= 0; i--) { + const p = options.properties[i]; + const next = options.properties[i + 1]; + const start = p.start; + const end = next ? next.start : options.end - 1; + if ((p.type === "ObjectProperty" || p.type === "ObjectMethod") && (p.key.type === "Identifier" && (p.key.name === "get" || p.key.name === "set") || p.key.type === "StringLiteral" && (p.key.value === "get" || p.key.value === "set"))) { + optionsString = optionsString.slice(0, start - options.start) + optionsString.slice(end - options.start); + } else { + removed++; + ctx.s.remove(ctx.startOffset + start, ctx.startOffset + end); + runtimeOptionNodes.push(p); + } + } + if (removed === options.properties.length) { + optionsRemoved = true; + ctx.s.remove( + ctx.startOffset + (hasName ? arg0.end : options.start), + ctx.startOffset + options.end + ); + } + } + ctx.modelDecls[modelName] = { + type, + options: optionsString, + runtimeOptionNodes, + identifier: declId && declId.type === "Identifier" ? declId.name : void 0 + }; + ctx.bindingMetadata[modelName] = "props"; + ctx.s.overwrite( + ctx.startOffset + node.callee.start, + ctx.startOffset + node.callee.end, + ctx.helper("useModel") + ); + ctx.s.appendLeft( + ctx.startOffset + (node.arguments.length ? node.arguments[0].start : node.end - 1), + `__props, ` + (hasName ? `` : `${JSON.stringify(modelName)}${optionsRemoved ? `` : `, `}`) + ); + return true; +} +function genModelProps(ctx) { + if (!ctx.hasDefineModelCall) return; + const isProd = !!ctx.options.isProd; + let modelPropsDecl = ""; + for (const [name, { type, options: runtimeOptions }] of Object.entries( + ctx.modelDecls + )) { + let skipCheck = false; + let codegenOptions = ``; + let runtimeTypes = type && inferRuntimeType(ctx, type); + if (runtimeTypes) { + const hasBoolean = runtimeTypes.includes("Boolean"); + const hasFunction = runtimeTypes.includes("Function"); + const hasUnknownType = runtimeTypes.includes(UNKNOWN_TYPE); + if (hasUnknownType) { + if (hasBoolean || hasFunction) { + runtimeTypes = runtimeTypes.filter((t) => t !== UNKNOWN_TYPE); + skipCheck = true; + } else { + runtimeTypes = ["null"]; + } + } + if (!isProd) { + codegenOptions = `type: ${toRuntimeTypeString(runtimeTypes)}` + (skipCheck ? ", skipCheck: true" : ""); + } else if (hasBoolean || runtimeOptions && hasFunction) { + codegenOptions = `type: ${toRuntimeTypeString(runtimeTypes)}`; + } else ; + } + let decl; + if (codegenOptions && runtimeOptions) { + decl = ctx.isTS ? `{ ${codegenOptions}, ...${runtimeOptions} }` : `Object.assign({ ${codegenOptions} }, ${runtimeOptions})`; + } else if (codegenOptions) { + decl = `{ ${codegenOptions} }`; + } else if (runtimeOptions) { + decl = runtimeOptions; + } else { + decl = `{}`; + } + modelPropsDecl += ` + ${JSON.stringify(name)}: ${decl},`; + const modifierPropName = JSON.stringify( + name === "modelValue" ? `modelModifiers` : `${name}Modifiers` + ); + modelPropsDecl += ` + ${modifierPropName}: {},`; + } + return `{${modelPropsDecl} + }`; +} + +const DEFINE_PROPS = "defineProps"; +const WITH_DEFAULTS = "withDefaults"; +function processDefineProps(ctx, node, declId, isWithDefaults = false) { + if (!isCallOf(node, DEFINE_PROPS)) { + return processWithDefaults(ctx, node, declId); + } + if (ctx.hasDefinePropsCall) { + ctx.error(`duplicate ${DEFINE_PROPS}() call`, node); + } + ctx.hasDefinePropsCall = true; + ctx.propsRuntimeDecl = node.arguments[0]; + if (ctx.propsRuntimeDecl) { + for (const key of getObjectOrArrayExpressionKeys(ctx.propsRuntimeDecl)) { + if (!(key in ctx.bindingMetadata)) { + ctx.bindingMetadata[key] = "props"; + } + } + } + if (node.typeParameters) { + if (ctx.propsRuntimeDecl) { + ctx.error( + `${DEFINE_PROPS}() cannot accept both type and non-type arguments at the same time. Use one or the other.`, + node + ); + } + ctx.propsTypeDecl = node.typeParameters.params[0]; + } + if (!isWithDefaults && declId && declId.type === "ObjectPattern") { + processPropsDestructure(ctx, declId); + } + ctx.propsCall = node; + ctx.propsDecl = declId; + return true; +} +function processWithDefaults(ctx, node, declId) { + if (!isCallOf(node, WITH_DEFAULTS)) { + return false; + } + if (!processDefineProps( + ctx, + node.arguments[0], + declId, + true + )) { + ctx.error( + `${WITH_DEFAULTS}' first argument must be a ${DEFINE_PROPS} call.`, + node.arguments[0] || node + ); + } + if (ctx.propsRuntimeDecl) { + ctx.error( + `${WITH_DEFAULTS} can only be used with type-based ${DEFINE_PROPS} declaration.`, + node + ); + } + if (declId && declId.type === "ObjectPattern") { + ctx.warn( + `${WITH_DEFAULTS}() is unnecessary when using destructure with ${DEFINE_PROPS}(). +Reactive destructure will be disabled when using withDefaults(). +Prefer using destructure default values, e.g. const { foo = 1 } = defineProps(...). `, + node.callee + ); + } + ctx.propsRuntimeDefaults = node.arguments[1]; + if (!ctx.propsRuntimeDefaults) { + ctx.error(`The 2nd argument of ${WITH_DEFAULTS} is required.`, node); + } + ctx.propsCall = node; + return true; +} +function genRuntimeProps(ctx) { + let propsDecls; + if (ctx.propsRuntimeDecl) { + propsDecls = ctx.getString(ctx.propsRuntimeDecl).trim(); + if (ctx.propsDestructureDecl) { + const defaults = []; + for (const key in ctx.propsDestructuredBindings) { + const d = genDestructuredDefaultValue(ctx, key); + const finalKey = getEscapedPropName(key); + if (d) + defaults.push( + `${finalKey}: ${d.valueString}${d.needSkipFactory ? `, __skip_${finalKey}: true` : ``}` + ); + } + if (defaults.length) { + propsDecls = `/*@__PURE__*/${ctx.helper( + `mergeDefaults` + )}(${propsDecls}, { + ${defaults.join(",\n ")} +})`; + } + } + } else if (ctx.propsTypeDecl) { + propsDecls = extractRuntimeProps(ctx); + } + const modelsDecls = genModelProps(ctx); + if (propsDecls && modelsDecls) { + return `/*@__PURE__*/${ctx.helper( + "mergeModels" + )}(${propsDecls}, ${modelsDecls})`; + } else { + return modelsDecls || propsDecls; + } +} +function extractRuntimeProps(ctx) { + const props = resolveRuntimePropsFromType(ctx, ctx.propsTypeDecl); + if (!props.length) { + return; + } + const propStrings = []; + const hasStaticDefaults = hasStaticWithDefaults(ctx); + for (const prop of props) { + propStrings.push(genRuntimePropFromType(ctx, prop, hasStaticDefaults)); + if ("bindingMetadata" in ctx && !(prop.key in ctx.bindingMetadata)) { + ctx.bindingMetadata[prop.key] = "props"; + } + } + let propsDecls = `{ + ${propStrings.join(",\n ")} + }`; + if (ctx.propsRuntimeDefaults && !hasStaticDefaults) { + propsDecls = `/*@__PURE__*/${ctx.helper( + "mergeDefaults" + )}(${propsDecls}, ${ctx.getString(ctx.propsRuntimeDefaults)})`; + } + return propsDecls; +} +function resolveRuntimePropsFromType(ctx, node) { + const props = []; + const elements = resolveTypeElements(ctx, node); + for (const key in elements.props) { + const e = elements.props[key]; + let type = inferRuntimeType(ctx, e); + let skipCheck = false; + if (type.includes(UNKNOWN_TYPE)) { + if (type.includes("Boolean") || type.includes("Function")) { + type = type.filter((t) => t !== UNKNOWN_TYPE); + skipCheck = true; + } else { + type = ["null"]; + } + } + props.push({ + key, + required: !e.optional, + type: type || [`null`], + skipCheck + }); + } + return props; +} +function genRuntimePropFromType(ctx, { key, required, type, skipCheck }, hasStaticDefaults) { + let defaultString; + const destructured = genDestructuredDefaultValue(ctx, key, type); + if (destructured) { + defaultString = `default: ${destructured.valueString}${destructured.needSkipFactory ? `, skipFactory: true` : ``}`; + } else if (hasStaticDefaults) { + const prop = ctx.propsRuntimeDefaults.properties.find( + (node) => { + if (node.type === "SpreadElement") return false; + return resolveObjectKey(node.key, node.computed) === key; + } + ); + if (prop) { + if (prop.type === "ObjectProperty") { + defaultString = `default: ${ctx.getString(prop.value)}`; + } else { + defaultString = `${prop.async ? "async " : ""}${prop.kind !== "method" ? `${prop.kind} ` : ""}default() ${ctx.getString(prop.body)}`; + } + } + } + const finalKey = getEscapedPropName(key); + if (!ctx.options.isProd) { + return `${finalKey}: { ${concatStrings([ + `type: ${toRuntimeTypeString(type)}`, + `required: ${required}`, + skipCheck && "skipCheck: true", + defaultString + ])} }`; + } else if (type.some( + (el) => el === "Boolean" || (!hasStaticDefaults || defaultString) && el === "Function" + )) { + return `${finalKey}: { ${concatStrings([ + `type: ${toRuntimeTypeString(type)}`, + defaultString + ])} }`; + } else { + if (ctx.isCE) { + if (defaultString) { + return `${finalKey}: ${`{ ${defaultString}, type: ${toRuntimeTypeString( + type + )} }`}`; + } else { + return `${finalKey}: {type: ${toRuntimeTypeString(type)}}`; + } + } + return `${finalKey}: ${defaultString ? `{ ${defaultString} }` : `{}`}`; + } +} +function hasStaticWithDefaults(ctx) { + return !!(ctx.propsRuntimeDefaults && ctx.propsRuntimeDefaults.type === "ObjectExpression" && ctx.propsRuntimeDefaults.properties.every( + (node) => node.type !== "SpreadElement" && (!node.computed || node.key.type.endsWith("Literal")) + )); +} +function genDestructuredDefaultValue(ctx, key, inferredType) { + const destructured = ctx.propsDestructuredBindings[key]; + const defaultVal = destructured && destructured.default; + if (defaultVal) { + const value = ctx.getString(defaultVal); + const unwrapped = unwrapTSNode(defaultVal); + if (inferredType && inferredType.length && !inferredType.includes("null")) { + const valueType = inferValueType(unwrapped); + if (valueType && !inferredType.includes(valueType)) { + ctx.error( + `Default value of prop "${key}" does not match declared type.`, + unwrapped + ); + } + } + const needSkipFactory = !inferredType && (isFunctionType(unwrapped) || unwrapped.type === "Identifier"); + const needFactoryWrap = !needSkipFactory && !isLiteralNode(unwrapped) && !(inferredType == null ? void 0 : inferredType.includes("Function")); + return { + valueString: needFactoryWrap ? `() => (${value})` : value, + needSkipFactory + }; + } +} +function inferValueType(node) { + switch (node.type) { + case "StringLiteral": + return "String"; + case "NumericLiteral": + return "Number"; + case "BooleanLiteral": + return "Boolean"; + case "ObjectExpression": + return "Object"; + case "ArrayExpression": + return "Array"; + case "FunctionExpression": + case "ArrowFunctionExpression": + return "Function"; + } +} + +function processPropsDestructure(ctx, declId) { + if (ctx.options.propsDestructure === "error") { + ctx.error(`Props destructure is explicitly prohibited via config.`, declId); + } else if (ctx.options.propsDestructure === false) { + return; + } + ctx.propsDestructureDecl = declId; + const registerBinding = (key, local, defaultValue) => { + ctx.propsDestructuredBindings[key] = { local, default: defaultValue }; + if (local !== key) { + ctx.bindingMetadata[local] = "props-aliased"; + (ctx.bindingMetadata.__propsAliases || (ctx.bindingMetadata.__propsAliases = {}))[local] = key; + } + }; + for (const prop of declId.properties) { + if (prop.type === "ObjectProperty") { + const propKey = resolveObjectKey(prop.key, prop.computed); + if (!propKey) { + ctx.error( + `${DEFINE_PROPS}() destructure cannot use computed key.`, + prop.key + ); + } + if (prop.value.type === "AssignmentPattern") { + const { left, right } = prop.value; + if (left.type !== "Identifier") { + ctx.error( + `${DEFINE_PROPS}() destructure does not support nested patterns.`, + left + ); + } + registerBinding(propKey, left.name, right); + } else if (prop.value.type === "Identifier") { + registerBinding(propKey, prop.value.name); + } else { + ctx.error( + `${DEFINE_PROPS}() destructure does not support nested patterns.`, + prop.value + ); + } + } else { + ctx.propsDestructureRestId = prop.argument.name; + ctx.bindingMetadata[ctx.propsDestructureRestId] = "setup-reactive-const"; + } + } +} +function transformDestructuredProps(ctx, vueImportAliases) { + if (ctx.options.propsDestructure === false) { + return; + } + const rootScope = /* @__PURE__ */ Object.create(null); + const scopeStack = [rootScope]; + let currentScope = rootScope; + const excludedIds = /* @__PURE__ */ new WeakSet(); + const parentStack = []; + const propsLocalToPublicMap = /* @__PURE__ */ Object.create(null); + for (const key in ctx.propsDestructuredBindings) { + const { local } = ctx.propsDestructuredBindings[key]; + rootScope[local] = true; + propsLocalToPublicMap[local] = key; + } + function pushScope() { + scopeStack.push(currentScope = Object.create(currentScope)); + } + function popScope() { + scopeStack.pop(); + currentScope = scopeStack[scopeStack.length - 1] || null; + } + function registerLocalBinding(id) { + excludedIds.add(id); + if (currentScope) { + currentScope[id.name] = false; + } else { + ctx.error( + "registerBinding called without active scope, something is wrong.", + id + ); + } + } + function walkScope(node, isRoot = false) { + for (const stmt of node.body) { + if (stmt.type === "VariableDeclaration") { + walkVariableDeclaration(stmt, isRoot); + } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { + if (stmt.declare || !stmt.id) continue; + registerLocalBinding(stmt.id); + } else if ((stmt.type === "ForOfStatement" || stmt.type === "ForInStatement") && stmt.left.type === "VariableDeclaration") { + walkVariableDeclaration(stmt.left); + } else if (stmt.type === "ExportNamedDeclaration" && stmt.declaration && stmt.declaration.type === "VariableDeclaration") { + walkVariableDeclaration(stmt.declaration, isRoot); + } else if (stmt.type === "LabeledStatement" && stmt.body.type === "VariableDeclaration") { + walkVariableDeclaration(stmt.body, isRoot); + } + } + } + function walkVariableDeclaration(stmt, isRoot = false) { + if (stmt.declare) { + return; + } + for (const decl of stmt.declarations) { + const isDefineProps = isRoot && decl.init && isCallOf(unwrapTSNode(decl.init), "defineProps"); + for (const id of extractIdentifiers$1(decl.id)) { + if (isDefineProps) { + excludedIds.add(id); + } else { + registerLocalBinding(id); + } + } + } + } + function rewriteId(id, parent, parentStack2) { + if (parent.type === "AssignmentExpression" && id === parent.left || parent.type === "UpdateExpression") { + ctx.error(`Cannot assign to destructured props as they are readonly.`, id); + } + if (isStaticProperty(parent) && parent.shorthand) { + if (!parent.inPattern || isInDestructureAssignment(parent, parentStack2)) { + ctx.s.appendLeft( + id.end + ctx.startOffset, + `: ${genPropsAccessExp(propsLocalToPublicMap[id.name])}` + ); + } + } else { + ctx.s.overwrite( + id.start + ctx.startOffset, + id.end + ctx.startOffset, + genPropsAccessExp(propsLocalToPublicMap[id.name]) + ); + } + } + function checkUsage(node, method, alias = method) { + if (isCallOf(node, alias)) { + const arg = unwrapTSNode(node.arguments[0]); + if (arg.type === "Identifier" && currentScope[arg.name]) { + ctx.error( + `"${arg.name}" is a destructured prop and should not be passed directly to ${method}(). Pass a getter () => ${arg.name} instead.`, + arg + ); + } + } + } + const ast = ctx.scriptSetupAst; + walkScope(ast, true); + walk$2(ast, { + enter(node, parent) { + parent && parentStack.push(parent); + if (parent && parent.type.startsWith("TS") && !TS_NODE_TYPES.includes(parent.type)) { + return this.skip(); + } + checkUsage(node, "watch", vueImportAliases.watch); + checkUsage(node, "toRef", vueImportAliases.toRef); + if (isFunctionType(node)) { + pushScope(); + walkFunctionParams(node, registerLocalBinding); + if (node.body.type === "BlockStatement") { + walkScope(node.body); + } + return; + } + if (node.type === "CatchClause") { + pushScope(); + if (node.param && node.param.type === "Identifier") { + registerLocalBinding(node.param); + } + walkScope(node.body); + return; + } + if (node.type === "BlockStatement" && !isFunctionType(parent)) { + pushScope(); + walkScope(node); + return; + } + if (node.type === "Identifier") { + if (isReferencedIdentifier(node, parent, parentStack) && !excludedIds.has(node)) { + if (currentScope[node.name]) { + rewriteId(node, parent, parentStack); + } + } + } + }, + leave(node, parent) { + parent && parentStack.pop(); + if (node.type === "BlockStatement" && !isFunctionType(parent) || isFunctionType(node)) { + popScope(); + } + } + }); +} + +const DEFINE_EMITS = "defineEmits"; +function processDefineEmits(ctx, node, declId) { + if (!isCallOf(node, DEFINE_EMITS)) { + return false; + } + if (ctx.hasDefineEmitCall) { + ctx.error(`duplicate ${DEFINE_EMITS}() call`, node); + } + ctx.hasDefineEmitCall = true; + ctx.emitsRuntimeDecl = node.arguments[0]; + if (node.typeParameters) { + if (ctx.emitsRuntimeDecl) { + ctx.error( + `${DEFINE_EMITS}() cannot accept both type and non-type arguments at the same time. Use one or the other.`, + node + ); + } + ctx.emitsTypeDecl = node.typeParameters.params[0]; + } + ctx.emitDecl = declId; + return true; +} +function genRuntimeEmits(ctx) { + let emitsDecl = ""; + if (ctx.emitsRuntimeDecl) { + emitsDecl = ctx.getString(ctx.emitsRuntimeDecl).trim(); + } else if (ctx.emitsTypeDecl) { + const typeDeclaredEmits = extractRuntimeEmits(ctx); + emitsDecl = typeDeclaredEmits.size ? `[${Array.from(typeDeclaredEmits).map((k) => JSON.stringify(k)).join(", ")}]` : ``; + } + if (ctx.hasDefineModelCall) { + let modelEmitsDecl = `[${Object.keys(ctx.modelDecls).map((n) => JSON.stringify(`update:${n}`)).join(", ")}]`; + emitsDecl = emitsDecl ? `/*@__PURE__*/${ctx.helper( + "mergeModels" + )}(${emitsDecl}, ${modelEmitsDecl})` : modelEmitsDecl; + } + return emitsDecl; +} +function extractRuntimeEmits(ctx) { + const emits = /* @__PURE__ */ new Set(); + const node = ctx.emitsTypeDecl; + if (node.type === "TSFunctionType") { + extractEventNames(ctx, node.parameters[0], emits); + return emits; + } + const { props, calls } = resolveTypeElements(ctx, node); + let hasProperty = false; + for (const key in props) { + emits.add(key); + hasProperty = true; + } + if (calls) { + if (hasProperty) { + ctx.error( + `defineEmits() type cannot mixed call signature and property syntax.`, + node + ); + } + for (const call of calls) { + extractEventNames(ctx, call.parameters[0], emits); + } + } + return emits; +} +function extractEventNames(ctx, eventName, emits) { + if (eventName.type === "Identifier" && eventName.typeAnnotation && eventName.typeAnnotation.type === "TSTypeAnnotation") { + const types = resolveUnionType(ctx, eventName.typeAnnotation.typeAnnotation); + for (const type of types) { + if (type.type === "TSLiteralType") { + if (type.literal.type !== "UnaryExpression" && type.literal.type !== "TemplateLiteral") { + emits.add(String(type.literal.value)); + } + } + } + } +} + +const DEFINE_EXPOSE = "defineExpose"; +function processDefineExpose(ctx, node) { + if (isCallOf(node, DEFINE_EXPOSE)) { + if (ctx.hasDefineExposeCall) { + ctx.error(`duplicate ${DEFINE_EXPOSE}() call`, node); + } + ctx.hasDefineExposeCall = true; + return true; + } + return false; +} + +const DEFINE_SLOTS = "defineSlots"; +function processDefineSlots(ctx, node, declId) { + if (!isCallOf(node, DEFINE_SLOTS)) { + return false; + } + if (ctx.hasDefineSlotsCall) { + ctx.error(`duplicate ${DEFINE_SLOTS}() call`, node); + } + ctx.hasDefineSlotsCall = true; + if (node.arguments.length > 0) { + ctx.error(`${DEFINE_SLOTS}() cannot accept arguments`, node); + } + if (declId) { + ctx.s.overwrite( + ctx.startOffset + node.start, + ctx.startOffset + node.end, + `${ctx.helper("useSlots")}()` + ); + } + return true; +} + +const DEFINE_OPTIONS = "defineOptions"; +function processDefineOptions(ctx, node) { + if (!isCallOf(node, DEFINE_OPTIONS)) { + return false; + } + if (ctx.hasDefineOptionsCall) { + ctx.error(`duplicate ${DEFINE_OPTIONS}() call`, node); + } + if (node.typeParameters) { + ctx.error(`${DEFINE_OPTIONS}() cannot accept type arguments`, node); + } + if (!node.arguments[0]) return true; + ctx.hasDefineOptionsCall = true; + ctx.optionsRuntimeDecl = unwrapTSNode(node.arguments[0]); + let propsOption = void 0; + let emitsOption = void 0; + let exposeOption = void 0; + let slotsOption = void 0; + if (ctx.optionsRuntimeDecl.type === "ObjectExpression") { + for (const prop of ctx.optionsRuntimeDecl.properties) { + if ((prop.type === "ObjectProperty" || prop.type === "ObjectMethod") && prop.key.type === "Identifier") { + switch (prop.key.name) { + case "props": + propsOption = prop; + break; + case "emits": + emitsOption = prop; + break; + case "expose": + exposeOption = prop; + break; + case "slots": + slotsOption = prop; + break; + } + } + } + } + if (propsOption) { + ctx.error( + `${DEFINE_OPTIONS}() cannot be used to declare props. Use ${DEFINE_PROPS}() instead.`, + propsOption + ); + } + if (emitsOption) { + ctx.error( + `${DEFINE_OPTIONS}() cannot be used to declare emits. Use ${DEFINE_EMITS}() instead.`, + emitsOption + ); + } + if (exposeOption) { + ctx.error( + `${DEFINE_OPTIONS}() cannot be used to declare expose. Use ${DEFINE_EXPOSE}() instead.`, + exposeOption + ); + } + if (slotsOption) { + ctx.error( + `${DEFINE_OPTIONS}() cannot be used to declare slots. Use ${DEFINE_SLOTS}() instead.`, + slotsOption + ); + } + return true; +} + +function processAwait(ctx, node, needSemi, isStatement) { + const argumentStart = node.argument.extra && node.argument.extra.parenthesized ? node.argument.extra.parenStart : node.argument.start; + const startOffset = ctx.startOffset; + const argumentStr = ctx.descriptor.source.slice( + argumentStart + startOffset, + node.argument.end + startOffset + ); + const containsNestedAwait = /\bawait\b/.test(argumentStr); + ctx.s.overwrite( + node.start + startOffset, + argumentStart + startOffset, + `${needSemi ? `;` : ``}( + ([__temp,__restore] = ${ctx.helper( + `withAsyncContext` + )}(${containsNestedAwait ? `async ` : ``}() => ` + ); + ctx.s.appendLeft( + node.end + startOffset, + `)), + ${isStatement ? `` : `__temp = `}await __temp, + __restore()${isStatement ? `` : `, + __temp`} +)` + ); +} + +var __defProp$1 = Object.defineProperty; +var __defProps = Object.defineProperties; +var __getOwnPropDescs = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols; +var __hasOwnProp$1 = Object.prototype.hasOwnProperty; +var __propIsEnum$1 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$1 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$1.call(b, prop)) + __defNormalProp$1(a, prop, b[prop]); + if (__getOwnPropSymbols$1) + for (var prop of __getOwnPropSymbols$1(b)) { + if (__propIsEnum$1.call(b, prop)) + __defNormalProp$1(a, prop, b[prop]); + } + return a; +}; +var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); +const MACROS = [ + DEFINE_PROPS, + DEFINE_EMITS, + DEFINE_EXPOSE, + DEFINE_OPTIONS, + DEFINE_SLOTS, + DEFINE_MODEL, + WITH_DEFAULTS +]; +function compileScript(sfc, options) { + var _a, _b, _c; + if (!options.id) { + warnOnce$1( + `compileScript now requires passing the \`id\` option. +Upgrade your vite or vue-loader version for compatibility with the latest experimental proposals.` + ); + } + const ctx = new ScriptCompileContext(sfc, options); + const { script, scriptSetup, source, filename } = sfc; + const hoistStatic = options.hoistStatic !== false && !script; + const scopeId = options.id ? options.id.replace(/^data-v-/, "") : ""; + const scriptLang = script && script.lang; + const scriptSetupLang = scriptSetup && scriptSetup.lang; + if (!scriptSetup) { + if (!script) { + throw new Error(`[@vue/compiler-sfc] SFC contains no <script> tags.`); + } + return processNormalScript(ctx, scopeId); + } + if (script && scriptLang !== scriptSetupLang) { + throw new Error( + `[@vue/compiler-sfc] <script> and <script setup> must have the same language type.` + ); + } + if (scriptSetupLang && !ctx.isJS && !ctx.isTS) { + return scriptSetup; + } + const scriptBindings = /* @__PURE__ */ Object.create(null); + const setupBindings = /* @__PURE__ */ Object.create(null); + let defaultExport; + let hasAwait = false; + let hasInlinedSsrRenderFn = false; + const startOffset = ctx.startOffset; + const endOffset = ctx.endOffset; + const scriptStartOffset = script && script.loc.start.offset; + const scriptEndOffset = script && script.loc.end.offset; + function hoistNode(node) { + const start = node.start + startOffset; + let end = node.end + startOffset; + if (node.trailingComments && node.trailingComments.length > 0) { + const lastCommentNode = node.trailingComments[node.trailingComments.length - 1]; + end = lastCommentNode.end + startOffset; + } + while (end <= source.length) { + if (!/\s/.test(source.charAt(end))) { + break; + } + end++; + } + ctx.s.move(start, end, 0); + } + function registerUserImport(source2, local, imported, isType, isFromSetup, needTemplateUsageCheck) { + let isUsedInTemplate = needTemplateUsageCheck; + if (needTemplateUsageCheck && ctx.isTS && sfc.template && !sfc.template.src && !sfc.template.lang) { + isUsedInTemplate = isImportUsed(local, sfc); + } + ctx.userImports[local] = { + isType, + imported, + local, + source: source2, + isFromSetup, + isUsedInTemplate + }; + } + function checkInvalidScopeReference(node, method) { + if (!node) return; + walkIdentifiers(node, (id) => { + const binding = setupBindings[id.name]; + if (binding && binding !== "literal-const") { + ctx.error( + `\`${method}()\` in <script setup> cannot reference locally declared variables because it will be hoisted outside of the setup() function. If your component options require initialization in the module scope, use a separate normal <script> to export the options instead.`, + id + ); + } + }); + } + const scriptAst = ctx.scriptAst; + const scriptSetupAst = ctx.scriptSetupAst; + if (scriptAst) { + for (const node of scriptAst.body) { + if (node.type === "ImportDeclaration") { + for (const specifier of node.specifiers) { + const imported = getImportedName(specifier); + registerUserImport( + node.source.value, + specifier.local.name, + imported, + node.importKind === "type" || specifier.type === "ImportSpecifier" && specifier.importKind === "type", + false, + !options.inlineTemplate + ); + } + } + } + } + for (const node of scriptSetupAst.body) { + if (node.type === "ImportDeclaration") { + hoistNode(node); + let removed = 0; + const removeSpecifier = (i) => { + const removeLeft = i > removed; + removed++; + const current = node.specifiers[i]; + const next = node.specifiers[i + 1]; + ctx.s.remove( + removeLeft ? node.specifiers[i - 1].end + startOffset : current.start + startOffset, + next && !removeLeft ? next.start + startOffset : current.end + startOffset + ); + }; + for (let i = 0; i < node.specifiers.length; i++) { + const specifier = node.specifiers[i]; + const local = specifier.local.name; + const imported = getImportedName(specifier); + const source2 = node.source.value; + const existing = ctx.userImports[local]; + if (source2 === "vue" && MACROS.includes(imported)) { + if (local === imported) { + warnOnce$1( + `\`${imported}\` is a compiler macro and no longer needs to be imported.` + ); + } else { + ctx.error( + `\`${imported}\` is a compiler macro and cannot be aliased to a different name.`, + specifier + ); + } + removeSpecifier(i); + } else if (existing) { + if (existing.source === source2 && existing.imported === imported) { + removeSpecifier(i); + } else { + ctx.error( + `different imports aliased to same local name.`, + specifier + ); + } + } else { + registerUserImport( + source2, + local, + imported, + node.importKind === "type" || specifier.type === "ImportSpecifier" && specifier.importKind === "type", + true, + !options.inlineTemplate + ); + } + } + if (node.specifiers.length && removed === node.specifiers.length) { + ctx.s.remove(node.start + startOffset, node.end + startOffset); + } + } + } + const vueImportAliases = {}; + for (const key in ctx.userImports) { + const { source: source2, imported, local } = ctx.userImports[key]; + if (source2 === "vue") vueImportAliases[imported] = local; + } + if (script && scriptAst) { + for (const node of scriptAst.body) { + if (node.type === "ExportDefaultDeclaration") { + defaultExport = node; + let optionProperties; + if (defaultExport.declaration.type === "ObjectExpression") { + optionProperties = defaultExport.declaration.properties; + } else if (defaultExport.declaration.type === "CallExpression" && defaultExport.declaration.arguments[0] && defaultExport.declaration.arguments[0].type === "ObjectExpression") { + optionProperties = defaultExport.declaration.arguments[0].properties; + } + if (optionProperties) { + for (const p of optionProperties) { + if (p.type === "ObjectProperty" && p.key.type === "Identifier" && p.key.name === "name") { + ctx.hasDefaultExportName = true; + } + if ((p.type === "ObjectMethod" || p.type === "ObjectProperty") && p.key.type === "Identifier" && p.key.name === "render") { + ctx.hasDefaultExportRender = true; + } + } + } + const start = node.start + scriptStartOffset; + const end = node.declaration.start + scriptStartOffset; + ctx.s.overwrite(start, end, `const ${normalScriptDefaultVar} = `); + } else if (node.type === "ExportNamedDeclaration") { + const defaultSpecifier = node.specifiers.find( + (s) => s.exported.type === "Identifier" && s.exported.name === "default" + ); + if (defaultSpecifier) { + defaultExport = node; + if (node.specifiers.length > 1) { + ctx.s.remove( + defaultSpecifier.start + scriptStartOffset, + defaultSpecifier.end + scriptStartOffset + ); + } else { + ctx.s.remove( + node.start + scriptStartOffset, + node.end + scriptStartOffset + ); + } + if (node.source) { + ctx.s.prepend( + `import { ${defaultSpecifier.local.name} as ${normalScriptDefaultVar} } from '${node.source.value}' +` + ); + } else { + ctx.s.appendLeft( + scriptEndOffset, + ` +const ${normalScriptDefaultVar} = ${defaultSpecifier.local.name} +` + ); + } + } + if (node.declaration) { + walkDeclaration( + "script", + node.declaration, + scriptBindings, + vueImportAliases, + hoistStatic + ); + } + } else if ((node.type === "VariableDeclaration" || node.type === "FunctionDeclaration" || node.type === "ClassDeclaration" || node.type === "TSEnumDeclaration") && !node.declare) { + walkDeclaration( + "script", + node, + scriptBindings, + vueImportAliases, + hoistStatic + ); + } + } + if (scriptStartOffset > startOffset) { + if (!/\n$/.test(script.content.trim())) { + ctx.s.appendLeft(scriptEndOffset, ` +`); + } + ctx.s.move(scriptStartOffset, scriptEndOffset, 0); + } + } + for (const node of scriptSetupAst.body) { + if (node.type === "ExpressionStatement") { + const expr = unwrapTSNode(node.expression); + if (processDefineProps(ctx, expr) || processDefineEmits(ctx, expr) || processDefineOptions(ctx, expr) || processDefineSlots(ctx, expr)) { + ctx.s.remove(node.start + startOffset, node.end + startOffset); + } else if (processDefineExpose(ctx, expr)) { + const callee = expr.callee; + ctx.s.overwrite( + callee.start + startOffset, + callee.end + startOffset, + "__expose" + ); + } else { + processDefineModel(ctx, expr); + } + } + if (node.type === "VariableDeclaration" && !node.declare) { + const total = node.declarations.length; + let left = total; + let lastNonRemoved; + for (let i = 0; i < total; i++) { + const decl = node.declarations[i]; + const init = decl.init && unwrapTSNode(decl.init); + if (init) { + if (processDefineOptions(ctx, init)) { + ctx.error( + `${DEFINE_OPTIONS}() has no returning value, it cannot be assigned.`, + node + ); + } + const isDefineProps = processDefineProps(ctx, init, decl.id); + if (ctx.propsDestructureRestId) { + setupBindings[ctx.propsDestructureRestId] = "setup-reactive-const"; + } + const isDefineEmits = !isDefineProps && processDefineEmits(ctx, init, decl.id); + !isDefineEmits && (processDefineSlots(ctx, init, decl.id) || processDefineModel(ctx, init, decl.id)); + if (isDefineProps && !ctx.propsDestructureRestId && ctx.propsDestructureDecl) { + if (left === 1) { + ctx.s.remove(node.start + startOffset, node.end + startOffset); + } else { + let start = decl.start + startOffset; + let end = decl.end + startOffset; + if (i === total - 1) { + start = node.declarations[lastNonRemoved].end + startOffset; + } else { + end = node.declarations[i + 1].start + startOffset; + } + ctx.s.remove(start, end); + left--; + } + } else if (isDefineEmits) { + ctx.s.overwrite( + startOffset + init.start, + startOffset + init.end, + "__emit" + ); + } else { + lastNonRemoved = i; + } + } + } + } + let isAllLiteral = false; + if ((node.type === "VariableDeclaration" || node.type === "FunctionDeclaration" || node.type === "ClassDeclaration" || node.type === "TSEnumDeclaration") && !node.declare) { + isAllLiteral = walkDeclaration( + "scriptSetup", + node, + setupBindings, + vueImportAliases, + hoistStatic, + !!ctx.propsDestructureDecl + ); + } + if (hoistStatic && isAllLiteral) { + hoistNode(node); + } + if (node.type === "VariableDeclaration" && !node.declare || node.type.endsWith("Statement")) { + const scope = [scriptSetupAst.body]; + walk$2(node, { + enter(child, parent) { + if (isFunctionType(child)) { + this.skip(); + } + if (child.type === "BlockStatement") { + scope.push(child.body); + } + if (child.type === "AwaitExpression") { + hasAwait = true; + const currentScope = scope[scope.length - 1]; + const needsSemi = currentScope.some((n, i) => { + return (scope.length === 1 || i > 0) && n.type === "ExpressionStatement" && n.start === child.start; + }); + processAwait( + ctx, + child, + needsSemi, + parent.type === "ExpressionStatement" + ); + } + }, + exit(node2) { + if (node2.type === "BlockStatement") scope.pop(); + } + }); + } + if (node.type === "ExportNamedDeclaration" && node.exportKind !== "type" || node.type === "ExportAllDeclaration" || node.type === "ExportDefaultDeclaration") { + ctx.error( + `<script setup> cannot contain ES module exports. If you are using a previous version of <script setup>, please consult the updated RFC at https://github.com/vuejs/rfcs/pull/227.`, + node + ); + } + if (ctx.isTS) { + if (node.type.startsWith("TS") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "VariableDeclaration" && node.declare) { + if (node.type !== "TSEnumDeclaration") { + hoistNode(node); + } + } + } + } + if (ctx.propsDestructureDecl) { + transformDestructuredProps(ctx, vueImportAliases); + } + checkInvalidScopeReference(ctx.propsRuntimeDecl, DEFINE_PROPS); + checkInvalidScopeReference(ctx.propsRuntimeDefaults, DEFINE_PROPS); + checkInvalidScopeReference(ctx.propsDestructureDecl, DEFINE_PROPS); + checkInvalidScopeReference(ctx.emitsRuntimeDecl, DEFINE_EMITS); + checkInvalidScopeReference(ctx.optionsRuntimeDecl, DEFINE_OPTIONS); + for (const { runtimeOptionNodes } of Object.values(ctx.modelDecls)) { + for (const node of runtimeOptionNodes) { + checkInvalidScopeReference(node, DEFINE_MODEL); + } + } + if (script) { + if (startOffset < scriptStartOffset) { + ctx.s.remove(0, startOffset); + ctx.s.remove(endOffset, scriptStartOffset); + ctx.s.remove(scriptEndOffset, source.length); + } else { + ctx.s.remove(0, scriptStartOffset); + ctx.s.remove(scriptEndOffset, startOffset); + ctx.s.remove(endOffset, source.length); + } + } else { + ctx.s.remove(0, startOffset); + ctx.s.remove(endOffset, source.length); + } + if (scriptAst) { + Object.assign(ctx.bindingMetadata, analyzeScriptBindings(scriptAst.body)); + } + for (const [key, { isType, imported, source: source2 }] of Object.entries( + ctx.userImports + )) { + if (isType) continue; + ctx.bindingMetadata[key] = imported === "*" || imported === "default" && source2.endsWith(".vue") || source2 === "vue" ? "setup-const" : "setup-maybe-ref"; + } + for (const key in scriptBindings) { + ctx.bindingMetadata[key] = scriptBindings[key]; + } + for (const key in setupBindings) { + ctx.bindingMetadata[key] = setupBindings[key]; + } + if (sfc.cssVars.length && // no need to do this when targeting SSR + !((_a = options.templateOptions) == null ? void 0 : _a.ssr)) { + ctx.helperImports.add(CSS_VARS_HELPER); + ctx.helperImports.add("unref"); + ctx.s.prependLeft( + startOffset, + ` +${genCssVarsCode( + sfc.cssVars, + ctx.bindingMetadata, + scopeId, + !!options.isProd + )} +` + ); + } + let args = `__props`; + if (ctx.propsTypeDecl) { + args += `: any`; + } + if (ctx.propsDecl) { + if (ctx.propsDestructureRestId) { + ctx.s.overwrite( + startOffset + ctx.propsCall.start, + startOffset + ctx.propsCall.end, + `${ctx.helper(`createPropsRestProxy`)}(__props, ${JSON.stringify( + Object.keys(ctx.propsDestructuredBindings) + )})` + ); + ctx.s.overwrite( + startOffset + ctx.propsDestructureDecl.start, + startOffset + ctx.propsDestructureDecl.end, + ctx.propsDestructureRestId + ); + } else if (!ctx.propsDestructureDecl) { + ctx.s.overwrite( + startOffset + ctx.propsCall.start, + startOffset + ctx.propsCall.end, + "__props" + ); + } + } + if (hasAwait) { + const any = ctx.isTS ? `: any` : ``; + ctx.s.prependLeft(startOffset, ` +let __temp${any}, __restore${any} +`); + } + const destructureElements = ctx.hasDefineExposeCall || !options.inlineTemplate ? [`expose: __expose`] : []; + if (ctx.emitDecl) { + destructureElements.push(`emit: __emit`); + } + if (destructureElements.length) { + args += `, { ${destructureElements.join(", ")} }`; + } + let returned; + if (!options.inlineTemplate || !sfc.template && ctx.hasDefaultExportRender) { + const allBindings = __spreadValues$1(__spreadValues$1({}, scriptBindings), setupBindings); + for (const key in ctx.userImports) { + if (!ctx.userImports[key].isType && ctx.userImports[key].isUsedInTemplate) { + allBindings[key] = true; + } + } + returned = `{ `; + for (const key in allBindings) { + if (allBindings[key] === true && ctx.userImports[key].source !== "vue" && !ctx.userImports[key].source.endsWith(".vue")) { + returned += `get ${key}() { return ${key} }, `; + } else if (ctx.bindingMetadata[key] === "setup-let") { + const setArg = key === "v" ? `_v` : `v`; + returned += `get ${key}() { return ${key} }, set ${key}(${setArg}) { ${key} = ${setArg} }, `; + } else { + returned += `${key}, `; + } + } + returned = returned.replace(/, $/, "") + ` }`; + } else { + if (sfc.template && !sfc.template.src) { + if (options.templateOptions && options.templateOptions.ssr) { + hasInlinedSsrRenderFn = true; + } + const { code, ast, preamble, tips, errors } = compileTemplate(__spreadProps(__spreadValues$1({ + filename, + ast: sfc.template.ast, + source: sfc.template.content, + inMap: sfc.template.map + }, options.templateOptions), { + id: scopeId, + scoped: sfc.styles.some((s) => s.scoped), + isProd: options.isProd, + ssrCssVars: sfc.cssVars, + compilerOptions: __spreadProps(__spreadValues$1({}, options.templateOptions && options.templateOptions.compilerOptions), { + inline: true, + isTS: ctx.isTS, + bindingMetadata: ctx.bindingMetadata + }) + })); + if (tips.length) { + tips.forEach(warnOnce$1); + } + const err = errors[0]; + if (typeof err === "string") { + throw new Error(err); + } else if (err) { + if (err.loc) { + err.message += ` + +` + sfc.filename + "\n" + generateCodeFrame( + source, + err.loc.start.offset, + err.loc.end.offset + ) + ` +`; + } + throw err; + } + if (preamble) { + ctx.s.prepend(preamble); + } + if (ast && ast.helpers.has(UNREF)) { + ctx.helperImports.delete("unref"); + } + returned = code; + } else { + returned = `() => {}`; + } + } + if (!options.inlineTemplate && true) { + ctx.s.appendRight( + endOffset, + ` +const __returned__ = ${returned} +Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true }) +return __returned__ +} + +` + ); + } else { + ctx.s.appendRight(endOffset, ` +return ${returned} +} + +`); + } + const genDefaultAs = options.genDefaultAs ? `const ${options.genDefaultAs} =` : `export default`; + let runtimeOptions = ``; + if (!ctx.hasDefaultExportName && filename && filename !== DEFAULT_FILENAME) { + const match = filename.match(/([^/\\]+)\.\w+$/); + if (match) { + runtimeOptions += ` + __name: '${match[1]}',`; + } + } + if (hasInlinedSsrRenderFn) { + runtimeOptions += ` + __ssrInlineRender: true,`; + } + const propsDecl = genRuntimeProps(ctx); + if (propsDecl) runtimeOptions += ` + props: ${propsDecl},`; + const emitsDecl = genRuntimeEmits(ctx); + if (emitsDecl) runtimeOptions += ` + emits: ${emitsDecl},`; + let definedOptions = ""; + if (ctx.optionsRuntimeDecl) { + definedOptions = scriptSetup.content.slice(ctx.optionsRuntimeDecl.start, ctx.optionsRuntimeDecl.end).trim(); + } + const exposeCall = ctx.hasDefineExposeCall || options.inlineTemplate ? `` : ` __expose(); +`; + if (ctx.isTS) { + const def = (defaultExport ? ` + ...${normalScriptDefaultVar},` : ``) + (definedOptions ? ` + ...${definedOptions},` : ""); + ctx.s.prependLeft( + startOffset, + ` +${genDefaultAs} /*@__PURE__*/${ctx.helper( + `defineComponent` + )}({${def}${runtimeOptions} + ${hasAwait ? `async ` : ``}setup(${args}) { +${exposeCall}` + ); + ctx.s.appendRight(endOffset, `})`); + } else { + if (defaultExport || definedOptions) { + ctx.s.prependLeft( + startOffset, + ` +${genDefaultAs} /*@__PURE__*/Object.assign(${defaultExport ? `${normalScriptDefaultVar}, ` : ""}${definedOptions ? `${definedOptions}, ` : ""}{${runtimeOptions} + ${hasAwait ? `async ` : ``}setup(${args}) { +${exposeCall}` + ); + ctx.s.appendRight(endOffset, `})`); + } else { + ctx.s.prependLeft( + startOffset, + ` +${genDefaultAs} {${runtimeOptions} + ${hasAwait ? `async ` : ``}setup(${args}) { +${exposeCall}` + ); + ctx.s.appendRight(endOffset, `}`); + } + } + if (ctx.helperImports.size > 0) { + const runtimeModuleName = (_c = (_b = options.templateOptions) == null ? void 0 : _b.compilerOptions) == null ? void 0 : _c.runtimeModuleName; + const importSrc = runtimeModuleName ? JSON.stringify(runtimeModuleName) : `'vue'`; + ctx.s.prepend( + `import { ${[...ctx.helperImports].map((h) => `${h} as _${h}`).join(", ")} } from ${importSrc} +` + ); + } + return __spreadProps(__spreadValues$1({}, scriptSetup), { + bindings: ctx.bindingMetadata, + imports: ctx.userImports, + content: ctx.s.toString(), + map: options.sourceMap !== false ? ctx.s.generateMap({ + source: filename, + hires: true, + includeContent: true + }) : void 0, + scriptAst: scriptAst == null ? void 0 : scriptAst.body, + scriptSetupAst: scriptSetupAst == null ? void 0 : scriptSetupAst.body, + deps: ctx.deps ? [...ctx.deps] : void 0 + }); +} +function registerBinding(bindings, node, type) { + bindings[node.name] = type; +} +function walkDeclaration(from, node, bindings, userImportAliases, hoistStatic, isPropsDestructureEnabled = false) { + let isAllLiteral = false; + if (node.type === "VariableDeclaration") { + const isConst = node.kind === "const"; + isAllLiteral = isConst && node.declarations.every( + (decl) => decl.id.type === "Identifier" && isStaticNode(decl.init) + ); + for (const { id, init: _init } of node.declarations) { + const init = _init && unwrapTSNode(_init); + const isConstMacroCall = isConst && isCallOf( + init, + (c) => c === DEFINE_PROPS || c === DEFINE_EMITS || c === WITH_DEFAULTS || c === DEFINE_SLOTS + ); + if (id.type === "Identifier") { + let bindingType; + const userReactiveBinding = userImportAliases["reactive"]; + if ((hoistStatic || from === "script") && (isAllLiteral || isConst && isStaticNode(init))) { + bindingType = "literal-const"; + } else if (isCallOf(init, userReactiveBinding)) { + bindingType = isConst ? "setup-reactive-const" : "setup-let"; + } else if ( + // if a declaration is a const literal, we can mark it so that + // the generated render fn code doesn't need to unref() it + isConstMacroCall || isConst && canNeverBeRef(init, userReactiveBinding) + ) { + bindingType = isCallOf(init, DEFINE_PROPS) ? "setup-reactive-const" : "setup-const"; + } else if (isConst) { + if (isCallOf( + init, + (m) => m === userImportAliases["ref"] || m === userImportAliases["computed"] || m === userImportAliases["shallowRef"] || m === userImportAliases["customRef"] || m === userImportAliases["toRef"] || m === DEFINE_MODEL + )) { + bindingType = "setup-ref"; + } else { + bindingType = "setup-maybe-ref"; + } + } else { + bindingType = "setup-let"; + } + registerBinding(bindings, id, bindingType); + } else { + if (isCallOf(init, DEFINE_PROPS) && isPropsDestructureEnabled) { + continue; + } + if (id.type === "ObjectPattern") { + walkObjectPattern(id, bindings, isConst, isConstMacroCall); + } else if (id.type === "ArrayPattern") { + walkArrayPattern(id, bindings, isConst, isConstMacroCall); + } + } + } + } else if (node.type === "TSEnumDeclaration") { + isAllLiteral = node.members.every( + (member) => !member.initializer || isStaticNode(member.initializer) + ); + bindings[node.id.name] = isAllLiteral ? "literal-const" : "setup-const"; + } else if (node.type === "FunctionDeclaration" || node.type === "ClassDeclaration") { + bindings[node.id.name] = "setup-const"; + } + return isAllLiteral; +} +function walkObjectPattern(node, bindings, isConst, isDefineCall = false) { + for (const p of node.properties) { + if (p.type === "ObjectProperty") { + if (p.key.type === "Identifier" && p.key === p.value) { + const type = isDefineCall ? "setup-const" : isConst ? "setup-maybe-ref" : "setup-let"; + registerBinding(bindings, p.key, type); + } else { + walkPattern(p.value, bindings, isConst, isDefineCall); + } + } else { + const type = isConst ? "setup-const" : "setup-let"; + registerBinding(bindings, p.argument, type); + } + } +} +function walkArrayPattern(node, bindings, isConst, isDefineCall = false) { + for (const e of node.elements) { + e && walkPattern(e, bindings, isConst, isDefineCall); + } +} +function walkPattern(node, bindings, isConst, isDefineCall = false) { + if (node.type === "Identifier") { + const type = isDefineCall ? "setup-const" : isConst ? "setup-maybe-ref" : "setup-let"; + registerBinding(bindings, node, type); + } else if (node.type === "RestElement") { + const type = isConst ? "setup-const" : "setup-let"; + registerBinding(bindings, node.argument, type); + } else if (node.type === "ObjectPattern") { + walkObjectPattern(node, bindings, isConst); + } else if (node.type === "ArrayPattern") { + walkArrayPattern(node, bindings, isConst); + } else if (node.type === "AssignmentPattern") { + if (node.left.type === "Identifier") { + const type = isDefineCall ? "setup-const" : isConst ? "setup-maybe-ref" : "setup-let"; + registerBinding(bindings, node.left, type); + } else { + walkPattern(node.left, bindings, isConst); + } + } +} +function canNeverBeRef(node, userReactiveImport) { + if (isCallOf(node, userReactiveImport)) { + return true; + } + switch (node.type) { + case "UnaryExpression": + case "BinaryExpression": + case "ArrayExpression": + case "ObjectExpression": + case "FunctionExpression": + case "ArrowFunctionExpression": + case "UpdateExpression": + case "ClassExpression": + case "TaggedTemplateExpression": + return true; + case "SequenceExpression": + return canNeverBeRef( + node.expressions[node.expressions.length - 1], + userReactiveImport + ); + default: + if (isLiteralNode(node)) { + return true; + } + return false; + } +} +function isStaticNode(node) { + node = unwrapTSNode(node); + switch (node.type) { + case "UnaryExpression": + return isStaticNode(node.argument); + case "LogicalExpression": + // 1 > 2 + case "BinaryExpression": + return isStaticNode(node.left) && isStaticNode(node.right); + case "ConditionalExpression": { + return isStaticNode(node.test) && isStaticNode(node.consequent) && isStaticNode(node.alternate); + } + case "SequenceExpression": + // (1, 2) + case "TemplateLiteral": + return node.expressions.every((expr) => isStaticNode(expr)); + case "ParenthesizedExpression": + return isStaticNode(node.expression); + case "StringLiteral": + case "NumericLiteral": + case "BooleanLiteral": + case "NullLiteral": + case "BigIntLiteral": + return true; + } + return false; +} + +var __defProp = Object.defineProperty; +var __getOwnPropSymbols = Object.getOwnPropertySymbols; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __propIsEnum = Object.prototype.propertyIsEnumerable; +var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + } + return a; +}; +const version = "3.5.13"; +const parseCache = parseCache$1; +const errorMessages = __spreadValues(__spreadValues({}, errorMessages$1), DOMErrorMessages); +const walk = walk$2; +const shouldTransformRef = () => false; + +var parse$4 = libExports.parse; +export { MagicString, parse$4 as babelParse, compileScript, compileStyle, compileStyleAsync, compileTemplate, errorMessages, extractIdentifiers$1 as extractIdentifiers, extractRuntimeEmits, extractRuntimeProps, generateCodeFrame, inferRuntimeType, invalidateTypeCache, isInDestructureAssignment, isStaticProperty, parse$2 as parse, parseCache, registerTS, resolveTypeElements, rewriteDefault, rewriteDefaultAST, shouldTransformRef, version, walk, walkIdentifiers }; diff --git a/vuetest/node_modules/@vue/compiler-sfc/package.json b/vuetest/node_modules/@vue/compiler-sfc/package.json new file mode 100644 index 0000000..368ea40 --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-sfc/package.json @@ -0,0 +1,67 @@ +{ + "name": "@vue/compiler-sfc", + "version": "3.5.13", + "description": "@vue/compiler-sfc", + "main": "dist/compiler-sfc.cjs.js", + "module": "dist/compiler-sfc.esm-browser.js", + "types": "dist/compiler-sfc.d.ts", + "files": [ + "dist" + ], + "exports": { + ".": { + "types": "./dist/compiler-sfc.d.ts", + "node": "./dist/compiler-sfc.cjs.js", + "module": "./dist/compiler-sfc.esm-browser.js", + "import": "./dist/compiler-sfc.esm-browser.js", + "require": "./dist/compiler-sfc.cjs.js" + }, + "./*": "./*" + }, + "buildOptions": { + "name": "VueCompilerSFC", + "formats": [ + "cjs", + "esm-browser" + ], + "prod": false, + "enableNonBrowserBranches": true + }, + "repository": { + "type": "git", + "url": "git+https://github.com/vuejs/core.git", + "directory": "packages/compiler-sfc" + }, + "keywords": [ + "vue" + ], + "author": "Evan You", + "license": "MIT", + "bugs": { + "url": "https://github.com/vuejs/core/issues" + }, + "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-sfc#readme", + "dependencies": { + "@babel/parser": "^7.25.3", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.11", + "postcss": "^8.4.48", + "source-map-js": "^1.2.0", + "@vue/compiler-core": "3.5.13", + "@vue/shared": "3.5.13", + "@vue/compiler-dom": "3.5.13", + "@vue/compiler-ssr": "3.5.13" + }, + "devDependencies": { + "@babel/types": "^7.25.2", + "@vue/consolidate": "^1.0.0", + "hash-sum": "^2.0.0", + "lru-cache": "10.1.0", + "merge-source-map": "^1.1.0", + "minimatch": "~9.0.5", + "postcss-modules": "^6.0.0", + "postcss-selector-parser": "^7.0.0", + "pug": "^3.0.3", + "sass": "^1.80.6" + } +} \ No newline at end of file diff --git a/vuetest/node_modules/@vue/compiler-ssr/LICENSE b/vuetest/node_modules/@vue/compiler-ssr/LICENSE new file mode 100644 index 0000000..15f1f7e --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-ssr/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018-present, Yuxi (Evan) You + +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. diff --git a/vuetest/node_modules/@vue/compiler-ssr/README.md b/vuetest/node_modules/@vue/compiler-ssr/README.md new file mode 100644 index 0000000..9337906 --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-ssr/README.md @@ -0,0 +1 @@ +# @vue/compiler-ssr diff --git a/vuetest/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js b/vuetest/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js new file mode 100644 index 0000000..241e298 --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js @@ -0,0 +1,1404 @@ +/** +* @vue/compiler-ssr v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var compilerDom = require('@vue/compiler-dom'); +var shared = require('@vue/shared'); + +const SSR_INTERPOLATE = Symbol(`ssrInterpolate`); +const SSR_RENDER_VNODE = Symbol(`ssrRenderVNode`); +const SSR_RENDER_COMPONENT = Symbol(`ssrRenderComponent`); +const SSR_RENDER_SLOT = Symbol(`ssrRenderSlot`); +const SSR_RENDER_SLOT_INNER = Symbol(`ssrRenderSlotInner`); +const SSR_RENDER_CLASS = Symbol(`ssrRenderClass`); +const SSR_RENDER_STYLE = Symbol(`ssrRenderStyle`); +const SSR_RENDER_ATTRS = Symbol(`ssrRenderAttrs`); +const SSR_RENDER_ATTR = Symbol(`ssrRenderAttr`); +const SSR_RENDER_DYNAMIC_ATTR = Symbol(`ssrRenderDynamicAttr`); +const SSR_RENDER_LIST = Symbol(`ssrRenderList`); +const SSR_INCLUDE_BOOLEAN_ATTR = Symbol( + `ssrIncludeBooleanAttr` +); +const SSR_LOOSE_EQUAL = Symbol(`ssrLooseEqual`); +const SSR_LOOSE_CONTAIN = Symbol(`ssrLooseContain`); +const SSR_RENDER_DYNAMIC_MODEL = Symbol( + `ssrRenderDynamicModel` +); +const SSR_GET_DYNAMIC_MODEL_PROPS = Symbol( + `ssrGetDynamicModelProps` +); +const SSR_RENDER_TELEPORT = Symbol(`ssrRenderTeleport`); +const SSR_RENDER_SUSPENSE = Symbol(`ssrRenderSuspense`); +const SSR_GET_DIRECTIVE_PROPS = Symbol(`ssrGetDirectiveProps`); +const ssrHelpers = { + [SSR_INTERPOLATE]: `ssrInterpolate`, + [SSR_RENDER_VNODE]: `ssrRenderVNode`, + [SSR_RENDER_COMPONENT]: `ssrRenderComponent`, + [SSR_RENDER_SLOT]: `ssrRenderSlot`, + [SSR_RENDER_SLOT_INNER]: `ssrRenderSlotInner`, + [SSR_RENDER_CLASS]: `ssrRenderClass`, + [SSR_RENDER_STYLE]: `ssrRenderStyle`, + [SSR_RENDER_ATTRS]: `ssrRenderAttrs`, + [SSR_RENDER_ATTR]: `ssrRenderAttr`, + [SSR_RENDER_DYNAMIC_ATTR]: `ssrRenderDynamicAttr`, + [SSR_RENDER_LIST]: `ssrRenderList`, + [SSR_INCLUDE_BOOLEAN_ATTR]: `ssrIncludeBooleanAttr`, + [SSR_LOOSE_EQUAL]: `ssrLooseEqual`, + [SSR_LOOSE_CONTAIN]: `ssrLooseContain`, + [SSR_RENDER_DYNAMIC_MODEL]: `ssrRenderDynamicModel`, + [SSR_GET_DYNAMIC_MODEL_PROPS]: `ssrGetDynamicModelProps`, + [SSR_RENDER_TELEPORT]: `ssrRenderTeleport`, + [SSR_RENDER_SUSPENSE]: `ssrRenderSuspense`, + [SSR_GET_DIRECTIVE_PROPS]: `ssrGetDirectiveProps` +}; +compilerDom.registerRuntimeHelpers(ssrHelpers); + +const ssrTransformIf = compilerDom.createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + compilerDom.processIf +); +function ssrProcessIf(node, context, disableNestedFragments = false, disableComment = false) { + const [rootBranch] = node.branches; + const ifStatement = compilerDom.createIfStatement( + rootBranch.condition, + processIfBranch(rootBranch, context, disableNestedFragments) + ); + context.pushStatement(ifStatement); + let currentIf = ifStatement; + for (let i = 1; i < node.branches.length; i++) { + const branch = node.branches[i]; + const branchBlockStatement = processIfBranch( + branch, + context, + disableNestedFragments + ); + if (branch.condition) { + currentIf = currentIf.alternate = compilerDom.createIfStatement( + branch.condition, + branchBlockStatement + ); + } else { + currentIf.alternate = branchBlockStatement; + } + } + if (!currentIf.alternate && !disableComment) { + currentIf.alternate = compilerDom.createBlockStatement([ + compilerDom.createCallExpression(`_push`, ["`<!---->`"]) + ]); + } +} +function processIfBranch(branch, context, disableNestedFragments = false) { + const { children } = branch; + const needFragmentWrapper = !disableNestedFragments && (children.length !== 1 || children[0].type !== 1) && // optimize away nested fragments when the only child is a ForNode + !(children.length === 1 && children[0].type === 11); + return processChildrenAsStatement(branch, context, needFragmentWrapper); +} + +const ssrTransformFor = compilerDom.createStructuralDirectiveTransform("for", compilerDom.processFor); +function ssrProcessFor(node, context, disableNestedFragments = false) { + const needFragmentWrapper = !disableNestedFragments && (node.children.length !== 1 || node.children[0].type !== 1); + const renderLoop = compilerDom.createFunctionExpression( + compilerDom.createForLoopParams(node.parseResult) + ); + renderLoop.body = processChildrenAsStatement( + node, + context, + needFragmentWrapper + ); + if (!disableNestedFragments) { + context.pushStringPart(`<!--[-->`); + } + context.pushStatement( + compilerDom.createCallExpression(context.helper(SSR_RENDER_LIST), [ + node.source, + renderLoop + ]) + ); + if (!disableNestedFragments) { + context.pushStringPart(`<!--]-->`); + } +} + +const ssrTransformSlotOutlet = (node, context) => { + if (compilerDom.isSlotOutlet(node)) { + const { slotName, slotProps } = compilerDom.processSlotOutlet(node, context); + const args = [ + `_ctx.$slots`, + slotName, + slotProps || `{}`, + // fallback content placeholder. will be replaced in the process phase + `null`, + `_push`, + `_parent` + ]; + if (context.scopeId && context.slotted !== false) { + args.push(`"${context.scopeId}-s"`); + } + let method = SSR_RENDER_SLOT; + let parent = context.parent; + if (parent) { + const children = parent.children; + if (parent.type === 10) { + parent = context.grandParent; + } + let componentType; + if (parent.type === 1 && parent.tagType === 1 && ((componentType = compilerDom.resolveComponentType(parent, context, true)) === compilerDom.TRANSITION || componentType === compilerDom.TRANSITION_GROUP) && children.filter((c) => c.type === 1).length === 1) { + method = SSR_RENDER_SLOT_INNER; + if (!(context.scopeId && context.slotted !== false)) { + args.push("null"); + } + args.push("true"); + } + } + node.ssrCodegenNode = compilerDom.createCallExpression(context.helper(method), args); + } +}; +function ssrProcessSlotOutlet(node, context) { + const renderCall = node.ssrCodegenNode; + if (node.children.length) { + const fallbackRenderFn = compilerDom.createFunctionExpression([]); + fallbackRenderFn.body = processChildrenAsStatement(node, context); + renderCall.arguments[3] = fallbackRenderFn; + } + if (context.withSlotScopeId) { + const slotScopeId = renderCall.arguments[6]; + renderCall.arguments[6] = slotScopeId ? `${slotScopeId} + _scopeId` : `_scopeId`; + } + context.pushStatement(node.ssrCodegenNode); +} + +function createSSRCompilerError(code, loc) { + return compilerDom.createCompilerError(code, loc, SSRErrorMessages); +} +const SSRErrorMessages = { + [65]: `Unsafe attribute name for SSR.`, + [66]: `Missing the 'to' prop on teleport element.`, + [67]: `Invalid AST node during SSR transform.` +}; + +function ssrProcessTeleport(node, context) { + const targetProp = compilerDom.findProp(node, "to"); + if (!targetProp) { + context.onError( + createSSRCompilerError(66, node.loc) + ); + return; + } + let target; + if (targetProp.type === 6) { + target = targetProp.value && compilerDom.createSimpleExpression(targetProp.value.content, true); + } else { + target = targetProp.exp; + } + if (!target) { + context.onError( + createSSRCompilerError( + 66, + targetProp.loc + ) + ); + return; + } + const disabledProp = compilerDom.findProp( + node, + "disabled", + false, + true + /* allow empty */ + ); + const disabled = disabledProp ? disabledProp.type === 6 ? `true` : disabledProp.exp || `false` : `false`; + const contentRenderFn = compilerDom.createFunctionExpression( + [`_push`], + void 0, + // Body is added later + true, + // newline + false, + // isSlot + node.loc + ); + contentRenderFn.body = processChildrenAsStatement(node, context); + context.pushStatement( + compilerDom.createCallExpression(context.helper(SSR_RENDER_TELEPORT), [ + `_push`, + contentRenderFn, + target, + disabled, + `_parent` + ]) + ); +} + +const wipMap$3 = /* @__PURE__ */ new WeakMap(); +function ssrTransformSuspense(node, context) { + return () => { + if (node.children.length) { + const wipEntry = { + slotsExp: null, + // to be immediately set + wipSlots: [] + }; + wipMap$3.set(node, wipEntry); + wipEntry.slotsExp = compilerDom.buildSlots( + node, + context, + (_props, _vForExp, children, loc) => { + const fn = compilerDom.createFunctionExpression( + [], + void 0, + // no return, assign body later + true, + // newline + false, + // suspense slots are not treated as normal slots + loc + ); + wipEntry.wipSlots.push({ + fn, + children + }); + return fn; + } + ).slots; + } + }; +} +function ssrProcessSuspense(node, context) { + const wipEntry = wipMap$3.get(node); + if (!wipEntry) { + return; + } + const { slotsExp, wipSlots } = wipEntry; + for (let i = 0; i < wipSlots.length; i++) { + const slot = wipSlots[i]; + slot.fn.body = processChildrenAsStatement(slot, context); + } + context.pushStatement( + compilerDom.createCallExpression(context.helper(SSR_RENDER_SUSPENSE), [ + `_push`, + slotsExp + ]) + ); +} + +const rawChildrenMap = /* @__PURE__ */ new WeakMap(); +const ssrTransformElement = (node, context) => { + if (node.type !== 1 || node.tagType !== 0) { + return; + } + return function ssrPostTransformElement() { + const openTag = [`<${node.tag}`]; + const needTagForRuntime = node.tag === "textarea" || node.tag.indexOf("-") > 0; + const hasDynamicVBind = compilerDom.hasDynamicKeyVBind(node); + const hasCustomDir = node.props.some( + (p) => p.type === 7 && !shared.isBuiltInDirective(p.name) + ); + const needMergeProps = hasDynamicVBind || hasCustomDir; + if (needMergeProps) { + const { props, directives } = compilerDom.buildProps( + node, + context, + node.props, + false, + false, + true + ); + if (props || directives.length) { + const mergedProps = buildSSRProps(props, directives, context); + const propsExp = compilerDom.createCallExpression( + context.helper(SSR_RENDER_ATTRS), + [mergedProps] + ); + if (node.tag === "textarea") { + const existingText = node.children[0]; + if (!existingText || existingText.type !== 5) { + const tempId = `_temp${context.temps++}`; + propsExp.arguments = [ + compilerDom.createAssignmentExpression( + compilerDom.createSimpleExpression(tempId, false), + mergedProps + ) + ]; + rawChildrenMap.set( + node, + compilerDom.createCallExpression(context.helper(SSR_INTERPOLATE), [ + compilerDom.createConditionalExpression( + compilerDom.createSimpleExpression(`"value" in ${tempId}`, false), + compilerDom.createSimpleExpression(`${tempId}.value`, false), + compilerDom.createSimpleExpression( + existingText ? existingText.content : ``, + true + ), + false + ) + ]) + ); + } + } else if (node.tag === "input") { + const vModel = findVModel(node); + if (vModel) { + const tempId = `_temp${context.temps++}`; + const tempExp = compilerDom.createSimpleExpression(tempId, false); + propsExp.arguments = [ + compilerDom.createSequenceExpression([ + compilerDom.createAssignmentExpression(tempExp, mergedProps), + compilerDom.createCallExpression(context.helper(compilerDom.MERGE_PROPS), [ + tempExp, + compilerDom.createCallExpression( + context.helper(SSR_GET_DYNAMIC_MODEL_PROPS), + [ + tempExp, + // existing props + vModel.exp + // model + ] + ) + ]) + ]) + ]; + } + } else if (directives.length && !node.children.length) { + const vText = compilerDom.findDir(node, "text"); + if (!vText) { + const tempId = `_temp${context.temps++}`; + propsExp.arguments = [ + compilerDom.createAssignmentExpression( + compilerDom.createSimpleExpression(tempId, false), + mergedProps + ) + ]; + rawChildrenMap.set( + node, + compilerDom.createConditionalExpression( + compilerDom.createSimpleExpression(`"textContent" in ${tempId}`, false), + compilerDom.createCallExpression(context.helper(SSR_INTERPOLATE), [ + compilerDom.createSimpleExpression(`${tempId}.textContent`, false) + ]), + compilerDom.createSimpleExpression(`${tempId}.innerHTML ?? ''`, false), + false + ) + ); + } + } + if (needTagForRuntime) { + propsExp.arguments.push(`"${node.tag}"`); + } + openTag.push(propsExp); + } + } + let dynamicClassBinding = void 0; + let staticClassBinding = void 0; + let dynamicStyleBinding = void 0; + for (let i = 0; i < node.props.length; i++) { + const prop = node.props[i]; + if (node.tag === "input" && isTrueFalseValue(prop)) { + continue; + } + if (prop.type === 7) { + if (prop.name === "html" && prop.exp) { + rawChildrenMap.set( + node, + compilerDom.createCompoundExpression([`(`, prop.exp, `) ?? ''`]) + ); + } else if (prop.name === "text" && prop.exp) { + node.children = [compilerDom.createInterpolation(prop.exp, prop.loc)]; + } else if (prop.name === "slot") { + context.onError( + compilerDom.createCompilerError(40, prop.loc) + ); + } else if (isTextareaWithValue(node, prop) && prop.exp) { + if (!needMergeProps) { + node.children = [compilerDom.createInterpolation(prop.exp, prop.loc)]; + } + } else if (!needMergeProps && prop.name !== "on") { + const directiveTransform = context.directiveTransforms[prop.name]; + if (directiveTransform) { + const { props, ssrTagParts } = directiveTransform( + prop, + node, + context + ); + if (ssrTagParts) { + openTag.push(...ssrTagParts); + } + for (let j = 0; j < props.length; j++) { + const { key, value } = props[j]; + if (compilerDom.isStaticExp(key)) { + let attrName = key.content; + if (attrName === "key" || attrName === "ref") { + continue; + } + if (attrName === "class") { + openTag.push( + ` class="`, + dynamicClassBinding = compilerDom.createCallExpression( + context.helper(SSR_RENDER_CLASS), + [value] + ), + `"` + ); + } else if (attrName === "style") { + if (dynamicStyleBinding) { + mergeCall(dynamicStyleBinding, value); + } else { + openTag.push( + ` style="`, + dynamicStyleBinding = compilerDom.createCallExpression( + context.helper(SSR_RENDER_STYLE), + [value] + ), + `"` + ); + } + } else { + attrName = node.tag.indexOf("-") > 0 ? attrName : shared.propsToAttrMap[attrName] || attrName.toLowerCase(); + if (shared.isBooleanAttr(attrName)) { + openTag.push( + compilerDom.createConditionalExpression( + compilerDom.createCallExpression( + context.helper(SSR_INCLUDE_BOOLEAN_ATTR), + [value] + ), + compilerDom.createSimpleExpression(" " + attrName, true), + compilerDom.createSimpleExpression("", true), + false + ) + ); + } else if (shared.isSSRSafeAttrName(attrName)) { + openTag.push( + compilerDom.createCallExpression(context.helper(SSR_RENDER_ATTR), [ + key, + value + ]) + ); + } else { + context.onError( + createSSRCompilerError( + 65, + key.loc + ) + ); + } + } + } else { + const args = [key, value]; + if (needTagForRuntime) { + args.push(`"${node.tag}"`); + } + openTag.push( + compilerDom.createCallExpression( + context.helper(SSR_RENDER_DYNAMIC_ATTR), + args + ) + ); + } + } + } + } + } else { + const name = prop.name; + if (node.tag === "textarea" && name === "value" && prop.value) { + rawChildrenMap.set(node, shared.escapeHtml(prop.value.content)); + } else if (!needMergeProps) { + if (name === "key" || name === "ref") { + continue; + } + if (name === "class" && prop.value) { + staticClassBinding = JSON.stringify(prop.value.content); + } + openTag.push( + ` ${prop.name}` + (prop.value ? `="${shared.escapeHtml(prop.value.content)}"` : ``) + ); + } + } + } + if (dynamicClassBinding && staticClassBinding) { + mergeCall(dynamicClassBinding, staticClassBinding); + removeStaticBinding(openTag, "class"); + } + if (context.scopeId) { + openTag.push(` ${context.scopeId}`); + } + node.ssrCodegenNode = compilerDom.createTemplateLiteral(openTag); + }; +}; +function buildSSRProps(props, directives, context) { + let mergePropsArgs = []; + if (props) { + if (props.type === 14) { + mergePropsArgs = props.arguments; + } else { + mergePropsArgs.push(props); + } + } + if (directives.length) { + for (const dir of directives) { + mergePropsArgs.push( + compilerDom.createCallExpression(context.helper(SSR_GET_DIRECTIVE_PROPS), [ + `_ctx`, + ...compilerDom.buildDirectiveArgs(dir, context).elements + ]) + ); + } + } + return mergePropsArgs.length > 1 ? compilerDom.createCallExpression(context.helper(compilerDom.MERGE_PROPS), mergePropsArgs) : mergePropsArgs[0]; +} +function isTrueFalseValue(prop) { + if (prop.type === 7) { + return prop.name === "bind" && prop.arg && compilerDom.isStaticExp(prop.arg) && (prop.arg.content === "true-value" || prop.arg.content === "false-value"); + } else { + return prop.name === "true-value" || prop.name === "false-value"; + } +} +function isTextareaWithValue(node, prop) { + return !!(node.tag === "textarea" && prop.name === "bind" && compilerDom.isStaticArgOf(prop.arg, "value")); +} +function mergeCall(call, arg) { + const existing = call.arguments[0]; + if (existing.type === 17) { + existing.elements.push(arg); + } else { + call.arguments[0] = compilerDom.createArrayExpression([existing, arg]); + } +} +function removeStaticBinding(tag, binding) { + const regExp = new RegExp(`^ ${binding}=".+"$`); + const i = tag.findIndex((e) => typeof e === "string" && regExp.test(e)); + if (i > -1) { + tag.splice(i, 1); + } +} +function findVModel(node) { + return node.props.find( + (p) => p.type === 7 && p.name === "model" && p.exp + ); +} +function ssrProcessElement(node, context) { + const isVoidTag = context.options.isVoidTag || shared.NO; + const elementsToAdd = node.ssrCodegenNode.elements; + for (let j = 0; j < elementsToAdd.length; j++) { + context.pushStringPart(elementsToAdd[j]); + } + if (context.withSlotScopeId) { + context.pushStringPart(compilerDom.createSimpleExpression(`_scopeId`, false)); + } + context.pushStringPart(`>`); + const rawChildren = rawChildrenMap.get(node); + if (rawChildren) { + context.pushStringPart(rawChildren); + } else if (node.children.length) { + processChildren(node, context); + } + if (!isVoidTag(node.tag)) { + context.pushStringPart(`</${node.tag}>`); + } +} + +const wipMap$2 = /* @__PURE__ */ new WeakMap(); +function ssrTransformTransitionGroup(node, context) { + return () => { + const tag = compilerDom.findProp(node, "tag"); + if (tag) { + const otherProps = node.props.filter((p) => p !== tag); + const { props, directives } = compilerDom.buildProps( + node, + context, + otherProps, + true, + false, + true + ); + let propsExp = null; + if (props || directives.length) { + propsExp = compilerDom.createCallExpression(context.helper(SSR_RENDER_ATTRS), [ + buildSSRProps(props, directives, context) + ]); + } + wipMap$2.set(node, { + tag, + propsExp, + scopeId: context.scopeId || null + }); + } + }; +} +function ssrProcessTransitionGroup(node, context) { + const entry = wipMap$2.get(node); + if (entry) { + const { tag, propsExp, scopeId } = entry; + if (tag.type === 7) { + context.pushStringPart(`<`); + context.pushStringPart(tag.exp); + if (propsExp) { + context.pushStringPart(propsExp); + } + if (scopeId) { + context.pushStringPart(` ${scopeId}`); + } + context.pushStringPart(`>`); + processChildren( + node, + context, + false, + /** + * TransitionGroup has the special runtime behavior of flattening and + * concatenating all children into a single fragment (in order for them to + * be patched using the same key map) so we need to account for that here + * by disabling nested fragment wrappers from being generated. + */ + true, + /** + * TransitionGroup filters out comment children at runtime and thus + * doesn't expect comments to be present during hydration. We need to + * account for that by disabling the empty comment that is otherwise + * rendered for a falsy v-if that has no v-else specified. (#6715) + */ + true + ); + context.pushStringPart(`</`); + context.pushStringPart(tag.exp); + context.pushStringPart(`>`); + } else { + context.pushStringPart(`<${tag.value.content}`); + if (propsExp) { + context.pushStringPart(propsExp); + } + if (scopeId) { + context.pushStringPart(` ${scopeId}`); + } + context.pushStringPart(`>`); + processChildren(node, context, false, true, true); + context.pushStringPart(`</${tag.value.content}>`); + } + } else { + processChildren(node, context, true, true, true); + } +} + +const wipMap$1 = /* @__PURE__ */ new WeakMap(); +function ssrTransformTransition(node, context) { + return () => { + const appear = compilerDom.findProp(node, "appear", false, true); + wipMap$1.set(node, !!appear); + }; +} +function ssrProcessTransition(node, context) { + node.children = node.children.filter((c) => c.type !== 3); + const appear = wipMap$1.get(node); + if (appear) { + context.pushStringPart(`<template>`); + processChildren(node, context, false, true); + context.pushStringPart(`</template>`); + } else { + processChildren(node, context, false, true); + } +} + +const wipMap = /* @__PURE__ */ new WeakMap(); +const WIP_SLOT = Symbol(); +const componentTypeMap = /* @__PURE__ */ new WeakMap(); +const ssrTransformComponent = (node, context) => { + if (node.type !== 1 || node.tagType !== 1) { + return; + } + const component = compilerDom.resolveComponentType( + node, + context, + true + /* ssr */ + ); + const isDynamicComponent = shared.isObject(component) && component.callee === compilerDom.RESOLVE_DYNAMIC_COMPONENT; + componentTypeMap.set(node, component); + if (shared.isSymbol(component)) { + if (component === compilerDom.SUSPENSE) { + return ssrTransformSuspense(node, context); + } else if (component === compilerDom.TRANSITION_GROUP) { + return ssrTransformTransitionGroup(node, context); + } else if (component === compilerDom.TRANSITION) { + return ssrTransformTransition(node); + } + return; + } + const vnodeBranches = []; + const clonedNode = clone(node); + return function ssrPostTransformComponent() { + if (clonedNode.children.length) { + compilerDom.buildSlots(clonedNode, context, (props, vFor, children) => { + vnodeBranches.push( + createVNodeSlotBranch(props, vFor, children, context) + ); + return compilerDom.createFunctionExpression(void 0); + }); + } + let propsExp = `null`; + if (node.props.length) { + const { props, directives } = compilerDom.buildProps( + node, + context, + void 0, + true, + isDynamicComponent + ); + if (props || directives.length) { + propsExp = buildSSRProps(props, directives, context); + } + } + const wipEntries = []; + wipMap.set(node, wipEntries); + const buildSSRSlotFn = (props, _vForExp, children, loc) => { + const param0 = props && compilerDom.stringifyExpression(props) || `_`; + const fn = compilerDom.createFunctionExpression( + [param0, `_push`, `_parent`, `_scopeId`], + void 0, + // no return, assign body later + true, + // newline + true, + // isSlot + loc + ); + wipEntries.push({ + type: WIP_SLOT, + fn, + children, + // also collect the corresponding vnode branch built earlier + vnodeBranch: vnodeBranches[wipEntries.length] + }); + return fn; + }; + const slots = node.children.length ? compilerDom.buildSlots(node, context, buildSSRSlotFn).slots : `null`; + if (typeof component !== "string") { + node.ssrCodegenNode = compilerDom.createCallExpression( + context.helper(SSR_RENDER_VNODE), + [ + `_push`, + compilerDom.createCallExpression(context.helper(compilerDom.CREATE_VNODE), [ + component, + propsExp, + slots + ]), + `_parent` + ] + ); + } else { + node.ssrCodegenNode = compilerDom.createCallExpression( + context.helper(SSR_RENDER_COMPONENT), + [component, propsExp, slots, `_parent`] + ); + } + }; +}; +function ssrProcessComponent(node, context, parent) { + const component = componentTypeMap.get(node); + if (!node.ssrCodegenNode) { + if (component === compilerDom.TELEPORT) { + return ssrProcessTeleport(node, context); + } else if (component === compilerDom.SUSPENSE) { + return ssrProcessSuspense(node, context); + } else if (component === compilerDom.TRANSITION_GROUP) { + return ssrProcessTransitionGroup(node, context); + } else { + if (parent.type === WIP_SLOT) { + context.pushStringPart(``); + } + if (component === compilerDom.TRANSITION) { + return ssrProcessTransition(node, context); + } + processChildren(node, context); + } + } else { + const wipEntries = wipMap.get(node) || []; + for (let i = 0; i < wipEntries.length; i++) { + const { fn, vnodeBranch } = wipEntries[i]; + fn.body = compilerDom.createIfStatement( + compilerDom.createSimpleExpression(`_push`, false), + processChildrenAsStatement( + wipEntries[i], + context, + false, + true + ), + vnodeBranch + ); + } + if (context.withSlotScopeId) { + node.ssrCodegenNode.arguments.push(`_scopeId`); + } + if (typeof component === "string") { + context.pushStatement( + compilerDom.createCallExpression(`_push`, [node.ssrCodegenNode]) + ); + } else { + context.pushStatement(node.ssrCodegenNode); + } + } +} +const rawOptionsMap = /* @__PURE__ */ new WeakMap(); +const [baseNodeTransforms, baseDirectiveTransforms] = compilerDom.getBaseTransformPreset(true); +const vnodeNodeTransforms = [...baseNodeTransforms, ...compilerDom.DOMNodeTransforms]; +const vnodeDirectiveTransforms = { + ...baseDirectiveTransforms, + ...compilerDom.DOMDirectiveTransforms +}; +function createVNodeSlotBranch(slotProps, vFor, children, parentContext) { + const rawOptions = rawOptionsMap.get(parentContext.root); + const subOptions = { + ...rawOptions, + // overwrite with vnode-based transforms + nodeTransforms: [ + ...vnodeNodeTransforms, + ...rawOptions.nodeTransforms || [] + ], + directiveTransforms: { + ...vnodeDirectiveTransforms, + ...rawOptions.directiveTransforms || {} + } + }; + const wrapperProps = []; + if (slotProps) { + wrapperProps.push({ + type: 7, + name: "slot", + exp: slotProps, + arg: void 0, + modifiers: [], + loc: compilerDom.locStub + }); + } + if (vFor) { + wrapperProps.push(shared.extend({}, vFor)); + } + const wrapperNode = { + type: 1, + ns: 0, + tag: "template", + tagType: 3, + props: wrapperProps, + children, + loc: compilerDom.locStub, + codegenNode: void 0 + }; + subTransform(wrapperNode, subOptions, parentContext); + return compilerDom.createReturnStatement(children); +} +function subTransform(node, options, parentContext) { + const childRoot = compilerDom.createRoot([node]); + const childContext = compilerDom.createTransformContext(childRoot, options); + childContext.ssr = false; + childContext.scopes = { ...parentContext.scopes }; + childContext.identifiers = { ...parentContext.identifiers }; + childContext.imports = parentContext.imports; + compilerDom.traverseNode(childRoot, childContext); + ["helpers", "components", "directives"].forEach((key) => { + childContext[key].forEach((value, helperKey) => { + if (key === "helpers") { + const parentCount = parentContext.helpers.get(helperKey); + if (parentCount === void 0) { + parentContext.helpers.set(helperKey, value); + } else { + parentContext.helpers.set(helperKey, value + parentCount); + } + } else { + parentContext[key].add(value); + } + }); + }); +} +function clone(v) { + if (shared.isArray(v)) { + return v.map(clone); + } else if (shared.isPlainObject(v)) { + const res = {}; + for (const key in v) { + res[key] = clone(v[key]); + } + return res; + } else { + return v; + } +} + +function ssrCodegenTransform(ast, options) { + const context = createSSRTransformContext(ast, options); + if (options.ssrCssVars) { + const cssContext = compilerDom.createTransformContext(compilerDom.createRoot([]), options); + const varsExp = compilerDom.processExpression( + compilerDom.createSimpleExpression(options.ssrCssVars, false), + cssContext + ); + context.body.push( + compilerDom.createCompoundExpression([`const _cssVars = { style: `, varsExp, `}`]) + ); + Array.from(cssContext.helpers.keys()).forEach((helper) => { + ast.helpers.add(helper); + }); + } + const isFragment = ast.children.length > 1 && ast.children.some((c) => !compilerDom.isText(c)); + processChildren(ast, context, isFragment); + ast.codegenNode = compilerDom.createBlockStatement(context.body); + ast.ssrHelpers = Array.from( + /* @__PURE__ */ new Set([ + ...Array.from(ast.helpers).filter((h) => h in ssrHelpers), + ...context.helpers + ]) + ); + ast.helpers = new Set(Array.from(ast.helpers).filter((h) => !(h in ssrHelpers))); +} +function createSSRTransformContext(root, options, helpers = /* @__PURE__ */ new Set(), withSlotScopeId = false) { + const body = []; + let currentString = null; + return { + root, + options, + body, + helpers, + withSlotScopeId, + onError: options.onError || ((e) => { + throw e; + }), + helper(name) { + helpers.add(name); + return name; + }, + pushStringPart(part) { + if (!currentString) { + const currentCall = compilerDom.createCallExpression(`_push`); + body.push(currentCall); + currentString = compilerDom.createTemplateLiteral([]); + currentCall.arguments.push(currentString); + } + const bufferedElements = currentString.elements; + const lastItem = bufferedElements[bufferedElements.length - 1]; + if (shared.isString(part) && shared.isString(lastItem)) { + bufferedElements[bufferedElements.length - 1] += part; + } else { + bufferedElements.push(part); + } + }, + pushStatement(statement) { + currentString = null; + body.push(statement); + } + }; +} +function createChildContext(parent, withSlotScopeId = parent.withSlotScopeId) { + return createSSRTransformContext( + parent.root, + parent.options, + parent.helpers, + withSlotScopeId + ); +} +function processChildren(parent, context, asFragment = false, disableNestedFragments = false, disableComment = false) { + if (asFragment) { + context.pushStringPart(`<!--[-->`); + } + const { children } = parent; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + switch (child.tagType) { + case 0: + ssrProcessElement(child, context); + break; + case 1: + ssrProcessComponent(child, context, parent); + break; + case 2: + ssrProcessSlotOutlet(child, context); + break; + case 3: + break; + default: + context.onError( + createSSRCompilerError( + 67, + child.loc + ) + ); + const exhaustiveCheck2 = child; + return exhaustiveCheck2; + } + break; + case 2: + context.pushStringPart(shared.escapeHtml(child.content)); + break; + case 3: + if (!disableComment) { + context.pushStringPart(`<!--${child.content}-->`); + } + break; + case 5: + context.pushStringPart( + compilerDom.createCallExpression(context.helper(SSR_INTERPOLATE), [ + child.content + ]) + ); + break; + case 9: + ssrProcessIf(child, context, disableNestedFragments, disableComment); + break; + case 11: + ssrProcessFor(child, context, disableNestedFragments); + break; + case 10: + break; + case 12: + case 8: + break; + default: + context.onError( + createSSRCompilerError( + 67, + child.loc + ) + ); + const exhaustiveCheck = child; + return exhaustiveCheck; + } + } + if (asFragment) { + context.pushStringPart(`<!--]-->`); + } +} +function processChildrenAsStatement(parent, parentContext, asFragment = false, withSlotScopeId = parentContext.withSlotScopeId) { + const childContext = createChildContext(parentContext, withSlotScopeId); + processChildren(parent, childContext, asFragment); + return compilerDom.createBlockStatement(childContext.body); +} + +const ssrTransformModel = (dir, node, context) => { + const model = dir.exp; + function checkDuplicatedValue() { + const value = compilerDom.findProp(node, "value"); + if (value) { + context.onError( + compilerDom.createDOMCompilerError( + 60, + value.loc + ) + ); + } + } + function processOption(plainNode) { + if (plainNode.tag === "option") { + if (plainNode.props.findIndex((p) => p.name === "selected") === -1) { + const value = findValueBinding(plainNode); + plainNode.ssrCodegenNode.elements.push( + compilerDom.createConditionalExpression( + compilerDom.createCallExpression(context.helper(SSR_INCLUDE_BOOLEAN_ATTR), [ + compilerDom.createConditionalExpression( + compilerDom.createCallExpression(`Array.isArray`, [model]), + compilerDom.createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [ + model, + value + ]), + compilerDom.createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ + model, + value + ]) + ) + ]), + compilerDom.createSimpleExpression(" selected", true), + compilerDom.createSimpleExpression("", true), + false + ) + ); + } + } else if (plainNode.tag === "optgroup") { + plainNode.children.forEach( + (option) => processOption(option) + ); + } + } + if (node.tagType === 0) { + const res = { props: [] }; + const defaultProps = [ + // default value binding for text type inputs + compilerDom.createObjectProperty(`value`, model) + ]; + if (node.tag === "input") { + const type = compilerDom.findProp(node, "type"); + if (type) { + const value = findValueBinding(node); + if (type.type === 7) { + res.ssrTagParts = [ + compilerDom.createCallExpression(context.helper(SSR_RENDER_DYNAMIC_MODEL), [ + type.exp, + model, + value + ]) + ]; + } else if (type.value) { + switch (type.value.content) { + case "radio": + res.props = [ + compilerDom.createObjectProperty( + `checked`, + compilerDom.createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ + model, + value + ]) + ) + ]; + break; + case "checkbox": + const trueValueBinding = compilerDom.findProp(node, "true-value"); + if (trueValueBinding) { + const trueValue = trueValueBinding.type === 6 ? JSON.stringify(trueValueBinding.value.content) : trueValueBinding.exp; + res.props = [ + compilerDom.createObjectProperty( + `checked`, + compilerDom.createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ + model, + trueValue + ]) + ) + ]; + } else { + res.props = [ + compilerDom.createObjectProperty( + `checked`, + compilerDom.createConditionalExpression( + compilerDom.createCallExpression(`Array.isArray`, [model]), + compilerDom.createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [ + model, + value + ]), + model + ) + ) + ]; + } + break; + case "file": + context.onError( + compilerDom.createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + default: + checkDuplicatedValue(); + res.props = defaultProps; + break; + } + } + } else if (compilerDom.hasDynamicKeyVBind(node)) ; else { + checkDuplicatedValue(); + res.props = defaultProps; + } + } else if (node.tag === "textarea") { + checkDuplicatedValue(); + node.children = [compilerDom.createInterpolation(model, model.loc)]; + } else if (node.tag === "select") { + const processChildren = (children) => { + children.forEach((child) => { + if (child.type === 1) { + processOption(child); + } else if (child.type === 11) { + processChildren(child.children); + } else if (child.type === 9) { + child.branches.forEach((b) => processChildren(b.children)); + } + }); + }; + processChildren(node.children); + } else { + context.onError( + compilerDom.createDOMCompilerError( + 57, + dir.loc + ) + ); + } + return res; + } else { + return compilerDom.transformModel(dir, node, context); + } +}; +function findValueBinding(node) { + const valueBinding = compilerDom.findProp(node, "value"); + return valueBinding ? valueBinding.type === 7 ? valueBinding.exp : compilerDom.createSimpleExpression(valueBinding.value.content, true) : compilerDom.createSimpleExpression(`null`, false); +} + +const ssrTransformShow = (dir, node, context) => { + if (!dir.exp) { + context.onError( + compilerDom.createDOMCompilerError(61) + ); + } + return { + props: [ + compilerDom.createObjectProperty( + `style`, + compilerDom.createConditionalExpression( + dir.exp, + compilerDom.createSimpleExpression(`null`, false), + compilerDom.createObjectExpression([ + compilerDom.createObjectProperty( + `display`, + compilerDom.createSimpleExpression(`none`, true) + ) + ]), + false + ) + ) + ] + }; +}; + +const filterChild = (node) => node.children.filter((n) => n.type !== 3); +const hasSingleChild = (node) => filterChild(node).length === 1; +const ssrInjectFallthroughAttrs = (node, context) => { + if (node.type === 0) { + context.identifiers._attrs = 1; + } + if (node.type === 1 && node.tagType === 1 && (node.tag === "transition" || node.tag === "Transition" || node.tag === "KeepAlive" || node.tag === "keep-alive")) { + const rootChildren = filterChild(context.root); + if (rootChildren.length === 1 && rootChildren[0] === node) { + if (hasSingleChild(node)) { + injectFallthroughAttrs(node.children[0]); + } + return; + } + } + const parent = context.parent; + if (!parent || parent.type !== 0) { + return; + } + if (node.type === 10 && hasSingleChild(node)) { + let hasEncounteredIf = false; + for (const c of filterChild(parent)) { + if (c.type === 9 || c.type === 1 && compilerDom.findDir(c, "if")) { + if (hasEncounteredIf) return; + hasEncounteredIf = true; + } else if ( + // node before v-if + !hasEncounteredIf || // non else nodes + !(c.type === 1 && compilerDom.findDir(c, /else/, true)) + ) { + return; + } + } + injectFallthroughAttrs(node.children[0]); + } else if (hasSingleChild(parent)) { + injectFallthroughAttrs(node); + } +}; +function injectFallthroughAttrs(node) { + if (node.type === 1 && (node.tagType === 0 || node.tagType === 1) && !compilerDom.findDir(node, "for")) { + node.props.push({ + type: 7, + name: "bind", + arg: void 0, + exp: compilerDom.createSimpleExpression(`_attrs`, false), + modifiers: [], + loc: compilerDom.locStub + }); + } +} + +const ssrInjectCssVars = (node, context) => { + if (!context.ssrCssVars) { + return; + } + if (node.type === 0) { + context.identifiers._cssVars = 1; + } + const parent = context.parent; + if (!parent || parent.type !== 0) { + return; + } + if (node.type === 10) { + for (const child of node.children) { + injectCssVars(child); + } + } else { + injectCssVars(node); + } +}; +function injectCssVars(node) { + if (node.type === 1 && (node.tagType === 0 || node.tagType === 1) && !compilerDom.findDir(node, "for")) { + if (node.tag === "suspense" || node.tag === "Suspense") { + for (const child of node.children) { + if (child.type === 1 && child.tagType === 3) { + child.children.forEach(injectCssVars); + } else { + injectCssVars(child); + } + } + } else { + node.props.push({ + type: 7, + name: "bind", + arg: void 0, + exp: compilerDom.createSimpleExpression(`_cssVars`, false), + modifiers: [], + loc: compilerDom.locStub + }); + } + } +} + +function compile(source, options = {}) { + options = { + ...options, + ...compilerDom.parserOptions, + ssr: true, + inSSR: true, + scopeId: options.mode === "function" ? null : options.scopeId, + // always prefix since compiler-ssr doesn't have size concern + prefixIdentifiers: true, + // disable optimizations that are unnecessary for ssr + cacheHandlers: false, + hoistStatic: false + }; + const ast = typeof source === "string" ? compilerDom.baseParse(source, options) : source; + rawOptionsMap.set(ast, options); + compilerDom.transform(ast, { + ...options, + hoistStatic: false, + nodeTransforms: [ + ssrTransformIf, + ssrTransformFor, + compilerDom.trackVForSlotScopes, + compilerDom.transformExpression, + ssrTransformSlotOutlet, + ssrInjectFallthroughAttrs, + ssrInjectCssVars, + ssrTransformElement, + ssrTransformComponent, + compilerDom.trackSlotScopes, + compilerDom.transformStyle, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: { + // reusing core v-bind + bind: compilerDom.transformBind, + on: compilerDom.transformOn, + // model and show have dedicated SSR handling + model: ssrTransformModel, + show: ssrTransformShow, + // the following are ignored during SSR + // on: noopDirectiveTransform, + cloak: compilerDom.noopDirectiveTransform, + once: compilerDom.noopDirectiveTransform, + memo: compilerDom.noopDirectiveTransform, + ...options.directiveTransforms || {} + // user transforms + } + }); + ssrCodegenTransform(ast, options); + return compilerDom.generate(ast, options); +} + +exports.compile = compile; diff --git a/vuetest/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts b/vuetest/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts new file mode 100644 index 0000000..60dfb21 --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts @@ -0,0 +1,4 @@ +import { RootNode, CompilerOptions, CodegenResult } from '@vue/compiler-dom'; + +export declare function compile(source: string | RootNode, options?: CompilerOptions): CodegenResult; + diff --git a/vuetest/node_modules/@vue/compiler-ssr/package.json b/vuetest/node_modules/@vue/compiler-ssr/package.json new file mode 100644 index 0000000..0313249 --- /dev/null +++ b/vuetest/node_modules/@vue/compiler-ssr/package.json @@ -0,0 +1,34 @@ +{ + "name": "@vue/compiler-ssr", + "version": "3.5.13", + "description": "@vue/compiler-ssr", + "main": "dist/compiler-ssr.cjs.js", + "types": "dist/compiler-ssr.d.ts", + "files": [ + "dist" + ], + "buildOptions": { + "prod": false, + "formats": [ + "cjs" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/vuejs/core.git", + "directory": "packages/compiler-ssr" + }, + "keywords": [ + "vue" + ], + "author": "Evan You", + "license": "MIT", + "bugs": { + "url": "https://github.com/vuejs/core/issues" + }, + "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-ssr#readme", + "dependencies": { + "@vue/shared": "3.5.13", + "@vue/compiler-dom": "3.5.13" + } +} \ No newline at end of file diff --git a/vuetest/node_modules/@vue/reactivity/LICENSE b/vuetest/node_modules/@vue/reactivity/LICENSE new file mode 100644 index 0000000..15f1f7e --- /dev/null +++ b/vuetest/node_modules/@vue/reactivity/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018-present, Yuxi (Evan) You + +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. diff --git a/vuetest/node_modules/@vue/reactivity/README.md b/vuetest/node_modules/@vue/reactivity/README.md new file mode 100644 index 0000000..e478074 --- /dev/null +++ b/vuetest/node_modules/@vue/reactivity/README.md @@ -0,0 +1,19 @@ +# @vue/reactivity + +## Usage Note + +This package is inlined into Global & Browser ESM builds of user-facing renderers (e.g. `@vue/runtime-dom`), but also published as a package that can be used standalone. The standalone build should not be used alongside a pre-bundled build of a user-facing renderer, as they will have different internal storage for reactivity connections. A user-facing renderer should re-export all APIs from this package. + +For full exposed APIs, see `src/index.ts`. + +## Credits + +The implementation of this module is inspired by the following prior art in the JavaScript ecosystem: + +- [Meteor Tracker](https://docs.meteor.com/api/tracker.html) +- [nx-js/observer-util](https://github.com/nx-js/observer-util) +- [salesforce/observable-membrane](https://github.com/salesforce/observable-membrane) + +## Caveats + +- Built-in objects are not observed except for `Array`, `Map`, `WeakMap`, `Set` and `WeakSet`. diff --git a/vuetest/node_modules/@vue/reactivity/dist/reactivity.cjs.js b/vuetest/node_modules/@vue/reactivity/dist/reactivity.cjs.js new file mode 100644 index 0000000..a547a2a --- /dev/null +++ b/vuetest/node_modules/@vue/reactivity/dist/reactivity.cjs.js @@ -0,0 +1,1939 @@ +/** +* @vue/reactivity v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var shared = require('@vue/shared'); + +function warn(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); +} + +let activeEffectScope; +class EffectScope { + constructor(detached = false) { + this.detached = detached; + /** + * @internal + */ + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this._isPaused = false; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + pause() { + if (this._active) { + this._isPaused = true; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].pause(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].pause(); + } + } + } + /** + * Resumes the effect scope, including all child scopes and effects. + */ + resume() { + if (this._active) { + if (this._isPaused) { + this._isPaused = false; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].resume(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].resume(); + } + } + } + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { + activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn(`cannot run an inactive effect scope.`); + } + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + this._active = false; + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + this.effects.length = 0; + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + this.cleanups.length = 0; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); + } + this.scopes.length = 0; + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + } + } +} +function effectScope(detached) { + return new EffectScope(detached); +} +function getCurrentScope() { + return activeEffectScope; +} +function onScopeDispose(fn, failSilently = false) { + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else if (!failSilently) { + warn( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } +} + +let activeSub; +const EffectFlags = { + "ACTIVE": 1, + "1": "ACTIVE", + "RUNNING": 2, + "2": "RUNNING", + "TRACKING": 4, + "4": "TRACKING", + "NOTIFIED": 8, + "8": "NOTIFIED", + "DIRTY": 16, + "16": "DIRTY", + "ALLOW_RECURSE": 32, + "32": "ALLOW_RECURSE", + "PAUSED": 64, + "64": "PAUSED" +}; +const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); +class ReactiveEffect { + constructor(fn) { + this.fn = fn; + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 1 | 4; + /** + * @internal + */ + this.next = void 0; + /** + * @internal + */ + this.cleanup = void 0; + this.scheduler = void 0; + if (activeEffectScope && activeEffectScope.active) { + activeEffectScope.effects.push(this); + } + } + pause() { + this.flags |= 64; + } + resume() { + if (this.flags & 64) { + this.flags &= ~64; + if (pausedQueueEffects.has(this)) { + pausedQueueEffects.delete(this); + this.trigger(); + } + } + } + /** + * @internal + */ + notify() { + if (this.flags & 2 && !(this.flags & 32)) { + return; + } + if (!(this.flags & 8)) { + batch(this); + } + } + run() { + if (!(this.flags & 1)) { + return this.fn(); + } + this.flags |= 2; + cleanupEffect(this); + prepareDeps(this); + const prevEffect = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = this; + shouldTrack = true; + try { + return this.fn(); + } finally { + if (activeSub !== this) { + warn( + "Active effect was not restored correctly - this is likely a Vue internal bug." + ); + } + cleanupDeps(this); + activeSub = prevEffect; + shouldTrack = prevShouldTrack; + this.flags &= ~2; + } + } + stop() { + if (this.flags & 1) { + for (let link = this.deps; link; link = link.nextDep) { + removeSub(link); + } + this.deps = this.depsTail = void 0; + cleanupEffect(this); + this.onStop && this.onStop(); + this.flags &= ~1; + } + } + trigger() { + if (this.flags & 64) { + pausedQueueEffects.add(this); + } else if (this.scheduler) { + this.scheduler(); + } else { + this.runIfDirty(); + } + } + /** + * @internal + */ + runIfDirty() { + if (isDirty(this)) { + this.run(); + } + } + get dirty() { + return isDirty(this); + } +} +let batchDepth = 0; +let batchedSub; +let batchedComputed; +function batch(sub, isComputed = false) { + sub.flags |= 8; + if (isComputed) { + sub.next = batchedComputed; + batchedComputed = sub; + return; + } + sub.next = batchedSub; + batchedSub = sub; +} +function startBatch() { + batchDepth++; +} +function endBatch() { + if (--batchDepth > 0) { + return; + } + if (batchedComputed) { + let e = batchedComputed; + batchedComputed = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + e = next; + } + } + let error; + while (batchedSub) { + let e = batchedSub; + batchedSub = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + if (e.flags & 1) { + try { + ; + e.trigger(); + } catch (err) { + if (!error) error = err; + } + } + e = next; + } + } + if (error) throw error; +} +function prepareDeps(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + link.version = -1; + link.prevActiveLink = link.dep.activeLink; + link.dep.activeLink = link; + } +} +function cleanupDeps(sub) { + let head; + let tail = sub.depsTail; + let link = tail; + while (link) { + const prev = link.prevDep; + if (link.version === -1) { + if (link === tail) tail = prev; + removeSub(link); + removeDep(link); + } else { + head = link; + } + link.dep.activeLink = link.prevActiveLink; + link.prevActiveLink = void 0; + link = prev; + } + sub.deps = head; + sub.depsTail = tail; +} +function isDirty(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { + return true; + } + } + if (sub._dirty) { + return true; + } + return false; +} +function refreshComputed(computed) { + if (computed.flags & 4 && !(computed.flags & 16)) { + return; + } + computed.flags &= ~16; + if (computed.globalVersion === globalVersion) { + return; + } + computed.globalVersion = globalVersion; + const dep = computed.dep; + computed.flags |= 2; + if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { + computed.flags &= ~2; + return; + } + const prevSub = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = computed; + shouldTrack = true; + try { + prepareDeps(computed); + const value = computed.fn(computed._value); + if (dep.version === 0 || shared.hasChanged(value, computed._value)) { + computed._value = value; + dep.version++; + } + } catch (err) { + dep.version++; + throw err; + } finally { + activeSub = prevSub; + shouldTrack = prevShouldTrack; + cleanupDeps(computed); + computed.flags &= ~2; + } +} +function removeSub(link, soft = false) { + const { dep, prevSub, nextSub } = link; + if (prevSub) { + prevSub.nextSub = nextSub; + link.prevSub = void 0; + } + if (nextSub) { + nextSub.prevSub = prevSub; + link.nextSub = void 0; + } + if (dep.subsHead === link) { + dep.subsHead = nextSub; + } + if (dep.subs === link) { + dep.subs = prevSub; + if (!prevSub && dep.computed) { + dep.computed.flags &= ~4; + for (let l = dep.computed.deps; l; l = l.nextDep) { + removeSub(l, true); + } + } + } + if (!soft && !--dep.sc && dep.map) { + dep.map.delete(dep.key); + } +} +function removeDep(link) { + const { prevDep, nextDep } = link; + if (prevDep) { + prevDep.nextDep = nextDep; + link.prevDep = void 0; + } + if (nextDep) { + nextDep.prevDep = prevDep; + link.nextDep = void 0; + } +} +function effect(fn, options) { + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const e = new ReactiveEffect(fn); + if (options) { + shared.extend(e, options); + } + try { + e.run(); + } catch (err) { + e.stop(); + throw err; + } + const runner = e.run.bind(e); + runner.effect = e; + return runner; +} +function stop(runner) { + runner.effect.stop(); +} +let shouldTrack = true; +const trackStack = []; +function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; +} +function enableTracking() { + trackStack.push(shouldTrack); + shouldTrack = true; +} +function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; +} +function onEffectCleanup(fn, failSilently = false) { + if (activeSub instanceof ReactiveEffect) { + activeSub.cleanup = fn; + } else if (!failSilently) { + warn( + `onEffectCleanup() was called when there was no active effect to associate with.` + ); + } +} +function cleanupEffect(e) { + const { cleanup } = e; + e.cleanup = void 0; + if (cleanup) { + const prevSub = activeSub; + activeSub = void 0; + try { + cleanup(); + } finally { + activeSub = prevSub; + } + } +} + +let globalVersion = 0; +class Link { + constructor(sub, dep) { + this.sub = sub; + this.dep = dep; + this.version = dep.version; + this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; + } +} +class Dep { + constructor(computed) { + this.computed = computed; + this.version = 0; + /** + * Link between this dep and the current active effect + */ + this.activeLink = void 0; + /** + * Doubly linked list representing the subscribing effects (tail) + */ + this.subs = void 0; + /** + * For object property deps cleanup + */ + this.map = void 0; + this.key = void 0; + /** + * Subscriber counter + */ + this.sc = 0; + { + this.subsHead = void 0; + } + } + track(debugInfo) { + if (!activeSub || !shouldTrack || activeSub === this.computed) { + return; + } + let link = this.activeLink; + if (link === void 0 || link.sub !== activeSub) { + link = this.activeLink = new Link(activeSub, this); + if (!activeSub.deps) { + activeSub.deps = activeSub.depsTail = link; + } else { + link.prevDep = activeSub.depsTail; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + } + addSub(link); + } else if (link.version === -1) { + link.version = this.version; + if (link.nextDep) { + const next = link.nextDep; + next.prevDep = link.prevDep; + if (link.prevDep) { + link.prevDep.nextDep = next; + } + link.prevDep = activeSub.depsTail; + link.nextDep = void 0; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + if (activeSub.deps === link) { + activeSub.deps = next; + } + } + } + if (activeSub.onTrack) { + activeSub.onTrack( + shared.extend( + { + effect: activeSub + }, + debugInfo + ) + ); + } + return link; + } + trigger(debugInfo) { + this.version++; + globalVersion++; + this.notify(debugInfo); + } + notify(debugInfo) { + startBatch(); + try { + if (true) { + for (let head = this.subsHead; head; head = head.nextSub) { + if (head.sub.onTrigger && !(head.sub.flags & 8)) { + head.sub.onTrigger( + shared.extend( + { + effect: head.sub + }, + debugInfo + ) + ); + } + } + } + for (let link = this.subs; link; link = link.prevSub) { + if (link.sub.notify()) { + ; + link.sub.dep.notify(); + } + } + } finally { + endBatch(); + } + } +} +function addSub(link) { + link.dep.sc++; + if (link.sub.flags & 4) { + const computed = link.dep.computed; + if (computed && !link.dep.subs) { + computed.flags |= 4 | 16; + for (let l = computed.deps; l; l = l.nextDep) { + addSub(l); + } + } + const currentTail = link.dep.subs; + if (currentTail !== link) { + link.prevSub = currentTail; + if (currentTail) currentTail.nextSub = link; + } + if (link.dep.subsHead === void 0) { + link.dep.subsHead = link; + } + link.dep.subs = link; + } +} +const targetMap = /* @__PURE__ */ new WeakMap(); +const ITERATE_KEY = Symbol( + "Object iterate" +); +const MAP_KEY_ITERATE_KEY = Symbol( + "Map keys iterate" +); +const ARRAY_ITERATE_KEY = Symbol( + "Array iterate" +); +function track(target, type, key) { + if (shouldTrack && activeSub) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = new Dep()); + dep.map = depsMap; + dep.key = key; + } + { + dep.track({ + target, + type, + key + }); + } + } +} +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + globalVersion++; + return; + } + const run = (dep) => { + if (dep) { + { + dep.trigger({ + target, + type, + key, + newValue, + oldValue, + oldTarget + }); + } + } + }; + startBatch(); + if (type === "clear") { + depsMap.forEach(run); + } else { + const targetIsArray = shared.isArray(target); + const isArrayIndex = targetIsArray && shared.isIntegerKey(key); + if (targetIsArray && key === "length") { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !shared.isSymbol(key2) && key2 >= newLength) { + run(dep); + } + }); + } else { + if (key !== void 0 || depsMap.has(void 0)) { + run(depsMap.get(key)); + } + if (isArrayIndex) { + run(depsMap.get(ARRAY_ITERATE_KEY)); + } + switch (type) { + case "add": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (shared.isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isArrayIndex) { + run(depsMap.get("length")); + } + break; + case "delete": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (shared.isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (shared.isMap(target)) { + run(depsMap.get(ITERATE_KEY)); + } + break; + } + } + } + endBatch(); +} +function getDepFromReactive(object, key) { + const depMap = targetMap.get(object); + return depMap && depMap.get(key); +} + +function reactiveReadArray(array) { + const raw = toRaw(array); + if (raw === array) return raw; + track(raw, "iterate", ARRAY_ITERATE_KEY); + return isShallow(array) ? raw : raw.map(toReactive); +} +function shallowReadArray(arr) { + track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); + return arr; +} +const arrayInstrumentations = { + __proto__: null, + [Symbol.iterator]() { + return iterator(this, Symbol.iterator, toReactive); + }, + concat(...args) { + return reactiveReadArray(this).concat( + ...args.map((x) => shared.isArray(x) ? reactiveReadArray(x) : x) + ); + }, + entries() { + return iterator(this, "entries", (value) => { + value[1] = toReactive(value[1]); + return value; + }); + }, + every(fn, thisArg) { + return apply(this, "every", fn, thisArg, void 0, arguments); + }, + filter(fn, thisArg) { + return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); + }, + find(fn, thisArg) { + return apply(this, "find", fn, thisArg, toReactive, arguments); + }, + findIndex(fn, thisArg) { + return apply(this, "findIndex", fn, thisArg, void 0, arguments); + }, + findLast(fn, thisArg) { + return apply(this, "findLast", fn, thisArg, toReactive, arguments); + }, + findLastIndex(fn, thisArg) { + return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); + }, + // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement + forEach(fn, thisArg) { + return apply(this, "forEach", fn, thisArg, void 0, arguments); + }, + includes(...args) { + return searchProxy(this, "includes", args); + }, + indexOf(...args) { + return searchProxy(this, "indexOf", args); + }, + join(separator) { + return reactiveReadArray(this).join(separator); + }, + // keys() iterator only reads `length`, no optimisation required + lastIndexOf(...args) { + return searchProxy(this, "lastIndexOf", args); + }, + map(fn, thisArg) { + return apply(this, "map", fn, thisArg, void 0, arguments); + }, + pop() { + return noTracking(this, "pop"); + }, + push(...args) { + return noTracking(this, "push", args); + }, + reduce(fn, ...args) { + return reduce(this, "reduce", fn, args); + }, + reduceRight(fn, ...args) { + return reduce(this, "reduceRight", fn, args); + }, + shift() { + return noTracking(this, "shift"); + }, + // slice could use ARRAY_ITERATE but also seems to beg for range tracking + some(fn, thisArg) { + return apply(this, "some", fn, thisArg, void 0, arguments); + }, + splice(...args) { + return noTracking(this, "splice", args); + }, + toReversed() { + return reactiveReadArray(this).toReversed(); + }, + toSorted(comparer) { + return reactiveReadArray(this).toSorted(comparer); + }, + toSpliced(...args) { + return reactiveReadArray(this).toSpliced(...args); + }, + unshift(...args) { + return noTracking(this, "unshift", args); + }, + values() { + return iterator(this, "values", toReactive); + } +}; +function iterator(self, method, wrapValue) { + const arr = shallowReadArray(self); + const iter = arr[method](); + if (arr !== self && !isShallow(self)) { + iter._next = iter.next; + iter.next = () => { + const result = iter._next(); + if (result.value) { + result.value = wrapValue(result.value); + } + return result; + }; + } + return iter; +} +const arrayProto = Array.prototype; +function apply(self, method, fn, thisArg, wrappedRetFn, args) { + const arr = shallowReadArray(self); + const needsWrap = arr !== self && !isShallow(self); + const methodFn = arr[method]; + if (methodFn !== arrayProto[method]) { + const result2 = methodFn.apply(self, args); + return needsWrap ? toReactive(result2) : result2; + } + let wrappedFn = fn; + if (arr !== self) { + if (needsWrap) { + wrappedFn = function(item, index) { + return fn.call(this, toReactive(item), index, self); + }; + } else if (fn.length > 2) { + wrappedFn = function(item, index) { + return fn.call(this, item, index, self); + }; + } + } + const result = methodFn.call(arr, wrappedFn, thisArg); + return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; +} +function reduce(self, method, fn, args) { + const arr = shallowReadArray(self); + let wrappedFn = fn; + if (arr !== self) { + if (!isShallow(self)) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, toReactive(item), index, self); + }; + } else if (fn.length > 3) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, item, index, self); + }; + } + } + return arr[method](wrappedFn, ...args); +} +function searchProxy(self, method, args) { + const arr = toRaw(self); + track(arr, "iterate", ARRAY_ITERATE_KEY); + const res = arr[method](...args); + if ((res === -1 || res === false) && isProxy(args[0])) { + args[0] = toRaw(args[0]); + return arr[method](...args); + } + return res; +} +function noTracking(self, method, args = []) { + pauseTracking(); + startBatch(); + const res = toRaw(self)[method].apply(self, args); + endBatch(); + resetTracking(); + return res; +} + +const isNonTrackableKeys = /* @__PURE__ */ shared.makeMap(`__proto__,__v_isRef,__isVue`); +const builtInSymbols = new Set( + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(shared.isSymbol) +); +function hasOwnProperty(key) { + if (!shared.isSymbol(key)) key = String(key); + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} +class BaseReactiveHandler { + constructor(_isReadonly = false, _isShallow = false) { + this._isReadonly = _isReadonly; + this._isShallow = _isShallow; + } + get(target, key, receiver) { + if (key === "__v_skip") return target["__v_skip"]; + const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return isShallow2; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the receiver is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = shared.isArray(target); + if (!isReadonly2) { + let fn; + if (targetIsArray && (fn = arrayInstrumentations[key])) { + return fn; + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get( + target, + key, + // if this is a proxy wrapping a ref, return methods using the raw ref + // as receiver so that we don't have to call `toRaw` on the ref in all + // its class methods + isRef(target) ? target : receiver + ); + if (shared.isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (isShallow2) { + return res; + } + if (isRef(res)) { + return targetIsArray && shared.isIntegerKey(key) ? res : res.value; + } + if (shared.isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } +} +class MutableReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(false, isShallow2); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._isShallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!shared.isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = shared.isArray(target) && shared.isIntegerKey(key) ? Number(key) < target.length : shared.hasOwn(target, key); + const result = Reflect.set( + target, + key, + value, + isRef(target) ? target : receiver + ); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (shared.hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { + const hadKey = shared.hasOwn(target, key); + const oldValue = target[key]; + const result = Reflect.deleteProperty(target, key); + if (result && hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + } + has(target, key) { + const result = Reflect.has(target, key); + if (!shared.isSymbol(key) || !builtInSymbols.has(key)) { + track(target, "has", key); + } + return result; + } + ownKeys(target) { + track( + target, + "iterate", + shared.isArray(target) ? "length" : ITERATE_KEY + ); + return Reflect.ownKeys(target); + } +} +class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(true, isShallow2); + } + set(target, key) { + { + warn( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + deleteProperty(target, key) { + { + warn( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } +} +const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); +const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); +const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); +const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); + +const toShallow = (value) => value; +const getProto = (v) => Reflect.getPrototypeOf(v); +function createIterableMethod(method, isReadonly2, isShallow2) { + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = shared.isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done + }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } + }; + }; +} +function createReadonlyMethod(type) { + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + warn( + `${shared.capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; +} +function createInstrumentations(readonly, shallow) { + const instrumentations = { + get(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (shared.hasChanged(key, rawKey)) { + track(rawTarget, "get", key); + } + track(rawTarget, "get", rawKey); + } + const { has } = getProto(rawTarget); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + if (has.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } + }, + get size() { + const target = this["__v_raw"]; + !readonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); + }, + has(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (shared.hasChanged(key, rawKey)) { + track(rawTarget, "has", key); + } + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); + }, + forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + !readonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + } + }; + shared.extend( + instrumentations, + readonly ? { + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear") + } : { + add(value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; + }, + set(key, value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (shared.hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; + }, + delete(key) { + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get ? get.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + }, + clear() { + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = shared.isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger( + target, + "clear", + void 0, + void 0, + oldTarget + ); + } + return result; + } + } + ); + const iteratorMethods = [ + "keys", + "values", + "entries", + Symbol.iterator + ]; + iteratorMethods.forEach((method) => { + instrumentations[method] = createIterableMethod(method, readonly, shallow); + }); + return instrumentations; +} +function createInstrumentationGetter(isReadonly2, shallow) { + const instrumentations = createInstrumentations(isReadonly2, shallow); + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + shared.hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; +} +const mutableCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, false) +}; +const shallowCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, true) +}; +const readonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, false) +}; +const shallowReadonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, true) +}; +function checkIdentityKeys(target, has, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has.call(target, rawKey)) { + const type = shared.toRawType(target); + warn( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } +} + +const reactiveMap = /* @__PURE__ */ new WeakMap(); +const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); +const readonlyMap = /* @__PURE__ */ new WeakMap(); +const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); +function targetTypeMap(rawType) { + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } +} +function getTargetType(value) { + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(shared.toRawType(value)); +} +function reactive(target) { + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); +} +function shallowReactive(target) { + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); +} +function readonly(target) { + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); +} +function shallowReadonly(target) { + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); +} +function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!shared.isObject(target)) { + { + warn( + `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( + target + )}` + ); + } + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; +} +function isReactive(value) { + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); +} +function isReadonly(value) { + return !!(value && value["__v_isReadonly"]); +} +function isShallow(value) { + return !!(value && value["__v_isShallow"]); +} +function isProxy(value) { + return value ? !!value["__v_raw"] : false; +} +function toRaw(observed) { + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; +} +function markRaw(value) { + if (!shared.hasOwn(value, "__v_skip") && Object.isExtensible(value)) { + shared.def(value, "__v_skip", true); + } + return value; +} +const toReactive = (value) => shared.isObject(value) ? reactive(value) : value; +const toReadonly = (value) => shared.isObject(value) ? readonly(value) : value; + +function isRef(r) { + return r ? r["__v_isRef"] === true : false; +} +function ref(value) { + return createRef(value, false); +} +function shallowRef(value) { + return createRef(value, true); +} +function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); +} +class RefImpl { + constructor(value, isShallow2) { + this.dep = new Dep(); + this["__v_isRef"] = true; + this["__v_isShallow"] = false; + this._rawValue = isShallow2 ? value : toRaw(value); + this._value = isShallow2 ? value : toReactive(value); + this["__v_isShallow"] = isShallow2; + } + get value() { + { + this.dep.track({ + target: this, + type: "get", + key: "value" + }); + } + return this._value; + } + set value(newValue) { + const oldValue = this._rawValue; + const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); + newValue = useDirectValue ? newValue : toRaw(newValue); + if (shared.hasChanged(newValue, oldValue)) { + this._rawValue = newValue; + this._value = useDirectValue ? newValue : toReactive(newValue); + { + this.dep.trigger({ + target: this, + type: "set", + key: "value", + newValue, + oldValue + }); + } + } + } +} +function triggerRef(ref2) { + if (ref2.dep) { + { + ref2.dep.trigger({ + target: ref2, + type: "set", + key: "value", + newValue: ref2._value + }); + } + } +} +function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +} +function toValue(source) { + return shared.isFunction(source) ? source() : unref(source); +} +const shallowUnwrapHandlers = { + get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } +}; +function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); +} +class CustomRefImpl { + constructor(factory) { + this["__v_isRef"] = true; + this._value = void 0; + const dep = this.dep = new Dep(); + const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); + this._get = get; + this._set = set; + } + get value() { + return this._value = this._get(); + } + set value(newVal) { + this._set(newVal); + } +} +function customRef(factory) { + return new CustomRefImpl(factory); +} +function toRefs(object) { + if (!isProxy(object)) { + warn(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = shared.isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; +} +class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this["__v_isRef"] = true; + this._value = void 0; + } + get value() { + const val = this._object[this._key]; + return this._value = val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } +} +class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this["__v_isRef"] = true; + this["__v_isReadonly"] = true; + this._value = void 0; + } + get value() { + return this._value = this._getter(); + } +} +function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (shared.isFunction(source)) { + return new GetterRefImpl(source); + } else if (shared.isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } +} +function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); +} + +class ComputedRefImpl { + constructor(fn, setter, isSSR) { + this.fn = fn; + this.setter = setter; + /** + * @internal + */ + this._value = void 0; + /** + * @internal + */ + this.dep = new Dep(this); + /** + * @internal + */ + this.__v_isRef = true; + // TODO isolatedDeclarations "__v_isReadonly" + // A computed is also a subscriber that tracks other deps + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 16; + /** + * @internal + */ + this.globalVersion = globalVersion - 1; + /** + * @internal + */ + this.next = void 0; + // for backwards compat + this.effect = this; + this["__v_isReadonly"] = !setter; + this.isSSR = isSSR; + } + /** + * @internal + */ + notify() { + this.flags |= 16; + if (!(this.flags & 8) && // avoid infinite self recursion + activeSub !== this) { + batch(this, true); + return true; + } + } + get value() { + const link = this.dep.track({ + target: this, + type: "get", + key: "value" + }) ; + refreshComputed(this); + if (link) { + link.version = this.dep.version; + } + return this._value; + } + set value(newValue) { + if (this.setter) { + this.setter(newValue); + } else { + warn("Write operation failed: computed value is readonly"); + } + } +} +function computed(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + if (shared.isFunction(getterOrOptions)) { + getter = getterOrOptions; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, isSSR); + if (debugOptions && !isSSR) { + cRef.onTrack = debugOptions.onTrack; + cRef.onTrigger = debugOptions.onTrigger; + } + return cRef; +} + +const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" +}; +const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" +}; +const ReactiveFlags = { + "SKIP": "__v_skip", + "IS_REACTIVE": "__v_isReactive", + "IS_READONLY": "__v_isReadonly", + "IS_SHALLOW": "__v_isShallow", + "RAW": "__v_raw", + "IS_REF": "__v_isRef" +}; + +const WatchErrorCodes = { + "WATCH_GETTER": 2, + "2": "WATCH_GETTER", + "WATCH_CALLBACK": 3, + "3": "WATCH_CALLBACK", + "WATCH_CLEANUP": 4, + "4": "WATCH_CLEANUP" +}; +const INITIAL_WATCHER_VALUE = {}; +const cleanupMap = /* @__PURE__ */ new WeakMap(); +let activeWatcher = void 0; +function getCurrentWatcher() { + return activeWatcher; +} +function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { + if (owner) { + let cleanups = cleanupMap.get(owner); + if (!cleanups) cleanupMap.set(owner, cleanups = []); + cleanups.push(cleanupFn); + } else if (!failSilently) { + warn( + `onWatcherCleanup() was called when there was no active watcher to associate with.` + ); + } +} +function watch(source, cb, options = shared.EMPTY_OBJ) { + const { immediate, deep, once, scheduler, augmentJob, call } = options; + const warnInvalidSource = (s) => { + (options.onWarn || warn)( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const reactiveGetter = (source2) => { + if (deep) return source2; + if (isShallow(source2) || deep === false || deep === 0) + return traverse(source2, 1); + return traverse(source2); + }; + let effect; + let getter; + let cleanup; + let boundCleanup; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (shared.isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (shared.isFunction(s)) { + return call ? call(s, 2) : s(); + } else { + warnInvalidSource(s); + } + }); + } else if (shared.isFunction(source)) { + if (cb) { + getter = call ? () => call(source, 2) : source; + } else { + getter = () => { + if (cleanup) { + pauseTracking(); + try { + cleanup(); + } finally { + resetTracking(); + } + } + const currentEffect = activeWatcher; + activeWatcher = effect; + try { + return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); + } finally { + activeWatcher = currentEffect; + } + }; + } + } else { + getter = shared.NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + const depth = deep === true ? Infinity : deep; + getter = () => traverse(baseGetter(), depth); + } + const scope = getCurrentScope(); + const watchHandle = () => { + effect.stop(); + if (scope && scope.active) { + shared.remove(scope.effects, effect); + } + }; + if (once && cb) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + watchHandle(); + }; + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = (immediateFirstRun) => { + if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => shared.hasChanged(v, oldValue[i])) : shared.hasChanged(newValue, oldValue))) { + if (cleanup) { + cleanup(); + } + const currentWatcher = activeWatcher; + activeWatcher = effect; + try { + const args = [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + boundCleanup + ]; + call ? call(cb, 3, args) : ( + // @ts-expect-error + cb(...args) + ); + oldValue = newValue; + } finally { + activeWatcher = currentWatcher; + } + } + } else { + effect.run(); + } + }; + if (augmentJob) { + augmentJob(job); + } + effect = new ReactiveEffect(getter); + effect.scheduler = scheduler ? () => scheduler(job, false) : job; + boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); + cleanup = effect.onStop = () => { + const cleanups = cleanupMap.get(effect); + if (cleanups) { + if (call) { + call(cleanups, 4); + } else { + for (const cleanup2 of cleanups) cleanup2(); + } + cleanupMap.delete(effect); + } + }; + { + effect.onTrack = options.onTrack; + effect.onTrigger = options.onTrigger; + } + if (cb) { + if (immediate) { + job(true); + } else { + oldValue = effect.run(); + } + } else if (scheduler) { + scheduler(job.bind(null, true), true); + } else { + effect.run(); + } + watchHandle.pause = effect.pause.bind(effect); + watchHandle.resume = effect.resume.bind(effect); + watchHandle.stop = watchHandle; + return watchHandle; +} +function traverse(value, depth = Infinity, seen) { + if (depth <= 0 || !shared.isObject(value) || value["__v_skip"]) { + return value; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + depth--; + if (isRef(value)) { + traverse(value.value, depth, seen); + } else if (shared.isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, seen); + } + } else if (shared.isSet(value) || shared.isMap(value)) { + value.forEach((v) => { + traverse(v, depth, seen); + }); + } else if (shared.isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, seen); + } + for (const key of Object.getOwnPropertySymbols(value)) { + if (Object.prototype.propertyIsEnumerable.call(value, key)) { + traverse(value[key], depth, seen); + } + } + } + return value; +} + +exports.ARRAY_ITERATE_KEY = ARRAY_ITERATE_KEY; +exports.EffectFlags = EffectFlags; +exports.EffectScope = EffectScope; +exports.ITERATE_KEY = ITERATE_KEY; +exports.MAP_KEY_ITERATE_KEY = MAP_KEY_ITERATE_KEY; +exports.ReactiveEffect = ReactiveEffect; +exports.ReactiveFlags = ReactiveFlags; +exports.TrackOpTypes = TrackOpTypes; +exports.TriggerOpTypes = TriggerOpTypes; +exports.WatchErrorCodes = WatchErrorCodes; +exports.computed = computed; +exports.customRef = customRef; +exports.effect = effect; +exports.effectScope = effectScope; +exports.enableTracking = enableTracking; +exports.getCurrentScope = getCurrentScope; +exports.getCurrentWatcher = getCurrentWatcher; +exports.isProxy = isProxy; +exports.isReactive = isReactive; +exports.isReadonly = isReadonly; +exports.isRef = isRef; +exports.isShallow = isShallow; +exports.markRaw = markRaw; +exports.onEffectCleanup = onEffectCleanup; +exports.onScopeDispose = onScopeDispose; +exports.onWatcherCleanup = onWatcherCleanup; +exports.pauseTracking = pauseTracking; +exports.proxyRefs = proxyRefs; +exports.reactive = reactive; +exports.reactiveReadArray = reactiveReadArray; +exports.readonly = readonly; +exports.ref = ref; +exports.resetTracking = resetTracking; +exports.shallowReactive = shallowReactive; +exports.shallowReadArray = shallowReadArray; +exports.shallowReadonly = shallowReadonly; +exports.shallowRef = shallowRef; +exports.stop = stop; +exports.toRaw = toRaw; +exports.toReactive = toReactive; +exports.toReadonly = toReadonly; +exports.toRef = toRef; +exports.toRefs = toRefs; +exports.toValue = toValue; +exports.track = track; +exports.traverse = traverse; +exports.trigger = trigger; +exports.triggerRef = triggerRef; +exports.unref = unref; +exports.watch = watch; diff --git a/vuetest/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js b/vuetest/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js new file mode 100644 index 0000000..ee6811b --- /dev/null +++ b/vuetest/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js @@ -0,0 +1,1789 @@ +/** +* @vue/reactivity v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var shared = require('@vue/shared'); + +let activeEffectScope; +class EffectScope { + constructor(detached = false) { + this.detached = detached; + /** + * @internal + */ + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this._isPaused = false; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + pause() { + if (this._active) { + this._isPaused = true; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].pause(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].pause(); + } + } + } + /** + * Resumes the effect scope, including all child scopes and effects. + */ + resume() { + if (this._active) { + if (this._isPaused) { + this._isPaused = false; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].resume(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].resume(); + } + } + } + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { + activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + this._active = false; + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + this.effects.length = 0; + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + this.cleanups.length = 0; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); + } + this.scopes.length = 0; + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + } + } +} +function effectScope(detached) { + return new EffectScope(detached); +} +function getCurrentScope() { + return activeEffectScope; +} +function onScopeDispose(fn, failSilently = false) { + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } +} + +let activeSub; +const EffectFlags = { + "ACTIVE": 1, + "1": "ACTIVE", + "RUNNING": 2, + "2": "RUNNING", + "TRACKING": 4, + "4": "TRACKING", + "NOTIFIED": 8, + "8": "NOTIFIED", + "DIRTY": 16, + "16": "DIRTY", + "ALLOW_RECURSE": 32, + "32": "ALLOW_RECURSE", + "PAUSED": 64, + "64": "PAUSED" +}; +const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); +class ReactiveEffect { + constructor(fn) { + this.fn = fn; + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 1 | 4; + /** + * @internal + */ + this.next = void 0; + /** + * @internal + */ + this.cleanup = void 0; + this.scheduler = void 0; + if (activeEffectScope && activeEffectScope.active) { + activeEffectScope.effects.push(this); + } + } + pause() { + this.flags |= 64; + } + resume() { + if (this.flags & 64) { + this.flags &= ~64; + if (pausedQueueEffects.has(this)) { + pausedQueueEffects.delete(this); + this.trigger(); + } + } + } + /** + * @internal + */ + notify() { + if (this.flags & 2 && !(this.flags & 32)) { + return; + } + if (!(this.flags & 8)) { + batch(this); + } + } + run() { + if (!(this.flags & 1)) { + return this.fn(); + } + this.flags |= 2; + cleanupEffect(this); + prepareDeps(this); + const prevEffect = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = this; + shouldTrack = true; + try { + return this.fn(); + } finally { + cleanupDeps(this); + activeSub = prevEffect; + shouldTrack = prevShouldTrack; + this.flags &= ~2; + } + } + stop() { + if (this.flags & 1) { + for (let link = this.deps; link; link = link.nextDep) { + removeSub(link); + } + this.deps = this.depsTail = void 0; + cleanupEffect(this); + this.onStop && this.onStop(); + this.flags &= ~1; + } + } + trigger() { + if (this.flags & 64) { + pausedQueueEffects.add(this); + } else if (this.scheduler) { + this.scheduler(); + } else { + this.runIfDirty(); + } + } + /** + * @internal + */ + runIfDirty() { + if (isDirty(this)) { + this.run(); + } + } + get dirty() { + return isDirty(this); + } +} +let batchDepth = 0; +let batchedSub; +let batchedComputed; +function batch(sub, isComputed = false) { + sub.flags |= 8; + if (isComputed) { + sub.next = batchedComputed; + batchedComputed = sub; + return; + } + sub.next = batchedSub; + batchedSub = sub; +} +function startBatch() { + batchDepth++; +} +function endBatch() { + if (--batchDepth > 0) { + return; + } + if (batchedComputed) { + let e = batchedComputed; + batchedComputed = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + e = next; + } + } + let error; + while (batchedSub) { + let e = batchedSub; + batchedSub = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + if (e.flags & 1) { + try { + ; + e.trigger(); + } catch (err) { + if (!error) error = err; + } + } + e = next; + } + } + if (error) throw error; +} +function prepareDeps(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + link.version = -1; + link.prevActiveLink = link.dep.activeLink; + link.dep.activeLink = link; + } +} +function cleanupDeps(sub) { + let head; + let tail = sub.depsTail; + let link = tail; + while (link) { + const prev = link.prevDep; + if (link.version === -1) { + if (link === tail) tail = prev; + removeSub(link); + removeDep(link); + } else { + head = link; + } + link.dep.activeLink = link.prevActiveLink; + link.prevActiveLink = void 0; + link = prev; + } + sub.deps = head; + sub.depsTail = tail; +} +function isDirty(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { + return true; + } + } + if (sub._dirty) { + return true; + } + return false; +} +function refreshComputed(computed) { + if (computed.flags & 4 && !(computed.flags & 16)) { + return; + } + computed.flags &= ~16; + if (computed.globalVersion === globalVersion) { + return; + } + computed.globalVersion = globalVersion; + const dep = computed.dep; + computed.flags |= 2; + if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { + computed.flags &= ~2; + return; + } + const prevSub = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = computed; + shouldTrack = true; + try { + prepareDeps(computed); + const value = computed.fn(computed._value); + if (dep.version === 0 || shared.hasChanged(value, computed._value)) { + computed._value = value; + dep.version++; + } + } catch (err) { + dep.version++; + throw err; + } finally { + activeSub = prevSub; + shouldTrack = prevShouldTrack; + cleanupDeps(computed); + computed.flags &= ~2; + } +} +function removeSub(link, soft = false) { + const { dep, prevSub, nextSub } = link; + if (prevSub) { + prevSub.nextSub = nextSub; + link.prevSub = void 0; + } + if (nextSub) { + nextSub.prevSub = prevSub; + link.nextSub = void 0; + } + if (dep.subs === link) { + dep.subs = prevSub; + if (!prevSub && dep.computed) { + dep.computed.flags &= ~4; + for (let l = dep.computed.deps; l; l = l.nextDep) { + removeSub(l, true); + } + } + } + if (!soft && !--dep.sc && dep.map) { + dep.map.delete(dep.key); + } +} +function removeDep(link) { + const { prevDep, nextDep } = link; + if (prevDep) { + prevDep.nextDep = nextDep; + link.prevDep = void 0; + } + if (nextDep) { + nextDep.prevDep = prevDep; + link.nextDep = void 0; + } +} +function effect(fn, options) { + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const e = new ReactiveEffect(fn); + if (options) { + shared.extend(e, options); + } + try { + e.run(); + } catch (err) { + e.stop(); + throw err; + } + const runner = e.run.bind(e); + runner.effect = e; + return runner; +} +function stop(runner) { + runner.effect.stop(); +} +let shouldTrack = true; +const trackStack = []; +function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; +} +function enableTracking() { + trackStack.push(shouldTrack); + shouldTrack = true; +} +function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; +} +function onEffectCleanup(fn, failSilently = false) { + if (activeSub instanceof ReactiveEffect) { + activeSub.cleanup = fn; + } +} +function cleanupEffect(e) { + const { cleanup } = e; + e.cleanup = void 0; + if (cleanup) { + const prevSub = activeSub; + activeSub = void 0; + try { + cleanup(); + } finally { + activeSub = prevSub; + } + } +} + +let globalVersion = 0; +class Link { + constructor(sub, dep) { + this.sub = sub; + this.dep = dep; + this.version = dep.version; + this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; + } +} +class Dep { + constructor(computed) { + this.computed = computed; + this.version = 0; + /** + * Link between this dep and the current active effect + */ + this.activeLink = void 0; + /** + * Doubly linked list representing the subscribing effects (tail) + */ + this.subs = void 0; + /** + * For object property deps cleanup + */ + this.map = void 0; + this.key = void 0; + /** + * Subscriber counter + */ + this.sc = 0; + } + track(debugInfo) { + if (!activeSub || !shouldTrack || activeSub === this.computed) { + return; + } + let link = this.activeLink; + if (link === void 0 || link.sub !== activeSub) { + link = this.activeLink = new Link(activeSub, this); + if (!activeSub.deps) { + activeSub.deps = activeSub.depsTail = link; + } else { + link.prevDep = activeSub.depsTail; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + } + addSub(link); + } else if (link.version === -1) { + link.version = this.version; + if (link.nextDep) { + const next = link.nextDep; + next.prevDep = link.prevDep; + if (link.prevDep) { + link.prevDep.nextDep = next; + } + link.prevDep = activeSub.depsTail; + link.nextDep = void 0; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + if (activeSub.deps === link) { + activeSub.deps = next; + } + } + } + return link; + } + trigger(debugInfo) { + this.version++; + globalVersion++; + this.notify(debugInfo); + } + notify(debugInfo) { + startBatch(); + try { + if (false) ; + for (let link = this.subs; link; link = link.prevSub) { + if (link.sub.notify()) { + ; + link.sub.dep.notify(); + } + } + } finally { + endBatch(); + } + } +} +function addSub(link) { + link.dep.sc++; + if (link.sub.flags & 4) { + const computed = link.dep.computed; + if (computed && !link.dep.subs) { + computed.flags |= 4 | 16; + for (let l = computed.deps; l; l = l.nextDep) { + addSub(l); + } + } + const currentTail = link.dep.subs; + if (currentTail !== link) { + link.prevSub = currentTail; + if (currentTail) currentTail.nextSub = link; + } + link.dep.subs = link; + } +} +const targetMap = /* @__PURE__ */ new WeakMap(); +const ITERATE_KEY = Symbol( + "" +); +const MAP_KEY_ITERATE_KEY = Symbol( + "" +); +const ARRAY_ITERATE_KEY = Symbol( + "" +); +function track(target, type, key) { + if (shouldTrack && activeSub) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = new Dep()); + dep.map = depsMap; + dep.key = key; + } + { + dep.track(); + } + } +} +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + globalVersion++; + return; + } + const run = (dep) => { + if (dep) { + { + dep.trigger(); + } + } + }; + startBatch(); + if (type === "clear") { + depsMap.forEach(run); + } else { + const targetIsArray = shared.isArray(target); + const isArrayIndex = targetIsArray && shared.isIntegerKey(key); + if (targetIsArray && key === "length") { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !shared.isSymbol(key2) && key2 >= newLength) { + run(dep); + } + }); + } else { + if (key !== void 0 || depsMap.has(void 0)) { + run(depsMap.get(key)); + } + if (isArrayIndex) { + run(depsMap.get(ARRAY_ITERATE_KEY)); + } + switch (type) { + case "add": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (shared.isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isArrayIndex) { + run(depsMap.get("length")); + } + break; + case "delete": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (shared.isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (shared.isMap(target)) { + run(depsMap.get(ITERATE_KEY)); + } + break; + } + } + } + endBatch(); +} +function getDepFromReactive(object, key) { + const depMap = targetMap.get(object); + return depMap && depMap.get(key); +} + +function reactiveReadArray(array) { + const raw = toRaw(array); + if (raw === array) return raw; + track(raw, "iterate", ARRAY_ITERATE_KEY); + return isShallow(array) ? raw : raw.map(toReactive); +} +function shallowReadArray(arr) { + track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); + return arr; +} +const arrayInstrumentations = { + __proto__: null, + [Symbol.iterator]() { + return iterator(this, Symbol.iterator, toReactive); + }, + concat(...args) { + return reactiveReadArray(this).concat( + ...args.map((x) => shared.isArray(x) ? reactiveReadArray(x) : x) + ); + }, + entries() { + return iterator(this, "entries", (value) => { + value[1] = toReactive(value[1]); + return value; + }); + }, + every(fn, thisArg) { + return apply(this, "every", fn, thisArg, void 0, arguments); + }, + filter(fn, thisArg) { + return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); + }, + find(fn, thisArg) { + return apply(this, "find", fn, thisArg, toReactive, arguments); + }, + findIndex(fn, thisArg) { + return apply(this, "findIndex", fn, thisArg, void 0, arguments); + }, + findLast(fn, thisArg) { + return apply(this, "findLast", fn, thisArg, toReactive, arguments); + }, + findLastIndex(fn, thisArg) { + return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); + }, + // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement + forEach(fn, thisArg) { + return apply(this, "forEach", fn, thisArg, void 0, arguments); + }, + includes(...args) { + return searchProxy(this, "includes", args); + }, + indexOf(...args) { + return searchProxy(this, "indexOf", args); + }, + join(separator) { + return reactiveReadArray(this).join(separator); + }, + // keys() iterator only reads `length`, no optimisation required + lastIndexOf(...args) { + return searchProxy(this, "lastIndexOf", args); + }, + map(fn, thisArg) { + return apply(this, "map", fn, thisArg, void 0, arguments); + }, + pop() { + return noTracking(this, "pop"); + }, + push(...args) { + return noTracking(this, "push", args); + }, + reduce(fn, ...args) { + return reduce(this, "reduce", fn, args); + }, + reduceRight(fn, ...args) { + return reduce(this, "reduceRight", fn, args); + }, + shift() { + return noTracking(this, "shift"); + }, + // slice could use ARRAY_ITERATE but also seems to beg for range tracking + some(fn, thisArg) { + return apply(this, "some", fn, thisArg, void 0, arguments); + }, + splice(...args) { + return noTracking(this, "splice", args); + }, + toReversed() { + return reactiveReadArray(this).toReversed(); + }, + toSorted(comparer) { + return reactiveReadArray(this).toSorted(comparer); + }, + toSpliced(...args) { + return reactiveReadArray(this).toSpliced(...args); + }, + unshift(...args) { + return noTracking(this, "unshift", args); + }, + values() { + return iterator(this, "values", toReactive); + } +}; +function iterator(self, method, wrapValue) { + const arr = shallowReadArray(self); + const iter = arr[method](); + if (arr !== self && !isShallow(self)) { + iter._next = iter.next; + iter.next = () => { + const result = iter._next(); + if (result.value) { + result.value = wrapValue(result.value); + } + return result; + }; + } + return iter; +} +const arrayProto = Array.prototype; +function apply(self, method, fn, thisArg, wrappedRetFn, args) { + const arr = shallowReadArray(self); + const needsWrap = arr !== self && !isShallow(self); + const methodFn = arr[method]; + if (methodFn !== arrayProto[method]) { + const result2 = methodFn.apply(self, args); + return needsWrap ? toReactive(result2) : result2; + } + let wrappedFn = fn; + if (arr !== self) { + if (needsWrap) { + wrappedFn = function(item, index) { + return fn.call(this, toReactive(item), index, self); + }; + } else if (fn.length > 2) { + wrappedFn = function(item, index) { + return fn.call(this, item, index, self); + }; + } + } + const result = methodFn.call(arr, wrappedFn, thisArg); + return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; +} +function reduce(self, method, fn, args) { + const arr = shallowReadArray(self); + let wrappedFn = fn; + if (arr !== self) { + if (!isShallow(self)) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, toReactive(item), index, self); + }; + } else if (fn.length > 3) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, item, index, self); + }; + } + } + return arr[method](wrappedFn, ...args); +} +function searchProxy(self, method, args) { + const arr = toRaw(self); + track(arr, "iterate", ARRAY_ITERATE_KEY); + const res = arr[method](...args); + if ((res === -1 || res === false) && isProxy(args[0])) { + args[0] = toRaw(args[0]); + return arr[method](...args); + } + return res; +} +function noTracking(self, method, args = []) { + pauseTracking(); + startBatch(); + const res = toRaw(self)[method].apply(self, args); + endBatch(); + resetTracking(); + return res; +} + +const isNonTrackableKeys = /* @__PURE__ */ shared.makeMap(`__proto__,__v_isRef,__isVue`); +const builtInSymbols = new Set( + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(shared.isSymbol) +); +function hasOwnProperty(key) { + if (!shared.isSymbol(key)) key = String(key); + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} +class BaseReactiveHandler { + constructor(_isReadonly = false, _isShallow = false) { + this._isReadonly = _isReadonly; + this._isShallow = _isShallow; + } + get(target, key, receiver) { + if (key === "__v_skip") return target["__v_skip"]; + const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return isShallow2; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the receiver is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = shared.isArray(target); + if (!isReadonly2) { + let fn; + if (targetIsArray && (fn = arrayInstrumentations[key])) { + return fn; + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get( + target, + key, + // if this is a proxy wrapping a ref, return methods using the raw ref + // as receiver so that we don't have to call `toRaw` on the ref in all + // its class methods + isRef(target) ? target : receiver + ); + if (shared.isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (isShallow2) { + return res; + } + if (isRef(res)) { + return targetIsArray && shared.isIntegerKey(key) ? res : res.value; + } + if (shared.isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } +} +class MutableReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(false, isShallow2); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._isShallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!shared.isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = shared.isArray(target) && shared.isIntegerKey(key) ? Number(key) < target.length : shared.hasOwn(target, key); + const result = Reflect.set( + target, + key, + value, + isRef(target) ? target : receiver + ); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (shared.hasChanged(value, oldValue)) { + trigger(target, "set", key, value); + } + } + return result; + } + deleteProperty(target, key) { + const hadKey = shared.hasOwn(target, key); + target[key]; + const result = Reflect.deleteProperty(target, key); + if (result && hadKey) { + trigger(target, "delete", key, void 0); + } + return result; + } + has(target, key) { + const result = Reflect.has(target, key); + if (!shared.isSymbol(key) || !builtInSymbols.has(key)) { + track(target, "has", key); + } + return result; + } + ownKeys(target) { + track( + target, + "iterate", + shared.isArray(target) ? "length" : ITERATE_KEY + ); + return Reflect.ownKeys(target); + } +} +class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(true, isShallow2); + } + set(target, key) { + return true; + } + deleteProperty(target, key) { + return true; + } +} +const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); +const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); +const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); +const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); + +const toShallow = (value) => value; +const getProto = (v) => Reflect.getPrototypeOf(v); +function createIterableMethod(method, isReadonly2, isShallow2) { + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = shared.isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done + }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } + }; + }; +} +function createReadonlyMethod(type) { + return function(...args) { + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; +} +function createInstrumentations(readonly, shallow) { + const instrumentations = { + get(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (shared.hasChanged(key, rawKey)) { + track(rawTarget, "get", key); + } + track(rawTarget, "get", rawKey); + } + const { has } = getProto(rawTarget); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + if (has.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } + }, + get size() { + const target = this["__v_raw"]; + !readonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); + }, + has(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (shared.hasChanged(key, rawKey)) { + track(rawTarget, "has", key); + } + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); + }, + forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + !readonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + } + }; + shared.extend( + instrumentations, + readonly ? { + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear") + } : { + add(value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; + }, + set(key, value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } + const oldValue = get.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (shared.hasChanged(value, oldValue)) { + trigger(target, "set", key, value); + } + return this; + }, + delete(key) { + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } + get ? get.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0); + } + return result; + }, + clear() { + const target = toRaw(this); + const hadItems = target.size !== 0; + const result = target.clear(); + if (hadItems) { + trigger( + target, + "clear", + void 0, + void 0); + } + return result; + } + } + ); + const iteratorMethods = [ + "keys", + "values", + "entries", + Symbol.iterator + ]; + iteratorMethods.forEach((method) => { + instrumentations[method] = createIterableMethod(method, readonly, shallow); + }); + return instrumentations; +} +function createInstrumentationGetter(isReadonly2, shallow) { + const instrumentations = createInstrumentations(isReadonly2, shallow); + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + shared.hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; +} +const mutableCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, false) +}; +const shallowCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, true) +}; +const readonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, false) +}; +const shallowReadonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, true) +}; + +const reactiveMap = /* @__PURE__ */ new WeakMap(); +const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); +const readonlyMap = /* @__PURE__ */ new WeakMap(); +const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); +function targetTypeMap(rawType) { + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } +} +function getTargetType(value) { + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(shared.toRawType(value)); +} +function reactive(target) { + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); +} +function shallowReactive(target) { + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); +} +function readonly(target) { + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); +} +function shallowReadonly(target) { + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); +} +function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!shared.isObject(target)) { + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; +} +function isReactive(value) { + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); +} +function isReadonly(value) { + return !!(value && value["__v_isReadonly"]); +} +function isShallow(value) { + return !!(value && value["__v_isShallow"]); +} +function isProxy(value) { + return value ? !!value["__v_raw"] : false; +} +function toRaw(observed) { + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; +} +function markRaw(value) { + if (!shared.hasOwn(value, "__v_skip") && Object.isExtensible(value)) { + shared.def(value, "__v_skip", true); + } + return value; +} +const toReactive = (value) => shared.isObject(value) ? reactive(value) : value; +const toReadonly = (value) => shared.isObject(value) ? readonly(value) : value; + +function isRef(r) { + return r ? r["__v_isRef"] === true : false; +} +function ref(value) { + return createRef(value, false); +} +function shallowRef(value) { + return createRef(value, true); +} +function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); +} +class RefImpl { + constructor(value, isShallow2) { + this.dep = new Dep(); + this["__v_isRef"] = true; + this["__v_isShallow"] = false; + this._rawValue = isShallow2 ? value : toRaw(value); + this._value = isShallow2 ? value : toReactive(value); + this["__v_isShallow"] = isShallow2; + } + get value() { + { + this.dep.track(); + } + return this._value; + } + set value(newValue) { + const oldValue = this._rawValue; + const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); + newValue = useDirectValue ? newValue : toRaw(newValue); + if (shared.hasChanged(newValue, oldValue)) { + this._rawValue = newValue; + this._value = useDirectValue ? newValue : toReactive(newValue); + { + this.dep.trigger(); + } + } + } +} +function triggerRef(ref2) { + if (ref2.dep) { + { + ref2.dep.trigger(); + } + } +} +function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +} +function toValue(source) { + return shared.isFunction(source) ? source() : unref(source); +} +const shallowUnwrapHandlers = { + get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } +}; +function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); +} +class CustomRefImpl { + constructor(factory) { + this["__v_isRef"] = true; + this._value = void 0; + const dep = this.dep = new Dep(); + const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); + this._get = get; + this._set = set; + } + get value() { + return this._value = this._get(); + } + set value(newVal) { + this._set(newVal); + } +} +function customRef(factory) { + return new CustomRefImpl(factory); +} +function toRefs(object) { + const ret = shared.isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; +} +class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this["__v_isRef"] = true; + this._value = void 0; + } + get value() { + const val = this._object[this._key]; + return this._value = val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } +} +class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this["__v_isRef"] = true; + this["__v_isReadonly"] = true; + this._value = void 0; + } + get value() { + return this._value = this._getter(); + } +} +function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (shared.isFunction(source)) { + return new GetterRefImpl(source); + } else if (shared.isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } +} +function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); +} + +class ComputedRefImpl { + constructor(fn, setter, isSSR) { + this.fn = fn; + this.setter = setter; + /** + * @internal + */ + this._value = void 0; + /** + * @internal + */ + this.dep = new Dep(this); + /** + * @internal + */ + this.__v_isRef = true; + // TODO isolatedDeclarations "__v_isReadonly" + // A computed is also a subscriber that tracks other deps + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 16; + /** + * @internal + */ + this.globalVersion = globalVersion - 1; + /** + * @internal + */ + this.next = void 0; + // for backwards compat + this.effect = this; + this["__v_isReadonly"] = !setter; + this.isSSR = isSSR; + } + /** + * @internal + */ + notify() { + this.flags |= 16; + if (!(this.flags & 8) && // avoid infinite self recursion + activeSub !== this) { + batch(this, true); + return true; + } + } + get value() { + const link = this.dep.track(); + refreshComputed(this); + if (link) { + link.version = this.dep.version; + } + return this._value; + } + set value(newValue) { + if (this.setter) { + this.setter(newValue); + } + } +} +function computed(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + if (shared.isFunction(getterOrOptions)) { + getter = getterOrOptions; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, isSSR); + return cRef; +} + +const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" +}; +const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" +}; +const ReactiveFlags = { + "SKIP": "__v_skip", + "IS_REACTIVE": "__v_isReactive", + "IS_READONLY": "__v_isReadonly", + "IS_SHALLOW": "__v_isShallow", + "RAW": "__v_raw", + "IS_REF": "__v_isRef" +}; + +const WatchErrorCodes = { + "WATCH_GETTER": 2, + "2": "WATCH_GETTER", + "WATCH_CALLBACK": 3, + "3": "WATCH_CALLBACK", + "WATCH_CLEANUP": 4, + "4": "WATCH_CLEANUP" +}; +const INITIAL_WATCHER_VALUE = {}; +const cleanupMap = /* @__PURE__ */ new WeakMap(); +let activeWatcher = void 0; +function getCurrentWatcher() { + return activeWatcher; +} +function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { + if (owner) { + let cleanups = cleanupMap.get(owner); + if (!cleanups) cleanupMap.set(owner, cleanups = []); + cleanups.push(cleanupFn); + } +} +function watch(source, cb, options = shared.EMPTY_OBJ) { + const { immediate, deep, once, scheduler, augmentJob, call } = options; + const reactiveGetter = (source2) => { + if (deep) return source2; + if (isShallow(source2) || deep === false || deep === 0) + return traverse(source2, 1); + return traverse(source2); + }; + let effect; + let getter; + let cleanup; + let boundCleanup; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (shared.isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (shared.isFunction(s)) { + return call ? call(s, 2) : s(); + } else ; + }); + } else if (shared.isFunction(source)) { + if (cb) { + getter = call ? () => call(source, 2) : source; + } else { + getter = () => { + if (cleanup) { + pauseTracking(); + try { + cleanup(); + } finally { + resetTracking(); + } + } + const currentEffect = activeWatcher; + activeWatcher = effect; + try { + return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); + } finally { + activeWatcher = currentEffect; + } + }; + } + } else { + getter = shared.NOOP; + } + if (cb && deep) { + const baseGetter = getter; + const depth = deep === true ? Infinity : deep; + getter = () => traverse(baseGetter(), depth); + } + const scope = getCurrentScope(); + const watchHandle = () => { + effect.stop(); + if (scope && scope.active) { + shared.remove(scope.effects, effect); + } + }; + if (once && cb) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + watchHandle(); + }; + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = (immediateFirstRun) => { + if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => shared.hasChanged(v, oldValue[i])) : shared.hasChanged(newValue, oldValue))) { + if (cleanup) { + cleanup(); + } + const currentWatcher = activeWatcher; + activeWatcher = effect; + try { + const args = [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + boundCleanup + ]; + call ? call(cb, 3, args) : ( + // @ts-expect-error + cb(...args) + ); + oldValue = newValue; + } finally { + activeWatcher = currentWatcher; + } + } + } else { + effect.run(); + } + }; + if (augmentJob) { + augmentJob(job); + } + effect = new ReactiveEffect(getter); + effect.scheduler = scheduler ? () => scheduler(job, false) : job; + boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); + cleanup = effect.onStop = () => { + const cleanups = cleanupMap.get(effect); + if (cleanups) { + if (call) { + call(cleanups, 4); + } else { + for (const cleanup2 of cleanups) cleanup2(); + } + cleanupMap.delete(effect); + } + }; + if (cb) { + if (immediate) { + job(true); + } else { + oldValue = effect.run(); + } + } else if (scheduler) { + scheduler(job.bind(null, true), true); + } else { + effect.run(); + } + watchHandle.pause = effect.pause.bind(effect); + watchHandle.resume = effect.resume.bind(effect); + watchHandle.stop = watchHandle; + return watchHandle; +} +function traverse(value, depth = Infinity, seen) { + if (depth <= 0 || !shared.isObject(value) || value["__v_skip"]) { + return value; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + depth--; + if (isRef(value)) { + traverse(value.value, depth, seen); + } else if (shared.isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, seen); + } + } else if (shared.isSet(value) || shared.isMap(value)) { + value.forEach((v) => { + traverse(v, depth, seen); + }); + } else if (shared.isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, seen); + } + for (const key of Object.getOwnPropertySymbols(value)) { + if (Object.prototype.propertyIsEnumerable.call(value, key)) { + traverse(value[key], depth, seen); + } + } + } + return value; +} + +exports.ARRAY_ITERATE_KEY = ARRAY_ITERATE_KEY; +exports.EffectFlags = EffectFlags; +exports.EffectScope = EffectScope; +exports.ITERATE_KEY = ITERATE_KEY; +exports.MAP_KEY_ITERATE_KEY = MAP_KEY_ITERATE_KEY; +exports.ReactiveEffect = ReactiveEffect; +exports.ReactiveFlags = ReactiveFlags; +exports.TrackOpTypes = TrackOpTypes; +exports.TriggerOpTypes = TriggerOpTypes; +exports.WatchErrorCodes = WatchErrorCodes; +exports.computed = computed; +exports.customRef = customRef; +exports.effect = effect; +exports.effectScope = effectScope; +exports.enableTracking = enableTracking; +exports.getCurrentScope = getCurrentScope; +exports.getCurrentWatcher = getCurrentWatcher; +exports.isProxy = isProxy; +exports.isReactive = isReactive; +exports.isReadonly = isReadonly; +exports.isRef = isRef; +exports.isShallow = isShallow; +exports.markRaw = markRaw; +exports.onEffectCleanup = onEffectCleanup; +exports.onScopeDispose = onScopeDispose; +exports.onWatcherCleanup = onWatcherCleanup; +exports.pauseTracking = pauseTracking; +exports.proxyRefs = proxyRefs; +exports.reactive = reactive; +exports.reactiveReadArray = reactiveReadArray; +exports.readonly = readonly; +exports.ref = ref; +exports.resetTracking = resetTracking; +exports.shallowReactive = shallowReactive; +exports.shallowReadArray = shallowReadArray; +exports.shallowReadonly = shallowReadonly; +exports.shallowRef = shallowRef; +exports.stop = stop; +exports.toRaw = toRaw; +exports.toReactive = toReactive; +exports.toReadonly = toReadonly; +exports.toRef = toRef; +exports.toRefs = toRefs; +exports.toValue = toValue; +exports.track = track; +exports.traverse = traverse; +exports.trigger = trigger; +exports.triggerRef = triggerRef; +exports.unref = unref; +exports.watch = watch; diff --git a/vuetest/node_modules/@vue/reactivity/dist/reactivity.d.ts b/vuetest/node_modules/@vue/reactivity/dist/reactivity.d.ts new file mode 100644 index 0000000..da9fc95 --- /dev/null +++ b/vuetest/node_modules/@vue/reactivity/dist/reactivity.d.ts @@ -0,0 +1,754 @@ +import { IfAny } from '@vue/shared'; + +export declare enum TrackOpTypes { + GET = "get", + HAS = "has", + ITERATE = "iterate" +} +export declare enum TriggerOpTypes { + SET = "set", + ADD = "add", + DELETE = "delete", + CLEAR = "clear" +} +export declare enum ReactiveFlags { + SKIP = "__v_skip", + IS_REACTIVE = "__v_isReactive", + IS_READONLY = "__v_isReadonly", + IS_SHALLOW = "__v_isShallow", + RAW = "__v_raw", + IS_REF = "__v_isRef" +} + +export type UnwrapNestedRefs<T> = T extends Ref ? T : UnwrapRefSimple<T>; +declare const ReactiveMarkerSymbol: unique symbol; +export interface ReactiveMarker { + [ReactiveMarkerSymbol]?: void; +} +export type Reactive<T> = UnwrapNestedRefs<T> & (T extends readonly any[] ? ReactiveMarker : {}); +/** + * Returns a reactive proxy of the object. + * + * The reactive conversion is "deep": it affects all nested properties. A + * reactive object also deeply unwraps any properties that are refs while + * maintaining reactivity. + * + * @example + * ```js + * const obj = reactive({ count: 0 }) + * ``` + * + * @param target - The source object. + * @see {@link https://vuejs.org/api/reactivity-core.html#reactive} + */ +export declare function reactive<T extends object>(target: T): Reactive<T>; +declare const ShallowReactiveMarker: unique symbol; +export type ShallowReactive<T> = T & { + [ShallowReactiveMarker]?: true; +}; +/** + * Shallow version of {@link reactive()}. + * + * Unlike {@link reactive()}, there is no deep conversion: only root-level + * properties are reactive for a shallow reactive object. Property values are + * stored and exposed as-is - this also means properties with ref values will + * not be automatically unwrapped. + * + * @example + * ```js + * const state = shallowReactive({ + * foo: 1, + * nested: { + * bar: 2 + * } + * }) + * + * // mutating state's own properties is reactive + * state.foo++ + * + * // ...but does not convert nested objects + * isReactive(state.nested) // false + * + * // NOT reactive + * state.nested.bar++ + * ``` + * + * @param target - The source object. + * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreactive} + */ +export declare function shallowReactive<T extends object>(target: T): ShallowReactive<T>; +type Primitive = string | number | boolean | bigint | symbol | undefined | null; +type Builtin = Primitive | Function | Date | Error | RegExp; +export type DeepReadonly<T> = T extends Builtin ? T : T extends Map<infer K, infer V> ? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>> : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>> : T extends WeakMap<infer K, infer V> ? WeakMap<DeepReadonly<K>, DeepReadonly<V>> : T extends Set<infer U> ? ReadonlySet<DeepReadonly<U>> : T extends ReadonlySet<infer U> ? ReadonlySet<DeepReadonly<U>> : T extends WeakSet<infer U> ? WeakSet<DeepReadonly<U>> : T extends Promise<infer U> ? Promise<DeepReadonly<U>> : T extends Ref<infer U, unknown> ? Readonly<Ref<DeepReadonly<U>>> : T extends {} ? { + readonly [K in keyof T]: DeepReadonly<T[K]>; +} : Readonly<T>; +/** + * Takes an object (reactive or plain) or a ref and returns a readonly proxy to + * the original. + * + * A readonly proxy is deep: any nested property accessed will be readonly as + * well. It also has the same ref-unwrapping behavior as {@link reactive()}, + * except the unwrapped values will also be made readonly. + * + * @example + * ```js + * const original = reactive({ count: 0 }) + * + * const copy = readonly(original) + * + * watchEffect(() => { + * // works for reactivity tracking + * console.log(copy.count) + * }) + * + * // mutating original will trigger watchers relying on the copy + * original.count++ + * + * // mutating the copy will fail and result in a warning + * copy.count++ // warning! + * ``` + * + * @param target - The source object. + * @see {@link https://vuejs.org/api/reactivity-core.html#readonly} + */ +export declare function readonly<T extends object>(target: T): DeepReadonly<UnwrapNestedRefs<T>>; +/** + * Shallow version of {@link readonly()}. + * + * Unlike {@link readonly()}, there is no deep conversion: only root-level + * properties are made readonly. Property values are stored and exposed as-is - + * this also means properties with ref values will not be automatically + * unwrapped. + * + * @example + * ```js + * const state = shallowReadonly({ + * foo: 1, + * nested: { + * bar: 2 + * } + * }) + * + * // mutating state's own properties will fail + * state.foo++ + * + * // ...but works on nested objects + * isReadonly(state.nested) // false + * + * // works + * state.nested.bar++ + * ``` + * + * @param target - The source object. + * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreadonly} + */ +export declare function shallowReadonly<T extends object>(target: T): Readonly<T>; +/** + * Checks if an object is a proxy created by {@link reactive()} or + * {@link shallowReactive()} (or {@link ref()} in some cases). + * + * @example + * ```js + * isReactive(reactive({})) // => true + * isReactive(readonly(reactive({}))) // => true + * isReactive(ref({}).value) // => true + * isReactive(readonly(ref({})).value) // => true + * isReactive(ref(true)) // => false + * isReactive(shallowRef({}).value) // => false + * isReactive(shallowReactive({})) // => true + * ``` + * + * @param value - The value to check. + * @see {@link https://vuejs.org/api/reactivity-utilities.html#isreactive} + */ +export declare function isReactive(value: unknown): boolean; +/** + * Checks whether the passed value is a readonly object. The properties of a + * readonly object can change, but they can't be assigned directly via the + * passed object. + * + * The proxies created by {@link readonly()} and {@link shallowReadonly()} are + * both considered readonly, as is a computed ref without a set function. + * + * @param value - The value to check. + * @see {@link https://vuejs.org/api/reactivity-utilities.html#isreadonly} + */ +export declare function isReadonly(value: unknown): boolean; +export declare function isShallow(value: unknown): boolean; +/** + * Checks if an object is a proxy created by {@link reactive}, + * {@link readonly}, {@link shallowReactive} or {@link shallowReadonly()}. + * + * @param value - The value to check. + * @see {@link https://vuejs.org/api/reactivity-utilities.html#isproxy} + */ +export declare function isProxy(value: any): boolean; +/** + * Returns the raw, original object of a Vue-created proxy. + * + * `toRaw()` can return the original object from proxies created by + * {@link reactive()}, {@link readonly()}, {@link shallowReactive()} or + * {@link shallowReadonly()}. + * + * This is an escape hatch that can be used to temporarily read without + * incurring proxy access / tracking overhead or write without triggering + * changes. It is **not** recommended to hold a persistent reference to the + * original object. Use with caution. + * + * @example + * ```js + * const foo = {} + * const reactiveFoo = reactive(foo) + * + * console.log(toRaw(reactiveFoo) === foo) // true + * ``` + * + * @param observed - The object for which the "raw" value is requested. + * @see {@link https://vuejs.org/api/reactivity-advanced.html#toraw} + */ +export declare function toRaw<T>(observed: T): T; +export type Raw<T> = T & { + [RawSymbol]?: true; +}; +/** + * Marks an object so that it will never be converted to a proxy. Returns the + * object itself. + * + * @example + * ```js + * const foo = markRaw({}) + * console.log(isReactive(reactive(foo))) // false + * + * // also works when nested inside other reactive objects + * const bar = reactive({ foo }) + * console.log(isReactive(bar.foo)) // false + * ``` + * + * **Warning:** `markRaw()` together with the shallow APIs such as + * {@link shallowReactive()} allow you to selectively opt-out of the default + * deep reactive/readonly conversion and embed raw, non-proxied objects in your + * state graph. + * + * @param value - The object to be marked as "raw". + * @see {@link https://vuejs.org/api/reactivity-advanced.html#markraw} + */ +export declare function markRaw<T extends object>(value: T): Raw<T>; +/** + * Returns a reactive proxy of the given value (if possible). + * + * If the given value is not an object, the original value itself is returned. + * + * @param value - The value for which a reactive proxy shall be created. + */ +export declare const toReactive: <T extends unknown>(value: T) => T; +/** + * Returns a readonly proxy of the given value (if possible). + * + * If the given value is not an object, the original value itself is returned. + * + * @param value - The value for which a readonly proxy shall be created. + */ +export declare const toReadonly: <T extends unknown>(value: T) => DeepReadonly<T>; + +export type EffectScheduler = (...args: any[]) => any; +export type DebuggerEvent = { + effect: Subscriber; +} & DebuggerEventExtraInfo; +export type DebuggerEventExtraInfo = { + target: object; + type: TrackOpTypes | TriggerOpTypes; + key: any; + newValue?: any; + oldValue?: any; + oldTarget?: Map<any, any> | Set<any>; +}; +export interface DebuggerOptions { + onTrack?: (event: DebuggerEvent) => void; + onTrigger?: (event: DebuggerEvent) => void; +} +export interface ReactiveEffectOptions extends DebuggerOptions { + scheduler?: EffectScheduler; + allowRecurse?: boolean; + onStop?: () => void; +} +export declare enum EffectFlags { + /** + * ReactiveEffect only + */ + ACTIVE = 1, + RUNNING = 2, + TRACKING = 4, + NOTIFIED = 8, + DIRTY = 16, + ALLOW_RECURSE = 32, + PAUSED = 64 +} +/** + * Subscriber is a type that tracks (or subscribes to) a list of deps. + */ +interface Subscriber extends DebuggerOptions { +} +export declare class ReactiveEffect<T = any> implements Subscriber, ReactiveEffectOptions { + fn: () => T; + scheduler?: EffectScheduler; + onStop?: () => void; + onTrack?: (event: DebuggerEvent) => void; + onTrigger?: (event: DebuggerEvent) => void; + constructor(fn: () => T); + pause(): void; + resume(): void; + run(): T; + stop(): void; + trigger(): void; + get dirty(): boolean; +} +export interface ReactiveEffectRunner<T = any> { + (): T; + effect: ReactiveEffect; +} +export interface ReactiveEffectRunner<T = any> { + (): T; + effect: ReactiveEffect; +} +export declare function effect<T = any>(fn: () => T, options?: ReactiveEffectOptions): ReactiveEffectRunner<T>; +/** + * Stops the effect associated with the given runner. + * + * @param runner - Association with the effect to stop tracking. + */ +export declare function stop(runner: ReactiveEffectRunner): void; +/** + * Temporarily pauses tracking. + */ +export declare function pauseTracking(): void; +/** + * Re-enables effect tracking (if it was paused). + */ +export declare function enableTracking(): void; +/** + * Resets the previous global effect tracking state. + */ +export declare function resetTracking(): void; +/** + * Registers a cleanup function for the current active effect. + * The cleanup function is called right before the next effect run, or when the + * effect is stopped. + * + * Throws a warning if there is no current active effect. The warning can be + * suppressed by passing `true` to the second argument. + * + * @param fn - the cleanup function to be registered + * @param failSilently - if `true`, will not throw warning when called without + * an active effect. + */ +export declare function onEffectCleanup(fn: () => void, failSilently?: boolean): void; + +declare const ComputedRefSymbol: unique symbol; +declare const WritableComputedRefSymbol: unique symbol; +interface BaseComputedRef<T, S = T> extends Ref<T, S> { + [ComputedRefSymbol]: true; + /** + * @deprecated computed no longer uses effect + */ + effect: ComputedRefImpl; +} +export interface ComputedRef<T = any> extends BaseComputedRef<T> { + readonly value: T; +} +export interface WritableComputedRef<T, S = T> extends BaseComputedRef<T, S> { + [WritableComputedRefSymbol]: true; +} +export type ComputedGetter<T> = (oldValue?: T) => T; +export type ComputedSetter<T> = (newValue: T) => void; +export interface WritableComputedOptions<T, S = T> { + get: ComputedGetter<T>; + set: ComputedSetter<S>; +} +/** + * @private exported by @vue/reactivity for Vue core use, but not exported from + * the main vue package + */ +export declare class ComputedRefImpl<T = any> implements Subscriber { + fn: ComputedGetter<T>; + private readonly setter; + effect: this; + onTrack?: (event: DebuggerEvent) => void; + onTrigger?: (event: DebuggerEvent) => void; + constructor(fn: ComputedGetter<T>, setter: ComputedSetter<T> | undefined, isSSR: boolean); + get value(): T; + set value(newValue: T); +} +/** + * Takes a getter function and returns a readonly reactive ref object for the + * returned value from the getter. It can also take an object with get and set + * functions to create a writable ref object. + * + * @example + * ```js + * // Creating a readonly computed ref: + * const count = ref(1) + * const plusOne = computed(() => count.value + 1) + * + * console.log(plusOne.value) // 2 + * plusOne.value++ // error + * ``` + * + * ```js + * // Creating a writable computed ref: + * const count = ref(1) + * const plusOne = computed({ + * get: () => count.value + 1, + * set: (val) => { + * count.value = val - 1 + * } + * }) + * + * plusOne.value = 1 + * console.log(count.value) // 0 + * ``` + * + * @param getter - Function that produces the next value. + * @param debugOptions - For debugging. See {@link https://vuejs.org/guide/extras/reactivity-in-depth.html#computed-debugging}. + * @see {@link https://vuejs.org/api/reactivity-core.html#computed} + */ +export declare function computed<T>(getter: ComputedGetter<T>, debugOptions?: DebuggerOptions): ComputedRef<T>; +export declare function computed<T, S = T>(options: WritableComputedOptions<T, S>, debugOptions?: DebuggerOptions): WritableComputedRef<T, S>; + +declare const RefSymbol: unique symbol; +declare const RawSymbol: unique symbol; +export interface Ref<T = any, S = T> { + get value(): T; + set value(_: S); + /** + * Type differentiator only. + * We need this to be in public d.ts but don't want it to show up in IDE + * autocomplete, so we use a private Symbol instead. + */ + [RefSymbol]: true; +} +/** + * Checks if a value is a ref object. + * + * @param r - The value to inspect. + * @see {@link https://vuejs.org/api/reactivity-utilities.html#isref} + */ +export declare function isRef<T>(r: Ref<T> | unknown): r is Ref<T>; +/** + * Takes an inner value and returns a reactive and mutable ref object, which + * has a single property `.value` that points to the inner value. + * + * @param value - The object to wrap in the ref. + * @see {@link https://vuejs.org/api/reactivity-core.html#ref} + */ +export declare function ref<T>(value: T): [T] extends [Ref] ? IfAny<T, Ref<T>, T> : Ref<UnwrapRef<T>, UnwrapRef<T> | T>; +export declare function ref<T = any>(): Ref<T | undefined>; +declare const ShallowRefMarker: unique symbol; +export type ShallowRef<T = any, S = T> = Ref<T, S> & { + [ShallowRefMarker]?: true; +}; +/** + * Shallow version of {@link ref()}. + * + * @example + * ```js + * const state = shallowRef({ count: 1 }) + * + * // does NOT trigger change + * state.value.count = 2 + * + * // does trigger change + * state.value = { count: 2 } + * ``` + * + * @param value - The "inner value" for the shallow ref. + * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowref} + */ +export declare function shallowRef<T>(value: T): Ref extends T ? T extends Ref ? IfAny<T, ShallowRef<T>, T> : ShallowRef<T> : ShallowRef<T>; +export declare function shallowRef<T = any>(): ShallowRef<T | undefined>; +/** + * Force trigger effects that depends on a shallow ref. This is typically used + * after making deep mutations to the inner value of a shallow ref. + * + * @example + * ```js + * const shallow = shallowRef({ + * greet: 'Hello, world' + * }) + * + * // Logs "Hello, world" once for the first run-through + * watchEffect(() => { + * console.log(shallow.value.greet) + * }) + * + * // This won't trigger the effect because the ref is shallow + * shallow.value.greet = 'Hello, universe' + * + * // Logs "Hello, universe" + * triggerRef(shallow) + * ``` + * + * @param ref - The ref whose tied effects shall be executed. + * @see {@link https://vuejs.org/api/reactivity-advanced.html#triggerref} + */ +export declare function triggerRef(ref: Ref): void; +export type MaybeRef<T = any> = T | Ref<T> | ShallowRef<T> | WritableComputedRef<T>; +export type MaybeRefOrGetter<T = any> = MaybeRef<T> | ComputedRef<T> | (() => T); +/** + * Returns the inner value if the argument is a ref, otherwise return the + * argument itself. This is a sugar function for + * `val = isRef(val) ? val.value : val`. + * + * @example + * ```js + * function useFoo(x: number | Ref<number>) { + * const unwrapped = unref(x) + * // unwrapped is guaranteed to be number now + * } + * ``` + * + * @param ref - Ref or plain value to be converted into the plain value. + * @see {@link https://vuejs.org/api/reactivity-utilities.html#unref} + */ +export declare function unref<T>(ref: MaybeRef<T> | ComputedRef<T>): T; +/** + * Normalizes values / refs / getters to values. + * This is similar to {@link unref()}, except that it also normalizes getters. + * If the argument is a getter, it will be invoked and its return value will + * be returned. + * + * @example + * ```js + * toValue(1) // 1 + * toValue(ref(1)) // 1 + * toValue(() => 1) // 1 + * ``` + * + * @param source - A getter, an existing ref, or a non-function value. + * @see {@link https://vuejs.org/api/reactivity-utilities.html#tovalue} + */ +export declare function toValue<T>(source: MaybeRefOrGetter<T>): T; +/** + * Returns a proxy for the given object that shallowly unwraps properties that + * are refs. If the object already is reactive, it's returned as-is. If not, a + * new reactive proxy is created. + * + * @param objectWithRefs - Either an already-reactive object or a simple object + * that contains refs. + */ +export declare function proxyRefs<T extends object>(objectWithRefs: T): ShallowUnwrapRef<T>; +export type CustomRefFactory<T> = (track: () => void, trigger: () => void) => { + get: () => T; + set: (value: T) => void; +}; +/** + * Creates a customized ref with explicit control over its dependency tracking + * and updates triggering. + * + * @param factory - The function that receives the `track` and `trigger` callbacks. + * @see {@link https://vuejs.org/api/reactivity-advanced.html#customref} + */ +export declare function customRef<T>(factory: CustomRefFactory<T>): Ref<T>; +export type ToRefs<T = any> = { + [K in keyof T]: ToRef<T[K]>; +}; +/** + * Converts a reactive object to a plain object where each property of the + * resulting object is a ref pointing to the corresponding property of the + * original object. Each individual ref is created using {@link toRef()}. + * + * @param object - Reactive object to be made into an object of linked refs. + * @see {@link https://vuejs.org/api/reactivity-utilities.html#torefs} + */ +export declare function toRefs<T extends object>(object: T): ToRefs<T>; +export type ToRef<T> = IfAny<T, Ref<T>, [T] extends [Ref] ? T : Ref<T>>; +/** + * Used to normalize values / refs / getters into refs. + * + * @example + * ```js + * // returns existing refs as-is + * toRef(existingRef) + * + * // creates a ref that calls the getter on .value access + * toRef(() => props.foo) + * + * // creates normal refs from non-function values + * // equivalent to ref(1) + * toRef(1) + * ``` + * + * Can also be used to create a ref for a property on a source reactive object. + * The created ref is synced with its source property: mutating the source + * property will update the ref, and vice-versa. + * + * @example + * ```js + * const state = reactive({ + * foo: 1, + * bar: 2 + * }) + * + * const fooRef = toRef(state, 'foo') + * + * // mutating the ref updates the original + * fooRef.value++ + * console.log(state.foo) // 2 + * + * // mutating the original also updates the ref + * state.foo++ + * console.log(fooRef.value) // 3 + * ``` + * + * @param source - A getter, an existing ref, a non-function value, or a + * reactive object to create a property ref from. + * @param [key] - (optional) Name of the property in the reactive object. + * @see {@link https://vuejs.org/api/reactivity-utilities.html#toref} + */ +export declare function toRef<T>(value: T): T extends () => infer R ? Readonly<Ref<R>> : T extends Ref ? T : Ref<UnwrapRef<T>>; +export declare function toRef<T extends object, K extends keyof T>(object: T, key: K): ToRef<T[K]>; +export declare function toRef<T extends object, K extends keyof T>(object: T, key: K, defaultValue: T[K]): ToRef<Exclude<T[K], undefined>>; +/** + * This is a special exported interface for other packages to declare + * additional types that should bail out for ref unwrapping. For example + * \@vue/runtime-dom can declare it like so in its d.ts: + * + * ``` ts + * declare module '@vue/reactivity' { + * export interface RefUnwrapBailTypes { + * runtimeDOMBailTypes: Node | Window + * } + * } + * ``` + */ +export interface RefUnwrapBailTypes { +} +export type ShallowUnwrapRef<T> = { + [K in keyof T]: DistributeRef<T[K]>; +}; +type DistributeRef<T> = T extends Ref<infer V, unknown> ? V : T; +export type UnwrapRef<T> = T extends ShallowRef<infer V, unknown> ? V : T extends Ref<infer V, unknown> ? UnwrapRefSimple<V> : UnwrapRefSimple<T>; +type UnwrapRefSimple<T> = T extends Builtin | Ref | RefUnwrapBailTypes[keyof RefUnwrapBailTypes] | { + [RawSymbol]?: true; +} ? T : T extends Map<infer K, infer V> ? Map<K, UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof Map<any, any>>> : T extends WeakMap<infer K, infer V> ? WeakMap<K, UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof WeakMap<any, any>>> : T extends Set<infer V> ? Set<UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof Set<any>>> : T extends WeakSet<infer V> ? WeakSet<UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof WeakSet<any>>> : T extends ReadonlyArray<any> ? { + [K in keyof T]: UnwrapRefSimple<T[K]>; +} : T extends object & { + [ShallowReactiveMarker]?: never; +} ? { + [P in keyof T]: P extends symbol ? T[P] : UnwrapRef<T[P]>; +} : T; + +export declare const ITERATE_KEY: unique symbol; +export declare const MAP_KEY_ITERATE_KEY: unique symbol; +export declare const ARRAY_ITERATE_KEY: unique symbol; +/** + * Tracks access to a reactive property. + * + * This will check which effect is running at the moment and record it as dep + * which records all effects that depend on the reactive property. + * + * @param target - Object holding the reactive property. + * @param type - Defines the type of access to the reactive property. + * @param key - Identifier of the reactive property to track. + */ +export declare function track(target: object, type: TrackOpTypes, key: unknown): void; +/** + * Finds all deps associated with the target (or a specific property) and + * triggers the effects stored within. + * + * @param target - The reactive object. + * @param type - Defines the type of the operation that needs to trigger effects. + * @param key - Can be used to target a specific reactive property in the target object. + */ +export declare function trigger(target: object, type: TriggerOpTypes, key?: unknown, newValue?: unknown, oldValue?: unknown, oldTarget?: Map<unknown, unknown> | Set<unknown>): void; + +export declare class EffectScope { + detached: boolean; + private _isPaused; + constructor(detached?: boolean); + get active(): boolean; + pause(): void; + /** + * Resumes the effect scope, including all child scopes and effects. + */ + resume(): void; + run<T>(fn: () => T): T | undefined; + stop(fromParent?: boolean): void; +} +/** + * Creates an effect scope object which can capture the reactive effects (i.e. + * computed and watchers) created within it so that these effects can be + * disposed together. For detailed use cases of this API, please consult its + * corresponding {@link https://github.com/vuejs/rfcs/blob/master/active-rfcs/0041-reactivity-effect-scope.md | RFC}. + * + * @param detached - Can be used to create a "detached" effect scope. + * @see {@link https://vuejs.org/api/reactivity-advanced.html#effectscope} + */ +export declare function effectScope(detached?: boolean): EffectScope; +/** + * Returns the current active effect scope if there is one. + * + * @see {@link https://vuejs.org/api/reactivity-advanced.html#getcurrentscope} + */ +export declare function getCurrentScope(): EffectScope | undefined; +/** + * Registers a dispose callback on the current active effect scope. The + * callback will be invoked when the associated effect scope is stopped. + * + * @param fn - The callback function to attach to the scope's cleanup. + * @see {@link https://vuejs.org/api/reactivity-advanced.html#onscopedispose} + */ +export declare function onScopeDispose(fn: () => void, failSilently?: boolean): void; + +/** + * Track array iteration and return: + * - if input is reactive: a cloned raw array with reactive values + * - if input is non-reactive or shallowReactive: the original raw array + */ +export declare function reactiveReadArray<T>(array: T[]): T[]; +/** + * Track array iteration and return raw array + */ +export declare function shallowReadArray<T>(arr: T[]): T[]; + +export declare enum WatchErrorCodes { + WATCH_GETTER = 2, + WATCH_CALLBACK = 3, + WATCH_CLEANUP = 4 +} +export type WatchEffect = (onCleanup: OnCleanup) => void; +export type WatchSource<T = any> = Ref<T, any> | ComputedRef<T> | (() => T); +export type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => any; +export type OnCleanup = (cleanupFn: () => void) => void; +export interface WatchOptions<Immediate = boolean> extends DebuggerOptions { + immediate?: Immediate; + deep?: boolean | number; + once?: boolean; + scheduler?: WatchScheduler; + onWarn?: (msg: string, ...args: any[]) => void; +} +export type WatchStopHandle = () => void; +export interface WatchHandle extends WatchStopHandle { + pause: () => void; + resume: () => void; + stop: () => void; +} +export type WatchScheduler = (job: () => void, isFirstRun: boolean) => void; +/** + * Returns the current active effect if there is one. + */ +export declare function getCurrentWatcher(): ReactiveEffect<any> | undefined; +/** + * Registers a cleanup callback on the current active effect. This + * registered cleanup callback will be invoked right before the + * associated effect re-runs. + * + * @param cleanupFn - The callback function to attach to the effect's cleanup. + * @param failSilently - if `true`, will not throw warning when called without + * an active effect. + * @param owner - The effect that this cleanup function should be attached to. + * By default, the current active effect. + */ +export declare function onWatcherCleanup(cleanupFn: () => void, failSilently?: boolean, owner?: ReactiveEffect | undefined): void; +export declare function watch(source: WatchSource | WatchSource[] | WatchEffect | object, cb?: WatchCallback | null, options?: WatchOptions): WatchHandle; +export declare function traverse(value: unknown, depth?: number, seen?: Set<unknown>): unknown; + diff --git a/vuetest/node_modules/@vue/reactivity/dist/reactivity.esm-browser.js b/vuetest/node_modules/@vue/reactivity/dist/reactivity.esm-browser.js new file mode 100644 index 0000000..ef30911 --- /dev/null +++ b/vuetest/node_modules/@vue/reactivity/dist/reactivity.esm-browser.js @@ -0,0 +1,1938 @@ +/** +* @vue/reactivity v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function makeMap(str) { + const map = /* @__PURE__ */ Object.create(null); + for (const key of str.split(",")) map[key] = 1; + return (val) => val in map; +} + +const EMPTY_OBJ = Object.freeze({}) ; +const NOOP = () => { +}; +const extend = Object.assign; +const remove = (arr, el) => { + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } +}; +const hasOwnProperty$1 = Object.prototype.hasOwnProperty; +const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); +const isArray = Array.isArray; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isFunction = (val) => typeof val === "function"; +const isString = (val) => typeof val === "string"; +const isSymbol = (val) => typeof val === "symbol"; +const isObject = (val) => val !== null && typeof val === "object"; +const objectToString = Object.prototype.toString; +const toTypeString = (value) => objectToString.call(value); +const toRawType = (value) => { + return toTypeString(value).slice(8, -1); +}; +const isPlainObject = (val) => toTypeString(val) === "[object Object]"; +const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +}; +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const hasChanged = (value, oldValue) => !Object.is(value, oldValue); +const def = (obj, key, value, writable = false) => { + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + writable, + value + }); +}; + +function warn(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); +} + +let activeEffectScope; +class EffectScope { + constructor(detached = false) { + this.detached = detached; + /** + * @internal + */ + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this._isPaused = false; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + pause() { + if (this._active) { + this._isPaused = true; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].pause(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].pause(); + } + } + } + /** + * Resumes the effect scope, including all child scopes and effects. + */ + resume() { + if (this._active) { + if (this._isPaused) { + this._isPaused = false; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].resume(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].resume(); + } + } + } + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { + activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn(`cannot run an inactive effect scope.`); + } + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + this._active = false; + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + this.effects.length = 0; + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + this.cleanups.length = 0; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); + } + this.scopes.length = 0; + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + } + } +} +function effectScope(detached) { + return new EffectScope(detached); +} +function getCurrentScope() { + return activeEffectScope; +} +function onScopeDispose(fn, failSilently = false) { + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else if (!failSilently) { + warn( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } +} + +let activeSub; +const EffectFlags = { + "ACTIVE": 1, + "1": "ACTIVE", + "RUNNING": 2, + "2": "RUNNING", + "TRACKING": 4, + "4": "TRACKING", + "NOTIFIED": 8, + "8": "NOTIFIED", + "DIRTY": 16, + "16": "DIRTY", + "ALLOW_RECURSE": 32, + "32": "ALLOW_RECURSE", + "PAUSED": 64, + "64": "PAUSED" +}; +const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); +class ReactiveEffect { + constructor(fn) { + this.fn = fn; + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 1 | 4; + /** + * @internal + */ + this.next = void 0; + /** + * @internal + */ + this.cleanup = void 0; + this.scheduler = void 0; + if (activeEffectScope && activeEffectScope.active) { + activeEffectScope.effects.push(this); + } + } + pause() { + this.flags |= 64; + } + resume() { + if (this.flags & 64) { + this.flags &= ~64; + if (pausedQueueEffects.has(this)) { + pausedQueueEffects.delete(this); + this.trigger(); + } + } + } + /** + * @internal + */ + notify() { + if (this.flags & 2 && !(this.flags & 32)) { + return; + } + if (!(this.flags & 8)) { + batch(this); + } + } + run() { + if (!(this.flags & 1)) { + return this.fn(); + } + this.flags |= 2; + cleanupEffect(this); + prepareDeps(this); + const prevEffect = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = this; + shouldTrack = true; + try { + return this.fn(); + } finally { + if (activeSub !== this) { + warn( + "Active effect was not restored correctly - this is likely a Vue internal bug." + ); + } + cleanupDeps(this); + activeSub = prevEffect; + shouldTrack = prevShouldTrack; + this.flags &= ~2; + } + } + stop() { + if (this.flags & 1) { + for (let link = this.deps; link; link = link.nextDep) { + removeSub(link); + } + this.deps = this.depsTail = void 0; + cleanupEffect(this); + this.onStop && this.onStop(); + this.flags &= ~1; + } + } + trigger() { + if (this.flags & 64) { + pausedQueueEffects.add(this); + } else if (this.scheduler) { + this.scheduler(); + } else { + this.runIfDirty(); + } + } + /** + * @internal + */ + runIfDirty() { + if (isDirty(this)) { + this.run(); + } + } + get dirty() { + return isDirty(this); + } +} +let batchDepth = 0; +let batchedSub; +let batchedComputed; +function batch(sub, isComputed = false) { + sub.flags |= 8; + if (isComputed) { + sub.next = batchedComputed; + batchedComputed = sub; + return; + } + sub.next = batchedSub; + batchedSub = sub; +} +function startBatch() { + batchDepth++; +} +function endBatch() { + if (--batchDepth > 0) { + return; + } + if (batchedComputed) { + let e = batchedComputed; + batchedComputed = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + e = next; + } + } + let error; + while (batchedSub) { + let e = batchedSub; + batchedSub = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + if (e.flags & 1) { + try { + ; + e.trigger(); + } catch (err) { + if (!error) error = err; + } + } + e = next; + } + } + if (error) throw error; +} +function prepareDeps(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + link.version = -1; + link.prevActiveLink = link.dep.activeLink; + link.dep.activeLink = link; + } +} +function cleanupDeps(sub) { + let head; + let tail = sub.depsTail; + let link = tail; + while (link) { + const prev = link.prevDep; + if (link.version === -1) { + if (link === tail) tail = prev; + removeSub(link); + removeDep(link); + } else { + head = link; + } + link.dep.activeLink = link.prevActiveLink; + link.prevActiveLink = void 0; + link = prev; + } + sub.deps = head; + sub.depsTail = tail; +} +function isDirty(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { + return true; + } + } + if (sub._dirty) { + return true; + } + return false; +} +function refreshComputed(computed) { + if (computed.flags & 4 && !(computed.flags & 16)) { + return; + } + computed.flags &= ~16; + if (computed.globalVersion === globalVersion) { + return; + } + computed.globalVersion = globalVersion; + const dep = computed.dep; + computed.flags |= 2; + if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { + computed.flags &= ~2; + return; + } + const prevSub = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = computed; + shouldTrack = true; + try { + prepareDeps(computed); + const value = computed.fn(computed._value); + if (dep.version === 0 || hasChanged(value, computed._value)) { + computed._value = value; + dep.version++; + } + } catch (err) { + dep.version++; + throw err; + } finally { + activeSub = prevSub; + shouldTrack = prevShouldTrack; + cleanupDeps(computed); + computed.flags &= ~2; + } +} +function removeSub(link, soft = false) { + const { dep, prevSub, nextSub } = link; + if (prevSub) { + prevSub.nextSub = nextSub; + link.prevSub = void 0; + } + if (nextSub) { + nextSub.prevSub = prevSub; + link.nextSub = void 0; + } + if (dep.subsHead === link) { + dep.subsHead = nextSub; + } + if (dep.subs === link) { + dep.subs = prevSub; + if (!prevSub && dep.computed) { + dep.computed.flags &= ~4; + for (let l = dep.computed.deps; l; l = l.nextDep) { + removeSub(l, true); + } + } + } + if (!soft && !--dep.sc && dep.map) { + dep.map.delete(dep.key); + } +} +function removeDep(link) { + const { prevDep, nextDep } = link; + if (prevDep) { + prevDep.nextDep = nextDep; + link.prevDep = void 0; + } + if (nextDep) { + nextDep.prevDep = prevDep; + link.nextDep = void 0; + } +} +function effect(fn, options) { + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const e = new ReactiveEffect(fn); + if (options) { + extend(e, options); + } + try { + e.run(); + } catch (err) { + e.stop(); + throw err; + } + const runner = e.run.bind(e); + runner.effect = e; + return runner; +} +function stop(runner) { + runner.effect.stop(); +} +let shouldTrack = true; +const trackStack = []; +function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; +} +function enableTracking() { + trackStack.push(shouldTrack); + shouldTrack = true; +} +function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; +} +function onEffectCleanup(fn, failSilently = false) { + if (activeSub instanceof ReactiveEffect) { + activeSub.cleanup = fn; + } else if (!failSilently) { + warn( + `onEffectCleanup() was called when there was no active effect to associate with.` + ); + } +} +function cleanupEffect(e) { + const { cleanup } = e; + e.cleanup = void 0; + if (cleanup) { + const prevSub = activeSub; + activeSub = void 0; + try { + cleanup(); + } finally { + activeSub = prevSub; + } + } +} + +let globalVersion = 0; +class Link { + constructor(sub, dep) { + this.sub = sub; + this.dep = dep; + this.version = dep.version; + this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; + } +} +class Dep { + constructor(computed) { + this.computed = computed; + this.version = 0; + /** + * Link between this dep and the current active effect + */ + this.activeLink = void 0; + /** + * Doubly linked list representing the subscribing effects (tail) + */ + this.subs = void 0; + /** + * For object property deps cleanup + */ + this.map = void 0; + this.key = void 0; + /** + * Subscriber counter + */ + this.sc = 0; + { + this.subsHead = void 0; + } + } + track(debugInfo) { + if (!activeSub || !shouldTrack || activeSub === this.computed) { + return; + } + let link = this.activeLink; + if (link === void 0 || link.sub !== activeSub) { + link = this.activeLink = new Link(activeSub, this); + if (!activeSub.deps) { + activeSub.deps = activeSub.depsTail = link; + } else { + link.prevDep = activeSub.depsTail; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + } + addSub(link); + } else if (link.version === -1) { + link.version = this.version; + if (link.nextDep) { + const next = link.nextDep; + next.prevDep = link.prevDep; + if (link.prevDep) { + link.prevDep.nextDep = next; + } + link.prevDep = activeSub.depsTail; + link.nextDep = void 0; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + if (activeSub.deps === link) { + activeSub.deps = next; + } + } + } + if (activeSub.onTrack) { + activeSub.onTrack( + extend( + { + effect: activeSub + }, + debugInfo + ) + ); + } + return link; + } + trigger(debugInfo) { + this.version++; + globalVersion++; + this.notify(debugInfo); + } + notify(debugInfo) { + startBatch(); + try { + if (true) { + for (let head = this.subsHead; head; head = head.nextSub) { + if (head.sub.onTrigger && !(head.sub.flags & 8)) { + head.sub.onTrigger( + extend( + { + effect: head.sub + }, + debugInfo + ) + ); + } + } + } + for (let link = this.subs; link; link = link.prevSub) { + if (link.sub.notify()) { + ; + link.sub.dep.notify(); + } + } + } finally { + endBatch(); + } + } +} +function addSub(link) { + link.dep.sc++; + if (link.sub.flags & 4) { + const computed = link.dep.computed; + if (computed && !link.dep.subs) { + computed.flags |= 4 | 16; + for (let l = computed.deps; l; l = l.nextDep) { + addSub(l); + } + } + const currentTail = link.dep.subs; + if (currentTail !== link) { + link.prevSub = currentTail; + if (currentTail) currentTail.nextSub = link; + } + if (link.dep.subsHead === void 0) { + link.dep.subsHead = link; + } + link.dep.subs = link; + } +} +const targetMap = /* @__PURE__ */ new WeakMap(); +const ITERATE_KEY = Symbol( + "Object iterate" +); +const MAP_KEY_ITERATE_KEY = Symbol( + "Map keys iterate" +); +const ARRAY_ITERATE_KEY = Symbol( + "Array iterate" +); +function track(target, type, key) { + if (shouldTrack && activeSub) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = new Dep()); + dep.map = depsMap; + dep.key = key; + } + { + dep.track({ + target, + type, + key + }); + } + } +} +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + globalVersion++; + return; + } + const run = (dep) => { + if (dep) { + { + dep.trigger({ + target, + type, + key, + newValue, + oldValue, + oldTarget + }); + } + } + }; + startBatch(); + if (type === "clear") { + depsMap.forEach(run); + } else { + const targetIsArray = isArray(target); + const isArrayIndex = targetIsArray && isIntegerKey(key); + if (targetIsArray && key === "length") { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { + run(dep); + } + }); + } else { + if (key !== void 0 || depsMap.has(void 0)) { + run(depsMap.get(key)); + } + if (isArrayIndex) { + run(depsMap.get(ARRAY_ITERATE_KEY)); + } + switch (type) { + case "add": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isArrayIndex) { + run(depsMap.get("length")); + } + break; + case "delete": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + run(depsMap.get(ITERATE_KEY)); + } + break; + } + } + } + endBatch(); +} +function getDepFromReactive(object, key) { + const depMap = targetMap.get(object); + return depMap && depMap.get(key); +} + +function reactiveReadArray(array) { + const raw = toRaw(array); + if (raw === array) return raw; + track(raw, "iterate", ARRAY_ITERATE_KEY); + return isShallow(array) ? raw : raw.map(toReactive); +} +function shallowReadArray(arr) { + track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); + return arr; +} +const arrayInstrumentations = { + __proto__: null, + [Symbol.iterator]() { + return iterator(this, Symbol.iterator, toReactive); + }, + concat(...args) { + return reactiveReadArray(this).concat( + ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) + ); + }, + entries() { + return iterator(this, "entries", (value) => { + value[1] = toReactive(value[1]); + return value; + }); + }, + every(fn, thisArg) { + return apply(this, "every", fn, thisArg, void 0, arguments); + }, + filter(fn, thisArg) { + return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); + }, + find(fn, thisArg) { + return apply(this, "find", fn, thisArg, toReactive, arguments); + }, + findIndex(fn, thisArg) { + return apply(this, "findIndex", fn, thisArg, void 0, arguments); + }, + findLast(fn, thisArg) { + return apply(this, "findLast", fn, thisArg, toReactive, arguments); + }, + findLastIndex(fn, thisArg) { + return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); + }, + // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement + forEach(fn, thisArg) { + return apply(this, "forEach", fn, thisArg, void 0, arguments); + }, + includes(...args) { + return searchProxy(this, "includes", args); + }, + indexOf(...args) { + return searchProxy(this, "indexOf", args); + }, + join(separator) { + return reactiveReadArray(this).join(separator); + }, + // keys() iterator only reads `length`, no optimisation required + lastIndexOf(...args) { + return searchProxy(this, "lastIndexOf", args); + }, + map(fn, thisArg) { + return apply(this, "map", fn, thisArg, void 0, arguments); + }, + pop() { + return noTracking(this, "pop"); + }, + push(...args) { + return noTracking(this, "push", args); + }, + reduce(fn, ...args) { + return reduce(this, "reduce", fn, args); + }, + reduceRight(fn, ...args) { + return reduce(this, "reduceRight", fn, args); + }, + shift() { + return noTracking(this, "shift"); + }, + // slice could use ARRAY_ITERATE but also seems to beg for range tracking + some(fn, thisArg) { + return apply(this, "some", fn, thisArg, void 0, arguments); + }, + splice(...args) { + return noTracking(this, "splice", args); + }, + toReversed() { + return reactiveReadArray(this).toReversed(); + }, + toSorted(comparer) { + return reactiveReadArray(this).toSorted(comparer); + }, + toSpliced(...args) { + return reactiveReadArray(this).toSpliced(...args); + }, + unshift(...args) { + return noTracking(this, "unshift", args); + }, + values() { + return iterator(this, "values", toReactive); + } +}; +function iterator(self, method, wrapValue) { + const arr = shallowReadArray(self); + const iter = arr[method](); + if (arr !== self && !isShallow(self)) { + iter._next = iter.next; + iter.next = () => { + const result = iter._next(); + if (result.value) { + result.value = wrapValue(result.value); + } + return result; + }; + } + return iter; +} +const arrayProto = Array.prototype; +function apply(self, method, fn, thisArg, wrappedRetFn, args) { + const arr = shallowReadArray(self); + const needsWrap = arr !== self && !isShallow(self); + const methodFn = arr[method]; + if (methodFn !== arrayProto[method]) { + const result2 = methodFn.apply(self, args); + return needsWrap ? toReactive(result2) : result2; + } + let wrappedFn = fn; + if (arr !== self) { + if (needsWrap) { + wrappedFn = function(item, index) { + return fn.call(this, toReactive(item), index, self); + }; + } else if (fn.length > 2) { + wrappedFn = function(item, index) { + return fn.call(this, item, index, self); + }; + } + } + const result = methodFn.call(arr, wrappedFn, thisArg); + return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; +} +function reduce(self, method, fn, args) { + const arr = shallowReadArray(self); + let wrappedFn = fn; + if (arr !== self) { + if (!isShallow(self)) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, toReactive(item), index, self); + }; + } else if (fn.length > 3) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, item, index, self); + }; + } + } + return arr[method](wrappedFn, ...args); +} +function searchProxy(self, method, args) { + const arr = toRaw(self); + track(arr, "iterate", ARRAY_ITERATE_KEY); + const res = arr[method](...args); + if ((res === -1 || res === false) && isProxy(args[0])) { + args[0] = toRaw(args[0]); + return arr[method](...args); + } + return res; +} +function noTracking(self, method, args = []) { + pauseTracking(); + startBatch(); + const res = toRaw(self)[method].apply(self, args); + endBatch(); + resetTracking(); + return res; +} + +const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); +const builtInSymbols = new Set( + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) +); +function hasOwnProperty(key) { + if (!isSymbol(key)) key = String(key); + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} +class BaseReactiveHandler { + constructor(_isReadonly = false, _isShallow = false) { + this._isReadonly = _isReadonly; + this._isShallow = _isShallow; + } + get(target, key, receiver) { + if (key === "__v_skip") return target["__v_skip"]; + const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return isShallow2; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the receiver is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + let fn; + if (targetIsArray && (fn = arrayInstrumentations[key])) { + return fn; + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get( + target, + key, + // if this is a proxy wrapping a ref, return methods using the raw ref + // as receiver so that we don't have to call `toRaw` on the ref in all + // its class methods + isRef(target) ? target : receiver + ); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (isShallow2) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } +} +class MutableReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(false, isShallow2); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._isShallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set( + target, + key, + value, + isRef(target) ? target : receiver + ); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { + const hadKey = hasOwn(target, key); + const oldValue = target[key]; + const result = Reflect.deleteProperty(target, key); + if (result && hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + } + has(target, key) { + const result = Reflect.has(target, key); + if (!isSymbol(key) || !builtInSymbols.has(key)) { + track(target, "has", key); + } + return result; + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); + return Reflect.ownKeys(target); + } +} +class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(true, isShallow2); + } + set(target, key) { + { + warn( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + deleteProperty(target, key) { + { + warn( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } +} +const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); +const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); +const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); +const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); + +const toShallow = (value) => value; +const getProto = (v) => Reflect.getPrototypeOf(v); +function createIterableMethod(method, isReadonly2, isShallow2) { + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done + }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } + }; + }; +} +function createReadonlyMethod(type) { + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + warn( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; +} +function createInstrumentations(readonly, shallow) { + const instrumentations = { + get(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); + } + track(rawTarget, "get", rawKey); + } + const { has } = getProto(rawTarget); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + if (has.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } + }, + get size() { + const target = this["__v_raw"]; + !readonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); + }, + has(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); + } + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); + }, + forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + !readonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + } + }; + extend( + instrumentations, + readonly ? { + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear") + } : { + add(value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; + }, + set(key, value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; + }, + delete(key) { + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get ? get.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + }, + clear() { + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger( + target, + "clear", + void 0, + void 0, + oldTarget + ); + } + return result; + } + } + ); + const iteratorMethods = [ + "keys", + "values", + "entries", + Symbol.iterator + ]; + iteratorMethods.forEach((method) => { + instrumentations[method] = createIterableMethod(method, readonly, shallow); + }); + return instrumentations; +} +function createInstrumentationGetter(isReadonly2, shallow) { + const instrumentations = createInstrumentations(isReadonly2, shallow); + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; +} +const mutableCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, false) +}; +const shallowCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, true) +}; +const readonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, false) +}; +const shallowReadonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, true) +}; +function checkIdentityKeys(target, has, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has.call(target, rawKey)) { + const type = toRawType(target); + warn( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } +} + +const reactiveMap = /* @__PURE__ */ new WeakMap(); +const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); +const readonlyMap = /* @__PURE__ */ new WeakMap(); +const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); +function targetTypeMap(rawType) { + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } +} +function getTargetType(value) { + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); +} +function reactive(target) { + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); +} +function shallowReactive(target) { + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); +} +function readonly(target) { + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); +} +function shallowReadonly(target) { + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); +} +function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + { + warn( + `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( + target + )}` + ); + } + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; +} +function isReactive(value) { + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); +} +function isReadonly(value) { + return !!(value && value["__v_isReadonly"]); +} +function isShallow(value) { + return !!(value && value["__v_isShallow"]); +} +function isProxy(value) { + return value ? !!value["__v_raw"] : false; +} +function toRaw(observed) { + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; +} +function markRaw(value) { + if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { + def(value, "__v_skip", true); + } + return value; +} +const toReactive = (value) => isObject(value) ? reactive(value) : value; +const toReadonly = (value) => isObject(value) ? readonly(value) : value; + +function isRef(r) { + return r ? r["__v_isRef"] === true : false; +} +function ref(value) { + return createRef(value, false); +} +function shallowRef(value) { + return createRef(value, true); +} +function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); +} +class RefImpl { + constructor(value, isShallow2) { + this.dep = new Dep(); + this["__v_isRef"] = true; + this["__v_isShallow"] = false; + this._rawValue = isShallow2 ? value : toRaw(value); + this._value = isShallow2 ? value : toReactive(value); + this["__v_isShallow"] = isShallow2; + } + get value() { + { + this.dep.track({ + target: this, + type: "get", + key: "value" + }); + } + return this._value; + } + set value(newValue) { + const oldValue = this._rawValue; + const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); + newValue = useDirectValue ? newValue : toRaw(newValue); + if (hasChanged(newValue, oldValue)) { + this._rawValue = newValue; + this._value = useDirectValue ? newValue : toReactive(newValue); + { + this.dep.trigger({ + target: this, + type: "set", + key: "value", + newValue, + oldValue + }); + } + } + } +} +function triggerRef(ref2) { + if (ref2.dep) { + { + ref2.dep.trigger({ + target: ref2, + type: "set", + key: "value", + newValue: ref2._value + }); + } + } +} +function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +} +function toValue(source) { + return isFunction(source) ? source() : unref(source); +} +const shallowUnwrapHandlers = { + get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } +}; +function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); +} +class CustomRefImpl { + constructor(factory) { + this["__v_isRef"] = true; + this._value = void 0; + const dep = this.dep = new Dep(); + const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); + this._get = get; + this._set = set; + } + get value() { + return this._value = this._get(); + } + set value(newVal) { + this._set(newVal); + } +} +function customRef(factory) { + return new CustomRefImpl(factory); +} +function toRefs(object) { + if (!isProxy(object)) { + warn(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; +} +class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this["__v_isRef"] = true; + this._value = void 0; + } + get value() { + const val = this._object[this._key]; + return this._value = val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } +} +class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this["__v_isRef"] = true; + this["__v_isReadonly"] = true; + this._value = void 0; + } + get value() { + return this._value = this._getter(); + } +} +function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } +} +function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); +} + +class ComputedRefImpl { + constructor(fn, setter, isSSR) { + this.fn = fn; + this.setter = setter; + /** + * @internal + */ + this._value = void 0; + /** + * @internal + */ + this.dep = new Dep(this); + /** + * @internal + */ + this.__v_isRef = true; + // TODO isolatedDeclarations "__v_isReadonly" + // A computed is also a subscriber that tracks other deps + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 16; + /** + * @internal + */ + this.globalVersion = globalVersion - 1; + /** + * @internal + */ + this.next = void 0; + // for backwards compat + this.effect = this; + this["__v_isReadonly"] = !setter; + this.isSSR = isSSR; + } + /** + * @internal + */ + notify() { + this.flags |= 16; + if (!(this.flags & 8) && // avoid infinite self recursion + activeSub !== this) { + batch(this, true); + return true; + } + } + get value() { + const link = this.dep.track({ + target: this, + type: "get", + key: "value" + }) ; + refreshComputed(this); + if (link) { + link.version = this.dep.version; + } + return this._value; + } + set value(newValue) { + if (this.setter) { + this.setter(newValue); + } else { + warn("Write operation failed: computed value is readonly"); + } + } +} +function computed(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + if (isFunction(getterOrOptions)) { + getter = getterOrOptions; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, isSSR); + if (debugOptions && !isSSR) { + cRef.onTrack = debugOptions.onTrack; + cRef.onTrigger = debugOptions.onTrigger; + } + return cRef; +} + +const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" +}; +const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" +}; +const ReactiveFlags = { + "SKIP": "__v_skip", + "IS_REACTIVE": "__v_isReactive", + "IS_READONLY": "__v_isReadonly", + "IS_SHALLOW": "__v_isShallow", + "RAW": "__v_raw", + "IS_REF": "__v_isRef" +}; + +const WatchErrorCodes = { + "WATCH_GETTER": 2, + "2": "WATCH_GETTER", + "WATCH_CALLBACK": 3, + "3": "WATCH_CALLBACK", + "WATCH_CLEANUP": 4, + "4": "WATCH_CLEANUP" +}; +const INITIAL_WATCHER_VALUE = {}; +const cleanupMap = /* @__PURE__ */ new WeakMap(); +let activeWatcher = void 0; +function getCurrentWatcher() { + return activeWatcher; +} +function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { + if (owner) { + let cleanups = cleanupMap.get(owner); + if (!cleanups) cleanupMap.set(owner, cleanups = []); + cleanups.push(cleanupFn); + } else if (!failSilently) { + warn( + `onWatcherCleanup() was called when there was no active watcher to associate with.` + ); + } +} +function watch(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, once, scheduler, augmentJob, call } = options; + const warnInvalidSource = (s) => { + (options.onWarn || warn)( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const reactiveGetter = (source2) => { + if (deep) return source2; + if (isShallow(source2) || deep === false || deep === 0) + return traverse(source2, 1); + return traverse(source2); + }; + let effect; + let getter; + let cleanup; + let boundCleanup; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return call ? call(s, 2) : s(); + } else { + warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { + if (cb) { + getter = call ? () => call(source, 2) : source; + } else { + getter = () => { + if (cleanup) { + pauseTracking(); + try { + cleanup(); + } finally { + resetTracking(); + } + } + const currentEffect = activeWatcher; + activeWatcher = effect; + try { + return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); + } finally { + activeWatcher = currentEffect; + } + }; + } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + const depth = deep === true ? Infinity : deep; + getter = () => traverse(baseGetter(), depth); + } + const scope = getCurrentScope(); + const watchHandle = () => { + effect.stop(); + if (scope && scope.active) { + remove(scope.effects, effect); + } + }; + if (once && cb) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + watchHandle(); + }; + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = (immediateFirstRun) => { + if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { + if (cleanup) { + cleanup(); + } + const currentWatcher = activeWatcher; + activeWatcher = effect; + try { + const args = [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + boundCleanup + ]; + call ? call(cb, 3, args) : ( + // @ts-expect-error + cb(...args) + ); + oldValue = newValue; + } finally { + activeWatcher = currentWatcher; + } + } + } else { + effect.run(); + } + }; + if (augmentJob) { + augmentJob(job); + } + effect = new ReactiveEffect(getter); + effect.scheduler = scheduler ? () => scheduler(job, false) : job; + boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); + cleanup = effect.onStop = () => { + const cleanups = cleanupMap.get(effect); + if (cleanups) { + if (call) { + call(cleanups, 4); + } else { + for (const cleanup2 of cleanups) cleanup2(); + } + cleanupMap.delete(effect); + } + }; + { + effect.onTrack = options.onTrack; + effect.onTrigger = options.onTrigger; + } + if (cb) { + if (immediate) { + job(true); + } else { + oldValue = effect.run(); + } + } else if (scheduler) { + scheduler(job.bind(null, true), true); + } else { + effect.run(); + } + watchHandle.pause = effect.pause.bind(effect); + watchHandle.resume = effect.resume.bind(effect); + watchHandle.stop = watchHandle; + return watchHandle; +} +function traverse(value, depth = Infinity, seen) { + if (depth <= 0 || !isObject(value) || value["__v_skip"]) { + return value; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + depth--; + if (isRef(value)) { + traverse(value.value, depth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, seen); + } + for (const key of Object.getOwnPropertySymbols(value)) { + if (Object.prototype.propertyIsEnumerable.call(value, key)) { + traverse(value[key], depth, seen); + } + } + } + return value; +} + +export { ARRAY_ITERATE_KEY, EffectFlags, EffectScope, ITERATE_KEY, MAP_KEY_ITERATE_KEY, ReactiveEffect, ReactiveFlags, TrackOpTypes, TriggerOpTypes, WatchErrorCodes, computed, customRef, effect, effectScope, enableTracking, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onEffectCleanup, onScopeDispose, onWatcherCleanup, pauseTracking, proxyRefs, reactive, reactiveReadArray, readonly, ref, resetTracking, shallowReactive, shallowReadArray, shallowReadonly, shallowRef, stop, toRaw, toReactive, toReadonly, toRef, toRefs, toValue, track, traverse, trigger, triggerRef, unref, watch }; diff --git a/vuetest/node_modules/@vue/reactivity/dist/reactivity.esm-browser.prod.js b/vuetest/node_modules/@vue/reactivity/dist/reactivity.esm-browser.prod.js new file mode 100644 index 0000000..fc57b0a --- /dev/null +++ b/vuetest/node_modules/@vue/reactivity/dist/reactivity.esm-browser.prod.js @@ -0,0 +1,5 @@ +/** +* @vue/reactivity v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let e,t,i,s,r;let n={},l=()=>{},a=Object.assign,o=(e,t)=>{let i=e.indexOf(t);i>-1&&e.splice(i,1)},u=Object.prototype.hasOwnProperty,h=(e,t)=>u.call(e,t),c=Array.isArray,f=e=>"[object Map]"===R(e),p=e=>"[object Set]"===R(e),d=e=>"function"==typeof e,_=e=>"string"==typeof e,v=e=>"symbol"==typeof e,g=e=>null!==e&&"object"==typeof e,y=Object.prototype.toString,R=e=>y.call(e),b=e=>R(e).slice(8,-1),w=e=>"[object Object]"===R(e),S=e=>_(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,x=(e,t)=>!Object.is(e,t),E=(e,t,i,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:i})};class m{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=e,!t&&e&&(this.index=(e.scopes||(e.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(t){if(this._active){let i=e;try{return e=this,t()}finally{e=i}}}on(){e=this}off(){e=this.parent}stop(e){if(this._active){let t,i;for(t=0,this._active=!1,i=this.effects.length;t<i;t++)this.effects[t].stop();for(t=0,this.effects.length=0,i=this.cleanups.length;t<i;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,i=this.scopes.length;t<i;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}function T(e){return new m(e)}function k(){return e}function A(t,i=!1){e&&e.cleanups.push(t)}let D={ACTIVE:1,1:"ACTIVE",RUNNING:2,2:"RUNNING",TRACKING:4,4:"TRACKING",NOTIFIED:8,8:"NOTIFIED",DIRTY:16,16:"DIRTY",ALLOW_RECURSE:32,32:"ALLOW_RECURSE",PAUSED:64,64:"PAUSED"},O=new WeakSet;class I{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,e&&e.active&&e.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,O.has(this)&&(O.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||j(this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,q(this),P(this);let e=t,i=U;t=this,U=!0;try{return this.fn()}finally{W(this),t=e,U=i,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)K(e);this.deps=this.depsTail=void 0,q(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?O.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){N(this)&&this.run()}get dirty(){return N(this)}}let L=0;function j(e,t=!1){if(e.flags|=8,t){e.next=s,s=e;return}e.next=i,i=e}function C(){let e;if(!(--L>0)){if(s){let e=s;for(s=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}for(;i;){let t=i;for(i=void 0;t;){let i=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=i}}if(e)throw e}}function P(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function W(e){let t;let i=e.depsTail,s=i;for(;s;){let e=s.prevDep;-1===s.version?(s===i&&(i=e),K(s),function(e){let{prevDep:t,nextDep:i}=e;t&&(t.nextDep=i,e.prevDep=void 0),i&&(i.prevDep=t,e.nextDep=void 0)}(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=e}e.deps=t,e.depsTail=i}function N(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(V(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function V(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===J))return;e.globalVersion=J;let i=e.dep;if(e.flags|=2,i.version>0&&!e.isSSR&&e.deps&&!N(e)){e.flags&=-3;return}let s=t,r=U;t=e,U=!0;try{P(e);let t=e.fn(e._value);(0===i.version||x(t,e._value))&&(e._value=t,i.version++)}catch(e){throw i.version++,e}finally{t=s,U=r,W(e),e.flags&=-3}}function K(e,t=!1){let{dep:i,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),i.subs===e&&(i.subs=s,!s&&i.computed)){i.computed.flags&=-5;for(let e=i.computed.deps;e;e=e.nextDep)K(e,!0)}t||--i.sc||!i.map||i.map.delete(i.key)}function M(e,t){e.effect instanceof I&&(e=e.effect.fn);let i=new I(e);t&&a(i,t);try{i.run()}catch(e){throw i.stop(),e}let s=i.run.bind(i);return s.effect=i,s}function H(e){e.effect.stop()}let U=!0,Y=[];function G(){Y.push(U),U=!1}function F(){Y.push(U),U=!0}function z(){let e=Y.pop();U=void 0===e||e}function B(e,i=!1){t instanceof I&&(t.cleanup=e)}function q(e){let{cleanup:i}=e;if(e.cleanup=void 0,i){let e=t;t=void 0;try{i()}finally{t=e}}}let J=0;class Q{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class X{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!t||!U||t===this.computed)return;let i=this.activeLink;if(void 0===i||i.sub!==t)i=this.activeLink=new Q(t,this),t.deps?(i.prevDep=t.depsTail,t.depsTail.nextDep=i,t.depsTail=i):t.deps=t.depsTail=i,function e(t){if(t.dep.sc++,4&t.sub.flags){let i=t.dep.computed;if(i&&!t.dep.subs){i.flags|=20;for(let t=i.deps;t;t=t.nextDep)e(t)}let s=t.dep.subs;s!==t&&(t.prevSub=s,s&&(s.nextSub=t)),t.dep.subs=t}}(i);else if(-1===i.version&&(i.version=this.version,i.nextDep)){let e=i.nextDep;e.prevDep=i.prevDep,i.prevDep&&(i.prevDep.nextDep=e),i.prevDep=t.depsTail,i.nextDep=void 0,t.depsTail.nextDep=i,t.depsTail=i,t.deps===i&&(t.deps=e)}return i}trigger(e){this.version++,J++,this.notify(e)}notify(e){L++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{C()}}}let Z=new WeakMap,$=Symbol(""),ee=Symbol(""),et=Symbol("");function ei(e,i,s){if(U&&t){let t=Z.get(e);t||Z.set(e,t=new Map);let i=t.get(s);i||(t.set(s,i=new X),i.map=t,i.key=s),i.track()}}function es(e,t,i,s,r,n){let l=Z.get(e);if(!l){J++;return}let a=e=>{e&&e.trigger()};if(L++,"clear"===t)l.forEach(a);else{let r=c(e),n=r&&S(i);if(r&&"length"===i){let e=Number(s);l.forEach((t,i)=>{("length"===i||i===et||!v(i)&&i>=e)&&a(t)})}else switch((void 0!==i||l.has(void 0))&&a(l.get(i)),n&&a(l.get(et)),t){case"add":r?n&&a(l.get("length")):(a(l.get($)),f(e)&&a(l.get(ee)));break;case"delete":!r&&(a(l.get($)),f(e)&&a(l.get(ee)));break;case"set":f(e)&&a(l.get($))}}C()}function er(e){let t=eG(e);return t===e?t:(ei(t,"iterate",et),eU(e)?t:t.map(ez))}function en(e){return ei(e=eG(e),"iterate",et),e}let el={__proto__:null,[Symbol.iterator](){return ea(this,Symbol.iterator,ez)},concat(...e){return er(this).concat(...e.map(e=>c(e)?er(e):e))},entries(){return ea(this,"entries",e=>(e[1]=ez(e[1]),e))},every(e,t){return eu(this,"every",e,t,void 0,arguments)},filter(e,t){return eu(this,"filter",e,t,e=>e.map(ez),arguments)},find(e,t){return eu(this,"find",e,t,ez,arguments)},findIndex(e,t){return eu(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return eu(this,"findLast",e,t,ez,arguments)},findLastIndex(e,t){return eu(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return eu(this,"forEach",e,t,void 0,arguments)},includes(...e){return ec(this,"includes",e)},indexOf(...e){return ec(this,"indexOf",e)},join(e){return er(this).join(e)},lastIndexOf(...e){return ec(this,"lastIndexOf",e)},map(e,t){return eu(this,"map",e,t,void 0,arguments)},pop(){return ef(this,"pop")},push(...e){return ef(this,"push",e)},reduce(e,...t){return eh(this,"reduce",e,t)},reduceRight(e,...t){return eh(this,"reduceRight",e,t)},shift(){return ef(this,"shift")},some(e,t){return eu(this,"some",e,t,void 0,arguments)},splice(...e){return ef(this,"splice",e)},toReversed(){return er(this).toReversed()},toSorted(e){return er(this).toSorted(e)},toSpliced(...e){return er(this).toSpliced(...e)},unshift(...e){return ef(this,"unshift",e)},values(){return ea(this,"values",ez)}};function ea(e,t,i){let s=en(e),r=s[t]();return s===e||eU(e)||(r._next=r.next,r.next=()=>{let e=r._next();return e.value&&(e.value=i(e.value)),e}),r}let eo=Array.prototype;function eu(e,t,i,s,r,n){let l=en(e),a=l!==e&&!eU(e),o=l[t];if(o!==eo[t]){let t=o.apply(e,n);return a?ez(t):t}let u=i;l!==e&&(a?u=function(t,s){return i.call(this,ez(t),s,e)}:i.length>2&&(u=function(t,s){return i.call(this,t,s,e)}));let h=o.call(l,u,s);return a&&r?r(h):h}function eh(e,t,i,s){let r=en(e),n=i;return r!==e&&(eU(e)?i.length>3&&(n=function(t,s,r){return i.call(this,t,s,r,e)}):n=function(t,s,r){return i.call(this,t,ez(s),r,e)}),r[t](n,...s)}function ec(e,t,i){let s=eG(e);ei(s,"iterate",et);let r=s[t](...i);return(-1===r||!1===r)&&eY(i[0])?(i[0]=eG(i[0]),s[t](...i)):r}function ef(e,t,i=[]){G(),L++;let s=eG(e)[t].apply(e,i);return C(),z(),s}let ep=function(e){let t=Object.create(null);for(let i of e.split(","))t[i]=1;return e=>e in t}("__proto__,__v_isRef,__isVue"),ed=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(v));function e_(e){v(e)||(e=String(e));let t=eG(this);return ei(t,"has",e),t.hasOwnProperty(e)}class ev{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){if("__v_skip"===t)return e.__v_skip;let s=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return r;if("__v_raw"===t)return i===(s?r?eC:ej:r?eL:eI).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;let n=c(e);if(!s){let e;if(n&&(e=el[t]))return e;if("hasOwnProperty"===t)return e_}let l=Reflect.get(e,t,eq(e)?e:i);return(v(t)?ed.has(t):ep(t))?l:(s||ei(e,"get",t),r)?l:eq(l)?n&&S(t)?l:l.value:g(l)?s?eN(l):eP(l):l}}class eg extends ev{constructor(e=!1){super(!1,e)}set(e,t,i,s){let r=e[t];if(!this._isShallow){let t=eH(r);if(eU(i)||eH(i)||(r=eG(r),i=eG(i)),!c(e)&&eq(r)&&!eq(i))return!t&&(r.value=i,!0)}let n=c(e)&&S(t)?Number(t)<e.length:h(e,t),l=Reflect.set(e,t,i,eq(e)?e:s);return e===eG(s)&&(n?x(i,r)&&es(e,"set",t,i):es(e,"add",t,i)),l}deleteProperty(e,t){let i=h(e,t);e[t];let s=Reflect.deleteProperty(e,t);return s&&i&&es(e,"delete",t,void 0),s}has(e,t){let i=Reflect.has(e,t);return v(t)&&ed.has(t)||ei(e,"has",t),i}ownKeys(e){return ei(e,"iterate",c(e)?"length":$),Reflect.ownKeys(e)}}class ey extends ev{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}let eR=new eg,eb=new ey,ew=new eg(!0),eS=new ey(!0),ex=e=>e,eE=e=>Reflect.getPrototypeOf(e);function em(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function eT(e,t){let i=function(e,t){let i={get(i){let s=this.__v_raw,r=eG(s),n=eG(i);e||(x(i,n)&&ei(r,"get",i),ei(r,"get",n));let{has:l}=eE(r),a=t?ex:e?eB:ez;return l.call(r,i)?a(s.get(i)):l.call(r,n)?a(s.get(n)):void(s!==r&&s.get(i))},get size(){let t=this.__v_raw;return e||ei(eG(t),"iterate",$),Reflect.get(t,"size",t)},has(t){let i=this.__v_raw,s=eG(i),r=eG(t);return e||(x(t,r)&&ei(s,"has",t),ei(s,"has",r)),t===r?i.has(t):i.has(t)||i.has(r)},forEach(i,s){let r=this,n=r.__v_raw,l=eG(n),a=t?ex:e?eB:ez;return e||ei(l,"iterate",$),n.forEach((e,t)=>i.call(s,a(e),a(t),r))}};return a(i,e?{add:em("add"),set:em("set"),delete:em("delete"),clear:em("clear")}:{add(e){t||eU(e)||eH(e)||(e=eG(e));let i=eG(this);return eE(i).has.call(i,e)||(i.add(e),es(i,"add",e,e)),this},set(e,i){t||eU(i)||eH(i)||(i=eG(i));let s=eG(this),{has:r,get:n}=eE(s),l=r.call(s,e);l||(e=eG(e),l=r.call(s,e));let a=n.call(s,e);return s.set(e,i),l?x(i,a)&&es(s,"set",e,i):es(s,"add",e,i),this},delete(e){let t=eG(this),{has:i,get:s}=eE(t),r=i.call(t,e);r||(e=eG(e),r=i.call(t,e)),s&&s.call(t,e);let n=t.delete(e);return r&&es(t,"delete",e,void 0),n},clear(){let e=eG(this),t=0!==e.size,i=e.clear();return t&&es(e,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{i[s]=function(...i){let r=this.__v_raw,n=eG(r),l=f(n),a="entries"===s||s===Symbol.iterator&&l,o=r[s](...i),u=t?ex:e?eB:ez;return e||ei(n,"iterate","keys"===s&&l?ee:$),{next(){let{value:e,done:t}=o.next();return t?{value:e,done:t}:{value:a?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}),i}(e,t);return(t,s,r)=>"__v_isReactive"===s?!e:"__v_isReadonly"===s?e:"__v_raw"===s?t:Reflect.get(h(i,s)&&s in t?i:t,s,r)}let ek={get:eT(!1,!1)},eA={get:eT(!1,!0)},eD={get:eT(!0,!1)},eO={get:eT(!0,!0)},eI=new WeakMap,eL=new WeakMap,ej=new WeakMap,eC=new WeakMap;function eP(e){return eH(e)?e:eK(e,!1,eR,ek,eI)}function eW(e){return eK(e,!1,ew,eA,eL)}function eN(e){return eK(e,!0,eb,eD,ej)}function eV(e){return eK(e,!0,eS,eO,eC)}function eK(e,t,i,s,r){if(!g(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let n=r.get(e);if(n)return n;let l=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(b(e));if(0===l)return e;let a=new Proxy(e,2===l?s:i);return r.set(e,a),a}function eM(e){return eH(e)?eM(e.__v_raw):!!(e&&e.__v_isReactive)}function eH(e){return!!(e&&e.__v_isReadonly)}function eU(e){return!!(e&&e.__v_isShallow)}function eY(e){return!!e&&!!e.__v_raw}function eG(e){let t=e&&e.__v_raw;return t?eG(t):e}function eF(e){return!h(e,"__v_skip")&&Object.isExtensible(e)&&E(e,"__v_skip",!0),e}let ez=e=>g(e)?eP(e):e,eB=e=>g(e)?eN(e):e;function eq(e){return!!e&&!0===e.__v_isRef}function eJ(e){return eX(e,!1)}function eQ(e){return eX(e,!0)}function eX(e,t){return eq(e)?e:new eZ(e,t)}class eZ{constructor(e,t){this.dep=new X,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:eG(e),this._value=t?e:ez(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,i=this.__v_isShallow||eU(e)||eH(e);x(e=i?e:eG(e),t)&&(this._rawValue=e,this._value=i?e:ez(e),this.dep.trigger())}}function e$(e){e.dep&&e.dep.trigger()}function e0(e){return eq(e)?e.value:e}function e1(e){return d(e)?e():e0(e)}let e2={get:(e,t,i)=>"__v_raw"===t?e:e0(Reflect.get(e,t,i)),set:(e,t,i,s)=>{let r=e[t];return eq(r)&&!eq(i)?(r.value=i,!0):Reflect.set(e,t,i,s)}};function e4(e){return eM(e)?e:new Proxy(e,e2)}class e3{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new X,{get:i,set:s}=e(t.track.bind(t),t.trigger.bind(t));this._get=i,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}}function e6(e){return new e3(e)}function e8(e){let t=c(e)?Array(e.length):{};for(let i in e)t[i]=te(e,i);return t}class e5{constructor(e,t,i){this._object=e,this._key=t,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){let i=Z.get(e);return i&&i.get(t)}(eG(this._object),this._key)}}class e9{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function e7(e,t,i){return eq(e)?e:d(e)?new e9(e):g(e)&&arguments.length>1?te(e,t,i):eJ(e)}function te(e,t,i){let s=e[t];return eq(s)?s:new e5(e,t,i)}class tt{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new X(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=J-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(8&this.flags)&&t!==this)return j(this,!0),!0}get value(){let e=this.dep.track();return V(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function ti(e,t,i=!1){let s,r;return d(e)?s=e:(s=e.get,r=e.set),new tt(s,r,i)}let ts={GET:"get",HAS:"has",ITERATE:"iterate"},tr={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},tn={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw",IS_REF:"__v_isRef"},tl={WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP"},ta={},to=new WeakMap;function tu(){return r}function th(e,t=!1,i=r){if(i){let t=to.get(i);t||to.set(i,t=[]),t.push(e)}}function tc(e,t,i=n){let s,a,u,h;let{immediate:f,deep:p,once:_,scheduler:v,augmentJob:g,call:y}=i,R=e=>p?e:eU(e)||!1===p||0===p?tf(e,1):tf(e),b=!1,w=!1;if(eq(e)?(a=()=>e.value,b=eU(e)):eM(e)?(a=()=>R(e),b=!0):c(e)?(w=!0,b=e.some(e=>eM(e)||eU(e)),a=()=>e.map(e=>eq(e)?e.value:eM(e)?R(e):d(e)?y?y(e,2):e():void 0)):a=d(e)?t?y?()=>y(e,2):e:()=>{if(u){G();try{u()}finally{z()}}let t=r;r=s;try{return y?y(e,3,[h]):e(h)}finally{r=t}}:l,t&&p){let e=a,t=!0===p?1/0:p;a=()=>tf(e(),t)}let S=k(),E=()=>{s.stop(),S&&S.active&&o(S.effects,s)};if(_&&t){let e=t;t=(...t)=>{e(...t),E()}}let m=w?Array(e.length).fill(ta):ta,T=e=>{if(1&s.flags&&(s.dirty||e)){if(t){let e=s.run();if(p||b||(w?e.some((e,t)=>x(e,m[t])):x(e,m))){u&&u();let i=r;r=s;try{let i=[e,m===ta?void 0:w&&m[0]===ta?[]:m,h];y?y(t,3,i):t(...i),m=e}finally{r=i}}}else s.run()}};return g&&g(T),(s=new I(a)).scheduler=v?()=>v(T,!1):T,h=e=>th(e,!1,s),u=s.onStop=()=>{let e=to.get(s);if(e){if(y)y(e,4);else for(let t of e)t();to.delete(s)}},t?f?T(!0):m=s.run():v?v(T.bind(null,!0),!0):s.run(),E.pause=s.pause.bind(s),E.resume=s.resume.bind(s),E.stop=E,E}function tf(e,t=1/0,i){if(t<=0||!g(e)||e.__v_skip||(i=i||new Set).has(e))return e;if(i.add(e),t--,eq(e))tf(e.value,t,i);else if(c(e))for(let s=0;s<e.length;s++)tf(e[s],t,i);else if(p(e)||f(e))e.forEach(e=>{tf(e,t,i)});else if(w(e)){for(let s in e)tf(e[s],t,i);for(let s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&tf(e[s],t,i)}return e}export{et as ARRAY_ITERATE_KEY,D as EffectFlags,m as EffectScope,$ as ITERATE_KEY,ee as MAP_KEY_ITERATE_KEY,I as ReactiveEffect,tn as ReactiveFlags,ts as TrackOpTypes,tr as TriggerOpTypes,tl as WatchErrorCodes,ti as computed,e6 as customRef,M as effect,T as effectScope,F as enableTracking,k as getCurrentScope,tu as getCurrentWatcher,eY as isProxy,eM as isReactive,eH as isReadonly,eq as isRef,eU as isShallow,eF as markRaw,B as onEffectCleanup,A as onScopeDispose,th as onWatcherCleanup,G as pauseTracking,e4 as proxyRefs,eP as reactive,er as reactiveReadArray,eN as readonly,eJ as ref,z as resetTracking,eW as shallowReactive,en as shallowReadArray,eV as shallowReadonly,eQ as shallowRef,H as stop,eG as toRaw,ez as toReactive,eB as toReadonly,e7 as toRef,e8 as toRefs,e1 as toValue,ei as track,tf as traverse,es as trigger,e$ as triggerRef,e0 as unref,tc as watch}; diff --git a/vuetest/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js b/vuetest/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js new file mode 100644 index 0000000..8f8a91b --- /dev/null +++ b/vuetest/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js @@ -0,0 +1,1896 @@ +/** +* @vue/reactivity v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +import { hasChanged, extend, isArray, isIntegerKey, isSymbol, isMap, hasOwn, isObject, makeMap, toRawType, capitalize, def, isFunction, EMPTY_OBJ, isSet, isPlainObject, NOOP, remove } from '@vue/shared'; + +function warn(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); +} + +let activeEffectScope; +class EffectScope { + constructor(detached = false) { + this.detached = detached; + /** + * @internal + */ + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this._isPaused = false; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + pause() { + if (this._active) { + this._isPaused = true; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].pause(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].pause(); + } + } + } + /** + * Resumes the effect scope, including all child scopes and effects. + */ + resume() { + if (this._active) { + if (this._isPaused) { + this._isPaused = false; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].resume(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].resume(); + } + } + } + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { + activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else if (!!(process.env.NODE_ENV !== "production")) { + warn(`cannot run an inactive effect scope.`); + } + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + this._active = false; + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + this.effects.length = 0; + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + this.cleanups.length = 0; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); + } + this.scopes.length = 0; + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + } + } +} +function effectScope(detached) { + return new EffectScope(detached); +} +function getCurrentScope() { + return activeEffectScope; +} +function onScopeDispose(fn, failSilently = false) { + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else if (!!(process.env.NODE_ENV !== "production") && !failSilently) { + warn( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } +} + +let activeSub; +const EffectFlags = { + "ACTIVE": 1, + "1": "ACTIVE", + "RUNNING": 2, + "2": "RUNNING", + "TRACKING": 4, + "4": "TRACKING", + "NOTIFIED": 8, + "8": "NOTIFIED", + "DIRTY": 16, + "16": "DIRTY", + "ALLOW_RECURSE": 32, + "32": "ALLOW_RECURSE", + "PAUSED": 64, + "64": "PAUSED" +}; +const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); +class ReactiveEffect { + constructor(fn) { + this.fn = fn; + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 1 | 4; + /** + * @internal + */ + this.next = void 0; + /** + * @internal + */ + this.cleanup = void 0; + this.scheduler = void 0; + if (activeEffectScope && activeEffectScope.active) { + activeEffectScope.effects.push(this); + } + } + pause() { + this.flags |= 64; + } + resume() { + if (this.flags & 64) { + this.flags &= ~64; + if (pausedQueueEffects.has(this)) { + pausedQueueEffects.delete(this); + this.trigger(); + } + } + } + /** + * @internal + */ + notify() { + if (this.flags & 2 && !(this.flags & 32)) { + return; + } + if (!(this.flags & 8)) { + batch(this); + } + } + run() { + if (!(this.flags & 1)) { + return this.fn(); + } + this.flags |= 2; + cleanupEffect(this); + prepareDeps(this); + const prevEffect = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = this; + shouldTrack = true; + try { + return this.fn(); + } finally { + if (!!(process.env.NODE_ENV !== "production") && activeSub !== this) { + warn( + "Active effect was not restored correctly - this is likely a Vue internal bug." + ); + } + cleanupDeps(this); + activeSub = prevEffect; + shouldTrack = prevShouldTrack; + this.flags &= ~2; + } + } + stop() { + if (this.flags & 1) { + for (let link = this.deps; link; link = link.nextDep) { + removeSub(link); + } + this.deps = this.depsTail = void 0; + cleanupEffect(this); + this.onStop && this.onStop(); + this.flags &= ~1; + } + } + trigger() { + if (this.flags & 64) { + pausedQueueEffects.add(this); + } else if (this.scheduler) { + this.scheduler(); + } else { + this.runIfDirty(); + } + } + /** + * @internal + */ + runIfDirty() { + if (isDirty(this)) { + this.run(); + } + } + get dirty() { + return isDirty(this); + } +} +let batchDepth = 0; +let batchedSub; +let batchedComputed; +function batch(sub, isComputed = false) { + sub.flags |= 8; + if (isComputed) { + sub.next = batchedComputed; + batchedComputed = sub; + return; + } + sub.next = batchedSub; + batchedSub = sub; +} +function startBatch() { + batchDepth++; +} +function endBatch() { + if (--batchDepth > 0) { + return; + } + if (batchedComputed) { + let e = batchedComputed; + batchedComputed = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + e = next; + } + } + let error; + while (batchedSub) { + let e = batchedSub; + batchedSub = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + if (e.flags & 1) { + try { + ; + e.trigger(); + } catch (err) { + if (!error) error = err; + } + } + e = next; + } + } + if (error) throw error; +} +function prepareDeps(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + link.version = -1; + link.prevActiveLink = link.dep.activeLink; + link.dep.activeLink = link; + } +} +function cleanupDeps(sub) { + let head; + let tail = sub.depsTail; + let link = tail; + while (link) { + const prev = link.prevDep; + if (link.version === -1) { + if (link === tail) tail = prev; + removeSub(link); + removeDep(link); + } else { + head = link; + } + link.dep.activeLink = link.prevActiveLink; + link.prevActiveLink = void 0; + link = prev; + } + sub.deps = head; + sub.depsTail = tail; +} +function isDirty(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { + return true; + } + } + if (sub._dirty) { + return true; + } + return false; +} +function refreshComputed(computed) { + if (computed.flags & 4 && !(computed.flags & 16)) { + return; + } + computed.flags &= ~16; + if (computed.globalVersion === globalVersion) { + return; + } + computed.globalVersion = globalVersion; + const dep = computed.dep; + computed.flags |= 2; + if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { + computed.flags &= ~2; + return; + } + const prevSub = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = computed; + shouldTrack = true; + try { + prepareDeps(computed); + const value = computed.fn(computed._value); + if (dep.version === 0 || hasChanged(value, computed._value)) { + computed._value = value; + dep.version++; + } + } catch (err) { + dep.version++; + throw err; + } finally { + activeSub = prevSub; + shouldTrack = prevShouldTrack; + cleanupDeps(computed); + computed.flags &= ~2; + } +} +function removeSub(link, soft = false) { + const { dep, prevSub, nextSub } = link; + if (prevSub) { + prevSub.nextSub = nextSub; + link.prevSub = void 0; + } + if (nextSub) { + nextSub.prevSub = prevSub; + link.nextSub = void 0; + } + if (!!(process.env.NODE_ENV !== "production") && dep.subsHead === link) { + dep.subsHead = nextSub; + } + if (dep.subs === link) { + dep.subs = prevSub; + if (!prevSub && dep.computed) { + dep.computed.flags &= ~4; + for (let l = dep.computed.deps; l; l = l.nextDep) { + removeSub(l, true); + } + } + } + if (!soft && !--dep.sc && dep.map) { + dep.map.delete(dep.key); + } +} +function removeDep(link) { + const { prevDep, nextDep } = link; + if (prevDep) { + prevDep.nextDep = nextDep; + link.prevDep = void 0; + } + if (nextDep) { + nextDep.prevDep = prevDep; + link.nextDep = void 0; + } +} +function effect(fn, options) { + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const e = new ReactiveEffect(fn); + if (options) { + extend(e, options); + } + try { + e.run(); + } catch (err) { + e.stop(); + throw err; + } + const runner = e.run.bind(e); + runner.effect = e; + return runner; +} +function stop(runner) { + runner.effect.stop(); +} +let shouldTrack = true; +const trackStack = []; +function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; +} +function enableTracking() { + trackStack.push(shouldTrack); + shouldTrack = true; +} +function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; +} +function onEffectCleanup(fn, failSilently = false) { + if (activeSub instanceof ReactiveEffect) { + activeSub.cleanup = fn; + } else if (!!(process.env.NODE_ENV !== "production") && !failSilently) { + warn( + `onEffectCleanup() was called when there was no active effect to associate with.` + ); + } +} +function cleanupEffect(e) { + const { cleanup } = e; + e.cleanup = void 0; + if (cleanup) { + const prevSub = activeSub; + activeSub = void 0; + try { + cleanup(); + } finally { + activeSub = prevSub; + } + } +} + +let globalVersion = 0; +class Link { + constructor(sub, dep) { + this.sub = sub; + this.dep = dep; + this.version = dep.version; + this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; + } +} +class Dep { + constructor(computed) { + this.computed = computed; + this.version = 0; + /** + * Link between this dep and the current active effect + */ + this.activeLink = void 0; + /** + * Doubly linked list representing the subscribing effects (tail) + */ + this.subs = void 0; + /** + * For object property deps cleanup + */ + this.map = void 0; + this.key = void 0; + /** + * Subscriber counter + */ + this.sc = 0; + if (!!(process.env.NODE_ENV !== "production")) { + this.subsHead = void 0; + } + } + track(debugInfo) { + if (!activeSub || !shouldTrack || activeSub === this.computed) { + return; + } + let link = this.activeLink; + if (link === void 0 || link.sub !== activeSub) { + link = this.activeLink = new Link(activeSub, this); + if (!activeSub.deps) { + activeSub.deps = activeSub.depsTail = link; + } else { + link.prevDep = activeSub.depsTail; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + } + addSub(link); + } else if (link.version === -1) { + link.version = this.version; + if (link.nextDep) { + const next = link.nextDep; + next.prevDep = link.prevDep; + if (link.prevDep) { + link.prevDep.nextDep = next; + } + link.prevDep = activeSub.depsTail; + link.nextDep = void 0; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + if (activeSub.deps === link) { + activeSub.deps = next; + } + } + } + if (!!(process.env.NODE_ENV !== "production") && activeSub.onTrack) { + activeSub.onTrack( + extend( + { + effect: activeSub + }, + debugInfo + ) + ); + } + return link; + } + trigger(debugInfo) { + this.version++; + globalVersion++; + this.notify(debugInfo); + } + notify(debugInfo) { + startBatch(); + try { + if (!!(process.env.NODE_ENV !== "production")) { + for (let head = this.subsHead; head; head = head.nextSub) { + if (head.sub.onTrigger && !(head.sub.flags & 8)) { + head.sub.onTrigger( + extend( + { + effect: head.sub + }, + debugInfo + ) + ); + } + } + } + for (let link = this.subs; link; link = link.prevSub) { + if (link.sub.notify()) { + ; + link.sub.dep.notify(); + } + } + } finally { + endBatch(); + } + } +} +function addSub(link) { + link.dep.sc++; + if (link.sub.flags & 4) { + const computed = link.dep.computed; + if (computed && !link.dep.subs) { + computed.flags |= 4 | 16; + for (let l = computed.deps; l; l = l.nextDep) { + addSub(l); + } + } + const currentTail = link.dep.subs; + if (currentTail !== link) { + link.prevSub = currentTail; + if (currentTail) currentTail.nextSub = link; + } + if (!!(process.env.NODE_ENV !== "production") && link.dep.subsHead === void 0) { + link.dep.subsHead = link; + } + link.dep.subs = link; + } +} +const targetMap = /* @__PURE__ */ new WeakMap(); +const ITERATE_KEY = Symbol( + !!(process.env.NODE_ENV !== "production") ? "Object iterate" : "" +); +const MAP_KEY_ITERATE_KEY = Symbol( + !!(process.env.NODE_ENV !== "production") ? "Map keys iterate" : "" +); +const ARRAY_ITERATE_KEY = Symbol( + !!(process.env.NODE_ENV !== "production") ? "Array iterate" : "" +); +function track(target, type, key) { + if (shouldTrack && activeSub) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = new Dep()); + dep.map = depsMap; + dep.key = key; + } + if (!!(process.env.NODE_ENV !== "production")) { + dep.track({ + target, + type, + key + }); + } else { + dep.track(); + } + } +} +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + globalVersion++; + return; + } + const run = (dep) => { + if (dep) { + if (!!(process.env.NODE_ENV !== "production")) { + dep.trigger({ + target, + type, + key, + newValue, + oldValue, + oldTarget + }); + } else { + dep.trigger(); + } + } + }; + startBatch(); + if (type === "clear") { + depsMap.forEach(run); + } else { + const targetIsArray = isArray(target); + const isArrayIndex = targetIsArray && isIntegerKey(key); + if (targetIsArray && key === "length") { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { + run(dep); + } + }); + } else { + if (key !== void 0 || depsMap.has(void 0)) { + run(depsMap.get(key)); + } + if (isArrayIndex) { + run(depsMap.get(ARRAY_ITERATE_KEY)); + } + switch (type) { + case "add": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isArrayIndex) { + run(depsMap.get("length")); + } + break; + case "delete": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + run(depsMap.get(ITERATE_KEY)); + } + break; + } + } + } + endBatch(); +} +function getDepFromReactive(object, key) { + const depMap = targetMap.get(object); + return depMap && depMap.get(key); +} + +function reactiveReadArray(array) { + const raw = toRaw(array); + if (raw === array) return raw; + track(raw, "iterate", ARRAY_ITERATE_KEY); + return isShallow(array) ? raw : raw.map(toReactive); +} +function shallowReadArray(arr) { + track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); + return arr; +} +const arrayInstrumentations = { + __proto__: null, + [Symbol.iterator]() { + return iterator(this, Symbol.iterator, toReactive); + }, + concat(...args) { + return reactiveReadArray(this).concat( + ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) + ); + }, + entries() { + return iterator(this, "entries", (value) => { + value[1] = toReactive(value[1]); + return value; + }); + }, + every(fn, thisArg) { + return apply(this, "every", fn, thisArg, void 0, arguments); + }, + filter(fn, thisArg) { + return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); + }, + find(fn, thisArg) { + return apply(this, "find", fn, thisArg, toReactive, arguments); + }, + findIndex(fn, thisArg) { + return apply(this, "findIndex", fn, thisArg, void 0, arguments); + }, + findLast(fn, thisArg) { + return apply(this, "findLast", fn, thisArg, toReactive, arguments); + }, + findLastIndex(fn, thisArg) { + return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); + }, + // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement + forEach(fn, thisArg) { + return apply(this, "forEach", fn, thisArg, void 0, arguments); + }, + includes(...args) { + return searchProxy(this, "includes", args); + }, + indexOf(...args) { + return searchProxy(this, "indexOf", args); + }, + join(separator) { + return reactiveReadArray(this).join(separator); + }, + // keys() iterator only reads `length`, no optimisation required + lastIndexOf(...args) { + return searchProxy(this, "lastIndexOf", args); + }, + map(fn, thisArg) { + return apply(this, "map", fn, thisArg, void 0, arguments); + }, + pop() { + return noTracking(this, "pop"); + }, + push(...args) { + return noTracking(this, "push", args); + }, + reduce(fn, ...args) { + return reduce(this, "reduce", fn, args); + }, + reduceRight(fn, ...args) { + return reduce(this, "reduceRight", fn, args); + }, + shift() { + return noTracking(this, "shift"); + }, + // slice could use ARRAY_ITERATE but also seems to beg for range tracking + some(fn, thisArg) { + return apply(this, "some", fn, thisArg, void 0, arguments); + }, + splice(...args) { + return noTracking(this, "splice", args); + }, + toReversed() { + return reactiveReadArray(this).toReversed(); + }, + toSorted(comparer) { + return reactiveReadArray(this).toSorted(comparer); + }, + toSpliced(...args) { + return reactiveReadArray(this).toSpliced(...args); + }, + unshift(...args) { + return noTracking(this, "unshift", args); + }, + values() { + return iterator(this, "values", toReactive); + } +}; +function iterator(self, method, wrapValue) { + const arr = shallowReadArray(self); + const iter = arr[method](); + if (arr !== self && !isShallow(self)) { + iter._next = iter.next; + iter.next = () => { + const result = iter._next(); + if (result.value) { + result.value = wrapValue(result.value); + } + return result; + }; + } + return iter; +} +const arrayProto = Array.prototype; +function apply(self, method, fn, thisArg, wrappedRetFn, args) { + const arr = shallowReadArray(self); + const needsWrap = arr !== self && !isShallow(self); + const methodFn = arr[method]; + if (methodFn !== arrayProto[method]) { + const result2 = methodFn.apply(self, args); + return needsWrap ? toReactive(result2) : result2; + } + let wrappedFn = fn; + if (arr !== self) { + if (needsWrap) { + wrappedFn = function(item, index) { + return fn.call(this, toReactive(item), index, self); + }; + } else if (fn.length > 2) { + wrappedFn = function(item, index) { + return fn.call(this, item, index, self); + }; + } + } + const result = methodFn.call(arr, wrappedFn, thisArg); + return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; +} +function reduce(self, method, fn, args) { + const arr = shallowReadArray(self); + let wrappedFn = fn; + if (arr !== self) { + if (!isShallow(self)) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, toReactive(item), index, self); + }; + } else if (fn.length > 3) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, item, index, self); + }; + } + } + return arr[method](wrappedFn, ...args); +} +function searchProxy(self, method, args) { + const arr = toRaw(self); + track(arr, "iterate", ARRAY_ITERATE_KEY); + const res = arr[method](...args); + if ((res === -1 || res === false) && isProxy(args[0])) { + args[0] = toRaw(args[0]); + return arr[method](...args); + } + return res; +} +function noTracking(self, method, args = []) { + pauseTracking(); + startBatch(); + const res = toRaw(self)[method].apply(self, args); + endBatch(); + resetTracking(); + return res; +} + +const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); +const builtInSymbols = new Set( + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) +); +function hasOwnProperty(key) { + if (!isSymbol(key)) key = String(key); + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} +class BaseReactiveHandler { + constructor(_isReadonly = false, _isShallow = false) { + this._isReadonly = _isReadonly; + this._isShallow = _isShallow; + } + get(target, key, receiver) { + if (key === "__v_skip") return target["__v_skip"]; + const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return isShallow2; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the receiver is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + let fn; + if (targetIsArray && (fn = arrayInstrumentations[key])) { + return fn; + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get( + target, + key, + // if this is a proxy wrapping a ref, return methods using the raw ref + // as receiver so that we don't have to call `toRaw` on the ref in all + // its class methods + isRef(target) ? target : receiver + ); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (isShallow2) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } +} +class MutableReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(false, isShallow2); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._isShallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set( + target, + key, + value, + isRef(target) ? target : receiver + ); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { + const hadKey = hasOwn(target, key); + const oldValue = target[key]; + const result = Reflect.deleteProperty(target, key); + if (result && hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + } + has(target, key) { + const result = Reflect.has(target, key); + if (!isSymbol(key) || !builtInSymbols.has(key)) { + track(target, "has", key); + } + return result; + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); + return Reflect.ownKeys(target); + } +} +class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(true, isShallow2); + } + set(target, key) { + if (!!(process.env.NODE_ENV !== "production")) { + warn( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + deleteProperty(target, key) { + if (!!(process.env.NODE_ENV !== "production")) { + warn( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } +} +const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); +const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); +const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); +const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); + +const toShallow = (value) => value; +const getProto = (v) => Reflect.getPrototypeOf(v); +function createIterableMethod(method, isReadonly2, isShallow2) { + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done + }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } + }; + }; +} +function createReadonlyMethod(type) { + return function(...args) { + if (!!(process.env.NODE_ENV !== "production")) { + const key = args[0] ? `on key "${args[0]}" ` : ``; + warn( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; +} +function createInstrumentations(readonly, shallow) { + const instrumentations = { + get(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); + } + track(rawTarget, "get", rawKey); + } + const { has } = getProto(rawTarget); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + if (has.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } + }, + get size() { + const target = this["__v_raw"]; + !readonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); + }, + has(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); + } + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); + }, + forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + !readonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + } + }; + extend( + instrumentations, + readonly ? { + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear") + } : { + add(value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; + }, + set(key, value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else if (!!(process.env.NODE_ENV !== "production")) { + checkIdentityKeys(target, has, key); + } + const oldValue = get.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; + }, + delete(key) { + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else if (!!(process.env.NODE_ENV !== "production")) { + checkIdentityKeys(target, has, key); + } + const oldValue = get ? get.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + }, + clear() { + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = !!(process.env.NODE_ENV !== "production") ? isMap(target) ? new Map(target) : new Set(target) : void 0; + const result = target.clear(); + if (hadItems) { + trigger( + target, + "clear", + void 0, + void 0, + oldTarget + ); + } + return result; + } + } + ); + const iteratorMethods = [ + "keys", + "values", + "entries", + Symbol.iterator + ]; + iteratorMethods.forEach((method) => { + instrumentations[method] = createIterableMethod(method, readonly, shallow); + }); + return instrumentations; +} +function createInstrumentationGetter(isReadonly2, shallow) { + const instrumentations = createInstrumentations(isReadonly2, shallow); + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; +} +const mutableCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, false) +}; +const shallowCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, true) +}; +const readonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, false) +}; +const shallowReadonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, true) +}; +function checkIdentityKeys(target, has, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has.call(target, rawKey)) { + const type = toRawType(target); + warn( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } +} + +const reactiveMap = /* @__PURE__ */ new WeakMap(); +const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); +const readonlyMap = /* @__PURE__ */ new WeakMap(); +const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); +function targetTypeMap(rawType) { + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } +} +function getTargetType(value) { + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); +} +function reactive(target) { + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); +} +function shallowReactive(target) { + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); +} +function readonly(target) { + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); +} +function shallowReadonly(target) { + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); +} +function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + if (!!(process.env.NODE_ENV !== "production")) { + warn( + `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( + target + )}` + ); + } + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; +} +function isReactive(value) { + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); +} +function isReadonly(value) { + return !!(value && value["__v_isReadonly"]); +} +function isShallow(value) { + return !!(value && value["__v_isShallow"]); +} +function isProxy(value) { + return value ? !!value["__v_raw"] : false; +} +function toRaw(observed) { + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; +} +function markRaw(value) { + if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { + def(value, "__v_skip", true); + } + return value; +} +const toReactive = (value) => isObject(value) ? reactive(value) : value; +const toReadonly = (value) => isObject(value) ? readonly(value) : value; + +function isRef(r) { + return r ? r["__v_isRef"] === true : false; +} +function ref(value) { + return createRef(value, false); +} +function shallowRef(value) { + return createRef(value, true); +} +function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); +} +class RefImpl { + constructor(value, isShallow2) { + this.dep = new Dep(); + this["__v_isRef"] = true; + this["__v_isShallow"] = false; + this._rawValue = isShallow2 ? value : toRaw(value); + this._value = isShallow2 ? value : toReactive(value); + this["__v_isShallow"] = isShallow2; + } + get value() { + if (!!(process.env.NODE_ENV !== "production")) { + this.dep.track({ + target: this, + type: "get", + key: "value" + }); + } else { + this.dep.track(); + } + return this._value; + } + set value(newValue) { + const oldValue = this._rawValue; + const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); + newValue = useDirectValue ? newValue : toRaw(newValue); + if (hasChanged(newValue, oldValue)) { + this._rawValue = newValue; + this._value = useDirectValue ? newValue : toReactive(newValue); + if (!!(process.env.NODE_ENV !== "production")) { + this.dep.trigger({ + target: this, + type: "set", + key: "value", + newValue, + oldValue + }); + } else { + this.dep.trigger(); + } + } + } +} +function triggerRef(ref2) { + if (ref2.dep) { + if (!!(process.env.NODE_ENV !== "production")) { + ref2.dep.trigger({ + target: ref2, + type: "set", + key: "value", + newValue: ref2._value + }); + } else { + ref2.dep.trigger(); + } + } +} +function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +} +function toValue(source) { + return isFunction(source) ? source() : unref(source); +} +const shallowUnwrapHandlers = { + get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } +}; +function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); +} +class CustomRefImpl { + constructor(factory) { + this["__v_isRef"] = true; + this._value = void 0; + const dep = this.dep = new Dep(); + const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); + this._get = get; + this._set = set; + } + get value() { + return this._value = this._get(); + } + set value(newVal) { + this._set(newVal); + } +} +function customRef(factory) { + return new CustomRefImpl(factory); +} +function toRefs(object) { + if (!!(process.env.NODE_ENV !== "production") && !isProxy(object)) { + warn(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; +} +class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this["__v_isRef"] = true; + this._value = void 0; + } + get value() { + const val = this._object[this._key]; + return this._value = val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } +} +class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this["__v_isRef"] = true; + this["__v_isReadonly"] = true; + this._value = void 0; + } + get value() { + return this._value = this._getter(); + } +} +function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } +} +function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); +} + +class ComputedRefImpl { + constructor(fn, setter, isSSR) { + this.fn = fn; + this.setter = setter; + /** + * @internal + */ + this._value = void 0; + /** + * @internal + */ + this.dep = new Dep(this); + /** + * @internal + */ + this.__v_isRef = true; + // TODO isolatedDeclarations "__v_isReadonly" + // A computed is also a subscriber that tracks other deps + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 16; + /** + * @internal + */ + this.globalVersion = globalVersion - 1; + /** + * @internal + */ + this.next = void 0; + // for backwards compat + this.effect = this; + this["__v_isReadonly"] = !setter; + this.isSSR = isSSR; + } + /** + * @internal + */ + notify() { + this.flags |= 16; + if (!(this.flags & 8) && // avoid infinite self recursion + activeSub !== this) { + batch(this, true); + return true; + } else if (!!(process.env.NODE_ENV !== "production")) ; + } + get value() { + const link = !!(process.env.NODE_ENV !== "production") ? this.dep.track({ + target: this, + type: "get", + key: "value" + }) : this.dep.track(); + refreshComputed(this); + if (link) { + link.version = this.dep.version; + } + return this._value; + } + set value(newValue) { + if (this.setter) { + this.setter(newValue); + } else if (!!(process.env.NODE_ENV !== "production")) { + warn("Write operation failed: computed value is readonly"); + } + } +} +function computed(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + if (isFunction(getterOrOptions)) { + getter = getterOrOptions; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, isSSR); + if (!!(process.env.NODE_ENV !== "production") && debugOptions && !isSSR) { + cRef.onTrack = debugOptions.onTrack; + cRef.onTrigger = debugOptions.onTrigger; + } + return cRef; +} + +const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" +}; +const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" +}; +const ReactiveFlags = { + "SKIP": "__v_skip", + "IS_REACTIVE": "__v_isReactive", + "IS_READONLY": "__v_isReadonly", + "IS_SHALLOW": "__v_isShallow", + "RAW": "__v_raw", + "IS_REF": "__v_isRef" +}; + +const WatchErrorCodes = { + "WATCH_GETTER": 2, + "2": "WATCH_GETTER", + "WATCH_CALLBACK": 3, + "3": "WATCH_CALLBACK", + "WATCH_CLEANUP": 4, + "4": "WATCH_CLEANUP" +}; +const INITIAL_WATCHER_VALUE = {}; +const cleanupMap = /* @__PURE__ */ new WeakMap(); +let activeWatcher = void 0; +function getCurrentWatcher() { + return activeWatcher; +} +function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { + if (owner) { + let cleanups = cleanupMap.get(owner); + if (!cleanups) cleanupMap.set(owner, cleanups = []); + cleanups.push(cleanupFn); + } else if (!!(process.env.NODE_ENV !== "production") && !failSilently) { + warn( + `onWatcherCleanup() was called when there was no active watcher to associate with.` + ); + } +} +function watch(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, once, scheduler, augmentJob, call } = options; + const warnInvalidSource = (s) => { + (options.onWarn || warn)( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const reactiveGetter = (source2) => { + if (deep) return source2; + if (isShallow(source2) || deep === false || deep === 0) + return traverse(source2, 1); + return traverse(source2); + }; + let effect; + let getter; + let cleanup; + let boundCleanup; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return call ? call(s, 2) : s(); + } else { + !!(process.env.NODE_ENV !== "production") && warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { + if (cb) { + getter = call ? () => call(source, 2) : source; + } else { + getter = () => { + if (cleanup) { + pauseTracking(); + try { + cleanup(); + } finally { + resetTracking(); + } + } + const currentEffect = activeWatcher; + activeWatcher = effect; + try { + return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); + } finally { + activeWatcher = currentEffect; + } + }; + } + } else { + getter = NOOP; + !!(process.env.NODE_ENV !== "production") && warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + const depth = deep === true ? Infinity : deep; + getter = () => traverse(baseGetter(), depth); + } + const scope = getCurrentScope(); + const watchHandle = () => { + effect.stop(); + if (scope && scope.active) { + remove(scope.effects, effect); + } + }; + if (once && cb) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + watchHandle(); + }; + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = (immediateFirstRun) => { + if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { + if (cleanup) { + cleanup(); + } + const currentWatcher = activeWatcher; + activeWatcher = effect; + try { + const args = [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + boundCleanup + ]; + call ? call(cb, 3, args) : ( + // @ts-expect-error + cb(...args) + ); + oldValue = newValue; + } finally { + activeWatcher = currentWatcher; + } + } + } else { + effect.run(); + } + }; + if (augmentJob) { + augmentJob(job); + } + effect = new ReactiveEffect(getter); + effect.scheduler = scheduler ? () => scheduler(job, false) : job; + boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); + cleanup = effect.onStop = () => { + const cleanups = cleanupMap.get(effect); + if (cleanups) { + if (call) { + call(cleanups, 4); + } else { + for (const cleanup2 of cleanups) cleanup2(); + } + cleanupMap.delete(effect); + } + }; + if (!!(process.env.NODE_ENV !== "production")) { + effect.onTrack = options.onTrack; + effect.onTrigger = options.onTrigger; + } + if (cb) { + if (immediate) { + job(true); + } else { + oldValue = effect.run(); + } + } else if (scheduler) { + scheduler(job.bind(null, true), true); + } else { + effect.run(); + } + watchHandle.pause = effect.pause.bind(effect); + watchHandle.resume = effect.resume.bind(effect); + watchHandle.stop = watchHandle; + return watchHandle; +} +function traverse(value, depth = Infinity, seen) { + if (depth <= 0 || !isObject(value) || value["__v_skip"]) { + return value; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + depth--; + if (isRef(value)) { + traverse(value.value, depth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, seen); + } + for (const key of Object.getOwnPropertySymbols(value)) { + if (Object.prototype.propertyIsEnumerable.call(value, key)) { + traverse(value[key], depth, seen); + } + } + } + return value; +} + +export { ARRAY_ITERATE_KEY, EffectFlags, EffectScope, ITERATE_KEY, MAP_KEY_ITERATE_KEY, ReactiveEffect, ReactiveFlags, TrackOpTypes, TriggerOpTypes, WatchErrorCodes, computed, customRef, effect, effectScope, enableTracking, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onEffectCleanup, onScopeDispose, onWatcherCleanup, pauseTracking, proxyRefs, reactive, reactiveReadArray, readonly, ref, resetTracking, shallowReactive, shallowReadArray, shallowReadonly, shallowRef, stop, toRaw, toReactive, toReadonly, toRef, toRefs, toValue, track, traverse, trigger, triggerRef, unref, watch }; diff --git a/vuetest/node_modules/@vue/reactivity/dist/reactivity.global.js b/vuetest/node_modules/@vue/reactivity/dist/reactivity.global.js new file mode 100644 index 0000000..c6d17c1 --- /dev/null +++ b/vuetest/node_modules/@vue/reactivity/dist/reactivity.global.js @@ -0,0 +1,1994 @@ +/** +* @vue/reactivity v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +var VueReactivity = (function (exports) { + 'use strict'; + + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function makeMap(str) { + const map = /* @__PURE__ */ Object.create(null); + for (const key of str.split(",")) map[key] = 1; + return (val) => val in map; + } + + const EMPTY_OBJ = Object.freeze({}) ; + const NOOP = () => { + }; + const extend = Object.assign; + const remove = (arr, el) => { + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } + }; + const hasOwnProperty$1 = Object.prototype.hasOwnProperty; + const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); + const isArray = Array.isArray; + const isMap = (val) => toTypeString(val) === "[object Map]"; + const isSet = (val) => toTypeString(val) === "[object Set]"; + const isFunction = (val) => typeof val === "function"; + const isString = (val) => typeof val === "string"; + const isSymbol = (val) => typeof val === "symbol"; + const isObject = (val) => val !== null && typeof val === "object"; + const objectToString = Object.prototype.toString; + const toTypeString = (value) => objectToString.call(value); + const toRawType = (value) => { + return toTypeString(value).slice(8, -1); + }; + const isPlainObject = (val) => toTypeString(val) === "[object Object]"; + const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; + const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; + }; + const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); + }); + const hasChanged = (value, oldValue) => !Object.is(value, oldValue); + const def = (obj, key, value, writable = false) => { + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + writable, + value + }); + }; + + function warn(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); + } + + let activeEffectScope; + class EffectScope { + constructor(detached = false) { + this.detached = detached; + /** + * @internal + */ + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this._isPaused = false; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + pause() { + if (this._active) { + this._isPaused = true; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].pause(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].pause(); + } + } + } + /** + * Resumes the effect scope, including all child scopes and effects. + */ + resume() { + if (this._active) { + if (this._isPaused) { + this._isPaused = false; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].resume(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].resume(); + } + } + } + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { + activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn(`cannot run an inactive effect scope.`); + } + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + this._active = false; + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + this.effects.length = 0; + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + this.cleanups.length = 0; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); + } + this.scopes.length = 0; + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + } + } + } + function effectScope(detached) { + return new EffectScope(detached); + } + function getCurrentScope() { + return activeEffectScope; + } + function onScopeDispose(fn, failSilently = false) { + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else if (!failSilently) { + warn( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } + } + + let activeSub; + const EffectFlags = { + "ACTIVE": 1, + "1": "ACTIVE", + "RUNNING": 2, + "2": "RUNNING", + "TRACKING": 4, + "4": "TRACKING", + "NOTIFIED": 8, + "8": "NOTIFIED", + "DIRTY": 16, + "16": "DIRTY", + "ALLOW_RECURSE": 32, + "32": "ALLOW_RECURSE", + "PAUSED": 64, + "64": "PAUSED" + }; + const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); + class ReactiveEffect { + constructor(fn) { + this.fn = fn; + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 1 | 4; + /** + * @internal + */ + this.next = void 0; + /** + * @internal + */ + this.cleanup = void 0; + this.scheduler = void 0; + if (activeEffectScope && activeEffectScope.active) { + activeEffectScope.effects.push(this); + } + } + pause() { + this.flags |= 64; + } + resume() { + if (this.flags & 64) { + this.flags &= ~64; + if (pausedQueueEffects.has(this)) { + pausedQueueEffects.delete(this); + this.trigger(); + } + } + } + /** + * @internal + */ + notify() { + if (this.flags & 2 && !(this.flags & 32)) { + return; + } + if (!(this.flags & 8)) { + batch(this); + } + } + run() { + if (!(this.flags & 1)) { + return this.fn(); + } + this.flags |= 2; + cleanupEffect(this); + prepareDeps(this); + const prevEffect = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = this; + shouldTrack = true; + try { + return this.fn(); + } finally { + if (activeSub !== this) { + warn( + "Active effect was not restored correctly - this is likely a Vue internal bug." + ); + } + cleanupDeps(this); + activeSub = prevEffect; + shouldTrack = prevShouldTrack; + this.flags &= ~2; + } + } + stop() { + if (this.flags & 1) { + for (let link = this.deps; link; link = link.nextDep) { + removeSub(link); + } + this.deps = this.depsTail = void 0; + cleanupEffect(this); + this.onStop && this.onStop(); + this.flags &= ~1; + } + } + trigger() { + if (this.flags & 64) { + pausedQueueEffects.add(this); + } else if (this.scheduler) { + this.scheduler(); + } else { + this.runIfDirty(); + } + } + /** + * @internal + */ + runIfDirty() { + if (isDirty(this)) { + this.run(); + } + } + get dirty() { + return isDirty(this); + } + } + let batchDepth = 0; + let batchedSub; + let batchedComputed; + function batch(sub, isComputed = false) { + sub.flags |= 8; + if (isComputed) { + sub.next = batchedComputed; + batchedComputed = sub; + return; + } + sub.next = batchedSub; + batchedSub = sub; + } + function startBatch() { + batchDepth++; + } + function endBatch() { + if (--batchDepth > 0) { + return; + } + if (batchedComputed) { + let e = batchedComputed; + batchedComputed = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + e = next; + } + } + let error; + while (batchedSub) { + let e = batchedSub; + batchedSub = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + if (e.flags & 1) { + try { + ; + e.trigger(); + } catch (err) { + if (!error) error = err; + } + } + e = next; + } + } + if (error) throw error; + } + function prepareDeps(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + link.version = -1; + link.prevActiveLink = link.dep.activeLink; + link.dep.activeLink = link; + } + } + function cleanupDeps(sub) { + let head; + let tail = sub.depsTail; + let link = tail; + while (link) { + const prev = link.prevDep; + if (link.version === -1) { + if (link === tail) tail = prev; + removeSub(link); + removeDep(link); + } else { + head = link; + } + link.dep.activeLink = link.prevActiveLink; + link.prevActiveLink = void 0; + link = prev; + } + sub.deps = head; + sub.depsTail = tail; + } + function isDirty(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { + return true; + } + } + if (sub._dirty) { + return true; + } + return false; + } + function refreshComputed(computed) { + if (computed.flags & 4 && !(computed.flags & 16)) { + return; + } + computed.flags &= ~16; + if (computed.globalVersion === globalVersion) { + return; + } + computed.globalVersion = globalVersion; + const dep = computed.dep; + computed.flags |= 2; + if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { + computed.flags &= ~2; + return; + } + const prevSub = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = computed; + shouldTrack = true; + try { + prepareDeps(computed); + const value = computed.fn(computed._value); + if (dep.version === 0 || hasChanged(value, computed._value)) { + computed._value = value; + dep.version++; + } + } catch (err) { + dep.version++; + throw err; + } finally { + activeSub = prevSub; + shouldTrack = prevShouldTrack; + cleanupDeps(computed); + computed.flags &= ~2; + } + } + function removeSub(link, soft = false) { + const { dep, prevSub, nextSub } = link; + if (prevSub) { + prevSub.nextSub = nextSub; + link.prevSub = void 0; + } + if (nextSub) { + nextSub.prevSub = prevSub; + link.nextSub = void 0; + } + if (dep.subsHead === link) { + dep.subsHead = nextSub; + } + if (dep.subs === link) { + dep.subs = prevSub; + if (!prevSub && dep.computed) { + dep.computed.flags &= ~4; + for (let l = dep.computed.deps; l; l = l.nextDep) { + removeSub(l, true); + } + } + } + if (!soft && !--dep.sc && dep.map) { + dep.map.delete(dep.key); + } + } + function removeDep(link) { + const { prevDep, nextDep } = link; + if (prevDep) { + prevDep.nextDep = nextDep; + link.prevDep = void 0; + } + if (nextDep) { + nextDep.prevDep = prevDep; + link.nextDep = void 0; + } + } + function effect(fn, options) { + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const e = new ReactiveEffect(fn); + if (options) { + extend(e, options); + } + try { + e.run(); + } catch (err) { + e.stop(); + throw err; + } + const runner = e.run.bind(e); + runner.effect = e; + return runner; + } + function stop(runner) { + runner.effect.stop(); + } + let shouldTrack = true; + const trackStack = []; + function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; + } + function enableTracking() { + trackStack.push(shouldTrack); + shouldTrack = true; + } + function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; + } + function onEffectCleanup(fn, failSilently = false) { + if (activeSub instanceof ReactiveEffect) { + activeSub.cleanup = fn; + } else if (!failSilently) { + warn( + `onEffectCleanup() was called when there was no active effect to associate with.` + ); + } + } + function cleanupEffect(e) { + const { cleanup } = e; + e.cleanup = void 0; + if (cleanup) { + const prevSub = activeSub; + activeSub = void 0; + try { + cleanup(); + } finally { + activeSub = prevSub; + } + } + } + + let globalVersion = 0; + class Link { + constructor(sub, dep) { + this.sub = sub; + this.dep = dep; + this.version = dep.version; + this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; + } + } + class Dep { + constructor(computed) { + this.computed = computed; + this.version = 0; + /** + * Link between this dep and the current active effect + */ + this.activeLink = void 0; + /** + * Doubly linked list representing the subscribing effects (tail) + */ + this.subs = void 0; + /** + * For object property deps cleanup + */ + this.map = void 0; + this.key = void 0; + /** + * Subscriber counter + */ + this.sc = 0; + { + this.subsHead = void 0; + } + } + track(debugInfo) { + if (!activeSub || !shouldTrack || activeSub === this.computed) { + return; + } + let link = this.activeLink; + if (link === void 0 || link.sub !== activeSub) { + link = this.activeLink = new Link(activeSub, this); + if (!activeSub.deps) { + activeSub.deps = activeSub.depsTail = link; + } else { + link.prevDep = activeSub.depsTail; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + } + addSub(link); + } else if (link.version === -1) { + link.version = this.version; + if (link.nextDep) { + const next = link.nextDep; + next.prevDep = link.prevDep; + if (link.prevDep) { + link.prevDep.nextDep = next; + } + link.prevDep = activeSub.depsTail; + link.nextDep = void 0; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + if (activeSub.deps === link) { + activeSub.deps = next; + } + } + } + if (activeSub.onTrack) { + activeSub.onTrack( + extend( + { + effect: activeSub + }, + debugInfo + ) + ); + } + return link; + } + trigger(debugInfo) { + this.version++; + globalVersion++; + this.notify(debugInfo); + } + notify(debugInfo) { + startBatch(); + try { + if (true) { + for (let head = this.subsHead; head; head = head.nextSub) { + if (head.sub.onTrigger && !(head.sub.flags & 8)) { + head.sub.onTrigger( + extend( + { + effect: head.sub + }, + debugInfo + ) + ); + } + } + } + for (let link = this.subs; link; link = link.prevSub) { + if (link.sub.notify()) { + ; + link.sub.dep.notify(); + } + } + } finally { + endBatch(); + } + } + } + function addSub(link) { + link.dep.sc++; + if (link.sub.flags & 4) { + const computed = link.dep.computed; + if (computed && !link.dep.subs) { + computed.flags |= 4 | 16; + for (let l = computed.deps; l; l = l.nextDep) { + addSub(l); + } + } + const currentTail = link.dep.subs; + if (currentTail !== link) { + link.prevSub = currentTail; + if (currentTail) currentTail.nextSub = link; + } + if (link.dep.subsHead === void 0) { + link.dep.subsHead = link; + } + link.dep.subs = link; + } + } + const targetMap = /* @__PURE__ */ new WeakMap(); + const ITERATE_KEY = Symbol( + "Object iterate" + ); + const MAP_KEY_ITERATE_KEY = Symbol( + "Map keys iterate" + ); + const ARRAY_ITERATE_KEY = Symbol( + "Array iterate" + ); + function track(target, type, key) { + if (shouldTrack && activeSub) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = new Dep()); + dep.map = depsMap; + dep.key = key; + } + { + dep.track({ + target, + type, + key + }); + } + } + } + function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + globalVersion++; + return; + } + const run = (dep) => { + if (dep) { + { + dep.trigger({ + target, + type, + key, + newValue, + oldValue, + oldTarget + }); + } + } + }; + startBatch(); + if (type === "clear") { + depsMap.forEach(run); + } else { + const targetIsArray = isArray(target); + const isArrayIndex = targetIsArray && isIntegerKey(key); + if (targetIsArray && key === "length") { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { + run(dep); + } + }); + } else { + if (key !== void 0 || depsMap.has(void 0)) { + run(depsMap.get(key)); + } + if (isArrayIndex) { + run(depsMap.get(ARRAY_ITERATE_KEY)); + } + switch (type) { + case "add": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isArrayIndex) { + run(depsMap.get("length")); + } + break; + case "delete": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + run(depsMap.get(ITERATE_KEY)); + } + break; + } + } + } + endBatch(); + } + function getDepFromReactive(object, key) { + const depMap = targetMap.get(object); + return depMap && depMap.get(key); + } + + function reactiveReadArray(array) { + const raw = toRaw(array); + if (raw === array) return raw; + track(raw, "iterate", ARRAY_ITERATE_KEY); + return isShallow(array) ? raw : raw.map(toReactive); + } + function shallowReadArray(arr) { + track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); + return arr; + } + const arrayInstrumentations = { + __proto__: null, + [Symbol.iterator]() { + return iterator(this, Symbol.iterator, toReactive); + }, + concat(...args) { + return reactiveReadArray(this).concat( + ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) + ); + }, + entries() { + return iterator(this, "entries", (value) => { + value[1] = toReactive(value[1]); + return value; + }); + }, + every(fn, thisArg) { + return apply(this, "every", fn, thisArg, void 0, arguments); + }, + filter(fn, thisArg) { + return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); + }, + find(fn, thisArg) { + return apply(this, "find", fn, thisArg, toReactive, arguments); + }, + findIndex(fn, thisArg) { + return apply(this, "findIndex", fn, thisArg, void 0, arguments); + }, + findLast(fn, thisArg) { + return apply(this, "findLast", fn, thisArg, toReactive, arguments); + }, + findLastIndex(fn, thisArg) { + return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); + }, + // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement + forEach(fn, thisArg) { + return apply(this, "forEach", fn, thisArg, void 0, arguments); + }, + includes(...args) { + return searchProxy(this, "includes", args); + }, + indexOf(...args) { + return searchProxy(this, "indexOf", args); + }, + join(separator) { + return reactiveReadArray(this).join(separator); + }, + // keys() iterator only reads `length`, no optimisation required + lastIndexOf(...args) { + return searchProxy(this, "lastIndexOf", args); + }, + map(fn, thisArg) { + return apply(this, "map", fn, thisArg, void 0, arguments); + }, + pop() { + return noTracking(this, "pop"); + }, + push(...args) { + return noTracking(this, "push", args); + }, + reduce(fn, ...args) { + return reduce(this, "reduce", fn, args); + }, + reduceRight(fn, ...args) { + return reduce(this, "reduceRight", fn, args); + }, + shift() { + return noTracking(this, "shift"); + }, + // slice could use ARRAY_ITERATE but also seems to beg for range tracking + some(fn, thisArg) { + return apply(this, "some", fn, thisArg, void 0, arguments); + }, + splice(...args) { + return noTracking(this, "splice", args); + }, + toReversed() { + return reactiveReadArray(this).toReversed(); + }, + toSorted(comparer) { + return reactiveReadArray(this).toSorted(comparer); + }, + toSpliced(...args) { + return reactiveReadArray(this).toSpliced(...args); + }, + unshift(...args) { + return noTracking(this, "unshift", args); + }, + values() { + return iterator(this, "values", toReactive); + } + }; + function iterator(self, method, wrapValue) { + const arr = shallowReadArray(self); + const iter = arr[method](); + if (arr !== self && !isShallow(self)) { + iter._next = iter.next; + iter.next = () => { + const result = iter._next(); + if (result.value) { + result.value = wrapValue(result.value); + } + return result; + }; + } + return iter; + } + const arrayProto = Array.prototype; + function apply(self, method, fn, thisArg, wrappedRetFn, args) { + const arr = shallowReadArray(self); + const needsWrap = arr !== self && !isShallow(self); + const methodFn = arr[method]; + if (methodFn !== arrayProto[method]) { + const result2 = methodFn.apply(self, args); + return needsWrap ? toReactive(result2) : result2; + } + let wrappedFn = fn; + if (arr !== self) { + if (needsWrap) { + wrappedFn = function(item, index) { + return fn.call(this, toReactive(item), index, self); + }; + } else if (fn.length > 2) { + wrappedFn = function(item, index) { + return fn.call(this, item, index, self); + }; + } + } + const result = methodFn.call(arr, wrappedFn, thisArg); + return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; + } + function reduce(self, method, fn, args) { + const arr = shallowReadArray(self); + let wrappedFn = fn; + if (arr !== self) { + if (!isShallow(self)) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, toReactive(item), index, self); + }; + } else if (fn.length > 3) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, item, index, self); + }; + } + } + return arr[method](wrappedFn, ...args); + } + function searchProxy(self, method, args) { + const arr = toRaw(self); + track(arr, "iterate", ARRAY_ITERATE_KEY); + const res = arr[method](...args); + if ((res === -1 || res === false) && isProxy(args[0])) { + args[0] = toRaw(args[0]); + return arr[method](...args); + } + return res; + } + function noTracking(self, method, args = []) { + pauseTracking(); + startBatch(); + const res = toRaw(self)[method].apply(self, args); + endBatch(); + resetTracking(); + return res; + } + + const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); + const builtInSymbols = new Set( + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) + ); + function hasOwnProperty(key) { + if (!isSymbol(key)) key = String(key); + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); + } + class BaseReactiveHandler { + constructor(_isReadonly = false, _isShallow = false) { + this._isReadonly = _isReadonly; + this._isShallow = _isShallow; + } + get(target, key, receiver) { + if (key === "__v_skip") return target["__v_skip"]; + const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return isShallow2; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the receiver is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + let fn; + if (targetIsArray && (fn = arrayInstrumentations[key])) { + return fn; + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get( + target, + key, + // if this is a proxy wrapping a ref, return methods using the raw ref + // as receiver so that we don't have to call `toRaw` on the ref in all + // its class methods + isRef(target) ? target : receiver + ); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (isShallow2) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } + } + class MutableReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(false, isShallow2); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._isShallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set( + target, + key, + value, + isRef(target) ? target : receiver + ); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { + const hadKey = hasOwn(target, key); + const oldValue = target[key]; + const result = Reflect.deleteProperty(target, key); + if (result && hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + } + has(target, key) { + const result = Reflect.has(target, key); + if (!isSymbol(key) || !builtInSymbols.has(key)) { + track(target, "has", key); + } + return result; + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); + return Reflect.ownKeys(target); + } + } + class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(true, isShallow2); + } + set(target, key) { + { + warn( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + deleteProperty(target, key) { + { + warn( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + } + const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); + const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); + const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); + const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); + + const toShallow = (value) => value; + const getProto = (v) => Reflect.getPrototypeOf(v); + function createIterableMethod(method, isReadonly2, isShallow2) { + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done + }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } + }; + }; + } + function createReadonlyMethod(type) { + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + warn( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; + } + function createInstrumentations(readonly, shallow) { + const instrumentations = { + get(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); + } + track(rawTarget, "get", rawKey); + } + const { has } = getProto(rawTarget); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + if (has.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } + }, + get size() { + const target = this["__v_raw"]; + !readonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); + }, + has(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); + } + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); + }, + forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + !readonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + } + }; + extend( + instrumentations, + readonly ? { + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear") + } : { + add(value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; + }, + set(key, value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; + }, + delete(key) { + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get ? get.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + }, + clear() { + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger( + target, + "clear", + void 0, + void 0, + oldTarget + ); + } + return result; + } + } + ); + const iteratorMethods = [ + "keys", + "values", + "entries", + Symbol.iterator + ]; + iteratorMethods.forEach((method) => { + instrumentations[method] = createIterableMethod(method, readonly, shallow); + }); + return instrumentations; + } + function createInstrumentationGetter(isReadonly2, shallow) { + const instrumentations = createInstrumentations(isReadonly2, shallow); + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; + } + const mutableCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, false) + }; + const shallowCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, true) + }; + const readonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, false) + }; + const shallowReadonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, true) + }; + function checkIdentityKeys(target, has, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has.call(target, rawKey)) { + const type = toRawType(target); + warn( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } + } + + const reactiveMap = /* @__PURE__ */ new WeakMap(); + const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); + const readonlyMap = /* @__PURE__ */ new WeakMap(); + const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); + function targetTypeMap(rawType) { + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } + } + function getTargetType(value) { + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); + } + function reactive(target) { + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); + } + function shallowReactive(target) { + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); + } + function readonly(target) { + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); + } + function shallowReadonly(target) { + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); + } + function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + { + warn( + `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( + target + )}` + ); + } + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; + } + function isReactive(value) { + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); + } + function isReadonly(value) { + return !!(value && value["__v_isReadonly"]); + } + function isShallow(value) { + return !!(value && value["__v_isShallow"]); + } + function isProxy(value) { + return value ? !!value["__v_raw"] : false; + } + function toRaw(observed) { + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; + } + function markRaw(value) { + if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { + def(value, "__v_skip", true); + } + return value; + } + const toReactive = (value) => isObject(value) ? reactive(value) : value; + const toReadonly = (value) => isObject(value) ? readonly(value) : value; + + function isRef(r) { + return r ? r["__v_isRef"] === true : false; + } + function ref(value) { + return createRef(value, false); + } + function shallowRef(value) { + return createRef(value, true); + } + function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); + } + class RefImpl { + constructor(value, isShallow2) { + this.dep = new Dep(); + this["__v_isRef"] = true; + this["__v_isShallow"] = false; + this._rawValue = isShallow2 ? value : toRaw(value); + this._value = isShallow2 ? value : toReactive(value); + this["__v_isShallow"] = isShallow2; + } + get value() { + { + this.dep.track({ + target: this, + type: "get", + key: "value" + }); + } + return this._value; + } + set value(newValue) { + const oldValue = this._rawValue; + const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); + newValue = useDirectValue ? newValue : toRaw(newValue); + if (hasChanged(newValue, oldValue)) { + this._rawValue = newValue; + this._value = useDirectValue ? newValue : toReactive(newValue); + { + this.dep.trigger({ + target: this, + type: "set", + key: "value", + newValue, + oldValue + }); + } + } + } + } + function triggerRef(ref2) { + if (ref2.dep) { + { + ref2.dep.trigger({ + target: ref2, + type: "set", + key: "value", + newValue: ref2._value + }); + } + } + } + function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; + } + function toValue(source) { + return isFunction(source) ? source() : unref(source); + } + const shallowUnwrapHandlers = { + get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } + }; + function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); + } + class CustomRefImpl { + constructor(factory) { + this["__v_isRef"] = true; + this._value = void 0; + const dep = this.dep = new Dep(); + const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); + this._get = get; + this._set = set; + } + get value() { + return this._value = this._get(); + } + set value(newVal) { + this._set(newVal); + } + } + function customRef(factory) { + return new CustomRefImpl(factory); + } + function toRefs(object) { + if (!isProxy(object)) { + warn(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; + } + class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this["__v_isRef"] = true; + this._value = void 0; + } + get value() { + const val = this._object[this._key]; + return this._value = val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } + } + class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this["__v_isRef"] = true; + this["__v_isReadonly"] = true; + this._value = void 0; + } + get value() { + return this._value = this._getter(); + } + } + function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } + } + function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); + } + + class ComputedRefImpl { + constructor(fn, setter, isSSR) { + this.fn = fn; + this.setter = setter; + /** + * @internal + */ + this._value = void 0; + /** + * @internal + */ + this.dep = new Dep(this); + /** + * @internal + */ + this.__v_isRef = true; + // TODO isolatedDeclarations "__v_isReadonly" + // A computed is also a subscriber that tracks other deps + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 16; + /** + * @internal + */ + this.globalVersion = globalVersion - 1; + /** + * @internal + */ + this.next = void 0; + // for backwards compat + this.effect = this; + this["__v_isReadonly"] = !setter; + this.isSSR = isSSR; + } + /** + * @internal + */ + notify() { + this.flags |= 16; + if (!(this.flags & 8) && // avoid infinite self recursion + activeSub !== this) { + batch(this, true); + return true; + } + } + get value() { + const link = this.dep.track({ + target: this, + type: "get", + key: "value" + }) ; + refreshComputed(this); + if (link) { + link.version = this.dep.version; + } + return this._value; + } + set value(newValue) { + if (this.setter) { + this.setter(newValue); + } else { + warn("Write operation failed: computed value is readonly"); + } + } + } + function computed(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + if (isFunction(getterOrOptions)) { + getter = getterOrOptions; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, isSSR); + if (debugOptions && !isSSR) { + cRef.onTrack = debugOptions.onTrack; + cRef.onTrigger = debugOptions.onTrigger; + } + return cRef; + } + + const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" + }; + const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" + }; + const ReactiveFlags = { + "SKIP": "__v_skip", + "IS_REACTIVE": "__v_isReactive", + "IS_READONLY": "__v_isReadonly", + "IS_SHALLOW": "__v_isShallow", + "RAW": "__v_raw", + "IS_REF": "__v_isRef" + }; + + const WatchErrorCodes = { + "WATCH_GETTER": 2, + "2": "WATCH_GETTER", + "WATCH_CALLBACK": 3, + "3": "WATCH_CALLBACK", + "WATCH_CLEANUP": 4, + "4": "WATCH_CLEANUP" + }; + const INITIAL_WATCHER_VALUE = {}; + const cleanupMap = /* @__PURE__ */ new WeakMap(); + let activeWatcher = void 0; + function getCurrentWatcher() { + return activeWatcher; + } + function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { + if (owner) { + let cleanups = cleanupMap.get(owner); + if (!cleanups) cleanupMap.set(owner, cleanups = []); + cleanups.push(cleanupFn); + } else if (!failSilently) { + warn( + `onWatcherCleanup() was called when there was no active watcher to associate with.` + ); + } + } + function watch(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, once, scheduler, augmentJob, call } = options; + const warnInvalidSource = (s) => { + (options.onWarn || warn)( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const reactiveGetter = (source2) => { + if (deep) return source2; + if (isShallow(source2) || deep === false || deep === 0) + return traverse(source2, 1); + return traverse(source2); + }; + let effect; + let getter; + let cleanup; + let boundCleanup; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return call ? call(s, 2) : s(); + } else { + warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { + if (cb) { + getter = call ? () => call(source, 2) : source; + } else { + getter = () => { + if (cleanup) { + pauseTracking(); + try { + cleanup(); + } finally { + resetTracking(); + } + } + const currentEffect = activeWatcher; + activeWatcher = effect; + try { + return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); + } finally { + activeWatcher = currentEffect; + } + }; + } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + const depth = deep === true ? Infinity : deep; + getter = () => traverse(baseGetter(), depth); + } + const scope = getCurrentScope(); + const watchHandle = () => { + effect.stop(); + if (scope && scope.active) { + remove(scope.effects, effect); + } + }; + if (once && cb) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + watchHandle(); + }; + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = (immediateFirstRun) => { + if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { + if (cleanup) { + cleanup(); + } + const currentWatcher = activeWatcher; + activeWatcher = effect; + try { + const args = [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + boundCleanup + ]; + call ? call(cb, 3, args) : ( + // @ts-expect-error + cb(...args) + ); + oldValue = newValue; + } finally { + activeWatcher = currentWatcher; + } + } + } else { + effect.run(); + } + }; + if (augmentJob) { + augmentJob(job); + } + effect = new ReactiveEffect(getter); + effect.scheduler = scheduler ? () => scheduler(job, false) : job; + boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); + cleanup = effect.onStop = () => { + const cleanups = cleanupMap.get(effect); + if (cleanups) { + if (call) { + call(cleanups, 4); + } else { + for (const cleanup2 of cleanups) cleanup2(); + } + cleanupMap.delete(effect); + } + }; + { + effect.onTrack = options.onTrack; + effect.onTrigger = options.onTrigger; + } + if (cb) { + if (immediate) { + job(true); + } else { + oldValue = effect.run(); + } + } else if (scheduler) { + scheduler(job.bind(null, true), true); + } else { + effect.run(); + } + watchHandle.pause = effect.pause.bind(effect); + watchHandle.resume = effect.resume.bind(effect); + watchHandle.stop = watchHandle; + return watchHandle; + } + function traverse(value, depth = Infinity, seen) { + if (depth <= 0 || !isObject(value) || value["__v_skip"]) { + return value; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + depth--; + if (isRef(value)) { + traverse(value.value, depth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, seen); + } + for (const key of Object.getOwnPropertySymbols(value)) { + if (Object.prototype.propertyIsEnumerable.call(value, key)) { + traverse(value[key], depth, seen); + } + } + } + return value; + } + + exports.ARRAY_ITERATE_KEY = ARRAY_ITERATE_KEY; + exports.EffectFlags = EffectFlags; + exports.EffectScope = EffectScope; + exports.ITERATE_KEY = ITERATE_KEY; + exports.MAP_KEY_ITERATE_KEY = MAP_KEY_ITERATE_KEY; + exports.ReactiveEffect = ReactiveEffect; + exports.ReactiveFlags = ReactiveFlags; + exports.TrackOpTypes = TrackOpTypes; + exports.TriggerOpTypes = TriggerOpTypes; + exports.WatchErrorCodes = WatchErrorCodes; + exports.computed = computed; + exports.customRef = customRef; + exports.effect = effect; + exports.effectScope = effectScope; + exports.enableTracking = enableTracking; + exports.getCurrentScope = getCurrentScope; + exports.getCurrentWatcher = getCurrentWatcher; + exports.isProxy = isProxy; + exports.isReactive = isReactive; + exports.isReadonly = isReadonly; + exports.isRef = isRef; + exports.isShallow = isShallow; + exports.markRaw = markRaw; + exports.onEffectCleanup = onEffectCleanup; + exports.onScopeDispose = onScopeDispose; + exports.onWatcherCleanup = onWatcherCleanup; + exports.pauseTracking = pauseTracking; + exports.proxyRefs = proxyRefs; + exports.reactive = reactive; + exports.reactiveReadArray = reactiveReadArray; + exports.readonly = readonly; + exports.ref = ref; + exports.resetTracking = resetTracking; + exports.shallowReactive = shallowReactive; + exports.shallowReadArray = shallowReadArray; + exports.shallowReadonly = shallowReadonly; + exports.shallowRef = shallowRef; + exports.stop = stop; + exports.toRaw = toRaw; + exports.toReactive = toReactive; + exports.toReadonly = toReadonly; + exports.toRef = toRef; + exports.toRefs = toRefs; + exports.toValue = toValue; + exports.track = track; + exports.traverse = traverse; + exports.trigger = trigger; + exports.triggerRef = triggerRef; + exports.unref = unref; + exports.watch = watch; + + return exports; + +})({}); diff --git a/vuetest/node_modules/@vue/reactivity/dist/reactivity.global.prod.js b/vuetest/node_modules/@vue/reactivity/dist/reactivity.global.prod.js new file mode 100644 index 0000000..798e26f --- /dev/null +++ b/vuetest/node_modules/@vue/reactivity/dist/reactivity.global.prod.js @@ -0,0 +1,5 @@ +/** +* @vue/reactivity v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/var VueReactivity=function(e){"use strict";let t,i,s,r,n;let l={},a=()=>{},o=Object.assign,u=(e,t)=>{let i=e.indexOf(t);i>-1&&e.splice(i,1)},c=Object.prototype.hasOwnProperty,h=(e,t)=>c.call(e,t),f=Array.isArray,p=e=>"[object Map]"===b(e),d=e=>"[object Set]"===b(e),_=e=>"function"==typeof e,v=e=>"string"==typeof e,g=e=>"symbol"==typeof e,y=e=>null!==e&&"object"==typeof e,R=Object.prototype.toString,b=e=>R.call(e),w=e=>b(e).slice(8,-1),S=e=>"[object Object]"===b(e),E=e=>v(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,x=(e,t)=>!Object.is(e,t),m=(e,t,i,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:i})};class T{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=t,!e&&t&&(this.index=(t.scopes||(t.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let i=t;try{return t=this,e()}finally{t=i}}}on(){t=this}off(){t=this.parent}stop(e){if(this._active){let t,i;for(t=0,this._active=!1,i=this.effects.length;t<i;t++)this.effects[t].stop();for(t=0,this.effects.length=0,i=this.cleanups.length;t<i;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,i=this.scopes.length;t<i;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}let k=new WeakSet;class A{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,t&&t.active&&t.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,k.has(this)&&(k.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||O(this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,H(this),L(this);let e=i,t=N;i=this,N=!0;try{return this.fn()}finally{j(this),i=e,N=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)W(e);this.deps=this.depsTail=void 0,H(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?k.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){C(this)&&this.run()}get dirty(){return C(this)}}let D=0;function O(e,t=!1){if(e.flags|=8,t){e.next=r,r=e;return}e.next=s,s=e}function I(){let e;if(!(--D>0)){if(r){let e=r;for(r=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}for(;s;){let t=s;for(s=void 0;t;){let i=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=i}}if(e)throw e}}function L(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function j(e){let t;let i=e.depsTail,s=i;for(;s;){let e=s.prevDep;-1===s.version?(s===i&&(i=e),W(s),function(e){let{prevDep:t,nextDep:i}=e;t&&(t.nextDep=i,e.prevDep=void 0),i&&(i.prevDep=t,e.nextDep=void 0)}(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=e}e.deps=t,e.depsTail=i}function C(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(P(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function P(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===U))return;e.globalVersion=U;let t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!C(e)){e.flags&=-3;return}let s=i,r=N;i=e,N=!0;try{L(e);let i=e.fn(e._value);(0===t.version||x(i,e._value))&&(e._value=i,t.version++)}catch(e){throw t.version++,e}finally{i=s,N=r,j(e),e.flags&=-3}}function W(e,t=!1){let{dep:i,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),i.subs===e&&(i.subs=s,!s&&i.computed)){i.computed.flags&=-5;for(let e=i.computed.deps;e;e=e.nextDep)W(e,!0)}t||--i.sc||!i.map||i.map.delete(i.key)}let N=!0,V=[];function K(){V.push(N),N=!1}function M(){let e=V.pop();N=void 0===e||e}function H(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=i;i=void 0;try{t()}finally{i=e}}}let U=0;class Y{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class G{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!i||!N||i===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==i)t=this.activeLink=new Y(i,this),i.deps?(t.prevDep=i.depsTail,i.depsTail.nextDep=t,i.depsTail=t):i.deps=i.depsTail=t,function e(t){if(t.dep.sc++,4&t.sub.flags){let i=t.dep.computed;if(i&&!t.dep.subs){i.flags|=20;for(let t=i.deps;t;t=t.nextDep)e(t)}let s=t.dep.subs;s!==t&&(t.prevSub=s,s&&(s.nextSub=t)),t.dep.subs=t}}(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=i.depsTail,t.nextDep=void 0,i.depsTail.nextDep=t,i.depsTail=t,i.deps===t&&(i.deps=e)}return t}trigger(e){this.version++,U++,this.notify(e)}notify(e){D++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{I()}}}let F=new WeakMap,z=Symbol(""),B=Symbol(""),q=Symbol("");function J(e,t,s){if(N&&i){let t=F.get(e);t||F.set(e,t=new Map);let i=t.get(s);i||(t.set(s,i=new G),i.map=t,i.key=s),i.track()}}function Q(e,t,i,s,r,n){let l=F.get(e);if(!l){U++;return}let a=e=>{e&&e.trigger()};if(D++,"clear"===t)l.forEach(a);else{let r=f(e),n=r&&E(i);if(r&&"length"===i){let e=Number(s);l.forEach((t,i)=>{("length"===i||i===q||!g(i)&&i>=e)&&a(t)})}else switch((void 0!==i||l.has(void 0))&&a(l.get(i)),n&&a(l.get(q)),t){case"add":r?n&&a(l.get("length")):(a(l.get(z)),p(e)&&a(l.get(B)));break;case"delete":!r&&(a(l.get(z)),p(e)&&a(l.get(B)));break;case"set":p(e)&&a(l.get(z))}}I()}function X(e){let t=eP(e);return t===e?t:(J(t,"iterate",q),ej(e)?t:t.map(eW))}function Z(e){return J(e=eP(e),"iterate",q),e}let $={__proto__:null,[Symbol.iterator](){return ee(this,Symbol.iterator,eW)},concat(...e){return X(this).concat(...e.map(e=>f(e)?X(e):e))},entries(){return ee(this,"entries",e=>(e[1]=eW(e[1]),e))},every(e,t){return ei(this,"every",e,t,void 0,arguments)},filter(e,t){return ei(this,"filter",e,t,e=>e.map(eW),arguments)},find(e,t){return ei(this,"find",e,t,eW,arguments)},findIndex(e,t){return ei(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return ei(this,"findLast",e,t,eW,arguments)},findLastIndex(e,t){return ei(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return ei(this,"forEach",e,t,void 0,arguments)},includes(...e){return er(this,"includes",e)},indexOf(...e){return er(this,"indexOf",e)},join(e){return X(this).join(e)},lastIndexOf(...e){return er(this,"lastIndexOf",e)},map(e,t){return ei(this,"map",e,t,void 0,arguments)},pop(){return en(this,"pop")},push(...e){return en(this,"push",e)},reduce(e,...t){return es(this,"reduce",e,t)},reduceRight(e,...t){return es(this,"reduceRight",e,t)},shift(){return en(this,"shift")},some(e,t){return ei(this,"some",e,t,void 0,arguments)},splice(...e){return en(this,"splice",e)},toReversed(){return X(this).toReversed()},toSorted(e){return X(this).toSorted(e)},toSpliced(...e){return X(this).toSpliced(...e)},unshift(...e){return en(this,"unshift",e)},values(){return ee(this,"values",eW)}};function ee(e,t,i){let s=Z(e),r=s[t]();return s===e||ej(e)||(r._next=r.next,r.next=()=>{let e=r._next();return e.value&&(e.value=i(e.value)),e}),r}let et=Array.prototype;function ei(e,t,i,s,r,n){let l=Z(e),a=l!==e&&!ej(e),o=l[t];if(o!==et[t]){let t=o.apply(e,n);return a?eW(t):t}let u=i;l!==e&&(a?u=function(t,s){return i.call(this,eW(t),s,e)}:i.length>2&&(u=function(t,s){return i.call(this,t,s,e)}));let c=o.call(l,u,s);return a&&r?r(c):c}function es(e,t,i,s){let r=Z(e),n=i;return r!==e&&(ej(e)?i.length>3&&(n=function(t,s,r){return i.call(this,t,s,r,e)}):n=function(t,s,r){return i.call(this,t,eW(s),r,e)}),r[t](n,...s)}function er(e,t,i){let s=eP(e);J(s,"iterate",q);let r=s[t](...i);return(-1===r||!1===r)&&eC(i[0])?(i[0]=eP(i[0]),s[t](...i)):r}function en(e,t,i=[]){K(),D++;let s=eP(e)[t].apply(e,i);return I(),M(),s}let el=function(e){let t=Object.create(null);for(let i of e.split(","))t[i]=1;return e=>e in t}("__proto__,__v_isRef,__isVue"),ea=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(g));function eo(e){g(e)||(e=String(e));let t=eP(this);return J(t,"has",e),t.hasOwnProperty(e)}class eu{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){if("__v_skip"===t)return e.__v_skip;let s=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return r;if("__v_raw"===t)return i===(s?r?ek:eT:r?em:ex).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;let n=f(e);if(!s){let e;if(n&&(e=$[t]))return e;if("hasOwnProperty"===t)return eo}let l=Reflect.get(e,t,eV(e)?e:i);return(g(t)?ea.has(t):el(t))?l:(s||J(e,"get",t),r)?l:eV(l)?n&&E(t)?l:l.value:y(l)?s?eD(l):eA(l):l}}class ec extends eu{constructor(e=!1){super(!1,e)}set(e,t,i,s){let r=e[t];if(!this._isShallow){let t=eL(r);if(ej(i)||eL(i)||(r=eP(r),i=eP(i)),!f(e)&&eV(r)&&!eV(i))return!t&&(r.value=i,!0)}let n=f(e)&&E(t)?Number(t)<e.length:h(e,t),l=Reflect.set(e,t,i,eV(e)?e:s);return e===eP(s)&&(n?x(i,r)&&Q(e,"set",t,i):Q(e,"add",t,i)),l}deleteProperty(e,t){let i=h(e,t);e[t];let s=Reflect.deleteProperty(e,t);return s&&i&&Q(e,"delete",t,void 0),s}has(e,t){let i=Reflect.has(e,t);return g(t)&&ea.has(t)||J(e,"has",t),i}ownKeys(e){return J(e,"iterate",f(e)?"length":z),Reflect.ownKeys(e)}}class eh extends eu{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}let ef=new ec,ep=new eh,ed=new ec(!0),e_=new eh(!0),ev=e=>e,eg=e=>Reflect.getPrototypeOf(e);function ey(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function eR(e,t){let i=function(e,t){let i={get(i){let s=this.__v_raw,r=eP(s),n=eP(i);e||(x(i,n)&&J(r,"get",i),J(r,"get",n));let{has:l}=eg(r),a=t?ev:e?eN:eW;return l.call(r,i)?a(s.get(i)):l.call(r,n)?a(s.get(n)):void(s!==r&&s.get(i))},get size(){let t=this.__v_raw;return e||J(eP(t),"iterate",z),Reflect.get(t,"size",t)},has(t){let i=this.__v_raw,s=eP(i),r=eP(t);return e||(x(t,r)&&J(s,"has",t),J(s,"has",r)),t===r?i.has(t):i.has(t)||i.has(r)},forEach(i,s){let r=this,n=r.__v_raw,l=eP(n),a=t?ev:e?eN:eW;return e||J(l,"iterate",z),n.forEach((e,t)=>i.call(s,a(e),a(t),r))}};return o(i,e?{add:ey("add"),set:ey("set"),delete:ey("delete"),clear:ey("clear")}:{add(e){t||ej(e)||eL(e)||(e=eP(e));let i=eP(this);return eg(i).has.call(i,e)||(i.add(e),Q(i,"add",e,e)),this},set(e,i){t||ej(i)||eL(i)||(i=eP(i));let s=eP(this),{has:r,get:n}=eg(s),l=r.call(s,e);l||(e=eP(e),l=r.call(s,e));let a=n.call(s,e);return s.set(e,i),l?x(i,a)&&Q(s,"set",e,i):Q(s,"add",e,i),this},delete(e){let t=eP(this),{has:i,get:s}=eg(t),r=i.call(t,e);r||(e=eP(e),r=i.call(t,e)),s&&s.call(t,e);let n=t.delete(e);return r&&Q(t,"delete",e,void 0),n},clear(){let e=eP(this),t=0!==e.size,i=e.clear();return t&&Q(e,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{i[s]=function(...i){let r=this.__v_raw,n=eP(r),l=p(n),a="entries"===s||s===Symbol.iterator&&l,o=r[s](...i),u=t?ev:e?eN:eW;return e||J(n,"iterate","keys"===s&&l?B:z),{next(){let{value:e,done:t}=o.next();return t?{value:e,done:t}:{value:a?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}),i}(e,t);return(t,s,r)=>"__v_isReactive"===s?!e:"__v_isReadonly"===s?e:"__v_raw"===s?t:Reflect.get(h(i,s)&&s in t?i:t,s,r)}let eb={get:eR(!1,!1)},ew={get:eR(!1,!0)},eS={get:eR(!0,!1)},eE={get:eR(!0,!0)},ex=new WeakMap,em=new WeakMap,eT=new WeakMap,ek=new WeakMap;function eA(e){return eL(e)?e:eO(e,!1,ef,eb,ex)}function eD(e){return eO(e,!0,ep,eS,eT)}function eO(e,t,i,s,r){if(!y(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let n=r.get(e);if(n)return n;let l=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(w(e));if(0===l)return e;let a=new Proxy(e,2===l?s:i);return r.set(e,a),a}function eI(e){return eL(e)?eI(e.__v_raw):!!(e&&e.__v_isReactive)}function eL(e){return!!(e&&e.__v_isReadonly)}function ej(e){return!!(e&&e.__v_isShallow)}function eC(e){return!!e&&!!e.__v_raw}function eP(e){let t=e&&e.__v_raw;return t?eP(t):e}let eW=e=>y(e)?eA(e):e,eN=e=>y(e)?eD(e):e;function eV(e){return!!e&&!0===e.__v_isRef}function eK(e){return eM(e,!1)}function eM(e,t){return eV(e)?e:new eH(e,t)}class eH{constructor(e,t){this.dep=new G,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:eP(e),this._value=t?e:eW(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,i=this.__v_isShallow||ej(e)||eL(e);x(e=i?e:eP(e),t)&&(this._rawValue=e,this._value=i?e:eW(e),this.dep.trigger())}}function eU(e){return eV(e)?e.value:e}let eY={get:(e,t,i)=>"__v_raw"===t?e:eU(Reflect.get(e,t,i)),set:(e,t,i,s)=>{let r=e[t];return eV(r)&&!eV(i)?(r.value=i,!0):Reflect.set(e,t,i,s)}};class eG{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new G,{get:i,set:s}=e(t.track.bind(t),t.trigger.bind(t));this._get=i,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}}class eF{constructor(e,t,i){this._object=e,this._key=t,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){let i=F.get(e);return i&&i.get(t)}(eP(this._object),this._key)}}class ez{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function eB(e,t,i){let s=e[t];return eV(s)?s:new eF(e,t,i)}class eq{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new G(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=U-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(8&this.flags)&&i!==this)return O(this,!0),!0}get value(){let e=this.dep.track();return P(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}let eJ={},eQ=new WeakMap;function eX(e,t=!1,i=n){if(i){let t=eQ.get(i);t||eQ.set(i,t=[]),t.push(e)}}function eZ(e,t=1/0,i){if(t<=0||!y(e)||e.__v_skip||(i=i||new Set).has(e))return e;if(i.add(e),t--,eV(e))eZ(e.value,t,i);else if(f(e))for(let s=0;s<e.length;s++)eZ(e[s],t,i);else if(d(e)||p(e))e.forEach(e=>{eZ(e,t,i)});else if(S(e)){for(let s in e)eZ(e[s],t,i);for(let s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&eZ(e[s],t,i)}return e}return e.ARRAY_ITERATE_KEY=q,e.EffectFlags={ACTIVE:1,1:"ACTIVE",RUNNING:2,2:"RUNNING",TRACKING:4,4:"TRACKING",NOTIFIED:8,8:"NOTIFIED",DIRTY:16,16:"DIRTY",ALLOW_RECURSE:32,32:"ALLOW_RECURSE",PAUSED:64,64:"PAUSED"},e.EffectScope=T,e.ITERATE_KEY=z,e.MAP_KEY_ITERATE_KEY=B,e.ReactiveEffect=A,e.ReactiveFlags={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw",IS_REF:"__v_isRef"},e.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},e.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},e.WatchErrorCodes={WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP"},e.computed=function(e,t,i=!1){let s,r;return _(e)?s=e:(s=e.get,r=e.set),new eq(s,r,i)},e.customRef=function(e){return new eG(e)},e.effect=function(e,t){e.effect instanceof A&&(e=e.effect.fn);let i=new A(e);t&&o(i,t);try{i.run()}catch(e){throw i.stop(),e}let s=i.run.bind(i);return s.effect=i,s},e.effectScope=function(e){return new T(e)},e.enableTracking=function(){V.push(N),N=!0},e.getCurrentScope=function(){return t},e.getCurrentWatcher=function(){return n},e.isProxy=eC,e.isReactive=eI,e.isReadonly=eL,e.isRef=eV,e.isShallow=ej,e.markRaw=function(e){return!h(e,"__v_skip")&&Object.isExtensible(e)&&m(e,"__v_skip",!0),e},e.onEffectCleanup=function(e,t=!1){i instanceof A&&(i.cleanup=e)},e.onScopeDispose=function(e,i=!1){t&&t.cleanups.push(e)},e.onWatcherCleanup=eX,e.pauseTracking=K,e.proxyRefs=function(e){return eI(e)?e:new Proxy(e,eY)},e.reactive=eA,e.reactiveReadArray=X,e.readonly=eD,e.ref=eK,e.resetTracking=M,e.shallowReactive=function(e){return eO(e,!1,ed,ew,em)},e.shallowReadArray=Z,e.shallowReadonly=function(e){return eO(e,!0,e_,eE,ek)},e.shallowRef=function(e){return eM(e,!0)},e.stop=function(e){e.effect.stop()},e.toRaw=eP,e.toReactive=eW,e.toReadonly=eN,e.toRef=function(e,t,i){return eV(e)?e:_(e)?new ez(e):y(e)&&arguments.length>1?eB(e,t,i):eK(e)},e.toRefs=function(e){let t=f(e)?Array(e.length):{};for(let i in e)t[i]=eB(e,i);return t},e.toValue=function(e){return _(e)?e():eU(e)},e.track=J,e.traverse=eZ,e.trigger=Q,e.triggerRef=function(e){e.dep&&e.dep.trigger()},e.unref=eU,e.watch=function(e,i,s=l){let r,o,c,h;let{immediate:p,deep:d,once:v,scheduler:g,augmentJob:y,call:R}=s,b=e=>d?e:ej(e)||!1===d||0===d?eZ(e,1):eZ(e),w=!1,S=!1;if(eV(e)?(o=()=>e.value,w=ej(e)):eI(e)?(o=()=>b(e),w=!0):f(e)?(S=!0,w=e.some(e=>eI(e)||ej(e)),o=()=>e.map(e=>eV(e)?e.value:eI(e)?b(e):_(e)?R?R(e,2):e():void 0)):o=_(e)?i?R?()=>R(e,2):e:()=>{if(c){K();try{c()}finally{M()}}let t=n;n=r;try{return R?R(e,3,[h]):e(h)}finally{n=t}}:a,i&&d){let e=o,t=!0===d?1/0:d;o=()=>eZ(e(),t)}let E=t,m=()=>{r.stop(),E&&E.active&&u(E.effects,r)};if(v&&i){let e=i;i=(...t)=>{e(...t),m()}}let T=S?Array(e.length).fill(eJ):eJ,k=e=>{if(1&r.flags&&(r.dirty||e)){if(i){let e=r.run();if(d||w||(S?e.some((e,t)=>x(e,T[t])):x(e,T))){c&&c();let t=n;n=r;try{let t=[e,T===eJ?void 0:S&&T[0]===eJ?[]:T,h];R?R(i,3,t):i(...t),T=e}finally{n=t}}}else r.run()}};return y&&y(k),(r=new A(o)).scheduler=g?()=>g(k,!1):k,h=e=>eX(e,!1,r),c=r.onStop=()=>{let e=eQ.get(r);if(e){if(R)R(e,4);else for(let t of e)t();eQ.delete(r)}},i?p?k(!0):T=r.run():g?g(k.bind(null,!0),!0):r.run(),m.pause=r.pause.bind(r),m.resume=r.resume.bind(r),m.stop=m,m},e}({}); diff --git a/vuetest/node_modules/@vue/reactivity/index.js b/vuetest/node_modules/@vue/reactivity/index.js new file mode 100644 index 0000000..04a8ba5 --- /dev/null +++ b/vuetest/node_modules/@vue/reactivity/index.js @@ -0,0 +1,7 @@ +'use strict' + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/reactivity.cjs.prod.js') +} else { + module.exports = require('./dist/reactivity.cjs.js') +} diff --git a/vuetest/node_modules/@vue/reactivity/package.json b/vuetest/node_modules/@vue/reactivity/package.json new file mode 100644 index 0000000..6778f1c --- /dev/null +++ b/vuetest/node_modules/@vue/reactivity/package.json @@ -0,0 +1,55 @@ +{ + "name": "@vue/reactivity", + "version": "3.5.13", + "description": "@vue/reactivity", + "main": "index.js", + "module": "dist/reactivity.esm-bundler.js", + "types": "dist/reactivity.d.ts", + "unpkg": "dist/reactivity.global.js", + "jsdelivr": "dist/reactivity.global.js", + "files": [ + "index.js", + "dist" + ], + "exports": { + ".": { + "types": "./dist/reactivity.d.ts", + "node": { + "production": "./dist/reactivity.cjs.prod.js", + "development": "./dist/reactivity.cjs.js", + "default": "./index.js" + }, + "module": "./dist/reactivity.esm-bundler.js", + "import": "./dist/reactivity.esm-bundler.js", + "require": "./index.js" + }, + "./*": "./*" + }, + "sideEffects": false, + "repository": { + "type": "git", + "url": "git+https://github.com/vuejs/core.git", + "directory": "packages/reactivity" + }, + "buildOptions": { + "name": "VueReactivity", + "formats": [ + "esm-bundler", + "esm-browser", + "cjs", + "global" + ] + }, + "keywords": [ + "vue" + ], + "author": "Evan You", + "license": "MIT", + "bugs": { + "url": "https://github.com/vuejs/core/issues" + }, + "homepage": "https://github.com/vuejs/core/tree/main/packages/reactivity#readme", + "dependencies": { + "@vue/shared": "3.5.13" + } +} \ No newline at end of file diff --git a/vuetest/node_modules/@vue/runtime-core/LICENSE b/vuetest/node_modules/@vue/runtime-core/LICENSE new file mode 100644 index 0000000..15f1f7e --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-core/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018-present, Yuxi (Evan) You + +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. diff --git a/vuetest/node_modules/@vue/runtime-core/README.md b/vuetest/node_modules/@vue/runtime-core/README.md new file mode 100644 index 0000000..452ef52 --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-core/README.md @@ -0,0 +1,28 @@ +# @vue/runtime-core + +> This package is published only for typing and building custom renderers. It is NOT meant to be used in applications. + +For full exposed APIs, see `src/index.ts`. + +## Building a Custom Renderer + +```ts +import { createRenderer } from '@vue/runtime-core' + +const { render, createApp } = createRenderer({ + patchProp, + insert, + remove, + createElement, + // ... +}) + +// `render` is the low-level API +// `createApp` returns an app instance with configurable context shared +// by the entire app tree. +export { render, createApp } + +export * from '@vue/runtime-core' +``` + +See `@vue/runtime-dom` for how a DOM-targeting renderer is implemented. diff --git a/vuetest/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js b/vuetest/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js new file mode 100644 index 0000000..4307f03 --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js @@ -0,0 +1,8493 @@ +/** +* @vue/runtime-core v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var reactivity = require('@vue/reactivity'); +var shared = require('@vue/shared'); + +const stack = []; +function pushWarningContext(vnode) { + stack.push(vnode); +} +function popWarningContext() { + stack.pop(); +} +let isWarning = false; +function warn$1(msg, ...args) { + if (isWarning) return; + isWarning = true; + reactivity.pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + // eslint-disable-next-line no-restricted-syntax + msg + args.map((a) => { + var _a, _b; + return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); + }).join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); + } + console.warn(...warnArgs); + } + reactivity.resetTracking(); + isWarning = false; +} +function getComponentTrace() { + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); + } + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; +} +function formatTrace(trace) { + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; +} +function formatTraceEntry({ vnode, recurseCount }) { + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; +} +function formatProps(props) { + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; +} +function formatProp(key, value, raw) { + if (shared.isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (reactivity.isRef(value)) { + value = formatProp(key, reactivity.toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (shared.isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = reactivity.toRaw(value); + return raw ? value : [`${key}=`, value]; + } +} +function assertNumber(val, type) { + if (val === void 0) { + return; + } else if (typeof val !== "number") { + warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + } else if (isNaN(val)) { + warn$1(`${type} is NaN - the duration expression might be incorrect.`); + } +} + +const ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER", + "COMPONENT_UPDATE": 15, + "15": "COMPONENT_UPDATE", + "APP_UNMOUNT_CLEANUP": 16, + "16": "APP_UNMOUNT_CLEANUP" +}; +const ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush", + [15]: "component update", + [16]: "app unmount cleanup function" +}; +function callWithErrorHandling(fn, instance, type, args) { + try { + return args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } +} +function callWithAsyncErrorHandling(fn, instance, type, args) { + if (shared.isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && shared.isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); + } + return res; + } + if (shared.isArray(fn)) { + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; + } else { + warn$1( + `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` + ); + } +} +function handleError(err, instance, type, throwInDev = true) { + const contextVNode = instance ? instance.vnode : null; + const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || shared.EMPTY_OBJ; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = ErrorTypeStrings$1[type] ; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + return; + } + } + } + cur = cur.parent; + } + if (errorHandler) { + reactivity.pauseTracking(); + callWithErrorHandling(errorHandler, null, 10, [ + err, + exposedInstance, + errorInfo + ]); + reactivity.resetTracking(); + return; + } + } + logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); +} +function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { + { + const info = ErrorTypeStrings$1[type]; + if (contextVNode) { + pushWarningContext(contextVNode); + } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } +} + +const queue = []; +let flushIndex = -1; +const pendingPostFlushCbs = []; +let activePostFlushCbs = null; +let postFlushIndex = 0; +const resolvedPromise = /* @__PURE__ */ Promise.resolve(); +let currentFlushPromise = null; +const RECURSION_LIMIT = 100; +function nextTick(fn) { + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; +} +function findInsertionIndex(id) { + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { + start = middle + 1; + } else { + end = middle; + } + } + return start; +} +function queueJob(job) { + if (!(job.flags & 1)) { + const jobId = getId(job); + const lastJob = queue[queue.length - 1]; + if (!lastJob || // fast path when the job id is larger than the tail + !(job.flags & 2) && jobId >= getId(lastJob)) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(jobId), 0, job); + } + job.flags |= 1; + queueFlush(); + } +} +function queueFlush() { + if (!currentFlushPromise) { + currentFlushPromise = resolvedPromise.then(flushJobs); + } +} +function queuePostFlushCb(cb) { + if (!shared.isArray(cb)) { + if (activePostFlushCbs && cb.id === -1) { + activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); + } else if (!(cb.flags & 1)) { + pendingPostFlushCbs.push(cb); + cb.flags |= 1; + } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); +} +function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.flags & 2) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + if (cb.flags & 4) { + cb.flags &= ~1; + } + cb(); + if (!(cb.flags & 4)) { + cb.flags &= ~1; + } + } + } +} +function flushPostFlushCbs(seen) { + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; + } + activePostFlushCbs = deduped; + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + const cb = activePostFlushCbs[postFlushIndex]; + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + if (cb.flags & 4) { + cb.flags &= ~1; + } + if (!(cb.flags & 8)) cb(); + cb.flags &= ~1; + } + activePostFlushCbs = null; + postFlushIndex = 0; + } +} +const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; +function flushJobs(seen) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + const check = (job) => checkRecursiveUpdates(seen, job) ; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && !(job.flags & 8)) { + if (check(job)) { + continue; + } + if (job.flags & 4) { + job.flags &= ~1; + } + callWithErrorHandling( + job, + job.i, + job.i ? 15 : 14 + ); + if (!(job.flags & 4)) { + job.flags &= ~1; + } + } + } + } finally { + for (; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job) { + job.flags &= ~1; + } + } + flushIndex = -1; + queue.length = 0; + flushPostFlushCbs(seen); + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); + } + } +} +function checkRecursiveUpdates(seen, fn) { + const count = seen.get(fn) || 0; + if (count > RECURSION_LIMIT) { + const instance = fn.i; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } + seen.set(fn, count + 1); + return false; +} + +let isHmrUpdating = false; +const hmrDirtyComponents = /* @__PURE__ */ new Map(); +{ + shared.getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; +} +const map = /* @__PURE__ */ new Map(); +function registerHMR(instance) { + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); +} +function unregisterHMR(instance) { + map.get(instance.type.__hmrId).instances.delete(instance); +} +function createRecord(id, initialDef) { + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; +} +function normalizeClassComponent(component) { + return isClassComponent(component) ? component.__vccOpts : component; +} +function rerender(id, newRender) { + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; + } + instance.renderCache = []; + isHmrUpdating = true; + instance.update(); + isHmrUpdating = false; + }); +} +function reload(id, newComp) { + const record = map.get(id); + if (!record) return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (let i = 0; i < instances.length; i++) { + const instance = instances[i]; + const oldComp = normalizeClassComponent(instance.type); + let dirtyInstances = hmrDirtyComponents.get(oldComp); + if (!dirtyInstances) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set()); + } + dirtyInstances.add(instance); + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + dirtyInstances.add(instance); + instance.ceReload(newComp.styles); + dirtyInstances.delete(instance); + } else if (instance.parent) { + queueJob(() => { + isHmrUpdating = true; + instance.parent.update(); + isHmrUpdating = false; + dirtyInstances.delete(instance); + }); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + if (instance.root.ce && instance !== instance.root) { + instance.root.ce._removeChildStyle(oldComp); + } + } + queuePostFlushCb(() => { + hmrDirtyComponents.clear(); + }); +} +function updateComponentDef(oldComp, newComp) { + shared.extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; + } + } +} +function tryWrap(fn) { + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; +} + +let devtools$1; +let buffer = []; +let devtoolsNotInstalled = false; +function emit$1(event, ...args) { + if (devtools$1) { + devtools$1.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } +} +function setDevtoolsHook$1(hook, target) { + var _a, _b; + devtools$1 = hook; + if (devtools$1) { + devtools$1.enabled = true; + buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); + buffer = []; + } else if ( + // handle late devtools injection - only do this if we are in an actual + // browser environment to avoid the timer handle stalling test runner exit + // (#4815) + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + // eslint-disable-next-line no-restricted-syntax + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook$1(newHook, target); + }); + setTimeout(() => { + if (!devtools$1) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; + devtoolsNotInstalled = true; + buffer = []; + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } +} +function devtoolsInitApp(app, version) { + emit$1("app:init" /* APP_INIT */, app, version, { + Fragment, + Text, + Comment, + Static + }); +} +function devtoolsUnmountApp(app) { + emit$1("app:unmount" /* APP_UNMOUNT */, app); +} +const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); +const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); +const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( + "component:removed" /* COMPONENT_REMOVED */ +); +const devtoolsComponentRemoved = (component) => { + if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools$1.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } +}; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function createDevtoolsComponentHook(hook) { + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; +} +const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); +const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); +function createDevtoolsPerformanceHook(hook) { + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; +} +function devtoolsComponentEmit(component, event, params) { + emit$1( + "component:emit" /* COMPONENT_EMIT */, + component.appContext.app, + component, + event, + params + ); +} + +let currentRenderingInstance = null; +let currentScopeId = null; +function setCurrentRenderingInstance(instance) { + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; +} +function pushScopeId(id) { + currentScopeId = id; +} +function popScopeId() { + currentScopeId = null; +} +const withScopeId = (_id) => withCtx; +function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); + } + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; +} + +function validateDirectiveName(name) { + if (shared.isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } +} +function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + warn$1(`withDirectives can only be used inside render functions.`); + return vnode; + } + const instance = getComponentPublicInstance(currentRenderingInstance); + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = shared.EMPTY_OBJ] = directives[i]; + if (dir) { + if (shared.isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + reactivity.traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; +} +function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + reactivity.pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + reactivity.resetTracking(); + } + } +} + +const TeleportEndKey = Symbol("_vte"); +const isTeleport = (type) => type.__isTeleport; +const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); +const isTeleportDeferred = (props) => props && (props.defer || props.defer === ""); +const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; +const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; +const resolveTarget = (props, select) => { + const targetSelector = props && props.to; + if (shared.isString(targetSelector)) { + if (!select) { + warn$1( + `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` + ); + return null; + } else { + const target = select(targetSelector); + if (!target && !isTeleportDisabled(props)) { + warn$1( + `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` + ); + } + return target; + } + } else { + if (!targetSelector && !isTeleportDisabled(props)) { + warn$1(`Invalid Teleport target: ${targetSelector}`); + } + return targetSelector; + } +}; +const TeleportImpl = { + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (isHmrUpdating) { + optimized = false; + dynamicChildren = null; + } + if (n1 == null) { + const placeholder = n2.el = createComment("teleport start") ; + const mainAnchor = n2.anchor = createComment("teleport end") ; + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + if (parentComponent && parentComponent.isCE) { + parentComponent.ce._teleportTarget = container2; + } + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountToTarget = () => { + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = prepareAnchor(target, n2, createText, insert); + if (target) { + if (namespace !== "svg" && isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace !== "mathml" && isTargetMathML(target)) { + namespace = "mathml"; + } + if (!disabled) { + mount(target, targetAnchor); + updateCssVars(n2, false); + } + } else if (!disabled) { + warn$1( + "Invalid Teleport target on mount:", + target, + `(${typeof target})` + ); + } + }; + if (disabled) { + mount(container, mainAnchor); + updateCssVars(n2, true); + } + if (isTeleportDeferred(n2.props)) { + queuePostRenderEffect(() => { + mountToTarget(); + n2.el.__isMounted = true; + }, parentSuspense); + } else { + mountToTarget(); + } + } else { + if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) { + queuePostRenderEffect(() => { + TeleportImpl.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + delete n1.el.__isMounted; + }, parentSuspense); + return; + } + n2.el = n1.el; + n2.targetStart = n1.targetStart; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } else { + warn$1( + "Invalid Teleport target on update:", + target, + `(${typeof target})` + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); + } + } + updateCssVars(n2, disabled); + } + }, + remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { + shapeFlag, + children, + anchor, + targetStart, + targetAnchor, + target, + props + } = vnode; + if (target) { + hostRemove(targetStart); + hostRemove(targetAnchor); + } + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport +}; +function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } +} +function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector, insert, createText } +}, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const disabled = isTeleportDisabled(vnode.props); + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (disabled) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetStart = targetNode; + vnode.targetAnchor = targetNode && nextSibling(targetNode); + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + if (targetAnchor && targetAnchor.nodeType === 8) { + if (targetAnchor.data === "teleport start anchor") { + vnode.targetStart = targetAnchor; + } else if (targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + targetAnchor = nextSibling(targetAnchor); + } + if (!vnode.targetAnchor) { + prepareAnchor(target, vnode, createText, insert); + } + hydrateChildren( + targetNode && nextSibling(targetNode), + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode, disabled); + } + return vnode.anchor && nextSibling(vnode.anchor); +} +const Teleport = TeleportImpl; +function updateCssVars(vnode, isDisabled) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node, anchor; + if (isDisabled) { + node = vnode.el; + anchor = vnode.anchor; + } else { + node = vnode.targetStart; + anchor = vnode.targetAnchor; + } + while (node && node !== anchor) { + if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } +} +function prepareAnchor(target, vnode, createText, insert) { + const targetStart = vnode.targetStart = createText(""); + const targetAnchor = vnode.targetAnchor = createText(""); + targetStart[TeleportEndKey] = targetAnchor; + if (target) { + insert(targetStart, target); + insert(targetAnchor, target); + } + return targetAnchor; +} + +const leaveCbKey = Symbol("_leaveCb"); +const enterCbKey = Symbol("_enterCb"); +function useTransitionState() { + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; +} +const TransitionHookValidator = [Function, Array]; +const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator +}; +const recursiveGetSubtree = (instance) => { + const subTree = instance.subTree; + return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; +}; +const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + const child = findNonCommentChild(children); + const rawProps = reactivity.toRaw(props); + const { mode } = rawProps; + if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { + warn$1(`invalid <transition> mode: ${mode}`); + } + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getInnerChild$1(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + let enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance, + // #11061, ensure enterHooks is fresh after clone + (hooks) => enterHooks = hooks + ); + if (innerChild.type !== Comment) { + setTransitionHooks(innerChild, enterHooks); + } + let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree); + if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { + let leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in" && innerChild.type !== Comment) { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (!(instance.job.flags & 8)) { + instance.update(); + } + delete leavingHooks.afterLeave; + oldInnerChild = void 0; + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + enterHooks.delayedLeave = () => { + delayedLeave(); + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + }; + } else { + oldInnerChild = void 0; + } + } else if (oldInnerChild) { + oldInnerChild = void 0; + } + return child; + }; + } +}; +function findNonCommentChild(children) { + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c of children) { + if (c.type !== Comment) { + if (hasFound) { + warn$1( + "<transition> can only be used on a single element or component. Use <transition-group> for lists." + ); + break; + } + child = c; + hasFound = true; + } + } + } + return child; +} +const BaseTransition = BaseTransitionImpl; +function getLeavingNodesForType(state, vnode) { + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; +} +function resolveTransitionHooks(vnode, props, state, instance, postClone) { + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook(hook, args); + if (shared.isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) done(); + } else if (hook.length <= 1) { + done(); + } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey] = (cancelled) => { + if (called) return; + called = true; + if (cancelled) { + callHook(cancelHook, [el]); + } else { + callHook(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove) { + const key2 = String(vnode.key); + if (el[enterCbKey]) { + el[enterCbKey]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove(); + } + callHook(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) return; + called = true; + remove(); + if (cancelled) { + callHook(onLeaveCancelled, [el]); + } else { + callHook(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + const hooks2 = resolveTransitionHooks( + vnode2, + props, + state, + instance, + postClone + ); + if (postClone) postClone(hooks2); + return hooks2; + } + }; + return hooks; +} +function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } +} +function getInnerChild$1(vnode) { + if (!isKeepAlive(vnode)) { + if (isTeleport(vnode.type) && vnode.children) { + return findNonCommentChild(vnode.children); + } + return vnode; + } + if (vnode.component) { + return vnode.component.subTree; + } + const { shapeFlag, children } = vnode; + if (children) { + if (shapeFlag & 16) { + return children[0]; + } + if (shapeFlag & 32 && shared.isFunction(children.default)) { + return children.default(); + } + } +} +function setTransitionHooks(vnode, hooks) { + if (vnode.shapeFlag & 6 && vnode.component) { + vnode.transition = hooks; + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } +} +function getTransitionRawChildren(children, keepComment = false, parentKey) { + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); + } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; + } + } + return ret; +} + +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineComponent(options, extraOptions) { + return shared.isFunction(options) ? ( + // #8236: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => shared.extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; +} + +function useId() { + const i = getCurrentInstance(); + if (i) { + return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++; + } else { + warn$1( + `useId() is called when there is no active component instance to be associated with.` + ); + } + return ""; +} +function markAsyncBoundary(instance) { + instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; +} + +const knownTemplateRefs = /* @__PURE__ */ new WeakSet(); +function useTemplateRef(key) { + const i = getCurrentInstance(); + const r = reactivity.shallowRef(null); + if (i) { + const refs = i.refs === shared.EMPTY_OBJ ? i.refs = {} : i.refs; + let desc; + if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) { + warn$1(`useTemplateRef('${key}') already exists.`); + } else { + Object.defineProperty(refs, key, { + enumerable: true, + get: () => r.value, + set: (val) => r.value = val + }); + } + } else { + warn$1( + `useTemplateRef() is called when there is no active component instance to be associated with.` + ); + } + const ret = reactivity.readonly(r) ; + { + knownTemplateRefs.add(ret); + } + return ret; +} + +function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { + if (shared.isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (shared.isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) { + setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree); + } + return; + } + const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === shared.EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + const rawSetupState = reactivity.toRaw(setupState); + const canSetSetupRef = setupState === shared.EMPTY_OBJ ? () => false : (key) => { + { + if (shared.hasOwn(rawSetupState, key) && !reactivity.isRef(rawSetupState[key])) { + warn$1( + `Template ref "${key}" used on a non-ref value. It will not work in the production build.` + ); + } + if (knownTemplateRefs.has(rawSetupState[key])) { + return false; + } + } + return shared.hasOwn(rawSetupState, key); + }; + if (oldRef != null && oldRef !== ref) { + if (shared.isString(oldRef)) { + refs[oldRef] = null; + if (canSetSetupRef(oldRef)) { + setupState[oldRef] = null; + } + } else if (reactivity.isRef(oldRef)) { + oldRef.value = null; + } + } + if (shared.isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = shared.isString(ref); + const _isRef = reactivity.isRef(ref); + if (_isString || _isRef) { + const doSet = () => { + if (rawRef.f) { + const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + shared.isArray(existing) && shared.remove(existing, refValue); + } else { + if (!shared.isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (canSetSetupRef(ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); + } + } + } else if (_isString) { + refs[ref] = value; + if (canSetSetupRef(ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) refs[rawRef.k] = value; + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + }; + if (value) { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } else { + doSet(); + } + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + } +} + +let hasLoggedMismatchError = false; +const logMismatchError = () => { + if (hasLoggedMismatchError) { + return; + } + console.error("Hydration completed but contains mismatches."); + hasLoggedMismatchError = true; +}; +const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; +const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); +const getContainerType = (container) => { + if (container.nodeType !== 1) return void 0; + if (isSVGContainer(container)) return "svg"; + if (isMathMLContainer(container)) return "mathml"; + return void 0; +}; +const isComment = (node) => node.nodeType === 8; +function createHydrationFunctions(rendererInternals) { + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment + } + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + warn$1( + `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` + ); + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; + } + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; + }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + optimized = optimized || !!vnode.dynamicChildren; + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + { + shared.def(node, "__vnode", vnode, true); + shared.def(node, "__vueParentComponent", parentComponent, true); + } + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { + warn$1( + `Hydration text mismatch in`, + node.parentNode, + ` + - rendered on server: ${JSON.stringify( + node.data + )} + - expected on client: ${JSON.stringify(vnode.children)}` + ); + logMismatchError(); + node.data = vnode.children; + } + nextNode = nextSibling(node); + } + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 || domType === 3) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else { + warn$1("Invalid HostVNode type:", type, `(${typeof type})`); + } + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; + }; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition( + null, + // no need check parentSuspense in hydration + transition + ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + let hasWarned = false; + while (next) { + if (!isMismatchAllowed(el, 1 /* CHILDREN */)) { + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + el, + ` +Server rendered element contains more child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + let clientText = vnode.children; + if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) { + clientText = clientText.slice(1); + } + if (el.textContent !== clientText) { + if (!isMismatchAllowed(el, 0 /* TEXT */)) { + warn$1( + `Hydration text content mismatch on`, + el, + ` + - rendered on server: ${el.textContent} + - expected on client: ${vnode.children}` + ); + logMismatchError(); + } + el.textContent = vnode.children; + } + } + if (props) { + { + const isCustomElement = el.tagName.includes("-"); + for (const key in props) { + if (// #11189 skip if this node has directives that have created hooks + // as it could have mutated the DOM in any possible way + !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) { + logMismatchError(); + } + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || shared.isOn(key) && !shared.isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === "." || isCustomElement) { + patchProp(el, key, null, props[key], void 0, parentComponent); + } + } + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + } + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + let hasWarned = false; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + const isText = vnode.type === Text; + if (node) { + if (isText && !optimized) { + if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) { + insert( + createText( + node.data.slice(vnode.children.length) + ), + container, + nextSibling(node) + ); + node.data = vnode.children; + } + } + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (isText && !vnode.children) { + insert(vnode.el = createText(""), container); + } else { + if (!isMismatchAllowed(container, 1 /* CHILDREN */)) { + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + container, + ` +Server rendered element contains fewer child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + } + } + return node; + }; + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); + } else { + logMismatchError(); + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) { + warn$1( + `Hydration node mismatch: +- rendered on server:`, + node, + node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, + ` +- expected on client:`, + vnode.type + ); + logMismatchError(); + } + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; + } + } + } + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + if (parentComponent) { + parentComponent.vnode.el = vnode.el; + updateHOCHostEl(parentComponent, vnode.el); + } + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } + } + } + } + return node; + }; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 && node.tagName === "TEMPLATE"; + }; + return [hydrate, hydrateNode]; +} +function propHasMismatch(el, key, clientValue, vnode, instance) { + let mismatchType; + let mismatchKey; + let actual; + let expected; + if (key === "class") { + actual = el.getAttribute("class"); + expected = shared.normalizeClass(clientValue); + if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { + mismatchType = 2 /* CLASS */; + mismatchKey = `class`; + } + } else if (key === "style") { + actual = el.getAttribute("style") || ""; + expected = shared.isString(clientValue) ? clientValue : shared.stringifyStyle(shared.normalizeStyle(clientValue)); + const actualMap = toStyleMap(actual); + const expectedMap = toStyleMap(expected); + if (vnode.dirs) { + for (const { dir, value } of vnode.dirs) { + if (dir.name === "show" && !value) { + expectedMap.set("display", "none"); + } + } + } + if (instance) { + resolveCssVars(instance, vnode, expectedMap); + } + if (!isMapEqual(actualMap, expectedMap)) { + mismatchType = 3 /* STYLE */; + mismatchKey = "style"; + } + } else if (el instanceof SVGElement && shared.isKnownSvgAttr(key) || el instanceof HTMLElement && (shared.isBooleanAttr(key) || shared.isKnownHtmlAttr(key))) { + if (shared.isBooleanAttr(key)) { + actual = el.hasAttribute(key); + expected = shared.includeBooleanAttr(clientValue); + } else if (clientValue == null) { + actual = el.hasAttribute(key); + expected = false; + } else { + if (el.hasAttribute(key)) { + actual = el.getAttribute(key); + } else if (key === "value" && el.tagName === "TEXTAREA") { + actual = el.value; + } else { + actual = false; + } + expected = shared.isRenderableAttrValue(clientValue) ? String(clientValue) : false; + } + if (actual !== expected) { + mismatchType = 4 /* ATTRIBUTE */; + mismatchKey = key; + } + } + if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) { + const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; + const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`; + const postSegment = ` + - rendered on server: ${format(actual)} + - expected on client: ${format(expected)} + Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. + You should fix the source of the mismatch.`; + { + warn$1(preSegment, el, postSegment); + } + return true; + } + return false; +} +function toClassSet(str) { + return new Set(str.trim().split(/\s+/)); +} +function isSetEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const s of a) { + if (!b.has(s)) { + return false; + } + } + return true; +} +function toStyleMap(str) { + const styleMap = /* @__PURE__ */ new Map(); + for (const item of str.split(";")) { + let [key, value] = item.split(":"); + key = key.trim(); + value = value && value.trim(); + if (key && value) { + styleMap.set(key, value); + } + } + return styleMap; +} +function isMapEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const [key, value] of a) { + if (value !== b.get(key)) { + return false; + } + } + return true; +} +function resolveCssVars(instance, vnode, expectedMap) { + const root = instance.subTree; + if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) { + const cssVars = instance.getCssVars(); + for (const key in cssVars) { + expectedMap.set( + `--${shared.getEscapedCssVarName(key, false)}`, + String(cssVars[key]) + ); + } + } + if (vnode === root && instance.parent) { + resolveCssVars(instance.parent, instance.vnode, expectedMap); + } +} +const allowMismatchAttr = "data-allow-mismatch"; +const MismatchTypeString = { + [0 /* TEXT */]: "text", + [1 /* CHILDREN */]: "children", + [2 /* CLASS */]: "class", + [3 /* STYLE */]: "style", + [4 /* ATTRIBUTE */]: "attribute" +}; +function isMismatchAllowed(el, allowedType) { + if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) { + while (el && !el.hasAttribute(allowMismatchAttr)) { + el = el.parentElement; + } + } + const allowedAttr = el && el.getAttribute(allowMismatchAttr); + if (allowedAttr == null) { + return false; + } else if (allowedAttr === "") { + return true; + } else { + const list = allowedAttr.split(","); + if (allowedType === 0 /* TEXT */ && list.includes("children")) { + return true; + } + return allowedAttr.split(",").includes(MismatchTypeString[allowedType]); + } +} + +const requestIdleCallback = shared.getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1)); +const cancelIdleCallback = shared.getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id)); +const hydrateOnIdle = (timeout = 1e4) => (hydrate) => { + const id = requestIdleCallback(hydrate, { timeout }); + return () => cancelIdleCallback(id); +}; +function elementIsVisibleInViewport(el) { + const { top, left, bottom, right } = el.getBoundingClientRect(); + const { innerHeight, innerWidth } = window; + return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth); +} +const hydrateOnVisible = (opts) => (hydrate, forEach) => { + const ob = new IntersectionObserver((entries) => { + for (const e of entries) { + if (!e.isIntersecting) continue; + ob.disconnect(); + hydrate(); + break; + } + }, opts); + forEach((el) => { + if (!(el instanceof Element)) return; + if (elementIsVisibleInViewport(el)) { + hydrate(); + ob.disconnect(); + return false; + } + ob.observe(el); + }); + return () => ob.disconnect(); +}; +const hydrateOnMediaQuery = (query) => (hydrate) => { + if (query) { + const mql = matchMedia(query); + if (mql.matches) { + hydrate(); + } else { + mql.addEventListener("change", hydrate, { once: true }); + return () => mql.removeEventListener("change", hydrate); + } + } +}; +const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => { + if (shared.isString(interactions)) interactions = [interactions]; + let hasHydrated = false; + const doHydrate = (e) => { + if (!hasHydrated) { + hasHydrated = true; + teardown(); + hydrate(); + e.target.dispatchEvent(new e.constructor(e.type, e)); + } + }; + const teardown = () => { + forEach((el) => { + for (const i of interactions) { + el.removeEventListener(i, doHydrate); + } + }); + }; + forEach((el) => { + for (const i of interactions) { + el.addEventListener(i, doHydrate, { once: true }); + } + }); + return teardown; +}; +function forEachElement(node, cb) { + if (isComment(node) && node.data === "[") { + let depth = 1; + let next = node.nextSibling; + while (next) { + if (next.nodeType === 1) { + const result = cb(next); + if (result === false) { + break; + } + } else if (isComment(next)) { + if (next.data === "]") { + if (--depth === 0) break; + } else if (next.data === "[") { + depth++; + } + } + next = next.nextSibling; + } + } else { + cb(node); + } +} + +const isAsyncWrapper = (i) => !!i.type.__asyncLoader; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineAsyncComponent(source) { + if (shared.isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + hydrate: hydrateStrategy, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve, reject) => { + const userRetry = () => resolve(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (!comp) { + warn$1( + `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` + ); + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + if (comp && !shared.isObject(comp) && !shared.isFunction(comp)) { + throw new Error(`Invalid async component load result: ${comp}`); + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + __asyncHydrate(el, instance, hydrate) { + const doHydrate = hydrateStrategy ? () => { + const teardown = hydrateStrategy( + hydrate, + (cb) => forEachElement(el, cb) + ); + if (teardown) { + (instance.bum || (instance.bum = [])).push(teardown); + } + } : hydrate; + if (resolvedComp) { + doHydrate(); + } else { + load().then(() => !instance.isUnmounted && doHydrate()); + } + }, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + markAsyncBoundary(instance); + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { + pendingRequest = null; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || isInSSRComponentSetup) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = reactivity.ref(false); + const error = reactivity.ref(); + const delayed = reactivity.ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.update(); + } + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); +} +function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; +} + +const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; +const KeepAliveImpl = { + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + if (!sharedContext.renderer) { + return () => { + const children = slots.default && slots.default(); + return children && children.length === 1 ? children[0] : children; + }; + } + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + { + instance.__v_cache = cache; + } + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + shared.invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + invalidateMount(instance2.m); + invalidateMount(instance2.a); + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + shared.invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && !filter(name)) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (cached && (!current || !isSameVNodeType(cached, current))) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + if (isSuspense(instance.subTree.type)) { + queuePostRenderEffect(() => { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + }, instance.subTree.suspense); + } else { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return current = null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + { + warn$1(`KeepAlive should contain exactly one component child.`); + } + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + if (vnode.type === Comment) { + current = null; + return vnode; + } + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + vnode.shapeFlag &= ~256; + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } +}; +const KeepAlive = KeepAliveImpl; +function matches(pattern, name) { + if (shared.isArray(pattern)) { + return pattern.some((p) => matches(p, name)); + } else if (shared.isString(pattern)) { + return pattern.split(",").includes(name); + } else if (shared.isRegExp(pattern)) { + pattern.lastIndex = 0; + return pattern.test(name); + } + return false; +} +function onActivated(hook, target) { + registerKeepAliveHook(hook, "a", target); +} +function onDeactivated(hook, target) { + registerKeepAliveHook(hook, "da", target); +} +function registerKeepAliveHook(hook, type, target = currentInstance) { + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; + } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } +} +function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + shared.remove(keepAliveRoot[type], injected); + }, target); +} +function resetShapeFlag(vnode) { + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; +} +function getInnerChild(vnode) { + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; +} + +function injectHook(type, hook, target = currentInstance, prepend = false) { + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + reactivity.pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + reactivity.resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); + } + return wrappedHook; + } else { + const apiName = shared.toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) + ); + } +} +const createHook = (lifecycle) => (hook, target = currentInstance) => { + if (!isInSSRComponentSetup || lifecycle === "sp") { + injectHook(lifecycle, (...args) => hook(...args), target); + } +}; +const onBeforeMount = createHook("bm"); +const onMounted = createHook("m"); +const onBeforeUpdate = createHook( + "bu" +); +const onUpdated = createHook("u"); +const onBeforeUnmount = createHook( + "bum" +); +const onUnmounted = createHook("um"); +const onServerPrefetch = createHook( + "sp" +); +const onRenderTriggered = createHook("rtg"); +const onRenderTracked = createHook("rtc"); +function onErrorCaptured(hook, target = currentInstance) { + injectHook("ec", hook, target); +} + +const COMPONENTS = "components"; +const DIRECTIVES = "directives"; +function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; +} +const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); +function resolveDynamicComponent(component) { + if (shared.isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } +} +function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); +} +function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === shared.camelize(name) || selfName === shared.capitalize(shared.camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else { + warn$1( + `resolve${shared.capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } +} +function resolve(registry, name) { + return registry && (registry[name] || registry[shared.camelize(name)] || registry[shared.capitalize(shared.camelize(name))]); +} + +function renderList(source, renderItem, cache, index) { + let ret; + const cached = cache && cache[index]; + const sourceIsArray = shared.isArray(source); + if (sourceIsArray || shared.isString(source)) { + const sourceIsReactiveArray = sourceIsArray && reactivity.isReactive(source); + let needsWrap = false; + if (sourceIsReactiveArray) { + needsWrap = !reactivity.isShallow(source); + source = reactivity.shallowReadArray(source); + } + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem( + needsWrap ? reactivity.toReactive(source[i]) : source[i], + i, + void 0, + cached && cached[i] + ); + } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn$1(`The v-for range expect an integer value but got ${source}.`); + } + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); + } + } else if (shared.isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } + } + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; +} + +function createSlots(slots, dynamicSlots) { + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (shared.isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) res.key = slot.key; + return res; + } : slot.fn; + } + } + return slots; +} + +function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) { + if (name !== "default") props.name = name; + return openBlock(), createBlock( + Fragment, + null, + [createVNode("slot", props, fallback && fallback())], + 64 + ); + } + let slot = slots[name]; + if (slot && slot.length > 1) { + warn$1( + `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` + ); + slot = () => []; + } + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key; + const rendered = createBlock( + Fragment, + { + key: (slotKey && !shared.isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content + (!validSlotContent && fallback ? "_fb" : "") + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; +} +function ensureValidVNode(vnodes) { + return vnodes.some((child) => { + if (!isVNode(child)) return true; + if (child.type === Comment) return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; +} + +function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + if (!shared.isObject(obj)) { + warn$1(`v-on with no argument expects an object value.`); + return ret; + } + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : shared.toHandlerKey(key)] = obj[key]; + } + return ret; +} + +const getPublicInstance = (i) => { + if (!i) return null; + if (isStatefulComponent(i)) return getComponentPublicInstance(i); + return getPublicInstance(i.parent); +}; +const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ shared.extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => reactivity.shallowReadonly(i.props) , + $attrs: (i) => reactivity.shallowReadonly(i.attrs) , + $slots: (i) => reactivity.shallowReadonly(i.slots) , + $refs: (i) => reactivity.shallowReadonly(i.refs) , + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $host: (i) => i.ce, + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i) , + $forceUpdate: (i) => i.f || (i.f = () => { + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) +); +const isReservedPrefix = (key) => key === "_" || key === "$"; +const hasSetupBinding = (state, key) => state !== shared.EMPTY_OBJ && !state.__isScriptSetup && shared.hasOwn(state, key); +const PublicInstanceProxyHandlers = { + get({ _: instance }, key) { + if (key === "__v_skip") { + return true; + } + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (key === "__isVue") { + return true; + } + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && shared.hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + reactivity.track(instance.attrs, "get", ""); + markAttrsAccessed(); + } else if (key === "$slots") { + reactivity.track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, shared.hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (currentRenderingInstance && (!shared.isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== shared.EMPTY_OBJ && isReservedPrefix(key[0]) && shared.hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && shared.hasOwn(setupState, key)) { + warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); + return false; + } else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) { + data[key] = value; + return true; + } else if (shared.hasOwn(instance.props, key)) { + warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + warn$1( + `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` + ); + return false; + } else { + if (key in instance.appContext.config.globalProperties) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + value + }); + } else { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== shared.EMPTY_OBJ && shared.hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && shared.hasOwn(normalizedProps, key) || shared.hasOwn(ctx, key) || shared.hasOwn(publicPropertiesMap, key) || shared.hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (shared.hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } +}; +{ + PublicInstanceProxyHandlers.ownKeys = (target) => { + warn$1( + `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` + ); + return Reflect.ownKeys(target); + }; +} +const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ shared.extend({}, PublicInstanceProxyHandlers, { + get(target, key) { + if (key === Symbol.unscopables) { + return; + } + return PublicInstanceProxyHandlers.get(target, key, target); + }, + has(_, key) { + const has = key[0] !== "_" && !shared.isGloballyAllowed(key); + if (!has && PublicInstanceProxyHandlers.has(_, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} should not start with _ which is a reserved prefix for Vue internals.` + ); + } + return has; + } +}); +function createDevRenderContext(instance) { + const target = {}; + Object.defineProperty(target, `_`, { + configurable: true, + enumerable: false, + get: () => instance + }); + Object.keys(publicPropertiesMap).forEach((key) => { + Object.defineProperty(target, key, { + configurable: true, + enumerable: false, + get: () => publicPropertiesMap[key](instance), + // intercepted by the proxy so no need for implementation, + // but needed to prevent set errors + set: shared.NOOP + }); + }); + return target; +} +function exposePropsOnRenderContext(instance) { + const { + ctx, + propsOptions: [propsOptions] + } = instance; + if (propsOptions) { + Object.keys(propsOptions).forEach((key) => { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => instance.props[key], + set: shared.NOOP + }); + }); + } +} +function exposeSetupStateOnRenderContext(instance) { + const { ctx, setupState } = instance; + Object.keys(reactivity.toRaw(setupState)).forEach((key) => { + if (!setupState.__isScriptSetup) { + if (isReservedPrefix(key[0])) { + warn$1( + `setup() return property ${JSON.stringify( + key + )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` + ); + return; + } + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => setupState[key], + set: shared.NOOP + }); + } + }); +} + +const warnRuntimeUsage = (method) => warn$1( + `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` +); +function defineProps() { + { + warnRuntimeUsage(`defineProps`); + } + return null; +} +function defineEmits() { + { + warnRuntimeUsage(`defineEmits`); + } + return null; +} +function defineExpose(exposed) { + { + warnRuntimeUsage(`defineExpose`); + } +} +function defineOptions(options) { + { + warnRuntimeUsage(`defineOptions`); + } +} +function defineSlots() { + { + warnRuntimeUsage(`defineSlots`); + } + return null; +} +function defineModel() { + { + warnRuntimeUsage("defineModel"); + } +} +function withDefaults(props, defaults) { + { + warnRuntimeUsage(`withDefaults`); + } + return null; +} +function useSlots() { + return getContext().slots; +} +function useAttrs() { + return getContext().attrs; +} +function getContext() { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useContext() called without active instance.`); + } + return i.setupContext || (i.setupContext = createSetupContext(i)); +} +function normalizePropsOrEmits(props) { + return shared.isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; +} +function mergeDefaults(raw, defaults) { + const props = normalizePropsOrEmits(raw); + for (const key in defaults) { + if (key.startsWith("__skip")) continue; + let opt = props[key]; + if (opt) { + if (shared.isArray(opt) || shared.isFunction(opt)) { + opt = props[key] = { type: opt, default: defaults[key] }; + } else { + opt.default = defaults[key]; + } + } else if (opt === null) { + opt = props[key] = { default: defaults[key] }; + } else { + warn$1(`props default key "${key}" has no corresponding declaration.`); + } + if (opt && defaults[`__skip_${key}`]) { + opt.skipFactory = true; + } + } + return props; +} +function mergeModels(a, b) { + if (!a || !b) return a || b; + if (shared.isArray(a) && shared.isArray(b)) return a.concat(b); + return shared.extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); +} +function createPropsRestProxy(props, excludedKeys) { + const ret = {}; + for (const key in props) { + if (!excludedKeys.includes(key)) { + Object.defineProperty(ret, key, { + enumerable: true, + get: () => props[key] + }); + } + } + return ret; +} +function withAsyncContext(getAwaitable) { + const ctx = getCurrentInstance(); + if (!ctx) { + warn$1( + `withAsyncContext called without active current instance. This is likely a bug.` + ); + } + let awaitable = getAwaitable(); + unsetCurrentInstance(); + if (shared.isPromise(awaitable)) { + awaitable = awaitable.catch((e) => { + setCurrentInstance(ctx); + throw e; + }); + } + return [awaitable, () => setCurrentInstance(ctx)]; +} + +function createDuplicateChecker() { + const cache = /* @__PURE__ */ Object.create(null); + return (type, key) => { + if (cache[key]) { + warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); + } else { + cache[key] = type; + } + }; +} +let shouldCacheAccess = true; +function applyOptions(instance) { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook(options.beforeCreate, instance, "bc"); + } + const { + // state + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, + // lifecycle + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, + // public API + expose, + inheritAttrs, + // assets + components, + directives, + filters + } = options; + const checkDuplicateProperties = createDuplicateChecker() ; + { + const [propsOptions] = instance.propsOptions; + if (propsOptions) { + for (const key in propsOptions) { + checkDuplicateProperties("Props" /* PROPS */, key); + } + } + } + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (shared.isFunction(methodHandler)) { + { + Object.defineProperty(ctx, key, { + value: methodHandler.bind(publicThis), + configurable: true, + enumerable: true, + writable: true + }); + } + { + checkDuplicateProperties("Methods" /* METHODS */, key); + } + } else { + warn$1( + `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` + ); + } + } + } + if (dataOptions) { + if (!shared.isFunction(dataOptions)) { + warn$1( + `The data option must be a function. Plain object usage is no longer supported.` + ); + } + const data = dataOptions.call(publicThis, publicThis); + if (shared.isPromise(data)) { + warn$1( + `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` + ); + } + if (!shared.isObject(data)) { + warn$1(`data() should return an object.`); + } else { + instance.data = reactivity.reactive(data); + { + for (const key in data) { + checkDuplicateProperties("Data" /* DATA */, key); + if (!isReservedPrefix(key[0])) { + Object.defineProperty(ctx, key, { + configurable: true, + enumerable: true, + get: () => data[key], + set: shared.NOOP + }); + } + } + } + } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = shared.isFunction(opt) ? opt.bind(publicThis, publicThis) : shared.isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : shared.NOOP; + if (get === shared.NOOP) { + warn$1(`Computed property "${key}" has no getter.`); + } + const set = !shared.isFunction(opt) && shared.isFunction(opt.set) ? opt.set.bind(publicThis) : () => { + warn$1( + `Write operation failed: computed property "${key}" is readonly.` + ); + } ; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + { + checkDuplicateProperties("Computed" /* COMPUTED */, key); + } + } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = shared.isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (shared.isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (shared.isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val + }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; + } + } + if (render && instance.render === shared.NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) instance.components = components; + if (directives) instance.directives = directives; + if (serverPrefetch) { + markAsyncBoundary(instance); + } +} +function resolveInjections(injectOptions, ctx, checkDuplicateProperties = shared.NOOP) { + if (shared.isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (shared.isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); + } + if (reactivity.isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; + } + { + checkDuplicateProperties("Inject" /* INJECT */, key); + } + } +} +function callHook(hook, instance, type) { + callWithAsyncErrorHandling( + shared.isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); +} +function createWatcher(raw, ctx, publicThis, key) { + let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (shared.isString(raw)) { + const handler = ctx[raw]; + if (shared.isFunction(handler)) { + { + watch(getter, handler); + } + } else { + warn$1(`Invalid watch handler specified by key "${raw}"`, handler); + } + } else if (shared.isFunction(raw)) { + { + watch(getter, raw.bind(publicThis)); + } + } else if (shared.isObject(raw)) { + if (shared.isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = shared.isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (shared.isFunction(handler)) { + watch(getter, handler, raw); + } else { + warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); + } + } + } else { + warn$1(`Invalid watch option: "${key}"`, raw); + } +} +function resolveMergedOptions(instance) { + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; + } + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); + } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (shared.isObject(base)) { + cache.set(base, resolved); + } + return resolved; +} +function mergeOptions(to, from, strats, asMixin = false) { + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") { + warn$1( + `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` + ); + } else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; + } + } + return to; +} +const internalOptionMergeStrats = { + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray, + created: mergeAsArray, + beforeMount: mergeAsArray, + mounted: mergeAsArray, + beforeUpdate: mergeAsArray, + updated: mergeAsArray, + beforeDestroy: mergeAsArray, + beforeUnmount: mergeAsArray, + destroyed: mergeAsArray, + unmounted: mergeAsArray, + activated: mergeAsArray, + deactivated: mergeAsArray, + errorCaptured: mergeAsArray, + serverPrefetch: mergeAsArray, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject +}; +function mergeDataFn(to, from) { + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (shared.extend)( + shared.isFunction(to) ? to.call(this, this) : to, + shared.isFunction(from) ? from.call(this, this) : from + ); + }; +} +function mergeInject(to, from) { + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); +} +function normalizeInject(raw) { + if (shared.isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; + } + return res; + } + return raw; +} +function mergeAsArray(to, from) { + return to ? [...new Set([].concat(to, from))] : from; +} +function mergeObjectOptions(to, from) { + return to ? shared.extend(/* @__PURE__ */ Object.create(null), to, from) : from; +} +function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (shared.isArray(to) && shared.isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return shared.extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } +} +function mergeWatchOptions(to, from) { + if (!to) return from; + if (!from) return to; + const merged = shared.extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray(to[key], from[key]); + } + return merged; +} + +function createAppContext() { + return { + app: null, + config: { + isNativeTag: shared.NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; +} +let uid$1 = 0; +function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!shared.isFunction(rootComponent)) { + rootComponent = shared.extend({}, rootComponent); + } + if (rootProps != null && !shared.isObject(rootProps)) { + warn$1(`root props passed to app.mount() must be an object.`); + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + const pluginCleanupFns = []; + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + { + warn$1( + `app.config cannot be replaced. Modify individual options instead.` + ); + } + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) { + warn$1(`Plugin has already been applied to target app.`); + } else if (plugin && shared.isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (shared.isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else { + warn$1( + `A plugin must either be a function or an object with an "install" function.` + ); + } + return app; + }, + mixin(mixin) { + { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } else { + warn$1( + "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") + ); + } + } + return app; + }, + component(name, component) { + { + validateComponentName(name, context.config); + } + if (!component) { + return context.components[name]; + } + if (context.components[name]) { + warn$1(`Component "${name}" has already been registered in target app.`); + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + { + validateDirectiveName(name); + } + if (!directive) { + return context.directives[name]; + } + if (context.directives[name]) { + warn$1(`Directive "${name}" has already been registered in target app.`); + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + if (rootContainer.__vue_app__) { + warn$1( + `There is already an app instance mounted on the host container. + If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` + ); + } + const vnode = app._ceVNode || createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + { + context.reload = () => { + render( + cloneVNode(vnode), + rootContainer, + namespace + ); + }; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + { + app._instance = vnode.component; + devtoolsInitApp(app, version); + } + return getComponentPublicInstance(vnode.component); + } else { + warn$1( + `App has already been mounted. +If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` + ); + } + }, + onUnmount(cleanupFn) { + if (typeof cleanupFn !== "function") { + warn$1( + `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}` + ); + } + pluginCleanupFns.push(cleanupFn); + }, + unmount() { + if (isMounted) { + callWithAsyncErrorHandling( + pluginCleanupFns, + app._instance, + 16 + ); + render(null, app._container); + { + app._instance = null; + devtoolsUnmountApp(app); + } + delete app._container.__vue_app__; + } else { + warn$1(`Cannot unmount an app that is not mounted.`); + } + }, + provide(key, value) { + if (key in context.provides) { + warn$1( + `App already provides property with key "${String(key)}". It will be overwritten with the new value.` + ); + } + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + const lastApp = currentApp; + currentApp = app; + try { + return fn(); + } finally { + currentApp = lastApp; + } + } + }; + return app; + }; +} +let currentApp = null; + +function provide(key, value) { + if (!currentInstance) { + { + warn$1(`provide() can only be used inside setup().`); + } + } else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); + } + provides[key] = value; + } +} +function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && shared.isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else { + warn$1(`injection "${String(key)}" not found.`); + } + } else { + warn$1(`inject() can only be used inside setup() or functional components.`); + } +} +function hasInjectionContext() { + return !!(currentInstance || currentRenderingInstance || currentApp); +} + +const internalObjectProto = {}; +const createInternalObject = () => Object.create(internalObjectProto); +const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; + +function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = createInternalObject(); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + { + validateProps(rawProps || {}, props, instance); + } + if (isStateful) { + instance.props = isSSR ? props : reactivity.shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; +} +function isInHmrContext(instance) { + while (instance) { + if (instance.type.__hmrId) return true; + instance = instance.parent; + } +} +function updateProps(instance, rawProps, rawPrevProps, optimized) { + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = reactivity.toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( + // always force full diff in dev + // - #1942 if hmr is enabled with sfc component + // - vite#872 non-sfc component used by sfc component + !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; + } + const value = rawProps[key]; + if (options) { + if (shared.hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = shared.camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !shared.hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = shared.hyphenate(key)) === key || !shared.hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; + } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !shared.hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; + } + } + } + } + if (hasAttrsChanged) { + reactivity.trigger(instance.attrs, "set", ""); + } + { + validateProps(rawProps || {}, props, instance); + } +} +function setFullProps(instance, rawProps, props, attrs) { + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (shared.isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && shared.hasOwn(options, camelKey = shared.camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; + } + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + if (needCastKeys) { + const rawCurrentProps = reactivity.toRaw(props); + const castValues = rawCastValues || shared.EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !shared.hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; +} +function resolvePropValue(options, props, key, value, instance, isAbsent) { + const opt = options[key]; + if (opt != null) { + const hasDefault = shared.hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && shared.isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); + } + } else { + value = defaultValue; + } + if (instance.ce) { + instance.ce._setProp(key, value); + } + } + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === shared.hyphenate(key))) { + value = true; + } + } + } + return value; +} +const mixinPropsCache = /* @__PURE__ */ new WeakMap(); +function normalizePropsOptions(comp, appContext, asMixin = false) { + const cache = asMixin ? mixinPropsCache : appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (!shared.isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + shared.extend(normalized, props); + if (keys) needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); + } + if (comp.extends) { + extendProps(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendProps); + } + } + if (!raw && !hasExtends) { + if (shared.isObject(comp)) { + cache.set(comp, shared.EMPTY_ARR); + } + return shared.EMPTY_ARR; + } + if (shared.isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + if (!shared.isString(raw[i])) { + warn$1(`props must be strings when using array syntax.`, raw[i]); + } + const normalizedKey = shared.camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = shared.EMPTY_OBJ; + } + } + } else if (raw) { + if (!shared.isObject(raw)) { + warn$1(`invalid props options`, raw); + } + for (const key in raw) { + const normalizedKey = shared.camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = shared.isArray(opt) || shared.isFunction(opt) ? { type: opt } : shared.extend({}, opt); + const propType = prop.type; + let shouldCast = false; + let shouldCastTrue = true; + if (shared.isArray(propType)) { + for (let index = 0; index < propType.length; ++index) { + const type = propType[index]; + const typeName = shared.isFunction(type) && type.name; + if (typeName === "Boolean") { + shouldCast = true; + break; + } else if (typeName === "String") { + shouldCastTrue = false; + } + } + } else { + shouldCast = shared.isFunction(propType) && propType.name === "Boolean"; + } + prop[0 /* shouldCast */] = shouldCast; + prop[1 /* shouldCastTrue */] = shouldCastTrue; + if (shouldCast || shared.hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + const res = [normalized, needCastKeys]; + if (shared.isObject(comp)) { + cache.set(comp, res); + } + return res; +} +function validatePropName(key) { + if (key[0] !== "$" && !shared.isReservedProp(key)) { + return true; + } else { + warn$1(`Invalid prop name: "${key}" is a reserved property.`); + } + return false; +} +function getType(ctor) { + if (ctor === null) { + return "null"; + } + if (typeof ctor === "function") { + return ctor.name || ""; + } else if (typeof ctor === "object") { + const name = ctor.constructor && ctor.constructor.name; + return name || ""; + } + return ""; +} +function validateProps(rawProps, props, instance) { + const resolvedValues = reactivity.toRaw(props); + const options = instance.propsOptions[0]; + const camelizePropsKey = Object.keys(rawProps).map((key) => shared.camelize(key)); + for (const key in options) { + let opt = options[key]; + if (opt == null) continue; + validateProp( + key, + resolvedValues[key], + opt, + reactivity.shallowReadonly(resolvedValues) , + !camelizePropsKey.includes(key) + ); + } +} +function validateProp(name, value, prop, props, isAbsent) { + const { type, required, validator, skipCheck } = prop; + if (required && isAbsent) { + warn$1('Missing required prop: "' + name + '"'); + return; + } + if (value == null && !required) { + return; + } + if (type != null && type !== true && !skipCheck) { + let isValid = false; + const types = shared.isArray(type) ? type : [type]; + const expectedTypes = []; + for (let i = 0; i < types.length && !isValid; i++) { + const { valid, expectedType } = assertType(value, types[i]); + expectedTypes.push(expectedType || ""); + isValid = valid; + } + if (!isValid) { + warn$1(getInvalidTypeMessage(name, value, expectedTypes)); + return; + } + } + if (validator && !validator(value, props)) { + warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + } +} +const isSimpleType = /* @__PURE__ */ shared.makeMap( + "String,Number,Boolean,Function,Symbol,BigInt" +); +function assertType(value, type) { + let valid; + const expectedType = getType(type); + if (expectedType === "null") { + valid = value === null; + } else if (isSimpleType(expectedType)) { + const t = typeof value; + valid = t === expectedType.toLowerCase(); + if (!valid && t === "object") { + valid = value instanceof type; + } + } else if (expectedType === "Object") { + valid = shared.isObject(value); + } else if (expectedType === "Array") { + valid = shared.isArray(value); + } else { + valid = value instanceof type; + } + return { + valid, + expectedType + }; +} +function getInvalidTypeMessage(name, value, expectedTypes) { + if (expectedTypes.length === 0) { + return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; + } + let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(shared.capitalize).join(" | ")}`; + const expectedType = expectedTypes[0]; + const receivedType = shared.toRawType(value); + const expectedValue = styleValue(value, expectedType); + const receivedValue = styleValue(value, receivedType); + if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { + message += ` with value ${expectedValue}`; + } + message += `, got ${receivedType} `; + if (isExplicable(receivedType)) { + message += `with value ${receivedValue}.`; + } + return message; +} +function styleValue(value, type) { + if (type === "String") { + return `"${value}"`; + } else if (type === "Number") { + return `${Number(value)}`; + } else { + return `${value}`; + } +} +function isExplicable(type) { + const explicitTypes = ["string", "number", "boolean"]; + return explicitTypes.some((elem) => type.toLowerCase() === elem); +} +function isBoolean(...args) { + return args.some((elem) => elem.toLowerCase() === "boolean"); +} + +const isInternalKey = (key) => key[0] === "_" || key === "$stable"; +const normalizeSlotValue = (value) => shared.isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; +const normalizeSlot = (key, rawSlot, ctx) => { + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { + warn$1( + `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` + ); + } + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; +}; +const normalizeObjectSlots = (rawSlots, slots, instance) => { + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) continue; + const value = rawSlots[key]; + if (shared.isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + { + warn$1( + `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; + } + } +}; +const normalizeVNodeSlots = (instance, children) => { + if (!isKeepAlive(instance.vnode) && true) { + warn$1( + `Non-function value encountered for default slot. Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; +}; +const assignSlots = (slots, children, optimized) => { + for (const key in children) { + if (optimized || key !== "_") { + slots[key] = children[key]; + } + } +}; +const initSlots = (instance, children, optimized) => { + const slots = instance.slots = createInternalObject(); + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + assignSlots(slots, children, optimized); + if (optimized) { + shared.def(slots, "_", type, true); + } + } else { + normalizeObjectSlots(children, slots); + } + } else if (children) { + normalizeVNodeSlots(instance, children); + } +}; +const updateSlots = (instance, children, optimized) => { + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = shared.EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (isHmrUpdating) { + assignSlots(slots, children, optimized); + reactivity.trigger(instance, "set", "$slots"); + } else if (optimized && type === 1) { + needDeletionCheck = false; + } else { + assignSlots(slots, children, optimized); + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); + } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } + } + } +}; + +let supported; +let perf; +function startMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + perf.mark(`vue-${type}-${instance.uid}`); + } + { + devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); + } +} +function endMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + const startTag = `vue-${type}-${instance.uid}`; + const endTag = startTag + `:end`; + perf.mark(endTag); + perf.measure( + `<${formatComponentName(instance, instance.type)}> ${type}`, + startTag, + endTag + ); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + } + { + devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); + } +} +function isSupported() { + if (supported !== void 0) { + return supported; + } + if (typeof window !== "undefined" && window.performance) { + supported = true; + perf = window.performance; + } else { + supported = false; + } + return supported; +} + +const queuePostRenderEffect = queueEffectWithSuspense ; +function createRenderer(options) { + return baseCreateRenderer(options); +} +function createHydrationRenderer(options) { + return baseCreateRenderer(options, createHydrationFunctions); +} +function baseCreateRenderer(options, createHydrationFns) { + const target = shared.getGlobalThis(); + target.__VUE__ = true; + { + setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + } + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = shared.NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { + if (n1 === n2) { + return; + } + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: + if (n1 == null) { + mountStaticNode(n2, container, anchor, namespace); + } else { + patchStaticNode(n1, n2, container, namespace); + } + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else { + warn$1("Invalid VNode type:", type, `(${typeof type})`); + } + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const patchStaticNode = (n1, n2, container, namespace) => { + if (n2.children !== n1.children) { + const anchor = hostNextSibling(n1.anchor); + removeStaticNode(n1); + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace + ); + } else { + n2.el = n1.el; + n2.anchor = n1.anchor; + } + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !shared.isReservedProp(key)) { + hostPatchProp(el, key, null, props[key], namespace, parentComponent); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + { + shared.def(el, "__vnode", vnode, true); + shared.def(el, "__vueParentComponent", parentComponent, true); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { + subTree = filterSingleRoot(subTree.children) || subTree; + } + if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + { + el.__vnode = n2; + } + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || shared.EMPTY_OBJ; + const newProps = n2.props || shared.EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (isHmrUpdating) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { + hostSetElementText(el, ""); + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + } + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); + } + } + } else if (!optimized && dynamicChildren == null) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== shared.EMPTY_OBJ) { + for (const key in oldProps) { + if (!shared.isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + parentComponent + ); + } + } + } + for (const key in newProps) { + if (shared.isReservedProp(key)) continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if ( + // #5523 dev root fragment may inherit directives + isHmrUpdating || patchFlag & 2048 + ) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance( + initialVNode, + parentComponent, + parentSuspense + )); + if (instance.type.__hmrId) { + registerHMR(instance); + } + { + pushWarningContext(initialVNode); + startMeasure(instance, `mount`); + } + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } + { + { + startMeasure(instance, `init`); + } + setupComponent(instance, false, optimized); + { + endMeasure(instance, `init`); + } + } + if (instance.asyncDep) { + if (isHmrUpdating) initialVNode.el = null; + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); + } + { + popWarningContext(); + endMeasure(instance, `mount`); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + { + pushWarningContext(n2); + } + updateComponentPreRender(instance, n2, optimized); + { + popWarningContext(); + } + return; + } else { + instance.next = n2; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { + let vnodeHook; + const { el, props } = initialVNode; + const { bm, m, parent, root, type } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + shared.invokeArrayFns(bm); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); + } + toggleRecurse(instance, true); + if (el && hydrateNode) { + const hydrateSubTree = () => { + { + startMeasure(instance, `render`); + } + instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `hydrate`); + } + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + { + endMeasure(instance, `hydrate`); + } + }; + if (isAsyncWrapperVNode && type.__asyncHydrate) { + type.__asyncHydrate( + el, + instance, + hydrateSubTree + ); + } else { + hydrateSubTree(); + } + } else { + if (root.ce) { + root.ce._injectChildStyle(type); + } + { + startMeasure(instance, `render`); + } + const subTree = instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `patch`); + } + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + initialVNode.el = subTree.el; + } + if (m) { + queuePostRenderEffect(m, parentSuspense); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); + } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); + } + instance.isMounted = true; + { + devtoolsComponentAdded(instance); + } + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); + return; + } + } + let originNext = next; + let vnodeHook; + { + pushWarningContext(next || instance.vnode); + } + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; + } + if (bu) { + shared.invokeArrayFns(bu); + } + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); + } + toggleRecurse(instance, true); + { + startMeasure(instance, `render`); + } + const nextTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + const prevTree = instance.subTree; + instance.subTree = nextTree; + { + startMeasure(instance, `patch`); + } + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); + } + if (u) { + queuePostRenderEffect(u, parentSuspense); + } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); + } + { + devtoolsComponentUpdated(instance); + } + { + popWarningContext(); + } + } + }; + instance.scope.on(); + const effect = instance.effect = new reactivity.ReactiveEffect(componentUpdateFn); + instance.scope.off(); + const update = instance.update = effect.run.bind(effect); + const job = instance.job = effect.runIfDirty.bind(effect); + job.i = instance; + job.id = instance.uid; + effect.scheduler = () => queueJob(job); + toggleRecurse(instance, true); + { + effect.onTrack = instance.rtc ? (e) => shared.invokeArrayFns(instance.rtc, e) : void 0; + effect.onTrigger = instance.rtg ? (e) => shared.invokeArrayFns(instance.rtg, e) : void 0; + } + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + reactivity.pauseTracking(); + flushPreFlushCbs(instance); + reactivity.resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || shared.EMPTY_ARR; + c2 = c2 || shared.EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (nextChild.key != null) { + if (keyToNewIndexMap.has(nextChild.key)) { + warn$1( + `Duplicate keys found during update:`, + JSON.stringify(nextChild.key), + `Make sure keys are unique.` + ); + } + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : shared.EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs, + cacheIndex + } = vnode; + if (patchFlag === -2) { + optimized = false; + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (cacheIndex != null) { + parentComponent.renderCache[cacheIndex] = void 0; + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + internals, + doRemove + ); + } else if (dynamicChildren && // #5154 + // when v-once is used inside a block, setBlockTracking(-1) marks the + // parent block with hasOnce: true + // so that it doesn't take the fast path during unmount - otherwise + // components nested in v-once are never unmounted. + !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { + vnode.children.forEach((child) => { + if (child.type === Comment) { + hostRemove(child.el); + } else { + remove(child); + } + }); + } else { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } + }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + if (instance.type.__hmrId) { + unregisterHMR(instance); + } + const { bum, scope, job, subTree, um, m, a } = instance; + invalidateMount(m); + invalidateMount(a); + if (bum) { + shared.invokeArrayFns(bum); + } + scope.stop(); + if (job) { + job.flags |= 8; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + { + devtoolsComponentRemoved(instance); + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + const el = hostNextSibling(vnode.anchor || vnode.el); + const teleportEnd = el && el[TeleportEndKey]; + return teleportEnd ? hostNextSibling(teleportEnd) : el; + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + container._vnode = vnode; + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + if (createHydrationFns) { + [hydrate, hydrateNode] = createHydrationFns( + internals + ); + } + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; +} +function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; +} +function toggleRecurse({ effect, job }, allowed) { + if (allowed) { + effect.flags |= 32; + job.flags |= 4; + } else { + effect.flags &= ~32; + job.flags &= ~4; + } +} +function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; +} +function traverseStaticChildren(n1, n2, shallow = false) { + const ch1 = n1.children; + const ch2 = n2.children; + if (shared.isArray(ch1) && shared.isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; + } + if (!shallow && c2.patchFlag !== -2) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } + if (c2.type === Comment && !c2.el) { + c2.el = c1.el; + } + } + } +} +function getSequence(arr) { + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; + } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } + } + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; +} +function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); + } + } +} +function invalidateMount(hooks) { + if (hooks) { + for (let i = 0; i < hooks.length; i++) + hooks[i].flags |= 8; + } +} + +const ssrContextKey = Symbol.for("v-scx"); +const useSSRContext = () => { + { + const ctx = inject(ssrContextKey); + if (!ctx) { + warn$1( + `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` + ); + } + return ctx; + } +}; + +function watchEffect(effect, options) { + return doWatch(effect, null, options); +} +function watchPostEffect(effect, options) { + return doWatch( + effect, + null, + shared.extend({}, options, { flush: "post" }) + ); +} +function watchSyncEffect(effect, options) { + return doWatch( + effect, + null, + shared.extend({}, options, { flush: "sync" }) + ); +} +function watch(source, cb, options) { + if (!shared.isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); +} +function doWatch(source, cb, options = shared.EMPTY_OBJ) { + const { immediate, deep, flush, once } = options; + if (!cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + } + const baseWatchOptions = shared.extend({}, options); + baseWatchOptions.onWarn = warn$1; + const runsImmediately = cb && immediate || !cb && flush !== "post"; + let ssrCleanup; + if (isInSSRComponentSetup) { + if (flush === "sync") { + const ctx = useSSRContext(); + ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); + } else if (!runsImmediately) { + const watchStopHandle = () => { + }; + watchStopHandle.stop = shared.NOOP; + watchStopHandle.resume = shared.NOOP; + watchStopHandle.pause = shared.NOOP; + return watchStopHandle; + } + } + const instance = currentInstance; + baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args); + let isPre = false; + if (flush === "post") { + baseWatchOptions.scheduler = (job) => { + queuePostRenderEffect(job, instance && instance.suspense); + }; + } else if (flush !== "sync") { + isPre = true; + baseWatchOptions.scheduler = (job, isFirstRun) => { + if (isFirstRun) { + job(); + } else { + queueJob(job); + } + }; + } + baseWatchOptions.augmentJob = (job) => { + if (cb) { + job.flags |= 4; + } + if (isPre) { + job.flags |= 2; + if (instance) { + job.id = instance.uid; + job.i = instance; + } + } + }; + const watchHandle = reactivity.watch(source, cb, baseWatchOptions); + if (isInSSRComponentSetup) { + if (ssrCleanup) { + ssrCleanup.push(watchHandle); + } else if (runsImmediately) { + watchHandle(); + } + } + return watchHandle; +} +function instanceWatch(source, value, options) { + const publicThis = this.proxy; + const getter = shared.isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (shared.isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; +} +function createPathGetter(ctx, path) { + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; +} + +function useModel(props, name, options = shared.EMPTY_OBJ) { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useModel() called without active instance.`); + return reactivity.ref(); + } + const camelizedName = shared.camelize(name); + if (!i.propsOptions[0][camelizedName]) { + warn$1(`useModel() called with prop "${name}" which is not declared.`); + return reactivity.ref(); + } + const hyphenatedName = shared.hyphenate(name); + const modifiers = getModelModifiers(props, camelizedName); + const res = reactivity.customRef((track, trigger) => { + let localValue; + let prevSetValue = shared.EMPTY_OBJ; + let prevEmittedValue; + watchSyncEffect(() => { + const propValue = props[camelizedName]; + if (shared.hasChanged(localValue, propValue)) { + localValue = propValue; + trigger(); + } + }); + return { + get() { + track(); + return options.get ? options.get(localValue) : localValue; + }, + set(value) { + const emittedValue = options.set ? options.set(value) : value; + if (!shared.hasChanged(emittedValue, localValue) && !(prevSetValue !== shared.EMPTY_OBJ && shared.hasChanged(value, prevSetValue))) { + return; + } + const rawProps = i.vnode.props; + if (!(rawProps && // check if parent has passed v-model + (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) { + localValue = value; + trigger(); + } + i.emit(`update:${name}`, emittedValue); + if (shared.hasChanged(value, emittedValue) && shared.hasChanged(value, prevSetValue) && !shared.hasChanged(emittedValue, prevEmittedValue)) { + trigger(); + } + prevSetValue = value; + prevEmittedValue = emittedValue; + } + }; + }); + res[Symbol.iterator] = () => { + let i2 = 0; + return { + next() { + if (i2 < 2) { + return { value: i2++ ? modifiers || shared.EMPTY_OBJ : res, done: false }; + } else { + return { done: true }; + } + } + }; + }; + return res; +} +const getModelModifiers = (props, modelName) => { + return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${shared.camelize(modelName)}Modifiers`] || props[`${shared.hyphenate(modelName)}Modifiers`]; +}; + +function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) return; + const props = instance.vnode.props || shared.EMPTY_OBJ; + { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(shared.toHandlerKey(shared.camelize(event)) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${shared.toHandlerKey(shared.camelize(event))}" prop.` + ); + } + } else { + const validator = emitsOptions[event]; + if (shared.isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } + } + } + } + } + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modifiers = isModelListener && getModelModifiers(props, event.slice(7)); + if (modifiers) { + if (modifiers.trim) { + args = rawArgs.map((a) => shared.isString(a) ? a.trim() : a); + } + if (modifiers.number) { + args = rawArgs.map(shared.looseToNumber); + } + } + { + devtoolsComponentEmit(instance, event, args); + } + { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[shared.toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${shared.hyphenate( + event + )}" instead of "${event}".` + ); + } + } + let handlerName; + let handler = props[handlerName = shared.toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = shared.toHandlerKey(shared.camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = shared.toHandlerKey(shared.hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; + } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } +} +function normalizeEmitsOptions(comp, appContext, asMixin = false) { + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (!shared.isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + shared.extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); + } + if (comp.extends) { + extendEmits(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendEmits); + } + } + if (!raw && !hasExtends) { + if (shared.isObject(comp)) { + cache.set(comp, null); + } + return null; + } + if (shared.isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + shared.extend(normalized, raw); + } + if (shared.isObject(comp)) { + cache.set(comp, normalized); + } + return normalized; +} +function isEmitListener(options, key) { + if (!options || !shared.isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return shared.hasOwn(options, key[0].toLowerCase() + key.slice(1)) || shared.hasOwn(options, shared.hyphenate(key)) || shared.hasOwn(options, key); +} + +let accessedAttrs = false; +function markAttrsAccessed() { + accessedAttrs = true; +} +function renderComponentRoot(instance) { + const { + type: Component, + vnode, + proxy, + withProxy, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + props, + data, + setupState, + ctx, + inheritAttrs + } = instance; + const prev = setCurrentRenderingInstance(instance); + let result; + let fallthroughAttrs; + { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); + } + }) : proxyToUse; + result = normalizeVNode( + render.call( + thisProxy, + proxyToUse, + renderCache, + true ? reactivity.shallowReadonly(props) : props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode( + render2.length > 1 ? render2( + true ? reactivity.shallowReadonly(props) : props, + true ? { + get attrs() { + markAttrsAccessed(); + return reactivity.shallowReadonly(attrs); + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + true ? reactivity.shallowReadonly(props) : props, + null + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(shared.isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs, false, true); + } else if (!accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (shared.isOn(key)) { + if (!shared.isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); + } + } else { + extraAttrs.push(key); + } + } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.` + ); + } + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); + } + } + } + } + if (vnode.dirs) { + if (!isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); + } + root = cloneVNode(root, null, false, true); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!isElementRoot(root)) { + warn$1( + `Component inside <Transition> renders non-element root node that cannot be animated.` + ); + } + setTransitionHooks(root, vnode.transition); + } + if (setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance(prev); + return result; +} +const getChildRoot = (vnode) => { + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } + } + }; + return [normalizeVNode(childRoot), setRoot]; +}; +function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } + } + } + } else { + return; + } + } + return singleRoot; +} +const getFunctionalFallthrough = (attrs) => { + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || shared.isOn(key)) { + (res || (res = {}))[key] = attrs[key]; + } + } + return res; +}; +const filterModelListeners = (attrs, props) => { + const res = {}; + for (const key in attrs) { + if (!shared.isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; + } + } + return res; +}; +const isElementRoot = (vnode) => { + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; +}; +function shouldUpdateComponent(prevVNode, nextVNode, optimized) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if ((prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { + return true; + } + } + if (prevProps === nextProps) { + return false; + } + if (!prevProps) { + return !!nextProps; + } + if (!nextProps) { + return true; + } + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; +} +function hasPropsChanged(prevProps, nextProps, emitsOptions) { + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; + } + } + return false; +} +function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; + } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } +} + +const isSuspense = (type) => type.__isSuspense; +let suspenseId = 0; +const SuspenseImpl = { + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { + n2.suspense = n1.suspense; + n2.suspense.vnode = n2; + n2.el = n1.el; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + normalize: normalizeSuspenseChildren +}; +const Suspense = SuspenseImpl ; +function triggerEvent(vnode, name) { + const eventListener = vnode.props && vnode.props[name]; + if (shared.isFunction(eventListener)) { + eventListener(); + } +} +function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } +} +function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } + } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); + } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); + } + } + } + } +} +let hasWarned = false; +function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + if (!hasWarned) { + hasWarned = true; + console[console.info ? "info" : "log"]( + `<Suspense> is an experimental feature and its API will likely change.` + ); + } + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; + } + } + const timeout = vnode.props ? shared.toNumber(vnode.props.timeout) : void 0; + { + assertNumber(timeout, `Suspense timeout`); + } + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + { + if (!resume && !suspense.pendingBranch) { + throw new Error( + `suspense.resolve() is called without a pending branch.` + ); + } + if (suspense.isUnmounted) { + throw new Error( + `suspense.resolve() is called on an already unmounted suspense boundary.` + ); + } + } + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) === container2) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect, optimized2) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + { + pushWarningContext(vnode2); + } + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized2 + ); + if (placeholder) { + remove(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + { + popWarningContext(); + } + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + } + }; + return suspense; +} +function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; +} +function normalizeSuspenseChildren(vnode) { + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); +} +function normalizeSuspenseSlot(s) { + let block; + if (shared.isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); + } + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); + } + } + if (shared.isArray(s)) { + const singleChild = filterSingleRoot(s); + if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { + warn$1(`<Suspense> slots expect a single root node.`); + } + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; +} +function queueEffectWithSuspense(fn, suspense) { + if (suspense && suspense.pendingBranch) { + if (shared.isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); + } + } else { + queuePostFlushCb(fn); + } +} +function setActiveBranch(suspense, branch) { + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } +} +function isVNodeSuspensible(vnode) { + const suspensible = vnode.props && vnode.props.suspensible; + return suspensible != null && suspensible !== false; +} + +const Fragment = Symbol.for("v-fgt"); +const Text = Symbol.for("v-txt"); +const Comment = Symbol.for("v-cmt"); +const Static = Symbol.for("v-stc"); +const blockStack = []; +let currentBlock = null; +function openBlock(disableTracking = false) { + blockStack.push(currentBlock = disableTracking ? null : []); +} +function closeBlock() { + blockStack.pop(); + currentBlock = blockStack[blockStack.length - 1] || null; +} +let isBlockTreeEnabled = 1; +function setBlockTracking(value, inVOnce = false) { + isBlockTreeEnabled += value; + if (value < 0 && currentBlock && inVOnce) { + currentBlock.hasOnce = true; + } +} +function setupBlock(vnode) { + vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || shared.EMPTY_ARR : null; + closeBlock(); + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(vnode); + } + return vnode; +} +function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { + return setupBlock( + createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + true + ) + ); +} +function createBlock(type, props, children, patchFlag, dynamicProps) { + return setupBlock( + createVNode( + type, + props, + children, + patchFlag, + dynamicProps, + true + ) + ); +} +function isVNode(value) { + return value ? value.__v_isVNode === true : false; +} +function isSameVNodeType(n1, n2) { + if (n2.shapeFlag & 6 && n1.component) { + const dirtyInstances = hmrDirtyComponents.get(n2.type); + if (dirtyInstances && dirtyInstances.has(n1.component)) { + n1.shapeFlag &= ~256; + n2.shapeFlag &= ~512; + return false; + } + } + return n1.type === n2.type && n1.key === n2.key; +} +let vnodeArgsTransformer; +function transformVNodeArgs(transformer) { + vnodeArgsTransformer = transformer; +} +const createVNodeWithArgsTransform = (...args) => { + return _createVNode( + ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args + ); +}; +const normalizeKey = ({ key }) => key != null ? key : null; +const normalizeRef = ({ + ref, + ref_key, + ref_for +}) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? shared.isString(ref) || reactivity.isRef(ref) || shared.isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; +}; +function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetStart: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); + } + } else if (children) { + vnode.shapeFlag |= shared.isString(children) ? 8 : 16; + } + if (vnode.key !== vnode.key) { + warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; +} +const createVNode = createVNodeWithArgsTransform ; +function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { + if (!type || type === NULL_DYNAMIC_COMPONENT) { + if (!type) { + warn$1(`Invalid vnode type when creating vnode: ${type}.`); + } + type = Comment; + } + if (isVNode(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); + } + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } + } + cloned.patchFlag = -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !shared.isString(klass)) { + props.class = shared.normalizeClass(klass); + } + if (shared.isObject(style)) { + if (reactivity.isProxy(style) && !shared.isArray(style)) { + style = shared.extend({}, style); + } + props.style = shared.normalizeStyle(style); + } + } + const shapeFlag = shared.isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : shared.isObject(type) ? 4 : shared.isFunction(type) ? 2 : 0; + if (shapeFlag & 4 && reactivity.isProxy(type)) { + type = reactivity.toRaw(type); + warn$1( + `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, + ` +Component that was made reactive: `, + type + ); + } + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); +} +function guardReactiveProps(props) { + if (!props) return null; + return reactivity.isProxy(props) || isInternalObject(props) ? shared.extend({}, props) : props; +} +function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) { + const { props, ref, patchFlag, children, transition } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? shared.isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: patchFlag === -1 && shared.isArray(children) ? children.map(deepCloneVNode) : children, + target: vnode.target, + targetStart: vnode.targetStart, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + if (transition && cloneTransition) { + setTransitionHooks( + cloned, + transition.clone(cloned) + ); + } + return cloned; +} +function deepCloneVNode(vnode) { + const cloned = cloneVNode(vnode); + if (shared.isArray(vnode.children)) { + cloned.children = vnode.children.map(deepCloneVNode); + } + return cloned; +} +function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); +} +function createStaticVNode(content, numberOfNodes) { + const vnode = createVNode(Static, null, content); + vnode.staticCount = numberOfNodes; + return vnode; +} +function createCommentVNode(text = "", asBlock = false) { + return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); +} +function normalizeVNode(child) { + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (shared.isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (isVNode(child)) { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } +} +function cloneIfMounted(child) { + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); +} +function normalizeChildren(vnode, children) { + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (shared.isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !isInternalObject(children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; + } + } + } + } else if (shared.isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; + } + } + vnode.children = children; + vnode.shapeFlag |= type; +} +function mergeProps(...args) { + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = shared.normalizeClass([ret.class, toMerge.class]); + } + } else if (key === "style") { + ret.style = shared.normalizeStyle([ret.style, toMerge.style]); + } else if (shared.isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(shared.isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } + } + } + return ret; +} +function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); +} + +const emptyAppContext = createAppContext(); +let uid = 0; +function createComponentInstance(vnode, parent, suspense) { + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + job: null, + scope: new reactivity.EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + ids: parent ? parent.ids : ["", 0, 0], + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: shared.EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: shared.EMPTY_OBJ, + data: shared.EMPTY_OBJ, + props: shared.EMPTY_OBJ, + attrs: shared.EMPTY_OBJ, + slots: shared.EMPTY_OBJ, + refs: shared.EMPTY_OBJ, + setupState: shared.EMPTY_OBJ, + setupContext: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + { + instance.ctx = createDevRenderContext(instance); + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; +} +let currentInstance = null; +const getCurrentInstance = () => currentInstance || currentRenderingInstance; +let internalSetCurrentInstance; +let setInSSRSetupState; +{ + const g = shared.getGlobalThis(); + const registerGlobalSetter = (key, setter) => { + let setters; + if (!(setters = g[key])) setters = g[key] = []; + setters.push(setter); + return (v) => { + if (setters.length > 1) setters.forEach((set) => set(v)); + else setters[0](v); + }; + }; + internalSetCurrentInstance = registerGlobalSetter( + `__VUE_INSTANCE_SETTERS__`, + (v) => currentInstance = v + ); + setInSSRSetupState = registerGlobalSetter( + `__VUE_SSR_SETTERS__`, + (v) => isInSSRComponentSetup = v + ); +} +const setCurrentInstance = (instance) => { + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; +}; +const unsetCurrentInstance = () => { + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); +}; +const isBuiltInTag = /* @__PURE__ */ shared.makeMap("slot,component"); +function validateComponentName(name, { isNativeTag }) { + if (isBuiltInTag(name) || isNativeTag(name)) { + warn$1( + "Do not use built-in or reserved HTML elements as component id: " + name + ); + } +} +function isStatefulComponent(instance) { + return instance.vnode.shapeFlag & 4; +} +let isInSSRComponentSetup = false; +function setupComponent(instance, isSSR = false, optimized = false) { + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children, optimized); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; +} +function setupStatefulComponent(instance, isSSR) { + var _a; + const Component = instance.type; + { + if (Component.name) { + validateComponentName(Component.name, instance.appContext.config); + } + if (Component.components) { + const names = Object.keys(Component.components); + for (let i = 0; i < names.length; i++) { + validateComponentName(names[i], instance.appContext.config); + } + } + if (Component.directives) { + const names = Object.keys(Component.directives); + for (let i = 0; i < names.length; i++) { + validateDirectiveName(names[i]); + } + } + if (Component.compilerOptions && isRuntimeOnly()) { + warn$1( + `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` + ); + } + } + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers); + { + exposePropsOnRenderContext(instance); + } + const { setup } = Component; + if (setup) { + reactivity.pauseTracking(); + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + reactivity.shallowReadonly(instance.props) , + setupContext + ] + ); + const isAsyncSetup = shared.isPromise(setupResult); + reactivity.resetTracking(); + reset(); + if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) { + markAsyncBoundary(instance); + } + if (isAsyncSetup) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + if (!instance.suspense) { + const name = (_a = Component.name) != null ? _a : "Anonymous"; + warn$1( + `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` + ); + } + } + } else { + handleSetupResult(instance, setupResult, isSSR); + } + } else { + finishComponentSetup(instance, isSSR); + } +} +function handleSetupResult(instance, setupResult, isSSR) { + if (shared.isFunction(setupResult)) { + if (instance.type.__ssrInlineRender) { + instance.ssrRender = setupResult; + } else { + instance.render = setupResult; + } + } else if (shared.isObject(setupResult)) { + if (isVNode(setupResult)) { + warn$1( + `setup() should not return VNodes directly - return a render function instead.` + ); + } + { + instance.devtoolsRawSetupState = setupResult; + } + instance.setupState = reactivity.proxyRefs(setupResult); + { + exposeSetupStateOnRenderContext(instance); + } + } else if (setupResult !== void 0) { + warn$1( + `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` + ); + } + finishComponentSetup(instance, isSSR); +} +let compile; +let installWithProxy; +function registerRuntimeCompiler(_compile) { + compile = _compile; + installWithProxy = (i) => { + if (i.render._rc) { + i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); + } + }; +} +const isRuntimeOnly = () => !compile; +function finishComponentSetup(instance, isSSR, skipOptions) { + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile && !Component.render) { + const template = Component.template || resolveMergedOptions(instance).template; + if (template) { + { + startMeasure(instance, `compile`); + } + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = shared.extend( + shared.extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions + ); + Component.render = compile(template, finalCompilerOptions); + { + endMeasure(instance, `compile`); + } + } + } + instance.render = Component.render || shared.NOOP; + if (installWithProxy) { + installWithProxy(instance); + } + } + { + const reset = setCurrentInstance(instance); + reactivity.pauseTracking(); + try { + applyOptions(instance); + } finally { + reactivity.resetTracking(); + reset(); + } + } + if (!Component.render && instance.render === shared.NOOP && !isSSR) { + if (!compile && Component.template) { + warn$1( + `Component provided template option but runtime compilation is not supported in this build of Vue.` + (``) + ); + } else { + warn$1(`Component is missing template or render function: `, Component); + } + } +} +const attrsProxyHandlers = { + get(target, key) { + markAttrsAccessed(); + reactivity.track(target, "get", ""); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } +} ; +function getSlotsProxy(instance) { + return new Proxy(instance.slots, { + get(target, key) { + reactivity.track(instance, "get", "$slots"); + return target[key]; + } + }); +} +function createSetupContext(instance) { + const expose = (exposed) => { + { + if (instance.exposed) { + warn$1(`expose() should be called only once per setup().`); + } + if (exposed != null) { + let exposedType = typeof exposed; + if (exposedType === "object") { + if (shared.isArray(exposed)) { + exposedType = "array"; + } else if (reactivity.isRef(exposed)) { + exposedType = "ref"; + } + } + if (exposedType !== "object") { + warn$1( + `expose() should be passed a plain object, received ${exposedType}.` + ); + } + } + } + instance.exposed = exposed || {}; + }; + { + let attrsProxy; + let slotsProxy; + return Object.freeze({ + get attrs() { + return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers)); + }, + get slots() { + return slotsProxy || (slotsProxy = getSlotsProxy(instance)); + }, + get emit() { + return (event, ...args) => instance.emit(event, ...args); + }, + expose + }); + } +} +function getComponentPublicInstance(instance) { + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(reactivity.proxyRefs(reactivity.markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); + } + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } else { + return instance.proxy; + } +} +const classifyRE = /(?:^|[-_])(\w)/g; +const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); +function getComponentName(Component, includeInferred = true) { + return shared.isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; +} +function formatComponentName(instance, Component, isRoot = false) { + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; + } + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; +} +function isClassComponent(value) { + return shared.isFunction(value) && "__vccOpts" in value; +} + +const computed = (getterOrOptions, debugOptions) => { + const c = reactivity.computed(getterOrOptions, debugOptions, isInSSRComponentSetup); + { + const i = getCurrentInstance(); + if (i && i.appContext.config.warnRecursiveComputed) { + c._warnRecursive = true; + } + } + return c; +}; + +function h(type, propsOrChildren, children) { + const l = arguments.length; + if (l === 2) { + if (shared.isObject(propsOrChildren) && !shared.isArray(propsOrChildren)) { + if (isVNode(propsOrChildren)) { + return createVNode(type, null, [propsOrChildren]); + } + return createVNode(type, propsOrChildren); + } else { + return createVNode(type, null, propsOrChildren); + } + } else { + if (l > 3) { + children = Array.prototype.slice.call(arguments, 2); + } else if (l === 3 && isVNode(children)) { + children = [children]; + } + return createVNode(type, propsOrChildren, children); + } +} + +function initCustomFormatter() { + if (typeof window === "undefined") { + return; + } + const vueStyle = { style: "color:#3ba776" }; + const numberStyle = { style: "color:#1677ff" }; + const stringStyle = { style: "color:#f5222d" }; + const keywordStyle = { style: "color:#eb2f96" }; + const formatter = { + __vue_custom_formatter: true, + header(obj) { + if (!shared.isObject(obj)) { + return null; + } + if (obj.__isVue) { + return ["div", vueStyle, `VueInstance`]; + } else if (reactivity.isRef(obj)) { + return [ + "div", + {}, + ["span", vueStyle, genRefFlag(obj)], + "<", + // avoid debugger accessing value affecting behavior + formatValue("_value" in obj ? obj._value : obj), + `>` + ]; + } else if (reactivity.isReactive(obj)) { + return [ + "div", + {}, + ["span", vueStyle, reactivity.isShallow(obj) ? "ShallowReactive" : "Reactive"], + "<", + formatValue(obj), + `>${reactivity.isReadonly(obj) ? ` (readonly)` : ``}` + ]; + } else if (reactivity.isReadonly(obj)) { + return [ + "div", + {}, + ["span", vueStyle, reactivity.isShallow(obj) ? "ShallowReadonly" : "Readonly"], + "<", + formatValue(obj), + ">" + ]; + } + return null; + }, + hasBody(obj) { + return obj && obj.__isVue; + }, + body(obj) { + if (obj && obj.__isVue) { + return [ + "div", + {}, + ...formatInstance(obj.$) + ]; + } + } + }; + function formatInstance(instance) { + const blocks = []; + if (instance.type.props && instance.props) { + blocks.push(createInstanceBlock("props", reactivity.toRaw(instance.props))); + } + if (instance.setupState !== shared.EMPTY_OBJ) { + blocks.push(createInstanceBlock("setup", instance.setupState)); + } + if (instance.data !== shared.EMPTY_OBJ) { + blocks.push(createInstanceBlock("data", reactivity.toRaw(instance.data))); + } + const computed = extractKeys(instance, "computed"); + if (computed) { + blocks.push(createInstanceBlock("computed", computed)); + } + const injected = extractKeys(instance, "inject"); + if (injected) { + blocks.push(createInstanceBlock("injected", injected)); + } + blocks.push([ + "div", + {}, + [ + "span", + { + style: keywordStyle.style + ";opacity:0.66" + }, + "$ (internal): " + ], + ["object", { object: instance }] + ]); + return blocks; + } + function createInstanceBlock(type, target) { + target = shared.extend({}, target); + if (!Object.keys(target).length) { + return ["span", {}]; + } + return [ + "div", + { style: "line-height:1.25em;margin-bottom:0.6em" }, + [ + "div", + { + style: "color:#476582" + }, + type + ], + [ + "div", + { + style: "padding-left:1.25em" + }, + ...Object.keys(target).map((key) => { + return [ + "div", + {}, + ["span", keywordStyle, key + ": "], + formatValue(target[key], false) + ]; + }) + ] + ]; + } + function formatValue(v, asRaw = true) { + if (typeof v === "number") { + return ["span", numberStyle, v]; + } else if (typeof v === "string") { + return ["span", stringStyle, JSON.stringify(v)]; + } else if (typeof v === "boolean") { + return ["span", keywordStyle, v]; + } else if (shared.isObject(v)) { + return ["object", { object: asRaw ? reactivity.toRaw(v) : v }]; + } else { + return ["span", stringStyle, String(v)]; + } + } + function extractKeys(instance, type) { + const Comp = instance.type; + if (shared.isFunction(Comp)) { + return; + } + const extracted = {}; + for (const key in instance.ctx) { + if (isKeyOfType(Comp, key, type)) { + extracted[key] = instance.ctx[key]; + } + } + return extracted; + } + function isKeyOfType(Comp, key, type) { + const opts = Comp[type]; + if (shared.isArray(opts) && opts.includes(key) || shared.isObject(opts) && key in opts) { + return true; + } + if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { + return true; + } + if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { + return true; + } + } + function genRefFlag(v) { + if (reactivity.isShallow(v)) { + return `ShallowRef`; + } + if (v.effect) { + return `ComputedRef`; + } + return `Ref`; + } + if (window.devtoolsFormatters) { + window.devtoolsFormatters.push(formatter); + } else { + window.devtoolsFormatters = [formatter]; + } +} + +function withMemo(memo, render, cache, index) { + const cached = cache[index]; + if (cached && isMemoSame(cached, memo)) { + return cached; + } + const ret = render(); + ret.memo = memo.slice(); + ret.cacheIndex = index; + return cache[index] = ret; +} +function isMemoSame(cached, memo) { + const prev = cached.memo; + if (prev.length != memo.length) { + return false; + } + for (let i = 0; i < prev.length; i++) { + if (shared.hasChanged(prev[i], memo[i])) { + return false; + } + } + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(cached); + } + return true; +} + +const version = "3.5.13"; +const warn = warn$1 ; +const ErrorTypeStrings = ErrorTypeStrings$1 ; +const devtools = devtools$1 ; +const setDevtoolsHook = setDevtoolsHook$1 ; +const _ssrUtils = { + createComponentInstance, + setupComponent, + renderComponentRoot, + setCurrentRenderingInstance, + isVNode: isVNode, + normalizeVNode, + getComponentPublicInstance, + ensureValidVNode, + pushWarningContext, + popWarningContext +}; +const ssrUtils = _ssrUtils ; +const resolveFilter = null; +const compatUtils = null; +const DeprecationTypes = null; + +exports.EffectScope = reactivity.EffectScope; +exports.ReactiveEffect = reactivity.ReactiveEffect; +exports.TrackOpTypes = reactivity.TrackOpTypes; +exports.TriggerOpTypes = reactivity.TriggerOpTypes; +exports.customRef = reactivity.customRef; +exports.effect = reactivity.effect; +exports.effectScope = reactivity.effectScope; +exports.getCurrentScope = reactivity.getCurrentScope; +exports.getCurrentWatcher = reactivity.getCurrentWatcher; +exports.isProxy = reactivity.isProxy; +exports.isReactive = reactivity.isReactive; +exports.isReadonly = reactivity.isReadonly; +exports.isRef = reactivity.isRef; +exports.isShallow = reactivity.isShallow; +exports.markRaw = reactivity.markRaw; +exports.onScopeDispose = reactivity.onScopeDispose; +exports.onWatcherCleanup = reactivity.onWatcherCleanup; +exports.proxyRefs = reactivity.proxyRefs; +exports.reactive = reactivity.reactive; +exports.readonly = reactivity.readonly; +exports.ref = reactivity.ref; +exports.shallowReactive = reactivity.shallowReactive; +exports.shallowReadonly = reactivity.shallowReadonly; +exports.shallowRef = reactivity.shallowRef; +exports.stop = reactivity.stop; +exports.toRaw = reactivity.toRaw; +exports.toRef = reactivity.toRef; +exports.toRefs = reactivity.toRefs; +exports.toValue = reactivity.toValue; +exports.triggerRef = reactivity.triggerRef; +exports.unref = reactivity.unref; +exports.camelize = shared.camelize; +exports.capitalize = shared.capitalize; +exports.normalizeClass = shared.normalizeClass; +exports.normalizeProps = shared.normalizeProps; +exports.normalizeStyle = shared.normalizeStyle; +exports.toDisplayString = shared.toDisplayString; +exports.toHandlerKey = shared.toHandlerKey; +exports.BaseTransition = BaseTransition; +exports.BaseTransitionPropsValidators = BaseTransitionPropsValidators; +exports.Comment = Comment; +exports.DeprecationTypes = DeprecationTypes; +exports.ErrorCodes = ErrorCodes; +exports.ErrorTypeStrings = ErrorTypeStrings; +exports.Fragment = Fragment; +exports.KeepAlive = KeepAlive; +exports.Static = Static; +exports.Suspense = Suspense; +exports.Teleport = Teleport; +exports.Text = Text; +exports.assertNumber = assertNumber; +exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling; +exports.callWithErrorHandling = callWithErrorHandling; +exports.cloneVNode = cloneVNode; +exports.compatUtils = compatUtils; +exports.computed = computed; +exports.createBlock = createBlock; +exports.createCommentVNode = createCommentVNode; +exports.createElementBlock = createElementBlock; +exports.createElementVNode = createBaseVNode; +exports.createHydrationRenderer = createHydrationRenderer; +exports.createPropsRestProxy = createPropsRestProxy; +exports.createRenderer = createRenderer; +exports.createSlots = createSlots; +exports.createStaticVNode = createStaticVNode; +exports.createTextVNode = createTextVNode; +exports.createVNode = createVNode; +exports.defineAsyncComponent = defineAsyncComponent; +exports.defineComponent = defineComponent; +exports.defineEmits = defineEmits; +exports.defineExpose = defineExpose; +exports.defineModel = defineModel; +exports.defineOptions = defineOptions; +exports.defineProps = defineProps; +exports.defineSlots = defineSlots; +exports.devtools = devtools; +exports.getCurrentInstance = getCurrentInstance; +exports.getTransitionRawChildren = getTransitionRawChildren; +exports.guardReactiveProps = guardReactiveProps; +exports.h = h; +exports.handleError = handleError; +exports.hasInjectionContext = hasInjectionContext; +exports.hydrateOnIdle = hydrateOnIdle; +exports.hydrateOnInteraction = hydrateOnInteraction; +exports.hydrateOnMediaQuery = hydrateOnMediaQuery; +exports.hydrateOnVisible = hydrateOnVisible; +exports.initCustomFormatter = initCustomFormatter; +exports.inject = inject; +exports.isMemoSame = isMemoSame; +exports.isRuntimeOnly = isRuntimeOnly; +exports.isVNode = isVNode; +exports.mergeDefaults = mergeDefaults; +exports.mergeModels = mergeModels; +exports.mergeProps = mergeProps; +exports.nextTick = nextTick; +exports.onActivated = onActivated; +exports.onBeforeMount = onBeforeMount; +exports.onBeforeUnmount = onBeforeUnmount; +exports.onBeforeUpdate = onBeforeUpdate; +exports.onDeactivated = onDeactivated; +exports.onErrorCaptured = onErrorCaptured; +exports.onMounted = onMounted; +exports.onRenderTracked = onRenderTracked; +exports.onRenderTriggered = onRenderTriggered; +exports.onServerPrefetch = onServerPrefetch; +exports.onUnmounted = onUnmounted; +exports.onUpdated = onUpdated; +exports.openBlock = openBlock; +exports.popScopeId = popScopeId; +exports.provide = provide; +exports.pushScopeId = pushScopeId; +exports.queuePostFlushCb = queuePostFlushCb; +exports.registerRuntimeCompiler = registerRuntimeCompiler; +exports.renderList = renderList; +exports.renderSlot = renderSlot; +exports.resolveComponent = resolveComponent; +exports.resolveDirective = resolveDirective; +exports.resolveDynamicComponent = resolveDynamicComponent; +exports.resolveFilter = resolveFilter; +exports.resolveTransitionHooks = resolveTransitionHooks; +exports.setBlockTracking = setBlockTracking; +exports.setDevtoolsHook = setDevtoolsHook; +exports.setTransitionHooks = setTransitionHooks; +exports.ssrContextKey = ssrContextKey; +exports.ssrUtils = ssrUtils; +exports.toHandlers = toHandlers; +exports.transformVNodeArgs = transformVNodeArgs; +exports.useAttrs = useAttrs; +exports.useId = useId; +exports.useModel = useModel; +exports.useSSRContext = useSSRContext; +exports.useSlots = useSlots; +exports.useTemplateRef = useTemplateRef; +exports.useTransitionState = useTransitionState; +exports.version = version; +exports.warn = warn; +exports.watch = watch; +exports.watchEffect = watchEffect; +exports.watchPostEffect = watchPostEffect; +exports.watchSyncEffect = watchSyncEffect; +exports.withAsyncContext = withAsyncContext; +exports.withCtx = withCtx; +exports.withDefaults = withDefaults; +exports.withDirectives = withDirectives; +exports.withMemo = withMemo; +exports.withScopeId = withScopeId; diff --git a/vuetest/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js b/vuetest/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js new file mode 100644 index 0000000..a2ed5e5 --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js @@ -0,0 +1,6654 @@ +/** +* @vue/runtime-core v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var reactivity = require('@vue/reactivity'); +var shared = require('@vue/shared'); + +function pushWarningContext(vnode) { +} +function popWarningContext() { +} +function assertNumber(val, type) { + return; +} + +const ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER", + "COMPONENT_UPDATE": 15, + "15": "COMPONENT_UPDATE", + "APP_UNMOUNT_CLEANUP": 16, + "16": "APP_UNMOUNT_CLEANUP" +}; +const ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush", + [15]: "component update", + [16]: "app unmount cleanup function" +}; +function callWithErrorHandling(fn, instance, type, args) { + try { + return args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } +} +function callWithAsyncErrorHandling(fn, instance, type, args) { + if (shared.isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && shared.isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); + } + return res; + } + if (shared.isArray(fn)) { + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; + } +} +function handleError(err, instance, type, throwInDev = true) { + const contextVNode = instance ? instance.vnode : null; + const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || shared.EMPTY_OBJ; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = `https://vuejs.org/error-reference/#runtime-${type}`; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + return; + } + } + } + cur = cur.parent; + } + if (errorHandler) { + reactivity.pauseTracking(); + callWithErrorHandling(errorHandler, null, 10, [ + err, + exposedInstance, + errorInfo + ]); + reactivity.resetTracking(); + return; + } + } + logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); +} +function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { + if (throwInProd) { + throw err; + } else { + console.error(err); + } +} + +const queue = []; +let flushIndex = -1; +const pendingPostFlushCbs = []; +let activePostFlushCbs = null; +let postFlushIndex = 0; +const resolvedPromise = /* @__PURE__ */ Promise.resolve(); +let currentFlushPromise = null; +function nextTick(fn) { + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; +} +function findInsertionIndex(id) { + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { + start = middle + 1; + } else { + end = middle; + } + } + return start; +} +function queueJob(job) { + if (!(job.flags & 1)) { + const jobId = getId(job); + const lastJob = queue[queue.length - 1]; + if (!lastJob || // fast path when the job id is larger than the tail + !(job.flags & 2) && jobId >= getId(lastJob)) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(jobId), 0, job); + } + job.flags |= 1; + queueFlush(); + } +} +function queueFlush() { + if (!currentFlushPromise) { + currentFlushPromise = resolvedPromise.then(flushJobs); + } +} +function queuePostFlushCb(cb) { + if (!shared.isArray(cb)) { + if (activePostFlushCbs && cb.id === -1) { + activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); + } else if (!(cb.flags & 1)) { + pendingPostFlushCbs.push(cb); + cb.flags |= 1; + } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); +} +function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.flags & 2) { + if (instance && cb.id !== instance.uid) { + continue; + } + queue.splice(i, 1); + i--; + if (cb.flags & 4) { + cb.flags &= ~1; + } + cb(); + if (!(cb.flags & 4)) { + cb.flags &= ~1; + } + } + } +} +function flushPostFlushCbs(seen) { + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; + } + activePostFlushCbs = deduped; + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + const cb = activePostFlushCbs[postFlushIndex]; + if (cb.flags & 4) { + cb.flags &= ~1; + } + if (!(cb.flags & 8)) cb(); + cb.flags &= ~1; + } + activePostFlushCbs = null; + postFlushIndex = 0; + } +} +const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; +function flushJobs(seen) { + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && !(job.flags & 8)) { + if (false) ; + if (job.flags & 4) { + job.flags &= ~1; + } + callWithErrorHandling( + job, + job.i, + job.i ? 15 : 14 + ); + if (!(job.flags & 4)) { + job.flags &= ~1; + } + } + } + } finally { + for (; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job) { + job.flags &= ~1; + } + } + flushIndex = -1; + queue.length = 0; + flushPostFlushCbs(); + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(); + } + } +} + +let currentRenderingInstance = null; +let currentScopeId = null; +function setCurrentRenderingInstance(instance) { + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; +} +function pushScopeId(id) { + currentScopeId = id; +} +function popScopeId() { + currentScopeId = null; +} +const withScopeId = (_id) => withCtx; +function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); + } + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; +} + +function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + return vnode; + } + const instance = getComponentPublicInstance(currentRenderingInstance); + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = shared.EMPTY_OBJ] = directives[i]; + if (dir) { + if (shared.isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + reactivity.traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; +} +function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + reactivity.pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + reactivity.resetTracking(); + } + } +} + +const TeleportEndKey = Symbol("_vte"); +const isTeleport = (type) => type.__isTeleport; +const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); +const isTeleportDeferred = (props) => props && (props.defer || props.defer === ""); +const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; +const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; +const resolveTarget = (props, select) => { + const targetSelector = props && props.to; + if (shared.isString(targetSelector)) { + if (!select) { + return null; + } else { + const target = select(targetSelector); + return target; + } + } else { + return targetSelector; + } +}; +const TeleportImpl = { + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (n1 == null) { + const placeholder = n2.el = createText(""); + const mainAnchor = n2.anchor = createText(""); + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + if (parentComponent && parentComponent.isCE) { + parentComponent.ce._teleportTarget = container2; + } + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountToTarget = () => { + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = prepareAnchor(target, n2, createText, insert); + if (target) { + if (namespace !== "svg" && isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace !== "mathml" && isTargetMathML(target)) { + namespace = "mathml"; + } + if (!disabled) { + mount(target, targetAnchor); + updateCssVars(n2, false); + } + } + }; + if (disabled) { + mount(container, mainAnchor); + updateCssVars(n2, true); + } + if (isTeleportDeferred(n2.props)) { + queuePostRenderEffect(() => { + mountToTarget(); + n2.el.__isMounted = true; + }, parentSuspense); + } else { + mountToTarget(); + } + } else { + if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) { + queuePostRenderEffect(() => { + TeleportImpl.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + delete n1.el.__isMounted; + }, parentSuspense); + return; + } + n2.el = n1.el; + n2.targetStart = n1.targetStart; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); + } + } + updateCssVars(n2, disabled); + } + }, + remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { + shapeFlag, + children, + anchor, + targetStart, + targetAnchor, + target, + props + } = vnode; + if (target) { + hostRemove(targetStart); + hostRemove(targetAnchor); + } + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport +}; +function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } +} +function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector, insert, createText } +}, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const disabled = isTeleportDisabled(vnode.props); + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (disabled) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetStart = targetNode; + vnode.targetAnchor = targetNode && nextSibling(targetNode); + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + if (targetAnchor && targetAnchor.nodeType === 8) { + if (targetAnchor.data === "teleport start anchor") { + vnode.targetStart = targetAnchor; + } else if (targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + targetAnchor = nextSibling(targetAnchor); + } + if (!vnode.targetAnchor) { + prepareAnchor(target, vnode, createText, insert); + } + hydrateChildren( + targetNode && nextSibling(targetNode), + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode, disabled); + } + return vnode.anchor && nextSibling(vnode.anchor); +} +const Teleport = TeleportImpl; +function updateCssVars(vnode, isDisabled) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node, anchor; + if (isDisabled) { + node = vnode.el; + anchor = vnode.anchor; + } else { + node = vnode.targetStart; + anchor = vnode.targetAnchor; + } + while (node && node !== anchor) { + if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } +} +function prepareAnchor(target, vnode, createText, insert) { + const targetStart = vnode.targetStart = createText(""); + const targetAnchor = vnode.targetAnchor = createText(""); + targetStart[TeleportEndKey] = targetAnchor; + if (target) { + insert(targetStart, target); + insert(targetAnchor, target); + } + return targetAnchor; +} + +const leaveCbKey = Symbol("_leaveCb"); +const enterCbKey = Symbol("_enterCb"); +function useTransitionState() { + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; +} +const TransitionHookValidator = [Function, Array]; +const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator +}; +const recursiveGetSubtree = (instance) => { + const subTree = instance.subTree; + return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; +}; +const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + const child = findNonCommentChild(children); + const rawProps = reactivity.toRaw(props); + const { mode } = rawProps; + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getInnerChild$1(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + let enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance, + // #11061, ensure enterHooks is fresh after clone + (hooks) => enterHooks = hooks + ); + if (innerChild.type !== Comment) { + setTransitionHooks(innerChild, enterHooks); + } + let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree); + if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { + let leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in" && innerChild.type !== Comment) { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (!(instance.job.flags & 8)) { + instance.update(); + } + delete leavingHooks.afterLeave; + oldInnerChild = void 0; + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + enterHooks.delayedLeave = () => { + delayedLeave(); + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + }; + } else { + oldInnerChild = void 0; + } + } else if (oldInnerChild) { + oldInnerChild = void 0; + } + return child; + }; + } +}; +function findNonCommentChild(children) { + let child = children[0]; + if (children.length > 1) { + for (const c of children) { + if (c.type !== Comment) { + child = c; + break; + } + } + } + return child; +} +const BaseTransition = BaseTransitionImpl; +function getLeavingNodesForType(state, vnode) { + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; +} +function resolveTransitionHooks(vnode, props, state, instance, postClone) { + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook(hook, args); + if (shared.isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) done(); + } else if (hook.length <= 1) { + done(); + } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey] = (cancelled) => { + if (called) return; + called = true; + if (cancelled) { + callHook(cancelHook, [el]); + } else { + callHook(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove) { + const key2 = String(vnode.key); + if (el[enterCbKey]) { + el[enterCbKey]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove(); + } + callHook(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) return; + called = true; + remove(); + if (cancelled) { + callHook(onLeaveCancelled, [el]); + } else { + callHook(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + const hooks2 = resolveTransitionHooks( + vnode2, + props, + state, + instance, + postClone + ); + if (postClone) postClone(hooks2); + return hooks2; + } + }; + return hooks; +} +function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } +} +function getInnerChild$1(vnode) { + if (!isKeepAlive(vnode)) { + if (isTeleport(vnode.type) && vnode.children) { + return findNonCommentChild(vnode.children); + } + return vnode; + } + const { shapeFlag, children } = vnode; + if (children) { + if (shapeFlag & 16) { + return children[0]; + } + if (shapeFlag & 32 && shared.isFunction(children.default)) { + return children.default(); + } + } +} +function setTransitionHooks(vnode, hooks) { + if (vnode.shapeFlag & 6 && vnode.component) { + vnode.transition = hooks; + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } +} +function getTransitionRawChildren(children, keepComment = false, parentKey) { + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); + } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; + } + } + return ret; +} + +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineComponent(options, extraOptions) { + return shared.isFunction(options) ? ( + // #8236: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => shared.extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; +} + +function useId() { + const i = getCurrentInstance(); + if (i) { + return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++; + } + return ""; +} +function markAsyncBoundary(instance) { + instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; +} + +function useTemplateRef(key) { + const i = getCurrentInstance(); + const r = reactivity.shallowRef(null); + if (i) { + const refs = i.refs === shared.EMPTY_OBJ ? i.refs = {} : i.refs; + { + Object.defineProperty(refs, key, { + enumerable: true, + get: () => r.value, + set: (val) => r.value = val + }); + } + } + const ret = r; + return ret; +} + +function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { + if (shared.isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (shared.isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) { + setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree); + } + return; + } + const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === shared.EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + const rawSetupState = reactivity.toRaw(setupState); + const canSetSetupRef = setupState === shared.EMPTY_OBJ ? () => false : (key) => { + return shared.hasOwn(rawSetupState, key); + }; + if (oldRef != null && oldRef !== ref) { + if (shared.isString(oldRef)) { + refs[oldRef] = null; + if (canSetSetupRef(oldRef)) { + setupState[oldRef] = null; + } + } else if (reactivity.isRef(oldRef)) { + oldRef.value = null; + } + } + if (shared.isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = shared.isString(ref); + const _isRef = reactivity.isRef(ref); + if (_isString || _isRef) { + const doSet = () => { + if (rawRef.f) { + const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + shared.isArray(existing) && shared.remove(existing, refValue); + } else { + if (!shared.isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (canSetSetupRef(ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); + } + } + } else if (_isString) { + refs[ref] = value; + if (canSetSetupRef(ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) refs[rawRef.k] = value; + } else ; + }; + if (value) { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } else { + doSet(); + } + } + } +} + +let hasLoggedMismatchError = false; +const logMismatchError = () => { + if (hasLoggedMismatchError) { + return; + } + console.error("Hydration completed but contains mismatches."); + hasLoggedMismatchError = true; +}; +const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; +const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); +const getContainerType = (container) => { + if (container.nodeType !== 1) return void 0; + if (isSVGContainer(container)) return "svg"; + if (isMathMLContainer(container)) return "mathml"; + return void 0; +}; +const isComment = (node) => node.nodeType === 8; +function createHydrationFunctions(rendererInternals) { + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment + } + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; + } + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; + }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + optimized = optimized || !!vnode.dynamicChildren; + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { + logMismatchError(); + node.data = vnode.children; + } + nextNode = nextSibling(node); + } + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 || domType === 3) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else ; + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; + }; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + if (forcePatch || patchFlag !== -1) { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition( + null, + // no need check parentSuspense in hydration + transition + ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + while (next) { + if (!isMismatchAllowed(el, 1 /* CHILDREN */)) { + logMismatchError(); + } + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + let clientText = vnode.children; + if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) { + clientText = clientText.slice(1); + } + if (el.textContent !== clientText) { + if (!isMismatchAllowed(el, 0 /* TEXT */)) { + logMismatchError(); + } + el.textContent = vnode.children; + } + } + if (props) { + if (forcePatch || !optimized || patchFlag & (16 | 32)) { + const isCustomElement = el.tagName.includes("-"); + for (const key in props) { + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || shared.isOn(key) && !shared.isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === "." || isCustomElement) { + patchProp(el, key, null, props[key], void 0, parentComponent); + } + } + } else if (props.onClick) { + patchProp( + el, + "onClick", + null, + props.onClick, + void 0, + parentComponent + ); + } else if (patchFlag & 4 && reactivity.isReactive(props.style)) { + for (const key in props.style) props.style[key]; + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + } + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + const isText = vnode.type === Text; + if (node) { + if (isText && !optimized) { + if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) { + insert( + createText( + node.data.slice(vnode.children.length) + ), + container, + nextSibling(node) + ); + node.data = vnode.children; + } + } + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (isText && !vnode.children) { + insert(vnode.el = createText(""), container); + } else { + if (!isMismatchAllowed(container, 1 /* CHILDREN */)) { + logMismatchError(); + } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + } + } + return node; + }; + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); + } else { + logMismatchError(); + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) { + logMismatchError(); + } + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; + } + } + } + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + if (parentComponent) { + parentComponent.vnode.el = vnode.el; + updateHOCHostEl(parentComponent, vnode.el); + } + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } + } + } + } + return node; + }; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 && node.tagName === "TEMPLATE"; + }; + return [hydrate, hydrateNode]; +} +const allowMismatchAttr = "data-allow-mismatch"; +const MismatchTypeString = { + [0 /* TEXT */]: "text", + [1 /* CHILDREN */]: "children", + [2 /* CLASS */]: "class", + [3 /* STYLE */]: "style", + [4 /* ATTRIBUTE */]: "attribute" +}; +function isMismatchAllowed(el, allowedType) { + if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) { + while (el && !el.hasAttribute(allowMismatchAttr)) { + el = el.parentElement; + } + } + const allowedAttr = el && el.getAttribute(allowMismatchAttr); + if (allowedAttr == null) { + return false; + } else if (allowedAttr === "") { + return true; + } else { + const list = allowedAttr.split(","); + if (allowedType === 0 /* TEXT */ && list.includes("children")) { + return true; + } + return allowedAttr.split(",").includes(MismatchTypeString[allowedType]); + } +} + +const requestIdleCallback = shared.getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1)); +const cancelIdleCallback = shared.getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id)); +const hydrateOnIdle = (timeout = 1e4) => (hydrate) => { + const id = requestIdleCallback(hydrate, { timeout }); + return () => cancelIdleCallback(id); +}; +function elementIsVisibleInViewport(el) { + const { top, left, bottom, right } = el.getBoundingClientRect(); + const { innerHeight, innerWidth } = window; + return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth); +} +const hydrateOnVisible = (opts) => (hydrate, forEach) => { + const ob = new IntersectionObserver((entries) => { + for (const e of entries) { + if (!e.isIntersecting) continue; + ob.disconnect(); + hydrate(); + break; + } + }, opts); + forEach((el) => { + if (!(el instanceof Element)) return; + if (elementIsVisibleInViewport(el)) { + hydrate(); + ob.disconnect(); + return false; + } + ob.observe(el); + }); + return () => ob.disconnect(); +}; +const hydrateOnMediaQuery = (query) => (hydrate) => { + if (query) { + const mql = matchMedia(query); + if (mql.matches) { + hydrate(); + } else { + mql.addEventListener("change", hydrate, { once: true }); + return () => mql.removeEventListener("change", hydrate); + } + } +}; +const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => { + if (shared.isString(interactions)) interactions = [interactions]; + let hasHydrated = false; + const doHydrate = (e) => { + if (!hasHydrated) { + hasHydrated = true; + teardown(); + hydrate(); + e.target.dispatchEvent(new e.constructor(e.type, e)); + } + }; + const teardown = () => { + forEach((el) => { + for (const i of interactions) { + el.removeEventListener(i, doHydrate); + } + }); + }; + forEach((el) => { + for (const i of interactions) { + el.addEventListener(i, doHydrate, { once: true }); + } + }); + return teardown; +}; +function forEachElement(node, cb) { + if (isComment(node) && node.data === "[") { + let depth = 1; + let next = node.nextSibling; + while (next) { + if (next.nodeType === 1) { + const result = cb(next); + if (result === false) { + break; + } + } else if (isComment(next)) { + if (next.data === "]") { + if (--depth === 0) break; + } else if (next.data === "[") { + depth++; + } + } + next = next.nextSibling; + } + } else { + cb(node); + } +} + +const isAsyncWrapper = (i) => !!i.type.__asyncLoader; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineAsyncComponent(source) { + if (shared.isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + hydrate: hydrateStrategy, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve, reject) => { + const userRetry = () => resolve(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + __asyncHydrate(el, instance, hydrate) { + const doHydrate = hydrateStrategy ? () => { + const teardown = hydrateStrategy( + hydrate, + (cb) => forEachElement(el, cb) + ); + if (teardown) { + (instance.bum || (instance.bum = [])).push(teardown); + } + } : hydrate; + if (resolvedComp) { + doHydrate(); + } else { + load().then(() => !instance.isUnmounted && doHydrate()); + } + }, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + markAsyncBoundary(instance); + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { + pendingRequest = null; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || isInSSRComponentSetup) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = reactivity.ref(false); + const error = reactivity.ref(); + const delayed = reactivity.ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.update(); + } + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); +} +function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; +} + +const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; +const KeepAliveImpl = { + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + if (!sharedContext.renderer) { + return () => { + const children = slots.default && slots.default(); + return children && children.length === 1 ? children[0] : children; + }; + } + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + shared.invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + invalidateMount(instance2.m); + invalidateMount(instance2.a); + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + shared.invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && !filter(name)) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (cached && (!current || !isSameVNodeType(cached, current))) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + if (isSuspense(instance.subTree.type)) { + queuePostRenderEffect(() => { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + }, instance.subTree.suspense); + } else { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return current = null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + if (vnode.type === Comment) { + current = null; + return vnode; + } + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + vnode.shapeFlag &= ~256; + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } +}; +const KeepAlive = KeepAliveImpl; +function matches(pattern, name) { + if (shared.isArray(pattern)) { + return pattern.some((p) => matches(p, name)); + } else if (shared.isString(pattern)) { + return pattern.split(",").includes(name); + } else if (shared.isRegExp(pattern)) { + pattern.lastIndex = 0; + return pattern.test(name); + } + return false; +} +function onActivated(hook, target) { + registerKeepAliveHook(hook, "a", target); +} +function onDeactivated(hook, target) { + registerKeepAliveHook(hook, "da", target); +} +function registerKeepAliveHook(hook, type, target = currentInstance) { + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; + } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } +} +function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + shared.remove(keepAliveRoot[type], injected); + }, target); +} +function resetShapeFlag(vnode) { + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; +} +function getInnerChild(vnode) { + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; +} + +function injectHook(type, hook, target = currentInstance, prepend = false) { + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + reactivity.pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + reactivity.resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); + } + return wrappedHook; + } +} +const createHook = (lifecycle) => (hook, target = currentInstance) => { + if (!isInSSRComponentSetup || lifecycle === "sp") { + injectHook(lifecycle, (...args) => hook(...args), target); + } +}; +const onBeforeMount = createHook("bm"); +const onMounted = createHook("m"); +const onBeforeUpdate = createHook( + "bu" +); +const onUpdated = createHook("u"); +const onBeforeUnmount = createHook( + "bum" +); +const onUnmounted = createHook("um"); +const onServerPrefetch = createHook( + "sp" +); +const onRenderTriggered = createHook("rtg"); +const onRenderTracked = createHook("rtc"); +function onErrorCaptured(hook, target = currentInstance) { + injectHook("ec", hook, target); +} + +const COMPONENTS = "components"; +const DIRECTIVES = "directives"; +function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; +} +const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); +function resolveDynamicComponent(component) { + if (shared.isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } +} +function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); +} +function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === shared.camelize(name) || selfName === shared.capitalize(shared.camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + return res; + } +} +function resolve(registry, name) { + return registry && (registry[name] || registry[shared.camelize(name)] || registry[shared.capitalize(shared.camelize(name))]); +} + +function renderList(source, renderItem, cache, index) { + let ret; + const cached = cache && cache[index]; + const sourceIsArray = shared.isArray(source); + if (sourceIsArray || shared.isString(source)) { + const sourceIsReactiveArray = sourceIsArray && reactivity.isReactive(source); + let needsWrap = false; + if (sourceIsReactiveArray) { + needsWrap = !reactivity.isShallow(source); + source = reactivity.shallowReadArray(source); + } + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem( + needsWrap ? reactivity.toReactive(source[i]) : source[i], + i, + void 0, + cached && cached[i] + ); + } + } else if (typeof source === "number") { + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); + } + } else if (shared.isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } + } + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; +} + +function createSlots(slots, dynamicSlots) { + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (shared.isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) res.key = slot.key; + return res; + } : slot.fn; + } + } + return slots; +} + +function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) { + if (name !== "default") props.name = name; + return openBlock(), createBlock( + Fragment, + null, + [createVNode("slot", props, fallback && fallback())], + 64 + ); + } + let slot = slots[name]; + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key; + const rendered = createBlock( + Fragment, + { + key: (slotKey && !shared.isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content + (!validSlotContent && fallback ? "_fb" : "") + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; +} +function ensureValidVNode(vnodes) { + return vnodes.some((child) => { + if (!isVNode(child)) return true; + if (child.type === Comment) return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; +} + +function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : shared.toHandlerKey(key)] = obj[key]; + } + return ret; +} + +const getPublicInstance = (i) => { + if (!i) return null; + if (isStatefulComponent(i)) return getComponentPublicInstance(i); + return getPublicInstance(i.parent); +}; +const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ shared.extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => i.props, + $attrs: (i) => i.attrs, + $slots: (i) => i.slots, + $refs: (i) => i.refs, + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $host: (i) => i.ce, + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i) , + $forceUpdate: (i) => i.f || (i.f = () => { + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) +); +const hasSetupBinding = (state, key) => state !== shared.EMPTY_OBJ && !state.__isScriptSetup && shared.hasOwn(state, key); +const PublicInstanceProxyHandlers = { + get({ _: instance }, key) { + if (key === "__v_skip") { + return true; + } + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && shared.hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + reactivity.track(instance.attrs, "get", ""); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, shared.hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else ; + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) { + data[key] = value; + return true; + } else if (shared.hasOwn(instance.props, key)) { + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + return false; + } else { + { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== shared.EMPTY_OBJ && shared.hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && shared.hasOwn(normalizedProps, key) || shared.hasOwn(ctx, key) || shared.hasOwn(publicPropertiesMap, key) || shared.hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (shared.hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } +}; +const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ shared.extend({}, PublicInstanceProxyHandlers, { + get(target, key) { + if (key === Symbol.unscopables) { + return; + } + return PublicInstanceProxyHandlers.get(target, key, target); + }, + has(_, key) { + const has = key[0] !== "_" && !shared.isGloballyAllowed(key); + return has; + } +}); + +function defineProps() { + return null; +} +function defineEmits() { + return null; +} +function defineExpose(exposed) { +} +function defineOptions(options) { +} +function defineSlots() { + return null; +} +function defineModel() { +} +function withDefaults(props, defaults) { + return null; +} +function useSlots() { + return getContext().slots; +} +function useAttrs() { + return getContext().attrs; +} +function getContext() { + const i = getCurrentInstance(); + return i.setupContext || (i.setupContext = createSetupContext(i)); +} +function normalizePropsOrEmits(props) { + return shared.isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; +} +function mergeDefaults(raw, defaults) { + const props = normalizePropsOrEmits(raw); + for (const key in defaults) { + if (key.startsWith("__skip")) continue; + let opt = props[key]; + if (opt) { + if (shared.isArray(opt) || shared.isFunction(opt)) { + opt = props[key] = { type: opt, default: defaults[key] }; + } else { + opt.default = defaults[key]; + } + } else if (opt === null) { + opt = props[key] = { default: defaults[key] }; + } else ; + if (opt && defaults[`__skip_${key}`]) { + opt.skipFactory = true; + } + } + return props; +} +function mergeModels(a, b) { + if (!a || !b) return a || b; + if (shared.isArray(a) && shared.isArray(b)) return a.concat(b); + return shared.extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); +} +function createPropsRestProxy(props, excludedKeys) { + const ret = {}; + for (const key in props) { + if (!excludedKeys.includes(key)) { + Object.defineProperty(ret, key, { + enumerable: true, + get: () => props[key] + }); + } + } + return ret; +} +function withAsyncContext(getAwaitable) { + const ctx = getCurrentInstance(); + let awaitable = getAwaitable(); + unsetCurrentInstance(); + if (shared.isPromise(awaitable)) { + awaitable = awaitable.catch((e) => { + setCurrentInstance(ctx); + throw e; + }); + } + return [awaitable, () => setCurrentInstance(ctx)]; +} + +let shouldCacheAccess = true; +function applyOptions(instance) { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook(options.beforeCreate, instance, "bc"); + } + const { + // state + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, + // lifecycle + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, + // public API + expose, + inheritAttrs, + // assets + components, + directives, + filters + } = options; + const checkDuplicateProperties = null; + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (shared.isFunction(methodHandler)) { + { + ctx[key] = methodHandler.bind(publicThis); + } + } + } + } + if (dataOptions) { + const data = dataOptions.call(publicThis, publicThis); + if (!shared.isObject(data)) ; else { + instance.data = reactivity.reactive(data); + } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = shared.isFunction(opt) ? opt.bind(publicThis, publicThis) : shared.isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : shared.NOOP; + const set = !shared.isFunction(opt) && shared.isFunction(opt.set) ? opt.set.bind(publicThis) : shared.NOOP; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = shared.isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (shared.isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (shared.isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val + }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; + } + } + if (render && instance.render === shared.NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) instance.components = components; + if (directives) instance.directives = directives; + if (serverPrefetch) { + markAsyncBoundary(instance); + } +} +function resolveInjections(injectOptions, ctx, checkDuplicateProperties = shared.NOOP) { + if (shared.isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (shared.isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); + } + if (reactivity.isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; + } + } +} +function callHook(hook, instance, type) { + callWithAsyncErrorHandling( + shared.isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); +} +function createWatcher(raw, ctx, publicThis, key) { + let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (shared.isString(raw)) { + const handler = ctx[raw]; + if (shared.isFunction(handler)) { + { + watch(getter, handler); + } + } + } else if (shared.isFunction(raw)) { + { + watch(getter, raw.bind(publicThis)); + } + } else if (shared.isObject(raw)) { + if (shared.isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = shared.isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (shared.isFunction(handler)) { + watch(getter, handler, raw); + } + } + } else ; +} +function resolveMergedOptions(instance) { + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; + } + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); + } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (shared.isObject(base)) { + cache.set(base, resolved); + } + return resolved; +} +function mergeOptions(to, from, strats, asMixin = false) { + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") ; else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; + } + } + return to; +} +const internalOptionMergeStrats = { + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray, + created: mergeAsArray, + beforeMount: mergeAsArray, + mounted: mergeAsArray, + beforeUpdate: mergeAsArray, + updated: mergeAsArray, + beforeDestroy: mergeAsArray, + beforeUnmount: mergeAsArray, + destroyed: mergeAsArray, + unmounted: mergeAsArray, + activated: mergeAsArray, + deactivated: mergeAsArray, + errorCaptured: mergeAsArray, + serverPrefetch: mergeAsArray, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject +}; +function mergeDataFn(to, from) { + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (shared.extend)( + shared.isFunction(to) ? to.call(this, this) : to, + shared.isFunction(from) ? from.call(this, this) : from + ); + }; +} +function mergeInject(to, from) { + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); +} +function normalizeInject(raw) { + if (shared.isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; + } + return res; + } + return raw; +} +function mergeAsArray(to, from) { + return to ? [...new Set([].concat(to, from))] : from; +} +function mergeObjectOptions(to, from) { + return to ? shared.extend(/* @__PURE__ */ Object.create(null), to, from) : from; +} +function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (shared.isArray(to) && shared.isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return shared.extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } +} +function mergeWatchOptions(to, from) { + if (!to) return from; + if (!from) return to; + const merged = shared.extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray(to[key], from[key]); + } + return merged; +} + +function createAppContext() { + return { + app: null, + config: { + isNativeTag: shared.NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; +} +let uid$1 = 0; +function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!shared.isFunction(rootComponent)) { + rootComponent = shared.extend({}, rootComponent); + } + if (rootProps != null && !shared.isObject(rootProps)) { + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + const pluginCleanupFns = []; + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) ; else if (plugin && shared.isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (shared.isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else ; + return app; + }, + mixin(mixin) { + { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } + } + return app; + }, + component(name, component) { + if (!component) { + return context.components[name]; + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + if (!directive) { + return context.directives[name]; + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + const vnode = app._ceVNode || createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + return getComponentPublicInstance(vnode.component); + } + }, + onUnmount(cleanupFn) { + pluginCleanupFns.push(cleanupFn); + }, + unmount() { + if (isMounted) { + callWithAsyncErrorHandling( + pluginCleanupFns, + app._instance, + 16 + ); + render(null, app._container); + delete app._container.__vue_app__; + } + }, + provide(key, value) { + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + const lastApp = currentApp; + currentApp = app; + try { + return fn(); + } finally { + currentApp = lastApp; + } + } + }; + return app; + }; +} +let currentApp = null; + +function provide(key, value) { + if (!currentInstance) ; else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); + } + provides[key] = value; + } +} +function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && shared.isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else ; + } +} +function hasInjectionContext() { + return !!(currentInstance || currentRenderingInstance || currentApp); +} + +const internalObjectProto = {}; +const createInternalObject = () => Object.create(internalObjectProto); +const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; + +function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = createInternalObject(); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + if (isStateful) { + instance.props = isSSR ? props : reactivity.shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; +} +function updateProps(instance, rawProps, rawPrevProps, optimized) { + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = reactivity.toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( + // always force full diff in dev + // - #1942 if hmr is enabled with sfc component + // - vite#872 non-sfc component used by sfc component + (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; + } + const value = rawProps[key]; + if (options) { + if (shared.hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = shared.camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !shared.hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = shared.hyphenate(key)) === key || !shared.hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; + } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !shared.hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; + } + } + } + } + if (hasAttrsChanged) { + reactivity.trigger(instance.attrs, "set", ""); + } +} +function setFullProps(instance, rawProps, props, attrs) { + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (shared.isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && shared.hasOwn(options, camelKey = shared.camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; + } + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + if (needCastKeys) { + const rawCurrentProps = reactivity.toRaw(props); + const castValues = rawCastValues || shared.EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !shared.hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; +} +function resolvePropValue(options, props, key, value, instance, isAbsent) { + const opt = options[key]; + if (opt != null) { + const hasDefault = shared.hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && shared.isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); + } + } else { + value = defaultValue; + } + if (instance.ce) { + instance.ce._setProp(key, value); + } + } + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === shared.hyphenate(key))) { + value = true; + } + } + } + return value; +} +const mixinPropsCache = /* @__PURE__ */ new WeakMap(); +function normalizePropsOptions(comp, appContext, asMixin = false) { + const cache = asMixin ? mixinPropsCache : appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (!shared.isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + shared.extend(normalized, props); + if (keys) needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); + } + if (comp.extends) { + extendProps(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendProps); + } + } + if (!raw && !hasExtends) { + if (shared.isObject(comp)) { + cache.set(comp, shared.EMPTY_ARR); + } + return shared.EMPTY_ARR; + } + if (shared.isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + const normalizedKey = shared.camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = shared.EMPTY_OBJ; + } + } + } else if (raw) { + for (const key in raw) { + const normalizedKey = shared.camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = shared.isArray(opt) || shared.isFunction(opt) ? { type: opt } : shared.extend({}, opt); + const propType = prop.type; + let shouldCast = false; + let shouldCastTrue = true; + if (shared.isArray(propType)) { + for (let index = 0; index < propType.length; ++index) { + const type = propType[index]; + const typeName = shared.isFunction(type) && type.name; + if (typeName === "Boolean") { + shouldCast = true; + break; + } else if (typeName === "String") { + shouldCastTrue = false; + } + } + } else { + shouldCast = shared.isFunction(propType) && propType.name === "Boolean"; + } + prop[0 /* shouldCast */] = shouldCast; + prop[1 /* shouldCastTrue */] = shouldCastTrue; + if (shouldCast || shared.hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + const res = [normalized, needCastKeys]; + if (shared.isObject(comp)) { + cache.set(comp, res); + } + return res; +} +function validatePropName(key) { + if (key[0] !== "$" && !shared.isReservedProp(key)) { + return true; + } + return false; +} + +const isInternalKey = (key) => key[0] === "_" || key === "$stable"; +const normalizeSlotValue = (value) => shared.isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; +const normalizeSlot = (key, rawSlot, ctx) => { + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (false) ; + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; +}; +const normalizeObjectSlots = (rawSlots, slots, instance) => { + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) continue; + const value = rawSlots[key]; + if (shared.isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; + } + } +}; +const normalizeVNodeSlots = (instance, children) => { + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; +}; +const assignSlots = (slots, children, optimized) => { + for (const key in children) { + if (optimized || key !== "_") { + slots[key] = children[key]; + } + } +}; +const initSlots = (instance, children, optimized) => { + const slots = instance.slots = createInternalObject(); + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + assignSlots(slots, children, optimized); + if (optimized) { + shared.def(slots, "_", type, true); + } + } else { + normalizeObjectSlots(children, slots); + } + } else if (children) { + normalizeVNodeSlots(instance, children); + } +}; +const updateSlots = (instance, children, optimized) => { + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = shared.EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (optimized && type === 1) { + needDeletionCheck = false; + } else { + assignSlots(slots, children, optimized); + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); + } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } + } + } +}; + +const queuePostRenderEffect = queueEffectWithSuspense ; +function createRenderer(options) { + return baseCreateRenderer(options); +} +function createHydrationRenderer(options) { + return baseCreateRenderer(options, createHydrationFunctions); +} +function baseCreateRenderer(options, createHydrationFns) { + const target = shared.getGlobalThis(); + target.__VUE__ = true; + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = shared.NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!n2.dynamicChildren) => { + if (n1 === n2) { + return; + } + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: + if (n1 == null) { + mountStaticNode(n2, container, anchor, namespace); + } + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else ; + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !shared.isReservedProp(key)) { + hostPatchProp(el, key, null, props[key], namespace, parentComponent); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || shared.EMPTY_OBJ; + const newProps = n2.props || shared.EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { + hostSetElementText(el, ""); + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + } + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); + } + } + } else if (!optimized && dynamicChildren == null) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== shared.EMPTY_OBJ) { + for (const key in oldProps) { + if (!shared.isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + parentComponent + ); + } + } + } + for (const key in newProps) { + if (shared.isReservedProp(key)) continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + if ( + // #2080 if the stable fragment has a key, it's a <template v-for> that may + // get moved around. Make sure all root level vnodes inherit el. + // #2134 or if it's a component root, it may also get moved around + // as the component is being moved. + n2.key != null || parentComponent && n2 === parentComponent.subTree + ) { + traverseStaticChildren( + n1, + n2, + true + /* shallow */ + ); + } + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance( + initialVNode, + parentComponent, + parentSuspense + )); + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } + { + setupComponent(instance, false, optimized); + } + if (instance.asyncDep) { + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + updateComponentPreRender(instance, n2, optimized); + return; + } else { + instance.next = n2; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { + let vnodeHook; + const { el, props } = initialVNode; + const { bm, m, parent, root, type } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + shared.invokeArrayFns(bm); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); + } + toggleRecurse(instance, true); + if (el && hydrateNode) { + const hydrateSubTree = () => { + instance.subTree = renderComponentRoot(instance); + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + }; + if (isAsyncWrapperVNode && type.__asyncHydrate) { + type.__asyncHydrate( + el, + instance, + hydrateSubTree + ); + } else { + hydrateSubTree(); + } + } else { + if (root.ce) { + root.ce._injectChildStyle(type); + } + const subTree = instance.subTree = renderComponentRoot(instance); + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + initialVNode.el = subTree.el; + } + if (m) { + queuePostRenderEffect(m, parentSuspense); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); + } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); + } + instance.isMounted = true; + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); + return; + } + } + let originNext = next; + let vnodeHook; + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; + } + if (bu) { + shared.invokeArrayFns(bu); + } + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); + } + toggleRecurse(instance, true); + const nextTree = renderComponentRoot(instance); + const prevTree = instance.subTree; + instance.subTree = nextTree; + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); + } + if (u) { + queuePostRenderEffect(u, parentSuspense); + } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); + } + } + }; + instance.scope.on(); + const effect = instance.effect = new reactivity.ReactiveEffect(componentUpdateFn); + instance.scope.off(); + const update = instance.update = effect.run.bind(effect); + const job = instance.job = effect.runIfDirty.bind(effect); + job.i = instance; + job.id = instance.uid; + effect.scheduler = () => queueJob(job); + toggleRecurse(instance, true); + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + reactivity.pauseTracking(); + flushPreFlushCbs(instance); + reactivity.resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || shared.EMPTY_ARR; + c2 = c2 || shared.EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (nextChild.key != null) { + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : shared.EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs, + cacheIndex + } = vnode; + if (patchFlag === -2) { + optimized = false; + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (cacheIndex != null) { + parentComponent.renderCache[cacheIndex] = void 0; + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + internals, + doRemove + ); + } else if (dynamicChildren && // #5154 + // when v-once is used inside a block, setBlockTracking(-1) marks the + // parent block with hasOnce: true + // so that it doesn't take the fast path during unmount - otherwise + // components nested in v-once are never unmounted. + !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } + }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + const { bum, scope, job, subTree, um, m, a } = instance; + invalidateMount(m); + invalidateMount(a); + if (bum) { + shared.invokeArrayFns(bum); + } + scope.stop(); + if (job) { + job.flags |= 8; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + const el = hostNextSibling(vnode.anchor || vnode.el); + const teleportEnd = el && el[TeleportEndKey]; + return teleportEnd ? hostNextSibling(teleportEnd) : el; + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + container._vnode = vnode; + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + if (createHydrationFns) { + [hydrate, hydrateNode] = createHydrationFns( + internals + ); + } + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; +} +function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; +} +function toggleRecurse({ effect, job }, allowed) { + if (allowed) { + effect.flags |= 32; + job.flags |= 4; + } else { + effect.flags &= ~32; + job.flags &= ~4; + } +} +function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; +} +function traverseStaticChildren(n1, n2, shallow = false) { + const ch1 = n1.children; + const ch2 = n2.children; + if (shared.isArray(ch1) && shared.isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; + } + if (!shallow && c2.patchFlag !== -2) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } + } + } +} +function getSequence(arr) { + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; + } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } + } + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; +} +function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); + } + } +} +function invalidateMount(hooks) { + if (hooks) { + for (let i = 0; i < hooks.length; i++) + hooks[i].flags |= 8; + } +} + +const ssrContextKey = Symbol.for("v-scx"); +const useSSRContext = () => { + { + const ctx = inject(ssrContextKey); + return ctx; + } +}; + +function watchEffect(effect, options) { + return doWatch(effect, null, options); +} +function watchPostEffect(effect, options) { + return doWatch( + effect, + null, + { flush: "post" } + ); +} +function watchSyncEffect(effect, options) { + return doWatch( + effect, + null, + { flush: "sync" } + ); +} +function watch(source, cb, options) { + return doWatch(source, cb, options); +} +function doWatch(source, cb, options = shared.EMPTY_OBJ) { + const { immediate, deep, flush, once } = options; + const baseWatchOptions = shared.extend({}, options); + const runsImmediately = cb && immediate || !cb && flush !== "post"; + let ssrCleanup; + if (isInSSRComponentSetup) { + if (flush === "sync") { + const ctx = useSSRContext(); + ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); + } else if (!runsImmediately) { + const watchStopHandle = () => { + }; + watchStopHandle.stop = shared.NOOP; + watchStopHandle.resume = shared.NOOP; + watchStopHandle.pause = shared.NOOP; + return watchStopHandle; + } + } + const instance = currentInstance; + baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args); + let isPre = false; + if (flush === "post") { + baseWatchOptions.scheduler = (job) => { + queuePostRenderEffect(job, instance && instance.suspense); + }; + } else if (flush !== "sync") { + isPre = true; + baseWatchOptions.scheduler = (job, isFirstRun) => { + if (isFirstRun) { + job(); + } else { + queueJob(job); + } + }; + } + baseWatchOptions.augmentJob = (job) => { + if (cb) { + job.flags |= 4; + } + if (isPre) { + job.flags |= 2; + if (instance) { + job.id = instance.uid; + job.i = instance; + } + } + }; + const watchHandle = reactivity.watch(source, cb, baseWatchOptions); + if (isInSSRComponentSetup) { + if (ssrCleanup) { + ssrCleanup.push(watchHandle); + } else if (runsImmediately) { + watchHandle(); + } + } + return watchHandle; +} +function instanceWatch(source, value, options) { + const publicThis = this.proxy; + const getter = shared.isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (shared.isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; +} +function createPathGetter(ctx, path) { + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; +} + +function useModel(props, name, options = shared.EMPTY_OBJ) { + const i = getCurrentInstance(); + const camelizedName = shared.camelize(name); + const hyphenatedName = shared.hyphenate(name); + const modifiers = getModelModifiers(props, camelizedName); + const res = reactivity.customRef((track, trigger) => { + let localValue; + let prevSetValue = shared.EMPTY_OBJ; + let prevEmittedValue; + watchSyncEffect(() => { + const propValue = props[camelizedName]; + if (shared.hasChanged(localValue, propValue)) { + localValue = propValue; + trigger(); + } + }); + return { + get() { + track(); + return options.get ? options.get(localValue) : localValue; + }, + set(value) { + const emittedValue = options.set ? options.set(value) : value; + if (!shared.hasChanged(emittedValue, localValue) && !(prevSetValue !== shared.EMPTY_OBJ && shared.hasChanged(value, prevSetValue))) { + return; + } + const rawProps = i.vnode.props; + if (!(rawProps && // check if parent has passed v-model + (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) { + localValue = value; + trigger(); + } + i.emit(`update:${name}`, emittedValue); + if (shared.hasChanged(value, emittedValue) && shared.hasChanged(value, prevSetValue) && !shared.hasChanged(emittedValue, prevEmittedValue)) { + trigger(); + } + prevSetValue = value; + prevEmittedValue = emittedValue; + } + }; + }); + res[Symbol.iterator] = () => { + let i2 = 0; + return { + next() { + if (i2 < 2) { + return { value: i2++ ? modifiers || shared.EMPTY_OBJ : res, done: false }; + } else { + return { done: true }; + } + } + }; + }; + return res; +} +const getModelModifiers = (props, modelName) => { + return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${shared.camelize(modelName)}Modifiers`] || props[`${shared.hyphenate(modelName)}Modifiers`]; +}; + +function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) return; + const props = instance.vnode.props || shared.EMPTY_OBJ; + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modifiers = isModelListener && getModelModifiers(props, event.slice(7)); + if (modifiers) { + if (modifiers.trim) { + args = rawArgs.map((a) => shared.isString(a) ? a.trim() : a); + } + if (modifiers.number) { + args = rawArgs.map(shared.looseToNumber); + } + } + let handlerName; + let handler = props[handlerName = shared.toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = shared.toHandlerKey(shared.camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = shared.toHandlerKey(shared.hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; + } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } +} +function normalizeEmitsOptions(comp, appContext, asMixin = false) { + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (!shared.isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + shared.extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); + } + if (comp.extends) { + extendEmits(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendEmits); + } + } + if (!raw && !hasExtends) { + if (shared.isObject(comp)) { + cache.set(comp, null); + } + return null; + } + if (shared.isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + shared.extend(normalized, raw); + } + if (shared.isObject(comp)) { + cache.set(comp, normalized); + } + return normalized; +} +function isEmitListener(options, key) { + if (!options || !shared.isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return shared.hasOwn(options, key[0].toLowerCase() + key.slice(1)) || shared.hasOwn(options, shared.hyphenate(key)) || shared.hasOwn(options, key); +} + +function markAttrsAccessed() { +} +function renderComponentRoot(instance) { + const { + type: Component, + vnode, + proxy, + withProxy, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + props, + data, + setupState, + ctx, + inheritAttrs + } = instance; + const prev = setCurrentRenderingInstance(instance); + let result; + let fallthroughAttrs; + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = false ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); + } + }) : proxyToUse; + result = normalizeVNode( + render.call( + thisProxy, + proxyToUse, + renderCache, + false ? shallowReadonly(props) : props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (false) ; + result = normalizeVNode( + render2.length > 1 ? render2( + false ? shallowReadonly(props) : props, + false ? { + get attrs() { + markAttrsAccessed(); + return shallowReadonly(attrs); + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + false ? shallowReadonly(props) : props, + null + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(shared.isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs, false, true); + } + } + } + if (vnode.dirs) { + root = cloneVNode(root, null, false, true); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + setTransitionHooks(root, vnode.transition); + } + { + result = root; + } + setCurrentRenderingInstance(prev); + return result; +} +function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + } + } + } else { + return; + } + } + return singleRoot; +} +const getFunctionalFallthrough = (attrs) => { + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || shared.isOn(key)) { + (res || (res = {}))[key] = attrs[key]; + } + } + return res; +}; +const filterModelListeners = (attrs, props) => { + const res = {}; + for (const key in attrs) { + if (!shared.isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; + } + } + return res; +}; +function shouldUpdateComponent(prevVNode, nextVNode, optimized) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { + return true; + } + } + if (prevProps === nextProps) { + return false; + } + if (!prevProps) { + return !!nextProps; + } + if (!nextProps) { + return true; + } + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; +} +function hasPropsChanged(prevProps, nextProps, emitsOptions) { + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; + } + } + return false; +} +function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; + } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } +} + +const isSuspense = (type) => type.__isSuspense; +let suspenseId = 0; +const SuspenseImpl = { + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { + n2.suspense = n1.suspense; + n2.suspense.vnode = n2; + n2.el = n1.el; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + normalize: normalizeSuspenseChildren +}; +const Suspense = SuspenseImpl ; +function triggerEvent(vnode, name) { + const eventListener = vnode.props && vnode.props[name]; + if (shared.isFunction(eventListener)) { + eventListener(); + } +} +function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } +} +function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } + } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); + } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); + } + } + } + } +} +function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; + } + } + const timeout = vnode.props ? shared.toNumber(vnode.props.timeout) : void 0; + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) === container2) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect, optimized2) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized2 + ); + if (placeholder) { + remove(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + } + }; + return suspense; +} +function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; +} +function normalizeSuspenseChildren(vnode) { + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); +} +function normalizeSuspenseSlot(s) { + let block; + if (shared.isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); + } + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); + } + } + if (shared.isArray(s)) { + const singleChild = filterSingleRoot(s); + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; +} +function queueEffectWithSuspense(fn, suspense) { + if (suspense && suspense.pendingBranch) { + if (shared.isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); + } + } else { + queuePostFlushCb(fn); + } +} +function setActiveBranch(suspense, branch) { + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } +} +function isVNodeSuspensible(vnode) { + const suspensible = vnode.props && vnode.props.suspensible; + return suspensible != null && suspensible !== false; +} + +const Fragment = Symbol.for("v-fgt"); +const Text = Symbol.for("v-txt"); +const Comment = Symbol.for("v-cmt"); +const Static = Symbol.for("v-stc"); +const blockStack = []; +let currentBlock = null; +function openBlock(disableTracking = false) { + blockStack.push(currentBlock = disableTracking ? null : []); +} +function closeBlock() { + blockStack.pop(); + currentBlock = blockStack[blockStack.length - 1] || null; +} +let isBlockTreeEnabled = 1; +function setBlockTracking(value, inVOnce = false) { + isBlockTreeEnabled += value; + if (value < 0 && currentBlock && inVOnce) { + currentBlock.hasOnce = true; + } +} +function setupBlock(vnode) { + vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || shared.EMPTY_ARR : null; + closeBlock(); + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(vnode); + } + return vnode; +} +function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { + return setupBlock( + createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + true + ) + ); +} +function createBlock(type, props, children, patchFlag, dynamicProps) { + return setupBlock( + createVNode( + type, + props, + children, + patchFlag, + dynamicProps, + true + ) + ); +} +function isVNode(value) { + return value ? value.__v_isVNode === true : false; +} +function isSameVNodeType(n1, n2) { + return n1.type === n2.type && n1.key === n2.key; +} +function transformVNodeArgs(transformer) { +} +const normalizeKey = ({ key }) => key != null ? key : null; +const normalizeRef = ({ + ref, + ref_key, + ref_for +}) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? shared.isString(ref) || reactivity.isRef(ref) || shared.isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; +}; +function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetStart: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); + } + } else if (children) { + vnode.shapeFlag |= shared.isString(children) ? 8 : 16; + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; +} +const createVNode = _createVNode; +function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { + if (!type || type === NULL_DYNAMIC_COMPONENT) { + type = Comment; + } + if (isVNode(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); + } + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } + } + cloned.patchFlag = -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !shared.isString(klass)) { + props.class = shared.normalizeClass(klass); + } + if (shared.isObject(style)) { + if (reactivity.isProxy(style) && !shared.isArray(style)) { + style = shared.extend({}, style); + } + props.style = shared.normalizeStyle(style); + } + } + const shapeFlag = shared.isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : shared.isObject(type) ? 4 : shared.isFunction(type) ? 2 : 0; + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); +} +function guardReactiveProps(props) { + if (!props) return null; + return reactivity.isProxy(props) || isInternalObject(props) ? shared.extend({}, props) : props; +} +function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) { + const { props, ref, patchFlag, children, transition } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? shared.isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: children, + target: vnode.target, + targetStart: vnode.targetStart, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + if (transition && cloneTransition) { + setTransitionHooks( + cloned, + transition.clone(cloned) + ); + } + return cloned; +} +function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); +} +function createStaticVNode(content, numberOfNodes) { + const vnode = createVNode(Static, null, content); + vnode.staticCount = numberOfNodes; + return vnode; +} +function createCommentVNode(text = "", asBlock = false) { + return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); +} +function normalizeVNode(child) { + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (shared.isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (isVNode(child)) { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } +} +function cloneIfMounted(child) { + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); +} +function normalizeChildren(vnode, children) { + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (shared.isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !isInternalObject(children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; + } + } + } + } else if (shared.isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; + } + } + vnode.children = children; + vnode.shapeFlag |= type; +} +function mergeProps(...args) { + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = shared.normalizeClass([ret.class, toMerge.class]); + } + } else if (key === "style") { + ret.style = shared.normalizeStyle([ret.style, toMerge.style]); + } else if (shared.isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(shared.isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } + } + } + return ret; +} +function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); +} + +const emptyAppContext = createAppContext(); +let uid = 0; +function createComponentInstance(vnode, parent, suspense) { + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + job: null, + scope: new reactivity.EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + ids: parent ? parent.ids : ["", 0, 0], + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: shared.EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: shared.EMPTY_OBJ, + data: shared.EMPTY_OBJ, + props: shared.EMPTY_OBJ, + attrs: shared.EMPTY_OBJ, + slots: shared.EMPTY_OBJ, + refs: shared.EMPTY_OBJ, + setupState: shared.EMPTY_OBJ, + setupContext: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + { + instance.ctx = { _: instance }; + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; +} +let currentInstance = null; +const getCurrentInstance = () => currentInstance || currentRenderingInstance; +let internalSetCurrentInstance; +let setInSSRSetupState; +{ + const g = shared.getGlobalThis(); + const registerGlobalSetter = (key, setter) => { + let setters; + if (!(setters = g[key])) setters = g[key] = []; + setters.push(setter); + return (v) => { + if (setters.length > 1) setters.forEach((set) => set(v)); + else setters[0](v); + }; + }; + internalSetCurrentInstance = registerGlobalSetter( + `__VUE_INSTANCE_SETTERS__`, + (v) => currentInstance = v + ); + setInSSRSetupState = registerGlobalSetter( + `__VUE_SSR_SETTERS__`, + (v) => isInSSRComponentSetup = v + ); +} +const setCurrentInstance = (instance) => { + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; +}; +const unsetCurrentInstance = () => { + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); +}; +function isStatefulComponent(instance) { + return instance.vnode.shapeFlag & 4; +} +let isInSSRComponentSetup = false; +function setupComponent(instance, isSSR = false, optimized = false) { + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children, optimized); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; +} +function setupStatefulComponent(instance, isSSR) { + const Component = instance.type; + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers); + const { setup } = Component; + if (setup) { + reactivity.pauseTracking(); + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + instance.props, + setupContext + ] + ); + const isAsyncSetup = shared.isPromise(setupResult); + reactivity.resetTracking(); + reset(); + if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) { + markAsyncBoundary(instance); + } + if (isAsyncSetup) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + } + } else { + handleSetupResult(instance, setupResult, isSSR); + } + } else { + finishComponentSetup(instance, isSSR); + } +} +function handleSetupResult(instance, setupResult, isSSR) { + if (shared.isFunction(setupResult)) { + if (instance.type.__ssrInlineRender) { + instance.ssrRender = setupResult; + } else { + instance.render = setupResult; + } + } else if (shared.isObject(setupResult)) { + instance.setupState = reactivity.proxyRefs(setupResult); + } else ; + finishComponentSetup(instance, isSSR); +} +let compile; +let installWithProxy; +function registerRuntimeCompiler(_compile) { + compile = _compile; + installWithProxy = (i) => { + if (i.render._rc) { + i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); + } + }; +} +const isRuntimeOnly = () => !compile; +function finishComponentSetup(instance, isSSR, skipOptions) { + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile && !Component.render) { + const template = Component.template || resolveMergedOptions(instance).template; + if (template) { + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = shared.extend( + shared.extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions + ); + Component.render = compile(template, finalCompilerOptions); + } + } + instance.render = Component.render || shared.NOOP; + if (installWithProxy) { + installWithProxy(instance); + } + } + { + const reset = setCurrentInstance(instance); + reactivity.pauseTracking(); + try { + applyOptions(instance); + } finally { + reactivity.resetTracking(); + reset(); + } + } +} +const attrsProxyHandlers = { + get(target, key) { + reactivity.track(target, "get", ""); + return target[key]; + } +}; +function createSetupContext(instance) { + const expose = (exposed) => { + instance.exposed = exposed || {}; + }; + { + return { + attrs: new Proxy(instance.attrs, attrsProxyHandlers), + slots: instance.slots, + emit: instance.emit, + expose + }; + } +} +function getComponentPublicInstance(instance) { + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(reactivity.proxyRefs(reactivity.markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); + } + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } else { + return instance.proxy; + } +} +function getComponentName(Component, includeInferred = true) { + return shared.isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; +} +function isClassComponent(value) { + return shared.isFunction(value) && "__vccOpts" in value; +} + +const computed = (getterOrOptions, debugOptions) => { + const c = reactivity.computed(getterOrOptions, debugOptions, isInSSRComponentSetup); + return c; +}; + +function h(type, propsOrChildren, children) { + const l = arguments.length; + if (l === 2) { + if (shared.isObject(propsOrChildren) && !shared.isArray(propsOrChildren)) { + if (isVNode(propsOrChildren)) { + return createVNode(type, null, [propsOrChildren]); + } + return createVNode(type, propsOrChildren); + } else { + return createVNode(type, null, propsOrChildren); + } + } else { + if (l > 3) { + children = Array.prototype.slice.call(arguments, 2); + } else if (l === 3 && isVNode(children)) { + children = [children]; + } + return createVNode(type, propsOrChildren, children); + } +} + +function initCustomFormatter() { + { + return; + } +} + +function withMemo(memo, render, cache, index) { + const cached = cache[index]; + if (cached && isMemoSame(cached, memo)) { + return cached; + } + const ret = render(); + ret.memo = memo.slice(); + ret.cacheIndex = index; + return cache[index] = ret; +} +function isMemoSame(cached, memo) { + const prev = cached.memo; + if (prev.length != memo.length) { + return false; + } + for (let i = 0; i < prev.length; i++) { + if (shared.hasChanged(prev[i], memo[i])) { + return false; + } + } + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(cached); + } + return true; +} + +const version = "3.5.13"; +const warn$1 = shared.NOOP; +const ErrorTypeStrings = ErrorTypeStrings$1 ; +const devtools = void 0; +const setDevtoolsHook = shared.NOOP; +const _ssrUtils = { + createComponentInstance, + setupComponent, + renderComponentRoot, + setCurrentRenderingInstance, + isVNode: isVNode, + normalizeVNode, + getComponentPublicInstance, + ensureValidVNode, + pushWarningContext, + popWarningContext +}; +const ssrUtils = _ssrUtils ; +const resolveFilter = null; +const compatUtils = null; +const DeprecationTypes = null; + +exports.EffectScope = reactivity.EffectScope; +exports.ReactiveEffect = reactivity.ReactiveEffect; +exports.TrackOpTypes = reactivity.TrackOpTypes; +exports.TriggerOpTypes = reactivity.TriggerOpTypes; +exports.customRef = reactivity.customRef; +exports.effect = reactivity.effect; +exports.effectScope = reactivity.effectScope; +exports.getCurrentScope = reactivity.getCurrentScope; +exports.getCurrentWatcher = reactivity.getCurrentWatcher; +exports.isProxy = reactivity.isProxy; +exports.isReactive = reactivity.isReactive; +exports.isReadonly = reactivity.isReadonly; +exports.isRef = reactivity.isRef; +exports.isShallow = reactivity.isShallow; +exports.markRaw = reactivity.markRaw; +exports.onScopeDispose = reactivity.onScopeDispose; +exports.onWatcherCleanup = reactivity.onWatcherCleanup; +exports.proxyRefs = reactivity.proxyRefs; +exports.reactive = reactivity.reactive; +exports.readonly = reactivity.readonly; +exports.ref = reactivity.ref; +exports.shallowReactive = reactivity.shallowReactive; +exports.shallowReadonly = reactivity.shallowReadonly; +exports.shallowRef = reactivity.shallowRef; +exports.stop = reactivity.stop; +exports.toRaw = reactivity.toRaw; +exports.toRef = reactivity.toRef; +exports.toRefs = reactivity.toRefs; +exports.toValue = reactivity.toValue; +exports.triggerRef = reactivity.triggerRef; +exports.unref = reactivity.unref; +exports.camelize = shared.camelize; +exports.capitalize = shared.capitalize; +exports.normalizeClass = shared.normalizeClass; +exports.normalizeProps = shared.normalizeProps; +exports.normalizeStyle = shared.normalizeStyle; +exports.toDisplayString = shared.toDisplayString; +exports.toHandlerKey = shared.toHandlerKey; +exports.BaseTransition = BaseTransition; +exports.BaseTransitionPropsValidators = BaseTransitionPropsValidators; +exports.Comment = Comment; +exports.DeprecationTypes = DeprecationTypes; +exports.ErrorCodes = ErrorCodes; +exports.ErrorTypeStrings = ErrorTypeStrings; +exports.Fragment = Fragment; +exports.KeepAlive = KeepAlive; +exports.Static = Static; +exports.Suspense = Suspense; +exports.Teleport = Teleport; +exports.Text = Text; +exports.assertNumber = assertNumber; +exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling; +exports.callWithErrorHandling = callWithErrorHandling; +exports.cloneVNode = cloneVNode; +exports.compatUtils = compatUtils; +exports.computed = computed; +exports.createBlock = createBlock; +exports.createCommentVNode = createCommentVNode; +exports.createElementBlock = createElementBlock; +exports.createElementVNode = createBaseVNode; +exports.createHydrationRenderer = createHydrationRenderer; +exports.createPropsRestProxy = createPropsRestProxy; +exports.createRenderer = createRenderer; +exports.createSlots = createSlots; +exports.createStaticVNode = createStaticVNode; +exports.createTextVNode = createTextVNode; +exports.createVNode = createVNode; +exports.defineAsyncComponent = defineAsyncComponent; +exports.defineComponent = defineComponent; +exports.defineEmits = defineEmits; +exports.defineExpose = defineExpose; +exports.defineModel = defineModel; +exports.defineOptions = defineOptions; +exports.defineProps = defineProps; +exports.defineSlots = defineSlots; +exports.devtools = devtools; +exports.getCurrentInstance = getCurrentInstance; +exports.getTransitionRawChildren = getTransitionRawChildren; +exports.guardReactiveProps = guardReactiveProps; +exports.h = h; +exports.handleError = handleError; +exports.hasInjectionContext = hasInjectionContext; +exports.hydrateOnIdle = hydrateOnIdle; +exports.hydrateOnInteraction = hydrateOnInteraction; +exports.hydrateOnMediaQuery = hydrateOnMediaQuery; +exports.hydrateOnVisible = hydrateOnVisible; +exports.initCustomFormatter = initCustomFormatter; +exports.inject = inject; +exports.isMemoSame = isMemoSame; +exports.isRuntimeOnly = isRuntimeOnly; +exports.isVNode = isVNode; +exports.mergeDefaults = mergeDefaults; +exports.mergeModels = mergeModels; +exports.mergeProps = mergeProps; +exports.nextTick = nextTick; +exports.onActivated = onActivated; +exports.onBeforeMount = onBeforeMount; +exports.onBeforeUnmount = onBeforeUnmount; +exports.onBeforeUpdate = onBeforeUpdate; +exports.onDeactivated = onDeactivated; +exports.onErrorCaptured = onErrorCaptured; +exports.onMounted = onMounted; +exports.onRenderTracked = onRenderTracked; +exports.onRenderTriggered = onRenderTriggered; +exports.onServerPrefetch = onServerPrefetch; +exports.onUnmounted = onUnmounted; +exports.onUpdated = onUpdated; +exports.openBlock = openBlock; +exports.popScopeId = popScopeId; +exports.provide = provide; +exports.pushScopeId = pushScopeId; +exports.queuePostFlushCb = queuePostFlushCb; +exports.registerRuntimeCompiler = registerRuntimeCompiler; +exports.renderList = renderList; +exports.renderSlot = renderSlot; +exports.resolveComponent = resolveComponent; +exports.resolveDirective = resolveDirective; +exports.resolveDynamicComponent = resolveDynamicComponent; +exports.resolveFilter = resolveFilter; +exports.resolveTransitionHooks = resolveTransitionHooks; +exports.setBlockTracking = setBlockTracking; +exports.setDevtoolsHook = setDevtoolsHook; +exports.setTransitionHooks = setTransitionHooks; +exports.ssrContextKey = ssrContextKey; +exports.ssrUtils = ssrUtils; +exports.toHandlers = toHandlers; +exports.transformVNodeArgs = transformVNodeArgs; +exports.useAttrs = useAttrs; +exports.useId = useId; +exports.useModel = useModel; +exports.useSSRContext = useSSRContext; +exports.useSlots = useSlots; +exports.useTemplateRef = useTemplateRef; +exports.useTransitionState = useTransitionState; +exports.version = version; +exports.warn = warn$1; +exports.watch = watch; +exports.watchEffect = watchEffect; +exports.watchPostEffect = watchPostEffect; +exports.watchSyncEffect = watchSyncEffect; +exports.withAsyncContext = withAsyncContext; +exports.withCtx = withCtx; +exports.withDefaults = withDefaults; +exports.withDirectives = withDirectives; +exports.withMemo = withMemo; +exports.withScopeId = withScopeId; diff --git a/vuetest/node_modules/@vue/runtime-core/dist/runtime-core.d.ts b/vuetest/node_modules/@vue/runtime-core/dist/runtime-core.d.ts new file mode 100644 index 0000000..dd923af --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-core/dist/runtime-core.d.ts @@ -0,0 +1,1832 @@ +import { computed as computed$1, Ref, OnCleanup, WatchStopHandle, ShallowUnwrapRef, UnwrapNestedRefs, DebuggerEvent, ComputedGetter, WritableComputedOptions, WatchCallback, ReactiveEffect, DebuggerOptions, WatchEffect, WatchHandle, WatchSource, ReactiveMarker, ShallowRef, WatchErrorCodes, reactive } from '@vue/reactivity'; +export { ComputedGetter, ComputedRef, ComputedSetter, CustomRefFactory, DebuggerEvent, DebuggerEventExtraInfo, DebuggerOptions, DeepReadonly, EffectScheduler, EffectScope, MaybeRef, MaybeRefOrGetter, Raw, Reactive, ReactiveEffect, ReactiveEffectOptions, ReactiveEffectRunner, ReactiveFlags, Ref, ShallowReactive, ShallowRef, ShallowUnwrapRef, ToRef, ToRefs, TrackOpTypes, TriggerOpTypes, UnwrapNestedRefs, UnwrapRef, WatchCallback, WatchEffect, WatchHandle, WatchSource, WatchStopHandle, WritableComputedOptions, WritableComputedRef, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity'; +import { IfAny, Prettify, LooseRequired, UnionToIntersection, OverloadParameters, IsKeyValues } from '@vue/shared'; +export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared'; + +export declare const computed: typeof computed$1; + +export type Slot<T extends any = any> = (...args: IfAny<T, any[], [T] | (T extends undefined ? [] : never)>) => VNode[]; +type InternalSlots = { + [name: string]: Slot | undefined; +}; +export type Slots = Readonly<InternalSlots>; +declare const SlotSymbol: unique symbol; +export type SlotsType<T extends Record<string, any> = Record<string, any>> = { + [SlotSymbol]?: T; +}; +type StrictUnwrapSlotsType<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>> = [keyof S] extends [never] ? Slots : Readonly<T> & T; +type UnwrapSlotsType<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>> = [keyof S] extends [never] ? Slots : Readonly<Prettify<{ + [K in keyof T]: NonNullable<T[K]> extends (...args: any[]) => any ? T[K] : Slot<T[K]>; +}>>; +type RawSlots = { + [name: string]: unknown; + $stable?: boolean; +}; + +declare enum SchedulerJobFlags { + QUEUED = 1, + PRE = 2, + /** + * Indicates whether the effect is allowed to recursively trigger itself + * when managed by the scheduler. + * + * By default, a job cannot trigger itself because some built-in method calls, + * e.g. Array.prototype.push actually performs reads as well (#1740) which + * can lead to confusing infinite loops. + * The allowed cases are component update functions and watch callbacks. + * Component update functions may update child component props, which in turn + * trigger flush: "pre" watch callbacks that mutates state that the parent + * relies on (#1801). Watch callbacks doesn't track its dependencies so if it + * triggers itself again, it's likely intentional and it is the user's + * responsibility to perform recursive state mutation that eventually + * stabilizes (#1727). + */ + ALLOW_RECURSE = 4, + DISPOSED = 8 +} +interface SchedulerJob extends Function { + id?: number; + /** + * flags can technically be undefined, but it can still be used in bitwise + * operations just like 0. + */ + flags?: SchedulerJobFlags; + /** + * Attached by renderer.ts when setting up a component's render effect + * Used to obtain component information when reporting max recursive updates. + */ + i?: ComponentInternalInstance; +} +type SchedulerJobs = SchedulerJob | SchedulerJob[]; +export declare function nextTick<T = void, R = void>(this: T, fn?: (this: T) => R): Promise<Awaited<R>>; +export declare function queuePostFlushCb(cb: SchedulerJobs): void; + +export type ComponentPropsOptions<P = Data> = ComponentObjectPropsOptions<P> | string[]; +export type ComponentObjectPropsOptions<P = Data> = { + [K in keyof P]: Prop<P[K]> | null; +}; +export type Prop<T, D = T> = PropOptions<T, D> | PropType<T>; +type DefaultFactory<T> = (props: Data) => T | null | undefined; +interface PropOptions<T = any, D = T> { + type?: PropType<T> | true | null; + required?: boolean; + default?: D | DefaultFactory<D> | null | undefined | object; + validator?(value: unknown, props: Data): boolean; +} +export type PropType<T> = PropConstructor<T> | (PropConstructor<T> | null)[]; +type PropConstructor<T = any> = { + new (...args: any[]): T & {}; +} | { + (): T; +} | PropMethod<T>; +type PropMethod<T, TConstructor = any> = [T] extends [ + ((...args: any) => any) | undefined +] ? { + new (): TConstructor; + (): T; + readonly prototype: TConstructor; +} : never; +type RequiredKeys<T> = { + [K in keyof T]: T[K] extends { + required: true; + } | { + default: any; + } | BooleanConstructor | { + type: BooleanConstructor; + } ? T[K] extends { + default: undefined | (() => undefined); + } ? never : K : never; +}[keyof T]; +type OptionalKeys<T> = Exclude<keyof T, RequiredKeys<T>>; +type DefaultKeys<T> = { + [K in keyof T]: T[K] extends { + default: any; + } | BooleanConstructor | { + type: BooleanConstructor; + } ? T[K] extends { + type: BooleanConstructor; + required: true; + } ? never : K : never; +}[keyof T]; +type InferPropType<T, NullAsAny = true> = [T] extends [null] ? NullAsAny extends true ? any : null : [T] extends [{ + type: null | true; +}] ? any : [T] extends [ObjectConstructor | { + type: ObjectConstructor; +}] ? Record<string, any> : [T] extends [BooleanConstructor | { + type: BooleanConstructor; +}] ? boolean : [T] extends [DateConstructor | { + type: DateConstructor; +}] ? Date : [T] extends [(infer U)[] | { + type: (infer U)[]; +}] ? U extends DateConstructor ? Date | InferPropType<U, false> : InferPropType<U, false> : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? IfAny<V, V, D> : V : V : T; +/** + * Extract prop types from a runtime props options object. + * The extracted types are **internal** - i.e. the resolved props received by + * the component. + * - Boolean props are always present + * - Props with default values are always present + * + * To extract accepted props from the parent, use {@link ExtractPublicPropTypes}. + */ +export type ExtractPropTypes<O> = { + [K in keyof Pick<O, RequiredKeys<O>>]: InferPropType<O[K]>; +} & { + [K in keyof Pick<O, OptionalKeys<O>>]?: InferPropType<O[K]>; +}; +type PublicRequiredKeys<T> = { + [K in keyof T]: T[K] extends { + required: true; + } ? K : never; +}[keyof T]; +type PublicOptionalKeys<T> = Exclude<keyof T, PublicRequiredKeys<T>>; +/** + * Extract prop types from a runtime props options object. + * The extracted types are **public** - i.e. the expected props that can be + * passed to component. + */ +export type ExtractPublicPropTypes<O> = { + [K in keyof Pick<O, PublicRequiredKeys<O>>]: InferPropType<O[K]>; +} & { + [K in keyof Pick<O, PublicOptionalKeys<O>>]?: InferPropType<O[K]>; +}; +export type ExtractDefaultPropTypes<O> = O extends object ? { + [K in keyof Pick<O, DefaultKeys<O>>]: InferPropType<O[K]>; +} : {}; + +/** + * Vue `<script setup>` compiler macro for declaring component props. The + * expected argument is the same as the component `props` option. + * + * Example runtime declaration: + * ```js + * // using Array syntax + * const props = defineProps(['foo', 'bar']) + * // using Object syntax + * const props = defineProps({ + * foo: String, + * bar: { + * type: Number, + * required: true + * } + * }) + * ``` + * + * Equivalent type-based declaration: + * ```ts + * // will be compiled into equivalent runtime declarations + * const props = defineProps<{ + * foo?: string + * bar: number + * }>() + * ``` + * + * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineprops-defineemits} + * + * This is only usable inside `<script setup>`, is compiled away in the + * output and should **not** be actually called at runtime. + */ +export declare function defineProps<PropNames extends string = string>(props: PropNames[]): Prettify<Readonly<{ + [key in PropNames]?: any; +}>>; +export declare function defineProps<PP extends ComponentObjectPropsOptions = ComponentObjectPropsOptions>(props: PP): Prettify<Readonly<ExtractPropTypes<PP>>>; +export declare function defineProps<TypeProps>(): DefineProps<LooseRequired<TypeProps>, BooleanKey<TypeProps>>; +export type DefineProps<T, BKeys extends keyof T> = Readonly<T> & { + readonly [K in BKeys]-?: boolean; +}; +type BooleanKey<T, K extends keyof T = keyof T> = K extends any ? [T[K]] extends [boolean | undefined] ? K : never : never; +/** + * Vue `<script setup>` compiler macro for declaring a component's emitted + * events. The expected argument is the same as the component `emits` option. + * + * Example runtime declaration: + * ```js + * const emit = defineEmits(['change', 'update']) + * ``` + * + * Example type-based declaration: + * ```ts + * const emit = defineEmits<{ + * // <eventName>: <expected arguments> + * change: [] + * update: [value: number] // named tuple syntax + * }>() + * + * emit('change') + * emit('update', 1) + * ``` + * + * This is only usable inside `<script setup>`, is compiled away in the + * output and should **not** be actually called at runtime. + * + * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineprops-defineemits} + */ +export declare function defineEmits<EE extends string = string>(emitOptions: EE[]): EmitFn<EE[]>; +export declare function defineEmits<E extends EmitsOptions = EmitsOptions>(emitOptions: E): EmitFn<E>; +export declare function defineEmits<T extends ComponentTypeEmits>(): T extends (...args: any[]) => any ? T : ShortEmits<T>; +export type ComponentTypeEmits = ((...args: any[]) => any) | Record<string, any>; +type RecordToUnion<T extends Record<string, any>> = T[keyof T]; +type ShortEmits<T extends Record<string, any>> = UnionToIntersection<RecordToUnion<{ + [K in keyof T]: (evt: K, ...args: T[K]) => void; +}>>; +/** + * Vue `<script setup>` compiler macro for declaring a component's exposed + * instance properties when it is accessed by a parent component via template + * refs. + * + * `<script setup>` components are closed by default - i.e. variables inside + * the `<script setup>` scope is not exposed to parent unless explicitly exposed + * via `defineExpose`. + * + * This is only usable inside `<script setup>`, is compiled away in the + * output and should **not** be actually called at runtime. + * + * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineexpose} + */ +export declare function defineExpose<Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed): void; +/** + * Vue `<script setup>` compiler macro for declaring a component's additional + * options. This should be used only for options that cannot be expressed via + * Composition API - e.g. `inheritAttrs`. + * + * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineoptions} + */ +export declare function defineOptions<RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin>(options?: ComponentOptionsBase<{}, RawBindings, D, C, M, Mixin, Extends, {}> & { + /** + * props should be defined via defineProps(). + */ + props?: never; + /** + * emits should be defined via defineEmits(). + */ + emits?: never; + /** + * expose should be defined via defineExpose(). + */ + expose?: never; + /** + * slots should be defined via defineSlots(). + */ + slots?: never; +}): void; +export declare function defineSlots<S extends Record<string, any> = Record<string, any>>(): StrictUnwrapSlotsType<SlotsType<S>>; +export type ModelRef<T, M extends PropertyKey = string, G = T, S = T> = Ref<G, S> & [ + ModelRef<T, M, G, S>, + Record<M, true | undefined> +]; +type DefineModelOptions<T = any, G = T, S = T> = { + get?: (v: T) => G; + set?: (v: S) => any; +}; +/** + * Vue `<script setup>` compiler macro for declaring a + * two-way binding prop that can be consumed via `v-model` from the parent + * component. This will declare a prop with the same name and a corresponding + * `update:propName` event. + * + * If the first argument is a string, it will be used as the prop name; + * Otherwise the prop name will default to "modelValue". In both cases, you + * can also pass an additional object which will be used as the prop's options. + * + * The returned ref behaves differently depending on whether the parent + * provided the corresponding v-model props or not: + * - If yes, the returned ref's value will always be in sync with the parent + * prop. + * - If not, the returned ref will behave like a normal local ref. + * + * @example + * ```ts + * // default model (consumed via `v-model`) + * const modelValue = defineModel<string>() + * modelValue.value = "hello" + * + * // default model with options + * const modelValue = defineModel<string>({ required: true }) + * + * // with specified name (consumed via `v-model:count`) + * const count = defineModel<number>('count') + * count.value++ + * + * // with specified name and default value + * const count = defineModel<number>('count', { default: 0 }) + * ``` + */ +export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(options: ({ + default: any; +} | { + required: true; +}) & PropOptions<T> & DefineModelOptions<T, G, S>): ModelRef<T, M, G, S>; +export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(options?: PropOptions<T> & DefineModelOptions<T, G, S>): ModelRef<T | undefined, M, G | undefined, S | undefined>; +export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(name: string, options: ({ + default: any; +} | { + required: true; +}) & PropOptions<T> & DefineModelOptions<T, G, S>): ModelRef<T, M, G, S>; +export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(name: string, options?: PropOptions<T> & DefineModelOptions<T, G, S>): ModelRef<T | undefined, M, G | undefined, S | undefined>; +type NotUndefined<T> = T extends undefined ? never : T; +type MappedOmit<T, K extends keyof any> = { + [P in keyof T as P extends K ? never : P]: T[P]; +}; +type InferDefaults<T> = { + [K in keyof T]?: InferDefault<T, T[K]>; +}; +type NativeType = null | number | string | boolean | symbol | Function; +type InferDefault<P, T> = ((props: P) => T & {}) | (T extends NativeType ? T : never); +type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof T> = T extends unknown ? Readonly<MappedOmit<T, keyof Defaults>> & { + readonly [K in keyof Defaults as K extends keyof T ? K : never]-?: K extends keyof T ? Defaults[K] extends undefined ? IfAny<Defaults[K], NotUndefined<T[K]>, T[K]> : NotUndefined<T[K]> : never; +} & { + readonly [K in BKeys]-?: K extends keyof Defaults ? Defaults[K] extends undefined ? boolean | undefined : boolean : boolean; +} : never; +/** + * Vue `<script setup>` compiler macro for providing props default values when + * using type-based `defineProps` declaration. + * + * Example usage: + * ```ts + * withDefaults(defineProps<{ + * size?: number + * labels?: string[] + * }>(), { + * size: 3, + * labels: () => ['default label'] + * }) + * ``` + * + * This is only usable inside `<script setup>`, is compiled away in the output + * and should **not** be actually called at runtime. + * + * @see {@link https://vuejs.org/guide/typescript/composition-api.html#typing-component-props} + */ +export declare function withDefaults<T, BKeys extends keyof T, Defaults extends InferDefaults<T>>(props: DefineProps<T, BKeys>, defaults: Defaults): PropsWithDefaults<T, Defaults, BKeys>; +export declare function useSlots(): SetupContext['slots']; +export declare function useAttrs(): SetupContext['attrs']; + +export type ObjectEmitsOptions = Record<string, ((...args: any[]) => any) | null>; +export type EmitsOptions = ObjectEmitsOptions | string[]; +export type EmitsToProps<T extends EmitsOptions | ComponentTypeEmits> = T extends string[] ? { + [K in `on${Capitalize<T[number]>}`]?: (...args: any[]) => any; +} : T extends ObjectEmitsOptions ? { + [K in string & keyof T as `on${Capitalize<K>}`]?: (...args: T[K] extends (...args: infer P) => any ? P : T[K] extends null ? any[] : never) => any; +} : {}; +type TypeEmitsToOptions<T extends ComponentTypeEmits> = { + [K in keyof T & string]: T[K] extends [...args: infer Args] ? (...args: Args) => any : () => any; +} & (T extends (...args: any[]) => any ? ParametersToFns<OverloadParameters<T>> : {}); +type ParametersToFns<T extends any[]> = { + [K in T[0]]: IsStringLiteral<K> extends true ? (...args: T extends [e: infer E, ...args: infer P] ? K extends E ? P : never : never) => any : never; +}; +type IsStringLiteral<T> = T extends string ? string extends T ? false : true : false; +export type ShortEmitsToObject<E> = E extends Record<string, any[]> ? { + [K in keyof E]: (...args: E[K]) => any; +} : E; +export type EmitFn<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Options> = Options extends Array<infer V> ? (event: V, ...args: any[]) => void : {} extends Options ? (event: string, ...args: any[]) => void : UnionToIntersection<{ + [key in Event]: Options[key] extends (...args: infer Args) => any ? (event: key, ...args: Args) => void : Options[key] extends any[] ? (event: key, ...args: Options[key]) => void : (event: key, ...args: any[]) => void; +}[Event]>; + +/** +Runtime helper for applying directives to a vnode. Example usage: + +const comp = resolveComponent('comp') +const foo = resolveDirective('foo') +const bar = resolveDirective('bar') + +return withDirectives(h(comp), [ + [foo, this.x], + [bar, this.y] +]) +*/ + +export interface DirectiveBinding<Value = any, Modifiers extends string = string, Arg extends string = string> { + instance: ComponentPublicInstance | Record<string, any> | null; + value: Value; + oldValue: Value | null; + arg?: Arg; + modifiers: DirectiveModifiers<Modifiers>; + dir: ObjectDirective<any, Value>; +} +export type DirectiveHook<HostElement = any, Prev = VNode<any, HostElement> | null, Value = any, Modifiers extends string = string, Arg extends string = string> = (el: HostElement, binding: DirectiveBinding<Value, Modifiers, Arg>, vnode: VNode<any, HostElement>, prevVNode: Prev) => void; +type SSRDirectiveHook<Value = any, Modifiers extends string = string, Arg extends string = string> = (binding: DirectiveBinding<Value, Modifiers, Arg>, vnode: VNode) => Data | undefined; +export interface ObjectDirective<HostElement = any, Value = any, Modifiers extends string = string, Arg extends string = string> { + created?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>; + beforeMount?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>; + mounted?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>; + beforeUpdate?: DirectiveHook<HostElement, VNode<any, HostElement>, Value, Modifiers, Arg>; + updated?: DirectiveHook<HostElement, VNode<any, HostElement>, Value, Modifiers, Arg>; + beforeUnmount?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>; + unmounted?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>; + getSSRProps?: SSRDirectiveHook<Value, Modifiers, Arg>; + deep?: boolean; +} +export type FunctionDirective<HostElement = any, V = any, Modifiers extends string = string, Arg extends string = string> = DirectiveHook<HostElement, any, V, Modifiers, Arg>; +export type Directive<HostElement = any, Value = any, Modifiers extends string = string, Arg extends string = string> = ObjectDirective<HostElement, Value, Modifiers, Arg> | FunctionDirective<HostElement, Value, Modifiers, Arg>; +type DirectiveModifiers<K extends string = string> = Record<K, boolean>; +export type DirectiveArguments = Array<[Directive | undefined] | [Directive | undefined, any] | [Directive | undefined, any, string] | [Directive | undefined, any, string | undefined, DirectiveModifiers]>; +/** + * Adds directives to a VNode. + */ +export declare function withDirectives<T extends VNode>(vnode: T, directives: DirectiveArguments): T; + +/** + * Custom properties added to component instances in any way and can be accessed through `this` + * + * @example + * Here is an example of adding a property `$router` to every component instance: + * ```ts + * import { createApp } from 'vue' + * import { Router, createRouter } from 'vue-router' + * + * declare module 'vue' { + * interface ComponentCustomProperties { + * $router: Router + * } + * } + * + * // effectively adding the router to every component instance + * const app = createApp({}) + * const router = createRouter() + * app.config.globalProperties.$router = router + * + * const vm = app.mount('#app') + * // we can access the router from the instance + * vm.$router.push('/') + * ``` + */ +export interface ComponentCustomProperties { +} +type IsDefaultMixinComponent<T> = T extends ComponentOptionsMixin ? ComponentOptionsMixin extends T ? true : false : false; +type MixinToOptionTypes<T> = T extends ComponentOptionsBase<infer P, infer B, infer D, infer C, infer M, infer Mixin, infer Extends, any, any, infer Defaults, any, any, any, any, any, any, any> ? OptionTypesType<P & {}, B & {}, D & {}, C & {}, M & {}, Defaults & {}> & IntersectionMixin<Mixin> & IntersectionMixin<Extends> : never; +type ExtractMixin<T> = { + Mixin: MixinToOptionTypes<T>; +}[T extends ComponentOptionsMixin ? 'Mixin' : never]; +type IntersectionMixin<T> = IsDefaultMixinComponent<T> extends true ? OptionTypesType : UnionToIntersection<ExtractMixin<T>>; +type UnwrapMixinsType<T, Type extends OptionTypesKeys> = T extends OptionTypesType ? T[Type] : never; +type EnsureNonVoid<T> = T extends void ? {} : T; +type ComponentPublicInstanceConstructor<T extends ComponentPublicInstance<Props, RawBindings, D, C, M> = ComponentPublicInstance<any>, Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions> = { + __isFragment?: never; + __isTeleport?: never; + __isSuspense?: never; + new (...args: any[]): T; +}; +/** + * @deprecated This is no longer used internally, but exported and relied on by + * existing library types generated by vue-tsc. + */ +export type CreateComponentPublicInstance<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, PublicMixin = IntersectionMixin<Mixin> & IntersectionMixin<Extends>, PublicP = UnwrapMixinsType<PublicMixin, 'P'> & EnsureNonVoid<P>, PublicB = UnwrapMixinsType<PublicMixin, 'B'> & EnsureNonVoid<B>, PublicD = UnwrapMixinsType<PublicMixin, 'D'> & EnsureNonVoid<D>, PublicC extends ComputedOptions = UnwrapMixinsType<PublicMixin, 'C'> & EnsureNonVoid<C>, PublicM extends MethodOptions = UnwrapMixinsType<PublicMixin, 'M'> & EnsureNonVoid<M>, PublicDefaults = UnwrapMixinsType<PublicMixin, 'Defaults'> & EnsureNonVoid<Defaults>> = ComponentPublicInstance<PublicP, PublicB, PublicD, PublicC, PublicM, E, PublicProps, PublicDefaults, MakeDefaultsOptional, ComponentOptionsBase<P, B, D, C, M, Mixin, Extends, E, string, Defaults, {}, string, S>, I, S>; +/** + * This is the same as `CreateComponentPublicInstance` but adds local components, + * global directives, exposed, and provide inference. + * It changes the arguments order so that we don't need to repeat mixin + * inference everywhere internally, but it has to be a new type to avoid + * breaking types that relies on previous arguments order (#10842) + */ +export type CreateComponentPublicInstanceWithMixins<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, TypeRefs extends Data = {}, TypeEl extends Element = any, Provide extends ComponentProvideOptions = ComponentProvideOptions, PublicMixin = IntersectionMixin<Mixin> & IntersectionMixin<Extends>, PublicP = UnwrapMixinsType<PublicMixin, 'P'> & EnsureNonVoid<P>, PublicB = UnwrapMixinsType<PublicMixin, 'B'> & EnsureNonVoid<B>, PublicD = UnwrapMixinsType<PublicMixin, 'D'> & EnsureNonVoid<D>, PublicC extends ComputedOptions = UnwrapMixinsType<PublicMixin, 'C'> & EnsureNonVoid<C>, PublicM extends MethodOptions = UnwrapMixinsType<PublicMixin, 'M'> & EnsureNonVoid<M>, PublicDefaults = UnwrapMixinsType<PublicMixin, 'Defaults'> & EnsureNonVoid<Defaults>> = ComponentPublicInstance<PublicP, PublicB, PublicD, PublicC, PublicM, E, PublicProps, PublicDefaults, MakeDefaultsOptional, ComponentOptionsBase<P, B, D, C, M, Mixin, Extends, E, string, Defaults, {}, string, S, LC, Directives, Exposed, Provide>, I, S, Exposed, TypeRefs, TypeEl>; +type ExposedKeys<T, Exposed extends string & keyof T> = '' extends Exposed ? T : Pick<T, Exposed>; +export type ComponentPublicInstance<P = {}, // props type extracted from props option +B = {}, // raw bindings returned from setup() +D = {}, // return from data() +C extends ComputedOptions = {}, M extends MethodOptions = {}, E extends EmitsOptions = {}, PublicProps = {}, Defaults = {}, MakeDefaultsOptional extends boolean = false, Options = ComponentOptionsBase<any, any, any, any, any, any, any, any, any>, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, Exposed extends string = '', TypeRefs extends Data = {}, TypeEl extends Element = any> = { + $: ComponentInternalInstance; + $data: D; + $props: MakeDefaultsOptional extends true ? Partial<Defaults> & Omit<Prettify<P> & PublicProps, keyof Defaults> : Prettify<P> & PublicProps; + $attrs: Data; + $refs: Data & TypeRefs; + $slots: UnwrapSlotsType<S>; + $root: ComponentPublicInstance | null; + $parent: ComponentPublicInstance | null; + $host: Element | null; + $emit: EmitFn<E>; + $el: TypeEl; + $options: Options & MergedComponentOptionsOverride; + $forceUpdate: () => void; + $nextTick: typeof nextTick; + $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle; +} & ExposedKeys<IfAny<P, P, Readonly<Defaults> & Omit<P, keyof ShallowUnwrapRef<B> | keyof Defaults>> & ShallowUnwrapRef<B> & UnwrapNestedRefs<D> & ExtractComputedReturns<C> & M & ComponentCustomProperties & InjectToObject<I>, Exposed>; + +declare enum LifecycleHooks { + BEFORE_CREATE = "bc", + CREATED = "c", + BEFORE_MOUNT = "bm", + MOUNTED = "m", + BEFORE_UPDATE = "bu", + UPDATED = "u", + BEFORE_UNMOUNT = "bum", + UNMOUNTED = "um", + DEACTIVATED = "da", + ACTIVATED = "a", + RENDER_TRIGGERED = "rtg", + RENDER_TRACKED = "rtc", + ERROR_CAPTURED = "ec", + SERVER_PREFETCH = "sp" +} + +export interface SuspenseProps { + onResolve?: () => void; + onPending?: () => void; + onFallback?: () => void; + timeout?: string | number; + /** + * Allow suspense to be captured by parent suspense + * + * @default false + */ + suspensible?: boolean; +} +declare const SuspenseImpl: { + name: string; + __isSuspense: boolean; + process(n1: VNode | null, n2: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals): void; + hydrate: typeof hydrateSuspense; + normalize: typeof normalizeSuspenseChildren; +}; +export declare const Suspense: { + __isSuspense: true; + new (): { + $props: VNodeProps & SuspenseProps; + $slots: { + default(): VNode[]; + fallback(): VNode[]; + }; + }; +}; +export interface SuspenseBoundary { + vnode: VNode<RendererNode, RendererElement, SuspenseProps>; + parent: SuspenseBoundary | null; + parentComponent: ComponentInternalInstance | null; + namespace: ElementNamespace; + container: RendererElement; + hiddenContainer: RendererElement; + activeBranch: VNode | null; + pendingBranch: VNode | null; + deps: number; + pendingId: number; + timeout: number; + isInFallback: boolean; + isHydrating: boolean; + isUnmounted: boolean; + effects: Function[]; + resolve(force?: boolean, sync?: boolean): void; + fallback(fallbackVNode: VNode): void; + move(container: RendererElement, anchor: RendererNode | null, type: MoveType): void; + next(): RendererNode | null; + registerDep(instance: ComponentInternalInstance, setupRenderEffect: SetupRenderEffectFn, optimized: boolean): void; + unmount(parentSuspense: SuspenseBoundary | null, doRemove?: boolean): void; +} +declare function hydrateSuspense(node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals, hydrateNode: (node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null; +declare function normalizeSuspenseChildren(vnode: VNode): void; + +export type RootHydrateFunction = (vnode: VNode<Node, Element>, container: (Element | ShadowRoot) & { + _vnode?: VNode; +}) => void; + +type Hook<T = () => void> = T | T[]; +export interface BaseTransitionProps<HostElement = RendererElement> { + mode?: 'in-out' | 'out-in' | 'default'; + appear?: boolean; + persisted?: boolean; + onBeforeEnter?: Hook<(el: HostElement) => void>; + onEnter?: Hook<(el: HostElement, done: () => void) => void>; + onAfterEnter?: Hook<(el: HostElement) => void>; + onEnterCancelled?: Hook<(el: HostElement) => void>; + onBeforeLeave?: Hook<(el: HostElement) => void>; + onLeave?: Hook<(el: HostElement, done: () => void) => void>; + onAfterLeave?: Hook<(el: HostElement) => void>; + onLeaveCancelled?: Hook<(el: HostElement) => void>; + onBeforeAppear?: Hook<(el: HostElement) => void>; + onAppear?: Hook<(el: HostElement, done: () => void) => void>; + onAfterAppear?: Hook<(el: HostElement) => void>; + onAppearCancelled?: Hook<(el: HostElement) => void>; +} +export interface TransitionHooks<HostElement = RendererElement> { + mode: BaseTransitionProps['mode']; + persisted: boolean; + beforeEnter(el: HostElement): void; + enter(el: HostElement): void; + leave(el: HostElement, remove: () => void): void; + clone(vnode: VNode): TransitionHooks<HostElement>; + afterLeave?(): void; + delayLeave?(el: HostElement, earlyRemove: () => void, delayedLeave: () => void): void; + delayedLeave?(): void; +} +export interface TransitionState { + isMounted: boolean; + isLeaving: boolean; + isUnmounting: boolean; + leavingVNodes: Map<any, Record<string, VNode>>; +} +export declare function useTransitionState(): TransitionState; +export declare const BaseTransitionPropsValidators: Record<string, any>; +export declare const BaseTransition: { + new (): { + $props: BaseTransitionProps<any>; + $slots: { + default(): VNode[]; + }; + }; +}; +export declare function resolveTransitionHooks(vnode: VNode, props: BaseTransitionProps<any>, state: TransitionState, instance: ComponentInternalInstance, postClone?: (hooks: TransitionHooks) => void): TransitionHooks; +export declare function setTransitionHooks(vnode: VNode, hooks: TransitionHooks): void; +export declare function getTransitionRawChildren(children: VNode[], keepComment?: boolean, parentKey?: VNode['key']): VNode[]; + +export interface Renderer<HostElement = RendererElement> { + render: RootRenderFunction<HostElement>; + createApp: CreateAppFunction<HostElement>; +} +export interface HydrationRenderer extends Renderer<Element | ShadowRoot> { + hydrate: RootHydrateFunction; +} +export type ElementNamespace = 'svg' | 'mathml' | undefined; +export type RootRenderFunction<HostElement = RendererElement> = (vnode: VNode | null, container: HostElement, namespace?: ElementNamespace) => void; +export interface RendererOptions<HostNode = RendererNode, HostElement = RendererElement> { + patchProp(el: HostElement, key: string, prevValue: any, nextValue: any, namespace?: ElementNamespace, parentComponent?: ComponentInternalInstance | null): void; + insert(el: HostNode, parent: HostElement, anchor?: HostNode | null): void; + remove(el: HostNode): void; + createElement(type: string, namespace?: ElementNamespace, isCustomizedBuiltIn?: string, vnodeProps?: (VNodeProps & { + [key: string]: any; + }) | null): HostElement; + createText(text: string): HostNode; + createComment(text: string): HostNode; + setText(node: HostNode, text: string): void; + setElementText(node: HostElement, text: string): void; + parentNode(node: HostNode): HostElement | null; + nextSibling(node: HostNode): HostNode | null; + querySelector?(selector: string): HostElement | null; + setScopeId?(el: HostElement, id: string): void; + cloneNode?(node: HostNode): HostNode; + insertStaticContent?(content: string, parent: HostElement, anchor: HostNode | null, namespace: ElementNamespace, start?: HostNode | null, end?: HostNode | null): [HostNode, HostNode]; +} +export interface RendererNode { + [key: string | symbol]: any; +} +export interface RendererElement extends RendererNode { +} +interface RendererInternals<HostNode = RendererNode, HostElement = RendererElement> { + p: PatchFn; + um: UnmountFn; + r: RemoveFn; + m: MoveFn; + mt: MountComponentFn; + mc: MountChildrenFn; + pc: PatchChildrenFn; + pbc: PatchBlockChildrenFn; + n: NextFn; + o: RendererOptions<HostNode, HostElement>; +} +type PatchFn = (n1: VNode | null, // null means this is a mount +n2: VNode, container: RendererElement, anchor?: RendererNode | null, parentComponent?: ComponentInternalInstance | null, parentSuspense?: SuspenseBoundary | null, namespace?: ElementNamespace, slotScopeIds?: string[] | null, optimized?: boolean) => void; +type MountChildrenFn = (children: VNodeArrayChildren, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, start?: number) => void; +type PatchChildrenFn = (n1: VNode | null, n2: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean) => void; +type PatchBlockChildrenFn = (oldChildren: VNode[], newChildren: VNode[], fallbackContainer: RendererElement, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null) => void; +type MoveFn = (vnode: VNode, container: RendererElement, anchor: RendererNode | null, type: MoveType, parentSuspense?: SuspenseBoundary | null) => void; +type NextFn = (vnode: VNode) => RendererNode | null; +type UnmountFn = (vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, doRemove?: boolean, optimized?: boolean) => void; +type RemoveFn = (vnode: VNode) => void; +type MountComponentFn = (initialVNode: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, optimized: boolean) => void; +type SetupRenderEffectFn = (instance: ComponentInternalInstance, initialVNode: VNode, container: RendererElement, anchor: RendererNode | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, optimized: boolean) => void; +declare enum MoveType { + ENTER = 0, + LEAVE = 1, + REORDER = 2 +} +/** + * The createRenderer function accepts two generic arguments: + * HostNode and HostElement, corresponding to Node and Element types in the + * host environment. For example, for runtime-dom, HostNode would be the DOM + * `Node` interface and HostElement would be the DOM `Element` interface. + * + * Custom renderers can pass in the platform specific types like this: + * + * ``` js + * const { render, createApp } = createRenderer<Node, Element>({ + * patchProp, + * ...nodeOps + * }) + * ``` + */ +export declare function createRenderer<HostNode = RendererNode, HostElement = RendererElement>(options: RendererOptions<HostNode, HostElement>): Renderer<HostElement>; +export declare function createHydrationRenderer(options: RendererOptions<Node, Element>): HydrationRenderer; + +type MatchPattern = string | RegExp | (string | RegExp)[]; +export interface KeepAliveProps { + include?: MatchPattern; + exclude?: MatchPattern; + max?: number | string; +} +export declare const KeepAlive: { + __isKeepAlive: true; + new (): { + $props: VNodeProps & KeepAliveProps; + $slots: { + default(): VNode[]; + }; + }; +}; +export declare function onActivated(hook: Function, target?: ComponentInternalInstance | null): void; +export declare function onDeactivated(hook: Function, target?: ComponentInternalInstance | null): void; + +type CreateHook<T = any> = (hook: T, target?: ComponentInternalInstance | null) => void; +export declare const onBeforeMount: CreateHook; +export declare const onMounted: CreateHook; +export declare const onBeforeUpdate: CreateHook; +export declare const onUpdated: CreateHook; +export declare const onBeforeUnmount: CreateHook; +export declare const onUnmounted: CreateHook; +export declare const onServerPrefetch: CreateHook; +type DebuggerHook = (e: DebuggerEvent) => void; +export declare const onRenderTriggered: CreateHook<DebuggerHook>; +export declare const onRenderTracked: CreateHook<DebuggerHook>; +type ErrorCapturedHook<TError = unknown> = (err: TError, instance: ComponentPublicInstance | null, info: string) => boolean | void; +export declare function onErrorCaptured<TError = Error>(hook: ErrorCapturedHook<TError>, target?: ComponentInternalInstance | null): void; + +declare enum DeprecationTypes$1 { + GLOBAL_MOUNT = "GLOBAL_MOUNT", + GLOBAL_MOUNT_CONTAINER = "GLOBAL_MOUNT_CONTAINER", + GLOBAL_EXTEND = "GLOBAL_EXTEND", + GLOBAL_PROTOTYPE = "GLOBAL_PROTOTYPE", + GLOBAL_SET = "GLOBAL_SET", + GLOBAL_DELETE = "GLOBAL_DELETE", + GLOBAL_OBSERVABLE = "GLOBAL_OBSERVABLE", + GLOBAL_PRIVATE_UTIL = "GLOBAL_PRIVATE_UTIL", + CONFIG_SILENT = "CONFIG_SILENT", + CONFIG_DEVTOOLS = "CONFIG_DEVTOOLS", + CONFIG_KEY_CODES = "CONFIG_KEY_CODES", + CONFIG_PRODUCTION_TIP = "CONFIG_PRODUCTION_TIP", + CONFIG_IGNORED_ELEMENTS = "CONFIG_IGNORED_ELEMENTS", + CONFIG_WHITESPACE = "CONFIG_WHITESPACE", + CONFIG_OPTION_MERGE_STRATS = "CONFIG_OPTION_MERGE_STRATS", + INSTANCE_SET = "INSTANCE_SET", + INSTANCE_DELETE = "INSTANCE_DELETE", + INSTANCE_DESTROY = "INSTANCE_DESTROY", + INSTANCE_EVENT_EMITTER = "INSTANCE_EVENT_EMITTER", + INSTANCE_EVENT_HOOKS = "INSTANCE_EVENT_HOOKS", + INSTANCE_CHILDREN = "INSTANCE_CHILDREN", + INSTANCE_LISTENERS = "INSTANCE_LISTENERS", + INSTANCE_SCOPED_SLOTS = "INSTANCE_SCOPED_SLOTS", + INSTANCE_ATTRS_CLASS_STYLE = "INSTANCE_ATTRS_CLASS_STYLE", + OPTIONS_DATA_FN = "OPTIONS_DATA_FN", + OPTIONS_DATA_MERGE = "OPTIONS_DATA_MERGE", + OPTIONS_BEFORE_DESTROY = "OPTIONS_BEFORE_DESTROY", + OPTIONS_DESTROYED = "OPTIONS_DESTROYED", + WATCH_ARRAY = "WATCH_ARRAY", + PROPS_DEFAULT_THIS = "PROPS_DEFAULT_THIS", + V_ON_KEYCODE_MODIFIER = "V_ON_KEYCODE_MODIFIER", + CUSTOM_DIR = "CUSTOM_DIR", + ATTR_FALSE_VALUE = "ATTR_FALSE_VALUE", + ATTR_ENUMERATED_COERCION = "ATTR_ENUMERATED_COERCION", + TRANSITION_CLASSES = "TRANSITION_CLASSES", + TRANSITION_GROUP_ROOT = "TRANSITION_GROUP_ROOT", + COMPONENT_ASYNC = "COMPONENT_ASYNC", + COMPONENT_FUNCTIONAL = "COMPONENT_FUNCTIONAL", + COMPONENT_V_MODEL = "COMPONENT_V_MODEL", + RENDER_FUNCTION = "RENDER_FUNCTION", + FILTERS = "FILTERS", + PRIVATE_APIS = "PRIVATE_APIS" +} +type CompatConfig = Partial<Record<DeprecationTypes$1, boolean | 'suppress-warning'>> & { + MODE?: 2 | 3 | ((comp: Component | null) => 2 | 3); +}; +declare function configureCompat(config: CompatConfig): void; + +/** + * Interface for declaring custom options. + * + * @example + * ```ts + * declare module 'vue' { + * interface ComponentCustomOptions { + * beforeRouteUpdate?( + * to: Route, + * from: Route, + * next: () => void + * ): void + * } + * } + * ``` + */ +export interface ComponentCustomOptions { +} +export type RenderFunction = () => VNodeChild; +export interface ComponentOptionsBase<Props, RawBindings, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin, E extends EmitsOptions, EE extends string = string, Defaults = {}, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions> extends LegacyOptions<Props, D, C, M, Mixin, Extends, I, II, Provide>, ComponentInternalOptions, ComponentCustomOptions { + setup?: (this: void, props: LooseRequired<Props & Prettify<UnwrapMixinsType<IntersectionMixin<Mixin> & IntersectionMixin<Extends>, 'P'>>>, ctx: SetupContext<E, S>) => Promise<RawBindings> | RawBindings | RenderFunction | void; + name?: string; + template?: string | object; + render?: Function; + components?: LC & Record<string, Component>; + directives?: Directives & Record<string, Directive>; + inheritAttrs?: boolean; + emits?: (E | EE[]) & ThisType<void>; + slots?: S; + expose?: Exposed[]; + serverPrefetch?(): void | Promise<any>; + compilerOptions?: RuntimeCompilerOptions; + call?: (this: unknown, ...args: unknown[]) => never; + __isFragment?: never; + __isTeleport?: never; + __isSuspense?: never; + __defaults?: Defaults; +} +/** + * Subset of compiler options that makes sense for the runtime. + */ +export interface RuntimeCompilerOptions { + isCustomElement?: (tag: string) => boolean; + whitespace?: 'preserve' | 'condense'; + comments?: boolean; + delimiters?: [string, string]; +} +export type ComponentOptions<Props = {}, RawBindings = any, D = any, C extends ComputedOptions = any, M extends MethodOptions = any, Mixin extends ComponentOptionsMixin = any, Extends extends ComponentOptionsMixin = any, E extends EmitsOptions = any, EE extends string = string, Defaults = {}, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, I, II, S, LC, Directives, Exposed, Provide> & ThisType<CreateComponentPublicInstanceWithMixins<{}, RawBindings, D, C, M, Mixin, Extends, E, Readonly<Props>, Defaults, false, I, S, LC, Directives>>; +export type ComponentOptionsMixin = ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>; +export type ComputedOptions = Record<string, ComputedGetter<any> | WritableComputedOptions<any>>; +export interface MethodOptions { + [key: string]: Function; +} +type ExtractComputedReturns<T extends any> = { + [key in keyof T]: T[key] extends { + get: (...args: any[]) => infer TReturn; + } ? TReturn : T[key] extends (...args: any[]) => infer TReturn ? TReturn : never; +}; +type ObjectWatchOptionItem = { + handler: WatchCallback | string; +} & WatchOptions; +type WatchOptionItem = string | WatchCallback | ObjectWatchOptionItem; +type ComponentWatchOptionItem = WatchOptionItem | WatchOptionItem[]; +type ComponentWatchOptions = Record<string, ComponentWatchOptionItem>; +export type ComponentProvideOptions = ObjectProvideOptions | Function; +type ObjectProvideOptions = Record<string | symbol, unknown>; +export type ComponentInjectOptions = string[] | ObjectInjectOptions; +type ObjectInjectOptions = Record<string | symbol, string | symbol | { + from?: string | symbol; + default?: unknown; +}>; +type InjectToObject<T extends ComponentInjectOptions> = T extends string[] ? { + [K in T[number]]?: unknown; +} : T extends ObjectInjectOptions ? { + [K in keyof T]?: unknown; +} : never; +interface LegacyOptions<Props, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin, I extends ComponentInjectOptions, II extends string, Provide extends ComponentProvideOptions = ComponentProvideOptions> { + compatConfig?: CompatConfig; + [key: string]: any; + data?: (this: CreateComponentPublicInstanceWithMixins<Props, {}, {}, {}, MethodOptions, Mixin, Extends>, vm: CreateComponentPublicInstanceWithMixins<Props, {}, {}, {}, MethodOptions, Mixin, Extends>) => D; + computed?: C; + methods?: M; + watch?: ComponentWatchOptions; + provide?: Provide; + inject?: I | II[]; + filters?: Record<string, Function>; + mixins?: Mixin[]; + extends?: Extends; + beforeCreate?(): void; + created?(): void; + beforeMount?(): void; + mounted?(): void; + beforeUpdate?(): void; + updated?(): void; + activated?(): void; + deactivated?(): void; + /** @deprecated use `beforeUnmount` instead */ + beforeDestroy?(): void; + beforeUnmount?(): void; + /** @deprecated use `unmounted` instead */ + destroyed?(): void; + unmounted?(): void; + renderTracked?: DebuggerHook; + renderTriggered?: DebuggerHook; + errorCaptured?: ErrorCapturedHook; + /** + * runtime compile only + * @deprecated use `compilerOptions.delimiters` instead. + */ + delimiters?: [string, string]; + /** + * #3468 + * + * type-only, used to assist Mixin's type inference, + * typescript will try to simplify the inferred `Mixin` type, + * with the `__differentiator`, typescript won't be able to combine different mixins, + * because the `__differentiator` will be different + */ + __differentiator?: keyof D | keyof C | keyof M; +} +type MergedHook<T = () => void> = T | T[]; +type MergedComponentOptionsOverride = { + beforeCreate?: MergedHook; + created?: MergedHook; + beforeMount?: MergedHook; + mounted?: MergedHook; + beforeUpdate?: MergedHook; + updated?: MergedHook; + activated?: MergedHook; + deactivated?: MergedHook; + /** @deprecated use `beforeUnmount` instead */ + beforeDestroy?: MergedHook; + beforeUnmount?: MergedHook; + /** @deprecated use `unmounted` instead */ + destroyed?: MergedHook; + unmounted?: MergedHook; + renderTracked?: MergedHook<DebuggerHook>; + renderTriggered?: MergedHook<DebuggerHook>; + errorCaptured?: MergedHook<ErrorCapturedHook>; +}; +type OptionTypesKeys = 'P' | 'B' | 'D' | 'C' | 'M' | 'Defaults'; +type OptionTypesType<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Defaults = {}> = { + P: P; + B: B; + D: D; + C: C; + M: M; + Defaults: Defaults; +}; +/** + * @deprecated + */ +export type ComponentOptionsWithoutProps<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, TE extends ComponentTypeEmits = {}, ResolvedEmits extends EmitsOptions = {} extends E ? TypeEmitsToOptions<TE> : E, PE = Props & EmitsToProps<ResolvedEmits>> = ComponentOptionsBase<PE, RawBindings, D, C, M, Mixin, Extends, E, EE, {}, I, II, S, LC, Directives, Exposed, Provide> & { + props?: never; + /** + * @private for language-tools use only + */ + __typeProps?: Props; + /** + * @private for language-tools use only + */ + __typeEmits?: TE; +} & ThisType<CreateComponentPublicInstanceWithMixins<PE, RawBindings, D, C, M, Mixin, Extends, ResolvedEmits, EE, {}, false, I, S, LC, Directives, Exposed>>; +/** + * @deprecated + */ +export type ComponentOptionsWithArrayProps<PropNames extends string = string, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, Props = Prettify<Readonly<{ + [key in PropNames]?: any; +} & EmitsToProps<E>>>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, {}, I, II, S, LC, Directives, Exposed, Provide> & { + props: PropNames[]; +} & ThisType<CreateComponentPublicInstanceWithMixins<Props, RawBindings, D, C, M, Mixin, Extends, E, Props, {}, false, I, S, LC, Directives, Exposed>>; +/** + * @deprecated + */ +export type ComponentOptionsWithObjectProps<PropsOptions = ComponentObjectPropsOptions, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, Props = Prettify<Readonly<ExtractPropTypes<PropsOptions>> & Readonly<EmitsToProps<E>>>, Defaults = ExtractDefaultPropTypes<PropsOptions>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, I, II, S, LC, Directives, Exposed, Provide> & { + props: PropsOptions & ThisType<void>; +} & ThisType<CreateComponentPublicInstanceWithMixins<Props, RawBindings, D, C, M, Mixin, Extends, E, Props, Defaults, false, I, S, LC, Directives>>; + +interface InjectionConstraint<T> { +} +export type InjectionKey<T> = symbol & InjectionConstraint<T>; +export declare function provide<T, K = InjectionKey<T> | string | number>(key: K, value: K extends InjectionKey<infer V> ? V : T): void; +export declare function inject<T>(key: InjectionKey<T> | string): T | undefined; +export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T, treatDefaultAsFactory?: false): T; +export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T | (() => T), treatDefaultAsFactory: true): T; +/** + * Returns true if `inject()` can be used without warning about being called in the wrong place (e.g. outside of + * setup()). This is used by libraries that want to use `inject()` internally without triggering a warning to the end + * user. One example is `useRoute()` in `vue-router`. + */ +export declare function hasInjectionContext(): boolean; + +export type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps; +type ResolveProps<PropsOrPropOptions, E extends EmitsOptions> = Readonly<PropsOrPropOptions extends ComponentPropsOptions ? ExtractPropTypes<PropsOrPropOptions> : PropsOrPropOptions> & ({} extends E ? {} : EmitsToProps<E>); +export type DefineComponent<PropsOrPropOptions = {}, RawBindings = {}, D = {}, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, PP = PublicProps, Props = ResolveProps<PropsOrPropOptions, E>, Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, MakeDefaultsOptional extends boolean = true, TypeRefs extends Record<string, unknown> = {}, TypeEl extends Element = any> = ComponentPublicInstanceConstructor<CreateComponentPublicInstanceWithMixins<Props, RawBindings, D, C, M, Mixin, Extends, E, PP, Defaults, MakeDefaultsOptional, {}, S, LC & GlobalComponents, Directives & GlobalDirectives, Exposed, TypeRefs, TypeEl>> & ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, {}, string, S, LC & GlobalComponents, Directives & GlobalDirectives, Exposed, Provide> & PP; +export type DefineSetupFnComponent<P extends Record<string, any>, E extends EmitsOptions = {}, S extends SlotsType = SlotsType, Props = P & EmitsToProps<E>, PP = PublicProps> = new (props: Props & PP) => CreateComponentPublicInstanceWithMixins<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, E, PP, {}, false, {}, S>; +type ToResolvedProps<Props, Emits extends EmitsOptions> = Readonly<Props> & Readonly<EmitsToProps<Emits>>; +export declare function defineComponent<Props extends Record<string, any>, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}>(setup: (props: Props, ctx: SetupContext<E, S>) => RenderFunction | Promise<RenderFunction>, options?: Pick<ComponentOptions, 'name' | 'inheritAttrs'> & { + props?: (keyof Props)[]; + emits?: E | EE[]; + slots?: S; +}): DefineSetupFnComponent<Props, E, S>; +export declare function defineComponent<Props extends Record<string, any>, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}>(setup: (props: Props, ctx: SetupContext<E, S>) => RenderFunction | Promise<RenderFunction>, options?: Pick<ComponentOptions, 'name' | 'inheritAttrs'> & { + props?: ComponentObjectPropsOptions<Props>; + emits?: E | EE[]; + slots?: S; +}): DefineSetupFnComponent<Props, E, S>; +export declare function defineComponent<TypeProps, RuntimePropsOptions extends ComponentObjectPropsOptions = ComponentObjectPropsOptions, RuntimePropsKeys extends string = string, TypeEmits extends ComponentTypeEmits = {}, RuntimeEmitsOptions extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Data = {}, SetupBindings = {}, Computed extends ComputedOptions = {}, Methods extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, InjectOptions extends ComponentInjectOptions = {}, InjectKeys extends string = string, Slots extends SlotsType = {}, LocalComponents extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, ResolvedEmits extends EmitsOptions = {} extends RuntimeEmitsOptions ? TypeEmitsToOptions<TypeEmits> : RuntimeEmitsOptions, InferredProps = IsKeyValues<TypeProps> extends true ? TypeProps : string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : { + [key in RuntimePropsKeys]?: any; +}, TypeRefs extends Record<string, unknown> = {}, TypeEl extends Element = any>(options: { + props?: (RuntimePropsOptions & ThisType<void>) | RuntimePropsKeys[]; + /** + * @private for language-tools use only + */ + __typeProps?: TypeProps; + /** + * @private for language-tools use only + */ + __typeEmits?: TypeEmits; + /** + * @private for language-tools use only + */ + __typeRefs?: TypeRefs; + /** + * @private for language-tools use only + */ + __typeEl?: TypeEl; +} & ComponentOptionsBase<ToResolvedProps<InferredProps, ResolvedEmits>, SetupBindings, Data, Computed, Methods, Mixin, Extends, RuntimeEmitsOptions, RuntimeEmitsKeys, {}, // Defaults +InjectOptions, InjectKeys, Slots, LocalComponents, Directives, Exposed, Provide> & ThisType<CreateComponentPublicInstanceWithMixins<ToResolvedProps<InferredProps, ResolvedEmits>, SetupBindings, Data, Computed, Methods, Mixin, Extends, ResolvedEmits, {}, {}, false, InjectOptions, Slots, LocalComponents, Directives, Exposed>>): DefineComponent<InferredProps, SetupBindings, Data, Computed, Methods, Mixin, Extends, ResolvedEmits, RuntimeEmitsKeys, PublicProps, ToResolvedProps<InferredProps, ResolvedEmits>, ExtractDefaultPropTypes<RuntimePropsOptions>, Slots, LocalComponents, Directives, Exposed, Provide, unknown extends TypeProps ? true : false, TypeRefs, TypeEl>; + +export interface App<HostElement = any> { + version: string; + config: AppConfig; + use<Options extends unknown[]>(plugin: Plugin<Options>, ...options: Options): this; + use<Options>(plugin: Plugin<Options>, options: Options): this; + mixin(mixin: ComponentOptions): this; + component(name: string): Component | undefined; + component<T extends Component | DefineComponent>(name: string, component: T): this; + directive<HostElement = any, Value = any, Modifiers extends string = string, Arg extends string = string>(name: string): Directive<HostElement, Value, Modifiers, Arg> | undefined; + directive<HostElement = any, Value = any, Modifiers extends string = string, Arg extends string = string>(name: string, directive: Directive<HostElement, Value, Modifiers, Arg>): this; + mount(rootContainer: HostElement | string, + /** + * @internal + */ + isHydrate?: boolean, + /** + * @internal + */ + namespace?: boolean | ElementNamespace, + /** + * @internal + */ + vnode?: VNode): ComponentPublicInstance; + unmount(): void; + onUnmount(cb: () => void): void; + provide<T, K = InjectionKey<T> | string | number>(key: K, value: K extends InjectionKey<infer V> ? V : T): this; + /** + * Runs a function with the app as active instance. This allows using of `inject()` within the function to get access + * to variables provided via `app.provide()`. + * + * @param fn - function to run with the app as active instance + */ + runWithContext<T>(fn: () => T): T; + _uid: number; + _component: ConcreteComponent; + _props: Data | null; + _container: HostElement | null; + _context: AppContext; + _instance: ComponentInternalInstance | null; + /** + * v2 compat only + */ + filter?(name: string): Function | undefined; + filter?(name: string, filter: Function): this; +} +export type OptionMergeFunction = (to: unknown, from: unknown) => any; +export interface AppConfig { + readonly isNativeTag: (tag: string) => boolean; + performance: boolean; + optionMergeStrategies: Record<string, OptionMergeFunction>; + globalProperties: ComponentCustomProperties & Record<string, any>; + errorHandler?: (err: unknown, instance: ComponentPublicInstance | null, info: string) => void; + warnHandler?: (msg: string, instance: ComponentPublicInstance | null, trace: string) => void; + /** + * Options to pass to `@vue/compiler-dom`. + * Only supported in runtime compiler build. + */ + compilerOptions: RuntimeCompilerOptions; + /** + * @deprecated use config.compilerOptions.isCustomElement + */ + isCustomElement?: (tag: string) => boolean; + /** + * TODO document for 3.5 + * Enable warnings for computed getters that recursively trigger itself. + */ + warnRecursiveComputed?: boolean; + /** + * Whether to throw unhandled errors in production. + * Default is `false` to avoid crashing on any error (and only logs it) + * But in some cases, e.g. SSR, throwing might be more desirable. + */ + throwUnhandledErrorInProduction?: boolean; + /** + * Prefix for all useId() calls within this app + */ + idPrefix?: string; +} +export interface AppContext { + app: App; + config: AppConfig; + mixins: ComponentOptions[]; + components: Record<string, Component>; + directives: Record<string, Directive>; + provides: Record<string | symbol, any>; +} +type PluginInstallFunction<Options = any[]> = Options extends unknown[] ? (app: App, ...options: Options) => any : (app: App, options: Options) => any; +export type ObjectPlugin<Options = any[]> = { + install: PluginInstallFunction<Options>; +}; +export type FunctionPlugin<Options = any[]> = PluginInstallFunction<Options> & Partial<ObjectPlugin<Options>>; +export type Plugin<Options = any[]> = FunctionPlugin<Options> | ObjectPlugin<Options>; +export type CreateAppFunction<HostElement> = (rootComponent: Component, rootProps?: Data | null) => App<HostElement>; + +type TeleportVNode = VNode<RendererNode, RendererElement, TeleportProps>; +export interface TeleportProps { + to: string | RendererElement | null | undefined; + disabled?: boolean; + defer?: boolean; +} +declare const TeleportImpl: { + name: string; + __isTeleport: boolean; + process(n1: TeleportVNode | null, n2: TeleportVNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, internals: RendererInternals): void; + remove(vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, { um: unmount, o: { remove: hostRemove } }: RendererInternals, doRemove: boolean): void; + move: typeof moveTeleport; + hydrate: typeof hydrateTeleport; +}; +declare enum TeleportMoveTypes { + TARGET_CHANGE = 0, + TOGGLE = 1,// enable / disable + REORDER = 2 +} +declare function moveTeleport(vnode: VNode, container: RendererElement, parentAnchor: RendererNode | null, { o: { insert }, m: move }: RendererInternals, moveType?: TeleportMoveTypes): void; +declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, { o: { nextSibling, parentNode, querySelector, insert, createText }, }: RendererInternals<Node, Element>, hydrateChildren: (node: Node | null, vnode: VNode, container: Element, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null; +export declare const Teleport: { + __isTeleport: true; + new (): { + $props: VNodeProps & TeleportProps; + $slots: { + default(): VNode[]; + }; + }; +}; + +/** + * @private + */ +export declare function resolveComponent(name: string, maybeSelfReference?: boolean): ConcreteComponent | string; +declare const NULL_DYNAMIC_COMPONENT: unique symbol; +/** + * @private + */ +export declare function resolveDynamicComponent(component: unknown): VNodeTypes; +/** + * @private + */ +export declare function resolveDirective(name: string): Directive | undefined; + +export declare const Fragment: { + __isFragment: true; + new (): { + $props: VNodeProps; + }; +}; +export declare const Text: unique symbol; +export declare const Comment: unique symbol; +export declare const Static: unique symbol; +export type VNodeTypes = string | VNode | Component | typeof Text | typeof Static | typeof Comment | typeof Fragment | typeof Teleport | typeof TeleportImpl | typeof Suspense | typeof SuspenseImpl; +export type VNodeRef = string | Ref | ((ref: Element | ComponentPublicInstance | null, refs: Record<string, any>) => void); +type VNodeNormalizedRefAtom = { + /** + * component instance + */ + i: ComponentInternalInstance; + /** + * Actual ref + */ + r: VNodeRef; + /** + * setup ref key + */ + k?: string; + /** + * refInFor marker + */ + f?: boolean; +}; +type VNodeNormalizedRef = VNodeNormalizedRefAtom | VNodeNormalizedRefAtom[]; +type VNodeMountHook = (vnode: VNode) => void; +type VNodeUpdateHook = (vnode: VNode, oldVNode: VNode) => void; +export type VNodeProps = { + key?: PropertyKey; + ref?: VNodeRef; + ref_for?: boolean; + ref_key?: string; + onVnodeBeforeMount?: VNodeMountHook | VNodeMountHook[]; + onVnodeMounted?: VNodeMountHook | VNodeMountHook[]; + onVnodeBeforeUpdate?: VNodeUpdateHook | VNodeUpdateHook[]; + onVnodeUpdated?: VNodeUpdateHook | VNodeUpdateHook[]; + onVnodeBeforeUnmount?: VNodeMountHook | VNodeMountHook[]; + onVnodeUnmounted?: VNodeMountHook | VNodeMountHook[]; +}; +type VNodeChildAtom = VNode | string | number | boolean | null | undefined | void; +export type VNodeArrayChildren = Array<VNodeArrayChildren | VNodeChildAtom>; +export type VNodeChild = VNodeChildAtom | VNodeArrayChildren; +export type VNodeNormalizedChildren = string | VNodeArrayChildren | RawSlots | null; +export interface VNode<HostNode = RendererNode, HostElement = RendererElement, ExtraProps = { + [key: string]: any; +}> { + type: VNodeTypes; + props: (VNodeProps & ExtraProps) | null; + key: PropertyKey | null; + ref: VNodeNormalizedRef | null; + /** + * SFC only. This is assigned on vnode creation using currentScopeId + * which is set alongside currentRenderingInstance. + */ + scopeId: string | null; + children: VNodeNormalizedChildren; + component: ComponentInternalInstance | null; + dirs: DirectiveBinding[] | null; + transition: TransitionHooks<HostElement> | null; + el: HostNode | null; + anchor: HostNode | null; + target: HostElement | null; + targetStart: HostNode | null; + targetAnchor: HostNode | null; + suspense: SuspenseBoundary | null; + shapeFlag: number; + patchFlag: number; + appContext: AppContext | null; +} +/** + * Open a block. + * This must be called before `createBlock`. It cannot be part of `createBlock` + * because the children of the block are evaluated before `createBlock` itself + * is called. The generated code typically looks like this: + * + * ```js + * function render() { + * return (openBlock(),createBlock('div', null, [...])) + * } + * ``` + * disableTracking is true when creating a v-for fragment block, since a v-for + * fragment always diffs its children. + * + * @private + */ +export declare function openBlock(disableTracking?: boolean): void; +/** + * Block tracking sometimes needs to be disabled, for example during the + * creation of a tree that needs to be cached by v-once. The compiler generates + * code like this: + * + * ``` js + * _cache[1] || ( + * setBlockTracking(-1, true), + * _cache[1] = createVNode(...), + * setBlockTracking(1), + * _cache[1] + * ) + * ``` + * + * @private + */ +export declare function setBlockTracking(value: number, inVOnce?: boolean): void; +/** + * @private + */ +export declare function createElementBlock(type: string | typeof Fragment, props?: Record<string, any> | null, children?: any, patchFlag?: number, dynamicProps?: string[], shapeFlag?: number): VNode; +/** + * Create a block root vnode. Takes the same exact arguments as `createVNode`. + * A block root keeps track of dynamic nodes within the block in the + * `dynamicChildren` array. + * + * @private + */ +export declare function createBlock(type: VNodeTypes | ClassComponent, props?: Record<string, any> | null, children?: any, patchFlag?: number, dynamicProps?: string[]): VNode; +export declare function isVNode(value: any): value is VNode; +declare let vnodeArgsTransformer: ((args: Parameters<typeof _createVNode>, instance: ComponentInternalInstance | null) => Parameters<typeof _createVNode>) | undefined; +/** + * Internal API for registering an arguments transform for createVNode + * used for creating stubs in the test-utils + * It is *internal* but needs to be exposed for test-utils to pick up proper + * typings + */ +export declare function transformVNodeArgs(transformer?: typeof vnodeArgsTransformer): void; +export declare function createBaseVNode(type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT, props?: (Data & VNodeProps) | null, children?: unknown, patchFlag?: number, dynamicProps?: string[] | null, shapeFlag?: number, isBlockNode?: boolean, needFullChildrenNormalization?: boolean): VNode; + +export declare const createVNode: typeof _createVNode; +declare function _createVNode(type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT, props?: (Data & VNodeProps) | null, children?: unknown, patchFlag?: number, dynamicProps?: string[] | null, isBlockNode?: boolean): VNode; +export declare function guardReactiveProps(props: (Data & VNodeProps) | null): (Data & VNodeProps) | null; +export declare function cloneVNode<T, U>(vnode: VNode<T, U>, extraProps?: (Data & VNodeProps) | null, mergeRef?: boolean, cloneTransition?: boolean): VNode<T, U>; +/** + * @private + */ +export declare function createTextVNode(text?: string, flag?: number): VNode; +/** + * @private + */ +export declare function createStaticVNode(content: string, numberOfNodes: number): VNode; +/** + * @private + */ +export declare function createCommentVNode(text?: string, asBlock?: boolean): VNode; +export declare function mergeProps(...args: (Data & VNodeProps)[]): Data; + +type Data = Record<string, unknown>; +/** + * Public utility type for extracting the instance type of a component. + * Works with all valid component definition types. This is intended to replace + * the usage of `InstanceType<typeof Comp>` which only works for + * constructor-based component definition types. + * + * @example + * ```ts + * const MyComp = { ... } + * declare const instance: ComponentInstance<typeof MyComp> + * ``` + */ +export type ComponentInstance<T> = T extends { + new (): ComponentPublicInstance; +} ? InstanceType<T> : T extends FunctionalComponent<infer Props, infer Emits> ? ComponentPublicInstance<Props, {}, {}, {}, {}, ShortEmitsToObject<Emits>> : T extends Component<infer Props, infer RawBindings, infer D, infer C, infer M> ? ComponentPublicInstance<unknown extends Props ? {} : Props, unknown extends RawBindings ? {} : RawBindings, unknown extends D ? {} : D, C, M> : never; +/** + * For extending allowed non-declared props on components in TSX + */ +export interface ComponentCustomProps { +} +/** + * For globally defined Directives + * Here is an example of adding a directive `VTooltip` as global directive: + * + * @example + * ```ts + * import VTooltip from 'v-tooltip' + * + * declare module '@vue/runtime-core' { + * interface GlobalDirectives { + * VTooltip + * } + * } + * ``` + */ +export interface GlobalDirectives { +} +/** + * For globally defined Components + * Here is an example of adding a component `RouterView` as global component: + * + * @example + * ```ts + * import { RouterView } from 'vue-router' + * + * declare module '@vue/runtime-core' { + * interface GlobalComponents { + * RouterView + * } + * } + * ``` + */ +export interface GlobalComponents { + Teleport: DefineComponent<TeleportProps>; + Suspense: DefineComponent<SuspenseProps>; + KeepAlive: DefineComponent<KeepAliveProps>; + BaseTransition: DefineComponent<BaseTransitionProps>; +} +/** + * Default allowed non-declared props on component in TSX + */ +export interface AllowedComponentProps { + class?: unknown; + style?: unknown; +} +interface ComponentInternalOptions { + /** + * Compat build only, for bailing out of certain compatibility behavior + */ + __isBuiltIn?: boolean; + /** + * This one should be exposed so that devtools can make use of it + */ + __file?: string; + /** + * name inferred from filename + */ + __name?: string; +} +export interface FunctionalComponent<P = {}, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any, EE extends EmitsOptions = ShortEmitsToObject<E>> extends ComponentInternalOptions { + (props: P & EmitsToProps<EE>, ctx: Omit<SetupContext<EE, IfAny<S, {}, SlotsType<S>>>, 'expose'>): any; + props?: ComponentPropsOptions<P>; + emits?: EE | (keyof EE)[]; + slots?: IfAny<S, Slots, SlotsType<S>>; + inheritAttrs?: boolean; + displayName?: string; + compatConfig?: CompatConfig; +} +interface ClassComponent { + new (...args: any[]): ComponentPublicInstance<any, any, any, any, any>; + __vccOpts: ComponentOptions; +} +/** + * Concrete component type matches its actual value: it's either an options + * object, or a function. Use this where the code expects to work with actual + * values, e.g. checking if its a function or not. This is mostly for internal + * implementation code. + */ +export type ConcreteComponent<Props = {}, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any> = ComponentOptions<Props, RawBindings, D, C, M> | FunctionalComponent<Props, E, S>; +/** + * A type used in public APIs where a component type is expected. + * The constructor type is an artificial type returned by defineComponent(). + */ +export type Component<Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any> = ConcreteComponent<Props, RawBindings, D, C, M, E, S> | ComponentPublicInstanceConstructor<Props>; + +export type SetupContext<E = EmitsOptions, S extends SlotsType = {}> = E extends any ? { + attrs: Data; + slots: UnwrapSlotsType<S>; + emit: EmitFn<E>; + expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) => void; +} : never; +/** + * We expose a subset of properties on the internal instance as they are + * useful for advanced external libraries and tools. + */ +export interface ComponentInternalInstance { + uid: number; + type: ConcreteComponent; + parent: ComponentInternalInstance | null; + root: ComponentInternalInstance; + appContext: AppContext; + /** + * Vnode representing this component in its parent's vdom tree + */ + vnode: VNode; + /** + * Root vnode of this component's own vdom tree + */ + subTree: VNode; + /** + * Render effect instance + */ + effect: ReactiveEffect; + /** + * Force update render effect + */ + update: () => void; + /** + * Render effect job to be passed to scheduler (checks if dirty) + */ + job: SchedulerJob; + proxy: ComponentPublicInstance | null; + exposed: Record<string, any> | null; + exposeProxy: Record<string, any> | null; + data: Data; + props: Data; + attrs: Data; + slots: InternalSlots; + refs: Data; + emit: EmitFn; + isMounted: boolean; + isUnmounted: boolean; + isDeactivated: boolean; +} +export declare const getCurrentInstance: () => ComponentInternalInstance | null; +/** + * For runtime-dom to register the compiler. + * Note the exported method uses any to avoid d.ts relying on the compiler types. + */ +export declare function registerRuntimeCompiler(_compile: any): void; +export declare const isRuntimeOnly: () => boolean; +export interface ComponentCustomElementInterface { +} + +type MaybeUndefined<T, I> = I extends true ? T | undefined : T; +type MapSources<T, Immediate> = { + [K in keyof T]: T[K] extends WatchSource<infer V> ? MaybeUndefined<V, Immediate> : T[K] extends object ? MaybeUndefined<T[K], Immediate> : never; +}; +export interface WatchEffectOptions extends DebuggerOptions { + flush?: 'pre' | 'post' | 'sync'; +} +export interface WatchOptions<Immediate = boolean> extends WatchEffectOptions { + immediate?: Immediate; + deep?: boolean | number; + once?: boolean; +} +export declare function watchEffect(effect: WatchEffect, options?: WatchEffectOptions): WatchHandle; +export declare function watchPostEffect(effect: WatchEffect, options?: DebuggerOptions): WatchHandle; +export declare function watchSyncEffect(effect: WatchEffect, options?: DebuggerOptions): WatchHandle; +export type MultiWatchSources = (WatchSource<unknown> | object)[]; +export declare function watch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle; +export declare function watch<T extends Readonly<MultiWatchSources>, Immediate extends Readonly<boolean> = false>(sources: readonly [...T] | T, cb: [T] extends [ReactiveMarker] ? WatchCallback<T, MaybeUndefined<T, Immediate>> : WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle; +export declare function watch<T extends MultiWatchSources, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle; +export declare function watch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle; + +/** + * A lazy hydration strategy for async components. + * @param hydrate - call this to perform the actual hydration. + * @param forEachElement - iterate through the root elements of the component's + * non-hydrated DOM, accounting for possible fragments. + * @returns a teardown function to be called if the async component is unmounted + * before it is hydrated. This can be used to e.g. remove DOM event + * listeners. + */ +export type HydrationStrategy = (hydrate: () => void, forEachElement: (cb: (el: Element) => any) => void) => (() => void) | void; +export type HydrationStrategyFactory<Options> = (options?: Options) => HydrationStrategy; +export declare const hydrateOnIdle: HydrationStrategyFactory<number>; +export declare const hydrateOnVisible: HydrationStrategyFactory<IntersectionObserverInit>; +export declare const hydrateOnMediaQuery: HydrationStrategyFactory<string>; +export declare const hydrateOnInteraction: HydrationStrategyFactory<keyof HTMLElementEventMap | Array<keyof HTMLElementEventMap>>; + +type AsyncComponentResolveResult<T = Component> = T | { + default: T; +}; +export type AsyncComponentLoader<T = any> = () => Promise<AsyncComponentResolveResult<T>>; +export interface AsyncComponentOptions<T = any> { + loader: AsyncComponentLoader<T>; + loadingComponent?: Component; + errorComponent?: Component; + delay?: number; + timeout?: number; + suspensible?: boolean; + hydrate?: HydrationStrategy; + onError?: (error: Error, retry: () => void, fail: () => void, attempts: number) => any; +} +/*! #__NO_SIDE_EFFECTS__ */ +export declare function defineAsyncComponent<T extends Component = { + new (): ComponentPublicInstance; +}>(source: AsyncComponentLoader<T> | AsyncComponentOptions<T>): T; + +export declare function useModel<M extends PropertyKey, T extends Record<string, any>, K extends keyof T, G = T[K], S = T[K]>(props: T, name: K, options?: DefineModelOptions<T[K], G, S>): ModelRef<T[K], M, G, S>; + +export declare function useTemplateRef<T = unknown, Keys extends string = string>(key: Keys): Readonly<ShallowRef<T | null>>; + +export declare function useId(): string; + +type RawProps = VNodeProps & { + __v_isVNode?: never; + [Symbol.iterator]?: never; +} & Record<string, any>; +type RawChildren = string | number | boolean | VNode | VNodeArrayChildren | (() => any); +interface Constructor<P = any> { + __isFragment?: never; + __isTeleport?: never; + __isSuspense?: never; + new (...args: any[]): { + $props: P; + }; +} +type HTMLElementEventHandler = { + [K in keyof HTMLElementEventMap as `on${Capitalize<K>}`]?: (ev: HTMLElementEventMap[K]) => any; +}; +export declare function h<K extends keyof HTMLElementTagNameMap>(type: K, children?: RawChildren): VNode; +export declare function h<K extends keyof HTMLElementTagNameMap>(type: K, props?: (RawProps & HTMLElementEventHandler) | null, children?: RawChildren | RawSlots): VNode; +export declare function h(type: string, children?: RawChildren): VNode; +export declare function h(type: string, props?: RawProps | null, children?: RawChildren | RawSlots): VNode; +export declare function h(type: typeof Text | typeof Comment, children?: string | number | boolean): VNode; +export declare function h(type: typeof Text | typeof Comment, props?: null, children?: string | number | boolean): VNode; +export declare function h(type: typeof Fragment, children?: VNodeArrayChildren): VNode; +export declare function h(type: typeof Fragment, props?: RawProps | null, children?: VNodeArrayChildren): VNode; +export declare function h(type: typeof Teleport, props: RawProps & TeleportProps, children: RawChildren | RawSlots): VNode; +export declare function h(type: typeof Suspense, children?: RawChildren): VNode; +export declare function h(type: typeof Suspense, props?: (RawProps & SuspenseProps) | null, children?: RawChildren | RawSlots): VNode; +export declare function h<P, E extends EmitsOptions = {}, S extends Record<string, any> = any>(type: FunctionalComponent<P, any, S, any>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | IfAny<S, RawSlots, S>): VNode; +export declare function h(type: Component, children?: RawChildren): VNode; +export declare function h<P>(type: ConcreteComponent | string, children?: RawChildren): VNode; +export declare function h<P>(type: ConcreteComponent<P> | string, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren): VNode; +export declare function h<P>(type: Component<P>, props?: (RawProps & P) | null, children?: RawChildren | RawSlots): VNode; +export declare function h<P>(type: ComponentOptions<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode; +export declare function h(type: Constructor, children?: RawChildren): VNode; +export declare function h<P>(type: Constructor<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode; +export declare function h(type: DefineComponent, children?: RawChildren): VNode; +export declare function h<P>(type: DefineComponent<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode; +export declare function h(type: string | Component, children?: RawChildren): VNode; +export declare function h<P>(type: string | Component<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode; + +export declare const ssrContextKey: unique symbol; +export declare const useSSRContext: <T = Record<string, any>>() => T | undefined; + +declare function warn$1(msg: string, ...args: any[]): void; + +export declare enum ErrorCodes { + SETUP_FUNCTION = 0, + RENDER_FUNCTION = 1, + NATIVE_EVENT_HANDLER = 5, + COMPONENT_EVENT_HANDLER = 6, + VNODE_HOOK = 7, + DIRECTIVE_HOOK = 8, + TRANSITION_HOOK = 9, + APP_ERROR_HANDLER = 10, + APP_WARN_HANDLER = 11, + FUNCTION_REF = 12, + ASYNC_COMPONENT_LOADER = 13, + SCHEDULER = 14, + COMPONENT_UPDATE = 15, + APP_UNMOUNT_CLEANUP = 16 +} +type ErrorTypes = LifecycleHooks | ErrorCodes | WatchErrorCodes; +export declare function callWithErrorHandling(fn: Function, instance: ComponentInternalInstance | null | undefined, type: ErrorTypes, args?: unknown[]): any; +export declare function callWithAsyncErrorHandling(fn: Function | Function[], instance: ComponentInternalInstance | null, type: ErrorTypes, args?: unknown[]): any; +export declare function handleError(err: unknown, instance: ComponentInternalInstance | null | undefined, type: ErrorTypes, throwInDev?: boolean): void; + +export declare function initCustomFormatter(): void; + +interface AppRecord { + id: number; + app: App; + version: string; + types: Record<string, string | Symbol>; +} +interface DevtoolsHook { + enabled?: boolean; + emit: (event: string, ...payload: any[]) => void; + on: (event: string, handler: Function) => void; + once: (event: string, handler: Function) => void; + off: (event: string, handler: Function) => void; + appRecords: AppRecord[]; + /** + * Added at https://github.com/vuejs/devtools/commit/f2ad51eea789006ab66942e5a27c0f0986a257f9 + * Returns whether the arg was buffered or not + */ + cleanupBuffer?: (matchArg: unknown) => boolean; +} +declare function setDevtoolsHook$1(hook: DevtoolsHook, target: any): void; + +type HMRComponent = ComponentOptions | ClassComponent; +export interface HMRRuntime { + createRecord: typeof createRecord; + rerender: typeof rerender; + reload: typeof reload; +} +declare function createRecord(id: string, initialDef: HMRComponent): boolean; +declare function rerender(id: string, newRender?: Function): void; +declare function reload(id: string, newComp: HMRComponent): void; + +/** + * Set scope id when creating hoisted vnodes. + * @private compiler helper + */ +export declare function pushScopeId(id: string | null): void; +/** + * Technically we no longer need this after 3.0.8 but we need to keep the same + * API for backwards compat w/ code generated by compilers. + * @private + */ +export declare function popScopeId(): void; +/** + * Only for backwards compat + * @private + */ +export declare const withScopeId: (_id: string) => typeof withCtx; +/** + * Wrap a slot function to memoize current rendering instance + * @private compiler helper + */ +export declare function withCtx(fn: Function, ctx?: ComponentInternalInstance | null, isNonScopedSlot?: boolean): Function; + +/** + * v-for string + * @private + */ +export declare function renderList(source: string, renderItem: (value: string, index: number) => VNodeChild): VNodeChild[]; +/** + * v-for number + */ +export declare function renderList(source: number, renderItem: (value: number, index: number) => VNodeChild): VNodeChild[]; +/** + * v-for array + */ +export declare function renderList<T>(source: T[], renderItem: (value: T, index: number) => VNodeChild): VNodeChild[]; +/** + * v-for iterable + */ +export declare function renderList<T>(source: Iterable<T>, renderItem: (value: T, index: number) => VNodeChild): VNodeChild[]; +/** + * v-for object + */ +export declare function renderList<T>(source: T, renderItem: <K extends keyof T>(value: T[K], key: string, index: number) => VNodeChild): VNodeChild[]; + +/** + * For prefixing keys in v-on="obj" with "on" + * @private + */ +export declare function toHandlers(obj: Record<string, any>, preserveCaseIfNecessary?: boolean): Record<string, any>; + +/** + * Compiler runtime helper for rendering `<slot/>` + * @private + */ +export declare function renderSlot(slots: Slots, name: string, props?: Data, fallback?: () => VNodeArrayChildren, noSlotted?: boolean): VNode; + +type SSRSlot = (...args: any[]) => VNode[] | undefined; +interface CompiledSlotDescriptor { + name: string; + fn: SSRSlot; + key?: string; +} +/** + * Compiler runtime helper for creating dynamic slots object + * @private + */ +export declare function createSlots(slots: Record<string, SSRSlot>, dynamicSlots: (CompiledSlotDescriptor | CompiledSlotDescriptor[] | undefined)[]): Record<string, SSRSlot>; + +export declare function withMemo(memo: any[], render: () => VNode<any, any>, cache: any[], index: number): VNode<any, any>; +export declare function isMemoSame(cached: VNode, memo: any[]): boolean; + +export type LegacyConfig = { + /** + * @deprecated `config.silent` option has been removed + */ + silent?: boolean; + /** + * @deprecated use __VUE_PROD_DEVTOOLS__ compile-time feature flag instead + * https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags + */ + devtools?: boolean; + /** + * @deprecated use `config.isCustomElement` instead + * https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement + */ + ignoredElements?: (string | RegExp)[]; + /** + * @deprecated + * https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html + */ + keyCodes?: Record<string, number | number[]>; + /** + * @deprecated + * https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed + */ + productionTip?: boolean; +}; + +type LegacyPublicInstance = ComponentPublicInstance & LegacyPublicProperties; +interface LegacyPublicProperties { + $set<T extends Record<keyof any, any>, K extends keyof T>(target: T, key: K, value: T[K]): void; + $delete<T extends Record<keyof any, any>, K extends keyof T>(target: T, key: K): void; + $mount(el?: string | Element): this; + $destroy(): void; + $scopedSlots: Slots; + $on(event: string | string[], fn: Function): this; + $once(event: string, fn: Function): this; + $off(event?: string | string[], fn?: Function): this; + $children: LegacyPublicProperties[]; + $listeners: Record<string, Function | Function[]>; +} + +/** + * @deprecated the default `Vue` export has been removed in Vue 3. The type for + * the default export is provided only for migration purposes. Please use + * named imports instead - e.g. `import { createApp } from 'vue'`. + */ +export type CompatVue = Pick<App, 'version' | 'component' | 'directive'> & { + configureCompat: typeof configureCompat; + new (options?: ComponentOptions): LegacyPublicInstance; + version: string; + config: AppConfig & LegacyConfig; + nextTick: typeof nextTick; + use<Options extends unknown[]>(plugin: Plugin<Options>, ...options: Options): CompatVue; + use<Options>(plugin: Plugin<Options>, options: Options): CompatVue; + mixin(mixin: ComponentOptions): CompatVue; + component(name: string): Component | undefined; + component(name: string, component: Component): CompatVue; + directive<T = any, V = any>(name: string): Directive<T, V> | undefined; + directive<T = any, V = any>(name: string, directive: Directive<T, V>): CompatVue; + compile(template: string): RenderFunction; + /** + * @deprecated Vue 3 no longer supports extending constructors. + */ + extend: (options?: ComponentOptions) => CompatVue; + /** + * @deprecated Vue 3 no longer needs set() for adding new properties. + */ + set(target: any, key: PropertyKey, value: any): void; + /** + * @deprecated Vue 3 no longer needs delete() for property deletions. + */ + delete(target: any, key: PropertyKey): void; + /** + * @deprecated use `reactive` instead. + */ + observable: typeof reactive; + /** + * @deprecated filters have been removed from Vue 3. + */ + filter(name: string, arg?: any): null; +}; + +export declare const version: string; + +export declare const warn: typeof warn$1; + +export declare const devtools: DevtoolsHook; +export declare const setDevtoolsHook: typeof setDevtoolsHook$1; + +declare module '@vue/reactivity' { + interface RefUnwrapBailTypes { + runtimeCoreBailTypes: VNode | { + $: ComponentInternalInstance; + }; + } +} + +export declare const DeprecationTypes: typeof DeprecationTypes$1; + +export { type WatchEffectOptions as WatchOptionsBase, createBaseVNode as createElementVNode, }; +// Note: this file is auto concatenated to the end of the bundled d.ts during +// build. + +declare module '@vue/runtime-core' { + export interface GlobalComponents { + Teleport: DefineComponent<TeleportProps> + Suspense: DefineComponent<SuspenseProps> + KeepAlive: DefineComponent<KeepAliveProps> + BaseTransition: DefineComponent<BaseTransitionProps> + } +} + +// Note: this file is auto concatenated to the end of the bundled d.ts during +// build. +type _defineProps = typeof defineProps +type _defineEmits = typeof defineEmits +type _defineExpose = typeof defineExpose +type _defineOptions = typeof defineOptions +type _defineSlots = typeof defineSlots +type _defineModel = typeof defineModel +type _withDefaults = typeof withDefaults + +declare global { + const defineProps: _defineProps + const defineEmits: _defineEmits + const defineExpose: _defineExpose + const defineOptions: _defineOptions + const defineSlots: _defineSlots + const defineModel: _defineModel + const withDefaults: _withDefaults +} diff --git a/vuetest/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js b/vuetest/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js new file mode 100644 index 0000000..ec24dbd --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js @@ -0,0 +1,8419 @@ +/** +* @vue/runtime-core v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +import { pauseTracking, resetTracking, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, isShallow, shallowReadArray, toReactive, shallowReadonly, track, reactive, shallowReactive, trigger, ReactiveEffect, watch as watch$1, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isReadonly } from '@vue/reactivity'; +export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity'; +import { isString, isFunction, isPromise, isArray, EMPTY_OBJ, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, capitalize, camelize, isSymbol, isGloballyAllowed, NO, hyphenate, EMPTY_ARR, toRawType, makeMap, hasChanged, looseToNumber, isModelListener, toNumber } from '@vue/shared'; +export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared'; + +const stack = []; +function pushWarningContext(vnode) { + stack.push(vnode); +} +function popWarningContext() { + stack.pop(); +} +let isWarning = false; +function warn$1(msg, ...args) { + if (isWarning) return; + isWarning = true; + pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + // eslint-disable-next-line no-restricted-syntax + msg + args.map((a) => { + var _a, _b; + return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); + }).join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); + } + console.warn(...warnArgs); + } + resetTracking(); + isWarning = false; +} +function getComponentTrace() { + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); + } + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; +} +function formatTrace(trace) { + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; +} +function formatTraceEntry({ vnode, recurseCount }) { + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; +} +function formatProps(props) { + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; +} +function formatProp(key, value, raw) { + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } +} +function assertNumber(val, type) { + if (!!!(process.env.NODE_ENV !== "production")) return; + if (val === void 0) { + return; + } else if (typeof val !== "number") { + warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + } else if (isNaN(val)) { + warn$1(`${type} is NaN - the duration expression might be incorrect.`); + } +} + +const ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER", + "COMPONENT_UPDATE": 15, + "15": "COMPONENT_UPDATE", + "APP_UNMOUNT_CLEANUP": 16, + "16": "APP_UNMOUNT_CLEANUP" +}; +const ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush", + [15]: "component update", + [16]: "app unmount cleanup function" +}; +function callWithErrorHandling(fn, instance, type, args) { + try { + return args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } +} +function callWithAsyncErrorHandling(fn, instance, type, args) { + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); + } + return res; + } + if (isArray(fn)) { + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1( + `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` + ); + } +} +function handleError(err, instance, type, throwInDev = true) { + const contextVNode = instance ? instance.vnode : null; + const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = !!(process.env.NODE_ENV !== "production") ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + return; + } + } + } + cur = cur.parent; + } + if (errorHandler) { + pauseTracking(); + callWithErrorHandling(errorHandler, null, 10, [ + err, + exposedInstance, + errorInfo + ]); + resetTracking(); + return; + } + } + logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); +} +function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { + if (!!(process.env.NODE_ENV !== "production")) { + const info = ErrorTypeStrings$1[type]; + if (contextVNode) { + pushWarningContext(contextVNode); + } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } else if (throwInProd) { + throw err; + } else { + console.error(err); + } +} + +const queue = []; +let flushIndex = -1; +const pendingPostFlushCbs = []; +let activePostFlushCbs = null; +let postFlushIndex = 0; +const resolvedPromise = /* @__PURE__ */ Promise.resolve(); +let currentFlushPromise = null; +const RECURSION_LIMIT = 100; +function nextTick(fn) { + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; +} +function findInsertionIndex(id) { + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { + start = middle + 1; + } else { + end = middle; + } + } + return start; +} +function queueJob(job) { + if (!(job.flags & 1)) { + const jobId = getId(job); + const lastJob = queue[queue.length - 1]; + if (!lastJob || // fast path when the job id is larger than the tail + !(job.flags & 2) && jobId >= getId(lastJob)) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(jobId), 0, job); + } + job.flags |= 1; + queueFlush(); + } +} +function queueFlush() { + if (!currentFlushPromise) { + currentFlushPromise = resolvedPromise.then(flushJobs); + } +} +function queuePostFlushCb(cb) { + if (!isArray(cb)) { + if (activePostFlushCbs && cb.id === -1) { + activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); + } else if (!(cb.flags & 1)) { + pendingPostFlushCbs.push(cb); + cb.flags |= 1; + } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); +} +function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { + if (!!(process.env.NODE_ENV !== "production")) { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.flags & 2) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + if (cb.flags & 4) { + cb.flags &= ~1; + } + cb(); + if (!(cb.flags & 4)) { + cb.flags &= ~1; + } + } + } +} +function flushPostFlushCbs(seen) { + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; + } + activePostFlushCbs = deduped; + if (!!(process.env.NODE_ENV !== "production")) { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + const cb = activePostFlushCbs[postFlushIndex]; + if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) { + continue; + } + if (cb.flags & 4) { + cb.flags &= ~1; + } + if (!(cb.flags & 8)) cb(); + cb.flags &= ~1; + } + activePostFlushCbs = null; + postFlushIndex = 0; + } +} +const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; +function flushJobs(seen) { + if (!!(process.env.NODE_ENV !== "production")) { + seen = seen || /* @__PURE__ */ new Map(); + } + const check = !!(process.env.NODE_ENV !== "production") ? (job) => checkRecursiveUpdates(seen, job) : NOOP; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && !(job.flags & 8)) { + if (!!(process.env.NODE_ENV !== "production") && check(job)) { + continue; + } + if (job.flags & 4) { + job.flags &= ~1; + } + callWithErrorHandling( + job, + job.i, + job.i ? 15 : 14 + ); + if (!(job.flags & 4)) { + job.flags &= ~1; + } + } + } + } finally { + for (; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job) { + job.flags &= ~1; + } + } + flushIndex = -1; + queue.length = 0; + flushPostFlushCbs(seen); + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); + } + } +} +function checkRecursiveUpdates(seen, fn) { + const count = seen.get(fn) || 0; + if (count > RECURSION_LIMIT) { + const instance = fn.i; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } + seen.set(fn, count + 1); + return false; +} + +let isHmrUpdating = false; +const hmrDirtyComponents = /* @__PURE__ */ new Map(); +if (!!(process.env.NODE_ENV !== "production")) { + getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; +} +const map = /* @__PURE__ */ new Map(); +function registerHMR(instance) { + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); +} +function unregisterHMR(instance) { + map.get(instance.type.__hmrId).instances.delete(instance); +} +function createRecord(id, initialDef) { + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; +} +function normalizeClassComponent(component) { + return isClassComponent(component) ? component.__vccOpts : component; +} +function rerender(id, newRender) { + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; + } + instance.renderCache = []; + isHmrUpdating = true; + instance.update(); + isHmrUpdating = false; + }); +} +function reload(id, newComp) { + const record = map.get(id); + if (!record) return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (let i = 0; i < instances.length; i++) { + const instance = instances[i]; + const oldComp = normalizeClassComponent(instance.type); + let dirtyInstances = hmrDirtyComponents.get(oldComp); + if (!dirtyInstances) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set()); + } + dirtyInstances.add(instance); + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + dirtyInstances.add(instance); + instance.ceReload(newComp.styles); + dirtyInstances.delete(instance); + } else if (instance.parent) { + queueJob(() => { + isHmrUpdating = true; + instance.parent.update(); + isHmrUpdating = false; + dirtyInstances.delete(instance); + }); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + if (instance.root.ce && instance !== instance.root) { + instance.root.ce._removeChildStyle(oldComp); + } + } + queuePostFlushCb(() => { + hmrDirtyComponents.clear(); + }); +} +function updateComponentDef(oldComp, newComp) { + extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; + } + } +} +function tryWrap(fn) { + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; +} + +let devtools$1; +let buffer = []; +let devtoolsNotInstalled = false; +function emit$1(event, ...args) { + if (devtools$1) { + devtools$1.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } +} +function setDevtoolsHook$1(hook, target) { + var _a, _b; + devtools$1 = hook; + if (devtools$1) { + devtools$1.enabled = true; + buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); + buffer = []; + } else if ( + // handle late devtools injection - only do this if we are in an actual + // browser environment to avoid the timer handle stalling test runner exit + // (#4815) + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + // eslint-disable-next-line no-restricted-syntax + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook$1(newHook, target); + }); + setTimeout(() => { + if (!devtools$1) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; + devtoolsNotInstalled = true; + buffer = []; + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } +} +function devtoolsInitApp(app, version) { + emit$1("app:init" /* APP_INIT */, app, version, { + Fragment, + Text, + Comment, + Static + }); +} +function devtoolsUnmountApp(app) { + emit$1("app:unmount" /* APP_UNMOUNT */, app); +} +const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); +const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); +const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( + "component:removed" /* COMPONENT_REMOVED */ +); +const devtoolsComponentRemoved = (component) => { + if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools$1.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } +}; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function createDevtoolsComponentHook(hook) { + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; +} +const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); +const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); +function createDevtoolsPerformanceHook(hook) { + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; +} +function devtoolsComponentEmit(component, event, params) { + emit$1( + "component:emit" /* COMPONENT_EMIT */, + component.appContext.app, + component, + event, + params + ); +} + +let currentRenderingInstance = null; +let currentScopeId = null; +function setCurrentRenderingInstance(instance) { + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; +} +function pushScopeId(id) { + currentScopeId = id; +} +function popScopeId() { + currentScopeId = null; +} +const withScopeId = (_id) => withCtx; +function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); + } + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; +} + +function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } +} +function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + !!(process.env.NODE_ENV !== "production") && warn$1(`withDirectives can only be used inside render functions.`); + return vnode; + } + const instance = getComponentPublicInstance(currentRenderingInstance); + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; + if (dir) { + if (isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; +} +function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); + } + } +} + +const TeleportEndKey = Symbol("_vte"); +const isTeleport = (type) => type.__isTeleport; +const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); +const isTeleportDeferred = (props) => props && (props.defer || props.defer === ""); +const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; +const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; +const resolveTarget = (props, select) => { + const targetSelector = props && props.to; + if (isString(targetSelector)) { + if (!select) { + !!(process.env.NODE_ENV !== "production") && warn$1( + `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` + ); + return null; + } else { + const target = select(targetSelector); + if (!!(process.env.NODE_ENV !== "production") && !target && !isTeleportDisabled(props)) { + warn$1( + `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` + ); + } + return target; + } + } else { + if (!!(process.env.NODE_ENV !== "production") && !targetSelector && !isTeleportDisabled(props)) { + warn$1(`Invalid Teleport target: ${targetSelector}`); + } + return targetSelector; + } +}; +const TeleportImpl = { + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) { + optimized = false; + dynamicChildren = null; + } + if (n1 == null) { + const placeholder = n2.el = !!(process.env.NODE_ENV !== "production") ? createComment("teleport start") : createText(""); + const mainAnchor = n2.anchor = !!(process.env.NODE_ENV !== "production") ? createComment("teleport end") : createText(""); + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + if (parentComponent && parentComponent.isCE) { + parentComponent.ce._teleportTarget = container2; + } + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountToTarget = () => { + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = prepareAnchor(target, n2, createText, insert); + if (target) { + if (namespace !== "svg" && isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace !== "mathml" && isTargetMathML(target)) { + namespace = "mathml"; + } + if (!disabled) { + mount(target, targetAnchor); + updateCssVars(n2, false); + } + } else if (!!(process.env.NODE_ENV !== "production") && !disabled) { + warn$1( + "Invalid Teleport target on mount:", + target, + `(${typeof target})` + ); + } + }; + if (disabled) { + mount(container, mainAnchor); + updateCssVars(n2, true); + } + if (isTeleportDeferred(n2.props)) { + queuePostRenderEffect(() => { + mountToTarget(); + n2.el.__isMounted = true; + }, parentSuspense); + } else { + mountToTarget(); + } + } else { + if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) { + queuePostRenderEffect(() => { + TeleportImpl.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + delete n1.el.__isMounted; + }, parentSuspense); + return; + } + n2.el = n1.el; + n2.targetStart = n1.targetStart; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1( + "Invalid Teleport target on update:", + target, + `(${typeof target})` + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); + } + } + updateCssVars(n2, disabled); + } + }, + remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { + shapeFlag, + children, + anchor, + targetStart, + targetAnchor, + target, + props + } = vnode; + if (target) { + hostRemove(targetStart); + hostRemove(targetAnchor); + } + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport +}; +function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } +} +function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector, insert, createText } +}, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const disabled = isTeleportDisabled(vnode.props); + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (disabled) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetStart = targetNode; + vnode.targetAnchor = targetNode && nextSibling(targetNode); + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + if (targetAnchor && targetAnchor.nodeType === 8) { + if (targetAnchor.data === "teleport start anchor") { + vnode.targetStart = targetAnchor; + } else if (targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + targetAnchor = nextSibling(targetAnchor); + } + if (!vnode.targetAnchor) { + prepareAnchor(target, vnode, createText, insert); + } + hydrateChildren( + targetNode && nextSibling(targetNode), + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode, disabled); + } + return vnode.anchor && nextSibling(vnode.anchor); +} +const Teleport = TeleportImpl; +function updateCssVars(vnode, isDisabled) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node, anchor; + if (isDisabled) { + node = vnode.el; + anchor = vnode.anchor; + } else { + node = vnode.targetStart; + anchor = vnode.targetAnchor; + } + while (node && node !== anchor) { + if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } +} +function prepareAnchor(target, vnode, createText, insert) { + const targetStart = vnode.targetStart = createText(""); + const targetAnchor = vnode.targetAnchor = createText(""); + targetStart[TeleportEndKey] = targetAnchor; + if (target) { + insert(targetStart, target); + insert(targetAnchor, target); + } + return targetAnchor; +} + +const leaveCbKey = Symbol("_leaveCb"); +const enterCbKey = Symbol("_enterCb"); +function useTransitionState() { + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; +} +const TransitionHookValidator = [Function, Array]; +const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator +}; +const recursiveGetSubtree = (instance) => { + const subTree = instance.subTree; + return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; +}; +const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + const child = findNonCommentChild(children); + const rawProps = toRaw(props); + const { mode } = rawProps; + if (!!(process.env.NODE_ENV !== "production") && mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { + warn$1(`invalid <transition> mode: ${mode}`); + } + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getInnerChild$1(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + let enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance, + // #11061, ensure enterHooks is fresh after clone + (hooks) => enterHooks = hooks + ); + if (innerChild.type !== Comment) { + setTransitionHooks(innerChild, enterHooks); + } + let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree); + if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { + let leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in" && innerChild.type !== Comment) { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (!(instance.job.flags & 8)) { + instance.update(); + } + delete leavingHooks.afterLeave; + oldInnerChild = void 0; + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + enterHooks.delayedLeave = () => { + delayedLeave(); + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + }; + } else { + oldInnerChild = void 0; + } + } else if (oldInnerChild) { + oldInnerChild = void 0; + } + return child; + }; + } +}; +function findNonCommentChild(children) { + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c of children) { + if (c.type !== Comment) { + if (!!(process.env.NODE_ENV !== "production") && hasFound) { + warn$1( + "<transition> can only be used on a single element or component. Use <transition-group> for lists." + ); + break; + } + child = c; + hasFound = true; + if (!!!(process.env.NODE_ENV !== "production")) break; + } + } + } + return child; +} +const BaseTransition = BaseTransitionImpl; +function getLeavingNodesForType(state, vnode) { + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; +} +function resolveTransitionHooks(vnode, props, state, instance, postClone) { + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook(hook, args); + if (isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) done(); + } else if (hook.length <= 1) { + done(); + } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey] = (cancelled) => { + if (called) return; + called = true; + if (cancelled) { + callHook(cancelHook, [el]); + } else { + callHook(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove) { + const key2 = String(vnode.key); + if (el[enterCbKey]) { + el[enterCbKey]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove(); + } + callHook(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) return; + called = true; + remove(); + if (cancelled) { + callHook(onLeaveCancelled, [el]); + } else { + callHook(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + const hooks2 = resolveTransitionHooks( + vnode2, + props, + state, + instance, + postClone + ); + if (postClone) postClone(hooks2); + return hooks2; + } + }; + return hooks; +} +function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } +} +function getInnerChild$1(vnode) { + if (!isKeepAlive(vnode)) { + if (isTeleport(vnode.type) && vnode.children) { + return findNonCommentChild(vnode.children); + } + return vnode; + } + if (!!(process.env.NODE_ENV !== "production") && vnode.component) { + return vnode.component.subTree; + } + const { shapeFlag, children } = vnode; + if (children) { + if (shapeFlag & 16) { + return children[0]; + } + if (shapeFlag & 32 && isFunction(children.default)) { + return children.default(); + } + } +} +function setTransitionHooks(vnode, hooks) { + if (vnode.shapeFlag & 6 && vnode.component) { + vnode.transition = hooks; + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } +} +function getTransitionRawChildren(children, keepComment = false, parentKey) { + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); + } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; + } + } + return ret; +} + +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineComponent(options, extraOptions) { + return isFunction(options) ? ( + // #8236: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; +} + +function useId() { + const i = getCurrentInstance(); + if (i) { + return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++; + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1( + `useId() is called when there is no active component instance to be associated with.` + ); + } + return ""; +} +function markAsyncBoundary(instance) { + instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; +} + +const knownTemplateRefs = /* @__PURE__ */ new WeakSet(); +function useTemplateRef(key) { + const i = getCurrentInstance(); + const r = shallowRef(null); + if (i) { + const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs; + let desc; + if (!!(process.env.NODE_ENV !== "production") && (desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) { + warn$1(`useTemplateRef('${key}') already exists.`); + } else { + Object.defineProperty(refs, key, { + enumerable: true, + get: () => r.value, + set: (val) => r.value = val + }); + } + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1( + `useTemplateRef() is called when there is no active component instance to be associated with.` + ); + } + const ret = !!(process.env.NODE_ENV !== "production") ? readonly(r) : r; + if (!!(process.env.NODE_ENV !== "production")) { + knownTemplateRefs.add(ret); + } + return ret; +} + +function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { + if (isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) { + setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree); + } + return; + } + const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!!(process.env.NODE_ENV !== "production") && !owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + const rawSetupState = toRaw(setupState); + const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => { + if (!!(process.env.NODE_ENV !== "production")) { + if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) { + warn$1( + `Template ref "${key}" used on a non-ref value. It will not work in the production build.` + ); + } + if (knownTemplateRefs.has(rawSetupState[key])) { + return false; + } + } + return hasOwn(rawSetupState, key); + }; + if (oldRef != null && oldRef !== ref) { + if (isString(oldRef)) { + refs[oldRef] = null; + if (canSetSetupRef(oldRef)) { + setupState[oldRef] = null; + } + } else if (isRef(oldRef)) { + oldRef.value = null; + } + } + if (isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = isString(ref); + const _isRef = isRef(ref); + if (_isString || _isRef) { + const doSet = () => { + if (rawRef.f) { + const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + isArray(existing) && remove(existing, refValue); + } else { + if (!isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (canSetSetupRef(ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); + } + } + } else if (_isString) { + refs[ref] = value; + if (canSetSetupRef(ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) refs[rawRef.k] = value; + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + }; + if (value) { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } else { + doSet(); + } + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + } +} + +let hasLoggedMismatchError = false; +const logMismatchError = () => { + if (hasLoggedMismatchError) { + return; + } + console.error("Hydration completed but contains mismatches."); + hasLoggedMismatchError = true; +}; +const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; +const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); +const getContainerType = (container) => { + if (container.nodeType !== 1) return void 0; + if (isSVGContainer(container)) return "svg"; + if (isMathMLContainer(container)) return "mathml"; + return void 0; +}; +const isComment = (node) => node.nodeType === 8; +function createHydrationFunctions(rendererInternals) { + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment + } + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1( + `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` + ); + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; + } + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; + }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + optimized = optimized || !!vnode.dynamicChildren; + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + def(node, "__vnode", vnode, true); + def(node, "__vueParentComponent", parentComponent, true); + } + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { + (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1( + `Hydration text mismatch in`, + node.parentNode, + ` + - rendered on server: ${JSON.stringify( + node.data + )} + - expected on client: ${JSON.stringify(vnode.children)}` + ); + logMismatchError(); + node.data = vnode.children; + } + nextNode = nextSibling(node); + } + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 || domType === 3) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) { + warn$1("Invalid HostVNode type:", type, `(${typeof type})`); + } + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; + }; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + if (!!(process.env.NODE_ENV !== "production") || forcePatch || patchFlag !== -1) { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition( + null, + // no need check parentSuspense in hydration + transition + ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + let hasWarned = false; + while (next) { + if (!isMismatchAllowed(el, 1 /* CHILDREN */)) { + if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) { + warn$1( + `Hydration children mismatch on`, + el, + ` +Server rendered element contains more child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + let clientText = vnode.children; + if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) { + clientText = clientText.slice(1); + } + if (el.textContent !== clientText) { + if (!isMismatchAllowed(el, 0 /* TEXT */)) { + (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1( + `Hydration text content mismatch on`, + el, + ` + - rendered on server: ${el.textContent} + - expected on client: ${vnode.children}` + ); + logMismatchError(); + } + el.textContent = vnode.children; + } + } + if (props) { + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || !optimized || patchFlag & (16 | 32)) { + const isCustomElement = el.tagName.includes("-"); + for (const key in props) { + if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && // #11189 skip if this node has directives that have created hooks + // as it could have mutated the DOM in any possible way + !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) { + logMismatchError(); + } + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === "." || isCustomElement) { + patchProp(el, key, null, props[key], void 0, parentComponent); + } + } + } else if (props.onClick) { + patchProp( + el, + "onClick", + null, + props.onClick, + void 0, + parentComponent + ); + } else if (patchFlag & 4 && isReactive(props.style)) { + for (const key in props.style) props.style[key]; + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + } + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + let hasWarned = false; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + const isText = vnode.type === Text; + if (node) { + if (isText && !optimized) { + if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) { + insert( + createText( + node.data.slice(vnode.children.length) + ), + container, + nextSibling(node) + ); + node.data = vnode.children; + } + } + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (isText && !vnode.children) { + insert(vnode.el = createText(""), container); + } else { + if (!isMismatchAllowed(container, 1 /* CHILDREN */)) { + if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) { + warn$1( + `Hydration children mismatch on`, + container, + ` +Server rendered element contains fewer child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + } + } + return node; + }; + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); + } else { + logMismatchError(); + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) { + (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1( + `Hydration node mismatch: +- rendered on server:`, + node, + node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, + ` +- expected on client:`, + vnode.type + ); + logMismatchError(); + } + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; + } + } + } + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + if (parentComponent) { + parentComponent.vnode.el = vnode.el; + updateHOCHostEl(parentComponent, vnode.el); + } + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } + } + } + } + return node; + }; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 && node.tagName === "TEMPLATE"; + }; + return [hydrate, hydrateNode]; +} +function propHasMismatch(el, key, clientValue, vnode, instance) { + let mismatchType; + let mismatchKey; + let actual; + let expected; + if (key === "class") { + actual = el.getAttribute("class"); + expected = normalizeClass(clientValue); + if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { + mismatchType = 2 /* CLASS */; + mismatchKey = `class`; + } + } else if (key === "style") { + actual = el.getAttribute("style") || ""; + expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); + const actualMap = toStyleMap(actual); + const expectedMap = toStyleMap(expected); + if (vnode.dirs) { + for (const { dir, value } of vnode.dirs) { + if (dir.name === "show" && !value) { + expectedMap.set("display", "none"); + } + } + } + if (instance) { + resolveCssVars(instance, vnode, expectedMap); + } + if (!isMapEqual(actualMap, expectedMap)) { + mismatchType = 3 /* STYLE */; + mismatchKey = "style"; + } + } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { + if (isBooleanAttr(key)) { + actual = el.hasAttribute(key); + expected = includeBooleanAttr(clientValue); + } else if (clientValue == null) { + actual = el.hasAttribute(key); + expected = false; + } else { + if (el.hasAttribute(key)) { + actual = el.getAttribute(key); + } else if (key === "value" && el.tagName === "TEXTAREA") { + actual = el.value; + } else { + actual = false; + } + expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; + } + if (actual !== expected) { + mismatchType = 4 /* ATTRIBUTE */; + mismatchKey = key; + } + } + if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) { + const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; + const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`; + const postSegment = ` + - rendered on server: ${format(actual)} + - expected on client: ${format(expected)} + Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. + You should fix the source of the mismatch.`; + { + warn$1(preSegment, el, postSegment); + } + return true; + } + return false; +} +function toClassSet(str) { + return new Set(str.trim().split(/\s+/)); +} +function isSetEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const s of a) { + if (!b.has(s)) { + return false; + } + } + return true; +} +function toStyleMap(str) { + const styleMap = /* @__PURE__ */ new Map(); + for (const item of str.split(";")) { + let [key, value] = item.split(":"); + key = key.trim(); + value = value && value.trim(); + if (key && value) { + styleMap.set(key, value); + } + } + return styleMap; +} +function isMapEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const [key, value] of a) { + if (value !== b.get(key)) { + return false; + } + } + return true; +} +function resolveCssVars(instance, vnode, expectedMap) { + const root = instance.subTree; + if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) { + const cssVars = instance.getCssVars(); + for (const key in cssVars) { + expectedMap.set( + `--${getEscapedCssVarName(key, false)}`, + String(cssVars[key]) + ); + } + } + if (vnode === root && instance.parent) { + resolveCssVars(instance.parent, instance.vnode, expectedMap); + } +} +const allowMismatchAttr = "data-allow-mismatch"; +const MismatchTypeString = { + [0 /* TEXT */]: "text", + [1 /* CHILDREN */]: "children", + [2 /* CLASS */]: "class", + [3 /* STYLE */]: "style", + [4 /* ATTRIBUTE */]: "attribute" +}; +function isMismatchAllowed(el, allowedType) { + if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) { + while (el && !el.hasAttribute(allowMismatchAttr)) { + el = el.parentElement; + } + } + const allowedAttr = el && el.getAttribute(allowMismatchAttr); + if (allowedAttr == null) { + return false; + } else if (allowedAttr === "") { + return true; + } else { + const list = allowedAttr.split(","); + if (allowedType === 0 /* TEXT */ && list.includes("children")) { + return true; + } + return allowedAttr.split(",").includes(MismatchTypeString[allowedType]); + } +} + +const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1)); +const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id)); +const hydrateOnIdle = (timeout = 1e4) => (hydrate) => { + const id = requestIdleCallback(hydrate, { timeout }); + return () => cancelIdleCallback(id); +}; +function elementIsVisibleInViewport(el) { + const { top, left, bottom, right } = el.getBoundingClientRect(); + const { innerHeight, innerWidth } = window; + return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth); +} +const hydrateOnVisible = (opts) => (hydrate, forEach) => { + const ob = new IntersectionObserver((entries) => { + for (const e of entries) { + if (!e.isIntersecting) continue; + ob.disconnect(); + hydrate(); + break; + } + }, opts); + forEach((el) => { + if (!(el instanceof Element)) return; + if (elementIsVisibleInViewport(el)) { + hydrate(); + ob.disconnect(); + return false; + } + ob.observe(el); + }); + return () => ob.disconnect(); +}; +const hydrateOnMediaQuery = (query) => (hydrate) => { + if (query) { + const mql = matchMedia(query); + if (mql.matches) { + hydrate(); + } else { + mql.addEventListener("change", hydrate, { once: true }); + return () => mql.removeEventListener("change", hydrate); + } + } +}; +const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => { + if (isString(interactions)) interactions = [interactions]; + let hasHydrated = false; + const doHydrate = (e) => { + if (!hasHydrated) { + hasHydrated = true; + teardown(); + hydrate(); + e.target.dispatchEvent(new e.constructor(e.type, e)); + } + }; + const teardown = () => { + forEach((el) => { + for (const i of interactions) { + el.removeEventListener(i, doHydrate); + } + }); + }; + forEach((el) => { + for (const i of interactions) { + el.addEventListener(i, doHydrate, { once: true }); + } + }); + return teardown; +}; +function forEachElement(node, cb) { + if (isComment(node) && node.data === "[") { + let depth = 1; + let next = node.nextSibling; + while (next) { + if (next.nodeType === 1) { + const result = cb(next); + if (result === false) { + break; + } + } else if (isComment(next)) { + if (next.data === "]") { + if (--depth === 0) break; + } else if (next.data === "[") { + depth++; + } + } + next = next.nextSibling; + } + } else { + cb(node); + } +} + +const isAsyncWrapper = (i) => !!i.type.__asyncLoader; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineAsyncComponent(source) { + if (isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + hydrate: hydrateStrategy, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve, reject) => { + const userRetry = () => resolve(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (!!(process.env.NODE_ENV !== "production") && !comp) { + warn$1( + `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` + ); + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + if (!!(process.env.NODE_ENV !== "production") && comp && !isObject(comp) && !isFunction(comp)) { + throw new Error(`Invalid async component load result: ${comp}`); + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + __asyncHydrate(el, instance, hydrate) { + const doHydrate = hydrateStrategy ? () => { + const teardown = hydrateStrategy( + hydrate, + (cb) => forEachElement(el, cb) + ); + if (teardown) { + (instance.bum || (instance.bum = [])).push(teardown); + } + } : hydrate; + if (resolvedComp) { + doHydrate(); + } else { + load().then(() => !instance.isUnmounted && doHydrate()); + } + }, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + markAsyncBoundary(instance); + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { + pendingRequest = null; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || isInSSRComponentSetup) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = ref(false); + const error = ref(); + const delayed = ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.update(); + } + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); +} +function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; +} + +const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; +const KeepAliveImpl = { + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + if (!sharedContext.renderer) { + return () => { + const children = slots.default && slots.default(); + return children && children.length === 1 ? children[0] : children; + }; + } + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + instance.__v_cache = cache; + } + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + devtoolsComponentAdded(instance2); + } + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + invalidateMount(instance2.m); + invalidateMount(instance2.a); + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + devtoolsComponentAdded(instance2); + } + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && !filter(name)) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (cached && (!current || !isSameVNodeType(cached, current))) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + if (isSuspense(instance.subTree.type)) { + queuePostRenderEffect(() => { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + }, instance.subTree.suspense); + } else { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return current = null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`KeepAlive should contain exactly one component child.`); + } + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + if (vnode.type === Comment) { + current = null; + return vnode; + } + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + vnode.shapeFlag &= ~256; + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } +}; +const KeepAlive = KeepAliveImpl; +function matches(pattern, name) { + if (isArray(pattern)) { + return pattern.some((p) => matches(p, name)); + } else if (isString(pattern)) { + return pattern.split(",").includes(name); + } else if (isRegExp(pattern)) { + pattern.lastIndex = 0; + return pattern.test(name); + } + return false; +} +function onActivated(hook, target) { + registerKeepAliveHook(hook, "a", target); +} +function onDeactivated(hook, target) { + registerKeepAliveHook(hook, "da", target); +} +function registerKeepAliveHook(hook, type, target = currentInstance) { + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; + } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } +} +function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + remove(keepAliveRoot[type], injected); + }, target); +} +function resetShapeFlag(vnode) { + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; +} +function getInnerChild(vnode) { + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; +} + +function injectHook(type, hook, target = currentInstance, prepend = false) { + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); + } + return wrappedHook; + } else if (!!(process.env.NODE_ENV !== "production")) { + const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) + ); + } +} +const createHook = (lifecycle) => (hook, target = currentInstance) => { + if (!isInSSRComponentSetup || lifecycle === "sp") { + injectHook(lifecycle, (...args) => hook(...args), target); + } +}; +const onBeforeMount = createHook("bm"); +const onMounted = createHook("m"); +const onBeforeUpdate = createHook( + "bu" +); +const onUpdated = createHook("u"); +const onBeforeUnmount = createHook( + "bum" +); +const onUnmounted = createHook("um"); +const onServerPrefetch = createHook( + "sp" +); +const onRenderTriggered = createHook("rtg"); +const onRenderTracked = createHook("rtc"); +function onErrorCaptured(hook, target = currentInstance) { + injectHook("ec", hook, target); +} + +const COMPONENTS = "components"; +const DIRECTIVES = "directives"; +function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; +} +const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); +function resolveDynamicComponent(component) { + if (isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } +} +function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); +} +function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (!!(process.env.NODE_ENV !== "production") && warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1( + `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } +} +function resolve(registry, name) { + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); +} + +function renderList(source, renderItem, cache, index) { + let ret; + const cached = cache && cache[index]; + const sourceIsArray = isArray(source); + if (sourceIsArray || isString(source)) { + const sourceIsReactiveArray = sourceIsArray && isReactive(source); + let needsWrap = false; + if (sourceIsReactiveArray) { + needsWrap = !isShallow(source); + source = shallowReadArray(source); + } + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem( + needsWrap ? toReactive(source[i]) : source[i], + i, + void 0, + cached && cached[i] + ); + } + } else if (typeof source === "number") { + if (!!(process.env.NODE_ENV !== "production") && !Number.isInteger(source)) { + warn$1(`The v-for range expect an integer value but got ${source}.`); + } + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); + } + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } + } + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; +} + +function createSlots(slots, dynamicSlots) { + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) res.key = slot.key; + return res; + } : slot.fn; + } + } + return slots; +} + +function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) { + if (name !== "default") props.name = name; + return openBlock(), createBlock( + Fragment, + null, + [createVNode("slot", props, fallback && fallback())], + 64 + ); + } + let slot = slots[name]; + if (!!(process.env.NODE_ENV !== "production") && slot && slot.length > 1) { + warn$1( + `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` + ); + slot = () => []; + } + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key; + const rendered = createBlock( + Fragment, + { + key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content + (!validSlotContent && fallback ? "_fb" : "") + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; +} +function ensureValidVNode(vnodes) { + return vnodes.some((child) => { + if (!isVNode(child)) return true; + if (child.type === Comment) return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; +} + +function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + if (!!(process.env.NODE_ENV !== "production") && !isObject(obj)) { + warn$1(`v-on with no argument expects an object value.`); + return ret; + } + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; + } + return ret; +} + +const getPublicInstance = (i) => { + if (!i) return null; + if (isStatefulComponent(i)) return getComponentPublicInstance(i); + return getPublicInstance(i.parent); +}; +const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.props) : i.props, + $attrs: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.attrs) : i.attrs, + $slots: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.slots) : i.slots, + $refs: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.refs) : i.refs, + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $host: (i) => i.ce, + $emit: (i) => i.emit, + $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type, + $forceUpdate: (i) => i.f || (i.f = () => { + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP + }) +); +const isReservedPrefix = (key) => key === "_" || key === "$"; +const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); +const PublicInstanceProxyHandlers = { + get({ _: instance }, key) { + if (key === "__v_skip") { + return true; + } + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (!!(process.env.NODE_ENV !== "production") && key === "__isVue") { + return true; + } + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance.attrs, "get", ""); + !!(process.env.NODE_ENV !== "production") && markAttrsAccessed(); + } else if (!!(process.env.NODE_ENV !== "production") && key === "$slots") { + track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (!!(process.env.NODE_ENV !== "production") && currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (!!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); + return false; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + data[key] = value; + return true; + } else if (hasOwn(instance.props, key)) { + !!(process.env.NODE_ENV !== "production") && warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + !!(process.env.NODE_ENV !== "production") && warn$1( + `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` + ); + return false; + } else { + if (!!(process.env.NODE_ENV !== "production") && key in instance.appContext.config.globalProperties) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + value + }); + } else { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } +}; +if (!!(process.env.NODE_ENV !== "production") && true) { + PublicInstanceProxyHandlers.ownKeys = (target) => { + warn$1( + `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` + ); + return Reflect.ownKeys(target); + }; +} +const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, { + get(target, key) { + if (key === Symbol.unscopables) { + return; + } + return PublicInstanceProxyHandlers.get(target, key, target); + }, + has(_, key) { + const has = key[0] !== "_" && !isGloballyAllowed(key); + if (!!(process.env.NODE_ENV !== "production") && !has && PublicInstanceProxyHandlers.has(_, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} should not start with _ which is a reserved prefix for Vue internals.` + ); + } + return has; + } +}); +function createDevRenderContext(instance) { + const target = {}; + Object.defineProperty(target, `_`, { + configurable: true, + enumerable: false, + get: () => instance + }); + Object.keys(publicPropertiesMap).forEach((key) => { + Object.defineProperty(target, key, { + configurable: true, + enumerable: false, + get: () => publicPropertiesMap[key](instance), + // intercepted by the proxy so no need for implementation, + // but needed to prevent set errors + set: NOOP + }); + }); + return target; +} +function exposePropsOnRenderContext(instance) { + const { + ctx, + propsOptions: [propsOptions] + } = instance; + if (propsOptions) { + Object.keys(propsOptions).forEach((key) => { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => instance.props[key], + set: NOOP + }); + }); + } +} +function exposeSetupStateOnRenderContext(instance) { + const { ctx, setupState } = instance; + Object.keys(toRaw(setupState)).forEach((key) => { + if (!setupState.__isScriptSetup) { + if (isReservedPrefix(key[0])) { + warn$1( + `setup() return property ${JSON.stringify( + key + )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` + ); + return; + } + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => setupState[key], + set: NOOP + }); + } + }); +} + +const warnRuntimeUsage = (method) => warn$1( + `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` +); +function defineProps() { + if (!!(process.env.NODE_ENV !== "production")) { + warnRuntimeUsage(`defineProps`); + } + return null; +} +function defineEmits() { + if (!!(process.env.NODE_ENV !== "production")) { + warnRuntimeUsage(`defineEmits`); + } + return null; +} +function defineExpose(exposed) { + if (!!(process.env.NODE_ENV !== "production")) { + warnRuntimeUsage(`defineExpose`); + } +} +function defineOptions(options) { + if (!!(process.env.NODE_ENV !== "production")) { + warnRuntimeUsage(`defineOptions`); + } +} +function defineSlots() { + if (!!(process.env.NODE_ENV !== "production")) { + warnRuntimeUsage(`defineSlots`); + } + return null; +} +function defineModel() { + if (!!(process.env.NODE_ENV !== "production")) { + warnRuntimeUsage("defineModel"); + } +} +function withDefaults(props, defaults) { + if (!!(process.env.NODE_ENV !== "production")) { + warnRuntimeUsage(`withDefaults`); + } + return null; +} +function useSlots() { + return getContext().slots; +} +function useAttrs() { + return getContext().attrs; +} +function getContext() { + const i = getCurrentInstance(); + if (!!(process.env.NODE_ENV !== "production") && !i) { + warn$1(`useContext() called without active instance.`); + } + return i.setupContext || (i.setupContext = createSetupContext(i)); +} +function normalizePropsOrEmits(props) { + return isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; +} +function mergeDefaults(raw, defaults) { + const props = normalizePropsOrEmits(raw); + for (const key in defaults) { + if (key.startsWith("__skip")) continue; + let opt = props[key]; + if (opt) { + if (isArray(opt) || isFunction(opt)) { + opt = props[key] = { type: opt, default: defaults[key] }; + } else { + opt.default = defaults[key]; + } + } else if (opt === null) { + opt = props[key] = { default: defaults[key] }; + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`props default key "${key}" has no corresponding declaration.`); + } + if (opt && defaults[`__skip_${key}`]) { + opt.skipFactory = true; + } + } + return props; +} +function mergeModels(a, b) { + if (!a || !b) return a || b; + if (isArray(a) && isArray(b)) return a.concat(b); + return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); +} +function createPropsRestProxy(props, excludedKeys) { + const ret = {}; + for (const key in props) { + if (!excludedKeys.includes(key)) { + Object.defineProperty(ret, key, { + enumerable: true, + get: () => props[key] + }); + } + } + return ret; +} +function withAsyncContext(getAwaitable) { + const ctx = getCurrentInstance(); + if (!!(process.env.NODE_ENV !== "production") && !ctx) { + warn$1( + `withAsyncContext called without active current instance. This is likely a bug.` + ); + } + let awaitable = getAwaitable(); + unsetCurrentInstance(); + if (isPromise(awaitable)) { + awaitable = awaitable.catch((e) => { + setCurrentInstance(ctx); + throw e; + }); + } + return [awaitable, () => setCurrentInstance(ctx)]; +} + +function createDuplicateChecker() { + const cache = /* @__PURE__ */ Object.create(null); + return (type, key) => { + if (cache[key]) { + warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); + } else { + cache[key] = type; + } + }; +} +let shouldCacheAccess = true; +function applyOptions(instance) { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook(options.beforeCreate, instance, "bc"); + } + const { + // state + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, + // lifecycle + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, + // public API + expose, + inheritAttrs, + // assets + components, + directives, + filters + } = options; + const checkDuplicateProperties = !!(process.env.NODE_ENV !== "production") ? createDuplicateChecker() : null; + if (!!(process.env.NODE_ENV !== "production")) { + const [propsOptions] = instance.propsOptions; + if (propsOptions) { + for (const key in propsOptions) { + checkDuplicateProperties("Props" /* PROPS */, key); + } + } + } + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (isFunction(methodHandler)) { + if (!!(process.env.NODE_ENV !== "production")) { + Object.defineProperty(ctx, key, { + value: methodHandler.bind(publicThis), + configurable: true, + enumerable: true, + writable: true + }); + } else { + ctx[key] = methodHandler.bind(publicThis); + } + if (!!(process.env.NODE_ENV !== "production")) { + checkDuplicateProperties("Methods" /* METHODS */, key); + } + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1( + `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` + ); + } + } + } + if (dataOptions) { + if (!!(process.env.NODE_ENV !== "production") && !isFunction(dataOptions)) { + warn$1( + `The data option must be a function. Plain object usage is no longer supported.` + ); + } + const data = dataOptions.call(publicThis, publicThis); + if (!!(process.env.NODE_ENV !== "production") && isPromise(data)) { + warn$1( + `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` + ); + } + if (!isObject(data)) { + !!(process.env.NODE_ENV !== "production") && warn$1(`data() should return an object.`); + } else { + instance.data = reactive(data); + if (!!(process.env.NODE_ENV !== "production")) { + for (const key in data) { + checkDuplicateProperties("Data" /* DATA */, key); + if (!isReservedPrefix(key[0])) { + Object.defineProperty(ctx, key, { + configurable: true, + enumerable: true, + get: () => data[key], + set: NOOP + }); + } + } + } + } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + if (!!(process.env.NODE_ENV !== "production") && get === NOOP) { + warn$1(`Computed property "${key}" has no getter.`); + } + const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : !!(process.env.NODE_ENV !== "production") ? () => { + warn$1( + `Write operation failed: computed property "${key}" is readonly.` + ); + } : NOOP; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + if (!!(process.env.NODE_ENV !== "production")) { + checkDuplicateProperties("Computed" /* COMPUTED */, key); + } + } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val + }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; + } + } + if (render && instance.render === NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) instance.components = components; + if (directives) instance.directives = directives; + if (serverPrefetch) { + markAsyncBoundary(instance); + } +} +function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { + if (isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); + } + if (isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; + } + if (!!(process.env.NODE_ENV !== "production")) { + checkDuplicateProperties("Inject" /* INJECT */, key); + } + } +} +function callHook(hook, instance, type) { + callWithAsyncErrorHandling( + isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); +} +function createWatcher(raw, ctx, publicThis, key) { + let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (isString(raw)) { + const handler = ctx[raw]; + if (isFunction(handler)) { + { + watch(getter, handler); + } + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`Invalid watch handler specified by key "${raw}"`, handler); + } + } else if (isFunction(raw)) { + { + watch(getter, raw.bind(publicThis)); + } + } else if (isObject(raw)) { + if (isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (isFunction(handler)) { + watch(getter, handler, raw); + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); + } + } + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`Invalid watch option: "${key}"`, raw); + } +} +function resolveMergedOptions(instance) { + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; + } + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); + } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (isObject(base)) { + cache.set(base, resolved); + } + return resolved; +} +function mergeOptions(to, from, strats, asMixin = false) { + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") { + !!(process.env.NODE_ENV !== "production") && warn$1( + `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` + ); + } else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; + } + } + return to; +} +const internalOptionMergeStrats = { + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray, + created: mergeAsArray, + beforeMount: mergeAsArray, + mounted: mergeAsArray, + beforeUpdate: mergeAsArray, + updated: mergeAsArray, + beforeDestroy: mergeAsArray, + beforeUnmount: mergeAsArray, + destroyed: mergeAsArray, + unmounted: mergeAsArray, + activated: mergeAsArray, + deactivated: mergeAsArray, + errorCaptured: mergeAsArray, + serverPrefetch: mergeAsArray, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject +}; +function mergeDataFn(to, from) { + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (extend)( + isFunction(to) ? to.call(this, this) : to, + isFunction(from) ? from.call(this, this) : from + ); + }; +} +function mergeInject(to, from) { + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); +} +function normalizeInject(raw) { + if (isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; + } + return res; + } + return raw; +} +function mergeAsArray(to, from) { + return to ? [...new Set([].concat(to, from))] : from; +} +function mergeObjectOptions(to, from) { + return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; +} +function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (isArray(to) && isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } +} +function mergeWatchOptions(to, from) { + if (!to) return from; + if (!from) return to; + const merged = extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray(to[key], from[key]); + } + return merged; +} + +function createAppContext() { + return { + app: null, + config: { + isNativeTag: NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; +} +let uid$1 = 0; +function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!isFunction(rootComponent)) { + rootComponent = extend({}, rootComponent); + } + if (rootProps != null && !isObject(rootProps)) { + !!(process.env.NODE_ENV !== "production") && warn$1(`root props passed to app.mount() must be an object.`); + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + const pluginCleanupFns = []; + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + if (!!(process.env.NODE_ENV !== "production")) { + warn$1( + `app.config cannot be replaced. Modify individual options instead.` + ); + } + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) { + !!(process.env.NODE_ENV !== "production") && warn$1(`Plugin has already been applied to target app.`); + } else if (plugin && isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1( + `A plugin must either be a function or an object with an "install" function.` + ); + } + return app; + }, + mixin(mixin) { + if (__VUE_OPTIONS_API__) { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1( + "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") + ); + } + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1("Mixins are only available in builds supporting Options API"); + } + return app; + }, + component(name, component) { + if (!!(process.env.NODE_ENV !== "production")) { + validateComponentName(name, context.config); + } + if (!component) { + return context.components[name]; + } + if (!!(process.env.NODE_ENV !== "production") && context.components[name]) { + warn$1(`Component "${name}" has already been registered in target app.`); + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + if (!!(process.env.NODE_ENV !== "production")) { + validateDirectiveName(name); + } + if (!directive) { + return context.directives[name]; + } + if (!!(process.env.NODE_ENV !== "production") && context.directives[name]) { + warn$1(`Directive "${name}" has already been registered in target app.`); + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + if (!!(process.env.NODE_ENV !== "production") && rootContainer.__vue_app__) { + warn$1( + `There is already an app instance mounted on the host container. + If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` + ); + } + const vnode = app._ceVNode || createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + if (!!(process.env.NODE_ENV !== "production")) { + context.reload = () => { + render( + cloneVNode(vnode), + rootContainer, + namespace + ); + }; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + app._instance = vnode.component; + devtoolsInitApp(app, version); + } + return getComponentPublicInstance(vnode.component); + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1( + `App has already been mounted. +If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` + ); + } + }, + onUnmount(cleanupFn) { + if (!!(process.env.NODE_ENV !== "production") && typeof cleanupFn !== "function") { + warn$1( + `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}` + ); + } + pluginCleanupFns.push(cleanupFn); + }, + unmount() { + if (isMounted) { + callWithAsyncErrorHandling( + pluginCleanupFns, + app._instance, + 16 + ); + render(null, app._container); + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + app._instance = null; + devtoolsUnmountApp(app); + } + delete app._container.__vue_app__; + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`Cannot unmount an app that is not mounted.`); + } + }, + provide(key, value) { + if (!!(process.env.NODE_ENV !== "production") && key in context.provides) { + warn$1( + `App already provides property with key "${String(key)}". It will be overwritten with the new value.` + ); + } + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + const lastApp = currentApp; + currentApp = app; + try { + return fn(); + } finally { + currentApp = lastApp; + } + } + }; + return app; + }; +} +let currentApp = null; + +function provide(key, value) { + if (!currentInstance) { + if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`provide() can only be used inside setup().`); + } + } else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); + } + provides[key] = value; + } +} +function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`injection "${String(key)}" not found.`); + } + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`inject() can only be used inside setup() or functional components.`); + } +} +function hasInjectionContext() { + return !!(currentInstance || currentRenderingInstance || currentApp); +} + +const internalObjectProto = {}; +const createInternalObject = () => Object.create(internalObjectProto); +const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; + +function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = createInternalObject(); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + if (!!(process.env.NODE_ENV !== "production")) { + validateProps(rawProps || {}, props, instance); + } + if (isStateful) { + instance.props = isSSR ? props : shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; +} +function isInHmrContext(instance) { + while (instance) { + if (instance.type.__hmrId) return true; + instance = instance.parent; + } +} +function updateProps(instance, rawProps, rawPrevProps, optimized) { + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( + // always force full diff in dev + // - #1942 if hmr is enabled with sfc component + // - vite#872 non-sfc component used by sfc component + !(!!(process.env.NODE_ENV !== "production") && isInHmrContext(instance)) && (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; + } + const value = rawProps[key]; + if (options) { + if (hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; + } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; + } + } + } + } + if (hasAttrsChanged) { + trigger(instance.attrs, "set", ""); + } + if (!!(process.env.NODE_ENV !== "production")) { + validateProps(rawProps || {}, props, instance); + } +} +function setFullProps(instance, rawProps, props, attrs) { + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && hasOwn(options, camelKey = camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; + } + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + if (needCastKeys) { + const rawCurrentProps = toRaw(props); + const castValues = rawCastValues || EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; +} +function resolvePropValue(options, props, key, value, instance, isAbsent) { + const opt = options[key]; + if (opt != null) { + const hasDefault = hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); + } + } else { + value = defaultValue; + } + if (instance.ce) { + instance.ce._setProp(key, value); + } + } + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { + value = true; + } + } + } + return value; +} +const mixinPropsCache = /* @__PURE__ */ new WeakMap(); +function normalizePropsOptions(comp, appContext, asMixin = false) { + const cache = __VUE_OPTIONS_API__ && asMixin ? mixinPropsCache : appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (__VUE_OPTIONS_API__ && !isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + extend(normalized, props); + if (keys) needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); + } + if (comp.extends) { + extendProps(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendProps); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, EMPTY_ARR); + } + return EMPTY_ARR; + } + if (isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + if (!!(process.env.NODE_ENV !== "production") && !isString(raw[i])) { + warn$1(`props must be strings when using array syntax.`, raw[i]); + } + const normalizedKey = camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = EMPTY_OBJ; + } + } + } else if (raw) { + if (!!(process.env.NODE_ENV !== "production") && !isObject(raw)) { + warn$1(`invalid props options`, raw); + } + for (const key in raw) { + const normalizedKey = camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); + const propType = prop.type; + let shouldCast = false; + let shouldCastTrue = true; + if (isArray(propType)) { + for (let index = 0; index < propType.length; ++index) { + const type = propType[index]; + const typeName = isFunction(type) && type.name; + if (typeName === "Boolean") { + shouldCast = true; + break; + } else if (typeName === "String") { + shouldCastTrue = false; + } + } + } else { + shouldCast = isFunction(propType) && propType.name === "Boolean"; + } + prop[0 /* shouldCast */] = shouldCast; + prop[1 /* shouldCastTrue */] = shouldCastTrue; + if (shouldCast || hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + const res = [normalized, needCastKeys]; + if (isObject(comp)) { + cache.set(comp, res); + } + return res; +} +function validatePropName(key) { + if (key[0] !== "$" && !isReservedProp(key)) { + return true; + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`Invalid prop name: "${key}" is a reserved property.`); + } + return false; +} +function getType(ctor) { + if (ctor === null) { + return "null"; + } + if (typeof ctor === "function") { + return ctor.name || ""; + } else if (typeof ctor === "object") { + const name = ctor.constructor && ctor.constructor.name; + return name || ""; + } + return ""; +} +function validateProps(rawProps, props, instance) { + const resolvedValues = toRaw(props); + const options = instance.propsOptions[0]; + const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key)); + for (const key in options) { + let opt = options[key]; + if (opt == null) continue; + validateProp( + key, + resolvedValues[key], + opt, + !!(process.env.NODE_ENV !== "production") ? shallowReadonly(resolvedValues) : resolvedValues, + !camelizePropsKey.includes(key) + ); + } +} +function validateProp(name, value, prop, props, isAbsent) { + const { type, required, validator, skipCheck } = prop; + if (required && isAbsent) { + warn$1('Missing required prop: "' + name + '"'); + return; + } + if (value == null && !required) { + return; + } + if (type != null && type !== true && !skipCheck) { + let isValid = false; + const types = isArray(type) ? type : [type]; + const expectedTypes = []; + for (let i = 0; i < types.length && !isValid; i++) { + const { valid, expectedType } = assertType(value, types[i]); + expectedTypes.push(expectedType || ""); + isValid = valid; + } + if (!isValid) { + warn$1(getInvalidTypeMessage(name, value, expectedTypes)); + return; + } + } + if (validator && !validator(value, props)) { + warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + } +} +const isSimpleType = /* @__PURE__ */ makeMap( + "String,Number,Boolean,Function,Symbol,BigInt" +); +function assertType(value, type) { + let valid; + const expectedType = getType(type); + if (expectedType === "null") { + valid = value === null; + } else if (isSimpleType(expectedType)) { + const t = typeof value; + valid = t === expectedType.toLowerCase(); + if (!valid && t === "object") { + valid = value instanceof type; + } + } else if (expectedType === "Object") { + valid = isObject(value); + } else if (expectedType === "Array") { + valid = isArray(value); + } else { + valid = value instanceof type; + } + return { + valid, + expectedType + }; +} +function getInvalidTypeMessage(name, value, expectedTypes) { + if (expectedTypes.length === 0) { + return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; + } + let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; + const expectedType = expectedTypes[0]; + const receivedType = toRawType(value); + const expectedValue = styleValue(value, expectedType); + const receivedValue = styleValue(value, receivedType); + if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { + message += ` with value ${expectedValue}`; + } + message += `, got ${receivedType} `; + if (isExplicable(receivedType)) { + message += `with value ${receivedValue}.`; + } + return message; +} +function styleValue(value, type) { + if (type === "String") { + return `"${value}"`; + } else if (type === "Number") { + return `${Number(value)}`; + } else { + return `${value}`; + } +} +function isExplicable(type) { + const explicitTypes = ["string", "number", "boolean"]; + return explicitTypes.some((elem) => type.toLowerCase() === elem); +} +function isBoolean(...args) { + return args.some((elem) => elem.toLowerCase() === "boolean"); +} + +const isInternalKey = (key) => key[0] === "_" || key === "$stable"; +const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; +const normalizeSlot = (key, rawSlot, ctx) => { + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (!!(process.env.NODE_ENV !== "production") && currentInstance && (!ctx || ctx.root === currentInstance.root)) { + warn$1( + `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` + ); + } + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; +}; +const normalizeObjectSlots = (rawSlots, slots, instance) => { + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) continue; + const value = rawSlots[key]; + if (isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + if (!!(process.env.NODE_ENV !== "production") && true) { + warn$1( + `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; + } + } +}; +const normalizeVNodeSlots = (instance, children) => { + if (!!(process.env.NODE_ENV !== "production") && !isKeepAlive(instance.vnode) && true) { + warn$1( + `Non-function value encountered for default slot. Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; +}; +const assignSlots = (slots, children, optimized) => { + for (const key in children) { + if (optimized || key !== "_") { + slots[key] = children[key]; + } + } +}; +const initSlots = (instance, children, optimized) => { + const slots = instance.slots = createInternalObject(); + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + assignSlots(slots, children, optimized); + if (optimized) { + def(slots, "_", type, true); + } + } else { + normalizeObjectSlots(children, slots); + } + } else if (children) { + normalizeVNodeSlots(instance, children); + } +}; +const updateSlots = (instance, children, optimized) => { + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) { + assignSlots(slots, children, optimized); + trigger(instance, "set", "$slots"); + } else if (optimized && type === 1) { + needDeletionCheck = false; + } else { + assignSlots(slots, children, optimized); + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); + } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } + } + } +}; + +let supported; +let perf; +function startMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + perf.mark(`vue-${type}-${instance.uid}`); + } + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); + } +} +function endMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + const startTag = `vue-${type}-${instance.uid}`; + const endTag = startTag + `:end`; + perf.mark(endTag); + perf.measure( + `<${formatComponentName(instance, instance.type)}> ${type}`, + startTag, + endTag + ); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + } + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); + } +} +function isSupported() { + if (supported !== void 0) { + return supported; + } + if (typeof window !== "undefined" && window.performance) { + supported = true; + perf = window.performance; + } else { + supported = false; + } + return supported; +} + +function initFeatureFlags() { + const needWarn = []; + if (typeof __VUE_OPTIONS_API__ !== "boolean") { + !!(process.env.NODE_ENV !== "production") && needWarn.push(`__VUE_OPTIONS_API__`); + getGlobalThis().__VUE_OPTIONS_API__ = true; + } + if (typeof __VUE_PROD_DEVTOOLS__ !== "boolean") { + !!(process.env.NODE_ENV !== "production") && needWarn.push(`__VUE_PROD_DEVTOOLS__`); + getGlobalThis().__VUE_PROD_DEVTOOLS__ = false; + } + if (typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ !== "boolean") { + !!(process.env.NODE_ENV !== "production") && needWarn.push(`__VUE_PROD_HYDRATION_MISMATCH_DETAILS__`); + getGlobalThis().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false; + } + if (!!(process.env.NODE_ENV !== "production") && needWarn.length) { + const multi = needWarn.length > 1; + console.warn( + `Feature flag${multi ? `s` : ``} ${needWarn.join(", ")} ${multi ? `are` : `is`} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle. + +For more details, see https://link.vuejs.org/feature-flags.` + ); + } +} + +const queuePostRenderEffect = queueEffectWithSuspense ; +function createRenderer(options) { + return baseCreateRenderer(options); +} +function createHydrationRenderer(options) { + return baseCreateRenderer(options, createHydrationFunctions); +} +function baseCreateRenderer(options, createHydrationFns) { + { + initFeatureFlags(); + } + const target = getGlobalThis(); + target.__VUE__ = true; + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + } + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!(process.env.NODE_ENV !== "production") && isHmrUpdating ? false : !!n2.dynamicChildren) => { + if (n1 === n2) { + return; + } + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: + if (n1 == null) { + mountStaticNode(n2, container, anchor, namespace); + } else if (!!(process.env.NODE_ENV !== "production")) { + patchStaticNode(n1, n2, container, namespace); + } + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1("Invalid VNode type:", type, `(${typeof type})`); + } + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const patchStaticNode = (n1, n2, container, namespace) => { + if (n2.children !== n1.children) { + const anchor = hostNextSibling(n1.anchor); + removeStaticNode(n1); + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace + ); + } else { + n2.el = n1.el; + n2.anchor = n1.anchor; + } + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !isReservedProp(key)) { + hostPatchProp(el, key, null, props[key], namespace, parentComponent); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + def(el, "__vnode", vnode, true); + def(el, "__vueParentComponent", parentComponent, true); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (!!(process.env.NODE_ENV !== "production") && subTree.patchFlag > 0 && subTree.patchFlag & 2048) { + subTree = filterSingleRoot(subTree.children) || subTree; + } + if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + el.__vnode = n2; + } + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || EMPTY_OBJ; + const newProps = n2.props || EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { + hostSetElementText(el, ""); + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + if (!!(process.env.NODE_ENV !== "production")) { + traverseStaticChildren(n1, n2); + } + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + } + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); + } + } + } else if (!optimized && dynamicChildren == null) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== EMPTY_OBJ) { + for (const key in oldProps) { + if (!isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + parentComponent + ); + } + } + } + for (const key in newProps) { + if (isReservedProp(key)) continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if (!!(process.env.NODE_ENV !== "production") && // #5523 dev root fragment may inherit directives + (isHmrUpdating || patchFlag & 2048)) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + if (!!(process.env.NODE_ENV !== "production")) { + traverseStaticChildren(n1, n2); + } else if ( + // #2080 if the stable fragment has a key, it's a <template v-for> that may + // get moved around. Make sure all root level vnodes inherit el. + // #2134 or if it's a component root, it may also get moved around + // as the component is being moved. + n2.key != null || parentComponent && n2 === parentComponent.subTree + ) { + traverseStaticChildren( + n1, + n2, + true + /* shallow */ + ); + } + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance( + initialVNode, + parentComponent, + parentSuspense + )); + if (!!(process.env.NODE_ENV !== "production") && instance.type.__hmrId) { + registerHMR(instance); + } + if (!!(process.env.NODE_ENV !== "production")) { + pushWarningContext(initialVNode); + startMeasure(instance, `mount`); + } + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } + { + if (!!(process.env.NODE_ENV !== "production")) { + startMeasure(instance, `init`); + } + setupComponent(instance, false, optimized); + if (!!(process.env.NODE_ENV !== "production")) { + endMeasure(instance, `init`); + } + } + if (instance.asyncDep) { + if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) initialVNode.el = null; + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); + } + if (!!(process.env.NODE_ENV !== "production")) { + popWarningContext(); + endMeasure(instance, `mount`); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + if (!!(process.env.NODE_ENV !== "production")) { + pushWarningContext(n2); + } + updateComponentPreRender(instance, n2, optimized); + if (!!(process.env.NODE_ENV !== "production")) { + popWarningContext(); + } + return; + } else { + instance.next = n2; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { + let vnodeHook; + const { el, props } = initialVNode; + const { bm, m, parent, root, type } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + invokeArrayFns(bm); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); + } + toggleRecurse(instance, true); + if (el && hydrateNode) { + const hydrateSubTree = () => { + if (!!(process.env.NODE_ENV !== "production")) { + startMeasure(instance, `render`); + } + instance.subTree = renderComponentRoot(instance); + if (!!(process.env.NODE_ENV !== "production")) { + endMeasure(instance, `render`); + } + if (!!(process.env.NODE_ENV !== "production")) { + startMeasure(instance, `hydrate`); + } + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + if (!!(process.env.NODE_ENV !== "production")) { + endMeasure(instance, `hydrate`); + } + }; + if (isAsyncWrapperVNode && type.__asyncHydrate) { + type.__asyncHydrate( + el, + instance, + hydrateSubTree + ); + } else { + hydrateSubTree(); + } + } else { + if (root.ce) { + root.ce._injectChildStyle(type); + } + if (!!(process.env.NODE_ENV !== "production")) { + startMeasure(instance, `render`); + } + const subTree = instance.subTree = renderComponentRoot(instance); + if (!!(process.env.NODE_ENV !== "production")) { + endMeasure(instance, `render`); + } + if (!!(process.env.NODE_ENV !== "production")) { + startMeasure(instance, `patch`); + } + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + if (!!(process.env.NODE_ENV !== "production")) { + endMeasure(instance, `patch`); + } + initialVNode.el = subTree.el; + } + if (m) { + queuePostRenderEffect(m, parentSuspense); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); + } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); + } + instance.isMounted = true; + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + devtoolsComponentAdded(instance); + } + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); + return; + } + } + let originNext = next; + let vnodeHook; + if (!!(process.env.NODE_ENV !== "production")) { + pushWarningContext(next || instance.vnode); + } + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; + } + if (bu) { + invokeArrayFns(bu); + } + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); + } + toggleRecurse(instance, true); + if (!!(process.env.NODE_ENV !== "production")) { + startMeasure(instance, `render`); + } + const nextTree = renderComponentRoot(instance); + if (!!(process.env.NODE_ENV !== "production")) { + endMeasure(instance, `render`); + } + const prevTree = instance.subTree; + instance.subTree = nextTree; + if (!!(process.env.NODE_ENV !== "production")) { + startMeasure(instance, `patch`); + } + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + if (!!(process.env.NODE_ENV !== "production")) { + endMeasure(instance, `patch`); + } + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); + } + if (u) { + queuePostRenderEffect(u, parentSuspense); + } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); + } + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + devtoolsComponentUpdated(instance); + } + if (!!(process.env.NODE_ENV !== "production")) { + popWarningContext(); + } + } + }; + instance.scope.on(); + const effect = instance.effect = new ReactiveEffect(componentUpdateFn); + instance.scope.off(); + const update = instance.update = effect.run.bind(effect); + const job = instance.job = effect.runIfDirty.bind(effect); + job.i = instance; + job.id = instance.uid; + effect.scheduler = () => queueJob(job); + toggleRecurse(instance, true); + if (!!(process.env.NODE_ENV !== "production")) { + effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; + effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; + } + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + pauseTracking(); + flushPreFlushCbs(instance); + resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || EMPTY_ARR; + c2 = c2 || EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (nextChild.key != null) { + if (!!(process.env.NODE_ENV !== "production") && keyToNewIndexMap.has(nextChild.key)) { + warn$1( + `Duplicate keys found during update:`, + JSON.stringify(nextChild.key), + `Make sure keys are unique.` + ); + } + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs, + cacheIndex + } = vnode; + if (patchFlag === -2) { + optimized = false; + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (cacheIndex != null) { + parentComponent.renderCache[cacheIndex] = void 0; + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + internals, + doRemove + ); + } else if (dynamicChildren && // #5154 + // when v-once is used inside a block, setBlockTracking(-1) marks the + // parent block with hasOnce: true + // so that it doesn't take the fast path during unmount - otherwise + // components nested in v-once are never unmounted. + !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + if (!!(process.env.NODE_ENV !== "production") && vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { + vnode.children.forEach((child) => { + if (child.type === Comment) { + hostRemove(child.el); + } else { + remove(child); + } + }); + } else { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } + }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + if (!!(process.env.NODE_ENV !== "production") && instance.type.__hmrId) { + unregisterHMR(instance); + } + const { bum, scope, job, subTree, um, m, a } = instance; + invalidateMount(m); + invalidateMount(a); + if (bum) { + invokeArrayFns(bum); + } + scope.stop(); + if (job) { + job.flags |= 8; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + devtoolsComponentRemoved(instance); + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + const el = hostNextSibling(vnode.anchor || vnode.el); + const teleportEnd = el && el[TeleportEndKey]; + return teleportEnd ? hostNextSibling(teleportEnd) : el; + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + container._vnode = vnode; + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + if (createHydrationFns) { + [hydrate, hydrateNode] = createHydrationFns( + internals + ); + } + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; +} +function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; +} +function toggleRecurse({ effect, job }, allowed) { + if (allowed) { + effect.flags |= 32; + job.flags |= 4; + } else { + effect.flags &= ~32; + job.flags &= ~4; + } +} +function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; +} +function traverseStaticChildren(n1, n2, shallow = false) { + const ch1 = n1.children; + const ch2 = n2.children; + if (isArray(ch1) && isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; + } + if (!shallow && c2.patchFlag !== -2) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } + if (!!(process.env.NODE_ENV !== "production") && c2.type === Comment && !c2.el) { + c2.el = c1.el; + } + } + } +} +function getSequence(arr) { + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; + } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } + } + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; +} +function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); + } + } +} +function invalidateMount(hooks) { + if (hooks) { + for (let i = 0; i < hooks.length; i++) + hooks[i].flags |= 8; + } +} + +const ssrContextKey = Symbol.for("v-scx"); +const useSSRContext = () => { + { + const ctx = inject(ssrContextKey); + if (!ctx) { + !!(process.env.NODE_ENV !== "production") && warn$1( + `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` + ); + } + return ctx; + } +}; + +function watchEffect(effect, options) { + return doWatch(effect, null, options); +} +function watchPostEffect(effect, options) { + return doWatch( + effect, + null, + !!(process.env.NODE_ENV !== "production") ? extend({}, options, { flush: "post" }) : { flush: "post" } + ); +} +function watchSyncEffect(effect, options) { + return doWatch( + effect, + null, + !!(process.env.NODE_ENV !== "production") ? extend({}, options, { flush: "sync" }) : { flush: "sync" } + ); +} +function watch(source, cb, options) { + if (!!(process.env.NODE_ENV !== "production") && !isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); +} +function doWatch(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, flush, once } = options; + if (!!(process.env.NODE_ENV !== "production") && !cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + } + const baseWatchOptions = extend({}, options); + if (!!(process.env.NODE_ENV !== "production")) baseWatchOptions.onWarn = warn$1; + const runsImmediately = cb && immediate || !cb && flush !== "post"; + let ssrCleanup; + if (isInSSRComponentSetup) { + if (flush === "sync") { + const ctx = useSSRContext(); + ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); + } else if (!runsImmediately) { + const watchStopHandle = () => { + }; + watchStopHandle.stop = NOOP; + watchStopHandle.resume = NOOP; + watchStopHandle.pause = NOOP; + return watchStopHandle; + } + } + const instance = currentInstance; + baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args); + let isPre = false; + if (flush === "post") { + baseWatchOptions.scheduler = (job) => { + queuePostRenderEffect(job, instance && instance.suspense); + }; + } else if (flush !== "sync") { + isPre = true; + baseWatchOptions.scheduler = (job, isFirstRun) => { + if (isFirstRun) { + job(); + } else { + queueJob(job); + } + }; + } + baseWatchOptions.augmentJob = (job) => { + if (cb) { + job.flags |= 4; + } + if (isPre) { + job.flags |= 2; + if (instance) { + job.id = instance.uid; + job.i = instance; + } + } + }; + const watchHandle = watch$1(source, cb, baseWatchOptions); + if (isInSSRComponentSetup) { + if (ssrCleanup) { + ssrCleanup.push(watchHandle); + } else if (runsImmediately) { + watchHandle(); + } + } + return watchHandle; +} +function instanceWatch(source, value, options) { + const publicThis = this.proxy; + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; +} +function createPathGetter(ctx, path) { + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; +} + +function useModel(props, name, options = EMPTY_OBJ) { + const i = getCurrentInstance(); + if (!!(process.env.NODE_ENV !== "production") && !i) { + warn$1(`useModel() called without active instance.`); + return ref(); + } + const camelizedName = camelize(name); + if (!!(process.env.NODE_ENV !== "production") && !i.propsOptions[0][camelizedName]) { + warn$1(`useModel() called with prop "${name}" which is not declared.`); + return ref(); + } + const hyphenatedName = hyphenate(name); + const modifiers = getModelModifiers(props, camelizedName); + const res = customRef((track, trigger) => { + let localValue; + let prevSetValue = EMPTY_OBJ; + let prevEmittedValue; + watchSyncEffect(() => { + const propValue = props[camelizedName]; + if (hasChanged(localValue, propValue)) { + localValue = propValue; + trigger(); + } + }); + return { + get() { + track(); + return options.get ? options.get(localValue) : localValue; + }, + set(value) { + const emittedValue = options.set ? options.set(value) : value; + if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) { + return; + } + const rawProps = i.vnode.props; + if (!(rawProps && // check if parent has passed v-model + (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) { + localValue = value; + trigger(); + } + i.emit(`update:${name}`, emittedValue); + if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) { + trigger(); + } + prevSetValue = value; + prevEmittedValue = emittedValue; + } + }; + }); + res[Symbol.iterator] = () => { + let i2 = 0; + return { + next() { + if (i2 < 2) { + return { value: i2++ ? modifiers || EMPTY_OBJ : res, done: false }; + } else { + return { done: true }; + } + } + }; + }; + return res; +} +const getModelModifiers = (props, modelName) => { + return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`]; +}; + +function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) return; + const props = instance.vnode.props || EMPTY_OBJ; + if (!!(process.env.NODE_ENV !== "production")) { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.` + ); + } + } else { + const validator = emitsOptions[event]; + if (isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } + } + } + } + } + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modifiers = isModelListener && getModelModifiers(props, event.slice(7)); + if (modifiers) { + if (modifiers.trim) { + args = rawArgs.map((a) => isString(a) ? a.trim() : a); + } + if (modifiers.number) { + args = rawArgs.map(looseToNumber); + } + } + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + devtoolsComponentEmit(instance, event, args); + } + if (!!(process.env.NODE_ENV !== "production")) { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( + event + )}" instead of "${event}".` + ); + } + } + let handlerName; + let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; + } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } +} +function normalizeEmitsOptions(comp, appContext, asMixin = false) { + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (__VUE_OPTIONS_API__ && !isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); + } + if (comp.extends) { + extendEmits(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendEmits); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); + } + return null; + } + if (isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { + cache.set(comp, normalized); + } + return normalized; +} +function isEmitListener(options, key) { + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); +} + +let accessedAttrs = false; +function markAttrsAccessed() { + accessedAttrs = true; +} +function renderComponentRoot(instance) { + const { + type: Component, + vnode, + proxy, + withProxy, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + props, + data, + setupState, + ctx, + inheritAttrs + } = instance; + const prev = setCurrentRenderingInstance(instance); + let result; + let fallthroughAttrs; + if (!!(process.env.NODE_ENV !== "production")) { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = !!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); + } + }) : proxyToUse; + result = normalizeVNode( + render.call( + thisProxy, + proxyToUse, + renderCache, + !!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (!!(process.env.NODE_ENV !== "production") && attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode( + render2.length > 1 ? render2( + !!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props, + !!(process.env.NODE_ENV !== "production") ? { + get attrs() { + markAttrsAccessed(); + return shallowReadonly(attrs); + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + !!(process.env.NODE_ENV !== "production") ? shallowReadonly(props) : props, + null + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (!!(process.env.NODE_ENV !== "production") && result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs, false, true); + } else if (!!(process.env.NODE_ENV !== "production") && !accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (isOn(key)) { + if (!isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); + } + } else { + extraAttrs.push(key); + } + } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.` + ); + } + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); + } + } + } + } + if (vnode.dirs) { + if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); + } + root = cloneVNode(root, null, false, true); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) { + warn$1( + `Component inside <Transition> renders non-element root node that cannot be animated.` + ); + } + setTransitionHooks(root, vnode.transition); + } + if (!!(process.env.NODE_ENV !== "production") && setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance(prev); + return result; +} +const getChildRoot = (vnode) => { + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (!!(process.env.NODE_ENV !== "production") && childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } + } + }; + return [normalizeVNode(childRoot), setRoot]; +}; +function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (!!(process.env.NODE_ENV !== "production") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } + } + } + } else { + return; + } + } + return singleRoot; +} +const getFunctionalFallthrough = (attrs) => { + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || isOn(key)) { + (res || (res = {}))[key] = attrs[key]; + } + } + return res; +}; +const filterModelListeners = (attrs, props) => { + const res = {}; + for (const key in attrs) { + if (!isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; + } + } + return res; +}; +const isElementRoot = (vnode) => { + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; +}; +function shouldUpdateComponent(prevVNode, nextVNode, optimized) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if (!!(process.env.NODE_ENV !== "production") && (prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { + return true; + } + } + if (prevProps === nextProps) { + return false; + } + if (!prevProps) { + return !!nextProps; + } + if (!nextProps) { + return true; + } + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; +} +function hasPropsChanged(prevProps, nextProps, emitsOptions) { + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; + } + } + return false; +} +function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; + } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } +} + +const isSuspense = (type) => type.__isSuspense; +let suspenseId = 0; +const SuspenseImpl = { + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { + n2.suspense = n1.suspense; + n2.suspense.vnode = n2; + n2.el = n1.el; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + normalize: normalizeSuspenseChildren +}; +const Suspense = SuspenseImpl ; +function triggerEvent(vnode, name) { + const eventListener = vnode.props && vnode.props[name]; + if (isFunction(eventListener)) { + eventListener(); + } +} +function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } +} +function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } + } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); + } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); + } + } + } + } +} +let hasWarned = false; +function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + if (!!(process.env.NODE_ENV !== "production") && true && !hasWarned) { + hasWarned = true; + console[console.info ? "info" : "log"]( + `<Suspense> is an experimental feature and its API will likely change.` + ); + } + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; + } + } + const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; + if (!!(process.env.NODE_ENV !== "production")) { + assertNumber(timeout, `Suspense timeout`); + } + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + if (!!(process.env.NODE_ENV !== "production")) { + if (!resume && !suspense.pendingBranch) { + throw new Error( + `suspense.resolve() is called without a pending branch.` + ); + } + if (suspense.isUnmounted) { + throw new Error( + `suspense.resolve() is called on an already unmounted suspense boundary.` + ); + } + } + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) === container2) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect, optimized2) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + if (!!(process.env.NODE_ENV !== "production")) { + pushWarningContext(vnode2); + } + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized2 + ); + if (placeholder) { + remove(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + if (!!(process.env.NODE_ENV !== "production")) { + popWarningContext(); + } + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + } + }; + return suspense; +} +function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; +} +function normalizeSuspenseChildren(vnode) { + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); +} +function normalizeSuspenseSlot(s) { + let block; + if (isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); + } + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); + } + } + if (isArray(s)) { + const singleChild = filterSingleRoot(s); + if (!!(process.env.NODE_ENV !== "production") && !singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { + warn$1(`<Suspense> slots expect a single root node.`); + } + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; +} +function queueEffectWithSuspense(fn, suspense) { + if (suspense && suspense.pendingBranch) { + if (isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); + } + } else { + queuePostFlushCb(fn); + } +} +function setActiveBranch(suspense, branch) { + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } +} +function isVNodeSuspensible(vnode) { + const suspensible = vnode.props && vnode.props.suspensible; + return suspensible != null && suspensible !== false; +} + +const Fragment = Symbol.for("v-fgt"); +const Text = Symbol.for("v-txt"); +const Comment = Symbol.for("v-cmt"); +const Static = Symbol.for("v-stc"); +const blockStack = []; +let currentBlock = null; +function openBlock(disableTracking = false) { + blockStack.push(currentBlock = disableTracking ? null : []); +} +function closeBlock() { + blockStack.pop(); + currentBlock = blockStack[blockStack.length - 1] || null; +} +let isBlockTreeEnabled = 1; +function setBlockTracking(value, inVOnce = false) { + isBlockTreeEnabled += value; + if (value < 0 && currentBlock && inVOnce) { + currentBlock.hasOnce = true; + } +} +function setupBlock(vnode) { + vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; + closeBlock(); + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(vnode); + } + return vnode; +} +function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { + return setupBlock( + createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + true + ) + ); +} +function createBlock(type, props, children, patchFlag, dynamicProps) { + return setupBlock( + createVNode( + type, + props, + children, + patchFlag, + dynamicProps, + true + ) + ); +} +function isVNode(value) { + return value ? value.__v_isVNode === true : false; +} +function isSameVNodeType(n1, n2) { + if (!!(process.env.NODE_ENV !== "production") && n2.shapeFlag & 6 && n1.component) { + const dirtyInstances = hmrDirtyComponents.get(n2.type); + if (dirtyInstances && dirtyInstances.has(n1.component)) { + n1.shapeFlag &= ~256; + n2.shapeFlag &= ~512; + return false; + } + } + return n1.type === n2.type && n1.key === n2.key; +} +let vnodeArgsTransformer; +function transformVNodeArgs(transformer) { + vnodeArgsTransformer = transformer; +} +const createVNodeWithArgsTransform = (...args) => { + return _createVNode( + ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args + ); +}; +const normalizeKey = ({ key }) => key != null ? key : null; +const normalizeRef = ({ + ref, + ref_key, + ref_for +}) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; +}; +function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetStart: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); + } + } else if (children) { + vnode.shapeFlag |= isString(children) ? 8 : 16; + } + if (!!(process.env.NODE_ENV !== "production") && vnode.key !== vnode.key) { + warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; +} +const createVNode = !!(process.env.NODE_ENV !== "production") ? createVNodeWithArgsTransform : _createVNode; +function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { + if (!type || type === NULL_DYNAMIC_COMPONENT) { + if (!!(process.env.NODE_ENV !== "production") && !type) { + warn$1(`Invalid vnode type when creating vnode: ${type}.`); + } + type = Comment; + } + if (isVNode(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); + } + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } + } + cloned.patchFlag = -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (isObject(style)) { + if (isProxy(style) && !isArray(style)) { + style = extend({}, style); + } + props.style = normalizeStyle(style); + } + } + const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; + if (!!(process.env.NODE_ENV !== "production") && shapeFlag & 4 && isProxy(type)) { + type = toRaw(type); + warn$1( + `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, + ` +Component that was made reactive: `, + type + ); + } + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); +} +function guardReactiveProps(props) { + if (!props) return null; + return isProxy(props) || isInternalObject(props) ? extend({}, props) : props; +} +function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) { + const { props, ref, patchFlag, children, transition } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: !!(process.env.NODE_ENV !== "production") && patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, + target: vnode.target, + targetStart: vnode.targetStart, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + if (transition && cloneTransition) { + setTransitionHooks( + cloned, + transition.clone(cloned) + ); + } + return cloned; +} +function deepCloneVNode(vnode) { + const cloned = cloneVNode(vnode); + if (isArray(vnode.children)) { + cloned.children = vnode.children.map(deepCloneVNode); + } + return cloned; +} +function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); +} +function createStaticVNode(content, numberOfNodes) { + const vnode = createVNode(Static, null, content); + vnode.staticCount = numberOfNodes; + return vnode; +} +function createCommentVNode(text = "", asBlock = false) { + return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); +} +function normalizeVNode(child) { + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (isVNode(child)) { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } +} +function cloneIfMounted(child) { + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); +} +function normalizeChildren(vnode, children) { + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !isInternalObject(children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; + } + } + } + } else if (isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; + } + } + vnode.children = children; + vnode.shapeFlag |= type; +} +function mergeProps(...args) { + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = normalizeClass([ret.class, toMerge.class]); + } + } else if (key === "style") { + ret.style = normalizeStyle([ret.style, toMerge.style]); + } else if (isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } + } + } + return ret; +} +function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); +} + +const emptyAppContext = createAppContext(); +let uid = 0; +function createComponentInstance(vnode, parent, suspense) { + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + job: null, + scope: new EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + ids: parent ? parent.ids : ["", 0, 0], + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: EMPTY_OBJ, + data: EMPTY_OBJ, + props: EMPTY_OBJ, + attrs: EMPTY_OBJ, + slots: EMPTY_OBJ, + refs: EMPTY_OBJ, + setupState: EMPTY_OBJ, + setupContext: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + if (!!(process.env.NODE_ENV !== "production")) { + instance.ctx = createDevRenderContext(instance); + } else { + instance.ctx = { _: instance }; + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; +} +let currentInstance = null; +const getCurrentInstance = () => currentInstance || currentRenderingInstance; +let internalSetCurrentInstance; +let setInSSRSetupState; +{ + const g = getGlobalThis(); + const registerGlobalSetter = (key, setter) => { + let setters; + if (!(setters = g[key])) setters = g[key] = []; + setters.push(setter); + return (v) => { + if (setters.length > 1) setters.forEach((set) => set(v)); + else setters[0](v); + }; + }; + internalSetCurrentInstance = registerGlobalSetter( + `__VUE_INSTANCE_SETTERS__`, + (v) => currentInstance = v + ); + setInSSRSetupState = registerGlobalSetter( + `__VUE_SSR_SETTERS__`, + (v) => isInSSRComponentSetup = v + ); +} +const setCurrentInstance = (instance) => { + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; +}; +const unsetCurrentInstance = () => { + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); +}; +const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); +function validateComponentName(name, { isNativeTag }) { + if (isBuiltInTag(name) || isNativeTag(name)) { + warn$1( + "Do not use built-in or reserved HTML elements as component id: " + name + ); + } +} +function isStatefulComponent(instance) { + return instance.vnode.shapeFlag & 4; +} +let isInSSRComponentSetup = false; +function setupComponent(instance, isSSR = false, optimized = false) { + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children, optimized); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; +} +function setupStatefulComponent(instance, isSSR) { + var _a; + const Component = instance.type; + if (!!(process.env.NODE_ENV !== "production")) { + if (Component.name) { + validateComponentName(Component.name, instance.appContext.config); + } + if (Component.components) { + const names = Object.keys(Component.components); + for (let i = 0; i < names.length; i++) { + validateComponentName(names[i], instance.appContext.config); + } + } + if (Component.directives) { + const names = Object.keys(Component.directives); + for (let i = 0; i < names.length; i++) { + validateDirectiveName(names[i]); + } + } + if (Component.compilerOptions && isRuntimeOnly()) { + warn$1( + `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` + ); + } + } + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers); + if (!!(process.env.NODE_ENV !== "production")) { + exposePropsOnRenderContext(instance); + } + const { setup } = Component; + if (setup) { + pauseTracking(); + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + !!(process.env.NODE_ENV !== "production") ? shallowReadonly(instance.props) : instance.props, + setupContext + ] + ); + const isAsyncSetup = isPromise(setupResult); + resetTracking(); + reset(); + if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) { + markAsyncBoundary(instance); + } + if (isAsyncSetup) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + if (!!(process.env.NODE_ENV !== "production") && !instance.suspense) { + const name = (_a = Component.name) != null ? _a : "Anonymous"; + warn$1( + `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` + ); + } + } + } else { + handleSetupResult(instance, setupResult, isSSR); + } + } else { + finishComponentSetup(instance, isSSR); + } +} +function handleSetupResult(instance, setupResult, isSSR) { + if (isFunction(setupResult)) { + if (instance.type.__ssrInlineRender) { + instance.ssrRender = setupResult; + } else { + instance.render = setupResult; + } + } else if (isObject(setupResult)) { + if (!!(process.env.NODE_ENV !== "production") && isVNode(setupResult)) { + warn$1( + `setup() should not return VNodes directly - return a render function instead.` + ); + } + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + instance.devtoolsRawSetupState = setupResult; + } + instance.setupState = proxyRefs(setupResult); + if (!!(process.env.NODE_ENV !== "production")) { + exposeSetupStateOnRenderContext(instance); + } + } else if (!!(process.env.NODE_ENV !== "production") && setupResult !== void 0) { + warn$1( + `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` + ); + } + finishComponentSetup(instance, isSSR); +} +let compile; +let installWithProxy; +function registerRuntimeCompiler(_compile) { + compile = _compile; + installWithProxy = (i) => { + if (i.render._rc) { + i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); + } + }; +} +const isRuntimeOnly = () => !compile; +function finishComponentSetup(instance, isSSR, skipOptions) { + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile && !Component.render) { + const template = Component.template || __VUE_OPTIONS_API__ && resolveMergedOptions(instance).template; + if (template) { + if (!!(process.env.NODE_ENV !== "production")) { + startMeasure(instance, `compile`); + } + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = extend( + extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions + ); + Component.render = compile(template, finalCompilerOptions); + if (!!(process.env.NODE_ENV !== "production")) { + endMeasure(instance, `compile`); + } + } + } + instance.render = Component.render || NOOP; + if (installWithProxy) { + installWithProxy(instance); + } + } + if (__VUE_OPTIONS_API__ && true) { + const reset = setCurrentInstance(instance); + pauseTracking(); + try { + applyOptions(instance); + } finally { + resetTracking(); + reset(); + } + } + if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) { + if (!compile && Component.template) { + warn$1( + `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".` ) + ); + } else { + warn$1(`Component is missing template or render function: `, Component); + } + } +} +const attrsProxyHandlers = !!(process.env.NODE_ENV !== "production") ? { + get(target, key) { + markAttrsAccessed(); + track(target, "get", ""); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } +} : { + get(target, key) { + track(target, "get", ""); + return target[key]; + } +}; +function getSlotsProxy(instance) { + return new Proxy(instance.slots, { + get(target, key) { + track(instance, "get", "$slots"); + return target[key]; + } + }); +} +function createSetupContext(instance) { + const expose = (exposed) => { + if (!!(process.env.NODE_ENV !== "production")) { + if (instance.exposed) { + warn$1(`expose() should be called only once per setup().`); + } + if (exposed != null) { + let exposedType = typeof exposed; + if (exposedType === "object") { + if (isArray(exposed)) { + exposedType = "array"; + } else if (isRef(exposed)) { + exposedType = "ref"; + } + } + if (exposedType !== "object") { + warn$1( + `expose() should be passed a plain object, received ${exposedType}.` + ); + } + } + } + instance.exposed = exposed || {}; + }; + if (!!(process.env.NODE_ENV !== "production")) { + let attrsProxy; + let slotsProxy; + return Object.freeze({ + get attrs() { + return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers)); + }, + get slots() { + return slotsProxy || (slotsProxy = getSlotsProxy(instance)); + }, + get emit() { + return (event, ...args) => instance.emit(event, ...args); + }, + expose + }); + } else { + return { + attrs: new Proxy(instance.attrs, attrsProxyHandlers), + slots: instance.slots, + emit: instance.emit, + expose + }; + } +} +function getComponentPublicInstance(instance) { + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); + } + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } else { + return instance.proxy; + } +} +const classifyRE = /(?:^|[-_])(\w)/g; +const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); +function getComponentName(Component, includeInferred = true) { + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; +} +function formatComponentName(instance, Component, isRoot = false) { + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; + } + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; +} +function isClassComponent(value) { + return isFunction(value) && "__vccOpts" in value; +} + +const computed = (getterOrOptions, debugOptions) => { + const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); + if (!!(process.env.NODE_ENV !== "production")) { + const i = getCurrentInstance(); + if (i && i.appContext.config.warnRecursiveComputed) { + c._warnRecursive = true; + } + } + return c; +}; + +function h(type, propsOrChildren, children) { + const l = arguments.length; + if (l === 2) { + if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { + if (isVNode(propsOrChildren)) { + return createVNode(type, null, [propsOrChildren]); + } + return createVNode(type, propsOrChildren); + } else { + return createVNode(type, null, propsOrChildren); + } + } else { + if (l > 3) { + children = Array.prototype.slice.call(arguments, 2); + } else if (l === 3 && isVNode(children)) { + children = [children]; + } + return createVNode(type, propsOrChildren, children); + } +} + +function initCustomFormatter() { + if (!!!(process.env.NODE_ENV !== "production") || typeof window === "undefined") { + return; + } + const vueStyle = { style: "color:#3ba776" }; + const numberStyle = { style: "color:#1677ff" }; + const stringStyle = { style: "color:#f5222d" }; + const keywordStyle = { style: "color:#eb2f96" }; + const formatter = { + __vue_custom_formatter: true, + header(obj) { + if (!isObject(obj)) { + return null; + } + if (obj.__isVue) { + return ["div", vueStyle, `VueInstance`]; + } else if (isRef(obj)) { + return [ + "div", + {}, + ["span", vueStyle, genRefFlag(obj)], + "<", + // avoid debugger accessing value affecting behavior + formatValue("_value" in obj ? obj._value : obj), + `>` + ]; + } else if (isReactive(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"], + "<", + formatValue(obj), + `>${isReadonly(obj) ? ` (readonly)` : ``}` + ]; + } else if (isReadonly(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"], + "<", + formatValue(obj), + ">" + ]; + } + return null; + }, + hasBody(obj) { + return obj && obj.__isVue; + }, + body(obj) { + if (obj && obj.__isVue) { + return [ + "div", + {}, + ...formatInstance(obj.$) + ]; + } + } + }; + function formatInstance(instance) { + const blocks = []; + if (instance.type.props && instance.props) { + blocks.push(createInstanceBlock("props", toRaw(instance.props))); + } + if (instance.setupState !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("setup", instance.setupState)); + } + if (instance.data !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("data", toRaw(instance.data))); + } + const computed = extractKeys(instance, "computed"); + if (computed) { + blocks.push(createInstanceBlock("computed", computed)); + } + const injected = extractKeys(instance, "inject"); + if (injected) { + blocks.push(createInstanceBlock("injected", injected)); + } + blocks.push([ + "div", + {}, + [ + "span", + { + style: keywordStyle.style + ";opacity:0.66" + }, + "$ (internal): " + ], + ["object", { object: instance }] + ]); + return blocks; + } + function createInstanceBlock(type, target) { + target = extend({}, target); + if (!Object.keys(target).length) { + return ["span", {}]; + } + return [ + "div", + { style: "line-height:1.25em;margin-bottom:0.6em" }, + [ + "div", + { + style: "color:#476582" + }, + type + ], + [ + "div", + { + style: "padding-left:1.25em" + }, + ...Object.keys(target).map((key) => { + return [ + "div", + {}, + ["span", keywordStyle, key + ": "], + formatValue(target[key], false) + ]; + }) + ] + ]; + } + function formatValue(v, asRaw = true) { + if (typeof v === "number") { + return ["span", numberStyle, v]; + } else if (typeof v === "string") { + return ["span", stringStyle, JSON.stringify(v)]; + } else if (typeof v === "boolean") { + return ["span", keywordStyle, v]; + } else if (isObject(v)) { + return ["object", { object: asRaw ? toRaw(v) : v }]; + } else { + return ["span", stringStyle, String(v)]; + } + } + function extractKeys(instance, type) { + const Comp = instance.type; + if (isFunction(Comp)) { + return; + } + const extracted = {}; + for (const key in instance.ctx) { + if (isKeyOfType(Comp, key, type)) { + extracted[key] = instance.ctx[key]; + } + } + return extracted; + } + function isKeyOfType(Comp, key, type) { + const opts = Comp[type]; + if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) { + return true; + } + if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { + return true; + } + if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { + return true; + } + } + function genRefFlag(v) { + if (isShallow(v)) { + return `ShallowRef`; + } + if (v.effect) { + return `ComputedRef`; + } + return `Ref`; + } + if (window.devtoolsFormatters) { + window.devtoolsFormatters.push(formatter); + } else { + window.devtoolsFormatters = [formatter]; + } +} + +function withMemo(memo, render, cache, index) { + const cached = cache[index]; + if (cached && isMemoSame(cached, memo)) { + return cached; + } + const ret = render(); + ret.memo = memo.slice(); + ret.cacheIndex = index; + return cache[index] = ret; +} +function isMemoSame(cached, memo) { + const prev = cached.memo; + if (prev.length != memo.length) { + return false; + } + for (let i = 0; i < prev.length; i++) { + if (hasChanged(prev[i], memo[i])) { + return false; + } + } + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(cached); + } + return true; +} + +const version = "3.5.13"; +const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP; +const ErrorTypeStrings = ErrorTypeStrings$1 ; +const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0; +const setDevtoolsHook = !!(process.env.NODE_ENV !== "production") || true ? setDevtoolsHook$1 : NOOP; +const _ssrUtils = { + createComponentInstance, + setupComponent, + renderComponentRoot, + setCurrentRenderingInstance, + isVNode: isVNode, + normalizeVNode, + getComponentPublicInstance, + ensureValidVNode, + pushWarningContext, + popWarningContext +}; +const ssrUtils = _ssrUtils ; +const resolveFilter = null; +const compatUtils = null; +const DeprecationTypes = null; + +export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, Static, Suspense, Teleport, Text, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, cloneVNode, compatUtils, computed, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, getCurrentInstance, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, inject, isMemoSame, isRuntimeOnly, isVNode, mergeDefaults, mergeModels, mergeProps, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, pushScopeId, queuePostFlushCb, registerRuntimeCompiler, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, ssrContextKey, ssrUtils, toHandlers, transformVNodeArgs, useAttrs, useId, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId }; diff --git a/vuetest/node_modules/@vue/runtime-core/index.js b/vuetest/node_modules/@vue/runtime-core/index.js new file mode 100644 index 0000000..50c4882 --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-core/index.js @@ -0,0 +1,7 @@ +'use strict' + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/runtime-core.cjs.prod.js') +} else { + module.exports = require('./dist/runtime-core.cjs.js') +} diff --git a/vuetest/node_modules/@vue/runtime-core/package.json b/vuetest/node_modules/@vue/runtime-core/package.json new file mode 100644 index 0000000..aefa10c --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-core/package.json @@ -0,0 +1,52 @@ +{ + "name": "@vue/runtime-core", + "version": "3.5.13", + "description": "@vue/runtime-core", + "main": "index.js", + "module": "dist/runtime-core.esm-bundler.js", + "types": "dist/runtime-core.d.ts", + "files": [ + "index.js", + "dist" + ], + "exports": { + ".": { + "types": "./dist/runtime-core.d.ts", + "node": { + "production": "./dist/runtime-core.cjs.prod.js", + "development": "./dist/runtime-core.cjs.js", + "default": "./index.js" + }, + "module": "./dist/runtime-core.esm-bundler.js", + "import": "./dist/runtime-core.esm-bundler.js", + "require": "./index.js" + }, + "./*": "./*" + }, + "buildOptions": { + "name": "VueRuntimeCore", + "formats": [ + "esm-bundler", + "cjs" + ] + }, + "sideEffects": false, + "repository": { + "type": "git", + "url": "git+https://github.com/vuejs/core.git", + "directory": "packages/runtime-core" + }, + "keywords": [ + "vue" + ], + "author": "Evan You", + "license": "MIT", + "bugs": { + "url": "https://github.com/vuejs/core/issues" + }, + "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme", + "dependencies": { + "@vue/shared": "3.5.13", + "@vue/reactivity": "3.5.13" + } +} \ No newline at end of file diff --git a/vuetest/node_modules/@vue/runtime-dom/LICENSE b/vuetest/node_modules/@vue/runtime-dom/LICENSE new file mode 100644 index 0000000..15f1f7e --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-dom/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018-present, Yuxi (Evan) You + +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. diff --git a/vuetest/node_modules/@vue/runtime-dom/README.md b/vuetest/node_modules/@vue/runtime-dom/README.md new file mode 100644 index 0000000..11c373f --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-dom/README.md @@ -0,0 +1,13 @@ +# @vue/runtime-dom + +```js +import { h, createApp } from '@vue/runtime-dom' + +const RootComponent = { + render() { + return h('div', 'hello world') + }, +} + +createApp(RootComponent).mount('#app') +``` diff --git a/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js b/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js new file mode 100644 index 0000000..f18e009 --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js @@ -0,0 +1,1820 @@ +/** +* @vue/runtime-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var runtimeCore = require('@vue/runtime-core'); +var shared = require('@vue/shared'); + +let policy = void 0; +const tt = typeof window !== "undefined" && window.trustedTypes; +if (tt) { + try { + policy = /* @__PURE__ */ tt.createPolicy("vue", { + createHTML: (val) => val + }); + } catch (e) { + runtimeCore.warn(`Error creating trusted types policy: ${e}`); + } +} +const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val; +const svgNS = "http://www.w3.org/2000/svg"; +const mathmlNS = "http://www.w3.org/1998/Math/MathML"; +const doc = typeof document !== "undefined" ? document : null; +const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); +const nodeOps = { + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); + } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) break; + } + } else { + templateContainer.innerHTML = unsafeToTrustedHTML( + namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content + ); + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } +}; + +const TRANSITION = "transition"; +const ANIMATION = "animation"; +const vtcKey = Symbol("_vtc"); +const DOMTransitionPropsValidators = { + name: String, + type: String, + css: { + type: Boolean, + default: true + }, + duration: [String, Number, Object], + enterFromClass: String, + enterActiveClass: String, + enterToClass: String, + appearFromClass: String, + appearActiveClass: String, + appearToClass: String, + leaveFromClass: String, + leaveActiveClass: String, + leaveToClass: String +}; +const TransitionPropsValidators = /* @__PURE__ */ shared.extend( + {}, + runtimeCore.BaseTransitionPropsValidators, + DOMTransitionPropsValidators +); +const decorate$1 = (t) => { + t.displayName = "Transition"; + t.props = TransitionPropsValidators; + return t; +}; +const Transition = /* @__PURE__ */ decorate$1( + (props, { slots }) => runtimeCore.h(runtimeCore.BaseTransition, resolveTransitionProps(props), slots) +); +const callHook = (hook, args = []) => { + if (shared.isArray(hook)) { + hook.forEach((h2) => h2(...args)); + } else if (hook) { + hook(...args); + } +}; +const hasExplicitCallback = (hook) => { + return hook ? shared.isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; +}; +function resolveTransitionProps(rawProps) { + const baseProps = {}; + for (const key in rawProps) { + if (!(key in DOMTransitionPropsValidators)) { + baseProps[key] = rawProps[key]; + } + } + if (rawProps.css === false) { + return baseProps; + } + const { + name = "v", + type, + duration, + enterFromClass = `${name}-enter-from`, + enterActiveClass = `${name}-enter-active`, + enterToClass = `${name}-enter-to`, + appearFromClass = enterFromClass, + appearActiveClass = enterActiveClass, + appearToClass = enterToClass, + leaveFromClass = `${name}-leave-from`, + leaveActiveClass = `${name}-leave-active`, + leaveToClass = `${name}-leave-to` + } = rawProps; + const durations = normalizeDuration(duration); + const enterDuration = durations && durations[0]; + const leaveDuration = durations && durations[1]; + const { + onBeforeEnter, + onEnter, + onEnterCancelled, + onLeave, + onLeaveCancelled, + onBeforeAppear = onBeforeEnter, + onAppear = onEnter, + onAppearCancelled = onEnterCancelled + } = baseProps; + const finishEnter = (el, isAppear, done, isCancelled) => { + el._enterCancelled = isCancelled; + removeTransitionClass(el, isAppear ? appearToClass : enterToClass); + removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); + done && done(); + }; + const finishLeave = (el, done) => { + el._isLeaving = false; + removeTransitionClass(el, leaveFromClass); + removeTransitionClass(el, leaveToClass); + removeTransitionClass(el, leaveActiveClass); + done && done(); + }; + const makeEnterHook = (isAppear) => { + return (el, done) => { + const hook = isAppear ? onAppear : onEnter; + const resolve = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve]); + nextFrame(() => { + removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); + addTransitionClass(el, isAppear ? appearToClass : enterToClass); + if (!hasExplicitCallback(hook)) { + whenTransitionEnds(el, type, enterDuration, resolve); + } + }); + }; + }; + return shared.extend(baseProps, { + onBeforeEnter(el) { + callHook(onBeforeEnter, [el]); + addTransitionClass(el, enterFromClass); + addTransitionClass(el, enterActiveClass); + }, + onBeforeAppear(el) { + callHook(onBeforeAppear, [el]); + addTransitionClass(el, appearFromClass); + addTransitionClass(el, appearActiveClass); + }, + onEnter: makeEnterHook(false), + onAppear: makeEnterHook(true), + onLeave(el, done) { + el._isLeaving = true; + const resolve = () => finishLeave(el, done); + addTransitionClass(el, leaveFromClass); + if (!el._enterCancelled) { + forceReflow(); + addTransitionClass(el, leaveActiveClass); + } else { + addTransitionClass(el, leaveActiveClass); + forceReflow(); + } + nextFrame(() => { + if (!el._isLeaving) { + return; + } + removeTransitionClass(el, leaveFromClass); + addTransitionClass(el, leaveToClass); + if (!hasExplicitCallback(onLeave)) { + whenTransitionEnds(el, type, leaveDuration, resolve); + } + }); + callHook(onLeave, [el, resolve]); + }, + onEnterCancelled(el) { + finishEnter(el, false, void 0, true); + callHook(onEnterCancelled, [el]); + }, + onAppearCancelled(el) { + finishEnter(el, true, void 0, true); + callHook(onAppearCancelled, [el]); + }, + onLeaveCancelled(el) { + finishLeave(el); + callHook(onLeaveCancelled, [el]); + } + }); +} +function normalizeDuration(duration) { + if (duration == null) { + return null; + } else if (shared.isObject(duration)) { + return [NumberOf(duration.enter), NumberOf(duration.leave)]; + } else { + const n = NumberOf(duration); + return [n, n]; + } +} +function NumberOf(val) { + const res = shared.toNumber(val); + { + runtimeCore.assertNumber(res, "<transition> explicit duration"); + } + return res; +} +function addTransitionClass(el, cls) { + cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); + (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); +} +function removeTransitionClass(el, cls) { + cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.delete(cls); + if (!_vtc.size) { + el[vtcKey] = void 0; + } + } +} +function nextFrame(cb) { + requestAnimationFrame(() => { + requestAnimationFrame(cb); + }); +} +let endId = 0; +function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { + const id = el._endId = ++endId; + const resolveIfNotStale = () => { + if (id === el._endId) { + resolve(); + } + }; + if (explicitTimeout != null) { + return setTimeout(resolveIfNotStale, explicitTimeout); + } + const { type, timeout, propCount } = getTransitionInfo(el, expectedType); + if (!type) { + return resolve(); + } + const endEvent = type + "end"; + let ended = 0; + const end = () => { + el.removeEventListener(endEvent, onEnd); + resolveIfNotStale(); + }; + const onEnd = (e) => { + if (e.target === el && ++ended >= propCount) { + end(); + } + }; + setTimeout(() => { + if (ended < propCount) { + end(); + } + }, timeout + 1); + el.addEventListener(endEvent, onEnd); +} +function getTransitionInfo(el, expectedType) { + const styles = window.getComputedStyle(el); + const getStyleProperties = (key) => (styles[key] || "").split(", "); + const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); + const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); + const transitionTimeout = getTimeout(transitionDelays, transitionDurations); + const animationDelays = getStyleProperties(`${ANIMATION}Delay`); + const animationDurations = getStyleProperties(`${ANIMATION}Duration`); + const animationTimeout = getTimeout(animationDelays, animationDurations); + let type = null; + let timeout = 0; + let propCount = 0; + if (expectedType === TRANSITION) { + if (transitionTimeout > 0) { + type = TRANSITION; + timeout = transitionTimeout; + propCount = transitionDurations.length; + } + } else if (expectedType === ANIMATION) { + if (animationTimeout > 0) { + type = ANIMATION; + timeout = animationTimeout; + propCount = animationDurations.length; + } + } else { + timeout = Math.max(transitionTimeout, animationTimeout); + type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; + propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; + } + const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( + getStyleProperties(`${TRANSITION}Property`).toString() + ); + return { + type, + timeout, + propCount, + hasTransform + }; +} +function getTimeout(delays, durations) { + while (delays.length < durations.length) { + delays = delays.concat(delays); + } + return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); +} +function toMs(s) { + if (s === "auto") return 0; + return Number(s.slice(0, -1).replace(",", ".")) * 1e3; +} +function forceReflow() { + return document.body.offsetHeight; +} + +function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } +} + +const vShowOriginalDisplay = Symbol("_vod"); +const vShowHidden = Symbol("_vsh"); +const vShow = { + beforeMount(el, { value }, { transition }) { + el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display; + if (transition && value) { + transition.beforeEnter(el); + } else { + setDisplay(el, value); + } + }, + mounted(el, { value }, { transition }) { + if (transition && value) { + transition.enter(el); + } + }, + updated(el, { value, oldValue }, { transition }) { + if (!value === !oldValue) return; + if (transition) { + if (value) { + transition.beforeEnter(el); + setDisplay(el, true); + transition.enter(el); + } else { + transition.leave(el, () => { + setDisplay(el, false); + }); + } + } else { + setDisplay(el, value); + } + }, + beforeUnmount(el, { value }) { + setDisplay(el, value); + } +}; +{ + vShow.name = "show"; +} +function setDisplay(el, value) { + el.style.display = value ? el[vShowOriginalDisplay] : "none"; + el[vShowHidden] = !value; +} +function initVShowForSSR() { + vShow.getSSRProps = ({ value }) => { + if (!value) { + return { style: { display: "none" } }; + } + }; +} + +const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); +function useCssVars(getter) { + return; +} + +const displayRE = /(^|;)\s*display\s*:/; +function patchStyle(el, prev, next) { + const style = el.style; + const isCssString = shared.isString(next); + let hasControlledDisplay = false; + if (next && !isCssString) { + if (prev) { + if (!shared.isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } else { + for (const prevStyle of prev.split(";")) { + const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim(); + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + } + for (const key in next) { + if (key === "display") { + hasControlledDisplay = true; + } + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + hasControlledDisplay = displayRE.test(next); + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOriginalDisplay in el) { + el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : ""; + if (el[vShowHidden]) { + style.display = "none"; + } + } +} +const semicolonRE = /[^\\];\s*$/; +const importantRE = /\s*!important$/; +function setStyle(style, name, val) { + if (shared.isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) val = ""; + { + if (semicolonRE.test(val)) { + runtimeCore.warn( + `Unexpected semicolon at the end of '${name}' style value: '${val}'` + ); + } + } + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + shared.hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } +} +const prefixes = ["Webkit", "Moz", "ms"]; +const prefixCache = {}; +function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = runtimeCore.camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = shared.capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; +} + +const xlinkNS = "http://www.w3.org/1999/xlink"; +function patchAttr(el, key, value, isSVG, instance, isBoolean = shared.isSpecialBooleanAttr(key)) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + if (value == null || isBoolean && !shared.includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute( + key, + isBoolean ? "" : shared.isSymbol(value) ? String(value) : value + ); + } + } +} + +function patchDOMProp(el, key, value, parentComponent, attrName) { + if (key === "innerHTML" || key === "textContent") { + if (value != null) { + el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value; + } + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; + const newValue = value == null ? ( + // #11647: value should be set as empty string for null and undefined, + // but <input type="checkbox"> should be set as 'on'. + el.type === "checkbox" ? "on" : "" + ) : String(value); + if (oldValue !== newValue || !("_value" in el)) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + el._value = value; + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = shared.includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + if (!needRemove) { + runtimeCore.warn( + `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, + e + ); + } + } + needRemove && el.removeAttribute(attrName || key); +} + +function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); +} +function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); +} +const veiKey = Symbol("_vei"); +function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = sanitizeEventValue(nextValue, rawName) ; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker( + sanitizeEventValue(nextValue, rawName) , + instance + ); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } +} +const optionsModifierRE = /(?:Once|Passive|Capture)$/; +function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : shared.hyphenate(name.slice(2)); + return [event, options]; +} +let cachedNow = 0; +const p = /* @__PURE__ */ Promise.resolve(); +const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); +function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + runtimeCore.callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; +} +function sanitizeEventValue(value, propName) { + if (shared.isFunction(value) || shared.isArray(value)) { + return value; + } + runtimeCore.warn( + `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop? +Expected function or array of functions, received type ${typeof value}.` + ); + return shared.NOOP; +} +function patchStopImmediatePropagation(e, value) { + if (shared.isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map( + (fn) => (e2) => !e2._stopped && fn && fn(e2) + ); + } else { + return value; + } +} + +const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter +key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; +const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (shared.isOn(key)) { + if (!shared.isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp(el, key, nextValue); + if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { + patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); + } + } else if ( + // #11081 force set props for possible async custom element + el._isVueCE && (/[A-Z]/.test(key) || !shared.isString(nextValue)) + ) { + patchDOMProp(el, shared.camelize(key), nextValue, parentComponent, key); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } +}; +function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && shared.isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && shared.isString(value)) { + return false; + } + return key in el; +} + +const REMOVAL = {}; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineCustomElement(options, extraOptions, _createApp) { + const Comp = runtimeCore.defineComponent(options, extraOptions); + if (shared.isPlainObject(Comp)) shared.extend(Comp, extraOptions); + class VueCustomElement extends VueElement { + constructor(initialProps) { + super(Comp, initialProps, _createApp); + } + } + VueCustomElement.def = Comp; + return VueCustomElement; +} +/*! #__NO_SIDE_EFFECTS__ */ +const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => { + return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp); +}; +const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { +}; +class VueElement extends BaseClass { + constructor(_def, _props = {}, _createApp = createApp) { + super(); + this._def = _def; + this._props = _props; + this._createApp = _createApp; + this._isVueCE = true; + /** + * @internal + */ + this._instance = null; + /** + * @internal + */ + this._app = null; + /** + * @internal + */ + this._nonce = this._def.nonce; + this._connected = false; + this._resolved = false; + this._numberProps = null; + this._styleChildren = /* @__PURE__ */ new WeakSet(); + this._ob = null; + if (this.shadowRoot && _createApp !== createApp) { + this._root = this.shadowRoot; + } else { + if (this.shadowRoot) { + runtimeCore.warn( + `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` + ); + } + if (_def.shadowRoot !== false) { + this.attachShadow({ mode: "open" }); + this._root = this.shadowRoot; + } else { + this._root = this; + } + } + if (!this._def.__asyncLoader) { + this._resolveProps(this._def); + } + } + connectedCallback() { + if (!this.isConnected) return; + if (!this.shadowRoot) { + this._parseSlots(); + } + this._connected = true; + let parent = this; + while (parent = parent && (parent.parentNode || parent.host)) { + if (parent instanceof VueElement) { + this._parent = parent; + break; + } + } + if (!this._instance) { + if (this._resolved) { + this._setParent(); + this._update(); + } else { + if (parent && parent._pendingResolve) { + this._pendingResolve = parent._pendingResolve.then(() => { + this._pendingResolve = void 0; + this._resolveDef(); + }); + } else { + this._resolveDef(); + } + } + } + } + _setParent(parent = this._parent) { + if (parent) { + this._instance.parent = parent._instance; + this._instance.provides = parent._instance.provides; + } + } + disconnectedCallback() { + this._connected = false; + runtimeCore.nextTick(() => { + if (!this._connected) { + if (this._ob) { + this._ob.disconnect(); + this._ob = null; + } + this._app && this._app.unmount(); + if (this._instance) this._instance.ce = void 0; + this._app = this._instance = null; + } + }); + } + /** + * resolve inner component definition (handle possible async component) + */ + _resolveDef() { + if (this._pendingResolve) { + return; + } + for (let i = 0; i < this.attributes.length; i++) { + this._setAttr(this.attributes[i].name); + } + this._ob = new MutationObserver((mutations) => { + for (const m of mutations) { + this._setAttr(m.attributeName); + } + }); + this._ob.observe(this, { attributes: true }); + const resolve = (def, isAsync = false) => { + this._resolved = true; + this._pendingResolve = void 0; + const { props, styles } = def; + let numberProps; + if (props && !shared.isArray(props)) { + for (const key in props) { + const opt = props[key]; + if (opt === Number || opt && opt.type === Number) { + if (key in this._props) { + this._props[key] = shared.toNumber(this._props[key]); + } + (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[shared.camelize(key)] = true; + } + } + } + this._numberProps = numberProps; + if (isAsync) { + this._resolveProps(def); + } + if (this.shadowRoot) { + this._applyStyles(styles); + } else if (styles) { + runtimeCore.warn( + "Custom element style injection is not supported when using shadowRoot: false" + ); + } + this._mount(def); + }; + const asyncDef = this._def.__asyncLoader; + if (asyncDef) { + this._pendingResolve = asyncDef().then( + (def) => resolve(this._def = def, true) + ); + } else { + resolve(this._def); + } + } + _mount(def) { + if (!def.name) { + def.name = "VueElement"; + } + this._app = this._createApp(def); + if (def.configureApp) { + def.configureApp(this._app); + } + this._app._ceVNode = this._createVNode(); + this._app.mount(this._root); + const exposed = this._instance && this._instance.exposed; + if (!exposed) return; + for (const key in exposed) { + if (!shared.hasOwn(this, key)) { + Object.defineProperty(this, key, { + // unwrap ref to be consistent with public instance behavior + get: () => runtimeCore.unref(exposed[key]) + }); + } else { + runtimeCore.warn(`Exposed property "${key}" already exists on custom element.`); + } + } + } + _resolveProps(def) { + const { props } = def; + const declaredPropKeys = shared.isArray(props) ? props : Object.keys(props || {}); + for (const key of Object.keys(this)) { + if (key[0] !== "_" && declaredPropKeys.includes(key)) { + this._setProp(key, this[key]); + } + } + for (const key of declaredPropKeys.map(shared.camelize)) { + Object.defineProperty(this, key, { + get() { + return this._getProp(key); + }, + set(val) { + this._setProp(key, val, true, true); + } + }); + } + } + _setAttr(key) { + if (key.startsWith("data-v-")) return; + const has = this.hasAttribute(key); + let value = has ? this.getAttribute(key) : REMOVAL; + const camelKey = shared.camelize(key); + if (has && this._numberProps && this._numberProps[camelKey]) { + value = shared.toNumber(value); + } + this._setProp(camelKey, value, false, true); + } + /** + * @internal + */ + _getProp(key) { + return this._props[key]; + } + /** + * @internal + */ + _setProp(key, val, shouldReflect = true, shouldUpdate = false) { + if (val !== this._props[key]) { + if (val === REMOVAL) { + delete this._props[key]; + } else { + this._props[key] = val; + if (key === "key" && this._app) { + this._app._ceVNode.key = val; + } + } + if (shouldUpdate && this._instance) { + this._update(); + } + if (shouldReflect) { + const ob = this._ob; + ob && ob.disconnect(); + if (val === true) { + this.setAttribute(shared.hyphenate(key), ""); + } else if (typeof val === "string" || typeof val === "number") { + this.setAttribute(shared.hyphenate(key), val + ""); + } else if (!val) { + this.removeAttribute(shared.hyphenate(key)); + } + ob && ob.observe(this, { attributes: true }); + } + } + } + _update() { + render(this._createVNode(), this._root); + } + _createVNode() { + const baseProps = {}; + if (!this.shadowRoot) { + baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this); + } + const vnode = runtimeCore.createVNode(this._def, shared.extend(baseProps, this._props)); + if (!this._instance) { + vnode.ce = (instance) => { + this._instance = instance; + instance.ce = this; + instance.isCE = true; + { + instance.ceReload = (newStyles) => { + if (this._styles) { + this._styles.forEach((s) => this._root.removeChild(s)); + this._styles.length = 0; + } + this._applyStyles(newStyles); + this._instance = null; + this._update(); + }; + } + const dispatch = (event, args) => { + this.dispatchEvent( + new CustomEvent( + event, + shared.isPlainObject(args[0]) ? shared.extend({ detail: args }, args[0]) : { detail: args } + ) + ); + }; + instance.emit = (event, ...args) => { + dispatch(event, args); + if (shared.hyphenate(event) !== event) { + dispatch(shared.hyphenate(event), args); + } + }; + this._setParent(); + }; + } + return vnode; + } + _applyStyles(styles, owner) { + if (!styles) return; + if (owner) { + if (owner === this._def || this._styleChildren.has(owner)) { + return; + } + this._styleChildren.add(owner); + } + const nonce = this._nonce; + for (let i = styles.length - 1; i >= 0; i--) { + const s = document.createElement("style"); + if (nonce) s.setAttribute("nonce", nonce); + s.textContent = styles[i]; + this.shadowRoot.prepend(s); + { + if (owner) { + if (owner.__hmrId) { + if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map(); + let entry = this._childStyles.get(owner.__hmrId); + if (!entry) { + this._childStyles.set(owner.__hmrId, entry = []); + } + entry.push(s); + } + } else { + (this._styles || (this._styles = [])).push(s); + } + } + } + } + /** + * Only called when shadowRoot is false + */ + _parseSlots() { + const slots = this._slots = {}; + let n; + while (n = this.firstChild) { + const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default"; + (slots[slotName] || (slots[slotName] = [])).push(n); + this.removeChild(n); + } + } + /** + * Only called when shadowRoot is false + */ + _renderSlots() { + const outlets = (this._teleportTarget || this).querySelectorAll("slot"); + const scopeId = this._instance.type.__scopeId; + for (let i = 0; i < outlets.length; i++) { + const o = outlets[i]; + const slotName = o.getAttribute("name") || "default"; + const content = this._slots[slotName]; + const parent = o.parentNode; + if (content) { + for (const n of content) { + if (scopeId && n.nodeType === 1) { + const id = scopeId + "-s"; + const walker = document.createTreeWalker(n, 1); + n.setAttribute(id, ""); + let child; + while (child = walker.nextNode()) { + child.setAttribute(id, ""); + } + } + parent.insertBefore(n, o); + } + } else { + while (o.firstChild) parent.insertBefore(o.firstChild, o); + } + parent.removeChild(o); + } + } + /** + * @internal + */ + _injectChildStyle(comp) { + this._applyStyles(comp.styles, comp); + } + /** + * @internal + */ + _removeChildStyle(comp) { + { + this._styleChildren.delete(comp); + if (this._childStyles && comp.__hmrId) { + const oldStyles = this._childStyles.get(comp.__hmrId); + if (oldStyles) { + oldStyles.forEach((s) => this._root.removeChild(s)); + oldStyles.length = 0; + } + } + } + } +} +function useHost(caller) { + const instance = runtimeCore.getCurrentInstance(); + const el = instance && instance.ce; + if (el) { + return el; + } else { + if (!instance) { + runtimeCore.warn( + `${caller || "useHost"} called without an active component instance.` + ); + } else { + runtimeCore.warn( + `${caller || "useHost"} can only be used in components defined via defineCustomElement.` + ); + } + } + return null; +} +function useShadowRoot() { + const el = useHost("useShadowRoot") ; + return el && el.shadowRoot; +} + +function useCssModule(name = "$style") { + { + const instance = runtimeCore.getCurrentInstance(); + if (!instance) { + runtimeCore.warn(`useCssModule must be called inside setup()`); + return shared.EMPTY_OBJ; + } + const modules = instance.type.__cssModules; + if (!modules) { + runtimeCore.warn(`Current instance does not have CSS modules injected.`); + return shared.EMPTY_OBJ; + } + const mod = modules[name]; + if (!mod) { + runtimeCore.warn(`Current instance does not have CSS module named "${name}".`); + return shared.EMPTY_OBJ; + } + return mod; + } +} + +const positionMap = /* @__PURE__ */ new WeakMap(); +const newPositionMap = /* @__PURE__ */ new WeakMap(); +const moveCbKey = Symbol("_moveCb"); +const enterCbKey = Symbol("_enterCb"); +const decorate = (t) => { + delete t.props.mode; + return t; +}; +const TransitionGroupImpl = /* @__PURE__ */ decorate({ + name: "TransitionGroup", + props: /* @__PURE__ */ shared.extend({}, TransitionPropsValidators, { + tag: String, + moveClass: String + }), + setup(props, { slots }) { + const instance = runtimeCore.getCurrentInstance(); + const state = runtimeCore.useTransitionState(); + let prevChildren; + let children; + runtimeCore.onUpdated(() => { + if (!prevChildren.length) { + return; + } + const moveClass = props.moveClass || `${props.name || "v"}-move`; + if (!hasCSSTransform( + prevChildren[0].el, + instance.vnode.el, + moveClass + )) { + return; + } + prevChildren.forEach(callPendingCbs); + prevChildren.forEach(recordPosition); + const movedChildren = prevChildren.filter(applyTranslation); + forceReflow(); + movedChildren.forEach((c) => { + const el = c.el; + const style = el.style; + addTransitionClass(el, moveClass); + style.transform = style.webkitTransform = style.transitionDuration = ""; + const cb = el[moveCbKey] = (e) => { + if (e && e.target !== el) { + return; + } + if (!e || /transform$/.test(e.propertyName)) { + el.removeEventListener("transitionend", cb); + el[moveCbKey] = null; + removeTransitionClass(el, moveClass); + } + }; + el.addEventListener("transitionend", cb); + }); + }); + return () => { + const rawProps = runtimeCore.toRaw(props); + const cssTransitionProps = resolveTransitionProps(rawProps); + let tag = rawProps.tag || runtimeCore.Fragment; + prevChildren = []; + if (children) { + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.el && child.el instanceof Element) { + prevChildren.push(child); + runtimeCore.setTransitionHooks( + child, + runtimeCore.resolveTransitionHooks( + child, + cssTransitionProps, + state, + instance + ) + ); + positionMap.set( + child, + child.el.getBoundingClientRect() + ); + } + } + } + children = slots.default ? runtimeCore.getTransitionRawChildren(slots.default()) : []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.key != null) { + runtimeCore.setTransitionHooks( + child, + runtimeCore.resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + } else if (child.type !== runtimeCore.Text) { + runtimeCore.warn(`<TransitionGroup> children must be keyed.`); + } + } + return runtimeCore.createVNode(tag, null, children); + }; + } +}); +const TransitionGroup = TransitionGroupImpl; +function callPendingCbs(c) { + const el = c.el; + if (el[moveCbKey]) { + el[moveCbKey](); + } + if (el[enterCbKey]) { + el[enterCbKey](); + } +} +function recordPosition(c) { + newPositionMap.set(c, c.el.getBoundingClientRect()); +} +function applyTranslation(c) { + const oldPos = positionMap.get(c); + const newPos = newPositionMap.get(c); + const dx = oldPos.left - newPos.left; + const dy = oldPos.top - newPos.top; + if (dx || dy) { + const s = c.el.style; + s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; + s.transitionDuration = "0s"; + return c; + } +} +function hasCSSTransform(el, root, moveClass) { + const clone = el.cloneNode(); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.forEach((cls) => { + cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); + }); + } + moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); + clone.style.display = "none"; + const container = root.nodeType === 1 ? root : root.parentNode; + container.appendChild(clone); + const { hasTransform } = getTransitionInfo(clone); + container.removeChild(clone); + return hasTransform; +} + +const getModelAssigner = (vnode) => { + const fn = vnode.props["onUpdate:modelValue"] || false; + return shared.isArray(fn) ? (value) => shared.invokeArrayFns(fn, value) : fn; +}; +function onCompositionStart(e) { + e.target.composing = true; +} +function onCompositionEnd(e) { + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } +} +const assignKey = Symbol("_assign"); +const vModelText = { + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = shared.looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); + } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) return; + const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? shared.looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy && value === oldValue) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } +}; +const vModelCheckbox = { + // #4096 array checkboxes need to be deep traversed + deep: true, + created(el, _, vnode) { + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + const modelValue = el._modelValue; + const elementValue = getValue(el); + const checked = el.checked; + const assign = el[assignKey]; + if (shared.isArray(modelValue)) { + const index = shared.looseIndexOf(modelValue, elementValue); + const found = index !== -1; + if (checked && !found) { + assign(modelValue.concat(elementValue)); + } else if (!checked && found) { + const filtered = [...modelValue]; + filtered.splice(index, 1); + assign(filtered); + } + } else if (shared.isSet(modelValue)) { + const cloned = new Set(modelValue); + if (checked) { + cloned.add(elementValue); + } else { + cloned.delete(elementValue); + } + assign(cloned); + } else { + assign(getCheckboxValue(el, checked)); + } + }); + }, + // set initial checked on mount to wait for true-value/false-value + mounted: setChecked, + beforeUpdate(el, binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + setChecked(el, binding, vnode); + } +}; +function setChecked(el, { value, oldValue }, vnode) { + el._modelValue = value; + let checked; + if (shared.isArray(value)) { + checked = shared.looseIndexOf(value, vnode.props.value) > -1; + } else if (shared.isSet(value)) { + checked = value.has(vnode.props.value); + } else { + if (value === oldValue) return; + checked = shared.looseEqual(value, getCheckboxValue(el, true)); + } + if (el.checked !== checked) { + el.checked = checked; + } +} +const vModelRadio = { + created(el, { value }, vnode) { + el.checked = shared.looseEqual(value, vnode.props.value); + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + el[assignKey](getValue(el)); + }); + }, + beforeUpdate(el, { value, oldValue }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (value !== oldValue) { + el.checked = shared.looseEqual(value, vnode.props.value); + } + } +}; +const vModelSelect = { + // <select multiple> value need to be deep traversed + deep: true, + created(el, { value, modifiers: { number } }, vnode) { + const isSetModel = shared.isSet(value); + addEventListener(el, "change", () => { + const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( + (o) => number ? shared.looseToNumber(getValue(o)) : getValue(o) + ); + el[assignKey]( + el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] + ); + el._assigning = true; + runtimeCore.nextTick(() => { + el._assigning = false; + }); + }); + el[assignKey] = getModelAssigner(vnode); + }, + // set value in mounted & updated because <select> relies on its children + // <option>s. + mounted(el, { value }) { + setSelected(el, value); + }, + beforeUpdate(el, _binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + }, + updated(el, { value }) { + if (!el._assigning) { + setSelected(el, value); + } + } +}; +function setSelected(el, value) { + const isMultiple = el.multiple; + const isArrayValue = shared.isArray(value); + if (isMultiple && !isArrayValue && !shared.isSet(value)) { + runtimeCore.warn( + `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` + ); + return; + } + for (let i = 0, l = el.options.length; i < l; i++) { + const option = el.options[i]; + const optionValue = getValue(option); + if (isMultiple) { + if (isArrayValue) { + const optionType = typeof optionValue; + if (optionType === "string" || optionType === "number") { + option.selected = value.some((v) => String(v) === String(optionValue)); + } else { + option.selected = shared.looseIndexOf(value, optionValue) > -1; + } + } else { + option.selected = value.has(optionValue); + } + } else if (shared.looseEqual(getValue(option), value)) { + if (el.selectedIndex !== i) el.selectedIndex = i; + return; + } + } + if (!isMultiple && el.selectedIndex !== -1) { + el.selectedIndex = -1; + } +} +function getValue(el) { + return "_value" in el ? el._value : el.value; +} +function getCheckboxValue(el, checked) { + const key = checked ? "_trueValue" : "_falseValue"; + return key in el ? el[key] : checked; +} +const vModelDynamic = { + created(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "created"); + }, + mounted(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "mounted"); + }, + beforeUpdate(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); + }, + updated(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "updated"); + } +}; +function resolveDynamicModel(tagName, type) { + switch (tagName) { + case "SELECT": + return vModelSelect; + case "TEXTAREA": + return vModelText; + default: + switch (type) { + case "checkbox": + return vModelCheckbox; + case "radio": + return vModelRadio; + default: + return vModelText; + } + } +} +function callModelHook(el, binding, vnode, prevVNode, hook) { + const modelToUse = resolveDynamicModel( + el.tagName, + vnode.props && vnode.props.type + ); + const fn = modelToUse[hook]; + fn && fn(el, binding, vnode, prevVNode); +} +function initVModelForSSR() { + vModelText.getSSRProps = ({ value }) => ({ value }); + vModelRadio.getSSRProps = ({ value }, vnode) => { + if (vnode.props && shared.looseEqual(vnode.props.value, value)) { + return { checked: true }; + } + }; + vModelCheckbox.getSSRProps = ({ value }, vnode) => { + if (shared.isArray(value)) { + if (vnode.props && shared.looseIndexOf(value, vnode.props.value) > -1) { + return { checked: true }; + } + } else if (shared.isSet(value)) { + if (vnode.props && value.has(vnode.props.value)) { + return { checked: true }; + } + } else if (value) { + return { checked: true }; + } + }; + vModelDynamic.getSSRProps = (binding, vnode) => { + if (typeof vnode.type !== "string") { + return; + } + const modelToUse = resolveDynamicModel( + // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase + vnode.type.toUpperCase(), + vnode.props && vnode.props.type + ); + if (modelToUse.getSSRProps) { + return modelToUse.getSSRProps(binding, vnode); + } + }; +} + +const systemModifiers = ["ctrl", "shift", "alt", "meta"]; +const modifierGuards = { + stop: (e) => e.stopPropagation(), + prevent: (e) => e.preventDefault(), + self: (e) => e.target !== e.currentTarget, + ctrl: (e) => !e.ctrlKey, + shift: (e) => !e.shiftKey, + alt: (e) => !e.altKey, + meta: (e) => !e.metaKey, + left: (e) => "button" in e && e.button !== 0, + middle: (e) => "button" in e && e.button !== 1, + right: (e) => "button" in e && e.button !== 2, + exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) +}; +const withModifiers = (fn, modifiers) => { + const cache = fn._withMods || (fn._withMods = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { + for (let i = 0; i < modifiers.length; i++) { + const guard = modifierGuards[modifiers[i]]; + if (guard && guard(event, modifiers)) return; + } + return fn(event, ...args); + }); +}; +const keyNames = { + esc: "escape", + space: " ", + up: "arrow-up", + left: "arrow-left", + right: "arrow-right", + down: "arrow-down", + delete: "backspace" +}; +const withKeys = (fn, modifiers) => { + const cache = fn._withKeys || (fn._withKeys = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event) => { + if (!("key" in event)) { + return; + } + const eventKey = shared.hyphenate(event.key); + if (modifiers.some( + (k) => k === eventKey || keyNames[k] === eventKey + )) { + return fn(event); + } + }); +}; + +const rendererOptions = /* @__PURE__ */ shared.extend({ patchProp }, nodeOps); +let renderer; +let enabledHydration = false; +function ensureRenderer() { + return renderer || (renderer = runtimeCore.createRenderer(rendererOptions)); +} +function ensureHydrationRenderer() { + renderer = enabledHydration ? renderer : runtimeCore.createHydrationRenderer(rendererOptions); + enabledHydration = true; + return renderer; +} +const render = (...args) => { + ensureRenderer().render(...args); +}; +const hydrate = (...args) => { + ensureHydrationRenderer().hydrate(...args); +}; +const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) return; + const component = app._component; + if (!shared.isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; + } + if (container.nodeType === 1) { + container.textContent = ""; + } + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); + } + return proxy; + }; + return app; +}; +const createSSRApp = (...args) => { + const app = ensureHydrationRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (container) { + return mount(container, true, resolveRootNamespace(container)); + } + }; + return app; +}; +function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } +} +function injectNativeTagCheck(app) { + Object.defineProperty(app.config, "isNativeTag", { + value: (tag) => shared.isHTMLTag(tag) || shared.isSVGTag(tag) || shared.isMathMLTag(tag), + writable: false + }); +} +function injectCompilerOptionsCheck(app) { + if (runtimeCore.isRuntimeOnly()) { + const isCustomElement = app.config.isCustomElement; + Object.defineProperty(app.config, "isCustomElement", { + get() { + return isCustomElement; + }, + set() { + runtimeCore.warn( + `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` + ); + } + }); + const compilerOptions = app.config.compilerOptions; + const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. +- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. +- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader +- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; + Object.defineProperty(app.config, "compilerOptions", { + get() { + runtimeCore.warn(msg); + return compilerOptions; + }, + set() { + runtimeCore.warn(msg); + } + }); + } +} +function normalizeContainer(container) { + if (shared.isString(container)) { + const res = document.querySelector(container); + if (!res) { + runtimeCore.warn( + `Failed to mount app: mount target selector "${container}" returned null.` + ); + } + return res; + } + if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { + runtimeCore.warn( + `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` + ); + } + return container; +} +let ssrDirectiveInitialized = false; +const initDirectivesForSSR = () => { + if (!ssrDirectiveInitialized) { + ssrDirectiveInitialized = true; + initVModelForSSR(); + initVShowForSSR(); + } +} ; + +exports.Transition = Transition; +exports.TransitionGroup = TransitionGroup; +exports.VueElement = VueElement; +exports.createApp = createApp; +exports.createSSRApp = createSSRApp; +exports.defineCustomElement = defineCustomElement; +exports.defineSSRCustomElement = defineSSRCustomElement; +exports.hydrate = hydrate; +exports.initDirectivesForSSR = initDirectivesForSSR; +exports.render = render; +exports.useCssModule = useCssModule; +exports.useCssVars = useCssVars; +exports.useHost = useHost; +exports.useShadowRoot = useShadowRoot; +exports.vModelCheckbox = vModelCheckbox; +exports.vModelDynamic = vModelDynamic; +exports.vModelRadio = vModelRadio; +exports.vModelSelect = vModelSelect; +exports.vModelText = vModelText; +exports.vShow = vShow; +exports.withKeys = withKeys; +exports.withModifiers = withModifiers; +Object.keys(runtimeCore).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeCore[k]; +}); diff --git a/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js b/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js new file mode 100644 index 0000000..9e46c11 --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js @@ -0,0 +1,1669 @@ +/** +* @vue/runtime-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var runtimeCore = require('@vue/runtime-core'); +var shared = require('@vue/shared'); + +let policy = void 0; +const tt = typeof window !== "undefined" && window.trustedTypes; +if (tt) { + try { + policy = /* @__PURE__ */ tt.createPolicy("vue", { + createHTML: (val) => val + }); + } catch (e) { + } +} +const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val; +const svgNS = "http://www.w3.org/2000/svg"; +const mathmlNS = "http://www.w3.org/1998/Math/MathML"; +const doc = typeof document !== "undefined" ? document : null; +const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); +const nodeOps = { + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); + } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) break; + } + } else { + templateContainer.innerHTML = unsafeToTrustedHTML( + namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content + ); + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } +}; + +const TRANSITION = "transition"; +const ANIMATION = "animation"; +const vtcKey = Symbol("_vtc"); +const DOMTransitionPropsValidators = { + name: String, + type: String, + css: { + type: Boolean, + default: true + }, + duration: [String, Number, Object], + enterFromClass: String, + enterActiveClass: String, + enterToClass: String, + appearFromClass: String, + appearActiveClass: String, + appearToClass: String, + leaveFromClass: String, + leaveActiveClass: String, + leaveToClass: String +}; +const TransitionPropsValidators = /* @__PURE__ */ shared.extend( + {}, + runtimeCore.BaseTransitionPropsValidators, + DOMTransitionPropsValidators +); +const decorate$1 = (t) => { + t.displayName = "Transition"; + t.props = TransitionPropsValidators; + return t; +}; +const Transition = /* @__PURE__ */ decorate$1( + (props, { slots }) => runtimeCore.h(runtimeCore.BaseTransition, resolveTransitionProps(props), slots) +); +const callHook = (hook, args = []) => { + if (shared.isArray(hook)) { + hook.forEach((h2) => h2(...args)); + } else if (hook) { + hook(...args); + } +}; +const hasExplicitCallback = (hook) => { + return hook ? shared.isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; +}; +function resolveTransitionProps(rawProps) { + const baseProps = {}; + for (const key in rawProps) { + if (!(key in DOMTransitionPropsValidators)) { + baseProps[key] = rawProps[key]; + } + } + if (rawProps.css === false) { + return baseProps; + } + const { + name = "v", + type, + duration, + enterFromClass = `${name}-enter-from`, + enterActiveClass = `${name}-enter-active`, + enterToClass = `${name}-enter-to`, + appearFromClass = enterFromClass, + appearActiveClass = enterActiveClass, + appearToClass = enterToClass, + leaveFromClass = `${name}-leave-from`, + leaveActiveClass = `${name}-leave-active`, + leaveToClass = `${name}-leave-to` + } = rawProps; + const durations = normalizeDuration(duration); + const enterDuration = durations && durations[0]; + const leaveDuration = durations && durations[1]; + const { + onBeforeEnter, + onEnter, + onEnterCancelled, + onLeave, + onLeaveCancelled, + onBeforeAppear = onBeforeEnter, + onAppear = onEnter, + onAppearCancelled = onEnterCancelled + } = baseProps; + const finishEnter = (el, isAppear, done, isCancelled) => { + el._enterCancelled = isCancelled; + removeTransitionClass(el, isAppear ? appearToClass : enterToClass); + removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); + done && done(); + }; + const finishLeave = (el, done) => { + el._isLeaving = false; + removeTransitionClass(el, leaveFromClass); + removeTransitionClass(el, leaveToClass); + removeTransitionClass(el, leaveActiveClass); + done && done(); + }; + const makeEnterHook = (isAppear) => { + return (el, done) => { + const hook = isAppear ? onAppear : onEnter; + const resolve = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve]); + nextFrame(() => { + removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); + addTransitionClass(el, isAppear ? appearToClass : enterToClass); + if (!hasExplicitCallback(hook)) { + whenTransitionEnds(el, type, enterDuration, resolve); + } + }); + }; + }; + return shared.extend(baseProps, { + onBeforeEnter(el) { + callHook(onBeforeEnter, [el]); + addTransitionClass(el, enterFromClass); + addTransitionClass(el, enterActiveClass); + }, + onBeforeAppear(el) { + callHook(onBeforeAppear, [el]); + addTransitionClass(el, appearFromClass); + addTransitionClass(el, appearActiveClass); + }, + onEnter: makeEnterHook(false), + onAppear: makeEnterHook(true), + onLeave(el, done) { + el._isLeaving = true; + const resolve = () => finishLeave(el, done); + addTransitionClass(el, leaveFromClass); + if (!el._enterCancelled) { + forceReflow(); + addTransitionClass(el, leaveActiveClass); + } else { + addTransitionClass(el, leaveActiveClass); + forceReflow(); + } + nextFrame(() => { + if (!el._isLeaving) { + return; + } + removeTransitionClass(el, leaveFromClass); + addTransitionClass(el, leaveToClass); + if (!hasExplicitCallback(onLeave)) { + whenTransitionEnds(el, type, leaveDuration, resolve); + } + }); + callHook(onLeave, [el, resolve]); + }, + onEnterCancelled(el) { + finishEnter(el, false, void 0, true); + callHook(onEnterCancelled, [el]); + }, + onAppearCancelled(el) { + finishEnter(el, true, void 0, true); + callHook(onAppearCancelled, [el]); + }, + onLeaveCancelled(el) { + finishLeave(el); + callHook(onLeaveCancelled, [el]); + } + }); +} +function normalizeDuration(duration) { + if (duration == null) { + return null; + } else if (shared.isObject(duration)) { + return [NumberOf(duration.enter), NumberOf(duration.leave)]; + } else { + const n = NumberOf(duration); + return [n, n]; + } +} +function NumberOf(val) { + const res = shared.toNumber(val); + return res; +} +function addTransitionClass(el, cls) { + cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); + (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); +} +function removeTransitionClass(el, cls) { + cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.delete(cls); + if (!_vtc.size) { + el[vtcKey] = void 0; + } + } +} +function nextFrame(cb) { + requestAnimationFrame(() => { + requestAnimationFrame(cb); + }); +} +let endId = 0; +function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { + const id = el._endId = ++endId; + const resolveIfNotStale = () => { + if (id === el._endId) { + resolve(); + } + }; + if (explicitTimeout != null) { + return setTimeout(resolveIfNotStale, explicitTimeout); + } + const { type, timeout, propCount } = getTransitionInfo(el, expectedType); + if (!type) { + return resolve(); + } + const endEvent = type + "end"; + let ended = 0; + const end = () => { + el.removeEventListener(endEvent, onEnd); + resolveIfNotStale(); + }; + const onEnd = (e) => { + if (e.target === el && ++ended >= propCount) { + end(); + } + }; + setTimeout(() => { + if (ended < propCount) { + end(); + } + }, timeout + 1); + el.addEventListener(endEvent, onEnd); +} +function getTransitionInfo(el, expectedType) { + const styles = window.getComputedStyle(el); + const getStyleProperties = (key) => (styles[key] || "").split(", "); + const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); + const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); + const transitionTimeout = getTimeout(transitionDelays, transitionDurations); + const animationDelays = getStyleProperties(`${ANIMATION}Delay`); + const animationDurations = getStyleProperties(`${ANIMATION}Duration`); + const animationTimeout = getTimeout(animationDelays, animationDurations); + let type = null; + let timeout = 0; + let propCount = 0; + if (expectedType === TRANSITION) { + if (transitionTimeout > 0) { + type = TRANSITION; + timeout = transitionTimeout; + propCount = transitionDurations.length; + } + } else if (expectedType === ANIMATION) { + if (animationTimeout > 0) { + type = ANIMATION; + timeout = animationTimeout; + propCount = animationDurations.length; + } + } else { + timeout = Math.max(transitionTimeout, animationTimeout); + type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; + propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; + } + const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( + getStyleProperties(`${TRANSITION}Property`).toString() + ); + return { + type, + timeout, + propCount, + hasTransform + }; +} +function getTimeout(delays, durations) { + while (delays.length < durations.length) { + delays = delays.concat(delays); + } + return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); +} +function toMs(s) { + if (s === "auto") return 0; + return Number(s.slice(0, -1).replace(",", ".")) * 1e3; +} +function forceReflow() { + return document.body.offsetHeight; +} + +function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } +} + +const vShowOriginalDisplay = Symbol("_vod"); +const vShowHidden = Symbol("_vsh"); +const vShow = { + beforeMount(el, { value }, { transition }) { + el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display; + if (transition && value) { + transition.beforeEnter(el); + } else { + setDisplay(el, value); + } + }, + mounted(el, { value }, { transition }) { + if (transition && value) { + transition.enter(el); + } + }, + updated(el, { value, oldValue }, { transition }) { + if (!value === !oldValue) return; + if (transition) { + if (value) { + transition.beforeEnter(el); + setDisplay(el, true); + transition.enter(el); + } else { + transition.leave(el, () => { + setDisplay(el, false); + }); + } + } else { + setDisplay(el, value); + } + }, + beforeUnmount(el, { value }) { + setDisplay(el, value); + } +}; +function setDisplay(el, value) { + el.style.display = value ? el[vShowOriginalDisplay] : "none"; + el[vShowHidden] = !value; +} +function initVShowForSSR() { + vShow.getSSRProps = ({ value }) => { + if (!value) { + return { style: { display: "none" } }; + } + }; +} + +const CSS_VAR_TEXT = Symbol(""); +function useCssVars(getter) { + return; +} + +const displayRE = /(^|;)\s*display\s*:/; +function patchStyle(el, prev, next) { + const style = el.style; + const isCssString = shared.isString(next); + let hasControlledDisplay = false; + if (next && !isCssString) { + if (prev) { + if (!shared.isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } else { + for (const prevStyle of prev.split(";")) { + const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim(); + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + } + for (const key in next) { + if (key === "display") { + hasControlledDisplay = true; + } + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + hasControlledDisplay = displayRE.test(next); + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOriginalDisplay in el) { + el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : ""; + if (el[vShowHidden]) { + style.display = "none"; + } + } +} +const importantRE = /\s*!important$/; +function setStyle(style, name, val) { + if (shared.isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) val = ""; + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + shared.hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } +} +const prefixes = ["Webkit", "Moz", "ms"]; +const prefixCache = {}; +function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = runtimeCore.camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = shared.capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; +} + +const xlinkNS = "http://www.w3.org/1999/xlink"; +function patchAttr(el, key, value, isSVG, instance, isBoolean = shared.isSpecialBooleanAttr(key)) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + if (value == null || isBoolean && !shared.includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute( + key, + isBoolean ? "" : shared.isSymbol(value) ? String(value) : value + ); + } + } +} + +function patchDOMProp(el, key, value, parentComponent, attrName) { + if (key === "innerHTML" || key === "textContent") { + if (value != null) { + el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value; + } + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; + const newValue = value == null ? ( + // #11647: value should be set as empty string for null and undefined, + // but <input type="checkbox"> should be set as 'on'. + el.type === "checkbox" ? "on" : "" + ) : String(value); + if (oldValue !== newValue || !("_value" in el)) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + el._value = value; + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = shared.includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + } + needRemove && el.removeAttribute(attrName || key); +} + +function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); +} +function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); +} +const veiKey = Symbol("_vei"); +function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = nextValue; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker( + nextValue, + instance + ); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } +} +const optionsModifierRE = /(?:Once|Passive|Capture)$/; +function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : shared.hyphenate(name.slice(2)); + return [event, options]; +} +let cachedNow = 0; +const p = /* @__PURE__ */ Promise.resolve(); +const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); +function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + runtimeCore.callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; +} +function patchStopImmediatePropagation(e, value) { + if (shared.isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map( + (fn) => (e2) => !e2._stopped && fn && fn(e2) + ); + } else { + return value; + } +} + +const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter +key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; +const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (shared.isOn(key)) { + if (!shared.isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp(el, key, nextValue); + if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { + patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); + } + } else if ( + // #11081 force set props for possible async custom element + el._isVueCE && (/[A-Z]/.test(key) || !shared.isString(nextValue)) + ) { + patchDOMProp(el, shared.camelize(key), nextValue, parentComponent, key); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } +}; +function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && shared.isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && shared.isString(value)) { + return false; + } + return key in el; +} + +const REMOVAL = {}; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineCustomElement(options, extraOptions, _createApp) { + const Comp = runtimeCore.defineComponent(options, extraOptions); + if (shared.isPlainObject(Comp)) shared.extend(Comp, extraOptions); + class VueCustomElement extends VueElement { + constructor(initialProps) { + super(Comp, initialProps, _createApp); + } + } + VueCustomElement.def = Comp; + return VueCustomElement; +} +/*! #__NO_SIDE_EFFECTS__ */ +const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => { + return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp); +}; +const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { +}; +class VueElement extends BaseClass { + constructor(_def, _props = {}, _createApp = createApp) { + super(); + this._def = _def; + this._props = _props; + this._createApp = _createApp; + this._isVueCE = true; + /** + * @internal + */ + this._instance = null; + /** + * @internal + */ + this._app = null; + /** + * @internal + */ + this._nonce = this._def.nonce; + this._connected = false; + this._resolved = false; + this._numberProps = null; + this._styleChildren = /* @__PURE__ */ new WeakSet(); + this._ob = null; + if (this.shadowRoot && _createApp !== createApp) { + this._root = this.shadowRoot; + } else { + if (_def.shadowRoot !== false) { + this.attachShadow({ mode: "open" }); + this._root = this.shadowRoot; + } else { + this._root = this; + } + } + if (!this._def.__asyncLoader) { + this._resolveProps(this._def); + } + } + connectedCallback() { + if (!this.isConnected) return; + if (!this.shadowRoot) { + this._parseSlots(); + } + this._connected = true; + let parent = this; + while (parent = parent && (parent.parentNode || parent.host)) { + if (parent instanceof VueElement) { + this._parent = parent; + break; + } + } + if (!this._instance) { + if (this._resolved) { + this._setParent(); + this._update(); + } else { + if (parent && parent._pendingResolve) { + this._pendingResolve = parent._pendingResolve.then(() => { + this._pendingResolve = void 0; + this._resolveDef(); + }); + } else { + this._resolveDef(); + } + } + } + } + _setParent(parent = this._parent) { + if (parent) { + this._instance.parent = parent._instance; + this._instance.provides = parent._instance.provides; + } + } + disconnectedCallback() { + this._connected = false; + runtimeCore.nextTick(() => { + if (!this._connected) { + if (this._ob) { + this._ob.disconnect(); + this._ob = null; + } + this._app && this._app.unmount(); + if (this._instance) this._instance.ce = void 0; + this._app = this._instance = null; + } + }); + } + /** + * resolve inner component definition (handle possible async component) + */ + _resolveDef() { + if (this._pendingResolve) { + return; + } + for (let i = 0; i < this.attributes.length; i++) { + this._setAttr(this.attributes[i].name); + } + this._ob = new MutationObserver((mutations) => { + for (const m of mutations) { + this._setAttr(m.attributeName); + } + }); + this._ob.observe(this, { attributes: true }); + const resolve = (def, isAsync = false) => { + this._resolved = true; + this._pendingResolve = void 0; + const { props, styles } = def; + let numberProps; + if (props && !shared.isArray(props)) { + for (const key in props) { + const opt = props[key]; + if (opt === Number || opt && opt.type === Number) { + if (key in this._props) { + this._props[key] = shared.toNumber(this._props[key]); + } + (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[shared.camelize(key)] = true; + } + } + } + this._numberProps = numberProps; + if (isAsync) { + this._resolveProps(def); + } + if (this.shadowRoot) { + this._applyStyles(styles); + } + this._mount(def); + }; + const asyncDef = this._def.__asyncLoader; + if (asyncDef) { + this._pendingResolve = asyncDef().then( + (def) => resolve(this._def = def, true) + ); + } else { + resolve(this._def); + } + } + _mount(def) { + this._app = this._createApp(def); + if (def.configureApp) { + def.configureApp(this._app); + } + this._app._ceVNode = this._createVNode(); + this._app.mount(this._root); + const exposed = this._instance && this._instance.exposed; + if (!exposed) return; + for (const key in exposed) { + if (!shared.hasOwn(this, key)) { + Object.defineProperty(this, key, { + // unwrap ref to be consistent with public instance behavior + get: () => runtimeCore.unref(exposed[key]) + }); + } + } + } + _resolveProps(def) { + const { props } = def; + const declaredPropKeys = shared.isArray(props) ? props : Object.keys(props || {}); + for (const key of Object.keys(this)) { + if (key[0] !== "_" && declaredPropKeys.includes(key)) { + this._setProp(key, this[key]); + } + } + for (const key of declaredPropKeys.map(shared.camelize)) { + Object.defineProperty(this, key, { + get() { + return this._getProp(key); + }, + set(val) { + this._setProp(key, val, true, true); + } + }); + } + } + _setAttr(key) { + if (key.startsWith("data-v-")) return; + const has = this.hasAttribute(key); + let value = has ? this.getAttribute(key) : REMOVAL; + const camelKey = shared.camelize(key); + if (has && this._numberProps && this._numberProps[camelKey]) { + value = shared.toNumber(value); + } + this._setProp(camelKey, value, false, true); + } + /** + * @internal + */ + _getProp(key) { + return this._props[key]; + } + /** + * @internal + */ + _setProp(key, val, shouldReflect = true, shouldUpdate = false) { + if (val !== this._props[key]) { + if (val === REMOVAL) { + delete this._props[key]; + } else { + this._props[key] = val; + if (key === "key" && this._app) { + this._app._ceVNode.key = val; + } + } + if (shouldUpdate && this._instance) { + this._update(); + } + if (shouldReflect) { + const ob = this._ob; + ob && ob.disconnect(); + if (val === true) { + this.setAttribute(shared.hyphenate(key), ""); + } else if (typeof val === "string" || typeof val === "number") { + this.setAttribute(shared.hyphenate(key), val + ""); + } else if (!val) { + this.removeAttribute(shared.hyphenate(key)); + } + ob && ob.observe(this, { attributes: true }); + } + } + } + _update() { + render(this._createVNode(), this._root); + } + _createVNode() { + const baseProps = {}; + if (!this.shadowRoot) { + baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this); + } + const vnode = runtimeCore.createVNode(this._def, shared.extend(baseProps, this._props)); + if (!this._instance) { + vnode.ce = (instance) => { + this._instance = instance; + instance.ce = this; + instance.isCE = true; + const dispatch = (event, args) => { + this.dispatchEvent( + new CustomEvent( + event, + shared.isPlainObject(args[0]) ? shared.extend({ detail: args }, args[0]) : { detail: args } + ) + ); + }; + instance.emit = (event, ...args) => { + dispatch(event, args); + if (shared.hyphenate(event) !== event) { + dispatch(shared.hyphenate(event), args); + } + }; + this._setParent(); + }; + } + return vnode; + } + _applyStyles(styles, owner) { + if (!styles) return; + if (owner) { + if (owner === this._def || this._styleChildren.has(owner)) { + return; + } + this._styleChildren.add(owner); + } + const nonce = this._nonce; + for (let i = styles.length - 1; i >= 0; i--) { + const s = document.createElement("style"); + if (nonce) s.setAttribute("nonce", nonce); + s.textContent = styles[i]; + this.shadowRoot.prepend(s); + } + } + /** + * Only called when shadowRoot is false + */ + _parseSlots() { + const slots = this._slots = {}; + let n; + while (n = this.firstChild) { + const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default"; + (slots[slotName] || (slots[slotName] = [])).push(n); + this.removeChild(n); + } + } + /** + * Only called when shadowRoot is false + */ + _renderSlots() { + const outlets = (this._teleportTarget || this).querySelectorAll("slot"); + const scopeId = this._instance.type.__scopeId; + for (let i = 0; i < outlets.length; i++) { + const o = outlets[i]; + const slotName = o.getAttribute("name") || "default"; + const content = this._slots[slotName]; + const parent = o.parentNode; + if (content) { + for (const n of content) { + if (scopeId && n.nodeType === 1) { + const id = scopeId + "-s"; + const walker = document.createTreeWalker(n, 1); + n.setAttribute(id, ""); + let child; + while (child = walker.nextNode()) { + child.setAttribute(id, ""); + } + } + parent.insertBefore(n, o); + } + } else { + while (o.firstChild) parent.insertBefore(o.firstChild, o); + } + parent.removeChild(o); + } + } + /** + * @internal + */ + _injectChildStyle(comp) { + this._applyStyles(comp.styles, comp); + } + /** + * @internal + */ + _removeChildStyle(comp) { + } +} +function useHost(caller) { + const instance = runtimeCore.getCurrentInstance(); + const el = instance && instance.ce; + if (el) { + return el; + } + return null; +} +function useShadowRoot() { + const el = useHost(); + return el && el.shadowRoot; +} + +function useCssModule(name = "$style") { + { + const instance = runtimeCore.getCurrentInstance(); + if (!instance) { + return shared.EMPTY_OBJ; + } + const modules = instance.type.__cssModules; + if (!modules) { + return shared.EMPTY_OBJ; + } + const mod = modules[name]; + if (!mod) { + return shared.EMPTY_OBJ; + } + return mod; + } +} + +const positionMap = /* @__PURE__ */ new WeakMap(); +const newPositionMap = /* @__PURE__ */ new WeakMap(); +const moveCbKey = Symbol("_moveCb"); +const enterCbKey = Symbol("_enterCb"); +const decorate = (t) => { + delete t.props.mode; + return t; +}; +const TransitionGroupImpl = /* @__PURE__ */ decorate({ + name: "TransitionGroup", + props: /* @__PURE__ */ shared.extend({}, TransitionPropsValidators, { + tag: String, + moveClass: String + }), + setup(props, { slots }) { + const instance = runtimeCore.getCurrentInstance(); + const state = runtimeCore.useTransitionState(); + let prevChildren; + let children; + runtimeCore.onUpdated(() => { + if (!prevChildren.length) { + return; + } + const moveClass = props.moveClass || `${props.name || "v"}-move`; + if (!hasCSSTransform( + prevChildren[0].el, + instance.vnode.el, + moveClass + )) { + return; + } + prevChildren.forEach(callPendingCbs); + prevChildren.forEach(recordPosition); + const movedChildren = prevChildren.filter(applyTranslation); + forceReflow(); + movedChildren.forEach((c) => { + const el = c.el; + const style = el.style; + addTransitionClass(el, moveClass); + style.transform = style.webkitTransform = style.transitionDuration = ""; + const cb = el[moveCbKey] = (e) => { + if (e && e.target !== el) { + return; + } + if (!e || /transform$/.test(e.propertyName)) { + el.removeEventListener("transitionend", cb); + el[moveCbKey] = null; + removeTransitionClass(el, moveClass); + } + }; + el.addEventListener("transitionend", cb); + }); + }); + return () => { + const rawProps = runtimeCore.toRaw(props); + const cssTransitionProps = resolveTransitionProps(rawProps); + let tag = rawProps.tag || runtimeCore.Fragment; + prevChildren = []; + if (children) { + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.el && child.el instanceof Element) { + prevChildren.push(child); + runtimeCore.setTransitionHooks( + child, + runtimeCore.resolveTransitionHooks( + child, + cssTransitionProps, + state, + instance + ) + ); + positionMap.set( + child, + child.el.getBoundingClientRect() + ); + } + } + } + children = slots.default ? runtimeCore.getTransitionRawChildren(slots.default()) : []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.key != null) { + runtimeCore.setTransitionHooks( + child, + runtimeCore.resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + } + } + return runtimeCore.createVNode(tag, null, children); + }; + } +}); +const TransitionGroup = TransitionGroupImpl; +function callPendingCbs(c) { + const el = c.el; + if (el[moveCbKey]) { + el[moveCbKey](); + } + if (el[enterCbKey]) { + el[enterCbKey](); + } +} +function recordPosition(c) { + newPositionMap.set(c, c.el.getBoundingClientRect()); +} +function applyTranslation(c) { + const oldPos = positionMap.get(c); + const newPos = newPositionMap.get(c); + const dx = oldPos.left - newPos.left; + const dy = oldPos.top - newPos.top; + if (dx || dy) { + const s = c.el.style; + s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; + s.transitionDuration = "0s"; + return c; + } +} +function hasCSSTransform(el, root, moveClass) { + const clone = el.cloneNode(); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.forEach((cls) => { + cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); + }); + } + moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); + clone.style.display = "none"; + const container = root.nodeType === 1 ? root : root.parentNode; + container.appendChild(clone); + const { hasTransform } = getTransitionInfo(clone); + container.removeChild(clone); + return hasTransform; +} + +const getModelAssigner = (vnode) => { + const fn = vnode.props["onUpdate:modelValue"] || false; + return shared.isArray(fn) ? (value) => shared.invokeArrayFns(fn, value) : fn; +}; +function onCompositionStart(e) { + e.target.composing = true; +} +function onCompositionEnd(e) { + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } +} +const assignKey = Symbol("_assign"); +const vModelText = { + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = shared.looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); + } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) return; + const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? shared.looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy && value === oldValue) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } +}; +const vModelCheckbox = { + // #4096 array checkboxes need to be deep traversed + deep: true, + created(el, _, vnode) { + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + const modelValue = el._modelValue; + const elementValue = getValue(el); + const checked = el.checked; + const assign = el[assignKey]; + if (shared.isArray(modelValue)) { + const index = shared.looseIndexOf(modelValue, elementValue); + const found = index !== -1; + if (checked && !found) { + assign(modelValue.concat(elementValue)); + } else if (!checked && found) { + const filtered = [...modelValue]; + filtered.splice(index, 1); + assign(filtered); + } + } else if (shared.isSet(modelValue)) { + const cloned = new Set(modelValue); + if (checked) { + cloned.add(elementValue); + } else { + cloned.delete(elementValue); + } + assign(cloned); + } else { + assign(getCheckboxValue(el, checked)); + } + }); + }, + // set initial checked on mount to wait for true-value/false-value + mounted: setChecked, + beforeUpdate(el, binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + setChecked(el, binding, vnode); + } +}; +function setChecked(el, { value, oldValue }, vnode) { + el._modelValue = value; + let checked; + if (shared.isArray(value)) { + checked = shared.looseIndexOf(value, vnode.props.value) > -1; + } else if (shared.isSet(value)) { + checked = value.has(vnode.props.value); + } else { + if (value === oldValue) return; + checked = shared.looseEqual(value, getCheckboxValue(el, true)); + } + if (el.checked !== checked) { + el.checked = checked; + } +} +const vModelRadio = { + created(el, { value }, vnode) { + el.checked = shared.looseEqual(value, vnode.props.value); + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + el[assignKey](getValue(el)); + }); + }, + beforeUpdate(el, { value, oldValue }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (value !== oldValue) { + el.checked = shared.looseEqual(value, vnode.props.value); + } + } +}; +const vModelSelect = { + // <select multiple> value need to be deep traversed + deep: true, + created(el, { value, modifiers: { number } }, vnode) { + const isSetModel = shared.isSet(value); + addEventListener(el, "change", () => { + const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( + (o) => number ? shared.looseToNumber(getValue(o)) : getValue(o) + ); + el[assignKey]( + el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] + ); + el._assigning = true; + runtimeCore.nextTick(() => { + el._assigning = false; + }); + }); + el[assignKey] = getModelAssigner(vnode); + }, + // set value in mounted & updated because <select> relies on its children + // <option>s. + mounted(el, { value }) { + setSelected(el, value); + }, + beforeUpdate(el, _binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + }, + updated(el, { value }) { + if (!el._assigning) { + setSelected(el, value); + } + } +}; +function setSelected(el, value) { + const isMultiple = el.multiple; + const isArrayValue = shared.isArray(value); + if (isMultiple && !isArrayValue && !shared.isSet(value)) { + return; + } + for (let i = 0, l = el.options.length; i < l; i++) { + const option = el.options[i]; + const optionValue = getValue(option); + if (isMultiple) { + if (isArrayValue) { + const optionType = typeof optionValue; + if (optionType === "string" || optionType === "number") { + option.selected = value.some((v) => String(v) === String(optionValue)); + } else { + option.selected = shared.looseIndexOf(value, optionValue) > -1; + } + } else { + option.selected = value.has(optionValue); + } + } else if (shared.looseEqual(getValue(option), value)) { + if (el.selectedIndex !== i) el.selectedIndex = i; + return; + } + } + if (!isMultiple && el.selectedIndex !== -1) { + el.selectedIndex = -1; + } +} +function getValue(el) { + return "_value" in el ? el._value : el.value; +} +function getCheckboxValue(el, checked) { + const key = checked ? "_trueValue" : "_falseValue"; + return key in el ? el[key] : checked; +} +const vModelDynamic = { + created(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "created"); + }, + mounted(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "mounted"); + }, + beforeUpdate(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); + }, + updated(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "updated"); + } +}; +function resolveDynamicModel(tagName, type) { + switch (tagName) { + case "SELECT": + return vModelSelect; + case "TEXTAREA": + return vModelText; + default: + switch (type) { + case "checkbox": + return vModelCheckbox; + case "radio": + return vModelRadio; + default: + return vModelText; + } + } +} +function callModelHook(el, binding, vnode, prevVNode, hook) { + const modelToUse = resolveDynamicModel( + el.tagName, + vnode.props && vnode.props.type + ); + const fn = modelToUse[hook]; + fn && fn(el, binding, vnode, prevVNode); +} +function initVModelForSSR() { + vModelText.getSSRProps = ({ value }) => ({ value }); + vModelRadio.getSSRProps = ({ value }, vnode) => { + if (vnode.props && shared.looseEqual(vnode.props.value, value)) { + return { checked: true }; + } + }; + vModelCheckbox.getSSRProps = ({ value }, vnode) => { + if (shared.isArray(value)) { + if (vnode.props && shared.looseIndexOf(value, vnode.props.value) > -1) { + return { checked: true }; + } + } else if (shared.isSet(value)) { + if (vnode.props && value.has(vnode.props.value)) { + return { checked: true }; + } + } else if (value) { + return { checked: true }; + } + }; + vModelDynamic.getSSRProps = (binding, vnode) => { + if (typeof vnode.type !== "string") { + return; + } + const modelToUse = resolveDynamicModel( + // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase + vnode.type.toUpperCase(), + vnode.props && vnode.props.type + ); + if (modelToUse.getSSRProps) { + return modelToUse.getSSRProps(binding, vnode); + } + }; +} + +const systemModifiers = ["ctrl", "shift", "alt", "meta"]; +const modifierGuards = { + stop: (e) => e.stopPropagation(), + prevent: (e) => e.preventDefault(), + self: (e) => e.target !== e.currentTarget, + ctrl: (e) => !e.ctrlKey, + shift: (e) => !e.shiftKey, + alt: (e) => !e.altKey, + meta: (e) => !e.metaKey, + left: (e) => "button" in e && e.button !== 0, + middle: (e) => "button" in e && e.button !== 1, + right: (e) => "button" in e && e.button !== 2, + exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) +}; +const withModifiers = (fn, modifiers) => { + const cache = fn._withMods || (fn._withMods = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { + for (let i = 0; i < modifiers.length; i++) { + const guard = modifierGuards[modifiers[i]]; + if (guard && guard(event, modifiers)) return; + } + return fn(event, ...args); + }); +}; +const keyNames = { + esc: "escape", + space: " ", + up: "arrow-up", + left: "arrow-left", + right: "arrow-right", + down: "arrow-down", + delete: "backspace" +}; +const withKeys = (fn, modifiers) => { + const cache = fn._withKeys || (fn._withKeys = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event) => { + if (!("key" in event)) { + return; + } + const eventKey = shared.hyphenate(event.key); + if (modifiers.some( + (k) => k === eventKey || keyNames[k] === eventKey + )) { + return fn(event); + } + }); +}; + +const rendererOptions = /* @__PURE__ */ shared.extend({ patchProp }, nodeOps); +let renderer; +let enabledHydration = false; +function ensureRenderer() { + return renderer || (renderer = runtimeCore.createRenderer(rendererOptions)); +} +function ensureHydrationRenderer() { + renderer = enabledHydration ? renderer : runtimeCore.createHydrationRenderer(rendererOptions); + enabledHydration = true; + return renderer; +} +const render = (...args) => { + ensureRenderer().render(...args); +}; +const hydrate = (...args) => { + ensureHydrationRenderer().hydrate(...args); +}; +const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) return; + const component = app._component; + if (!shared.isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; + } + if (container.nodeType === 1) { + container.textContent = ""; + } + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); + } + return proxy; + }; + return app; +}; +const createSSRApp = (...args) => { + const app = ensureHydrationRenderer().createApp(...args); + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (container) { + return mount(container, true, resolveRootNamespace(container)); + } + }; + return app; +}; +function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } +} +function normalizeContainer(container) { + if (shared.isString(container)) { + const res = document.querySelector(container); + return res; + } + return container; +} +let ssrDirectiveInitialized = false; +const initDirectivesForSSR = () => { + if (!ssrDirectiveInitialized) { + ssrDirectiveInitialized = true; + initVModelForSSR(); + initVShowForSSR(); + } +} ; + +exports.Transition = Transition; +exports.TransitionGroup = TransitionGroup; +exports.VueElement = VueElement; +exports.createApp = createApp; +exports.createSSRApp = createSSRApp; +exports.defineCustomElement = defineCustomElement; +exports.defineSSRCustomElement = defineSSRCustomElement; +exports.hydrate = hydrate; +exports.initDirectivesForSSR = initDirectivesForSSR; +exports.render = render; +exports.useCssModule = useCssModule; +exports.useCssVars = useCssVars; +exports.useHost = useHost; +exports.useShadowRoot = useShadowRoot; +exports.vModelCheckbox = vModelCheckbox; +exports.vModelDynamic = vModelDynamic; +exports.vModelRadio = vModelRadio; +exports.vModelSelect = vModelSelect; +exports.vModelText = vModelText; +exports.vShow = vShow; +exports.withKeys = withKeys; +exports.withModifiers = withModifiers; +Object.keys(runtimeCore).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeCore[k]; +}); diff --git a/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts b/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts new file mode 100644 index 0000000..72d2b8b --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts @@ -0,0 +1,1395 @@ +import { BaseTransitionProps, FunctionalComponent, ObjectDirective, Directive, App, SetupContext, RenderFunction, ComponentOptions, ComponentObjectPropsOptions, EmitsOptions, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentInjectOptions, SlotsType, Component, ComponentProvideOptions, ExtractPropTypes, EmitsToProps, ComponentOptionsBase, CreateComponentPublicInstanceWithMixins, ComponentPublicInstance, DefineComponent, ComponentCustomElementInterface, CreateAppFunction, ConcreteComponent, VNodeRef, RootRenderFunction, RootHydrateFunction } from '@vue/runtime-core'; +export * from '@vue/runtime-core'; +import * as CSS from 'csstype'; + +declare const TRANSITION = "transition"; +declare const ANIMATION = "animation"; +type AnimationTypes = typeof TRANSITION | typeof ANIMATION; +export interface TransitionProps extends BaseTransitionProps<Element> { + name?: string; + type?: AnimationTypes; + css?: boolean; + duration?: number | { + enter: number; + leave: number; + }; + enterFromClass?: string; + enterActiveClass?: string; + enterToClass?: string; + appearFromClass?: string; + appearActiveClass?: string; + appearToClass?: string; + leaveFromClass?: string; + leaveActiveClass?: string; + leaveToClass?: string; +} +/** + * DOM Transition is a higher-order-component based on the platform-agnostic + * base Transition component, with DOM-specific logic. + */ +export declare const Transition: FunctionalComponent<TransitionProps>; + +export type TransitionGroupProps = Omit<TransitionProps, 'mode'> & { + tag?: string; + moveClass?: string; +}; +export declare const TransitionGroup: { + new (): { + $props: TransitionGroupProps; + }; +}; + +declare const vShowOriginalDisplay: unique symbol; +declare const vShowHidden: unique symbol; +interface VShowElement extends HTMLElement { + [vShowOriginalDisplay]: string; + [vShowHidden]: boolean; +} +export declare const vShow: ObjectDirective<VShowElement> & { + name?: 'show'; +}; + +declare const systemModifiers: readonly ["ctrl", "shift", "alt", "meta"]; +type SystemModifiers = (typeof systemModifiers)[number]; +type CompatModifiers = keyof typeof keyNames; +type VOnModifiers = SystemModifiers | ModifierGuards | CompatModifiers; +type ModifierGuards = 'shift' | 'ctrl' | 'alt' | 'meta' | 'left' | 'right' | 'stop' | 'prevent' | 'self' | 'middle' | 'exact'; +/** + * @private + */ +export declare const withModifiers: <T extends (event: Event, ...args: unknown[]) => any>(fn: T & { + _withMods?: { + [key: string]: T; + }; +}, modifiers: VOnModifiers[]) => T; +declare const keyNames: Record<'esc' | 'space' | 'up' | 'left' | 'right' | 'down' | 'delete', string>; +/** + * @private + */ +export declare const withKeys: <T extends (event: KeyboardEvent) => any>(fn: T & { + _withKeys?: { + [k: string]: T; + }; +}, modifiers: string[]) => T; +type VOnDirective = Directive<any, any, VOnModifiers>; + +type AssignerFn = (value: any) => void; +declare const assignKey: unique symbol; +type ModelDirective<T, Modifiers extends string = string> = ObjectDirective<T & { + [assignKey]: AssignerFn; + _assigning?: boolean; +}, any, Modifiers>; +export declare const vModelText: ModelDirective<HTMLInputElement | HTMLTextAreaElement, 'trim' | 'number' | 'lazy'>; +export declare const vModelCheckbox: ModelDirective<HTMLInputElement>; +export declare const vModelRadio: ModelDirective<HTMLInputElement>; +export declare const vModelSelect: ModelDirective<HTMLSelectElement, 'number'>; +export declare const vModelDynamic: ObjectDirective<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>; +type VModelDirective = typeof vModelText | typeof vModelCheckbox | typeof vModelSelect | typeof vModelRadio | typeof vModelDynamic; + +export type VueElementConstructor<P = {}> = { + new (initialProps?: Record<string, any>): VueElement & P; +}; +export interface CustomElementOptions { + styles?: string[]; + shadowRoot?: boolean; + nonce?: string; + configureApp?: (app: App) => void; +} +export declare function defineCustomElement<Props, RawBindings = object>(setup: (props: Props, ctx: SetupContext) => RawBindings | RenderFunction, options?: Pick<ComponentOptions, 'name' | 'inheritAttrs' | 'emits'> & CustomElementOptions & { + props?: (keyof Props)[]; +}): VueElementConstructor<Props>; +export declare function defineCustomElement<Props, RawBindings = object>(setup: (props: Props, ctx: SetupContext) => RawBindings | RenderFunction, options?: Pick<ComponentOptions, 'name' | 'inheritAttrs' | 'emits'> & CustomElementOptions & { + props?: ComponentObjectPropsOptions<Props>; +}): VueElementConstructor<Props>; +export declare function defineCustomElement<RuntimePropsOptions extends ComponentObjectPropsOptions = ComponentObjectPropsOptions, PropsKeys extends string = string, RuntimeEmitsOptions extends EmitsOptions = {}, EmitsKeys extends string = string, Data = {}, SetupBindings = {}, Computed extends ComputedOptions = {}, Methods extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, InjectOptions extends ComponentInjectOptions = {}, InjectKeys extends string = string, Slots extends SlotsType = {}, LocalComponents extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, InferredProps = string extends PropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : { + [key in PropsKeys]?: any; +}, ResolvedProps = InferredProps & EmitsToProps<RuntimeEmitsOptions>>(options: CustomElementOptions & { + props?: (RuntimePropsOptions & ThisType<void>) | PropsKeys[]; +} & ComponentOptionsBase<ResolvedProps, SetupBindings, Data, Computed, Methods, Mixin, Extends, RuntimeEmitsOptions, EmitsKeys, {}, // Defaults +InjectOptions, InjectKeys, Slots, LocalComponents, Directives, Exposed, Provide> & ThisType<CreateComponentPublicInstanceWithMixins<Readonly<ResolvedProps>, SetupBindings, Data, Computed, Methods, Mixin, Extends, RuntimeEmitsOptions, EmitsKeys, {}, false, InjectOptions, Slots, LocalComponents, Directives, Exposed>>, extraOptions?: CustomElementOptions): VueElementConstructor<ResolvedProps>; +export declare function defineCustomElement<T extends { + new (...args: any[]): ComponentPublicInstance<any>; +}>(options: T, extraOptions?: CustomElementOptions): VueElementConstructor<T extends DefineComponent<infer P, any, any, any> ? P : unknown>; +/*! #__NO_SIDE_EFFECTS__ */ +export declare const defineSSRCustomElement: typeof defineCustomElement; +declare const BaseClass: typeof HTMLElement; +type InnerComponentDef = ConcreteComponent & CustomElementOptions; +export declare class VueElement extends BaseClass implements ComponentCustomElementInterface { + /** + * Component def - note this may be an AsyncWrapper, and this._def will + * be overwritten by the inner component when resolved. + */ + private _def; + private _props; + private _createApp; + _isVueCE: boolean; + private _connected; + private _resolved; + private _numberProps; + private _styleChildren; + private _pendingResolve; + private _parent; + /** + * dev only + */ + private _styles?; + /** + * dev only + */ + private _childStyles?; + private _ob?; + private _slots?; + constructor( + /** + * Component def - note this may be an AsyncWrapper, and this._def will + * be overwritten by the inner component when resolved. + */ + _def: InnerComponentDef, _props?: Record<string, any>, _createApp?: CreateAppFunction<Element>); + connectedCallback(): void; + private _setParent; + disconnectedCallback(): void; + /** + * resolve inner component definition (handle possible async component) + */ + private _resolveDef; + private _mount; + private _resolveProps; + protected _setAttr(key: string): void; + private _update; + private _createVNode; + private _applyStyles; + /** + * Only called when shadowRoot is false + */ + private _parseSlots; + /** + * Only called when shadowRoot is false + */ + private _renderSlots; +} +export declare function useHost(caller?: string): VueElement | null; +/** + * Retrieve the shadowRoot of the current custom element. Only usable in setup() + * of a `defineCustomElement` component. + */ +export declare function useShadowRoot(): ShadowRoot | null; + +export declare function useCssModule(name?: string): Record<string, string>; + +/** + * Runtime helper for SFC's CSS variable injection feature. + * @private + */ +export declare function useCssVars(getter: (ctx: any) => Record<string, string>): void; + +export interface CSSProperties extends CSS.Properties<string | number>, CSS.PropertiesHyphen<string | number> { + /** + * The index signature was removed to enable closed typing for style + * using CSSType. You're able to use type assertion or module augmentation + * to add properties or an index signature of your own. + * + * For examples and more information, visit: + * https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors + */ + [v: `--${string}`]: string | number | undefined; +} +type Booleanish = boolean | 'true' | 'false'; +type Numberish = number | string; +export interface AriaAttributes { + /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */ + 'aria-activedescendant'?: string; + /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */ + 'aria-atomic'?: Booleanish; + /** + * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be + * presented if they are made. + */ + 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both'; + /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */ + 'aria-busy'?: Booleanish; + /** + * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. + * @see aria-pressed @see aria-selected. + */ + 'aria-checked'?: Booleanish | 'mixed'; + /** + * Defines the total number of columns in a table, grid, or treegrid. + * @see aria-colindex. + */ + 'aria-colcount'?: Numberish; + /** + * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. + * @see aria-colcount @see aria-colspan. + */ + 'aria-colindex'?: Numberish; + /** + * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. + * @see aria-colindex @see aria-rowspan. + */ + 'aria-colspan'?: Numberish; + /** + * Identifies the element (or elements) whose contents or presence are controlled by the current element. + * @see aria-owns. + */ + 'aria-controls'?: string; + /** Indicates the element that represents the current item within a container or set of related elements. */ + 'aria-current'?: Booleanish | 'page' | 'step' | 'location' | 'date' | 'time'; + /** + * Identifies the element (or elements) that describes the object. + * @see aria-labelledby + */ + 'aria-describedby'?: string; + /** + * Identifies the element that provides a detailed, extended description for the object. + * @see aria-describedby. + */ + 'aria-details'?: string; + /** + * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. + * @see aria-hidden @see aria-readonly. + */ + 'aria-disabled'?: Booleanish; + /** + * Indicates what functions can be performed when a dragged object is released on the drop target. + * @deprecated in ARIA 1.1 + */ + 'aria-dropeffect'?: 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup'; + /** + * Identifies the element that provides an error message for the object. + * @see aria-invalid @see aria-describedby. + */ + 'aria-errormessage'?: string; + /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ + 'aria-expanded'?: Booleanish; + /** + * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, + * allows assistive technology to override the general default of reading in document source order. + */ + 'aria-flowto'?: string; + /** + * Indicates an element's "grabbed" state in a drag-and-drop operation. + * @deprecated in ARIA 1.1 + */ + 'aria-grabbed'?: Booleanish; + /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */ + 'aria-haspopup'?: Booleanish | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'; + /** + * Indicates whether the element is exposed to an accessibility API. + * @see aria-disabled. + */ + 'aria-hidden'?: Booleanish; + /** + * Indicates the entered value does not conform to the format expected by the application. + * @see aria-errormessage. + */ + 'aria-invalid'?: Booleanish | 'grammar' | 'spelling'; + /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */ + 'aria-keyshortcuts'?: string; + /** + * Defines a string value that labels the current element. + * @see aria-labelledby. + */ + 'aria-label'?: string; + /** + * Identifies the element (or elements) that labels the current element. + * @see aria-describedby. + */ + 'aria-labelledby'?: string; + /** Defines the hierarchical level of an element within a structure. */ + 'aria-level'?: Numberish; + /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */ + 'aria-live'?: 'off' | 'assertive' | 'polite'; + /** Indicates whether an element is modal when displayed. */ + 'aria-modal'?: Booleanish; + /** Indicates whether a text box accepts multiple lines of input or only a single line. */ + 'aria-multiline'?: Booleanish; + /** Indicates that the user may select more than one item from the current selectable descendants. */ + 'aria-multiselectable'?: Booleanish; + /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */ + 'aria-orientation'?: 'horizontal' | 'vertical'; + /** + * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship + * between DOM elements where the DOM hierarchy cannot be used to represent the relationship. + * @see aria-controls. + */ + 'aria-owns'?: string; + /** + * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. + * A hint could be a sample value or a brief description of the expected format. + */ + 'aria-placeholder'?: string; + /** + * Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. + * @see aria-setsize. + */ + 'aria-posinset'?: Numberish; + /** + * Indicates the current "pressed" state of toggle buttons. + * @see aria-checked @see aria-selected. + */ + 'aria-pressed'?: Booleanish | 'mixed'; + /** + * Indicates that the element is not editable, but is otherwise operable. + * @see aria-disabled. + */ + 'aria-readonly'?: Booleanish; + /** + * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. + * @see aria-atomic. + */ + 'aria-relevant'?: 'additions' | 'additions removals' | 'additions text' | 'all' | 'removals' | 'removals additions' | 'removals text' | 'text' | 'text additions' | 'text removals'; + /** Indicates that user input is required on the element before a form may be submitted. */ + 'aria-required'?: Booleanish; + /** Defines a human-readable, author-localized description for the role of an element. */ + 'aria-roledescription'?: string; + /** + * Defines the total number of rows in a table, grid, or treegrid. + * @see aria-rowindex. + */ + 'aria-rowcount'?: Numberish; + /** + * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. + * @see aria-rowcount @see aria-rowspan. + */ + 'aria-rowindex'?: Numberish; + /** + * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. + * @see aria-rowindex @see aria-colspan. + */ + 'aria-rowspan'?: Numberish; + /** + * Indicates the current "selected" state of various widgets. + * @see aria-checked @see aria-pressed. + */ + 'aria-selected'?: Booleanish; + /** + * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. + * @see aria-posinset. + */ + 'aria-setsize'?: Numberish; + /** Indicates if items in a table or grid are sorted in ascending or descending order. */ + 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other'; + /** Defines the maximum allowed value for a range widget. */ + 'aria-valuemax'?: Numberish; + /** Defines the minimum allowed value for a range widget. */ + 'aria-valuemin'?: Numberish; + /** + * Defines the current value for a range widget. + * @see aria-valuetext. + */ + 'aria-valuenow'?: Numberish; + /** Defines the human readable text alternative of aria-valuenow for a range widget. */ + 'aria-valuetext'?: string; +} +export type StyleValue = false | null | undefined | string | CSSProperties | Array<StyleValue>; +export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> { + innerHTML?: string; + class?: any; + style?: StyleValue; + accesskey?: string; + contenteditable?: Booleanish | 'inherit' | 'plaintext-only'; + contextmenu?: string; + dir?: string; + draggable?: Booleanish; + hidden?: Booleanish | '' | 'hidden' | 'until-found'; + id?: string; + inert?: Booleanish; + lang?: string; + placeholder?: string; + spellcheck?: Booleanish; + tabindex?: Numberish; + title?: string; + translate?: 'yes' | 'no'; + radiogroup?: string; + role?: string; + about?: string; + datatype?: string; + inlist?: any; + prefix?: string; + property?: string; + resource?: string; + typeof?: string; + vocab?: string; + autocapitalize?: string; + autocorrect?: string; + autosave?: string; + color?: string; + itemprop?: string; + itemscope?: Booleanish; + itemtype?: string; + itemid?: string; + itemref?: string; + results?: Numberish; + security?: string; + unselectable?: 'on' | 'off'; + /** + * Hints at the type of data that might be entered by the user while editing the element or its contents + * @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute + */ + inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'; + /** + * Specify that a standard HTML element should behave like a defined custom built-in element + * @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is + */ + is?: string; +} +type HTMLAttributeReferrerPolicy = '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url'; +export interface AnchorHTMLAttributes extends HTMLAttributes { + download?: any; + href?: string; + hreflang?: string; + media?: string; + ping?: string; + rel?: string; + target?: string; + type?: string; + referrerpolicy?: HTMLAttributeReferrerPolicy; +} +export interface AreaHTMLAttributes extends HTMLAttributes { + alt?: string; + coords?: string; + download?: any; + href?: string; + hreflang?: string; + media?: string; + referrerpolicy?: HTMLAttributeReferrerPolicy; + rel?: string; + shape?: string; + target?: string; +} +export interface AudioHTMLAttributes extends MediaHTMLAttributes { +} +export interface BaseHTMLAttributes extends HTMLAttributes { + href?: string; + target?: string; +} +export interface BlockquoteHTMLAttributes extends HTMLAttributes { + cite?: string; +} +export interface ButtonHTMLAttributes extends HTMLAttributes { + autofocus?: Booleanish; + disabled?: Booleanish; + form?: string; + formaction?: string; + formenctype?: string; + formmethod?: string; + formnovalidate?: Booleanish; + formtarget?: string; + name?: string; + type?: 'submit' | 'reset' | 'button'; + value?: string | ReadonlyArray<string> | number; +} +export interface CanvasHTMLAttributes extends HTMLAttributes { + height?: Numberish; + width?: Numberish; +} +export interface ColHTMLAttributes extends HTMLAttributes { + span?: Numberish; + width?: Numberish; +} +export interface ColgroupHTMLAttributes extends HTMLAttributes { + span?: Numberish; +} +export interface DataHTMLAttributes extends HTMLAttributes { + value?: string | ReadonlyArray<string> | number; +} +export interface DetailsHTMLAttributes extends HTMLAttributes { + name?: string; + open?: Booleanish; + onToggle?: (payload: ToggleEvent) => void; +} +export interface DelHTMLAttributes extends HTMLAttributes { + cite?: string; + datetime?: string; +} +export interface DialogHTMLAttributes extends HTMLAttributes { + open?: Booleanish; + onClose?: (payload: Event) => void; +} +export interface EmbedHTMLAttributes extends HTMLAttributes { + height?: Numberish; + src?: string; + type?: string; + width?: Numberish; +} +export interface FieldsetHTMLAttributes extends HTMLAttributes { + disabled?: Booleanish; + form?: string; + name?: string; +} +export interface FormHTMLAttributes extends HTMLAttributes { + acceptcharset?: string; + action?: string; + autocomplete?: string; + enctype?: string; + method?: string; + name?: string; + novalidate?: Booleanish; + target?: string; +} +export interface HtmlHTMLAttributes extends HTMLAttributes { + manifest?: string; +} +export interface IframeHTMLAttributes extends HTMLAttributes { + allow?: string; + allowfullscreen?: Booleanish; + allowtransparency?: Booleanish; + /** @deprecated */ + frameborder?: Numberish; + height?: Numberish; + loading?: 'eager' | 'lazy'; + /** @deprecated */ + marginheight?: Numberish; + /** @deprecated */ + marginwidth?: Numberish; + name?: string; + referrerpolicy?: HTMLAttributeReferrerPolicy; + sandbox?: string; + /** @deprecated */ + scrolling?: string; + seamless?: Booleanish; + src?: string; + srcdoc?: string; + width?: Numberish; +} +export interface ImgHTMLAttributes extends HTMLAttributes { + alt?: string; + crossorigin?: 'anonymous' | 'use-credentials' | ''; + decoding?: 'async' | 'auto' | 'sync'; + height?: Numberish; + loading?: 'eager' | 'lazy'; + referrerpolicy?: HTMLAttributeReferrerPolicy; + sizes?: string; + src?: string; + srcset?: string; + usemap?: string; + width?: Numberish; +} +export interface InsHTMLAttributes extends HTMLAttributes { + cite?: string; + datetime?: string; +} +export type InputTypeHTMLAttribute = 'button' | 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week' | (string & {}); +export interface InputHTMLAttributes extends HTMLAttributes { + accept?: string; + alt?: string; + autocomplete?: string; + autofocus?: Booleanish; + capture?: boolean | 'user' | 'environment'; + checked?: Booleanish | any[] | Set<any>; + crossorigin?: string; + disabled?: Booleanish; + enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'; + form?: string; + formaction?: string; + formenctype?: string; + formmethod?: string; + formnovalidate?: Booleanish; + formtarget?: string; + height?: Numberish; + indeterminate?: boolean; + list?: string; + max?: Numberish; + maxlength?: Numberish; + min?: Numberish; + minlength?: Numberish; + multiple?: Booleanish; + name?: string; + pattern?: string; + placeholder?: string; + readonly?: Booleanish; + required?: Booleanish; + size?: Numberish; + src?: string; + step?: Numberish; + type?: InputTypeHTMLAttribute; + value?: any; + width?: Numberish; +} +export interface KeygenHTMLAttributes extends HTMLAttributes { + autofocus?: Booleanish; + challenge?: string; + disabled?: Booleanish; + form?: string; + keytype?: string; + keyparams?: string; + name?: string; +} +export interface LabelHTMLAttributes extends HTMLAttributes { + for?: string; + form?: string; +} +export interface LiHTMLAttributes extends HTMLAttributes { + value?: string | ReadonlyArray<string> | number; +} +export interface LinkHTMLAttributes extends HTMLAttributes { + as?: string; + crossorigin?: string; + href?: string; + hreflang?: string; + integrity?: string; + media?: string; + referrerpolicy?: HTMLAttributeReferrerPolicy; + rel?: string; + sizes?: string; + type?: string; + charset?: string; +} +export interface MapHTMLAttributes extends HTMLAttributes { + name?: string; +} +export interface MenuHTMLAttributes extends HTMLAttributes { + type?: string; +} +export interface MediaHTMLAttributes extends HTMLAttributes { + autoplay?: Booleanish; + controls?: Booleanish; + controlslist?: string; + crossorigin?: string; + loop?: Booleanish; + mediagroup?: string; + muted?: Booleanish; + playsinline?: Booleanish; + preload?: string; + src?: string; +} +export interface MetaHTMLAttributes extends HTMLAttributes { + charset?: string; + content?: string; + httpequiv?: string; + name?: string; +} +export interface MeterHTMLAttributes extends HTMLAttributes { + form?: string; + high?: Numberish; + low?: Numberish; + max?: Numberish; + min?: Numberish; + optimum?: Numberish; + value?: string | ReadonlyArray<string> | number; +} +export interface QuoteHTMLAttributes extends HTMLAttributes { + cite?: string; +} +export interface ObjectHTMLAttributes extends HTMLAttributes { + classid?: string; + data?: string; + form?: string; + height?: Numberish; + name?: string; + type?: string; + usemap?: string; + width?: Numberish; + wmode?: string; +} +export interface OlHTMLAttributes extends HTMLAttributes { + reversed?: Booleanish; + start?: Numberish; + type?: '1' | 'a' | 'A' | 'i' | 'I'; +} +export interface OptgroupHTMLAttributes extends HTMLAttributes { + disabled?: Booleanish; + label?: string; +} +export interface OptionHTMLAttributes extends HTMLAttributes { + disabled?: Booleanish; + label?: string; + selected?: Booleanish; + value?: any; +} +export interface OutputHTMLAttributes extends HTMLAttributes { + for?: string; + form?: string; + name?: string; +} +export interface ParamHTMLAttributes extends HTMLAttributes { + name?: string; + value?: string | ReadonlyArray<string> | number; +} +export interface ProgressHTMLAttributes extends HTMLAttributes { + max?: Numberish; + value?: string | ReadonlyArray<string> | number; +} +export interface ScriptHTMLAttributes extends HTMLAttributes { + async?: Booleanish; + /** @deprecated */ + charset?: string; + crossorigin?: string; + defer?: Booleanish; + integrity?: string; + nomodule?: Booleanish; + referrerpolicy?: HTMLAttributeReferrerPolicy; + nonce?: string; + src?: string; + type?: string; +} +export interface SelectHTMLAttributes extends HTMLAttributes { + autocomplete?: string; + autofocus?: Booleanish; + disabled?: Booleanish; + form?: string; + multiple?: Booleanish; + name?: string; + required?: Booleanish; + size?: Numberish; + value?: any; +} +export interface SourceHTMLAttributes extends HTMLAttributes { + media?: string; + sizes?: string; + src?: string; + srcset?: string; + type?: string; +} +export interface StyleHTMLAttributes extends HTMLAttributes { + media?: string; + nonce?: string; + scoped?: Booleanish; + type?: string; +} +export interface TableHTMLAttributes extends HTMLAttributes { + cellpadding?: Numberish; + cellspacing?: Numberish; + summary?: string; + width?: Numberish; +} +export interface TextareaHTMLAttributes extends HTMLAttributes { + autocomplete?: string; + autofocus?: Booleanish; + cols?: Numberish; + dirname?: string; + disabled?: Booleanish; + form?: string; + maxlength?: Numberish; + minlength?: Numberish; + name?: string; + placeholder?: string; + readonly?: Booleanish; + required?: Booleanish; + rows?: Numberish; + value?: string | ReadonlyArray<string> | number | null; + wrap?: string; +} +export interface TdHTMLAttributes extends HTMLAttributes { + align?: 'left' | 'center' | 'right' | 'justify' | 'char'; + colspan?: Numberish; + headers?: string; + rowspan?: Numberish; + scope?: string; + abbr?: string; + height?: Numberish; + width?: Numberish; + valign?: 'top' | 'middle' | 'bottom' | 'baseline'; +} +export interface ThHTMLAttributes extends HTMLAttributes { + align?: 'left' | 'center' | 'right' | 'justify' | 'char'; + colspan?: Numberish; + headers?: string; + rowspan?: Numberish; + scope?: string; + abbr?: string; +} +export interface TimeHTMLAttributes extends HTMLAttributes { + datetime?: string; +} +export interface TrackHTMLAttributes extends HTMLAttributes { + default?: Booleanish; + kind?: string; + label?: string; + src?: string; + srclang?: string; +} +export interface VideoHTMLAttributes extends MediaHTMLAttributes { + height?: Numberish; + playsinline?: Booleanish; + poster?: string; + width?: Numberish; + disablePictureInPicture?: Booleanish; + disableRemotePlayback?: Booleanish; +} +export interface WebViewHTMLAttributes extends HTMLAttributes { + allowfullscreen?: Booleanish; + allowpopups?: Booleanish; + autoFocus?: Booleanish; + autosize?: Booleanish; + blinkfeatures?: string; + disableblinkfeatures?: string; + disableguestresize?: Booleanish; + disablewebsecurity?: Booleanish; + guestinstance?: string; + httpreferrer?: string; + nodeintegration?: Booleanish; + partition?: string; + plugins?: Booleanish; + preload?: string; + src?: string; + useragent?: string; + webpreferences?: string; +} +export interface SVGAttributes extends AriaAttributes, EventHandlers<Events> { + innerHTML?: string; + /** + * SVG Styling Attributes + * @see https://www.w3.org/TR/SVG/styling.html#ElementSpecificStyling + */ + class?: any; + style?: StyleValue; + color?: string; + height?: Numberish; + id?: string; + lang?: string; + max?: Numberish; + media?: string; + method?: string; + min?: Numberish; + name?: string; + target?: string; + type?: string; + width?: Numberish; + role?: string; + tabindex?: Numberish; + crossOrigin?: 'anonymous' | 'use-credentials' | ''; + 'accent-height'?: Numberish; + accumulate?: 'none' | 'sum'; + additive?: 'replace' | 'sum'; + 'alignment-baseline'?: 'auto' | 'baseline' | 'before-edge' | 'text-before-edge' | 'middle' | 'central' | 'after-edge' | 'text-after-edge' | 'ideographic' | 'alphabetic' | 'hanging' | 'mathematical' | 'inherit'; + allowReorder?: 'no' | 'yes'; + alphabetic?: Numberish; + amplitude?: Numberish; + 'arabic-form'?: 'initial' | 'medial' | 'terminal' | 'isolated'; + ascent?: Numberish; + attributeName?: string; + attributeType?: string; + autoReverse?: Numberish; + azimuth?: Numberish; + baseFrequency?: Numberish; + 'baseline-shift'?: Numberish; + baseProfile?: Numberish; + bbox?: Numberish; + begin?: Numberish; + bias?: Numberish; + by?: Numberish; + calcMode?: Numberish; + 'cap-height'?: Numberish; + clip?: Numberish; + 'clip-path'?: string; + clipPathUnits?: Numberish; + 'clip-rule'?: Numberish; + 'color-interpolation'?: Numberish; + 'color-interpolation-filters'?: 'auto' | 'sRGB' | 'linearRGB' | 'inherit'; + 'color-profile'?: Numberish; + 'color-rendering'?: Numberish; + contentScriptType?: Numberish; + contentStyleType?: Numberish; + cursor?: Numberish; + cx?: Numberish; + cy?: Numberish; + d?: string; + decelerate?: Numberish; + descent?: Numberish; + diffuseConstant?: Numberish; + direction?: Numberish; + display?: Numberish; + divisor?: Numberish; + 'dominant-baseline'?: Numberish; + dur?: Numberish; + dx?: Numberish; + dy?: Numberish; + edgeMode?: Numberish; + elevation?: Numberish; + 'enable-background'?: Numberish; + end?: Numberish; + exponent?: Numberish; + externalResourcesRequired?: Numberish; + fill?: string; + 'fill-opacity'?: Numberish; + 'fill-rule'?: 'nonzero' | 'evenodd' | 'inherit'; + filter?: string; + filterRes?: Numberish; + filterUnits?: Numberish; + 'flood-color'?: Numberish; + 'flood-opacity'?: Numberish; + focusable?: Numberish; + 'font-family'?: string; + 'font-size'?: Numberish; + 'font-size-adjust'?: Numberish; + 'font-stretch'?: Numberish; + 'font-style'?: Numberish; + 'font-variant'?: Numberish; + 'font-weight'?: Numberish; + format?: Numberish; + from?: Numberish; + fx?: Numberish; + fy?: Numberish; + g1?: Numberish; + g2?: Numberish; + 'glyph-name'?: Numberish; + 'glyph-orientation-horizontal'?: Numberish; + 'glyph-orientation-vertical'?: Numberish; + glyphRef?: Numberish; + gradientTransform?: string; + gradientUnits?: string; + hanging?: Numberish; + 'horiz-adv-x'?: Numberish; + 'horiz-origin-x'?: Numberish; + href?: string; + ideographic?: Numberish; + 'image-rendering'?: Numberish; + in2?: Numberish; + in?: string; + intercept?: Numberish; + k1?: Numberish; + k2?: Numberish; + k3?: Numberish; + k4?: Numberish; + k?: Numberish; + kernelMatrix?: Numberish; + kernelUnitLength?: Numberish; + kerning?: Numberish; + keyPoints?: Numberish; + keySplines?: Numberish; + keyTimes?: Numberish; + lengthAdjust?: Numberish; + 'letter-spacing'?: Numberish; + 'lighting-color'?: Numberish; + limitingConeAngle?: Numberish; + local?: Numberish; + 'marker-end'?: string; + markerHeight?: Numberish; + 'marker-mid'?: string; + 'marker-start'?: string; + markerUnits?: Numberish; + markerWidth?: Numberish; + mask?: string; + maskContentUnits?: Numberish; + maskUnits?: Numberish; + mathematical?: Numberish; + mode?: Numberish; + numOctaves?: Numberish; + offset?: Numberish; + opacity?: Numberish; + operator?: Numberish; + order?: Numberish; + orient?: Numberish; + orientation?: Numberish; + origin?: Numberish; + overflow?: Numberish; + 'overline-position'?: Numberish; + 'overline-thickness'?: Numberish; + 'paint-order'?: Numberish; + 'panose-1'?: Numberish; + pathLength?: Numberish; + patternContentUnits?: string; + patternTransform?: Numberish; + patternUnits?: string; + 'pointer-events'?: Numberish; + points?: string; + pointsAtX?: Numberish; + pointsAtY?: Numberish; + pointsAtZ?: Numberish; + preserveAlpha?: Numberish; + preserveAspectRatio?: string; + primitiveUnits?: Numberish; + r?: Numberish; + radius?: Numberish; + refX?: Numberish; + refY?: Numberish; + renderingIntent?: Numberish; + repeatCount?: Numberish; + repeatDur?: Numberish; + requiredExtensions?: Numberish; + requiredFeatures?: Numberish; + restart?: Numberish; + result?: string; + rotate?: Numberish; + rx?: Numberish; + ry?: Numberish; + scale?: Numberish; + seed?: Numberish; + 'shape-rendering'?: Numberish; + slope?: Numberish; + spacing?: Numberish; + specularConstant?: Numberish; + specularExponent?: Numberish; + speed?: Numberish; + spreadMethod?: string; + startOffset?: Numberish; + stdDeviation?: Numberish; + stemh?: Numberish; + stemv?: Numberish; + stitchTiles?: Numberish; + 'stop-color'?: string; + 'stop-opacity'?: Numberish; + 'strikethrough-position'?: Numberish; + 'strikethrough-thickness'?: Numberish; + string?: Numberish; + stroke?: string; + 'stroke-dasharray'?: Numberish; + 'stroke-dashoffset'?: Numberish; + 'stroke-linecap'?: 'butt' | 'round' | 'square' | 'inherit'; + 'stroke-linejoin'?: 'miter' | 'round' | 'bevel' | 'inherit'; + 'stroke-miterlimit'?: Numberish; + 'stroke-opacity'?: Numberish; + 'stroke-width'?: Numberish; + surfaceScale?: Numberish; + systemLanguage?: Numberish; + tableValues?: Numberish; + targetX?: Numberish; + targetY?: Numberish; + 'text-anchor'?: string; + 'text-decoration'?: Numberish; + textLength?: Numberish; + 'text-rendering'?: Numberish; + to?: Numberish; + transform?: string; + u1?: Numberish; + u2?: Numberish; + 'underline-position'?: Numberish; + 'underline-thickness'?: Numberish; + unicode?: Numberish; + 'unicode-bidi'?: Numberish; + 'unicode-range'?: Numberish; + 'unitsPer-em'?: Numberish; + 'v-alphabetic'?: Numberish; + values?: string; + 'vector-effect'?: Numberish; + version?: string; + 'vert-adv-y'?: Numberish; + 'vert-origin-x'?: Numberish; + 'vert-origin-y'?: Numberish; + 'v-hanging'?: Numberish; + 'v-ideographic'?: Numberish; + viewBox?: string; + viewTarget?: Numberish; + visibility?: Numberish; + 'v-mathematical'?: Numberish; + widths?: Numberish; + 'word-spacing'?: Numberish; + 'writing-mode'?: Numberish; + x1?: Numberish; + x2?: Numberish; + x?: Numberish; + xChannelSelector?: string; + 'x-height'?: Numberish; + xlinkActuate?: string; + xlinkArcrole?: string; + xlinkHref?: string; + xlinkRole?: string; + xlinkShow?: string; + xlinkTitle?: string; + xlinkType?: string; + xmlns?: string; + xmlnsXlink?: string; + y1?: Numberish; + y2?: Numberish; + y?: Numberish; + yChannelSelector?: string; + z?: Numberish; + zoomAndPan?: string; +} +export interface IntrinsicElementAttributes { + a: AnchorHTMLAttributes; + abbr: HTMLAttributes; + address: HTMLAttributes; + area: AreaHTMLAttributes; + article: HTMLAttributes; + aside: HTMLAttributes; + audio: AudioHTMLAttributes; + b: HTMLAttributes; + base: BaseHTMLAttributes; + bdi: HTMLAttributes; + bdo: HTMLAttributes; + blockquote: BlockquoteHTMLAttributes; + body: HTMLAttributes; + br: HTMLAttributes; + button: ButtonHTMLAttributes; + canvas: CanvasHTMLAttributes; + caption: HTMLAttributes; + cite: HTMLAttributes; + code: HTMLAttributes; + col: ColHTMLAttributes; + colgroup: ColgroupHTMLAttributes; + data: DataHTMLAttributes; + datalist: HTMLAttributes; + dd: HTMLAttributes; + del: DelHTMLAttributes; + details: DetailsHTMLAttributes; + dfn: HTMLAttributes; + dialog: DialogHTMLAttributes; + div: HTMLAttributes; + dl: HTMLAttributes; + dt: HTMLAttributes; + em: HTMLAttributes; + embed: EmbedHTMLAttributes; + fieldset: FieldsetHTMLAttributes; + figcaption: HTMLAttributes; + figure: HTMLAttributes; + footer: HTMLAttributes; + form: FormHTMLAttributes; + h1: HTMLAttributes; + h2: HTMLAttributes; + h3: HTMLAttributes; + h4: HTMLAttributes; + h5: HTMLAttributes; + h6: HTMLAttributes; + head: HTMLAttributes; + header: HTMLAttributes; + hgroup: HTMLAttributes; + hr: HTMLAttributes; + html: HtmlHTMLAttributes; + i: HTMLAttributes; + iframe: IframeHTMLAttributes; + img: ImgHTMLAttributes; + input: InputHTMLAttributes; + ins: InsHTMLAttributes; + kbd: HTMLAttributes; + keygen: KeygenHTMLAttributes; + label: LabelHTMLAttributes; + legend: HTMLAttributes; + li: LiHTMLAttributes; + link: LinkHTMLAttributes; + main: HTMLAttributes; + map: MapHTMLAttributes; + mark: HTMLAttributes; + menu: MenuHTMLAttributes; + meta: MetaHTMLAttributes; + meter: MeterHTMLAttributes; + nav: HTMLAttributes; + noindex: HTMLAttributes; + noscript: HTMLAttributes; + object: ObjectHTMLAttributes; + ol: OlHTMLAttributes; + optgroup: OptgroupHTMLAttributes; + option: OptionHTMLAttributes; + output: OutputHTMLAttributes; + p: HTMLAttributes; + param: ParamHTMLAttributes; + picture: HTMLAttributes; + pre: HTMLAttributes; + progress: ProgressHTMLAttributes; + q: QuoteHTMLAttributes; + rp: HTMLAttributes; + rt: HTMLAttributes; + ruby: HTMLAttributes; + s: HTMLAttributes; + samp: HTMLAttributes; + script: ScriptHTMLAttributes; + section: HTMLAttributes; + select: SelectHTMLAttributes; + small: HTMLAttributes; + source: SourceHTMLAttributes; + span: HTMLAttributes; + strong: HTMLAttributes; + style: StyleHTMLAttributes; + sub: HTMLAttributes; + summary: HTMLAttributes; + sup: HTMLAttributes; + table: TableHTMLAttributes; + template: HTMLAttributes; + tbody: HTMLAttributes; + td: TdHTMLAttributes; + textarea: TextareaHTMLAttributes; + tfoot: HTMLAttributes; + th: ThHTMLAttributes; + thead: HTMLAttributes; + time: TimeHTMLAttributes; + title: HTMLAttributes; + tr: HTMLAttributes; + track: TrackHTMLAttributes; + u: HTMLAttributes; + ul: HTMLAttributes; + var: HTMLAttributes; + video: VideoHTMLAttributes; + wbr: HTMLAttributes; + webview: WebViewHTMLAttributes; + svg: SVGAttributes; + animate: SVGAttributes; + animateMotion: SVGAttributes; + animateTransform: SVGAttributes; + circle: SVGAttributes; + clipPath: SVGAttributes; + defs: SVGAttributes; + desc: SVGAttributes; + ellipse: SVGAttributes; + feBlend: SVGAttributes; + feColorMatrix: SVGAttributes; + feComponentTransfer: SVGAttributes; + feComposite: SVGAttributes; + feConvolveMatrix: SVGAttributes; + feDiffuseLighting: SVGAttributes; + feDisplacementMap: SVGAttributes; + feDistantLight: SVGAttributes; + feDropShadow: SVGAttributes; + feFlood: SVGAttributes; + feFuncA: SVGAttributes; + feFuncB: SVGAttributes; + feFuncG: SVGAttributes; + feFuncR: SVGAttributes; + feGaussianBlur: SVGAttributes; + feImage: SVGAttributes; + feMerge: SVGAttributes; + feMergeNode: SVGAttributes; + feMorphology: SVGAttributes; + feOffset: SVGAttributes; + fePointLight: SVGAttributes; + feSpecularLighting: SVGAttributes; + feSpotLight: SVGAttributes; + feTile: SVGAttributes; + feTurbulence: SVGAttributes; + filter: SVGAttributes; + foreignObject: SVGAttributes; + g: SVGAttributes; + image: SVGAttributes; + line: SVGAttributes; + linearGradient: SVGAttributes; + marker: SVGAttributes; + mask: SVGAttributes; + metadata: SVGAttributes; + mpath: SVGAttributes; + path: SVGAttributes; + pattern: SVGAttributes; + polygon: SVGAttributes; + polyline: SVGAttributes; + radialGradient: SVGAttributes; + rect: SVGAttributes; + stop: SVGAttributes; + switch: SVGAttributes; + symbol: SVGAttributes; + text: SVGAttributes; + textPath: SVGAttributes; + tspan: SVGAttributes; + use: SVGAttributes; + view: SVGAttributes; +} +export interface Events { + onCopy: ClipboardEvent; + onCut: ClipboardEvent; + onPaste: ClipboardEvent; + onCompositionend: CompositionEvent; + onCompositionstart: CompositionEvent; + onCompositionupdate: CompositionEvent; + onDrag: DragEvent; + onDragend: DragEvent; + onDragenter: DragEvent; + onDragexit: DragEvent; + onDragleave: DragEvent; + onDragover: DragEvent; + onDragstart: DragEvent; + onDrop: DragEvent; + onFocus: FocusEvent; + onFocusin: FocusEvent; + onFocusout: FocusEvent; + onBlur: FocusEvent; + onChange: Event; + onBeforeinput: Event; + onInput: Event; + onReset: Event; + onSubmit: Event; + onInvalid: Event; + onLoad: Event; + onError: Event; + onKeydown: KeyboardEvent; + onKeypress: KeyboardEvent; + onKeyup: KeyboardEvent; + onAuxclick: MouseEvent; + onClick: MouseEvent; + onContextmenu: MouseEvent; + onDblclick: MouseEvent; + onMousedown: MouseEvent; + onMouseenter: MouseEvent; + onMouseleave: MouseEvent; + onMousemove: MouseEvent; + onMouseout: MouseEvent; + onMouseover: MouseEvent; + onMouseup: MouseEvent; + onAbort: Event; + onCanplay: Event; + onCanplaythrough: Event; + onDurationchange: Event; + onEmptied: Event; + onEncrypted: Event; + onEnded: Event; + onLoadeddata: Event; + onLoadedmetadata: Event; + onLoadstart: Event; + onPause: Event; + onPlay: Event; + onPlaying: Event; + onProgress: Event; + onRatechange: Event; + onSeeked: Event; + onSeeking: Event; + onStalled: Event; + onSuspend: Event; + onTimeupdate: Event; + onVolumechange: Event; + onWaiting: Event; + onSelect: Event; + onScroll: Event; + onScrollend: Event; + onTouchcancel: TouchEvent; + onTouchend: TouchEvent; + onTouchmove: TouchEvent; + onTouchstart: TouchEvent; + onPointerdown: PointerEvent; + onPointermove: PointerEvent; + onPointerup: PointerEvent; + onPointercancel: PointerEvent; + onPointerenter: PointerEvent; + onPointerleave: PointerEvent; + onPointerover: PointerEvent; + onPointerout: PointerEvent; + onWheel: WheelEvent; + onAnimationstart: AnimationEvent; + onAnimationend: AnimationEvent; + onAnimationiteration: AnimationEvent; + onTransitionend: TransitionEvent; + onTransitionstart: TransitionEvent; +} +type EventHandlers<E> = { + [K in keyof E]?: E[K] extends (...args: any) => any ? E[K] : (payload: E[K]) => void; +}; + +export type ReservedProps = { + key?: PropertyKey; + ref?: VNodeRef; + ref_for?: boolean; + ref_key?: string; +}; +export type NativeElements = { + [K in keyof IntrinsicElementAttributes]: IntrinsicElementAttributes[K] & ReservedProps; +}; + +/** + * This is a stub implementation to prevent the need to use dom types. + * + * To enable proper types, add `"dom"` to `"lib"` in your `tsconfig.json`. + */ +type DomStub = {}; +type DomType<T> = typeof globalThis extends { + window: unknown; +} ? T : DomStub; +declare module '@vue/reactivity' { + interface RefUnwrapBailTypes { + runtimeDOMBailTypes: DomType<Node | Window>; + } +} +declare module '@vue/runtime-core' { + interface GlobalComponents { + Transition: DefineComponent<TransitionProps>; + TransitionGroup: DefineComponent<TransitionGroupProps>; + } + interface GlobalDirectives { + vShow: typeof vShow; + vOn: VOnDirective; + vBind: VModelDirective; + vIf: Directive<any, boolean>; + VOnce: Directive; + VSlot: Directive; + } +} +export declare const render: RootRenderFunction<Element | ShadowRoot>; +export declare const hydrate: RootHydrateFunction; +export declare const createApp: CreateAppFunction<Element>; +export declare const createSSRApp: CreateAppFunction<Element>; + diff --git a/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js b/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js new file mode 100644 index 0000000..52f8775 --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js @@ -0,0 +1,12332 @@ +/** +* @vue/runtime-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function makeMap(str) { + const map = /* @__PURE__ */ Object.create(null); + for (const key of str.split(",")) map[key] = 1; + return (val) => val in map; +} + +const EMPTY_OBJ = Object.freeze({}) ; +const EMPTY_ARR = Object.freeze([]) ; +const NOOP = () => { +}; +const NO = () => false; +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +const isModelListener = (key) => key.startsWith("onUpdate:"); +const extend = Object.assign; +const remove = (arr, el) => { + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } +}; +const hasOwnProperty$1 = Object.prototype.hasOwnProperty; +const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); +const isArray = Array.isArray; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isDate = (val) => toTypeString(val) === "[object Date]"; +const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; +const isFunction = (val) => typeof val === "function"; +const isString = (val) => typeof val === "string"; +const isSymbol = (val) => typeof val === "symbol"; +const isObject = (val) => val !== null && typeof val === "object"; +const isPromise = (val) => { + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); +}; +const objectToString = Object.prototype.toString; +const toTypeString = (value) => objectToString.call(value); +const toRawType = (value) => { + return toTypeString(value).slice(8, -1); +}; +const isPlainObject = (val) => toTypeString(val) === "[object Object]"; +const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); +const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +}; +const camelizeRE = /-(\w)/g; +const camelize = cacheStringFunction( + (str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); + } +); +const hyphenateRE = /\B([A-Z])/g; +const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() +); +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const toHandlerKey = cacheStringFunction( + (str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + } +); +const hasChanged = (value, oldValue) => !Object.is(value, oldValue); +const invokeArrayFns = (fns, ...arg) => { + for (let i = 0; i < fns.length; i++) { + fns[i](...arg); + } +}; +const def = (obj, key, value, writable = false) => { + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + writable, + value + }); +}; +const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; +}; +const toNumber = (val) => { + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; +}; +let _globalThis; +const getGlobalThis = () => { + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); +}; + +const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; +const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); + +function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } +} +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:([^]+)/; +const styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function stringifyStyle(styles) { + if (!styles) return ""; + if (isString(styles)) return styles; + let ret = ""; + for (const key in styles) { + const value = styles[key]; + if (isString(value) || typeof value === "number") { + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + ret += `${normalizedKey}:${value};`; + } + } + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} +function normalizeProps(props) { + if (!props) return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; +} + +const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); +const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); +const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); + +const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); +const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` +); +function includeBooleanAttr(value) { + return !!value || value === ""; +} +const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` +); +const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` +); +function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; +} + +const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; +function getEscapedCssVarName(key, doubleEscape) { + return key.replace( + cssVarNameEscapeSymbolsRE, + (s) => `\\${s}` + ); +} + +function looseCompareArrays(a, b) { + if (a.length !== b.length) return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; +} +function looseEqual(a, b) { + if (a === b) return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); +} +function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); +} + +const isRef$1 = (val) => { + return !!(val && val["__v_isRef"] === true); +}; +const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); +}; +const replacer = (_key, val) => { + if (isRef$1(val)) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; +}; +const stringifySymbol = (v, i = "") => { + var _a; + return ( + // Symbol.description in es2019+ so we need to cast here to pass + // the lib: es2016 check + isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v + ); +}; + +function warn$2(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); +} + +let activeEffectScope; +class EffectScope { + constructor(detached = false) { + this.detached = detached; + /** + * @internal + */ + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this._isPaused = false; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + pause() { + if (this._active) { + this._isPaused = true; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].pause(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].pause(); + } + } + } + /** + * Resumes the effect scope, including all child scopes and effects. + */ + resume() { + if (this._active) { + if (this._isPaused) { + this._isPaused = false; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].resume(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].resume(); + } + } + } + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { + activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn$2(`cannot run an inactive effect scope.`); + } + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + this._active = false; + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + this.effects.length = 0; + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + this.cleanups.length = 0; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); + } + this.scopes.length = 0; + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + } + } +} +function effectScope(detached) { + return new EffectScope(detached); +} +function getCurrentScope() { + return activeEffectScope; +} +function onScopeDispose(fn, failSilently = false) { + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else if (!failSilently) { + warn$2( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } +} + +let activeSub; +const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); +class ReactiveEffect { + constructor(fn) { + this.fn = fn; + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 1 | 4; + /** + * @internal + */ + this.next = void 0; + /** + * @internal + */ + this.cleanup = void 0; + this.scheduler = void 0; + if (activeEffectScope && activeEffectScope.active) { + activeEffectScope.effects.push(this); + } + } + pause() { + this.flags |= 64; + } + resume() { + if (this.flags & 64) { + this.flags &= ~64; + if (pausedQueueEffects.has(this)) { + pausedQueueEffects.delete(this); + this.trigger(); + } + } + } + /** + * @internal + */ + notify() { + if (this.flags & 2 && !(this.flags & 32)) { + return; + } + if (!(this.flags & 8)) { + batch(this); + } + } + run() { + if (!(this.flags & 1)) { + return this.fn(); + } + this.flags |= 2; + cleanupEffect(this); + prepareDeps(this); + const prevEffect = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = this; + shouldTrack = true; + try { + return this.fn(); + } finally { + if (activeSub !== this) { + warn$2( + "Active effect was not restored correctly - this is likely a Vue internal bug." + ); + } + cleanupDeps(this); + activeSub = prevEffect; + shouldTrack = prevShouldTrack; + this.flags &= ~2; + } + } + stop() { + if (this.flags & 1) { + for (let link = this.deps; link; link = link.nextDep) { + removeSub(link); + } + this.deps = this.depsTail = void 0; + cleanupEffect(this); + this.onStop && this.onStop(); + this.flags &= ~1; + } + } + trigger() { + if (this.flags & 64) { + pausedQueueEffects.add(this); + } else if (this.scheduler) { + this.scheduler(); + } else { + this.runIfDirty(); + } + } + /** + * @internal + */ + runIfDirty() { + if (isDirty(this)) { + this.run(); + } + } + get dirty() { + return isDirty(this); + } +} +let batchDepth = 0; +let batchedSub; +let batchedComputed; +function batch(sub, isComputed = false) { + sub.flags |= 8; + if (isComputed) { + sub.next = batchedComputed; + batchedComputed = sub; + return; + } + sub.next = batchedSub; + batchedSub = sub; +} +function startBatch() { + batchDepth++; +} +function endBatch() { + if (--batchDepth > 0) { + return; + } + if (batchedComputed) { + let e = batchedComputed; + batchedComputed = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + e = next; + } + } + let error; + while (batchedSub) { + let e = batchedSub; + batchedSub = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + if (e.flags & 1) { + try { + ; + e.trigger(); + } catch (err) { + if (!error) error = err; + } + } + e = next; + } + } + if (error) throw error; +} +function prepareDeps(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + link.version = -1; + link.prevActiveLink = link.dep.activeLink; + link.dep.activeLink = link; + } +} +function cleanupDeps(sub) { + let head; + let tail = sub.depsTail; + let link = tail; + while (link) { + const prev = link.prevDep; + if (link.version === -1) { + if (link === tail) tail = prev; + removeSub(link); + removeDep(link); + } else { + head = link; + } + link.dep.activeLink = link.prevActiveLink; + link.prevActiveLink = void 0; + link = prev; + } + sub.deps = head; + sub.depsTail = tail; +} +function isDirty(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { + return true; + } + } + if (sub._dirty) { + return true; + } + return false; +} +function refreshComputed(computed) { + if (computed.flags & 4 && !(computed.flags & 16)) { + return; + } + computed.flags &= ~16; + if (computed.globalVersion === globalVersion) { + return; + } + computed.globalVersion = globalVersion; + const dep = computed.dep; + computed.flags |= 2; + if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { + computed.flags &= ~2; + return; + } + const prevSub = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = computed; + shouldTrack = true; + try { + prepareDeps(computed); + const value = computed.fn(computed._value); + if (dep.version === 0 || hasChanged(value, computed._value)) { + computed._value = value; + dep.version++; + } + } catch (err) { + dep.version++; + throw err; + } finally { + activeSub = prevSub; + shouldTrack = prevShouldTrack; + cleanupDeps(computed); + computed.flags &= ~2; + } +} +function removeSub(link, soft = false) { + const { dep, prevSub, nextSub } = link; + if (prevSub) { + prevSub.nextSub = nextSub; + link.prevSub = void 0; + } + if (nextSub) { + nextSub.prevSub = prevSub; + link.nextSub = void 0; + } + if (dep.subsHead === link) { + dep.subsHead = nextSub; + } + if (dep.subs === link) { + dep.subs = prevSub; + if (!prevSub && dep.computed) { + dep.computed.flags &= ~4; + for (let l = dep.computed.deps; l; l = l.nextDep) { + removeSub(l, true); + } + } + } + if (!soft && !--dep.sc && dep.map) { + dep.map.delete(dep.key); + } +} +function removeDep(link) { + const { prevDep, nextDep } = link; + if (prevDep) { + prevDep.nextDep = nextDep; + link.prevDep = void 0; + } + if (nextDep) { + nextDep.prevDep = prevDep; + link.nextDep = void 0; + } +} +function effect(fn, options) { + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const e = new ReactiveEffect(fn); + if (options) { + extend(e, options); + } + try { + e.run(); + } catch (err) { + e.stop(); + throw err; + } + const runner = e.run.bind(e); + runner.effect = e; + return runner; +} +function stop(runner) { + runner.effect.stop(); +} +let shouldTrack = true; +const trackStack = []; +function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; +} +function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; +} +function cleanupEffect(e) { + const { cleanup } = e; + e.cleanup = void 0; + if (cleanup) { + const prevSub = activeSub; + activeSub = void 0; + try { + cleanup(); + } finally { + activeSub = prevSub; + } + } +} + +let globalVersion = 0; +class Link { + constructor(sub, dep) { + this.sub = sub; + this.dep = dep; + this.version = dep.version; + this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; + } +} +class Dep { + constructor(computed) { + this.computed = computed; + this.version = 0; + /** + * Link between this dep and the current active effect + */ + this.activeLink = void 0; + /** + * Doubly linked list representing the subscribing effects (tail) + */ + this.subs = void 0; + /** + * For object property deps cleanup + */ + this.map = void 0; + this.key = void 0; + /** + * Subscriber counter + */ + this.sc = 0; + { + this.subsHead = void 0; + } + } + track(debugInfo) { + if (!activeSub || !shouldTrack || activeSub === this.computed) { + return; + } + let link = this.activeLink; + if (link === void 0 || link.sub !== activeSub) { + link = this.activeLink = new Link(activeSub, this); + if (!activeSub.deps) { + activeSub.deps = activeSub.depsTail = link; + } else { + link.prevDep = activeSub.depsTail; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + } + addSub(link); + } else if (link.version === -1) { + link.version = this.version; + if (link.nextDep) { + const next = link.nextDep; + next.prevDep = link.prevDep; + if (link.prevDep) { + link.prevDep.nextDep = next; + } + link.prevDep = activeSub.depsTail; + link.nextDep = void 0; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + if (activeSub.deps === link) { + activeSub.deps = next; + } + } + } + if (activeSub.onTrack) { + activeSub.onTrack( + extend( + { + effect: activeSub + }, + debugInfo + ) + ); + } + return link; + } + trigger(debugInfo) { + this.version++; + globalVersion++; + this.notify(debugInfo); + } + notify(debugInfo) { + startBatch(); + try { + if (true) { + for (let head = this.subsHead; head; head = head.nextSub) { + if (head.sub.onTrigger && !(head.sub.flags & 8)) { + head.sub.onTrigger( + extend( + { + effect: head.sub + }, + debugInfo + ) + ); + } + } + } + for (let link = this.subs; link; link = link.prevSub) { + if (link.sub.notify()) { + ; + link.sub.dep.notify(); + } + } + } finally { + endBatch(); + } + } +} +function addSub(link) { + link.dep.sc++; + if (link.sub.flags & 4) { + const computed = link.dep.computed; + if (computed && !link.dep.subs) { + computed.flags |= 4 | 16; + for (let l = computed.deps; l; l = l.nextDep) { + addSub(l); + } + } + const currentTail = link.dep.subs; + if (currentTail !== link) { + link.prevSub = currentTail; + if (currentTail) currentTail.nextSub = link; + } + if (link.dep.subsHead === void 0) { + link.dep.subsHead = link; + } + link.dep.subs = link; + } +} +const targetMap = /* @__PURE__ */ new WeakMap(); +const ITERATE_KEY = Symbol( + "Object iterate" +); +const MAP_KEY_ITERATE_KEY = Symbol( + "Map keys iterate" +); +const ARRAY_ITERATE_KEY = Symbol( + "Array iterate" +); +function track(target, type, key) { + if (shouldTrack && activeSub) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = new Dep()); + dep.map = depsMap; + dep.key = key; + } + { + dep.track({ + target, + type, + key + }); + } + } +} +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + globalVersion++; + return; + } + const run = (dep) => { + if (dep) { + { + dep.trigger({ + target, + type, + key, + newValue, + oldValue, + oldTarget + }); + } + } + }; + startBatch(); + if (type === "clear") { + depsMap.forEach(run); + } else { + const targetIsArray = isArray(target); + const isArrayIndex = targetIsArray && isIntegerKey(key); + if (targetIsArray && key === "length") { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { + run(dep); + } + }); + } else { + if (key !== void 0 || depsMap.has(void 0)) { + run(depsMap.get(key)); + } + if (isArrayIndex) { + run(depsMap.get(ARRAY_ITERATE_KEY)); + } + switch (type) { + case "add": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isArrayIndex) { + run(depsMap.get("length")); + } + break; + case "delete": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + run(depsMap.get(ITERATE_KEY)); + } + break; + } + } + } + endBatch(); +} +function getDepFromReactive(object, key) { + const depMap = targetMap.get(object); + return depMap && depMap.get(key); +} + +function reactiveReadArray(array) { + const raw = toRaw(array); + if (raw === array) return raw; + track(raw, "iterate", ARRAY_ITERATE_KEY); + return isShallow(array) ? raw : raw.map(toReactive); +} +function shallowReadArray(arr) { + track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); + return arr; +} +const arrayInstrumentations = { + __proto__: null, + [Symbol.iterator]() { + return iterator(this, Symbol.iterator, toReactive); + }, + concat(...args) { + return reactiveReadArray(this).concat( + ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) + ); + }, + entries() { + return iterator(this, "entries", (value) => { + value[1] = toReactive(value[1]); + return value; + }); + }, + every(fn, thisArg) { + return apply(this, "every", fn, thisArg, void 0, arguments); + }, + filter(fn, thisArg) { + return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); + }, + find(fn, thisArg) { + return apply(this, "find", fn, thisArg, toReactive, arguments); + }, + findIndex(fn, thisArg) { + return apply(this, "findIndex", fn, thisArg, void 0, arguments); + }, + findLast(fn, thisArg) { + return apply(this, "findLast", fn, thisArg, toReactive, arguments); + }, + findLastIndex(fn, thisArg) { + return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); + }, + // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement + forEach(fn, thisArg) { + return apply(this, "forEach", fn, thisArg, void 0, arguments); + }, + includes(...args) { + return searchProxy(this, "includes", args); + }, + indexOf(...args) { + return searchProxy(this, "indexOf", args); + }, + join(separator) { + return reactiveReadArray(this).join(separator); + }, + // keys() iterator only reads `length`, no optimisation required + lastIndexOf(...args) { + return searchProxy(this, "lastIndexOf", args); + }, + map(fn, thisArg) { + return apply(this, "map", fn, thisArg, void 0, arguments); + }, + pop() { + return noTracking(this, "pop"); + }, + push(...args) { + return noTracking(this, "push", args); + }, + reduce(fn, ...args) { + return reduce(this, "reduce", fn, args); + }, + reduceRight(fn, ...args) { + return reduce(this, "reduceRight", fn, args); + }, + shift() { + return noTracking(this, "shift"); + }, + // slice could use ARRAY_ITERATE but also seems to beg for range tracking + some(fn, thisArg) { + return apply(this, "some", fn, thisArg, void 0, arguments); + }, + splice(...args) { + return noTracking(this, "splice", args); + }, + toReversed() { + return reactiveReadArray(this).toReversed(); + }, + toSorted(comparer) { + return reactiveReadArray(this).toSorted(comparer); + }, + toSpliced(...args) { + return reactiveReadArray(this).toSpliced(...args); + }, + unshift(...args) { + return noTracking(this, "unshift", args); + }, + values() { + return iterator(this, "values", toReactive); + } +}; +function iterator(self, method, wrapValue) { + const arr = shallowReadArray(self); + const iter = arr[method](); + if (arr !== self && !isShallow(self)) { + iter._next = iter.next; + iter.next = () => { + const result = iter._next(); + if (result.value) { + result.value = wrapValue(result.value); + } + return result; + }; + } + return iter; +} +const arrayProto = Array.prototype; +function apply(self, method, fn, thisArg, wrappedRetFn, args) { + const arr = shallowReadArray(self); + const needsWrap = arr !== self && !isShallow(self); + const methodFn = arr[method]; + if (methodFn !== arrayProto[method]) { + const result2 = methodFn.apply(self, args); + return needsWrap ? toReactive(result2) : result2; + } + let wrappedFn = fn; + if (arr !== self) { + if (needsWrap) { + wrappedFn = function(item, index) { + return fn.call(this, toReactive(item), index, self); + }; + } else if (fn.length > 2) { + wrappedFn = function(item, index) { + return fn.call(this, item, index, self); + }; + } + } + const result = methodFn.call(arr, wrappedFn, thisArg); + return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; +} +function reduce(self, method, fn, args) { + const arr = shallowReadArray(self); + let wrappedFn = fn; + if (arr !== self) { + if (!isShallow(self)) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, toReactive(item), index, self); + }; + } else if (fn.length > 3) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, item, index, self); + }; + } + } + return arr[method](wrappedFn, ...args); +} +function searchProxy(self, method, args) { + const arr = toRaw(self); + track(arr, "iterate", ARRAY_ITERATE_KEY); + const res = arr[method](...args); + if ((res === -1 || res === false) && isProxy(args[0])) { + args[0] = toRaw(args[0]); + return arr[method](...args); + } + return res; +} +function noTracking(self, method, args = []) { + pauseTracking(); + startBatch(); + const res = toRaw(self)[method].apply(self, args); + endBatch(); + resetTracking(); + return res; +} + +const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); +const builtInSymbols = new Set( + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) +); +function hasOwnProperty(key) { + if (!isSymbol(key)) key = String(key); + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} +class BaseReactiveHandler { + constructor(_isReadonly = false, _isShallow = false) { + this._isReadonly = _isReadonly; + this._isShallow = _isShallow; + } + get(target, key, receiver) { + if (key === "__v_skip") return target["__v_skip"]; + const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return isShallow2; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the receiver is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + let fn; + if (targetIsArray && (fn = arrayInstrumentations[key])) { + return fn; + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get( + target, + key, + // if this is a proxy wrapping a ref, return methods using the raw ref + // as receiver so that we don't have to call `toRaw` on the ref in all + // its class methods + isRef(target) ? target : receiver + ); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (isShallow2) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } +} +class MutableReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(false, isShallow2); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._isShallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set( + target, + key, + value, + isRef(target) ? target : receiver + ); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { + const hadKey = hasOwn(target, key); + const oldValue = target[key]; + const result = Reflect.deleteProperty(target, key); + if (result && hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + } + has(target, key) { + const result = Reflect.has(target, key); + if (!isSymbol(key) || !builtInSymbols.has(key)) { + track(target, "has", key); + } + return result; + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); + return Reflect.ownKeys(target); + } +} +class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(true, isShallow2); + } + set(target, key) { + { + warn$2( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + deleteProperty(target, key) { + { + warn$2( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } +} +const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); +const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); +const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); +const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); + +const toShallow = (value) => value; +const getProto = (v) => Reflect.getPrototypeOf(v); +function createIterableMethod(method, isReadonly2, isShallow2) { + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done + }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } + }; + }; +} +function createReadonlyMethod(type) { + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + warn$2( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; +} +function createInstrumentations(readonly, shallow) { + const instrumentations = { + get(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); + } + track(rawTarget, "get", rawKey); + } + const { has } = getProto(rawTarget); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + if (has.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } + }, + get size() { + const target = this["__v_raw"]; + !readonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); + }, + has(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); + } + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); + }, + forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + !readonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + } + }; + extend( + instrumentations, + readonly ? { + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear") + } : { + add(value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; + }, + set(key, value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; + }, + delete(key) { + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get ? get.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + }, + clear() { + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger( + target, + "clear", + void 0, + void 0, + oldTarget + ); + } + return result; + } + } + ); + const iteratorMethods = [ + "keys", + "values", + "entries", + Symbol.iterator + ]; + iteratorMethods.forEach((method) => { + instrumentations[method] = createIterableMethod(method, readonly, shallow); + }); + return instrumentations; +} +function createInstrumentationGetter(isReadonly2, shallow) { + const instrumentations = createInstrumentations(isReadonly2, shallow); + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; +} +const mutableCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, false) +}; +const shallowCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, true) +}; +const readonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, false) +}; +const shallowReadonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, true) +}; +function checkIdentityKeys(target, has, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has.call(target, rawKey)) { + const type = toRawType(target); + warn$2( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } +} + +const reactiveMap = /* @__PURE__ */ new WeakMap(); +const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); +const readonlyMap = /* @__PURE__ */ new WeakMap(); +const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); +function targetTypeMap(rawType) { + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } +} +function getTargetType(value) { + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); +} +function reactive(target) { + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); +} +function shallowReactive(target) { + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); +} +function readonly(target) { + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); +} +function shallowReadonly(target) { + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); +} +function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + { + warn$2( + `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( + target + )}` + ); + } + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; +} +function isReactive(value) { + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); +} +function isReadonly(value) { + return !!(value && value["__v_isReadonly"]); +} +function isShallow(value) { + return !!(value && value["__v_isShallow"]); +} +function isProxy(value) { + return value ? !!value["__v_raw"] : false; +} +function toRaw(observed) { + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; +} +function markRaw(value) { + if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { + def(value, "__v_skip", true); + } + return value; +} +const toReactive = (value) => isObject(value) ? reactive(value) : value; +const toReadonly = (value) => isObject(value) ? readonly(value) : value; + +function isRef(r) { + return r ? r["__v_isRef"] === true : false; +} +function ref(value) { + return createRef(value, false); +} +function shallowRef(value) { + return createRef(value, true); +} +function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); +} +class RefImpl { + constructor(value, isShallow2) { + this.dep = new Dep(); + this["__v_isRef"] = true; + this["__v_isShallow"] = false; + this._rawValue = isShallow2 ? value : toRaw(value); + this._value = isShallow2 ? value : toReactive(value); + this["__v_isShallow"] = isShallow2; + } + get value() { + { + this.dep.track({ + target: this, + type: "get", + key: "value" + }); + } + return this._value; + } + set value(newValue) { + const oldValue = this._rawValue; + const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); + newValue = useDirectValue ? newValue : toRaw(newValue); + if (hasChanged(newValue, oldValue)) { + this._rawValue = newValue; + this._value = useDirectValue ? newValue : toReactive(newValue); + { + this.dep.trigger({ + target: this, + type: "set", + key: "value", + newValue, + oldValue + }); + } + } + } +} +function triggerRef(ref2) { + if (ref2.dep) { + { + ref2.dep.trigger({ + target: ref2, + type: "set", + key: "value", + newValue: ref2._value + }); + } + } +} +function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +} +function toValue(source) { + return isFunction(source) ? source() : unref(source); +} +const shallowUnwrapHandlers = { + get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } +}; +function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); +} +class CustomRefImpl { + constructor(factory) { + this["__v_isRef"] = true; + this._value = void 0; + const dep = this.dep = new Dep(); + const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); + this._get = get; + this._set = set; + } + get value() { + return this._value = this._get(); + } + set value(newVal) { + this._set(newVal); + } +} +function customRef(factory) { + return new CustomRefImpl(factory); +} +function toRefs(object) { + if (!isProxy(object)) { + warn$2(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; +} +class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this["__v_isRef"] = true; + this._value = void 0; + } + get value() { + const val = this._object[this._key]; + return this._value = val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } +} +class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this["__v_isRef"] = true; + this["__v_isReadonly"] = true; + this._value = void 0; + } + get value() { + return this._value = this._getter(); + } +} +function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } +} +function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); +} + +class ComputedRefImpl { + constructor(fn, setter, isSSR) { + this.fn = fn; + this.setter = setter; + /** + * @internal + */ + this._value = void 0; + /** + * @internal + */ + this.dep = new Dep(this); + /** + * @internal + */ + this.__v_isRef = true; + // TODO isolatedDeclarations "__v_isReadonly" + // A computed is also a subscriber that tracks other deps + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 16; + /** + * @internal + */ + this.globalVersion = globalVersion - 1; + /** + * @internal + */ + this.next = void 0; + // for backwards compat + this.effect = this; + this["__v_isReadonly"] = !setter; + this.isSSR = isSSR; + } + /** + * @internal + */ + notify() { + this.flags |= 16; + if (!(this.flags & 8) && // avoid infinite self recursion + activeSub !== this) { + batch(this, true); + return true; + } + } + get value() { + const link = this.dep.track({ + target: this, + type: "get", + key: "value" + }) ; + refreshComputed(this); + if (link) { + link.version = this.dep.version; + } + return this._value; + } + set value(newValue) { + if (this.setter) { + this.setter(newValue); + } else { + warn$2("Write operation failed: computed value is readonly"); + } + } +} +function computed$1(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + if (isFunction(getterOrOptions)) { + getter = getterOrOptions; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, isSSR); + if (debugOptions && !isSSR) { + cRef.onTrack = debugOptions.onTrack; + cRef.onTrigger = debugOptions.onTrigger; + } + return cRef; +} + +const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" +}; +const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" +}; + +const INITIAL_WATCHER_VALUE = {}; +const cleanupMap = /* @__PURE__ */ new WeakMap(); +let activeWatcher = void 0; +function getCurrentWatcher() { + return activeWatcher; +} +function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { + if (owner) { + let cleanups = cleanupMap.get(owner); + if (!cleanups) cleanupMap.set(owner, cleanups = []); + cleanups.push(cleanupFn); + } else if (!failSilently) { + warn$2( + `onWatcherCleanup() was called when there was no active watcher to associate with.` + ); + } +} +function watch$1(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, once, scheduler, augmentJob, call } = options; + const warnInvalidSource = (s) => { + (options.onWarn || warn$2)( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const reactiveGetter = (source2) => { + if (deep) return source2; + if (isShallow(source2) || deep === false || deep === 0) + return traverse(source2, 1); + return traverse(source2); + }; + let effect; + let getter; + let cleanup; + let boundCleanup; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return call ? call(s, 2) : s(); + } else { + warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { + if (cb) { + getter = call ? () => call(source, 2) : source; + } else { + getter = () => { + if (cleanup) { + pauseTracking(); + try { + cleanup(); + } finally { + resetTracking(); + } + } + const currentEffect = activeWatcher; + activeWatcher = effect; + try { + return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); + } finally { + activeWatcher = currentEffect; + } + }; + } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + const depth = deep === true ? Infinity : deep; + getter = () => traverse(baseGetter(), depth); + } + const scope = getCurrentScope(); + const watchHandle = () => { + effect.stop(); + if (scope && scope.active) { + remove(scope.effects, effect); + } + }; + if (once && cb) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + watchHandle(); + }; + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = (immediateFirstRun) => { + if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { + if (cleanup) { + cleanup(); + } + const currentWatcher = activeWatcher; + activeWatcher = effect; + try { + const args = [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + boundCleanup + ]; + call ? call(cb, 3, args) : ( + // @ts-expect-error + cb(...args) + ); + oldValue = newValue; + } finally { + activeWatcher = currentWatcher; + } + } + } else { + effect.run(); + } + }; + if (augmentJob) { + augmentJob(job); + } + effect = new ReactiveEffect(getter); + effect.scheduler = scheduler ? () => scheduler(job, false) : job; + boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); + cleanup = effect.onStop = () => { + const cleanups = cleanupMap.get(effect); + if (cleanups) { + if (call) { + call(cleanups, 4); + } else { + for (const cleanup2 of cleanups) cleanup2(); + } + cleanupMap.delete(effect); + } + }; + { + effect.onTrack = options.onTrack; + effect.onTrigger = options.onTrigger; + } + if (cb) { + if (immediate) { + job(true); + } else { + oldValue = effect.run(); + } + } else if (scheduler) { + scheduler(job.bind(null, true), true); + } else { + effect.run(); + } + watchHandle.pause = effect.pause.bind(effect); + watchHandle.resume = effect.resume.bind(effect); + watchHandle.stop = watchHandle; + return watchHandle; +} +function traverse(value, depth = Infinity, seen) { + if (depth <= 0 || !isObject(value) || value["__v_skip"]) { + return value; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + depth--; + if (isRef(value)) { + traverse(value.value, depth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, seen); + } + for (const key of Object.getOwnPropertySymbols(value)) { + if (Object.prototype.propertyIsEnumerable.call(value, key)) { + traverse(value[key], depth, seen); + } + } + } + return value; +} + +const stack = []; +function pushWarningContext(vnode) { + stack.push(vnode); +} +function popWarningContext() { + stack.pop(); +} +let isWarning = false; +function warn$1(msg, ...args) { + if (isWarning) return; + isWarning = true; + pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + // eslint-disable-next-line no-restricted-syntax + msg + args.map((a) => { + var _a, _b; + return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); + }).join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); + } + console.warn(...warnArgs); + } + resetTracking(); + isWarning = false; +} +function getComponentTrace() { + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); + } + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; +} +function formatTrace(trace) { + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; +} +function formatTraceEntry({ vnode, recurseCount }) { + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; +} +function formatProps(props) { + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; +} +function formatProp(key, value, raw) { + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } +} +function assertNumber(val, type) { + if (val === void 0) { + return; + } else if (typeof val !== "number") { + warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + } else if (isNaN(val)) { + warn$1(`${type} is NaN - the duration expression might be incorrect.`); + } +} + +const ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER", + "COMPONENT_UPDATE": 15, + "15": "COMPONENT_UPDATE", + "APP_UNMOUNT_CLEANUP": 16, + "16": "APP_UNMOUNT_CLEANUP" +}; +const ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush", + [15]: "component update", + [16]: "app unmount cleanup function" +}; +function callWithErrorHandling(fn, instance, type, args) { + try { + return args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } +} +function callWithAsyncErrorHandling(fn, instance, type, args) { + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); + } + return res; + } + if (isArray(fn)) { + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; + } else { + warn$1( + `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` + ); + } +} +function handleError(err, instance, type, throwInDev = true) { + const contextVNode = instance ? instance.vnode : null; + const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = ErrorTypeStrings$1[type] ; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + return; + } + } + } + cur = cur.parent; + } + if (errorHandler) { + pauseTracking(); + callWithErrorHandling(errorHandler, null, 10, [ + err, + exposedInstance, + errorInfo + ]); + resetTracking(); + return; + } + } + logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); +} +function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { + { + const info = ErrorTypeStrings$1[type]; + if (contextVNode) { + pushWarningContext(contextVNode); + } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } +} + +const queue = []; +let flushIndex = -1; +const pendingPostFlushCbs = []; +let activePostFlushCbs = null; +let postFlushIndex = 0; +const resolvedPromise = /* @__PURE__ */ Promise.resolve(); +let currentFlushPromise = null; +const RECURSION_LIMIT = 100; +function nextTick(fn) { + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; +} +function findInsertionIndex(id) { + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { + start = middle + 1; + } else { + end = middle; + } + } + return start; +} +function queueJob(job) { + if (!(job.flags & 1)) { + const jobId = getId(job); + const lastJob = queue[queue.length - 1]; + if (!lastJob || // fast path when the job id is larger than the tail + !(job.flags & 2) && jobId >= getId(lastJob)) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(jobId), 0, job); + } + job.flags |= 1; + queueFlush(); + } +} +function queueFlush() { + if (!currentFlushPromise) { + currentFlushPromise = resolvedPromise.then(flushJobs); + } +} +function queuePostFlushCb(cb) { + if (!isArray(cb)) { + if (activePostFlushCbs && cb.id === -1) { + activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); + } else if (!(cb.flags & 1)) { + pendingPostFlushCbs.push(cb); + cb.flags |= 1; + } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); +} +function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.flags & 2) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + if (cb.flags & 4) { + cb.flags &= ~1; + } + cb(); + if (!(cb.flags & 4)) { + cb.flags &= ~1; + } + } + } +} +function flushPostFlushCbs(seen) { + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; + } + activePostFlushCbs = deduped; + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + const cb = activePostFlushCbs[postFlushIndex]; + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + if (cb.flags & 4) { + cb.flags &= ~1; + } + if (!(cb.flags & 8)) cb(); + cb.flags &= ~1; + } + activePostFlushCbs = null; + postFlushIndex = 0; + } +} +const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; +function flushJobs(seen) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + const check = (job) => checkRecursiveUpdates(seen, job) ; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && !(job.flags & 8)) { + if (check(job)) { + continue; + } + if (job.flags & 4) { + job.flags &= ~1; + } + callWithErrorHandling( + job, + job.i, + job.i ? 15 : 14 + ); + if (!(job.flags & 4)) { + job.flags &= ~1; + } + } + } + } finally { + for (; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job) { + job.flags &= ~1; + } + } + flushIndex = -1; + queue.length = 0; + flushPostFlushCbs(seen); + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); + } + } +} +function checkRecursiveUpdates(seen, fn) { + const count = seen.get(fn) || 0; + if (count > RECURSION_LIMIT) { + const instance = fn.i; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } + seen.set(fn, count + 1); + return false; +} + +let isHmrUpdating = false; +const hmrDirtyComponents = /* @__PURE__ */ new Map(); +{ + getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; +} +const map = /* @__PURE__ */ new Map(); +function registerHMR(instance) { + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); +} +function unregisterHMR(instance) { + map.get(instance.type.__hmrId).instances.delete(instance); +} +function createRecord(id, initialDef) { + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; +} +function normalizeClassComponent(component) { + return isClassComponent(component) ? component.__vccOpts : component; +} +function rerender(id, newRender) { + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; + } + instance.renderCache = []; + isHmrUpdating = true; + instance.update(); + isHmrUpdating = false; + }); +} +function reload(id, newComp) { + const record = map.get(id); + if (!record) return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (let i = 0; i < instances.length; i++) { + const instance = instances[i]; + const oldComp = normalizeClassComponent(instance.type); + let dirtyInstances = hmrDirtyComponents.get(oldComp); + if (!dirtyInstances) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set()); + } + dirtyInstances.add(instance); + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + dirtyInstances.add(instance); + instance.ceReload(newComp.styles); + dirtyInstances.delete(instance); + } else if (instance.parent) { + queueJob(() => { + isHmrUpdating = true; + instance.parent.update(); + isHmrUpdating = false; + dirtyInstances.delete(instance); + }); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + if (instance.root.ce && instance !== instance.root) { + instance.root.ce._removeChildStyle(oldComp); + } + } + queuePostFlushCb(() => { + hmrDirtyComponents.clear(); + }); +} +function updateComponentDef(oldComp, newComp) { + extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; + } + } +} +function tryWrap(fn) { + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; +} + +let devtools$1; +let buffer = []; +let devtoolsNotInstalled = false; +function emit$1(event, ...args) { + if (devtools$1) { + devtools$1.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } +} +function setDevtoolsHook$1(hook, target) { + var _a, _b; + devtools$1 = hook; + if (devtools$1) { + devtools$1.enabled = true; + buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); + buffer = []; + } else if ( + // handle late devtools injection - only do this if we are in an actual + // browser environment to avoid the timer handle stalling test runner exit + // (#4815) + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + // eslint-disable-next-line no-restricted-syntax + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook$1(newHook, target); + }); + setTimeout(() => { + if (!devtools$1) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; + devtoolsNotInstalled = true; + buffer = []; + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } +} +function devtoolsInitApp(app, version) { + emit$1("app:init" /* APP_INIT */, app, version, { + Fragment, + Text, + Comment, + Static + }); +} +function devtoolsUnmountApp(app) { + emit$1("app:unmount" /* APP_UNMOUNT */, app); +} +const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); +const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); +const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( + "component:removed" /* COMPONENT_REMOVED */ +); +const devtoolsComponentRemoved = (component) => { + if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools$1.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } +}; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function createDevtoolsComponentHook(hook) { + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; +} +const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); +const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); +function createDevtoolsPerformanceHook(hook) { + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; +} +function devtoolsComponentEmit(component, event, params) { + emit$1( + "component:emit" /* COMPONENT_EMIT */, + component.appContext.app, + component, + event, + params + ); +} + +let currentRenderingInstance = null; +let currentScopeId = null; +function setCurrentRenderingInstance(instance) { + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; +} +function pushScopeId(id) { + currentScopeId = id; +} +function popScopeId() { + currentScopeId = null; +} +const withScopeId = (_id) => withCtx; +function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); + } + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; +} + +function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } +} +function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + warn$1(`withDirectives can only be used inside render functions.`); + return vnode; + } + const instance = getComponentPublicInstance(currentRenderingInstance); + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; + if (dir) { + if (isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; +} +function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); + } + } +} + +const TeleportEndKey = Symbol("_vte"); +const isTeleport = (type) => type.__isTeleport; +const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); +const isTeleportDeferred = (props) => props && (props.defer || props.defer === ""); +const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; +const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; +const resolveTarget = (props, select) => { + const targetSelector = props && props.to; + if (isString(targetSelector)) { + if (!select) { + warn$1( + `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` + ); + return null; + } else { + const target = select(targetSelector); + if (!target && !isTeleportDisabled(props)) { + warn$1( + `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` + ); + } + return target; + } + } else { + if (!targetSelector && !isTeleportDisabled(props)) { + warn$1(`Invalid Teleport target: ${targetSelector}`); + } + return targetSelector; + } +}; +const TeleportImpl = { + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (isHmrUpdating) { + optimized = false; + dynamicChildren = null; + } + if (n1 == null) { + const placeholder = n2.el = createComment("teleport start") ; + const mainAnchor = n2.anchor = createComment("teleport end") ; + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + if (parentComponent && parentComponent.isCE) { + parentComponent.ce._teleportTarget = container2; + } + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountToTarget = () => { + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = prepareAnchor(target, n2, createText, insert); + if (target) { + if (namespace !== "svg" && isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace !== "mathml" && isTargetMathML(target)) { + namespace = "mathml"; + } + if (!disabled) { + mount(target, targetAnchor); + updateCssVars(n2, false); + } + } else if (!disabled) { + warn$1( + "Invalid Teleport target on mount:", + target, + `(${typeof target})` + ); + } + }; + if (disabled) { + mount(container, mainAnchor); + updateCssVars(n2, true); + } + if (isTeleportDeferred(n2.props)) { + queuePostRenderEffect(() => { + mountToTarget(); + n2.el.__isMounted = true; + }, parentSuspense); + } else { + mountToTarget(); + } + } else { + if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) { + queuePostRenderEffect(() => { + TeleportImpl.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + delete n1.el.__isMounted; + }, parentSuspense); + return; + } + n2.el = n1.el; + n2.targetStart = n1.targetStart; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } else { + warn$1( + "Invalid Teleport target on update:", + target, + `(${typeof target})` + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); + } + } + updateCssVars(n2, disabled); + } + }, + remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { + shapeFlag, + children, + anchor, + targetStart, + targetAnchor, + target, + props + } = vnode; + if (target) { + hostRemove(targetStart); + hostRemove(targetAnchor); + } + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport +}; +function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } +} +function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector, insert, createText } +}, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const disabled = isTeleportDisabled(vnode.props); + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (disabled) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetStart = targetNode; + vnode.targetAnchor = targetNode && nextSibling(targetNode); + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + if (targetAnchor && targetAnchor.nodeType === 8) { + if (targetAnchor.data === "teleport start anchor") { + vnode.targetStart = targetAnchor; + } else if (targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + targetAnchor = nextSibling(targetAnchor); + } + if (!vnode.targetAnchor) { + prepareAnchor(target, vnode, createText, insert); + } + hydrateChildren( + targetNode && nextSibling(targetNode), + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode, disabled); + } + return vnode.anchor && nextSibling(vnode.anchor); +} +const Teleport = TeleportImpl; +function updateCssVars(vnode, isDisabled) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node, anchor; + if (isDisabled) { + node = vnode.el; + anchor = vnode.anchor; + } else { + node = vnode.targetStart; + anchor = vnode.targetAnchor; + } + while (node && node !== anchor) { + if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } +} +function prepareAnchor(target, vnode, createText, insert) { + const targetStart = vnode.targetStart = createText(""); + const targetAnchor = vnode.targetAnchor = createText(""); + targetStart[TeleportEndKey] = targetAnchor; + if (target) { + insert(targetStart, target); + insert(targetAnchor, target); + } + return targetAnchor; +} + +const leaveCbKey = Symbol("_leaveCb"); +const enterCbKey$1 = Symbol("_enterCb"); +function useTransitionState() { + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; +} +const TransitionHookValidator = [Function, Array]; +const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator +}; +const recursiveGetSubtree = (instance) => { + const subTree = instance.subTree; + return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; +}; +const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + const child = findNonCommentChild(children); + const rawProps = toRaw(props); + const { mode } = rawProps; + if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { + warn$1(`invalid <transition> mode: ${mode}`); + } + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getInnerChild$1(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + let enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance, + // #11061, ensure enterHooks is fresh after clone + (hooks) => enterHooks = hooks + ); + if (innerChild.type !== Comment) { + setTransitionHooks(innerChild, enterHooks); + } + let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree); + if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { + let leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in" && innerChild.type !== Comment) { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (!(instance.job.flags & 8)) { + instance.update(); + } + delete leavingHooks.afterLeave; + oldInnerChild = void 0; + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + enterHooks.delayedLeave = () => { + delayedLeave(); + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + }; + } else { + oldInnerChild = void 0; + } + } else if (oldInnerChild) { + oldInnerChild = void 0; + } + return child; + }; + } +}; +function findNonCommentChild(children) { + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c of children) { + if (c.type !== Comment) { + if (hasFound) { + warn$1( + "<transition> can only be used on a single element or component. Use <transition-group> for lists." + ); + break; + } + child = c; + hasFound = true; + } + } + } + return child; +} +const BaseTransition = BaseTransitionImpl; +function getLeavingNodesForType(state, vnode) { + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; +} +function resolveTransitionHooks(vnode, props, state, instance, postClone) { + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook(hook, args); + if (isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) done(); + } else if (hook.length <= 1) { + done(); + } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey$1] = (cancelled) => { + if (called) return; + called = true; + if (cancelled) { + callHook(cancelHook, [el]); + } else { + callHook(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey$1] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove) { + const key2 = String(vnode.key); + if (el[enterCbKey$1]) { + el[enterCbKey$1]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove(); + } + callHook(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) return; + called = true; + remove(); + if (cancelled) { + callHook(onLeaveCancelled, [el]); + } else { + callHook(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + const hooks2 = resolveTransitionHooks( + vnode2, + props, + state, + instance, + postClone + ); + if (postClone) postClone(hooks2); + return hooks2; + } + }; + return hooks; +} +function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } +} +function getInnerChild$1(vnode) { + if (!isKeepAlive(vnode)) { + if (isTeleport(vnode.type) && vnode.children) { + return findNonCommentChild(vnode.children); + } + return vnode; + } + if (vnode.component) { + return vnode.component.subTree; + } + const { shapeFlag, children } = vnode; + if (children) { + if (shapeFlag & 16) { + return children[0]; + } + if (shapeFlag & 32 && isFunction(children.default)) { + return children.default(); + } + } +} +function setTransitionHooks(vnode, hooks) { + if (vnode.shapeFlag & 6 && vnode.component) { + vnode.transition = hooks; + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } +} +function getTransitionRawChildren(children, keepComment = false, parentKey) { + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); + } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; + } + } + return ret; +} + +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineComponent(options, extraOptions) { + return isFunction(options) ? ( + // #8236: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; +} + +function useId() { + const i = getCurrentInstance(); + if (i) { + return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++; + } else { + warn$1( + `useId() is called when there is no active component instance to be associated with.` + ); + } + return ""; +} +function markAsyncBoundary(instance) { + instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; +} + +const knownTemplateRefs = /* @__PURE__ */ new WeakSet(); +function useTemplateRef(key) { + const i = getCurrentInstance(); + const r = shallowRef(null); + if (i) { + const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs; + let desc; + if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) { + warn$1(`useTemplateRef('${key}') already exists.`); + } else { + Object.defineProperty(refs, key, { + enumerable: true, + get: () => r.value, + set: (val) => r.value = val + }); + } + } else { + warn$1( + `useTemplateRef() is called when there is no active component instance to be associated with.` + ); + } + const ret = readonly(r) ; + { + knownTemplateRefs.add(ret); + } + return ret; +} + +function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { + if (isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) { + setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree); + } + return; + } + const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + const rawSetupState = toRaw(setupState); + const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => { + { + if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) { + warn$1( + `Template ref "${key}" used on a non-ref value. It will not work in the production build.` + ); + } + if (knownTemplateRefs.has(rawSetupState[key])) { + return false; + } + } + return hasOwn(rawSetupState, key); + }; + if (oldRef != null && oldRef !== ref) { + if (isString(oldRef)) { + refs[oldRef] = null; + if (canSetSetupRef(oldRef)) { + setupState[oldRef] = null; + } + } else if (isRef(oldRef)) { + oldRef.value = null; + } + } + if (isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = isString(ref); + const _isRef = isRef(ref); + if (_isString || _isRef) { + const doSet = () => { + if (rawRef.f) { + const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + isArray(existing) && remove(existing, refValue); + } else { + if (!isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (canSetSetupRef(ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); + } + } + } else if (_isString) { + refs[ref] = value; + if (canSetSetupRef(ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) refs[rawRef.k] = value; + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + }; + if (value) { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } else { + doSet(); + } + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + } +} + +let hasLoggedMismatchError = false; +const logMismatchError = () => { + if (hasLoggedMismatchError) { + return; + } + console.error("Hydration completed but contains mismatches."); + hasLoggedMismatchError = true; +}; +const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; +const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); +const getContainerType = (container) => { + if (container.nodeType !== 1) return void 0; + if (isSVGContainer(container)) return "svg"; + if (isMathMLContainer(container)) return "mathml"; + return void 0; +}; +const isComment = (node) => node.nodeType === 8; +function createHydrationFunctions(rendererInternals) { + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment + } + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + warn$1( + `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` + ); + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; + } + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; + }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + optimized = optimized || !!vnode.dynamicChildren; + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + { + def(node, "__vnode", vnode, true); + def(node, "__vueParentComponent", parentComponent, true); + } + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { + warn$1( + `Hydration text mismatch in`, + node.parentNode, + ` + - rendered on server: ${JSON.stringify( + node.data + )} + - expected on client: ${JSON.stringify(vnode.children)}` + ); + logMismatchError(); + node.data = vnode.children; + } + nextNode = nextSibling(node); + } + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 || domType === 3) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else { + warn$1("Invalid HostVNode type:", type, `(${typeof type})`); + } + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; + }; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition( + null, + // no need check parentSuspense in hydration + transition + ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + let hasWarned = false; + while (next) { + if (!isMismatchAllowed(el, 1 /* CHILDREN */)) { + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + el, + ` +Server rendered element contains more child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + let clientText = vnode.children; + if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) { + clientText = clientText.slice(1); + } + if (el.textContent !== clientText) { + if (!isMismatchAllowed(el, 0 /* TEXT */)) { + warn$1( + `Hydration text content mismatch on`, + el, + ` + - rendered on server: ${el.textContent} + - expected on client: ${vnode.children}` + ); + logMismatchError(); + } + el.textContent = vnode.children; + } + } + if (props) { + { + const isCustomElement = el.tagName.includes("-"); + for (const key in props) { + if (// #11189 skip if this node has directives that have created hooks + // as it could have mutated the DOM in any possible way + !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) { + logMismatchError(); + } + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === "." || isCustomElement) { + patchProp(el, key, null, props[key], void 0, parentComponent); + } + } + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + } + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + let hasWarned = false; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + const isText = vnode.type === Text; + if (node) { + if (isText && !optimized) { + if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) { + insert( + createText( + node.data.slice(vnode.children.length) + ), + container, + nextSibling(node) + ); + node.data = vnode.children; + } + } + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (isText && !vnode.children) { + insert(vnode.el = createText(""), container); + } else { + if (!isMismatchAllowed(container, 1 /* CHILDREN */)) { + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + container, + ` +Server rendered element contains fewer child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + } + } + return node; + }; + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); + } else { + logMismatchError(); + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) { + warn$1( + `Hydration node mismatch: +- rendered on server:`, + node, + node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, + ` +- expected on client:`, + vnode.type + ); + logMismatchError(); + } + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; + } + } + } + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + if (parentComponent) { + parentComponent.vnode.el = vnode.el; + updateHOCHostEl(parentComponent, vnode.el); + } + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } + } + } + } + return node; + }; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 && node.tagName === "TEMPLATE"; + }; + return [hydrate, hydrateNode]; +} +function propHasMismatch(el, key, clientValue, vnode, instance) { + let mismatchType; + let mismatchKey; + let actual; + let expected; + if (key === "class") { + actual = el.getAttribute("class"); + expected = normalizeClass(clientValue); + if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { + mismatchType = 2 /* CLASS */; + mismatchKey = `class`; + } + } else if (key === "style") { + actual = el.getAttribute("style") || ""; + expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); + const actualMap = toStyleMap(actual); + const expectedMap = toStyleMap(expected); + if (vnode.dirs) { + for (const { dir, value } of vnode.dirs) { + if (dir.name === "show" && !value) { + expectedMap.set("display", "none"); + } + } + } + if (instance) { + resolveCssVars(instance, vnode, expectedMap); + } + if (!isMapEqual(actualMap, expectedMap)) { + mismatchType = 3 /* STYLE */; + mismatchKey = "style"; + } + } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { + if (isBooleanAttr(key)) { + actual = el.hasAttribute(key); + expected = includeBooleanAttr(clientValue); + } else if (clientValue == null) { + actual = el.hasAttribute(key); + expected = false; + } else { + if (el.hasAttribute(key)) { + actual = el.getAttribute(key); + } else if (key === "value" && el.tagName === "TEXTAREA") { + actual = el.value; + } else { + actual = false; + } + expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; + } + if (actual !== expected) { + mismatchType = 4 /* ATTRIBUTE */; + mismatchKey = key; + } + } + if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) { + const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; + const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`; + const postSegment = ` + - rendered on server: ${format(actual)} + - expected on client: ${format(expected)} + Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. + You should fix the source of the mismatch.`; + { + warn$1(preSegment, el, postSegment); + } + return true; + } + return false; +} +function toClassSet(str) { + return new Set(str.trim().split(/\s+/)); +} +function isSetEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const s of a) { + if (!b.has(s)) { + return false; + } + } + return true; +} +function toStyleMap(str) { + const styleMap = /* @__PURE__ */ new Map(); + for (const item of str.split(";")) { + let [key, value] = item.split(":"); + key = key.trim(); + value = value && value.trim(); + if (key && value) { + styleMap.set(key, value); + } + } + return styleMap; +} +function isMapEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const [key, value] of a) { + if (value !== b.get(key)) { + return false; + } + } + return true; +} +function resolveCssVars(instance, vnode, expectedMap) { + const root = instance.subTree; + if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) { + const cssVars = instance.getCssVars(); + for (const key in cssVars) { + expectedMap.set( + `--${getEscapedCssVarName(key)}`, + String(cssVars[key]) + ); + } + } + if (vnode === root && instance.parent) { + resolveCssVars(instance.parent, instance.vnode, expectedMap); + } +} +const allowMismatchAttr = "data-allow-mismatch"; +const MismatchTypeString = { + [0 /* TEXT */]: "text", + [1 /* CHILDREN */]: "children", + [2 /* CLASS */]: "class", + [3 /* STYLE */]: "style", + [4 /* ATTRIBUTE */]: "attribute" +}; +function isMismatchAllowed(el, allowedType) { + if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) { + while (el && !el.hasAttribute(allowMismatchAttr)) { + el = el.parentElement; + } + } + const allowedAttr = el && el.getAttribute(allowMismatchAttr); + if (allowedAttr == null) { + return false; + } else if (allowedAttr === "") { + return true; + } else { + const list = allowedAttr.split(","); + if (allowedType === 0 /* TEXT */ && list.includes("children")) { + return true; + } + return allowedAttr.split(",").includes(MismatchTypeString[allowedType]); + } +} + +const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1)); +const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id)); +const hydrateOnIdle = (timeout = 1e4) => (hydrate) => { + const id = requestIdleCallback(hydrate, { timeout }); + return () => cancelIdleCallback(id); +}; +function elementIsVisibleInViewport(el) { + const { top, left, bottom, right } = el.getBoundingClientRect(); + const { innerHeight, innerWidth } = window; + return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth); +} +const hydrateOnVisible = (opts) => (hydrate, forEach) => { + const ob = new IntersectionObserver((entries) => { + for (const e of entries) { + if (!e.isIntersecting) continue; + ob.disconnect(); + hydrate(); + break; + } + }, opts); + forEach((el) => { + if (!(el instanceof Element)) return; + if (elementIsVisibleInViewport(el)) { + hydrate(); + ob.disconnect(); + return false; + } + ob.observe(el); + }); + return () => ob.disconnect(); +}; +const hydrateOnMediaQuery = (query) => (hydrate) => { + if (query) { + const mql = matchMedia(query); + if (mql.matches) { + hydrate(); + } else { + mql.addEventListener("change", hydrate, { once: true }); + return () => mql.removeEventListener("change", hydrate); + } + } +}; +const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => { + if (isString(interactions)) interactions = [interactions]; + let hasHydrated = false; + const doHydrate = (e) => { + if (!hasHydrated) { + hasHydrated = true; + teardown(); + hydrate(); + e.target.dispatchEvent(new e.constructor(e.type, e)); + } + }; + const teardown = () => { + forEach((el) => { + for (const i of interactions) { + el.removeEventListener(i, doHydrate); + } + }); + }; + forEach((el) => { + for (const i of interactions) { + el.addEventListener(i, doHydrate, { once: true }); + } + }); + return teardown; +}; +function forEachElement(node, cb) { + if (isComment(node) && node.data === "[") { + let depth = 1; + let next = node.nextSibling; + while (next) { + if (next.nodeType === 1) { + const result = cb(next); + if (result === false) { + break; + } + } else if (isComment(next)) { + if (next.data === "]") { + if (--depth === 0) break; + } else if (next.data === "[") { + depth++; + } + } + next = next.nextSibling; + } + } else { + cb(node); + } +} + +const isAsyncWrapper = (i) => !!i.type.__asyncLoader; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineAsyncComponent(source) { + if (isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + hydrate: hydrateStrategy, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve, reject) => { + const userRetry = () => resolve(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (!comp) { + warn$1( + `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` + ); + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + if (comp && !isObject(comp) && !isFunction(comp)) { + throw new Error(`Invalid async component load result: ${comp}`); + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + __asyncHydrate(el, instance, hydrate) { + const doHydrate = hydrateStrategy ? () => { + const teardown = hydrateStrategy( + hydrate, + (cb) => forEachElement(el, cb) + ); + if (teardown) { + (instance.bum || (instance.bum = [])).push(teardown); + } + } : hydrate; + if (resolvedComp) { + doHydrate(); + } else { + load().then(() => !instance.isUnmounted && doHydrate()); + } + }, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + markAsyncBoundary(instance); + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { + pendingRequest = null; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || isInSSRComponentSetup) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = ref(false); + const error = ref(); + const delayed = ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.update(); + } + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); +} +function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; +} + +const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; +const KeepAliveImpl = { + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + if (!sharedContext.renderer) { + return () => { + const children = slots.default && slots.default(); + return children && children.length === 1 ? children[0] : children; + }; + } + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + { + instance.__v_cache = cache; + } + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + invalidateMount(instance2.m); + invalidateMount(instance2.a); + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && !filter(name)) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (cached && (!current || !isSameVNodeType(cached, current))) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + if (isSuspense(instance.subTree.type)) { + queuePostRenderEffect(() => { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + }, instance.subTree.suspense); + } else { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return current = null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + { + warn$1(`KeepAlive should contain exactly one component child.`); + } + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + if (vnode.type === Comment) { + current = null; + return vnode; + } + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + vnode.shapeFlag &= ~256; + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } +}; +const KeepAlive = KeepAliveImpl; +function matches(pattern, name) { + if (isArray(pattern)) { + return pattern.some((p) => matches(p, name)); + } else if (isString(pattern)) { + return pattern.split(",").includes(name); + } else if (isRegExp(pattern)) { + pattern.lastIndex = 0; + return pattern.test(name); + } + return false; +} +function onActivated(hook, target) { + registerKeepAliveHook(hook, "a", target); +} +function onDeactivated(hook, target) { + registerKeepAliveHook(hook, "da", target); +} +function registerKeepAliveHook(hook, type, target = currentInstance) { + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; + } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } +} +function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + remove(keepAliveRoot[type], injected); + }, target); +} +function resetShapeFlag(vnode) { + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; +} +function getInnerChild(vnode) { + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; +} + +function injectHook(type, hook, target = currentInstance, prepend = false) { + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); + } + return wrappedHook; + } else { + const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) + ); + } +} +const createHook = (lifecycle) => (hook, target = currentInstance) => { + if (!isInSSRComponentSetup || lifecycle === "sp") { + injectHook(lifecycle, (...args) => hook(...args), target); + } +}; +const onBeforeMount = createHook("bm"); +const onMounted = createHook("m"); +const onBeforeUpdate = createHook( + "bu" +); +const onUpdated = createHook("u"); +const onBeforeUnmount = createHook( + "bum" +); +const onUnmounted = createHook("um"); +const onServerPrefetch = createHook( + "sp" +); +const onRenderTriggered = createHook("rtg"); +const onRenderTracked = createHook("rtc"); +function onErrorCaptured(hook, target = currentInstance) { + injectHook("ec", hook, target); +} + +const COMPONENTS = "components"; +const DIRECTIVES = "directives"; +function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; +} +const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); +function resolveDynamicComponent(component) { + if (isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } +} +function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); +} +function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else { + warn$1( + `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } +} +function resolve(registry, name) { + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); +} + +function renderList(source, renderItem, cache, index) { + let ret; + const cached = cache && cache[index]; + const sourceIsArray = isArray(source); + if (sourceIsArray || isString(source)) { + const sourceIsReactiveArray = sourceIsArray && isReactive(source); + let needsWrap = false; + if (sourceIsReactiveArray) { + needsWrap = !isShallow(source); + source = shallowReadArray(source); + } + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem( + needsWrap ? toReactive(source[i]) : source[i], + i, + void 0, + cached && cached[i] + ); + } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn$1(`The v-for range expect an integer value but got ${source}.`); + } + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); + } + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } + } + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; +} + +function createSlots(slots, dynamicSlots) { + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) res.key = slot.key; + return res; + } : slot.fn; + } + } + return slots; +} + +function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) { + if (name !== "default") props.name = name; + return openBlock(), createBlock( + Fragment, + null, + [createVNode("slot", props, fallback && fallback())], + 64 + ); + } + let slot = slots[name]; + if (slot && slot.length > 1) { + warn$1( + `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` + ); + slot = () => []; + } + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key; + const rendered = createBlock( + Fragment, + { + key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content + (!validSlotContent && fallback ? "_fb" : "") + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; +} +function ensureValidVNode(vnodes) { + return vnodes.some((child) => { + if (!isVNode(child)) return true; + if (child.type === Comment) return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; +} + +function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + if (!isObject(obj)) { + warn$1(`v-on with no argument expects an object value.`); + return ret; + } + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; + } + return ret; +} + +const getPublicInstance = (i) => { + if (!i) return null; + if (isStatefulComponent(i)) return getComponentPublicInstance(i); + return getPublicInstance(i.parent); +}; +const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => shallowReadonly(i.props) , + $attrs: (i) => shallowReadonly(i.attrs) , + $slots: (i) => shallowReadonly(i.slots) , + $refs: (i) => shallowReadonly(i.refs) , + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $host: (i) => i.ce, + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i) , + $forceUpdate: (i) => i.f || (i.f = () => { + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) +); +const isReservedPrefix = (key) => key === "_" || key === "$"; +const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); +const PublicInstanceProxyHandlers = { + get({ _: instance }, key) { + if (key === "__v_skip") { + return true; + } + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (key === "__isVue") { + return true; + } + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance.attrs, "get", ""); + markAttrsAccessed(); + } else if (key === "$slots") { + track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); + return false; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + data[key] = value; + return true; + } else if (hasOwn(instance.props, key)) { + warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + warn$1( + `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` + ); + return false; + } else { + if (key in instance.appContext.config.globalProperties) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + value + }); + } else { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } +}; +{ + PublicInstanceProxyHandlers.ownKeys = (target) => { + warn$1( + `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` + ); + return Reflect.ownKeys(target); + }; +} +const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, { + get(target, key) { + if (key === Symbol.unscopables) { + return; + } + return PublicInstanceProxyHandlers.get(target, key, target); + }, + has(_, key) { + const has = key[0] !== "_" && !isGloballyAllowed(key); + if (!has && PublicInstanceProxyHandlers.has(_, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} should not start with _ which is a reserved prefix for Vue internals.` + ); + } + return has; + } +}); +function createDevRenderContext(instance) { + const target = {}; + Object.defineProperty(target, `_`, { + configurable: true, + enumerable: false, + get: () => instance + }); + Object.keys(publicPropertiesMap).forEach((key) => { + Object.defineProperty(target, key, { + configurable: true, + enumerable: false, + get: () => publicPropertiesMap[key](instance), + // intercepted by the proxy so no need for implementation, + // but needed to prevent set errors + set: NOOP + }); + }); + return target; +} +function exposePropsOnRenderContext(instance) { + const { + ctx, + propsOptions: [propsOptions] + } = instance; + if (propsOptions) { + Object.keys(propsOptions).forEach((key) => { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => instance.props[key], + set: NOOP + }); + }); + } +} +function exposeSetupStateOnRenderContext(instance) { + const { ctx, setupState } = instance; + Object.keys(toRaw(setupState)).forEach((key) => { + if (!setupState.__isScriptSetup) { + if (isReservedPrefix(key[0])) { + warn$1( + `setup() return property ${JSON.stringify( + key + )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` + ); + return; + } + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => setupState[key], + set: NOOP + }); + } + }); +} + +const warnRuntimeUsage = (method) => warn$1( + `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` +); +function defineProps() { + { + warnRuntimeUsage(`defineProps`); + } + return null; +} +function defineEmits() { + { + warnRuntimeUsage(`defineEmits`); + } + return null; +} +function defineExpose(exposed) { + { + warnRuntimeUsage(`defineExpose`); + } +} +function defineOptions(options) { + { + warnRuntimeUsage(`defineOptions`); + } +} +function defineSlots() { + { + warnRuntimeUsage(`defineSlots`); + } + return null; +} +function defineModel() { + { + warnRuntimeUsage("defineModel"); + } +} +function withDefaults(props, defaults) { + { + warnRuntimeUsage(`withDefaults`); + } + return null; +} +function useSlots() { + return getContext().slots; +} +function useAttrs() { + return getContext().attrs; +} +function getContext() { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useContext() called without active instance.`); + } + return i.setupContext || (i.setupContext = createSetupContext(i)); +} +function normalizePropsOrEmits(props) { + return isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; +} +function mergeDefaults(raw, defaults) { + const props = normalizePropsOrEmits(raw); + for (const key in defaults) { + if (key.startsWith("__skip")) continue; + let opt = props[key]; + if (opt) { + if (isArray(opt) || isFunction(opt)) { + opt = props[key] = { type: opt, default: defaults[key] }; + } else { + opt.default = defaults[key]; + } + } else if (opt === null) { + opt = props[key] = { default: defaults[key] }; + } else { + warn$1(`props default key "${key}" has no corresponding declaration.`); + } + if (opt && defaults[`__skip_${key}`]) { + opt.skipFactory = true; + } + } + return props; +} +function mergeModels(a, b) { + if (!a || !b) return a || b; + if (isArray(a) && isArray(b)) return a.concat(b); + return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); +} +function createPropsRestProxy(props, excludedKeys) { + const ret = {}; + for (const key in props) { + if (!excludedKeys.includes(key)) { + Object.defineProperty(ret, key, { + enumerable: true, + get: () => props[key] + }); + } + } + return ret; +} +function withAsyncContext(getAwaitable) { + const ctx = getCurrentInstance(); + if (!ctx) { + warn$1( + `withAsyncContext called without active current instance. This is likely a bug.` + ); + } + let awaitable = getAwaitable(); + unsetCurrentInstance(); + if (isPromise(awaitable)) { + awaitable = awaitable.catch((e) => { + setCurrentInstance(ctx); + throw e; + }); + } + return [awaitable, () => setCurrentInstance(ctx)]; +} + +function createDuplicateChecker() { + const cache = /* @__PURE__ */ Object.create(null); + return (type, key) => { + if (cache[key]) { + warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); + } else { + cache[key] = type; + } + }; +} +let shouldCacheAccess = true; +function applyOptions(instance) { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook$1(options.beforeCreate, instance, "bc"); + } + const { + // state + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, + // lifecycle + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, + // public API + expose, + inheritAttrs, + // assets + components, + directives, + filters + } = options; + const checkDuplicateProperties = createDuplicateChecker() ; + { + const [propsOptions] = instance.propsOptions; + if (propsOptions) { + for (const key in propsOptions) { + checkDuplicateProperties("Props" /* PROPS */, key); + } + } + } + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (isFunction(methodHandler)) { + { + Object.defineProperty(ctx, key, { + value: methodHandler.bind(publicThis), + configurable: true, + enumerable: true, + writable: true + }); + } + { + checkDuplicateProperties("Methods" /* METHODS */, key); + } + } else { + warn$1( + `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` + ); + } + } + } + if (dataOptions) { + if (!isFunction(dataOptions)) { + warn$1( + `The data option must be a function. Plain object usage is no longer supported.` + ); + } + const data = dataOptions.call(publicThis, publicThis); + if (isPromise(data)) { + warn$1( + `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` + ); + } + if (!isObject(data)) { + warn$1(`data() should return an object.`); + } else { + instance.data = reactive(data); + { + for (const key in data) { + checkDuplicateProperties("Data" /* DATA */, key); + if (!isReservedPrefix(key[0])) { + Object.defineProperty(ctx, key, { + configurable: true, + enumerable: true, + get: () => data[key], + set: NOOP + }); + } + } + } + } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + if (get === NOOP) { + warn$1(`Computed property "${key}" has no getter.`); + } + const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => { + warn$1( + `Write operation failed: computed property "${key}" is readonly.` + ); + } ; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + { + checkDuplicateProperties("Computed" /* COMPUTED */, key); + } + } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook$1(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val + }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; + } + } + if (render && instance.render === NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) instance.components = components; + if (directives) instance.directives = directives; + if (serverPrefetch) { + markAsyncBoundary(instance); + } +} +function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { + if (isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); + } + if (isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; + } + { + checkDuplicateProperties("Inject" /* INJECT */, key); + } + } +} +function callHook$1(hook, instance, type) { + callWithAsyncErrorHandling( + isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); +} +function createWatcher(raw, ctx, publicThis, key) { + let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (isString(raw)) { + const handler = ctx[raw]; + if (isFunction(handler)) { + { + watch(getter, handler); + } + } else { + warn$1(`Invalid watch handler specified by key "${raw}"`, handler); + } + } else if (isFunction(raw)) { + { + watch(getter, raw.bind(publicThis)); + } + } else if (isObject(raw)) { + if (isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (isFunction(handler)) { + watch(getter, handler, raw); + } else { + warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); + } + } + } else { + warn$1(`Invalid watch option: "${key}"`, raw); + } +} +function resolveMergedOptions(instance) { + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; + } + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); + } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (isObject(base)) { + cache.set(base, resolved); + } + return resolved; +} +function mergeOptions(to, from, strats, asMixin = false) { + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") { + warn$1( + `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` + ); + } else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; + } + } + return to; +} +const internalOptionMergeStrats = { + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray, + created: mergeAsArray, + beforeMount: mergeAsArray, + mounted: mergeAsArray, + beforeUpdate: mergeAsArray, + updated: mergeAsArray, + beforeDestroy: mergeAsArray, + beforeUnmount: mergeAsArray, + destroyed: mergeAsArray, + unmounted: mergeAsArray, + activated: mergeAsArray, + deactivated: mergeAsArray, + errorCaptured: mergeAsArray, + serverPrefetch: mergeAsArray, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject +}; +function mergeDataFn(to, from) { + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (extend)( + isFunction(to) ? to.call(this, this) : to, + isFunction(from) ? from.call(this, this) : from + ); + }; +} +function mergeInject(to, from) { + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); +} +function normalizeInject(raw) { + if (isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; + } + return res; + } + return raw; +} +function mergeAsArray(to, from) { + return to ? [...new Set([].concat(to, from))] : from; +} +function mergeObjectOptions(to, from) { + return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; +} +function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (isArray(to) && isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } +} +function mergeWatchOptions(to, from) { + if (!to) return from; + if (!from) return to; + const merged = extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray(to[key], from[key]); + } + return merged; +} + +function createAppContext() { + return { + app: null, + config: { + isNativeTag: NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; +} +let uid$1 = 0; +function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!isFunction(rootComponent)) { + rootComponent = extend({}, rootComponent); + } + if (rootProps != null && !isObject(rootProps)) { + warn$1(`root props passed to app.mount() must be an object.`); + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + const pluginCleanupFns = []; + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + { + warn$1( + `app.config cannot be replaced. Modify individual options instead.` + ); + } + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) { + warn$1(`Plugin has already been applied to target app.`); + } else if (plugin && isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else { + warn$1( + `A plugin must either be a function or an object with an "install" function.` + ); + } + return app; + }, + mixin(mixin) { + { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } else { + warn$1( + "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") + ); + } + } + return app; + }, + component(name, component) { + { + validateComponentName(name, context.config); + } + if (!component) { + return context.components[name]; + } + if (context.components[name]) { + warn$1(`Component "${name}" has already been registered in target app.`); + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + { + validateDirectiveName(name); + } + if (!directive) { + return context.directives[name]; + } + if (context.directives[name]) { + warn$1(`Directive "${name}" has already been registered in target app.`); + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + if (rootContainer.__vue_app__) { + warn$1( + `There is already an app instance mounted on the host container. + If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` + ); + } + const vnode = app._ceVNode || createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + { + context.reload = () => { + render( + cloneVNode(vnode), + rootContainer, + namespace + ); + }; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + { + app._instance = vnode.component; + devtoolsInitApp(app, version); + } + return getComponentPublicInstance(vnode.component); + } else { + warn$1( + `App has already been mounted. +If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` + ); + } + }, + onUnmount(cleanupFn) { + if (typeof cleanupFn !== "function") { + warn$1( + `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}` + ); + } + pluginCleanupFns.push(cleanupFn); + }, + unmount() { + if (isMounted) { + callWithAsyncErrorHandling( + pluginCleanupFns, + app._instance, + 16 + ); + render(null, app._container); + { + app._instance = null; + devtoolsUnmountApp(app); + } + delete app._container.__vue_app__; + } else { + warn$1(`Cannot unmount an app that is not mounted.`); + } + }, + provide(key, value) { + if (key in context.provides) { + warn$1( + `App already provides property with key "${String(key)}". It will be overwritten with the new value.` + ); + } + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + const lastApp = currentApp; + currentApp = app; + try { + return fn(); + } finally { + currentApp = lastApp; + } + } + }; + return app; + }; +} +let currentApp = null; + +function provide(key, value) { + if (!currentInstance) { + { + warn$1(`provide() can only be used inside setup().`); + } + } else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); + } + provides[key] = value; + } +} +function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else { + warn$1(`injection "${String(key)}" not found.`); + } + } else { + warn$1(`inject() can only be used inside setup() or functional components.`); + } +} +function hasInjectionContext() { + return !!(currentInstance || currentRenderingInstance || currentApp); +} + +const internalObjectProto = {}; +const createInternalObject = () => Object.create(internalObjectProto); +const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; + +function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = createInternalObject(); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + { + validateProps(rawProps || {}, props, instance); + } + if (isStateful) { + instance.props = isSSR ? props : shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; +} +function isInHmrContext(instance) { + while (instance) { + if (instance.type.__hmrId) return true; + instance = instance.parent; + } +} +function updateProps(instance, rawProps, rawPrevProps, optimized) { + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( + // always force full diff in dev + // - #1942 if hmr is enabled with sfc component + // - vite#872 non-sfc component used by sfc component + !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; + } + const value = rawProps[key]; + if (options) { + if (hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; + } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; + } + } + } + } + if (hasAttrsChanged) { + trigger(instance.attrs, "set", ""); + } + { + validateProps(rawProps || {}, props, instance); + } +} +function setFullProps(instance, rawProps, props, attrs) { + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && hasOwn(options, camelKey = camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; + } + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + if (needCastKeys) { + const rawCurrentProps = toRaw(props); + const castValues = rawCastValues || EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; +} +function resolvePropValue(options, props, key, value, instance, isAbsent) { + const opt = options[key]; + if (opt != null) { + const hasDefault = hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); + } + } else { + value = defaultValue; + } + if (instance.ce) { + instance.ce._setProp(key, value); + } + } + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { + value = true; + } + } + } + return value; +} +const mixinPropsCache = /* @__PURE__ */ new WeakMap(); +function normalizePropsOptions(comp, appContext, asMixin = false) { + const cache = asMixin ? mixinPropsCache : appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (!isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + extend(normalized, props); + if (keys) needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); + } + if (comp.extends) { + extendProps(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendProps); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, EMPTY_ARR); + } + return EMPTY_ARR; + } + if (isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + if (!isString(raw[i])) { + warn$1(`props must be strings when using array syntax.`, raw[i]); + } + const normalizedKey = camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = EMPTY_OBJ; + } + } + } else if (raw) { + if (!isObject(raw)) { + warn$1(`invalid props options`, raw); + } + for (const key in raw) { + const normalizedKey = camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); + const propType = prop.type; + let shouldCast = false; + let shouldCastTrue = true; + if (isArray(propType)) { + for (let index = 0; index < propType.length; ++index) { + const type = propType[index]; + const typeName = isFunction(type) && type.name; + if (typeName === "Boolean") { + shouldCast = true; + break; + } else if (typeName === "String") { + shouldCastTrue = false; + } + } + } else { + shouldCast = isFunction(propType) && propType.name === "Boolean"; + } + prop[0 /* shouldCast */] = shouldCast; + prop[1 /* shouldCastTrue */] = shouldCastTrue; + if (shouldCast || hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + const res = [normalized, needCastKeys]; + if (isObject(comp)) { + cache.set(comp, res); + } + return res; +} +function validatePropName(key) { + if (key[0] !== "$" && !isReservedProp(key)) { + return true; + } else { + warn$1(`Invalid prop name: "${key}" is a reserved property.`); + } + return false; +} +function getType(ctor) { + if (ctor === null) { + return "null"; + } + if (typeof ctor === "function") { + return ctor.name || ""; + } else if (typeof ctor === "object") { + const name = ctor.constructor && ctor.constructor.name; + return name || ""; + } + return ""; +} +function validateProps(rawProps, props, instance) { + const resolvedValues = toRaw(props); + const options = instance.propsOptions[0]; + const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key)); + for (const key in options) { + let opt = options[key]; + if (opt == null) continue; + validateProp( + key, + resolvedValues[key], + opt, + shallowReadonly(resolvedValues) , + !camelizePropsKey.includes(key) + ); + } +} +function validateProp(name, value, prop, props, isAbsent) { + const { type, required, validator, skipCheck } = prop; + if (required && isAbsent) { + warn$1('Missing required prop: "' + name + '"'); + return; + } + if (value == null && !required) { + return; + } + if (type != null && type !== true && !skipCheck) { + let isValid = false; + const types = isArray(type) ? type : [type]; + const expectedTypes = []; + for (let i = 0; i < types.length && !isValid; i++) { + const { valid, expectedType } = assertType(value, types[i]); + expectedTypes.push(expectedType || ""); + isValid = valid; + } + if (!isValid) { + warn$1(getInvalidTypeMessage(name, value, expectedTypes)); + return; + } + } + if (validator && !validator(value, props)) { + warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + } +} +const isSimpleType = /* @__PURE__ */ makeMap( + "String,Number,Boolean,Function,Symbol,BigInt" +); +function assertType(value, type) { + let valid; + const expectedType = getType(type); + if (expectedType === "null") { + valid = value === null; + } else if (isSimpleType(expectedType)) { + const t = typeof value; + valid = t === expectedType.toLowerCase(); + if (!valid && t === "object") { + valid = value instanceof type; + } + } else if (expectedType === "Object") { + valid = isObject(value); + } else if (expectedType === "Array") { + valid = isArray(value); + } else { + valid = value instanceof type; + } + return { + valid, + expectedType + }; +} +function getInvalidTypeMessage(name, value, expectedTypes) { + if (expectedTypes.length === 0) { + return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; + } + let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; + const expectedType = expectedTypes[0]; + const receivedType = toRawType(value); + const expectedValue = styleValue(value, expectedType); + const receivedValue = styleValue(value, receivedType); + if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { + message += ` with value ${expectedValue}`; + } + message += `, got ${receivedType} `; + if (isExplicable(receivedType)) { + message += `with value ${receivedValue}.`; + } + return message; +} +function styleValue(value, type) { + if (type === "String") { + return `"${value}"`; + } else if (type === "Number") { + return `${Number(value)}`; + } else { + return `${value}`; + } +} +function isExplicable(type) { + const explicitTypes = ["string", "number", "boolean"]; + return explicitTypes.some((elem) => type.toLowerCase() === elem); +} +function isBoolean(...args) { + return args.some((elem) => elem.toLowerCase() === "boolean"); +} + +const isInternalKey = (key) => key[0] === "_" || key === "$stable"; +const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; +const normalizeSlot = (key, rawSlot, ctx) => { + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { + warn$1( + `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` + ); + } + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; +}; +const normalizeObjectSlots = (rawSlots, slots, instance) => { + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) continue; + const value = rawSlots[key]; + if (isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + { + warn$1( + `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; + } + } +}; +const normalizeVNodeSlots = (instance, children) => { + if (!isKeepAlive(instance.vnode) && true) { + warn$1( + `Non-function value encountered for default slot. Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; +}; +const assignSlots = (slots, children, optimized) => { + for (const key in children) { + if (optimized || key !== "_") { + slots[key] = children[key]; + } + } +}; +const initSlots = (instance, children, optimized) => { + const slots = instance.slots = createInternalObject(); + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + assignSlots(slots, children, optimized); + if (optimized) { + def(slots, "_", type, true); + } + } else { + normalizeObjectSlots(children, slots); + } + } else if (children) { + normalizeVNodeSlots(instance, children); + } +}; +const updateSlots = (instance, children, optimized) => { + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (isHmrUpdating) { + assignSlots(slots, children, optimized); + trigger(instance, "set", "$slots"); + } else if (optimized && type === 1) { + needDeletionCheck = false; + } else { + assignSlots(slots, children, optimized); + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); + } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } + } + } +}; + +let supported; +let perf; +function startMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + perf.mark(`vue-${type}-${instance.uid}`); + } + { + devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); + } +} +function endMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + const startTag = `vue-${type}-${instance.uid}`; + const endTag = startTag + `:end`; + perf.mark(endTag); + perf.measure( + `<${formatComponentName(instance, instance.type)}> ${type}`, + startTag, + endTag + ); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + } + { + devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); + } +} +function isSupported() { + if (supported !== void 0) { + return supported; + } + if (typeof window !== "undefined" && window.performance) { + supported = true; + perf = window.performance; + } else { + supported = false; + } + return supported; +} + +const queuePostRenderEffect = queueEffectWithSuspense ; +function createRenderer(options) { + return baseCreateRenderer(options); +} +function createHydrationRenderer(options) { + return baseCreateRenderer(options, createHydrationFunctions); +} +function baseCreateRenderer(options, createHydrationFns) { + const target = getGlobalThis(); + target.__VUE__ = true; + { + setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + } + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { + if (n1 === n2) { + return; + } + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: + if (n1 == null) { + mountStaticNode(n2, container, anchor, namespace); + } else { + patchStaticNode(n1, n2, container, namespace); + } + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else { + warn$1("Invalid VNode type:", type, `(${typeof type})`); + } + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const patchStaticNode = (n1, n2, container, namespace) => { + if (n2.children !== n1.children) { + const anchor = hostNextSibling(n1.anchor); + removeStaticNode(n1); + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace + ); + } else { + n2.el = n1.el; + n2.anchor = n1.anchor; + } + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !isReservedProp(key)) { + hostPatchProp(el, key, null, props[key], namespace, parentComponent); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + { + def(el, "__vnode", vnode, true); + def(el, "__vueParentComponent", parentComponent, true); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { + subTree = filterSingleRoot(subTree.children) || subTree; + } + if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + { + el.__vnode = n2; + } + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || EMPTY_OBJ; + const newProps = n2.props || EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (isHmrUpdating) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { + hostSetElementText(el, ""); + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + } + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); + } + } + } else if (!optimized && dynamicChildren == null) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== EMPTY_OBJ) { + for (const key in oldProps) { + if (!isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + parentComponent + ); + } + } + } + for (const key in newProps) { + if (isReservedProp(key)) continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if ( + // #5523 dev root fragment may inherit directives + isHmrUpdating || patchFlag & 2048 + ) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance( + initialVNode, + parentComponent, + parentSuspense + )); + if (instance.type.__hmrId) { + registerHMR(instance); + } + { + pushWarningContext(initialVNode); + startMeasure(instance, `mount`); + } + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } + { + { + startMeasure(instance, `init`); + } + setupComponent(instance, false, optimized); + { + endMeasure(instance, `init`); + } + } + if (instance.asyncDep) { + if (isHmrUpdating) initialVNode.el = null; + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); + } + { + popWarningContext(); + endMeasure(instance, `mount`); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + { + pushWarningContext(n2); + } + updateComponentPreRender(instance, n2, optimized); + { + popWarningContext(); + } + return; + } else { + instance.next = n2; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { + let vnodeHook; + const { el, props } = initialVNode; + const { bm, m, parent, root, type } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + invokeArrayFns(bm); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); + } + toggleRecurse(instance, true); + if (el && hydrateNode) { + const hydrateSubTree = () => { + { + startMeasure(instance, `render`); + } + instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `hydrate`); + } + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + { + endMeasure(instance, `hydrate`); + } + }; + if (isAsyncWrapperVNode && type.__asyncHydrate) { + type.__asyncHydrate( + el, + instance, + hydrateSubTree + ); + } else { + hydrateSubTree(); + } + } else { + if (root.ce) { + root.ce._injectChildStyle(type); + } + { + startMeasure(instance, `render`); + } + const subTree = instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `patch`); + } + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + initialVNode.el = subTree.el; + } + if (m) { + queuePostRenderEffect(m, parentSuspense); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); + } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); + } + instance.isMounted = true; + { + devtoolsComponentAdded(instance); + } + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); + return; + } + } + let originNext = next; + let vnodeHook; + { + pushWarningContext(next || instance.vnode); + } + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; + } + if (bu) { + invokeArrayFns(bu); + } + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); + } + toggleRecurse(instance, true); + { + startMeasure(instance, `render`); + } + const nextTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + const prevTree = instance.subTree; + instance.subTree = nextTree; + { + startMeasure(instance, `patch`); + } + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); + } + if (u) { + queuePostRenderEffect(u, parentSuspense); + } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); + } + { + devtoolsComponentUpdated(instance); + } + { + popWarningContext(); + } + } + }; + instance.scope.on(); + const effect = instance.effect = new ReactiveEffect(componentUpdateFn); + instance.scope.off(); + const update = instance.update = effect.run.bind(effect); + const job = instance.job = effect.runIfDirty.bind(effect); + job.i = instance; + job.id = instance.uid; + effect.scheduler = () => queueJob(job); + toggleRecurse(instance, true); + { + effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; + effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; + } + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + pauseTracking(); + flushPreFlushCbs(instance); + resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || EMPTY_ARR; + c2 = c2 || EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (nextChild.key != null) { + if (keyToNewIndexMap.has(nextChild.key)) { + warn$1( + `Duplicate keys found during update:`, + JSON.stringify(nextChild.key), + `Make sure keys are unique.` + ); + } + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs, + cacheIndex + } = vnode; + if (patchFlag === -2) { + optimized = false; + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (cacheIndex != null) { + parentComponent.renderCache[cacheIndex] = void 0; + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + internals, + doRemove + ); + } else if (dynamicChildren && // #5154 + // when v-once is used inside a block, setBlockTracking(-1) marks the + // parent block with hasOnce: true + // so that it doesn't take the fast path during unmount - otherwise + // components nested in v-once are never unmounted. + !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { + vnode.children.forEach((child) => { + if (child.type === Comment) { + hostRemove(child.el); + } else { + remove(child); + } + }); + } else { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } + }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + if (instance.type.__hmrId) { + unregisterHMR(instance); + } + const { bum, scope, job, subTree, um, m, a } = instance; + invalidateMount(m); + invalidateMount(a); + if (bum) { + invokeArrayFns(bum); + } + scope.stop(); + if (job) { + job.flags |= 8; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + { + devtoolsComponentRemoved(instance); + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + const el = hostNextSibling(vnode.anchor || vnode.el); + const teleportEnd = el && el[TeleportEndKey]; + return teleportEnd ? hostNextSibling(teleportEnd) : el; + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + container._vnode = vnode; + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + if (createHydrationFns) { + [hydrate, hydrateNode] = createHydrationFns( + internals + ); + } + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; +} +function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; +} +function toggleRecurse({ effect, job }, allowed) { + if (allowed) { + effect.flags |= 32; + job.flags |= 4; + } else { + effect.flags &= ~32; + job.flags &= ~4; + } +} +function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; +} +function traverseStaticChildren(n1, n2, shallow = false) { + const ch1 = n1.children; + const ch2 = n2.children; + if (isArray(ch1) && isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; + } + if (!shallow && c2.patchFlag !== -2) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } + if (c2.type === Comment && !c2.el) { + c2.el = c1.el; + } + } + } +} +function getSequence(arr) { + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; + } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } + } + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; +} +function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); + } + } +} +function invalidateMount(hooks) { + if (hooks) { + for (let i = 0; i < hooks.length; i++) + hooks[i].flags |= 8; + } +} + +const ssrContextKey = Symbol.for("v-scx"); +const useSSRContext = () => { + { + const ctx = inject(ssrContextKey); + if (!ctx) { + warn$1( + `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` + ); + } + return ctx; + } +}; + +function watchEffect(effect, options) { + return doWatch(effect, null, options); +} +function watchPostEffect(effect, options) { + return doWatch( + effect, + null, + extend({}, options, { flush: "post" }) + ); +} +function watchSyncEffect(effect, options) { + return doWatch( + effect, + null, + extend({}, options, { flush: "sync" }) + ); +} +function watch(source, cb, options) { + if (!isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); +} +function doWatch(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, flush, once } = options; + if (!cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + } + const baseWatchOptions = extend({}, options); + baseWatchOptions.onWarn = warn$1; + const runsImmediately = cb && immediate || !cb && flush !== "post"; + let ssrCleanup; + if (isInSSRComponentSetup) { + if (flush === "sync") { + const ctx = useSSRContext(); + ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); + } else if (!runsImmediately) { + const watchStopHandle = () => { + }; + watchStopHandle.stop = NOOP; + watchStopHandle.resume = NOOP; + watchStopHandle.pause = NOOP; + return watchStopHandle; + } + } + const instance = currentInstance; + baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args); + let isPre = false; + if (flush === "post") { + baseWatchOptions.scheduler = (job) => { + queuePostRenderEffect(job, instance && instance.suspense); + }; + } else if (flush !== "sync") { + isPre = true; + baseWatchOptions.scheduler = (job, isFirstRun) => { + if (isFirstRun) { + job(); + } else { + queueJob(job); + } + }; + } + baseWatchOptions.augmentJob = (job) => { + if (cb) { + job.flags |= 4; + } + if (isPre) { + job.flags |= 2; + if (instance) { + job.id = instance.uid; + job.i = instance; + } + } + }; + const watchHandle = watch$1(source, cb, baseWatchOptions); + if (isInSSRComponentSetup) { + if (ssrCleanup) { + ssrCleanup.push(watchHandle); + } else if (runsImmediately) { + watchHandle(); + } + } + return watchHandle; +} +function instanceWatch(source, value, options) { + const publicThis = this.proxy; + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; +} +function createPathGetter(ctx, path) { + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; +} + +function useModel(props, name, options = EMPTY_OBJ) { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useModel() called without active instance.`); + return ref(); + } + const camelizedName = camelize(name); + if (!i.propsOptions[0][camelizedName]) { + warn$1(`useModel() called with prop "${name}" which is not declared.`); + return ref(); + } + const hyphenatedName = hyphenate(name); + const modifiers = getModelModifiers(props, camelizedName); + const res = customRef((track, trigger) => { + let localValue; + let prevSetValue = EMPTY_OBJ; + let prevEmittedValue; + watchSyncEffect(() => { + const propValue = props[camelizedName]; + if (hasChanged(localValue, propValue)) { + localValue = propValue; + trigger(); + } + }); + return { + get() { + track(); + return options.get ? options.get(localValue) : localValue; + }, + set(value) { + const emittedValue = options.set ? options.set(value) : value; + if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) { + return; + } + const rawProps = i.vnode.props; + if (!(rawProps && // check if parent has passed v-model + (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) { + localValue = value; + trigger(); + } + i.emit(`update:${name}`, emittedValue); + if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) { + trigger(); + } + prevSetValue = value; + prevEmittedValue = emittedValue; + } + }; + }); + res[Symbol.iterator] = () => { + let i2 = 0; + return { + next() { + if (i2 < 2) { + return { value: i2++ ? modifiers || EMPTY_OBJ : res, done: false }; + } else { + return { done: true }; + } + } + }; + }; + return res; +} +const getModelModifiers = (props, modelName) => { + return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`]; +}; + +function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) return; + const props = instance.vnode.props || EMPTY_OBJ; + { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.` + ); + } + } else { + const validator = emitsOptions[event]; + if (isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } + } + } + } + } + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modifiers = isModelListener && getModelModifiers(props, event.slice(7)); + if (modifiers) { + if (modifiers.trim) { + args = rawArgs.map((a) => isString(a) ? a.trim() : a); + } + if (modifiers.number) { + args = rawArgs.map(looseToNumber); + } + } + { + devtoolsComponentEmit(instance, event, args); + } + { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( + event + )}" instead of "${event}".` + ); + } + } + let handlerName; + let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; + } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } +} +function normalizeEmitsOptions(comp, appContext, asMixin = false) { + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (!isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); + } + if (comp.extends) { + extendEmits(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendEmits); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); + } + return null; + } + if (isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { + cache.set(comp, normalized); + } + return normalized; +} +function isEmitListener(options, key) { + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); +} + +let accessedAttrs = false; +function markAttrsAccessed() { + accessedAttrs = true; +} +function renderComponentRoot(instance) { + const { + type: Component, + vnode, + proxy, + withProxy, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + props, + data, + setupState, + ctx, + inheritAttrs + } = instance; + const prev = setCurrentRenderingInstance(instance); + let result; + let fallthroughAttrs; + { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); + } + }) : proxyToUse; + result = normalizeVNode( + render.call( + thisProxy, + proxyToUse, + renderCache, + true ? shallowReadonly(props) : props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode( + render2.length > 1 ? render2( + true ? shallowReadonly(props) : props, + true ? { + get attrs() { + markAttrsAccessed(); + return shallowReadonly(attrs); + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + true ? shallowReadonly(props) : props, + null + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs, false, true); + } else if (!accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (isOn(key)) { + if (!isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); + } + } else { + extraAttrs.push(key); + } + } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.` + ); + } + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); + } + } + } + } + if (vnode.dirs) { + if (!isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); + } + root = cloneVNode(root, null, false, true); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!isElementRoot(root)) { + warn$1( + `Component inside <Transition> renders non-element root node that cannot be animated.` + ); + } + setTransitionHooks(root, vnode.transition); + } + if (setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance(prev); + return result; +} +const getChildRoot = (vnode) => { + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } + } + }; + return [normalizeVNode(childRoot), setRoot]; +}; +function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } + } + } + } else { + return; + } + } + return singleRoot; +} +const getFunctionalFallthrough = (attrs) => { + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || isOn(key)) { + (res || (res = {}))[key] = attrs[key]; + } + } + return res; +}; +const filterModelListeners = (attrs, props) => { + const res = {}; + for (const key in attrs) { + if (!isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; + } + } + return res; +}; +const isElementRoot = (vnode) => { + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; +}; +function shouldUpdateComponent(prevVNode, nextVNode, optimized) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if ((prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { + return true; + } + } + if (prevProps === nextProps) { + return false; + } + if (!prevProps) { + return !!nextProps; + } + if (!nextProps) { + return true; + } + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; +} +function hasPropsChanged(prevProps, nextProps, emitsOptions) { + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; + } + } + return false; +} +function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; + } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } +} + +const isSuspense = (type) => type.__isSuspense; +let suspenseId = 0; +const SuspenseImpl = { + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { + n2.suspense = n1.suspense; + n2.suspense.vnode = n2; + n2.el = n1.el; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + normalize: normalizeSuspenseChildren +}; +const Suspense = SuspenseImpl ; +function triggerEvent(vnode, name) { + const eventListener = vnode.props && vnode.props[name]; + if (isFunction(eventListener)) { + eventListener(); + } +} +function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } +} +function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } + } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); + } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); + } + } + } + } +} +let hasWarned = false; +function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + if (!hasWarned) { + hasWarned = true; + console[console.info ? "info" : "log"]( + `<Suspense> is an experimental feature and its API will likely change.` + ); + } + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; + } + } + const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; + { + assertNumber(timeout, `Suspense timeout`); + } + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + { + if (!resume && !suspense.pendingBranch) { + throw new Error( + `suspense.resolve() is called without a pending branch.` + ); + } + if (suspense.isUnmounted) { + throw new Error( + `suspense.resolve() is called on an already unmounted suspense boundary.` + ); + } + } + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) === container2) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect, optimized2) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + { + pushWarningContext(vnode2); + } + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized2 + ); + if (placeholder) { + remove(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + { + popWarningContext(); + } + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + } + }; + return suspense; +} +function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; +} +function normalizeSuspenseChildren(vnode) { + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); +} +function normalizeSuspenseSlot(s) { + let block; + if (isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); + } + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); + } + } + if (isArray(s)) { + const singleChild = filterSingleRoot(s); + if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { + warn$1(`<Suspense> slots expect a single root node.`); + } + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; +} +function queueEffectWithSuspense(fn, suspense) { + if (suspense && suspense.pendingBranch) { + if (isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); + } + } else { + queuePostFlushCb(fn); + } +} +function setActiveBranch(suspense, branch) { + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } +} +function isVNodeSuspensible(vnode) { + const suspensible = vnode.props && vnode.props.suspensible; + return suspensible != null && suspensible !== false; +} + +const Fragment = Symbol.for("v-fgt"); +const Text = Symbol.for("v-txt"); +const Comment = Symbol.for("v-cmt"); +const Static = Symbol.for("v-stc"); +const blockStack = []; +let currentBlock = null; +function openBlock(disableTracking = false) { + blockStack.push(currentBlock = disableTracking ? null : []); +} +function closeBlock() { + blockStack.pop(); + currentBlock = blockStack[blockStack.length - 1] || null; +} +let isBlockTreeEnabled = 1; +function setBlockTracking(value, inVOnce = false) { + isBlockTreeEnabled += value; + if (value < 0 && currentBlock && inVOnce) { + currentBlock.hasOnce = true; + } +} +function setupBlock(vnode) { + vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; + closeBlock(); + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(vnode); + } + return vnode; +} +function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { + return setupBlock( + createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + true + ) + ); +} +function createBlock(type, props, children, patchFlag, dynamicProps) { + return setupBlock( + createVNode( + type, + props, + children, + patchFlag, + dynamicProps, + true + ) + ); +} +function isVNode(value) { + return value ? value.__v_isVNode === true : false; +} +function isSameVNodeType(n1, n2) { + if (n2.shapeFlag & 6 && n1.component) { + const dirtyInstances = hmrDirtyComponents.get(n2.type); + if (dirtyInstances && dirtyInstances.has(n1.component)) { + n1.shapeFlag &= ~256; + n2.shapeFlag &= ~512; + return false; + } + } + return n1.type === n2.type && n1.key === n2.key; +} +let vnodeArgsTransformer; +function transformVNodeArgs(transformer) { + vnodeArgsTransformer = transformer; +} +const createVNodeWithArgsTransform = (...args) => { + return _createVNode( + ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args + ); +}; +const normalizeKey = ({ key }) => key != null ? key : null; +const normalizeRef = ({ + ref, + ref_key, + ref_for +}) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; +}; +function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetStart: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); + } + } else if (children) { + vnode.shapeFlag |= isString(children) ? 8 : 16; + } + if (vnode.key !== vnode.key) { + warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; +} +const createVNode = createVNodeWithArgsTransform ; +function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { + if (!type || type === NULL_DYNAMIC_COMPONENT) { + if (!type) { + warn$1(`Invalid vnode type when creating vnode: ${type}.`); + } + type = Comment; + } + if (isVNode(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); + } + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } + } + cloned.patchFlag = -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (isObject(style)) { + if (isProxy(style) && !isArray(style)) { + style = extend({}, style); + } + props.style = normalizeStyle(style); + } + } + const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; + if (shapeFlag & 4 && isProxy(type)) { + type = toRaw(type); + warn$1( + `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, + ` +Component that was made reactive: `, + type + ); + } + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); +} +function guardReactiveProps(props) { + if (!props) return null; + return isProxy(props) || isInternalObject(props) ? extend({}, props) : props; +} +function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) { + const { props, ref, patchFlag, children, transition } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, + target: vnode.target, + targetStart: vnode.targetStart, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + if (transition && cloneTransition) { + setTransitionHooks( + cloned, + transition.clone(cloned) + ); + } + return cloned; +} +function deepCloneVNode(vnode) { + const cloned = cloneVNode(vnode); + if (isArray(vnode.children)) { + cloned.children = vnode.children.map(deepCloneVNode); + } + return cloned; +} +function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); +} +function createStaticVNode(content, numberOfNodes) { + const vnode = createVNode(Static, null, content); + vnode.staticCount = numberOfNodes; + return vnode; +} +function createCommentVNode(text = "", asBlock = false) { + return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); +} +function normalizeVNode(child) { + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (isVNode(child)) { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } +} +function cloneIfMounted(child) { + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); +} +function normalizeChildren(vnode, children) { + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !isInternalObject(children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; + } + } + } + } else if (isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; + } + } + vnode.children = children; + vnode.shapeFlag |= type; +} +function mergeProps(...args) { + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = normalizeClass([ret.class, toMerge.class]); + } + } else if (key === "style") { + ret.style = normalizeStyle([ret.style, toMerge.style]); + } else if (isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } + } + } + return ret; +} +function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); +} + +const emptyAppContext = createAppContext(); +let uid = 0; +function createComponentInstance(vnode, parent, suspense) { + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + job: null, + scope: new EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + ids: parent ? parent.ids : ["", 0, 0], + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: EMPTY_OBJ, + data: EMPTY_OBJ, + props: EMPTY_OBJ, + attrs: EMPTY_OBJ, + slots: EMPTY_OBJ, + refs: EMPTY_OBJ, + setupState: EMPTY_OBJ, + setupContext: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + { + instance.ctx = createDevRenderContext(instance); + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; +} +let currentInstance = null; +const getCurrentInstance = () => currentInstance || currentRenderingInstance; +let internalSetCurrentInstance; +let setInSSRSetupState; +{ + const g = getGlobalThis(); + const registerGlobalSetter = (key, setter) => { + let setters; + if (!(setters = g[key])) setters = g[key] = []; + setters.push(setter); + return (v) => { + if (setters.length > 1) setters.forEach((set) => set(v)); + else setters[0](v); + }; + }; + internalSetCurrentInstance = registerGlobalSetter( + `__VUE_INSTANCE_SETTERS__`, + (v) => currentInstance = v + ); + setInSSRSetupState = registerGlobalSetter( + `__VUE_SSR_SETTERS__`, + (v) => isInSSRComponentSetup = v + ); +} +const setCurrentInstance = (instance) => { + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; +}; +const unsetCurrentInstance = () => { + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); +}; +const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); +function validateComponentName(name, { isNativeTag }) { + if (isBuiltInTag(name) || isNativeTag(name)) { + warn$1( + "Do not use built-in or reserved HTML elements as component id: " + name + ); + } +} +function isStatefulComponent(instance) { + return instance.vnode.shapeFlag & 4; +} +let isInSSRComponentSetup = false; +function setupComponent(instance, isSSR = false, optimized = false) { + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children, optimized); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; +} +function setupStatefulComponent(instance, isSSR) { + var _a; + const Component = instance.type; + { + if (Component.name) { + validateComponentName(Component.name, instance.appContext.config); + } + if (Component.components) { + const names = Object.keys(Component.components); + for (let i = 0; i < names.length; i++) { + validateComponentName(names[i], instance.appContext.config); + } + } + if (Component.directives) { + const names = Object.keys(Component.directives); + for (let i = 0; i < names.length; i++) { + validateDirectiveName(names[i]); + } + } + if (Component.compilerOptions && isRuntimeOnly()) { + warn$1( + `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` + ); + } + } + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers); + { + exposePropsOnRenderContext(instance); + } + const { setup } = Component; + if (setup) { + pauseTracking(); + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + shallowReadonly(instance.props) , + setupContext + ] + ); + const isAsyncSetup = isPromise(setupResult); + resetTracking(); + reset(); + if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) { + markAsyncBoundary(instance); + } + if (isAsyncSetup) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + if (!instance.suspense) { + const name = (_a = Component.name) != null ? _a : "Anonymous"; + warn$1( + `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` + ); + } + } + } else { + handleSetupResult(instance, setupResult, isSSR); + } + } else { + finishComponentSetup(instance, isSSR); + } +} +function handleSetupResult(instance, setupResult, isSSR) { + if (isFunction(setupResult)) { + if (instance.type.__ssrInlineRender) { + instance.ssrRender = setupResult; + } else { + instance.render = setupResult; + } + } else if (isObject(setupResult)) { + if (isVNode(setupResult)) { + warn$1( + `setup() should not return VNodes directly - return a render function instead.` + ); + } + { + instance.devtoolsRawSetupState = setupResult; + } + instance.setupState = proxyRefs(setupResult); + { + exposeSetupStateOnRenderContext(instance); + } + } else if (setupResult !== void 0) { + warn$1( + `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` + ); + } + finishComponentSetup(instance, isSSR); +} +let compile; +let installWithProxy; +function registerRuntimeCompiler(_compile) { + compile = _compile; + installWithProxy = (i) => { + if (i.render._rc) { + i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); + } + }; +} +const isRuntimeOnly = () => !compile; +function finishComponentSetup(instance, isSSR, skipOptions) { + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile && !Component.render) { + const template = Component.template || resolveMergedOptions(instance).template; + if (template) { + { + startMeasure(instance, `compile`); + } + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = extend( + extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions + ); + Component.render = compile(template, finalCompilerOptions); + { + endMeasure(instance, `compile`); + } + } + } + instance.render = Component.render || NOOP; + if (installWithProxy) { + installWithProxy(instance); + } + } + { + const reset = setCurrentInstance(instance); + pauseTracking(); + try { + applyOptions(instance); + } finally { + resetTracking(); + reset(); + } + } + if (!Component.render && instance.render === NOOP && !isSSR) { + if (!compile && Component.template) { + warn$1( + `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.esm-browser.js" instead.` ) + ); + } else { + warn$1(`Component is missing template or render function: `, Component); + } + } +} +const attrsProxyHandlers = { + get(target, key) { + markAttrsAccessed(); + track(target, "get", ""); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } +} ; +function getSlotsProxy(instance) { + return new Proxy(instance.slots, { + get(target, key) { + track(instance, "get", "$slots"); + return target[key]; + } + }); +} +function createSetupContext(instance) { + const expose = (exposed) => { + { + if (instance.exposed) { + warn$1(`expose() should be called only once per setup().`); + } + if (exposed != null) { + let exposedType = typeof exposed; + if (exposedType === "object") { + if (isArray(exposed)) { + exposedType = "array"; + } else if (isRef(exposed)) { + exposedType = "ref"; + } + } + if (exposedType !== "object") { + warn$1( + `expose() should be passed a plain object, received ${exposedType}.` + ); + } + } + } + instance.exposed = exposed || {}; + }; + { + let attrsProxy; + let slotsProxy; + return Object.freeze({ + get attrs() { + return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers)); + }, + get slots() { + return slotsProxy || (slotsProxy = getSlotsProxy(instance)); + }, + get emit() { + return (event, ...args) => instance.emit(event, ...args); + }, + expose + }); + } +} +function getComponentPublicInstance(instance) { + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); + } + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } else { + return instance.proxy; + } +} +const classifyRE = /(?:^|[-_])(\w)/g; +const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); +function getComponentName(Component, includeInferred = true) { + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; +} +function formatComponentName(instance, Component, isRoot = false) { + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; + } + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; +} +function isClassComponent(value) { + return isFunction(value) && "__vccOpts" in value; +} + +const computed = (getterOrOptions, debugOptions) => { + const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); + { + const i = getCurrentInstance(); + if (i && i.appContext.config.warnRecursiveComputed) { + c._warnRecursive = true; + } + } + return c; +}; + +function h(type, propsOrChildren, children) { + const l = arguments.length; + if (l === 2) { + if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { + if (isVNode(propsOrChildren)) { + return createVNode(type, null, [propsOrChildren]); + } + return createVNode(type, propsOrChildren); + } else { + return createVNode(type, null, propsOrChildren); + } + } else { + if (l > 3) { + children = Array.prototype.slice.call(arguments, 2); + } else if (l === 3 && isVNode(children)) { + children = [children]; + } + return createVNode(type, propsOrChildren, children); + } +} + +function initCustomFormatter() { + if (typeof window === "undefined") { + return; + } + const vueStyle = { style: "color:#3ba776" }; + const numberStyle = { style: "color:#1677ff" }; + const stringStyle = { style: "color:#f5222d" }; + const keywordStyle = { style: "color:#eb2f96" }; + const formatter = { + __vue_custom_formatter: true, + header(obj) { + if (!isObject(obj)) { + return null; + } + if (obj.__isVue) { + return ["div", vueStyle, `VueInstance`]; + } else if (isRef(obj)) { + return [ + "div", + {}, + ["span", vueStyle, genRefFlag(obj)], + "<", + // avoid debugger accessing value affecting behavior + formatValue("_value" in obj ? obj._value : obj), + `>` + ]; + } else if (isReactive(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"], + "<", + formatValue(obj), + `>${isReadonly(obj) ? ` (readonly)` : ``}` + ]; + } else if (isReadonly(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"], + "<", + formatValue(obj), + ">" + ]; + } + return null; + }, + hasBody(obj) { + return obj && obj.__isVue; + }, + body(obj) { + if (obj && obj.__isVue) { + return [ + "div", + {}, + ...formatInstance(obj.$) + ]; + } + } + }; + function formatInstance(instance) { + const blocks = []; + if (instance.type.props && instance.props) { + blocks.push(createInstanceBlock("props", toRaw(instance.props))); + } + if (instance.setupState !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("setup", instance.setupState)); + } + if (instance.data !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("data", toRaw(instance.data))); + } + const computed = extractKeys(instance, "computed"); + if (computed) { + blocks.push(createInstanceBlock("computed", computed)); + } + const injected = extractKeys(instance, "inject"); + if (injected) { + blocks.push(createInstanceBlock("injected", injected)); + } + blocks.push([ + "div", + {}, + [ + "span", + { + style: keywordStyle.style + ";opacity:0.66" + }, + "$ (internal): " + ], + ["object", { object: instance }] + ]); + return blocks; + } + function createInstanceBlock(type, target) { + target = extend({}, target); + if (!Object.keys(target).length) { + return ["span", {}]; + } + return [ + "div", + { style: "line-height:1.25em;margin-bottom:0.6em" }, + [ + "div", + { + style: "color:#476582" + }, + type + ], + [ + "div", + { + style: "padding-left:1.25em" + }, + ...Object.keys(target).map((key) => { + return [ + "div", + {}, + ["span", keywordStyle, key + ": "], + formatValue(target[key], false) + ]; + }) + ] + ]; + } + function formatValue(v, asRaw = true) { + if (typeof v === "number") { + return ["span", numberStyle, v]; + } else if (typeof v === "string") { + return ["span", stringStyle, JSON.stringify(v)]; + } else if (typeof v === "boolean") { + return ["span", keywordStyle, v]; + } else if (isObject(v)) { + return ["object", { object: asRaw ? toRaw(v) : v }]; + } else { + return ["span", stringStyle, String(v)]; + } + } + function extractKeys(instance, type) { + const Comp = instance.type; + if (isFunction(Comp)) { + return; + } + const extracted = {}; + for (const key in instance.ctx) { + if (isKeyOfType(Comp, key, type)) { + extracted[key] = instance.ctx[key]; + } + } + return extracted; + } + function isKeyOfType(Comp, key, type) { + const opts = Comp[type]; + if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) { + return true; + } + if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { + return true; + } + if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { + return true; + } + } + function genRefFlag(v) { + if (isShallow(v)) { + return `ShallowRef`; + } + if (v.effect) { + return `ComputedRef`; + } + return `Ref`; + } + if (window.devtoolsFormatters) { + window.devtoolsFormatters.push(formatter); + } else { + window.devtoolsFormatters = [formatter]; + } +} + +function withMemo(memo, render, cache, index) { + const cached = cache[index]; + if (cached && isMemoSame(cached, memo)) { + return cached; + } + const ret = render(); + ret.memo = memo.slice(); + ret.cacheIndex = index; + return cache[index] = ret; +} +function isMemoSame(cached, memo) { + const prev = cached.memo; + if (prev.length != memo.length) { + return false; + } + for (let i = 0; i < prev.length; i++) { + if (hasChanged(prev[i], memo[i])) { + return false; + } + } + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(cached); + } + return true; +} + +const version = "3.5.13"; +const warn = warn$1 ; +const ErrorTypeStrings = ErrorTypeStrings$1 ; +const devtools = devtools$1 ; +const setDevtoolsHook = setDevtoolsHook$1 ; +const _ssrUtils = { + createComponentInstance, + setupComponent, + renderComponentRoot, + setCurrentRenderingInstance, + isVNode: isVNode, + normalizeVNode, + getComponentPublicInstance, + ensureValidVNode, + pushWarningContext, + popWarningContext +}; +const ssrUtils = _ssrUtils ; +const resolveFilter = null; +const compatUtils = null; +const DeprecationTypes = null; + +let policy = void 0; +const tt = typeof window !== "undefined" && window.trustedTypes; +if (tt) { + try { + policy = /* @__PURE__ */ tt.createPolicy("vue", { + createHTML: (val) => val + }); + } catch (e) { + warn(`Error creating trusted types policy: ${e}`); + } +} +const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val; +const svgNS = "http://www.w3.org/2000/svg"; +const mathmlNS = "http://www.w3.org/1998/Math/MathML"; +const doc = typeof document !== "undefined" ? document : null; +const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); +const nodeOps = { + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); + } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) break; + } + } else { + templateContainer.innerHTML = unsafeToTrustedHTML( + namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content + ); + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } +}; + +const TRANSITION = "transition"; +const ANIMATION = "animation"; +const vtcKey = Symbol("_vtc"); +const DOMTransitionPropsValidators = { + name: String, + type: String, + css: { + type: Boolean, + default: true + }, + duration: [String, Number, Object], + enterFromClass: String, + enterActiveClass: String, + enterToClass: String, + appearFromClass: String, + appearActiveClass: String, + appearToClass: String, + leaveFromClass: String, + leaveActiveClass: String, + leaveToClass: String +}; +const TransitionPropsValidators = /* @__PURE__ */ extend( + {}, + BaseTransitionPropsValidators, + DOMTransitionPropsValidators +); +const decorate$1 = (t) => { + t.displayName = "Transition"; + t.props = TransitionPropsValidators; + return t; +}; +const Transition = /* @__PURE__ */ decorate$1( + (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots) +); +const callHook = (hook, args = []) => { + if (isArray(hook)) { + hook.forEach((h2) => h2(...args)); + } else if (hook) { + hook(...args); + } +}; +const hasExplicitCallback = (hook) => { + return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; +}; +function resolveTransitionProps(rawProps) { + const baseProps = {}; + for (const key in rawProps) { + if (!(key in DOMTransitionPropsValidators)) { + baseProps[key] = rawProps[key]; + } + } + if (rawProps.css === false) { + return baseProps; + } + const { + name = "v", + type, + duration, + enterFromClass = `${name}-enter-from`, + enterActiveClass = `${name}-enter-active`, + enterToClass = `${name}-enter-to`, + appearFromClass = enterFromClass, + appearActiveClass = enterActiveClass, + appearToClass = enterToClass, + leaveFromClass = `${name}-leave-from`, + leaveActiveClass = `${name}-leave-active`, + leaveToClass = `${name}-leave-to` + } = rawProps; + const durations = normalizeDuration(duration); + const enterDuration = durations && durations[0]; + const leaveDuration = durations && durations[1]; + const { + onBeforeEnter, + onEnter, + onEnterCancelled, + onLeave, + onLeaveCancelled, + onBeforeAppear = onBeforeEnter, + onAppear = onEnter, + onAppearCancelled = onEnterCancelled + } = baseProps; + const finishEnter = (el, isAppear, done, isCancelled) => { + el._enterCancelled = isCancelled; + removeTransitionClass(el, isAppear ? appearToClass : enterToClass); + removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); + done && done(); + }; + const finishLeave = (el, done) => { + el._isLeaving = false; + removeTransitionClass(el, leaveFromClass); + removeTransitionClass(el, leaveToClass); + removeTransitionClass(el, leaveActiveClass); + done && done(); + }; + const makeEnterHook = (isAppear) => { + return (el, done) => { + const hook = isAppear ? onAppear : onEnter; + const resolve = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve]); + nextFrame(() => { + removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); + addTransitionClass(el, isAppear ? appearToClass : enterToClass); + if (!hasExplicitCallback(hook)) { + whenTransitionEnds(el, type, enterDuration, resolve); + } + }); + }; + }; + return extend(baseProps, { + onBeforeEnter(el) { + callHook(onBeforeEnter, [el]); + addTransitionClass(el, enterFromClass); + addTransitionClass(el, enterActiveClass); + }, + onBeforeAppear(el) { + callHook(onBeforeAppear, [el]); + addTransitionClass(el, appearFromClass); + addTransitionClass(el, appearActiveClass); + }, + onEnter: makeEnterHook(false), + onAppear: makeEnterHook(true), + onLeave(el, done) { + el._isLeaving = true; + const resolve = () => finishLeave(el, done); + addTransitionClass(el, leaveFromClass); + if (!el._enterCancelled) { + forceReflow(); + addTransitionClass(el, leaveActiveClass); + } else { + addTransitionClass(el, leaveActiveClass); + forceReflow(); + } + nextFrame(() => { + if (!el._isLeaving) { + return; + } + removeTransitionClass(el, leaveFromClass); + addTransitionClass(el, leaveToClass); + if (!hasExplicitCallback(onLeave)) { + whenTransitionEnds(el, type, leaveDuration, resolve); + } + }); + callHook(onLeave, [el, resolve]); + }, + onEnterCancelled(el) { + finishEnter(el, false, void 0, true); + callHook(onEnterCancelled, [el]); + }, + onAppearCancelled(el) { + finishEnter(el, true, void 0, true); + callHook(onAppearCancelled, [el]); + }, + onLeaveCancelled(el) { + finishLeave(el); + callHook(onLeaveCancelled, [el]); + } + }); +} +function normalizeDuration(duration) { + if (duration == null) { + return null; + } else if (isObject(duration)) { + return [NumberOf(duration.enter), NumberOf(duration.leave)]; + } else { + const n = NumberOf(duration); + return [n, n]; + } +} +function NumberOf(val) { + const res = toNumber(val); + { + assertNumber(res, "<transition> explicit duration"); + } + return res; +} +function addTransitionClass(el, cls) { + cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); + (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); +} +function removeTransitionClass(el, cls) { + cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.delete(cls); + if (!_vtc.size) { + el[vtcKey] = void 0; + } + } +} +function nextFrame(cb) { + requestAnimationFrame(() => { + requestAnimationFrame(cb); + }); +} +let endId = 0; +function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { + const id = el._endId = ++endId; + const resolveIfNotStale = () => { + if (id === el._endId) { + resolve(); + } + }; + if (explicitTimeout != null) { + return setTimeout(resolveIfNotStale, explicitTimeout); + } + const { type, timeout, propCount } = getTransitionInfo(el, expectedType); + if (!type) { + return resolve(); + } + const endEvent = type + "end"; + let ended = 0; + const end = () => { + el.removeEventListener(endEvent, onEnd); + resolveIfNotStale(); + }; + const onEnd = (e) => { + if (e.target === el && ++ended >= propCount) { + end(); + } + }; + setTimeout(() => { + if (ended < propCount) { + end(); + } + }, timeout + 1); + el.addEventListener(endEvent, onEnd); +} +function getTransitionInfo(el, expectedType) { + const styles = window.getComputedStyle(el); + const getStyleProperties = (key) => (styles[key] || "").split(", "); + const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); + const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); + const transitionTimeout = getTimeout(transitionDelays, transitionDurations); + const animationDelays = getStyleProperties(`${ANIMATION}Delay`); + const animationDurations = getStyleProperties(`${ANIMATION}Duration`); + const animationTimeout = getTimeout(animationDelays, animationDurations); + let type = null; + let timeout = 0; + let propCount = 0; + if (expectedType === TRANSITION) { + if (transitionTimeout > 0) { + type = TRANSITION; + timeout = transitionTimeout; + propCount = transitionDurations.length; + } + } else if (expectedType === ANIMATION) { + if (animationTimeout > 0) { + type = ANIMATION; + timeout = animationTimeout; + propCount = animationDurations.length; + } + } else { + timeout = Math.max(transitionTimeout, animationTimeout); + type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; + propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; + } + const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( + getStyleProperties(`${TRANSITION}Property`).toString() + ); + return { + type, + timeout, + propCount, + hasTransform + }; +} +function getTimeout(delays, durations) { + while (delays.length < durations.length) { + delays = delays.concat(delays); + } + return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); +} +function toMs(s) { + if (s === "auto") return 0; + return Number(s.slice(0, -1).replace(",", ".")) * 1e3; +} +function forceReflow() { + return document.body.offsetHeight; +} + +function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } +} + +const vShowOriginalDisplay = Symbol("_vod"); +const vShowHidden = Symbol("_vsh"); +const vShow = { + beforeMount(el, { value }, { transition }) { + el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display; + if (transition && value) { + transition.beforeEnter(el); + } else { + setDisplay(el, value); + } + }, + mounted(el, { value }, { transition }) { + if (transition && value) { + transition.enter(el); + } + }, + updated(el, { value, oldValue }, { transition }) { + if (!value === !oldValue) return; + if (transition) { + if (value) { + transition.beforeEnter(el); + setDisplay(el, true); + transition.enter(el); + } else { + transition.leave(el, () => { + setDisplay(el, false); + }); + } + } else { + setDisplay(el, value); + } + }, + beforeUnmount(el, { value }) { + setDisplay(el, value); + } +}; +{ + vShow.name = "show"; +} +function setDisplay(el, value) { + el.style.display = value ? el[vShowOriginalDisplay] : "none"; + el[vShowHidden] = !value; +} +function initVShowForSSR() { + vShow.getSSRProps = ({ value }) => { + if (!value) { + return { style: { display: "none" } }; + } + }; +} + +const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); +function useCssVars(getter) { + const instance = getCurrentInstance(); + if (!instance) { + warn(`useCssVars is called without current active component instance.`); + return; + } + const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { + Array.from( + document.querySelectorAll(`[data-v-owner="${instance.uid}"]`) + ).forEach((node) => setVarsOnNode(node, vars)); + }; + { + instance.getCssVars = () => getter(instance.proxy); + } + const setVars = () => { + const vars = getter(instance.proxy); + if (instance.ce) { + setVarsOnNode(instance.ce, vars); + } else { + setVarsOnVNode(instance.subTree, vars); + } + updateTeleports(vars); + }; + onBeforeUpdate(() => { + queuePostFlushCb(setVars); + }); + onMounted(() => { + watch(setVars, NOOP, { flush: "post" }); + const ob = new MutationObserver(setVars); + ob.observe(instance.subTree.el.parentNode, { childList: true }); + onUnmounted(() => ob.disconnect()); + }); +} +function setVarsOnVNode(vnode, vars) { + if (vnode.shapeFlag & 128) { + const suspense = vnode.suspense; + vnode = suspense.activeBranch; + if (suspense.pendingBranch && !suspense.isHydrating) { + suspense.effects.push(() => { + setVarsOnVNode(suspense.activeBranch, vars); + }); + } + } + while (vnode.component) { + vnode = vnode.component.subTree; + } + if (vnode.shapeFlag & 1 && vnode.el) { + setVarsOnNode(vnode.el, vars); + } else if (vnode.type === Fragment) { + vnode.children.forEach((c) => setVarsOnVNode(c, vars)); + } else if (vnode.type === Static) { + let { el, anchor } = vnode; + while (el) { + setVarsOnNode(el, vars); + if (el === anchor) break; + el = el.nextSibling; + } + } +} +function setVarsOnNode(el, vars) { + if (el.nodeType === 1) { + const style = el.style; + let cssText = ""; + for (const key in vars) { + style.setProperty(`--${key}`, vars[key]); + cssText += `--${key}: ${vars[key]};`; + } + style[CSS_VAR_TEXT] = cssText; + } +} + +const displayRE = /(^|;)\s*display\s*:/; +function patchStyle(el, prev, next) { + const style = el.style; + const isCssString = isString(next); + let hasControlledDisplay = false; + if (next && !isCssString) { + if (prev) { + if (!isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } else { + for (const prevStyle of prev.split(";")) { + const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim(); + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + } + for (const key in next) { + if (key === "display") { + hasControlledDisplay = true; + } + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + hasControlledDisplay = displayRE.test(next); + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOriginalDisplay in el) { + el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : ""; + if (el[vShowHidden]) { + style.display = "none"; + } + } +} +const semicolonRE = /[^\\];\s*$/; +const importantRE = /\s*!important$/; +function setStyle(style, name, val) { + if (isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) val = ""; + { + if (semicolonRE.test(val)) { + warn( + `Unexpected semicolon at the end of '${name}' style value: '${val}'` + ); + } + } + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } +} +const prefixes = ["Webkit", "Moz", "ms"]; +const prefixCache = {}; +function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; +} + +const xlinkNS = "http://www.w3.org/1999/xlink"; +function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + if (value == null || isBoolean && !includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute( + key, + isBoolean ? "" : isSymbol(value) ? String(value) : value + ); + } + } +} + +function patchDOMProp(el, key, value, parentComponent, attrName) { + if (key === "innerHTML" || key === "textContent") { + if (value != null) { + el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value; + } + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; + const newValue = value == null ? ( + // #11647: value should be set as empty string for null and undefined, + // but <input type="checkbox"> should be set as 'on'. + el.type === "checkbox" ? "on" : "" + ) : String(value); + if (oldValue !== newValue || !("_value" in el)) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + el._value = value; + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + if (!needRemove) { + warn( + `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, + e + ); + } + } + needRemove && el.removeAttribute(attrName || key); +} + +function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); +} +function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); +} +const veiKey = Symbol("_vei"); +function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = sanitizeEventValue(nextValue, rawName) ; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker( + sanitizeEventValue(nextValue, rawName) , + instance + ); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } +} +const optionsModifierRE = /(?:Once|Passive|Capture)$/; +function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); + return [event, options]; +} +let cachedNow = 0; +const p = /* @__PURE__ */ Promise.resolve(); +const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); +function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; +} +function sanitizeEventValue(value, propName) { + if (isFunction(value) || isArray(value)) { + return value; + } + warn( + `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop? +Expected function or array of functions, received type ${typeof value}.` + ); + return NOOP; +} +function patchStopImmediatePropagation(e, value) { + if (isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map( + (fn) => (e2) => !e2._stopped && fn && fn(e2) + ); + } else { + return value; + } +} + +const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter +key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; +const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (isOn(key)) { + if (!isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp(el, key, nextValue); + if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { + patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); + } + } else if ( + // #11081 force set props for possible async custom element + el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue)) + ) { + patchDOMProp(el, camelize(key), nextValue, parentComponent, key); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } +}; +function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && isString(value)) { + return false; + } + return key in el; +} + +const REMOVAL = {}; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineCustomElement(options, extraOptions, _createApp) { + const Comp = defineComponent(options, extraOptions); + if (isPlainObject(Comp)) extend(Comp, extraOptions); + class VueCustomElement extends VueElement { + constructor(initialProps) { + super(Comp, initialProps, _createApp); + } + } + VueCustomElement.def = Comp; + return VueCustomElement; +} +/*! #__NO_SIDE_EFFECTS__ */ +const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => { + return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp); +}; +const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { +}; +class VueElement extends BaseClass { + constructor(_def, _props = {}, _createApp = createApp) { + super(); + this._def = _def; + this._props = _props; + this._createApp = _createApp; + this._isVueCE = true; + /** + * @internal + */ + this._instance = null; + /** + * @internal + */ + this._app = null; + /** + * @internal + */ + this._nonce = this._def.nonce; + this._connected = false; + this._resolved = false; + this._numberProps = null; + this._styleChildren = /* @__PURE__ */ new WeakSet(); + this._ob = null; + if (this.shadowRoot && _createApp !== createApp) { + this._root = this.shadowRoot; + } else { + if (this.shadowRoot) { + warn( + `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` + ); + } + if (_def.shadowRoot !== false) { + this.attachShadow({ mode: "open" }); + this._root = this.shadowRoot; + } else { + this._root = this; + } + } + if (!this._def.__asyncLoader) { + this._resolveProps(this._def); + } + } + connectedCallback() { + if (!this.isConnected) return; + if (!this.shadowRoot) { + this._parseSlots(); + } + this._connected = true; + let parent = this; + while (parent = parent && (parent.parentNode || parent.host)) { + if (parent instanceof VueElement) { + this._parent = parent; + break; + } + } + if (!this._instance) { + if (this._resolved) { + this._setParent(); + this._update(); + } else { + if (parent && parent._pendingResolve) { + this._pendingResolve = parent._pendingResolve.then(() => { + this._pendingResolve = void 0; + this._resolveDef(); + }); + } else { + this._resolveDef(); + } + } + } + } + _setParent(parent = this._parent) { + if (parent) { + this._instance.parent = parent._instance; + this._instance.provides = parent._instance.provides; + } + } + disconnectedCallback() { + this._connected = false; + nextTick(() => { + if (!this._connected) { + if (this._ob) { + this._ob.disconnect(); + this._ob = null; + } + this._app && this._app.unmount(); + if (this._instance) this._instance.ce = void 0; + this._app = this._instance = null; + } + }); + } + /** + * resolve inner component definition (handle possible async component) + */ + _resolveDef() { + if (this._pendingResolve) { + return; + } + for (let i = 0; i < this.attributes.length; i++) { + this._setAttr(this.attributes[i].name); + } + this._ob = new MutationObserver((mutations) => { + for (const m of mutations) { + this._setAttr(m.attributeName); + } + }); + this._ob.observe(this, { attributes: true }); + const resolve = (def, isAsync = false) => { + this._resolved = true; + this._pendingResolve = void 0; + const { props, styles } = def; + let numberProps; + if (props && !isArray(props)) { + for (const key in props) { + const opt = props[key]; + if (opt === Number || opt && opt.type === Number) { + if (key in this._props) { + this._props[key] = toNumber(this._props[key]); + } + (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true; + } + } + } + this._numberProps = numberProps; + if (isAsync) { + this._resolveProps(def); + } + if (this.shadowRoot) { + this._applyStyles(styles); + } else if (styles) { + warn( + "Custom element style injection is not supported when using shadowRoot: false" + ); + } + this._mount(def); + }; + const asyncDef = this._def.__asyncLoader; + if (asyncDef) { + this._pendingResolve = asyncDef().then( + (def) => resolve(this._def = def, true) + ); + } else { + resolve(this._def); + } + } + _mount(def) { + if (!def.name) { + def.name = "VueElement"; + } + this._app = this._createApp(def); + if (def.configureApp) { + def.configureApp(this._app); + } + this._app._ceVNode = this._createVNode(); + this._app.mount(this._root); + const exposed = this._instance && this._instance.exposed; + if (!exposed) return; + for (const key in exposed) { + if (!hasOwn(this, key)) { + Object.defineProperty(this, key, { + // unwrap ref to be consistent with public instance behavior + get: () => unref(exposed[key]) + }); + } else { + warn(`Exposed property "${key}" already exists on custom element.`); + } + } + } + _resolveProps(def) { + const { props } = def; + const declaredPropKeys = isArray(props) ? props : Object.keys(props || {}); + for (const key of Object.keys(this)) { + if (key[0] !== "_" && declaredPropKeys.includes(key)) { + this._setProp(key, this[key]); + } + } + for (const key of declaredPropKeys.map(camelize)) { + Object.defineProperty(this, key, { + get() { + return this._getProp(key); + }, + set(val) { + this._setProp(key, val, true, true); + } + }); + } + } + _setAttr(key) { + if (key.startsWith("data-v-")) return; + const has = this.hasAttribute(key); + let value = has ? this.getAttribute(key) : REMOVAL; + const camelKey = camelize(key); + if (has && this._numberProps && this._numberProps[camelKey]) { + value = toNumber(value); + } + this._setProp(camelKey, value, false, true); + } + /** + * @internal + */ + _getProp(key) { + return this._props[key]; + } + /** + * @internal + */ + _setProp(key, val, shouldReflect = true, shouldUpdate = false) { + if (val !== this._props[key]) { + if (val === REMOVAL) { + delete this._props[key]; + } else { + this._props[key] = val; + if (key === "key" && this._app) { + this._app._ceVNode.key = val; + } + } + if (shouldUpdate && this._instance) { + this._update(); + } + if (shouldReflect) { + const ob = this._ob; + ob && ob.disconnect(); + if (val === true) { + this.setAttribute(hyphenate(key), ""); + } else if (typeof val === "string" || typeof val === "number") { + this.setAttribute(hyphenate(key), val + ""); + } else if (!val) { + this.removeAttribute(hyphenate(key)); + } + ob && ob.observe(this, { attributes: true }); + } + } + } + _update() { + render(this._createVNode(), this._root); + } + _createVNode() { + const baseProps = {}; + if (!this.shadowRoot) { + baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this); + } + const vnode = createVNode(this._def, extend(baseProps, this._props)); + if (!this._instance) { + vnode.ce = (instance) => { + this._instance = instance; + instance.ce = this; + instance.isCE = true; + { + instance.ceReload = (newStyles) => { + if (this._styles) { + this._styles.forEach((s) => this._root.removeChild(s)); + this._styles.length = 0; + } + this._applyStyles(newStyles); + this._instance = null; + this._update(); + }; + } + const dispatch = (event, args) => { + this.dispatchEvent( + new CustomEvent( + event, + isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args } + ) + ); + }; + instance.emit = (event, ...args) => { + dispatch(event, args); + if (hyphenate(event) !== event) { + dispatch(hyphenate(event), args); + } + }; + this._setParent(); + }; + } + return vnode; + } + _applyStyles(styles, owner) { + if (!styles) return; + if (owner) { + if (owner === this._def || this._styleChildren.has(owner)) { + return; + } + this._styleChildren.add(owner); + } + const nonce = this._nonce; + for (let i = styles.length - 1; i >= 0; i--) { + const s = document.createElement("style"); + if (nonce) s.setAttribute("nonce", nonce); + s.textContent = styles[i]; + this.shadowRoot.prepend(s); + { + if (owner) { + if (owner.__hmrId) { + if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map(); + let entry = this._childStyles.get(owner.__hmrId); + if (!entry) { + this._childStyles.set(owner.__hmrId, entry = []); + } + entry.push(s); + } + } else { + (this._styles || (this._styles = [])).push(s); + } + } + } + } + /** + * Only called when shadowRoot is false + */ + _parseSlots() { + const slots = this._slots = {}; + let n; + while (n = this.firstChild) { + const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default"; + (slots[slotName] || (slots[slotName] = [])).push(n); + this.removeChild(n); + } + } + /** + * Only called when shadowRoot is false + */ + _renderSlots() { + const outlets = (this._teleportTarget || this).querySelectorAll("slot"); + const scopeId = this._instance.type.__scopeId; + for (let i = 0; i < outlets.length; i++) { + const o = outlets[i]; + const slotName = o.getAttribute("name") || "default"; + const content = this._slots[slotName]; + const parent = o.parentNode; + if (content) { + for (const n of content) { + if (scopeId && n.nodeType === 1) { + const id = scopeId + "-s"; + const walker = document.createTreeWalker(n, 1); + n.setAttribute(id, ""); + let child; + while (child = walker.nextNode()) { + child.setAttribute(id, ""); + } + } + parent.insertBefore(n, o); + } + } else { + while (o.firstChild) parent.insertBefore(o.firstChild, o); + } + parent.removeChild(o); + } + } + /** + * @internal + */ + _injectChildStyle(comp) { + this._applyStyles(comp.styles, comp); + } + /** + * @internal + */ + _removeChildStyle(comp) { + { + this._styleChildren.delete(comp); + if (this._childStyles && comp.__hmrId) { + const oldStyles = this._childStyles.get(comp.__hmrId); + if (oldStyles) { + oldStyles.forEach((s) => this._root.removeChild(s)); + oldStyles.length = 0; + } + } + } + } +} +function useHost(caller) { + const instance = getCurrentInstance(); + const el = instance && instance.ce; + if (el) { + return el; + } else { + if (!instance) { + warn( + `${caller || "useHost"} called without an active component instance.` + ); + } else { + warn( + `${caller || "useHost"} can only be used in components defined via defineCustomElement.` + ); + } + } + return null; +} +function useShadowRoot() { + const el = useHost("useShadowRoot") ; + return el && el.shadowRoot; +} + +function useCssModule(name = "$style") { + { + const instance = getCurrentInstance(); + if (!instance) { + warn(`useCssModule must be called inside setup()`); + return EMPTY_OBJ; + } + const modules = instance.type.__cssModules; + if (!modules) { + warn(`Current instance does not have CSS modules injected.`); + return EMPTY_OBJ; + } + const mod = modules[name]; + if (!mod) { + warn(`Current instance does not have CSS module named "${name}".`); + return EMPTY_OBJ; + } + return mod; + } +} + +const positionMap = /* @__PURE__ */ new WeakMap(); +const newPositionMap = /* @__PURE__ */ new WeakMap(); +const moveCbKey = Symbol("_moveCb"); +const enterCbKey = Symbol("_enterCb"); +const decorate = (t) => { + delete t.props.mode; + return t; +}; +const TransitionGroupImpl = /* @__PURE__ */ decorate({ + name: "TransitionGroup", + props: /* @__PURE__ */ extend({}, TransitionPropsValidators, { + tag: String, + moveClass: String + }), + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevChildren; + let children; + onUpdated(() => { + if (!prevChildren.length) { + return; + } + const moveClass = props.moveClass || `${props.name || "v"}-move`; + if (!hasCSSTransform( + prevChildren[0].el, + instance.vnode.el, + moveClass + )) { + return; + } + prevChildren.forEach(callPendingCbs); + prevChildren.forEach(recordPosition); + const movedChildren = prevChildren.filter(applyTranslation); + forceReflow(); + movedChildren.forEach((c) => { + const el = c.el; + const style = el.style; + addTransitionClass(el, moveClass); + style.transform = style.webkitTransform = style.transitionDuration = ""; + const cb = el[moveCbKey] = (e) => { + if (e && e.target !== el) { + return; + } + if (!e || /transform$/.test(e.propertyName)) { + el.removeEventListener("transitionend", cb); + el[moveCbKey] = null; + removeTransitionClass(el, moveClass); + } + }; + el.addEventListener("transitionend", cb); + }); + }); + return () => { + const rawProps = toRaw(props); + const cssTransitionProps = resolveTransitionProps(rawProps); + let tag = rawProps.tag || Fragment; + prevChildren = []; + if (children) { + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.el && child.el instanceof Element) { + prevChildren.push(child); + setTransitionHooks( + child, + resolveTransitionHooks( + child, + cssTransitionProps, + state, + instance + ) + ); + positionMap.set( + child, + child.el.getBoundingClientRect() + ); + } + } + } + children = slots.default ? getTransitionRawChildren(slots.default()) : []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.key != null) { + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + } else if (child.type !== Text) { + warn(`<TransitionGroup> children must be keyed.`); + } + } + return createVNode(tag, null, children); + }; + } +}); +const TransitionGroup = TransitionGroupImpl; +function callPendingCbs(c) { + const el = c.el; + if (el[moveCbKey]) { + el[moveCbKey](); + } + if (el[enterCbKey]) { + el[enterCbKey](); + } +} +function recordPosition(c) { + newPositionMap.set(c, c.el.getBoundingClientRect()); +} +function applyTranslation(c) { + const oldPos = positionMap.get(c); + const newPos = newPositionMap.get(c); + const dx = oldPos.left - newPos.left; + const dy = oldPos.top - newPos.top; + if (dx || dy) { + const s = c.el.style; + s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; + s.transitionDuration = "0s"; + return c; + } +} +function hasCSSTransform(el, root, moveClass) { + const clone = el.cloneNode(); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.forEach((cls) => { + cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); + }); + } + moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); + clone.style.display = "none"; + const container = root.nodeType === 1 ? root : root.parentNode; + container.appendChild(clone); + const { hasTransform } = getTransitionInfo(clone); + container.removeChild(clone); + return hasTransform; +} + +const getModelAssigner = (vnode) => { + const fn = vnode.props["onUpdate:modelValue"] || false; + return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; +}; +function onCompositionStart(e) { + e.target.composing = true; +} +function onCompositionEnd(e) { + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } +} +const assignKey = Symbol("_assign"); +const vModelText = { + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); + } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) return; + const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy && value === oldValue) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } +}; +const vModelCheckbox = { + // #4096 array checkboxes need to be deep traversed + deep: true, + created(el, _, vnode) { + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + const modelValue = el._modelValue; + const elementValue = getValue(el); + const checked = el.checked; + const assign = el[assignKey]; + if (isArray(modelValue)) { + const index = looseIndexOf(modelValue, elementValue); + const found = index !== -1; + if (checked && !found) { + assign(modelValue.concat(elementValue)); + } else if (!checked && found) { + const filtered = [...modelValue]; + filtered.splice(index, 1); + assign(filtered); + } + } else if (isSet(modelValue)) { + const cloned = new Set(modelValue); + if (checked) { + cloned.add(elementValue); + } else { + cloned.delete(elementValue); + } + assign(cloned); + } else { + assign(getCheckboxValue(el, checked)); + } + }); + }, + // set initial checked on mount to wait for true-value/false-value + mounted: setChecked, + beforeUpdate(el, binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + setChecked(el, binding, vnode); + } +}; +function setChecked(el, { value, oldValue }, vnode) { + el._modelValue = value; + let checked; + if (isArray(value)) { + checked = looseIndexOf(value, vnode.props.value) > -1; + } else if (isSet(value)) { + checked = value.has(vnode.props.value); + } else { + if (value === oldValue) return; + checked = looseEqual(value, getCheckboxValue(el, true)); + } + if (el.checked !== checked) { + el.checked = checked; + } +} +const vModelRadio = { + created(el, { value }, vnode) { + el.checked = looseEqual(value, vnode.props.value); + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + el[assignKey](getValue(el)); + }); + }, + beforeUpdate(el, { value, oldValue }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (value !== oldValue) { + el.checked = looseEqual(value, vnode.props.value); + } + } +}; +const vModelSelect = { + // <select multiple> value need to be deep traversed + deep: true, + created(el, { value, modifiers: { number } }, vnode) { + const isSetModel = isSet(value); + addEventListener(el, "change", () => { + const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( + (o) => number ? looseToNumber(getValue(o)) : getValue(o) + ); + el[assignKey]( + el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] + ); + el._assigning = true; + nextTick(() => { + el._assigning = false; + }); + }); + el[assignKey] = getModelAssigner(vnode); + }, + // set value in mounted & updated because <select> relies on its children + // <option>s. + mounted(el, { value }) { + setSelected(el, value); + }, + beforeUpdate(el, _binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + }, + updated(el, { value }) { + if (!el._assigning) { + setSelected(el, value); + } + } +}; +function setSelected(el, value) { + const isMultiple = el.multiple; + const isArrayValue = isArray(value); + if (isMultiple && !isArrayValue && !isSet(value)) { + warn( + `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` + ); + return; + } + for (let i = 0, l = el.options.length; i < l; i++) { + const option = el.options[i]; + const optionValue = getValue(option); + if (isMultiple) { + if (isArrayValue) { + const optionType = typeof optionValue; + if (optionType === "string" || optionType === "number") { + option.selected = value.some((v) => String(v) === String(optionValue)); + } else { + option.selected = looseIndexOf(value, optionValue) > -1; + } + } else { + option.selected = value.has(optionValue); + } + } else if (looseEqual(getValue(option), value)) { + if (el.selectedIndex !== i) el.selectedIndex = i; + return; + } + } + if (!isMultiple && el.selectedIndex !== -1) { + el.selectedIndex = -1; + } +} +function getValue(el) { + return "_value" in el ? el._value : el.value; +} +function getCheckboxValue(el, checked) { + const key = checked ? "_trueValue" : "_falseValue"; + return key in el ? el[key] : checked; +} +const vModelDynamic = { + created(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "created"); + }, + mounted(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "mounted"); + }, + beforeUpdate(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); + }, + updated(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "updated"); + } +}; +function resolveDynamicModel(tagName, type) { + switch (tagName) { + case "SELECT": + return vModelSelect; + case "TEXTAREA": + return vModelText; + default: + switch (type) { + case "checkbox": + return vModelCheckbox; + case "radio": + return vModelRadio; + default: + return vModelText; + } + } +} +function callModelHook(el, binding, vnode, prevVNode, hook) { + const modelToUse = resolveDynamicModel( + el.tagName, + vnode.props && vnode.props.type + ); + const fn = modelToUse[hook]; + fn && fn(el, binding, vnode, prevVNode); +} +function initVModelForSSR() { + vModelText.getSSRProps = ({ value }) => ({ value }); + vModelRadio.getSSRProps = ({ value }, vnode) => { + if (vnode.props && looseEqual(vnode.props.value, value)) { + return { checked: true }; + } + }; + vModelCheckbox.getSSRProps = ({ value }, vnode) => { + if (isArray(value)) { + if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) { + return { checked: true }; + } + } else if (isSet(value)) { + if (vnode.props && value.has(vnode.props.value)) { + return { checked: true }; + } + } else if (value) { + return { checked: true }; + } + }; + vModelDynamic.getSSRProps = (binding, vnode) => { + if (typeof vnode.type !== "string") { + return; + } + const modelToUse = resolveDynamicModel( + // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase + vnode.type.toUpperCase(), + vnode.props && vnode.props.type + ); + if (modelToUse.getSSRProps) { + return modelToUse.getSSRProps(binding, vnode); + } + }; +} + +const systemModifiers = ["ctrl", "shift", "alt", "meta"]; +const modifierGuards = { + stop: (e) => e.stopPropagation(), + prevent: (e) => e.preventDefault(), + self: (e) => e.target !== e.currentTarget, + ctrl: (e) => !e.ctrlKey, + shift: (e) => !e.shiftKey, + alt: (e) => !e.altKey, + meta: (e) => !e.metaKey, + left: (e) => "button" in e && e.button !== 0, + middle: (e) => "button" in e && e.button !== 1, + right: (e) => "button" in e && e.button !== 2, + exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) +}; +const withModifiers = (fn, modifiers) => { + const cache = fn._withMods || (fn._withMods = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { + for (let i = 0; i < modifiers.length; i++) { + const guard = modifierGuards[modifiers[i]]; + if (guard && guard(event, modifiers)) return; + } + return fn(event, ...args); + }); +}; +const keyNames = { + esc: "escape", + space: " ", + up: "arrow-up", + left: "arrow-left", + right: "arrow-right", + down: "arrow-down", + delete: "backspace" +}; +const withKeys = (fn, modifiers) => { + const cache = fn._withKeys || (fn._withKeys = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event) => { + if (!("key" in event)) { + return; + } + const eventKey = hyphenate(event.key); + if (modifiers.some( + (k) => k === eventKey || keyNames[k] === eventKey + )) { + return fn(event); + } + }); +}; + +const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); +let renderer; +let enabledHydration = false; +function ensureRenderer() { + return renderer || (renderer = createRenderer(rendererOptions)); +} +function ensureHydrationRenderer() { + renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions); + enabledHydration = true; + return renderer; +} +const render = (...args) => { + ensureRenderer().render(...args); +}; +const hydrate = (...args) => { + ensureHydrationRenderer().hydrate(...args); +}; +const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) return; + const component = app._component; + if (!isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; + } + if (container.nodeType === 1) { + container.textContent = ""; + } + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); + } + return proxy; + }; + return app; +}; +const createSSRApp = (...args) => { + const app = ensureHydrationRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (container) { + return mount(container, true, resolveRootNamespace(container)); + } + }; + return app; +}; +function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } +} +function injectNativeTagCheck(app) { + Object.defineProperty(app.config, "isNativeTag", { + value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + writable: false + }); +} +function injectCompilerOptionsCheck(app) { + if (isRuntimeOnly()) { + const isCustomElement = app.config.isCustomElement; + Object.defineProperty(app.config, "isCustomElement", { + get() { + return isCustomElement; + }, + set() { + warn( + `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` + ); + } + }); + const compilerOptions = app.config.compilerOptions; + const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. +- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. +- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader +- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; + Object.defineProperty(app.config, "compilerOptions", { + get() { + warn(msg); + return compilerOptions; + }, + set() { + warn(msg); + } + }); + } +} +function normalizeContainer(container) { + if (isString(container)) { + const res = document.querySelector(container); + if (!res) { + warn( + `Failed to mount app: mount target selector "${container}" returned null.` + ); + } + return res; + } + if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { + warn( + `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` + ); + } + return container; +} +let ssrDirectiveInitialized = false; +const initDirectivesForSSR = () => { + if (!ssrDirectiveInitialized) { + ssrDirectiveInitialized = true; + initVModelForSSR(); + initVShowForSSR(); + } +} ; + +export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId }; diff --git a/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js b/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js new file mode 100644 index 0000000..9bf603c --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js @@ -0,0 +1,5 @@ +/** +* @vue/runtime-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/var e,t;let n,l,r,i,s,o,a,u,c,f,p,d;function h(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return e=>e in t}let g={},m=[],_=()=>{},y=()=>!1,b=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||97>e.charCodeAt(2)),S=e=>e.startsWith("onUpdate:"),C=Object.assign,x=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},E=Object.prototype.hasOwnProperty,w=(e,t)=>E.call(e,t),k=Array.isArray,T=e=>"[object Map]"===F(e),A=e=>"[object Set]"===F(e),R=e=>"[object Date]"===F(e),N=e=>"[object RegExp]"===F(e),O=e=>"function"==typeof e,P=e=>"string"==typeof e,M=e=>"symbol"==typeof e,I=e=>null!==e&&"object"==typeof e,L=e=>(I(e)||O(e))&&O(e.then)&&O(e.catch),D=Object.prototype.toString,F=e=>D.call(e),V=e=>F(e).slice(8,-1),U=e=>"[object Object]"===F(e),j=e=>P(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,B=h(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),$=e=>{let t=Object.create(null);return n=>t[n]||(t[n]=e(n))},H=/-(\w)/g,W=$(e=>e.replace(H,(e,t)=>t?t.toUpperCase():"")),K=/\B([A-Z])/g,z=$(e=>e.replace(K,"-$1").toLowerCase()),q=$(e=>e.charAt(0).toUpperCase()+e.slice(1)),G=$(e=>e?`on${q(e)}`:""),J=(e,t)=>!Object.is(e,t),X=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Z=(e,t,n,l=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:l,value:n})},Y=e=>{let t=parseFloat(e);return isNaN(t)?e:t},Q=e=>{let t=P(e)?Number(e):NaN;return isNaN(t)?e:t},ee=()=>n||(n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),et=h("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function en(e){if(k(e)){let t={};for(let n=0;n<e.length;n++){let l=e[n],r=P(l)?function(e){let t={};return e.replace(ei,"").split(el).forEach(e=>{if(e){let n=e.split(er);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}(l):en(l);if(r)for(let e in r)t[e]=r[e]}return t}if(P(e)||I(e))return e}let el=/;(?![^(]*\))/g,er=/:([^]+)/,ei=/\/\*[^]*?\*\//g;function es(e){let t="";if(P(e))t=e;else if(k(e))for(let n=0;n<e.length;n++){let l=es(e[n]);l&&(t+=l+" ")}else if(I(e))for(let n in e)e[n]&&(t+=n+" ");return t.trim()}function eo(e){if(!e)return null;let{class:t,style:n}=e;return t&&!P(t)&&(e.class=es(t)),n&&(e.style=en(n)),e}let ea=h("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function eu(e,t){if(e===t)return!0;let n=R(e),l=R(t);if(n||l)return!!n&&!!l&&e.getTime()===t.getTime();if(n=M(e),l=M(t),n||l)return e===t;if(n=k(e),l=k(t),n||l)return!!n&&!!l&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let l=0;n&&l<e.length;l++)n=eu(e[l],t[l]);return n}(e,t);if(n=I(e),l=I(t),n||l){if(!n||!l||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){let l=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(l&&!r||!l&&r||!eu(e[n],t[n]))return!1}}return String(e)===String(t)}function ec(e,t){return e.findIndex(e=>eu(e,t))}let ef=e=>!!(e&&!0===e.__v_isRef),ep=e=>P(e)?e:null==e?"":k(e)||I(e)&&(e.toString===D||!O(e.toString))?ef(e)?ep(e.value):JSON.stringify(e,ed,2):String(e),ed=(e,t)=>ef(t)?ed(e,t.value):T(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],l)=>(e[eh(t,l)+" =>"]=n,e),{})}:A(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>eh(e))}:M(t)?eh(t):!I(t)||k(t)||U(t)?t:String(t),eh=(e,t="")=>{var n;return M(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};class eg{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=l,!e&&l&&(this.index=(l.scopes||(l.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let t=l;try{return l=this,e()}finally{l=t}}}on(){l=this}off(){l=this.parent}stop(e){if(this._active){let t,n;for(t=0,this._active=!1,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,this.effects.length=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}function ev(e){return new eg(e)}function em(){return l}function e_(e,t=!1){l&&l.cleanups.push(e)}let ey=new WeakSet;class eb{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,l&&l.active&&l.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,ey.has(this)&&(ey.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||eC(this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,eL(this),eE(this);let e=r,t=eO;r=this,eO=!0;try{return this.fn()}finally{ew(this),r=e,eO=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)eA(e);this.deps=this.depsTail=void 0,eL(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?ey.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ek(this)&&this.run()}get dirty(){return ek(this)}}let eS=0;function eC(e,t=!1){if(e.flags|=8,t){e.next=s,s=e;return}e.next=i,i=e}function ex(){let e;if(!(--eS>0)){if(s){let e=s;for(s=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}for(;i;){let t=i;for(i=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}}function eE(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ew(e){let t;let n=e.depsTail,l=n;for(;l;){let e=l.prevDep;-1===l.version?(l===n&&(n=e),eA(l),function(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}(l)):t=l,l.dep.activeLink=l.prevActiveLink,l.prevActiveLink=void 0,l=e}e.deps=t,e.depsTail=n}function ek(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(eT(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function eT(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===eD))return;e.globalVersion=eD;let t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!ek(e)){e.flags&=-3;return}let n=r,l=eO;r=e,eO=!0;try{eE(e);let n=e.fn(e._value);(0===t.version||J(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{r=n,eO=l,ew(e),e.flags&=-3}}function eA(e,t=!1){let{dep:n,prevSub:l,nextSub:r}=e;if(l&&(l.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=l,e.nextSub=void 0),n.subs===e&&(n.subs=l,!l&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)eA(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}function eR(e,t){e.effect instanceof eb&&(e=e.effect.fn);let n=new eb(e);t&&C(n,t);try{n.run()}catch(e){throw n.stop(),e}let l=n.run.bind(n);return l.effect=n,l}function eN(e){e.effect.stop()}let eO=!0,eP=[];function eM(){eP.push(eO),eO=!1}function eI(){let e=eP.pop();eO=void 0===e||e}function eL(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=r;r=void 0;try{t()}finally{r=e}}}let eD=0;class eF{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class eV{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!r||!eO||r===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==r)t=this.activeLink=new eF(r,this),r.deps?(t.prevDep=r.depsTail,r.depsTail.nextDep=t,r.depsTail=t):r.deps=r.depsTail=t,function e(t){if(t.dep.sc++,4&t.sub.flags){let n=t.dep.computed;if(n&&!t.dep.subs){n.flags|=20;for(let t=n.deps;t;t=t.nextDep)e(t)}let l=t.dep.subs;l!==t&&(t.prevSub=l,l&&(l.nextSub=t)),t.dep.subs=t}}(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=r.depsTail,t.nextDep=void 0,r.depsTail.nextDep=t,r.depsTail=t,r.deps===t&&(r.deps=e)}return t}trigger(e){this.version++,eD++,this.notify(e)}notify(e){eS++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{ex()}}}let eU=new WeakMap,ej=Symbol(""),eB=Symbol(""),e$=Symbol("");function eH(e,t,n){if(eO&&r){let t=eU.get(e);t||eU.set(e,t=new Map);let l=t.get(n);l||(t.set(n,l=new eV),l.map=t,l.key=n),l.track()}}function eW(e,t,n,l,r,i){let s=eU.get(e);if(!s){eD++;return}let o=e=>{e&&e.trigger()};if(eS++,"clear"===t)s.forEach(o);else{let r=k(e),i=r&&j(n);if(r&&"length"===n){let e=Number(l);s.forEach((t,n)=>{("length"===n||n===e$||!M(n)&&n>=e)&&o(t)})}else switch((void 0!==n||s.has(void 0))&&o(s.get(n)),i&&o(s.get(e$)),t){case"add":r?i&&o(s.get("length")):(o(s.get(ej)),T(e)&&o(s.get(eB)));break;case"delete":!r&&(o(s.get(ej)),T(e)&&o(s.get(eB)));break;case"set":T(e)&&o(s.get(ej))}}ex()}function eK(e){let t=tS(e);return t===e?t:(eH(t,"iterate",e$),ty(e)?t:t.map(tx))}function ez(e){return eH(e=tS(e),"iterate",e$),e}let eq={__proto__:null,[Symbol.iterator](){return eG(this,Symbol.iterator,tx)},concat(...e){return eK(this).concat(...e.map(e=>k(e)?eK(e):e))},entries(){return eG(this,"entries",e=>(e[1]=tx(e[1]),e))},every(e,t){return eX(this,"every",e,t,void 0,arguments)},filter(e,t){return eX(this,"filter",e,t,e=>e.map(tx),arguments)},find(e,t){return eX(this,"find",e,t,tx,arguments)},findIndex(e,t){return eX(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return eX(this,"findLast",e,t,tx,arguments)},findLastIndex(e,t){return eX(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return eX(this,"forEach",e,t,void 0,arguments)},includes(...e){return eY(this,"includes",e)},indexOf(...e){return eY(this,"indexOf",e)},join(e){return eK(this).join(e)},lastIndexOf(...e){return eY(this,"lastIndexOf",e)},map(e,t){return eX(this,"map",e,t,void 0,arguments)},pop(){return eQ(this,"pop")},push(...e){return eQ(this,"push",e)},reduce(e,...t){return eZ(this,"reduce",e,t)},reduceRight(e,...t){return eZ(this,"reduceRight",e,t)},shift(){return eQ(this,"shift")},some(e,t){return eX(this,"some",e,t,void 0,arguments)},splice(...e){return eQ(this,"splice",e)},toReversed(){return eK(this).toReversed()},toSorted(e){return eK(this).toSorted(e)},toSpliced(...e){return eK(this).toSpliced(...e)},unshift(...e){return eQ(this,"unshift",e)},values(){return eG(this,"values",tx)}};function eG(e,t,n){let l=ez(e),r=l[t]();return l===e||ty(e)||(r._next=r.next,r.next=()=>{let e=r._next();return e.value&&(e.value=n(e.value)),e}),r}let eJ=Array.prototype;function eX(e,t,n,l,r,i){let s=ez(e),o=s!==e&&!ty(e),a=s[t];if(a!==eJ[t]){let t=a.apply(e,i);return o?tx(t):t}let u=n;s!==e&&(o?u=function(t,l){return n.call(this,tx(t),l,e)}:n.length>2&&(u=function(t,l){return n.call(this,t,l,e)}));let c=a.call(s,u,l);return o&&r?r(c):c}function eZ(e,t,n,l){let r=ez(e),i=n;return r!==e&&(ty(e)?n.length>3&&(i=function(t,l,r){return n.call(this,t,l,r,e)}):i=function(t,l,r){return n.call(this,t,tx(l),r,e)}),r[t](i,...l)}function eY(e,t,n){let l=tS(e);eH(l,"iterate",e$);let r=l[t](...n);return(-1===r||!1===r)&&tb(n[0])?(n[0]=tS(n[0]),l[t](...n)):r}function eQ(e,t,n=[]){eM(),eS++;let l=tS(e)[t].apply(e,n);return ex(),eI(),l}let e0=h("__proto__,__v_isRef,__isVue"),e1=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(M));function e2(e){M(e)||(e=String(e));let t=tS(this);return eH(t,"has",e),t.hasOwnProperty(e)}class e6{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if("__v_skip"===t)return e.__v_skip;let l=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!l;if("__v_isReadonly"===t)return l;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(l?r?tf:tc:r?tu:ta).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let i=k(e);if(!l){let e;if(i&&(e=eq[t]))return e;if("hasOwnProperty"===t)return e2}let s=Reflect.get(e,t,tw(e)?e:n);return(M(t)?e1.has(t):e0(t))?s:(l||eH(e,"get",t),r)?s:tw(s)?i&&j(t)?s:s.value:I(s)?l?th(s):tp(s):s}}class e4 extends e6{constructor(e=!1){super(!1,e)}set(e,t,n,l){let r=e[t];if(!this._isShallow){let t=t_(r);if(ty(n)||t_(n)||(r=tS(r),n=tS(n)),!k(e)&&tw(r)&&!tw(n))return!t&&(r.value=n,!0)}let i=k(e)&&j(t)?Number(t)<e.length:w(e,t),s=Reflect.set(e,t,n,tw(e)?e:l);return e===tS(l)&&(i?J(n,r)&&eW(e,"set",t,n):eW(e,"add",t,n)),s}deleteProperty(e,t){let n=w(e,t);e[t];let l=Reflect.deleteProperty(e,t);return l&&n&&eW(e,"delete",t,void 0),l}has(e,t){let n=Reflect.has(e,t);return M(t)&&e1.has(t)||eH(e,"has",t),n}ownKeys(e){return eH(e,"iterate",k(e)?"length":ej),Reflect.ownKeys(e)}}class e8 extends e6{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}let e3=new e4,e5=new e8,e9=new e4(!0),e7=new e8(!0),te=e=>e,tt=e=>Reflect.getPrototypeOf(e);function tn(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function tl(e,t){let n=function(e,t){let n={get(n){let l=this.__v_raw,r=tS(l),i=tS(n);e||(J(n,i)&&eH(r,"get",n),eH(r,"get",i));let{has:s}=tt(r),o=t?te:e?tE:tx;return s.call(r,n)?o(l.get(n)):s.call(r,i)?o(l.get(i)):void(l!==r&&l.get(n))},get size(){let t=this.__v_raw;return e||eH(tS(t),"iterate",ej),Reflect.get(t,"size",t)},has(t){let n=this.__v_raw,l=tS(n),r=tS(t);return e||(J(t,r)&&eH(l,"has",t),eH(l,"has",r)),t===r?n.has(t):n.has(t)||n.has(r)},forEach(n,l){let r=this,i=r.__v_raw,s=tS(i),o=t?te:e?tE:tx;return e||eH(s,"iterate",ej),i.forEach((e,t)=>n.call(l,o(e),o(t),r))}};return C(n,e?{add:tn("add"),set:tn("set"),delete:tn("delete"),clear:tn("clear")}:{add(e){t||ty(e)||t_(e)||(e=tS(e));let n=tS(this);return tt(n).has.call(n,e)||(n.add(e),eW(n,"add",e,e)),this},set(e,n){t||ty(n)||t_(n)||(n=tS(n));let l=tS(this),{has:r,get:i}=tt(l),s=r.call(l,e);s||(e=tS(e),s=r.call(l,e));let o=i.call(l,e);return l.set(e,n),s?J(n,o)&&eW(l,"set",e,n):eW(l,"add",e,n),this},delete(e){let t=tS(this),{has:n,get:l}=tt(t),r=n.call(t,e);r||(e=tS(e),r=n.call(t,e)),l&&l.call(t,e);let i=t.delete(e);return r&&eW(t,"delete",e,void 0),i},clear(){let e=tS(this),t=0!==e.size,n=e.clear();return t&&eW(e,"clear",void 0,void 0),n}}),["keys","values","entries",Symbol.iterator].forEach(l=>{n[l]=function(...n){let r=this.__v_raw,i=tS(r),s=T(i),o="entries"===l||l===Symbol.iterator&&s,a=r[l](...n),u=t?te:e?tE:tx;return e||eH(i,"iterate","keys"===l&&s?eB:ej),{next(){let{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:o?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}),n}(e,t);return(t,l,r)=>"__v_isReactive"===l?!e:"__v_isReadonly"===l?e:"__v_raw"===l?t:Reflect.get(w(n,l)&&l in t?n:t,l,r)}let tr={get:tl(!1,!1)},ti={get:tl(!1,!0)},ts={get:tl(!0,!1)},to={get:tl(!0,!0)},ta=new WeakMap,tu=new WeakMap,tc=new WeakMap,tf=new WeakMap;function tp(e){return t_(e)?e:tv(e,!1,e3,tr,ta)}function td(e){return tv(e,!1,e9,ti,tu)}function th(e){return tv(e,!0,e5,ts,tc)}function tg(e){return tv(e,!0,e7,to,tf)}function tv(e,t,n,l,r){if(!I(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let i=r.get(e);if(i)return i;let s=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(V(e));if(0===s)return e;let o=new Proxy(e,2===s?l:n);return r.set(e,o),o}function tm(e){return t_(e)?tm(e.__v_raw):!!(e&&e.__v_isReactive)}function t_(e){return!!(e&&e.__v_isReadonly)}function ty(e){return!!(e&&e.__v_isShallow)}function tb(e){return!!e&&!!e.__v_raw}function tS(e){let t=e&&e.__v_raw;return t?tS(t):e}function tC(e){return!w(e,"__v_skip")&&Object.isExtensible(e)&&Z(e,"__v_skip",!0),e}let tx=e=>I(e)?tp(e):e,tE=e=>I(e)?th(e):e;function tw(e){return!!e&&!0===e.__v_isRef}function tk(e){return tA(e,!1)}function tT(e){return tA(e,!0)}function tA(e,t){return tw(e)?e:new tR(e,t)}class tR{constructor(e,t){this.dep=new eV,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:tS(e),this._value=t?e:tx(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||ty(e)||t_(e);J(e=n?e:tS(e),t)&&(this._rawValue=e,this._value=n?e:tx(e),this.dep.trigger())}}function tN(e){e.dep&&e.dep.trigger()}function tO(e){return tw(e)?e.value:e}function tP(e){return O(e)?e():tO(e)}let tM={get:(e,t,n)=>"__v_raw"===t?e:tO(Reflect.get(e,t,n)),set:(e,t,n,l)=>{let r=e[t];return tw(r)&&!tw(n)?(r.value=n,!0):Reflect.set(e,t,n,l)}};function tI(e){return tm(e)?e:new Proxy(e,tM)}class tL{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new eV,{get:n,set:l}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=l}get value(){return this._value=this._get()}set value(e){this._set(e)}}function tD(e){return new tL(e)}function tF(e){let t=k(e)?Array(e.length):{};for(let n in e)t[n]=tB(e,n);return t}class tV{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){let n=eU.get(e);return n&&n.get(t)}(tS(this._object),this._key)}}class tU{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function tj(e,t,n){return tw(e)?e:O(e)?new tU(e):I(e)&&arguments.length>1?tB(e,t,n):tk(e)}function tB(e,t,n){let l=e[t];return tw(l)?l:new tV(e,t,n)}class t${constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new eV(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=eD-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags)&&r!==this)return eC(this,!0),!0}get value(){let e=this.dep.track();return eT(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}let tH={GET:"get",HAS:"has",ITERATE:"iterate"},tW={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},tK={},tz=new WeakMap;function tq(){return p}function tG(e,t=!1,n=p){if(n){let t=tz.get(n);t||tz.set(n,t=[]),t.push(e)}}function tJ(e,t=1/0,n){if(t<=0||!I(e)||e.__v_skip||(n=n||new Set).has(e))return e;if(n.add(e),t--,tw(e))tJ(e.value,t,n);else if(k(e))for(let l=0;l<e.length;l++)tJ(e[l],t,n);else if(A(e)||T(e))e.forEach(e=>{tJ(e,t,n)});else if(U(e)){for(let l in e)tJ(e[l],t,n);for(let l of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,l)&&tJ(e[l],t,n)}return e}function tX(e,t){}let tZ={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"};function tY(e,t,n,l){try{return l?e(...l):e()}catch(e){t0(e,t,n)}}function tQ(e,t,n,l){if(O(e)){let r=tY(e,t,n,l);return r&&L(r)&&r.catch(e=>{t0(e,t,n)}),r}if(k(e)){let r=[];for(let i=0;i<e.length;i++)r.push(tQ(e[i],t,n,l));return r}}function t0(e,t,n,l=!0){t&&t.vnode;let{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||g;if(t){let l=t.parent,i=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){let t=l.ec;if(t){for(let n=0;n<t.length;n++)if(!1===t[n](e,i,s))return}l=l.parent}if(r){eM(),tY(r,null,10,[e,i,s]),eI();return}}!function(e,t,n,l=!0,r=!1){if(r)throw e;console.error(e)}(e,0,0,l,i)}let t1=[],t2=-1,t6=[],t4=null,t8=0,t3=Promise.resolve(),t5=null;function t9(e){let t=t5||t3;return e?t.then(this?e.bind(this):e):t}function t7(e){if(!(1&e.flags)){let t=nr(e),n=t1[t1.length-1];!n||!(2&e.flags)&&t>=nr(n)?t1.push(e):t1.splice(function(e){let t=t2+1,n=t1.length;for(;t<n;){let l=t+n>>>1,r=t1[l],i=nr(r);i<e||i===e&&2&r.flags?t=l+1:n=l}return t}(t),0,e),e.flags|=1,ne()}}function ne(){t5||(t5=t3.then(function e(t){try{for(t2=0;t2<t1.length;t2++){let e=t1[t2];!e||8&e.flags||(4&e.flags&&(e.flags&=-2),tY(e,e.i,e.i?15:14),4&e.flags||(e.flags&=-2))}}finally{for(;t2<t1.length;t2++){let e=t1[t2];e&&(e.flags&=-2)}t2=-1,t1.length=0,nl(),t5=null,(t1.length||t6.length)&&e()}}))}function nt(e){k(e)?t6.push(...e):t4&&-1===e.id?t4.splice(t8+1,0,e):1&e.flags||(t6.push(e),e.flags|=1),ne()}function nn(e,t,n=t2+1){for(;n<t1.length;n++){let t=t1[n];if(t&&2&t.flags){if(e&&t.id!==e.uid)continue;t1.splice(n,1),n--,4&t.flags&&(t.flags&=-2),t(),4&t.flags||(t.flags&=-2)}}}function nl(e){if(t6.length){let e=[...new Set(t6)].sort((e,t)=>nr(e)-nr(t));if(t6.length=0,t4){t4.push(...e);return}for(t8=0,t4=e;t8<t4.length;t8++){let e=t4[t8];4&e.flags&&(e.flags&=-2),8&e.flags||e(),e.flags&=-2}t4=null,t8=0}}let nr=e=>null==e.id?2&e.flags?-1:1/0:e.id,ni=null,ns=null;function no(e){let t=ni;return ni=e,ns=e&&e.type.__scopeId||null,t}function na(e){ns=e}function nu(){ns=null}let nc=e=>nf;function nf(e,t=ni,n){if(!t||e._n)return e;let l=(...n)=>{let r;l._d&&r7(-1);let i=no(t);try{r=e(...n)}finally{no(i),l._d&&r7(1)}return r};return l._n=!0,l._c=!0,l._d=!0,l}function np(e,t){if(null===ni)return e;let n=iV(ni),l=e.dirs||(e.dirs=[]);for(let e=0;e<t.length;e++){let[r,i,s,o=g]=t[e];r&&(O(r)&&(r={mounted:r,updated:r}),r.deep&&tJ(i),l.push({dir:r,instance:n,value:i,oldValue:void 0,arg:s,modifiers:o}))}return e}function nd(e,t,n,l){let r=e.dirs,i=t&&t.dirs;for(let s=0;s<r.length;s++){let o=r[s];i&&(o.oldValue=i[s].value);let a=o.dir[l];a&&(eM(),tQ(a,n,8,[e.el,o,e,t]),eI())}}let nh=Symbol("_vte"),ng=e=>e.__isTeleport,nv=e=>e&&(e.disabled||""===e.disabled),nm=e=>e&&(e.defer||""===e.defer),n_=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,ny=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,nb=(e,t)=>{let n=e&&e.to;return P(n)?t?t(n):null:n},nS={name:"Teleport",__isTeleport:!0,process(e,t,n,l,r,i,s,o,a,u){let{mc:c,pc:f,pbc:p,o:{insert:d,querySelector:h,createText:g,createComment:m}}=u,_=nv(t.props),{shapeFlag:y,children:b,dynamicChildren:S}=t;if(null==e){let e=t.el=g(""),u=t.anchor=g("");d(e,n,l),d(u,n,l);let f=(e,t)=>{16&y&&(r&&r.isCE&&(r.ce._teleportTarget=e),c(b,e,t,r,i,s,o,a))},p=()=>{let e=t.target=nb(t.props,h),n=nw(e,t,g,d);e&&("svg"!==s&&n_(e)?s="svg":"mathml"!==s&&ny(e)&&(s="mathml"),_||(f(e,n),nE(t,!1)))};_&&(f(n,u),nE(t,!0)),nm(t.props)?ry(()=>{p(),t.el.__isMounted=!0},i):p()}else{if(nm(t.props)&&!e.el.__isMounted){ry(()=>{nS.process(e,t,n,l,r,i,s,o,a,u),delete e.el.__isMounted},i);return}t.el=e.el,t.targetStart=e.targetStart;let c=t.anchor=e.anchor,d=t.target=e.target,g=t.targetAnchor=e.targetAnchor,m=nv(e.props),y=m?n:d;if("svg"===s||n_(d)?s="svg":("mathml"===s||ny(d))&&(s="mathml"),S?(p(e.dynamicChildren,S,y,r,i,s,o),rk(e,t,!0)):a||f(e,t,y,m?c:g,r,i,s,o,!1),_)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):nC(t,n,c,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=nb(t.props,h);e&&nC(t,e,null,u,0)}else m&&nC(t,d,g,u,1);nE(t,_)}},remove(e,t,n,{um:l,o:{remove:r}},i){let{shapeFlag:s,children:o,anchor:a,targetStart:u,targetAnchor:c,target:f,props:p}=e;if(f&&(r(u),r(c)),i&&r(a),16&s){let e=i||!nv(p);for(let r=0;r<o.length;r++){let i=o[r];l(i,t,n,e,!!i.dynamicChildren)}}},move:nC,hydrate:function(e,t,n,l,r,i,{o:{nextSibling:s,parentNode:o,querySelector:a,insert:u,createText:c}},f){let p=t.target=nb(t.props,a);if(p){let a=nv(t.props),d=p._lpa||p.firstChild;if(16&t.shapeFlag){if(a)t.anchor=f(s(e),t,o(e),n,l,r,i),t.targetStart=d,t.targetAnchor=d&&s(d);else{t.anchor=s(e);let o=d;for(;o;){if(o&&8===o.nodeType){if("teleport start anchor"===o.data)t.targetStart=o;else if("teleport anchor"===o.data){t.targetAnchor=o,p._lpa=t.targetAnchor&&s(t.targetAnchor);break}}o=s(o)}t.targetAnchor||nw(p,t,c,u),f(d&&s(d),t,p,n,l,r,i)}}nE(t,a)}return t.anchor&&s(t.anchor)}};function nC(e,t,n,{o:{insert:l},m:r},i=2){0===i&&l(e.targetAnchor,t,n);let{el:s,anchor:o,shapeFlag:a,children:u,props:c}=e,f=2===i;if(f&&l(s,t,n),(!f||nv(c))&&16&a)for(let e=0;e<u.length;e++)r(u[e],t,n,2);f&&l(o,t,n)}let nx=nS;function nE(e,t){let n=e.ctx;if(n&&n.ut){let l,r;for(t?(l=e.el,r=e.anchor):(l=e.targetStart,r=e.targetAnchor);l&&l!==r;)1===l.nodeType&&l.setAttribute("data-v-owner",n.uid),l=l.nextSibling;n.ut()}}function nw(e,t,n,l){let r=t.targetStart=n(""),i=t.targetAnchor=n("");return r[nh]=i,e&&(l(r,e),l(i,e)),i}let nk=Symbol("_leaveCb"),nT=Symbol("_enterCb");function nA(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return lf(()=>{e.isMounted=!0}),lh(()=>{e.isUnmounting=!0}),e}let nR=[Function,Array],nN={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:nR,onEnter:nR,onAfterEnter:nR,onEnterCancelled:nR,onBeforeLeave:nR,onLeave:nR,onAfterLeave:nR,onLeaveCancelled:nR,onBeforeAppear:nR,onAppear:nR,onAfterAppear:nR,onAppearCancelled:nR},nO=e=>{let t=e.subTree;return t.component?nO(t.component):t};function nP(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==r2){t=n;break}}return t}let nM={name:"BaseTransition",props:nN,setup(e,{slots:t}){let n=ik(),l=nA();return()=>{let r=t.default&&nU(t.default(),!0);if(!r||!r.length)return;let i=nP(r),s=tS(e),{mode:o}=s;if(l.isLeaving)return nD(i);let a=nF(i);if(!a)return nD(i);let u=nL(a,s,l,n,e=>u=e);a.type!==r2&&nV(a,u);let c=n.subTree&&nF(n.subTree);if(c&&c.type!==r2&&!ii(a,c)&&nO(n).type!==r2){let e=nL(c,s,l,n);if(nV(c,e),"out-in"===o&&a.type!==r2)return l.isLeaving=!0,e.afterLeave=()=>{l.isLeaving=!1,8&n.job.flags||n.update(),delete e.afterLeave,c=void 0},nD(i);"in-out"===o&&a.type!==r2?e.delayLeave=(e,t,n)=>{nI(l,c)[String(c.key)]=c,e[nk]=()=>{t(),e[nk]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{n(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function nI(e,t){let{leavingVNodes:n}=e,l=n.get(t.type);return l||(l=Object.create(null),n.set(t.type,l)),l}function nL(e,t,n,l,r){let{appear:i,mode:s,persisted:o=!1,onBeforeEnter:a,onEnter:u,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:p,onLeave:d,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:m,onAppear:_,onAfterAppear:y,onAppearCancelled:b}=t,S=String(e.key),C=nI(n,e),x=(e,t)=>{e&&tQ(e,l,9,t)},E=(e,t)=>{let n=t[1];x(e,t),k(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},w={mode:s,persisted:o,beforeEnter(t){let l=a;if(!n.isMounted){if(!i)return;l=m||a}t[nk]&&t[nk](!0);let r=C[S];r&&ii(e,r)&&r.el[nk]&&r.el[nk](),x(l,[t])},enter(e){let t=u,l=c,r=f;if(!n.isMounted){if(!i)return;t=_||u,l=y||c,r=b||f}let s=!1,o=e[nT]=t=>{s||(s=!0,t?x(r,[e]):x(l,[e]),w.delayedLeave&&w.delayedLeave(),e[nT]=void 0)};t?E(t,[e,o]):o()},leave(t,l){let r=String(e.key);if(t[nT]&&t[nT](!0),n.isUnmounting)return l();x(p,[t]);let i=!1,s=t[nk]=n=>{i||(i=!0,l(),n?x(g,[t]):x(h,[t]),t[nk]=void 0,C[r]!==e||delete C[r])};C[r]=e,d?E(d,[t,s]):s()},clone(e){let i=nL(e,t,n,l,r);return r&&r(i),i}};return w}function nD(e){if(le(e))return(e=id(e)).children=null,e}function nF(e){if(!le(e))return ng(e.type)&&e.children?nP(e.children):e;let{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&O(n.default))return n.default()}}function nV(e,t){6&e.shapeFlag&&e.component?(e.transition=t,nV(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function nU(e,t=!1,n){let l=[],r=0;for(let i=0;i<e.length;i++){let s=e[i],o=null==n?s.key:String(n)+String(null!=s.key?s.key:i);s.type===r0?(128&s.patchFlag&&r++,l=l.concat(nU(s.children,t,o))):(t||s.type!==r2)&&l.push(null!=o?id(s,{key:o}):s)}if(r>1)for(let e=0;e<l.length;e++)l[e].patchFlag=-2;return l}function nj(e,t){return O(e)?C({name:e.name},t,{setup:e}):e}function nB(){let e=ik();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function n$(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function nH(e){let t=ik(),n=tT(null);return t&&Object.defineProperty(t.refs===g?t.refs={}:t.refs,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e}),n}function nW(e,t,n,l,r=!1){if(k(e)){e.forEach((e,i)=>nW(e,t&&(k(t)?t[i]:t),n,l,r));return}if(n5(l)&&!r){512&l.shapeFlag&&l.type.__asyncResolved&&l.component.subTree.component&&nW(e,t,n,l.component.subTree);return}let i=4&l.shapeFlag?iV(l.component):l.el,s=r?null:i,{i:o,r:a}=e,u=t&&t.r,c=o.refs===g?o.refs={}:o.refs,f=o.setupState,p=tS(f),d=f===g?()=>!1:e=>w(p,e);if(null!=u&&u!==a&&(P(u)?(c[u]=null,d(u)&&(f[u]=null)):tw(u)&&(u.value=null)),O(a))tY(a,o,12,[s,c]);else{let t=P(a),l=tw(a);if(t||l){let o=()=>{if(e.f){let n=t?d(a)?f[a]:c[a]:a.value;r?k(n)&&x(n,i):k(n)?n.includes(i)||n.push(i):t?(c[a]=[i],d(a)&&(f[a]=c[a])):(a.value=[i],e.k&&(c[e.k]=a.value))}else t?(c[a]=s,d(a)&&(f[a]=s)):l&&(a.value=s,e.k&&(c[e.k]=s))};s?(o.id=-1,ry(o,n)):o()}}}let nK=!1,nz=()=>{nK||(console.error("Hydration completed but contains mismatches."),nK=!0)},nq=e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName,nG=e=>e.namespaceURI.includes("MathML"),nJ=e=>{if(1===e.nodeType){if(nq(e))return"svg";if(nG(e))return"mathml"}},nX=e=>8===e.nodeType;function nZ(e){let{mt:t,p:n,o:{patchProp:l,createText:r,nextSibling:i,parentNode:s,remove:o,insert:a,createComment:u}}=e,c=(n,l,o,u,y,b=!1)=>{b=b||!!l.dynamicChildren;let S=nX(n)&&"["===n.data,C=()=>h(n,l,o,u,y,S),{type:x,ref:E,shapeFlag:w,patchFlag:k}=l,T=n.nodeType;l.el=n,-2===k&&(b=!1,l.dynamicChildren=null);let A=null;switch(x){case r1:3!==T?""===l.children?(a(l.el=r(""),s(n),n),A=n):A=C():(n.data!==l.children&&(nz(),n.data=l.children),A=i(n));break;case r2:_(n)?(A=i(n),m(l.el=n.content.firstChild,n,o)):A=8!==T||S?C():i(n);break;case r6:if(S&&(T=(n=i(n)).nodeType),1===T||3===T){A=n;let e=!l.children.length;for(let t=0;t<l.staticCount;t++)e&&(l.children+=1===A.nodeType?A.outerHTML:A.data),t===l.staticCount-1&&(l.anchor=A),A=i(A);return S?i(A):A}C();break;case r0:A=S?d(n,l,o,u,y,b):C();break;default:if(1&w)A=1===T&&l.type.toLowerCase()===n.tagName.toLowerCase()||_(n)?f(n,l,o,u,y,b):C();else if(6&w){l.slotScopeIds=y;let e=s(n);if(A=S?g(n):nX(n)&&"teleport start"===n.data?g(n,n.data,"teleport end"):i(n),t(l,e,null,o,u,nJ(e),b),n5(l)&&!l.type.__asyncResolved){let t;S?(t=ic(r0)).anchor=A?A.previousSibling:e.lastChild:t=3===n.nodeType?ih(""):ic("div"),t.el=n,l.component.subTree=t}}else 64&w?A=8!==T?C():l.type.hydrate(n,l,o,u,y,b,e,p):128&w&&(A=l.type.hydrate(n,l,o,u,nJ(s(n)),y,b,e,c))}return null!=E&&nW(E,null,u,l),A},f=(e,t,n,r,i,s)=>{s=s||!!t.dynamicChildren;let{type:a,props:u,patchFlag:c,shapeFlag:f,dirs:d,transition:h}=t,g="input"===a||"option"===a;if(g||-1!==c){let a;d&&nd(t,null,n,"created");let y=!1;if(_(e)){y=rw(null,h)&&n&&n.vnode.props&&n.vnode.props.appear;let l=e.content.firstChild;y&&h.beforeEnter(l),m(l,e,n),t.el=e=l}if(16&f&&!(u&&(u.innerHTML||u.textContent))){let l=p(e.firstChild,t,e,n,r,i,s);for(;l;){n0(e,1)||nz();let t=l;l=l.nextSibling,o(t)}}else if(8&f){let n=t.children;"\n"===n[0]&&("PRE"===e.tagName||"TEXTAREA"===e.tagName)&&(n=n.slice(1)),e.textContent!==n&&(n0(e,0)||nz(),e.textContent=t.children)}if(u){if(g||!s||48&c){let t=e.tagName.includes("-");for(let r in u)(g&&(r.endsWith("value")||"indeterminate"===r)||b(r)&&!B(r)||"."===r[0]||t)&&l(e,r,null,u[r],void 0,n)}else if(u.onClick)l(e,"onClick",null,u.onClick,void 0,n);else if(4&c&&tm(u.style))for(let e in u.style)u.style[e]}(a=u&&u.onVnodeBeforeMount)&&iS(a,n,t),d&&nd(t,null,n,"beforeMount"),((a=u&&u.onVnodeMounted)||d||y)&&rY(()=>{a&&iS(a,n,t),y&&h.enter(e),d&&nd(t,null,n,"mounted")},r)}return e.nextSibling},p=(e,t,l,s,o,u,f)=>{f=f||!!t.dynamicChildren;let p=t.children,d=p.length;for(let t=0;t<d;t++){let h=f?p[t]:p[t]=im(p[t]),g=h.type===r1;e?(g&&!f&&t+1<d&&im(p[t+1]).type===r1&&(a(r(e.data.slice(h.children.length)),l,i(e)),e.data=h.children),e=c(e,h,s,o,u,f)):g&&!h.children?a(h.el=r(""),l):(n0(l,1)||nz(),n(null,h,l,null,s,o,nJ(l),u))}return e},d=(e,t,n,l,r,o)=>{let{slotScopeIds:c}=t;c&&(r=r?r.concat(c):c);let f=s(e),d=p(i(e),t,f,n,l,r,o);return d&&nX(d)&&"]"===d.data?i(t.anchor=d):(nz(),a(t.anchor=u("]"),f,d),d)},h=(e,t,l,r,a,u)=>{if(n0(e.parentElement,1)||nz(),t.el=null,u){let t=g(e);for(;;){let n=i(e);if(n&&n!==t)o(n);else break}}let c=i(e),f=s(e);return o(e),n(null,t,f,c,l,r,nJ(f),a),l&&(l.vnode.el=t.el,rK(l,t.el)),c},g=(e,t="[",n="]")=>{let l=0;for(;e;)if((e=i(e))&&nX(e)&&(e.data===t&&l++,e.data===n)){if(0===l)return i(e);l--}return e},m=(e,t,n)=>{let l=t.parentNode;l&&l.replaceChild(e,t);let r=n;for(;r;)r.vnode.el===t&&(r.vnode.el=r.subTree.el=e),r=r.parent},_=e=>1===e.nodeType&&"TEMPLATE"===e.tagName;return[(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),nl(),t._vnode=e;return}c(t.firstChild,e,null,null,null),nl(),t._vnode=e},c]}let nY="data-allow-mismatch",nQ={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function n0(e,t){if(0===t||1===t)for(;e&&!e.hasAttribute(nY);)e=e.parentElement;let n=e&&e.getAttribute(nY);if(null==n)return!1;if(""===n)return!0;{let e=n.split(",");return!!(0===t&&e.includes("children"))||n.split(",").includes(nQ[t])}}let n1=ee().requestIdleCallback||(e=>setTimeout(e,1)),n2=ee().cancelIdleCallback||(e=>clearTimeout(e)),n6=(e=1e4)=>t=>{let n=n1(t,{timeout:e});return()=>n2(n)},n4=e=>(t,n)=>{let l=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){l.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(function(e){let{top:t,left:n,bottom:l,right:r}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:s}=window;return(t>0&&t<i||l>0&&l<i)&&(n>0&&n<s||r>0&&r<s)}(e))return t(),l.disconnect(),!1;l.observe(e)}}),()=>l.disconnect()},n8=e=>t=>{if(e){let n=matchMedia(e);if(!n.matches)return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t);t()}},n3=(e=[])=>(t,n)=>{P(e)&&(e=[e]);let l=!1,r=e=>{l||(l=!0,i(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},i=()=>{n(t=>{for(let n of e)t.removeEventListener(n,r)})};return n(t=>{for(let n of e)t.addEventListener(n,r,{once:!0})}),i},n5=e=>!!e.type.__asyncLoader;function n9(e){let t;O(e)&&(e={loader:e});let{loader:n,loadingComponent:l,errorComponent:r,delay:i=200,hydrate:s,timeout:o,suspensible:a=!0,onError:u}=e,c=null,f=0,p=()=>(f++,c=null,d()),d=()=>{let e;return c||(e=c=n().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),u)return new Promise((t,n)=>{u(e,()=>t(p()),()=>n(e),f+1)});throw e}).then(n=>e!==c&&c?c:(n&&(n.__esModule||"Module"===n[Symbol.toStringTag])&&(n=n.default),t=n,n)))};return nj({name:"AsyncComponentWrapper",__asyncLoader:d,__asyncHydrate(e,n,l){let r=s?()=>{let t=s(l,t=>(function(e,t){if(nX(e)&&"["===e.data){let n=1,l=e.nextSibling;for(;l;){if(1===l.nodeType){if(!1===t(l))break}else if(nX(l)){if("]"===l.data){if(0==--n)break}else"["===l.data&&n++}l=l.nextSibling}}else t(e)})(e,t));t&&(n.bum||(n.bum=[])).push(t)}:l;t?r():d().then(()=>!n.isUnmounted&&r())},get __asyncResolved(){return t},setup(){let e=iw;if(n$(e),t)return()=>n7(t,e);let n=t=>{c=null,t0(t,e,13,!r)};if(a&&e.suspense||iN)return d().then(t=>()=>n7(t,e)).catch(e=>(n(e),()=>r?ic(r,{error:e}):null));let s=tk(!1),u=tk(),f=tk(!!i);return i&&setTimeout(()=>{f.value=!1},i),null!=o&&setTimeout(()=>{if(!s.value&&!u.value){let e=Error(`Async component timed out after ${o}ms.`);n(e),u.value=e}},o),d().then(()=>{s.value=!0,e.parent&&le(e.parent.vnode)&&e.parent.update()}).catch(e=>{n(e),u.value=e}),()=>s.value&&t?n7(t,e):u.value&&r?ic(r,{error:u.value}):l&&!f.value?ic(l):void 0}})}function n7(e,t){let{ref:n,props:l,children:r,ce:i}=t.vnode,s=ic(e,l,r);return s.ref=n,s.ce=i,delete t.vnode.ce,s}let le=e=>e.type.__isKeepAlive,lt={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=ik(),l=n.ctx;if(!l.renderer)return()=>{let e=t.default&&t.default();return e&&1===e.length?e[0]:e};let r=new Map,i=new Set,s=null,o=n.suspense,{renderer:{p:a,m:u,um:c,o:{createElement:f}}}=l,p=f("div");function d(e){ls(e),c(e,n,o,!0)}function h(e){r.forEach((t,n)=>{let l=iU(t.type);l&&!e(l)&&g(n)})}function g(e){let t=r.get(e);!t||s&&ii(t,s)?s&&ls(s):d(t),r.delete(e),i.delete(e)}l.activate=(e,t,n,l,r)=>{let i=e.component;u(e,t,n,0,o),a(i.vnode,e,t,n,i,o,l,e.slotScopeIds,r),ry(()=>{i.isDeactivated=!1,i.a&&X(i.a);let t=e.props&&e.props.onVnodeMounted;t&&iS(t,i.parent,e)},o)},l.deactivate=e=>{let t=e.component;rT(t.m),rT(t.a),u(e,p,null,1,o),ry(()=>{t.da&&X(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&iS(n,t.parent,e),t.isDeactivated=!0},o)},rM(()=>[e.include,e.exclude],([e,t])=>{e&&h(t=>ln(e,t)),t&&h(e=>!ln(t,e))},{flush:"post",deep:!0});let m=null,_=()=>{null!=m&&(rz(n.subTree.type)?ry(()=>{r.set(m,lo(n.subTree))},n.subTree.suspense):r.set(m,lo(n.subTree)))};return lf(_),ld(_),lh(()=>{r.forEach(e=>{let{subTree:t,suspense:l}=n,r=lo(t);if(e.type===r.type&&e.key===r.key){ls(r);let e=r.component.da;e&&ry(e,l);return}d(e)})}),()=>{if(m=null,!t.default)return s=null;let n=t.default(),l=n[0];if(n.length>1)return s=null,n;if(!ir(l)||!(4&l.shapeFlag)&&!(128&l.shapeFlag))return s=null,l;let o=lo(l);if(o.type===r2)return s=null,o;let a=o.type,u=iU(n5(o)?o.type.__asyncResolved||{}:a),{include:c,exclude:f,max:p}=e;if(c&&(!u||!ln(c,u))||f&&u&&ln(f,u))return o.shapeFlag&=-257,s=o,l;let d=null==o.key?a:o.key,h=r.get(d);return o.el&&(o=id(o),128&l.shapeFlag&&(l.ssContent=o)),m=d,h?(o.el=h.el,o.component=h.component,o.transition&&nV(o,o.transition),o.shapeFlag|=512,i.delete(d),i.add(d)):(i.add(d),p&&i.size>parseInt(p,10)&&g(i.values().next().value)),o.shapeFlag|=256,s=o,rz(l.type)?l:o}}};function ln(e,t){return k(e)?e.some(e=>ln(e,t)):P(e)?e.split(",").includes(t):!!N(e)&&(e.lastIndex=0,e.test(t))}function ll(e,t){li(e,"a",t)}function lr(e,t){li(e,"da",t)}function li(e,t,n=iw){let l=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(la(t,l,n),n){let e=n.parent;for(;e&&e.parent;)le(e.parent.vnode)&&function(e,t,n,l){let r=la(t,e,l,!0);lg(()=>{x(l[t],r)},n)}(l,t,n,e),e=e.parent}}function ls(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function lo(e){return 128&e.shapeFlag?e.ssContent:e}function la(e,t,n=iw,l=!1){if(n){let r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...l)=>{eM();let r=iT(n),i=tQ(t,n,e,l);return r(),eI(),i});return l?r.unshift(i):r.push(i),i}}let lu=e=>(t,n=iw)=>{iN&&"sp"!==e||la(e,(...e)=>t(...e),n)},lc=lu("bm"),lf=lu("m"),lp=lu("bu"),ld=lu("u"),lh=lu("bum"),lg=lu("um"),lv=lu("sp"),lm=lu("rtg"),l_=lu("rtc");function ly(e,t=iw){la("ec",e,t)}let lb="components";function lS(e,t){return lw(lb,e,!0,t)||e}let lC=Symbol.for("v-ndc");function lx(e){return P(e)?lw(lb,e,!1)||e:e||lC}function lE(e){return lw("directives",e)}function lw(e,t,n=!0,l=!1){let r=ni||iw;if(r){let n=r.type;if(e===lb){let e=iU(n,!1);if(e&&(e===t||e===W(t)||e===q(W(t))))return n}let i=lk(r[e]||n[e],t)||lk(r.appContext[e],t);return!i&&l?n:i}}function lk(e,t){return e&&(e[t]||e[W(t)]||e[q(W(t))])}function lT(e,t,n,l){let r;let i=n&&n[l],s=k(e);if(s||P(e)){let n=s&&tm(e),l=!1;n&&(l=!ty(e),e=ez(e)),r=Array(e.length);for(let n=0,s=e.length;n<s;n++)r[n]=t(l?tx(e[n]):e[n],n,void 0,i&&i[n])}else if("number"==typeof e){r=Array(e);for(let n=0;n<e;n++)r[n]=t(n+1,n,void 0,i&&i[n])}else if(I(e)){if(e[Symbol.iterator])r=Array.from(e,(e,n)=>t(e,n,void 0,i&&i[n]));else{let n=Object.keys(e);r=Array(n.length);for(let l=0,s=n.length;l<s;l++){let s=n[l];r[l]=t(e[s],s,l,i&&i[l])}}}else r=[];return n&&(n[l]=r),r}function lA(e,t){for(let n=0;n<t.length;n++){let l=t[n];if(k(l))for(let t=0;t<l.length;t++)e[l[t].name]=l[t].fn;else l&&(e[l.name]=l.key?(...e)=>{let t=l.fn(...e);return t&&(t.key=l.key),t}:l.fn)}return e}function lR(e,t,n={},l,r){if(ni.ce||ni.parent&&n5(ni.parent)&&ni.parent.ce)return"default"!==t&&(n.name=t),r3(),il(r0,null,[ic("slot",n,l&&l())],64);let i=e[t];i&&i._c&&(i._d=!1),r3();let s=i&&lN(i(n)),o=n.key||s&&s.key,a=il(r0,{key:(o&&!M(o)?o:`_${t}`)+(!s&&l?"_fb":"")},s||(l?l():[]),s&&1===e._?64:-2);return!r&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),i&&i._c&&(i._d=!0),a}function lN(e){return e.some(e=>!ir(e)||!!(e.type!==r2&&(e.type!==r0||lN(e.children))))?e:null}function lO(e,t){let n={};for(let l in e)n[t&&/[A-Z]/.test(l)?`on:${l}`:G(l)]=e[l];return n}let lP=e=>e?iR(e)?iV(e):lP(e.parent):null,lM=C(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>lP(e.parent),$root:e=>lP(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>l0(e),$forceUpdate:e=>e.f||(e.f=()=>{t7(e.update)}),$nextTick:e=>e.n||(e.n=t9.bind(e.proxy)),$watch:e=>rL.bind(e)}),lI=(e,t)=>e!==g&&!e.__isScriptSetup&&w(e,t),lL={get({_:e},t){let n,l,r;if("__v_skip"===t)return!0;let{ctx:i,setupState:s,data:o,props:a,accessCache:u,type:c,appContext:f}=e;if("$"!==t[0]){let l=u[t];if(void 0!==l)switch(l){case 1:return s[t];case 2:return o[t];case 4:return i[t];case 3:return a[t]}else{if(lI(s,t))return u[t]=1,s[t];if(o!==g&&w(o,t))return u[t]=2,o[t];if((n=e.propsOptions[0])&&w(n,t))return u[t]=3,a[t];if(i!==g&&w(i,t))return u[t]=4,i[t];lY&&(u[t]=0)}}let p=lM[t];return p?("$attrs"===t&&eH(e.attrs,"get",""),p(e)):(l=c.__cssModules)&&(l=l[t])?l:i!==g&&w(i,t)?(u[t]=4,i[t]):w(r=f.config.globalProperties,t)?r[t]:void 0},set({_:e},t,n){let{data:l,setupState:r,ctx:i}=e;return lI(r,t)?(r[t]=n,!0):l!==g&&w(l,t)?(l[t]=n,!0):!w(e.props,t)&&!("$"===t[0]&&t.slice(1)in e)&&(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:l,appContext:r,propsOptions:i}},s){let o;return!!n[s]||e!==g&&w(e,s)||lI(t,s)||(o=i[0])&&w(o,s)||w(l,s)||w(lM,s)||w(r.config.globalProperties,s)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:w(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},lD=C({},lL,{get(e,t){if(t!==Symbol.unscopables)return lL.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!et(t)});function lF(){return null}function lV(){return null}function lU(e){}function lj(e){}function lB(){return null}function l$(){}function lH(e,t){return null}function lW(){return lz().slots}function lK(){return lz().attrs}function lz(){let e=ik();return e.setupContext||(e.setupContext=iF(e))}function lq(e){return k(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function lG(e,t){let n=lq(e);for(let e in t){if(e.startsWith("__skip"))continue;let l=n[e];l?k(l)||O(l)?l=n[e]={type:l,default:t[e]}:l.default=t[e]:null===l&&(l=n[e]={default:t[e]}),l&&t[`__skip_${e}`]&&(l.skipFactory=!0)}return n}function lJ(e,t){return e&&t?k(e)&&k(t)?e.concat(t):C({},lq(e),lq(t)):e||t}function lX(e,t){let n={};for(let l in e)t.includes(l)||Object.defineProperty(n,l,{enumerable:!0,get:()=>e[l]});return n}function lZ(e){let t=ik(),n=e();return iA(),L(n)&&(n=n.catch(e=>{throw iT(t),e})),[n,()=>iT(t)]}let lY=!0;function lQ(e,t,n){tQ(k(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function l0(e){let t;let n=e.type,{mixins:l,extends:r}=n,{mixins:i,optionsCache:s,config:{optionMergeStrategies:o}}=e.appContext,a=s.get(n);return a?t=a:i.length||l||r?(t={},i.length&&i.forEach(e=>l1(t,e,o,!0)),l1(t,n,o)):t=n,I(n)&&s.set(n,t),t}function l1(e,t,n,l=!1){let{mixins:r,extends:i}=t;for(let s in i&&l1(e,i,n,!0),r&&r.forEach(t=>l1(e,t,n,!0)),t)if(l&&"expose"===s);else{let l=l2[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}let l2={data:l6,props:l5,emits:l5,methods:l3,computed:l3,beforeCreate:l8,created:l8,beforeMount:l8,mounted:l8,beforeUpdate:l8,updated:l8,beforeDestroy:l8,beforeUnmount:l8,destroyed:l8,unmounted:l8,activated:l8,deactivated:l8,errorCaptured:l8,serverPrefetch:l8,components:l3,directives:l3,watch:function(e,t){if(!e)return t;if(!t)return e;let n=C(Object.create(null),e);for(let l in t)n[l]=l8(e[l],t[l]);return n},provide:l6,inject:function(e,t){return l3(l4(e),l4(t))}};function l6(e,t){return t?e?function(){return C(O(e)?e.call(this,this):e,O(t)?t.call(this,this):t)}:t:e}function l4(e){if(k(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function l8(e,t){return e?[...new Set([].concat(e,t))]:t}function l3(e,t){return e?C(Object.create(null),e,t):t}function l5(e,t){return e?k(e)&&k(t)?[...new Set([...e,...t])]:C(Object.create(null),lq(e),lq(null!=t?t:{})):t}function l9(){return{app:null,config:{isNativeTag:y,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let l7=0,re=null;function rt(e,t){if(iw){let n=iw.provides,l=iw.parent&&iw.parent.provides;l===n&&(n=iw.provides=Object.create(l)),n[e]=t}}function rn(e,t,n=!1){let l=iw||ni;if(l||re){let r=re?re._context.provides:l?null==l.parent?l.vnode.appContext&&l.vnode.appContext.provides:l.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&O(t)?t.call(l&&l.proxy):t}}function rl(){return!!(iw||ni||re)}let rr={},ri=()=>Object.create(rr),rs=e=>Object.getPrototypeOf(e)===rr;function ro(e,t,n,l){let r;let[i,s]=e.propsOptions,o=!1;if(t)for(let a in t){let u;if(B(a))continue;let c=t[a];i&&w(i,u=W(a))?s&&s.includes(u)?(r||(r={}))[u]=c:n[u]=c:rj(e.emitsOptions,a)||a in l&&c===l[a]||(l[a]=c,o=!0)}if(s){let t=tS(n),l=r||g;for(let r=0;r<s.length;r++){let o=s[r];n[o]=ra(i,t,o,l[o],e,!w(l,o))}}return o}function ra(e,t,n,l,r,i){let s=e[n];if(null!=s){let e=w(s,"default");if(e&&void 0===l){let e=s.default;if(s.type!==Function&&!s.skipFactory&&O(e)){let{propsDefaults:i}=r;if(n in i)l=i[n];else{let s=iT(r);l=i[n]=e.call(null,t),s()}}else l=e;r.ce&&r.ce._setProp(n,l)}s[0]&&(i&&!e?l=!1:s[1]&&(""===l||l===z(n))&&(l=!0))}return l}let ru=new WeakMap;function rc(e){return!("$"===e[0]||B(e))}let rf=e=>"_"===e[0]||"$stable"===e,rp=e=>k(e)?e.map(im):[im(e)],rd=(e,t,n)=>{if(t._n)return t;let l=nf((...e)=>rp(t(...e)),n);return l._c=!1,l},rh=(e,t,n)=>{let l=e._ctx;for(let n in e){if(rf(n))continue;let r=e[n];if(O(r))t[n]=rd(n,r,l);else if(null!=r){let e=rp(r);t[n]=()=>e}}},rg=(e,t)=>{let n=rp(t);e.slots.default=()=>n},rv=(e,t,n)=>{for(let l in t)(n||"_"!==l)&&(e[l]=t[l])},rm=(e,t,n)=>{let l=e.slots=ri();if(32&e.vnode.shapeFlag){let e=t._;e?(rv(l,t,n),n&&Z(l,"_",e,!0)):rh(t,l)}else t&&rg(e,t)},r_=(e,t,n)=>{let{vnode:l,slots:r}=e,i=!0,s=g;if(32&l.shapeFlag){let e=t._;e?n&&1===e?i=!1:rv(r,t,n):(i=!t.$stable,rh(t,r)),s=t}else t&&(rg(e,t),s={default:1});if(i)for(let e in r)rf(e)||null!=s[e]||delete r[e]},ry=rY;function rb(e){return rC(e)}function rS(e){return rC(e,nZ)}function rC(e,t){var n;let l,r;ee().__VUE__=!0;let{insert:i,remove:s,patchProp:o,createElement:a,createText:u,createComment:c,setText:f,setElementText:p,parentNode:d,nextSibling:h,setScopeId:y=_,insertStaticContent:b}=e,S=(e,t,n,l=null,r=null,i=null,s,o=null,a=!!t.dynamicChildren)=>{if(e===t)return;e&&!ii(e,t)&&(l=er(e),Y(e,r,i,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);let{type:u,ref:c,shapeFlag:f}=t;switch(u){case r1:x(e,t,n,l);break;case r2:E(e,t,n,l);break;case r6:null==e&&k(t,n,l,s);break;case r0:V(e,t,n,l,r,i,s,o,a);break;default:1&f?R(e,t,n,l,r,i,s,o,a):6&f?U(e,t,n,l,r,i,s,o,a):64&f?u.process(e,t,n,l,r,i,s,o,a,eo):128&f&&u.process(e,t,n,l,r,i,s,o,a,eo)}null!=c&&r&&nW(c,e&&e.ref,i,t||e,!t)},x=(e,t,n,l)=>{if(null==e)i(t.el=u(t.children),n,l);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},E=(e,t,n,l)=>{null==e?i(t.el=c(t.children||""),n,l):t.el=e.el},k=(e,t,n,l)=>{[e.el,e.anchor]=b(e.children,t,n,l,e.el,e.anchor)},T=({el:e,anchor:t},n,l)=>{let r;for(;e&&e!==t;)r=h(e),i(e,n,l),e=r;i(t,n,l)},A=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},R=(e,t,n,l,r,i,s,o,a)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?N(t,n,l,r,i,s,o,a):L(e,t,r,i,s,o,a)},N=(e,t,n,l,r,s,u,c)=>{let f,d;let{props:h,shapeFlag:g,transition:m,dirs:_}=e;if(f=e.el=a(e.type,s,h&&h.is,h),8&g?p(f,e.children):16&g&&M(e.children,f,null,l,r,rx(e,s),u,c),_&&nd(e,null,l,"created"),P(f,e,e.scopeId,u,l),h){for(let e in h)"value"===e||B(e)||o(f,e,null,h[e],s,l);"value"in h&&o(f,"value",null,h.value,s),(d=h.onVnodeBeforeMount)&&iS(d,l,e)}_&&nd(e,null,l,"beforeMount");let y=rw(r,m);y&&m.beforeEnter(f),i(f,t,n),((d=h&&h.onVnodeMounted)||y||_)&&ry(()=>{d&&iS(d,l,e),y&&m.enter(f),_&&nd(e,null,l,"mounted")},r)},P=(e,t,n,l,r)=>{if(n&&y(e,n),l)for(let t=0;t<l.length;t++)y(e,l[t]);if(r){let n=r.subTree;if(t===n||rz(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=r.vnode;P(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},M=(e,t,n,l,r,i,s,o,a=0)=>{for(let u=a;u<e.length;u++)S(null,e[u]=o?i_(e[u]):im(e[u]),t,n,l,r,i,s,o)},L=(e,t,n,l,r,i,s)=>{let a;let u=t.el=e.el,{patchFlag:c,dynamicChildren:f,dirs:d}=t;c|=16&e.patchFlag;let h=e.props||g,m=t.props||g;if(n&&rE(n,!1),(a=m.onVnodeBeforeUpdate)&&iS(a,n,t,e),d&&nd(t,e,n,"beforeUpdate"),n&&rE(n,!0),(h.innerHTML&&null==m.innerHTML||h.textContent&&null==m.textContent)&&p(u,""),f?D(e.dynamicChildren,f,u,n,l,rx(t,r),i):s||q(e,t,u,null,n,l,rx(t,r),i,!1),c>0){if(16&c)F(u,h,m,n,r);else if(2&c&&h.class!==m.class&&o(u,"class",null,m.class,r),4&c&&o(u,"style",h.style,m.style,r),8&c){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let l=e[t],i=h[l],s=m[l];(s!==i||"value"===l)&&o(u,l,i,s,r,n)}}1&c&&e.children!==t.children&&p(u,t.children)}else s||null!=f||F(u,h,m,n,r);((a=m.onVnodeUpdated)||d)&&ry(()=>{a&&iS(a,n,t,e),d&&nd(t,e,n,"updated")},l)},D=(e,t,n,l,r,i,s)=>{for(let o=0;o<t.length;o++){let a=e[o],u=t[o],c=a.el&&(a.type===r0||!ii(a,u)||70&a.shapeFlag)?d(a.el):n;S(a,u,c,null,l,r,i,s,!0)}},F=(e,t,n,l,r)=>{if(t!==n){if(t!==g)for(let i in t)B(i)||i in n||o(e,i,t[i],null,r,l);for(let i in n){if(B(i))continue;let s=n[i],a=t[i];s!==a&&"value"!==i&&o(e,i,a,s,r,l)}"value"in n&&o(e,"value",t.value,n.value,r)}},V=(e,t,n,l,r,s,o,a,c)=>{let f=t.el=e?e.el:u(""),p=t.anchor=e?e.anchor:u(""),{patchFlag:d,dynamicChildren:h,slotScopeIds:g}=t;g&&(a=a?a.concat(g):g),null==e?(i(f,n,l),i(p,n,l),M(t.children||[],n,p,r,s,o,a,c)):d>0&&64&d&&h&&e.dynamicChildren?(D(e.dynamicChildren,h,n,r,s,o,a),(null!=t.key||r&&t===r.subTree)&&rk(e,t,!0)):q(e,t,n,p,r,s,o,a,c)},U=(e,t,n,l,r,i,s,o,a)=>{t.slotScopeIds=o,null==e?512&t.shapeFlag?r.ctx.activate(t,n,l,s,a):j(t,n,l,r,i,s,a):$(e,t,a)},j=(e,t,n,l,r,i,s)=>{let o=e.component=iE(e,l,r);le(e)&&(o.ctx.renderer=eo),iO(o,!1,s),o.asyncDep?(r&&r.registerDep(o,H,s),e.el||E(null,o.subTree=ic(r2),t,n)):H(o,e,t,n,r,i,s)},$=(e,t,n)=>{let l=t.component=e.component;if(function(e,t,n){let{props:l,children:r,component:i}=e,{props:s,children:o,patchFlag:a}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(!n||!(a>=0))return(!!r||!!o)&&(!o||!o.$stable)||l!==s&&(l?!s||rW(l,s,u):!!s);if(1024&a)return!0;if(16&a)return l?rW(l,s,u):!!s;if(8&a){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(s[n]!==l[n]&&!rj(u,n))return!0}}return!1}(e,t,n)){if(l.asyncDep&&!l.asyncResolved){K(l,t,n);return}l.next=t,l.update()}else t.el=e.el,l.vnode=t},H=(e,t,n,l,i,s,o)=>{let a=()=>{if(e.isMounted){let t,{next:n,bu:l,u:r,parent:u,vnode:c}=e;{let t=function e(t){let n=t.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:e(n)}(e);if(t){n&&(n.el=c.el,K(e,n,o)),t.asyncDep.then(()=>{e.isUnmounted||a()});return}}let f=n;rE(e,!1),n?(n.el=c.el,K(e,n,o)):n=c,l&&X(l),(t=n.props&&n.props.onVnodeBeforeUpdate)&&iS(t,u,n,c),rE(e,!0);let p=rB(e),h=e.subTree;e.subTree=p,S(h,p,d(h.el),er(h),e,i,s),n.el=p.el,null===f&&rK(e,p.el),r&&ry(r,i),(t=n.props&&n.props.onVnodeUpdated)&&ry(()=>iS(t,u,n,c),i)}else{let o;let{el:a,props:u}=t,{bm:c,m:f,parent:p,root:d,type:h}=e,g=n5(t);if(rE(e,!1),c&&X(c),!g&&(o=u&&u.onVnodeBeforeMount)&&iS(o,p,t),rE(e,!0),a&&r){let t=()=>{e.subTree=rB(e),r(a,e.subTree,e,i,null)};g&&h.__asyncHydrate?h.__asyncHydrate(a,e,t):t()}else{d.ce&&d.ce._injectChildStyle(h);let r=e.subTree=rB(e);S(null,r,n,l,e,i,s),t.el=r.el}if(f&&ry(f,i),!g&&(o=u&&u.onVnodeMounted)){let e=t;ry(()=>iS(o,p,e),i)}(256&t.shapeFlag||p&&n5(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&ry(e.a,i),e.isMounted=!0,t=n=l=null}};e.scope.on();let u=e.effect=new eb(a);e.scope.off();let c=e.update=u.run.bind(u),f=e.job=u.runIfDirty.bind(u);f.i=e,f.id=e.uid,u.scheduler=()=>t7(f),rE(e,!0),c()},K=(e,t,n)=>{t.component=e;let l=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,l){let{props:r,attrs:i,vnode:{patchFlag:s}}=e,o=tS(r),[a]=e.propsOptions,u=!1;if((l||s>0)&&!(16&s)){if(8&s){let n=e.vnode.dynamicProps;for(let l=0;l<n.length;l++){let s=n[l];if(rj(e.emitsOptions,s))continue;let c=t[s];if(a){if(w(i,s))c!==i[s]&&(i[s]=c,u=!0);else{let t=W(s);r[t]=ra(a,o,t,c,e,!1)}}else c!==i[s]&&(i[s]=c,u=!0)}}}else{let l;for(let s in ro(e,t,r,i)&&(u=!0),o)t&&(w(t,s)||(l=z(s))!==s&&w(t,l))||(a?n&&(void 0!==n[s]||void 0!==n[l])&&(r[s]=ra(a,o,s,void 0,e,!0)):delete r[s]);if(i!==o)for(let e in i)t&&w(t,e)||(delete i[e],u=!0)}u&&eW(e.attrs,"set","")}(e,t.props,l,n),r_(e,t.children,n),eM(),nn(e),eI()},q=(e,t,n,l,r,i,s,o,a=!1)=>{let u=e&&e.children,c=e?e.shapeFlag:0,f=t.children,{patchFlag:d,shapeFlag:h}=t;if(d>0){if(128&d){J(u,f,n,l,r,i,s,o,a);return}if(256&d){G(u,f,n,l,r,i,s,o,a);return}}8&h?(16&c&&el(u,r,i),f!==u&&p(n,f)):16&c?16&h?J(u,f,n,l,r,i,s,o,a):el(u,r,i,!0):(8&c&&p(n,""),16&h&&M(f,n,l,r,i,s,o,a))},G=(e,t,n,l,r,i,s,o,a)=>{let u;e=e||m,t=t||m;let c=e.length,f=t.length,p=Math.min(c,f);for(u=0;u<p;u++){let l=t[u]=a?i_(t[u]):im(t[u]);S(e[u],l,n,null,r,i,s,o,a)}c>f?el(e,r,i,!0,!1,p):M(t,n,l,r,i,s,o,a,p)},J=(e,t,n,l,r,i,s,o,a)=>{let u=0,c=t.length,f=e.length-1,p=c-1;for(;u<=f&&u<=p;){let l=e[u],c=t[u]=a?i_(t[u]):im(t[u]);if(ii(l,c))S(l,c,n,null,r,i,s,o,a);else break;u++}for(;u<=f&&u<=p;){let l=e[f],u=t[p]=a?i_(t[p]):im(t[p]);if(ii(l,u))S(l,u,n,null,r,i,s,o,a);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,f=e<c?t[e].el:l;for(;u<=p;)S(null,t[u]=a?i_(t[u]):im(t[u]),n,f,r,i,s,o,a),u++}}else if(u>p)for(;u<=f;)Y(e[u],r,i,!0),u++;else{let d;let h=u,g=u,_=new Map;for(u=g;u<=p;u++){let e=t[u]=a?i_(t[u]):im(t[u]);null!=e.key&&_.set(e.key,u)}let y=0,b=p-g+1,C=!1,x=0,E=Array(b);for(u=0;u<b;u++)E[u]=0;for(u=h;u<=f;u++){let l;let c=e[u];if(y>=b){Y(c,r,i,!0);continue}if(null!=c.key)l=_.get(c.key);else for(d=g;d<=p;d++)if(0===E[d-g]&&ii(c,t[d])){l=d;break}void 0===l?Y(c,r,i,!0):(E[l-g]=u+1,l>=x?x=l:C=!0,S(c,t[l],n,null,r,i,s,o,a),y++)}let w=C?function(e){let t,n,l,r,i;let s=e.slice(),o=[0],a=e.length;for(t=0;t<a;t++){let a=e[t];if(0!==a){if(e[n=o[o.length-1]]<a){s[t]=n,o.push(t);continue}for(l=0,r=o.length-1;l<r;)e[o[i=l+r>>1]]<a?l=i+1:r=i;a<e[o[l]]&&(l>0&&(s[t]=o[l-1]),o[l]=t)}}for(l=o.length,r=o[l-1];l-- >0;)o[l]=r,r=s[r];return o}(E):m;for(d=w.length-1,u=b-1;u>=0;u--){let e=g+u,f=t[e],p=e+1<c?t[e+1].el:l;0===E[u]?S(null,f,n,p,r,i,s,o,a):C&&(d<0||u!==w[d]?Z(f,n,p,2):d--)}}},Z=(e,t,n,l,r=null)=>{let{el:s,type:o,transition:a,children:u,shapeFlag:c}=e;if(6&c){Z(e.component.subTree,t,n,l);return}if(128&c){e.suspense.move(t,n,l);return}if(64&c){o.move(e,t,n,eo);return}if(o===r0){i(s,t,n);for(let e=0;e<u.length;e++)Z(u[e],t,n,l);i(e.anchor,t,n);return}if(o===r6){T(e,t,n);return}if(2!==l&&1&c&&a){if(0===l)a.beforeEnter(s),i(s,t,n),ry(()=>a.enter(s),r);else{let{leave:e,delayLeave:l,afterLeave:r}=a,o=()=>i(s,t,n),u=()=>{e(s,()=>{o(),r&&r()})};l?l(s,o,u):u()}}else i(s,t,n)},Y=(e,t,n,l=!1,r=!1)=>{let i;let{type:s,props:o,ref:a,children:u,dynamicChildren:c,shapeFlag:f,patchFlag:p,dirs:d,cacheIndex:h}=e;if(-2===p&&(r=!1),null!=a&&nW(a,null,n,e,!0),null!=h&&(t.renderCache[h]=void 0),256&f){t.ctx.deactivate(e);return}let g=1&f&&d,m=!n5(e);if(m&&(i=o&&o.onVnodeBeforeUnmount)&&iS(i,t,e),6&f)en(e.component,n,l);else{if(128&f){e.suspense.unmount(n,l);return}g&&nd(e,null,t,"beforeUnmount"),64&f?e.type.remove(e,t,n,eo,l):c&&!c.hasOnce&&(s!==r0||p>0&&64&p)?el(c,t,n,!1,!0):(s===r0&&384&p||!r&&16&f)&&el(u,t,n),l&&Q(e)}(m&&(i=o&&o.onVnodeUnmounted)||g)&&ry(()=>{i&&iS(i,t,e),g&&nd(e,null,t,"unmounted")},n)},Q=e=>{let{type:t,el:n,anchor:l,transition:r}=e;if(t===r0){et(n,l);return}if(t===r6){A(e);return}let i=()=>{s(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){let{leave:t,delayLeave:l}=r,s=()=>t(n,i);l?l(e.el,i,s):s()}else i()},et=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},en=(e,t,n)=>{let{bum:l,scope:r,job:i,subTree:s,um:o,m:a,a:u}=e;rT(a),rT(u),l&&X(l),r.stop(),i&&(i.flags|=8,Y(s,e,t,n)),o&&ry(o,t),ry(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},el=(e,t,n,l=!1,r=!1,i=0)=>{for(let s=i;s<e.length;s++)Y(e[s],t,n,l,r)},er=e=>{if(6&e.shapeFlag)return er(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[nh];return n?h(n):t},ei=!1,es=(e,t,n)=>{null==e?t._vnode&&Y(t._vnode,null,null,!0):S(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ei||(ei=!0,nn(),nl(),ei=!1)},eo={p:S,um:Y,m:Z,r:Q,mt:j,mc:M,pc:q,pbc:D,n:er,o:e};return t&&([l,r]=t(eo)),{render:es,hydrate:l,createApp:(n=l,function(e,t=null){O(e)||(e=C({},e)),null==t||I(t)||(t=null);let l=l9(),r=new WeakSet,i=[],s=!1,o=l.app={_uid:l7++,_component:e,_props:t,_container:null,_context:l,_instance:null,version:iK,get config(){return l.config},set config(v){},use:(e,...t)=>(r.has(e)||(e&&O(e.install)?(r.add(e),e.install(o,...t)):O(e)&&(r.add(e),e(o,...t))),o),mixin:e=>(l.mixins.includes(e)||l.mixins.push(e),o),component:(e,t)=>t?(l.components[e]=t,o):l.components[e],directive:(e,t)=>t?(l.directives[e]=t,o):l.directives[e],mount(r,i,a){if(!s){let u=o._ceVNode||ic(e,t);return u.appContext=l,!0===a?a="svg":!1===a&&(a=void 0),i&&n?n(u,r):es(u,r,a),s=!0,o._container=r,r.__vue_app__=o,iV(u.component)}},onUnmount(e){i.push(e)},unmount(){s&&(tQ(i,o._instance,16),es(null,o._container),delete o._container.__vue_app__)},provide:(e,t)=>(l.provides[e]=t,o),runWithContext(e){let t=re;re=o;try{return e()}finally{re=t}}};return o})}}function rx({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function rE({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function rw(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function rk(e,t,n=!1){let l=e.children,r=t.children;if(k(l)&&k(r))for(let e=0;e<l.length;e++){let t=l[e],i=r[e];!(1&i.shapeFlag)||i.dynamicChildren||((i.patchFlag<=0||32===i.patchFlag)&&((i=r[e]=i_(r[e])).el=t.el),n||-2===i.patchFlag||rk(t,i)),i.type===r1&&(i.el=t.el)}}function rT(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}let rA=Symbol.for("v-scx"),rR=()=>rn(rA);function rN(e,t){return rI(e,null,t)}function rO(e,t){return rI(e,null,{flush:"post"})}function rP(e,t){return rI(e,null,{flush:"sync"})}function rM(e,t,n){return rI(e,t,n)}function rI(e,t,n=g){let l;let{immediate:r,deep:i,flush:s,once:o}=n,a=C({},n),u=t&&r||!t&&"post"!==s;if(iN){if("sync"===s){let e=rR();l=e.__watcherHandles||(e.__watcherHandles=[])}else if(!u){let e=()=>{};return e.stop=_,e.resume=_,e.pause=_,e}}let c=iw;a.call=(e,t,n)=>tQ(e,c,t,n);let f=!1;"post"===s?a.scheduler=e=>{ry(e,c&&c.suspense)}:"sync"!==s&&(f=!0,a.scheduler=(e,t)=>{t?e():t7(e)}),a.augmentJob=e=>{t&&(e.flags|=4),f&&(e.flags|=2,c&&(e.id=c.uid,e.i=c))};let d=function(e,t,n=g){let l,r,i,s;let{immediate:o,deep:a,once:u,scheduler:c,augmentJob:f,call:d}=n,h=e=>a?e:ty(e)||!1===a||0===a?tJ(e,1):tJ(e),m=!1,y=!1;if(tw(e)?(r=()=>e.value,m=ty(e)):tm(e)?(r=()=>h(e),m=!0):k(e)?(y=!0,m=e.some(e=>tm(e)||ty(e)),r=()=>e.map(e=>tw(e)?e.value:tm(e)?h(e):O(e)?d?d(e,2):e():void 0)):r=O(e)?t?d?()=>d(e,2):e:()=>{if(i){eM();try{i()}finally{eI()}}let t=p;p=l;try{return d?d(e,3,[s]):e(s)}finally{p=t}}:_,t&&a){let e=r,t=!0===a?1/0:a;r=()=>tJ(e(),t)}let b=em(),S=()=>{l.stop(),b&&b.active&&x(b.effects,l)};if(u&&t){let e=t;t=(...t)=>{e(...t),S()}}let C=y?Array(e.length).fill(tK):tK,E=e=>{if(1&l.flags&&(l.dirty||e)){if(t){let e=l.run();if(a||m||(y?e.some((e,t)=>J(e,C[t])):J(e,C))){i&&i();let n=p;p=l;try{let n=[e,C===tK?void 0:y&&C[0]===tK?[]:C,s];d?d(t,3,n):t(...n),C=e}finally{p=n}}}else l.run()}};return f&&f(E),(l=new eb(r)).scheduler=c?()=>c(E,!1):E,s=e=>tG(e,!1,l),i=l.onStop=()=>{let e=tz.get(l);if(e){if(d)d(e,4);else for(let t of e)t();tz.delete(l)}},t?o?E(!0):C=l.run():c?c(E.bind(null,!0),!0):l.run(),S.pause=l.pause.bind(l),S.resume=l.resume.bind(l),S.stop=S,S}(e,t,a);return iN&&(l?l.push(d):u&&d()),d}function rL(e,t,n){let l;let r=this.proxy,i=P(e)?e.includes(".")?rD(r,e):()=>r[e]:e.bind(r,r);O(t)?l=t:(l=t.handler,n=t);let s=iT(this),o=rI(i,l.bind(r),n);return s(),o}function rD(e,t){let n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function rF(e,t,n=g){let l=ik(),r=W(t),i=z(t),s=rV(e,r),o=tD((s,o)=>{let a,u;let c=g;return rP(()=>{let t=e[r];J(a,t)&&(a=t,o())}),{get:()=>(s(),n.get?n.get(a):a),set(e){let s=n.set?n.set(e):e;if(!J(s,a)&&!(c!==g&&J(e,c)))return;let f=l.vnode.props;f&&(t in f||r in f||i in f)&&(`onUpdate:${t}`in f||`onUpdate:${r}`in f||`onUpdate:${i}`in f)||(a=e,o()),l.emit(`update:${t}`,s),J(e,s)&&J(e,c)&&!J(s,u)&&o(),c=e,u=s}}});return o[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?s||g:o,done:!1}:{done:!0}}},o}let rV=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${W(t)}Modifiers`]||e[`${z(t)}Modifiers`];function rU(e,t,...n){let l;if(e.isUnmounted)return;let r=e.vnode.props||g,i=n,s=t.startsWith("update:"),o=s&&rV(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>P(e)?e.trim():e)),o.number&&(i=n.map(Y)));let a=r[l=G(t)]||r[l=G(W(t))];!a&&s&&(a=r[l=G(z(t))]),a&&tQ(a,e,6,i);let u=r[l+"Once"];if(u){if(e.emitted){if(e.emitted[l])return}else e.emitted={};e.emitted[l]=!0,tQ(u,e,6,i)}}function rj(e,t){return!!(e&&b(t))&&(w(e,(t=t.slice(2).replace(/Once$/,""))[0].toLowerCase()+t.slice(1))||w(e,z(t))||w(e,t))}function rB(e){let t,n;let{type:l,vnode:r,proxy:i,withProxy:s,propsOptions:[o],slots:a,attrs:u,emit:c,render:f,renderCache:p,props:d,data:h,setupState:g,ctx:m,inheritAttrs:_}=e,y=no(e);try{if(4&r.shapeFlag){let e=s||i;t=im(f.call(e,e,p,d,g,h,m)),n=u}else t=im(l.length>1?l(d,{attrs:u,slots:a,emit:c}):l(d,null)),n=l.props?u:r$(u)}catch(n){r4.length=0,t0(n,e,1),t=ic(r2)}let b=t;if(n&&!1!==_){let e=Object.keys(n),{shapeFlag:t}=b;e.length&&7&t&&(o&&e.some(S)&&(n=rH(n,o)),b=id(b,n,!1,!0))}return r.dirs&&((b=id(b,null,!1,!0)).dirs=b.dirs?b.dirs.concat(r.dirs):r.dirs),r.transition&&nV(b,r.transition),t=b,no(y),t}let r$=e=>{let t;for(let n in e)("class"===n||"style"===n||b(n))&&((t||(t={}))[n]=e[n]);return t},rH=(e,t)=>{let n={};for(let l in e)S(l)&&l.slice(9)in t||(n[l]=e[l]);return n};function rW(e,t,n){let l=Object.keys(t);if(l.length!==Object.keys(e).length)return!0;for(let r=0;r<l.length;r++){let i=l[r];if(t[i]!==e[i]&&!rj(n,i))return!0}return!1}function rK({vnode:e,parent:t},n){for(;t;){let l=t.subTree;if(l.suspense&&l.suspense.activeBranch===e&&(l.el=e.el),l===e)(e=t.vnode).el=n,t=t.parent;else break}}let rz=e=>e.__isSuspense,rq=0,rG={name:"Suspense",__isSuspense:!0,process(e,t,n,l,r,i,s,o,a,u){if(null==e)!function(e,t,n,l,r,i,s,o,a){let{p:u,o:{createElement:c}}=a,f=c("div"),p=e.suspense=rX(e,r,l,t,f,n,i,s,o,a);u(null,p.pendingBranch=e.ssContent,f,null,l,p,i,s),p.deps>0?(rJ(e,"onPending"),rJ(e,"onFallback"),u(null,e.ssFallback,t,n,l,null,i,s),rQ(p,e.ssFallback)):p.resolve(!1,!0)}(t,n,l,r,i,s,o,a,u);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}!function(e,t,n,l,r,i,s,o,{p:a,um:u,o:{createElement:c}}){let f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;let p=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:g,isInFallback:m,isHydrating:_}=f;if(g)f.pendingBranch=p,ii(p,g)?(a(g,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0?f.resolve():m&&!_&&(a(h,d,n,l,r,null,i,s,o),rQ(f,d))):(f.pendingId=rq++,_?(f.isHydrating=!1,f.activeBranch=g):u(g,r,f),f.deps=0,f.effects.length=0,f.hiddenContainer=c("div"),m?(a(null,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0?f.resolve():(a(h,d,n,l,r,null,i,s,o),rQ(f,d))):h&&ii(p,h)?(a(h,p,n,l,r,f,i,s,o),f.resolve(!0)):(a(null,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0&&f.resolve()));else if(h&&ii(p,h))a(h,p,n,l,r,f,i,s,o),rQ(f,p);else if(rJ(t,"onPending"),f.pendingBranch=p,512&p.shapeFlag?f.pendingId=p.component.suspenseId:f.pendingId=rq++,a(null,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0)f.resolve();else{let{timeout:e,pendingId:t}=f;e>0?setTimeout(()=>{f.pendingId===t&&f.fallback(d)},e):0===e&&f.fallback(d)}}(e,t,n,l,r,s,o,a,u)}},hydrate:function(e,t,n,l,r,i,s,o,a){let u=t.suspense=rX(t,l,n,e.parentNode,document.createElement("div"),null,r,i,s,o,!0),c=a(e,u.pendingBranch=t.ssContent,n,u,i,s);return 0===u.deps&&u.resolve(!1,!0),c},normalize:function(e){let{shapeFlag:t,children:n}=e,l=32&t;e.ssContent=rZ(l?n.default:n),e.ssFallback=l?rZ(n.fallback):ic(r2)}};function rJ(e,t){let n=e.props&&e.props[t];O(n)&&n()}function rX(e,t,n,l,r,i,s,o,a,u,c=!1){let f;let{p:p,m:d,um:h,n:g,o:{parentNode:m,remove:_}}=u,y=function(e){let t=e.props&&e.props.suspensible;return null!=t&&!1!==t}(e);y&&t&&t.pendingBranch&&(f=t.pendingId,t.deps++);let b=e.props?Q(e.props.timeout):void 0,S=i,C={vnode:e,parent:t,parentComponent:n,namespace:s,container:l,hiddenContainer:r,deps:0,pendingId:rq++,timeout:"number"==typeof b?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:l,activeBranch:r,pendingBranch:s,pendingId:o,effects:a,parentComponent:u,container:c}=C,p=!1;C.isHydrating?C.isHydrating=!1:e||((p=r&&s.transition&&"out-in"===s.transition.mode)&&(r.transition.afterLeave=()=>{o===C.pendingId&&(d(s,c,i===S?g(r):i,0),nt(a))}),r&&(m(r.el)===c&&(i=g(r)),h(r,u,C,!0)),p||d(s,c,i,0)),rQ(C,s),C.pendingBranch=null,C.isInFallback=!1;let _=C.parent,b=!1;for(;_;){if(_.pendingBranch){_.effects.push(...a),b=!0;break}_=_.parent}b||p||nt(a),C.effects=[],y&&t&&t.pendingBranch&&f===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),rJ(l,"onResolve")},fallback(e){if(!C.pendingBranch)return;let{vnode:t,activeBranch:n,parentComponent:l,container:r,namespace:i}=C;rJ(t,"onFallback");let s=g(n),u=()=>{C.isInFallback&&(p(null,e,r,s,l,null,i,o,a),rQ(C,e))},c=e.transition&&"out-in"===e.transition.mode;c&&(n.transition.afterLeave=u),C.isInFallback=!0,h(n,l,null,!0),c||u()},move(e,t,n){C.activeBranch&&d(C.activeBranch,e,t,n),C.container=e},next:()=>C.activeBranch&&g(C.activeBranch),registerDep(e,t,n){let l=!!C.pendingBranch;l&&C.deps++;let r=e.vnode.el;e.asyncDep.catch(t=>{t0(t,e,0)}).then(i=>{if(e.isUnmounted||C.isUnmounted||C.pendingId!==e.suspenseId)return;e.asyncResolved=!0;let{vnode:o}=e;iP(e,i,!1),r&&(o.el=r);let a=!r&&e.subTree.el;t(e,o,m(r||e.subTree.el),r?null:g(e.subTree),C,s,n),a&&_(a),rK(e,o.el),l&&0==--C.deps&&C.resolve()})},unmount(e,t){C.isUnmounted=!0,C.activeBranch&&h(C.activeBranch,n,e,t),C.pendingBranch&&h(C.pendingBranch,n,e,t)}};return C}function rZ(e){let t;if(O(e)){let n=r9&&e._c;n&&(e._d=!1,r3()),e=e(),n&&(e._d=!0,t=r8,r5())}return k(e)&&(e=function(e,t=!0){let n;for(let t=0;t<e.length;t++){let l=e[t];if(!ir(l))return;if(l.type!==r2||"v-if"===l.children){if(n)return;n=l}}return n}(e)),e=im(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(t=>t!==e)),e}function rY(e,t){t&&t.pendingBranch?k(e)?t.effects.push(...e):t.effects.push(e):nt(e)}function rQ(e,t){e.activeBranch=t;let{vnode:n,parentComponent:l}=e,r=t.el;for(;!r&&t.component;)r=(t=t.component.subTree).el;n.el=r,l&&l.subTree===n&&(l.vnode.el=r,rK(l,r))}let r0=Symbol.for("v-fgt"),r1=Symbol.for("v-txt"),r2=Symbol.for("v-cmt"),r6=Symbol.for("v-stc"),r4=[],r8=null;function r3(e=!1){r4.push(r8=e?null:[])}function r5(){r4.pop(),r8=r4[r4.length-1]||null}let r9=1;function r7(e,t=!1){r9+=e,e<0&&r8&&t&&(r8.hasOnce=!0)}function ie(e){return e.dynamicChildren=r9>0?r8||m:null,r5(),r9>0&&r8&&r8.push(e),e}function it(e,t,n,l,r,i){return ie(iu(e,t,n,l,r,i,!0))}function il(e,t,n,l,r){return ie(ic(e,t,n,l,r,!0))}function ir(e){return!!e&&!0===e.__v_isVNode}function ii(e,t){return e.type===t.type&&e.key===t.key}function is(e){}let io=({key:e})=>null!=e?e:null,ia=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?P(e)||tw(e)||O(e)?{i:ni,r:e,k:t,f:!!n}:e:null);function iu(e,t=null,n=null,l=0,r=null,i=e===r0?0:1,s=!1,o=!1){let a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&io(t),ref:t&&ia(t),scopeId:ns,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:l,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ni};return o?(iy(a,n),128&i&&e.normalize(a)):n&&(a.shapeFlag|=P(n)?8:16),r9>0&&!s&&r8&&(a.patchFlag>0||6&i)&&32!==a.patchFlag&&r8.push(a),a}let ic=function(e,t=null,n=null,l=0,r=null,i=!1){var s;if(e&&e!==lC||(e=r2),ir(e)){let l=id(e,t,!0);return n&&iy(l,n),r9>0&&!i&&r8&&(6&l.shapeFlag?r8[r8.indexOf(e)]=l:r8.push(l)),l.patchFlag=-2,l}if(O(s=e)&&"__vccOpts"in s&&(e=e.__vccOpts),t){let{class:e,style:n}=t=ip(t);e&&!P(e)&&(t.class=es(e)),I(n)&&(tb(n)&&!k(n)&&(n=C({},n)),t.style=en(n))}let o=P(e)?1:rz(e)?128:ng(e)?64:I(e)?4:O(e)?2:0;return iu(e,t,n,l,r,o,i,!0)};function ip(e){return e?tb(e)||rs(e)?C({},e):e:null}function id(e,t,n=!1,l=!1){let{props:r,ref:i,patchFlag:s,children:o,transition:a}=e,u=t?ib(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&io(u),ref:t&&t.ref?n&&i?k(i)?i.concat(ia(t)):[i,ia(t)]:ia(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==r0?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&id(e.ssContent),ssFallback:e.ssFallback&&id(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&l&&nV(c,a.clone(c)),c}function ih(e=" ",t=0){return ic(r1,null,e,t)}function ig(e,t){let n=ic(r6,null,e);return n.staticCount=t,n}function iv(e="",t=!1){return t?(r3(),il(r2,null,e)):ic(r2,null,e)}function im(e){return null==e||"boolean"==typeof e?ic(r2):k(e)?ic(r0,null,e.slice()):ir(e)?i_(e):ic(r1,null,String(e))}function i_(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:id(e)}function iy(e,t){let n=0,{shapeFlag:l}=e;if(null==t)t=null;else if(k(t))n=16;else if("object"==typeof t){if(65&l){let n=t.default;n&&(n._c&&(n._d=!1),iy(e,n()),n._c&&(n._d=!0));return}{n=32;let l=t._;l||rs(t)?3===l&&ni&&(1===ni.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=ni}}else O(t)?(t={default:t,_ctx:ni},n=32):(t=String(t),64&l?(n=16,t=[ih(t)]):n=8);e.children=t,e.shapeFlag|=n}function ib(...e){let t={};for(let n=0;n<e.length;n++){let l=e[n];for(let e in l)if("class"===e)t.class!==l.class&&(t.class=es([t.class,l.class]));else if("style"===e)t.style=en([t.style,l.style]);else if(b(e)){let n=t[e],r=l[e];r&&n!==r&&!(k(n)&&n.includes(r))&&(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=l[e])}return t}function iS(e,t,n,l=null){tQ(e,t,7,[n,l])}let iC=l9(),ix=0;function iE(e,t,n){let l=e.type,r=(t?t.appContext:e.appContext)||iC,i={uid:ix++,vnode:e,type:l,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new eg(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:function e(t,n,l=!1){let r=l?ru:n.propsCache,i=r.get(t);if(i)return i;let s=t.props,o={},a=[],u=!1;if(!O(t)){let r=t=>{u=!0;let[l,r]=e(t,n,!0);C(o,l),r&&a.push(...r)};!l&&n.mixins.length&&n.mixins.forEach(r),t.extends&&r(t.extends),t.mixins&&t.mixins.forEach(r)}if(!s&&!u)return I(t)&&r.set(t,m),m;if(k(s))for(let e=0;e<s.length;e++){let t=W(s[e]);rc(t)&&(o[t]=g)}else if(s)for(let e in s){let t=W(e);if(rc(t)){let n=s[e],l=o[t]=k(n)||O(n)?{type:n}:C({},n),r=l.type,i=!1,u=!0;if(k(r))for(let e=0;e<r.length;++e){let t=r[e],n=O(t)&&t.name;if("Boolean"===n){i=!0;break}"String"===n&&(u=!1)}else i=O(r)&&"Boolean"===r.name;l[0]=i,l[1]=u,(i||w(l,"default"))&&a.push(t)}}let c=[o,a];return I(t)&&r.set(t,c),c}(l,r),emitsOptions:function e(t,n,l=!1){let r=n.emitsCache,i=r.get(t);if(void 0!==i)return i;let s=t.emits,o={},a=!1;if(!O(t)){let r=t=>{let l=e(t,n,!0);l&&(a=!0,C(o,l))};!l&&n.mixins.length&&n.mixins.forEach(r),t.extends&&r(t.extends),t.mixins&&t.mixins.forEach(r)}return s||a?(k(s)?s.forEach(e=>o[e]=null):C(o,s),I(t)&&r.set(t,o),o):(I(t)&&r.set(t,null),null)}(l,r),emit:null,emitted:null,propsDefaults:g,inheritAttrs:l.inheritAttrs,ctx:g,data:g,props:g,attrs:g,slots:g,refs:g,setupState:g,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=rU.bind(null,i),e.ce&&e.ce(i),i}let iw=null,ik=()=>iw||ni;{let e=ee(),t=(t,n)=>{let l;return(l=e[t])||(l=e[t]=[]),l.push(n),e=>{l.length>1?l.forEach(t=>t(e)):l[0](e)}};o=t("__VUE_INSTANCE_SETTERS__",e=>iw=e),a=t("__VUE_SSR_SETTERS__",e=>iN=e)}let iT=e=>{let t=iw;return o(e),e.scope.on(),()=>{e.scope.off(),o(t)}},iA=()=>{iw&&iw.scope.off(),o(null)};function iR(e){return 4&e.vnode.shapeFlag}let iN=!1;function iO(e,t=!1,n=!1){t&&a(t);let{props:l,children:r}=e.vnode,i=iR(e);!function(e,t,n,l=!1){let r={},i=ri();for(let n in e.propsDefaults=Object.create(null),ro(e,t,r,i),e.propsOptions[0])n in r||(r[n]=void 0);n?e.props=l?r:td(r):e.type.props?e.props=r:e.props=i,e.attrs=i}(e,l,i,t),rm(e,r,n);let s=i?function(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,lL);let{setup:l}=n;if(l){eM();let n=e.setupContext=l.length>1?iF(e):null,r=iT(e),i=tY(l,e,0,[e.props,n]),s=L(i);if(eI(),r(),(s||e.sp)&&!n5(e)&&n$(e),s){if(i.then(iA,iA),t)return i.then(n=>{iP(e,n,t)}).catch(t=>{t0(t,e,0)});e.asyncDep=i}else iP(e,i,t)}else iL(e,t)}(e,t):void 0;return t&&a(!1),s}function iP(e,t,n){O(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:I(t)&&(e.setupState=tI(t)),iL(e,n)}function iM(e){u=e,c=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,lD))}}let iI=()=>!u;function iL(e,t,n){let l=e.type;if(!e.render){if(!t&&u&&!l.render){let t=l.template||l0(e).template;if(t){let{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:i,compilerOptions:s}=l,o=C(C({isCustomElement:n,delimiters:i},r),s);l.render=u(t,o)}}e.render=l.render||_,c&&c(e)}{let t=iT(e);eM();try{!function(e){let t=l0(e),n=e.proxy,l=e.ctx;lY=!1,t.beforeCreate&&lQ(t.beforeCreate,e,"bc");let{data:r,computed:i,methods:s,watch:o,provide:a,inject:u,created:c,beforeMount:f,mounted:p,beforeUpdate:d,updated:h,activated:g,deactivated:m,beforeDestroy:y,beforeUnmount:b,destroyed:S,unmounted:C,render:x,renderTracked:E,renderTriggered:w,errorCaptured:T,serverPrefetch:A,expose:R,inheritAttrs:N,components:M,directives:L,filters:D}=t;if(u&&function(e,t,n=_){for(let n in k(e)&&(e=l4(e)),e){let l;let r=e[n];tw(l=I(r)?"default"in r?rn(r.from||n,r.default,!0):rn(r.from||n):rn(r))?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e}):t[n]=l}}(u,l,null),s)for(let e in s){let t=s[e];O(t)&&(l[e]=t.bind(n))}if(r){let t=r.call(n,n);I(t)&&(e.data=tp(t))}if(lY=!0,i)for(let e in i){let t=i[e],r=O(t)?t.bind(n,n):O(t.get)?t.get.bind(n,n):_,s=ij({get:r,set:!O(t)&&O(t.set)?t.set.bind(n):_});Object.defineProperty(l,e,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e})}if(o)for(let e in o)!function e(t,n,l,r){let i=r.includes(".")?rD(l,r):()=>l[r];if(P(t)){let e=n[t];O(e)&&rM(i,e)}else if(O(t))rM(i,t.bind(l));else if(I(t)){if(k(t))t.forEach(t=>e(t,n,l,r));else{let e=O(t.handler)?t.handler.bind(l):n[t.handler];O(e)&&rM(i,e,t)}}}(o[e],l,n,e);if(a){let e=O(a)?a.call(n):a;Reflect.ownKeys(e).forEach(t=>{rt(t,e[t])})}function F(e,t){k(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(c&&lQ(c,e,"c"),F(lc,f),F(lf,p),F(lp,d),F(ld,h),F(ll,g),F(lr,m),F(ly,T),F(l_,E),F(lm,w),F(lh,b),F(lg,C),F(lv,A),k(R)){if(R.length){let t=e.exposed||(e.exposed={});R.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})})}else e.exposed||(e.exposed={})}x&&e.render===_&&(e.render=x),null!=N&&(e.inheritAttrs=N),M&&(e.components=M),L&&(e.directives=L),A&&n$(e)}(e)}finally{eI(),t()}}}let iD={get:(e,t)=>(eH(e,"get",""),e[t])};function iF(e){return{attrs:new Proxy(e.attrs,iD),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function iV(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tI(tC(e.exposed)),{get:(t,n)=>n in t?t[n]:n in lM?lM[n](e):void 0,has:(e,t)=>t in e||t in lM})):e.proxy}function iU(e,t=!0){return O(e)?e.displayName||e.name:e.name||t&&e.__name}let ij=(e,t)=>(function(e,t,n=!1){let l,r;return O(e)?l=e:(l=e.get,r=e.set),new t$(l,r,n)})(e,0,iN);function iB(e,t,n){let l=arguments.length;return 2!==l?(l>3?n=Array.prototype.slice.call(arguments,2):3===l&&ir(n)&&(n=[n]),ic(e,t,n)):!I(t)||k(t)?ic(e,null,t):ir(t)?ic(e,null,[t]):ic(e,t)}function i$(){}function iH(e,t,n,l){let r=n[l];if(r&&iW(r,e))return r;let i=t();return i.memo=e.slice(),i.cacheIndex=l,n[l]=i}function iW(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e<n.length;e++)if(J(n[e],t[e]))return!1;return r9>0&&r8&&r8.push(e),!0}let iK="3.5.13",iz=_,iq=null,iG=void 0,iJ=_,iX={createComponentInstance:iE,setupComponent:iO,renderComponentRoot:rB,setCurrentRenderingInstance:no,isVNode:ir,normalizeVNode:im,getComponentPublicInstance:iV,ensureValidVNode:lN,pushWarningContext:function(e){},popWarningContext:function(){}},iZ=null,iY=null,iQ=null,i0="undefined"!=typeof window&&window.trustedTypes;if(i0)try{d=i0.createPolicy("vue",{createHTML:e=>e})}catch(e){}let i1=d?e=>d.createHTML(e):e=>e,i2="undefined"!=typeof document?document:null,i6=i2&&i2.createElement("template"),i4="transition",i8="animation",i3=Symbol("_vtc"),i5={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},i9=C({},nN,i5),i7=((e=(e,{slots:t})=>iB(nM,sn(e),t)).displayName="Transition",e.props=i9,e),se=(e,t=[])=>{k(e)?e.forEach(e=>e(...t)):e&&e(...t)},st=e=>!!e&&(k(e)?e.some(e=>e.length>1):e.length>1);function sn(e){let t={};for(let n in e)n in i5||(t[n]=e[n]);if(!1===e.css)return t;let{name:n="v",type:l,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:o=`${n}-enter-to`,appearFromClass:a=i,appearActiveClass:u=s,appearToClass:c=o,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(I(e))return[Q(e.enter),Q(e.leave)];{let t=Q(e);return[t,t]}}(r),g=h&&h[0],m=h&&h[1],{onBeforeEnter:_,onEnter:y,onEnterCancelled:b,onLeave:S,onLeaveCancelled:x,onBeforeAppear:E=_,onAppear:w=y,onAppearCancelled:k=b}=t,T=(e,t,n,l)=>{e._enterCancelled=l,sr(e,t?c:o),sr(e,t?u:s),n&&n()},A=(e,t)=>{e._isLeaving=!1,sr(e,f),sr(e,d),sr(e,p),t&&t()},R=e=>(t,n)=>{let r=e?w:y,s=()=>T(t,e,n);se(r,[t,s]),si(()=>{sr(t,e?a:i),sl(t,e?c:o),st(r)||so(t,l,g,s)})};return C(t,{onBeforeEnter(e){se(_,[e]),sl(e,i),sl(e,s)},onBeforeAppear(e){se(E,[e]),sl(e,a),sl(e,u)},onEnter:R(!1),onAppear:R(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>A(e,t);sl(e,f),e._enterCancelled?(sl(e,p),sf()):(sf(),sl(e,p)),si(()=>{e._isLeaving&&(sr(e,f),sl(e,d),st(S)||so(e,l,m,n))}),se(S,[e,n])},onEnterCancelled(e){T(e,!1,void 0,!0),se(b,[e])},onAppearCancelled(e){T(e,!0,void 0,!0),se(k,[e])},onLeaveCancelled(e){A(e),se(x,[e])}})}function sl(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[i3]||(e[i3]=new Set)).add(t)}function sr(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[i3];n&&(n.delete(t),n.size||(e[i3]=void 0))}function si(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ss=0;function so(e,t,n,l){let r=e._endId=++ss,i=()=>{r===e._endId&&l()};if(null!=n)return setTimeout(i,n);let{type:s,timeout:o,propCount:a}=sa(e,t);if(!s)return l();let u=s+"end",c=0,f=()=>{e.removeEventListener(u,p),i()},p=t=>{t.target===e&&++c>=a&&f()};setTimeout(()=>{c<a&&f()},o+1),e.addEventListener(u,p)}function sa(e,t){let n=window.getComputedStyle(e),l=e=>(n[e]||"").split(", "),r=l(`${i4}Delay`),i=l(`${i4}Duration`),s=su(r,i),o=l(`${i8}Delay`),a=l(`${i8}Duration`),u=su(o,a),c=null,f=0,p=0;t===i4?s>0&&(c=i4,f=s,p=i.length):t===i8?u>0&&(c=i8,f=u,p=a.length):p=(c=(f=Math.max(s,u))>0?s>u?i4:i8:null)?c===i4?i.length:a.length:0;let d=c===i4&&/\b(transform|all)(,|$)/.test(l(`${i4}Property`).toString());return{type:c,timeout:f,propCount:p,hasTransform:d}}function su(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>sc(t)+sc(e[n])))}function sc(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function sf(){return document.body.offsetHeight}let sp=Symbol("_vod"),sd=Symbol("_vsh"),sh={beforeMount(e,{value:t},{transition:n}){e[sp]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):sg(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:l}){!t!=!n&&(l?t?(l.beforeEnter(e),sg(e,!0),l.enter(e)):l.leave(e,()=>{sg(e,!1)}):sg(e,t))},beforeUnmount(e,{value:t}){sg(e,t)}};function sg(e,t){e.style.display=t?e[sp]:"none",e[sd]=!t}let sv=Symbol("");function sm(e){let t=ik();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>s_(e,n))},l=()=>{let l=e(t.proxy);t.ce?s_(t.ce,l):function e(t,n){if(128&t.shapeFlag){let l=t.suspense;t=l.activeBranch,l.pendingBranch&&!l.isHydrating&&l.effects.push(()=>{e(l.activeBranch,n)})}for(;t.component;)t=t.component.subTree;if(1&t.shapeFlag&&t.el)s_(t.el,n);else if(t.type===r0)t.children.forEach(t=>e(t,n));else if(t.type===r6){let{el:e,anchor:l}=t;for(;e&&(s_(e,n),e!==l);)e=e.nextSibling}}(t.subTree,l),n(l)};lp(()=>{nt(l)}),lf(()=>{rM(l,_,{flush:"post"});let e=new MutationObserver(l);e.observe(t.subTree.el.parentNode,{childList:!0}),lg(()=>e.disconnect())})}function s_(e,t){if(1===e.nodeType){let n=e.style,l="";for(let e in t)n.setProperty(`--${e}`,t[e]),l+=`--${e}: ${t[e]};`;n[sv]=l}}let sy=/(^|;)\s*display\s*:/,sb=/\s*!important$/;function sS(e,t,n){if(k(n))n.forEach(n=>sS(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{let l=function(e,t){let n=sx[t];if(n)return n;let l=W(t);if("filter"!==l&&l in e)return sx[t]=l;l=q(l);for(let n=0;n<sC.length;n++){let r=sC[n]+l;if(r in e)return sx[t]=r}return t}(e,t);sb.test(n)?e.setProperty(z(l),n.replace(sb,""),"important"):e[l]=n}}let sC=["Webkit","Moz","ms"],sx={},sE="http://www.w3.org/1999/xlink";function sw(e,t,n,l,r,i=ea(t)){l&&t.startsWith("xlink:")?null==n?e.removeAttributeNS(sE,t.slice(6,t.length)):e.setAttributeNS(sE,t,n):null==n||i&&!(n||""===n)?e.removeAttribute(t):e.setAttribute(t,i?"":M(n)?String(n):n)}function sk(e,t,n,l,r){if("innerHTML"===t||"textContent"===t){null!=n&&(e[t]="innerHTML"===t?i1(n):n);return}let i=e.tagName;if("value"===t&&"PROGRESS"!==i&&!i.includes("-")){let l="OPTION"===i?e.getAttribute("value")||"":e.value,r=null==n?"checkbox"===e.type?"on":"":String(n);l===r&&"_value"in e||(e.value=r),null==n&&e.removeAttribute(t),e._value=n;return}let s=!1;if(""===n||null==n){let l=typeof e[t];if("boolean"===l){var o;n=!!(o=n)||""===o}else null==n&&"string"===l?(n="",s=!0):"number"===l&&(n=0,s=!0)}try{e[t]=n}catch(e){}s&&e.removeAttribute(r||t)}function sT(e,t,n,l){e.addEventListener(t,n,l)}let sA=Symbol("_vei"),sR=/(?:Once|Passive|Capture)$/,sN=0,sO=Promise.resolve(),sP=()=>sN||(sO.then(()=>sN=0),sN=Date.now()),sM=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&123>e.charCodeAt(2),sI={};function sL(e,t,n){let l=nj(e,t);U(l)&&C(l,t);class r extends sV{constructor(e){super(l,e,n)}}return r.def=l,r}let sD=(e,t)=>sL(e,t,op),sF="undefined"!=typeof HTMLElement?HTMLElement:class{};class sV extends sF{constructor(e,t={},n=of){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==of?this._root=this.shadowRoot:!1!==e.shadowRoot?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof sV){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,t9(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e<this.attributes.length;e++)this._setAttr(this.attributes[e].name);this._ob=new MutationObserver(e=>{for(let t of e)this._setAttr(t.attributeName)}),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{let n;this._resolved=!0,this._pendingResolve=void 0;let{props:l,styles:r}=e;if(l&&!k(l))for(let e in l){let t=l[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=Q(this._props[e])),(n||(n=Object.create(null)))[W(e)]=!0)}this._numberProps=n,t&&this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then(t=>e(this._def=t,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)w(this,e)||Object.defineProperty(this,e,{get:()=>tO(t[e])})}_resolveProps(e){let{props:t}=e,n=k(t)?t:Object.keys(t||{});for(let e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(W))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):sI,l=W(e);t&&this._numberProps&&this._numberProps[l]&&(n=Q(n)),this._setProp(l,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,l=!1){if(t!==this._props[e]&&(t===sI?delete this._props[e]:(this._props[e]=t,"key"===e&&this._app&&(this._app._ceVNode.key=t)),l&&this._instance&&this._update(),n)){let n=this._ob;n&&n.disconnect(),!0===t?this.setAttribute(z(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(z(e),t+""):t||this.removeAttribute(z(e)),n&&n.observe(this,{attributes:!0})}}_update(){ou(this._createVNode(),this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=ic(this._def,C(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,U(t[0])?C({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),z(e)!==e&&t(z(e),n)},this._setParent()}),t}_applyStyles(e,t){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let n=this._nonce;for(let t=e.length-1;t>=0;t--){let l=document.createElement("style");n&&l.setAttribute("nonce",n),l.textContent=e[t],this.shadowRoot.prepend(l)}}_parseSlots(){let e;let t=this._slots={};for(;e=this.firstChild;){let n=1===e.nodeType&&e.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(e),this.removeChild(e)}}_renderSlots(){let e=(this._teleportTarget||this).querySelectorAll("slot"),t=this._instance.type.__scopeId;for(let n=0;n<e.length;n++){let l=e[n],r=l.getAttribute("name")||"default",i=this._slots[r],s=l.parentNode;if(i)for(let e of i){if(t&&1===e.nodeType){let n;let l=t+"-s",r=document.createTreeWalker(e,1);for(e.setAttribute(l,"");n=r.nextNode();)n.setAttribute(l,"")}s.insertBefore(e,l)}else for(;l.firstChild;)s.insertBefore(l.firstChild,l);s.removeChild(l)}}_injectChildStyle(e){this._applyStyles(e.styles,e)}_removeChildStyle(e){}}function sU(e){let t=ik();return t&&t.ce||null}function sj(){let e=sU();return e&&e.shadowRoot}function sB(e="$style"){{let t=ik();if(!t)return g;let n=t.type.__cssModules;return n&&n[e]||g}}let s$=new WeakMap,sH=new WeakMap,sW=Symbol("_moveCb"),sK=Symbol("_enterCb"),sz=(t={name:"TransitionGroup",props:C({},i9,{tag:String,moveClass:String}),setup(e,{slots:t}){let n,l;let r=ik(),i=nA();return ld(()=>{if(!n.length)return;let t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){let l=e.cloneNode(),r=e[i3];r&&r.forEach(e=>{e.split(/\s+/).forEach(e=>e&&l.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&l.classList.add(e)),l.style.display="none";let i=1===t.nodeType?t:t.parentNode;i.appendChild(l);let{hasTransform:s}=sa(l);return i.removeChild(l),s}(n[0].el,r.vnode.el,t))return;n.forEach(sq),n.forEach(sG);let l=n.filter(sJ);sf(),l.forEach(e=>{let n=e.el,l=n.style;sl(n,t),l.transform=l.webkitTransform=l.transitionDuration="";let r=n[sW]=e=>{(!e||e.target===n)&&(!e||/transform$/.test(e.propertyName))&&(n.removeEventListener("transitionend",r),n[sW]=null,sr(n,t))};n.addEventListener("transitionend",r)})}),()=>{let s=tS(e),o=sn(s),a=s.tag||r0;if(n=[],l)for(let e=0;e<l.length;e++){let t=l[e];t.el&&t.el instanceof Element&&(n.push(t),nV(t,nL(t,o,i,r)),s$.set(t,t.el.getBoundingClientRect()))}l=t.default?nU(t.default()):[];for(let e=0;e<l.length;e++){let t=l[e];null!=t.key&&nV(t,nL(t,o,i,r))}return ic(a,null,l)}}},delete t.props.mode,t);function sq(e){let t=e.el;t[sW]&&t[sW](),t[sK]&&t[sK]()}function sG(e){sH.set(e,e.el.getBoundingClientRect())}function sJ(e){let t=s$.get(e),n=sH.get(e),l=t.left-n.left,r=t.top-n.top;if(l||r){let t=e.el.style;return t.transform=t.webkitTransform=`translate(${l}px,${r}px)`,t.transitionDuration="0s",e}}let sX=e=>{let t=e.props["onUpdate:modelValue"]||!1;return k(t)?e=>X(t,e):t};function sZ(e){e.target.composing=!0}function sY(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}let sQ=Symbol("_assign"),s0={created(e,{modifiers:{lazy:t,trim:n,number:l}},r){e[sQ]=sX(r);let i=l||r.props&&"number"===r.props.type;sT(e,t?"change":"input",t=>{if(t.target.composing)return;let l=e.value;n&&(l=l.trim()),i&&(l=Y(l)),e[sQ](l)}),n&&sT(e,"change",()=>{e.value=e.value.trim()}),t||(sT(e,"compositionstart",sZ),sT(e,"compositionend",sY),sT(e,"change",sY))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:l,trim:r,number:i}},s){if(e[sQ]=sX(s),e.composing)return;let o=(i||"number"===e.type)&&!/^0\d/.test(e.value)?Y(e.value):e.value,a=null==t?"":t;o===a||document.activeElement===e&&"range"!==e.type&&(l&&t===n||r&&e.value.trim()===a)||(e.value=a)}},s1={deep:!0,created(e,t,n){e[sQ]=sX(n),sT(e,"change",()=>{let t=e._modelValue,n=s3(e),l=e.checked,r=e[sQ];if(k(t)){let e=ec(t,n),i=-1!==e;if(l&&!i)r(t.concat(n));else if(!l&&i){let n=[...t];n.splice(e,1),r(n)}}else if(A(t)){let e=new Set(t);l?e.add(n):e.delete(n),r(e)}else r(s5(e,l))})},mounted:s2,beforeUpdate(e,t,n){e[sQ]=sX(n),s2(e,t,n)}};function s2(e,{value:t,oldValue:n},l){let r;if(e._modelValue=t,k(t))r=ec(t,l.props.value)>-1;else if(A(t))r=t.has(l.props.value);else{if(t===n)return;r=eu(t,s5(e,!0))}e.checked!==r&&(e.checked=r)}let s6={created(e,{value:t},n){e.checked=eu(t,n.props.value),e[sQ]=sX(n),sT(e,"change",()=>{e[sQ](s3(e))})},beforeUpdate(e,{value:t,oldValue:n},l){e[sQ]=sX(l),t!==n&&(e.checked=eu(t,l.props.value))}},s4={deep:!0,created(e,{value:t,modifiers:{number:n}},l){let r=A(t);sT(e,"change",()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?Y(s3(e)):s3(e));e[sQ](e.multiple?r?new Set(t):t:t[0]),e._assigning=!0,t9(()=>{e._assigning=!1})}),e[sQ]=sX(l)},mounted(e,{value:t}){s8(e,t)},beforeUpdate(e,t,n){e[sQ]=sX(n)},updated(e,{value:t}){e._assigning||s8(e,t)}};function s8(e,t){let n=e.multiple,l=k(t);if(!n||l||A(t)){for(let r=0,i=e.options.length;r<i;r++){let i=e.options[r],s=s3(i);if(n){if(l){let e=typeof s;"string"===e||"number"===e?i.selected=t.some(e=>String(e)===String(s)):i.selected=ec(t,s)>-1}else i.selected=t.has(s)}else if(eu(s3(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function s3(e){return"_value"in e?e._value:e.value}function s5(e,t){let n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}let s9={created(e,t,n){oe(e,t,n,null,"created")},mounted(e,t,n){oe(e,t,n,null,"mounted")},beforeUpdate(e,t,n,l){oe(e,t,n,l,"beforeUpdate")},updated(e,t,n,l){oe(e,t,n,l,"updated")}};function s7(e,t){switch(e){case"SELECT":return s4;case"TEXTAREA":return s0;default:switch(t){case"checkbox":return s1;case"radio":return s6;default:return s0}}}function oe(e,t,n,l,r){let i=s7(e.tagName,n.props&&n.props.type)[r];i&&i(e,t,n,l)}let ot=["ctrl","shift","alt","meta"],on={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>ot.some(n=>e[`${n}Key`]&&!t.includes(n))},ol=(e,t)=>{let n=e._withMods||(e._withMods={}),l=t.join(".");return n[l]||(n[l]=(n,...l)=>{for(let e=0;e<t.length;e++){let l=on[t[e]];if(l&&l(n,t))return}return e(n,...l)})},or={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},oi=(e,t)=>{let n=e._withKeys||(e._withKeys={}),l=t.join(".");return n[l]||(n[l]=n=>{if(!("key"in n))return;let l=z(n.key);if(t.some(e=>e===l||or[e]===l))return e(n)})},os=C({patchProp:(e,t,n,l,r,i)=>{let s="svg"===r;"class"===t?function(e,t,n){let l=e[i3];l&&(t=(t?[t,...l]:[...l]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,l,s):"style"===t?function(e,t,n){let l=e.style,r=P(n),i=!1;if(n&&!r){if(t){if(P(t))for(let e of t.split(";")){let t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&sS(l,t,"")}else for(let e in t)null==n[e]&&sS(l,e,"")}for(let e in n)"display"===e&&(i=!0),sS(l,e,n[e])}else if(r){if(t!==n){let e=l[sv];e&&(n+=";"+e),l.cssText=n,i=sy.test(n)}}else t&&e.removeAttribute("style");sp in e&&(e[sp]=i?l.display:"",e[sd]&&(l.display="none"))}(e,n,l):b(t)?S(t)||function(e,t,n,l,r=null){let i=e[sA]||(e[sA]={}),s=i[t];if(l&&s)s.value=l;else{let[n,o]=function(e){let t;if(sR.test(e)){let n;for(t={};n=e.match(sR);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):z(e.slice(2)),t]}(t);l?sT(e,n,i[t]=function(e,t){let n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();tQ(function(e,t){if(!k(t))return t;{let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}}(e,n.value),t,5,[e])};return n.value=e,n.attached=sP(),n}(l,r),o):s&&(!function(e,t,n,l){e.removeEventListener(t,n,l)}(e,n,s,o),i[t]=void 0)}}(e,t,0,l,i):("."===t[0]?(t=t.slice(1),0):"^"===t[0]?(t=t.slice(1),1):!function(e,t,n,l){if(l)return!!("innerHTML"===t||"textContent"===t||t in e&&sM(t)&&O(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"form"===t||"list"===t&&"INPUT"===e.tagName||"type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){let t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return!(sM(t)&&P(n))&&t in e}(e,t,l,s))?e._isVueCE&&(/[A-Z]/.test(t)||!P(l))?sk(e,W(t),l,i,t):("true-value"===t?e._trueValue=l:"false-value"===t&&(e._falseValue=l),sw(e,t,l,s)):(sk(e,t,l),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||sw(e,t,l,s,i,"value"!==t))}},{insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,l)=>{let r="svg"===t?i2.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?i2.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?i2.createElement(e,{is:n}):i2.createElement(e);return"select"===e&&l&&null!=l.multiple&&r.setAttribute("multiple",l.multiple),r},createText:e=>i2.createTextNode(e),createComment:e=>i2.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>i2.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,l,r,i){let s=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==i&&(r=r.nextSibling););else{i6.innerHTML=i1("svg"===l?`<svg>${e}</svg>`:"mathml"===l?`<math>${e}</math>`:e);let r=i6.content;if("svg"===l||"mathml"===l){let e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}}),oo=!1;function oa(){return f=oo?f:rS(os),oo=!0,f}let ou=(...e)=>{(f||(f=rb(os))).render(...e)},oc=(...e)=>{oa().hydrate(...e)},of=(...e)=>{let t=(f||(f=rb(os))).createApp(...e),{mount:n}=t;return t.mount=e=>{let l=oh(e);if(!l)return;let r=t._component;O(r)||r.render||r.template||(r.template=l.innerHTML),1===l.nodeType&&(l.textContent="");let i=n(l,!1,od(l));return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),i},t},op=(...e)=>{let t=oa().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=oh(e);if(t)return n(t,!0,od(t))},t};function od(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function oh(e){return P(e)?document.querySelector(e):e}let og=!1,ov=()=>{og||(og=!0,s0.getSSRProps=({value:e})=>({value:e}),s6.getSSRProps=({value:e},t)=>{if(t.props&&eu(t.props.value,e))return{checked:!0}},s1.getSSRProps=({value:e},t)=>{if(k(e)){if(t.props&&ec(e,t.props.value)>-1)return{checked:!0}}else if(A(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},s9.getSSRProps=(e,t)=>{if("string"!=typeof t.type)return;let n=s7(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)},sh.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}})};export{nM as BaseTransition,nN as BaseTransitionPropsValidators,r2 as Comment,iQ as DeprecationTypes,eg as EffectScope,tZ as ErrorCodes,iq as ErrorTypeStrings,r0 as Fragment,lt as KeepAlive,eb as ReactiveEffect,r6 as Static,rG as Suspense,nx as Teleport,r1 as Text,tH as TrackOpTypes,i7 as Transition,sz as TransitionGroup,tW as TriggerOpTypes,sV as VueElement,tX as assertNumber,tQ as callWithAsyncErrorHandling,tY as callWithErrorHandling,W as camelize,q as capitalize,id as cloneVNode,iY as compatUtils,ij as computed,of as createApp,il as createBlock,iv as createCommentVNode,it as createElementBlock,iu as createElementVNode,rS as createHydrationRenderer,lX as createPropsRestProxy,rb as createRenderer,op as createSSRApp,lA as createSlots,ig as createStaticVNode,ih as createTextVNode,ic as createVNode,tD as customRef,n9 as defineAsyncComponent,nj as defineComponent,sL as defineCustomElement,lV as defineEmits,lU as defineExpose,l$ as defineModel,lj as defineOptions,lF as defineProps,sD as defineSSRCustomElement,lB as defineSlots,iG as devtools,eR as effect,ev as effectScope,ik as getCurrentInstance,em as getCurrentScope,tq as getCurrentWatcher,nU as getTransitionRawChildren,ip as guardReactiveProps,iB as h,t0 as handleError,rl as hasInjectionContext,oc as hydrate,n6 as hydrateOnIdle,n3 as hydrateOnInteraction,n8 as hydrateOnMediaQuery,n4 as hydrateOnVisible,i$ as initCustomFormatter,ov as initDirectivesForSSR,rn as inject,iW as isMemoSame,tb as isProxy,tm as isReactive,t_ as isReadonly,tw as isRef,iI as isRuntimeOnly,ty as isShallow,ir as isVNode,tC as markRaw,lG as mergeDefaults,lJ as mergeModels,ib as mergeProps,t9 as nextTick,es as normalizeClass,eo as normalizeProps,en as normalizeStyle,ll as onActivated,lc as onBeforeMount,lh as onBeforeUnmount,lp as onBeforeUpdate,lr as onDeactivated,ly as onErrorCaptured,lf as onMounted,l_ as onRenderTracked,lm as onRenderTriggered,e_ as onScopeDispose,lv as onServerPrefetch,lg as onUnmounted,ld as onUpdated,tG as onWatcherCleanup,r3 as openBlock,nu as popScopeId,rt as provide,tI as proxyRefs,na as pushScopeId,nt as queuePostFlushCb,tp as reactive,th as readonly,tk as ref,iM as registerRuntimeCompiler,ou as render,lT as renderList,lR as renderSlot,lS as resolveComponent,lE as resolveDirective,lx as resolveDynamicComponent,iZ as resolveFilter,nL as resolveTransitionHooks,r7 as setBlockTracking,iJ as setDevtoolsHook,nV as setTransitionHooks,td as shallowReactive,tg as shallowReadonly,tT as shallowRef,rA as ssrContextKey,iX as ssrUtils,eN as stop,ep as toDisplayString,G as toHandlerKey,lO as toHandlers,tS as toRaw,tj as toRef,tF as toRefs,tP as toValue,is as transformVNodeArgs,tN as triggerRef,tO as unref,lK as useAttrs,sB as useCssModule,sm as useCssVars,sU as useHost,nB as useId,rF as useModel,rR as useSSRContext,sj as useShadowRoot,lW as useSlots,nH as useTemplateRef,nA as useTransitionState,s1 as vModelCheckbox,s9 as vModelDynamic,s6 as vModelRadio,s4 as vModelSelect,s0 as vModelText,sh as vShow,iK as version,iz as warn,rM as watch,rN as watchEffect,rO as watchPostEffect,rP as watchSyncEffect,lZ as withAsyncContext,nf as withCtx,lH as withDefaults,np as withDirectives,oi as withKeys,iH as withMemo,ol as withModifiers,nc as withScopeId}; diff --git a/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js b/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js new file mode 100644 index 0000000..ffdd0b2 --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js @@ -0,0 +1,1860 @@ +/** +* @vue/runtime-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +import { warn, h, BaseTransition, assertNumber, BaseTransitionPropsValidators, getCurrentInstance, onBeforeUpdate, queuePostFlushCb, onMounted, watch, onUnmounted, Fragment, Static, camelize, callWithAsyncErrorHandling, defineComponent, nextTick, unref, createVNode, useTransitionState, onUpdated, toRaw, getTransitionRawChildren, setTransitionHooks, resolveTransitionHooks, Text, isRuntimeOnly, createRenderer, createHydrationRenderer } from '@vue/runtime-core'; +export * from '@vue/runtime-core'; +import { extend, isObject, toNumber, isArray, NOOP, isString, hyphenate, capitalize, includeBooleanAttr, isSymbol, isSpecialBooleanAttr, isFunction, isOn, isModelListener, camelize as camelize$1, isPlainObject, hasOwn, EMPTY_OBJ, looseToNumber, looseIndexOf, isSet, looseEqual, invokeArrayFns, isHTMLTag, isSVGTag, isMathMLTag } from '@vue/shared'; + +let policy = void 0; +const tt = typeof window !== "undefined" && window.trustedTypes; +if (tt) { + try { + policy = /* @__PURE__ */ tt.createPolicy("vue", { + createHTML: (val) => val + }); + } catch (e) { + !!(process.env.NODE_ENV !== "production") && warn(`Error creating trusted types policy: ${e}`); + } +} +const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val; +const svgNS = "http://www.w3.org/2000/svg"; +const mathmlNS = "http://www.w3.org/1998/Math/MathML"; +const doc = typeof document !== "undefined" ? document : null; +const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); +const nodeOps = { + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); + } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) break; + } + } else { + templateContainer.innerHTML = unsafeToTrustedHTML( + namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content + ); + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } +}; + +const TRANSITION = "transition"; +const ANIMATION = "animation"; +const vtcKey = Symbol("_vtc"); +const DOMTransitionPropsValidators = { + name: String, + type: String, + css: { + type: Boolean, + default: true + }, + duration: [String, Number, Object], + enterFromClass: String, + enterActiveClass: String, + enterToClass: String, + appearFromClass: String, + appearActiveClass: String, + appearToClass: String, + leaveFromClass: String, + leaveActiveClass: String, + leaveToClass: String +}; +const TransitionPropsValidators = /* @__PURE__ */ extend( + {}, + BaseTransitionPropsValidators, + DOMTransitionPropsValidators +); +const decorate$1 = (t) => { + t.displayName = "Transition"; + t.props = TransitionPropsValidators; + return t; +}; +const Transition = /* @__PURE__ */ decorate$1( + (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots) +); +const callHook = (hook, args = []) => { + if (isArray(hook)) { + hook.forEach((h2) => h2(...args)); + } else if (hook) { + hook(...args); + } +}; +const hasExplicitCallback = (hook) => { + return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; +}; +function resolveTransitionProps(rawProps) { + const baseProps = {}; + for (const key in rawProps) { + if (!(key in DOMTransitionPropsValidators)) { + baseProps[key] = rawProps[key]; + } + } + if (rawProps.css === false) { + return baseProps; + } + const { + name = "v", + type, + duration, + enterFromClass = `${name}-enter-from`, + enterActiveClass = `${name}-enter-active`, + enterToClass = `${name}-enter-to`, + appearFromClass = enterFromClass, + appearActiveClass = enterActiveClass, + appearToClass = enterToClass, + leaveFromClass = `${name}-leave-from`, + leaveActiveClass = `${name}-leave-active`, + leaveToClass = `${name}-leave-to` + } = rawProps; + const durations = normalizeDuration(duration); + const enterDuration = durations && durations[0]; + const leaveDuration = durations && durations[1]; + const { + onBeforeEnter, + onEnter, + onEnterCancelled, + onLeave, + onLeaveCancelled, + onBeforeAppear = onBeforeEnter, + onAppear = onEnter, + onAppearCancelled = onEnterCancelled + } = baseProps; + const finishEnter = (el, isAppear, done, isCancelled) => { + el._enterCancelled = isCancelled; + removeTransitionClass(el, isAppear ? appearToClass : enterToClass); + removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); + done && done(); + }; + const finishLeave = (el, done) => { + el._isLeaving = false; + removeTransitionClass(el, leaveFromClass); + removeTransitionClass(el, leaveToClass); + removeTransitionClass(el, leaveActiveClass); + done && done(); + }; + const makeEnterHook = (isAppear) => { + return (el, done) => { + const hook = isAppear ? onAppear : onEnter; + const resolve = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve]); + nextFrame(() => { + removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); + addTransitionClass(el, isAppear ? appearToClass : enterToClass); + if (!hasExplicitCallback(hook)) { + whenTransitionEnds(el, type, enterDuration, resolve); + } + }); + }; + }; + return extend(baseProps, { + onBeforeEnter(el) { + callHook(onBeforeEnter, [el]); + addTransitionClass(el, enterFromClass); + addTransitionClass(el, enterActiveClass); + }, + onBeforeAppear(el) { + callHook(onBeforeAppear, [el]); + addTransitionClass(el, appearFromClass); + addTransitionClass(el, appearActiveClass); + }, + onEnter: makeEnterHook(false), + onAppear: makeEnterHook(true), + onLeave(el, done) { + el._isLeaving = true; + const resolve = () => finishLeave(el, done); + addTransitionClass(el, leaveFromClass); + if (!el._enterCancelled) { + forceReflow(); + addTransitionClass(el, leaveActiveClass); + } else { + addTransitionClass(el, leaveActiveClass); + forceReflow(); + } + nextFrame(() => { + if (!el._isLeaving) { + return; + } + removeTransitionClass(el, leaveFromClass); + addTransitionClass(el, leaveToClass); + if (!hasExplicitCallback(onLeave)) { + whenTransitionEnds(el, type, leaveDuration, resolve); + } + }); + callHook(onLeave, [el, resolve]); + }, + onEnterCancelled(el) { + finishEnter(el, false, void 0, true); + callHook(onEnterCancelled, [el]); + }, + onAppearCancelled(el) { + finishEnter(el, true, void 0, true); + callHook(onAppearCancelled, [el]); + }, + onLeaveCancelled(el) { + finishLeave(el); + callHook(onLeaveCancelled, [el]); + } + }); +} +function normalizeDuration(duration) { + if (duration == null) { + return null; + } else if (isObject(duration)) { + return [NumberOf(duration.enter), NumberOf(duration.leave)]; + } else { + const n = NumberOf(duration); + return [n, n]; + } +} +function NumberOf(val) { + const res = toNumber(val); + if (!!(process.env.NODE_ENV !== "production")) { + assertNumber(res, "<transition> explicit duration"); + } + return res; +} +function addTransitionClass(el, cls) { + cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); + (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); +} +function removeTransitionClass(el, cls) { + cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.delete(cls); + if (!_vtc.size) { + el[vtcKey] = void 0; + } + } +} +function nextFrame(cb) { + requestAnimationFrame(() => { + requestAnimationFrame(cb); + }); +} +let endId = 0; +function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { + const id = el._endId = ++endId; + const resolveIfNotStale = () => { + if (id === el._endId) { + resolve(); + } + }; + if (explicitTimeout != null) { + return setTimeout(resolveIfNotStale, explicitTimeout); + } + const { type, timeout, propCount } = getTransitionInfo(el, expectedType); + if (!type) { + return resolve(); + } + const endEvent = type + "end"; + let ended = 0; + const end = () => { + el.removeEventListener(endEvent, onEnd); + resolveIfNotStale(); + }; + const onEnd = (e) => { + if (e.target === el && ++ended >= propCount) { + end(); + } + }; + setTimeout(() => { + if (ended < propCount) { + end(); + } + }, timeout + 1); + el.addEventListener(endEvent, onEnd); +} +function getTransitionInfo(el, expectedType) { + const styles = window.getComputedStyle(el); + const getStyleProperties = (key) => (styles[key] || "").split(", "); + const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); + const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); + const transitionTimeout = getTimeout(transitionDelays, transitionDurations); + const animationDelays = getStyleProperties(`${ANIMATION}Delay`); + const animationDurations = getStyleProperties(`${ANIMATION}Duration`); + const animationTimeout = getTimeout(animationDelays, animationDurations); + let type = null; + let timeout = 0; + let propCount = 0; + if (expectedType === TRANSITION) { + if (transitionTimeout > 0) { + type = TRANSITION; + timeout = transitionTimeout; + propCount = transitionDurations.length; + } + } else if (expectedType === ANIMATION) { + if (animationTimeout > 0) { + type = ANIMATION; + timeout = animationTimeout; + propCount = animationDurations.length; + } + } else { + timeout = Math.max(transitionTimeout, animationTimeout); + type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; + propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; + } + const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( + getStyleProperties(`${TRANSITION}Property`).toString() + ); + return { + type, + timeout, + propCount, + hasTransform + }; +} +function getTimeout(delays, durations) { + while (delays.length < durations.length) { + delays = delays.concat(delays); + } + return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); +} +function toMs(s) { + if (s === "auto") return 0; + return Number(s.slice(0, -1).replace(",", ".")) * 1e3; +} +function forceReflow() { + return document.body.offsetHeight; +} + +function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } +} + +const vShowOriginalDisplay = Symbol("_vod"); +const vShowHidden = Symbol("_vsh"); +const vShow = { + beforeMount(el, { value }, { transition }) { + el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display; + if (transition && value) { + transition.beforeEnter(el); + } else { + setDisplay(el, value); + } + }, + mounted(el, { value }, { transition }) { + if (transition && value) { + transition.enter(el); + } + }, + updated(el, { value, oldValue }, { transition }) { + if (!value === !oldValue) return; + if (transition) { + if (value) { + transition.beforeEnter(el); + setDisplay(el, true); + transition.enter(el); + } else { + transition.leave(el, () => { + setDisplay(el, false); + }); + } + } else { + setDisplay(el, value); + } + }, + beforeUnmount(el, { value }) { + setDisplay(el, value); + } +}; +if (!!(process.env.NODE_ENV !== "production")) { + vShow.name = "show"; +} +function setDisplay(el, value) { + el.style.display = value ? el[vShowOriginalDisplay] : "none"; + el[vShowHidden] = !value; +} +function initVShowForSSR() { + vShow.getSSRProps = ({ value }) => { + if (!value) { + return { style: { display: "none" } }; + } + }; +} + +const CSS_VAR_TEXT = Symbol(!!(process.env.NODE_ENV !== "production") ? "CSS_VAR_TEXT" : ""); +function useCssVars(getter) { + const instance = getCurrentInstance(); + if (!instance) { + !!(process.env.NODE_ENV !== "production") && warn(`useCssVars is called without current active component instance.`); + return; + } + const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { + Array.from( + document.querySelectorAll(`[data-v-owner="${instance.uid}"]`) + ).forEach((node) => setVarsOnNode(node, vars)); + }; + if (!!(process.env.NODE_ENV !== "production")) { + instance.getCssVars = () => getter(instance.proxy); + } + const setVars = () => { + const vars = getter(instance.proxy); + if (instance.ce) { + setVarsOnNode(instance.ce, vars); + } else { + setVarsOnVNode(instance.subTree, vars); + } + updateTeleports(vars); + }; + onBeforeUpdate(() => { + queuePostFlushCb(setVars); + }); + onMounted(() => { + watch(setVars, NOOP, { flush: "post" }); + const ob = new MutationObserver(setVars); + ob.observe(instance.subTree.el.parentNode, { childList: true }); + onUnmounted(() => ob.disconnect()); + }); +} +function setVarsOnVNode(vnode, vars) { + if (vnode.shapeFlag & 128) { + const suspense = vnode.suspense; + vnode = suspense.activeBranch; + if (suspense.pendingBranch && !suspense.isHydrating) { + suspense.effects.push(() => { + setVarsOnVNode(suspense.activeBranch, vars); + }); + } + } + while (vnode.component) { + vnode = vnode.component.subTree; + } + if (vnode.shapeFlag & 1 && vnode.el) { + setVarsOnNode(vnode.el, vars); + } else if (vnode.type === Fragment) { + vnode.children.forEach((c) => setVarsOnVNode(c, vars)); + } else if (vnode.type === Static) { + let { el, anchor } = vnode; + while (el) { + setVarsOnNode(el, vars); + if (el === anchor) break; + el = el.nextSibling; + } + } +} +function setVarsOnNode(el, vars) { + if (el.nodeType === 1) { + const style = el.style; + let cssText = ""; + for (const key in vars) { + style.setProperty(`--${key}`, vars[key]); + cssText += `--${key}: ${vars[key]};`; + } + style[CSS_VAR_TEXT] = cssText; + } +} + +const displayRE = /(^|;)\s*display\s*:/; +function patchStyle(el, prev, next) { + const style = el.style; + const isCssString = isString(next); + let hasControlledDisplay = false; + if (next && !isCssString) { + if (prev) { + if (!isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } else { + for (const prevStyle of prev.split(";")) { + const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim(); + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + } + for (const key in next) { + if (key === "display") { + hasControlledDisplay = true; + } + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + hasControlledDisplay = displayRE.test(next); + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOriginalDisplay in el) { + el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : ""; + if (el[vShowHidden]) { + style.display = "none"; + } + } +} +const semicolonRE = /[^\\];\s*$/; +const importantRE = /\s*!important$/; +function setStyle(style, name, val) { + if (isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) val = ""; + if (!!(process.env.NODE_ENV !== "production")) { + if (semicolonRE.test(val)) { + warn( + `Unexpected semicolon at the end of '${name}' style value: '${val}'` + ); + } + } + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } +} +const prefixes = ["Webkit", "Moz", "ms"]; +const prefixCache = {}; +function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; +} + +const xlinkNS = "http://www.w3.org/1999/xlink"; +function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + if (value == null || isBoolean && !includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute( + key, + isBoolean ? "" : isSymbol(value) ? String(value) : value + ); + } + } +} + +function patchDOMProp(el, key, value, parentComponent, attrName) { + if (key === "innerHTML" || key === "textContent") { + if (value != null) { + el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value; + } + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; + const newValue = value == null ? ( + // #11647: value should be set as empty string for null and undefined, + // but <input type="checkbox"> should be set as 'on'. + el.type === "checkbox" ? "on" : "" + ) : String(value); + if (oldValue !== newValue || !("_value" in el)) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + el._value = value; + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + if (!!(process.env.NODE_ENV !== "production") && !needRemove) { + warn( + `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, + e + ); + } + } + needRemove && el.removeAttribute(attrName || key); +} + +function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); +} +function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); +} +const veiKey = Symbol("_vei"); +function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = !!(process.env.NODE_ENV !== "production") ? sanitizeEventValue(nextValue, rawName) : nextValue; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker( + !!(process.env.NODE_ENV !== "production") ? sanitizeEventValue(nextValue, rawName) : nextValue, + instance + ); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } +} +const optionsModifierRE = /(?:Once|Passive|Capture)$/; +function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); + return [event, options]; +} +let cachedNow = 0; +const p = /* @__PURE__ */ Promise.resolve(); +const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); +function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; +} +function sanitizeEventValue(value, propName) { + if (isFunction(value) || isArray(value)) { + return value; + } + warn( + `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop? +Expected function or array of functions, received type ${typeof value}.` + ); + return NOOP; +} +function patchStopImmediatePropagation(e, value) { + if (isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map( + (fn) => (e2) => !e2._stopped && fn && fn(e2) + ); + } else { + return value; + } +} + +const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter +key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; +const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (isOn(key)) { + if (!isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp(el, key, nextValue); + if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { + patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); + } + } else if ( + // #11081 force set props for possible async custom element + el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue)) + ) { + patchDOMProp(el, camelize$1(key), nextValue, parentComponent, key); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } +}; +function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && isString(value)) { + return false; + } + return key in el; +} + +const REMOVAL = {}; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineCustomElement(options, extraOptions, _createApp) { + const Comp = defineComponent(options, extraOptions); + if (isPlainObject(Comp)) extend(Comp, extraOptions); + class VueCustomElement extends VueElement { + constructor(initialProps) { + super(Comp, initialProps, _createApp); + } + } + VueCustomElement.def = Comp; + return VueCustomElement; +} +/*! #__NO_SIDE_EFFECTS__ */ +const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => { + return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp); +}; +const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { +}; +class VueElement extends BaseClass { + constructor(_def, _props = {}, _createApp = createApp) { + super(); + this._def = _def; + this._props = _props; + this._createApp = _createApp; + this._isVueCE = true; + /** + * @internal + */ + this._instance = null; + /** + * @internal + */ + this._app = null; + /** + * @internal + */ + this._nonce = this._def.nonce; + this._connected = false; + this._resolved = false; + this._numberProps = null; + this._styleChildren = /* @__PURE__ */ new WeakSet(); + this._ob = null; + if (this.shadowRoot && _createApp !== createApp) { + this._root = this.shadowRoot; + } else { + if (!!(process.env.NODE_ENV !== "production") && this.shadowRoot) { + warn( + `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` + ); + } + if (_def.shadowRoot !== false) { + this.attachShadow({ mode: "open" }); + this._root = this.shadowRoot; + } else { + this._root = this; + } + } + if (!this._def.__asyncLoader) { + this._resolveProps(this._def); + } + } + connectedCallback() { + if (!this.isConnected) return; + if (!this.shadowRoot) { + this._parseSlots(); + } + this._connected = true; + let parent = this; + while (parent = parent && (parent.parentNode || parent.host)) { + if (parent instanceof VueElement) { + this._parent = parent; + break; + } + } + if (!this._instance) { + if (this._resolved) { + this._setParent(); + this._update(); + } else { + if (parent && parent._pendingResolve) { + this._pendingResolve = parent._pendingResolve.then(() => { + this._pendingResolve = void 0; + this._resolveDef(); + }); + } else { + this._resolveDef(); + } + } + } + } + _setParent(parent = this._parent) { + if (parent) { + this._instance.parent = parent._instance; + this._instance.provides = parent._instance.provides; + } + } + disconnectedCallback() { + this._connected = false; + nextTick(() => { + if (!this._connected) { + if (this._ob) { + this._ob.disconnect(); + this._ob = null; + } + this._app && this._app.unmount(); + if (this._instance) this._instance.ce = void 0; + this._app = this._instance = null; + } + }); + } + /** + * resolve inner component definition (handle possible async component) + */ + _resolveDef() { + if (this._pendingResolve) { + return; + } + for (let i = 0; i < this.attributes.length; i++) { + this._setAttr(this.attributes[i].name); + } + this._ob = new MutationObserver((mutations) => { + for (const m of mutations) { + this._setAttr(m.attributeName); + } + }); + this._ob.observe(this, { attributes: true }); + const resolve = (def, isAsync = false) => { + this._resolved = true; + this._pendingResolve = void 0; + const { props, styles } = def; + let numberProps; + if (props && !isArray(props)) { + for (const key in props) { + const opt = props[key]; + if (opt === Number || opt && opt.type === Number) { + if (key in this._props) { + this._props[key] = toNumber(this._props[key]); + } + (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize$1(key)] = true; + } + } + } + this._numberProps = numberProps; + if (isAsync) { + this._resolveProps(def); + } + if (this.shadowRoot) { + this._applyStyles(styles); + } else if (!!(process.env.NODE_ENV !== "production") && styles) { + warn( + "Custom element style injection is not supported when using shadowRoot: false" + ); + } + this._mount(def); + }; + const asyncDef = this._def.__asyncLoader; + if (asyncDef) { + this._pendingResolve = asyncDef().then( + (def) => resolve(this._def = def, true) + ); + } else { + resolve(this._def); + } + } + _mount(def) { + if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) && !def.name) { + def.name = "VueElement"; + } + this._app = this._createApp(def); + if (def.configureApp) { + def.configureApp(this._app); + } + this._app._ceVNode = this._createVNode(); + this._app.mount(this._root); + const exposed = this._instance && this._instance.exposed; + if (!exposed) return; + for (const key in exposed) { + if (!hasOwn(this, key)) { + Object.defineProperty(this, key, { + // unwrap ref to be consistent with public instance behavior + get: () => unref(exposed[key]) + }); + } else if (!!(process.env.NODE_ENV !== "production")) { + warn(`Exposed property "${key}" already exists on custom element.`); + } + } + } + _resolveProps(def) { + const { props } = def; + const declaredPropKeys = isArray(props) ? props : Object.keys(props || {}); + for (const key of Object.keys(this)) { + if (key[0] !== "_" && declaredPropKeys.includes(key)) { + this._setProp(key, this[key]); + } + } + for (const key of declaredPropKeys.map(camelize$1)) { + Object.defineProperty(this, key, { + get() { + return this._getProp(key); + }, + set(val) { + this._setProp(key, val, true, true); + } + }); + } + } + _setAttr(key) { + if (key.startsWith("data-v-")) return; + const has = this.hasAttribute(key); + let value = has ? this.getAttribute(key) : REMOVAL; + const camelKey = camelize$1(key); + if (has && this._numberProps && this._numberProps[camelKey]) { + value = toNumber(value); + } + this._setProp(camelKey, value, false, true); + } + /** + * @internal + */ + _getProp(key) { + return this._props[key]; + } + /** + * @internal + */ + _setProp(key, val, shouldReflect = true, shouldUpdate = false) { + if (val !== this._props[key]) { + if (val === REMOVAL) { + delete this._props[key]; + } else { + this._props[key] = val; + if (key === "key" && this._app) { + this._app._ceVNode.key = val; + } + } + if (shouldUpdate && this._instance) { + this._update(); + } + if (shouldReflect) { + const ob = this._ob; + ob && ob.disconnect(); + if (val === true) { + this.setAttribute(hyphenate(key), ""); + } else if (typeof val === "string" || typeof val === "number") { + this.setAttribute(hyphenate(key), val + ""); + } else if (!val) { + this.removeAttribute(hyphenate(key)); + } + ob && ob.observe(this, { attributes: true }); + } + } + } + _update() { + render(this._createVNode(), this._root); + } + _createVNode() { + const baseProps = {}; + if (!this.shadowRoot) { + baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this); + } + const vnode = createVNode(this._def, extend(baseProps, this._props)); + if (!this._instance) { + vnode.ce = (instance) => { + this._instance = instance; + instance.ce = this; + instance.isCE = true; + if (!!(process.env.NODE_ENV !== "production")) { + instance.ceReload = (newStyles) => { + if (this._styles) { + this._styles.forEach((s) => this._root.removeChild(s)); + this._styles.length = 0; + } + this._applyStyles(newStyles); + this._instance = null; + this._update(); + }; + } + const dispatch = (event, args) => { + this.dispatchEvent( + new CustomEvent( + event, + isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args } + ) + ); + }; + instance.emit = (event, ...args) => { + dispatch(event, args); + if (hyphenate(event) !== event) { + dispatch(hyphenate(event), args); + } + }; + this._setParent(); + }; + } + return vnode; + } + _applyStyles(styles, owner) { + if (!styles) return; + if (owner) { + if (owner === this._def || this._styleChildren.has(owner)) { + return; + } + this._styleChildren.add(owner); + } + const nonce = this._nonce; + for (let i = styles.length - 1; i >= 0; i--) { + const s = document.createElement("style"); + if (nonce) s.setAttribute("nonce", nonce); + s.textContent = styles[i]; + this.shadowRoot.prepend(s); + if (!!(process.env.NODE_ENV !== "production")) { + if (owner) { + if (owner.__hmrId) { + if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map(); + let entry = this._childStyles.get(owner.__hmrId); + if (!entry) { + this._childStyles.set(owner.__hmrId, entry = []); + } + entry.push(s); + } + } else { + (this._styles || (this._styles = [])).push(s); + } + } + } + } + /** + * Only called when shadowRoot is false + */ + _parseSlots() { + const slots = this._slots = {}; + let n; + while (n = this.firstChild) { + const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default"; + (slots[slotName] || (slots[slotName] = [])).push(n); + this.removeChild(n); + } + } + /** + * Only called when shadowRoot is false + */ + _renderSlots() { + const outlets = (this._teleportTarget || this).querySelectorAll("slot"); + const scopeId = this._instance.type.__scopeId; + for (let i = 0; i < outlets.length; i++) { + const o = outlets[i]; + const slotName = o.getAttribute("name") || "default"; + const content = this._slots[slotName]; + const parent = o.parentNode; + if (content) { + for (const n of content) { + if (scopeId && n.nodeType === 1) { + const id = scopeId + "-s"; + const walker = document.createTreeWalker(n, 1); + n.setAttribute(id, ""); + let child; + while (child = walker.nextNode()) { + child.setAttribute(id, ""); + } + } + parent.insertBefore(n, o); + } + } else { + while (o.firstChild) parent.insertBefore(o.firstChild, o); + } + parent.removeChild(o); + } + } + /** + * @internal + */ + _injectChildStyle(comp) { + this._applyStyles(comp.styles, comp); + } + /** + * @internal + */ + _removeChildStyle(comp) { + if (!!(process.env.NODE_ENV !== "production")) { + this._styleChildren.delete(comp); + if (this._childStyles && comp.__hmrId) { + const oldStyles = this._childStyles.get(comp.__hmrId); + if (oldStyles) { + oldStyles.forEach((s) => this._root.removeChild(s)); + oldStyles.length = 0; + } + } + } + } +} +function useHost(caller) { + const instance = getCurrentInstance(); + const el = instance && instance.ce; + if (el) { + return el; + } else if (!!(process.env.NODE_ENV !== "production")) { + if (!instance) { + warn( + `${caller || "useHost"} called without an active component instance.` + ); + } else { + warn( + `${caller || "useHost"} can only be used in components defined via defineCustomElement.` + ); + } + } + return null; +} +function useShadowRoot() { + const el = !!(process.env.NODE_ENV !== "production") ? useHost("useShadowRoot") : useHost(); + return el && el.shadowRoot; +} + +function useCssModule(name = "$style") { + { + const instance = getCurrentInstance(); + if (!instance) { + !!(process.env.NODE_ENV !== "production") && warn(`useCssModule must be called inside setup()`); + return EMPTY_OBJ; + } + const modules = instance.type.__cssModules; + if (!modules) { + !!(process.env.NODE_ENV !== "production") && warn(`Current instance does not have CSS modules injected.`); + return EMPTY_OBJ; + } + const mod = modules[name]; + if (!mod) { + !!(process.env.NODE_ENV !== "production") && warn(`Current instance does not have CSS module named "${name}".`); + return EMPTY_OBJ; + } + return mod; + } +} + +const positionMap = /* @__PURE__ */ new WeakMap(); +const newPositionMap = /* @__PURE__ */ new WeakMap(); +const moveCbKey = Symbol("_moveCb"); +const enterCbKey = Symbol("_enterCb"); +const decorate = (t) => { + delete t.props.mode; + return t; +}; +const TransitionGroupImpl = /* @__PURE__ */ decorate({ + name: "TransitionGroup", + props: /* @__PURE__ */ extend({}, TransitionPropsValidators, { + tag: String, + moveClass: String + }), + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevChildren; + let children; + onUpdated(() => { + if (!prevChildren.length) { + return; + } + const moveClass = props.moveClass || `${props.name || "v"}-move`; + if (!hasCSSTransform( + prevChildren[0].el, + instance.vnode.el, + moveClass + )) { + return; + } + prevChildren.forEach(callPendingCbs); + prevChildren.forEach(recordPosition); + const movedChildren = prevChildren.filter(applyTranslation); + forceReflow(); + movedChildren.forEach((c) => { + const el = c.el; + const style = el.style; + addTransitionClass(el, moveClass); + style.transform = style.webkitTransform = style.transitionDuration = ""; + const cb = el[moveCbKey] = (e) => { + if (e && e.target !== el) { + return; + } + if (!e || /transform$/.test(e.propertyName)) { + el.removeEventListener("transitionend", cb); + el[moveCbKey] = null; + removeTransitionClass(el, moveClass); + } + }; + el.addEventListener("transitionend", cb); + }); + }); + return () => { + const rawProps = toRaw(props); + const cssTransitionProps = resolveTransitionProps(rawProps); + let tag = rawProps.tag || Fragment; + prevChildren = []; + if (children) { + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.el && child.el instanceof Element) { + prevChildren.push(child); + setTransitionHooks( + child, + resolveTransitionHooks( + child, + cssTransitionProps, + state, + instance + ) + ); + positionMap.set( + child, + child.el.getBoundingClientRect() + ); + } + } + } + children = slots.default ? getTransitionRawChildren(slots.default()) : []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.key != null) { + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + } else if (!!(process.env.NODE_ENV !== "production") && child.type !== Text) { + warn(`<TransitionGroup> children must be keyed.`); + } + } + return createVNode(tag, null, children); + }; + } +}); +const TransitionGroup = TransitionGroupImpl; +function callPendingCbs(c) { + const el = c.el; + if (el[moveCbKey]) { + el[moveCbKey](); + } + if (el[enterCbKey]) { + el[enterCbKey](); + } +} +function recordPosition(c) { + newPositionMap.set(c, c.el.getBoundingClientRect()); +} +function applyTranslation(c) { + const oldPos = positionMap.get(c); + const newPos = newPositionMap.get(c); + const dx = oldPos.left - newPos.left; + const dy = oldPos.top - newPos.top; + if (dx || dy) { + const s = c.el.style; + s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; + s.transitionDuration = "0s"; + return c; + } +} +function hasCSSTransform(el, root, moveClass) { + const clone = el.cloneNode(); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.forEach((cls) => { + cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); + }); + } + moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); + clone.style.display = "none"; + const container = root.nodeType === 1 ? root : root.parentNode; + container.appendChild(clone); + const { hasTransform } = getTransitionInfo(clone); + container.removeChild(clone); + return hasTransform; +} + +const getModelAssigner = (vnode) => { + const fn = vnode.props["onUpdate:modelValue"] || false; + return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; +}; +function onCompositionStart(e) { + e.target.composing = true; +} +function onCompositionEnd(e) { + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } +} +const assignKey = Symbol("_assign"); +const vModelText = { + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); + } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) return; + const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy && value === oldValue) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } +}; +const vModelCheckbox = { + // #4096 array checkboxes need to be deep traversed + deep: true, + created(el, _, vnode) { + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + const modelValue = el._modelValue; + const elementValue = getValue(el); + const checked = el.checked; + const assign = el[assignKey]; + if (isArray(modelValue)) { + const index = looseIndexOf(modelValue, elementValue); + const found = index !== -1; + if (checked && !found) { + assign(modelValue.concat(elementValue)); + } else if (!checked && found) { + const filtered = [...modelValue]; + filtered.splice(index, 1); + assign(filtered); + } + } else if (isSet(modelValue)) { + const cloned = new Set(modelValue); + if (checked) { + cloned.add(elementValue); + } else { + cloned.delete(elementValue); + } + assign(cloned); + } else { + assign(getCheckboxValue(el, checked)); + } + }); + }, + // set initial checked on mount to wait for true-value/false-value + mounted: setChecked, + beforeUpdate(el, binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + setChecked(el, binding, vnode); + } +}; +function setChecked(el, { value, oldValue }, vnode) { + el._modelValue = value; + let checked; + if (isArray(value)) { + checked = looseIndexOf(value, vnode.props.value) > -1; + } else if (isSet(value)) { + checked = value.has(vnode.props.value); + } else { + if (value === oldValue) return; + checked = looseEqual(value, getCheckboxValue(el, true)); + } + if (el.checked !== checked) { + el.checked = checked; + } +} +const vModelRadio = { + created(el, { value }, vnode) { + el.checked = looseEqual(value, vnode.props.value); + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + el[assignKey](getValue(el)); + }); + }, + beforeUpdate(el, { value, oldValue }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (value !== oldValue) { + el.checked = looseEqual(value, vnode.props.value); + } + } +}; +const vModelSelect = { + // <select multiple> value need to be deep traversed + deep: true, + created(el, { value, modifiers: { number } }, vnode) { + const isSetModel = isSet(value); + addEventListener(el, "change", () => { + const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( + (o) => number ? looseToNumber(getValue(o)) : getValue(o) + ); + el[assignKey]( + el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] + ); + el._assigning = true; + nextTick(() => { + el._assigning = false; + }); + }); + el[assignKey] = getModelAssigner(vnode); + }, + // set value in mounted & updated because <select> relies on its children + // <option>s. + mounted(el, { value }) { + setSelected(el, value); + }, + beforeUpdate(el, _binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + }, + updated(el, { value }) { + if (!el._assigning) { + setSelected(el, value); + } + } +}; +function setSelected(el, value) { + const isMultiple = el.multiple; + const isArrayValue = isArray(value); + if (isMultiple && !isArrayValue && !isSet(value)) { + !!(process.env.NODE_ENV !== "production") && warn( + `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` + ); + return; + } + for (let i = 0, l = el.options.length; i < l; i++) { + const option = el.options[i]; + const optionValue = getValue(option); + if (isMultiple) { + if (isArrayValue) { + const optionType = typeof optionValue; + if (optionType === "string" || optionType === "number") { + option.selected = value.some((v) => String(v) === String(optionValue)); + } else { + option.selected = looseIndexOf(value, optionValue) > -1; + } + } else { + option.selected = value.has(optionValue); + } + } else if (looseEqual(getValue(option), value)) { + if (el.selectedIndex !== i) el.selectedIndex = i; + return; + } + } + if (!isMultiple && el.selectedIndex !== -1) { + el.selectedIndex = -1; + } +} +function getValue(el) { + return "_value" in el ? el._value : el.value; +} +function getCheckboxValue(el, checked) { + const key = checked ? "_trueValue" : "_falseValue"; + return key in el ? el[key] : checked; +} +const vModelDynamic = { + created(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "created"); + }, + mounted(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "mounted"); + }, + beforeUpdate(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); + }, + updated(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "updated"); + } +}; +function resolveDynamicModel(tagName, type) { + switch (tagName) { + case "SELECT": + return vModelSelect; + case "TEXTAREA": + return vModelText; + default: + switch (type) { + case "checkbox": + return vModelCheckbox; + case "radio": + return vModelRadio; + default: + return vModelText; + } + } +} +function callModelHook(el, binding, vnode, prevVNode, hook) { + const modelToUse = resolveDynamicModel( + el.tagName, + vnode.props && vnode.props.type + ); + const fn = modelToUse[hook]; + fn && fn(el, binding, vnode, prevVNode); +} +function initVModelForSSR() { + vModelText.getSSRProps = ({ value }) => ({ value }); + vModelRadio.getSSRProps = ({ value }, vnode) => { + if (vnode.props && looseEqual(vnode.props.value, value)) { + return { checked: true }; + } + }; + vModelCheckbox.getSSRProps = ({ value }, vnode) => { + if (isArray(value)) { + if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) { + return { checked: true }; + } + } else if (isSet(value)) { + if (vnode.props && value.has(vnode.props.value)) { + return { checked: true }; + } + } else if (value) { + return { checked: true }; + } + }; + vModelDynamic.getSSRProps = (binding, vnode) => { + if (typeof vnode.type !== "string") { + return; + } + const modelToUse = resolveDynamicModel( + // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase + vnode.type.toUpperCase(), + vnode.props && vnode.props.type + ); + if (modelToUse.getSSRProps) { + return modelToUse.getSSRProps(binding, vnode); + } + }; +} + +const systemModifiers = ["ctrl", "shift", "alt", "meta"]; +const modifierGuards = { + stop: (e) => e.stopPropagation(), + prevent: (e) => e.preventDefault(), + self: (e) => e.target !== e.currentTarget, + ctrl: (e) => !e.ctrlKey, + shift: (e) => !e.shiftKey, + alt: (e) => !e.altKey, + meta: (e) => !e.metaKey, + left: (e) => "button" in e && e.button !== 0, + middle: (e) => "button" in e && e.button !== 1, + right: (e) => "button" in e && e.button !== 2, + exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) +}; +const withModifiers = (fn, modifiers) => { + const cache = fn._withMods || (fn._withMods = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { + for (let i = 0; i < modifiers.length; i++) { + const guard = modifierGuards[modifiers[i]]; + if (guard && guard(event, modifiers)) return; + } + return fn(event, ...args); + }); +}; +const keyNames = { + esc: "escape", + space: " ", + up: "arrow-up", + left: "arrow-left", + right: "arrow-right", + down: "arrow-down", + delete: "backspace" +}; +const withKeys = (fn, modifiers) => { + const cache = fn._withKeys || (fn._withKeys = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event) => { + if (!("key" in event)) { + return; + } + const eventKey = hyphenate(event.key); + if (modifiers.some( + (k) => k === eventKey || keyNames[k] === eventKey + )) { + return fn(event); + } + }); +}; + +const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); +let renderer; +let enabledHydration = false; +function ensureRenderer() { + return renderer || (renderer = createRenderer(rendererOptions)); +} +function ensureHydrationRenderer() { + renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions); + enabledHydration = true; + return renderer; +} +const render = (...args) => { + ensureRenderer().render(...args); +}; +const hydrate = (...args) => { + ensureHydrationRenderer().hydrate(...args); +}; +const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + if (!!(process.env.NODE_ENV !== "production")) { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) return; + const component = app._component; + if (!isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; + } + if (container.nodeType === 1) { + container.textContent = ""; + } + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); + } + return proxy; + }; + return app; +}; +const createSSRApp = (...args) => { + const app = ensureHydrationRenderer().createApp(...args); + if (!!(process.env.NODE_ENV !== "production")) { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (container) { + return mount(container, true, resolveRootNamespace(container)); + } + }; + return app; +}; +function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } +} +function injectNativeTagCheck(app) { + Object.defineProperty(app.config, "isNativeTag", { + value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + writable: false + }); +} +function injectCompilerOptionsCheck(app) { + if (isRuntimeOnly()) { + const isCustomElement = app.config.isCustomElement; + Object.defineProperty(app.config, "isCustomElement", { + get() { + return isCustomElement; + }, + set() { + warn( + `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` + ); + } + }); + const compilerOptions = app.config.compilerOptions; + const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. +- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. +- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader +- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; + Object.defineProperty(app.config, "compilerOptions", { + get() { + warn(msg); + return compilerOptions; + }, + set() { + warn(msg); + } + }); + } +} +function normalizeContainer(container) { + if (isString(container)) { + const res = document.querySelector(container); + if (!!(process.env.NODE_ENV !== "production") && !res) { + warn( + `Failed to mount app: mount target selector "${container}" returned null.` + ); + } + return res; + } + if (!!(process.env.NODE_ENV !== "production") && window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { + warn( + `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` + ); + } + return container; +} +let ssrDirectiveInitialized = false; +const initDirectivesForSSR = () => { + if (!ssrDirectiveInitialized) { + ssrDirectiveInitialized = true; + initVModelForSSR(); + initVShowForSSR(); + } +} ; + +export { Transition, TransitionGroup, VueElement, createApp, createSSRApp, defineCustomElement, defineSSRCustomElement, hydrate, initDirectivesForSSR, render, useCssModule, useCssVars, useHost, useShadowRoot, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, withKeys, withModifiers }; diff --git a/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.global.js b/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.global.js new file mode 100644 index 0000000..c54b5c7 --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.global.js @@ -0,0 +1,12383 @@ +/** +* @vue/runtime-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +var VueRuntimeDOM = (function (exports) { + 'use strict'; + + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function makeMap(str) { + const map = /* @__PURE__ */ Object.create(null); + for (const key of str.split(",")) map[key] = 1; + return (val) => val in map; + } + + const EMPTY_OBJ = Object.freeze({}) ; + const EMPTY_ARR = Object.freeze([]) ; + const NOOP = () => { + }; + const NO = () => false; + const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter + (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); + const isModelListener = (key) => key.startsWith("onUpdate:"); + const extend = Object.assign; + const remove = (arr, el) => { + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } + }; + const hasOwnProperty$1 = Object.prototype.hasOwnProperty; + const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); + const isArray = Array.isArray; + const isMap = (val) => toTypeString(val) === "[object Map]"; + const isSet = (val) => toTypeString(val) === "[object Set]"; + const isDate = (val) => toTypeString(val) === "[object Date]"; + const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; + const isFunction = (val) => typeof val === "function"; + const isString = (val) => typeof val === "string"; + const isSymbol = (val) => typeof val === "symbol"; + const isObject = (val) => val !== null && typeof val === "object"; + const isPromise = (val) => { + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); + }; + const objectToString = Object.prototype.toString; + const toTypeString = (value) => objectToString.call(value); + const toRawType = (value) => { + return toTypeString(value).slice(8, -1); + }; + const isPlainObject = (val) => toTypeString(val) === "[object Object]"; + const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; + const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" + ); + const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" + ); + const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; + }; + const camelizeRE = /-(\w)/g; + const camelize = cacheStringFunction( + (str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); + } + ); + const hyphenateRE = /\B([A-Z])/g; + const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() + ); + const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); + }); + const toHandlerKey = cacheStringFunction( + (str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + } + ); + const hasChanged = (value, oldValue) => !Object.is(value, oldValue); + const invokeArrayFns = (fns, ...arg) => { + for (let i = 0; i < fns.length; i++) { + fns[i](...arg); + } + }; + const def = (obj, key, value, writable = false) => { + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + writable, + value + }); + }; + const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; + }; + const toNumber = (val) => { + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; + }; + let _globalThis; + const getGlobalThis = () => { + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); + }; + + const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; + const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); + + function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } + } + const listDelimiterRE = /;(?![^(]*\))/g; + const propertyDelimiterRE = /:([^]+)/; + const styleCommentRE = /\/\*[^]*?\*\//g; + function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; + } + function stringifyStyle(styles) { + if (!styles) return ""; + if (isString(styles)) return styles; + let ret = ""; + for (const key in styles) { + const value = styles[key]; + if (isString(value) || typeof value === "number") { + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + ret += `${normalizedKey}:${value};`; + } + } + return ret; + } + function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); + } + function normalizeProps(props) { + if (!props) return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; + } + + const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; + const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; + const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; + const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); + const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); + const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); + + const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; + const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); + const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` + ); + function includeBooleanAttr(value) { + return !!value || value === ""; + } + const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` + ); + const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` + ); + function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; + } + + const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; + function getEscapedCssVarName(key, doubleEscape) { + return key.replace( + cssVarNameEscapeSymbolsRE, + (s) => `\\${s}` + ); + } + + function looseCompareArrays(a, b) { + if (a.length !== b.length) return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; + } + function looseEqual(a, b) { + if (a === b) return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); + } + function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); + } + + const isRef$1 = (val) => { + return !!(val && val["__v_isRef"] === true); + }; + const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); + }; + const replacer = (_key, val) => { + if (isRef$1(val)) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; + }; + const stringifySymbol = (v, i = "") => { + var _a; + return ( + // Symbol.description in es2019+ so we need to cast here to pass + // the lib: es2016 check + isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v + ); + }; + + function warn$2(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); + } + + let activeEffectScope; + class EffectScope { + constructor(detached = false) { + this.detached = detached; + /** + * @internal + */ + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this._isPaused = false; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + pause() { + if (this._active) { + this._isPaused = true; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].pause(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].pause(); + } + } + } + /** + * Resumes the effect scope, including all child scopes and effects. + */ + resume() { + if (this._active) { + if (this._isPaused) { + this._isPaused = false; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].resume(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].resume(); + } + } + } + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { + activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn$2(`cannot run an inactive effect scope.`); + } + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + this._active = false; + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + this.effects.length = 0; + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + this.cleanups.length = 0; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); + } + this.scopes.length = 0; + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + } + } + } + function effectScope(detached) { + return new EffectScope(detached); + } + function getCurrentScope() { + return activeEffectScope; + } + function onScopeDispose(fn, failSilently = false) { + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else if (!failSilently) { + warn$2( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } + } + + let activeSub; + const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); + class ReactiveEffect { + constructor(fn) { + this.fn = fn; + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 1 | 4; + /** + * @internal + */ + this.next = void 0; + /** + * @internal + */ + this.cleanup = void 0; + this.scheduler = void 0; + if (activeEffectScope && activeEffectScope.active) { + activeEffectScope.effects.push(this); + } + } + pause() { + this.flags |= 64; + } + resume() { + if (this.flags & 64) { + this.flags &= ~64; + if (pausedQueueEffects.has(this)) { + pausedQueueEffects.delete(this); + this.trigger(); + } + } + } + /** + * @internal + */ + notify() { + if (this.flags & 2 && !(this.flags & 32)) { + return; + } + if (!(this.flags & 8)) { + batch(this); + } + } + run() { + if (!(this.flags & 1)) { + return this.fn(); + } + this.flags |= 2; + cleanupEffect(this); + prepareDeps(this); + const prevEffect = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = this; + shouldTrack = true; + try { + return this.fn(); + } finally { + if (activeSub !== this) { + warn$2( + "Active effect was not restored correctly - this is likely a Vue internal bug." + ); + } + cleanupDeps(this); + activeSub = prevEffect; + shouldTrack = prevShouldTrack; + this.flags &= ~2; + } + } + stop() { + if (this.flags & 1) { + for (let link = this.deps; link; link = link.nextDep) { + removeSub(link); + } + this.deps = this.depsTail = void 0; + cleanupEffect(this); + this.onStop && this.onStop(); + this.flags &= ~1; + } + } + trigger() { + if (this.flags & 64) { + pausedQueueEffects.add(this); + } else if (this.scheduler) { + this.scheduler(); + } else { + this.runIfDirty(); + } + } + /** + * @internal + */ + runIfDirty() { + if (isDirty(this)) { + this.run(); + } + } + get dirty() { + return isDirty(this); + } + } + let batchDepth = 0; + let batchedSub; + let batchedComputed; + function batch(sub, isComputed = false) { + sub.flags |= 8; + if (isComputed) { + sub.next = batchedComputed; + batchedComputed = sub; + return; + } + sub.next = batchedSub; + batchedSub = sub; + } + function startBatch() { + batchDepth++; + } + function endBatch() { + if (--batchDepth > 0) { + return; + } + if (batchedComputed) { + let e = batchedComputed; + batchedComputed = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + e = next; + } + } + let error; + while (batchedSub) { + let e = batchedSub; + batchedSub = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + if (e.flags & 1) { + try { + ; + e.trigger(); + } catch (err) { + if (!error) error = err; + } + } + e = next; + } + } + if (error) throw error; + } + function prepareDeps(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + link.version = -1; + link.prevActiveLink = link.dep.activeLink; + link.dep.activeLink = link; + } + } + function cleanupDeps(sub) { + let head; + let tail = sub.depsTail; + let link = tail; + while (link) { + const prev = link.prevDep; + if (link.version === -1) { + if (link === tail) tail = prev; + removeSub(link); + removeDep(link); + } else { + head = link; + } + link.dep.activeLink = link.prevActiveLink; + link.prevActiveLink = void 0; + link = prev; + } + sub.deps = head; + sub.depsTail = tail; + } + function isDirty(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { + return true; + } + } + if (sub._dirty) { + return true; + } + return false; + } + function refreshComputed(computed) { + if (computed.flags & 4 && !(computed.flags & 16)) { + return; + } + computed.flags &= ~16; + if (computed.globalVersion === globalVersion) { + return; + } + computed.globalVersion = globalVersion; + const dep = computed.dep; + computed.flags |= 2; + if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { + computed.flags &= ~2; + return; + } + const prevSub = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = computed; + shouldTrack = true; + try { + prepareDeps(computed); + const value = computed.fn(computed._value); + if (dep.version === 0 || hasChanged(value, computed._value)) { + computed._value = value; + dep.version++; + } + } catch (err) { + dep.version++; + throw err; + } finally { + activeSub = prevSub; + shouldTrack = prevShouldTrack; + cleanupDeps(computed); + computed.flags &= ~2; + } + } + function removeSub(link, soft = false) { + const { dep, prevSub, nextSub } = link; + if (prevSub) { + prevSub.nextSub = nextSub; + link.prevSub = void 0; + } + if (nextSub) { + nextSub.prevSub = prevSub; + link.nextSub = void 0; + } + if (dep.subsHead === link) { + dep.subsHead = nextSub; + } + if (dep.subs === link) { + dep.subs = prevSub; + if (!prevSub && dep.computed) { + dep.computed.flags &= ~4; + for (let l = dep.computed.deps; l; l = l.nextDep) { + removeSub(l, true); + } + } + } + if (!soft && !--dep.sc && dep.map) { + dep.map.delete(dep.key); + } + } + function removeDep(link) { + const { prevDep, nextDep } = link; + if (prevDep) { + prevDep.nextDep = nextDep; + link.prevDep = void 0; + } + if (nextDep) { + nextDep.prevDep = prevDep; + link.nextDep = void 0; + } + } + function effect(fn, options) { + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const e = new ReactiveEffect(fn); + if (options) { + extend(e, options); + } + try { + e.run(); + } catch (err) { + e.stop(); + throw err; + } + const runner = e.run.bind(e); + runner.effect = e; + return runner; + } + function stop(runner) { + runner.effect.stop(); + } + let shouldTrack = true; + const trackStack = []; + function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; + } + function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; + } + function cleanupEffect(e) { + const { cleanup } = e; + e.cleanup = void 0; + if (cleanup) { + const prevSub = activeSub; + activeSub = void 0; + try { + cleanup(); + } finally { + activeSub = prevSub; + } + } + } + + let globalVersion = 0; + class Link { + constructor(sub, dep) { + this.sub = sub; + this.dep = dep; + this.version = dep.version; + this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; + } + } + class Dep { + constructor(computed) { + this.computed = computed; + this.version = 0; + /** + * Link between this dep and the current active effect + */ + this.activeLink = void 0; + /** + * Doubly linked list representing the subscribing effects (tail) + */ + this.subs = void 0; + /** + * For object property deps cleanup + */ + this.map = void 0; + this.key = void 0; + /** + * Subscriber counter + */ + this.sc = 0; + { + this.subsHead = void 0; + } + } + track(debugInfo) { + if (!activeSub || !shouldTrack || activeSub === this.computed) { + return; + } + let link = this.activeLink; + if (link === void 0 || link.sub !== activeSub) { + link = this.activeLink = new Link(activeSub, this); + if (!activeSub.deps) { + activeSub.deps = activeSub.depsTail = link; + } else { + link.prevDep = activeSub.depsTail; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + } + addSub(link); + } else if (link.version === -1) { + link.version = this.version; + if (link.nextDep) { + const next = link.nextDep; + next.prevDep = link.prevDep; + if (link.prevDep) { + link.prevDep.nextDep = next; + } + link.prevDep = activeSub.depsTail; + link.nextDep = void 0; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + if (activeSub.deps === link) { + activeSub.deps = next; + } + } + } + if (activeSub.onTrack) { + activeSub.onTrack( + extend( + { + effect: activeSub + }, + debugInfo + ) + ); + } + return link; + } + trigger(debugInfo) { + this.version++; + globalVersion++; + this.notify(debugInfo); + } + notify(debugInfo) { + startBatch(); + try { + if (true) { + for (let head = this.subsHead; head; head = head.nextSub) { + if (head.sub.onTrigger && !(head.sub.flags & 8)) { + head.sub.onTrigger( + extend( + { + effect: head.sub + }, + debugInfo + ) + ); + } + } + } + for (let link = this.subs; link; link = link.prevSub) { + if (link.sub.notify()) { + ; + link.sub.dep.notify(); + } + } + } finally { + endBatch(); + } + } + } + function addSub(link) { + link.dep.sc++; + if (link.sub.flags & 4) { + const computed = link.dep.computed; + if (computed && !link.dep.subs) { + computed.flags |= 4 | 16; + for (let l = computed.deps; l; l = l.nextDep) { + addSub(l); + } + } + const currentTail = link.dep.subs; + if (currentTail !== link) { + link.prevSub = currentTail; + if (currentTail) currentTail.nextSub = link; + } + if (link.dep.subsHead === void 0) { + link.dep.subsHead = link; + } + link.dep.subs = link; + } + } + const targetMap = /* @__PURE__ */ new WeakMap(); + const ITERATE_KEY = Symbol( + "Object iterate" + ); + const MAP_KEY_ITERATE_KEY = Symbol( + "Map keys iterate" + ); + const ARRAY_ITERATE_KEY = Symbol( + "Array iterate" + ); + function track(target, type, key) { + if (shouldTrack && activeSub) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = new Dep()); + dep.map = depsMap; + dep.key = key; + } + { + dep.track({ + target, + type, + key + }); + } + } + } + function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + globalVersion++; + return; + } + const run = (dep) => { + if (dep) { + { + dep.trigger({ + target, + type, + key, + newValue, + oldValue, + oldTarget + }); + } + } + }; + startBatch(); + if (type === "clear") { + depsMap.forEach(run); + } else { + const targetIsArray = isArray(target); + const isArrayIndex = targetIsArray && isIntegerKey(key); + if (targetIsArray && key === "length") { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { + run(dep); + } + }); + } else { + if (key !== void 0 || depsMap.has(void 0)) { + run(depsMap.get(key)); + } + if (isArrayIndex) { + run(depsMap.get(ARRAY_ITERATE_KEY)); + } + switch (type) { + case "add": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isArrayIndex) { + run(depsMap.get("length")); + } + break; + case "delete": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + run(depsMap.get(ITERATE_KEY)); + } + break; + } + } + } + endBatch(); + } + function getDepFromReactive(object, key) { + const depMap = targetMap.get(object); + return depMap && depMap.get(key); + } + + function reactiveReadArray(array) { + const raw = toRaw(array); + if (raw === array) return raw; + track(raw, "iterate", ARRAY_ITERATE_KEY); + return isShallow(array) ? raw : raw.map(toReactive); + } + function shallowReadArray(arr) { + track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); + return arr; + } + const arrayInstrumentations = { + __proto__: null, + [Symbol.iterator]() { + return iterator(this, Symbol.iterator, toReactive); + }, + concat(...args) { + return reactiveReadArray(this).concat( + ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) + ); + }, + entries() { + return iterator(this, "entries", (value) => { + value[1] = toReactive(value[1]); + return value; + }); + }, + every(fn, thisArg) { + return apply(this, "every", fn, thisArg, void 0, arguments); + }, + filter(fn, thisArg) { + return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); + }, + find(fn, thisArg) { + return apply(this, "find", fn, thisArg, toReactive, arguments); + }, + findIndex(fn, thisArg) { + return apply(this, "findIndex", fn, thisArg, void 0, arguments); + }, + findLast(fn, thisArg) { + return apply(this, "findLast", fn, thisArg, toReactive, arguments); + }, + findLastIndex(fn, thisArg) { + return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); + }, + // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement + forEach(fn, thisArg) { + return apply(this, "forEach", fn, thisArg, void 0, arguments); + }, + includes(...args) { + return searchProxy(this, "includes", args); + }, + indexOf(...args) { + return searchProxy(this, "indexOf", args); + }, + join(separator) { + return reactiveReadArray(this).join(separator); + }, + // keys() iterator only reads `length`, no optimisation required + lastIndexOf(...args) { + return searchProxy(this, "lastIndexOf", args); + }, + map(fn, thisArg) { + return apply(this, "map", fn, thisArg, void 0, arguments); + }, + pop() { + return noTracking(this, "pop"); + }, + push(...args) { + return noTracking(this, "push", args); + }, + reduce(fn, ...args) { + return reduce(this, "reduce", fn, args); + }, + reduceRight(fn, ...args) { + return reduce(this, "reduceRight", fn, args); + }, + shift() { + return noTracking(this, "shift"); + }, + // slice could use ARRAY_ITERATE but also seems to beg for range tracking + some(fn, thisArg) { + return apply(this, "some", fn, thisArg, void 0, arguments); + }, + splice(...args) { + return noTracking(this, "splice", args); + }, + toReversed() { + return reactiveReadArray(this).toReversed(); + }, + toSorted(comparer) { + return reactiveReadArray(this).toSorted(comparer); + }, + toSpliced(...args) { + return reactiveReadArray(this).toSpliced(...args); + }, + unshift(...args) { + return noTracking(this, "unshift", args); + }, + values() { + return iterator(this, "values", toReactive); + } + }; + function iterator(self, method, wrapValue) { + const arr = shallowReadArray(self); + const iter = arr[method](); + if (arr !== self && !isShallow(self)) { + iter._next = iter.next; + iter.next = () => { + const result = iter._next(); + if (result.value) { + result.value = wrapValue(result.value); + } + return result; + }; + } + return iter; + } + const arrayProto = Array.prototype; + function apply(self, method, fn, thisArg, wrappedRetFn, args) { + const arr = shallowReadArray(self); + const needsWrap = arr !== self && !isShallow(self); + const methodFn = arr[method]; + if (methodFn !== arrayProto[method]) { + const result2 = methodFn.apply(self, args); + return needsWrap ? toReactive(result2) : result2; + } + let wrappedFn = fn; + if (arr !== self) { + if (needsWrap) { + wrappedFn = function(item, index) { + return fn.call(this, toReactive(item), index, self); + }; + } else if (fn.length > 2) { + wrappedFn = function(item, index) { + return fn.call(this, item, index, self); + }; + } + } + const result = methodFn.call(arr, wrappedFn, thisArg); + return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; + } + function reduce(self, method, fn, args) { + const arr = shallowReadArray(self); + let wrappedFn = fn; + if (arr !== self) { + if (!isShallow(self)) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, toReactive(item), index, self); + }; + } else if (fn.length > 3) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, item, index, self); + }; + } + } + return arr[method](wrappedFn, ...args); + } + function searchProxy(self, method, args) { + const arr = toRaw(self); + track(arr, "iterate", ARRAY_ITERATE_KEY); + const res = arr[method](...args); + if ((res === -1 || res === false) && isProxy(args[0])) { + args[0] = toRaw(args[0]); + return arr[method](...args); + } + return res; + } + function noTracking(self, method, args = []) { + pauseTracking(); + startBatch(); + const res = toRaw(self)[method].apply(self, args); + endBatch(); + resetTracking(); + return res; + } + + const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); + const builtInSymbols = new Set( + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) + ); + function hasOwnProperty(key) { + if (!isSymbol(key)) key = String(key); + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); + } + class BaseReactiveHandler { + constructor(_isReadonly = false, _isShallow = false) { + this._isReadonly = _isReadonly; + this._isShallow = _isShallow; + } + get(target, key, receiver) { + if (key === "__v_skip") return target["__v_skip"]; + const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return isShallow2; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the receiver is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + let fn; + if (targetIsArray && (fn = arrayInstrumentations[key])) { + return fn; + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get( + target, + key, + // if this is a proxy wrapping a ref, return methods using the raw ref + // as receiver so that we don't have to call `toRaw` on the ref in all + // its class methods + isRef(target) ? target : receiver + ); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (isShallow2) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } + } + class MutableReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(false, isShallow2); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._isShallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set( + target, + key, + value, + isRef(target) ? target : receiver + ); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { + const hadKey = hasOwn(target, key); + const oldValue = target[key]; + const result = Reflect.deleteProperty(target, key); + if (result && hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + } + has(target, key) { + const result = Reflect.has(target, key); + if (!isSymbol(key) || !builtInSymbols.has(key)) { + track(target, "has", key); + } + return result; + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); + return Reflect.ownKeys(target); + } + } + class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(true, isShallow2); + } + set(target, key) { + { + warn$2( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + deleteProperty(target, key) { + { + warn$2( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + } + const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); + const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); + const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); + const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); + + const toShallow = (value) => value; + const getProto = (v) => Reflect.getPrototypeOf(v); + function createIterableMethod(method, isReadonly2, isShallow2) { + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done + }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } + }; + }; + } + function createReadonlyMethod(type) { + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + warn$2( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; + } + function createInstrumentations(readonly, shallow) { + const instrumentations = { + get(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); + } + track(rawTarget, "get", rawKey); + } + const { has } = getProto(rawTarget); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + if (has.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } + }, + get size() { + const target = this["__v_raw"]; + !readonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); + }, + has(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); + } + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); + }, + forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + !readonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + } + }; + extend( + instrumentations, + readonly ? { + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear") + } : { + add(value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; + }, + set(key, value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; + }, + delete(key) { + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get ? get.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + }, + clear() { + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger( + target, + "clear", + void 0, + void 0, + oldTarget + ); + } + return result; + } + } + ); + const iteratorMethods = [ + "keys", + "values", + "entries", + Symbol.iterator + ]; + iteratorMethods.forEach((method) => { + instrumentations[method] = createIterableMethod(method, readonly, shallow); + }); + return instrumentations; + } + function createInstrumentationGetter(isReadonly2, shallow) { + const instrumentations = createInstrumentations(isReadonly2, shallow); + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; + } + const mutableCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, false) + }; + const shallowCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, true) + }; + const readonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, false) + }; + const shallowReadonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, true) + }; + function checkIdentityKeys(target, has, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has.call(target, rawKey)) { + const type = toRawType(target); + warn$2( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } + } + + const reactiveMap = /* @__PURE__ */ new WeakMap(); + const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); + const readonlyMap = /* @__PURE__ */ new WeakMap(); + const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); + function targetTypeMap(rawType) { + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } + } + function getTargetType(value) { + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); + } + function reactive(target) { + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); + } + function shallowReactive(target) { + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); + } + function readonly(target) { + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); + } + function shallowReadonly(target) { + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); + } + function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + { + warn$2( + `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( + target + )}` + ); + } + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; + } + function isReactive(value) { + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); + } + function isReadonly(value) { + return !!(value && value["__v_isReadonly"]); + } + function isShallow(value) { + return !!(value && value["__v_isShallow"]); + } + function isProxy(value) { + return value ? !!value["__v_raw"] : false; + } + function toRaw(observed) { + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; + } + function markRaw(value) { + if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { + def(value, "__v_skip", true); + } + return value; + } + const toReactive = (value) => isObject(value) ? reactive(value) : value; + const toReadonly = (value) => isObject(value) ? readonly(value) : value; + + function isRef(r) { + return r ? r["__v_isRef"] === true : false; + } + function ref(value) { + return createRef(value, false); + } + function shallowRef(value) { + return createRef(value, true); + } + function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); + } + class RefImpl { + constructor(value, isShallow2) { + this.dep = new Dep(); + this["__v_isRef"] = true; + this["__v_isShallow"] = false; + this._rawValue = isShallow2 ? value : toRaw(value); + this._value = isShallow2 ? value : toReactive(value); + this["__v_isShallow"] = isShallow2; + } + get value() { + { + this.dep.track({ + target: this, + type: "get", + key: "value" + }); + } + return this._value; + } + set value(newValue) { + const oldValue = this._rawValue; + const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); + newValue = useDirectValue ? newValue : toRaw(newValue); + if (hasChanged(newValue, oldValue)) { + this._rawValue = newValue; + this._value = useDirectValue ? newValue : toReactive(newValue); + { + this.dep.trigger({ + target: this, + type: "set", + key: "value", + newValue, + oldValue + }); + } + } + } + } + function triggerRef(ref2) { + if (ref2.dep) { + { + ref2.dep.trigger({ + target: ref2, + type: "set", + key: "value", + newValue: ref2._value + }); + } + } + } + function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; + } + function toValue(source) { + return isFunction(source) ? source() : unref(source); + } + const shallowUnwrapHandlers = { + get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } + }; + function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); + } + class CustomRefImpl { + constructor(factory) { + this["__v_isRef"] = true; + this._value = void 0; + const dep = this.dep = new Dep(); + const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); + this._get = get; + this._set = set; + } + get value() { + return this._value = this._get(); + } + set value(newVal) { + this._set(newVal); + } + } + function customRef(factory) { + return new CustomRefImpl(factory); + } + function toRefs(object) { + if (!isProxy(object)) { + warn$2(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; + } + class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this["__v_isRef"] = true; + this._value = void 0; + } + get value() { + const val = this._object[this._key]; + return this._value = val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } + } + class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this["__v_isRef"] = true; + this["__v_isReadonly"] = true; + this._value = void 0; + } + get value() { + return this._value = this._getter(); + } + } + function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } + } + function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); + } + + class ComputedRefImpl { + constructor(fn, setter, isSSR) { + this.fn = fn; + this.setter = setter; + /** + * @internal + */ + this._value = void 0; + /** + * @internal + */ + this.dep = new Dep(this); + /** + * @internal + */ + this.__v_isRef = true; + // TODO isolatedDeclarations "__v_isReadonly" + // A computed is also a subscriber that tracks other deps + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 16; + /** + * @internal + */ + this.globalVersion = globalVersion - 1; + /** + * @internal + */ + this.next = void 0; + // for backwards compat + this.effect = this; + this["__v_isReadonly"] = !setter; + this.isSSR = isSSR; + } + /** + * @internal + */ + notify() { + this.flags |= 16; + if (!(this.flags & 8) && // avoid infinite self recursion + activeSub !== this) { + batch(this, true); + return true; + } + } + get value() { + const link = this.dep.track({ + target: this, + type: "get", + key: "value" + }) ; + refreshComputed(this); + if (link) { + link.version = this.dep.version; + } + return this._value; + } + set value(newValue) { + if (this.setter) { + this.setter(newValue); + } else { + warn$2("Write operation failed: computed value is readonly"); + } + } + } + function computed$1(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + if (isFunction(getterOrOptions)) { + getter = getterOrOptions; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, isSSR); + if (debugOptions && !isSSR) { + cRef.onTrack = debugOptions.onTrack; + cRef.onTrigger = debugOptions.onTrigger; + } + return cRef; + } + + const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" + }; + const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" + }; + + const INITIAL_WATCHER_VALUE = {}; + const cleanupMap = /* @__PURE__ */ new WeakMap(); + let activeWatcher = void 0; + function getCurrentWatcher() { + return activeWatcher; + } + function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { + if (owner) { + let cleanups = cleanupMap.get(owner); + if (!cleanups) cleanupMap.set(owner, cleanups = []); + cleanups.push(cleanupFn); + } else if (!failSilently) { + warn$2( + `onWatcherCleanup() was called when there was no active watcher to associate with.` + ); + } + } + function watch$1(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, once, scheduler, augmentJob, call } = options; + const warnInvalidSource = (s) => { + (options.onWarn || warn$2)( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const reactiveGetter = (source2) => { + if (deep) return source2; + if (isShallow(source2) || deep === false || deep === 0) + return traverse(source2, 1); + return traverse(source2); + }; + let effect; + let getter; + let cleanup; + let boundCleanup; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return call ? call(s, 2) : s(); + } else { + warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { + if (cb) { + getter = call ? () => call(source, 2) : source; + } else { + getter = () => { + if (cleanup) { + pauseTracking(); + try { + cleanup(); + } finally { + resetTracking(); + } + } + const currentEffect = activeWatcher; + activeWatcher = effect; + try { + return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); + } finally { + activeWatcher = currentEffect; + } + }; + } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + const depth = deep === true ? Infinity : deep; + getter = () => traverse(baseGetter(), depth); + } + const scope = getCurrentScope(); + const watchHandle = () => { + effect.stop(); + if (scope && scope.active) { + remove(scope.effects, effect); + } + }; + if (once && cb) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + watchHandle(); + }; + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = (immediateFirstRun) => { + if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { + if (cleanup) { + cleanup(); + } + const currentWatcher = activeWatcher; + activeWatcher = effect; + try { + const args = [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + boundCleanup + ]; + call ? call(cb, 3, args) : ( + // @ts-expect-error + cb(...args) + ); + oldValue = newValue; + } finally { + activeWatcher = currentWatcher; + } + } + } else { + effect.run(); + } + }; + if (augmentJob) { + augmentJob(job); + } + effect = new ReactiveEffect(getter); + effect.scheduler = scheduler ? () => scheduler(job, false) : job; + boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); + cleanup = effect.onStop = () => { + const cleanups = cleanupMap.get(effect); + if (cleanups) { + if (call) { + call(cleanups, 4); + } else { + for (const cleanup2 of cleanups) cleanup2(); + } + cleanupMap.delete(effect); + } + }; + { + effect.onTrack = options.onTrack; + effect.onTrigger = options.onTrigger; + } + if (cb) { + if (immediate) { + job(true); + } else { + oldValue = effect.run(); + } + } else if (scheduler) { + scheduler(job.bind(null, true), true); + } else { + effect.run(); + } + watchHandle.pause = effect.pause.bind(effect); + watchHandle.resume = effect.resume.bind(effect); + watchHandle.stop = watchHandle; + return watchHandle; + } + function traverse(value, depth = Infinity, seen) { + if (depth <= 0 || !isObject(value) || value["__v_skip"]) { + return value; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + depth--; + if (isRef(value)) { + traverse(value.value, depth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, seen); + } + for (const key of Object.getOwnPropertySymbols(value)) { + if (Object.prototype.propertyIsEnumerable.call(value, key)) { + traverse(value[key], depth, seen); + } + } + } + return value; + } + + const stack = []; + function pushWarningContext(vnode) { + stack.push(vnode); + } + function popWarningContext() { + stack.pop(); + } + let isWarning = false; + function warn$1(msg, ...args) { + if (isWarning) return; + isWarning = true; + pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + // eslint-disable-next-line no-restricted-syntax + msg + args.map((a) => { + var _a, _b; + return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); + }).join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); + } + console.warn(...warnArgs); + } + resetTracking(); + isWarning = false; + } + function getComponentTrace() { + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); + } + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; + } + function formatTrace(trace) { + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; + } + function formatTraceEntry({ vnode, recurseCount }) { + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; + } + function formatProps(props) { + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; + } + function formatProp(key, value, raw) { + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } + } + function assertNumber(val, type) { + if (val === void 0) { + return; + } else if (typeof val !== "number") { + warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + } else if (isNaN(val)) { + warn$1(`${type} is NaN - the duration expression might be incorrect.`); + } + } + + const ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER", + "COMPONENT_UPDATE": 15, + "15": "COMPONENT_UPDATE", + "APP_UNMOUNT_CLEANUP": 16, + "16": "APP_UNMOUNT_CLEANUP" + }; + const ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush", + [15]: "component update", + [16]: "app unmount cleanup function" + }; + function callWithErrorHandling(fn, instance, type, args) { + try { + return args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } + } + function callWithAsyncErrorHandling(fn, instance, type, args) { + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); + } + return res; + } + if (isArray(fn)) { + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; + } else { + warn$1( + `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` + ); + } + } + function handleError(err, instance, type, throwInDev = true) { + const contextVNode = instance ? instance.vnode : null; + const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = ErrorTypeStrings$1[type] ; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + return; + } + } + } + cur = cur.parent; + } + if (errorHandler) { + pauseTracking(); + callWithErrorHandling(errorHandler, null, 10, [ + err, + exposedInstance, + errorInfo + ]); + resetTracking(); + return; + } + } + logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); + } + function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { + { + const info = ErrorTypeStrings$1[type]; + if (contextVNode) { + pushWarningContext(contextVNode); + } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } + } + + const queue = []; + let flushIndex = -1; + const pendingPostFlushCbs = []; + let activePostFlushCbs = null; + let postFlushIndex = 0; + const resolvedPromise = /* @__PURE__ */ Promise.resolve(); + let currentFlushPromise = null; + const RECURSION_LIMIT = 100; + function nextTick(fn) { + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; + } + function findInsertionIndex(id) { + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { + start = middle + 1; + } else { + end = middle; + } + } + return start; + } + function queueJob(job) { + if (!(job.flags & 1)) { + const jobId = getId(job); + const lastJob = queue[queue.length - 1]; + if (!lastJob || // fast path when the job id is larger than the tail + !(job.flags & 2) && jobId >= getId(lastJob)) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(jobId), 0, job); + } + job.flags |= 1; + queueFlush(); + } + } + function queueFlush() { + if (!currentFlushPromise) { + currentFlushPromise = resolvedPromise.then(flushJobs); + } + } + function queuePostFlushCb(cb) { + if (!isArray(cb)) { + if (activePostFlushCbs && cb.id === -1) { + activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); + } else if (!(cb.flags & 1)) { + pendingPostFlushCbs.push(cb); + cb.flags |= 1; + } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); + } + function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.flags & 2) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + if (cb.flags & 4) { + cb.flags &= ~1; + } + cb(); + if (!(cb.flags & 4)) { + cb.flags &= ~1; + } + } + } + } + function flushPostFlushCbs(seen) { + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; + } + activePostFlushCbs = deduped; + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + const cb = activePostFlushCbs[postFlushIndex]; + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + if (cb.flags & 4) { + cb.flags &= ~1; + } + if (!(cb.flags & 8)) cb(); + cb.flags &= ~1; + } + activePostFlushCbs = null; + postFlushIndex = 0; + } + } + const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; + function flushJobs(seen) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + const check = (job) => checkRecursiveUpdates(seen, job) ; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && !(job.flags & 8)) { + if (check(job)) { + continue; + } + if (job.flags & 4) { + job.flags &= ~1; + } + callWithErrorHandling( + job, + job.i, + job.i ? 15 : 14 + ); + if (!(job.flags & 4)) { + job.flags &= ~1; + } + } + } + } finally { + for (; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job) { + job.flags &= ~1; + } + } + flushIndex = -1; + queue.length = 0; + flushPostFlushCbs(seen); + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); + } + } + } + function checkRecursiveUpdates(seen, fn) { + const count = seen.get(fn) || 0; + if (count > RECURSION_LIMIT) { + const instance = fn.i; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } + seen.set(fn, count + 1); + return false; + } + + let isHmrUpdating = false; + const hmrDirtyComponents = /* @__PURE__ */ new Map(); + { + getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; + } + const map = /* @__PURE__ */ new Map(); + function registerHMR(instance) { + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); + } + function unregisterHMR(instance) { + map.get(instance.type.__hmrId).instances.delete(instance); + } + function createRecord(id, initialDef) { + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; + } + function normalizeClassComponent(component) { + return isClassComponent(component) ? component.__vccOpts : component; + } + function rerender(id, newRender) { + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; + } + instance.renderCache = []; + isHmrUpdating = true; + instance.update(); + isHmrUpdating = false; + }); + } + function reload(id, newComp) { + const record = map.get(id); + if (!record) return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (let i = 0; i < instances.length; i++) { + const instance = instances[i]; + const oldComp = normalizeClassComponent(instance.type); + let dirtyInstances = hmrDirtyComponents.get(oldComp); + if (!dirtyInstances) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set()); + } + dirtyInstances.add(instance); + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + dirtyInstances.add(instance); + instance.ceReload(newComp.styles); + dirtyInstances.delete(instance); + } else if (instance.parent) { + queueJob(() => { + isHmrUpdating = true; + instance.parent.update(); + isHmrUpdating = false; + dirtyInstances.delete(instance); + }); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + if (instance.root.ce && instance !== instance.root) { + instance.root.ce._removeChildStyle(oldComp); + } + } + queuePostFlushCb(() => { + hmrDirtyComponents.clear(); + }); + } + function updateComponentDef(oldComp, newComp) { + extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; + } + } + } + function tryWrap(fn) { + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; + } + + let devtools$1; + let buffer = []; + let devtoolsNotInstalled = false; + function emit$1(event, ...args) { + if (devtools$1) { + devtools$1.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } + } + function setDevtoolsHook$1(hook, target) { + var _a, _b; + devtools$1 = hook; + if (devtools$1) { + devtools$1.enabled = true; + buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); + buffer = []; + } else if ( + // handle late devtools injection - only do this if we are in an actual + // browser environment to avoid the timer handle stalling test runner exit + // (#4815) + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + // eslint-disable-next-line no-restricted-syntax + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook$1(newHook, target); + }); + setTimeout(() => { + if (!devtools$1) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; + devtoolsNotInstalled = true; + buffer = []; + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } + } + function devtoolsInitApp(app, version) { + emit$1("app:init" /* APP_INIT */, app, version, { + Fragment, + Text, + Comment, + Static + }); + } + function devtoolsUnmountApp(app) { + emit$1("app:unmount" /* APP_UNMOUNT */, app); + } + const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); + const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); + const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( + "component:removed" /* COMPONENT_REMOVED */ + ); + const devtoolsComponentRemoved = (component) => { + if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools$1.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } + }; + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function createDevtoolsComponentHook(hook) { + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; + } + const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); + const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); + function createDevtoolsPerformanceHook(hook) { + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; + } + function devtoolsComponentEmit(component, event, params) { + emit$1( + "component:emit" /* COMPONENT_EMIT */, + component.appContext.app, + component, + event, + params + ); + } + + let currentRenderingInstance = null; + let currentScopeId = null; + function setCurrentRenderingInstance(instance) { + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; + } + function pushScopeId(id) { + currentScopeId = id; + } + function popScopeId() { + currentScopeId = null; + } + const withScopeId = (_id) => withCtx; + function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); + } + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; + } + + function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } + } + function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + warn$1(`withDirectives can only be used inside render functions.`); + return vnode; + } + const instance = getComponentPublicInstance(currentRenderingInstance); + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; + if (dir) { + if (isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; + } + function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); + } + } + } + + const TeleportEndKey = Symbol("_vte"); + const isTeleport = (type) => type.__isTeleport; + const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); + const isTeleportDeferred = (props) => props && (props.defer || props.defer === ""); + const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; + const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; + const resolveTarget = (props, select) => { + const targetSelector = props && props.to; + if (isString(targetSelector)) { + if (!select) { + warn$1( + `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` + ); + return null; + } else { + const target = select(targetSelector); + if (!target && !isTeleportDisabled(props)) { + warn$1( + `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` + ); + } + return target; + } + } else { + if (!targetSelector && !isTeleportDisabled(props)) { + warn$1(`Invalid Teleport target: ${targetSelector}`); + } + return targetSelector; + } + }; + const TeleportImpl = { + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (isHmrUpdating) { + optimized = false; + dynamicChildren = null; + } + if (n1 == null) { + const placeholder = n2.el = createComment("teleport start") ; + const mainAnchor = n2.anchor = createComment("teleport end") ; + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + if (parentComponent && parentComponent.isCE) { + parentComponent.ce._teleportTarget = container2; + } + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountToTarget = () => { + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = prepareAnchor(target, n2, createText, insert); + if (target) { + if (namespace !== "svg" && isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace !== "mathml" && isTargetMathML(target)) { + namespace = "mathml"; + } + if (!disabled) { + mount(target, targetAnchor); + updateCssVars(n2, false); + } + } else if (!disabled) { + warn$1( + "Invalid Teleport target on mount:", + target, + `(${typeof target})` + ); + } + }; + if (disabled) { + mount(container, mainAnchor); + updateCssVars(n2, true); + } + if (isTeleportDeferred(n2.props)) { + queuePostRenderEffect(() => { + mountToTarget(); + n2.el.__isMounted = true; + }, parentSuspense); + } else { + mountToTarget(); + } + } else { + if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) { + queuePostRenderEffect(() => { + TeleportImpl.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + delete n1.el.__isMounted; + }, parentSuspense); + return; + } + n2.el = n1.el; + n2.targetStart = n1.targetStart; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } else { + warn$1( + "Invalid Teleport target on update:", + target, + `(${typeof target})` + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); + } + } + updateCssVars(n2, disabled); + } + }, + remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { + shapeFlag, + children, + anchor, + targetStart, + targetAnchor, + target, + props + } = vnode; + if (target) { + hostRemove(targetStart); + hostRemove(targetAnchor); + } + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport + }; + function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } + } + function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector, insert, createText } + }, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const disabled = isTeleportDisabled(vnode.props); + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (disabled) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetStart = targetNode; + vnode.targetAnchor = targetNode && nextSibling(targetNode); + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + if (targetAnchor && targetAnchor.nodeType === 8) { + if (targetAnchor.data === "teleport start anchor") { + vnode.targetStart = targetAnchor; + } else if (targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + targetAnchor = nextSibling(targetAnchor); + } + if (!vnode.targetAnchor) { + prepareAnchor(target, vnode, createText, insert); + } + hydrateChildren( + targetNode && nextSibling(targetNode), + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode, disabled); + } + return vnode.anchor && nextSibling(vnode.anchor); + } + const Teleport = TeleportImpl; + function updateCssVars(vnode, isDisabled) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node, anchor; + if (isDisabled) { + node = vnode.el; + anchor = vnode.anchor; + } else { + node = vnode.targetStart; + anchor = vnode.targetAnchor; + } + while (node && node !== anchor) { + if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } + } + function prepareAnchor(target, vnode, createText, insert) { + const targetStart = vnode.targetStart = createText(""); + const targetAnchor = vnode.targetAnchor = createText(""); + targetStart[TeleportEndKey] = targetAnchor; + if (target) { + insert(targetStart, target); + insert(targetAnchor, target); + } + return targetAnchor; + } + + const leaveCbKey = Symbol("_leaveCb"); + const enterCbKey$1 = Symbol("_enterCb"); + function useTransitionState() { + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; + } + const TransitionHookValidator = [Function, Array]; + const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator + }; + const recursiveGetSubtree = (instance) => { + const subTree = instance.subTree; + return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; + }; + const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + const child = findNonCommentChild(children); + const rawProps = toRaw(props); + const { mode } = rawProps; + if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { + warn$1(`invalid <transition> mode: ${mode}`); + } + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getInnerChild$1(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + let enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance, + // #11061, ensure enterHooks is fresh after clone + (hooks) => enterHooks = hooks + ); + if (innerChild.type !== Comment) { + setTransitionHooks(innerChild, enterHooks); + } + let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree); + if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { + let leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in" && innerChild.type !== Comment) { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (!(instance.job.flags & 8)) { + instance.update(); + } + delete leavingHooks.afterLeave; + oldInnerChild = void 0; + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + enterHooks.delayedLeave = () => { + delayedLeave(); + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + }; + } else { + oldInnerChild = void 0; + } + } else if (oldInnerChild) { + oldInnerChild = void 0; + } + return child; + }; + } + }; + function findNonCommentChild(children) { + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c of children) { + if (c.type !== Comment) { + if (hasFound) { + warn$1( + "<transition> can only be used on a single element or component. Use <transition-group> for lists." + ); + break; + } + child = c; + hasFound = true; + } + } + } + return child; + } + const BaseTransition = BaseTransitionImpl; + function getLeavingNodesForType(state, vnode) { + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; + } + function resolveTransitionHooks(vnode, props, state, instance, postClone) { + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook(hook, args); + if (isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) done(); + } else if (hook.length <= 1) { + done(); + } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey$1] = (cancelled) => { + if (called) return; + called = true; + if (cancelled) { + callHook(cancelHook, [el]); + } else { + callHook(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey$1] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove) { + const key2 = String(vnode.key); + if (el[enterCbKey$1]) { + el[enterCbKey$1]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove(); + } + callHook(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) return; + called = true; + remove(); + if (cancelled) { + callHook(onLeaveCancelled, [el]); + } else { + callHook(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + const hooks2 = resolveTransitionHooks( + vnode2, + props, + state, + instance, + postClone + ); + if (postClone) postClone(hooks2); + return hooks2; + } + }; + return hooks; + } + function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } + } + function getInnerChild$1(vnode) { + if (!isKeepAlive(vnode)) { + if (isTeleport(vnode.type) && vnode.children) { + return findNonCommentChild(vnode.children); + } + return vnode; + } + if (vnode.component) { + return vnode.component.subTree; + } + const { shapeFlag, children } = vnode; + if (children) { + if (shapeFlag & 16) { + return children[0]; + } + if (shapeFlag & 32 && isFunction(children.default)) { + return children.default(); + } + } + } + function setTransitionHooks(vnode, hooks) { + if (vnode.shapeFlag & 6 && vnode.component) { + vnode.transition = hooks; + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } + } + function getTransitionRawChildren(children, keepComment = false, parentKey) { + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); + } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; + } + } + return ret; + } + + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function defineComponent(options, extraOptions) { + return isFunction(options) ? ( + // #8236: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; + } + + function useId() { + const i = getCurrentInstance(); + if (i) { + return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++; + } else { + warn$1( + `useId() is called when there is no active component instance to be associated with.` + ); + } + return ""; + } + function markAsyncBoundary(instance) { + instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; + } + + const knownTemplateRefs = /* @__PURE__ */ new WeakSet(); + function useTemplateRef(key) { + const i = getCurrentInstance(); + const r = shallowRef(null); + if (i) { + const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs; + let desc; + if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) { + warn$1(`useTemplateRef('${key}') already exists.`); + } else { + Object.defineProperty(refs, key, { + enumerable: true, + get: () => r.value, + set: (val) => r.value = val + }); + } + } else { + warn$1( + `useTemplateRef() is called when there is no active component instance to be associated with.` + ); + } + const ret = readonly(r) ; + { + knownTemplateRefs.add(ret); + } + return ret; + } + + function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { + if (isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) { + setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree); + } + return; + } + const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + const rawSetupState = toRaw(setupState); + const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => { + { + if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) { + warn$1( + `Template ref "${key}" used on a non-ref value. It will not work in the production build.` + ); + } + if (knownTemplateRefs.has(rawSetupState[key])) { + return false; + } + } + return hasOwn(rawSetupState, key); + }; + if (oldRef != null && oldRef !== ref) { + if (isString(oldRef)) { + refs[oldRef] = null; + if (canSetSetupRef(oldRef)) { + setupState[oldRef] = null; + } + } else if (isRef(oldRef)) { + oldRef.value = null; + } + } + if (isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = isString(ref); + const _isRef = isRef(ref); + if (_isString || _isRef) { + const doSet = () => { + if (rawRef.f) { + const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + isArray(existing) && remove(existing, refValue); + } else { + if (!isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (canSetSetupRef(ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); + } + } + } else if (_isString) { + refs[ref] = value; + if (canSetSetupRef(ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) refs[rawRef.k] = value; + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + }; + if (value) { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } else { + doSet(); + } + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + } + } + + let hasLoggedMismatchError = false; + const logMismatchError = () => { + if (hasLoggedMismatchError) { + return; + } + console.error("Hydration completed but contains mismatches."); + hasLoggedMismatchError = true; + }; + const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; + const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); + const getContainerType = (container) => { + if (container.nodeType !== 1) return void 0; + if (isSVGContainer(container)) return "svg"; + if (isMathMLContainer(container)) return "mathml"; + return void 0; + }; + const isComment = (node) => node.nodeType === 8; + function createHydrationFunctions(rendererInternals) { + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment + } + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + warn$1( + `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` + ); + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; + } + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; + }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + optimized = optimized || !!vnode.dynamicChildren; + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + { + def(node, "__vnode", vnode, true); + def(node, "__vueParentComponent", parentComponent, true); + } + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { + warn$1( + `Hydration text mismatch in`, + node.parentNode, + ` + - rendered on server: ${JSON.stringify( + node.data + )} + - expected on client: ${JSON.stringify(vnode.children)}` + ); + logMismatchError(); + node.data = vnode.children; + } + nextNode = nextSibling(node); + } + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 || domType === 3) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else { + warn$1("Invalid HostVNode type:", type, `(${typeof type})`); + } + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; + }; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition( + null, + // no need check parentSuspense in hydration + transition + ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + let hasWarned = false; + while (next) { + if (!isMismatchAllowed(el, 1 /* CHILDREN */)) { + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + el, + ` +Server rendered element contains more child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + let clientText = vnode.children; + if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) { + clientText = clientText.slice(1); + } + if (el.textContent !== clientText) { + if (!isMismatchAllowed(el, 0 /* TEXT */)) { + warn$1( + `Hydration text content mismatch on`, + el, + ` + - rendered on server: ${el.textContent} + - expected on client: ${vnode.children}` + ); + logMismatchError(); + } + el.textContent = vnode.children; + } + } + if (props) { + { + const isCustomElement = el.tagName.includes("-"); + for (const key in props) { + if (// #11189 skip if this node has directives that have created hooks + // as it could have mutated the DOM in any possible way + !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) { + logMismatchError(); + } + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === "." || isCustomElement) { + patchProp(el, key, null, props[key], void 0, parentComponent); + } + } + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + } + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + let hasWarned = false; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + const isText = vnode.type === Text; + if (node) { + if (isText && !optimized) { + if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) { + insert( + createText( + node.data.slice(vnode.children.length) + ), + container, + nextSibling(node) + ); + node.data = vnode.children; + } + } + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (isText && !vnode.children) { + insert(vnode.el = createText(""), container); + } else { + if (!isMismatchAllowed(container, 1 /* CHILDREN */)) { + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + container, + ` +Server rendered element contains fewer child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + } + } + return node; + }; + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); + } else { + logMismatchError(); + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) { + warn$1( + `Hydration node mismatch: +- rendered on server:`, + node, + node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, + ` +- expected on client:`, + vnode.type + ); + logMismatchError(); + } + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; + } + } + } + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + if (parentComponent) { + parentComponent.vnode.el = vnode.el; + updateHOCHostEl(parentComponent, vnode.el); + } + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } + } + } + } + return node; + }; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 && node.tagName === "TEMPLATE"; + }; + return [hydrate, hydrateNode]; + } + function propHasMismatch(el, key, clientValue, vnode, instance) { + let mismatchType; + let mismatchKey; + let actual; + let expected; + if (key === "class") { + actual = el.getAttribute("class"); + expected = normalizeClass(clientValue); + if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { + mismatchType = 2 /* CLASS */; + mismatchKey = `class`; + } + } else if (key === "style") { + actual = el.getAttribute("style") || ""; + expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); + const actualMap = toStyleMap(actual); + const expectedMap = toStyleMap(expected); + if (vnode.dirs) { + for (const { dir, value } of vnode.dirs) { + if (dir.name === "show" && !value) { + expectedMap.set("display", "none"); + } + } + } + if (instance) { + resolveCssVars(instance, vnode, expectedMap); + } + if (!isMapEqual(actualMap, expectedMap)) { + mismatchType = 3 /* STYLE */; + mismatchKey = "style"; + } + } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { + if (isBooleanAttr(key)) { + actual = el.hasAttribute(key); + expected = includeBooleanAttr(clientValue); + } else if (clientValue == null) { + actual = el.hasAttribute(key); + expected = false; + } else { + if (el.hasAttribute(key)) { + actual = el.getAttribute(key); + } else if (key === "value" && el.tagName === "TEXTAREA") { + actual = el.value; + } else { + actual = false; + } + expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; + } + if (actual !== expected) { + mismatchType = 4 /* ATTRIBUTE */; + mismatchKey = key; + } + } + if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) { + const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; + const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`; + const postSegment = ` + - rendered on server: ${format(actual)} + - expected on client: ${format(expected)} + Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. + You should fix the source of the mismatch.`; + { + warn$1(preSegment, el, postSegment); + } + return true; + } + return false; + } + function toClassSet(str) { + return new Set(str.trim().split(/\s+/)); + } + function isSetEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const s of a) { + if (!b.has(s)) { + return false; + } + } + return true; + } + function toStyleMap(str) { + const styleMap = /* @__PURE__ */ new Map(); + for (const item of str.split(";")) { + let [key, value] = item.split(":"); + key = key.trim(); + value = value && value.trim(); + if (key && value) { + styleMap.set(key, value); + } + } + return styleMap; + } + function isMapEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const [key, value] of a) { + if (value !== b.get(key)) { + return false; + } + } + return true; + } + function resolveCssVars(instance, vnode, expectedMap) { + const root = instance.subTree; + if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) { + const cssVars = instance.getCssVars(); + for (const key in cssVars) { + expectedMap.set( + `--${getEscapedCssVarName(key)}`, + String(cssVars[key]) + ); + } + } + if (vnode === root && instance.parent) { + resolveCssVars(instance.parent, instance.vnode, expectedMap); + } + } + const allowMismatchAttr = "data-allow-mismatch"; + const MismatchTypeString = { + [0 /* TEXT */]: "text", + [1 /* CHILDREN */]: "children", + [2 /* CLASS */]: "class", + [3 /* STYLE */]: "style", + [4 /* ATTRIBUTE */]: "attribute" + }; + function isMismatchAllowed(el, allowedType) { + if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) { + while (el && !el.hasAttribute(allowMismatchAttr)) { + el = el.parentElement; + } + } + const allowedAttr = el && el.getAttribute(allowMismatchAttr); + if (allowedAttr == null) { + return false; + } else if (allowedAttr === "") { + return true; + } else { + const list = allowedAttr.split(","); + if (allowedType === 0 /* TEXT */ && list.includes("children")) { + return true; + } + return allowedAttr.split(",").includes(MismatchTypeString[allowedType]); + } + } + + const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1)); + const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id)); + const hydrateOnIdle = (timeout = 1e4) => (hydrate) => { + const id = requestIdleCallback(hydrate, { timeout }); + return () => cancelIdleCallback(id); + }; + function elementIsVisibleInViewport(el) { + const { top, left, bottom, right } = el.getBoundingClientRect(); + const { innerHeight, innerWidth } = window; + return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth); + } + const hydrateOnVisible = (opts) => (hydrate, forEach) => { + const ob = new IntersectionObserver((entries) => { + for (const e of entries) { + if (!e.isIntersecting) continue; + ob.disconnect(); + hydrate(); + break; + } + }, opts); + forEach((el) => { + if (!(el instanceof Element)) return; + if (elementIsVisibleInViewport(el)) { + hydrate(); + ob.disconnect(); + return false; + } + ob.observe(el); + }); + return () => ob.disconnect(); + }; + const hydrateOnMediaQuery = (query) => (hydrate) => { + if (query) { + const mql = matchMedia(query); + if (mql.matches) { + hydrate(); + } else { + mql.addEventListener("change", hydrate, { once: true }); + return () => mql.removeEventListener("change", hydrate); + } + } + }; + const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => { + if (isString(interactions)) interactions = [interactions]; + let hasHydrated = false; + const doHydrate = (e) => { + if (!hasHydrated) { + hasHydrated = true; + teardown(); + hydrate(); + e.target.dispatchEvent(new e.constructor(e.type, e)); + } + }; + const teardown = () => { + forEach((el) => { + for (const i of interactions) { + el.removeEventListener(i, doHydrate); + } + }); + }; + forEach((el) => { + for (const i of interactions) { + el.addEventListener(i, doHydrate, { once: true }); + } + }); + return teardown; + }; + function forEachElement(node, cb) { + if (isComment(node) && node.data === "[") { + let depth = 1; + let next = node.nextSibling; + while (next) { + if (next.nodeType === 1) { + const result = cb(next); + if (result === false) { + break; + } + } else if (isComment(next)) { + if (next.data === "]") { + if (--depth === 0) break; + } else if (next.data === "[") { + depth++; + } + } + next = next.nextSibling; + } + } else { + cb(node); + } + } + + const isAsyncWrapper = (i) => !!i.type.__asyncLoader; + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function defineAsyncComponent(source) { + if (isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + hydrate: hydrateStrategy, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve, reject) => { + const userRetry = () => resolve(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (!comp) { + warn$1( + `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` + ); + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + if (comp && !isObject(comp) && !isFunction(comp)) { + throw new Error(`Invalid async component load result: ${comp}`); + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + __asyncHydrate(el, instance, hydrate) { + const doHydrate = hydrateStrategy ? () => { + const teardown = hydrateStrategy( + hydrate, + (cb) => forEachElement(el, cb) + ); + if (teardown) { + (instance.bum || (instance.bum = [])).push(teardown); + } + } : hydrate; + if (resolvedComp) { + doHydrate(); + } else { + load().then(() => !instance.isUnmounted && doHydrate()); + } + }, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + markAsyncBoundary(instance); + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { + pendingRequest = null; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || false) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = ref(false); + const error = ref(); + const delayed = ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.update(); + } + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); + } + function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; + } + + const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; + const KeepAliveImpl = { + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + { + instance.__v_cache = cache; + } + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + invalidateMount(instance2.m); + invalidateMount(instance2.a); + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && !filter(name)) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (cached && (!current || !isSameVNodeType(cached, current))) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + if (isSuspense(instance.subTree.type)) { + queuePostRenderEffect(() => { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + }, instance.subTree.suspense); + } else { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return current = null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + { + warn$1(`KeepAlive should contain exactly one component child.`); + } + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + if (vnode.type === Comment) { + current = null; + return vnode; + } + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + vnode.shapeFlag &= ~256; + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } + }; + const KeepAlive = KeepAliveImpl; + function matches(pattern, name) { + if (isArray(pattern)) { + return pattern.some((p) => matches(p, name)); + } else if (isString(pattern)) { + return pattern.split(",").includes(name); + } else if (isRegExp(pattern)) { + pattern.lastIndex = 0; + return pattern.test(name); + } + return false; + } + function onActivated(hook, target) { + registerKeepAliveHook(hook, "a", target); + } + function onDeactivated(hook, target) { + registerKeepAliveHook(hook, "da", target); + } + function registerKeepAliveHook(hook, type, target = currentInstance) { + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; + } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } + } + function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + remove(keepAliveRoot[type], injected); + }, target); + } + function resetShapeFlag(vnode) { + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; + } + function getInnerChild(vnode) { + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; + } + + function injectHook(type, hook, target = currentInstance, prepend = false) { + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); + } + return wrappedHook; + } else { + const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) + ); + } + } + const createHook = (lifecycle) => (hook, target = currentInstance) => { + if (!isInSSRComponentSetup || lifecycle === "sp") { + injectHook(lifecycle, (...args) => hook(...args), target); + } + }; + const onBeforeMount = createHook("bm"); + const onMounted = createHook("m"); + const onBeforeUpdate = createHook( + "bu" + ); + const onUpdated = createHook("u"); + const onBeforeUnmount = createHook( + "bum" + ); + const onUnmounted = createHook("um"); + const onServerPrefetch = createHook( + "sp" + ); + const onRenderTriggered = createHook("rtg"); + const onRenderTracked = createHook("rtc"); + function onErrorCaptured(hook, target = currentInstance) { + injectHook("ec", hook, target); + } + + const COMPONENTS = "components"; + const DIRECTIVES = "directives"; + function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; + } + const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); + function resolveDynamicComponent(component) { + if (isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } + } + function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); + } + function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else { + warn$1( + `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } + } + function resolve(registry, name) { + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); + } + + function renderList(source, renderItem, cache, index) { + let ret; + const cached = cache && cache[index]; + const sourceIsArray = isArray(source); + if (sourceIsArray || isString(source)) { + const sourceIsReactiveArray = sourceIsArray && isReactive(source); + let needsWrap = false; + if (sourceIsReactiveArray) { + needsWrap = !isShallow(source); + source = shallowReadArray(source); + } + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem( + needsWrap ? toReactive(source[i]) : source[i], + i, + void 0, + cached && cached[i] + ); + } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn$1(`The v-for range expect an integer value but got ${source}.`); + } + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); + } + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } + } + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; + } + + function createSlots(slots, dynamicSlots) { + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) res.key = slot.key; + return res; + } : slot.fn; + } + } + return slots; + } + + function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) { + if (name !== "default") props.name = name; + return openBlock(), createBlock( + Fragment, + null, + [createVNode("slot", props, fallback && fallback())], + 64 + ); + } + let slot = slots[name]; + if (slot && slot.length > 1) { + warn$1( + `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` + ); + slot = () => []; + } + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key; + const rendered = createBlock( + Fragment, + { + key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content + (!validSlotContent && fallback ? "_fb" : "") + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; + } + function ensureValidVNode(vnodes) { + return vnodes.some((child) => { + if (!isVNode(child)) return true; + if (child.type === Comment) return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; + } + + function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + if (!isObject(obj)) { + warn$1(`v-on with no argument expects an object value.`); + return ret; + } + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; + } + return ret; + } + + const getPublicInstance = (i) => { + if (!i) return null; + if (isStatefulComponent(i)) return getComponentPublicInstance(i); + return getPublicInstance(i.parent); + }; + const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => shallowReadonly(i.props) , + $attrs: (i) => shallowReadonly(i.attrs) , + $slots: (i) => shallowReadonly(i.slots) , + $refs: (i) => shallowReadonly(i.refs) , + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $host: (i) => i.ce, + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i) , + $forceUpdate: (i) => i.f || (i.f = () => { + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) + ); + const isReservedPrefix = (key) => key === "_" || key === "$"; + const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); + const PublicInstanceProxyHandlers = { + get({ _: instance }, key) { + if (key === "__v_skip") { + return true; + } + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (key === "__isVue") { + return true; + } + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance.attrs, "get", ""); + markAttrsAccessed(); + } else if (key === "$slots") { + track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); + return false; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + data[key] = value; + return true; + } else if (hasOwn(instance.props, key)) { + warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + warn$1( + `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` + ); + return false; + } else { + if (key in instance.appContext.config.globalProperties) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + value + }); + } else { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } + }; + { + PublicInstanceProxyHandlers.ownKeys = (target) => { + warn$1( + `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` + ); + return Reflect.ownKeys(target); + }; + } + const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, { + get(target, key) { + if (key === Symbol.unscopables) { + return; + } + return PublicInstanceProxyHandlers.get(target, key, target); + }, + has(_, key) { + const has = key[0] !== "_" && !isGloballyAllowed(key); + if (!has && PublicInstanceProxyHandlers.has(_, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} should not start with _ which is a reserved prefix for Vue internals.` + ); + } + return has; + } + }); + function createDevRenderContext(instance) { + const target = {}; + Object.defineProperty(target, `_`, { + configurable: true, + enumerable: false, + get: () => instance + }); + Object.keys(publicPropertiesMap).forEach((key) => { + Object.defineProperty(target, key, { + configurable: true, + enumerable: false, + get: () => publicPropertiesMap[key](instance), + // intercepted by the proxy so no need for implementation, + // but needed to prevent set errors + set: NOOP + }); + }); + return target; + } + function exposePropsOnRenderContext(instance) { + const { + ctx, + propsOptions: [propsOptions] + } = instance; + if (propsOptions) { + Object.keys(propsOptions).forEach((key) => { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => instance.props[key], + set: NOOP + }); + }); + } + } + function exposeSetupStateOnRenderContext(instance) { + const { ctx, setupState } = instance; + Object.keys(toRaw(setupState)).forEach((key) => { + if (!setupState.__isScriptSetup) { + if (isReservedPrefix(key[0])) { + warn$1( + `setup() return property ${JSON.stringify( + key + )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` + ); + return; + } + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => setupState[key], + set: NOOP + }); + } + }); + } + + const warnRuntimeUsage = (method) => warn$1( + `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` + ); + function defineProps() { + { + warnRuntimeUsage(`defineProps`); + } + return null; + } + function defineEmits() { + { + warnRuntimeUsage(`defineEmits`); + } + return null; + } + function defineExpose(exposed) { + { + warnRuntimeUsage(`defineExpose`); + } + } + function defineOptions(options) { + { + warnRuntimeUsage(`defineOptions`); + } + } + function defineSlots() { + { + warnRuntimeUsage(`defineSlots`); + } + return null; + } + function defineModel() { + { + warnRuntimeUsage("defineModel"); + } + } + function withDefaults(props, defaults) { + { + warnRuntimeUsage(`withDefaults`); + } + return null; + } + function useSlots() { + return getContext().slots; + } + function useAttrs() { + return getContext().attrs; + } + function getContext() { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useContext() called without active instance.`); + } + return i.setupContext || (i.setupContext = createSetupContext(i)); + } + function normalizePropsOrEmits(props) { + return isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; + } + function mergeDefaults(raw, defaults) { + const props = normalizePropsOrEmits(raw); + for (const key in defaults) { + if (key.startsWith("__skip")) continue; + let opt = props[key]; + if (opt) { + if (isArray(opt) || isFunction(opt)) { + opt = props[key] = { type: opt, default: defaults[key] }; + } else { + opt.default = defaults[key]; + } + } else if (opt === null) { + opt = props[key] = { default: defaults[key] }; + } else { + warn$1(`props default key "${key}" has no corresponding declaration.`); + } + if (opt && defaults[`__skip_${key}`]) { + opt.skipFactory = true; + } + } + return props; + } + function mergeModels(a, b) { + if (!a || !b) return a || b; + if (isArray(a) && isArray(b)) return a.concat(b); + return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); + } + function createPropsRestProxy(props, excludedKeys) { + const ret = {}; + for (const key in props) { + if (!excludedKeys.includes(key)) { + Object.defineProperty(ret, key, { + enumerable: true, + get: () => props[key] + }); + } + } + return ret; + } + function withAsyncContext(getAwaitable) { + const ctx = getCurrentInstance(); + if (!ctx) { + warn$1( + `withAsyncContext called without active current instance. This is likely a bug.` + ); + } + let awaitable = getAwaitable(); + unsetCurrentInstance(); + if (isPromise(awaitable)) { + awaitable = awaitable.catch((e) => { + setCurrentInstance(ctx); + throw e; + }); + } + return [awaitable, () => setCurrentInstance(ctx)]; + } + + function createDuplicateChecker() { + const cache = /* @__PURE__ */ Object.create(null); + return (type, key) => { + if (cache[key]) { + warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); + } else { + cache[key] = type; + } + }; + } + let shouldCacheAccess = true; + function applyOptions(instance) { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook$1(options.beforeCreate, instance, "bc"); + } + const { + // state + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, + // lifecycle + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, + // public API + expose, + inheritAttrs, + // assets + components, + directives, + filters + } = options; + const checkDuplicateProperties = createDuplicateChecker() ; + { + const [propsOptions] = instance.propsOptions; + if (propsOptions) { + for (const key in propsOptions) { + checkDuplicateProperties("Props" /* PROPS */, key); + } + } + } + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (isFunction(methodHandler)) { + { + Object.defineProperty(ctx, key, { + value: methodHandler.bind(publicThis), + configurable: true, + enumerable: true, + writable: true + }); + } + { + checkDuplicateProperties("Methods" /* METHODS */, key); + } + } else { + warn$1( + `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` + ); + } + } + } + if (dataOptions) { + if (!isFunction(dataOptions)) { + warn$1( + `The data option must be a function. Plain object usage is no longer supported.` + ); + } + const data = dataOptions.call(publicThis, publicThis); + if (isPromise(data)) { + warn$1( + `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` + ); + } + if (!isObject(data)) { + warn$1(`data() should return an object.`); + } else { + instance.data = reactive(data); + { + for (const key in data) { + checkDuplicateProperties("Data" /* DATA */, key); + if (!isReservedPrefix(key[0])) { + Object.defineProperty(ctx, key, { + configurable: true, + enumerable: true, + get: () => data[key], + set: NOOP + }); + } + } + } + } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + if (get === NOOP) { + warn$1(`Computed property "${key}" has no getter.`); + } + const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => { + warn$1( + `Write operation failed: computed property "${key}" is readonly.` + ); + } ; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + { + checkDuplicateProperties("Computed" /* COMPUTED */, key); + } + } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook$1(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val + }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; + } + } + if (render && instance.render === NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) instance.components = components; + if (directives) instance.directives = directives; + } + function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { + if (isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); + } + if (isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; + } + { + checkDuplicateProperties("Inject" /* INJECT */, key); + } + } + } + function callHook$1(hook, instance, type) { + callWithAsyncErrorHandling( + isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); + } + function createWatcher(raw, ctx, publicThis, key) { + let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (isString(raw)) { + const handler = ctx[raw]; + if (isFunction(handler)) { + { + watch(getter, handler); + } + } else { + warn$1(`Invalid watch handler specified by key "${raw}"`, handler); + } + } else if (isFunction(raw)) { + { + watch(getter, raw.bind(publicThis)); + } + } else if (isObject(raw)) { + if (isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (isFunction(handler)) { + watch(getter, handler, raw); + } else { + warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); + } + } + } else { + warn$1(`Invalid watch option: "${key}"`, raw); + } + } + function resolveMergedOptions(instance) { + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; + } + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); + } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (isObject(base)) { + cache.set(base, resolved); + } + return resolved; + } + function mergeOptions(to, from, strats, asMixin = false) { + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") { + warn$1( + `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` + ); + } else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; + } + } + return to; + } + const internalOptionMergeStrats = { + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray, + created: mergeAsArray, + beforeMount: mergeAsArray, + mounted: mergeAsArray, + beforeUpdate: mergeAsArray, + updated: mergeAsArray, + beforeDestroy: mergeAsArray, + beforeUnmount: mergeAsArray, + destroyed: mergeAsArray, + unmounted: mergeAsArray, + activated: mergeAsArray, + deactivated: mergeAsArray, + errorCaptured: mergeAsArray, + serverPrefetch: mergeAsArray, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject + }; + function mergeDataFn(to, from) { + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (extend)( + isFunction(to) ? to.call(this, this) : to, + isFunction(from) ? from.call(this, this) : from + ); + }; + } + function mergeInject(to, from) { + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); + } + function normalizeInject(raw) { + if (isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; + } + return res; + } + return raw; + } + function mergeAsArray(to, from) { + return to ? [...new Set([].concat(to, from))] : from; + } + function mergeObjectOptions(to, from) { + return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; + } + function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (isArray(to) && isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } + } + function mergeWatchOptions(to, from) { + if (!to) return from; + if (!from) return to; + const merged = extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray(to[key], from[key]); + } + return merged; + } + + function createAppContext() { + return { + app: null, + config: { + isNativeTag: NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; + } + let uid$1 = 0; + function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!isFunction(rootComponent)) { + rootComponent = extend({}, rootComponent); + } + if (rootProps != null && !isObject(rootProps)) { + warn$1(`root props passed to app.mount() must be an object.`); + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + const pluginCleanupFns = []; + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + { + warn$1( + `app.config cannot be replaced. Modify individual options instead.` + ); + } + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) { + warn$1(`Plugin has already been applied to target app.`); + } else if (plugin && isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else { + warn$1( + `A plugin must either be a function or an object with an "install" function.` + ); + } + return app; + }, + mixin(mixin) { + { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } else { + warn$1( + "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") + ); + } + } + return app; + }, + component(name, component) { + { + validateComponentName(name, context.config); + } + if (!component) { + return context.components[name]; + } + if (context.components[name]) { + warn$1(`Component "${name}" has already been registered in target app.`); + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + { + validateDirectiveName(name); + } + if (!directive) { + return context.directives[name]; + } + if (context.directives[name]) { + warn$1(`Directive "${name}" has already been registered in target app.`); + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + if (rootContainer.__vue_app__) { + warn$1( + `There is already an app instance mounted on the host container. + If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` + ); + } + const vnode = app._ceVNode || createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + { + context.reload = () => { + render( + cloneVNode(vnode), + rootContainer, + namespace + ); + }; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + { + app._instance = vnode.component; + devtoolsInitApp(app, version); + } + return getComponentPublicInstance(vnode.component); + } else { + warn$1( + `App has already been mounted. +If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` + ); + } + }, + onUnmount(cleanupFn) { + if (typeof cleanupFn !== "function") { + warn$1( + `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}` + ); + } + pluginCleanupFns.push(cleanupFn); + }, + unmount() { + if (isMounted) { + callWithAsyncErrorHandling( + pluginCleanupFns, + app._instance, + 16 + ); + render(null, app._container); + { + app._instance = null; + devtoolsUnmountApp(app); + } + delete app._container.__vue_app__; + } else { + warn$1(`Cannot unmount an app that is not mounted.`); + } + }, + provide(key, value) { + if (key in context.provides) { + warn$1( + `App already provides property with key "${String(key)}". It will be overwritten with the new value.` + ); + } + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + const lastApp = currentApp; + currentApp = app; + try { + return fn(); + } finally { + currentApp = lastApp; + } + } + }; + return app; + }; + } + let currentApp = null; + + function provide(key, value) { + if (!currentInstance) { + { + warn$1(`provide() can only be used inside setup().`); + } + } else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); + } + provides[key] = value; + } + } + function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else { + warn$1(`injection "${String(key)}" not found.`); + } + } else { + warn$1(`inject() can only be used inside setup() or functional components.`); + } + } + function hasInjectionContext() { + return !!(currentInstance || currentRenderingInstance || currentApp); + } + + const internalObjectProto = {}; + const createInternalObject = () => Object.create(internalObjectProto); + const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; + + function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = createInternalObject(); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + { + validateProps(rawProps || {}, props, instance); + } + if (isStateful) { + instance.props = isSSR ? props : shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; + } + function isInHmrContext(instance) { + while (instance) { + if (instance.type.__hmrId) return true; + instance = instance.parent; + } + } + function updateProps(instance, rawProps, rawPrevProps, optimized) { + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( + // always force full diff in dev + // - #1942 if hmr is enabled with sfc component + // - vite#872 non-sfc component used by sfc component + !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; + } + const value = rawProps[key]; + if (options) { + if (hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; + } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; + } + } + } + } + if (hasAttrsChanged) { + trigger(instance.attrs, "set", ""); + } + { + validateProps(rawProps || {}, props, instance); + } + } + function setFullProps(instance, rawProps, props, attrs) { + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && hasOwn(options, camelKey = camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; + } + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + if (needCastKeys) { + const rawCurrentProps = toRaw(props); + const castValues = rawCastValues || EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; + } + function resolvePropValue(options, props, key, value, instance, isAbsent) { + const opt = options[key]; + if (opt != null) { + const hasDefault = hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); + } + } else { + value = defaultValue; + } + if (instance.ce) { + instance.ce._setProp(key, value); + } + } + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { + value = true; + } + } + } + return value; + } + const mixinPropsCache = /* @__PURE__ */ new WeakMap(); + function normalizePropsOptions(comp, appContext, asMixin = false) { + const cache = asMixin ? mixinPropsCache : appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (!isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + extend(normalized, props); + if (keys) needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); + } + if (comp.extends) { + extendProps(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendProps); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, EMPTY_ARR); + } + return EMPTY_ARR; + } + if (isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + if (!isString(raw[i])) { + warn$1(`props must be strings when using array syntax.`, raw[i]); + } + const normalizedKey = camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = EMPTY_OBJ; + } + } + } else if (raw) { + if (!isObject(raw)) { + warn$1(`invalid props options`, raw); + } + for (const key in raw) { + const normalizedKey = camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); + const propType = prop.type; + let shouldCast = false; + let shouldCastTrue = true; + if (isArray(propType)) { + for (let index = 0; index < propType.length; ++index) { + const type = propType[index]; + const typeName = isFunction(type) && type.name; + if (typeName === "Boolean") { + shouldCast = true; + break; + } else if (typeName === "String") { + shouldCastTrue = false; + } + } + } else { + shouldCast = isFunction(propType) && propType.name === "Boolean"; + } + prop[0 /* shouldCast */] = shouldCast; + prop[1 /* shouldCastTrue */] = shouldCastTrue; + if (shouldCast || hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + const res = [normalized, needCastKeys]; + if (isObject(comp)) { + cache.set(comp, res); + } + return res; + } + function validatePropName(key) { + if (key[0] !== "$" && !isReservedProp(key)) { + return true; + } else { + warn$1(`Invalid prop name: "${key}" is a reserved property.`); + } + return false; + } + function getType(ctor) { + if (ctor === null) { + return "null"; + } + if (typeof ctor === "function") { + return ctor.name || ""; + } else if (typeof ctor === "object") { + const name = ctor.constructor && ctor.constructor.name; + return name || ""; + } + return ""; + } + function validateProps(rawProps, props, instance) { + const resolvedValues = toRaw(props); + const options = instance.propsOptions[0]; + const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key)); + for (const key in options) { + let opt = options[key]; + if (opt == null) continue; + validateProp( + key, + resolvedValues[key], + opt, + shallowReadonly(resolvedValues) , + !camelizePropsKey.includes(key) + ); + } + } + function validateProp(name, value, prop, props, isAbsent) { + const { type, required, validator, skipCheck } = prop; + if (required && isAbsent) { + warn$1('Missing required prop: "' + name + '"'); + return; + } + if (value == null && !required) { + return; + } + if (type != null && type !== true && !skipCheck) { + let isValid = false; + const types = isArray(type) ? type : [type]; + const expectedTypes = []; + for (let i = 0; i < types.length && !isValid; i++) { + const { valid, expectedType } = assertType(value, types[i]); + expectedTypes.push(expectedType || ""); + isValid = valid; + } + if (!isValid) { + warn$1(getInvalidTypeMessage(name, value, expectedTypes)); + return; + } + } + if (validator && !validator(value, props)) { + warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + } + } + const isSimpleType = /* @__PURE__ */ makeMap( + "String,Number,Boolean,Function,Symbol,BigInt" + ); + function assertType(value, type) { + let valid; + const expectedType = getType(type); + if (expectedType === "null") { + valid = value === null; + } else if (isSimpleType(expectedType)) { + const t = typeof value; + valid = t === expectedType.toLowerCase(); + if (!valid && t === "object") { + valid = value instanceof type; + } + } else if (expectedType === "Object") { + valid = isObject(value); + } else if (expectedType === "Array") { + valid = isArray(value); + } else { + valid = value instanceof type; + } + return { + valid, + expectedType + }; + } + function getInvalidTypeMessage(name, value, expectedTypes) { + if (expectedTypes.length === 0) { + return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; + } + let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; + const expectedType = expectedTypes[0]; + const receivedType = toRawType(value); + const expectedValue = styleValue(value, expectedType); + const receivedValue = styleValue(value, receivedType); + if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { + message += ` with value ${expectedValue}`; + } + message += `, got ${receivedType} `; + if (isExplicable(receivedType)) { + message += `with value ${receivedValue}.`; + } + return message; + } + function styleValue(value, type) { + if (type === "String") { + return `"${value}"`; + } else if (type === "Number") { + return `${Number(value)}`; + } else { + return `${value}`; + } + } + function isExplicable(type) { + const explicitTypes = ["string", "number", "boolean"]; + return explicitTypes.some((elem) => type.toLowerCase() === elem); + } + function isBoolean(...args) { + return args.some((elem) => elem.toLowerCase() === "boolean"); + } + + const isInternalKey = (key) => key[0] === "_" || key === "$stable"; + const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; + const normalizeSlot = (key, rawSlot, ctx) => { + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { + warn$1( + `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` + ); + } + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; + }; + const normalizeObjectSlots = (rawSlots, slots, instance) => { + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) continue; + const value = rawSlots[key]; + if (isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + { + warn$1( + `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; + } + } + }; + const normalizeVNodeSlots = (instance, children) => { + if (!isKeepAlive(instance.vnode) && true) { + warn$1( + `Non-function value encountered for default slot. Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; + }; + const assignSlots = (slots, children, optimized) => { + for (const key in children) { + if (optimized || key !== "_") { + slots[key] = children[key]; + } + } + }; + const initSlots = (instance, children, optimized) => { + const slots = instance.slots = createInternalObject(); + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + assignSlots(slots, children, optimized); + if (optimized) { + def(slots, "_", type, true); + } + } else { + normalizeObjectSlots(children, slots); + } + } else if (children) { + normalizeVNodeSlots(instance, children); + } + }; + const updateSlots = (instance, children, optimized) => { + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (isHmrUpdating) { + assignSlots(slots, children, optimized); + trigger(instance, "set", "$slots"); + } else if (optimized && type === 1) { + needDeletionCheck = false; + } else { + assignSlots(slots, children, optimized); + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); + } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } + } + } + }; + + let supported; + let perf; + function startMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + perf.mark(`vue-${type}-${instance.uid}`); + } + { + devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); + } + } + function endMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + const startTag = `vue-${type}-${instance.uid}`; + const endTag = startTag + `:end`; + perf.mark(endTag); + perf.measure( + `<${formatComponentName(instance, instance.type)}> ${type}`, + startTag, + endTag + ); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + } + { + devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); + } + } + function isSupported() { + if (supported !== void 0) { + return supported; + } + if (typeof window !== "undefined" && window.performance) { + supported = true; + perf = window.performance; + } else { + supported = false; + } + return supported; + } + + const queuePostRenderEffect = queueEffectWithSuspense ; + function createRenderer(options) { + return baseCreateRenderer(options); + } + function createHydrationRenderer(options) { + return baseCreateRenderer(options, createHydrationFunctions); + } + function baseCreateRenderer(options, createHydrationFns) { + const target = getGlobalThis(); + target.__VUE__ = true; + { + setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + } + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { + if (n1 === n2) { + return; + } + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: + if (n1 == null) { + mountStaticNode(n2, container, anchor, namespace); + } else { + patchStaticNode(n1, n2, container, namespace); + } + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else { + warn$1("Invalid VNode type:", type, `(${typeof type})`); + } + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const patchStaticNode = (n1, n2, container, namespace) => { + if (n2.children !== n1.children) { + const anchor = hostNextSibling(n1.anchor); + removeStaticNode(n1); + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace + ); + } else { + n2.el = n1.el; + n2.anchor = n1.anchor; + } + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !isReservedProp(key)) { + hostPatchProp(el, key, null, props[key], namespace, parentComponent); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + { + def(el, "__vnode", vnode, true); + def(el, "__vueParentComponent", parentComponent, true); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { + subTree = filterSingleRoot(subTree.children) || subTree; + } + if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + { + el.__vnode = n2; + } + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || EMPTY_OBJ; + const newProps = n2.props || EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (isHmrUpdating) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { + hostSetElementText(el, ""); + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + } + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); + } + } + } else if (!optimized && dynamicChildren == null) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== EMPTY_OBJ) { + for (const key in oldProps) { + if (!isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + parentComponent + ); + } + } + } + for (const key in newProps) { + if (isReservedProp(key)) continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if ( + // #5523 dev root fragment may inherit directives + isHmrUpdating || patchFlag & 2048 + ) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance( + initialVNode, + parentComponent, + parentSuspense + )); + if (instance.type.__hmrId) { + registerHMR(instance); + } + { + pushWarningContext(initialVNode); + startMeasure(instance, `mount`); + } + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } + { + { + startMeasure(instance, `init`); + } + setupComponent(instance, false, optimized); + { + endMeasure(instance, `init`); + } + } + if (instance.asyncDep) { + if (isHmrUpdating) initialVNode.el = null; + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); + } + { + popWarningContext(); + endMeasure(instance, `mount`); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + { + pushWarningContext(n2); + } + updateComponentPreRender(instance, n2, optimized); + { + popWarningContext(); + } + return; + } else { + instance.next = n2; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { + let vnodeHook; + const { el, props } = initialVNode; + const { bm, m, parent, root, type } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + invokeArrayFns(bm); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); + } + toggleRecurse(instance, true); + if (el && hydrateNode) { + const hydrateSubTree = () => { + { + startMeasure(instance, `render`); + } + instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `hydrate`); + } + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + { + endMeasure(instance, `hydrate`); + } + }; + if (isAsyncWrapperVNode && type.__asyncHydrate) { + type.__asyncHydrate( + el, + instance, + hydrateSubTree + ); + } else { + hydrateSubTree(); + } + } else { + if (root.ce) { + root.ce._injectChildStyle(type); + } + { + startMeasure(instance, `render`); + } + const subTree = instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `patch`); + } + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + initialVNode.el = subTree.el; + } + if (m) { + queuePostRenderEffect(m, parentSuspense); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); + } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); + } + instance.isMounted = true; + { + devtoolsComponentAdded(instance); + } + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); + return; + } + } + let originNext = next; + let vnodeHook; + { + pushWarningContext(next || instance.vnode); + } + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; + } + if (bu) { + invokeArrayFns(bu); + } + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); + } + toggleRecurse(instance, true); + { + startMeasure(instance, `render`); + } + const nextTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + const prevTree = instance.subTree; + instance.subTree = nextTree; + { + startMeasure(instance, `patch`); + } + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); + } + if (u) { + queuePostRenderEffect(u, parentSuspense); + } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); + } + { + devtoolsComponentUpdated(instance); + } + { + popWarningContext(); + } + } + }; + instance.scope.on(); + const effect = instance.effect = new ReactiveEffect(componentUpdateFn); + instance.scope.off(); + const update = instance.update = effect.run.bind(effect); + const job = instance.job = effect.runIfDirty.bind(effect); + job.i = instance; + job.id = instance.uid; + effect.scheduler = () => queueJob(job); + toggleRecurse(instance, true); + { + effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; + effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; + } + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + pauseTracking(); + flushPreFlushCbs(instance); + resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || EMPTY_ARR; + c2 = c2 || EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (nextChild.key != null) { + if (keyToNewIndexMap.has(nextChild.key)) { + warn$1( + `Duplicate keys found during update:`, + JSON.stringify(nextChild.key), + `Make sure keys are unique.` + ); + } + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs, + cacheIndex + } = vnode; + if (patchFlag === -2) { + optimized = false; + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (cacheIndex != null) { + parentComponent.renderCache[cacheIndex] = void 0; + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + internals, + doRemove + ); + } else if (dynamicChildren && // #5154 + // when v-once is used inside a block, setBlockTracking(-1) marks the + // parent block with hasOnce: true + // so that it doesn't take the fast path during unmount - otherwise + // components nested in v-once are never unmounted. + !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { + vnode.children.forEach((child) => { + if (child.type === Comment) { + hostRemove(child.el); + } else { + remove(child); + } + }); + } else { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } + }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + if (instance.type.__hmrId) { + unregisterHMR(instance); + } + const { bum, scope, job, subTree, um, m, a } = instance; + invalidateMount(m); + invalidateMount(a); + if (bum) { + invokeArrayFns(bum); + } + scope.stop(); + if (job) { + job.flags |= 8; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + { + devtoolsComponentRemoved(instance); + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + const el = hostNextSibling(vnode.anchor || vnode.el); + const teleportEnd = el && el[TeleportEndKey]; + return teleportEnd ? hostNextSibling(teleportEnd) : el; + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + container._vnode = vnode; + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + if (createHydrationFns) { + [hydrate, hydrateNode] = createHydrationFns( + internals + ); + } + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; + } + function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; + } + function toggleRecurse({ effect, job }, allowed) { + if (allowed) { + effect.flags |= 32; + job.flags |= 4; + } else { + effect.flags &= ~32; + job.flags &= ~4; + } + } + function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; + } + function traverseStaticChildren(n1, n2, shallow = false) { + const ch1 = n1.children; + const ch2 = n2.children; + if (isArray(ch1) && isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; + } + if (!shallow && c2.patchFlag !== -2) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } + if (c2.type === Comment && !c2.el) { + c2.el = c1.el; + } + } + } + } + function getSequence(arr) { + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; + } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } + } + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; + } + function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); + } + } + } + function invalidateMount(hooks) { + if (hooks) { + for (let i = 0; i < hooks.length; i++) + hooks[i].flags |= 8; + } + } + + const ssrContextKey = Symbol.for("v-scx"); + const useSSRContext = () => { + { + warn$1(`useSSRContext() is not supported in the global build.`); + } + }; + + function watchEffect(effect, options) { + return doWatch(effect, null, options); + } + function watchPostEffect(effect, options) { + return doWatch( + effect, + null, + extend({}, options, { flush: "post" }) + ); + } + function watchSyncEffect(effect, options) { + return doWatch( + effect, + null, + extend({}, options, { flush: "sync" }) + ); + } + function watch(source, cb, options) { + if (!isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); + } + function doWatch(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, flush, once } = options; + if (!cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + } + const baseWatchOptions = extend({}, options); + baseWatchOptions.onWarn = warn$1; + const instance = currentInstance; + baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args); + let isPre = false; + if (flush === "post") { + baseWatchOptions.scheduler = (job) => { + queuePostRenderEffect(job, instance && instance.suspense); + }; + } else if (flush !== "sync") { + isPre = true; + baseWatchOptions.scheduler = (job, isFirstRun) => { + if (isFirstRun) { + job(); + } else { + queueJob(job); + } + }; + } + baseWatchOptions.augmentJob = (job) => { + if (cb) { + job.flags |= 4; + } + if (isPre) { + job.flags |= 2; + if (instance) { + job.id = instance.uid; + job.i = instance; + } + } + }; + const watchHandle = watch$1(source, cb, baseWatchOptions); + return watchHandle; + } + function instanceWatch(source, value, options) { + const publicThis = this.proxy; + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; + } + function createPathGetter(ctx, path) { + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; + } + + function useModel(props, name, options = EMPTY_OBJ) { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useModel() called without active instance.`); + return ref(); + } + const camelizedName = camelize(name); + if (!i.propsOptions[0][camelizedName]) { + warn$1(`useModel() called with prop "${name}" which is not declared.`); + return ref(); + } + const hyphenatedName = hyphenate(name); + const modifiers = getModelModifiers(props, camelizedName); + const res = customRef((track, trigger) => { + let localValue; + let prevSetValue = EMPTY_OBJ; + let prevEmittedValue; + watchSyncEffect(() => { + const propValue = props[camelizedName]; + if (hasChanged(localValue, propValue)) { + localValue = propValue; + trigger(); + } + }); + return { + get() { + track(); + return options.get ? options.get(localValue) : localValue; + }, + set(value) { + const emittedValue = options.set ? options.set(value) : value; + if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) { + return; + } + const rawProps = i.vnode.props; + if (!(rawProps && // check if parent has passed v-model + (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) { + localValue = value; + trigger(); + } + i.emit(`update:${name}`, emittedValue); + if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) { + trigger(); + } + prevSetValue = value; + prevEmittedValue = emittedValue; + } + }; + }); + res[Symbol.iterator] = () => { + let i2 = 0; + return { + next() { + if (i2 < 2) { + return { value: i2++ ? modifiers || EMPTY_OBJ : res, done: false }; + } else { + return { done: true }; + } + } + }; + }; + return res; + } + const getModelModifiers = (props, modelName) => { + return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`]; + }; + + function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) return; + const props = instance.vnode.props || EMPTY_OBJ; + { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.` + ); + } + } else { + const validator = emitsOptions[event]; + if (isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } + } + } + } + } + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modifiers = isModelListener && getModelModifiers(props, event.slice(7)); + if (modifiers) { + if (modifiers.trim) { + args = rawArgs.map((a) => isString(a) ? a.trim() : a); + } + if (modifiers.number) { + args = rawArgs.map(looseToNumber); + } + } + { + devtoolsComponentEmit(instance, event, args); + } + { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( + event + )}" instead of "${event}".` + ); + } + } + let handlerName; + let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; + } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } + } + function normalizeEmitsOptions(comp, appContext, asMixin = false) { + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (!isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); + } + if (comp.extends) { + extendEmits(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendEmits); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); + } + return null; + } + if (isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { + cache.set(comp, normalized); + } + return normalized; + } + function isEmitListener(options, key) { + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); + } + + let accessedAttrs = false; + function markAttrsAccessed() { + accessedAttrs = true; + } + function renderComponentRoot(instance) { + const { + type: Component, + vnode, + proxy, + withProxy, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + props, + data, + setupState, + ctx, + inheritAttrs + } = instance; + const prev = setCurrentRenderingInstance(instance); + let result; + let fallthroughAttrs; + { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); + } + }) : proxyToUse; + result = normalizeVNode( + render.call( + thisProxy, + proxyToUse, + renderCache, + true ? shallowReadonly(props) : props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode( + render2.length > 1 ? render2( + true ? shallowReadonly(props) : props, + true ? { + get attrs() { + markAttrsAccessed(); + return shallowReadonly(attrs); + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + true ? shallowReadonly(props) : props, + null + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs, false, true); + } else if (!accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (isOn(key)) { + if (!isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); + } + } else { + extraAttrs.push(key); + } + } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.` + ); + } + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); + } + } + } + } + if (vnode.dirs) { + if (!isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); + } + root = cloneVNode(root, null, false, true); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!isElementRoot(root)) { + warn$1( + `Component inside <Transition> renders non-element root node that cannot be animated.` + ); + } + setTransitionHooks(root, vnode.transition); + } + if (setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance(prev); + return result; + } + const getChildRoot = (vnode) => { + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } + } + }; + return [normalizeVNode(childRoot), setRoot]; + }; + function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } + } + } + } else { + return; + } + } + return singleRoot; + } + const getFunctionalFallthrough = (attrs) => { + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || isOn(key)) { + (res || (res = {}))[key] = attrs[key]; + } + } + return res; + }; + const filterModelListeners = (attrs, props) => { + const res = {}; + for (const key in attrs) { + if (!isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; + } + } + return res; + }; + const isElementRoot = (vnode) => { + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; + }; + function shouldUpdateComponent(prevVNode, nextVNode, optimized) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if ((prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { + return true; + } + } + if (prevProps === nextProps) { + return false; + } + if (!prevProps) { + return !!nextProps; + } + if (!nextProps) { + return true; + } + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; + } + function hasPropsChanged(prevProps, nextProps, emitsOptions) { + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; + } + } + return false; + } + function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; + } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } + } + + const isSuspense = (type) => type.__isSuspense; + let suspenseId = 0; + const SuspenseImpl = { + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { + n2.suspense = n1.suspense; + n2.suspense.vnode = n2; + n2.el = n1.el; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + normalize: normalizeSuspenseChildren + }; + const Suspense = SuspenseImpl ; + function triggerEvent(vnode, name) { + const eventListener = vnode.props && vnode.props[name]; + if (isFunction(eventListener)) { + eventListener(); + } + } + function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } + } + function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } + } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); + } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); + } + } + } + } + } + let hasWarned = false; + function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + if (!hasWarned) { + hasWarned = true; + console[console.info ? "info" : "log"]( + `<Suspense> is an experimental feature and its API will likely change.` + ); + } + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; + } + } + const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; + { + assertNumber(timeout, `Suspense timeout`); + } + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + { + if (!resume && !suspense.pendingBranch) { + throw new Error( + `suspense.resolve() is called without a pending branch.` + ); + } + if (suspense.isUnmounted) { + throw new Error( + `suspense.resolve() is called on an already unmounted suspense boundary.` + ); + } + } + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) === container2) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect, optimized2) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + { + pushWarningContext(vnode2); + } + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized2 + ); + if (placeholder) { + remove(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + { + popWarningContext(); + } + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + } + }; + return suspense; + } + function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; + } + function normalizeSuspenseChildren(vnode) { + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); + } + function normalizeSuspenseSlot(s) { + let block; + if (isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); + } + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); + } + } + if (isArray(s)) { + const singleChild = filterSingleRoot(s); + if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { + warn$1(`<Suspense> slots expect a single root node.`); + } + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; + } + function queueEffectWithSuspense(fn, suspense) { + if (suspense && suspense.pendingBranch) { + if (isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); + } + } else { + queuePostFlushCb(fn); + } + } + function setActiveBranch(suspense, branch) { + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } + } + function isVNodeSuspensible(vnode) { + const suspensible = vnode.props && vnode.props.suspensible; + return suspensible != null && suspensible !== false; + } + + const Fragment = Symbol.for("v-fgt"); + const Text = Symbol.for("v-txt"); + const Comment = Symbol.for("v-cmt"); + const Static = Symbol.for("v-stc"); + const blockStack = []; + let currentBlock = null; + function openBlock(disableTracking = false) { + blockStack.push(currentBlock = disableTracking ? null : []); + } + function closeBlock() { + blockStack.pop(); + currentBlock = blockStack[blockStack.length - 1] || null; + } + let isBlockTreeEnabled = 1; + function setBlockTracking(value, inVOnce = false) { + isBlockTreeEnabled += value; + if (value < 0 && currentBlock && inVOnce) { + currentBlock.hasOnce = true; + } + } + function setupBlock(vnode) { + vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; + closeBlock(); + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(vnode); + } + return vnode; + } + function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { + return setupBlock( + createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + true + ) + ); + } + function createBlock(type, props, children, patchFlag, dynamicProps) { + return setupBlock( + createVNode( + type, + props, + children, + patchFlag, + dynamicProps, + true + ) + ); + } + function isVNode(value) { + return value ? value.__v_isVNode === true : false; + } + function isSameVNodeType(n1, n2) { + if (n2.shapeFlag & 6 && n1.component) { + const dirtyInstances = hmrDirtyComponents.get(n2.type); + if (dirtyInstances && dirtyInstances.has(n1.component)) { + n1.shapeFlag &= ~256; + n2.shapeFlag &= ~512; + return false; + } + } + return n1.type === n2.type && n1.key === n2.key; + } + let vnodeArgsTransformer; + function transformVNodeArgs(transformer) { + vnodeArgsTransformer = transformer; + } + const createVNodeWithArgsTransform = (...args) => { + return _createVNode( + ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args + ); + }; + const normalizeKey = ({ key }) => key != null ? key : null; + const normalizeRef = ({ + ref, + ref_key, + ref_for + }) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; + }; + function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetStart: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); + } + } else if (children) { + vnode.shapeFlag |= isString(children) ? 8 : 16; + } + if (vnode.key !== vnode.key) { + warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; + } + const createVNode = createVNodeWithArgsTransform ; + function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { + if (!type || type === NULL_DYNAMIC_COMPONENT) { + if (!type) { + warn$1(`Invalid vnode type when creating vnode: ${type}.`); + } + type = Comment; + } + if (isVNode(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); + } + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } + } + cloned.patchFlag = -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (isObject(style)) { + if (isProxy(style) && !isArray(style)) { + style = extend({}, style); + } + props.style = normalizeStyle(style); + } + } + const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; + if (shapeFlag & 4 && isProxy(type)) { + type = toRaw(type); + warn$1( + `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, + ` +Component that was made reactive: `, + type + ); + } + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); + } + function guardReactiveProps(props) { + if (!props) return null; + return isProxy(props) || isInternalObject(props) ? extend({}, props) : props; + } + function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) { + const { props, ref, patchFlag, children, transition } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, + target: vnode.target, + targetStart: vnode.targetStart, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + if (transition && cloneTransition) { + setTransitionHooks( + cloned, + transition.clone(cloned) + ); + } + return cloned; + } + function deepCloneVNode(vnode) { + const cloned = cloneVNode(vnode); + if (isArray(vnode.children)) { + cloned.children = vnode.children.map(deepCloneVNode); + } + return cloned; + } + function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); + } + function createStaticVNode(content, numberOfNodes) { + const vnode = createVNode(Static, null, content); + vnode.staticCount = numberOfNodes; + return vnode; + } + function createCommentVNode(text = "", asBlock = false) { + return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); + } + function normalizeVNode(child) { + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (isVNode(child)) { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } + } + function cloneIfMounted(child) { + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); + } + function normalizeChildren(vnode, children) { + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !isInternalObject(children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; + } + } + } + } else if (isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; + } + } + vnode.children = children; + vnode.shapeFlag |= type; + } + function mergeProps(...args) { + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = normalizeClass([ret.class, toMerge.class]); + } + } else if (key === "style") { + ret.style = normalizeStyle([ret.style, toMerge.style]); + } else if (isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } + } + } + return ret; + } + function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); + } + + const emptyAppContext = createAppContext(); + let uid = 0; + function createComponentInstance(vnode, parent, suspense) { + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + job: null, + scope: new EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + ids: parent ? parent.ids : ["", 0, 0], + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: EMPTY_OBJ, + data: EMPTY_OBJ, + props: EMPTY_OBJ, + attrs: EMPTY_OBJ, + slots: EMPTY_OBJ, + refs: EMPTY_OBJ, + setupState: EMPTY_OBJ, + setupContext: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + { + instance.ctx = createDevRenderContext(instance); + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; + } + let currentInstance = null; + const getCurrentInstance = () => currentInstance || currentRenderingInstance; + let internalSetCurrentInstance; + let setInSSRSetupState; + { + internalSetCurrentInstance = (i) => { + currentInstance = i; + }; + setInSSRSetupState = (v) => { + isInSSRComponentSetup = v; + }; + } + const setCurrentInstance = (instance) => { + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; + }; + const unsetCurrentInstance = () => { + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); + }; + const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); + function validateComponentName(name, { isNativeTag }) { + if (isBuiltInTag(name) || isNativeTag(name)) { + warn$1( + "Do not use built-in or reserved HTML elements as component id: " + name + ); + } + } + function isStatefulComponent(instance) { + return instance.vnode.shapeFlag & 4; + } + let isInSSRComponentSetup = false; + function setupComponent(instance, isSSR = false, optimized = false) { + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children, optimized); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; + } + function setupStatefulComponent(instance, isSSR) { + var _a; + const Component = instance.type; + { + if (Component.name) { + validateComponentName(Component.name, instance.appContext.config); + } + if (Component.components) { + const names = Object.keys(Component.components); + for (let i = 0; i < names.length; i++) { + validateComponentName(names[i], instance.appContext.config); + } + } + if (Component.directives) { + const names = Object.keys(Component.directives); + for (let i = 0; i < names.length; i++) { + validateDirectiveName(names[i]); + } + } + if (Component.compilerOptions && isRuntimeOnly()) { + warn$1( + `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` + ); + } + } + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers); + { + exposePropsOnRenderContext(instance); + } + const { setup } = Component; + if (setup) { + pauseTracking(); + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + shallowReadonly(instance.props) , + setupContext + ] + ); + const isAsyncSetup = isPromise(setupResult); + resetTracking(); + reset(); + if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) { + markAsyncBoundary(instance); + } + if (isAsyncSetup) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + if (!instance.suspense) { + const name = (_a = Component.name) != null ? _a : "Anonymous"; + warn$1( + `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` + ); + } + } + } else { + handleSetupResult(instance, setupResult, isSSR); + } + } else { + finishComponentSetup(instance, isSSR); + } + } + function handleSetupResult(instance, setupResult, isSSR) { + if (isFunction(setupResult)) { + { + instance.render = setupResult; + } + } else if (isObject(setupResult)) { + if (isVNode(setupResult)) { + warn$1( + `setup() should not return VNodes directly - return a render function instead.` + ); + } + { + instance.devtoolsRawSetupState = setupResult; + } + instance.setupState = proxyRefs(setupResult); + { + exposeSetupStateOnRenderContext(instance); + } + } else if (setupResult !== void 0) { + warn$1( + `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` + ); + } + finishComponentSetup(instance, isSSR); + } + let compile; + let installWithProxy; + function registerRuntimeCompiler(_compile) { + compile = _compile; + installWithProxy = (i) => { + if (i.render._rc) { + i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); + } + }; + } + const isRuntimeOnly = () => !compile; + function finishComponentSetup(instance, isSSR, skipOptions) { + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile && !Component.render) { + const template = Component.template || resolveMergedOptions(instance).template; + if (template) { + { + startMeasure(instance, `compile`); + } + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = extend( + extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions + ); + Component.render = compile(template, finalCompilerOptions); + { + endMeasure(instance, `compile`); + } + } + } + instance.render = Component.render || NOOP; + if (installWithProxy) { + installWithProxy(instance); + } + } + { + const reset = setCurrentInstance(instance); + pauseTracking(); + try { + applyOptions(instance); + } finally { + resetTracking(); + reset(); + } + } + if (!Component.render && instance.render === NOOP && !isSSR) { + if (!compile && Component.template) { + warn$1( + `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.global.js" instead.` ) + ); + } else { + warn$1(`Component is missing template or render function: `, Component); + } + } + } + const attrsProxyHandlers = { + get(target, key) { + markAttrsAccessed(); + track(target, "get", ""); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } + } ; + function getSlotsProxy(instance) { + return new Proxy(instance.slots, { + get(target, key) { + track(instance, "get", "$slots"); + return target[key]; + } + }); + } + function createSetupContext(instance) { + const expose = (exposed) => { + { + if (instance.exposed) { + warn$1(`expose() should be called only once per setup().`); + } + if (exposed != null) { + let exposedType = typeof exposed; + if (exposedType === "object") { + if (isArray(exposed)) { + exposedType = "array"; + } else if (isRef(exposed)) { + exposedType = "ref"; + } + } + if (exposedType !== "object") { + warn$1( + `expose() should be passed a plain object, received ${exposedType}.` + ); + } + } + } + instance.exposed = exposed || {}; + }; + { + let attrsProxy; + let slotsProxy; + return Object.freeze({ + get attrs() { + return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers)); + }, + get slots() { + return slotsProxy || (slotsProxy = getSlotsProxy(instance)); + }, + get emit() { + return (event, ...args) => instance.emit(event, ...args); + }, + expose + }); + } + } + function getComponentPublicInstance(instance) { + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); + } + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } else { + return instance.proxy; + } + } + const classifyRE = /(?:^|[-_])(\w)/g; + const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); + function getComponentName(Component, includeInferred = true) { + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; + } + function formatComponentName(instance, Component, isRoot = false) { + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; + } + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; + } + function isClassComponent(value) { + return isFunction(value) && "__vccOpts" in value; + } + + const computed = (getterOrOptions, debugOptions) => { + const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); + { + const i = getCurrentInstance(); + if (i && i.appContext.config.warnRecursiveComputed) { + c._warnRecursive = true; + } + } + return c; + }; + + function h(type, propsOrChildren, children) { + const l = arguments.length; + if (l === 2) { + if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { + if (isVNode(propsOrChildren)) { + return createVNode(type, null, [propsOrChildren]); + } + return createVNode(type, propsOrChildren); + } else { + return createVNode(type, null, propsOrChildren); + } + } else { + if (l > 3) { + children = Array.prototype.slice.call(arguments, 2); + } else if (l === 3 && isVNode(children)) { + children = [children]; + } + return createVNode(type, propsOrChildren, children); + } + } + + function initCustomFormatter() { + if (typeof window === "undefined") { + return; + } + const vueStyle = { style: "color:#3ba776" }; + const numberStyle = { style: "color:#1677ff" }; + const stringStyle = { style: "color:#f5222d" }; + const keywordStyle = { style: "color:#eb2f96" }; + const formatter = { + __vue_custom_formatter: true, + header(obj) { + if (!isObject(obj)) { + return null; + } + if (obj.__isVue) { + return ["div", vueStyle, `VueInstance`]; + } else if (isRef(obj)) { + return [ + "div", + {}, + ["span", vueStyle, genRefFlag(obj)], + "<", + // avoid debugger accessing value affecting behavior + formatValue("_value" in obj ? obj._value : obj), + `>` + ]; + } else if (isReactive(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"], + "<", + formatValue(obj), + `>${isReadonly(obj) ? ` (readonly)` : ``}` + ]; + } else if (isReadonly(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"], + "<", + formatValue(obj), + ">" + ]; + } + return null; + }, + hasBody(obj) { + return obj && obj.__isVue; + }, + body(obj) { + if (obj && obj.__isVue) { + return [ + "div", + {}, + ...formatInstance(obj.$) + ]; + } + } + }; + function formatInstance(instance) { + const blocks = []; + if (instance.type.props && instance.props) { + blocks.push(createInstanceBlock("props", toRaw(instance.props))); + } + if (instance.setupState !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("setup", instance.setupState)); + } + if (instance.data !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("data", toRaw(instance.data))); + } + const computed = extractKeys(instance, "computed"); + if (computed) { + blocks.push(createInstanceBlock("computed", computed)); + } + const injected = extractKeys(instance, "inject"); + if (injected) { + blocks.push(createInstanceBlock("injected", injected)); + } + blocks.push([ + "div", + {}, + [ + "span", + { + style: keywordStyle.style + ";opacity:0.66" + }, + "$ (internal): " + ], + ["object", { object: instance }] + ]); + return blocks; + } + function createInstanceBlock(type, target) { + target = extend({}, target); + if (!Object.keys(target).length) { + return ["span", {}]; + } + return [ + "div", + { style: "line-height:1.25em;margin-bottom:0.6em" }, + [ + "div", + { + style: "color:#476582" + }, + type + ], + [ + "div", + { + style: "padding-left:1.25em" + }, + ...Object.keys(target).map((key) => { + return [ + "div", + {}, + ["span", keywordStyle, key + ": "], + formatValue(target[key], false) + ]; + }) + ] + ]; + } + function formatValue(v, asRaw = true) { + if (typeof v === "number") { + return ["span", numberStyle, v]; + } else if (typeof v === "string") { + return ["span", stringStyle, JSON.stringify(v)]; + } else if (typeof v === "boolean") { + return ["span", keywordStyle, v]; + } else if (isObject(v)) { + return ["object", { object: asRaw ? toRaw(v) : v }]; + } else { + return ["span", stringStyle, String(v)]; + } + } + function extractKeys(instance, type) { + const Comp = instance.type; + if (isFunction(Comp)) { + return; + } + const extracted = {}; + for (const key in instance.ctx) { + if (isKeyOfType(Comp, key, type)) { + extracted[key] = instance.ctx[key]; + } + } + return extracted; + } + function isKeyOfType(Comp, key, type) { + const opts = Comp[type]; + if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) { + return true; + } + if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { + return true; + } + if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { + return true; + } + } + function genRefFlag(v) { + if (isShallow(v)) { + return `ShallowRef`; + } + if (v.effect) { + return `ComputedRef`; + } + return `Ref`; + } + if (window.devtoolsFormatters) { + window.devtoolsFormatters.push(formatter); + } else { + window.devtoolsFormatters = [formatter]; + } + } + + function withMemo(memo, render, cache, index) { + const cached = cache[index]; + if (cached && isMemoSame(cached, memo)) { + return cached; + } + const ret = render(); + ret.memo = memo.slice(); + ret.cacheIndex = index; + return cache[index] = ret; + } + function isMemoSame(cached, memo) { + const prev = cached.memo; + if (prev.length != memo.length) { + return false; + } + for (let i = 0; i < prev.length; i++) { + if (hasChanged(prev[i], memo[i])) { + return false; + } + } + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(cached); + } + return true; + } + + const version = "3.5.13"; + const warn = warn$1 ; + const ErrorTypeStrings = ErrorTypeStrings$1 ; + const devtools = devtools$1 ; + const setDevtoolsHook = setDevtoolsHook$1 ; + const ssrUtils = null; + const resolveFilter = null; + const compatUtils = null; + const DeprecationTypes = null; + + let policy = void 0; + const tt = typeof window !== "undefined" && window.trustedTypes; + if (tt) { + try { + policy = /* @__PURE__ */ tt.createPolicy("vue", { + createHTML: (val) => val + }); + } catch (e) { + warn(`Error creating trusted types policy: ${e}`); + } + } + const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val; + const svgNS = "http://www.w3.org/2000/svg"; + const mathmlNS = "http://www.w3.org/1998/Math/MathML"; + const doc = typeof document !== "undefined" ? document : null; + const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); + const nodeOps = { + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); + } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) break; + } + } else { + templateContainer.innerHTML = unsafeToTrustedHTML( + namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content + ); + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } + }; + + const TRANSITION = "transition"; + const ANIMATION = "animation"; + const vtcKey = Symbol("_vtc"); + const DOMTransitionPropsValidators = { + name: String, + type: String, + css: { + type: Boolean, + default: true + }, + duration: [String, Number, Object], + enterFromClass: String, + enterActiveClass: String, + enterToClass: String, + appearFromClass: String, + appearActiveClass: String, + appearToClass: String, + leaveFromClass: String, + leaveActiveClass: String, + leaveToClass: String + }; + const TransitionPropsValidators = /* @__PURE__ */ extend( + {}, + BaseTransitionPropsValidators, + DOMTransitionPropsValidators + ); + const decorate$1 = (t) => { + t.displayName = "Transition"; + t.props = TransitionPropsValidators; + return t; + }; + const Transition = /* @__PURE__ */ decorate$1( + (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots) + ); + const callHook = (hook, args = []) => { + if (isArray(hook)) { + hook.forEach((h2) => h2(...args)); + } else if (hook) { + hook(...args); + } + }; + const hasExplicitCallback = (hook) => { + return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; + }; + function resolveTransitionProps(rawProps) { + const baseProps = {}; + for (const key in rawProps) { + if (!(key in DOMTransitionPropsValidators)) { + baseProps[key] = rawProps[key]; + } + } + if (rawProps.css === false) { + return baseProps; + } + const { + name = "v", + type, + duration, + enterFromClass = `${name}-enter-from`, + enterActiveClass = `${name}-enter-active`, + enterToClass = `${name}-enter-to`, + appearFromClass = enterFromClass, + appearActiveClass = enterActiveClass, + appearToClass = enterToClass, + leaveFromClass = `${name}-leave-from`, + leaveActiveClass = `${name}-leave-active`, + leaveToClass = `${name}-leave-to` + } = rawProps; + const durations = normalizeDuration(duration); + const enterDuration = durations && durations[0]; + const leaveDuration = durations && durations[1]; + const { + onBeforeEnter, + onEnter, + onEnterCancelled, + onLeave, + onLeaveCancelled, + onBeforeAppear = onBeforeEnter, + onAppear = onEnter, + onAppearCancelled = onEnterCancelled + } = baseProps; + const finishEnter = (el, isAppear, done, isCancelled) => { + el._enterCancelled = isCancelled; + removeTransitionClass(el, isAppear ? appearToClass : enterToClass); + removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); + done && done(); + }; + const finishLeave = (el, done) => { + el._isLeaving = false; + removeTransitionClass(el, leaveFromClass); + removeTransitionClass(el, leaveToClass); + removeTransitionClass(el, leaveActiveClass); + done && done(); + }; + const makeEnterHook = (isAppear) => { + return (el, done) => { + const hook = isAppear ? onAppear : onEnter; + const resolve = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve]); + nextFrame(() => { + removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); + addTransitionClass(el, isAppear ? appearToClass : enterToClass); + if (!hasExplicitCallback(hook)) { + whenTransitionEnds(el, type, enterDuration, resolve); + } + }); + }; + }; + return extend(baseProps, { + onBeforeEnter(el) { + callHook(onBeforeEnter, [el]); + addTransitionClass(el, enterFromClass); + addTransitionClass(el, enterActiveClass); + }, + onBeforeAppear(el) { + callHook(onBeforeAppear, [el]); + addTransitionClass(el, appearFromClass); + addTransitionClass(el, appearActiveClass); + }, + onEnter: makeEnterHook(false), + onAppear: makeEnterHook(true), + onLeave(el, done) { + el._isLeaving = true; + const resolve = () => finishLeave(el, done); + addTransitionClass(el, leaveFromClass); + if (!el._enterCancelled) { + forceReflow(); + addTransitionClass(el, leaveActiveClass); + } else { + addTransitionClass(el, leaveActiveClass); + forceReflow(); + } + nextFrame(() => { + if (!el._isLeaving) { + return; + } + removeTransitionClass(el, leaveFromClass); + addTransitionClass(el, leaveToClass); + if (!hasExplicitCallback(onLeave)) { + whenTransitionEnds(el, type, leaveDuration, resolve); + } + }); + callHook(onLeave, [el, resolve]); + }, + onEnterCancelled(el) { + finishEnter(el, false, void 0, true); + callHook(onEnterCancelled, [el]); + }, + onAppearCancelled(el) { + finishEnter(el, true, void 0, true); + callHook(onAppearCancelled, [el]); + }, + onLeaveCancelled(el) { + finishLeave(el); + callHook(onLeaveCancelled, [el]); + } + }); + } + function normalizeDuration(duration) { + if (duration == null) { + return null; + } else if (isObject(duration)) { + return [NumberOf(duration.enter), NumberOf(duration.leave)]; + } else { + const n = NumberOf(duration); + return [n, n]; + } + } + function NumberOf(val) { + const res = toNumber(val); + { + assertNumber(res, "<transition> explicit duration"); + } + return res; + } + function addTransitionClass(el, cls) { + cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); + (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); + } + function removeTransitionClass(el, cls) { + cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.delete(cls); + if (!_vtc.size) { + el[vtcKey] = void 0; + } + } + } + function nextFrame(cb) { + requestAnimationFrame(() => { + requestAnimationFrame(cb); + }); + } + let endId = 0; + function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { + const id = el._endId = ++endId; + const resolveIfNotStale = () => { + if (id === el._endId) { + resolve(); + } + }; + if (explicitTimeout != null) { + return setTimeout(resolveIfNotStale, explicitTimeout); + } + const { type, timeout, propCount } = getTransitionInfo(el, expectedType); + if (!type) { + return resolve(); + } + const endEvent = type + "end"; + let ended = 0; + const end = () => { + el.removeEventListener(endEvent, onEnd); + resolveIfNotStale(); + }; + const onEnd = (e) => { + if (e.target === el && ++ended >= propCount) { + end(); + } + }; + setTimeout(() => { + if (ended < propCount) { + end(); + } + }, timeout + 1); + el.addEventListener(endEvent, onEnd); + } + function getTransitionInfo(el, expectedType) { + const styles = window.getComputedStyle(el); + const getStyleProperties = (key) => (styles[key] || "").split(", "); + const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); + const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); + const transitionTimeout = getTimeout(transitionDelays, transitionDurations); + const animationDelays = getStyleProperties(`${ANIMATION}Delay`); + const animationDurations = getStyleProperties(`${ANIMATION}Duration`); + const animationTimeout = getTimeout(animationDelays, animationDurations); + let type = null; + let timeout = 0; + let propCount = 0; + if (expectedType === TRANSITION) { + if (transitionTimeout > 0) { + type = TRANSITION; + timeout = transitionTimeout; + propCount = transitionDurations.length; + } + } else if (expectedType === ANIMATION) { + if (animationTimeout > 0) { + type = ANIMATION; + timeout = animationTimeout; + propCount = animationDurations.length; + } + } else { + timeout = Math.max(transitionTimeout, animationTimeout); + type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; + propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; + } + const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( + getStyleProperties(`${TRANSITION}Property`).toString() + ); + return { + type, + timeout, + propCount, + hasTransform + }; + } + function getTimeout(delays, durations) { + while (delays.length < durations.length) { + delays = delays.concat(delays); + } + return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); + } + function toMs(s) { + if (s === "auto") return 0; + return Number(s.slice(0, -1).replace(",", ".")) * 1e3; + } + function forceReflow() { + return document.body.offsetHeight; + } + + function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } + } + + const vShowOriginalDisplay = Symbol("_vod"); + const vShowHidden = Symbol("_vsh"); + const vShow = { + beforeMount(el, { value }, { transition }) { + el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display; + if (transition && value) { + transition.beforeEnter(el); + } else { + setDisplay(el, value); + } + }, + mounted(el, { value }, { transition }) { + if (transition && value) { + transition.enter(el); + } + }, + updated(el, { value, oldValue }, { transition }) { + if (!value === !oldValue) return; + if (transition) { + if (value) { + transition.beforeEnter(el); + setDisplay(el, true); + transition.enter(el); + } else { + transition.leave(el, () => { + setDisplay(el, false); + }); + } + } else { + setDisplay(el, value); + } + }, + beforeUnmount(el, { value }) { + setDisplay(el, value); + } + }; + { + vShow.name = "show"; + } + function setDisplay(el, value) { + el.style.display = value ? el[vShowOriginalDisplay] : "none"; + el[vShowHidden] = !value; + } + + const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); + function useCssVars(getter) { + const instance = getCurrentInstance(); + if (!instance) { + warn(`useCssVars is called without current active component instance.`); + return; + } + const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { + Array.from( + document.querySelectorAll(`[data-v-owner="${instance.uid}"]`) + ).forEach((node) => setVarsOnNode(node, vars)); + }; + { + instance.getCssVars = () => getter(instance.proxy); + } + const setVars = () => { + const vars = getter(instance.proxy); + if (instance.ce) { + setVarsOnNode(instance.ce, vars); + } else { + setVarsOnVNode(instance.subTree, vars); + } + updateTeleports(vars); + }; + onBeforeUpdate(() => { + queuePostFlushCb(setVars); + }); + onMounted(() => { + watch(setVars, NOOP, { flush: "post" }); + const ob = new MutationObserver(setVars); + ob.observe(instance.subTree.el.parentNode, { childList: true }); + onUnmounted(() => ob.disconnect()); + }); + } + function setVarsOnVNode(vnode, vars) { + if (vnode.shapeFlag & 128) { + const suspense = vnode.suspense; + vnode = suspense.activeBranch; + if (suspense.pendingBranch && !suspense.isHydrating) { + suspense.effects.push(() => { + setVarsOnVNode(suspense.activeBranch, vars); + }); + } + } + while (vnode.component) { + vnode = vnode.component.subTree; + } + if (vnode.shapeFlag & 1 && vnode.el) { + setVarsOnNode(vnode.el, vars); + } else if (vnode.type === Fragment) { + vnode.children.forEach((c) => setVarsOnVNode(c, vars)); + } else if (vnode.type === Static) { + let { el, anchor } = vnode; + while (el) { + setVarsOnNode(el, vars); + if (el === anchor) break; + el = el.nextSibling; + } + } + } + function setVarsOnNode(el, vars) { + if (el.nodeType === 1) { + const style = el.style; + let cssText = ""; + for (const key in vars) { + style.setProperty(`--${key}`, vars[key]); + cssText += `--${key}: ${vars[key]};`; + } + style[CSS_VAR_TEXT] = cssText; + } + } + + const displayRE = /(^|;)\s*display\s*:/; + function patchStyle(el, prev, next) { + const style = el.style; + const isCssString = isString(next); + let hasControlledDisplay = false; + if (next && !isCssString) { + if (prev) { + if (!isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } else { + for (const prevStyle of prev.split(";")) { + const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim(); + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + } + for (const key in next) { + if (key === "display") { + hasControlledDisplay = true; + } + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + hasControlledDisplay = displayRE.test(next); + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOriginalDisplay in el) { + el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : ""; + if (el[vShowHidden]) { + style.display = "none"; + } + } + } + const semicolonRE = /[^\\];\s*$/; + const importantRE = /\s*!important$/; + function setStyle(style, name, val) { + if (isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) val = ""; + { + if (semicolonRE.test(val)) { + warn( + `Unexpected semicolon at the end of '${name}' style value: '${val}'` + ); + } + } + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } + } + const prefixes = ["Webkit", "Moz", "ms"]; + const prefixCache = {}; + function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; + } + + const xlinkNS = "http://www.w3.org/1999/xlink"; + function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + if (value == null || isBoolean && !includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute( + key, + isBoolean ? "" : isSymbol(value) ? String(value) : value + ); + } + } + } + + function patchDOMProp(el, key, value, parentComponent, attrName) { + if (key === "innerHTML" || key === "textContent") { + if (value != null) { + el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value; + } + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; + const newValue = value == null ? ( + // #11647: value should be set as empty string for null and undefined, + // but <input type="checkbox"> should be set as 'on'. + el.type === "checkbox" ? "on" : "" + ) : String(value); + if (oldValue !== newValue || !("_value" in el)) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + el._value = value; + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + if (!needRemove) { + warn( + `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, + e + ); + } + } + needRemove && el.removeAttribute(attrName || key); + } + + function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); + } + function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); + } + const veiKey = Symbol("_vei"); + function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = sanitizeEventValue(nextValue, rawName) ; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker( + sanitizeEventValue(nextValue, rawName) , + instance + ); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } + } + const optionsModifierRE = /(?:Once|Passive|Capture)$/; + function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); + return [event, options]; + } + let cachedNow = 0; + const p = /* @__PURE__ */ Promise.resolve(); + const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); + function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; + } + function sanitizeEventValue(value, propName) { + if (isFunction(value) || isArray(value)) { + return value; + } + warn( + `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop? +Expected function or array of functions, received type ${typeof value}.` + ); + return NOOP; + } + function patchStopImmediatePropagation(e, value) { + if (isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map( + (fn) => (e2) => !e2._stopped && fn && fn(e2) + ); + } else { + return value; + } + } + + const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter + key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; + const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (isOn(key)) { + if (!isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp(el, key, nextValue); + if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { + patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); + } + } else if ( + // #11081 force set props for possible async custom element + el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue)) + ) { + patchDOMProp(el, camelize(key), nextValue, parentComponent, key); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } + }; + function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && isString(value)) { + return false; + } + return key in el; + } + + const REMOVAL = {}; + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function defineCustomElement(options, extraOptions, _createApp) { + const Comp = defineComponent(options, extraOptions); + if (isPlainObject(Comp)) extend(Comp, extraOptions); + class VueCustomElement extends VueElement { + constructor(initialProps) { + super(Comp, initialProps, _createApp); + } + } + VueCustomElement.def = Comp; + return VueCustomElement; + } + /*! #__NO_SIDE_EFFECTS__ */ + const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => { + return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp); + }; + const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { + }; + class VueElement extends BaseClass { + constructor(_def, _props = {}, _createApp = createApp) { + super(); + this._def = _def; + this._props = _props; + this._createApp = _createApp; + this._isVueCE = true; + /** + * @internal + */ + this._instance = null; + /** + * @internal + */ + this._app = null; + /** + * @internal + */ + this._nonce = this._def.nonce; + this._connected = false; + this._resolved = false; + this._numberProps = null; + this._styleChildren = /* @__PURE__ */ new WeakSet(); + this._ob = null; + if (this.shadowRoot && _createApp !== createApp) { + this._root = this.shadowRoot; + } else { + if (this.shadowRoot) { + warn( + `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` + ); + } + if (_def.shadowRoot !== false) { + this.attachShadow({ mode: "open" }); + this._root = this.shadowRoot; + } else { + this._root = this; + } + } + if (!this._def.__asyncLoader) { + this._resolveProps(this._def); + } + } + connectedCallback() { + if (!this.isConnected) return; + if (!this.shadowRoot) { + this._parseSlots(); + } + this._connected = true; + let parent = this; + while (parent = parent && (parent.parentNode || parent.host)) { + if (parent instanceof VueElement) { + this._parent = parent; + break; + } + } + if (!this._instance) { + if (this._resolved) { + this._setParent(); + this._update(); + } else { + if (parent && parent._pendingResolve) { + this._pendingResolve = parent._pendingResolve.then(() => { + this._pendingResolve = void 0; + this._resolveDef(); + }); + } else { + this._resolveDef(); + } + } + } + } + _setParent(parent = this._parent) { + if (parent) { + this._instance.parent = parent._instance; + this._instance.provides = parent._instance.provides; + } + } + disconnectedCallback() { + this._connected = false; + nextTick(() => { + if (!this._connected) { + if (this._ob) { + this._ob.disconnect(); + this._ob = null; + } + this._app && this._app.unmount(); + if (this._instance) this._instance.ce = void 0; + this._app = this._instance = null; + } + }); + } + /** + * resolve inner component definition (handle possible async component) + */ + _resolveDef() { + if (this._pendingResolve) { + return; + } + for (let i = 0; i < this.attributes.length; i++) { + this._setAttr(this.attributes[i].name); + } + this._ob = new MutationObserver((mutations) => { + for (const m of mutations) { + this._setAttr(m.attributeName); + } + }); + this._ob.observe(this, { attributes: true }); + const resolve = (def, isAsync = false) => { + this._resolved = true; + this._pendingResolve = void 0; + const { props, styles } = def; + let numberProps; + if (props && !isArray(props)) { + for (const key in props) { + const opt = props[key]; + if (opt === Number || opt && opt.type === Number) { + if (key in this._props) { + this._props[key] = toNumber(this._props[key]); + } + (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true; + } + } + } + this._numberProps = numberProps; + if (isAsync) { + this._resolveProps(def); + } + if (this.shadowRoot) { + this._applyStyles(styles); + } else if (styles) { + warn( + "Custom element style injection is not supported when using shadowRoot: false" + ); + } + this._mount(def); + }; + const asyncDef = this._def.__asyncLoader; + if (asyncDef) { + this._pendingResolve = asyncDef().then( + (def) => resolve(this._def = def, true) + ); + } else { + resolve(this._def); + } + } + _mount(def) { + if (!def.name) { + def.name = "VueElement"; + } + this._app = this._createApp(def); + if (def.configureApp) { + def.configureApp(this._app); + } + this._app._ceVNode = this._createVNode(); + this._app.mount(this._root); + const exposed = this._instance && this._instance.exposed; + if (!exposed) return; + for (const key in exposed) { + if (!hasOwn(this, key)) { + Object.defineProperty(this, key, { + // unwrap ref to be consistent with public instance behavior + get: () => unref(exposed[key]) + }); + } else { + warn(`Exposed property "${key}" already exists on custom element.`); + } + } + } + _resolveProps(def) { + const { props } = def; + const declaredPropKeys = isArray(props) ? props : Object.keys(props || {}); + for (const key of Object.keys(this)) { + if (key[0] !== "_" && declaredPropKeys.includes(key)) { + this._setProp(key, this[key]); + } + } + for (const key of declaredPropKeys.map(camelize)) { + Object.defineProperty(this, key, { + get() { + return this._getProp(key); + }, + set(val) { + this._setProp(key, val, true, true); + } + }); + } + } + _setAttr(key) { + if (key.startsWith("data-v-")) return; + const has = this.hasAttribute(key); + let value = has ? this.getAttribute(key) : REMOVAL; + const camelKey = camelize(key); + if (has && this._numberProps && this._numberProps[camelKey]) { + value = toNumber(value); + } + this._setProp(camelKey, value, false, true); + } + /** + * @internal + */ + _getProp(key) { + return this._props[key]; + } + /** + * @internal + */ + _setProp(key, val, shouldReflect = true, shouldUpdate = false) { + if (val !== this._props[key]) { + if (val === REMOVAL) { + delete this._props[key]; + } else { + this._props[key] = val; + if (key === "key" && this._app) { + this._app._ceVNode.key = val; + } + } + if (shouldUpdate && this._instance) { + this._update(); + } + if (shouldReflect) { + const ob = this._ob; + ob && ob.disconnect(); + if (val === true) { + this.setAttribute(hyphenate(key), ""); + } else if (typeof val === "string" || typeof val === "number") { + this.setAttribute(hyphenate(key), val + ""); + } else if (!val) { + this.removeAttribute(hyphenate(key)); + } + ob && ob.observe(this, { attributes: true }); + } + } + } + _update() { + render(this._createVNode(), this._root); + } + _createVNode() { + const baseProps = {}; + if (!this.shadowRoot) { + baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this); + } + const vnode = createVNode(this._def, extend(baseProps, this._props)); + if (!this._instance) { + vnode.ce = (instance) => { + this._instance = instance; + instance.ce = this; + instance.isCE = true; + { + instance.ceReload = (newStyles) => { + if (this._styles) { + this._styles.forEach((s) => this._root.removeChild(s)); + this._styles.length = 0; + } + this._applyStyles(newStyles); + this._instance = null; + this._update(); + }; + } + const dispatch = (event, args) => { + this.dispatchEvent( + new CustomEvent( + event, + isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args } + ) + ); + }; + instance.emit = (event, ...args) => { + dispatch(event, args); + if (hyphenate(event) !== event) { + dispatch(hyphenate(event), args); + } + }; + this._setParent(); + }; + } + return vnode; + } + _applyStyles(styles, owner) { + if (!styles) return; + if (owner) { + if (owner === this._def || this._styleChildren.has(owner)) { + return; + } + this._styleChildren.add(owner); + } + const nonce = this._nonce; + for (let i = styles.length - 1; i >= 0; i--) { + const s = document.createElement("style"); + if (nonce) s.setAttribute("nonce", nonce); + s.textContent = styles[i]; + this.shadowRoot.prepend(s); + { + if (owner) { + if (owner.__hmrId) { + if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map(); + let entry = this._childStyles.get(owner.__hmrId); + if (!entry) { + this._childStyles.set(owner.__hmrId, entry = []); + } + entry.push(s); + } + } else { + (this._styles || (this._styles = [])).push(s); + } + } + } + } + /** + * Only called when shadowRoot is false + */ + _parseSlots() { + const slots = this._slots = {}; + let n; + while (n = this.firstChild) { + const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default"; + (slots[slotName] || (slots[slotName] = [])).push(n); + this.removeChild(n); + } + } + /** + * Only called when shadowRoot is false + */ + _renderSlots() { + const outlets = (this._teleportTarget || this).querySelectorAll("slot"); + const scopeId = this._instance.type.__scopeId; + for (let i = 0; i < outlets.length; i++) { + const o = outlets[i]; + const slotName = o.getAttribute("name") || "default"; + const content = this._slots[slotName]; + const parent = o.parentNode; + if (content) { + for (const n of content) { + if (scopeId && n.nodeType === 1) { + const id = scopeId + "-s"; + const walker = document.createTreeWalker(n, 1); + n.setAttribute(id, ""); + let child; + while (child = walker.nextNode()) { + child.setAttribute(id, ""); + } + } + parent.insertBefore(n, o); + } + } else { + while (o.firstChild) parent.insertBefore(o.firstChild, o); + } + parent.removeChild(o); + } + } + /** + * @internal + */ + _injectChildStyle(comp) { + this._applyStyles(comp.styles, comp); + } + /** + * @internal + */ + _removeChildStyle(comp) { + { + this._styleChildren.delete(comp); + if (this._childStyles && comp.__hmrId) { + const oldStyles = this._childStyles.get(comp.__hmrId); + if (oldStyles) { + oldStyles.forEach((s) => this._root.removeChild(s)); + oldStyles.length = 0; + } + } + } + } + } + function useHost(caller) { + const instance = getCurrentInstance(); + const el = instance && instance.ce; + if (el) { + return el; + } else { + if (!instance) { + warn( + `${caller || "useHost"} called without an active component instance.` + ); + } else { + warn( + `${caller || "useHost"} can only be used in components defined via defineCustomElement.` + ); + } + } + return null; + } + function useShadowRoot() { + const el = useHost("useShadowRoot") ; + return el && el.shadowRoot; + } + + function useCssModule(name = "$style") { + { + { + warn(`useCssModule() is not supported in the global build.`); + } + return EMPTY_OBJ; + } + } + + const positionMap = /* @__PURE__ */ new WeakMap(); + const newPositionMap = /* @__PURE__ */ new WeakMap(); + const moveCbKey = Symbol("_moveCb"); + const enterCbKey = Symbol("_enterCb"); + const decorate = (t) => { + delete t.props.mode; + return t; + }; + const TransitionGroupImpl = /* @__PURE__ */ decorate({ + name: "TransitionGroup", + props: /* @__PURE__ */ extend({}, TransitionPropsValidators, { + tag: String, + moveClass: String + }), + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevChildren; + let children; + onUpdated(() => { + if (!prevChildren.length) { + return; + } + const moveClass = props.moveClass || `${props.name || "v"}-move`; + if (!hasCSSTransform( + prevChildren[0].el, + instance.vnode.el, + moveClass + )) { + return; + } + prevChildren.forEach(callPendingCbs); + prevChildren.forEach(recordPosition); + const movedChildren = prevChildren.filter(applyTranslation); + forceReflow(); + movedChildren.forEach((c) => { + const el = c.el; + const style = el.style; + addTransitionClass(el, moveClass); + style.transform = style.webkitTransform = style.transitionDuration = ""; + const cb = el[moveCbKey] = (e) => { + if (e && e.target !== el) { + return; + } + if (!e || /transform$/.test(e.propertyName)) { + el.removeEventListener("transitionend", cb); + el[moveCbKey] = null; + removeTransitionClass(el, moveClass); + } + }; + el.addEventListener("transitionend", cb); + }); + }); + return () => { + const rawProps = toRaw(props); + const cssTransitionProps = resolveTransitionProps(rawProps); + let tag = rawProps.tag || Fragment; + prevChildren = []; + if (children) { + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.el && child.el instanceof Element) { + prevChildren.push(child); + setTransitionHooks( + child, + resolveTransitionHooks( + child, + cssTransitionProps, + state, + instance + ) + ); + positionMap.set( + child, + child.el.getBoundingClientRect() + ); + } + } + } + children = slots.default ? getTransitionRawChildren(slots.default()) : []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.key != null) { + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + } else if (child.type !== Text) { + warn(`<TransitionGroup> children must be keyed.`); + } + } + return createVNode(tag, null, children); + }; + } + }); + const TransitionGroup = TransitionGroupImpl; + function callPendingCbs(c) { + const el = c.el; + if (el[moveCbKey]) { + el[moveCbKey](); + } + if (el[enterCbKey]) { + el[enterCbKey](); + } + } + function recordPosition(c) { + newPositionMap.set(c, c.el.getBoundingClientRect()); + } + function applyTranslation(c) { + const oldPos = positionMap.get(c); + const newPos = newPositionMap.get(c); + const dx = oldPos.left - newPos.left; + const dy = oldPos.top - newPos.top; + if (dx || dy) { + const s = c.el.style; + s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; + s.transitionDuration = "0s"; + return c; + } + } + function hasCSSTransform(el, root, moveClass) { + const clone = el.cloneNode(); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.forEach((cls) => { + cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); + }); + } + moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); + clone.style.display = "none"; + const container = root.nodeType === 1 ? root : root.parentNode; + container.appendChild(clone); + const { hasTransform } = getTransitionInfo(clone); + container.removeChild(clone); + return hasTransform; + } + + const getModelAssigner = (vnode) => { + const fn = vnode.props["onUpdate:modelValue"] || false; + return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; + }; + function onCompositionStart(e) { + e.target.composing = true; + } + function onCompositionEnd(e) { + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } + } + const assignKey = Symbol("_assign"); + const vModelText = { + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); + } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) return; + const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy && value === oldValue) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } + }; + const vModelCheckbox = { + // #4096 array checkboxes need to be deep traversed + deep: true, + created(el, _, vnode) { + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + const modelValue = el._modelValue; + const elementValue = getValue(el); + const checked = el.checked; + const assign = el[assignKey]; + if (isArray(modelValue)) { + const index = looseIndexOf(modelValue, elementValue); + const found = index !== -1; + if (checked && !found) { + assign(modelValue.concat(elementValue)); + } else if (!checked && found) { + const filtered = [...modelValue]; + filtered.splice(index, 1); + assign(filtered); + } + } else if (isSet(modelValue)) { + const cloned = new Set(modelValue); + if (checked) { + cloned.add(elementValue); + } else { + cloned.delete(elementValue); + } + assign(cloned); + } else { + assign(getCheckboxValue(el, checked)); + } + }); + }, + // set initial checked on mount to wait for true-value/false-value + mounted: setChecked, + beforeUpdate(el, binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + setChecked(el, binding, vnode); + } + }; + function setChecked(el, { value, oldValue }, vnode) { + el._modelValue = value; + let checked; + if (isArray(value)) { + checked = looseIndexOf(value, vnode.props.value) > -1; + } else if (isSet(value)) { + checked = value.has(vnode.props.value); + } else { + if (value === oldValue) return; + checked = looseEqual(value, getCheckboxValue(el, true)); + } + if (el.checked !== checked) { + el.checked = checked; + } + } + const vModelRadio = { + created(el, { value }, vnode) { + el.checked = looseEqual(value, vnode.props.value); + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + el[assignKey](getValue(el)); + }); + }, + beforeUpdate(el, { value, oldValue }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (value !== oldValue) { + el.checked = looseEqual(value, vnode.props.value); + } + } + }; + const vModelSelect = { + // <select multiple> value need to be deep traversed + deep: true, + created(el, { value, modifiers: { number } }, vnode) { + const isSetModel = isSet(value); + addEventListener(el, "change", () => { + const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( + (o) => number ? looseToNumber(getValue(o)) : getValue(o) + ); + el[assignKey]( + el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] + ); + el._assigning = true; + nextTick(() => { + el._assigning = false; + }); + }); + el[assignKey] = getModelAssigner(vnode); + }, + // set value in mounted & updated because <select> relies on its children + // <option>s. + mounted(el, { value }) { + setSelected(el, value); + }, + beforeUpdate(el, _binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + }, + updated(el, { value }) { + if (!el._assigning) { + setSelected(el, value); + } + } + }; + function setSelected(el, value) { + const isMultiple = el.multiple; + const isArrayValue = isArray(value); + if (isMultiple && !isArrayValue && !isSet(value)) { + warn( + `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` + ); + return; + } + for (let i = 0, l = el.options.length; i < l; i++) { + const option = el.options[i]; + const optionValue = getValue(option); + if (isMultiple) { + if (isArrayValue) { + const optionType = typeof optionValue; + if (optionType === "string" || optionType === "number") { + option.selected = value.some((v) => String(v) === String(optionValue)); + } else { + option.selected = looseIndexOf(value, optionValue) > -1; + } + } else { + option.selected = value.has(optionValue); + } + } else if (looseEqual(getValue(option), value)) { + if (el.selectedIndex !== i) el.selectedIndex = i; + return; + } + } + if (!isMultiple && el.selectedIndex !== -1) { + el.selectedIndex = -1; + } + } + function getValue(el) { + return "_value" in el ? el._value : el.value; + } + function getCheckboxValue(el, checked) { + const key = checked ? "_trueValue" : "_falseValue"; + return key in el ? el[key] : checked; + } + const vModelDynamic = { + created(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "created"); + }, + mounted(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "mounted"); + }, + beforeUpdate(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); + }, + updated(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "updated"); + } + }; + function resolveDynamicModel(tagName, type) { + switch (tagName) { + case "SELECT": + return vModelSelect; + case "TEXTAREA": + return vModelText; + default: + switch (type) { + case "checkbox": + return vModelCheckbox; + case "radio": + return vModelRadio; + default: + return vModelText; + } + } + } + function callModelHook(el, binding, vnode, prevVNode, hook) { + const modelToUse = resolveDynamicModel( + el.tagName, + vnode.props && vnode.props.type + ); + const fn = modelToUse[hook]; + fn && fn(el, binding, vnode, prevVNode); + } + + const systemModifiers = ["ctrl", "shift", "alt", "meta"]; + const modifierGuards = { + stop: (e) => e.stopPropagation(), + prevent: (e) => e.preventDefault(), + self: (e) => e.target !== e.currentTarget, + ctrl: (e) => !e.ctrlKey, + shift: (e) => !e.shiftKey, + alt: (e) => !e.altKey, + meta: (e) => !e.metaKey, + left: (e) => "button" in e && e.button !== 0, + middle: (e) => "button" in e && e.button !== 1, + right: (e) => "button" in e && e.button !== 2, + exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) + }; + const withModifiers = (fn, modifiers) => { + const cache = fn._withMods || (fn._withMods = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { + for (let i = 0; i < modifiers.length; i++) { + const guard = modifierGuards[modifiers[i]]; + if (guard && guard(event, modifiers)) return; + } + return fn(event, ...args); + }); + }; + const keyNames = { + esc: "escape", + space: " ", + up: "arrow-up", + left: "arrow-left", + right: "arrow-right", + down: "arrow-down", + delete: "backspace" + }; + const withKeys = (fn, modifiers) => { + const cache = fn._withKeys || (fn._withKeys = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event) => { + if (!("key" in event)) { + return; + } + const eventKey = hyphenate(event.key); + if (modifiers.some( + (k) => k === eventKey || keyNames[k] === eventKey + )) { + return fn(event); + } + }); + }; + + const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); + let renderer; + let enabledHydration = false; + function ensureRenderer() { + return renderer || (renderer = createRenderer(rendererOptions)); + } + function ensureHydrationRenderer() { + renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions); + enabledHydration = true; + return renderer; + } + const render = (...args) => { + ensureRenderer().render(...args); + }; + const hydrate = (...args) => { + ensureHydrationRenderer().hydrate(...args); + }; + const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) return; + const component = app._component; + if (!isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; + } + if (container.nodeType === 1) { + container.textContent = ""; + } + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); + } + return proxy; + }; + return app; + }; + const createSSRApp = (...args) => { + const app = ensureHydrationRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (container) { + return mount(container, true, resolveRootNamespace(container)); + } + }; + return app; + }; + function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } + } + function injectNativeTagCheck(app) { + Object.defineProperty(app.config, "isNativeTag", { + value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + writable: false + }); + } + function injectCompilerOptionsCheck(app) { + if (isRuntimeOnly()) { + const isCustomElement = app.config.isCustomElement; + Object.defineProperty(app.config, "isCustomElement", { + get() { + return isCustomElement; + }, + set() { + warn( + `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` + ); + } + }); + const compilerOptions = app.config.compilerOptions; + const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. +- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. +- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader +- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; + Object.defineProperty(app.config, "compilerOptions", { + get() { + warn(msg); + return compilerOptions; + }, + set() { + warn(msg); + } + }); + } + } + function normalizeContainer(container) { + if (isString(container)) { + const res = document.querySelector(container); + if (!res) { + warn( + `Failed to mount app: mount target selector "${container}" returned null.` + ); + } + return res; + } + if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { + warn( + `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` + ); + } + return container; + } + const initDirectivesForSSR = NOOP; + + exports.BaseTransition = BaseTransition; + exports.BaseTransitionPropsValidators = BaseTransitionPropsValidators; + exports.Comment = Comment; + exports.DeprecationTypes = DeprecationTypes; + exports.EffectScope = EffectScope; + exports.ErrorCodes = ErrorCodes; + exports.ErrorTypeStrings = ErrorTypeStrings; + exports.Fragment = Fragment; + exports.KeepAlive = KeepAlive; + exports.ReactiveEffect = ReactiveEffect; + exports.Static = Static; + exports.Suspense = Suspense; + exports.Teleport = Teleport; + exports.Text = Text; + exports.TrackOpTypes = TrackOpTypes; + exports.Transition = Transition; + exports.TransitionGroup = TransitionGroup; + exports.TriggerOpTypes = TriggerOpTypes; + exports.VueElement = VueElement; + exports.assertNumber = assertNumber; + exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling; + exports.callWithErrorHandling = callWithErrorHandling; + exports.camelize = camelize; + exports.capitalize = capitalize; + exports.cloneVNode = cloneVNode; + exports.compatUtils = compatUtils; + exports.computed = computed; + exports.createApp = createApp; + exports.createBlock = createBlock; + exports.createCommentVNode = createCommentVNode; + exports.createElementBlock = createElementBlock; + exports.createElementVNode = createBaseVNode; + exports.createHydrationRenderer = createHydrationRenderer; + exports.createPropsRestProxy = createPropsRestProxy; + exports.createRenderer = createRenderer; + exports.createSSRApp = createSSRApp; + exports.createSlots = createSlots; + exports.createStaticVNode = createStaticVNode; + exports.createTextVNode = createTextVNode; + exports.createVNode = createVNode; + exports.customRef = customRef; + exports.defineAsyncComponent = defineAsyncComponent; + exports.defineComponent = defineComponent; + exports.defineCustomElement = defineCustomElement; + exports.defineEmits = defineEmits; + exports.defineExpose = defineExpose; + exports.defineModel = defineModel; + exports.defineOptions = defineOptions; + exports.defineProps = defineProps; + exports.defineSSRCustomElement = defineSSRCustomElement; + exports.defineSlots = defineSlots; + exports.devtools = devtools; + exports.effect = effect; + exports.effectScope = effectScope; + exports.getCurrentInstance = getCurrentInstance; + exports.getCurrentScope = getCurrentScope; + exports.getCurrentWatcher = getCurrentWatcher; + exports.getTransitionRawChildren = getTransitionRawChildren; + exports.guardReactiveProps = guardReactiveProps; + exports.h = h; + exports.handleError = handleError; + exports.hasInjectionContext = hasInjectionContext; + exports.hydrate = hydrate; + exports.hydrateOnIdle = hydrateOnIdle; + exports.hydrateOnInteraction = hydrateOnInteraction; + exports.hydrateOnMediaQuery = hydrateOnMediaQuery; + exports.hydrateOnVisible = hydrateOnVisible; + exports.initCustomFormatter = initCustomFormatter; + exports.initDirectivesForSSR = initDirectivesForSSR; + exports.inject = inject; + exports.isMemoSame = isMemoSame; + exports.isProxy = isProxy; + exports.isReactive = isReactive; + exports.isReadonly = isReadonly; + exports.isRef = isRef; + exports.isRuntimeOnly = isRuntimeOnly; + exports.isShallow = isShallow; + exports.isVNode = isVNode; + exports.markRaw = markRaw; + exports.mergeDefaults = mergeDefaults; + exports.mergeModels = mergeModels; + exports.mergeProps = mergeProps; + exports.nextTick = nextTick; + exports.normalizeClass = normalizeClass; + exports.normalizeProps = normalizeProps; + exports.normalizeStyle = normalizeStyle; + exports.onActivated = onActivated; + exports.onBeforeMount = onBeforeMount; + exports.onBeforeUnmount = onBeforeUnmount; + exports.onBeforeUpdate = onBeforeUpdate; + exports.onDeactivated = onDeactivated; + exports.onErrorCaptured = onErrorCaptured; + exports.onMounted = onMounted; + exports.onRenderTracked = onRenderTracked; + exports.onRenderTriggered = onRenderTriggered; + exports.onScopeDispose = onScopeDispose; + exports.onServerPrefetch = onServerPrefetch; + exports.onUnmounted = onUnmounted; + exports.onUpdated = onUpdated; + exports.onWatcherCleanup = onWatcherCleanup; + exports.openBlock = openBlock; + exports.popScopeId = popScopeId; + exports.provide = provide; + exports.proxyRefs = proxyRefs; + exports.pushScopeId = pushScopeId; + exports.queuePostFlushCb = queuePostFlushCb; + exports.reactive = reactive; + exports.readonly = readonly; + exports.ref = ref; + exports.registerRuntimeCompiler = registerRuntimeCompiler; + exports.render = render; + exports.renderList = renderList; + exports.renderSlot = renderSlot; + exports.resolveComponent = resolveComponent; + exports.resolveDirective = resolveDirective; + exports.resolveDynamicComponent = resolveDynamicComponent; + exports.resolveFilter = resolveFilter; + exports.resolveTransitionHooks = resolveTransitionHooks; + exports.setBlockTracking = setBlockTracking; + exports.setDevtoolsHook = setDevtoolsHook; + exports.setTransitionHooks = setTransitionHooks; + exports.shallowReactive = shallowReactive; + exports.shallowReadonly = shallowReadonly; + exports.shallowRef = shallowRef; + exports.ssrContextKey = ssrContextKey; + exports.ssrUtils = ssrUtils; + exports.stop = stop; + exports.toDisplayString = toDisplayString; + exports.toHandlerKey = toHandlerKey; + exports.toHandlers = toHandlers; + exports.toRaw = toRaw; + exports.toRef = toRef; + exports.toRefs = toRefs; + exports.toValue = toValue; + exports.transformVNodeArgs = transformVNodeArgs; + exports.triggerRef = triggerRef; + exports.unref = unref; + exports.useAttrs = useAttrs; + exports.useCssModule = useCssModule; + exports.useCssVars = useCssVars; + exports.useHost = useHost; + exports.useId = useId; + exports.useModel = useModel; + exports.useSSRContext = useSSRContext; + exports.useShadowRoot = useShadowRoot; + exports.useSlots = useSlots; + exports.useTemplateRef = useTemplateRef; + exports.useTransitionState = useTransitionState; + exports.vModelCheckbox = vModelCheckbox; + exports.vModelDynamic = vModelDynamic; + exports.vModelRadio = vModelRadio; + exports.vModelSelect = vModelSelect; + exports.vModelText = vModelText; + exports.vShow = vShow; + exports.version = version; + exports.warn = warn; + exports.watch = watch; + exports.watchEffect = watchEffect; + exports.watchPostEffect = watchPostEffect; + exports.watchSyncEffect = watchSyncEffect; + exports.withAsyncContext = withAsyncContext; + exports.withCtx = withCtx; + exports.withDefaults = withDefaults; + exports.withDirectives = withDirectives; + exports.withKeys = withKeys; + exports.withMemo = withMemo; + exports.withModifiers = withModifiers; + exports.withScopeId = withScopeId; + + return exports; + +})({}); diff --git a/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js b/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js new file mode 100644 index 0000000..80ad452 --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js @@ -0,0 +1,5 @@ +/** +* @vue/runtime-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/var VueRuntimeDOM=function(e){"use strict";var t,n;let l,r,i,s,o,a,u,c,f,p,d,h;function g(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return e=>e in t}let m={},_=[],y=()=>{},b=()=>!1,S=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||97>e.charCodeAt(2)),C=e=>e.startsWith("onUpdate:"),x=Object.assign,w=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},E=Object.prototype.hasOwnProperty,k=(e,t)=>E.call(e,t),T=Array.isArray,A=e=>"[object Map]"===V(e),R=e=>"[object Set]"===V(e),O=e=>"[object Date]"===V(e),N=e=>"[object RegExp]"===V(e),P=e=>"function"==typeof e,M=e=>"string"==typeof e,I=e=>"symbol"==typeof e,L=e=>null!==e&&"object"==typeof e,D=e=>(L(e)||P(e))&&P(e.then)&&P(e.catch),F=Object.prototype.toString,V=e=>F.call(e),U=e=>V(e).slice(8,-1),j=e=>"[object Object]"===V(e),B=e=>M(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,$=g(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),H=e=>{let t=Object.create(null);return n=>t[n]||(t[n]=e(n))},W=/-(\w)/g,K=H(e=>e.replace(W,(e,t)=>t?t.toUpperCase():"")),z=/\B([A-Z])/g,q=H(e=>e.replace(z,"-$1").toLowerCase()),G=H(e=>e.charAt(0).toUpperCase()+e.slice(1)),J=H(e=>e?`on${G(e)}`:""),X=(e,t)=>!Object.is(e,t),Z=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Y=(e,t,n,l=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:l,value:n})},Q=e=>{let t=parseFloat(e);return isNaN(t)?e:t},ee=e=>{let t=M(e)?Number(e):NaN;return isNaN(t)?e:t},et=()=>l||(l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),en=g("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function el(e){if(T(e)){let t={};for(let n=0;n<e.length;n++){let l=e[n],r=M(l)?function(e){let t={};return e.replace(es,"").split(er).forEach(e=>{if(e){let n=e.split(ei);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}(l):el(l);if(r)for(let e in r)t[e]=r[e]}return t}if(M(e)||L(e))return e}let er=/;(?![^(]*\))/g,ei=/:([^]+)/,es=/\/\*[^]*?\*\//g;function eo(e){let t="";if(M(e))t=e;else if(T(e))for(let n=0;n<e.length;n++){let l=eo(e[n]);l&&(t+=l+" ")}else if(L(e))for(let n in e)e[n]&&(t+=n+" ");return t.trim()}let ea=g("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function eu(e,t){if(e===t)return!0;let n=O(e),l=O(t);if(n||l)return!!n&&!!l&&e.getTime()===t.getTime();if(n=I(e),l=I(t),n||l)return e===t;if(n=T(e),l=T(t),n||l)return!!n&&!!l&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let l=0;n&&l<e.length;l++)n=eu(e[l],t[l]);return n}(e,t);if(n=L(e),l=L(t),n||l){if(!n||!l||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){let l=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(l&&!r||!l&&r||!eu(e[n],t[n]))return!1}}return String(e)===String(t)}function ec(e,t){return e.findIndex(e=>eu(e,t))}let ef=e=>!!(e&&!0===e.__v_isRef),ep=e=>M(e)?e:null==e?"":T(e)||L(e)&&(e.toString===F||!P(e.toString))?ef(e)?ep(e.value):JSON.stringify(e,ed,2):String(e),ed=(e,t)=>ef(t)?ed(e,t.value):A(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],l)=>(e[eh(t,l)+" =>"]=n,e),{})}:R(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>eh(e))}:I(t)?eh(t):!L(t)||T(t)||j(t)?t:String(t),eh=(e,t="")=>{var n;return I(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};class eg{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=r,!e&&r&&(this.index=(r.scopes||(r.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let t=r;try{return r=this,e()}finally{r=t}}}on(){r=this}off(){r=this.parent}stop(e){if(this._active){let t,n;for(t=0,this._active=!1,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,this.effects.length=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}let ev=new WeakSet;class em{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,r&&r.active&&r.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,ev.has(this)&&(ev.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||ey(this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,eO(this),eS(this);let e=i,t=ek;i=this,ek=!0;try{return this.fn()}finally{eC(this),i=e,ek=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)eE(e);this.deps=this.depsTail=void 0,eO(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?ev.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ex(this)&&this.run()}get dirty(){return ex(this)}}let e_=0;function ey(e,t=!1){if(e.flags|=8,t){e.next=o,o=e;return}e.next=s,s=e}function eb(){let e;if(!(--e_>0)){if(o){let e=o;for(o=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}for(;s;){let t=s;for(s=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}}function eS(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function eC(e){let t;let n=e.depsTail,l=n;for(;l;){let e=l.prevDep;-1===l.version?(l===n&&(n=e),eE(l),function(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}(l)):t=l,l.dep.activeLink=l.prevActiveLink,l.prevActiveLink=void 0,l=e}e.deps=t,e.depsTail=n}function ex(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ew(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ew(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===eN))return;e.globalVersion=eN;let t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!ex(e)){e.flags&=-3;return}let n=i,l=ek;i=e,ek=!0;try{eS(e);let n=e.fn(e._value);(0===t.version||X(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{i=n,ek=l,eC(e),e.flags&=-3}}function eE(e,t=!1){let{dep:n,prevSub:l,nextSub:r}=e;if(l&&(l.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=l,e.nextSub=void 0),n.subs===e&&(n.subs=l,!l&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)eE(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}let ek=!0,eT=[];function eA(){eT.push(ek),ek=!1}function eR(){let e=eT.pop();ek=void 0===e||e}function eO(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=i;i=void 0;try{t()}finally{i=e}}}let eN=0;class eP{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class eM{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!i||!ek||i===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==i)t=this.activeLink=new eP(i,this),i.deps?(t.prevDep=i.depsTail,i.depsTail.nextDep=t,i.depsTail=t):i.deps=i.depsTail=t,function e(t){if(t.dep.sc++,4&t.sub.flags){let n=t.dep.computed;if(n&&!t.dep.subs){n.flags|=20;for(let t=n.deps;t;t=t.nextDep)e(t)}let l=t.dep.subs;l!==t&&(t.prevSub=l,l&&(l.nextSub=t)),t.dep.subs=t}}(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=i.depsTail,t.nextDep=void 0,i.depsTail.nextDep=t,i.depsTail=t,i.deps===t&&(i.deps=e)}return t}trigger(e){this.version++,eN++,this.notify(e)}notify(e){e_++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{eb()}}}let eI=new WeakMap,eL=Symbol(""),eD=Symbol(""),eF=Symbol("");function eV(e,t,n){if(ek&&i){let t=eI.get(e);t||eI.set(e,t=new Map);let l=t.get(n);l||(t.set(n,l=new eM),l.map=t,l.key=n),l.track()}}function eU(e,t,n,l,r,i){let s=eI.get(e);if(!s){eN++;return}let o=e=>{e&&e.trigger()};if(e_++,"clear"===t)s.forEach(o);else{let r=T(e),i=r&&B(n);if(r&&"length"===n){let e=Number(l);s.forEach((t,n)=>{("length"===n||n===eF||!I(n)&&n>=e)&&o(t)})}else switch((void 0!==n||s.has(void 0))&&o(s.get(n)),i&&o(s.get(eF)),t){case"add":r?i&&o(s.get("length")):(o(s.get(eL)),A(e)&&o(s.get(eD)));break;case"delete":!r&&(o(s.get(eL)),A(e)&&o(s.get(eD)));break;case"set":A(e)&&o(s.get(eL))}}eb()}function ej(e){let t=tg(e);return t===e?t:(eV(t,"iterate",eF),td(e)?t:t.map(tm))}function eB(e){return eV(e=tg(e),"iterate",eF),e}let e$={__proto__:null,[Symbol.iterator](){return eH(this,Symbol.iterator,tm)},concat(...e){return ej(this).concat(...e.map(e=>T(e)?ej(e):e))},entries(){return eH(this,"entries",e=>(e[1]=tm(e[1]),e))},every(e,t){return eK(this,"every",e,t,void 0,arguments)},filter(e,t){return eK(this,"filter",e,t,e=>e.map(tm),arguments)},find(e,t){return eK(this,"find",e,t,tm,arguments)},findIndex(e,t){return eK(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return eK(this,"findLast",e,t,tm,arguments)},findLastIndex(e,t){return eK(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return eK(this,"forEach",e,t,void 0,arguments)},includes(...e){return eq(this,"includes",e)},indexOf(...e){return eq(this,"indexOf",e)},join(e){return ej(this).join(e)},lastIndexOf(...e){return eq(this,"lastIndexOf",e)},map(e,t){return eK(this,"map",e,t,void 0,arguments)},pop(){return eG(this,"pop")},push(...e){return eG(this,"push",e)},reduce(e,...t){return ez(this,"reduce",e,t)},reduceRight(e,...t){return ez(this,"reduceRight",e,t)},shift(){return eG(this,"shift")},some(e,t){return eK(this,"some",e,t,void 0,arguments)},splice(...e){return eG(this,"splice",e)},toReversed(){return ej(this).toReversed()},toSorted(e){return ej(this).toSorted(e)},toSpliced(...e){return ej(this).toSpliced(...e)},unshift(...e){return eG(this,"unshift",e)},values(){return eH(this,"values",tm)}};function eH(e,t,n){let l=eB(e),r=l[t]();return l===e||td(e)||(r._next=r.next,r.next=()=>{let e=r._next();return e.value&&(e.value=n(e.value)),e}),r}let eW=Array.prototype;function eK(e,t,n,l,r,i){let s=eB(e),o=s!==e&&!td(e),a=s[t];if(a!==eW[t]){let t=a.apply(e,i);return o?tm(t):t}let u=n;s!==e&&(o?u=function(t,l){return n.call(this,tm(t),l,e)}:n.length>2&&(u=function(t,l){return n.call(this,t,l,e)}));let c=a.call(s,u,l);return o&&r?r(c):c}function ez(e,t,n,l){let r=eB(e),i=n;return r!==e&&(td(e)?n.length>3&&(i=function(t,l,r){return n.call(this,t,l,r,e)}):i=function(t,l,r){return n.call(this,t,tm(l),r,e)}),r[t](i,...l)}function eq(e,t,n){let l=tg(e);eV(l,"iterate",eF);let r=l[t](...n);return(-1===r||!1===r)&&th(n[0])?(n[0]=tg(n[0]),l[t](...n)):r}function eG(e,t,n=[]){eA(),e_++;let l=tg(e)[t].apply(e,n);return eb(),eR(),l}let eJ=g("__proto__,__v_isRef,__isVue"),eX=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(I));function eZ(e){I(e)||(e=String(e));let t=tg(this);return eV(t,"has",e),t.hasOwnProperty(e)}class eY{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if("__v_skip"===t)return e.__v_skip;let l=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!l;if("__v_isReadonly"===t)return l;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(l?r?ts:ti:r?tr:tl).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let i=T(e);if(!l){let e;if(i&&(e=e$[t]))return e;if("hasOwnProperty"===t)return eZ}let s=Reflect.get(e,t,ty(e)?e:n);return(I(t)?eX.has(t):eJ(t))?s:(l||eV(e,"get",t),r)?s:ty(s)?i&&B(t)?s:s.value:L(s)?l?tu(s):to(s):s}}class eQ extends eY{constructor(e=!1){super(!1,e)}set(e,t,n,l){let r=e[t];if(!this._isShallow){let t=tp(r);if(td(n)||tp(n)||(r=tg(r),n=tg(n)),!T(e)&&ty(r)&&!ty(n))return!t&&(r.value=n,!0)}let i=T(e)&&B(t)?Number(t)<e.length:k(e,t),s=Reflect.set(e,t,n,ty(e)?e:l);return e===tg(l)&&(i?X(n,r)&&eU(e,"set",t,n):eU(e,"add",t,n)),s}deleteProperty(e,t){let n=k(e,t);e[t];let l=Reflect.deleteProperty(e,t);return l&&n&&eU(e,"delete",t,void 0),l}has(e,t){let n=Reflect.has(e,t);return I(t)&&eX.has(t)||eV(e,"has",t),n}ownKeys(e){return eV(e,"iterate",T(e)?"length":eL),Reflect.ownKeys(e)}}class e0 extends eY{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}let e1=new eQ,e2=new e0,e6=new eQ(!0),e4=new e0(!0),e8=e=>e,e3=e=>Reflect.getPrototypeOf(e);function e5(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function e9(e,t){let n=function(e,t){let n={get(n){let l=this.__v_raw,r=tg(l),i=tg(n);e||(X(n,i)&&eV(r,"get",n),eV(r,"get",i));let{has:s}=e3(r),o=t?e8:e?t_:tm;return s.call(r,n)?o(l.get(n)):s.call(r,i)?o(l.get(i)):void(l!==r&&l.get(n))},get size(){let t=this.__v_raw;return e||eV(tg(t),"iterate",eL),Reflect.get(t,"size",t)},has(t){let n=this.__v_raw,l=tg(n),r=tg(t);return e||(X(t,r)&&eV(l,"has",t),eV(l,"has",r)),t===r?n.has(t):n.has(t)||n.has(r)},forEach(n,l){let r=this,i=r.__v_raw,s=tg(i),o=t?e8:e?t_:tm;return e||eV(s,"iterate",eL),i.forEach((e,t)=>n.call(l,o(e),o(t),r))}};return x(n,e?{add:e5("add"),set:e5("set"),delete:e5("delete"),clear:e5("clear")}:{add(e){t||td(e)||tp(e)||(e=tg(e));let n=tg(this);return e3(n).has.call(n,e)||(n.add(e),eU(n,"add",e,e)),this},set(e,n){t||td(n)||tp(n)||(n=tg(n));let l=tg(this),{has:r,get:i}=e3(l),s=r.call(l,e);s||(e=tg(e),s=r.call(l,e));let o=i.call(l,e);return l.set(e,n),s?X(n,o)&&eU(l,"set",e,n):eU(l,"add",e,n),this},delete(e){let t=tg(this),{has:n,get:l}=e3(t),r=n.call(t,e);r||(e=tg(e),r=n.call(t,e)),l&&l.call(t,e);let i=t.delete(e);return r&&eU(t,"delete",e,void 0),i},clear(){let e=tg(this),t=0!==e.size,n=e.clear();return t&&eU(e,"clear",void 0,void 0),n}}),["keys","values","entries",Symbol.iterator].forEach(l=>{n[l]=function(...n){let r=this.__v_raw,i=tg(r),s=A(i),o="entries"===l||l===Symbol.iterator&&s,a=r[l](...n),u=t?e8:e?t_:tm;return e||eV(i,"iterate","keys"===l&&s?eD:eL),{next(){let{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:o?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}),n}(e,t);return(t,l,r)=>"__v_isReactive"===l?!e:"__v_isReadonly"===l?e:"__v_raw"===l?t:Reflect.get(k(n,l)&&l in t?n:t,l,r)}let e7={get:e9(!1,!1)},te={get:e9(!1,!0)},tt={get:e9(!0,!1)},tn={get:e9(!0,!0)},tl=new WeakMap,tr=new WeakMap,ti=new WeakMap,ts=new WeakMap;function to(e){return tp(e)?e:tc(e,!1,e1,e7,tl)}function ta(e){return tc(e,!1,e6,te,tr)}function tu(e){return tc(e,!0,e2,tt,ti)}function tc(e,t,n,l,r){if(!L(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let i=r.get(e);if(i)return i;let s=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(U(e));if(0===s)return e;let o=new Proxy(e,2===s?l:n);return r.set(e,o),o}function tf(e){return tp(e)?tf(e.__v_raw):!!(e&&e.__v_isReactive)}function tp(e){return!!(e&&e.__v_isReadonly)}function td(e){return!!(e&&e.__v_isShallow)}function th(e){return!!e&&!!e.__v_raw}function tg(e){let t=e&&e.__v_raw;return t?tg(t):e}function tv(e){return!k(e,"__v_skip")&&Object.isExtensible(e)&&Y(e,"__v_skip",!0),e}let tm=e=>L(e)?to(e):e,t_=e=>L(e)?tu(e):e;function ty(e){return!!e&&!0===e.__v_isRef}function tb(e){return tC(e,!1)}function tS(e){return tC(e,!0)}function tC(e,t){return ty(e)?e:new tx(e,t)}class tx{constructor(e,t){this.dep=new eM,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:tg(e),this._value=t?e:tm(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||td(e)||tp(e);X(e=n?e:tg(e),t)&&(this._rawValue=e,this._value=n?e:tm(e),this.dep.trigger())}}function tw(e){return ty(e)?e.value:e}let tE={get:(e,t,n)=>"__v_raw"===t?e:tw(Reflect.get(e,t,n)),set:(e,t,n,l)=>{let r=e[t];return ty(r)&&!ty(n)?(r.value=n,!0):Reflect.set(e,t,n,l)}};function tk(e){return tf(e)?e:new Proxy(e,tE)}class tT{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new eM,{get:n,set:l}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=l}get value(){return this._value=this._get()}set value(e){this._set(e)}}function tA(e){return new tT(e)}class tR{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){let n=eI.get(e);return n&&n.get(t)}(tg(this._object),this._key)}}class tO{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function tN(e,t,n){let l=e[t];return ty(l)?l:new tR(e,t,n)}class tP{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new eM(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=eN-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags)&&i!==this)return ey(this,!0),!0}get value(){let e=this.dep.track();return ew(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}let tM={},tI=new WeakMap;function tL(e,t=!1,n=d){if(n){let t=tI.get(n);t||tI.set(n,t=[]),t.push(e)}}function tD(e,t=1/0,n){if(t<=0||!L(e)||e.__v_skip||(n=n||new Set).has(e))return e;if(n.add(e),t--,ty(e))tD(e.value,t,n);else if(T(e))for(let l=0;l<e.length;l++)tD(e[l],t,n);else if(R(e)||A(e))e.forEach(e=>{tD(e,t,n)});else if(j(e)){for(let l in e)tD(e[l],t,n);for(let l of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,l)&&tD(e[l],t,n)}return e}function tF(e,t,n,l){try{return l?e(...l):e()}catch(e){tU(e,t,n)}}function tV(e,t,n,l){if(P(e)){let r=tF(e,t,n,l);return r&&D(r)&&r.catch(e=>{tU(e,t,n)}),r}if(T(e)){let r=[];for(let i=0;i<e.length;i++)r.push(tV(e[i],t,n,l));return r}}function tU(e,t,n,l=!0){t&&t.vnode;let{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||m;if(t){let l=t.parent,i=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){let t=l.ec;if(t){for(let n=0;n<t.length;n++)if(!1===t[n](e,i,s))return}l=l.parent}if(r){eA(),tF(r,null,10,[e,i,s]),eR();return}}!function(e,t,n,l=!0,r=!1){if(r)throw e;console.error(e)}(e,0,0,l,i)}let tj=[],tB=-1,t$=[],tH=null,tW=0,tK=Promise.resolve(),tz=null;function tq(e){let t=tz||tK;return e?t.then(this?e.bind(this):e):t}function tG(e){if(!(1&e.flags)){let t=tQ(e),n=tj[tj.length-1];!n||!(2&e.flags)&&t>=tQ(n)?tj.push(e):tj.splice(function(e){let t=tB+1,n=tj.length;for(;t<n;){let l=t+n>>>1,r=tj[l],i=tQ(r);i<e||i===e&&2&r.flags?t=l+1:n=l}return t}(t),0,e),e.flags|=1,tJ()}}function tJ(){tz||(tz=tK.then(function e(t){try{for(tB=0;tB<tj.length;tB++){let e=tj[tB];!e||8&e.flags||(4&e.flags&&(e.flags&=-2),tF(e,e.i,e.i?15:14),4&e.flags||(e.flags&=-2))}}finally{for(;tB<tj.length;tB++){let e=tj[tB];e&&(e.flags&=-2)}tB=-1,tj.length=0,tY(),tz=null,(tj.length||t$.length)&&e()}}))}function tX(e){T(e)?t$.push(...e):tH&&-1===e.id?tH.splice(tW+1,0,e):1&e.flags||(t$.push(e),e.flags|=1),tJ()}function tZ(e,t,n=tB+1){for(;n<tj.length;n++){let t=tj[n];if(t&&2&t.flags){if(e&&t.id!==e.uid)continue;tj.splice(n,1),n--,4&t.flags&&(t.flags&=-2),t(),4&t.flags||(t.flags&=-2)}}}function tY(e){if(t$.length){let e=[...new Set(t$)].sort((e,t)=>tQ(e)-tQ(t));if(t$.length=0,tH){tH.push(...e);return}for(tW=0,tH=e;tW<tH.length;tW++){let e=tH[tW];4&e.flags&&(e.flags&=-2),8&e.flags||e(),e.flags&=-2}tH=null,tW=0}}let tQ=e=>null==e.id?2&e.flags?-1:1/0:e.id,t0=null,t1=null;function t2(e){let t=t0;return t0=e,t1=e&&e.type.__scopeId||null,t}function t6(e,t=t0,n){if(!t||e._n)return e;let l=(...n)=>{let r;l._d&&rs(-1);let i=t2(t);try{r=e(...n)}finally{t2(i),l._d&&rs(1)}return r};return l._n=!0,l._c=!0,l._d=!0,l}function t4(e,t,n,l){let r=e.dirs,i=t&&t.dirs;for(let s=0;s<r.length;s++){let o=r[s];i&&(o.oldValue=i[s].value);let a=o.dir[l];a&&(eA(),tV(a,n,8,[e.el,o,e,t]),eR())}}let t8=Symbol("_vte"),t3=e=>e.__isTeleport,t5=e=>e&&(e.disabled||""===e.disabled),t9=e=>e&&(e.defer||""===e.defer),t7=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,ne=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,nt=(e,t)=>{let n=e&&e.to;return M(n)?t?t(n):null:n},nn={name:"Teleport",__isTeleport:!0,process(e,t,n,l,r,i,s,o,a,u){let{mc:c,pc:f,pbc:p,o:{insert:d,querySelector:h,createText:g,createComment:m}}=u,_=t5(t.props),{shapeFlag:y,children:b,dynamicChildren:S}=t;if(null==e){let e=t.el=g(""),u=t.anchor=g("");d(e,n,l),d(u,n,l);let f=(e,t)=>{16&y&&(r&&r.isCE&&(r.ce._teleportTarget=e),c(b,e,t,r,i,s,o,a))},p=()=>{let e=t.target=nt(t.props,h),n=ni(e,t,g,d);e&&("svg"!==s&&t7(e)?s="svg":"mathml"!==s&&ne(e)&&(s="mathml"),_||(f(e,n),nr(t,!1)))};_&&(f(n,u),nr(t,!0)),t9(t.props)?lM(()=>{p(),t.el.__isMounted=!0},i):p()}else{if(t9(t.props)&&!e.el.__isMounted){lM(()=>{nn.process(e,t,n,l,r,i,s,o,a,u),delete e.el.__isMounted},i);return}t.el=e.el,t.targetStart=e.targetStart;let c=t.anchor=e.anchor,d=t.target=e.target,g=t.targetAnchor=e.targetAnchor,m=t5(e.props),y=m?n:d;if("svg"===s||t7(d)?s="svg":("mathml"===s||ne(d))&&(s="mathml"),S?(p(e.dynamicChildren,S,y,r,i,s,o),lU(e,t,!0)):a||f(e,t,y,m?c:g,r,i,s,o,!1),_)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):nl(t,n,c,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=nt(t.props,h);e&&nl(t,e,null,u,0)}else m&&nl(t,d,g,u,1);nr(t,_)}},remove(e,t,n,{um:l,o:{remove:r}},i){let{shapeFlag:s,children:o,anchor:a,targetStart:u,targetAnchor:c,target:f,props:p}=e;if(f&&(r(u),r(c)),i&&r(a),16&s){let e=i||!t5(p);for(let r=0;r<o.length;r++){let i=o[r];l(i,t,n,e,!!i.dynamicChildren)}}},move:nl,hydrate:function(e,t,n,l,r,i,{o:{nextSibling:s,parentNode:o,querySelector:a,insert:u,createText:c}},f){let p=t.target=nt(t.props,a);if(p){let a=t5(t.props),d=p._lpa||p.firstChild;if(16&t.shapeFlag){if(a)t.anchor=f(s(e),t,o(e),n,l,r,i),t.targetStart=d,t.targetAnchor=d&&s(d);else{t.anchor=s(e);let o=d;for(;o;){if(o&&8===o.nodeType){if("teleport start anchor"===o.data)t.targetStart=o;else if("teleport anchor"===o.data){t.targetAnchor=o,p._lpa=t.targetAnchor&&s(t.targetAnchor);break}}o=s(o)}t.targetAnchor||ni(p,t,c,u),f(d&&s(d),t,p,n,l,r,i)}}nr(t,a)}return t.anchor&&s(t.anchor)}};function nl(e,t,n,{o:{insert:l},m:r},i=2){0===i&&l(e.targetAnchor,t,n);let{el:s,anchor:o,shapeFlag:a,children:u,props:c}=e,f=2===i;if(f&&l(s,t,n),(!f||t5(c))&&16&a)for(let e=0;e<u.length;e++)r(u[e],t,n,2);f&&l(o,t,n)}function nr(e,t){let n=e.ctx;if(n&&n.ut){let l,r;for(t?(l=e.el,r=e.anchor):(l=e.targetStart,r=e.targetAnchor);l&&l!==r;)1===l.nodeType&&l.setAttribute("data-v-owner",n.uid),l=l.nextSibling;n.ut()}}function ni(e,t,n,l){let r=t.targetStart=n(""),i=t.targetAnchor=n("");return r[t8]=i,e&&(l(r,e),l(i,e)),i}let ns=Symbol("_leaveCb"),no=Symbol("_enterCb");function na(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return nq(()=>{e.isMounted=!0}),nX(()=>{e.isUnmounting=!0}),e}let nu=[Function,Array],nc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:nu,onEnter:nu,onAfterEnter:nu,onEnterCancelled:nu,onBeforeLeave:nu,onLeave:nu,onAfterLeave:nu,onLeaveCancelled:nu,onBeforeAppear:nu,onAppear:nu,onAfterAppear:nu,onAppearCancelled:nu},nf=e=>{let t=e.subTree;return t.component?nf(t.component):t};function np(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==l7){t=n;break}}return t}let nd={name:"BaseTransition",props:nc,setup(e,{slots:t}){let n=rk(),l=na();return()=>{let r=t.default&&ny(t.default(),!0);if(!r||!r.length)return;let i=np(r),s=tg(e),{mode:o}=s;if(l.isLeaving)return nv(i);let a=nm(i);if(!a)return nv(i);let u=ng(a,s,l,n,e=>u=e);a.type!==l7&&n_(a,u);let c=n.subTree&&nm(n.subTree);if(c&&c.type!==l7&&!rc(a,c)&&nf(n).type!==l7){let e=ng(c,s,l,n);if(n_(c,e),"out-in"===o&&a.type!==l7)return l.isLeaving=!0,e.afterLeave=()=>{l.isLeaving=!1,8&n.job.flags||n.update(),delete e.afterLeave,c=void 0},nv(i);"in-out"===o&&a.type!==l7?e.delayLeave=(e,t,n)=>{nh(l,c)[String(c.key)]=c,e[ns]=()=>{t(),e[ns]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{n(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function nh(e,t){let{leavingVNodes:n}=e,l=n.get(t.type);return l||(l=Object.create(null),n.set(t.type,l)),l}function ng(e,t,n,l,r){let{appear:i,mode:s,persisted:o=!1,onBeforeEnter:a,onEnter:u,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:p,onLeave:d,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:m,onAppear:_,onAfterAppear:y,onAppearCancelled:b}=t,S=String(e.key),C=nh(n,e),x=(e,t)=>{e&&tV(e,l,9,t)},w=(e,t)=>{let n=t[1];x(e,t),T(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},E={mode:s,persisted:o,beforeEnter(t){let l=a;if(!n.isMounted){if(!i)return;l=m||a}t[ns]&&t[ns](!0);let r=C[S];r&&rc(e,r)&&r.el[ns]&&r.el[ns](),x(l,[t])},enter(e){let t=u,l=c,r=f;if(!n.isMounted){if(!i)return;t=_||u,l=y||c,r=b||f}let s=!1,o=e[no]=t=>{s||(s=!0,t?x(r,[e]):x(l,[e]),E.delayedLeave&&E.delayedLeave(),e[no]=void 0)};t?w(t,[e,o]):o()},leave(t,l){let r=String(e.key);if(t[no]&&t[no](!0),n.isUnmounting)return l();x(p,[t]);let i=!1,s=t[ns]=n=>{i||(i=!0,l(),n?x(g,[t]):x(h,[t]),t[ns]=void 0,C[r]!==e||delete C[r])};C[r]=e,d?w(d,[t,s]):s()},clone(e){let i=ng(e,t,n,l,r);return r&&r(i),i}};return E}function nv(e){if(nF(e))return(e=rv(e)).children=null,e}function nm(e){if(!nF(e))return t3(e.type)&&e.children?np(e.children):e;let{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&P(n.default))return n.default()}}function n_(e,t){6&e.shapeFlag&&e.component?(e.transition=t,n_(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ny(e,t=!1,n){let l=[],r=0;for(let i=0;i<e.length;i++){let s=e[i],o=null==n?s.key:String(n)+String(null!=s.key?s.key:i);s.type===l5?(128&s.patchFlag&&r++,l=l.concat(ny(s.children,t,o))):(t||s.type!==l7)&&l.push(null!=o?rv(s,{key:o}):s)}if(r>1)for(let e=0;e<l.length;e++)l[e].patchFlag=-2;return l}function nb(e,t){return P(e)?x({name:e.name},t,{setup:e}):e}function nS(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function nC(e,t,n,l,r=!1){if(T(e)){e.forEach((e,i)=>nC(e,t&&(T(t)?t[i]:t),n,l,r));return}if(nL(l)&&!r){512&l.shapeFlag&&l.type.__asyncResolved&&l.component.subTree.component&&nC(e,t,n,l.component.subTree);return}let i=4&l.shapeFlag?rL(l.component):l.el,s=r?null:i,{i:o,r:a}=e,u=t&&t.r,c=o.refs===m?o.refs={}:o.refs,f=o.setupState,p=tg(f),d=f===m?()=>!1:e=>k(p,e);if(null!=u&&u!==a&&(M(u)?(c[u]=null,d(u)&&(f[u]=null)):ty(u)&&(u.value=null)),P(a))tF(a,o,12,[s,c]);else{let t=M(a),l=ty(a);if(t||l){let o=()=>{if(e.f){let n=t?d(a)?f[a]:c[a]:a.value;r?T(n)&&w(n,i):T(n)?n.includes(i)||n.push(i):t?(c[a]=[i],d(a)&&(f[a]=c[a])):(a.value=[i],e.k&&(c[e.k]=a.value))}else t?(c[a]=s,d(a)&&(f[a]=s)):l&&(a.value=s,e.k&&(c[e.k]=s))};s?(o.id=-1,lM(o,n)):o()}}}let nx=!1,nw=()=>{nx||(console.error("Hydration completed but contains mismatches."),nx=!0)},nE=e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName,nk=e=>e.namespaceURI.includes("MathML"),nT=e=>{if(1===e.nodeType){if(nE(e))return"svg";if(nk(e))return"mathml"}},nA=e=>8===e.nodeType;function nR(e){let{mt:t,p:n,o:{patchProp:l,createText:r,nextSibling:i,parentNode:s,remove:o,insert:a,createComment:u}}=e,c=(n,l,o,u,y,b=!1)=>{b=b||!!l.dynamicChildren;let S=nA(n)&&"["===n.data,C=()=>h(n,l,o,u,y,S),{type:x,ref:w,shapeFlag:E,patchFlag:k}=l,T=n.nodeType;l.el=n,-2===k&&(b=!1,l.dynamicChildren=null);let A=null;switch(x){case l9:3!==T?""===l.children?(a(l.el=r(""),s(n),n),A=n):A=C():(n.data!==l.children&&(nw(),n.data=l.children),A=i(n));break;case l7:_(n)?(A=i(n),m(l.el=n.content.firstChild,n,o)):A=8!==T||S?C():i(n);break;case re:if(S&&(T=(n=i(n)).nodeType),1===T||3===T){A=n;let e=!l.children.length;for(let t=0;t<l.staticCount;t++)e&&(l.children+=1===A.nodeType?A.outerHTML:A.data),t===l.staticCount-1&&(l.anchor=A),A=i(A);return S?i(A):A}C();break;case l5:A=S?d(n,l,o,u,y,b):C();break;default:if(1&E)A=1===T&&l.type.toLowerCase()===n.tagName.toLowerCase()||_(n)?f(n,l,o,u,y,b):C();else if(6&E){l.slotScopeIds=y;let e=s(n);if(A=S?g(n):nA(n)&&"teleport start"===n.data?g(n,n.data,"teleport end"):i(n),t(l,e,null,o,u,nT(e),b),nL(l)&&!l.type.__asyncResolved){let t;S?(t=rh(l5)).anchor=A?A.previousSibling:e.lastChild:t=3===n.nodeType?rm(""):rh("div"),t.el=n,l.component.subTree=t}}else 64&E?A=8!==T?C():l.type.hydrate(n,l,o,u,y,b,e,p):128&E&&(A=l.type.hydrate(n,l,o,u,nT(s(n)),y,b,e,c))}return null!=w&&nC(w,null,u,l),A},f=(e,t,n,r,i,s)=>{s=s||!!t.dynamicChildren;let{type:a,props:u,patchFlag:c,shapeFlag:f,dirs:d,transition:h}=t,g="input"===a||"option"===a;if(g||-1!==c){let a;d&&t4(t,null,n,"created");let y=!1;if(_(e)){y=lV(null,h)&&n&&n.vnode.props&&n.vnode.props.appear;let l=e.content.firstChild;y&&h.beforeEnter(l),m(l,e,n),t.el=e=l}if(16&f&&!(u&&(u.innerHTML||u.textContent))){let l=p(e.firstChild,t,e,n,r,i,s);for(;l;){nP(e,1)||nw();let t=l;l=l.nextSibling,o(t)}}else if(8&f){let n=t.children;"\n"===n[0]&&("PRE"===e.tagName||"TEXTAREA"===e.tagName)&&(n=n.slice(1)),e.textContent!==n&&(nP(e,0)||nw(),e.textContent=t.children)}if(u){if(g||!s||48&c){let t=e.tagName.includes("-");for(let r in u)(g&&(r.endsWith("value")||"indeterminate"===r)||S(r)&&!$(r)||"."===r[0]||t)&&l(e,r,null,u[r],void 0,n)}else if(u.onClick)l(e,"onClick",null,u.onClick,void 0,n);else if(4&c&&tf(u.style))for(let e in u.style)u.style[e]}(a=u&&u.onVnodeBeforeMount)&&rC(a,n,t),d&&t4(t,null,n,"beforeMount"),((a=u&&u.onVnodeMounted)||d||y)&&l8(()=>{a&&rC(a,n,t),y&&h.enter(e),d&&t4(t,null,n,"mounted")},r)}return e.nextSibling},p=(e,t,l,s,o,u,f)=>{f=f||!!t.dynamicChildren;let p=t.children,d=p.length;for(let t=0;t<d;t++){let h=f?p[t]:p[t]=r_(p[t]),g=h.type===l9;e?(g&&!f&&t+1<d&&r_(p[t+1]).type===l9&&(a(r(e.data.slice(h.children.length)),l,i(e)),e.data=h.children),e=c(e,h,s,o,u,f)):g&&!h.children?a(h.el=r(""),l):(nP(l,1)||nw(),n(null,h,l,null,s,o,nT(l),u))}return e},d=(e,t,n,l,r,o)=>{let{slotScopeIds:c}=t;c&&(r=r?r.concat(c):c);let f=s(e),d=p(i(e),t,f,n,l,r,o);return d&&nA(d)&&"]"===d.data?i(t.anchor=d):(nw(),a(t.anchor=u("]"),f,d),d)},h=(e,t,l,r,a,u)=>{if(nP(e.parentElement,1)||nw(),t.el=null,u){let t=g(e);for(;;){let n=i(e);if(n&&n!==t)o(n);else break}}let c=i(e),f=s(e);return o(e),n(null,t,f,c,l,r,nT(f),a),l&&(l.vnode.el=t.el,lQ(l,t.el)),c},g=(e,t="[",n="]")=>{let l=0;for(;e;)if((e=i(e))&&nA(e)&&(e.data===t&&l++,e.data===n)){if(0===l)return i(e);l--}return e},m=(e,t,n)=>{let l=t.parentNode;l&&l.replaceChild(e,t);let r=n;for(;r;)r.vnode.el===t&&(r.vnode.el=r.subTree.el=e),r=r.parent},_=e=>1===e.nodeType&&"TEMPLATE"===e.tagName;return[(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),tY(),t._vnode=e;return}c(t.firstChild,e,null,null,null),tY(),t._vnode=e},c]}let nO="data-allow-mismatch",nN={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function nP(e,t){if(0===t||1===t)for(;e&&!e.hasAttribute(nO);)e=e.parentElement;let n=e&&e.getAttribute(nO);if(null==n)return!1;if(""===n)return!0;{let e=n.split(",");return!!(0===t&&e.includes("children"))||n.split(",").includes(nN[t])}}let nM=et().requestIdleCallback||(e=>setTimeout(e,1)),nI=et().cancelIdleCallback||(e=>clearTimeout(e)),nL=e=>!!e.type.__asyncLoader;function nD(e,t){let{ref:n,props:l,children:r,ce:i}=t.vnode,s=rh(e,l,r);return s.ref=n,s.ce=i,delete t.vnode.ce,s}let nF=e=>e.type.__isKeepAlive;function nV(e,t){return T(e)?e.some(e=>nV(e,t)):M(e)?e.split(",").includes(t):!!N(e)&&(e.lastIndex=0,e.test(t))}function nU(e,t){nB(e,"a",t)}function nj(e,t){nB(e,"da",t)}function nB(e,t,n=rE){let l=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(nW(t,l,n),n){let e=n.parent;for(;e&&e.parent;)nF(e.parent.vnode)&&function(e,t,n,l){let r=nW(t,e,l,!0);nZ(()=>{w(l[t],r)},n)}(l,t,n,e),e=e.parent}}function n$(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function nH(e){return 128&e.shapeFlag?e.ssContent:e}function nW(e,t,n=rE,l=!1){if(n){let r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...l)=>{eA();let r=rT(n),i=tV(t,n,e,l);return r(),eR(),i});return l?r.unshift(i):r.push(i),i}}let nK=e=>(t,n=rE)=>{rO&&"sp"!==e||nW(e,(...e)=>t(...e),n)},nz=nK("bm"),nq=nK("m"),nG=nK("bu"),nJ=nK("u"),nX=nK("bum"),nZ=nK("um"),nY=nK("sp"),nQ=nK("rtg"),n0=nK("rtc");function n1(e,t=rE){nW("ec",e,t)}let n2="components",n6=Symbol.for("v-ndc");function n4(e,t,n=!0,l=!1){let r=t0||rE;if(r){let n=r.type;if(e===n2){let e=rD(n,!1);if(e&&(e===t||e===K(t)||e===G(K(t))))return n}let i=n8(r[e]||n[e],t)||n8(r.appContext[e],t);return!i&&l?n:i}}function n8(e,t){return e&&(e[t]||e[K(t)]||e[G(K(t))])}let n3=e=>e?rR(e)?rL(e):n3(e.parent):null,n5=x(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>n3(e.parent),$root:e=>n3(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>li(e),$forceUpdate:e=>e.f||(e.f=()=>{tG(e.update)}),$nextTick:e=>e.n||(e.n=tq.bind(e.proxy)),$watch:e=>lW.bind(e)}),n9=(e,t)=>e!==m&&!e.__isScriptSetup&&k(e,t),n7={get({_:e},t){let n,l,r;if("__v_skip"===t)return!0;let{ctx:i,setupState:s,data:o,props:a,accessCache:u,type:c,appContext:f}=e;if("$"!==t[0]){let l=u[t];if(void 0!==l)switch(l){case 1:return s[t];case 2:return o[t];case 4:return i[t];case 3:return a[t]}else{if(n9(s,t))return u[t]=1,s[t];if(o!==m&&k(o,t))return u[t]=2,o[t];if((n=e.propsOptions[0])&&k(n,t))return u[t]=3,a[t];if(i!==m&&k(i,t))return u[t]=4,i[t];ll&&(u[t]=0)}}let p=n5[t];return p?("$attrs"===t&&eV(e.attrs,"get",""),p(e)):(l=c.__cssModules)&&(l=l[t])?l:i!==m&&k(i,t)?(u[t]=4,i[t]):k(r=f.config.globalProperties,t)?r[t]:void 0},set({_:e},t,n){let{data:l,setupState:r,ctx:i}=e;return n9(r,t)?(r[t]=n,!0):l!==m&&k(l,t)?(l[t]=n,!0):!k(e.props,t)&&!("$"===t[0]&&t.slice(1)in e)&&(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:l,appContext:r,propsOptions:i}},s){let o;return!!n[s]||e!==m&&k(e,s)||n9(t,s)||(o=i[0])&&k(o,s)||k(l,s)||k(n5,s)||k(r.config.globalProperties,s)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:k(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},le=x({},n7,{get(e,t){if(t!==Symbol.unscopables)return n7.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!en(t)});function lt(){let e=rk();return e.setupContext||(e.setupContext=rI(e))}function ln(e){return T(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}let ll=!0;function lr(e,t,n){tV(T(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function li(e){let t;let n=e.type,{mixins:l,extends:r}=n,{mixins:i,optionsCache:s,config:{optionMergeStrategies:o}}=e.appContext,a=s.get(n);return a?t=a:i.length||l||r?(t={},i.length&&i.forEach(e=>ls(t,e,o,!0)),ls(t,n,o)):t=n,L(n)&&s.set(n,t),t}function ls(e,t,n,l=!1){let{mixins:r,extends:i}=t;for(let s in i&&ls(e,i,n,!0),r&&r.forEach(t=>ls(e,t,n,!0)),t)if(l&&"expose"===s);else{let l=lo[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}let lo={data:la,props:lp,emits:lp,methods:lf,computed:lf,beforeCreate:lc,created:lc,beforeMount:lc,mounted:lc,beforeUpdate:lc,updated:lc,beforeDestroy:lc,beforeUnmount:lc,destroyed:lc,unmounted:lc,activated:lc,deactivated:lc,errorCaptured:lc,serverPrefetch:lc,components:lf,directives:lf,watch:function(e,t){if(!e)return t;if(!t)return e;let n=x(Object.create(null),e);for(let l in t)n[l]=lc(e[l],t[l]);return n},provide:la,inject:function(e,t){return lf(lu(e),lu(t))}};function la(e,t){return t?e?function(){return x(P(e)?e.call(this,this):e,P(t)?t.call(this,this):t)}:t:e}function lu(e){if(T(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function lc(e,t){return e?[...new Set([].concat(e,t))]:t}function lf(e,t){return e?x(Object.create(null),e,t):t}function lp(e,t){return e?T(e)&&T(t)?[...new Set([...e,...t])]:x(Object.create(null),ln(e),ln(null!=t?t:{})):t}function ld(){return{app:null,config:{isNativeTag:b,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let lh=0,lg=null;function lv(e,t){if(rE){let n=rE.provides,l=rE.parent&&rE.parent.provides;l===n&&(n=rE.provides=Object.create(l)),n[e]=t}}function lm(e,t,n=!1){let l=rE||t0;if(l||lg){let r=lg?lg._context.provides:l?null==l.parent?l.vnode.appContext&&l.vnode.appContext.provides:l.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&P(t)?t.call(l&&l.proxy):t}}let l_={},ly=()=>Object.create(l_),lb=e=>Object.getPrototypeOf(e)===l_;function lS(e,t,n,l){let r;let[i,s]=e.propsOptions,o=!1;if(t)for(let a in t){let u;if($(a))continue;let c=t[a];i&&k(i,u=K(a))?s&&s.includes(u)?(r||(r={}))[u]=c:n[u]=c:lG(e.emitsOptions,a)||a in l&&c===l[a]||(l[a]=c,o=!0)}if(s){let t=tg(n),l=r||m;for(let r=0;r<s.length;r++){let o=s[r];n[o]=lC(i,t,o,l[o],e,!k(l,o))}}return o}function lC(e,t,n,l,r,i){let s=e[n];if(null!=s){let e=k(s,"default");if(e&&void 0===l){let e=s.default;if(s.type!==Function&&!s.skipFactory&&P(e)){let{propsDefaults:i}=r;if(n in i)l=i[n];else{let s=rT(r);l=i[n]=e.call(null,t),s()}}else l=e;r.ce&&r.ce._setProp(n,l)}s[0]&&(i&&!e?l=!1:s[1]&&(""===l||l===q(n))&&(l=!0))}return l}let lx=new WeakMap;function lw(e){return!("$"===e[0]||$(e))}let lE=e=>"_"===e[0]||"$stable"===e,lk=e=>T(e)?e.map(r_):[r_(e)],lT=(e,t,n)=>{if(t._n)return t;let l=t6((...e)=>lk(t(...e)),n);return l._c=!1,l},lA=(e,t,n)=>{let l=e._ctx;for(let n in e){if(lE(n))continue;let r=e[n];if(P(r))t[n]=lT(n,r,l);else if(null!=r){let e=lk(r);t[n]=()=>e}}},lR=(e,t)=>{let n=lk(t);e.slots.default=()=>n},lO=(e,t,n)=>{for(let l in t)(n||"_"!==l)&&(e[l]=t[l])},lN=(e,t,n)=>{let l=e.slots=ly();if(32&e.vnode.shapeFlag){let e=t._;e?(lO(l,t,n),n&&Y(l,"_",e,!0)):lA(t,l)}else t&&lR(e,t)},lP=(e,t,n)=>{let{vnode:l,slots:r}=e,i=!0,s=m;if(32&l.shapeFlag){let e=t._;e?n&&1===e?i=!1:lO(r,t,n):(i=!t.$stable,lA(t,r)),s=t}else t&&(lR(e,t),s={default:1});if(i)for(let e in r)lE(e)||null!=s[e]||delete r[e]},lM=l8;function lI(e){return lL(e,nR)}function lL(e,t){var n;let l,r;et().__VUE__=!0;let{insert:i,remove:s,patchProp:o,createElement:a,createText:c,createComment:f,setText:p,setElementText:d,parentNode:h,nextSibling:g,setScopeId:b=y,insertStaticContent:S}=e,C=(e,t,n,l=null,r=null,i=null,s,o=null,a=!!t.dynamicChildren)=>{if(e===t)return;e&&!rc(e,t)&&(l=eo(e),en(e,r,i,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);let{type:u,ref:c,shapeFlag:f}=t;switch(u){case l9:w(e,t,n,l);break;case l7:E(e,t,n,l);break;case re:null==e&&A(t,n,l,s);break;case l5:B(e,t,n,l,r,i,s,o,a);break;default:1&f?N(e,t,n,l,r,i,s,o,a):6&f?H(e,t,n,l,r,i,s,o,a):64&f?u.process(e,t,n,l,r,i,s,o,a,ec):128&f&&u.process(e,t,n,l,r,i,s,o,a,ec)}null!=c&&r&&nC(c,e&&e.ref,i,t||e,!t)},w=(e,t,n,l)=>{if(null==e)i(t.el=c(t.children),n,l);else{let n=t.el=e.el;t.children!==e.children&&p(n,t.children)}},E=(e,t,n,l)=>{null==e?i(t.el=f(t.children||""),n,l):t.el=e.el},A=(e,t,n,l)=>{[e.el,e.anchor]=S(e.children,t,n,l,e.el,e.anchor)},R=({el:e,anchor:t},n,l)=>{let r;for(;e&&e!==t;)r=g(e),i(e,n,l),e=r;i(t,n,l)},O=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=g(e),s(e),e=n;s(t)},N=(e,t,n,l,r,i,s,o,a)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?M(t,n,l,r,i,s,o,a):V(e,t,r,i,s,o,a)},M=(e,t,n,l,r,s,u,c)=>{let f,p;let{props:h,shapeFlag:g,transition:m,dirs:_}=e;if(f=e.el=a(e.type,s,h&&h.is,h),8&g?d(f,e.children):16&g&&F(e.children,f,null,l,r,lD(e,s),u,c),_&&t4(e,null,l,"created"),I(f,e,e.scopeId,u,l),h){for(let e in h)"value"===e||$(e)||o(f,e,null,h[e],s,l);"value"in h&&o(f,"value",null,h.value,s),(p=h.onVnodeBeforeMount)&&rC(p,l,e)}_&&t4(e,null,l,"beforeMount");let y=lV(r,m);y&&m.beforeEnter(f),i(f,t,n),((p=h&&h.onVnodeMounted)||y||_)&&lM(()=>{p&&rC(p,l,e),y&&m.enter(f),_&&t4(e,null,l,"mounted")},r)},I=(e,t,n,l,r)=>{if(n&&b(e,n),l)for(let t=0;t<l.length;t++)b(e,l[t]);if(r){let n=r.subTree;if(t===n||l0(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=r.vnode;I(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},F=(e,t,n,l,r,i,s,o,a=0)=>{for(let u=a;u<e.length;u++)C(null,e[u]=o?ry(e[u]):r_(e[u]),t,n,l,r,i,s,o)},V=(e,t,n,l,r,i,s)=>{let a;let u=t.el=e.el,{patchFlag:c,dynamicChildren:f,dirs:p}=t;c|=16&e.patchFlag;let h=e.props||m,g=t.props||m;if(n&&lF(n,!1),(a=g.onVnodeBeforeUpdate)&&rC(a,n,t,e),p&&t4(t,e,n,"beforeUpdate"),n&&lF(n,!0),(h.innerHTML&&null==g.innerHTML||h.textContent&&null==g.textContent)&&d(u,""),f?U(e.dynamicChildren,f,u,n,l,lD(t,r),i):s||X(e,t,u,null,n,l,lD(t,r),i,!1),c>0){if(16&c)j(u,h,g,n,r);else if(2&c&&h.class!==g.class&&o(u,"class",null,g.class,r),4&c&&o(u,"style",h.style,g.style,r),8&c){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let l=e[t],i=h[l],s=g[l];(s!==i||"value"===l)&&o(u,l,i,s,r,n)}}1&c&&e.children!==t.children&&d(u,t.children)}else s||null!=f||j(u,h,g,n,r);((a=g.onVnodeUpdated)||p)&&lM(()=>{a&&rC(a,n,t,e),p&&t4(t,e,n,"updated")},l)},U=(e,t,n,l,r,i,s)=>{for(let o=0;o<t.length;o++){let a=e[o],u=t[o],c=a.el&&(a.type===l5||!rc(a,u)||70&a.shapeFlag)?h(a.el):n;C(a,u,c,null,l,r,i,s,!0)}},j=(e,t,n,l,r)=>{if(t!==n){if(t!==m)for(let i in t)$(i)||i in n||o(e,i,t[i],null,r,l);for(let i in n){if($(i))continue;let s=n[i],a=t[i];s!==a&&"value"!==i&&o(e,i,a,s,r,l)}"value"in n&&o(e,"value",t.value,n.value,r)}},B=(e,t,n,l,r,s,o,a,u)=>{let f=t.el=e?e.el:c(""),p=t.anchor=e?e.anchor:c(""),{patchFlag:d,dynamicChildren:h,slotScopeIds:g}=t;g&&(a=a?a.concat(g):g),null==e?(i(f,n,l),i(p,n,l),F(t.children||[],n,p,r,s,o,a,u)):d>0&&64&d&&h&&e.dynamicChildren?(U(e.dynamicChildren,h,n,r,s,o,a),(null!=t.key||r&&t===r.subTree)&&lU(e,t,!0)):X(e,t,n,p,r,s,o,a,u)},H=(e,t,n,l,r,i,s,o,a)=>{t.slotScopeIds=o,null==e?512&t.shapeFlag?r.ctx.activate(t,n,l,s,a):W(t,n,l,r,i,s,a):z(e,t,a)},W=(e,t,n,l,r,i,s)=>{let o=e.component=function(e,t,n){let l=e.type,r=(t?t.appContext:e.appContext)||rx,i={uid:rw++,vnode:e,type:l,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new eg(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:function e(t,n,l=!1){let r=l?lx:n.propsCache,i=r.get(t);if(i)return i;let s=t.props,o={},a=[],u=!1;if(!P(t)){let r=t=>{u=!0;let[l,r]=e(t,n,!0);x(o,l),r&&a.push(...r)};!l&&n.mixins.length&&n.mixins.forEach(r),t.extends&&r(t.extends),t.mixins&&t.mixins.forEach(r)}if(!s&&!u)return L(t)&&r.set(t,_),_;if(T(s))for(let e=0;e<s.length;e++){let t=K(s[e]);lw(t)&&(o[t]=m)}else if(s)for(let e in s){let t=K(e);if(lw(t)){let n=s[e],l=o[t]=T(n)||P(n)?{type:n}:x({},n),r=l.type,i=!1,u=!0;if(T(r))for(let e=0;e<r.length;++e){let t=r[e],n=P(t)&&t.name;if("Boolean"===n){i=!0;break}"String"===n&&(u=!1)}else i=P(r)&&"Boolean"===r.name;l[0]=i,l[1]=u,(i||k(l,"default"))&&a.push(t)}}let c=[o,a];return L(t)&&r.set(t,c),c}(l,r),emitsOptions:function e(t,n,l=!1){let r=n.emitsCache,i=r.get(t);if(void 0!==i)return i;let s=t.emits,o={},a=!1;if(!P(t)){let r=t=>{let l=e(t,n,!0);l&&(a=!0,x(o,l))};!l&&n.mixins.length&&n.mixins.forEach(r),t.extends&&r(t.extends),t.mixins&&t.mixins.forEach(r)}return s||a?(T(s)?s.forEach(e=>o[e]=null):x(o,s),L(t)&&r.set(t,o),o):(L(t)&&r.set(t,null),null)}(l,r),emit:null,emitted:null,propsDefaults:m,inheritAttrs:l.inheritAttrs,ctx:m,data:m,props:m,attrs:m,slots:m,refs:m,setupState:m,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=lq.bind(null,i),e.ce&&e.ce(i),i}(e,l,r);nF(e)&&(o.ctx.renderer=ec),function(e,t=!1,n=!1){t&&u(t);let{props:l,children:r}=e.vnode,i=rR(e);(function(e,t,n,l=!1){let r={},i=ly();for(let n in e.propsDefaults=Object.create(null),lS(e,t,r,i),e.propsOptions[0])n in r||(r[n]=void 0);n?e.props=l?r:ta(r):e.type.props?e.props=r:e.props=i,e.attrs=i})(e,l,i,t),lN(e,r,n),i&&function(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,n7);let{setup:l}=n;if(l){eA();let n=e.setupContext=l.length>1?rI(e):null,r=rT(e),i=tF(l,e,0,[e.props,n]),s=D(i);if(eR(),r(),(s||e.sp)&&!nL(e)&&nS(e),s){if(i.then(rA,rA),t)return i.then(n=>{rN(e,n,t)}).catch(t=>{tU(t,e,0)});e.asyncDep=i}else rN(e,i,t)}else rP(e,t)}(e,t),t&&u(!1)}(o,!1,s),o.asyncDep?(r&&r.registerDep(o,G,s),e.el||E(null,o.subTree=rh(l7),t,n)):G(o,e,t,n,r,i,s)},z=(e,t,n)=>{let l=t.component=e.component;if(function(e,t,n){let{props:l,children:r,component:i}=e,{props:s,children:o,patchFlag:a}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(!n||!(a>=0))return(!!r||!!o)&&(!o||!o.$stable)||l!==s&&(l?!s||lY(l,s,u):!!s);if(1024&a)return!0;if(16&a)return l?lY(l,s,u):!!s;if(8&a){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(s[n]!==l[n]&&!lG(u,n))return!0}}return!1}(e,t,n)){if(l.asyncDep&&!l.asyncResolved){J(l,t,n);return}l.next=t,l.update()}else t.el=e.el,l.vnode=t},G=(e,t,n,l,i,s,o)=>{let a=()=>{if(e.isMounted){let t,{next:n,bu:l,u:r,parent:u,vnode:c}=e;{let t=function e(t){let n=t.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:e(n)}(e);if(t){n&&(n.el=c.el,J(e,n,o)),t.asyncDep.then(()=>{e.isUnmounted||a()});return}}let f=n;lF(e,!1),n?(n.el=c.el,J(e,n,o)):n=c,l&&Z(l),(t=n.props&&n.props.onVnodeBeforeUpdate)&&rC(t,u,n,c),lF(e,!0);let p=lJ(e),d=e.subTree;e.subTree=p,C(d,p,h(d.el),eo(d),e,i,s),n.el=p.el,null===f&&lQ(e,p.el),r&&lM(r,i),(t=n.props&&n.props.onVnodeUpdated)&&lM(()=>rC(t,u,n,c),i)}else{let o;let{el:a,props:u}=t,{bm:c,m:f,parent:p,root:d,type:h}=e,g=nL(t);if(lF(e,!1),c&&Z(c),!g&&(o=u&&u.onVnodeBeforeMount)&&rC(o,p,t),lF(e,!0),a&&r){let t=()=>{e.subTree=lJ(e),r(a,e.subTree,e,i,null)};g&&h.__asyncHydrate?h.__asyncHydrate(a,e,t):t()}else{d.ce&&d.ce._injectChildStyle(h);let r=e.subTree=lJ(e);C(null,r,n,l,e,i,s),t.el=r.el}if(f&&lM(f,i),!g&&(o=u&&u.onVnodeMounted)){let e=t;lM(()=>rC(o,p,e),i)}(256&t.shapeFlag||p&&nL(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&lM(e.a,i),e.isMounted=!0,t=n=l=null}};e.scope.on();let u=e.effect=new em(a);e.scope.off();let c=e.update=u.run.bind(u),f=e.job=u.runIfDirty.bind(u);f.i=e,f.id=e.uid,u.scheduler=()=>tG(f),lF(e,!0),c()},J=(e,t,n)=>{t.component=e;let l=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,l){let{props:r,attrs:i,vnode:{patchFlag:s}}=e,o=tg(r),[a]=e.propsOptions,u=!1;if((l||s>0)&&!(16&s)){if(8&s){let n=e.vnode.dynamicProps;for(let l=0;l<n.length;l++){let s=n[l];if(lG(e.emitsOptions,s))continue;let c=t[s];if(a){if(k(i,s))c!==i[s]&&(i[s]=c,u=!0);else{let t=K(s);r[t]=lC(a,o,t,c,e,!1)}}else c!==i[s]&&(i[s]=c,u=!0)}}}else{let l;for(let s in lS(e,t,r,i)&&(u=!0),o)t&&(k(t,s)||(l=q(s))!==s&&k(t,l))||(a?n&&(void 0!==n[s]||void 0!==n[l])&&(r[s]=lC(a,o,s,void 0,e,!0)):delete r[s]);if(i!==o)for(let e in i)t&&k(t,e)||(delete i[e],u=!0)}u&&eU(e.attrs,"set","")}(e,t.props,l,n),lP(e,t.children,n),eA(),tZ(e),eR()},X=(e,t,n,l,r,i,s,o,a=!1)=>{let u=e&&e.children,c=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:h}=t;if(p>0){if(128&p){Q(u,f,n,l,r,i,s,o,a);return}if(256&p){Y(u,f,n,l,r,i,s,o,a);return}}8&h?(16&c&&es(u,r,i),f!==u&&d(n,f)):16&c?16&h?Q(u,f,n,l,r,i,s,o,a):es(u,r,i,!0):(8&c&&d(n,""),16&h&&F(f,n,l,r,i,s,o,a))},Y=(e,t,n,l,r,i,s,o,a)=>{let u;e=e||_,t=t||_;let c=e.length,f=t.length,p=Math.min(c,f);for(u=0;u<p;u++){let l=t[u]=a?ry(t[u]):r_(t[u]);C(e[u],l,n,null,r,i,s,o,a)}c>f?es(e,r,i,!0,!1,p):F(t,n,l,r,i,s,o,a,p)},Q=(e,t,n,l,r,i,s,o,a)=>{let u=0,c=t.length,f=e.length-1,p=c-1;for(;u<=f&&u<=p;){let l=e[u],c=t[u]=a?ry(t[u]):r_(t[u]);if(rc(l,c))C(l,c,n,null,r,i,s,o,a);else break;u++}for(;u<=f&&u<=p;){let l=e[f],u=t[p]=a?ry(t[p]):r_(t[p]);if(rc(l,u))C(l,u,n,null,r,i,s,o,a);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,f=e<c?t[e].el:l;for(;u<=p;)C(null,t[u]=a?ry(t[u]):r_(t[u]),n,f,r,i,s,o,a),u++}}else if(u>p)for(;u<=f;)en(e[u],r,i,!0),u++;else{let d;let h=u,g=u,m=new Map;for(u=g;u<=p;u++){let e=t[u]=a?ry(t[u]):r_(t[u]);null!=e.key&&m.set(e.key,u)}let y=0,b=p-g+1,S=!1,x=0,w=Array(b);for(u=0;u<b;u++)w[u]=0;for(u=h;u<=f;u++){let l;let c=e[u];if(y>=b){en(c,r,i,!0);continue}if(null!=c.key)l=m.get(c.key);else for(d=g;d<=p;d++)if(0===w[d-g]&&rc(c,t[d])){l=d;break}void 0===l?en(c,r,i,!0):(w[l-g]=u+1,l>=x?x=l:S=!0,C(c,t[l],n,null,r,i,s,o,a),y++)}let E=S?function(e){let t,n,l,r,i;let s=e.slice(),o=[0],a=e.length;for(t=0;t<a;t++){let a=e[t];if(0!==a){if(e[n=o[o.length-1]]<a){s[t]=n,o.push(t);continue}for(l=0,r=o.length-1;l<r;)e[o[i=l+r>>1]]<a?l=i+1:r=i;a<e[o[l]]&&(l>0&&(s[t]=o[l-1]),o[l]=t)}}for(l=o.length,r=o[l-1];l-- >0;)o[l]=r,r=s[r];return o}(w):_;for(d=E.length-1,u=b-1;u>=0;u--){let e=g+u,f=t[e],p=e+1<c?t[e+1].el:l;0===w[u]?C(null,f,n,p,r,i,s,o,a):S&&(d<0||u!==E[d]?ee(f,n,p,2):d--)}}},ee=(e,t,n,l,r=null)=>{let{el:s,type:o,transition:a,children:u,shapeFlag:c}=e;if(6&c){ee(e.component.subTree,t,n,l);return}if(128&c){e.suspense.move(t,n,l);return}if(64&c){o.move(e,t,n,ec);return}if(o===l5){i(s,t,n);for(let e=0;e<u.length;e++)ee(u[e],t,n,l);i(e.anchor,t,n);return}if(o===re){R(e,t,n);return}if(2!==l&&1&c&&a){if(0===l)a.beforeEnter(s),i(s,t,n),lM(()=>a.enter(s),r);else{let{leave:e,delayLeave:l,afterLeave:r}=a,o=()=>i(s,t,n),u=()=>{e(s,()=>{o(),r&&r()})};l?l(s,o,u):u()}}else i(s,t,n)},en=(e,t,n,l=!1,r=!1)=>{let i;let{type:s,props:o,ref:a,children:u,dynamicChildren:c,shapeFlag:f,patchFlag:p,dirs:d,cacheIndex:h}=e;if(-2===p&&(r=!1),null!=a&&nC(a,null,n,e,!0),null!=h&&(t.renderCache[h]=void 0),256&f){t.ctx.deactivate(e);return}let g=1&f&&d,m=!nL(e);if(m&&(i=o&&o.onVnodeBeforeUnmount)&&rC(i,t,e),6&f)ei(e.component,n,l);else{if(128&f){e.suspense.unmount(n,l);return}g&&t4(e,null,t,"beforeUnmount"),64&f?e.type.remove(e,t,n,ec,l):c&&!c.hasOnce&&(s!==l5||p>0&&64&p)?es(c,t,n,!1,!0):(s===l5&&384&p||!r&&16&f)&&es(u,t,n),l&&el(e)}(m&&(i=o&&o.onVnodeUnmounted)||g)&&lM(()=>{i&&rC(i,t,e),g&&t4(e,null,t,"unmounted")},n)},el=e=>{let{type:t,el:n,anchor:l,transition:r}=e;if(t===l5){er(n,l);return}if(t===re){O(e);return}let i=()=>{s(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){let{leave:t,delayLeave:l}=r,s=()=>t(n,i);l?l(e.el,i,s):s()}else i()},er=(e,t)=>{let n;for(;e!==t;)n=g(e),s(e),e=n;s(t)},ei=(e,t,n)=>{let{bum:l,scope:r,job:i,subTree:s,um:o,m:a,a:u}=e;lj(a),lj(u),l&&Z(l),r.stop(),i&&(i.flags|=8,en(s,e,t,n)),o&&lM(o,t),lM(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},es=(e,t,n,l=!1,r=!1,i=0)=>{for(let s=i;s<e.length;s++)en(e[s],t,n,l,r)},eo=e=>{if(6&e.shapeFlag)return eo(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();let t=g(e.anchor||e.el),n=t&&t[t8];return n?g(n):t},ea=!1,eu=(e,t,n)=>{null==e?t._vnode&&en(t._vnode,null,null,!0):C(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ea||(ea=!0,tZ(),tY(),ea=!1)},ec={p:C,um:en,m:ee,r:el,mt:W,mc:F,pc:X,pbc:U,n:eo,o:e};return t&&([l,r]=t(ec)),{render:eu,hydrate:l,createApp:(n=l,function(e,t=null){P(e)||(e=x({},e)),null==t||L(t)||(t=null);let l=ld(),r=new WeakSet,i=[],s=!1,o=l.app={_uid:lh++,_component:e,_props:t,_container:null,_context:l,_instance:null,version:rj,get config(){return l.config},set config(v){},use:(e,...t)=>(r.has(e)||(e&&P(e.install)?(r.add(e),e.install(o,...t)):P(e)&&(r.add(e),e(o,...t))),o),mixin:e=>(l.mixins.includes(e)||l.mixins.push(e),o),component:(e,t)=>t?(l.components[e]=t,o):l.components[e],directive:(e,t)=>t?(l.directives[e]=t,o):l.directives[e],mount(r,i,a){if(!s){let u=o._ceVNode||rh(e,t);return u.appContext=l,!0===a?a="svg":!1===a&&(a=void 0),i&&n?n(u,r):eu(u,r,a),s=!0,o._container=r,r.__vue_app__=o,rL(u.component)}},onUnmount(e){i.push(e)},unmount(){s&&(tV(i,o._instance,16),eu(null,o._container),delete o._container.__vue_app__)},provide:(e,t)=>(l.provides[e]=t,o),runWithContext(e){let t=lg;lg=o;try{return e()}finally{lg=t}}};return o})}}function lD({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function lF({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function lV(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function lU(e,t,n=!1){let l=e.children,r=t.children;if(T(l)&&T(r))for(let e=0;e<l.length;e++){let t=l[e],i=r[e];!(1&i.shapeFlag)||i.dynamicChildren||((i.patchFlag<=0||32===i.patchFlag)&&((i=r[e]=ry(r[e])).el=t.el),n||-2===i.patchFlag||lU(t,i)),i.type===l9&&(i.el=t.el)}}function lj(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}let lB=Symbol.for("v-scx");function l$(e,t){return lH(e,null,{flush:"sync"})}function lH(e,t,n=m){let{immediate:l,deep:i,flush:s,once:o}=n,a=x({},n),u=rE;a.call=(e,t,n)=>tV(e,u,t,n);let c=!1;return"post"===s?a.scheduler=e=>{lM(e,u&&u.suspense)}:"sync"!==s&&(c=!0,a.scheduler=(e,t)=>{t?e():tG(e)}),a.augmentJob=e=>{t&&(e.flags|=4),c&&(e.flags|=2,u&&(e.id=u.uid,e.i=u))},function(e,t,n=m){let l,i,s,o;let{immediate:a,deep:u,once:c,scheduler:f,augmentJob:p,call:h}=n,g=e=>u?e:td(e)||!1===u||0===u?tD(e,1):tD(e),_=!1,b=!1;if(ty(e)?(i=()=>e.value,_=td(e)):tf(e)?(i=()=>g(e),_=!0):T(e)?(b=!0,_=e.some(e=>tf(e)||td(e)),i=()=>e.map(e=>ty(e)?e.value:tf(e)?g(e):P(e)?h?h(e,2):e():void 0)):i=P(e)?t?h?()=>h(e,2):e:()=>{if(s){eA();try{s()}finally{eR()}}let t=d;d=l;try{return h?h(e,3,[o]):e(o)}finally{d=t}}:y,t&&u){let e=i,t=!0===u?1/0:u;i=()=>tD(e(),t)}let S=r,C=()=>{l.stop(),S&&S.active&&w(S.effects,l)};if(c&&t){let e=t;t=(...t)=>{e(...t),C()}}let x=b?Array(e.length).fill(tM):tM,E=e=>{if(1&l.flags&&(l.dirty||e)){if(t){let e=l.run();if(u||_||(b?e.some((e,t)=>X(e,x[t])):X(e,x))){s&&s();let n=d;d=l;try{let n=[e,x===tM?void 0:b&&x[0]===tM?[]:x,o];h?h(t,3,n):t(...n),x=e}finally{d=n}}}else l.run()}};return p&&p(E),(l=new em(i)).scheduler=f?()=>f(E,!1):E,o=e=>tL(e,!1,l),s=l.onStop=()=>{let e=tI.get(l);if(e){if(h)h(e,4);else for(let t of e)t();tI.delete(l)}},t?a?E(!0):x=l.run():f?f(E.bind(null,!0),!0):l.run(),C.pause=l.pause.bind(l),C.resume=l.resume.bind(l),C.stop=C,C}(e,t,a)}function lW(e,t,n){let l;let r=this.proxy,i=M(e)?e.includes(".")?lK(r,e):()=>r[e]:e.bind(r,r);P(t)?l=t:(l=t.handler,n=t);let s=rT(this),o=lH(i,l.bind(r),n);return s(),o}function lK(e,t){let n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}let lz=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${K(t)}Modifiers`]||e[`${q(t)}Modifiers`];function lq(e,t,...n){let l;if(e.isUnmounted)return;let r=e.vnode.props||m,i=n,s=t.startsWith("update:"),o=s&&lz(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>M(e)?e.trim():e)),o.number&&(i=n.map(Q)));let a=r[l=J(t)]||r[l=J(K(t))];!a&&s&&(a=r[l=J(q(t))]),a&&tV(a,e,6,i);let u=r[l+"Once"];if(u){if(e.emitted){if(e.emitted[l])return}else e.emitted={};e.emitted[l]=!0,tV(u,e,6,i)}}function lG(e,t){return!!(e&&S(t))&&(k(e,(t=t.slice(2).replace(/Once$/,""))[0].toLowerCase()+t.slice(1))||k(e,q(t))||k(e,t))}function lJ(e){let t,n;let{type:l,vnode:r,proxy:i,withProxy:s,propsOptions:[o],slots:a,attrs:u,emit:c,render:f,renderCache:p,props:d,data:h,setupState:g,ctx:m,inheritAttrs:_}=e,y=t2(e);try{if(4&r.shapeFlag){let e=s||i;t=r_(f.call(e,e,p,d,g,h,m)),n=u}else t=r_(l.length>1?l(d,{attrs:u,slots:a,emit:c}):l(d,null)),n=l.props?u:lX(u)}catch(n){rt.length=0,tU(n,e,1),t=rh(l7)}let b=t;if(n&&!1!==_){let e=Object.keys(n),{shapeFlag:t}=b;e.length&&7&t&&(o&&e.some(C)&&(n=lZ(n,o)),b=rv(b,n,!1,!0))}return r.dirs&&((b=rv(b,null,!1,!0)).dirs=b.dirs?b.dirs.concat(r.dirs):r.dirs),r.transition&&n_(b,r.transition),t=b,t2(y),t}let lX=e=>{let t;for(let n in e)("class"===n||"style"===n||S(n))&&((t||(t={}))[n]=e[n]);return t},lZ=(e,t)=>{let n={};for(let l in e)C(l)&&l.slice(9)in t||(n[l]=e[l]);return n};function lY(e,t,n){let l=Object.keys(t);if(l.length!==Object.keys(e).length)return!0;for(let r=0;r<l.length;r++){let i=l[r];if(t[i]!==e[i]&&!lG(n,i))return!0}return!1}function lQ({vnode:e,parent:t},n){for(;t;){let l=t.subTree;if(l.suspense&&l.suspense.activeBranch===e&&(l.el=e.el),l===e)(e=t.vnode).el=n,t=t.parent;else break}}let l0=e=>e.__isSuspense,l1=0;function l2(e,t){let n=e.props&&e.props[t];P(n)&&n()}function l6(e,t,n,l,r,i,s,o,a,u,c=!1){let f;let{p:p,m:d,um:h,n:g,o:{parentNode:m,remove:_}}=u,y=function(e){let t=e.props&&e.props.suspensible;return null!=t&&!1!==t}(e);y&&t&&t.pendingBranch&&(f=t.pendingId,t.deps++);let b=e.props?ee(e.props.timeout):void 0,S=i,C={vnode:e,parent:t,parentComponent:n,namespace:s,container:l,hiddenContainer:r,deps:0,pendingId:l1++,timeout:"number"==typeof b?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:l,activeBranch:r,pendingBranch:s,pendingId:o,effects:a,parentComponent:u,container:c}=C,p=!1;C.isHydrating?C.isHydrating=!1:e||((p=r&&s.transition&&"out-in"===s.transition.mode)&&(r.transition.afterLeave=()=>{o===C.pendingId&&(d(s,c,i===S?g(r):i,0),tX(a))}),r&&(m(r.el)===c&&(i=g(r)),h(r,u,C,!0)),p||d(s,c,i,0)),l3(C,s),C.pendingBranch=null,C.isInFallback=!1;let _=C.parent,b=!1;for(;_;){if(_.pendingBranch){_.effects.push(...a),b=!0;break}_=_.parent}b||p||tX(a),C.effects=[],y&&t&&t.pendingBranch&&f===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),l2(l,"onResolve")},fallback(e){if(!C.pendingBranch)return;let{vnode:t,activeBranch:n,parentComponent:l,container:r,namespace:i}=C;l2(t,"onFallback");let s=g(n),u=()=>{C.isInFallback&&(p(null,e,r,s,l,null,i,o,a),l3(C,e))},c=e.transition&&"out-in"===e.transition.mode;c&&(n.transition.afterLeave=u),C.isInFallback=!0,h(n,l,null,!0),c||u()},move(e,t,n){C.activeBranch&&d(C.activeBranch,e,t,n),C.container=e},next:()=>C.activeBranch&&g(C.activeBranch),registerDep(e,t,n){let l=!!C.pendingBranch;l&&C.deps++;let r=e.vnode.el;e.asyncDep.catch(t=>{tU(t,e,0)}).then(i=>{if(e.isUnmounted||C.isUnmounted||C.pendingId!==e.suspenseId)return;e.asyncResolved=!0;let{vnode:o}=e;rN(e,i,!1),r&&(o.el=r);let a=!r&&e.subTree.el;t(e,o,m(r||e.subTree.el),r?null:g(e.subTree),C,s,n),a&&_(a),lQ(e,o.el),l&&0==--C.deps&&C.resolve()})},unmount(e,t){C.isUnmounted=!0,C.activeBranch&&h(C.activeBranch,n,e,t),C.pendingBranch&&h(C.pendingBranch,n,e,t)}};return C}function l4(e){let t;if(P(e)){let n=ri&&e._c;n&&(e._d=!1,rl()),e=e(),n&&(e._d=!0,t=rn,rr())}return T(e)&&(e=function(e,t=!0){let n;for(let t=0;t<e.length;t++){let l=e[t];if(!ru(l))return;if(l.type!==l7||"v-if"===l.children){if(n)return;n=l}}return n}(e)),e=r_(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(t=>t!==e)),e}function l8(e,t){t&&t.pendingBranch?T(e)?t.effects.push(...e):t.effects.push(e):tX(e)}function l3(e,t){e.activeBranch=t;let{vnode:n,parentComponent:l}=e,r=t.el;for(;!r&&t.component;)r=(t=t.component.subTree).el;n.el=r,l&&l.subTree===n&&(l.vnode.el=r,lQ(l,r))}let l5=Symbol.for("v-fgt"),l9=Symbol.for("v-txt"),l7=Symbol.for("v-cmt"),re=Symbol.for("v-stc"),rt=[],rn=null;function rl(e=!1){rt.push(rn=e?null:[])}function rr(){rt.pop(),rn=rt[rt.length-1]||null}let ri=1;function rs(e,t=!1){ri+=e,e<0&&rn&&t&&(rn.hasOnce=!0)}function ro(e){return e.dynamicChildren=ri>0?rn||_:null,rr(),ri>0&&rn&&rn.push(e),e}function ra(e,t,n,l,r){return ro(rh(e,t,n,l,r,!0))}function ru(e){return!!e&&!0===e.__v_isVNode}function rc(e,t){return e.type===t.type&&e.key===t.key}let rf=({key:e})=>null!=e?e:null,rp=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?M(e)||ty(e)||P(e)?{i:t0,r:e,k:t,f:!!n}:e:null);function rd(e,t=null,n=null,l=0,r=null,i=e===l5?0:1,s=!1,o=!1){let a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&rf(t),ref:t&&rp(t),scopeId:t1,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:l,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:t0};return o?(rb(a,n),128&i&&e.normalize(a)):n&&(a.shapeFlag|=M(n)?8:16),ri>0&&!s&&rn&&(a.patchFlag>0||6&i)&&32!==a.patchFlag&&rn.push(a),a}let rh=function(e,t=null,n=null,l=0,r=null,i=!1){var s;if(e&&e!==n6||(e=l7),ru(e)){let l=rv(e,t,!0);return n&&rb(l,n),ri>0&&!i&&rn&&(6&l.shapeFlag?rn[rn.indexOf(e)]=l:rn.push(l)),l.patchFlag=-2,l}if(P(s=e)&&"__vccOpts"in s&&(e=e.__vccOpts),t){let{class:e,style:n}=t=rg(t);e&&!M(e)&&(t.class=eo(e)),L(n)&&(th(n)&&!T(n)&&(n=x({},n)),t.style=el(n))}let o=M(e)?1:l0(e)?128:t3(e)?64:L(e)?4:P(e)?2:0;return rd(e,t,n,l,r,o,i,!0)};function rg(e){return e?th(e)||lb(e)?x({},e):e:null}function rv(e,t,n=!1,l=!1){let{props:r,ref:i,patchFlag:s,children:o,transition:a}=e,u=t?rS(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&rf(u),ref:t&&t.ref?n&&i?T(i)?i.concat(rp(t)):[i,rp(t)]:rp(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==l5?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&rv(e.ssContent),ssFallback:e.ssFallback&&rv(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&l&&n_(c,a.clone(c)),c}function rm(e=" ",t=0){return rh(l9,null,e,t)}function r_(e){return null==e||"boolean"==typeof e?rh(l7):T(e)?rh(l5,null,e.slice()):ru(e)?ry(e):rh(l9,null,String(e))}function ry(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:rv(e)}function rb(e,t){let n=0,{shapeFlag:l}=e;if(null==t)t=null;else if(T(t))n=16;else if("object"==typeof t){if(65&l){let n=t.default;n&&(n._c&&(n._d=!1),rb(e,n()),n._c&&(n._d=!0));return}{n=32;let l=t._;l||lb(t)?3===l&&t0&&(1===t0.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=t0}}else P(t)?(t={default:t,_ctx:t0},n=32):(t=String(t),64&l?(n=16,t=[rm(t)]):n=8);e.children=t,e.shapeFlag|=n}function rS(...e){let t={};for(let n=0;n<e.length;n++){let l=e[n];for(let e in l)if("class"===e)t.class!==l.class&&(t.class=eo([t.class,l.class]));else if("style"===e)t.style=el([t.style,l.style]);else if(S(e)){let n=t[e],r=l[e];r&&n!==r&&!(T(n)&&n.includes(r))&&(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=l[e])}return t}function rC(e,t,n,l=null){tV(e,t,7,[n,l])}let rx=ld(),rw=0,rE=null,rk=()=>rE||t0;a=e=>{rE=e},u=e=>{rO=e};let rT=e=>{let t=rE;return a(e),e.scope.on(),()=>{e.scope.off(),a(t)}},rA=()=>{rE&&rE.scope.off(),a(null)};function rR(e){return 4&e.vnode.shapeFlag}let rO=!1;function rN(e,t,n){P(t)?e.render=t:L(t)&&(e.setupState=tk(t)),rP(e,n)}function rP(e,t,n){let l=e.type;if(!e.render){if(!t&&c&&!l.render){let t=l.template||li(e).template;if(t){let{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:i,compilerOptions:s}=l,o=x(x({isCustomElement:n,delimiters:i},r),s);l.render=c(t,o)}}e.render=l.render||y,f&&f(e)}{let t=rT(e);eA();try{!function(e){let t=li(e),n=e.proxy,l=e.ctx;ll=!1,t.beforeCreate&&lr(t.beforeCreate,e,"bc");let{data:r,computed:i,methods:s,watch:o,provide:a,inject:u,created:c,beforeMount:f,mounted:p,beforeUpdate:d,updated:h,activated:g,deactivated:m,beforeDestroy:_,beforeUnmount:b,destroyed:S,unmounted:C,render:x,renderTracked:w,renderTriggered:E,errorCaptured:k,serverPrefetch:A,expose:R,inheritAttrs:O,components:N,directives:I,filters:D}=t;if(u&&function(e,t,n=y){for(let n in T(e)&&(e=lu(e)),e){let l;let r=e[n];ty(l=L(r)?"default"in r?lm(r.from||n,r.default,!0):lm(r.from||n):lm(r))?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e}):t[n]=l}}(u,l,null),s)for(let e in s){let t=s[e];P(t)&&(l[e]=t.bind(n))}if(r){let t=r.call(n,n);L(t)&&(e.data=to(t))}if(ll=!0,i)for(let e in i){let t=i[e],r=P(t)?t.bind(n,n):P(t.get)?t.get.bind(n,n):y,s=rF({get:r,set:!P(t)&&P(t.set)?t.set.bind(n):y});Object.defineProperty(l,e,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e})}if(o)for(let e in o)!function e(t,n,l,r){let i=r.includes(".")?lK(l,r):()=>l[r];if(M(t)){let e=n[t];P(e)&&lH(i,e,void 0)}else if(P(t)){var s;s=t.bind(l),lH(i,s,void 0)}else if(L(t)){if(T(t))t.forEach(t=>e(t,n,l,r));else{let e=P(t.handler)?t.handler.bind(l):n[t.handler];P(e)&&lH(i,e,t)}}}(o[e],l,n,e);if(a){let e=P(a)?a.call(n):a;Reflect.ownKeys(e).forEach(t=>{lv(t,e[t])})}function F(e,t){T(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(c&&lr(c,e,"c"),F(nz,f),F(nq,p),F(nG,d),F(nJ,h),F(nU,g),F(nj,m),F(n1,k),F(n0,w),F(nQ,E),F(nX,b),F(nZ,C),F(nY,A),T(R)){if(R.length){let t=e.exposed||(e.exposed={});R.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})})}else e.exposed||(e.exposed={})}x&&e.render===y&&(e.render=x),null!=O&&(e.inheritAttrs=O),N&&(e.components=N),I&&(e.directives=I)}(e)}finally{eR(),t()}}}let rM={get:(e,t)=>(eV(e,"get",""),e[t])};function rI(e){return{attrs:new Proxy(e.attrs,rM),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function rL(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tk(tv(e.exposed)),{get:(t,n)=>n in t?t[n]:n in n5?n5[n](e):void 0,has:(e,t)=>t in e||t in n5})):e.proxy}function rD(e,t=!0){return P(e)?e.displayName||e.name:e.name||t&&e.__name}let rF=(e,t)=>(function(e,t,n=!1){let l,r;return P(e)?l=e:(l=e.get,r=e.set),new tP(l,r,n)})(e,0,rO);function rV(e,t,n){let l=arguments.length;return 2!==l?(l>3?n=Array.prototype.slice.call(arguments,2):3===l&&ru(n)&&(n=[n]),rh(e,t,n)):!L(t)||T(t)?rh(e,null,t):ru(t)?rh(e,null,[t]):rh(e,t)}function rU(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e<n.length;e++)if(X(n[e],t[e]))return!1;return ri>0&&rn&&rn.push(e),!0}let rj="3.5.13",rB="undefined"!=typeof window&&window.trustedTypes;if(rB)try{h=rB.createPolicy("vue",{createHTML:e=>e})}catch(e){}let r$=h?e=>h.createHTML(e):e=>e,rH="undefined"!=typeof document?document:null,rW=rH&&rH.createElement("template"),rK="transition",rz="animation",rq=Symbol("_vtc"),rG={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},rJ=x({},nc,rG),rX=((t=(e,{slots:t})=>rV(nd,rQ(e),t)).displayName="Transition",t.props=rJ,t),rZ=(e,t=[])=>{T(e)?e.forEach(e=>e(...t)):e&&e(...t)},rY=e=>!!e&&(T(e)?e.some(e=>e.length>1):e.length>1);function rQ(e){let t={};for(let n in e)n in rG||(t[n]=e[n]);if(!1===e.css)return t;let{name:n="v",type:l,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:o=`${n}-enter-to`,appearFromClass:a=i,appearActiveClass:u=s,appearToClass:c=o,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(L(e))return[ee(e.enter),ee(e.leave)];{let t=ee(e);return[t,t]}}(r),g=h&&h[0],m=h&&h[1],{onBeforeEnter:_,onEnter:y,onEnterCancelled:b,onLeave:S,onLeaveCancelled:C,onBeforeAppear:w=_,onAppear:E=y,onAppearCancelled:k=b}=t,T=(e,t,n,l)=>{e._enterCancelled=l,r1(e,t?c:o),r1(e,t?u:s),n&&n()},A=(e,t)=>{e._isLeaving=!1,r1(e,f),r1(e,d),r1(e,p),t&&t()},R=e=>(t,n)=>{let r=e?E:y,s=()=>T(t,e,n);rZ(r,[t,s]),r2(()=>{r1(t,e?a:i),r0(t,e?c:o),rY(r)||r4(t,l,g,s)})};return x(t,{onBeforeEnter(e){rZ(_,[e]),r0(e,i),r0(e,s)},onBeforeAppear(e){rZ(w,[e]),r0(e,a),r0(e,u)},onEnter:R(!1),onAppear:R(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>A(e,t);r0(e,f),e._enterCancelled?(r0(e,p),r9()):(r9(),r0(e,p)),r2(()=>{e._isLeaving&&(r1(e,f),r0(e,d),rY(S)||r4(e,l,m,n))}),rZ(S,[e,n])},onEnterCancelled(e){T(e,!1,void 0,!0),rZ(b,[e])},onAppearCancelled(e){T(e,!0,void 0,!0),rZ(k,[e])},onLeaveCancelled(e){A(e),rZ(C,[e])}})}function r0(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[rq]||(e[rq]=new Set)).add(t)}function r1(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[rq];n&&(n.delete(t),n.size||(e[rq]=void 0))}function r2(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let r6=0;function r4(e,t,n,l){let r=e._endId=++r6,i=()=>{r===e._endId&&l()};if(null!=n)return setTimeout(i,n);let{type:s,timeout:o,propCount:a}=r8(e,t);if(!s)return l();let u=s+"end",c=0,f=()=>{e.removeEventListener(u,p),i()},p=t=>{t.target===e&&++c>=a&&f()};setTimeout(()=>{c<a&&f()},o+1),e.addEventListener(u,p)}function r8(e,t){let n=window.getComputedStyle(e),l=e=>(n[e]||"").split(", "),r=l(`${rK}Delay`),i=l(`${rK}Duration`),s=r3(r,i),o=l(`${rz}Delay`),a=l(`${rz}Duration`),u=r3(o,a),c=null,f=0,p=0;t===rK?s>0&&(c=rK,f=s,p=i.length):t===rz?u>0&&(c=rz,f=u,p=a.length):p=(c=(f=Math.max(s,u))>0?s>u?rK:rz:null)?c===rK?i.length:a.length:0;let d=c===rK&&/\b(transform|all)(,|$)/.test(l(`${rK}Property`).toString());return{type:c,timeout:f,propCount:p,hasTransform:d}}function r3(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>r5(t)+r5(e[n])))}function r5(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function r9(){return document.body.offsetHeight}let r7=Symbol("_vod"),ie=Symbol("_vsh");function it(e,t){e.style.display=t?e[r7]:"none",e[ie]=!t}let il=Symbol("");function ir(e,t){if(1===e.nodeType){let n=e.style,l="";for(let e in t)n.setProperty(`--${e}`,t[e]),l+=`--${e}: ${t[e]};`;n[il]=l}}let ii=/(^|;)\s*display\s*:/,is=/\s*!important$/;function io(e,t,n){if(T(n))n.forEach(n=>io(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{let l=function(e,t){let n=iu[t];if(n)return n;let l=K(t);if("filter"!==l&&l in e)return iu[t]=l;l=G(l);for(let n=0;n<ia.length;n++){let r=ia[n]+l;if(r in e)return iu[t]=r}return t}(e,t);is.test(n)?e.setProperty(q(l),n.replace(is,""),"important"):e[l]=n}}let ia=["Webkit","Moz","ms"],iu={},ic="http://www.w3.org/1999/xlink";function ip(e,t,n,l,r,i=ea(t)){l&&t.startsWith("xlink:")?null==n?e.removeAttributeNS(ic,t.slice(6,t.length)):e.setAttributeNS(ic,t,n):null==n||i&&!(n||""===n)?e.removeAttribute(t):e.setAttribute(t,i?"":I(n)?String(n):n)}function id(e,t,n,l,r){if("innerHTML"===t||"textContent"===t){null!=n&&(e[t]="innerHTML"===t?r$(n):n);return}let i=e.tagName;if("value"===t&&"PROGRESS"!==i&&!i.includes("-")){let l="OPTION"===i?e.getAttribute("value")||"":e.value,r=null==n?"checkbox"===e.type?"on":"":String(n);l===r&&"_value"in e||(e.value=r),null==n&&e.removeAttribute(t),e._value=n;return}let s=!1;if(""===n||null==n){let l=typeof e[t];if("boolean"===l){var o;n=!!(o=n)||""===o}else null==n&&"string"===l?(n="",s=!0):"number"===l&&(n=0,s=!0)}try{e[t]=n}catch(e){}s&&e.removeAttribute(r||t)}function ih(e,t,n,l){e.addEventListener(t,n,l)}let ig=Symbol("_vei"),iv=/(?:Once|Passive|Capture)$/,im=0,i_=Promise.resolve(),iy=()=>im||(i_.then(()=>im=0),im=Date.now()),ib=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&123>e.charCodeAt(2),iS={};function iC(e,t,n){let l=nb(e,t);j(l)&&x(l,t);class r extends iw{constructor(e){super(l,e,n)}}return r.def=l,r}let ix="undefined"!=typeof HTMLElement?HTMLElement:class{};class iw extends ix{constructor(e,t={},n=i0){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==i0?this._root=this.shadowRoot:!1!==e.shadowRoot?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof iw){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,tq(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e<this.attributes.length;e++)this._setAttr(this.attributes[e].name);this._ob=new MutationObserver(e=>{for(let t of e)this._setAttr(t.attributeName)}),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{let n;this._resolved=!0,this._pendingResolve=void 0;let{props:l,styles:r}=e;if(l&&!T(l))for(let e in l){let t=l[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=ee(this._props[e])),(n||(n=Object.create(null)))[K(e)]=!0)}this._numberProps=n,t&&this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then(t=>e(this._def=t,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)k(this,e)||Object.defineProperty(this,e,{get:()=>tw(t[e])})}_resolveProps(e){let{props:t}=e,n=T(t)?t:Object.keys(t||{});for(let e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(K))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):iS,l=K(e);t&&this._numberProps&&this._numberProps[l]&&(n=ee(n)),this._setProp(l,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,l=!1){if(t!==this._props[e]&&(t===iS?delete this._props[e]:(this._props[e]=t,"key"===e&&this._app&&(this._app._ceVNode.key=t)),l&&this._instance&&this._update(),n)){let n=this._ob;n&&n.disconnect(),!0===t?this.setAttribute(q(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(q(e),t+""):t||this.removeAttribute(q(e)),n&&n.observe(this,{attributes:!0})}}_update(){iQ(this._createVNode(),this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=rh(this._def,x(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,j(t[0])?x({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),q(e)!==e&&t(q(e),n)},this._setParent()}),t}_applyStyles(e,t){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let n=this._nonce;for(let t=e.length-1;t>=0;t--){let l=document.createElement("style");n&&l.setAttribute("nonce",n),l.textContent=e[t],this.shadowRoot.prepend(l)}}_parseSlots(){let e;let t=this._slots={};for(;e=this.firstChild;){let n=1===e.nodeType&&e.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(e),this.removeChild(e)}}_renderSlots(){let e=(this._teleportTarget||this).querySelectorAll("slot"),t=this._instance.type.__scopeId;for(let n=0;n<e.length;n++){let l=e[n],r=l.getAttribute("name")||"default",i=this._slots[r],s=l.parentNode;if(i)for(let e of i){if(t&&1===e.nodeType){let n;let l=t+"-s",r=document.createTreeWalker(e,1);for(e.setAttribute(l,"");n=r.nextNode();)n.setAttribute(l,"")}s.insertBefore(e,l)}else for(;l.firstChild;)s.insertBefore(l.firstChild,l);s.removeChild(l)}}_injectChildStyle(e){this._applyStyles(e.styles,e)}_removeChildStyle(e){}}function iE(e){let t=rk();return t&&t.ce||null}let ik=new WeakMap,iT=new WeakMap,iA=Symbol("_moveCb"),iR=Symbol("_enterCb"),iO=(n={name:"TransitionGroup",props:x({},rJ,{tag:String,moveClass:String}),setup(e,{slots:t}){let n,l;let r=rk(),i=na();return nJ(()=>{if(!n.length)return;let t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){let l=e.cloneNode(),r=e[rq];r&&r.forEach(e=>{e.split(/\s+/).forEach(e=>e&&l.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&l.classList.add(e)),l.style.display="none";let i=1===t.nodeType?t:t.parentNode;i.appendChild(l);let{hasTransform:s}=r8(l);return i.removeChild(l),s}(n[0].el,r.vnode.el,t))return;n.forEach(iN),n.forEach(iP);let l=n.filter(iM);r9(),l.forEach(e=>{let n=e.el,l=n.style;r0(n,t),l.transform=l.webkitTransform=l.transitionDuration="";let r=n[iA]=e=>{(!e||e.target===n)&&(!e||/transform$/.test(e.propertyName))&&(n.removeEventListener("transitionend",r),n[iA]=null,r1(n,t))};n.addEventListener("transitionend",r)})}),()=>{let s=tg(e),o=rQ(s),a=s.tag||l5;if(n=[],l)for(let e=0;e<l.length;e++){let t=l[e];t.el&&t.el instanceof Element&&(n.push(t),n_(t,ng(t,o,i,r)),ik.set(t,t.el.getBoundingClientRect()))}l=t.default?ny(t.default()):[];for(let e=0;e<l.length;e++){let t=l[e];null!=t.key&&n_(t,ng(t,o,i,r))}return rh(a,null,l)}}},delete n.props.mode,n);function iN(e){let t=e.el;t[iA]&&t[iA](),t[iR]&&t[iR]()}function iP(e){iT.set(e,e.el.getBoundingClientRect())}function iM(e){let t=ik.get(e),n=iT.get(e),l=t.left-n.left,r=t.top-n.top;if(l||r){let t=e.el.style;return t.transform=t.webkitTransform=`translate(${l}px,${r}px)`,t.transitionDuration="0s",e}}let iI=e=>{let t=e.props["onUpdate:modelValue"]||!1;return T(t)?e=>Z(t,e):t};function iL(e){e.target.composing=!0}function iD(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}let iF=Symbol("_assign"),iV={created(e,{modifiers:{lazy:t,trim:n,number:l}},r){e[iF]=iI(r);let i=l||r.props&&"number"===r.props.type;ih(e,t?"change":"input",t=>{if(t.target.composing)return;let l=e.value;n&&(l=l.trim()),i&&(l=Q(l)),e[iF](l)}),n&&ih(e,"change",()=>{e.value=e.value.trim()}),t||(ih(e,"compositionstart",iL),ih(e,"compositionend",iD),ih(e,"change",iD))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:l,trim:r,number:i}},s){if(e[iF]=iI(s),e.composing)return;let o=(i||"number"===e.type)&&!/^0\d/.test(e.value)?Q(e.value):e.value,a=null==t?"":t;o===a||document.activeElement===e&&"range"!==e.type&&(l&&t===n||r&&e.value.trim()===a)||(e.value=a)}},iU={deep:!0,created(e,t,n){e[iF]=iI(n),ih(e,"change",()=>{let t=e._modelValue,n=iW(e),l=e.checked,r=e[iF];if(T(t)){let e=ec(t,n),i=-1!==e;if(l&&!i)r(t.concat(n));else if(!l&&i){let n=[...t];n.splice(e,1),r(n)}}else if(R(t)){let e=new Set(t);l?e.add(n):e.delete(n),r(e)}else r(iK(e,l))})},mounted:ij,beforeUpdate(e,t,n){e[iF]=iI(n),ij(e,t,n)}};function ij(e,{value:t,oldValue:n},l){let r;if(e._modelValue=t,T(t))r=ec(t,l.props.value)>-1;else if(R(t))r=t.has(l.props.value);else{if(t===n)return;r=eu(t,iK(e,!0))}e.checked!==r&&(e.checked=r)}let iB={created(e,{value:t},n){e.checked=eu(t,n.props.value),e[iF]=iI(n),ih(e,"change",()=>{e[iF](iW(e))})},beforeUpdate(e,{value:t,oldValue:n},l){e[iF]=iI(l),t!==n&&(e.checked=eu(t,l.props.value))}},i$={deep:!0,created(e,{value:t,modifiers:{number:n}},l){let r=R(t);ih(e,"change",()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?Q(iW(e)):iW(e));e[iF](e.multiple?r?new Set(t):t:t[0]),e._assigning=!0,tq(()=>{e._assigning=!1})}),e[iF]=iI(l)},mounted(e,{value:t}){iH(e,t)},beforeUpdate(e,t,n){e[iF]=iI(n)},updated(e,{value:t}){e._assigning||iH(e,t)}};function iH(e,t){let n=e.multiple,l=T(t);if(!n||l||R(t)){for(let r=0,i=e.options.length;r<i;r++){let i=e.options[r],s=iW(i);if(n){if(l){let e=typeof s;"string"===e||"number"===e?i.selected=t.some(e=>String(e)===String(s)):i.selected=ec(t,s)>-1}else i.selected=t.has(s)}else if(eu(iW(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function iW(e){return"_value"in e?e._value:e.value}function iK(e,t){let n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}function iz(e,t,n,l,r){let i=function(e,t){switch(e){case"SELECT":return i$;case"TEXTAREA":return iV;default:switch(t){case"checkbox":return iU;case"radio":return iB;default:return iV}}}(e.tagName,n.props&&n.props.type)[r];i&&i(e,t,n,l)}let iq=["ctrl","shift","alt","meta"],iG={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>iq.some(n=>e[`${n}Key`]&&!t.includes(n))},iJ={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},iX=x({patchProp:(e,t,n,l,r,i)=>{let s="svg"===r;"class"===t?function(e,t,n){let l=e[rq];l&&(t=(t?[t,...l]:[...l]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,l,s):"style"===t?function(e,t,n){let l=e.style,r=M(n),i=!1;if(n&&!r){if(t){if(M(t))for(let e of t.split(";")){let t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&io(l,t,"")}else for(let e in t)null==n[e]&&io(l,e,"")}for(let e in n)"display"===e&&(i=!0),io(l,e,n[e])}else if(r){if(t!==n){let e=l[il];e&&(n+=";"+e),l.cssText=n,i=ii.test(n)}}else t&&e.removeAttribute("style");r7 in e&&(e[r7]=i?l.display:"",e[ie]&&(l.display="none"))}(e,n,l):S(t)?C(t)||function(e,t,n,l,r=null){let i=e[ig]||(e[ig]={}),s=i[t];if(l&&s)s.value=l;else{let[n,o]=function(e){let t;if(iv.test(e)){let n;for(t={};n=e.match(iv);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):q(e.slice(2)),t]}(t);l?ih(e,n,i[t]=function(e,t){let n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();tV(function(e,t){if(!T(t))return t;{let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}}(e,n.value),t,5,[e])};return n.value=e,n.attached=iy(),n}(l,r),o):s&&(!function(e,t,n,l){e.removeEventListener(t,n,l)}(e,n,s,o),i[t]=void 0)}}(e,t,0,l,i):("."===t[0]?(t=t.slice(1),0):"^"===t[0]?(t=t.slice(1),1):!function(e,t,n,l){if(l)return!!("innerHTML"===t||"textContent"===t||t in e&&ib(t)&&P(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"form"===t||"list"===t&&"INPUT"===e.tagName||"type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){let t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return!(ib(t)&&M(n))&&t in e}(e,t,l,s))?e._isVueCE&&(/[A-Z]/.test(t)||!M(l))?id(e,K(t),l,i,t):("true-value"===t?e._trueValue=l:"false-value"===t&&(e._falseValue=l),ip(e,t,l,s)):(id(e,t,l),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||ip(e,t,l,s,i,"value"!==t))}},{insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,l)=>{let r="svg"===t?rH.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?rH.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?rH.createElement(e,{is:n}):rH.createElement(e);return"select"===e&&l&&null!=l.multiple&&r.setAttribute("multiple",l.multiple),r},createText:e=>rH.createTextNode(e),createComment:e=>rH.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>rH.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,l,r,i){let s=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==i&&(r=r.nextSibling););else{rW.innerHTML=r$("svg"===l?`<svg>${e}</svg>`:"mathml"===l?`<math>${e}</math>`:e);let r=rW.content;if("svg"===l||"mathml"===l){let e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}}),iZ=!1;function iY(){return p=iZ?p:lI(iX),iZ=!0,p}let iQ=(...e)=>{(p||(p=lL(iX))).render(...e)},i0=(...e)=>{let t=(p||(p=lL(iX))).createApp(...e),{mount:n}=t;return t.mount=e=>{let l=i6(e);if(!l)return;let r=t._component;P(r)||r.render||r.template||(r.template=l.innerHTML),1===l.nodeType&&(l.textContent="");let i=n(l,!1,i2(l));return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),i},t},i1=(...e)=>{let t=iY().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=i6(e);if(t)return n(t,!0,i2(t))},t};function i2(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function i6(e){return M(e)?document.querySelector(e):e}return e.BaseTransition=nd,e.BaseTransitionPropsValidators=nc,e.Comment=l7,e.DeprecationTypes=null,e.EffectScope=eg,e.ErrorCodes={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},e.ErrorTypeStrings=null,e.Fragment=l5,e.KeepAlive={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=rk(),l=n.ctx,r=new Map,i=new Set,s=null,o=n.suspense,{renderer:{p:a,m:u,um:c,o:{createElement:f}}}=l,p=f("div");function d(e){n$(e),c(e,n,o,!0)}function h(e){r.forEach((t,n)=>{let l=rD(t.type);l&&!e(l)&&g(n)})}function g(e){let t=r.get(e);!t||s&&rc(t,s)?s&&n$(s):d(t),r.delete(e),i.delete(e)}l.activate=(e,t,n,l,r)=>{let i=e.component;u(e,t,n,0,o),a(i.vnode,e,t,n,i,o,l,e.slotScopeIds,r),lM(()=>{i.isDeactivated=!1,i.a&&Z(i.a);let t=e.props&&e.props.onVnodeMounted;t&&rC(t,i.parent,e)},o)},l.deactivate=e=>{let t=e.component;lj(t.m),lj(t.a),u(e,p,null,1,o),lM(()=>{t.da&&Z(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&rC(n,t.parent,e),t.isDeactivated=!0},o)},lH(()=>[e.include,e.exclude],([e,t])=>{e&&h(t=>nV(e,t)),t&&h(e=>!nV(t,e))},{flush:"post",deep:!0});let m=null,_=()=>{null!=m&&(l0(n.subTree.type)?lM(()=>{r.set(m,nH(n.subTree))},n.subTree.suspense):r.set(m,nH(n.subTree)))};return nq(_),nJ(_),nX(()=>{r.forEach(e=>{let{subTree:t,suspense:l}=n,r=nH(t);if(e.type===r.type&&e.key===r.key){n$(r);let e=r.component.da;e&&lM(e,l);return}d(e)})}),()=>{if(m=null,!t.default)return s=null;let n=t.default(),l=n[0];if(n.length>1)return s=null,n;if(!ru(l)||!(4&l.shapeFlag)&&!(128&l.shapeFlag))return s=null,l;let o=nH(l);if(o.type===l7)return s=null,o;let a=o.type,u=rD(nL(o)?o.type.__asyncResolved||{}:a),{include:c,exclude:f,max:p}=e;if(c&&(!u||!nV(c,u))||f&&u&&nV(f,u))return o.shapeFlag&=-257,s=o,l;let d=null==o.key?a:o.key,h=r.get(d);return o.el&&(o=rv(o),128&l.shapeFlag&&(l.ssContent=o)),m=d,h?(o.el=h.el,o.component=h.component,o.transition&&n_(o,o.transition),o.shapeFlag|=512,i.delete(d),i.add(d)):(i.add(d),p&&i.size>parseInt(p,10)&&g(i.values().next().value)),o.shapeFlag|=256,s=o,l0(l.type)?l:o}}},e.ReactiveEffect=em,e.Static=re,e.Suspense={name:"Suspense",__isSuspense:!0,process(e,t,n,l,r,i,s,o,a,u){if(null==e)(function(e,t,n,l,r,i,s,o,a){let{p:u,o:{createElement:c}}=a,f=c("div"),p=e.suspense=l6(e,r,l,t,f,n,i,s,o,a);u(null,p.pendingBranch=e.ssContent,f,null,l,p,i,s),p.deps>0?(l2(e,"onPending"),l2(e,"onFallback"),u(null,e.ssFallback,t,n,l,null,i,s),l3(p,e.ssFallback)):p.resolve(!1,!0)})(t,n,l,r,i,s,o,a,u);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}(function(e,t,n,l,r,i,s,o,{p:a,um:u,o:{createElement:c}}){let f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;let p=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:g,isInFallback:m,isHydrating:_}=f;if(g)f.pendingBranch=p,rc(p,g)?(a(g,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0?f.resolve():m&&!_&&(a(h,d,n,l,r,null,i,s,o),l3(f,d))):(f.pendingId=l1++,_?(f.isHydrating=!1,f.activeBranch=g):u(g,r,f),f.deps=0,f.effects.length=0,f.hiddenContainer=c("div"),m?(a(null,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0?f.resolve():(a(h,d,n,l,r,null,i,s,o),l3(f,d))):h&&rc(p,h)?(a(h,p,n,l,r,f,i,s,o),f.resolve(!0)):(a(null,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0&&f.resolve()));else if(h&&rc(p,h))a(h,p,n,l,r,f,i,s,o),l3(f,p);else if(l2(t,"onPending"),f.pendingBranch=p,512&p.shapeFlag?f.pendingId=p.component.suspenseId:f.pendingId=l1++,a(null,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0)f.resolve();else{let{timeout:e,pendingId:t}=f;e>0?setTimeout(()=>{f.pendingId===t&&f.fallback(d)},e):0===e&&f.fallback(d)}})(e,t,n,l,r,s,o,a,u)}},hydrate:function(e,t,n,l,r,i,s,o,a){let u=t.suspense=l6(t,l,n,e.parentNode,document.createElement("div"),null,r,i,s,o,!0),c=a(e,u.pendingBranch=t.ssContent,n,u,i,s);return 0===u.deps&&u.resolve(!1,!0),c},normalize:function(e){let{shapeFlag:t,children:n}=e,l=32&t;e.ssContent=l4(l?n.default:n),e.ssFallback=l?l4(n.fallback):rh(l7)}},e.Teleport=nn,e.Text=l9,e.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},e.Transition=rX,e.TransitionGroup=iO,e.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},e.VueElement=iw,e.assertNumber=function(e,t){},e.callWithAsyncErrorHandling=tV,e.callWithErrorHandling=tF,e.camelize=K,e.capitalize=G,e.cloneVNode=rv,e.compatUtils=null,e.computed=rF,e.createApp=i0,e.createBlock=ra,e.createCommentVNode=function(e="",t=!1){return t?(rl(),ra(l7,null,e)):rh(l7,null,e)},e.createElementBlock=function(e,t,n,l,r,i){return ro(rd(e,t,n,l,r,i,!0))},e.createElementVNode=rd,e.createHydrationRenderer=lI,e.createPropsRestProxy=function(e,t){let n={};for(let l in e)t.includes(l)||Object.defineProperty(n,l,{enumerable:!0,get:()=>e[l]});return n},e.createRenderer=function(e){return lL(e)},e.createSSRApp=i1,e.createSlots=function(e,t){for(let n=0;n<t.length;n++){let l=t[n];if(T(l))for(let t=0;t<l.length;t++)e[l[t].name]=l[t].fn;else l&&(e[l.name]=l.key?(...e)=>{let t=l.fn(...e);return t&&(t.key=l.key),t}:l.fn)}return e},e.createStaticVNode=function(e,t){let n=rh(re,null,e);return n.staticCount=t,n},e.createTextVNode=rm,e.createVNode=rh,e.customRef=tA,e.defineAsyncComponent=function(e){let t;P(e)&&(e={loader:e});let{loader:n,loadingComponent:l,errorComponent:r,delay:i=200,hydrate:s,timeout:o,suspensible:a=!0,onError:u}=e,c=null,f=0,p=()=>(f++,c=null,d()),d=()=>{let e;return c||(e=c=n().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),u)return new Promise((t,n)=>{u(e,()=>t(p()),()=>n(e),f+1)});throw e}).then(n=>e!==c&&c?c:(n&&(n.__esModule||"Module"===n[Symbol.toStringTag])&&(n=n.default),t=n,n)))};return nb({name:"AsyncComponentWrapper",__asyncLoader:d,__asyncHydrate(e,n,l){let r=s?()=>{let t=s(l,t=>(function(e,t){if(nA(e)&&"["===e.data){let n=1,l=e.nextSibling;for(;l;){if(1===l.nodeType){if(!1===t(l))break}else if(nA(l)){if("]"===l.data){if(0==--n)break}else"["===l.data&&n++}l=l.nextSibling}}else t(e)})(e,t));t&&(n.bum||(n.bum=[])).push(t)}:l;t?r():d().then(()=>!n.isUnmounted&&r())},get __asyncResolved(){return t},setup(){let e=rE;if(nS(e),t)return()=>nD(t,e);let n=t=>{c=null,tU(t,e,13,!r)};if(a&&e.suspense)return d().then(t=>()=>nD(t,e)).catch(e=>(n(e),()=>r?rh(r,{error:e}):null));let s=tb(!1),u=tb(),f=tb(!!i);return i&&setTimeout(()=>{f.value=!1},i),null!=o&&setTimeout(()=>{if(!s.value&&!u.value){let e=Error(`Async component timed out after ${o}ms.`);n(e),u.value=e}},o),d().then(()=>{s.value=!0,e.parent&&nF(e.parent.vnode)&&e.parent.update()}).catch(e=>{n(e),u.value=e}),()=>s.value&&t?nD(t,e):u.value&&r?rh(r,{error:u.value}):l&&!f.value?rh(l):void 0}})},e.defineComponent=nb,e.defineCustomElement=iC,e.defineEmits=function(){return null},e.defineExpose=function(e){},e.defineModel=function(){},e.defineOptions=function(e){},e.defineProps=function(){return null},e.defineSSRCustomElement=(e,t)=>iC(e,t,i1),e.defineSlots=function(){return null},e.devtools=void 0,e.effect=function(e,t){e.effect instanceof em&&(e=e.effect.fn);let n=new em(e);t&&x(n,t);try{n.run()}catch(e){throw n.stop(),e}let l=n.run.bind(n);return l.effect=n,l},e.effectScope=function(e){return new eg(e)},e.getCurrentInstance=rk,e.getCurrentScope=function(){return r},e.getCurrentWatcher=function(){return d},e.getTransitionRawChildren=ny,e.guardReactiveProps=rg,e.h=rV,e.handleError=tU,e.hasInjectionContext=function(){return!!(rE||t0||lg)},e.hydrate=(...e)=>{iY().hydrate(...e)},e.hydrateOnIdle=(e=1e4)=>t=>{let n=nM(t,{timeout:e});return()=>nI(n)},e.hydrateOnInteraction=(e=[])=>(t,n)=>{M(e)&&(e=[e]);let l=!1,r=e=>{l||(l=!0,i(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},i=()=>{n(t=>{for(let n of e)t.removeEventListener(n,r)})};return n(t=>{for(let n of e)t.addEventListener(n,r,{once:!0})}),i},e.hydrateOnMediaQuery=e=>t=>{if(e){let n=matchMedia(e);if(!n.matches)return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t);t()}},e.hydrateOnVisible=e=>(t,n)=>{let l=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){l.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(function(e){let{top:t,left:n,bottom:l,right:r}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:s}=window;return(t>0&&t<i||l>0&&l<i)&&(n>0&&n<s||r>0&&r<s)}(e))return t(),l.disconnect(),!1;l.observe(e)}}),()=>l.disconnect()},e.initCustomFormatter=function(){},e.initDirectivesForSSR=y,e.inject=lm,e.isMemoSame=rU,e.isProxy=th,e.isReactive=tf,e.isReadonly=tp,e.isRef=ty,e.isRuntimeOnly=()=>!c,e.isShallow=td,e.isVNode=ru,e.markRaw=tv,e.mergeDefaults=function(e,t){let n=ln(e);for(let e in t){if(e.startsWith("__skip"))continue;let l=n[e];l?T(l)||P(l)?l=n[e]={type:l,default:t[e]}:l.default=t[e]:null===l&&(l=n[e]={default:t[e]}),l&&t[`__skip_${e}`]&&(l.skipFactory=!0)}return n},e.mergeModels=function(e,t){return e&&t?T(e)&&T(t)?e.concat(t):x({},ln(e),ln(t)):e||t},e.mergeProps=rS,e.nextTick=tq,e.normalizeClass=eo,e.normalizeProps=function(e){if(!e)return null;let{class:t,style:n}=e;return t&&!M(t)&&(e.class=eo(t)),n&&(e.style=el(n)),e},e.normalizeStyle=el,e.onActivated=nU,e.onBeforeMount=nz,e.onBeforeUnmount=nX,e.onBeforeUpdate=nG,e.onDeactivated=nj,e.onErrorCaptured=n1,e.onMounted=nq,e.onRenderTracked=n0,e.onRenderTriggered=nQ,e.onScopeDispose=function(e,t=!1){r&&r.cleanups.push(e)},e.onServerPrefetch=nY,e.onUnmounted=nZ,e.onUpdated=nJ,e.onWatcherCleanup=tL,e.openBlock=rl,e.popScopeId=function(){t1=null},e.provide=lv,e.proxyRefs=tk,e.pushScopeId=function(e){t1=e},e.queuePostFlushCb=tX,e.reactive=to,e.readonly=tu,e.ref=tb,e.registerRuntimeCompiler=function(e){c=e,f=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,le))}},e.render=iQ,e.renderList=function(e,t,n,l){let r;let i=n&&n[l],s=T(e);if(s||M(e)){let n=s&&tf(e),l=!1;n&&(l=!td(e),e=eB(e)),r=Array(e.length);for(let n=0,s=e.length;n<s;n++)r[n]=t(l?tm(e[n]):e[n],n,void 0,i&&i[n])}else if("number"==typeof e){r=Array(e);for(let n=0;n<e;n++)r[n]=t(n+1,n,void 0,i&&i[n])}else if(L(e)){if(e[Symbol.iterator])r=Array.from(e,(e,n)=>t(e,n,void 0,i&&i[n]));else{let n=Object.keys(e);r=Array(n.length);for(let l=0,s=n.length;l<s;l++){let s=n[l];r[l]=t(e[s],s,l,i&&i[l])}}}else r=[];return n&&(n[l]=r),r},e.renderSlot=function(e,t,n={},l,r){if(t0.ce||t0.parent&&nL(t0.parent)&&t0.parent.ce)return"default"!==t&&(n.name=t),rl(),ra(l5,null,[rh("slot",n,l&&l())],64);let i=e[t];i&&i._c&&(i._d=!1),rl();let s=i&&function e(t){return t.some(t=>!ru(t)||!!(t.type!==l7&&(t.type!==l5||e(t.children))))?t:null}(i(n)),o=n.key||s&&s.key,a=ra(l5,{key:(o&&!I(o)?o:`_${t}`)+(!s&&l?"_fb":"")},s||(l?l():[]),s&&1===e._?64:-2);return!r&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),i&&i._c&&(i._d=!0),a},e.resolveComponent=function(e,t){return n4(n2,e,!0,t)||e},e.resolveDirective=function(e){return n4("directives",e)},e.resolveDynamicComponent=function(e){return M(e)?n4(n2,e,!1)||e:e||n6},e.resolveFilter=null,e.resolveTransitionHooks=ng,e.setBlockTracking=rs,e.setDevtoolsHook=y,e.setTransitionHooks=n_,e.shallowReactive=ta,e.shallowReadonly=function(e){return tc(e,!0,e4,tn,ts)},e.shallowRef=tS,e.ssrContextKey=lB,e.ssrUtils=null,e.stop=function(e){e.effect.stop()},e.toDisplayString=ep,e.toHandlerKey=J,e.toHandlers=function(e,t){let n={};for(let l in e)n[t&&/[A-Z]/.test(l)?`on:${l}`:J(l)]=e[l];return n},e.toRaw=tg,e.toRef=function(e,t,n){return ty(e)?e:P(e)?new tO(e):L(e)&&arguments.length>1?tN(e,t,n):tb(e)},e.toRefs=function(e){let t=T(e)?Array(e.length):{};for(let n in e)t[n]=tN(e,n);return t},e.toValue=function(e){return P(e)?e():tw(e)},e.transformVNodeArgs=function(e){},e.triggerRef=function(e){e.dep&&e.dep.trigger()},e.unref=tw,e.useAttrs=function(){return lt().attrs},e.useCssModule=function(e="$style"){return m},e.useCssVars=function(e){let t=rk();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>ir(e,n))},l=()=>{let l=e(t.proxy);t.ce?ir(t.ce,l):function e(t,n){if(128&t.shapeFlag){let l=t.suspense;t=l.activeBranch,l.pendingBranch&&!l.isHydrating&&l.effects.push(()=>{e(l.activeBranch,n)})}for(;t.component;)t=t.component.subTree;if(1&t.shapeFlag&&t.el)ir(t.el,n);else if(t.type===l5)t.children.forEach(t=>e(t,n));else if(t.type===re){let{el:e,anchor:l}=t;for(;e&&(ir(e,n),e!==l);)e=e.nextSibling}}(t.subTree,l),n(l)};nG(()=>{tX(l)}),nq(()=>{lH(l,y,{flush:"post"});let e=new MutationObserver(l);e.observe(t.subTree.el.parentNode,{childList:!0}),nZ(()=>e.disconnect())})},e.useHost=iE,e.useId=function(){let e=rk();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""},e.useModel=function(e,t,n=m){let l=rk(),r=K(t),i=q(t),s=lz(e,r),o=tA((s,o)=>{let a,u;let c=m;return l$(()=>{let t=e[r];X(a,t)&&(a=t,o())}),{get:()=>(s(),n.get?n.get(a):a),set(e){let s=n.set?n.set(e):e;if(!X(s,a)&&!(c!==m&&X(e,c)))return;let f=l.vnode.props;f&&(t in f||r in f||i in f)&&(`onUpdate:${t}`in f||`onUpdate:${r}`in f||`onUpdate:${i}`in f)||(a=e,o()),l.emit(`update:${t}`,s),X(e,s)&&X(e,c)&&!X(s,u)&&o(),c=e,u=s}}});return o[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?s||m:o,done:!1}:{done:!0}}},o},e.useSSRContext=()=>{},e.useShadowRoot=function(){let e=iE();return e&&e.shadowRoot},e.useSlots=function(){return lt().slots},e.useTemplateRef=function(e){let t=rk(),n=tS(null);return t&&Object.defineProperty(t.refs===m?t.refs={}:t.refs,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e}),n},e.useTransitionState=na,e.vModelCheckbox=iU,e.vModelDynamic={created(e,t,n){iz(e,t,n,null,"created")},mounted(e,t,n){iz(e,t,n,null,"mounted")},beforeUpdate(e,t,n,l){iz(e,t,n,l,"beforeUpdate")},updated(e,t,n,l){iz(e,t,n,l,"updated")}},e.vModelRadio=iB,e.vModelSelect=i$,e.vModelText=iV,e.vShow={beforeMount(e,{value:t},{transition:n}){e[r7]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):it(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:l}){!t!=!n&&(l?t?(l.beforeEnter(e),it(e,!0),l.enter(e)):l.leave(e,()=>{it(e,!1)}):it(e,t))},beforeUnmount(e,{value:t}){it(e,t)}},e.version=rj,e.warn=y,e.watch=function(e,t,n){return lH(e,t,n)},e.watchEffect=function(e,t){return lH(e,null,t)},e.watchPostEffect=function(e,t){return lH(e,null,{flush:"post"})},e.watchSyncEffect=l$,e.withAsyncContext=function(e){let t=rk(),n=e();return rA(),D(n)&&(n=n.catch(e=>{throw rT(t),e})),[n,()=>rT(t)]},e.withCtx=t6,e.withDefaults=function(e,t){return null},e.withDirectives=function(e,t){if(null===t0)return e;let n=rL(t0),l=e.dirs||(e.dirs=[]);for(let e=0;e<t.length;e++){let[r,i,s,o=m]=t[e];r&&(P(r)&&(r={mounted:r,updated:r}),r.deep&&tD(i),l.push({dir:r,instance:n,value:i,oldValue:void 0,arg:s,modifiers:o}))}return e},e.withKeys=(e,t)=>{let n=e._withKeys||(e._withKeys={}),l=t.join(".");return n[l]||(n[l]=n=>{if(!("key"in n))return;let l=q(n.key);if(t.some(e=>e===l||iJ[e]===l))return e(n)})},e.withMemo=function(e,t,n,l){let r=n[l];if(r&&rU(r,e))return r;let i=t();return i.memo=e.slice(),i.cacheIndex=l,n[l]=i},e.withModifiers=(e,t)=>{let n=e._withMods||(e._withMods={}),l=t.join(".");return n[l]||(n[l]=(n,...l)=>{for(let e=0;e<t.length;e++){let l=iG[t[e]];if(l&&l(n,t))return}return e(n,...l)})},e.withScopeId=e=>t6,e}({}); diff --git a/vuetest/node_modules/@vue/runtime-dom/index.js b/vuetest/node_modules/@vue/runtime-dom/index.js new file mode 100644 index 0000000..cdc29b2 --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-dom/index.js @@ -0,0 +1,7 @@ +'use strict' + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/runtime-dom.cjs.prod.js') +} else { + module.exports = require('./dist/runtime-dom.cjs.js') +} diff --git a/vuetest/node_modules/@vue/runtime-dom/package.json b/vuetest/node_modules/@vue/runtime-dom/package.json new file mode 100644 index 0000000..0448547 --- /dev/null +++ b/vuetest/node_modules/@vue/runtime-dom/package.json @@ -0,0 +1,60 @@ +{ + "name": "@vue/runtime-dom", + "version": "3.5.13", + "description": "@vue/runtime-dom", + "main": "index.js", + "module": "dist/runtime-dom.esm-bundler.js", + "types": "dist/runtime-dom.d.ts", + "unpkg": "dist/runtime-dom.global.js", + "files": [ + "index.js", + "dist" + ], + "exports": { + ".": { + "types": "./dist/runtime-dom.d.ts", + "node": { + "production": "./dist/runtime-dom.cjs.prod.js", + "development": "./dist/runtime-dom.cjs.js", + "default": "./index.js" + }, + "module": "./dist/runtime-dom.esm-bundler.js", + "import": "./dist/runtime-dom.esm-bundler.js", + "require": "./index.js" + }, + "./*": "./*" + }, + "sideEffects": false, + "buildOptions": { + "name": "VueRuntimeDOM", + "formats": [ + "esm-bundler", + "esm-browser", + "cjs", + "global" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/vuejs/core.git", + "directory": "packages/runtime-dom" + }, + "keywords": [ + "vue" + ], + "author": "Evan You", + "license": "MIT", + "bugs": { + "url": "https://github.com/vuejs/core/issues" + }, + "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-dom#readme", + "dependencies": { + "csstype": "^3.1.3", + "@vue/shared": "3.5.13", + "@vue/runtime-core": "3.5.13", + "@vue/reactivity": "3.5.13" + }, + "devDependencies": { + "@types/trusted-types": "^2.0.7" + } +} \ No newline at end of file diff --git a/vuetest/node_modules/@vue/server-renderer/LICENSE b/vuetest/node_modules/@vue/server-renderer/LICENSE new file mode 100644 index 0000000..15f1f7e --- /dev/null +++ b/vuetest/node_modules/@vue/server-renderer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018-present, Yuxi (Evan) You + +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. diff --git a/vuetest/node_modules/@vue/server-renderer/README.md b/vuetest/node_modules/@vue/server-renderer/README.md new file mode 100644 index 0000000..55323e4 --- /dev/null +++ b/vuetest/node_modules/@vue/server-renderer/README.md @@ -0,0 +1,178 @@ +# @vue/server-renderer + +**Note: as of 3.2.13+, this package is included as a dependency of the main `vue` package and can be accessed as `vue/server-renderer`. This means you no longer need to explicitly install this package and ensure its version match that of `vue`'s. Just use the `vue/server-renderer` deep import instead.** + +## Basic API + +### `renderToString` + +**Signature** + +```ts +function renderToString( + input: App | VNode, + context?: SSRContext, +): Promise<string> +``` + +**Usage** + +```js +const { createSSRApp } = require('vue') +const { renderToString } = require('@vue/server-renderer') + +const app = createSSRApp({ + data: () => ({ msg: 'hello' }), + template: `<div>{{ msg }}</div>`, +}) + +;(async () => { + const html = await renderToString(app) + console.log(html) +})() +``` + +### Handling Teleports + +If the rendered app contains teleports, the teleported content will not be part of the rendered string. Instead, they are exposed under the `teleports` property of the ssr context object: + +```js +const ctx = {} +const html = await renderToString(app, ctx) + +console.log(ctx.teleports) // { '#teleported': 'teleported content' } +``` + +## Streaming API + +### `renderToNodeStream` + +Renders input as a [Node.js Readable stream](https://nodejs.org/api/stream.html#stream_class_stream_readable). + +**Signature** + +```ts +function renderToNodeStream(input: App | VNode, context?: SSRContext): Readable +``` + +**Usage** + +```js +// inside a Node.js http handler +renderToNodeStream(app).pipe(res) +``` + +**Note:** This method is not supported in the ESM build of `@vue/server-renderer`, which is decoupled from Node.js environments. Use `pipeToNodeWritable` instead. + +### `pipeToNodeWritable` + +Render and pipe to an existing [Node.js Writable stream](https://nodejs.org/api/stream.html#stream_writable_streams) instance. + +**Signature** + +```ts +function pipeToNodeWritable( + input: App | VNode, + context: SSRContext = {}, + writable: Writable, +): void +``` + +**Usage** + +```js +// inside a Node.js http handler +pipeToNodeWritable(app, {}, res) +``` + +### `renderToWebStream` + +Renders input as a [Web ReadableStream](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API). + +**Signature** + +```ts +function renderToWebStream( + input: App | VNode, + context?: SSRContext, +): ReadableStream +``` + +**Usage** + +```js +// inside an environment with ReadableStream support +return new Response(renderToWebStream(app)) +``` + +**Note:** in environments that do not expose `ReadableStream` constructor in the global scope, `pipeToWebWritable` should be used instead. + +### `pipeToWebWritable` + +Render and pipe to an existing [Web WritableStream](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream) instance. + +**Signature** + +```ts +function pipeToWebWritable( + input: App | VNode, + context: SSRContext = {}, + writable: WritableStream, +): void +``` + +**Usage** + +This is typically used in combination with [`TransformStream`](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream): + +```js +// TransformStream is available in environments such as CloudFlare workers. +// in Node.js, TransformStream needs to be explicitly imported from 'stream/web' +const { readable, writable } = new TransformStream() +pipeToWebWritable(app, {}, writable) + +return new Response(readable) +``` + +### `renderToSimpleStream` + +Renders input in streaming mode using a simple readable interface. + +**Signature** + +```ts +function renderToSimpleStream( + input: App | VNode, + context: SSRContext, + options: SimpleReadable, +): SimpleReadable + +interface SimpleReadable { + push(content: string | null): void + destroy(err: any): void +} +``` + +**Usage** + +```js +let res = '' + +renderToSimpleStream( + app, + {}, + { + push(chunk) { + if (chunk === null) { + // done + console(`render complete: ${res}`) + } else { + res += chunk + } + }, + destroy(err) { + // error encountered + }, + }, +) +``` diff --git a/vuetest/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js b/vuetest/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js new file mode 100644 index 0000000..8725f8d --- /dev/null +++ b/vuetest/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js @@ -0,0 +1,1129 @@ +/** +* @vue/server-renderer v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var Vue = require('vue'); +var shared = require('@vue/shared'); +var compilerSsr = require('@vue/compiler-ssr'); + +function _interopNamespaceDefault(e) { + var n = Object.create(null); + if (e) { + for (var k in e) { + n[k] = e[k]; + } + } + n.default = e; + return Object.freeze(n); +} + +var Vue__namespace = /*#__PURE__*/_interopNamespaceDefault(Vue); + +const shouldIgnoreProp = /* @__PURE__ */ shared.makeMap( + `,key,ref,innerHTML,textContent,ref_key,ref_for` +); +function ssrRenderAttrs(props, tag) { + let ret = ""; + for (const key in props) { + if (shouldIgnoreProp(key) || shared.isOn(key) || tag === "textarea" && key === "value") { + continue; + } + const value = props[key]; + if (key === "class") { + ret += ` class="${ssrRenderClass(value)}"`; + } else if (key === "style") { + ret += ` style="${ssrRenderStyle(value)}"`; + } else if (key === "className") { + ret += ` class="${String(value)}"`; + } else { + ret += ssrRenderDynamicAttr(key, value, tag); + } + } + return ret; +} +function ssrRenderDynamicAttr(key, value, tag) { + if (!shared.isRenderableAttrValue(value)) { + return ``; + } + const attrKey = tag && (tag.indexOf("-") > 0 || shared.isSVGTag(tag)) ? key : shared.propsToAttrMap[key] || key.toLowerCase(); + if (shared.isBooleanAttr(attrKey)) { + return shared.includeBooleanAttr(value) ? ` ${attrKey}` : ``; + } else if (shared.isSSRSafeAttrName(attrKey)) { + return value === "" ? ` ${attrKey}` : ` ${attrKey}="${shared.escapeHtml(value)}"`; + } else { + console.warn( + `[@vue/server-renderer] Skipped rendering unsafe attribute name: ${attrKey}` + ); + return ``; + } +} +function ssrRenderAttr(key, value) { + if (!shared.isRenderableAttrValue(value)) { + return ``; + } + return ` ${key}="${shared.escapeHtml(value)}"`; +} +function ssrRenderClass(raw) { + return shared.escapeHtml(shared.normalizeClass(raw)); +} +function ssrRenderStyle(raw) { + if (!raw) { + return ""; + } + if (shared.isString(raw)) { + return shared.escapeHtml(raw); + } + const styles = shared.normalizeStyle(raw); + return shared.escapeHtml(shared.stringifyStyle(styles)); +} + +function ssrRenderComponent(comp, props = null, children = null, parentComponent = null, slotScopeId) { + return renderComponentVNode( + Vue.createVNode(comp, props, children), + parentComponent, + slotScopeId + ); +} + +const { ensureValidVNode } = Vue.ssrUtils; +function ssrRenderSlot(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId) { + push(`<!--[-->`); + ssrRenderSlotInner( + slots, + slotName, + slotProps, + fallbackRenderFn, + push, + parentComponent, + slotScopeId + ); + push(`<!--]-->`); +} +function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId, transition) { + const slotFn = slots[slotName]; + if (slotFn) { + const slotBuffer = []; + const bufferedPush = (item) => { + slotBuffer.push(item); + }; + const ret = slotFn( + slotProps, + bufferedPush, + parentComponent, + slotScopeId ? " " + slotScopeId : "" + ); + if (shared.isArray(ret)) { + const validSlotContent = ensureValidVNode(ret); + if (validSlotContent) { + renderVNodeChildren( + push, + validSlotContent, + parentComponent, + slotScopeId + ); + } else if (fallbackRenderFn) { + fallbackRenderFn(); + } + } else { + let isEmptySlot = true; + if (transition) { + isEmptySlot = false; + } else { + for (let i = 0; i < slotBuffer.length; i++) { + if (!isComment(slotBuffer[i])) { + isEmptySlot = false; + break; + } + } + } + if (isEmptySlot) { + if (fallbackRenderFn) { + fallbackRenderFn(); + } + } else { + let start = 0; + let end = slotBuffer.length; + if (transition && slotBuffer[0] === "<!--[-->" && slotBuffer[end - 1] === "<!--]-->") { + start++; + end--; + } + for (let i = start; i < end; i++) { + push(slotBuffer[i]); + } + } + } + } else if (fallbackRenderFn) { + fallbackRenderFn(); + } +} +const commentTestRE = /^<!--[\s\S]*-->$/; +const commentRE = /<!--[^]*?-->/gm; +function isComment(item) { + if (typeof item !== "string" || !commentTestRE.test(item)) return false; + if (item.length <= 8) return true; + return !item.replace(commentRE, "").trim(); +} + +function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) { + parentPush("<!--teleport start-->"); + const context = parentComponent.appContext.provides[Vue.ssrContextKey]; + const teleportBuffers = context.__teleportBuffers || (context.__teleportBuffers = {}); + const targetBuffer = teleportBuffers[target] || (teleportBuffers[target] = []); + const bufferIndex = targetBuffer.length; + let teleportContent; + if (disabled) { + contentRenderFn(parentPush); + teleportContent = `<!--teleport start anchor--><!--teleport anchor-->`; + } else { + const { getBuffer, push } = createBuffer(); + push(`<!--teleport start anchor-->`); + contentRenderFn(push); + push(`<!--teleport anchor-->`); + teleportContent = getBuffer(); + } + targetBuffer.splice(bufferIndex, 0, teleportContent); + parentPush("<!--teleport end-->"); +} + +function ssrInterpolate(value) { + return shared.escapeHtml(shared.toDisplayString(value)); +} + +function toRaw(observed) { + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; +} + +function isRef(r) { + return r ? r["__v_isRef"] === true : false; +} + +const stack = []; +function pushWarningContext$1(vnode) { + stack.push(vnode); +} +function popWarningContext$1() { + stack.pop(); +} +let isWarning = false; +function warn$1(msg, ...args) { + if (isWarning) return; + isWarning = true; + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + // eslint-disable-next-line no-restricted-syntax + msg + args.map((a) => { + var _a, _b; + return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); + }).join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); + } + console.warn(...warnArgs); + } + isWarning = false; +} +function getComponentTrace() { + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); + } + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; +} +function formatTrace(trace) { + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; +} +function formatTraceEntry({ vnode, recurseCount }) { + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; +} +function formatProps(props) { + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; +} +function formatProp(key, value, raw) { + if (shared.isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (shared.isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } +} + +const ErrorTypeStrings = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush", + [15]: "component update", + [16]: "app unmount cleanup function" +}; +function callWithErrorHandling(fn, instance, type, args) { + try { + return args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } +} +function handleError(err, instance, type, throwInDev = true) { + const contextVNode = instance ? instance.vnode : null; + const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || shared.EMPTY_OBJ; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = ErrorTypeStrings[type] ; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + return; + } + } + } + cur = cur.parent; + } + if (errorHandler) { + callWithErrorHandling(errorHandler, null, 10, [ + err, + exposedInstance, + errorInfo + ]); + return; + } + } + logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); +} +function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { + { + const info = ErrorTypeStrings[type]; + if (contextVNode) { + pushWarningContext$1(contextVNode); + } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext$1(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } +} + +{ + const g = shared.getGlobalThis(); + const registerGlobalSetter = (key, setter) => { + let setters; + if (!(setters = g[key])) setters = g[key] = []; + setters.push(setter); + return (v) => { + if (setters.length > 1) setters.forEach((set) => set(v)); + else setters[0](v); + }; + }; + registerGlobalSetter( + `__VUE_INSTANCE_SETTERS__`, + (v) => v + ); + registerGlobalSetter( + `__VUE_SSR_SETTERS__`, + (v) => v + ); +} +const classifyRE = /(?:^|[-_])(\w)/g; +const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); +function getComponentName(Component, includeInferred = true) { + return shared.isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; +} +function formatComponentName(instance, Component, isRoot = false) { + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; + } + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; +} + +const warn = warn$1 ; + +function ssrRenderList(source, renderItem) { + if (shared.isArray(source) || shared.isString(source)) { + for (let i = 0, l = source.length; i < l; i++) { + renderItem(source[i], i); + } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn(`The v-for range expect an integer value but got ${source}.`); + return; + } + for (let i = 0; i < source; i++) { + renderItem(i + 1, i); + } + } else if (shared.isObject(source)) { + if (source[Symbol.iterator]) { + const arr = Array.from(source); + for (let i = 0, l = arr.length; i < l; i++) { + renderItem(arr[i], i); + } + } else { + const keys = Object.keys(source); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + renderItem(source[key], key, i); + } + } + } +} + +async function ssrRenderSuspense(push, { default: renderContent }) { + if (renderContent) { + renderContent(); + } else { + push(`<!---->`); + } +} + +function ssrGetDirectiveProps(instance, dir, value, arg, modifiers = {}) { + if (typeof dir !== "function" && dir.getSSRProps) { + return dir.getSSRProps( + { + dir, + instance: Vue.ssrUtils.getComponentPublicInstance(instance.$), + value, + oldValue: void 0, + arg, + modifiers + }, + null + ) || {}; + } + return {}; +} + +const ssrLooseEqual = shared.looseEqual; +function ssrLooseContain(arr, value) { + return shared.looseIndexOf(arr, value) > -1; +} +function ssrRenderDynamicModel(type, model, value) { + switch (type) { + case "radio": + return shared.looseEqual(model, value) ? " checked" : ""; + case "checkbox": + return (shared.isArray(model) ? ssrLooseContain(model, value) : model) ? " checked" : ""; + default: + return ssrRenderAttr("value", model); + } +} +function ssrGetDynamicModelProps(existingProps = {}, model) { + const { type, value } = existingProps; + switch (type) { + case "radio": + return shared.looseEqual(model, value) ? { checked: true } : null; + case "checkbox": + return (shared.isArray(model) ? ssrLooseContain(model, value) : model) ? { checked: true } : null; + default: + return { value: model }; + } +} + +var helpers = /*#__PURE__*/Object.freeze({ + __proto__: null, + ssrGetDirectiveProps: ssrGetDirectiveProps, + ssrGetDynamicModelProps: ssrGetDynamicModelProps, + ssrIncludeBooleanAttr: shared.includeBooleanAttr, + ssrInterpolate: ssrInterpolate, + ssrLooseContain: ssrLooseContain, + ssrLooseEqual: ssrLooseEqual, + ssrRenderAttr: ssrRenderAttr, + ssrRenderAttrs: ssrRenderAttrs, + ssrRenderClass: ssrRenderClass, + ssrRenderComponent: ssrRenderComponent, + ssrRenderDynamicAttr: ssrRenderDynamicAttr, + ssrRenderDynamicModel: ssrRenderDynamicModel, + ssrRenderList: ssrRenderList, + ssrRenderSlot: ssrRenderSlot, + ssrRenderSlotInner: ssrRenderSlotInner, + ssrRenderStyle: ssrRenderStyle, + ssrRenderSuspense: ssrRenderSuspense, + ssrRenderTeleport: ssrRenderTeleport, + ssrRenderVNode: renderVNode +}); + +const compileCache = /* @__PURE__ */ Object.create(null); +function ssrCompile(template, instance) { + const Component = instance.type; + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = shared.extend( + shared.extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions + ); + finalCompilerOptions.isCustomElement = finalCompilerOptions.isCustomElement || shared.NO; + finalCompilerOptions.isNativeTag = finalCompilerOptions.isNativeTag || shared.NO; + const cacheKey = JSON.stringify( + { + template, + compilerOptions: finalCompilerOptions + }, + (key, value) => { + return shared.isFunction(value) ? value.toString() : value; + } + ); + const cached = compileCache[cacheKey]; + if (cached) { + return cached; + } + finalCompilerOptions.onError = (err) => { + { + const message = `[@vue/server-renderer] Template compilation error: ${err.message}`; + const codeFrame = err.loc && shared.generateCodeFrame( + template, + err.loc.start.offset, + err.loc.end.offset + ); + Vue.warn(codeFrame ? `${message} +${codeFrame}` : message); + } + }; + const { code } = compilerSsr.compile(template, finalCompilerOptions); + const requireMap = { + vue: Vue__namespace, + "vue/server-renderer": helpers + }; + const fakeRequire = (id) => requireMap[id]; + return compileCache[cacheKey] = Function("require", code)(fakeRequire); +} + +const { + createComponentInstance, + setCurrentRenderingInstance, + setupComponent, + renderComponentRoot, + normalizeVNode, + pushWarningContext, + popWarningContext +} = Vue.ssrUtils; +function createBuffer() { + let appendable = false; + const buffer = []; + return { + getBuffer() { + return buffer; + }, + push(item) { + const isStringItem = shared.isString(item); + if (appendable && isStringItem) { + buffer[buffer.length - 1] += item; + return; + } + buffer.push(item); + appendable = isStringItem; + if (shared.isPromise(item) || shared.isArray(item) && item.hasAsync) { + buffer.hasAsync = true; + } + } + }; +} +function renderComponentVNode(vnode, parentComponent = null, slotScopeId) { + const instance = vnode.component = createComponentInstance( + vnode, + parentComponent, + null + ); + pushWarningContext(vnode); + const res = setupComponent( + instance, + true + /* isSSR */ + ); + popWarningContext(); + const hasAsyncSetup = shared.isPromise(res); + let prefetches = instance.sp; + if (hasAsyncSetup || prefetches) { + const p = Promise.resolve(res).then(() => { + if (hasAsyncSetup) prefetches = instance.sp; + if (prefetches) { + return Promise.all( + prefetches.map((prefetch) => prefetch.call(instance.proxy)) + ); + } + }).catch(shared.NOOP); + return p.then(() => renderComponentSubTree(instance, slotScopeId)); + } else { + return renderComponentSubTree(instance, slotScopeId); + } +} +function renderComponentSubTree(instance, slotScopeId) { + pushWarningContext(instance.vnode); + const comp = instance.type; + const { getBuffer, push } = createBuffer(); + if (shared.isFunction(comp)) { + let root = renderComponentRoot(instance); + if (!comp.props) { + for (const key in instance.attrs) { + if (key.startsWith(`data-v-`)) { + (root.props || (root.props = {}))[key] = ``; + } + } + } + renderVNode(push, instance.subTree = root, instance, slotScopeId); + } else { + if ((!instance.render || instance.render === shared.NOOP) && !instance.ssrRender && !comp.ssrRender && shared.isString(comp.template)) { + comp.ssrRender = ssrCompile(comp.template, instance); + } + const ssrRender = instance.ssrRender || comp.ssrRender; + if (ssrRender) { + let attrs = instance.inheritAttrs !== false ? instance.attrs : void 0; + let hasCloned = false; + let cur = instance; + while (true) { + const scopeId = cur.vnode.scopeId; + if (scopeId) { + if (!hasCloned) { + attrs = { ...attrs }; + hasCloned = true; + } + attrs[scopeId] = ""; + } + const parent = cur.parent; + if (parent && parent.subTree && parent.subTree === cur.vnode) { + cur = parent; + } else { + break; + } + } + if (slotScopeId) { + if (!hasCloned) attrs = { ...attrs }; + const slotScopeIdList = slotScopeId.trim().split(" "); + for (let i = 0; i < slotScopeIdList.length; i++) { + attrs[slotScopeIdList[i]] = ""; + } + } + const prev = setCurrentRenderingInstance(instance); + try { + ssrRender( + instance.proxy, + push, + instance, + attrs, + // compiler-optimized bindings + instance.props, + instance.setupState, + instance.data, + instance.ctx + ); + } finally { + setCurrentRenderingInstance(prev); + } + } else if (instance.render && instance.render !== shared.NOOP) { + renderVNode( + push, + instance.subTree = renderComponentRoot(instance), + instance, + slotScopeId + ); + } else { + const componentName = comp.name || comp.__file || `<Anonymous>`; + Vue.warn(`Component ${componentName} is missing template or render function.`); + push(`<!---->`); + } + } + popWarningContext(); + return getBuffer(); +} +function renderVNode(push, vnode, parentComponent, slotScopeId) { + const { type, shapeFlag, children, dirs, props } = vnode; + if (dirs) { + vnode.props = applySSRDirectives(vnode, props, dirs); + } + switch (type) { + case Vue.Text: + push(shared.escapeHtml(children)); + break; + case Vue.Comment: + push( + children ? `<!--${shared.escapeHtmlComment(children)}-->` : `<!---->` + ); + break; + case Vue.Static: + push(children); + break; + case Vue.Fragment: + if (vnode.slotScopeIds) { + slotScopeId = (slotScopeId ? slotScopeId + " " : "") + vnode.slotScopeIds.join(" "); + } + push(`<!--[-->`); + renderVNodeChildren( + push, + children, + parentComponent, + slotScopeId + ); + push(`<!--]-->`); + break; + default: + if (shapeFlag & 1) { + renderElementVNode(push, vnode, parentComponent, slotScopeId); + } else if (shapeFlag & 6) { + push(renderComponentVNode(vnode, parentComponent, slotScopeId)); + } else if (shapeFlag & 64) { + renderTeleportVNode(push, vnode, parentComponent, slotScopeId); + } else if (shapeFlag & 128) { + renderVNode(push, vnode.ssContent, parentComponent, slotScopeId); + } else { + Vue.warn( + "[@vue/server-renderer] Invalid VNode type:", + type, + `(${typeof type})` + ); + } + } +} +function renderVNodeChildren(push, children, parentComponent, slotScopeId) { + for (let i = 0; i < children.length; i++) { + renderVNode(push, normalizeVNode(children[i]), parentComponent, slotScopeId); + } +} +function renderElementVNode(push, vnode, parentComponent, slotScopeId) { + const tag = vnode.type; + let { props, children, shapeFlag, scopeId } = vnode; + let openTag = `<${tag}`; + if (props) { + openTag += ssrRenderAttrs(props, tag); + } + if (scopeId) { + openTag += ` ${scopeId}`; + } + let curParent = parentComponent; + let curVnode = vnode; + while (curParent && curVnode === curParent.subTree) { + curVnode = curParent.vnode; + if (curVnode.scopeId) { + openTag += ` ${curVnode.scopeId}`; + } + curParent = curParent.parent; + } + if (slotScopeId) { + openTag += ` ${slotScopeId}`; + } + push(openTag + `>`); + if (!shared.isVoidTag(tag)) { + let hasChildrenOverride = false; + if (props) { + if (props.innerHTML) { + hasChildrenOverride = true; + push(props.innerHTML); + } else if (props.textContent) { + hasChildrenOverride = true; + push(shared.escapeHtml(props.textContent)); + } else if (tag === "textarea" && props.value) { + hasChildrenOverride = true; + push(shared.escapeHtml(props.value)); + } + } + if (!hasChildrenOverride) { + if (shapeFlag & 8) { + push(shared.escapeHtml(children)); + } else if (shapeFlag & 16) { + renderVNodeChildren( + push, + children, + parentComponent, + slotScopeId + ); + } + } + push(`</${tag}>`); + } +} +function applySSRDirectives(vnode, rawProps, dirs) { + const toMerge = []; + for (let i = 0; i < dirs.length; i++) { + const binding = dirs[i]; + const { + dir: { getSSRProps } + } = binding; + if (getSSRProps) { + const props = getSSRProps(binding, vnode); + if (props) toMerge.push(props); + } + } + return Vue.mergeProps(rawProps || {}, ...toMerge); +} +function renderTeleportVNode(push, vnode, parentComponent, slotScopeId) { + const target = vnode.props && vnode.props.to; + const disabled = vnode.props && vnode.props.disabled; + if (!target) { + if (!disabled) { + Vue.warn(`[@vue/server-renderer] Teleport is missing target prop.`); + } + return []; + } + if (!shared.isString(target)) { + Vue.warn( + `[@vue/server-renderer] Teleport target must be a query selector string.` + ); + return []; + } + ssrRenderTeleport( + push, + (push2) => { + renderVNodeChildren( + push2, + vnode.children, + parentComponent, + slotScopeId + ); + }, + target, + disabled || disabled === "", + parentComponent + ); +} + +const { isVNode: isVNode$1 } = Vue.ssrUtils; +function nestedUnrollBuffer(buffer, parentRet, startIndex) { + if (!buffer.hasAsync) { + return parentRet + unrollBufferSync$1(buffer); + } + let ret = parentRet; + for (let i = startIndex; i < buffer.length; i += 1) { + const item = buffer[i]; + if (shared.isString(item)) { + ret += item; + continue; + } + if (shared.isPromise(item)) { + return item.then((nestedItem) => { + buffer[i] = nestedItem; + return nestedUnrollBuffer(buffer, ret, i); + }); + } + const result = nestedUnrollBuffer(item, ret, 0); + if (shared.isPromise(result)) { + return result.then((nestedItem) => { + buffer[i] = nestedItem; + return nestedUnrollBuffer(buffer, "", i); + }); + } + ret = result; + } + return ret; +} +function unrollBuffer$1(buffer) { + return nestedUnrollBuffer(buffer, "", 0); +} +function unrollBufferSync$1(buffer) { + let ret = ""; + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (shared.isString(item)) { + ret += item; + } else { + ret += unrollBufferSync$1(item); + } + } + return ret; +} +async function renderToString(input, context = {}) { + if (isVNode$1(input)) { + return renderToString(Vue.createApp({ render: () => input }), context); + } + const vnode = Vue.createVNode(input._component, input._props); + vnode.appContext = input._context; + input.provide(Vue.ssrContextKey, context); + const buffer = await renderComponentVNode(vnode); + const result = await unrollBuffer$1(buffer); + await resolveTeleports(context); + if (context.__watcherHandles) { + for (const unwatch of context.__watcherHandles) { + unwatch(); + } + } + return result; +} +async function resolveTeleports(context) { + if (context.__teleportBuffers) { + context.teleports = context.teleports || {}; + for (const key in context.__teleportBuffers) { + context.teleports[key] = await unrollBuffer$1( + await Promise.all([context.__teleportBuffers[key]]) + ); + } + } +} + +const { isVNode } = Vue.ssrUtils; +async function unrollBuffer(buffer, stream) { + if (buffer.hasAsync) { + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (shared.isPromise(item)) { + item = await item; + } + if (shared.isString(item)) { + stream.push(item); + } else { + await unrollBuffer(item, stream); + } + } + } else { + unrollBufferSync(buffer, stream); + } +} +function unrollBufferSync(buffer, stream) { + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (shared.isString(item)) { + stream.push(item); + } else { + unrollBufferSync(item, stream); + } + } +} +function renderToSimpleStream(input, context, stream) { + if (isVNode(input)) { + return renderToSimpleStream( + Vue.createApp({ render: () => input }), + context, + stream + ); + } + const vnode = Vue.createVNode(input._component, input._props); + vnode.appContext = input._context; + input.provide(Vue.ssrContextKey, context); + Promise.resolve(renderComponentVNode(vnode)).then((buffer) => unrollBuffer(buffer, stream)).then(() => resolveTeleports(context)).then(() => { + if (context.__watcherHandles) { + for (const unwatch of context.__watcherHandles) { + unwatch(); + } + } + }).then(() => stream.push(null)).catch((error) => { + stream.destroy(error); + }); + return stream; +} +function renderToStream(input, context = {}) { + console.warn( + `[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead.` + ); + return renderToNodeStream(input, context); +} +function renderToNodeStream(input, context = {}) { + const stream = new (require("node:stream")).Readable({ read() { + } }) ; + if (!stream) { + throw new Error( + `ESM build of renderToStream() does not support renderToNodeStream(). Use pipeToNodeWritable() with an existing Node.js Writable stream instance instead.` + ); + } + return renderToSimpleStream(input, context, stream); +} +function pipeToNodeWritable(input, context = {}, writable) { + renderToSimpleStream(input, context, { + push(content) { + if (content != null) { + writable.write(content); + } else { + writable.end(); + } + }, + destroy(err) { + writable.destroy(err); + } + }); +} +function renderToWebStream(input, context = {}) { + if (typeof ReadableStream !== "function") { + throw new Error( + `ReadableStream constructor is not available in the global scope. If the target environment does support web streams, consider using pipeToWebWritable() with an existing WritableStream instance instead.` + ); + } + const encoder = new TextEncoder(); + let cancelled = false; + return new ReadableStream({ + start(controller) { + renderToSimpleStream(input, context, { + push(content) { + if (cancelled) return; + if (content != null) { + controller.enqueue(encoder.encode(content)); + } else { + controller.close(); + } + }, + destroy(err) { + controller.error(err); + } + }); + }, + cancel() { + cancelled = true; + } + }); +} +function pipeToWebWritable(input, context = {}, writable) { + const writer = writable.getWriter(); + const encoder = new TextEncoder(); + let hasReady = false; + try { + hasReady = shared.isPromise(writer.ready); + } catch (e) { + } + renderToSimpleStream(input, context, { + async push(content) { + if (hasReady) { + await writer.ready; + } + if (content != null) { + return writer.write(encoder.encode(content)); + } else { + return writer.close(); + } + }, + destroy(err) { + console.log(err); + writer.close(); + } + }); +} + +Vue.initDirectivesForSSR(); + +exports.ssrIncludeBooleanAttr = shared.includeBooleanAttr; +exports.pipeToNodeWritable = pipeToNodeWritable; +exports.pipeToWebWritable = pipeToWebWritable; +exports.renderToNodeStream = renderToNodeStream; +exports.renderToSimpleStream = renderToSimpleStream; +exports.renderToStream = renderToStream; +exports.renderToString = renderToString; +exports.renderToWebStream = renderToWebStream; +exports.ssrGetDirectiveProps = ssrGetDirectiveProps; +exports.ssrGetDynamicModelProps = ssrGetDynamicModelProps; +exports.ssrInterpolate = ssrInterpolate; +exports.ssrLooseContain = ssrLooseContain; +exports.ssrLooseEqual = ssrLooseEqual; +exports.ssrRenderAttr = ssrRenderAttr; +exports.ssrRenderAttrs = ssrRenderAttrs; +exports.ssrRenderClass = ssrRenderClass; +exports.ssrRenderComponent = ssrRenderComponent; +exports.ssrRenderDynamicAttr = ssrRenderDynamicAttr; +exports.ssrRenderDynamicModel = ssrRenderDynamicModel; +exports.ssrRenderList = ssrRenderList; +exports.ssrRenderSlot = ssrRenderSlot; +exports.ssrRenderSlotInner = ssrRenderSlotInner; +exports.ssrRenderStyle = ssrRenderStyle; +exports.ssrRenderSuspense = ssrRenderSuspense; +exports.ssrRenderTeleport = ssrRenderTeleport; +exports.ssrRenderVNode = renderVNode; diff --git a/vuetest/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js b/vuetest/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js new file mode 100644 index 0000000..b85ba7a --- /dev/null +++ b/vuetest/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js @@ -0,0 +1,857 @@ +/** +* @vue/server-renderer v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var Vue = require('vue'); +var shared = require('@vue/shared'); +var compilerSsr = require('@vue/compiler-ssr'); + +function _interopNamespaceDefault(e) { + var n = Object.create(null); + if (e) { + for (var k in e) { + n[k] = e[k]; + } + } + n.default = e; + return Object.freeze(n); +} + +var Vue__namespace = /*#__PURE__*/_interopNamespaceDefault(Vue); + +const shouldIgnoreProp = /* @__PURE__ */ shared.makeMap( + `,key,ref,innerHTML,textContent,ref_key,ref_for` +); +function ssrRenderAttrs(props, tag) { + let ret = ""; + for (const key in props) { + if (shouldIgnoreProp(key) || shared.isOn(key) || tag === "textarea" && key === "value") { + continue; + } + const value = props[key]; + if (key === "class") { + ret += ` class="${ssrRenderClass(value)}"`; + } else if (key === "style") { + ret += ` style="${ssrRenderStyle(value)}"`; + } else if (key === "className") { + ret += ` class="${String(value)}"`; + } else { + ret += ssrRenderDynamicAttr(key, value, tag); + } + } + return ret; +} +function ssrRenderDynamicAttr(key, value, tag) { + if (!shared.isRenderableAttrValue(value)) { + return ``; + } + const attrKey = tag && (tag.indexOf("-") > 0 || shared.isSVGTag(tag)) ? key : shared.propsToAttrMap[key] || key.toLowerCase(); + if (shared.isBooleanAttr(attrKey)) { + return shared.includeBooleanAttr(value) ? ` ${attrKey}` : ``; + } else if (shared.isSSRSafeAttrName(attrKey)) { + return value === "" ? ` ${attrKey}` : ` ${attrKey}="${shared.escapeHtml(value)}"`; + } else { + console.warn( + `[@vue/server-renderer] Skipped rendering unsafe attribute name: ${attrKey}` + ); + return ``; + } +} +function ssrRenderAttr(key, value) { + if (!shared.isRenderableAttrValue(value)) { + return ``; + } + return ` ${key}="${shared.escapeHtml(value)}"`; +} +function ssrRenderClass(raw) { + return shared.escapeHtml(shared.normalizeClass(raw)); +} +function ssrRenderStyle(raw) { + if (!raw) { + return ""; + } + if (shared.isString(raw)) { + return shared.escapeHtml(raw); + } + const styles = shared.normalizeStyle(raw); + return shared.escapeHtml(shared.stringifyStyle(styles)); +} + +function ssrRenderComponent(comp, props = null, children = null, parentComponent = null, slotScopeId) { + return renderComponentVNode( + Vue.createVNode(comp, props, children), + parentComponent, + slotScopeId + ); +} + +const { ensureValidVNode } = Vue.ssrUtils; +function ssrRenderSlot(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId) { + push(`<!--[-->`); + ssrRenderSlotInner( + slots, + slotName, + slotProps, + fallbackRenderFn, + push, + parentComponent, + slotScopeId + ); + push(`<!--]-->`); +} +function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId, transition) { + const slotFn = slots[slotName]; + if (slotFn) { + const slotBuffer = []; + const bufferedPush = (item) => { + slotBuffer.push(item); + }; + const ret = slotFn( + slotProps, + bufferedPush, + parentComponent, + slotScopeId ? " " + slotScopeId : "" + ); + if (shared.isArray(ret)) { + const validSlotContent = ensureValidVNode(ret); + if (validSlotContent) { + renderVNodeChildren( + push, + validSlotContent, + parentComponent, + slotScopeId + ); + } else if (fallbackRenderFn) { + fallbackRenderFn(); + } + } else { + let isEmptySlot = true; + if (transition) { + isEmptySlot = false; + } else { + for (let i = 0; i < slotBuffer.length; i++) { + if (!isComment(slotBuffer[i])) { + isEmptySlot = false; + break; + } + } + } + if (isEmptySlot) { + if (fallbackRenderFn) { + fallbackRenderFn(); + } + } else { + let start = 0; + let end = slotBuffer.length; + if (transition && slotBuffer[0] === "<!--[-->" && slotBuffer[end - 1] === "<!--]-->") { + start++; + end--; + } + for (let i = start; i < end; i++) { + push(slotBuffer[i]); + } + } + } + } else if (fallbackRenderFn) { + fallbackRenderFn(); + } +} +const commentTestRE = /^<!--[\s\S]*-->$/; +const commentRE = /<!--[^]*?-->/gm; +function isComment(item) { + if (typeof item !== "string" || !commentTestRE.test(item)) return false; + if (item.length <= 8) return true; + return !item.replace(commentRE, "").trim(); +} + +function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) { + parentPush("<!--teleport start-->"); + const context = parentComponent.appContext.provides[Vue.ssrContextKey]; + const teleportBuffers = context.__teleportBuffers || (context.__teleportBuffers = {}); + const targetBuffer = teleportBuffers[target] || (teleportBuffers[target] = []); + const bufferIndex = targetBuffer.length; + let teleportContent; + if (disabled) { + contentRenderFn(parentPush); + teleportContent = `<!--teleport start anchor--><!--teleport anchor-->`; + } else { + const { getBuffer, push } = createBuffer(); + push(`<!--teleport start anchor-->`); + contentRenderFn(push); + push(`<!--teleport anchor-->`); + teleportContent = getBuffer(); + } + targetBuffer.splice(bufferIndex, 0, teleportContent); + parentPush("<!--teleport end-->"); +} + +function ssrInterpolate(value) { + return shared.escapeHtml(shared.toDisplayString(value)); +} + +function ssrRenderList(source, renderItem) { + if (shared.isArray(source) || shared.isString(source)) { + for (let i = 0, l = source.length; i < l; i++) { + renderItem(source[i], i); + } + } else if (typeof source === "number") { + for (let i = 0; i < source; i++) { + renderItem(i + 1, i); + } + } else if (shared.isObject(source)) { + if (source[Symbol.iterator]) { + const arr = Array.from(source); + for (let i = 0, l = arr.length; i < l; i++) { + renderItem(arr[i], i); + } + } else { + const keys = Object.keys(source); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + renderItem(source[key], key, i); + } + } + } +} + +async function ssrRenderSuspense(push, { default: renderContent }) { + if (renderContent) { + renderContent(); + } else { + push(`<!---->`); + } +} + +function ssrGetDirectiveProps(instance, dir, value, arg, modifiers = {}) { + if (typeof dir !== "function" && dir.getSSRProps) { + return dir.getSSRProps( + { + dir, + instance: Vue.ssrUtils.getComponentPublicInstance(instance.$), + value, + oldValue: void 0, + arg, + modifiers + }, + null + ) || {}; + } + return {}; +} + +const ssrLooseEqual = shared.looseEqual; +function ssrLooseContain(arr, value) { + return shared.looseIndexOf(arr, value) > -1; +} +function ssrRenderDynamicModel(type, model, value) { + switch (type) { + case "radio": + return shared.looseEqual(model, value) ? " checked" : ""; + case "checkbox": + return (shared.isArray(model) ? ssrLooseContain(model, value) : model) ? " checked" : ""; + default: + return ssrRenderAttr("value", model); + } +} +function ssrGetDynamicModelProps(existingProps = {}, model) { + const { type, value } = existingProps; + switch (type) { + case "radio": + return shared.looseEqual(model, value) ? { checked: true } : null; + case "checkbox": + return (shared.isArray(model) ? ssrLooseContain(model, value) : model) ? { checked: true } : null; + default: + return { value: model }; + } +} + +var helpers = /*#__PURE__*/Object.freeze({ + __proto__: null, + ssrGetDirectiveProps: ssrGetDirectiveProps, + ssrGetDynamicModelProps: ssrGetDynamicModelProps, + ssrIncludeBooleanAttr: shared.includeBooleanAttr, + ssrInterpolate: ssrInterpolate, + ssrLooseContain: ssrLooseContain, + ssrLooseEqual: ssrLooseEqual, + ssrRenderAttr: ssrRenderAttr, + ssrRenderAttrs: ssrRenderAttrs, + ssrRenderClass: ssrRenderClass, + ssrRenderComponent: ssrRenderComponent, + ssrRenderDynamicAttr: ssrRenderDynamicAttr, + ssrRenderDynamicModel: ssrRenderDynamicModel, + ssrRenderList: ssrRenderList, + ssrRenderSlot: ssrRenderSlot, + ssrRenderSlotInner: ssrRenderSlotInner, + ssrRenderStyle: ssrRenderStyle, + ssrRenderSuspense: ssrRenderSuspense, + ssrRenderTeleport: ssrRenderTeleport, + ssrRenderVNode: renderVNode +}); + +const compileCache = /* @__PURE__ */ Object.create(null); +function ssrCompile(template, instance) { + const Component = instance.type; + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = shared.extend( + shared.extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions + ); + finalCompilerOptions.isCustomElement = finalCompilerOptions.isCustomElement || shared.NO; + finalCompilerOptions.isNativeTag = finalCompilerOptions.isNativeTag || shared.NO; + const cacheKey = JSON.stringify( + { + template, + compilerOptions: finalCompilerOptions + }, + (key, value) => { + return shared.isFunction(value) ? value.toString() : value; + } + ); + const cached = compileCache[cacheKey]; + if (cached) { + return cached; + } + finalCompilerOptions.onError = (err) => { + { + throw err; + } + }; + const { code } = compilerSsr.compile(template, finalCompilerOptions); + const requireMap = { + vue: Vue__namespace, + "vue/server-renderer": helpers + }; + const fakeRequire = (id) => requireMap[id]; + return compileCache[cacheKey] = Function("require", code)(fakeRequire); +} + +const { + createComponentInstance, + setCurrentRenderingInstance, + setupComponent, + renderComponentRoot, + normalizeVNode, + pushWarningContext, + popWarningContext +} = Vue.ssrUtils; +function createBuffer() { + let appendable = false; + const buffer = []; + return { + getBuffer() { + return buffer; + }, + push(item) { + const isStringItem = shared.isString(item); + if (appendable && isStringItem) { + buffer[buffer.length - 1] += item; + return; + } + buffer.push(item); + appendable = isStringItem; + if (shared.isPromise(item) || shared.isArray(item) && item.hasAsync) { + buffer.hasAsync = true; + } + } + }; +} +function renderComponentVNode(vnode, parentComponent = null, slotScopeId) { + const instance = vnode.component = createComponentInstance( + vnode, + parentComponent, + null + ); + const res = setupComponent( + instance, + true + /* isSSR */ + ); + const hasAsyncSetup = shared.isPromise(res); + let prefetches = instance.sp; + if (hasAsyncSetup || prefetches) { + const p = Promise.resolve(res).then(() => { + if (hasAsyncSetup) prefetches = instance.sp; + if (prefetches) { + return Promise.all( + prefetches.map((prefetch) => prefetch.call(instance.proxy)) + ); + } + }).catch(shared.NOOP); + return p.then(() => renderComponentSubTree(instance, slotScopeId)); + } else { + return renderComponentSubTree(instance, slotScopeId); + } +} +function renderComponentSubTree(instance, slotScopeId) { + const comp = instance.type; + const { getBuffer, push } = createBuffer(); + if (shared.isFunction(comp)) { + let root = renderComponentRoot(instance); + if (!comp.props) { + for (const key in instance.attrs) { + if (key.startsWith(`data-v-`)) { + (root.props || (root.props = {}))[key] = ``; + } + } + } + renderVNode(push, instance.subTree = root, instance, slotScopeId); + } else { + if ((!instance.render || instance.render === shared.NOOP) && !instance.ssrRender && !comp.ssrRender && shared.isString(comp.template)) { + comp.ssrRender = ssrCompile(comp.template, instance); + } + const ssrRender = instance.ssrRender || comp.ssrRender; + if (ssrRender) { + let attrs = instance.inheritAttrs !== false ? instance.attrs : void 0; + let hasCloned = false; + let cur = instance; + while (true) { + const scopeId = cur.vnode.scopeId; + if (scopeId) { + if (!hasCloned) { + attrs = { ...attrs }; + hasCloned = true; + } + attrs[scopeId] = ""; + } + const parent = cur.parent; + if (parent && parent.subTree && parent.subTree === cur.vnode) { + cur = parent; + } else { + break; + } + } + if (slotScopeId) { + if (!hasCloned) attrs = { ...attrs }; + const slotScopeIdList = slotScopeId.trim().split(" "); + for (let i = 0; i < slotScopeIdList.length; i++) { + attrs[slotScopeIdList[i]] = ""; + } + } + const prev = setCurrentRenderingInstance(instance); + try { + ssrRender( + instance.proxy, + push, + instance, + attrs, + // compiler-optimized bindings + instance.props, + instance.setupState, + instance.data, + instance.ctx + ); + } finally { + setCurrentRenderingInstance(prev); + } + } else if (instance.render && instance.render !== shared.NOOP) { + renderVNode( + push, + instance.subTree = renderComponentRoot(instance), + instance, + slotScopeId + ); + } else { + const componentName = comp.name || comp.__file || `<Anonymous>`; + Vue.warn(`Component ${componentName} is missing template or render function.`); + push(`<!---->`); + } + } + return getBuffer(); +} +function renderVNode(push, vnode, parentComponent, slotScopeId) { + const { type, shapeFlag, children, dirs, props } = vnode; + if (dirs) { + vnode.props = applySSRDirectives(vnode, props, dirs); + } + switch (type) { + case Vue.Text: + push(shared.escapeHtml(children)); + break; + case Vue.Comment: + push( + children ? `<!--${shared.escapeHtmlComment(children)}-->` : `<!---->` + ); + break; + case Vue.Static: + push(children); + break; + case Vue.Fragment: + if (vnode.slotScopeIds) { + slotScopeId = (slotScopeId ? slotScopeId + " " : "") + vnode.slotScopeIds.join(" "); + } + push(`<!--[-->`); + renderVNodeChildren( + push, + children, + parentComponent, + slotScopeId + ); + push(`<!--]-->`); + break; + default: + if (shapeFlag & 1) { + renderElementVNode(push, vnode, parentComponent, slotScopeId); + } else if (shapeFlag & 6) { + push(renderComponentVNode(vnode, parentComponent, slotScopeId)); + } else if (shapeFlag & 64) { + renderTeleportVNode(push, vnode, parentComponent, slotScopeId); + } else if (shapeFlag & 128) { + renderVNode(push, vnode.ssContent, parentComponent, slotScopeId); + } else { + Vue.warn( + "[@vue/server-renderer] Invalid VNode type:", + type, + `(${typeof type})` + ); + } + } +} +function renderVNodeChildren(push, children, parentComponent, slotScopeId) { + for (let i = 0; i < children.length; i++) { + renderVNode(push, normalizeVNode(children[i]), parentComponent, slotScopeId); + } +} +function renderElementVNode(push, vnode, parentComponent, slotScopeId) { + const tag = vnode.type; + let { props, children, shapeFlag, scopeId } = vnode; + let openTag = `<${tag}`; + if (props) { + openTag += ssrRenderAttrs(props, tag); + } + if (scopeId) { + openTag += ` ${scopeId}`; + } + let curParent = parentComponent; + let curVnode = vnode; + while (curParent && curVnode === curParent.subTree) { + curVnode = curParent.vnode; + if (curVnode.scopeId) { + openTag += ` ${curVnode.scopeId}`; + } + curParent = curParent.parent; + } + if (slotScopeId) { + openTag += ` ${slotScopeId}`; + } + push(openTag + `>`); + if (!shared.isVoidTag(tag)) { + let hasChildrenOverride = false; + if (props) { + if (props.innerHTML) { + hasChildrenOverride = true; + push(props.innerHTML); + } else if (props.textContent) { + hasChildrenOverride = true; + push(shared.escapeHtml(props.textContent)); + } else if (tag === "textarea" && props.value) { + hasChildrenOverride = true; + push(shared.escapeHtml(props.value)); + } + } + if (!hasChildrenOverride) { + if (shapeFlag & 8) { + push(shared.escapeHtml(children)); + } else if (shapeFlag & 16) { + renderVNodeChildren( + push, + children, + parentComponent, + slotScopeId + ); + } + } + push(`</${tag}>`); + } +} +function applySSRDirectives(vnode, rawProps, dirs) { + const toMerge = []; + for (let i = 0; i < dirs.length; i++) { + const binding = dirs[i]; + const { + dir: { getSSRProps } + } = binding; + if (getSSRProps) { + const props = getSSRProps(binding, vnode); + if (props) toMerge.push(props); + } + } + return Vue.mergeProps(rawProps || {}, ...toMerge); +} +function renderTeleportVNode(push, vnode, parentComponent, slotScopeId) { + const target = vnode.props && vnode.props.to; + const disabled = vnode.props && vnode.props.disabled; + if (!target) { + if (!disabled) { + Vue.warn(`[@vue/server-renderer] Teleport is missing target prop.`); + } + return []; + } + if (!shared.isString(target)) { + Vue.warn( + `[@vue/server-renderer] Teleport target must be a query selector string.` + ); + return []; + } + ssrRenderTeleport( + push, + (push2) => { + renderVNodeChildren( + push2, + vnode.children, + parentComponent, + slotScopeId + ); + }, + target, + disabled || disabled === "", + parentComponent + ); +} + +const { isVNode: isVNode$1 } = Vue.ssrUtils; +function nestedUnrollBuffer(buffer, parentRet, startIndex) { + if (!buffer.hasAsync) { + return parentRet + unrollBufferSync$1(buffer); + } + let ret = parentRet; + for (let i = startIndex; i < buffer.length; i += 1) { + const item = buffer[i]; + if (shared.isString(item)) { + ret += item; + continue; + } + if (shared.isPromise(item)) { + return item.then((nestedItem) => { + buffer[i] = nestedItem; + return nestedUnrollBuffer(buffer, ret, i); + }); + } + const result = nestedUnrollBuffer(item, ret, 0); + if (shared.isPromise(result)) { + return result.then((nestedItem) => { + buffer[i] = nestedItem; + return nestedUnrollBuffer(buffer, "", i); + }); + } + ret = result; + } + return ret; +} +function unrollBuffer$1(buffer) { + return nestedUnrollBuffer(buffer, "", 0); +} +function unrollBufferSync$1(buffer) { + let ret = ""; + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (shared.isString(item)) { + ret += item; + } else { + ret += unrollBufferSync$1(item); + } + } + return ret; +} +async function renderToString(input, context = {}) { + if (isVNode$1(input)) { + return renderToString(Vue.createApp({ render: () => input }), context); + } + const vnode = Vue.createVNode(input._component, input._props); + vnode.appContext = input._context; + input.provide(Vue.ssrContextKey, context); + const buffer = await renderComponentVNode(vnode); + const result = await unrollBuffer$1(buffer); + await resolveTeleports(context); + if (context.__watcherHandles) { + for (const unwatch of context.__watcherHandles) { + unwatch(); + } + } + return result; +} +async function resolveTeleports(context) { + if (context.__teleportBuffers) { + context.teleports = context.teleports || {}; + for (const key in context.__teleportBuffers) { + context.teleports[key] = await unrollBuffer$1( + await Promise.all([context.__teleportBuffers[key]]) + ); + } + } +} + +const { isVNode } = Vue.ssrUtils; +async function unrollBuffer(buffer, stream) { + if (buffer.hasAsync) { + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (shared.isPromise(item)) { + item = await item; + } + if (shared.isString(item)) { + stream.push(item); + } else { + await unrollBuffer(item, stream); + } + } + } else { + unrollBufferSync(buffer, stream); + } +} +function unrollBufferSync(buffer, stream) { + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (shared.isString(item)) { + stream.push(item); + } else { + unrollBufferSync(item, stream); + } + } +} +function renderToSimpleStream(input, context, stream) { + if (isVNode(input)) { + return renderToSimpleStream( + Vue.createApp({ render: () => input }), + context, + stream + ); + } + const vnode = Vue.createVNode(input._component, input._props); + vnode.appContext = input._context; + input.provide(Vue.ssrContextKey, context); + Promise.resolve(renderComponentVNode(vnode)).then((buffer) => unrollBuffer(buffer, stream)).then(() => resolveTeleports(context)).then(() => { + if (context.__watcherHandles) { + for (const unwatch of context.__watcherHandles) { + unwatch(); + } + } + }).then(() => stream.push(null)).catch((error) => { + stream.destroy(error); + }); + return stream; +} +function renderToStream(input, context = {}) { + console.warn( + `[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead.` + ); + return renderToNodeStream(input, context); +} +function renderToNodeStream(input, context = {}) { + const stream = new (require("node:stream")).Readable({ read() { + } }) ; + if (!stream) { + throw new Error( + `ESM build of renderToStream() does not support renderToNodeStream(). Use pipeToNodeWritable() with an existing Node.js Writable stream instance instead.` + ); + } + return renderToSimpleStream(input, context, stream); +} +function pipeToNodeWritable(input, context = {}, writable) { + renderToSimpleStream(input, context, { + push(content) { + if (content != null) { + writable.write(content); + } else { + writable.end(); + } + }, + destroy(err) { + writable.destroy(err); + } + }); +} +function renderToWebStream(input, context = {}) { + if (typeof ReadableStream !== "function") { + throw new Error( + `ReadableStream constructor is not available in the global scope. If the target environment does support web streams, consider using pipeToWebWritable() with an existing WritableStream instance instead.` + ); + } + const encoder = new TextEncoder(); + let cancelled = false; + return new ReadableStream({ + start(controller) { + renderToSimpleStream(input, context, { + push(content) { + if (cancelled) return; + if (content != null) { + controller.enqueue(encoder.encode(content)); + } else { + controller.close(); + } + }, + destroy(err) { + controller.error(err); + } + }); + }, + cancel() { + cancelled = true; + } + }); +} +function pipeToWebWritable(input, context = {}, writable) { + const writer = writable.getWriter(); + const encoder = new TextEncoder(); + let hasReady = false; + try { + hasReady = shared.isPromise(writer.ready); + } catch (e) { + } + renderToSimpleStream(input, context, { + async push(content) { + if (hasReady) { + await writer.ready; + } + if (content != null) { + return writer.write(encoder.encode(content)); + } else { + return writer.close(); + } + }, + destroy(err) { + console.log(err); + writer.close(); + } + }); +} + +Vue.initDirectivesForSSR(); + +exports.ssrIncludeBooleanAttr = shared.includeBooleanAttr; +exports.pipeToNodeWritable = pipeToNodeWritable; +exports.pipeToWebWritable = pipeToWebWritable; +exports.renderToNodeStream = renderToNodeStream; +exports.renderToSimpleStream = renderToSimpleStream; +exports.renderToStream = renderToStream; +exports.renderToString = renderToString; +exports.renderToWebStream = renderToWebStream; +exports.ssrGetDirectiveProps = ssrGetDirectiveProps; +exports.ssrGetDynamicModelProps = ssrGetDynamicModelProps; +exports.ssrInterpolate = ssrInterpolate; +exports.ssrLooseContain = ssrLooseContain; +exports.ssrLooseEqual = ssrLooseEqual; +exports.ssrRenderAttr = ssrRenderAttr; +exports.ssrRenderAttrs = ssrRenderAttrs; +exports.ssrRenderClass = ssrRenderClass; +exports.ssrRenderComponent = ssrRenderComponent; +exports.ssrRenderDynamicAttr = ssrRenderDynamicAttr; +exports.ssrRenderDynamicModel = ssrRenderDynamicModel; +exports.ssrRenderList = ssrRenderList; +exports.ssrRenderSlot = ssrRenderSlot; +exports.ssrRenderSlotInner = ssrRenderSlotInner; +exports.ssrRenderStyle = ssrRenderStyle; +exports.ssrRenderSuspense = ssrRenderSuspense; +exports.ssrRenderTeleport = ssrRenderTeleport; +exports.ssrRenderVNode = renderVNode; diff --git a/vuetest/node_modules/@vue/server-renderer/dist/server-renderer.d.ts b/vuetest/node_modules/@vue/server-renderer/dist/server-renderer.d.ts new file mode 100644 index 0000000..40f9ccc --- /dev/null +++ b/vuetest/node_modules/@vue/server-renderer/dist/server-renderer.d.ts @@ -0,0 +1,65 @@ +import { VNode, ComponentInternalInstance, App, Slots, Component, ComponentPublicInstance, Directive } from 'vue'; +import { Readable, Writable } from 'node:stream'; +export { includeBooleanAttr as ssrIncludeBooleanAttr } from '@vue/shared'; + +type SSRBuffer = SSRBufferItem[] & { + hasAsync?: boolean; +}; +type SSRBufferItem = string | SSRBuffer | Promise<SSRBuffer>; +type PushFn = (item: SSRBufferItem) => void; +type Props = Record<string, unknown>; +export type SSRContext = { + [key: string]: any; + teleports?: Record<string, string>; +}; +export declare function renderVNode(push: PushFn, vnode: VNode, parentComponent: ComponentInternalInstance, slotScopeId?: string): void; + +export declare function renderToString(input: App | VNode, context?: SSRContext): Promise<string>; + +export interface SimpleReadable { + push(chunk: string | null): void; + destroy(err: any): void; +} +export declare function renderToSimpleStream<T extends SimpleReadable>(input: App | VNode, context: SSRContext, stream: T): T; +/** + * @deprecated + */ +export declare function renderToStream(input: App | VNode, context?: SSRContext): Readable; +export declare function renderToNodeStream(input: App | VNode, context?: SSRContext): Readable; +export declare function pipeToNodeWritable(input: App | VNode, context: SSRContext | undefined, writable: Writable): void; +export declare function renderToWebStream(input: App | VNode, context?: SSRContext): ReadableStream; +export declare function pipeToWebWritable(input: App | VNode, context: SSRContext | undefined, writable: WritableStream): void; + +type SSRSlots = Record<string, SSRSlot>; +type SSRSlot = (props: Props, push: PushFn, parentComponent: ComponentInternalInstance | null, scopeId: string | null) => void; +export declare function ssrRenderSlot(slots: Slots | SSRSlots, slotName: string, slotProps: Props, fallbackRenderFn: (() => void) | null, push: PushFn, parentComponent: ComponentInternalInstance, slotScopeId?: string): void; +export declare function ssrRenderSlotInner(slots: Slots | SSRSlots, slotName: string, slotProps: Props, fallbackRenderFn: (() => void) | null, push: PushFn, parentComponent: ComponentInternalInstance, slotScopeId?: string, transition?: boolean): void; + +export declare function ssrRenderComponent(comp: Component, props?: Props | null, children?: Slots | SSRSlots | null, parentComponent?: ComponentInternalInstance | null, slotScopeId?: string): SSRBuffer | Promise<SSRBuffer>; + +export declare function ssrRenderTeleport(parentPush: PushFn, contentRenderFn: (push: PushFn) => void, target: string, disabled: boolean, parentComponent: ComponentInternalInstance): void; + +export declare function ssrRenderAttrs(props: Record<string, unknown>, tag?: string): string; +export declare function ssrRenderDynamicAttr(key: string, value: unknown, tag?: string): string; +export declare function ssrRenderAttr(key: string, value: unknown): string; +export declare function ssrRenderClass(raw: unknown): string; +export declare function ssrRenderStyle(raw: unknown): string; + +export declare function ssrInterpolate(value: unknown): string; + +export declare function ssrRenderList(source: unknown, renderItem: (value: unknown, key: string | number, index?: number) => void): void; + +export declare function ssrRenderSuspense(push: PushFn, { default: renderContent }: Record<string, (() => void) | undefined>): Promise<void>; + +export declare function ssrGetDirectiveProps(instance: ComponentPublicInstance, dir: Directive, value?: any, arg?: string, modifiers?: Record<string, boolean>): Record<string, any>; + +export declare const ssrLooseEqual: (a: unknown, b: unknown) => boolean; +export declare function ssrLooseContain(arr: unknown[], value: unknown): boolean; +export declare function ssrRenderDynamicModel(type: unknown, model: unknown, value: unknown): string; +export declare function ssrGetDynamicModelProps(existingProps: any, model: unknown): { + checked: true; +} | { + value: any; +} | null; + +export { renderVNode as ssrRenderVNode }; diff --git a/vuetest/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.js b/vuetest/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.js new file mode 100644 index 0000000..fbf67fe --- /dev/null +++ b/vuetest/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.js @@ -0,0 +1,8566 @@ +/** +* @vue/server-renderer v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function makeMap(str) { + const map = /* @__PURE__ */ Object.create(null); + for (const key of str.split(",")) map[key] = 1; + return (val) => val in map; +} + +const EMPTY_OBJ = Object.freeze({}) ; +const EMPTY_ARR = Object.freeze([]) ; +const NOOP = () => { +}; +const NO = () => false; +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +const isModelListener = (key) => key.startsWith("onUpdate:"); +const extend = Object.assign; +const remove = (arr, el) => { + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } +}; +const hasOwnProperty$1 = Object.prototype.hasOwnProperty; +const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); +const isArray = Array.isArray; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isDate = (val) => toTypeString(val) === "[object Date]"; +const isFunction = (val) => typeof val === "function"; +const isString = (val) => typeof val === "string"; +const isSymbol = (val) => typeof val === "symbol"; +const isObject = (val) => val !== null && typeof val === "object"; +const isPromise = (val) => { + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); +}; +const objectToString = Object.prototype.toString; +const toTypeString = (value) => objectToString.call(value); +const toRawType = (value) => { + return toTypeString(value).slice(8, -1); +}; +const isPlainObject = (val) => toTypeString(val) === "[object Object]"; +const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); +const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +}; +const camelizeRE = /-(\w)/g; +const camelize = cacheStringFunction( + (str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); + } +); +const hyphenateRE = /\B([A-Z])/g; +const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() +); +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const toHandlerKey = cacheStringFunction( + (str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + } +); +const hasChanged = (value, oldValue) => !Object.is(value, oldValue); +const invokeArrayFns = (fns, ...arg) => { + for (let i = 0; i < fns.length; i++) { + fns[i](...arg); + } +}; +const def = (obj, key, value, writable = false) => { + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + writable, + value + }); +}; +const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; +}; +let _globalThis; +const getGlobalThis = () => { + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); +}; + +function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } +} +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:([^]+)/; +const styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function stringifyStyle(styles) { + if (!styles) return ""; + if (isString(styles)) return styles; + let ret = ""; + for (const key in styles) { + const value = styles[key]; + if (isString(value) || typeof value === "number") { + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + ret += `${normalizedKey}:${value};`; + } + } + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} + +const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; +const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); +const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); +const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); +const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); + +const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); +const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` +); +function includeBooleanAttr(value) { + return !!value || value === ""; +} +const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; +const attrValidationCache = {}; +function isSSRSafeAttrName(name) { + if (attrValidationCache.hasOwnProperty(name)) { + return attrValidationCache[name]; + } + const isUnsafe = unsafeAttrCharRE.test(name); + if (isUnsafe) { + console.error(`unsafe attribute name: ${name}`); + } + return attrValidationCache[name] = !isUnsafe; +} +const propsToAttrMap = { + acceptCharset: "accept-charset", + className: "class", + htmlFor: "for", + httpEquiv: "http-equiv" +}; +function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; +} + +const escapeRE = /["'&<>]/; +function escapeHtml(string) { + const str = "" + string; + const match = escapeRE.exec(str); + if (!match) { + return str; + } + let html = ""; + let escaped; + let index; + let lastIndex = 0; + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + escaped = """; + break; + case 38: + escaped = "&"; + break; + case 39: + escaped = "'"; + break; + case 60: + escaped = "<"; + break; + case 62: + escaped = ">"; + break; + default: + continue; + } + if (lastIndex !== index) { + html += str.slice(lastIndex, index); + } + lastIndex = index + 1; + html += escaped; + } + return lastIndex !== index ? html + str.slice(lastIndex, index) : html; +} +const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g; +function escapeHtmlComment(src) { + return src.replace(commentStripRE, ""); +} + +function looseCompareArrays(a, b) { + if (a.length !== b.length) return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; +} +function looseEqual(a, b) { + if (a === b) return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); +} +function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); +} + +const isRef$1 = (val) => { + return !!(val && val["__v_isRef"] === true); +}; +const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); +}; +const replacer = (_key, val) => { + if (isRef$1(val)) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; +}; +const stringifySymbol = (v, i = "") => { + var _a; + return ( + // Symbol.description in es2019+ so we need to cast here to pass + // the lib: es2016 check + isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v + ); +}; + +function warn$2(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); +} + +let activeEffectScope; +class EffectScope { + constructor(detached = false) { + this.detached = detached; + /** + * @internal + */ + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this._isPaused = false; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + pause() { + if (this._active) { + this._isPaused = true; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].pause(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].pause(); + } + } + } + /** + * Resumes the effect scope, including all child scopes and effects. + */ + resume() { + if (this._active) { + if (this._isPaused) { + this._isPaused = false; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].resume(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].resume(); + } + } + } + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { + activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn$2(`cannot run an inactive effect scope.`); + } + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + this._active = false; + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + this.effects.length = 0; + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + this.cleanups.length = 0; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); + } + this.scopes.length = 0; + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + } + } +} +function getCurrentScope() { + return activeEffectScope; +} + +let activeSub; +const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); +class ReactiveEffect { + constructor(fn) { + this.fn = fn; + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 1 | 4; + /** + * @internal + */ + this.next = void 0; + /** + * @internal + */ + this.cleanup = void 0; + this.scheduler = void 0; + if (activeEffectScope && activeEffectScope.active) { + activeEffectScope.effects.push(this); + } + } + pause() { + this.flags |= 64; + } + resume() { + if (this.flags & 64) { + this.flags &= ~64; + if (pausedQueueEffects.has(this)) { + pausedQueueEffects.delete(this); + this.trigger(); + } + } + } + /** + * @internal + */ + notify() { + if (this.flags & 2 && !(this.flags & 32)) { + return; + } + if (!(this.flags & 8)) { + batch(this); + } + } + run() { + if (!(this.flags & 1)) { + return this.fn(); + } + this.flags |= 2; + cleanupEffect(this); + prepareDeps(this); + const prevEffect = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = this; + shouldTrack = true; + try { + return this.fn(); + } finally { + if (activeSub !== this) { + warn$2( + "Active effect was not restored correctly - this is likely a Vue internal bug." + ); + } + cleanupDeps(this); + activeSub = prevEffect; + shouldTrack = prevShouldTrack; + this.flags &= ~2; + } + } + stop() { + if (this.flags & 1) { + for (let link = this.deps; link; link = link.nextDep) { + removeSub(link); + } + this.deps = this.depsTail = void 0; + cleanupEffect(this); + this.onStop && this.onStop(); + this.flags &= ~1; + } + } + trigger() { + if (this.flags & 64) { + pausedQueueEffects.add(this); + } else if (this.scheduler) { + this.scheduler(); + } else { + this.runIfDirty(); + } + } + /** + * @internal + */ + runIfDirty() { + if (isDirty(this)) { + this.run(); + } + } + get dirty() { + return isDirty(this); + } +} +let batchDepth = 0; +let batchedSub; +let batchedComputed; +function batch(sub, isComputed = false) { + sub.flags |= 8; + if (isComputed) { + sub.next = batchedComputed; + batchedComputed = sub; + return; + } + sub.next = batchedSub; + batchedSub = sub; +} +function startBatch() { + batchDepth++; +} +function endBatch() { + if (--batchDepth > 0) { + return; + } + if (batchedComputed) { + let e = batchedComputed; + batchedComputed = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + e = next; + } + } + let error; + while (batchedSub) { + let e = batchedSub; + batchedSub = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + if (e.flags & 1) { + try { + ; + e.trigger(); + } catch (err) { + if (!error) error = err; + } + } + e = next; + } + } + if (error) throw error; +} +function prepareDeps(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + link.version = -1; + link.prevActiveLink = link.dep.activeLink; + link.dep.activeLink = link; + } +} +function cleanupDeps(sub) { + let head; + let tail = sub.depsTail; + let link = tail; + while (link) { + const prev = link.prevDep; + if (link.version === -1) { + if (link === tail) tail = prev; + removeSub(link); + removeDep(link); + } else { + head = link; + } + link.dep.activeLink = link.prevActiveLink; + link.prevActiveLink = void 0; + link = prev; + } + sub.deps = head; + sub.depsTail = tail; +} +function isDirty(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { + return true; + } + } + if (sub._dirty) { + return true; + } + return false; +} +function refreshComputed(computed) { + if (computed.flags & 4 && !(computed.flags & 16)) { + return; + } + computed.flags &= ~16; + if (computed.globalVersion === globalVersion) { + return; + } + computed.globalVersion = globalVersion; + const dep = computed.dep; + computed.flags |= 2; + if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { + computed.flags &= ~2; + return; + } + const prevSub = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = computed; + shouldTrack = true; + try { + prepareDeps(computed); + const value = computed.fn(computed._value); + if (dep.version === 0 || hasChanged(value, computed._value)) { + computed._value = value; + dep.version++; + } + } catch (err) { + dep.version++; + throw err; + } finally { + activeSub = prevSub; + shouldTrack = prevShouldTrack; + cleanupDeps(computed); + computed.flags &= ~2; + } +} +function removeSub(link, soft = false) { + const { dep, prevSub, nextSub } = link; + if (prevSub) { + prevSub.nextSub = nextSub; + link.prevSub = void 0; + } + if (nextSub) { + nextSub.prevSub = prevSub; + link.nextSub = void 0; + } + if (dep.subsHead === link) { + dep.subsHead = nextSub; + } + if (dep.subs === link) { + dep.subs = prevSub; + if (!prevSub && dep.computed) { + dep.computed.flags &= ~4; + for (let l = dep.computed.deps; l; l = l.nextDep) { + removeSub(l, true); + } + } + } + if (!soft && !--dep.sc && dep.map) { + dep.map.delete(dep.key); + } +} +function removeDep(link) { + const { prevDep, nextDep } = link; + if (prevDep) { + prevDep.nextDep = nextDep; + link.prevDep = void 0; + } + if (nextDep) { + nextDep.prevDep = prevDep; + link.nextDep = void 0; + } +} +let shouldTrack = true; +const trackStack = []; +function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; +} +function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; +} +function cleanupEffect(e) { + const { cleanup } = e; + e.cleanup = void 0; + if (cleanup) { + const prevSub = activeSub; + activeSub = void 0; + try { + cleanup(); + } finally { + activeSub = prevSub; + } + } +} + +let globalVersion = 0; +class Link { + constructor(sub, dep) { + this.sub = sub; + this.dep = dep; + this.version = dep.version; + this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; + } +} +class Dep { + constructor(computed) { + this.computed = computed; + this.version = 0; + /** + * Link between this dep and the current active effect + */ + this.activeLink = void 0; + /** + * Doubly linked list representing the subscribing effects (tail) + */ + this.subs = void 0; + /** + * For object property deps cleanup + */ + this.map = void 0; + this.key = void 0; + /** + * Subscriber counter + */ + this.sc = 0; + { + this.subsHead = void 0; + } + } + track(debugInfo) { + if (!activeSub || !shouldTrack || activeSub === this.computed) { + return; + } + let link = this.activeLink; + if (link === void 0 || link.sub !== activeSub) { + link = this.activeLink = new Link(activeSub, this); + if (!activeSub.deps) { + activeSub.deps = activeSub.depsTail = link; + } else { + link.prevDep = activeSub.depsTail; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + } + addSub(link); + } else if (link.version === -1) { + link.version = this.version; + if (link.nextDep) { + const next = link.nextDep; + next.prevDep = link.prevDep; + if (link.prevDep) { + link.prevDep.nextDep = next; + } + link.prevDep = activeSub.depsTail; + link.nextDep = void 0; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + if (activeSub.deps === link) { + activeSub.deps = next; + } + } + } + if (activeSub.onTrack) { + activeSub.onTrack( + extend( + { + effect: activeSub + }, + debugInfo + ) + ); + } + return link; + } + trigger(debugInfo) { + this.version++; + globalVersion++; + this.notify(debugInfo); + } + notify(debugInfo) { + startBatch(); + try { + if (true) { + for (let head = this.subsHead; head; head = head.nextSub) { + if (head.sub.onTrigger && !(head.sub.flags & 8)) { + head.sub.onTrigger( + extend( + { + effect: head.sub + }, + debugInfo + ) + ); + } + } + } + for (let link = this.subs; link; link = link.prevSub) { + if (link.sub.notify()) { + ; + link.sub.dep.notify(); + } + } + } finally { + endBatch(); + } + } +} +function addSub(link) { + link.dep.sc++; + if (link.sub.flags & 4) { + const computed = link.dep.computed; + if (computed && !link.dep.subs) { + computed.flags |= 4 | 16; + for (let l = computed.deps; l; l = l.nextDep) { + addSub(l); + } + } + const currentTail = link.dep.subs; + if (currentTail !== link) { + link.prevSub = currentTail; + if (currentTail) currentTail.nextSub = link; + } + if (link.dep.subsHead === void 0) { + link.dep.subsHead = link; + } + link.dep.subs = link; + } +} +const targetMap = /* @__PURE__ */ new WeakMap(); +const ITERATE_KEY = Symbol( + "Object iterate" +); +const MAP_KEY_ITERATE_KEY = Symbol( + "Map keys iterate" +); +const ARRAY_ITERATE_KEY = Symbol( + "Array iterate" +); +function track(target, type, key) { + if (shouldTrack && activeSub) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = new Dep()); + dep.map = depsMap; + dep.key = key; + } + { + dep.track({ + target, + type, + key + }); + } + } +} +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + globalVersion++; + return; + } + const run = (dep) => { + if (dep) { + { + dep.trigger({ + target, + type, + key, + newValue, + oldValue, + oldTarget + }); + } + } + }; + startBatch(); + if (type === "clear") { + depsMap.forEach(run); + } else { + const targetIsArray = isArray(target); + const isArrayIndex = targetIsArray && isIntegerKey(key); + if (targetIsArray && key === "length") { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { + run(dep); + } + }); + } else { + if (key !== void 0 || depsMap.has(void 0)) { + run(depsMap.get(key)); + } + if (isArrayIndex) { + run(depsMap.get(ARRAY_ITERATE_KEY)); + } + switch (type) { + case "add": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isArrayIndex) { + run(depsMap.get("length")); + } + break; + case "delete": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + run(depsMap.get(ITERATE_KEY)); + } + break; + } + } + } + endBatch(); +} + +function reactiveReadArray(array) { + const raw = toRaw(array); + if (raw === array) return raw; + track(raw, "iterate", ARRAY_ITERATE_KEY); + return isShallow(array) ? raw : raw.map(toReactive); +} +function shallowReadArray(arr) { + track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); + return arr; +} +const arrayInstrumentations = { + __proto__: null, + [Symbol.iterator]() { + return iterator(this, Symbol.iterator, toReactive); + }, + concat(...args) { + return reactiveReadArray(this).concat( + ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) + ); + }, + entries() { + return iterator(this, "entries", (value) => { + value[1] = toReactive(value[1]); + return value; + }); + }, + every(fn, thisArg) { + return apply(this, "every", fn, thisArg, void 0, arguments); + }, + filter(fn, thisArg) { + return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); + }, + find(fn, thisArg) { + return apply(this, "find", fn, thisArg, toReactive, arguments); + }, + findIndex(fn, thisArg) { + return apply(this, "findIndex", fn, thisArg, void 0, arguments); + }, + findLast(fn, thisArg) { + return apply(this, "findLast", fn, thisArg, toReactive, arguments); + }, + findLastIndex(fn, thisArg) { + return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); + }, + // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement + forEach(fn, thisArg) { + return apply(this, "forEach", fn, thisArg, void 0, arguments); + }, + includes(...args) { + return searchProxy(this, "includes", args); + }, + indexOf(...args) { + return searchProxy(this, "indexOf", args); + }, + join(separator) { + return reactiveReadArray(this).join(separator); + }, + // keys() iterator only reads `length`, no optimisation required + lastIndexOf(...args) { + return searchProxy(this, "lastIndexOf", args); + }, + map(fn, thisArg) { + return apply(this, "map", fn, thisArg, void 0, arguments); + }, + pop() { + return noTracking(this, "pop"); + }, + push(...args) { + return noTracking(this, "push", args); + }, + reduce(fn, ...args) { + return reduce(this, "reduce", fn, args); + }, + reduceRight(fn, ...args) { + return reduce(this, "reduceRight", fn, args); + }, + shift() { + return noTracking(this, "shift"); + }, + // slice could use ARRAY_ITERATE but also seems to beg for range tracking + some(fn, thisArg) { + return apply(this, "some", fn, thisArg, void 0, arguments); + }, + splice(...args) { + return noTracking(this, "splice", args); + }, + toReversed() { + return reactiveReadArray(this).toReversed(); + }, + toSorted(comparer) { + return reactiveReadArray(this).toSorted(comparer); + }, + toSpliced(...args) { + return reactiveReadArray(this).toSpliced(...args); + }, + unshift(...args) { + return noTracking(this, "unshift", args); + }, + values() { + return iterator(this, "values", toReactive); + } +}; +function iterator(self, method, wrapValue) { + const arr = shallowReadArray(self); + const iter = arr[method](); + if (arr !== self && !isShallow(self)) { + iter._next = iter.next; + iter.next = () => { + const result = iter._next(); + if (result.value) { + result.value = wrapValue(result.value); + } + return result; + }; + } + return iter; +} +const arrayProto = Array.prototype; +function apply(self, method, fn, thisArg, wrappedRetFn, args) { + const arr = shallowReadArray(self); + const needsWrap = arr !== self && !isShallow(self); + const methodFn = arr[method]; + if (methodFn !== arrayProto[method]) { + const result2 = methodFn.apply(self, args); + return needsWrap ? toReactive(result2) : result2; + } + let wrappedFn = fn; + if (arr !== self) { + if (needsWrap) { + wrappedFn = function(item, index) { + return fn.call(this, toReactive(item), index, self); + }; + } else if (fn.length > 2) { + wrappedFn = function(item, index) { + return fn.call(this, item, index, self); + }; + } + } + const result = methodFn.call(arr, wrappedFn, thisArg); + return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; +} +function reduce(self, method, fn, args) { + const arr = shallowReadArray(self); + let wrappedFn = fn; + if (arr !== self) { + if (!isShallow(self)) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, toReactive(item), index, self); + }; + } else if (fn.length > 3) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, item, index, self); + }; + } + } + return arr[method](wrappedFn, ...args); +} +function searchProxy(self, method, args) { + const arr = toRaw(self); + track(arr, "iterate", ARRAY_ITERATE_KEY); + const res = arr[method](...args); + if ((res === -1 || res === false) && isProxy(args[0])) { + args[0] = toRaw(args[0]); + return arr[method](...args); + } + return res; +} +function noTracking(self, method, args = []) { + pauseTracking(); + startBatch(); + const res = toRaw(self)[method].apply(self, args); + endBatch(); + resetTracking(); + return res; +} + +const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); +const builtInSymbols = new Set( + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) +); +function hasOwnProperty(key) { + if (!isSymbol(key)) key = String(key); + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} +class BaseReactiveHandler { + constructor(_isReadonly = false, _isShallow = false) { + this._isReadonly = _isReadonly; + this._isShallow = _isShallow; + } + get(target, key, receiver) { + if (key === "__v_skip") return target["__v_skip"]; + const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return isShallow2; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the receiver is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + let fn; + if (targetIsArray && (fn = arrayInstrumentations[key])) { + return fn; + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get( + target, + key, + // if this is a proxy wrapping a ref, return methods using the raw ref + // as receiver so that we don't have to call `toRaw` on the ref in all + // its class methods + isRef(target) ? target : receiver + ); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (isShallow2) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } +} +class MutableReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(false, isShallow2); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._isShallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set( + target, + key, + value, + isRef(target) ? target : receiver + ); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { + const hadKey = hasOwn(target, key); + const oldValue = target[key]; + const result = Reflect.deleteProperty(target, key); + if (result && hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + } + has(target, key) { + const result = Reflect.has(target, key); + if (!isSymbol(key) || !builtInSymbols.has(key)) { + track(target, "has", key); + } + return result; + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); + return Reflect.ownKeys(target); + } +} +class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(true, isShallow2); + } + set(target, key) { + { + warn$2( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + deleteProperty(target, key) { + { + warn$2( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } +} +const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); +const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); +const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); +const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); + +const toShallow = (value) => value; +const getProto = (v) => Reflect.getPrototypeOf(v); +function createIterableMethod(method, isReadonly2, isShallow2) { + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done + }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } + }; + }; +} +function createReadonlyMethod(type) { + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + warn$2( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; +} +function createInstrumentations(readonly, shallow) { + const instrumentations = { + get(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); + } + track(rawTarget, "get", rawKey); + } + const { has } = getProto(rawTarget); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + if (has.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } + }, + get size() { + const target = this["__v_raw"]; + !readonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); + }, + has(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); + } + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); + }, + forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + !readonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + } + }; + extend( + instrumentations, + readonly ? { + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear") + } : { + add(value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; + }, + set(key, value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; + }, + delete(key) { + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get ? get.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + }, + clear() { + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger( + target, + "clear", + void 0, + void 0, + oldTarget + ); + } + return result; + } + } + ); + const iteratorMethods = [ + "keys", + "values", + "entries", + Symbol.iterator + ]; + iteratorMethods.forEach((method) => { + instrumentations[method] = createIterableMethod(method, readonly, shallow); + }); + return instrumentations; +} +function createInstrumentationGetter(isReadonly2, shallow) { + const instrumentations = createInstrumentations(isReadonly2, shallow); + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; +} +const mutableCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, false) +}; +const shallowCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, true) +}; +const readonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, false) +}; +const shallowReadonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, true) +}; +function checkIdentityKeys(target, has, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has.call(target, rawKey)) { + const type = toRawType(target); + warn$2( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } +} + +const reactiveMap = /* @__PURE__ */ new WeakMap(); +const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); +const readonlyMap = /* @__PURE__ */ new WeakMap(); +const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); +function targetTypeMap(rawType) { + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } +} +function getTargetType(value) { + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); +} +function reactive(target) { + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); +} +function shallowReactive(target) { + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); +} +function readonly(target) { + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); +} +function shallowReadonly(target) { + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); +} +function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + { + warn$2( + `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( + target + )}` + ); + } + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; +} +function isReactive(value) { + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); +} +function isReadonly(value) { + return !!(value && value["__v_isReadonly"]); +} +function isShallow(value) { + return !!(value && value["__v_isShallow"]); +} +function isProxy(value) { + return value ? !!value["__v_raw"] : false; +} +function toRaw(observed) { + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; +} +function markRaw(value) { + if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { + def(value, "__v_skip", true); + } + return value; +} +const toReactive = (value) => isObject(value) ? reactive(value) : value; +const toReadonly = (value) => isObject(value) ? readonly(value) : value; + +function isRef(r) { + return r ? r["__v_isRef"] === true : false; +} +function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +} +const shallowUnwrapHandlers = { + get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } +}; +function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); +} + +class ComputedRefImpl { + constructor(fn, setter, isSSR) { + this.fn = fn; + this.setter = setter; + /** + * @internal + */ + this._value = void 0; + /** + * @internal + */ + this.dep = new Dep(this); + /** + * @internal + */ + this.__v_isRef = true; + // TODO isolatedDeclarations "__v_isReadonly" + // A computed is also a subscriber that tracks other deps + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 16; + /** + * @internal + */ + this.globalVersion = globalVersion - 1; + /** + * @internal + */ + this.next = void 0; + // for backwards compat + this.effect = this; + this["__v_isReadonly"] = !setter; + this.isSSR = isSSR; + } + /** + * @internal + */ + notify() { + this.flags |= 16; + if (!(this.flags & 8) && // avoid infinite self recursion + activeSub !== this) { + batch(this, true); + return true; + } + } + get value() { + const link = this.dep.track({ + target: this, + type: "get", + key: "value" + }) ; + refreshComputed(this); + if (link) { + link.version = this.dep.version; + } + return this._value; + } + set value(newValue) { + if (this.setter) { + this.setter(newValue); + } else { + warn$2("Write operation failed: computed value is readonly"); + } + } +} +function computed$1(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + if (isFunction(getterOrOptions)) { + getter = getterOrOptions; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, isSSR); + return cRef; +} + +const INITIAL_WATCHER_VALUE = {}; +const cleanupMap = /* @__PURE__ */ new WeakMap(); +let activeWatcher = void 0; +function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { + if (owner) { + let cleanups = cleanupMap.get(owner); + if (!cleanups) cleanupMap.set(owner, cleanups = []); + cleanups.push(cleanupFn); + } else if (!failSilently) { + warn$2( + `onWatcherCleanup() was called when there was no active watcher to associate with.` + ); + } +} +function watch$1(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, once, scheduler, augmentJob, call } = options; + const warnInvalidSource = (s) => { + (options.onWarn || warn$2)( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const reactiveGetter = (source2) => { + if (deep) return source2; + if (isShallow(source2) || deep === false || deep === 0) + return traverse(source2, 1); + return traverse(source2); + }; + let effect; + let getter; + let cleanup; + let boundCleanup; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return call ? call(s, 2) : s(); + } else { + warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { + if (cb) { + getter = call ? () => call(source, 2) : source; + } else { + getter = () => { + if (cleanup) { + pauseTracking(); + try { + cleanup(); + } finally { + resetTracking(); + } + } + const currentEffect = activeWatcher; + activeWatcher = effect; + try { + return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); + } finally { + activeWatcher = currentEffect; + } + }; + } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + const depth = deep === true ? Infinity : deep; + getter = () => traverse(baseGetter(), depth); + } + const scope = getCurrentScope(); + const watchHandle = () => { + effect.stop(); + if (scope && scope.active) { + remove(scope.effects, effect); + } + }; + if (once && cb) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + watchHandle(); + }; + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = (immediateFirstRun) => { + if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { + if (cleanup) { + cleanup(); + } + const currentWatcher = activeWatcher; + activeWatcher = effect; + try { + const args = [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + boundCleanup + ]; + call ? call(cb, 3, args) : ( + // @ts-expect-error + cb(...args) + ); + oldValue = newValue; + } finally { + activeWatcher = currentWatcher; + } + } + } else { + effect.run(); + } + }; + if (augmentJob) { + augmentJob(job); + } + effect = new ReactiveEffect(getter); + effect.scheduler = scheduler ? () => scheduler(job, false) : job; + boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); + cleanup = effect.onStop = () => { + const cleanups = cleanupMap.get(effect); + if (cleanups) { + if (call) { + call(cleanups, 4); + } else { + for (const cleanup2 of cleanups) cleanup2(); + } + cleanupMap.delete(effect); + } + }; + { + effect.onTrack = options.onTrack; + effect.onTrigger = options.onTrigger; + } + if (cb) { + if (immediate) { + job(true); + } else { + oldValue = effect.run(); + } + } else if (scheduler) { + scheduler(job.bind(null, true), true); + } else { + effect.run(); + } + watchHandle.pause = effect.pause.bind(effect); + watchHandle.resume = effect.resume.bind(effect); + watchHandle.stop = watchHandle; + return watchHandle; +} +function traverse(value, depth = Infinity, seen) { + if (depth <= 0 || !isObject(value) || value["__v_skip"]) { + return value; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + depth--; + if (isRef(value)) { + traverse(value.value, depth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, seen); + } + for (const key of Object.getOwnPropertySymbols(value)) { + if (Object.prototype.propertyIsEnumerable.call(value, key)) { + traverse(value[key], depth, seen); + } + } + } + return value; +} + +const stack = []; +function pushWarningContext$1(vnode) { + stack.push(vnode); +} +function popWarningContext$1() { + stack.pop(); +} +let isWarning = false; +function warn$1(msg, ...args) { + if (isWarning) return; + isWarning = true; + pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + // eslint-disable-next-line no-restricted-syntax + msg + args.map((a) => { + var _a, _b; + return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); + }).join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); + } + console.warn(...warnArgs); + } + resetTracking(); + isWarning = false; +} +function getComponentTrace() { + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); + } + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; +} +function formatTrace(trace) { + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; +} +function formatTraceEntry({ vnode, recurseCount }) { + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; +} +function formatProps(props) { + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; +} +function formatProp(key, value, raw) { + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } +} + +const ErrorTypeStrings = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush", + [15]: "component update", + [16]: "app unmount cleanup function" +}; +function callWithErrorHandling(fn, instance, type, args) { + try { + return args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } +} +function callWithAsyncErrorHandling(fn, instance, type, args) { + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); + } + return res; + } + if (isArray(fn)) { + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; + } else { + warn$1( + `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` + ); + } +} +function handleError(err, instance, type, throwInDev = true) { + const contextVNode = instance ? instance.vnode : null; + const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = ErrorTypeStrings[type] ; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + return; + } + } + } + cur = cur.parent; + } + if (errorHandler) { + pauseTracking(); + callWithErrorHandling(errorHandler, null, 10, [ + err, + exposedInstance, + errorInfo + ]); + resetTracking(); + return; + } + } + logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); +} +function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { + { + const info = ErrorTypeStrings[type]; + if (contextVNode) { + pushWarningContext$1(contextVNode); + } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext$1(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } +} + +const queue = []; +let flushIndex = -1; +const pendingPostFlushCbs = []; +let activePostFlushCbs = null; +let postFlushIndex = 0; +const resolvedPromise = /* @__PURE__ */ Promise.resolve(); +let currentFlushPromise = null; +const RECURSION_LIMIT = 100; +function nextTick(fn) { + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; +} +function findInsertionIndex(id) { + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { + start = middle + 1; + } else { + end = middle; + } + } + return start; +} +function queueJob(job) { + if (!(job.flags & 1)) { + const jobId = getId(job); + const lastJob = queue[queue.length - 1]; + if (!lastJob || // fast path when the job id is larger than the tail + !(job.flags & 2) && jobId >= getId(lastJob)) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(jobId), 0, job); + } + job.flags |= 1; + queueFlush(); + } +} +function queueFlush() { + if (!currentFlushPromise) { + currentFlushPromise = resolvedPromise.then(flushJobs); + } +} +function queuePostFlushCb(cb) { + if (!isArray(cb)) { + if (activePostFlushCbs && cb.id === -1) { + activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); + } else if (!(cb.flags & 1)) { + pendingPostFlushCbs.push(cb); + cb.flags |= 1; + } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); +} +function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.flags & 2) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + if (cb.flags & 4) { + cb.flags &= ~1; + } + cb(); + if (!(cb.flags & 4)) { + cb.flags &= ~1; + } + } + } +} +function flushPostFlushCbs(seen) { + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; + } + activePostFlushCbs = deduped; + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + const cb = activePostFlushCbs[postFlushIndex]; + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + if (cb.flags & 4) { + cb.flags &= ~1; + } + if (!(cb.flags & 8)) cb(); + cb.flags &= ~1; + } + activePostFlushCbs = null; + postFlushIndex = 0; + } +} +const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; +function flushJobs(seen) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + const check = (job) => checkRecursiveUpdates(seen, job) ; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && !(job.flags & 8)) { + if (check(job)) { + continue; + } + if (job.flags & 4) { + job.flags &= ~1; + } + callWithErrorHandling( + job, + job.i, + job.i ? 15 : 14 + ); + if (!(job.flags & 4)) { + job.flags &= ~1; + } + } + } + } finally { + for (; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job) { + job.flags &= ~1; + } + } + flushIndex = -1; + queue.length = 0; + flushPostFlushCbs(seen); + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); + } + } +} +function checkRecursiveUpdates(seen, fn) { + const count = seen.get(fn) || 0; + if (count > RECURSION_LIMIT) { + const instance = fn.i; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } + seen.set(fn, count + 1); + return false; +} + +let isHmrUpdating = false; +const hmrDirtyComponents = /* @__PURE__ */ new Map(); +{ + getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; +} +const map = /* @__PURE__ */ new Map(); +function registerHMR(instance) { + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); +} +function unregisterHMR(instance) { + map.get(instance.type.__hmrId).instances.delete(instance); +} +function createRecord(id, initialDef) { + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; +} +function normalizeClassComponent(component) { + return isClassComponent(component) ? component.__vccOpts : component; +} +function rerender(id, newRender) { + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; + } + instance.renderCache = []; + isHmrUpdating = true; + instance.update(); + isHmrUpdating = false; + }); +} +function reload(id, newComp) { + const record = map.get(id); + if (!record) return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (let i = 0; i < instances.length; i++) { + const instance = instances[i]; + const oldComp = normalizeClassComponent(instance.type); + let dirtyInstances = hmrDirtyComponents.get(oldComp); + if (!dirtyInstances) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set()); + } + dirtyInstances.add(instance); + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + dirtyInstances.add(instance); + instance.ceReload(newComp.styles); + dirtyInstances.delete(instance); + } else if (instance.parent) { + queueJob(() => { + isHmrUpdating = true; + instance.parent.update(); + isHmrUpdating = false; + dirtyInstances.delete(instance); + }); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + if (instance.root.ce && instance !== instance.root) { + instance.root.ce._removeChildStyle(oldComp); + } + } + queuePostFlushCb(() => { + hmrDirtyComponents.clear(); + }); +} +function updateComponentDef(oldComp, newComp) { + extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; + } + } +} +function tryWrap(fn) { + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; +} + +let devtools; +let buffer = []; +let devtoolsNotInstalled = false; +function emit$1(event, ...args) { + if (devtools) { + devtools.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } +} +function setDevtoolsHook(hook, target) { + var _a, _b; + devtools = hook; + if (devtools) { + devtools.enabled = true; + buffer.forEach(({ event, args }) => devtools.emit(event, ...args)); + buffer = []; + } else if ( + // handle late devtools injection - only do this if we are in an actual + // browser environment to avoid the timer handle stalling test runner exit + // (#4815) + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + // eslint-disable-next-line no-restricted-syntax + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook(newHook, target); + }); + setTimeout(() => { + if (!devtools) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; + devtoolsNotInstalled = true; + buffer = []; + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } +} +function devtoolsInitApp(app, version) { + emit$1("app:init" /* APP_INIT */, app, version, { + Fragment, + Text, + Comment, + Static + }); +} +function devtoolsUnmountApp(app) { + emit$1("app:unmount" /* APP_UNMOUNT */, app); +} +const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); +const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); +const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( + "component:removed" /* COMPONENT_REMOVED */ +); +const devtoolsComponentRemoved = (component) => { + if (devtools && typeof devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } +}; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function createDevtoolsComponentHook(hook) { + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; +} +const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); +const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); +function createDevtoolsPerformanceHook(hook) { + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; +} +function devtoolsComponentEmit(component, event, params) { + emit$1( + "component:emit" /* COMPONENT_EMIT */, + component.appContext.app, + component, + event, + params + ); +} + +let currentRenderingInstance = null; +let currentScopeId = null; +function setCurrentRenderingInstance$1(instance) { + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; +} +function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); + } + const prevInstance = setCurrentRenderingInstance$1(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance$1(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; +} + +function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } +} +function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); + } + } +} + +const TeleportEndKey = Symbol("_vte"); +const isTeleport = (type) => type.__isTeleport; + +function setTransitionHooks(vnode, hooks) { + if (vnode.shapeFlag & 6 && vnode.component) { + vnode.transition = hooks; + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } +} + +function markAsyncBoundary(instance) { + instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; +} + +const knownTemplateRefs = /* @__PURE__ */ new WeakSet(); + +function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { + if (isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) { + setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree); + } + return; + } + const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + const rawSetupState = toRaw(setupState); + const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => { + { + if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) { + warn$1( + `Template ref "${key}" used on a non-ref value. It will not work in the production build.` + ); + } + if (knownTemplateRefs.has(rawSetupState[key])) { + return false; + } + } + return hasOwn(rawSetupState, key); + }; + if (oldRef != null && oldRef !== ref) { + if (isString(oldRef)) { + refs[oldRef] = null; + if (canSetSetupRef(oldRef)) { + setupState[oldRef] = null; + } + } else if (isRef(oldRef)) { + oldRef.value = null; + } + } + if (isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = isString(ref); + const _isRef = isRef(ref); + if (_isString || _isRef) { + const doSet = () => { + if (rawRef.f) { + const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + isArray(existing) && remove(existing, refValue); + } else { + if (!isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (canSetSetupRef(ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); + } + } + } else if (_isString) { + refs[ref] = value; + if (canSetSetupRef(ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) refs[rawRef.k] = value; + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + }; + if (value) { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } else { + doSet(); + } + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + } +} + +const isAsyncWrapper = (i) => !!i.type.__asyncLoader; + +const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; +function onActivated(hook, target) { + registerKeepAliveHook(hook, "a", target); +} +function onDeactivated(hook, target) { + registerKeepAliveHook(hook, "da", target); +} +function registerKeepAliveHook(hook, type, target = currentInstance) { + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; + } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } +} +function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + remove(keepAliveRoot[type], injected); + }, target); +} + +function injectHook(type, hook, target = currentInstance, prepend = false) { + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); + } + return wrappedHook; + } else { + const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) + ); + } +} +const createHook = (lifecycle) => (hook, target = currentInstance) => { + if (!isInSSRComponentSetup || lifecycle === "sp") { + injectHook(lifecycle, (...args) => hook(...args), target); + } +}; +const onBeforeMount = createHook("bm"); +const onMounted = createHook("m"); +const onBeforeUpdate = createHook( + "bu" +); +const onUpdated = createHook("u"); +const onBeforeUnmount = createHook( + "bum" +); +const onUnmounted = createHook("um"); +const onServerPrefetch = createHook( + "sp" +); +const onRenderTriggered = createHook("rtg"); +const onRenderTracked = createHook("rtc"); +function onErrorCaptured(hook, target = currentInstance) { + injectHook("ec", hook, target); +} + +const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); + +function ensureValidVNode$1(vnodes) { + return vnodes.some((child) => { + if (!isVNode$2(child)) return true; + if (child.type === Comment) return false; + if (child.type === Fragment && !ensureValidVNode$1(child.children)) + return false; + return true; + }) ? vnodes : null; +} + +const getPublicInstance = (i) => { + if (!i) return null; + if (isStatefulComponent(i)) return getComponentPublicInstance(i); + return getPublicInstance(i.parent); +}; +const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => shallowReadonly(i.props) , + $attrs: (i) => shallowReadonly(i.attrs) , + $slots: (i) => shallowReadonly(i.slots) , + $refs: (i) => shallowReadonly(i.refs) , + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $host: (i) => i.ce, + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i) , + $forceUpdate: (i) => i.f || (i.f = () => { + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) +); +const isReservedPrefix = (key) => key === "_" || key === "$"; +const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); +const PublicInstanceProxyHandlers = { + get({ _: instance }, key) { + if (key === "__v_skip") { + return true; + } + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (key === "__isVue") { + return true; + } + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance.attrs, "get", ""); + markAttrsAccessed(); + } else if (key === "$slots") { + track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); + return false; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + data[key] = value; + return true; + } else if (hasOwn(instance.props, key)) { + warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + warn$1( + `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` + ); + return false; + } else { + if (key in instance.appContext.config.globalProperties) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + value + }); + } else { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } +}; +{ + PublicInstanceProxyHandlers.ownKeys = (target) => { + warn$1( + `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` + ); + return Reflect.ownKeys(target); + }; +} +function createDevRenderContext(instance) { + const target = {}; + Object.defineProperty(target, `_`, { + configurable: true, + enumerable: false, + get: () => instance + }); + Object.keys(publicPropertiesMap).forEach((key) => { + Object.defineProperty(target, key, { + configurable: true, + enumerable: false, + get: () => publicPropertiesMap[key](instance), + // intercepted by the proxy so no need for implementation, + // but needed to prevent set errors + set: NOOP + }); + }); + return target; +} +function exposePropsOnRenderContext(instance) { + const { + ctx, + propsOptions: [propsOptions] + } = instance; + if (propsOptions) { + Object.keys(propsOptions).forEach((key) => { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => instance.props[key], + set: NOOP + }); + }); + } +} +function exposeSetupStateOnRenderContext(instance) { + const { ctx, setupState } = instance; + Object.keys(toRaw(setupState)).forEach((key) => { + if (!setupState.__isScriptSetup) { + if (isReservedPrefix(key[0])) { + warn$1( + `setup() return property ${JSON.stringify( + key + )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` + ); + return; + } + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => setupState[key], + set: NOOP + }); + } + }); +} + +function normalizePropsOrEmits(props) { + return isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; +} + +function createDuplicateChecker() { + const cache = /* @__PURE__ */ Object.create(null); + return (type, key) => { + if (cache[key]) { + warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); + } else { + cache[key] = type; + } + }; +} +let shouldCacheAccess = true; +function applyOptions(instance) { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook(options.beforeCreate, instance, "bc"); + } + const { + // state + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, + // lifecycle + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, + // public API + expose, + inheritAttrs, + // assets + components, + directives, + filters + } = options; + const checkDuplicateProperties = createDuplicateChecker() ; + { + const [propsOptions] = instance.propsOptions; + if (propsOptions) { + for (const key in propsOptions) { + checkDuplicateProperties("Props" /* PROPS */, key); + } + } + } + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (isFunction(methodHandler)) { + { + Object.defineProperty(ctx, key, { + value: methodHandler.bind(publicThis), + configurable: true, + enumerable: true, + writable: true + }); + } + { + checkDuplicateProperties("Methods" /* METHODS */, key); + } + } else { + warn$1( + `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` + ); + } + } + } + if (dataOptions) { + if (!isFunction(dataOptions)) { + warn$1( + `The data option must be a function. Plain object usage is no longer supported.` + ); + } + const data = dataOptions.call(publicThis, publicThis); + if (isPromise(data)) { + warn$1( + `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` + ); + } + if (!isObject(data)) { + warn$1(`data() should return an object.`); + } else { + instance.data = reactive(data); + { + for (const key in data) { + checkDuplicateProperties("Data" /* DATA */, key); + if (!isReservedPrefix(key[0])) { + Object.defineProperty(ctx, key, { + configurable: true, + enumerable: true, + get: () => data[key], + set: NOOP + }); + } + } + } + } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + if (get === NOOP) { + warn$1(`Computed property "${key}" has no getter.`); + } + const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => { + warn$1( + `Write operation failed: computed property "${key}" is readonly.` + ); + } ; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + { + checkDuplicateProperties("Computed" /* COMPUTED */, key); + } + } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val + }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; + } + } + if (render && instance.render === NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) instance.components = components; + if (directives) instance.directives = directives; + if (serverPrefetch) { + markAsyncBoundary(instance); + } +} +function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { + if (isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); + } + if (isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; + } + { + checkDuplicateProperties("Inject" /* INJECT */, key); + } + } +} +function callHook(hook, instance, type) { + callWithAsyncErrorHandling( + isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); +} +function createWatcher(raw, ctx, publicThis, key) { + let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (isString(raw)) { + const handler = ctx[raw]; + if (isFunction(handler)) { + { + watch(getter, handler); + } + } else { + warn$1(`Invalid watch handler specified by key "${raw}"`, handler); + } + } else if (isFunction(raw)) { + { + watch(getter, raw.bind(publicThis)); + } + } else if (isObject(raw)) { + if (isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (isFunction(handler)) { + watch(getter, handler, raw); + } else { + warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); + } + } + } else { + warn$1(`Invalid watch option: "${key}"`, raw); + } +} +function resolveMergedOptions(instance) { + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; + } + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); + } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (isObject(base)) { + cache.set(base, resolved); + } + return resolved; +} +function mergeOptions(to, from, strats, asMixin = false) { + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") { + warn$1( + `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` + ); + } else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; + } + } + return to; +} +const internalOptionMergeStrats = { + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray, + created: mergeAsArray, + beforeMount: mergeAsArray, + mounted: mergeAsArray, + beforeUpdate: mergeAsArray, + updated: mergeAsArray, + beforeDestroy: mergeAsArray, + beforeUnmount: mergeAsArray, + destroyed: mergeAsArray, + unmounted: mergeAsArray, + activated: mergeAsArray, + deactivated: mergeAsArray, + errorCaptured: mergeAsArray, + serverPrefetch: mergeAsArray, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject +}; +function mergeDataFn(to, from) { + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (extend)( + isFunction(to) ? to.call(this, this) : to, + isFunction(from) ? from.call(this, this) : from + ); + }; +} +function mergeInject(to, from) { + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); +} +function normalizeInject(raw) { + if (isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; + } + return res; + } + return raw; +} +function mergeAsArray(to, from) { + return to ? [...new Set([].concat(to, from))] : from; +} +function mergeObjectOptions(to, from) { + return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; +} +function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (isArray(to) && isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } +} +function mergeWatchOptions(to, from) { + if (!to) return from; + if (!from) return to; + const merged = extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray(to[key], from[key]); + } + return merged; +} + +function createAppContext() { + return { + app: null, + config: { + isNativeTag: NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; +} +let uid$1 = 0; +function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!isFunction(rootComponent)) { + rootComponent = extend({}, rootComponent); + } + if (rootProps != null && !isObject(rootProps)) { + warn$1(`root props passed to app.mount() must be an object.`); + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + const pluginCleanupFns = []; + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + { + warn$1( + `app.config cannot be replaced. Modify individual options instead.` + ); + } + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) { + warn$1(`Plugin has already been applied to target app.`); + } else if (plugin && isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else { + warn$1( + `A plugin must either be a function or an object with an "install" function.` + ); + } + return app; + }, + mixin(mixin) { + { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } else { + warn$1( + "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") + ); + } + } + return app; + }, + component(name, component) { + { + validateComponentName(name, context.config); + } + if (!component) { + return context.components[name]; + } + if (context.components[name]) { + warn$1(`Component "${name}" has already been registered in target app.`); + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + { + validateDirectiveName(name); + } + if (!directive) { + return context.directives[name]; + } + if (context.directives[name]) { + warn$1(`Directive "${name}" has already been registered in target app.`); + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + if (rootContainer.__vue_app__) { + warn$1( + `There is already an app instance mounted on the host container. + If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` + ); + } + const vnode = app._ceVNode || createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + { + context.reload = () => { + render( + cloneVNode(vnode), + rootContainer, + namespace + ); + }; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + { + app._instance = vnode.component; + devtoolsInitApp(app, version); + } + return getComponentPublicInstance(vnode.component); + } else { + warn$1( + `App has already been mounted. +If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` + ); + } + }, + onUnmount(cleanupFn) { + if (typeof cleanupFn !== "function") { + warn$1( + `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}` + ); + } + pluginCleanupFns.push(cleanupFn); + }, + unmount() { + if (isMounted) { + callWithAsyncErrorHandling( + pluginCleanupFns, + app._instance, + 16 + ); + render(null, app._container); + { + app._instance = null; + devtoolsUnmountApp(app); + } + delete app._container.__vue_app__; + } else { + warn$1(`Cannot unmount an app that is not mounted.`); + } + }, + provide(key, value) { + if (key in context.provides) { + warn$1( + `App already provides property with key "${String(key)}". It will be overwritten with the new value.` + ); + } + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + const lastApp = currentApp; + currentApp = app; + try { + return fn(); + } finally { + currentApp = lastApp; + } + } + }; + return app; + }; +} +let currentApp = null; + +function provide(key, value) { + if (!currentInstance) { + { + warn$1(`provide() can only be used inside setup().`); + } + } else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); + } + provides[key] = value; + } +} +function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else { + warn$1(`injection "${String(key)}" not found.`); + } + } else { + warn$1(`inject() can only be used inside setup() or functional components.`); + } +} + +const internalObjectProto = {}; +const createInternalObject = () => Object.create(internalObjectProto); +const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; + +function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = createInternalObject(); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + { + validateProps(rawProps || {}, props, instance); + } + if (isStateful) { + instance.props = isSSR ? props : shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; +} +function isInHmrContext(instance) { + while (instance) { + if (instance.type.__hmrId) return true; + instance = instance.parent; + } +} +function updateProps(instance, rawProps, rawPrevProps, optimized) { + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( + // always force full diff in dev + // - #1942 if hmr is enabled with sfc component + // - vite#872 non-sfc component used by sfc component + !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; + } + const value = rawProps[key]; + if (options) { + if (hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; + } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; + } + } + } + } + if (hasAttrsChanged) { + trigger(instance.attrs, "set", ""); + } + { + validateProps(rawProps || {}, props, instance); + } +} +function setFullProps(instance, rawProps, props, attrs) { + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && hasOwn(options, camelKey = camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; + } + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + if (needCastKeys) { + const rawCurrentProps = toRaw(props); + const castValues = rawCastValues || EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; +} +function resolvePropValue(options, props, key, value, instance, isAbsent) { + const opt = options[key]; + if (opt != null) { + const hasDefault = hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); + } + } else { + value = defaultValue; + } + if (instance.ce) { + instance.ce._setProp(key, value); + } + } + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { + value = true; + } + } + } + return value; +} +const mixinPropsCache = /* @__PURE__ */ new WeakMap(); +function normalizePropsOptions(comp, appContext, asMixin = false) { + const cache = asMixin ? mixinPropsCache : appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (!isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + extend(normalized, props); + if (keys) needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); + } + if (comp.extends) { + extendProps(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendProps); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, EMPTY_ARR); + } + return EMPTY_ARR; + } + if (isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + if (!isString(raw[i])) { + warn$1(`props must be strings when using array syntax.`, raw[i]); + } + const normalizedKey = camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = EMPTY_OBJ; + } + } + } else if (raw) { + if (!isObject(raw)) { + warn$1(`invalid props options`, raw); + } + for (const key in raw) { + const normalizedKey = camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); + const propType = prop.type; + let shouldCast = false; + let shouldCastTrue = true; + if (isArray(propType)) { + for (let index = 0; index < propType.length; ++index) { + const type = propType[index]; + const typeName = isFunction(type) && type.name; + if (typeName === "Boolean") { + shouldCast = true; + break; + } else if (typeName === "String") { + shouldCastTrue = false; + } + } + } else { + shouldCast = isFunction(propType) && propType.name === "Boolean"; + } + prop[0 /* shouldCast */] = shouldCast; + prop[1 /* shouldCastTrue */] = shouldCastTrue; + if (shouldCast || hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + const res = [normalized, needCastKeys]; + if (isObject(comp)) { + cache.set(comp, res); + } + return res; +} +function validatePropName(key) { + if (key[0] !== "$" && !isReservedProp(key)) { + return true; + } else { + warn$1(`Invalid prop name: "${key}" is a reserved property.`); + } + return false; +} +function getType(ctor) { + if (ctor === null) { + return "null"; + } + if (typeof ctor === "function") { + return ctor.name || ""; + } else if (typeof ctor === "object") { + const name = ctor.constructor && ctor.constructor.name; + return name || ""; + } + return ""; +} +function validateProps(rawProps, props, instance) { + const resolvedValues = toRaw(props); + const options = instance.propsOptions[0]; + const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key)); + for (const key in options) { + let opt = options[key]; + if (opt == null) continue; + validateProp( + key, + resolvedValues[key], + opt, + shallowReadonly(resolvedValues) , + !camelizePropsKey.includes(key) + ); + } +} +function validateProp(name, value, prop, props, isAbsent) { + const { type, required, validator, skipCheck } = prop; + if (required && isAbsent) { + warn$1('Missing required prop: "' + name + '"'); + return; + } + if (value == null && !required) { + return; + } + if (type != null && type !== true && !skipCheck) { + let isValid = false; + const types = isArray(type) ? type : [type]; + const expectedTypes = []; + for (let i = 0; i < types.length && !isValid; i++) { + const { valid, expectedType } = assertType(value, types[i]); + expectedTypes.push(expectedType || ""); + isValid = valid; + } + if (!isValid) { + warn$1(getInvalidTypeMessage(name, value, expectedTypes)); + return; + } + } + if (validator && !validator(value, props)) { + warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + } +} +const isSimpleType = /* @__PURE__ */ makeMap( + "String,Number,Boolean,Function,Symbol,BigInt" +); +function assertType(value, type) { + let valid; + const expectedType = getType(type); + if (expectedType === "null") { + valid = value === null; + } else if (isSimpleType(expectedType)) { + const t = typeof value; + valid = t === expectedType.toLowerCase(); + if (!valid && t === "object") { + valid = value instanceof type; + } + } else if (expectedType === "Object") { + valid = isObject(value); + } else if (expectedType === "Array") { + valid = isArray(value); + } else { + valid = value instanceof type; + } + return { + valid, + expectedType + }; +} +function getInvalidTypeMessage(name, value, expectedTypes) { + if (expectedTypes.length === 0) { + return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; + } + let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; + const expectedType = expectedTypes[0]; + const receivedType = toRawType(value); + const expectedValue = styleValue(value, expectedType); + const receivedValue = styleValue(value, receivedType); + if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { + message += ` with value ${expectedValue}`; + } + message += `, got ${receivedType} `; + if (isExplicable(receivedType)) { + message += `with value ${receivedValue}.`; + } + return message; +} +function styleValue(value, type) { + if (type === "String") { + return `"${value}"`; + } else if (type === "Number") { + return `${Number(value)}`; + } else { + return `${value}`; + } +} +function isExplicable(type) { + const explicitTypes = ["string", "number", "boolean"]; + return explicitTypes.some((elem) => type.toLowerCase() === elem); +} +function isBoolean(...args) { + return args.some((elem) => elem.toLowerCase() === "boolean"); +} + +const isInternalKey = (key) => key[0] === "_" || key === "$stable"; +const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode$1) : [normalizeVNode$1(value)]; +const normalizeSlot = (key, rawSlot, ctx) => { + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { + warn$1( + `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` + ); + } + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; +}; +const normalizeObjectSlots = (rawSlots, slots, instance) => { + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) continue; + const value = rawSlots[key]; + if (isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + { + warn$1( + `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; + } + } +}; +const normalizeVNodeSlots = (instance, children) => { + if (!isKeepAlive(instance.vnode) && true) { + warn$1( + `Non-function value encountered for default slot. Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; +}; +const assignSlots = (slots, children, optimized) => { + for (const key in children) { + if (optimized || key !== "_") { + slots[key] = children[key]; + } + } +}; +const initSlots = (instance, children, optimized) => { + const slots = instance.slots = createInternalObject(); + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + assignSlots(slots, children, optimized); + if (optimized) { + def(slots, "_", type, true); + } + } else { + normalizeObjectSlots(children, slots); + } + } else if (children) { + normalizeVNodeSlots(instance, children); + } +}; +const updateSlots = (instance, children, optimized) => { + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (isHmrUpdating) { + assignSlots(slots, children, optimized); + trigger(instance, "set", "$slots"); + } else if (optimized && type === 1) { + needDeletionCheck = false; + } else { + assignSlots(slots, children, optimized); + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); + } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } + } + } +}; + +let supported; +let perf; +function startMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + perf.mark(`vue-${type}-${instance.uid}`); + } + { + devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); + } +} +function endMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + const startTag = `vue-${type}-${instance.uid}`; + const endTag = startTag + `:end`; + perf.mark(endTag); + perf.measure( + `<${formatComponentName(instance, instance.type)}> ${type}`, + startTag, + endTag + ); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + } + { + devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); + } +} +function isSupported() { + if (supported !== void 0) { + return supported; + } + if (typeof window !== "undefined" && window.performance) { + supported = true; + perf = window.performance; + } else { + supported = false; + } + return supported; +} + +const queuePostRenderEffect = queueEffectWithSuspense ; +function createRenderer(options) { + return baseCreateRenderer(options); +} +function baseCreateRenderer(options, createHydrationFns) { + const target = getGlobalThis(); + target.__VUE__ = true; + { + setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + } + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { + if (n1 === n2) { + return; + } + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: + if (n1 == null) { + mountStaticNode(n2, container, anchor, namespace); + } else { + patchStaticNode(n1, n2, container, namespace); + } + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else { + warn$1("Invalid VNode type:", type, `(${typeof type})`); + } + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const patchStaticNode = (n1, n2, container, namespace) => { + if (n2.children !== n1.children) { + const anchor = hostNextSibling(n1.anchor); + removeStaticNode(n1); + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace + ); + } else { + n2.el = n1.el; + n2.anchor = n1.anchor; + } + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !isReservedProp(key)) { + hostPatchProp(el, key, null, props[key], namespace, parentComponent); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + { + def(el, "__vnode", vnode, true); + def(el, "__vueParentComponent", parentComponent, true); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { + subTree = filterSingleRoot(subTree.children) || subTree; + } + if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode$1(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + { + el.__vnode = n2; + } + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || EMPTY_OBJ; + const newProps = n2.props || EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (isHmrUpdating) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { + hostSetElementText(el, ""); + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + } + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); + } + } + } else if (!optimized && dynamicChildren == null) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== EMPTY_OBJ) { + for (const key in oldProps) { + if (!isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + parentComponent + ); + } + } + } + for (const key in newProps) { + if (isReservedProp(key)) continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if ( + // #5523 dev root fragment may inherit directives + isHmrUpdating || patchFlag & 2048 + ) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance$1( + initialVNode, + parentComponent, + parentSuspense + )); + if (instance.type.__hmrId) { + registerHMR(instance); + } + { + pushWarningContext$1(initialVNode); + startMeasure(instance, `mount`); + } + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } + { + { + startMeasure(instance, `init`); + } + setupComponent$1(instance, false, optimized); + { + endMeasure(instance, `init`); + } + } + if (instance.asyncDep) { + if (isHmrUpdating) initialVNode.el = null; + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); + } + { + popWarningContext$1(); + endMeasure(instance, `mount`); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + { + pushWarningContext$1(n2); + } + updateComponentPreRender(instance, n2, optimized); + { + popWarningContext$1(); + } + return; + } else { + instance.next = n2; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { + let vnodeHook; + const { el, props } = initialVNode; + const { bm, m, parent, root, type } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + invokeArrayFns(bm); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); + } + toggleRecurse(instance, true); + if (el && hydrateNode) { + const hydrateSubTree = () => { + { + startMeasure(instance, `render`); + } + instance.subTree = renderComponentRoot$1(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `hydrate`); + } + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + { + endMeasure(instance, `hydrate`); + } + }; + if (isAsyncWrapperVNode && type.__asyncHydrate) { + type.__asyncHydrate( + el, + instance, + hydrateSubTree + ); + } else { + hydrateSubTree(); + } + } else { + if (root.ce) { + root.ce._injectChildStyle(type); + } + { + startMeasure(instance, `render`); + } + const subTree = instance.subTree = renderComponentRoot$1(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `patch`); + } + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + initialVNode.el = subTree.el; + } + if (m) { + queuePostRenderEffect(m, parentSuspense); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); + } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); + } + instance.isMounted = true; + { + devtoolsComponentAdded(instance); + } + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); + return; + } + } + let originNext = next; + let vnodeHook; + { + pushWarningContext$1(next || instance.vnode); + } + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; + } + if (bu) { + invokeArrayFns(bu); + } + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); + } + toggleRecurse(instance, true); + { + startMeasure(instance, `render`); + } + const nextTree = renderComponentRoot$1(instance); + { + endMeasure(instance, `render`); + } + const prevTree = instance.subTree; + instance.subTree = nextTree; + { + startMeasure(instance, `patch`); + } + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); + } + if (u) { + queuePostRenderEffect(u, parentSuspense); + } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); + } + { + devtoolsComponentUpdated(instance); + } + { + popWarningContext$1(); + } + } + }; + instance.scope.on(); + const effect = instance.effect = new ReactiveEffect(componentUpdateFn); + instance.scope.off(); + const update = instance.update = effect.run.bind(effect); + const job = instance.job = effect.runIfDirty.bind(effect); + job.i = instance; + job.id = instance.uid; + effect.scheduler = () => queueJob(job); + toggleRecurse(instance, true); + { + effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; + effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; + } + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + pauseTracking(); + flushPreFlushCbs(instance); + resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || EMPTY_ARR; + c2 = c2 || EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode$1(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode$1(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode$1(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode$1(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode$1(c2[i]); + if (nextChild.key != null) { + if (keyToNewIndexMap.has(nextChild.key)) { + warn$1( + `Duplicate keys found during update:`, + JSON.stringify(nextChild.key), + `Make sure keys are unique.` + ); + } + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs, + cacheIndex + } = vnode; + if (patchFlag === -2) { + optimized = false; + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (cacheIndex != null) { + parentComponent.renderCache[cacheIndex] = void 0; + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + internals, + doRemove + ); + } else if (dynamicChildren && // #5154 + // when v-once is used inside a block, setBlockTracking(-1) marks the + // parent block with hasOnce: true + // so that it doesn't take the fast path during unmount - otherwise + // components nested in v-once are never unmounted. + !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { + vnode.children.forEach((child) => { + if (child.type === Comment) { + hostRemove(child.el); + } else { + remove(child); + } + }); + } else { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } + }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + if (instance.type.__hmrId) { + unregisterHMR(instance); + } + const { bum, scope, job, subTree, um, m, a } = instance; + invalidateMount(m); + invalidateMount(a); + if (bum) { + invokeArrayFns(bum); + } + scope.stop(); + if (job) { + job.flags |= 8; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + { + devtoolsComponentRemoved(instance); + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + const el = hostNextSibling(vnode.anchor || vnode.el); + const teleportEnd = el && el[TeleportEndKey]; + return teleportEnd ? hostNextSibling(teleportEnd) : el; + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + container._vnode = vnode; + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; +} +function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; +} +function toggleRecurse({ effect, job }, allowed) { + if (allowed) { + effect.flags |= 32; + job.flags |= 4; + } else { + effect.flags &= ~32; + job.flags &= ~4; + } +} +function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; +} +function traverseStaticChildren(n1, n2, shallow = false) { + const ch1 = n1.children; + const ch2 = n2.children; + if (isArray(ch1) && isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; + } + if (!shallow && c2.patchFlag !== -2) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } + if (c2.type === Comment && !c2.el) { + c2.el = c1.el; + } + } + } +} +function getSequence(arr) { + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; + } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } + } + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; +} +function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); + } + } +} +function invalidateMount(hooks) { + if (hooks) { + for (let i = 0; i < hooks.length; i++) + hooks[i].flags |= 8; + } +} + +const ssrContextKey = Symbol.for("v-scx"); +const useSSRContext = () => { + { + const ctx = inject(ssrContextKey); + if (!ctx) { + warn$1( + `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` + ); + } + return ctx; + } +}; + +function watch(source, cb, options) { + if (!isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); +} +function doWatch(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, flush, once } = options; + if (!cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + } + const baseWatchOptions = extend({}, options); + baseWatchOptions.onWarn = warn$1; + const runsImmediately = cb && immediate || !cb && flush !== "post"; + let ssrCleanup; + if (isInSSRComponentSetup) { + if (flush === "sync") { + const ctx = useSSRContext(); + ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); + } else if (!runsImmediately) { + const watchStopHandle = () => { + }; + watchStopHandle.stop = NOOP; + watchStopHandle.resume = NOOP; + watchStopHandle.pause = NOOP; + return watchStopHandle; + } + } + const instance = currentInstance; + baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args); + let isPre = false; + if (flush === "post") { + baseWatchOptions.scheduler = (job) => { + queuePostRenderEffect(job, instance && instance.suspense); + }; + } else if (flush !== "sync") { + isPre = true; + baseWatchOptions.scheduler = (job, isFirstRun) => { + if (isFirstRun) { + job(); + } else { + queueJob(job); + } + }; + } + baseWatchOptions.augmentJob = (job) => { + if (cb) { + job.flags |= 4; + } + if (isPre) { + job.flags |= 2; + if (instance) { + job.id = instance.uid; + job.i = instance; + } + } + }; + const watchHandle = watch$1(source, cb, baseWatchOptions); + if (isInSSRComponentSetup) { + if (ssrCleanup) { + ssrCleanup.push(watchHandle); + } else if (runsImmediately) { + watchHandle(); + } + } + return watchHandle; +} +function instanceWatch(source, value, options) { + const publicThis = this.proxy; + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; +} +function createPathGetter(ctx, path) { + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; +} + +const getModelModifiers = (props, modelName) => { + return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`]; +}; + +function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) return; + const props = instance.vnode.props || EMPTY_OBJ; + { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.` + ); + } + } else { + const validator = emitsOptions[event]; + if (isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } + } + } + } + } + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modifiers = isModelListener && getModelModifiers(props, event.slice(7)); + if (modifiers) { + if (modifiers.trim) { + args = rawArgs.map((a) => isString(a) ? a.trim() : a); + } + if (modifiers.number) { + args = rawArgs.map(looseToNumber); + } + } + { + devtoolsComponentEmit(instance, event, args); + } + { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( + event + )}" instead of "${event}".` + ); + } + } + let handlerName; + let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; + } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } +} +function normalizeEmitsOptions(comp, appContext, asMixin = false) { + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (!isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); + } + if (comp.extends) { + extendEmits(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendEmits); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); + } + return null; + } + if (isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { + cache.set(comp, normalized); + } + return normalized; +} +function isEmitListener(options, key) { + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); +} + +let accessedAttrs = false; +function markAttrsAccessed() { + accessedAttrs = true; +} +function renderComponentRoot$1(instance) { + const { + type: Component, + vnode, + proxy, + withProxy, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + props, + data, + setupState, + ctx, + inheritAttrs + } = instance; + const prev = setCurrentRenderingInstance$1(instance); + let result; + let fallthroughAttrs; + { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); + } + }) : proxyToUse; + result = normalizeVNode$1( + render.call( + thisProxy, + proxyToUse, + renderCache, + true ? shallowReadonly(props) : props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode$1( + render2.length > 1 ? render2( + true ? shallowReadonly(props) : props, + true ? { + get attrs() { + markAttrsAccessed(); + return shallowReadonly(attrs); + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + true ? shallowReadonly(props) : props, + null + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs, false, true); + } else if (!accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (isOn(key)) { + if (!isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); + } + } else { + extraAttrs.push(key); + } + } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.` + ); + } + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); + } + } + } + } + if (vnode.dirs) { + if (!isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); + } + root = cloneVNode(root, null, false, true); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!isElementRoot(root)) { + warn$1( + `Component inside <Transition> renders non-element root node that cannot be animated.` + ); + } + setTransitionHooks(root, vnode.transition); + } + if (setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance$1(prev); + return result; +} +const getChildRoot = (vnode) => { + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } + } + }; + return [normalizeVNode$1(childRoot), setRoot]; +}; +function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode$2(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } + } + } + } else { + return; + } + } + return singleRoot; +} +const getFunctionalFallthrough = (attrs) => { + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || isOn(key)) { + (res || (res = {}))[key] = attrs[key]; + } + } + return res; +}; +const filterModelListeners = (attrs, props) => { + const res = {}; + for (const key in attrs) { + if (!isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; + } + } + return res; +}; +const isElementRoot = (vnode) => { + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; +}; +function shouldUpdateComponent(prevVNode, nextVNode, optimized) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if ((prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { + return true; + } + } + if (prevProps === nextProps) { + return false; + } + if (!prevProps) { + return !!nextProps; + } + if (!nextProps) { + return true; + } + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; +} +function hasPropsChanged(prevProps, nextProps, emitsOptions) { + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; + } + } + return false; +} +function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; + } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } +} + +const isSuspense = (type) => type.__isSuspense; +function queueEffectWithSuspense(fn, suspense) { + if (suspense && suspense.pendingBranch) { + if (isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); + } + } else { + queuePostFlushCb(fn); + } +} + +const Fragment = Symbol.for("v-fgt"); +const Text = Symbol.for("v-txt"); +const Comment = Symbol.for("v-cmt"); +const Static = Symbol.for("v-stc"); +let currentBlock = null; +let isBlockTreeEnabled = 1; +function setBlockTracking(value, inVOnce = false) { + isBlockTreeEnabled += value; + if (value < 0 && currentBlock && inVOnce) { + currentBlock.hasOnce = true; + } +} +function isVNode$2(value) { + return value ? value.__v_isVNode === true : false; +} +function isSameVNodeType(n1, n2) { + if (n2.shapeFlag & 6 && n1.component) { + const dirtyInstances = hmrDirtyComponents.get(n2.type); + if (dirtyInstances && dirtyInstances.has(n1.component)) { + n1.shapeFlag &= ~256; + n2.shapeFlag &= ~512; + return false; + } + } + return n1.type === n2.type && n1.key === n2.key; +} +const createVNodeWithArgsTransform = (...args) => { + return _createVNode( + ...args + ); +}; +const normalizeKey = ({ key }) => key != null ? key : null; +const normalizeRef = ({ + ref, + ref_key, + ref_for +}) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; +}; +function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetStart: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); + } + } else if (children) { + vnode.shapeFlag |= isString(children) ? 8 : 16; + } + if (vnode.key !== vnode.key) { + warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; +} +const createVNode = createVNodeWithArgsTransform ; +function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { + if (!type || type === NULL_DYNAMIC_COMPONENT) { + if (!type) { + warn$1(`Invalid vnode type when creating vnode: ${type}.`); + } + type = Comment; + } + if (isVNode$2(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); + } + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } + } + cloned.patchFlag = -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (isObject(style)) { + if (isProxy(style) && !isArray(style)) { + style = extend({}, style); + } + props.style = normalizeStyle(style); + } + } + const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; + if (shapeFlag & 4 && isProxy(type)) { + type = toRaw(type); + warn$1( + `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, + ` +Component that was made reactive: `, + type + ); + } + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); +} +function guardReactiveProps(props) { + if (!props) return null; + return isProxy(props) || isInternalObject(props) ? extend({}, props) : props; +} +function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) { + const { props, ref, patchFlag, children, transition } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, + target: vnode.target, + targetStart: vnode.targetStart, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + if (transition && cloneTransition) { + setTransitionHooks( + cloned, + transition.clone(cloned) + ); + } + return cloned; +} +function deepCloneVNode(vnode) { + const cloned = cloneVNode(vnode); + if (isArray(vnode.children)) { + cloned.children = vnode.children.map(deepCloneVNode); + } + return cloned; +} +function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); +} +function normalizeVNode$1(child) { + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (isVNode$2(child)) { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } +} +function cloneIfMounted(child) { + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); +} +function normalizeChildren(vnode, children) { + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !isInternalObject(children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; + } + } + } + } else if (isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; + } + } + vnode.children = children; + vnode.shapeFlag |= type; +} +function mergeProps(...args) { + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = normalizeClass([ret.class, toMerge.class]); + } + } else if (key === "style") { + ret.style = normalizeStyle([ret.style, toMerge.style]); + } else if (isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } + } + } + return ret; +} +function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); +} + +const emptyAppContext = createAppContext(); +let uid = 0; +function createComponentInstance$1(vnode, parent, suspense) { + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + job: null, + scope: new EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + ids: parent ? parent.ids : ["", 0, 0], + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: EMPTY_OBJ, + data: EMPTY_OBJ, + props: EMPTY_OBJ, + attrs: EMPTY_OBJ, + slots: EMPTY_OBJ, + refs: EMPTY_OBJ, + setupState: EMPTY_OBJ, + setupContext: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + { + instance.ctx = createDevRenderContext(instance); + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; +} +let currentInstance = null; +const getCurrentInstance = () => currentInstance || currentRenderingInstance; +let internalSetCurrentInstance; +let setInSSRSetupState; +{ + const g = getGlobalThis(); + const registerGlobalSetter = (key, setter) => { + let setters; + if (!(setters = g[key])) setters = g[key] = []; + setters.push(setter); + return (v) => { + if (setters.length > 1) setters.forEach((set) => set(v)); + else setters[0](v); + }; + }; + internalSetCurrentInstance = registerGlobalSetter( + `__VUE_INSTANCE_SETTERS__`, + (v) => currentInstance = v + ); + setInSSRSetupState = registerGlobalSetter( + `__VUE_SSR_SETTERS__`, + (v) => isInSSRComponentSetup = v + ); +} +const setCurrentInstance = (instance) => { + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; +}; +const unsetCurrentInstance = () => { + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); +}; +const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); +function validateComponentName(name, { isNativeTag }) { + if (isBuiltInTag(name) || isNativeTag(name)) { + warn$1( + "Do not use built-in or reserved HTML elements as component id: " + name + ); + } +} +function isStatefulComponent(instance) { + return instance.vnode.shapeFlag & 4; +} +let isInSSRComponentSetup = false; +function setupComponent$1(instance, isSSR = false, optimized = false) { + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children, optimized); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; +} +function setupStatefulComponent(instance, isSSR) { + var _a; + const Component = instance.type; + { + if (Component.name) { + validateComponentName(Component.name, instance.appContext.config); + } + if (Component.components) { + const names = Object.keys(Component.components); + for (let i = 0; i < names.length; i++) { + validateComponentName(names[i], instance.appContext.config); + } + } + if (Component.directives) { + const names = Object.keys(Component.directives); + for (let i = 0; i < names.length; i++) { + validateDirectiveName(names[i]); + } + } + if (Component.compilerOptions && isRuntimeOnly()) { + warn$1( + `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` + ); + } + } + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers); + { + exposePropsOnRenderContext(instance); + } + const { setup } = Component; + if (setup) { + pauseTracking(); + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + shallowReadonly(instance.props) , + setupContext + ] + ); + const isAsyncSetup = isPromise(setupResult); + resetTracking(); + reset(); + if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) { + markAsyncBoundary(instance); + } + if (isAsyncSetup) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + if (!instance.suspense) { + const name = (_a = Component.name) != null ? _a : "Anonymous"; + warn$1( + `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` + ); + } + } + } else { + handleSetupResult(instance, setupResult, isSSR); + } + } else { + finishComponentSetup(instance, isSSR); + } +} +function handleSetupResult(instance, setupResult, isSSR) { + if (isFunction(setupResult)) { + if (instance.type.__ssrInlineRender) { + instance.ssrRender = setupResult; + } else { + instance.render = setupResult; + } + } else if (isObject(setupResult)) { + if (isVNode$2(setupResult)) { + warn$1( + `setup() should not return VNodes directly - return a render function instead.` + ); + } + { + instance.devtoolsRawSetupState = setupResult; + } + instance.setupState = proxyRefs(setupResult); + { + exposeSetupStateOnRenderContext(instance); + } + } else if (setupResult !== void 0) { + warn$1( + `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` + ); + } + finishComponentSetup(instance, isSSR); +} +let compile; +const isRuntimeOnly = () => !compile; +function finishComponentSetup(instance, isSSR, skipOptions) { + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile && !Component.render) { + const template = Component.template || resolveMergedOptions(instance).template; + if (template) { + { + startMeasure(instance, `compile`); + } + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = extend( + extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions + ); + Component.render = compile(template, finalCompilerOptions); + { + endMeasure(instance, `compile`); + } + } + } + instance.render = Component.render || NOOP; + } + { + const reset = setCurrentInstance(instance); + pauseTracking(); + try { + applyOptions(instance); + } finally { + resetTracking(); + reset(); + } + } + if (!Component.render && instance.render === NOOP && !isSSR) { + if (Component.template) { + warn$1( + `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.esm-browser.js" instead.` ) + ); + } else { + warn$1(`Component is missing template or render function: `, Component); + } + } +} +const attrsProxyHandlers = { + get(target, key) { + markAttrsAccessed(); + track(target, "get", ""); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } +} ; +function getSlotsProxy(instance) { + return new Proxy(instance.slots, { + get(target, key) { + track(instance, "get", "$slots"); + return target[key]; + } + }); +} +function createSetupContext(instance) { + const expose = (exposed) => { + { + if (instance.exposed) { + warn$1(`expose() should be called only once per setup().`); + } + if (exposed != null) { + let exposedType = typeof exposed; + if (exposedType === "object") { + if (isArray(exposed)) { + exposedType = "array"; + } else if (isRef(exposed)) { + exposedType = "ref"; + } + } + if (exposedType !== "object") { + warn$1( + `expose() should be passed a plain object, received ${exposedType}.` + ); + } + } + } + instance.exposed = exposed || {}; + }; + { + let attrsProxy; + let slotsProxy; + return Object.freeze({ + get attrs() { + return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers)); + }, + get slots() { + return slotsProxy || (slotsProxy = getSlotsProxy(instance)); + }, + get emit() { + return (event, ...args) => instance.emit(event, ...args); + }, + expose + }); + } +} +function getComponentPublicInstance(instance) { + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); + } + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } else { + return instance.proxy; + } +} +const classifyRE = /(?:^|[-_])(\w)/g; +const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); +function getComponentName(Component, includeInferred = true) { + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; +} +function formatComponentName(instance, Component, isRoot = false) { + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; + } + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; +} +function isClassComponent(value) { + return isFunction(value) && "__vccOpts" in value; +} + +const computed = (getterOrOptions, debugOptions) => { + const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); + { + const i = getCurrentInstance(); + if (i && i.appContext.config.warnRecursiveComputed) { + c._warnRecursive = true; + } + } + return c; +}; + +const version = "3.5.13"; +const warn = warn$1 ; +const _ssrUtils = { + createComponentInstance: createComponentInstance$1, + setupComponent: setupComponent$1, + renderComponentRoot: renderComponentRoot$1, + setCurrentRenderingInstance: setCurrentRenderingInstance$1, + isVNode: isVNode$2, + normalizeVNode: normalizeVNode$1, + getComponentPublicInstance, + ensureValidVNode: ensureValidVNode$1, + pushWarningContext: pushWarningContext$1, + popWarningContext: popWarningContext$1 +}; +const ssrUtils = _ssrUtils ; + +let policy = void 0; +const tt = typeof window !== "undefined" && window.trustedTypes; +if (tt) { + try { + policy = /* @__PURE__ */ tt.createPolicy("vue", { + createHTML: (val) => val + }); + } catch (e) { + warn(`Error creating trusted types policy: ${e}`); + } +} +const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val; +const svgNS = "http://www.w3.org/2000/svg"; +const mathmlNS = "http://www.w3.org/1998/Math/MathML"; +const doc = typeof document !== "undefined" ? document : null; +const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); +const nodeOps = { + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); + } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) break; + } + } else { + templateContainer.innerHTML = unsafeToTrustedHTML( + namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content + ); + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } +}; + +const vtcKey = Symbol("_vtc"); + +function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } +} + +const vShowOriginalDisplay = Symbol("_vod"); +const vShowHidden = Symbol("_vsh"); + +const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); + +const displayRE = /(^|;)\s*display\s*:/; +function patchStyle(el, prev, next) { + const style = el.style; + const isCssString = isString(next); + let hasControlledDisplay = false; + if (next && !isCssString) { + if (prev) { + if (!isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } else { + for (const prevStyle of prev.split(";")) { + const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim(); + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + } + for (const key in next) { + if (key === "display") { + hasControlledDisplay = true; + } + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + hasControlledDisplay = displayRE.test(next); + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOriginalDisplay in el) { + el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : ""; + if (el[vShowHidden]) { + style.display = "none"; + } + } +} +const semicolonRE = /[^\\];\s*$/; +const importantRE = /\s*!important$/; +function setStyle(style, name, val) { + if (isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) val = ""; + { + if (semicolonRE.test(val)) { + warn( + `Unexpected semicolon at the end of '${name}' style value: '${val}'` + ); + } + } + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } +} +const prefixes = ["Webkit", "Moz", "ms"]; +const prefixCache = {}; +function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; +} + +const xlinkNS = "http://www.w3.org/1999/xlink"; +function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + if (value == null || isBoolean && !includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute( + key, + isBoolean ? "" : isSymbol(value) ? String(value) : value + ); + } + } +} + +function patchDOMProp(el, key, value, parentComponent, attrName) { + if (key === "innerHTML" || key === "textContent") { + if (value != null) { + el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value; + } + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; + const newValue = value == null ? ( + // #11647: value should be set as empty string for null and undefined, + // but <input type="checkbox"> should be set as 'on'. + el.type === "checkbox" ? "on" : "" + ) : String(value); + if (oldValue !== newValue || !("_value" in el)) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + el._value = value; + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + if (!needRemove) { + warn( + `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, + e + ); + } + } + needRemove && el.removeAttribute(attrName || key); +} + +function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); +} +function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); +} +const veiKey = Symbol("_vei"); +function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = sanitizeEventValue(nextValue, rawName) ; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker( + sanitizeEventValue(nextValue, rawName) , + instance + ); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } +} +const optionsModifierRE = /(?:Once|Passive|Capture)$/; +function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); + return [event, options]; +} +let cachedNow = 0; +const p = /* @__PURE__ */ Promise.resolve(); +const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); +function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; +} +function sanitizeEventValue(value, propName) { + if (isFunction(value) || isArray(value)) { + return value; + } + warn( + `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop? +Expected function or array of functions, received type ${typeof value}.` + ); + return NOOP; +} +function patchStopImmediatePropagation(e, value) { + if (isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map( + (fn) => (e2) => !e2._stopped && fn && fn(e2) + ); + } else { + return value; + } +} + +const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter +key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; +const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (isOn(key)) { + if (!isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp(el, key, nextValue); + if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { + patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); + } + } else if ( + // #11081 force set props for possible async custom element + el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue)) + ) { + patchDOMProp(el, camelize(key), nextValue, parentComponent, key); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } +}; +function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && isString(value)) { + return false; + } + return key in el; +} + +const getModelAssigner = (vnode) => { + const fn = vnode.props["onUpdate:modelValue"] || false; + return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; +}; +function onCompositionStart(e) { + e.target.composing = true; +} +function onCompositionEnd(e) { + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } +} +const assignKey = Symbol("_assign"); +const vModelText = { + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); + } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) return; + const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy && value === oldValue) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } +}; +const vModelCheckbox = { + // #4096 array checkboxes need to be deep traversed + deep: true, + created(el, _, vnode) { + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + const modelValue = el._modelValue; + const elementValue = getValue(el); + const checked = el.checked; + const assign = el[assignKey]; + if (isArray(modelValue)) { + const index = looseIndexOf(modelValue, elementValue); + const found = index !== -1; + if (checked && !found) { + assign(modelValue.concat(elementValue)); + } else if (!checked && found) { + const filtered = [...modelValue]; + filtered.splice(index, 1); + assign(filtered); + } + } else if (isSet(modelValue)) { + const cloned = new Set(modelValue); + if (checked) { + cloned.add(elementValue); + } else { + cloned.delete(elementValue); + } + assign(cloned); + } else { + assign(getCheckboxValue(el, checked)); + } + }); + }, + // set initial checked on mount to wait for true-value/false-value + mounted: setChecked, + beforeUpdate(el, binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + setChecked(el, binding, vnode); + } +}; +function setChecked(el, { value, oldValue }, vnode) { + el._modelValue = value; + let checked; + if (isArray(value)) { + checked = looseIndexOf(value, vnode.props.value) > -1; + } else if (isSet(value)) { + checked = value.has(vnode.props.value); + } else { + if (value === oldValue) return; + checked = looseEqual(value, getCheckboxValue(el, true)); + } + if (el.checked !== checked) { + el.checked = checked; + } +} +const vModelRadio = { + created(el, { value }, vnode) { + el.checked = looseEqual(value, vnode.props.value); + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + el[assignKey](getValue(el)); + }); + }, + beforeUpdate(el, { value, oldValue }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (value !== oldValue) { + el.checked = looseEqual(value, vnode.props.value); + } + } +}; +function getValue(el) { + return "_value" in el ? el._value : el.value; +} +function getCheckboxValue(el, checked) { + const key = checked ? "_trueValue" : "_falseValue"; + return key in el ? el[key] : checked; +} +function initVModelForSSR() { + vModelText.getSSRProps = ({ value }) => ({ value }); + vModelRadio.getSSRProps = ({ value }, vnode) => { + if (vnode.props && looseEqual(vnode.props.value, value)) { + return { checked: true }; + } + }; + vModelCheckbox.getSSRProps = ({ value }, vnode) => { + if (isArray(value)) { + if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) { + return { checked: true }; + } + } else if (isSet(value)) { + if (vnode.props && value.has(vnode.props.value)) { + return { checked: true }; + } + } else if (value) { + return { checked: true }; + } + }; +} + +const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); +let renderer; +function ensureRenderer() { + return renderer || (renderer = createRenderer(rendererOptions)); +} +const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) return; + const component = app._component; + if (!isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; + } + if (container.nodeType === 1) { + container.textContent = ""; + } + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); + } + return proxy; + }; + return app; +}; +function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } +} +function injectNativeTagCheck(app) { + Object.defineProperty(app.config, "isNativeTag", { + value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + writable: false + }); +} +function injectCompilerOptionsCheck(app) { + { + const isCustomElement = app.config.isCustomElement; + Object.defineProperty(app.config, "isCustomElement", { + get() { + return isCustomElement; + }, + set() { + warn( + `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` + ); + } + }); + const compilerOptions = app.config.compilerOptions; + const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. +- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. +- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader +- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; + Object.defineProperty(app.config, "compilerOptions", { + get() { + warn(msg); + return compilerOptions; + }, + set() { + warn(msg); + } + }); + } +} +function normalizeContainer(container) { + if (isString(container)) { + const res = document.querySelector(container); + if (!res) { + warn( + `Failed to mount app: mount target selector "${container}" returned null.` + ); + } + return res; + } + if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { + warn( + `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` + ); + } + return container; +} +let ssrDirectiveInitialized = false; +const initDirectivesForSSR = () => { + if (!ssrDirectiveInitialized) { + ssrDirectiveInitialized = true; + initVModelForSSR(); + } +} ; + +const shouldIgnoreProp = /* @__PURE__ */ makeMap( + `,key,ref,innerHTML,textContent,ref_key,ref_for` +); +function ssrRenderAttrs(props, tag) { + let ret = ""; + for (const key in props) { + if (shouldIgnoreProp(key) || isOn(key) || tag === "textarea" && key === "value") { + continue; + } + const value = props[key]; + if (key === "class") { + ret += ` class="${ssrRenderClass(value)}"`; + } else if (key === "style") { + ret += ` style="${ssrRenderStyle(value)}"`; + } else if (key === "className") { + ret += ` class="${String(value)}"`; + } else { + ret += ssrRenderDynamicAttr(key, value, tag); + } + } + return ret; +} +function ssrRenderDynamicAttr(key, value, tag) { + if (!isRenderableAttrValue(value)) { + return ``; + } + const attrKey = tag && (tag.indexOf("-") > 0 || isSVGTag(tag)) ? key : propsToAttrMap[key] || key.toLowerCase(); + if (isBooleanAttr(attrKey)) { + return includeBooleanAttr(value) ? ` ${attrKey}` : ``; + } else if (isSSRSafeAttrName(attrKey)) { + return value === "" ? ` ${attrKey}` : ` ${attrKey}="${escapeHtml(value)}"`; + } else { + console.warn( + `[@vue/server-renderer] Skipped rendering unsafe attribute name: ${attrKey}` + ); + return ``; + } +} +function ssrRenderAttr(key, value) { + if (!isRenderableAttrValue(value)) { + return ``; + } + return ` ${key}="${escapeHtml(value)}"`; +} +function ssrRenderClass(raw) { + return escapeHtml(normalizeClass(raw)); +} +function ssrRenderStyle(raw) { + if (!raw) { + return ""; + } + if (isString(raw)) { + return escapeHtml(raw); + } + const styles = normalizeStyle(raw); + return escapeHtml(stringifyStyle(styles)); +} + +function ssrRenderComponent(comp, props = null, children = null, parentComponent = null, slotScopeId) { + return renderComponentVNode( + createVNode(comp, props, children), + parentComponent, + slotScopeId + ); +} + +const { ensureValidVNode } = ssrUtils; +function ssrRenderSlot(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId) { + push(`<!--[-->`); + ssrRenderSlotInner( + slots, + slotName, + slotProps, + fallbackRenderFn, + push, + parentComponent, + slotScopeId + ); + push(`<!--]-->`); +} +function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId, transition) { + const slotFn = slots[slotName]; + if (slotFn) { + const slotBuffer = []; + const bufferedPush = (item) => { + slotBuffer.push(item); + }; + const ret = slotFn( + slotProps, + bufferedPush, + parentComponent, + slotScopeId ? " " + slotScopeId : "" + ); + if (isArray(ret)) { + const validSlotContent = ensureValidVNode(ret); + if (validSlotContent) { + renderVNodeChildren( + push, + validSlotContent, + parentComponent, + slotScopeId + ); + } else if (fallbackRenderFn) { + fallbackRenderFn(); + } + } else { + let isEmptySlot = true; + if (transition) { + isEmptySlot = false; + } else { + for (let i = 0; i < slotBuffer.length; i++) { + if (!isComment(slotBuffer[i])) { + isEmptySlot = false; + break; + } + } + } + if (isEmptySlot) { + if (fallbackRenderFn) { + fallbackRenderFn(); + } + } else { + let start = 0; + let end = slotBuffer.length; + if (transition && slotBuffer[0] === "<!--[-->" && slotBuffer[end - 1] === "<!--]-->") { + start++; + end--; + } + for (let i = start; i < end; i++) { + push(slotBuffer[i]); + } + } + } + } else if (fallbackRenderFn) { + fallbackRenderFn(); + } +} +const commentTestRE = /^<!--[\s\S]*-->$/; +const commentRE = /<!--[^]*?-->/gm; +function isComment(item) { + if (typeof item !== "string" || !commentTestRE.test(item)) return false; + if (item.length <= 8) return true; + return !item.replace(commentRE, "").trim(); +} + +function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) { + parentPush("<!--teleport start-->"); + const context = parentComponent.appContext.provides[ssrContextKey]; + const teleportBuffers = context.__teleportBuffers || (context.__teleportBuffers = {}); + const targetBuffer = teleportBuffers[target] || (teleportBuffers[target] = []); + const bufferIndex = targetBuffer.length; + let teleportContent; + if (disabled) { + contentRenderFn(parentPush); + teleportContent = `<!--teleport start anchor--><!--teleport anchor-->`; + } else { + const { getBuffer, push } = createBuffer(); + push(`<!--teleport start anchor-->`); + contentRenderFn(push); + push(`<!--teleport anchor-->`); + teleportContent = getBuffer(); + } + targetBuffer.splice(bufferIndex, 0, teleportContent); + parentPush("<!--teleport end-->"); +} + +function ssrInterpolate(value) { + return escapeHtml(toDisplayString(value)); +} + +function ssrRenderList(source, renderItem) { + if (isArray(source) || isString(source)) { + for (let i = 0, l = source.length; i < l; i++) { + renderItem(source[i], i); + } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn(`The v-for range expect an integer value but got ${source}.`); + return; + } + for (let i = 0; i < source; i++) { + renderItem(i + 1, i); + } + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + const arr = Array.from(source); + for (let i = 0, l = arr.length; i < l; i++) { + renderItem(arr[i], i); + } + } else { + const keys = Object.keys(source); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + renderItem(source[key], key, i); + } + } + } +} + +async function ssrRenderSuspense(push, { default: renderContent }) { + if (renderContent) { + renderContent(); + } else { + push(`<!---->`); + } +} + +function ssrGetDirectiveProps(instance, dir, value, arg, modifiers = {}) { + if (typeof dir !== "function" && dir.getSSRProps) { + return dir.getSSRProps( + { + dir, + instance: ssrUtils.getComponentPublicInstance(instance.$), + value, + oldValue: void 0, + arg, + modifiers + }, + null + ) || {}; + } + return {}; +} + +const ssrLooseEqual = looseEqual; +function ssrLooseContain(arr, value) { + return looseIndexOf(arr, value) > -1; +} +function ssrRenderDynamicModel(type, model, value) { + switch (type) { + case "radio": + return looseEqual(model, value) ? " checked" : ""; + case "checkbox": + return (isArray(model) ? ssrLooseContain(model, value) : model) ? " checked" : ""; + default: + return ssrRenderAttr("value", model); + } +} +function ssrGetDynamicModelProps(existingProps = {}, model) { + const { type, value } = existingProps; + switch (type) { + case "radio": + return looseEqual(model, value) ? { checked: true } : null; + case "checkbox": + return (isArray(model) ? ssrLooseContain(model, value) : model) ? { checked: true } : null; + default: + return { value: model }; + } +} + +function ssrCompile(template, instance) { + { + throw new Error( + `On-the-fly template compilation is not supported in the ESM build of @vue/server-renderer. All templates must be pre-compiled into render functions.` + ); + } +} + +const { + createComponentInstance, + setCurrentRenderingInstance, + setupComponent, + renderComponentRoot, + normalizeVNode, + pushWarningContext, + popWarningContext +} = ssrUtils; +function createBuffer() { + let appendable = false; + const buffer = []; + return { + getBuffer() { + return buffer; + }, + push(item) { + const isStringItem = isString(item); + if (appendable && isStringItem) { + buffer[buffer.length - 1] += item; + return; + } + buffer.push(item); + appendable = isStringItem; + if (isPromise(item) || isArray(item) && item.hasAsync) { + buffer.hasAsync = true; + } + } + }; +} +function renderComponentVNode(vnode, parentComponent = null, slotScopeId) { + const instance = vnode.component = createComponentInstance( + vnode, + parentComponent, + null + ); + pushWarningContext(vnode); + const res = setupComponent( + instance, + true + /* isSSR */ + ); + popWarningContext(); + const hasAsyncSetup = isPromise(res); + let prefetches = instance.sp; + if (hasAsyncSetup || prefetches) { + const p = Promise.resolve(res).then(() => { + if (hasAsyncSetup) prefetches = instance.sp; + if (prefetches) { + return Promise.all( + prefetches.map((prefetch) => prefetch.call(instance.proxy)) + ); + } + }).catch(NOOP); + return p.then(() => renderComponentSubTree(instance, slotScopeId)); + } else { + return renderComponentSubTree(instance, slotScopeId); + } +} +function renderComponentSubTree(instance, slotScopeId) { + pushWarningContext(instance.vnode); + const comp = instance.type; + const { getBuffer, push } = createBuffer(); + if (isFunction(comp)) { + let root = renderComponentRoot(instance); + if (!comp.props) { + for (const key in instance.attrs) { + if (key.startsWith(`data-v-`)) { + (root.props || (root.props = {}))[key] = ``; + } + } + } + renderVNode(push, instance.subTree = root, instance, slotScopeId); + } else { + if ((!instance.render || instance.render === NOOP) && !instance.ssrRender && !comp.ssrRender && isString(comp.template)) { + comp.ssrRender = ssrCompile(comp.template); + } + const ssrRender = instance.ssrRender || comp.ssrRender; + if (ssrRender) { + let attrs = instance.inheritAttrs !== false ? instance.attrs : void 0; + let hasCloned = false; + let cur = instance; + while (true) { + const scopeId = cur.vnode.scopeId; + if (scopeId) { + if (!hasCloned) { + attrs = { ...attrs }; + hasCloned = true; + } + attrs[scopeId] = ""; + } + const parent = cur.parent; + if (parent && parent.subTree && parent.subTree === cur.vnode) { + cur = parent; + } else { + break; + } + } + if (slotScopeId) { + if (!hasCloned) attrs = { ...attrs }; + const slotScopeIdList = slotScopeId.trim().split(" "); + for (let i = 0; i < slotScopeIdList.length; i++) { + attrs[slotScopeIdList[i]] = ""; + } + } + const prev = setCurrentRenderingInstance(instance); + try { + ssrRender( + instance.proxy, + push, + instance, + attrs, + // compiler-optimized bindings + instance.props, + instance.setupState, + instance.data, + instance.ctx + ); + } finally { + setCurrentRenderingInstance(prev); + } + } else if (instance.render && instance.render !== NOOP) { + renderVNode( + push, + instance.subTree = renderComponentRoot(instance), + instance, + slotScopeId + ); + } else { + const componentName = comp.name || comp.__file || `<Anonymous>`; + warn(`Component ${componentName} is missing template or render function.`); + push(`<!---->`); + } + } + popWarningContext(); + return getBuffer(); +} +function renderVNode(push, vnode, parentComponent, slotScopeId) { + const { type, shapeFlag, children, dirs, props } = vnode; + if (dirs) { + vnode.props = applySSRDirectives(vnode, props, dirs); + } + switch (type) { + case Text: + push(escapeHtml(children)); + break; + case Comment: + push( + children ? `<!--${escapeHtmlComment(children)}-->` : `<!---->` + ); + break; + case Static: + push(children); + break; + case Fragment: + if (vnode.slotScopeIds) { + slotScopeId = (slotScopeId ? slotScopeId + " " : "") + vnode.slotScopeIds.join(" "); + } + push(`<!--[-->`); + renderVNodeChildren( + push, + children, + parentComponent, + slotScopeId + ); + push(`<!--]-->`); + break; + default: + if (shapeFlag & 1) { + renderElementVNode(push, vnode, parentComponent, slotScopeId); + } else if (shapeFlag & 6) { + push(renderComponentVNode(vnode, parentComponent, slotScopeId)); + } else if (shapeFlag & 64) { + renderTeleportVNode(push, vnode, parentComponent, slotScopeId); + } else if (shapeFlag & 128) { + renderVNode(push, vnode.ssContent, parentComponent, slotScopeId); + } else { + warn( + "[@vue/server-renderer] Invalid VNode type:", + type, + `(${typeof type})` + ); + } + } +} +function renderVNodeChildren(push, children, parentComponent, slotScopeId) { + for (let i = 0; i < children.length; i++) { + renderVNode(push, normalizeVNode(children[i]), parentComponent, slotScopeId); + } +} +function renderElementVNode(push, vnode, parentComponent, slotScopeId) { + const tag = vnode.type; + let { props, children, shapeFlag, scopeId } = vnode; + let openTag = `<${tag}`; + if (props) { + openTag += ssrRenderAttrs(props, tag); + } + if (scopeId) { + openTag += ` ${scopeId}`; + } + let curParent = parentComponent; + let curVnode = vnode; + while (curParent && curVnode === curParent.subTree) { + curVnode = curParent.vnode; + if (curVnode.scopeId) { + openTag += ` ${curVnode.scopeId}`; + } + curParent = curParent.parent; + } + if (slotScopeId) { + openTag += ` ${slotScopeId}`; + } + push(openTag + `>`); + if (!isVoidTag(tag)) { + let hasChildrenOverride = false; + if (props) { + if (props.innerHTML) { + hasChildrenOverride = true; + push(props.innerHTML); + } else if (props.textContent) { + hasChildrenOverride = true; + push(escapeHtml(props.textContent)); + } else if (tag === "textarea" && props.value) { + hasChildrenOverride = true; + push(escapeHtml(props.value)); + } + } + if (!hasChildrenOverride) { + if (shapeFlag & 8) { + push(escapeHtml(children)); + } else if (shapeFlag & 16) { + renderVNodeChildren( + push, + children, + parentComponent, + slotScopeId + ); + } + } + push(`</${tag}>`); + } +} +function applySSRDirectives(vnode, rawProps, dirs) { + const toMerge = []; + for (let i = 0; i < dirs.length; i++) { + const binding = dirs[i]; + const { + dir: { getSSRProps } + } = binding; + if (getSSRProps) { + const props = getSSRProps(binding, vnode); + if (props) toMerge.push(props); + } + } + return mergeProps(rawProps || {}, ...toMerge); +} +function renderTeleportVNode(push, vnode, parentComponent, slotScopeId) { + const target = vnode.props && vnode.props.to; + const disabled = vnode.props && vnode.props.disabled; + if (!target) { + if (!disabled) { + warn(`[@vue/server-renderer] Teleport is missing target prop.`); + } + return []; + } + if (!isString(target)) { + warn( + `[@vue/server-renderer] Teleport target must be a query selector string.` + ); + return []; + } + ssrRenderTeleport( + push, + (push2) => { + renderVNodeChildren( + push2, + vnode.children, + parentComponent, + slotScopeId + ); + }, + target, + disabled || disabled === "", + parentComponent + ); +} + +const { isVNode: isVNode$1 } = ssrUtils; +function nestedUnrollBuffer(buffer, parentRet, startIndex) { + if (!buffer.hasAsync) { + return parentRet + unrollBufferSync$1(buffer); + } + let ret = parentRet; + for (let i = startIndex; i < buffer.length; i += 1) { + const item = buffer[i]; + if (isString(item)) { + ret += item; + continue; + } + if (isPromise(item)) { + return item.then((nestedItem) => { + buffer[i] = nestedItem; + return nestedUnrollBuffer(buffer, ret, i); + }); + } + const result = nestedUnrollBuffer(item, ret, 0); + if (isPromise(result)) { + return result.then((nestedItem) => { + buffer[i] = nestedItem; + return nestedUnrollBuffer(buffer, "", i); + }); + } + ret = result; + } + return ret; +} +function unrollBuffer$1(buffer) { + return nestedUnrollBuffer(buffer, "", 0); +} +function unrollBufferSync$1(buffer) { + let ret = ""; + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (isString(item)) { + ret += item; + } else { + ret += unrollBufferSync$1(item); + } + } + return ret; +} +async function renderToString(input, context = {}) { + if (isVNode$1(input)) { + return renderToString(createApp({ render: () => input }), context); + } + const vnode = createVNode(input._component, input._props); + vnode.appContext = input._context; + input.provide(ssrContextKey, context); + const buffer = await renderComponentVNode(vnode); + const result = await unrollBuffer$1(buffer); + await resolveTeleports(context); + if (context.__watcherHandles) { + for (const unwatch of context.__watcherHandles) { + unwatch(); + } + } + return result; +} +async function resolveTeleports(context) { + if (context.__teleportBuffers) { + context.teleports = context.teleports || {}; + for (const key in context.__teleportBuffers) { + context.teleports[key] = await unrollBuffer$1( + await Promise.all([context.__teleportBuffers[key]]) + ); + } + } +} + +const { isVNode } = ssrUtils; +async function unrollBuffer(buffer, stream) { + if (buffer.hasAsync) { + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (isPromise(item)) { + item = await item; + } + if (isString(item)) { + stream.push(item); + } else { + await unrollBuffer(item, stream); + } + } + } else { + unrollBufferSync(buffer, stream); + } +} +function unrollBufferSync(buffer, stream) { + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (isString(item)) { + stream.push(item); + } else { + unrollBufferSync(item, stream); + } + } +} +function renderToSimpleStream(input, context, stream) { + if (isVNode(input)) { + return renderToSimpleStream( + createApp({ render: () => input }), + context, + stream + ); + } + const vnode = createVNode(input._component, input._props); + vnode.appContext = input._context; + input.provide(ssrContextKey, context); + Promise.resolve(renderComponentVNode(vnode)).then((buffer) => unrollBuffer(buffer, stream)).then(() => resolveTeleports(context)).then(() => { + if (context.__watcherHandles) { + for (const unwatch of context.__watcherHandles) { + unwatch(); + } + } + }).then(() => stream.push(null)).catch((error) => { + stream.destroy(error); + }); + return stream; +} +function renderToStream(input, context = {}) { + console.warn( + `[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead.` + ); + return renderToNodeStream(input, context); +} +function renderToNodeStream(input, context = {}) { + { + throw new Error( + `ESM build of renderToStream() does not support renderToNodeStream(). Use pipeToNodeWritable() with an existing Node.js Writable stream instance instead.` + ); + } +} +function pipeToNodeWritable(input, context = {}, writable) { + renderToSimpleStream(input, context, { + push(content) { + if (content != null) { + writable.write(content); + } else { + writable.end(); + } + }, + destroy(err) { + writable.destroy(err); + } + }); +} +function renderToWebStream(input, context = {}) { + if (typeof ReadableStream !== "function") { + throw new Error( + `ReadableStream constructor is not available in the global scope. If the target environment does support web streams, consider using pipeToWebWritable() with an existing WritableStream instance instead.` + ); + } + const encoder = new TextEncoder(); + let cancelled = false; + return new ReadableStream({ + start(controller) { + renderToSimpleStream(input, context, { + push(content) { + if (cancelled) return; + if (content != null) { + controller.enqueue(encoder.encode(content)); + } else { + controller.close(); + } + }, + destroy(err) { + controller.error(err); + } + }); + }, + cancel() { + cancelled = true; + } + }); +} +function pipeToWebWritable(input, context = {}, writable) { + const writer = writable.getWriter(); + const encoder = new TextEncoder(); + let hasReady = false; + try { + hasReady = isPromise(writer.ready); + } catch (e) { + } + renderToSimpleStream(input, context, { + async push(content) { + if (hasReady) { + await writer.ready; + } + if (content != null) { + return writer.write(encoder.encode(content)); + } else { + return writer.close(); + } + }, + destroy(err) { + console.log(err); + writer.close(); + } + }); +} + +initDirectivesForSSR(); + +export { pipeToNodeWritable, pipeToWebWritable, renderToNodeStream, renderToSimpleStream, renderToStream, renderToString, renderToWebStream, ssrGetDirectiveProps, ssrGetDynamicModelProps, includeBooleanAttr as ssrIncludeBooleanAttr, ssrInterpolate, ssrLooseContain, ssrLooseEqual, ssrRenderAttr, ssrRenderAttrs, ssrRenderClass, ssrRenderComponent, ssrRenderDynamicAttr, ssrRenderDynamicModel, ssrRenderList, ssrRenderSlot, ssrRenderSlotInner, ssrRenderStyle, ssrRenderSuspense, ssrRenderTeleport, renderVNode as ssrRenderVNode }; diff --git a/vuetest/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.prod.js b/vuetest/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.prod.js new file mode 100644 index 0000000..c0cfd01 --- /dev/null +++ b/vuetest/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.prod.js @@ -0,0 +1,5 @@ +/** +* @vue/server-renderer v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let e,t,n,l,r,i,s,o,a,u,c;function f(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return e=>e in t}let p={},d=[],h=()=>{},g=()=>!1,m=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||97>e.charCodeAt(2)),y=e=>e.startsWith("onUpdate:"),_=Object.assign,b=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},x=Object.prototype.hasOwnProperty,S=(e,t)=>x.call(e,t),w=Array.isArray,k=e=>"[object Map]"===$(e),C=e=>"[object Set]"===$(e),T=e=>"[object Date]"===$(e),O=e=>"function"==typeof e,R=e=>"string"==typeof e,P=e=>"symbol"==typeof e,E=e=>null!==e&&"object"==typeof e,M=e=>(E(e)||O(e))&&O(e.then)&&O(e.catch),A=Object.prototype.toString,$=e=>A.call(e),j=e=>$(e).slice(8,-1),D=e=>"[object Object]"===$(e),I=e=>R(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,N=f(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),F=e=>{let t=Object.create(null);return n=>t[n]||(t[n]=e(n))},L=/-(\w)/g,V=F(e=>e.replace(L,(e,t)=>t?t.toUpperCase():"")),W=/\B([A-Z])/g,U=F(e=>e.replace(W,"-$1").toLowerCase()),B=F(e=>e.charAt(0).toUpperCase()+e.slice(1)),H=F(e=>e?`on${B(e)}`:""),q=(e,t)=>!Object.is(e,t),G=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},z=(e,t,n,l=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:l,value:n})},K=e=>{let t=parseFloat(e);return isNaN(t)?e:t},J=()=>e||(e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});function Z(e){if(w(e)){let t={};for(let n=0;n<e.length;n++){let l=e[n],r=R(l)?function(e){let t={};return e.replace(Y,"").split(X).forEach(e=>{if(e){let n=e.split(Q);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}(l):Z(l);if(r)for(let e in r)t[e]=r[e]}return t}if(R(e)||E(e))return e}let X=/;(?![^(]*\))/g,Q=/:([^]+)/,Y=/\/\*[^]*?\*\//g;function ee(e){let t="";if(R(e))t=e;else if(w(e))for(let n=0;n<e.length;n++){let l=ee(e[n]);l&&(t+=l+" ")}else if(E(e))for(let n in e)e[n]&&(t+=n+" ");return t.trim()}let et=f("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),en=f("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),el="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",er=f(el),ei=f(el+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function es(e){return!!e||""===e}let eo=/[>/="'\u0009\u000a\u000c\u0020]/,ea={},eu={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"};function ec(e){if(null==e)return!1;let t=typeof e;return"string"===t||"number"===t||"boolean"===t}let ef=/["'&<>]/;function ep(e){let t,n;let l=""+e,r=ef.exec(l);if(!r)return l;let i="",s=0;for(n=r.index;n<l.length;n++){switch(l.charCodeAt(n)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}s!==n&&(i+=l.slice(s,n)),s=n+1,i+=t}return s!==n?i+l.slice(s,n):i}let ed=/^-?>|<!--|-->|--!>|<!-$/g;function eh(e,t){if(e===t)return!0;let n=T(e),l=T(t);if(n||l)return!!n&&!!l&&e.getTime()===t.getTime();if(n=P(e),l=P(t),n||l)return e===t;if(n=w(e),l=w(t),n||l)return!!n&&!!l&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let l=0;n&&l<e.length;l++)n=eh(e[l],t[l]);return n}(e,t);if(n=E(e),l=E(t),n||l){if(!n||!l||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){let l=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(l&&!r||!l&&r||!eh(e[n],t[n]))return!1}}return String(e)===String(t)}function eg(e,t){return e.findIndex(e=>eh(e,t))}let ev=e=>!!(e&&!0===e.__v_isRef),em=e=>R(e)?e:null==e?"":w(e)||E(e)&&(e.toString===A||!O(e.toString))?ev(e)?em(e.value):JSON.stringify(e,ey,2):String(e),ey=(e,t)=>ev(t)?ey(e,t.value):k(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],l)=>(e[e_(t,l)+" =>"]=n,e),{})}:C(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>e_(e))}:P(t)?e_(t):!E(t)||w(t)||D(t)?t:String(t),e_=(e,t="")=>{var n;return P(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};class eb{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=t,!e&&t&&(this.index=(t.scopes||(t.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let n=t;try{return t=this,e()}finally{t=n}}}on(){t=this}off(){t=this.parent}stop(e){if(this._active){let t,n;for(t=0,this._active=!1,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,this.effects.length=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}let ex=new WeakSet;class eS{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,t&&t.active&&t.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,ex.has(this)&&(ex.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||ek(this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,eD(this),eT(this);let e=n,t=eM;n=this,eM=!0;try{return this.fn()}finally{eO(this),n=e,eM=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)eE(e);this.deps=this.depsTail=void 0,eD(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?ex.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){eR(this)&&this.run()}get dirty(){return eR(this)}}let ew=0;function ek(e,t=!1){if(e.flags|=8,t){e.next=r,r=e;return}e.next=l,l=e}function eC(){let e;if(!(--ew>0)){if(r){let e=r;for(r=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}for(;l;){let t=l;for(l=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}}function eT(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function eO(e){let t;let n=e.depsTail,l=n;for(;l;){let e=l.prevDep;-1===l.version?(l===n&&(n=e),eE(l),function(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}(l)):t=l,l.dep.activeLink=l.prevActiveLink,l.prevActiveLink=void 0,l=e}e.deps=t,e.depsTail=n}function eR(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(eP(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function eP(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===eI))return;e.globalVersion=eI;let t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!eR(e)){e.flags&=-3;return}let l=n,r=eM;n=e,eM=!0;try{eT(e);let n=e.fn(e._value);(0===t.version||q(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{n=l,eM=r,eO(e),e.flags&=-3}}function eE(e,t=!1){let{dep:n,prevSub:l,nextSub:r}=e;if(l&&(l.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=l,e.nextSub=void 0),n.subs===e&&(n.subs=l,!l&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)eE(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}let eM=!0,eA=[];function e$(){eA.push(eM),eM=!1}function ej(){let e=eA.pop();eM=void 0===e||e}function eD(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=n;n=void 0;try{t()}finally{n=e}}}let eI=0;class eN{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class eF{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!n||!eM||n===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==n)t=this.activeLink=new eN(n,this),n.deps?(t.prevDep=n.depsTail,n.depsTail.nextDep=t,n.depsTail=t):n.deps=n.depsTail=t,function e(t){if(t.dep.sc++,4&t.sub.flags){let n=t.dep.computed;if(n&&!t.dep.subs){n.flags|=20;for(let t=n.deps;t;t=t.nextDep)e(t)}let l=t.dep.subs;l!==t&&(t.prevSub=l,l&&(l.nextSub=t)),t.dep.subs=t}}(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=n.depsTail,t.nextDep=void 0,n.depsTail.nextDep=t,n.depsTail=t,n.deps===t&&(n.deps=e)}return t}trigger(e){this.version++,eI++,this.notify(e)}notify(e){ew++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{eC()}}}let eL=new WeakMap,eV=Symbol(""),eW=Symbol(""),eU=Symbol("");function eB(e,t,l){if(eM&&n){let t=eL.get(e);t||eL.set(e,t=new Map);let n=t.get(l);n||(t.set(l,n=new eF),n.map=t,n.key=l),n.track()}}function eH(e,t,n,l,r,i){let s=eL.get(e);if(!s){eI++;return}let o=e=>{e&&e.trigger()};if(ew++,"clear"===t)s.forEach(o);else{let r=w(e),i=r&&I(n);if(r&&"length"===n){let e=Number(l);s.forEach((t,n)=>{("length"===n||n===eU||!P(n)&&n>=e)&&o(t)})}else switch((void 0!==n||s.has(void 0))&&o(s.get(n)),i&&o(s.get(eU)),t){case"add":r?i&&o(s.get("length")):(o(s.get(eV)),k(e)&&o(s.get(eW)));break;case"delete":!r&&(o(s.get(eV)),k(e)&&o(s.get(eW)));break;case"set":k(e)&&o(s.get(eV))}}eC()}function eq(e){let t=tv(e);return t===e?t:(eB(t,"iterate",eU),th(e)?t:t.map(tm))}function eG(e){return eB(e=tv(e),"iterate",eU),e}let ez={__proto__:null,[Symbol.iterator](){return eK(this,Symbol.iterator,tm)},concat(...e){return eq(this).concat(...e.map(e=>w(e)?eq(e):e))},entries(){return eK(this,"entries",e=>(e[1]=tm(e[1]),e))},every(e,t){return eZ(this,"every",e,t,void 0,arguments)},filter(e,t){return eZ(this,"filter",e,t,e=>e.map(tm),arguments)},find(e,t){return eZ(this,"find",e,t,tm,arguments)},findIndex(e,t){return eZ(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return eZ(this,"findLast",e,t,tm,arguments)},findLastIndex(e,t){return eZ(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return eZ(this,"forEach",e,t,void 0,arguments)},includes(...e){return eQ(this,"includes",e)},indexOf(...e){return eQ(this,"indexOf",e)},join(e){return eq(this).join(e)},lastIndexOf(...e){return eQ(this,"lastIndexOf",e)},map(e,t){return eZ(this,"map",e,t,void 0,arguments)},pop(){return eY(this,"pop")},push(...e){return eY(this,"push",e)},reduce(e,...t){return eX(this,"reduce",e,t)},reduceRight(e,...t){return eX(this,"reduceRight",e,t)},shift(){return eY(this,"shift")},some(e,t){return eZ(this,"some",e,t,void 0,arguments)},splice(...e){return eY(this,"splice",e)},toReversed(){return eq(this).toReversed()},toSorted(e){return eq(this).toSorted(e)},toSpliced(...e){return eq(this).toSpliced(...e)},unshift(...e){return eY(this,"unshift",e)},values(){return eK(this,"values",tm)}};function eK(e,t,n){let l=eG(e),r=l[t]();return l===e||th(e)||(r._next=r.next,r.next=()=>{let e=r._next();return e.value&&(e.value=n(e.value)),e}),r}let eJ=Array.prototype;function eZ(e,t,n,l,r,i){let s=eG(e),o=s!==e&&!th(e),a=s[t];if(a!==eJ[t]){let t=a.apply(e,i);return o?tm(t):t}let u=n;s!==e&&(o?u=function(t,l){return n.call(this,tm(t),l,e)}:n.length>2&&(u=function(t,l){return n.call(this,t,l,e)}));let c=a.call(s,u,l);return o&&r?r(c):c}function eX(e,t,n,l){let r=eG(e),i=n;return r!==e&&(th(e)?n.length>3&&(i=function(t,l,r){return n.call(this,t,l,r,e)}):i=function(t,l,r){return n.call(this,t,tm(l),r,e)}),r[t](i,...l)}function eQ(e,t,n){let l=tv(e);eB(l,"iterate",eU);let r=l[t](...n);return(-1===r||!1===r)&&tg(n[0])?(n[0]=tv(n[0]),l[t](...n)):r}function eY(e,t,n=[]){e$(),ew++;let l=tv(e)[t].apply(e,n);return eC(),ej(),l}let e0=f("__proto__,__v_isRef,__isVue"),e1=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(P));function e2(e){P(e)||(e=String(e));let t=tv(this);return eB(t,"has",e),t.hasOwnProperty(e)}class e6{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if("__v_skip"===t)return e.__v_skip;let l=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!l;if("__v_isReadonly"===t)return l;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(l?r?ta:to:r?ts:ti).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let i=w(e);if(!l){let e;if(i&&(e=ez[t]))return e;if("hasOwnProperty"===t)return e2}let s=Reflect.get(e,t,t_(e)?e:n);return(P(t)?e1.has(t):e0(t))?s:(l||eB(e,"get",t),r)?s:t_(s)?i&&I(t)?s:s.value:E(s)?l?tc(s):tu(s):s}}class e4 extends e6{constructor(e=!1){super(!1,e)}set(e,t,n,l){let r=e[t];if(!this._isShallow){let t=td(r);if(th(n)||td(n)||(r=tv(r),n=tv(n)),!w(e)&&t_(r)&&!t_(n))return!t&&(r.value=n,!0)}let i=w(e)&&I(t)?Number(t)<e.length:S(e,t),s=Reflect.set(e,t,n,t_(e)?e:l);return e===tv(l)&&(i?q(n,r)&&eH(e,"set",t,n):eH(e,"add",t,n)),s}deleteProperty(e,t){let n=S(e,t);e[t];let l=Reflect.deleteProperty(e,t);return l&&n&&eH(e,"delete",t,void 0),l}has(e,t){let n=Reflect.has(e,t);return P(t)&&e1.has(t)||eB(e,"has",t),n}ownKeys(e){return eB(e,"iterate",w(e)?"length":eV),Reflect.ownKeys(e)}}let e8=new e4,e3=new class extends e6{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},e5=new e4(!0),e9=e=>e,e7=e=>Reflect.getPrototypeOf(e);function te(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function tt(e,t){let n=function(e,t){let n={get(n){let l=this.__v_raw,r=tv(l),i=tv(n);e||(q(n,i)&&eB(r,"get",n),eB(r,"get",i));let{has:s}=e7(r),o=t?e9:e?ty:tm;return s.call(r,n)?o(l.get(n)):s.call(r,i)?o(l.get(i)):void(l!==r&&l.get(n))},get size(){let t=this.__v_raw;return e||eB(tv(t),"iterate",eV),Reflect.get(t,"size",t)},has(t){let n=this.__v_raw,l=tv(n),r=tv(t);return e||(q(t,r)&&eB(l,"has",t),eB(l,"has",r)),t===r?n.has(t):n.has(t)||n.has(r)},forEach(n,l){let r=this,i=r.__v_raw,s=tv(i),o=t?e9:e?ty:tm;return e||eB(s,"iterate",eV),i.forEach((e,t)=>n.call(l,o(e),o(t),r))}};return _(n,e?{add:te("add"),set:te("set"),delete:te("delete"),clear:te("clear")}:{add(e){t||th(e)||td(e)||(e=tv(e));let n=tv(this);return e7(n).has.call(n,e)||(n.add(e),eH(n,"add",e,e)),this},set(e,n){t||th(n)||td(n)||(n=tv(n));let l=tv(this),{has:r,get:i}=e7(l),s=r.call(l,e);s||(e=tv(e),s=r.call(l,e));let o=i.call(l,e);return l.set(e,n),s?q(n,o)&&eH(l,"set",e,n):eH(l,"add",e,n),this},delete(e){let t=tv(this),{has:n,get:l}=e7(t),r=n.call(t,e);r||(e=tv(e),r=n.call(t,e)),l&&l.call(t,e);let i=t.delete(e);return r&&eH(t,"delete",e,void 0),i},clear(){let e=tv(this),t=0!==e.size,n=e.clear();return t&&eH(e,"clear",void 0,void 0),n}}),["keys","values","entries",Symbol.iterator].forEach(l=>{n[l]=function(...n){let r=this.__v_raw,i=tv(r),s=k(i),o="entries"===l||l===Symbol.iterator&&s,a=r[l](...n),u=t?e9:e?ty:tm;return e||eB(i,"iterate","keys"===l&&s?eW:eV),{next(){let{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:o?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}),n}(e,t);return(t,l,r)=>"__v_isReactive"===l?!e:"__v_isReadonly"===l?e:"__v_raw"===l?t:Reflect.get(S(n,l)&&l in t?n:t,l,r)}let tn={get:tt(!1,!1)},tl={get:tt(!1,!0)},tr={get:tt(!0,!1)},ti=new WeakMap,ts=new WeakMap,to=new WeakMap,ta=new WeakMap;function tu(e){return td(e)?e:tf(e,!1,e8,tn,ti)}function tc(e){return tf(e,!0,e3,tr,to)}function tf(e,t,n,l,r){if(!E(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let i=r.get(e);if(i)return i;let s=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(j(e));if(0===s)return e;let o=new Proxy(e,2===s?l:n);return r.set(e,o),o}function tp(e){return td(e)?tp(e.__v_raw):!!(e&&e.__v_isReactive)}function td(e){return!!(e&&e.__v_isReadonly)}function th(e){return!!(e&&e.__v_isShallow)}function tg(e){return!!e&&!!e.__v_raw}function tv(e){let t=e&&e.__v_raw;return t?tv(t):e}let tm=e=>E(e)?tu(e):e,ty=e=>E(e)?tc(e):e;function t_(e){return!!e&&!0===e.__v_isRef}let tb={get:(e,t,n)=>{var l;return"__v_raw"===t?e:t_(l=Reflect.get(e,t,n))?l.value:l},set:(e,t,n,l)=>{let r=e[t];return t_(r)&&!t_(n)?(r.value=n,!0):Reflect.set(e,t,n,l)}};function tx(e){return tp(e)?e:new Proxy(e,tb)}class tS{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new eF(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=eI-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags)&&n!==this)return ek(this,!0),!0}get value(){let e=this.dep.track();return eP(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}let tw={},tk=new WeakMap;function tC(e,t=1/0,n){if(t<=0||!E(e)||e.__v_skip||(n=n||new Set).has(e))return e;if(n.add(e),t--,t_(e))tC(e.value,t,n);else if(w(e))for(let l=0;l<e.length;l++)tC(e[l],t,n);else if(C(e)||k(e))e.forEach(e=>{tC(e,t,n)});else if(D(e)){for(let l in e)tC(e[l],t,n);for(let l of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,l)&&tC(e[l],t,n)}return e}function tT(e,t,n,l){try{return l?e(...l):e()}catch(e){tR(e,t,n)}}function tO(e,t,n,l){if(O(e)){let r=tT(e,t,n,l);return r&&M(r)&&r.catch(e=>{tR(e,t,n)}),r}if(w(e)){let r=[];for(let i=0;i<e.length;i++)r.push(tO(e[i],t,n,l));return r}}function tR(e,t,n,l=!0){t&&t.vnode;let{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||p;if(t){let l=t.parent,i=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){let t=l.ec;if(t){for(let n=0;n<t.length;n++)if(!1===t[n](e,i,s))return}l=l.parent}if(r){e$(),tT(r,null,10,[e,i,s]),ej();return}}!function(e,t,n,l=!0,r=!1){if(r)throw e;console.error(e)}(e,0,0,l,i)}let tP=[],tE=-1,tM=[],tA=null,t$=0,tj=Promise.resolve(),tD=null;function tI(e){let t=tD||tj;return e?t.then(this?e.bind(this):e):t}function tN(e){if(!(1&e.flags)){let t=tW(e),n=tP[tP.length-1];!n||!(2&e.flags)&&t>=tW(n)?tP.push(e):tP.splice(function(e){let t=tE+1,n=tP.length;for(;t<n;){let l=t+n>>>1,r=tP[l],i=tW(r);i<e||i===e&&2&r.flags?t=l+1:n=l}return t}(t),0,e),e.flags|=1,tF()}}function tF(){tD||(tD=tj.then(function e(t){try{for(tE=0;tE<tP.length;tE++){let e=tP[tE];!e||8&e.flags||(4&e.flags&&(e.flags&=-2),tT(e,e.i,e.i?15:14),4&e.flags||(e.flags&=-2))}}finally{for(;tE<tP.length;tE++){let e=tP[tE];e&&(e.flags&=-2)}tE=-1,tP.length=0,tV(),tD=null,(tP.length||tM.length)&&e()}}))}function tL(e,t,n=tE+1){for(;n<tP.length;n++){let t=tP[n];if(t&&2&t.flags){if(e&&t.id!==e.uid)continue;tP.splice(n,1),n--,4&t.flags&&(t.flags&=-2),t(),4&t.flags||(t.flags&=-2)}}}function tV(e){if(tM.length){let e=[...new Set(tM)].sort((e,t)=>tW(e)-tW(t));if(tM.length=0,tA){tA.push(...e);return}for(t$=0,tA=e;t$<tA.length;t$++){let e=tA[t$];4&e.flags&&(e.flags&=-2),8&e.flags||e(),e.flags&=-2}tA=null,t$=0}}let tW=e=>null==e.id?2&e.flags?-1:1/0:e.id,tU=null,tB=null;function tH(e){let t=tU;return tU=e,tB=e&&e.type.__scopeId||null,t}function tq(e,t,n,l){let r=e.dirs,i=t&&t.dirs;for(let s=0;s<r.length;s++){let o=r[s];i&&(o.oldValue=i[s].value);let a=o.dir[l];a&&(e$(),tO(a,n,8,[e.el,o,e,t]),ej())}}let tG=Symbol("_vte"),tz=e=>e.__isTeleport;function tK(e,t){6&e.shapeFlag&&e.component?(e.transition=t,tK(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function tJ(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function tZ(e,t,n,l,r=!1){if(w(e)){e.forEach((e,i)=>tZ(e,t&&(w(t)?t[i]:t),n,l,r));return}if(tX(l)&&!r){512&l.shapeFlag&&l.type.__asyncResolved&&l.component.subTree.component&&tZ(e,t,n,l.component.subTree);return}let i=4&l.shapeFlag?lx(l.component):l.el,s=r?null:i,{i:o,r:a}=e,u=t&&t.r,c=o.refs===p?o.refs={}:o.refs,f=o.setupState,d=tv(f),h=f===p?()=>!1:e=>S(d,e);if(null!=u&&u!==a&&(R(u)?(c[u]=null,h(u)&&(f[u]=null)):t_(u)&&(u.value=null)),O(a))tT(a,o,12,[s,c]);else{let t=R(a),l=t_(a);if(t||l){let o=()=>{if(e.f){let n=t?h(a)?f[a]:c[a]:a.value;r?w(n)&&b(n,i):w(n)?n.includes(i)||n.push(i):t?(c[a]=[i],h(a)&&(f[a]=c[a])):(a.value=[i],e.k&&(c[e.k]=a.value))}else t?(c[a]=s,h(a)&&(f[a]=s)):l&&(a.value=s,e.k&&(c[e.k]=s))};s?(o.id=-1,nL(o,n)):o()}}}let tX=e=>!!e.type.__asyncLoader,tQ=e=>e.type.__isKeepAlive;function tY(e,t){t1(e,"a",t)}function t0(e,t){t1(e,"da",t)}function t1(e,t,n=lp){let l=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(t2(t,l,n),n){let e=n.parent;for(;e&&e.parent;)tQ(e.parent.vnode)&&function(e,t,n,l){let r=t2(t,e,l,!0);t7(()=>{b(l[t],r)},n)}(l,t,n,e),e=e.parent}}function t2(e,t,n=lp,l=!1){if(n){let r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...l)=>{e$();let r=ld(n),i=tO(t,n,e,l);return r(),ej(),i});return l?r.unshift(i):r.push(i),i}}let t6=e=>(t,n=lp)=>{lv&&"sp"!==e||t2(e,(...e)=>t(...e),n)},t4=t6("bm"),t8=t6("m"),t3=t6("bu"),t5=t6("u"),t9=t6("bum"),t7=t6("um"),ne=t6("sp"),nt=t6("rtg"),nn=t6("rtc");function nl(e,t=lp){t2("ec",e,t)}let nr=Symbol.for("v-ndc"),ni=e=>e?lg(e)?lx(e):ni(e.parent):null,ns=_(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ni(e.parent),$root:e=>ni(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>np(e),$forceUpdate:e=>e.f||(e.f=()=>{tN(e.update)}),$nextTick:e=>e.n||(e.n=tI.bind(e.proxy)),$watch:e=>nG.bind(e)}),no=(e,t)=>e!==p&&!e.__isScriptSetup&&S(e,t),na={get({_:e},t){let n,l,r;if("__v_skip"===t)return!0;let{ctx:i,setupState:s,data:o,props:a,accessCache:u,type:c,appContext:f}=e;if("$"!==t[0]){let l=u[t];if(void 0!==l)switch(l){case 1:return s[t];case 2:return o[t];case 4:return i[t];case 3:return a[t]}else{if(no(s,t))return u[t]=1,s[t];if(o!==p&&S(o,t))return u[t]=2,o[t];if((n=e.propsOptions[0])&&S(n,t))return u[t]=3,a[t];if(i!==p&&S(i,t))return u[t]=4,i[t];nc&&(u[t]=0)}}let d=ns[t];return d?("$attrs"===t&&eB(e.attrs,"get",""),d(e)):(l=c.__cssModules)&&(l=l[t])?l:i!==p&&S(i,t)?(u[t]=4,i[t]):S(r=f.config.globalProperties,t)?r[t]:void 0},set({_:e},t,n){let{data:l,setupState:r,ctx:i}=e;return no(r,t)?(r[t]=n,!0):l!==p&&S(l,t)?(l[t]=n,!0):!S(e.props,t)&&!("$"===t[0]&&t.slice(1)in e)&&(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:l,appContext:r,propsOptions:i}},s){let o;return!!n[s]||e!==p&&S(e,s)||no(t,s)||(o=i[0])&&S(o,s)||S(l,s)||S(ns,s)||S(r.config.globalProperties,s)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:S(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function nu(e){return w(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}let nc=!0;function nf(e,t,n){tO(w(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function np(e){let t;let n=e.type,{mixins:l,extends:r}=n,{mixins:i,optionsCache:s,config:{optionMergeStrategies:o}}=e.appContext,a=s.get(n);return a?t=a:i.length||l||r?(t={},i.length&&i.forEach(e=>nd(t,e,o,!0)),nd(t,n,o)):t=n,E(n)&&s.set(n,t),t}function nd(e,t,n,l=!1){let{mixins:r,extends:i}=t;for(let s in i&&nd(e,i,n,!0),r&&r.forEach(t=>nd(e,t,n,!0)),t)if(l&&"expose"===s);else{let l=nh[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}let nh={data:ng,props:n_,emits:n_,methods:ny,computed:ny,beforeCreate:nm,created:nm,beforeMount:nm,mounted:nm,beforeUpdate:nm,updated:nm,beforeDestroy:nm,beforeUnmount:nm,destroyed:nm,unmounted:nm,activated:nm,deactivated:nm,errorCaptured:nm,serverPrefetch:nm,components:ny,directives:ny,watch:function(e,t){if(!e)return t;if(!t)return e;let n=_(Object.create(null),e);for(let l in t)n[l]=nm(e[l],t[l]);return n},provide:ng,inject:function(e,t){return ny(nv(e),nv(t))}};function ng(e,t){return t?e?function(){return _(O(e)?e.call(this,this):e,O(t)?t.call(this,this):t)}:t:e}function nv(e){if(w(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function nm(e,t){return e?[...new Set([].concat(e,t))]:t}function ny(e,t){return e?_(Object.create(null),e,t):t}function n_(e,t){return e?w(e)&&w(t)?[...new Set([...e,...t])]:_(Object.create(null),nu(e),nu(null!=t?t:{})):t}function nb(){return{app:null,config:{isNativeTag:g,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let nx=0,nS=null;function nw(e,t,n=!1){let l=lp||tU;if(l||nS){let r=nS?nS._context.provides:l?null==l.parent?l.vnode.appContext&&l.vnode.appContext.provides:l.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&O(t)?t.call(l&&l.proxy):t}}let nk={},nC=()=>Object.create(nk),nT=e=>Object.getPrototypeOf(e)===nk;function nO(e,t,n,l){let r;let[i,s]=e.propsOptions,o=!1;if(t)for(let a in t){let u;if(N(a))continue;let c=t[a];i&&S(i,u=V(a))?s&&s.includes(u)?(r||(r={}))[u]=c:n[u]=c:nZ(e.emitsOptions,a)||a in l&&c===l[a]||(l[a]=c,o=!0)}if(s){let t=tv(n),l=r||p;for(let r=0;r<s.length;r++){let o=s[r];n[o]=nR(i,t,o,l[o],e,!S(l,o))}}return o}function nR(e,t,n,l,r,i){let s=e[n];if(null!=s){let e=S(s,"default");if(e&&void 0===l){let e=s.default;if(s.type!==Function&&!s.skipFactory&&O(e)){let{propsDefaults:i}=r;if(n in i)l=i[n];else{let s=ld(r);l=i[n]=e.call(null,t),s()}}else l=e;r.ce&&r.ce._setProp(n,l)}s[0]&&(i&&!e?l=!1:s[1]&&(""===l||l===U(n))&&(l=!0))}return l}let nP=new WeakMap;function nE(e){return!("$"===e[0]||N(e))}let nM=e=>"_"===e[0]||"$stable"===e,nA=e=>w(e)?e.map(lr):[lr(e)],n$=(e,t,n)=>{if(t._n)return t;let l=function(e,t=tU,n){if(!t||e._n)return e;let l=(...n)=>{let r;l._d&&n5(-1);let i=tH(t);try{r=e(...n)}finally{tH(i),l._d&&n5(1)}return r};return l._n=!0,l._c=!0,l._d=!0,l}((...e)=>nA(t(...e)),n);return l._c=!1,l},nj=(e,t,n)=>{let l=e._ctx;for(let n in e){if(nM(n))continue;let r=e[n];if(O(r))t[n]=n$(n,r,l);else if(null!=r){let e=nA(r);t[n]=()=>e}}},nD=(e,t)=>{let n=nA(t);e.slots.default=()=>n},nI=(e,t,n)=>{for(let l in t)(n||"_"!==l)&&(e[l]=t[l])},nN=(e,t,n)=>{let l=e.slots=nC();if(32&e.vnode.shapeFlag){let e=t._;e?(nI(l,t,n),n&&z(l,"_",e,!0)):nj(t,l)}else t&&nD(e,t)},nF=(e,t,n)=>{let{vnode:l,slots:r}=e,i=!0,s=p;if(32&l.shapeFlag){let e=t._;e?n&&1===e?i=!1:nI(r,t,n):(i=!t.$stable,nj(t,r)),s=t}else t&&(nD(e,t),s={default:1});if(i)for(let e in r)nM(e)||null!=s[e]||delete r[e]},nL=function(e,t){t&&t.pendingBranch?w(e)?t.effects.push(...e):t.effects.push(e):(w(e)?tM.push(...e):tA&&-1===e.id?tA.splice(t$+1,0,e):1&e.flags||(tM.push(e),e.flags|=1),tF())};function nV({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function nW({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function nU(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}let nB=Symbol.for("v-scx"),nH=()=>nw(nB);function nq(e,n,l=p){let r;let{immediate:i,deep:s,flush:o,once:a}=l,c=_({},l),f=n&&i||!n&&"post"!==o;if(lv){if("sync"===o){let e=nH();r=e.__watcherHandles||(e.__watcherHandles=[])}else if(!f){let e=()=>{};return e.stop=h,e.resume=h,e.pause=h,e}}let d=lp;c.call=(e,t,n)=>tO(e,d,t,n);let g=!1;"post"===o?c.scheduler=e=>{nL(e,d&&d.suspense)}:"sync"!==o&&(g=!0,c.scheduler=(e,t)=>{t?e():tN(e)}),c.augmentJob=e=>{n&&(e.flags|=4),g&&(e.flags|=2,d&&(e.id=d.uid,e.i=d))};let m=function(e,n,l=p){let r,i,s,o;let{immediate:a,deep:c,once:f,scheduler:d,augmentJob:g,call:m}=l,y=e=>c?e:th(e)||!1===c||0===c?tC(e,1):tC(e),_=!1,x=!1;if(t_(e)?(i=()=>e.value,_=th(e)):tp(e)?(i=()=>y(e),_=!0):w(e)?(x=!0,_=e.some(e=>tp(e)||th(e)),i=()=>e.map(e=>t_(e)?e.value:tp(e)?y(e):O(e)?m?m(e,2):e():void 0)):i=O(e)?n?m?()=>m(e,2):e:()=>{if(s){e$();try{s()}finally{ej()}}let t=u;u=r;try{return m?m(e,3,[o]):e(o)}finally{u=t}}:h,n&&c){let e=i,t=!0===c?1/0:c;i=()=>tC(e(),t)}let S=t,k=()=>{r.stop(),S&&S.active&&b(S.effects,r)};if(f&&n){let e=n;n=(...t)=>{e(...t),k()}}let C=x?Array(e.length).fill(tw):tw,T=e=>{if(1&r.flags&&(r.dirty||e)){if(n){let e=r.run();if(c||_||(x?e.some((e,t)=>q(e,C[t])):q(e,C))){s&&s();let t=u;u=r;try{let t=[e,C===tw?void 0:x&&C[0]===tw?[]:C,o];m?m(n,3,t):n(...t),C=e}finally{u=t}}}else r.run()}};return g&&g(T),(r=new eS(i)).scheduler=d?()=>d(T,!1):T,o=e=>(function(e,t=!1,n=u){if(n){let t=tk.get(n);t||tk.set(n,t=[]),t.push(e)}})(e,!1,r),s=r.onStop=()=>{let e=tk.get(r);if(e){if(m)m(e,4);else for(let t of e)t();tk.delete(r)}},n?a?T(!0):C=r.run():d?d(T.bind(null,!0),!0):r.run(),k.pause=r.pause.bind(r),k.resume=r.resume.bind(r),k.stop=k,k}(e,n,c);return lv&&(r?r.push(m):f&&m()),m}function nG(e,t,n){let l;let r=this.proxy,i=R(e)?e.includes(".")?nz(r,e):()=>r[e]:e.bind(r,r);O(t)?l=t:(l=t.handler,n=t);let s=ld(this),o=nq(i,l.bind(r),n);return s(),o}function nz(e,t){let n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}let nK=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${V(t)}Modifiers`]||e[`${U(t)}Modifiers`];function nJ(e,t,...n){let l;if(e.isUnmounted)return;let r=e.vnode.props||p,i=n,s=t.startsWith("update:"),o=s&&nK(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>R(e)?e.trim():e)),o.number&&(i=n.map(K)));let a=r[l=H(t)]||r[l=H(V(t))];!a&&s&&(a=r[l=H(U(t))]),a&&tO(a,e,6,i);let u=r[l+"Once"];if(u){if(e.emitted){if(e.emitted[l])return}else e.emitted={};e.emitted[l]=!0,tO(u,e,6,i)}}function nZ(e,t){return!!(e&&m(t))&&(S(e,(t=t.slice(2).replace(/Once$/,""))[0].toLowerCase()+t.slice(1))||S(e,U(t))||S(e,t))}function nX(e){let t,n;let{type:l,vnode:r,proxy:i,withProxy:s,propsOptions:[o],slots:a,attrs:u,emit:c,render:f,renderCache:p,props:d,data:h,setupState:g,ctx:m,inheritAttrs:_}=e,b=tH(e);try{if(4&r.shapeFlag){let e=s||i;t=lr(f.call(e,e,p,d,g,h,m)),n=u}else t=lr(l.length>1?l(d,{attrs:u,slots:a,emit:c}):l(d,null)),n=l.props?u:nQ(u)}catch(n){tR(n,e,1),t=ln(n4)}let x=t;if(n&&!1!==_){let e=Object.keys(n),{shapeFlag:t}=x;e.length&&7&t&&(o&&e.some(y)&&(n=nY(n,o)),x=ll(x,n,!1,!0))}return r.dirs&&((x=ll(x,null,!1,!0)).dirs=x.dirs?x.dirs.concat(r.dirs):r.dirs),r.transition&&tK(x,r.transition),t=x,tH(b),t}let nQ=e=>{let t;for(let n in e)("class"===n||"style"===n||m(n))&&((t||(t={}))[n]=e[n]);return t},nY=(e,t)=>{let n={};for(let l in e)y(l)&&l.slice(9)in t||(n[l]=e[l]);return n};function n0(e,t,n){let l=Object.keys(t);if(l.length!==Object.keys(e).length)return!0;for(let r=0;r<l.length;r++){let i=l[r];if(t[i]!==e[i]&&!nZ(n,i))return!0}return!1}let n1=e=>e.__isSuspense,n2=Symbol.for("v-fgt"),n6=Symbol.for("v-txt"),n4=Symbol.for("v-cmt"),n8=Symbol.for("v-stc"),n3=1;function n5(e,t=!1){n3+=e}function n9(e){return!!e&&!0===e.__v_isVNode}function n7(e,t){return e.type===t.type&&e.key===t.key}let le=({key:e})=>null!=e?e:null,lt=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?R(e)||t_(e)||O(e)?{i:tU,r:e,k:t,f:!!n}:e:null),ln=function(e,t=null,n=null,l=0,r=null,i=!1){var s,o;if(e&&e!==nr||(e=n4),n9(e)){let l=ll(e,t,!0);return n&&ls(l,n),l.patchFlag=-2,l}if(O(s=e)&&"__vccOpts"in s&&(e=e.__vccOpts),t){let{class:e,style:n}=t=(o=t)?tg(o)||nT(o)?_({},o):o:null;e&&!R(e)&&(t.class=ee(e)),E(n)&&(tg(n)&&!w(n)&&(n=_({},n)),t.style=Z(n))}let a=R(e)?1:n1(e)?128:tz(e)?64:E(e)?4:O(e)?2:0;return function(e,t=null,n=null,l=0,r=null,i=e===n2?0:1,s=!1,o=!1){let a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&le(t),ref:t&<(t),scopeId:tB,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:l,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:tU};return o?(ls(a,n),128&i&&e.normalize(a)):n&&(a.shapeFlag|=R(n)?8:16),a}(e,t,n,l,r,a,i,!0)};function ll(e,t,n=!1,l=!1){let{props:r,ref:i,patchFlag:s,children:o,transition:a}=e,u=t?lo(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&le(u),ref:t&&t.ref?n&&i?w(i)?i.concat(lt(t)):[i,lt(t)]:lt(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==n2?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ll(e.ssContent),ssFallback:e.ssFallback&&ll(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&l&&tK(c,a.clone(c)),c}function lr(e){return null==e||"boolean"==typeof e?ln(n4):w(e)?ln(n2,null,e.slice()):n9(e)?li(e):ln(n6,null,String(e))}function li(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:ll(e)}function ls(e,t){let n=0,{shapeFlag:l}=e;if(null==t)t=null;else if(w(t))n=16;else if("object"==typeof t){if(65&l){let n=t.default;n&&(n._c&&(n._d=!1),ls(e,n()),n._c&&(n._d=!0));return}{n=32;let l=t._;l||nT(t)?3===l&&tU&&(1===tU.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=tU}}else O(t)?(t={default:t,_ctx:tU},n=32):(t=String(t),64&l?(n=16,t=[function(e=" ",t=0){return ln(n6,null,e,t)}(t)]):n=8);e.children=t,e.shapeFlag|=n}function lo(...e){let t={};for(let n=0;n<e.length;n++){let l=e[n];for(let e in l)if("class"===e)t.class!==l.class&&(t.class=ee([t.class,l.class]));else if("style"===e)t.style=Z([t.style,l.style]);else if(m(e)){let n=t[e],r=l[e];r&&n!==r&&!(w(n)&&n.includes(r))&&(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=l[e])}return t}function la(e,t,n,l=null){tO(e,t,7,[n,l])}let lu=nb(),lc=0;function lf(e,t,n){let l=e.type,r=(t?t.appContext:e.appContext)||lu,i={uid:lc++,vnode:e,type:l,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new eb(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:function e(t,n,l=!1){let r=l?nP:n.propsCache,i=r.get(t);if(i)return i;let s=t.props,o={},a=[],u=!1;if(!O(t)){let r=t=>{u=!0;let[l,r]=e(t,n,!0);_(o,l),r&&a.push(...r)};!l&&n.mixins.length&&n.mixins.forEach(r),t.extends&&r(t.extends),t.mixins&&t.mixins.forEach(r)}if(!s&&!u)return E(t)&&r.set(t,d),d;if(w(s))for(let e=0;e<s.length;e++){let t=V(s[e]);nE(t)&&(o[t]=p)}else if(s)for(let e in s){let t=V(e);if(nE(t)){let n=s[e],l=o[t]=w(n)||O(n)?{type:n}:_({},n),r=l.type,i=!1,u=!0;if(w(r))for(let e=0;e<r.length;++e){let t=r[e],n=O(t)&&t.name;if("Boolean"===n){i=!0;break}"String"===n&&(u=!1)}else i=O(r)&&"Boolean"===r.name;l[0]=i,l[1]=u,(i||S(l,"default"))&&a.push(t)}}let c=[o,a];return E(t)&&r.set(t,c),c}(l,r),emitsOptions:function e(t,n,l=!1){let r=n.emitsCache,i=r.get(t);if(void 0!==i)return i;let s=t.emits,o={},a=!1;if(!O(t)){let r=t=>{let l=e(t,n,!0);l&&(a=!0,_(o,l))};!l&&n.mixins.length&&n.mixins.forEach(r),t.extends&&r(t.extends),t.mixins&&t.mixins.forEach(r)}return s||a?(w(s)?s.forEach(e=>o[e]=null):_(o,s),E(t)&&r.set(t,o),o):(E(t)&&r.set(t,null),null)}(l,r),emit:null,emitted:null,propsDefaults:p,inheritAttrs:l.inheritAttrs,ctx:p,data:p,props:p,attrs:p,slots:p,refs:p,setupState:p,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=nJ.bind(null,i),e.ce&&e.ce(i),i}let lp=null;{let e=J(),t=(t,n)=>{let l;return(l=e[t])||(l=e[t]=[]),l.push(n),e=>{l.length>1?l.forEach(t=>t(e)):l[0](e)}};i=t("__VUE_INSTANCE_SETTERS__",e=>lp=e),s=t("__VUE_SSR_SETTERS__",e=>lv=e)}let ld=e=>{let t=lp;return i(e),e.scope.on(),()=>{e.scope.off(),i(t)}},lh=()=>{lp&&lp.scope.off(),i(null)};function lg(e){return 4&e.vnode.shapeFlag}let lv=!1;function lm(e,t=!1,n=!1){t&&s(t);let{props:l,children:r}=e.vnode,i=lg(e);!function(e,t,n,l=!1){let r={},i=nC();for(let n in e.propsDefaults=Object.create(null),nO(e,t,r,i),e.propsOptions[0])n in r||(r[n]=void 0);n?e.props=l?r:tf(r,!1,e5,tl,ts):e.type.props?e.props=r:e.props=i,e.attrs=i}(e,l,i,t),nN(e,r,n);let o=i?function(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,na);let{setup:l}=n;if(l){e$();let n=e.setupContext=l.length>1?{attrs:new Proxy(e.attrs,lb),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}:null,r=ld(e),i=tT(l,e,0,[e.props,n]),s=M(i);if(ej(),r(),(s||e.sp)&&!tX(e)&&tJ(e),s){if(i.then(lh,lh),t)return i.then(n=>{ly(e,n,t)}).catch(t=>{tR(t,e,0)});e.asyncDep=i}else ly(e,i,t)}else l_(e,t)}(e,t):void 0;return t&&s(!1),o}function ly(e,t,n){O(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:E(t)&&(e.setupState=tx(t)),l_(e,n)}function l_(e,t,n){let l=e.type;if(!e.render){if(!t&&o&&!l.render){let t=l.template||np(e).template;if(t){let{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:i,compilerOptions:s}=l,a=_(_({isCustomElement:n,delimiters:i},r),s);l.render=o(t,a)}}e.render=l.render||h}{let t=ld(e);e$();try{!function(e){let t=np(e),n=e.proxy,l=e.ctx;nc=!1,t.beforeCreate&&nf(t.beforeCreate,e,"bc");let{data:r,computed:i,methods:s,watch:o,provide:a,inject:u,created:c,beforeMount:f,mounted:p,beforeUpdate:d,updated:g,activated:m,deactivated:y,beforeDestroy:_,beforeUnmount:b,destroyed:x,unmounted:S,render:k,renderTracked:C,renderTriggered:T,errorCaptured:P,serverPrefetch:M,expose:A,inheritAttrs:$,components:j,directives:D,filters:I}=t;if(u&&function(e,t,n=h){for(let n in w(e)&&(e=nv(e)),e){let l;let r=e[n];t_(l=E(r)?"default"in r?nw(r.from||n,r.default,!0):nw(r.from||n):nw(r))?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e}):t[n]=l}}(u,l,null),s)for(let e in s){let t=s[e];O(t)&&(l[e]=t.bind(n))}if(r){let t=r.call(n,n);E(t)&&(e.data=tu(t))}if(nc=!0,i)for(let e in i){let t=i[e],r=O(t)?t.bind(n,n):O(t.get)?t.get.bind(n,n):h,s=lS({get:r,set:!O(t)&&O(t.set)?t.set.bind(n):h});Object.defineProperty(l,e,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e})}if(o)for(let e in o)!function e(t,n,l,r){let i=r.includes(".")?nz(l,r):()=>l[r];if(R(t)){let e=n[t];O(e)&&nq(i,e,void 0)}else if(O(t)){var s;s=t.bind(l),nq(i,s,void 0)}else if(E(t)){if(w(t))t.forEach(t=>e(t,n,l,r));else{let e=O(t.handler)?t.handler.bind(l):n[t.handler];O(e)&&nq(i,e,t)}}}(o[e],l,n,e);if(a){let e=O(a)?a.call(n):a;Reflect.ownKeys(e).forEach(t=>{!function(e,t){if(lp){let n=lp.provides,l=lp.parent&&lp.parent.provides;l===n&&(n=lp.provides=Object.create(l)),n[e]=t}}(t,e[t])})}function N(e,t){w(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(c&&nf(c,e,"c"),N(t4,f),N(t8,p),N(t3,d),N(t5,g),N(tY,m),N(t0,y),N(nl,P),N(nn,C),N(nt,T),N(t9,b),N(t7,S),N(ne,M),w(A)){if(A.length){let t=e.exposed||(e.exposed={});A.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})})}else e.exposed||(e.exposed={})}k&&e.render===h&&(e.render=k),null!=$&&(e.inheritAttrs=$),j&&(e.components=j),D&&(e.directives=D),M&&tJ(e)}(e)}finally{ej(),t()}}}let lb={get:(e,t)=>(eB(e,"get",""),e[t])};function lx(e){var t;return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tx((!S(t=e.exposed,"__v_skip")&&Object.isExtensible(t)&&z(t,"__v_skip",!0),t)),{get:(t,n)=>n in t?t[n]:n in ns?ns[n](e):void 0,has:(e,t)=>t in e||t in ns})):e.proxy}let lS=(e,t)=>(function(e,t,n=!1){let l,r;return O(e)?l=e:(l=e.get,r=e.set),new tS(l,r,n)})(e,0,lv),lw={createComponentInstance:lf,setupComponent:lm,renderComponentRoot:nX,setCurrentRenderingInstance:tH,isVNode:n9,normalizeVNode:lr,getComponentPublicInstance:lx,ensureValidVNode:function e(t){return t.some(t=>!n9(t)||!!(t.type!==n4&&(t.type!==n2||e(t.children))))?t:null},pushWarningContext:function(e){},popWarningContext:function(){}},lk="undefined"!=typeof window&&window.trustedTypes;if(lk)try{c=lk.createPolicy("vue",{createHTML:e=>e})}catch(e){}let lC=c?e=>c.createHTML(e):e=>e,lT="undefined"!=typeof document?document:null,lO=lT&&lT.createElement("template"),lR=Symbol("_vtc"),lP=Symbol("_vod"),lE=Symbol("_vsh"),lM=Symbol(""),lA=/(^|;)\s*display\s*:/,l$=/\s*!important$/;function lj(e,t,n){if(w(n))n.forEach(n=>lj(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{let l=function(e,t){let n=lI[t];if(n)return n;let l=V(t);if("filter"!==l&&l in e)return lI[t]=l;l=B(l);for(let n=0;n<lD.length;n++){let r=lD[n]+l;if(r in e)return lI[t]=r}return t}(e,t);l$.test(n)?e.setProperty(U(l),n.replace(l$,""),"important"):e[l]=n}}let lD=["Webkit","Moz","ms"],lI={},lN="http://www.w3.org/1999/xlink";function lF(e,t,n,l,r,i=er(t)){l&&t.startsWith("xlink:")?null==n?e.removeAttributeNS(lN,t.slice(6,t.length)):e.setAttributeNS(lN,t,n):null==n||i&&!es(n)?e.removeAttribute(t):e.setAttribute(t,i?"":P(n)?String(n):n)}function lL(e,t,n,l,r){if("innerHTML"===t||"textContent"===t){null!=n&&(e[t]="innerHTML"===t?lC(n):n);return}let i=e.tagName;if("value"===t&&"PROGRESS"!==i&&!i.includes("-")){let l="OPTION"===i?e.getAttribute("value")||"":e.value,r=null==n?"checkbox"===e.type?"on":"":String(n);l===r&&"_value"in e||(e.value=r),null==n&&e.removeAttribute(t),e._value=n;return}let s=!1;if(""===n||null==n){let l=typeof e[t];"boolean"===l?n=es(n):null==n&&"string"===l?(n="",s=!0):"number"===l&&(n=0,s=!0)}try{e[t]=n}catch(e){}s&&e.removeAttribute(r||t)}let lV=Symbol("_vei"),lW=/(?:Once|Passive|Capture)$/,lU=0,lB=Promise.resolve(),lH=()=>lU||(lB.then(()=>lU=0),lU=Date.now()),lq=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&123>e.charCodeAt(2);Symbol("_assign");let lG=_({patchProp:(e,t,n,l,r,i)=>{let s="svg"===r;"class"===t?function(e,t,n){let l=e[lR];l&&(t=(t?[t,...l]:[...l]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,l,s):"style"===t?function(e,t,n){let l=e.style,r=R(n),i=!1;if(n&&!r){if(t){if(R(t))for(let e of t.split(";")){let t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&lj(l,t,"")}else for(let e in t)null==n[e]&&lj(l,e,"")}for(let e in n)"display"===e&&(i=!0),lj(l,e,n[e])}else if(r){if(t!==n){let e=l[lM];e&&(n+=";"+e),l.cssText=n,i=lA.test(n)}}else t&&e.removeAttribute("style");lP in e&&(e[lP]=i?l.display:"",e[lE]&&(l.display="none"))}(e,n,l):m(t)?y(t)||function(e,t,n,l,r=null){let i=e[lV]||(e[lV]={}),s=i[t];if(l&&s)s.value=l;else{let[n,o]=function(e){let t;if(lW.test(e)){let n;for(t={};n=e.match(lW);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):U(e.slice(2)),t]}(t);l?function(e,t,n,l){e.addEventListener(t,n,l)}(e,n,i[t]=function(e,t){let n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();tO(function(e,t){if(!w(t))return t;{let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}}(e,n.value),t,5,[e])};return n.value=e,n.attached=lH(),n}(l,r),o):s&&(!function(e,t,n,l){e.removeEventListener(t,n,l)}(e,n,s,o),i[t]=void 0)}}(e,t,0,l,i):("."===t[0]?(t=t.slice(1),0):"^"===t[0]?(t=t.slice(1),1):!function(e,t,n,l){if(l)return!!("innerHTML"===t||"textContent"===t||t in e&&lq(t)&&O(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"form"===t||"list"===t&&"INPUT"===e.tagName||"type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){let t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return!(lq(t)&&R(n))&&t in e}(e,t,l,s))?e._isVueCE&&(/[A-Z]/.test(t)||!R(l))?lL(e,V(t),l,i,t):("true-value"===t?e._trueValue=l:"false-value"===t&&(e._falseValue=l),lF(e,t,l,s)):(lL(e,t,l),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||lF(e,t,l,s,i,"value"!==t))}},{insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,l)=>{let r="svg"===t?lT.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?lT.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?lT.createElement(e,{is:n}):lT.createElement(e);return"select"===e&&l&&null!=l.multiple&&r.setAttribute("multiple",l.multiple),r},createText:e=>lT.createTextNode(e),createComment:e=>lT.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>lT.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,l,r,i){let s=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==i&&(r=r.nextSibling););else{lO.innerHTML=lC("svg"===l?`<svg>${e}</svg>`:"mathml"===l?`<math>${e}</math>`:e);let r=lO.content;if("svg"===l||"mathml"===l){let e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}}),lz=(...e)=>{let t=(a||(a=function(e,t){let n,l;J().__VUE__=!0;let{insert:r,remove:i,patchProp:s,createElement:o,createText:a,createComment:u,setText:c,setElementText:f,parentNode:g,nextSibling:m,setScopeId:y=h,insertStaticContent:b}=e,x=(e,t,n,l=null,r=null,i=null,s,o=null,a=!!t.dynamicChildren)=>{if(e===t)return;e&&!n7(e,t)&&(l=er(e),Y(e,r,i,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);let{type:u,ref:c,shapeFlag:f}=t;switch(u){case n6:k(e,t,n,l);break;case n4:C(e,t,n,l);break;case n8:null==e&&T(t,n,l,s);break;case n2:L(e,t,n,l,r,i,s,o,a);break;default:1&f?M(e,t,n,l,r,i,s,o,a):6&f?W(e,t,n,l,r,i,s,o,a):64&f?u.process(e,t,n,l,r,i,s,o,a,eo):128&f&&u.process(e,t,n,l,r,i,s,o,a,eo)}null!=c&&r&&tZ(c,e&&e.ref,i,t||e,!t)},k=(e,t,n,l)=>{if(null==e)r(t.el=a(t.children),n,l);else{let n=t.el=e.el;t.children!==e.children&&c(n,t.children)}},C=(e,t,n,l)=>{null==e?r(t.el=u(t.children||""),n,l):t.el=e.el},T=(e,t,n,l)=>{[e.el,e.anchor]=b(e.children,t,n,l,e.el,e.anchor)},R=({el:e,anchor:t},n,l)=>{let i;for(;e&&e!==t;)i=m(e),r(e,n,l),e=i;r(t,n,l)},P=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=m(e),i(e),e=n;i(t)},M=(e,t,n,l,r,i,s,o,a)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?A(t,n,l,r,i,s,o,a):D(e,t,r,i,s,o,a)},A=(e,t,n,l,i,a,u,c)=>{let p,d;let{props:h,shapeFlag:g,transition:m,dirs:y}=e;if(p=e.el=o(e.type,a,h&&h.is,h),8&g?f(p,e.children):16&g&&j(e.children,p,null,l,i,nV(e,a),u,c),y&&tq(e,null,l,"created"),$(p,e,e.scopeId,u,l),h){for(let e in h)"value"===e||N(e)||s(p,e,null,h[e],a,l);"value"in h&&s(p,"value",null,h.value,a),(d=h.onVnodeBeforeMount)&&la(d,l,e)}y&&tq(e,null,l,"beforeMount");let _=(!i||i&&!i.pendingBranch)&&m&&!m.persisted;_&&m.beforeEnter(p),r(p,t,n),((d=h&&h.onVnodeMounted)||_||y)&&nL(()=>{d&&la(d,l,e),_&&m.enter(p),y&&tq(e,null,l,"mounted")},i)},$=(e,t,n,l,r)=>{if(n&&y(e,n),l)for(let t=0;t<l.length;t++)y(e,l[t]);if(r){let n=r.subTree;if(t===n||n1(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=r.vnode;$(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},j=(e,t,n,l,r,i,s,o,a=0)=>{for(let u=a;u<e.length;u++)x(null,e[u]=o?li(e[u]):lr(e[u]),t,n,l,r,i,s,o)},D=(e,t,n,l,r,i,o)=>{let a;let u=t.el=e.el,{patchFlag:c,dynamicChildren:d,dirs:h}=t;c|=16&e.patchFlag;let g=e.props||p,m=t.props||p;if(n&&nW(n,!1),(a=m.onVnodeBeforeUpdate)&&la(a,n,t,e),h&&tq(t,e,n,"beforeUpdate"),n&&nW(n,!0),(g.innerHTML&&null==m.innerHTML||g.textContent&&null==m.textContent)&&f(u,""),d?I(e.dynamicChildren,d,u,n,l,nV(t,r),i):o||K(e,t,u,null,n,l,nV(t,r),i,!1),c>0){if(16&c)F(u,g,m,n,r);else if(2&c&&g.class!==m.class&&s(u,"class",null,m.class,r),4&c&&s(u,"style",g.style,m.style,r),8&c){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let l=e[t],i=g[l],o=m[l];(o!==i||"value"===l)&&s(u,l,i,o,r,n)}}1&c&&e.children!==t.children&&f(u,t.children)}else o||null!=d||F(u,g,m,n,r);((a=m.onVnodeUpdated)||h)&&nL(()=>{a&&la(a,n,t,e),h&&tq(t,e,n,"updated")},l)},I=(e,t,n,l,r,i,s)=>{for(let o=0;o<t.length;o++){let a=e[o],u=t[o],c=a.el&&(a.type===n2||!n7(a,u)||70&a.shapeFlag)?g(a.el):n;x(a,u,c,null,l,r,i,s,!0)}},F=(e,t,n,l,r)=>{if(t!==n){if(t!==p)for(let i in t)N(i)||i in n||s(e,i,t[i],null,r,l);for(let i in n){if(N(i))continue;let o=n[i],a=t[i];o!==a&&"value"!==i&&s(e,i,a,o,r,l)}"value"in n&&s(e,"value",t.value,n.value,r)}},L=(e,t,n,l,i,s,o,u,c)=>{let f=t.el=e?e.el:a(""),p=t.anchor=e?e.anchor:a(""),{patchFlag:d,dynamicChildren:h,slotScopeIds:g}=t;g&&(u=u?u.concat(g):g),null==e?(r(f,n,l),r(p,n,l),j(t.children||[],n,p,i,s,o,u,c)):d>0&&64&d&&h&&e.dynamicChildren?(I(e.dynamicChildren,h,n,i,s,o,u),(null!=t.key||i&&t===i.subTree)&&function e(t,n,l=!1){let r=t.children,i=n.children;if(w(r)&&w(i))for(let t=0;t<r.length;t++){let n=r[t],s=i[t];!(1&s.shapeFlag)||s.dynamicChildren||((s.patchFlag<=0||32===s.patchFlag)&&((s=i[t]=li(i[t])).el=n.el),l||-2===s.patchFlag||e(n,s)),s.type===n6&&(s.el=n.el)}}(e,t,!0)):K(e,t,n,p,i,s,o,u,c)},W=(e,t,n,l,r,i,s,o,a)=>{t.slotScopeIds=o,null==e?512&t.shapeFlag?r.ctx.activate(t,n,l,s,a):B(t,n,l,r,i,s,a):H(e,t,a)},B=(e,t,n,l,r,i,s)=>{let o=e.component=lf(e,l,r);tQ(e)&&(o.ctx.renderer=eo),lm(o,!1,s),o.asyncDep?(r&&r.registerDep(o,q,s),e.el||C(null,o.subTree=ln(n4),t,n)):q(o,e,t,n,r,i,s)},H=(e,t,n)=>{let l=t.component=e.component;if(function(e,t,n){let{props:l,children:r,component:i}=e,{props:s,children:o,patchFlag:a}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(!n||!(a>=0))return(!!r||!!o)&&(!o||!o.$stable)||l!==s&&(l?!s||n0(l,s,u):!!s);if(1024&a)return!0;if(16&a)return l?n0(l,s,u):!!s;if(8&a){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(s[n]!==l[n]&&!nZ(u,n))return!0}}return!1}(e,t,n)){if(l.asyncDep&&!l.asyncResolved){z(l,t,n);return}l.next=t,l.update()}else t.el=e.el,l.vnode=t},q=(e,t,n,r,i,s,o)=>{let a=()=>{if(e.isMounted){let t,{next:n,bu:l,u:r,parent:u,vnode:c}=e;{let t=function e(t){let n=t.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:e(n)}(e);if(t){n&&(n.el=c.el,z(e,n,o)),t.asyncDep.then(()=>{e.isUnmounted||a()});return}}let f=n;nW(e,!1),n?(n.el=c.el,z(e,n,o)):n=c,l&&G(l),(t=n.props&&n.props.onVnodeBeforeUpdate)&&la(t,u,n,c),nW(e,!0);let p=nX(e),d=e.subTree;e.subTree=p,x(d,p,g(d.el),er(d),e,i,s),n.el=p.el,null===f&&function({vnode:e,parent:t},n){for(;t;){let l=t.subTree;if(l.suspense&&l.suspense.activeBranch===e&&(l.el=e.el),l===e)(e=t.vnode).el=n,t=t.parent;else break}}(e,p.el),r&&nL(r,i),(t=n.props&&n.props.onVnodeUpdated)&&nL(()=>la(t,u,n,c),i)}else{let o;let{el:a,props:u}=t,{bm:c,m:f,parent:p,root:d,type:h}=e,g=tX(t);if(nW(e,!1),c&&G(c),!g&&(o=u&&u.onVnodeBeforeMount)&&la(o,p,t),nW(e,!0),a&&l){let t=()=>{e.subTree=nX(e),l(a,e.subTree,e,i,null)};g&&h.__asyncHydrate?h.__asyncHydrate(a,e,t):t()}else{d.ce&&d.ce._injectChildStyle(h);let l=e.subTree=nX(e);x(null,l,n,r,e,i,s),t.el=l.el}if(f&&nL(f,i),!g&&(o=u&&u.onVnodeMounted)){let e=t;nL(()=>la(o,p,e),i)}(256&t.shapeFlag||p&&tX(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&nL(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let u=e.effect=new eS(a);e.scope.off();let c=e.update=u.run.bind(u),f=e.job=u.runIfDirty.bind(u);f.i=e,f.id=e.uid,u.scheduler=()=>tN(f),nW(e,!0),c()},z=(e,t,n)=>{t.component=e;let l=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,l){let{props:r,attrs:i,vnode:{patchFlag:s}}=e,o=tv(r),[a]=e.propsOptions,u=!1;if((l||s>0)&&!(16&s)){if(8&s){let n=e.vnode.dynamicProps;for(let l=0;l<n.length;l++){let s=n[l];if(nZ(e.emitsOptions,s))continue;let c=t[s];if(a){if(S(i,s))c!==i[s]&&(i[s]=c,u=!0);else{let t=V(s);r[t]=nR(a,o,t,c,e,!1)}}else c!==i[s]&&(i[s]=c,u=!0)}}}else{let l;for(let s in nO(e,t,r,i)&&(u=!0),o)t&&(S(t,s)||(l=U(s))!==s&&S(t,l))||(a?n&&(void 0!==n[s]||void 0!==n[l])&&(r[s]=nR(a,o,s,void 0,e,!0)):delete r[s]);if(i!==o)for(let e in i)t&&S(t,e)||(delete i[e],u=!0)}u&&eH(e.attrs,"set","")}(e,t.props,l,n),nF(e,t.children,n),e$(),tL(e),ej()},K=(e,t,n,l,r,i,s,o,a=!1)=>{let u=e&&e.children,c=e?e.shapeFlag:0,p=t.children,{patchFlag:d,shapeFlag:h}=t;if(d>0){if(128&d){X(u,p,n,l,r,i,s,o,a);return}if(256&d){Z(u,p,n,l,r,i,s,o,a);return}}8&h?(16&c&&el(u,r,i),p!==u&&f(n,p)):16&c?16&h?X(u,p,n,l,r,i,s,o,a):el(u,r,i,!0):(8&c&&f(n,""),16&h&&j(p,n,l,r,i,s,o,a))},Z=(e,t,n,l,r,i,s,o,a)=>{let u;e=e||d,t=t||d;let c=e.length,f=t.length,p=Math.min(c,f);for(u=0;u<p;u++){let l=t[u]=a?li(t[u]):lr(t[u]);x(e[u],l,n,null,r,i,s,o,a)}c>f?el(e,r,i,!0,!1,p):j(t,n,l,r,i,s,o,a,p)},X=(e,t,n,l,r,i,s,o,a)=>{let u=0,c=t.length,f=e.length-1,p=c-1;for(;u<=f&&u<=p;){let l=e[u],c=t[u]=a?li(t[u]):lr(t[u]);if(n7(l,c))x(l,c,n,null,r,i,s,o,a);else break;u++}for(;u<=f&&u<=p;){let l=e[f],u=t[p]=a?li(t[p]):lr(t[p]);if(n7(l,u))x(l,u,n,null,r,i,s,o,a);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,f=e<c?t[e].el:l;for(;u<=p;)x(null,t[u]=a?li(t[u]):lr(t[u]),n,f,r,i,s,o,a),u++}}else if(u>p)for(;u<=f;)Y(e[u],r,i,!0),u++;else{let h;let g=u,m=u,y=new Map;for(u=m;u<=p;u++){let e=t[u]=a?li(t[u]):lr(t[u]);null!=e.key&&y.set(e.key,u)}let _=0,b=p-m+1,S=!1,w=0,k=Array(b);for(u=0;u<b;u++)k[u]=0;for(u=g;u<=f;u++){let l;let c=e[u];if(_>=b){Y(c,r,i,!0);continue}if(null!=c.key)l=y.get(c.key);else for(h=m;h<=p;h++)if(0===k[h-m]&&n7(c,t[h])){l=h;break}void 0===l?Y(c,r,i,!0):(k[l-m]=u+1,l>=w?w=l:S=!0,x(c,t[l],n,null,r,i,s,o,a),_++)}let C=S?function(e){let t,n,l,r,i;let s=e.slice(),o=[0],a=e.length;for(t=0;t<a;t++){let a=e[t];if(0!==a){if(e[n=o[o.length-1]]<a){s[t]=n,o.push(t);continue}for(l=0,r=o.length-1;l<r;)e[o[i=l+r>>1]]<a?l=i+1:r=i;a<e[o[l]]&&(l>0&&(s[t]=o[l-1]),o[l]=t)}}for(l=o.length,r=o[l-1];l-- >0;)o[l]=r,r=s[r];return o}(k):d;for(h=C.length-1,u=b-1;u>=0;u--){let e=m+u,f=t[e],p=e+1<c?t[e+1].el:l;0===k[u]?x(null,f,n,p,r,i,s,o,a):S&&(h<0||u!==C[h]?Q(f,n,p,2):h--)}}},Q=(e,t,n,l,i=null)=>{let{el:s,type:o,transition:a,children:u,shapeFlag:c}=e;if(6&c){Q(e.component.subTree,t,n,l);return}if(128&c){e.suspense.move(t,n,l);return}if(64&c){o.move(e,t,n,eo);return}if(o===n2){r(s,t,n);for(let e=0;e<u.length;e++)Q(u[e],t,n,l);r(e.anchor,t,n);return}if(o===n8){R(e,t,n);return}if(2!==l&&1&c&&a){if(0===l)a.beforeEnter(s),r(s,t,n),nL(()=>a.enter(s),i);else{let{leave:e,delayLeave:l,afterLeave:i}=a,o=()=>r(s,t,n),u=()=>{e(s,()=>{o(),i&&i()})};l?l(s,o,u):u()}}else r(s,t,n)},Y=(e,t,n,l=!1,r=!1)=>{let i;let{type:s,props:o,ref:a,children:u,dynamicChildren:c,shapeFlag:f,patchFlag:p,dirs:d,cacheIndex:h}=e;if(-2===p&&(r=!1),null!=a&&tZ(a,null,n,e,!0),null!=h&&(t.renderCache[h]=void 0),256&f){t.ctx.deactivate(e);return}let g=1&f&&d,m=!tX(e);if(m&&(i=o&&o.onVnodeBeforeUnmount)&&la(i,t,e),6&f)en(e.component,n,l);else{if(128&f){e.suspense.unmount(n,l);return}g&&tq(e,null,t,"beforeUnmount"),64&f?e.type.remove(e,t,n,eo,l):c&&!c.hasOnce&&(s!==n2||p>0&&64&p)?el(c,t,n,!1,!0):(s===n2&&384&p||!r&&16&f)&&el(u,t,n),l&&ee(e)}(m&&(i=o&&o.onVnodeUnmounted)||g)&&nL(()=>{i&&la(i,t,e),g&&tq(e,null,t,"unmounted")},n)},ee=e=>{let{type:t,el:n,anchor:l,transition:r}=e;if(t===n2){et(n,l);return}if(t===n8){P(e);return}let s=()=>{i(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){let{leave:t,delayLeave:l}=r,i=()=>t(n,s);l?l(e.el,s,i):i()}else s()},et=(e,t)=>{let n;for(;e!==t;)n=m(e),i(e),e=n;i(t)},en=(e,t,n)=>{let{bum:l,scope:r,job:i,subTree:s,um:o,m:a,a:u}=e;nU(a),nU(u),l&&G(l),r.stop(),i&&(i.flags|=8,Y(s,e,t,n)),o&&nL(o,t),nL(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},el=(e,t,n,l=!1,r=!1,i=0)=>{for(let s=i;s<e.length;s++)Y(e[s],t,n,l,r)},er=e=>{if(6&e.shapeFlag)return er(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();let t=m(e.anchor||e.el),n=t&&t[tG];return n?m(n):t},ei=!1,es=(e,t,n)=>{null==e?t._vnode&&Y(t._vnode,null,null,!0):x(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ei||(ei=!0,tL(),tV(),ei=!1)},eo={p:x,um:Y,m:Q,r:ee,mt:B,mc:j,pc:K,pbc:I,n:er,o:e};return{render:es,hydrate:n,createApp:function(e,t=null){O(e)||(e=_({},e)),null==t||E(t)||(t=null);let l=nb(),r=new WeakSet,i=[],s=!1,o=l.app={_uid:nx++,_component:e,_props:t,_container:null,_context:l,_instance:null,version:"3.5.13",get config(){return l.config},set config(v){},use:(e,...t)=>(r.has(e)||(e&&O(e.install)?(r.add(e),e.install(o,...t)):O(e)&&(r.add(e),e(o,...t))),o),mixin:e=>(l.mixins.includes(e)||l.mixins.push(e),o),component:(e,t)=>t?(l.components[e]=t,o):l.components[e],directive:(e,t)=>t?(l.directives[e]=t,o):l.directives[e],mount(r,i,a){if(!s){let u=o._ceVNode||ln(e,t);return u.appContext=l,!0===a?a="svg":!1===a&&(a=void 0),i&&n?n(u,r):es(u,r,a),s=!0,o._container=r,r.__vue_app__=o,lx(u.component)}},onUnmount(e){i.push(e)},unmount(){s&&(tO(i,o._instance,16),es(null,o._container),delete o._container.__vue_app__)},provide:(e,t)=>(l.provides[e]=t,o),runWithContext(e){let t=nS;nS=o;try{return e()}finally{nS=t}}};return o}}}(lG))).createApp(...e),{mount:n}=t;return t.mount=e=>{let l=R(e)?document.querySelector(e):e;if(!l)return;let r=t._component;O(r)||r.render||r.template||(r.template=l.innerHTML),1===l.nodeType&&(l.textContent="");let i=n(l,!1,l instanceof SVGElement?"svg":"function"==typeof MathMLElement&&l instanceof MathMLElement?"mathml":void 0);return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),i},t},lK=!1,lJ=f(",key,ref,innerHTML,textContent,ref_key,ref_for");function lZ(e,t){let n="";for(let l in e){if(lJ(l)||m(l)||"textarea"===t&&"value"===l)continue;let r=e[l];"class"===l?n+=` class="${lY(r)}"`:"style"===l?n+=` style="${l0(r)}"`:"className"===l?n+=` class="${String(r)}"`:n+=lX(l,r,t)}return n}function lX(e,t,n){if(!ec(t))return"";let l=n&&(n.indexOf("-")>0||et(n))?e:eu[e]||e.toLowerCase();return ei(l)?es(t)?` ${l}`:"":!function(e){if(ea.hasOwnProperty(e))return ea[e];let t=eo.test(e);return t&&console.error(`unsafe attribute name: ${e}`),ea[e]=!t}(l)?(console.warn(`[@vue/server-renderer] Skipped rendering unsafe attribute name: ${l}`),""):""===t?` ${l}`:` ${l}="${ep(t)}"`}function lQ(e,t){return ec(t)?` ${e}="${ep(t)}"`:""}function lY(e){return ep(ee(e))}function l0(e){return e?R(e)?ep(e):ep(function(e){if(!e)return"";if(R(e))return e;let t="";for(let n in e){let l=e[n];if(R(l)||"number"==typeof l){let e=n.startsWith("--")?n:U(n);t+=`${e}:${l};`}}return t}(Z(e))):""}function l1(e,t=null,n=null,l=null,r){return rh(ln(e,t,n),l,r)}let{ensureValidVNode:l2}=lw;function l6(e,t,n,l,r,i,s){r("<!--[-->"),l4(e,t,n,l,r,i,s),r("<!--]-->")}function l4(e,t,n,l,r,i,s,o){let a=e[t];if(a){let e=[],t=a(n,t=>{e.push(t)},i,s?" "+s:"");if(w(t)){let e=l2(t);e?rm(r,e,i,s):l&&l()}else{let t=!0;if(o)t=!1;else for(let n=0;n<e.length;n++){var u;if(!("string"==typeof(u=e[n])&&l8.test(u)&&(u.length<=8||!u.replace(l3,"").trim()))){t=!1;break}}if(t)l&&l();else{let t=0,n=e.length;o&&"<!--[-->"===e[0]&&"<!--]-->"===e[n-1]&&(t++,n--);for(let l=t;l<n;l++)r(e[l])}}}else l&&l()}let l8=/^<!--[\s\S]*-->$/,l3=/<!--[^]*?-->/gm;function l5(e,t,n,l,r){let i;e("<!--teleport start-->");let s=r.appContext.provides[nB],o=s.__teleportBuffers||(s.__teleportBuffers={}),a=o[n]||(o[n]=[]),u=a.length;if(l)t(e),i="<!--teleport start anchor--><!--teleport anchor-->";else{let{getBuffer:e,push:n}=rd();n("<!--teleport start anchor-->"),t(n),n("<!--teleport anchor-->"),i=e()}a.splice(u,0,i),e("<!--teleport end-->")}function l9(e){return ep(em(e))}function l7(e,t){if(w(e)||R(e))for(let n=0,l=e.length;n<l;n++)t(e[n],n);else if("number"==typeof e)for(let n=0;n<e;n++)t(n+1,n);else if(E(e)){if(e[Symbol.iterator]){let n=Array.from(e);for(let e=0,l=n.length;e<l;e++)t(n[e],e)}else{let n=Object.keys(e);for(let l=0,r=n.length;l<r;l++){let r=n[l];t(e[r],r,l)}}}}async function re(e,{default:t}){t?t():e("<!---->")}function rt(e,t,n,l,r={}){return"function"!=typeof t&&t.getSSRProps&&t.getSSRProps({dir:t,instance:lw.getComponentPublicInstance(e.$),value:n,oldValue:void 0,arg:l,modifiers:r},null)||{}}let rn=eh;function rl(e,t){return eg(e,t)>-1}function rr(e,t,n){switch(e){case"radio":return eh(t,n)?" checked":"";case"checkbox":return(w(t)?rl(t,n):t)?" checked":"";default:return lQ("value",t)}}function ri(e={},t){let{type:n,value:l}=e;switch(n){case"radio":return eh(t,l)?{checked:!0}:null;case"checkbox":return(w(t)?rl(t,l):t)?{checked:!0}:null;default:return{value:t}}}let{createComponentInstance:rs,setCurrentRenderingInstance:ro,setupComponent:ra,renderComponentRoot:ru,normalizeVNode:rc,pushWarningContext:rf,popWarningContext:rp}=lw;function rd(){let e=!1,t=[];return{getBuffer:()=>t,push(n){let l=R(n);if(e&&l){t[t.length-1]+=n;return}t.push(n),e=l,(M(n)||w(n)&&n.hasAsync)&&(t.hasAsync=!0)}}}function rh(e,t=null,n){let l=e.component=rs(e,t,null),r=ra(l,!0),i=M(r),s=l.sp;return i||s?Promise.resolve(r).then(()=>{if(i&&(s=l.sp),s)return Promise.all(s.map(e=>e.call(l.proxy)))}).catch(h).then(()=>rg(l,n)):rg(l,n)}function rg(e,t){let n=e.type,{getBuffer:l,push:r}=rd();if(O(n)){let l=ru(e);if(!n.props)for(let t in e.attrs)t.startsWith("data-v-")&&((l.props||(l.props={}))[t]="");rv(r,e.subTree=l,e,t)}else{(!e.render||e.render===h)&&!e.ssrRender&&!n.ssrRender&&R(n.template)&&(n.ssrRender=function(e,t){throw Error("On-the-fly template compilation is not supported in the ESM build of @vue/server-renderer. All templates must be pre-compiled into render functions.")}(n.template));let l=e.ssrRender||n.ssrRender;if(l){let n=!1!==e.inheritAttrs?e.attrs:void 0,i=!1,s=e;for(;;){let e=s.vnode.scopeId;e&&(i||(n={...n},i=!0),n[e]="");let t=s.parent;if(t&&t.subTree&&t.subTree===s.vnode)s=t;else break}if(t){i||(n={...n});let e=t.trim().split(" ");for(let t=0;t<e.length;t++)n[e[t]]=""}let o=ro(e);try{l(e.proxy,r,e,n,e.props,e.setupState,e.data,e.ctx)}finally{ro(o)}}else e.render&&e.render!==h?rv(r,e.subTree=ru(e),e,t):(n.name||n.__file,r("<!---->"))}return l()}function rv(e,t,n,l){let{type:r,shapeFlag:i,children:s,dirs:o,props:a}=t;switch(o&&(t.props=function(e,t,n){let l=[];for(let t=0;t<n.length;t++){let r=n[t],{dir:{getSSRProps:i}}=r;if(i){let t=i(r,e);t&&l.push(t)}}return lo(t||{},...l)}(t,a,o)),r){case n6:e(ep(s));break;case n4:e(s?`<!--${s.replace(ed,"")}-->`:"<!---->");break;case n8:e(s);break;case n2:t.slotScopeIds&&(l=(l?l+" ":"")+t.slotScopeIds.join(" ")),e("<!--[-->"),rm(e,s,n,l),e("<!--]-->");break;default:1&i?function(e,t,n,l){let r=t.type,{props:i,children:s,shapeFlag:o,scopeId:a}=t,u=`<${r}`;i&&(u+=lZ(i,r)),a&&(u+=` ${a}`);let c=n,f=t;for(;c&&f===c.subTree;)(f=c.vnode).scopeId&&(u+=` ${f.scopeId}`),c=c.parent;if(l&&(u+=` ${l}`),e(u+">"),!en(r)){let t=!1;i&&(i.innerHTML?(t=!0,e(i.innerHTML)):i.textContent?(t=!0,e(ep(i.textContent))):"textarea"===r&&i.value&&(t=!0,e(ep(i.value)))),!t&&(8&o?e(ep(s)):16&o&&rm(e,s,n,l)),e(`</${r}>`)}}(e,t,n,l):6&i?e(rh(t,n,l)):64&i?function(e,t,n,l){let r=t.props&&t.props.to,i=t.props&&t.props.disabled;if(!r||!R(r))return[];l5(e,e=>{rm(e,t.children,n,l)},r,i||""===i,n)}(e,t,n,l):128&i&&rv(e,t.ssContent,n,l)}}function rm(e,t,n,l){for(let r=0;r<t.length;r++)rv(e,rc(t[r]),n,l)}let{isVNode:ry}=lw;function r_(e){return function e(t,n,l){if(!t.hasAsync)return n+function e(t){let n="";for(let l=0;l<t.length;l++){let r=t[l];R(r)?n+=r:n+=e(r)}return n}(t);let r=n;for(let n=l;n<t.length;n+=1){let l=t[n];if(R(l)){r+=l;continue}if(M(l))return l.then(l=>(t[n]=l,e(t,r,n)));let i=e(l,r,0);if(M(i))return i.then(l=>(t[n]=l,e(t,"",n)));r=i}return r}(e,"",0)}async function rb(e,t={}){if(ry(e))return rb(lz({render:()=>e}),t);let n=ln(e._component,e._props);n.appContext=e._context,e.provide(nB,t);let l=await rh(n),r=await r_(l);if(await rx(t),t.__watcherHandles)for(let e of t.__watcherHandles)e();return r}async function rx(e){if(e.__teleportBuffers)for(let t in e.teleports=e.teleports||{},e.__teleportBuffers)e.teleports[t]=await r_(await Promise.all([e.__teleportBuffers[t]]))}let{isVNode:rS}=lw;async function rw(e,t){if(e.hasAsync)for(let n=0;n<e.length;n++){let l=e[n];M(l)&&(l=await l),R(l)?t.push(l):await rw(l,t)}else!function e(t,n){for(let l=0;l<t.length;l++){let r=t[l];R(r)?n.push(r):e(r,n)}}(e,t)}function rk(e,t,n){if(rS(e))return rk(lz({render:()=>e}),t,n);let l=ln(e._component,e._props);return l.appContext=e._context,e.provide(nB,t),Promise.resolve(rh(l)).then(e=>rw(e,n)).then(()=>rx(t)).then(()=>{if(t.__watcherHandles)for(let e of t.__watcherHandles)e()}).then(()=>n.push(null)).catch(e=>{n.destroy(e)}),n}function rC(e,t={}){return console.warn("[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead."),rT(e,t)}function rT(e,t={}){throw Error("ESM build of renderToStream() does not support renderToNodeStream(). Use pipeToNodeWritable() with an existing Node.js Writable stream instance instead.")}function rO(e,t={},n){rk(e,t,{push(e){null!=e?n.write(e):n.end()},destroy(e){n.destroy(e)}})}function rR(e,t={}){if("function"!=typeof ReadableStream)throw Error("ReadableStream constructor is not available in the global scope. If the target environment does support web streams, consider using pipeToWebWritable() with an existing WritableStream instance instead.");let n=new TextEncoder,l=!1;return new ReadableStream({start(r){rk(e,t,{push(e){l||(null!=e?r.enqueue(n.encode(e)):r.close())},destroy(e){r.error(e)}})},cancel(){l=!0}})}function rP(e,t={},n){let l=n.getWriter(),r=new TextEncoder,i=!1;try{i=M(l.ready)}catch(e){}rk(e,t,{push:async e=>(i&&await l.ready,null!=e)?l.write(r.encode(e)):l.close(),destroy(e){console.log(e),l.close()}})}lK||(lK=!0,({value:e},t)=>{if(w(e)){if(t.props&&eg(e,t.props.value)>-1)return{checked:!0}}else if(C(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}});export{rO as pipeToNodeWritable,rP as pipeToWebWritable,rT as renderToNodeStream,rk as renderToSimpleStream,rC as renderToStream,rb as renderToString,rR as renderToWebStream,rt as ssrGetDirectiveProps,ri as ssrGetDynamicModelProps,es as ssrIncludeBooleanAttr,l9 as ssrInterpolate,rl as ssrLooseContain,rn as ssrLooseEqual,lQ as ssrRenderAttr,lZ as ssrRenderAttrs,lY as ssrRenderClass,l1 as ssrRenderComponent,lX as ssrRenderDynamicAttr,rr as ssrRenderDynamicModel,l7 as ssrRenderList,l6 as ssrRenderSlot,l4 as ssrRenderSlotInner,l0 as ssrRenderStyle,re as ssrRenderSuspense,l5 as ssrRenderTeleport,rv as ssrRenderVNode}; diff --git a/vuetest/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js b/vuetest/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js new file mode 100644 index 0000000..c357c52 --- /dev/null +++ b/vuetest/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js @@ -0,0 +1,1224 @@ +/** +* @vue/server-renderer v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +import { createVNode, ssrUtils, ssrContextKey, warn as warn$2, Fragment, Static, Comment, Text, mergeProps, createApp, initDirectivesForSSR } from 'vue'; +import { isOn, isRenderableAttrValue, isSVGTag, propsToAttrMap, isBooleanAttr, includeBooleanAttr, isSSRSafeAttrName, escapeHtml, normalizeClass, isString, normalizeStyle, stringifyStyle, makeMap, isArray, toDisplayString, extend, isFunction, EMPTY_OBJ, getGlobalThis, NOOP, isObject, looseEqual, looseIndexOf, isPromise, escapeHtmlComment, isVoidTag } from '@vue/shared'; +export { includeBooleanAttr as ssrIncludeBooleanAttr } from '@vue/shared'; + +const shouldIgnoreProp = /* @__PURE__ */ makeMap( + `,key,ref,innerHTML,textContent,ref_key,ref_for` +); +function ssrRenderAttrs(props, tag) { + let ret = ""; + for (const key in props) { + if (shouldIgnoreProp(key) || isOn(key) || tag === "textarea" && key === "value") { + continue; + } + const value = props[key]; + if (key === "class") { + ret += ` class="${ssrRenderClass(value)}"`; + } else if (key === "style") { + ret += ` style="${ssrRenderStyle(value)}"`; + } else if (key === "className") { + ret += ` class="${String(value)}"`; + } else { + ret += ssrRenderDynamicAttr(key, value, tag); + } + } + return ret; +} +function ssrRenderDynamicAttr(key, value, tag) { + if (!isRenderableAttrValue(value)) { + return ``; + } + const attrKey = tag && (tag.indexOf("-") > 0 || isSVGTag(tag)) ? key : propsToAttrMap[key] || key.toLowerCase(); + if (isBooleanAttr(attrKey)) { + return includeBooleanAttr(value) ? ` ${attrKey}` : ``; + } else if (isSSRSafeAttrName(attrKey)) { + return value === "" ? ` ${attrKey}` : ` ${attrKey}="${escapeHtml(value)}"`; + } else { + console.warn( + `[@vue/server-renderer] Skipped rendering unsafe attribute name: ${attrKey}` + ); + return ``; + } +} +function ssrRenderAttr(key, value) { + if (!isRenderableAttrValue(value)) { + return ``; + } + return ` ${key}="${escapeHtml(value)}"`; +} +function ssrRenderClass(raw) { + return escapeHtml(normalizeClass(raw)); +} +function ssrRenderStyle(raw) { + if (!raw) { + return ""; + } + if (isString(raw)) { + return escapeHtml(raw); + } + const styles = normalizeStyle(raw); + return escapeHtml(stringifyStyle(styles)); +} + +function ssrRenderComponent(comp, props = null, children = null, parentComponent = null, slotScopeId) { + return renderComponentVNode( + createVNode(comp, props, children), + parentComponent, + slotScopeId + ); +} + +const { ensureValidVNode } = ssrUtils; +function ssrRenderSlot(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId) { + push(`<!--[-->`); + ssrRenderSlotInner( + slots, + slotName, + slotProps, + fallbackRenderFn, + push, + parentComponent, + slotScopeId + ); + push(`<!--]-->`); +} +function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId, transition) { + const slotFn = slots[slotName]; + if (slotFn) { + const slotBuffer = []; + const bufferedPush = (item) => { + slotBuffer.push(item); + }; + const ret = slotFn( + slotProps, + bufferedPush, + parentComponent, + slotScopeId ? " " + slotScopeId : "" + ); + if (isArray(ret)) { + const validSlotContent = ensureValidVNode(ret); + if (validSlotContent) { + renderVNodeChildren( + push, + validSlotContent, + parentComponent, + slotScopeId + ); + } else if (fallbackRenderFn) { + fallbackRenderFn(); + } + } else { + let isEmptySlot = true; + if (transition) { + isEmptySlot = false; + } else { + for (let i = 0; i < slotBuffer.length; i++) { + if (!isComment(slotBuffer[i])) { + isEmptySlot = false; + break; + } + } + } + if (isEmptySlot) { + if (fallbackRenderFn) { + fallbackRenderFn(); + } + } else { + let start = 0; + let end = slotBuffer.length; + if (transition && slotBuffer[0] === "<!--[-->" && slotBuffer[end - 1] === "<!--]-->") { + start++; + end--; + } + for (let i = start; i < end; i++) { + push(slotBuffer[i]); + } + } + } + } else if (fallbackRenderFn) { + fallbackRenderFn(); + } +} +const commentTestRE = /^<!--[\s\S]*-->$/; +const commentRE = /<!--[^]*?-->/gm; +function isComment(item) { + if (typeof item !== "string" || !commentTestRE.test(item)) return false; + if (item.length <= 8) return true; + return !item.replace(commentRE, "").trim(); +} + +function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) { + parentPush("<!--teleport start-->"); + const context = parentComponent.appContext.provides[ssrContextKey]; + const teleportBuffers = context.__teleportBuffers || (context.__teleportBuffers = {}); + const targetBuffer = teleportBuffers[target] || (teleportBuffers[target] = []); + const bufferIndex = targetBuffer.length; + let teleportContent; + if (disabled) { + contentRenderFn(parentPush); + teleportContent = `<!--teleport start anchor--><!--teleport anchor-->`; + } else { + const { getBuffer, push } = createBuffer(); + push(`<!--teleport start anchor-->`); + contentRenderFn(push); + push(`<!--teleport anchor-->`); + teleportContent = getBuffer(); + } + targetBuffer.splice(bufferIndex, 0, teleportContent); + parentPush("<!--teleport end-->"); +} + +function ssrInterpolate(value) { + return escapeHtml(toDisplayString(value)); +} + +let activeSub; +let batchDepth = 0; +let batchedSub; +function startBatch() { + batchDepth++; +} +function endBatch() { + if (--batchDepth > 0) { + return; + } + let error; + while (batchedSub) { + let e = batchedSub; + batchedSub = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + if (e.flags & 1) { + try { + ; + e.trigger(); + } catch (err) { + if (!error) error = err; + } + } + e = next; + } + } + if (error) throw error; +} +let shouldTrack = true; +const trackStack = []; +function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; +} +function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; +} + +class Dep { + constructor(computed) { + this.computed = computed; + this.version = 0; + /** + * Link between this dep and the current active effect + */ + this.activeLink = void 0; + /** + * Doubly linked list representing the subscribing effects (tail) + */ + this.subs = void 0; + /** + * For object property deps cleanup + */ + this.map = void 0; + this.key = void 0; + /** + * Subscriber counter + */ + this.sc = 0; + if (!!(process.env.NODE_ENV !== "production")) { + this.subsHead = void 0; + } + } + track(debugInfo) { + { + return; + } + } + trigger(debugInfo) { + this.version++; + this.notify(debugInfo); + } + notify(debugInfo) { + startBatch(); + try { + if (!!(process.env.NODE_ENV !== "production")) { + for (let head = this.subsHead; head; head = head.nextSub) { + if (head.sub.onTrigger && !(head.sub.flags & 8)) { + head.sub.onTrigger( + extend( + { + effect: head.sub + }, + debugInfo + ) + ); + } + } + } + for (let link = this.subs; link; link = link.prevSub) { + if (link.sub.notify()) { + ; + link.sub.dep.notify(); + } + } + } finally { + endBatch(); + } + } +} +const targetMap = /* @__PURE__ */ new WeakMap(); +Symbol( + !!(process.env.NODE_ENV !== "production") ? "Object iterate" : "" +); +Symbol( + !!(process.env.NODE_ENV !== "production") ? "Map keys iterate" : "" +); +Symbol( + !!(process.env.NODE_ENV !== "production") ? "Array iterate" : "" +); +function track(target, type, key) { + if (shouldTrack && activeSub) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = new Dep()); + dep.map = depsMap; + dep.key = key; + } + if (!!(process.env.NODE_ENV !== "production")) { + dep.track({ + target, + type, + key + }); + } else { + dep.track(); + } + } +} + +function isProxy(value) { + return value ? !!value["__v_raw"] : false; +} +function toRaw(observed) { + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; +} + +function isRef(r) { + return r ? r["__v_isRef"] === true : false; +} + +const stack = []; +function pushWarningContext$1(vnode) { + stack.push(vnode); +} +function popWarningContext$1() { + stack.pop(); +} +let isWarning = false; +function warn$1(msg, ...args) { + if (isWarning) return; + isWarning = true; + pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + // eslint-disable-next-line no-restricted-syntax + msg + args.map((a) => { + var _a, _b; + return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); + }).join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); + } + console.warn(...warnArgs); + } + resetTracking(); + isWarning = false; +} +function getComponentTrace() { + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); + } + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; +} +function formatTrace(trace) { + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; +} +function formatTraceEntry({ vnode, recurseCount }) { + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; +} +function formatProps(props) { + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; +} +function formatProp(key, value, raw) { + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } +} + +const ErrorTypeStrings = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush", + [15]: "component update", + [16]: "app unmount cleanup function" +}; +function callWithErrorHandling(fn, instance, type, args) { + try { + return args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } +} +function handleError(err, instance, type, throwInDev = true) { + const contextVNode = instance ? instance.vnode : null; + const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = !!(process.env.NODE_ENV !== "production") ? ErrorTypeStrings[type] : `https://vuejs.org/error-reference/#runtime-${type}`; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + return; + } + } + } + cur = cur.parent; + } + if (errorHandler) { + pauseTracking(); + callWithErrorHandling(errorHandler, null, 10, [ + err, + exposedInstance, + errorInfo + ]); + resetTracking(); + return; + } + } + logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); +} +function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { + if (!!(process.env.NODE_ENV !== "production")) { + const info = ErrorTypeStrings[type]; + if (contextVNode) { + pushWarningContext$1(contextVNode); + } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext$1(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } else if (throwInProd) { + throw err; + } else { + console.error(err); + } +} + +let devtools; +let buffer = []; +function setDevtoolsHook(hook, target) { + var _a, _b; + devtools = hook; + if (devtools) { + devtools.enabled = true; + buffer.forEach(({ event, args }) => devtools.emit(event, ...args)); + buffer = []; + } else if ( + // handle late devtools injection - only do this if we are in an actual + // browser environment to avoid the timer handle stalling test runner exit + // (#4815) + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + // eslint-disable-next-line no-restricted-syntax + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook(newHook, target); + }); + setTimeout(() => { + if (!devtools) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; + buffer = []; + } + }, 3e3); + } else { + buffer = []; + } +} + +{ + const g = getGlobalThis(); + const registerGlobalSetter = (key, setter) => { + let setters; + if (!(setters = g[key])) setters = g[key] = []; + setters.push(setter); + return (v) => { + if (setters.length > 1) setters.forEach((set) => set(v)); + else setters[0](v); + }; + }; + registerGlobalSetter( + `__VUE_INSTANCE_SETTERS__`, + (v) => v + ); + registerGlobalSetter( + `__VUE_SSR_SETTERS__`, + (v) => v + ); +} +!!(process.env.NODE_ENV !== "production") ? { + get(target, key) { + track(target, "get", ""); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } +} : { + get(target, key) { + track(target, "get", ""); + return target[key]; + } +}; +const classifyRE = /(?:^|[-_])(\w)/g; +const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); +function getComponentName(Component, includeInferred = true) { + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; +} +function formatComponentName(instance, Component, isRoot = false) { + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; + } + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; +} +function isClassComponent(value) { + return isFunction(value) && "__vccOpts" in value; +} + +const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP; +!!(process.env.NODE_ENV !== "production") || true ? devtools : void 0; +!!(process.env.NODE_ENV !== "production") || true ? setDevtoolsHook : NOOP; + +function ssrRenderList(source, renderItem) { + if (isArray(source) || isString(source)) { + for (let i = 0, l = source.length; i < l; i++) { + renderItem(source[i], i); + } + } else if (typeof source === "number") { + if (!!(process.env.NODE_ENV !== "production") && !Number.isInteger(source)) { + warn(`The v-for range expect an integer value but got ${source}.`); + return; + } + for (let i = 0; i < source; i++) { + renderItem(i + 1, i); + } + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + const arr = Array.from(source); + for (let i = 0, l = arr.length; i < l; i++) { + renderItem(arr[i], i); + } + } else { + const keys = Object.keys(source); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + renderItem(source[key], key, i); + } + } + } +} + +async function ssrRenderSuspense(push, { default: renderContent }) { + if (renderContent) { + renderContent(); + } else { + push(`<!---->`); + } +} + +function ssrGetDirectiveProps(instance, dir, value, arg, modifiers = {}) { + if (typeof dir !== "function" && dir.getSSRProps) { + return dir.getSSRProps( + { + dir, + instance: ssrUtils.getComponentPublicInstance(instance.$), + value, + oldValue: void 0, + arg, + modifiers + }, + null + ) || {}; + } + return {}; +} + +const ssrLooseEqual = looseEqual; +function ssrLooseContain(arr, value) { + return looseIndexOf(arr, value) > -1; +} +function ssrRenderDynamicModel(type, model, value) { + switch (type) { + case "radio": + return looseEqual(model, value) ? " checked" : ""; + case "checkbox": + return (isArray(model) ? ssrLooseContain(model, value) : model) ? " checked" : ""; + default: + return ssrRenderAttr("value", model); + } +} +function ssrGetDynamicModelProps(existingProps = {}, model) { + const { type, value } = existingProps; + switch (type) { + case "radio": + return looseEqual(model, value) ? { checked: true } : null; + case "checkbox": + return (isArray(model) ? ssrLooseContain(model, value) : model) ? { checked: true } : null; + default: + return { value: model }; + } +} + +function ssrCompile(template, instance) { + { + throw new Error( + `On-the-fly template compilation is not supported in the ESM build of @vue/server-renderer. All templates must be pre-compiled into render functions.` + ); + } +} + +const { + createComponentInstance, + setCurrentRenderingInstance, + setupComponent, + renderComponentRoot, + normalizeVNode, + pushWarningContext, + popWarningContext +} = ssrUtils; +function createBuffer() { + let appendable = false; + const buffer = []; + return { + getBuffer() { + return buffer; + }, + push(item) { + const isStringItem = isString(item); + if (appendable && isStringItem) { + buffer[buffer.length - 1] += item; + return; + } + buffer.push(item); + appendable = isStringItem; + if (isPromise(item) || isArray(item) && item.hasAsync) { + buffer.hasAsync = true; + } + } + }; +} +function renderComponentVNode(vnode, parentComponent = null, slotScopeId) { + const instance = vnode.component = createComponentInstance( + vnode, + parentComponent, + null + ); + if (!!(process.env.NODE_ENV !== "production")) pushWarningContext(vnode); + const res = setupComponent( + instance, + true + /* isSSR */ + ); + if (!!(process.env.NODE_ENV !== "production")) popWarningContext(); + const hasAsyncSetup = isPromise(res); + let prefetches = instance.sp; + if (hasAsyncSetup || prefetches) { + const p = Promise.resolve(res).then(() => { + if (hasAsyncSetup) prefetches = instance.sp; + if (prefetches) { + return Promise.all( + prefetches.map((prefetch) => prefetch.call(instance.proxy)) + ); + } + }).catch(NOOP); + return p.then(() => renderComponentSubTree(instance, slotScopeId)); + } else { + return renderComponentSubTree(instance, slotScopeId); + } +} +function renderComponentSubTree(instance, slotScopeId) { + if (!!(process.env.NODE_ENV !== "production")) pushWarningContext(instance.vnode); + const comp = instance.type; + const { getBuffer, push } = createBuffer(); + if (isFunction(comp)) { + let root = renderComponentRoot(instance); + if (!comp.props) { + for (const key in instance.attrs) { + if (key.startsWith(`data-v-`)) { + (root.props || (root.props = {}))[key] = ``; + } + } + } + renderVNode(push, instance.subTree = root, instance, slotScopeId); + } else { + if ((!instance.render || instance.render === NOOP) && !instance.ssrRender && !comp.ssrRender && isString(comp.template)) { + comp.ssrRender = ssrCompile(comp.template); + } + const ssrRender = instance.ssrRender || comp.ssrRender; + if (ssrRender) { + let attrs = instance.inheritAttrs !== false ? instance.attrs : void 0; + let hasCloned = false; + let cur = instance; + while (true) { + const scopeId = cur.vnode.scopeId; + if (scopeId) { + if (!hasCloned) { + attrs = { ...attrs }; + hasCloned = true; + } + attrs[scopeId] = ""; + } + const parent = cur.parent; + if (parent && parent.subTree && parent.subTree === cur.vnode) { + cur = parent; + } else { + break; + } + } + if (slotScopeId) { + if (!hasCloned) attrs = { ...attrs }; + const slotScopeIdList = slotScopeId.trim().split(" "); + for (let i = 0; i < slotScopeIdList.length; i++) { + attrs[slotScopeIdList[i]] = ""; + } + } + const prev = setCurrentRenderingInstance(instance); + try { + ssrRender( + instance.proxy, + push, + instance, + attrs, + // compiler-optimized bindings + instance.props, + instance.setupState, + instance.data, + instance.ctx + ); + } finally { + setCurrentRenderingInstance(prev); + } + } else if (instance.render && instance.render !== NOOP) { + renderVNode( + push, + instance.subTree = renderComponentRoot(instance), + instance, + slotScopeId + ); + } else { + const componentName = comp.name || comp.__file || `<Anonymous>`; + warn$2(`Component ${componentName} is missing template or render function.`); + push(`<!---->`); + } + } + if (!!(process.env.NODE_ENV !== "production")) popWarningContext(); + return getBuffer(); +} +function renderVNode(push, vnode, parentComponent, slotScopeId) { + const { type, shapeFlag, children, dirs, props } = vnode; + if (dirs) { + vnode.props = applySSRDirectives(vnode, props, dirs); + } + switch (type) { + case Text: + push(escapeHtml(children)); + break; + case Comment: + push( + children ? `<!--${escapeHtmlComment(children)}-->` : `<!---->` + ); + break; + case Static: + push(children); + break; + case Fragment: + if (vnode.slotScopeIds) { + slotScopeId = (slotScopeId ? slotScopeId + " " : "") + vnode.slotScopeIds.join(" "); + } + push(`<!--[-->`); + renderVNodeChildren( + push, + children, + parentComponent, + slotScopeId + ); + push(`<!--]-->`); + break; + default: + if (shapeFlag & 1) { + renderElementVNode(push, vnode, parentComponent, slotScopeId); + } else if (shapeFlag & 6) { + push(renderComponentVNode(vnode, parentComponent, slotScopeId)); + } else if (shapeFlag & 64) { + renderTeleportVNode(push, vnode, parentComponent, slotScopeId); + } else if (shapeFlag & 128) { + renderVNode(push, vnode.ssContent, parentComponent, slotScopeId); + } else { + warn$2( + "[@vue/server-renderer] Invalid VNode type:", + type, + `(${typeof type})` + ); + } + } +} +function renderVNodeChildren(push, children, parentComponent, slotScopeId) { + for (let i = 0; i < children.length; i++) { + renderVNode(push, normalizeVNode(children[i]), parentComponent, slotScopeId); + } +} +function renderElementVNode(push, vnode, parentComponent, slotScopeId) { + const tag = vnode.type; + let { props, children, shapeFlag, scopeId } = vnode; + let openTag = `<${tag}`; + if (props) { + openTag += ssrRenderAttrs(props, tag); + } + if (scopeId) { + openTag += ` ${scopeId}`; + } + let curParent = parentComponent; + let curVnode = vnode; + while (curParent && curVnode === curParent.subTree) { + curVnode = curParent.vnode; + if (curVnode.scopeId) { + openTag += ` ${curVnode.scopeId}`; + } + curParent = curParent.parent; + } + if (slotScopeId) { + openTag += ` ${slotScopeId}`; + } + push(openTag + `>`); + if (!isVoidTag(tag)) { + let hasChildrenOverride = false; + if (props) { + if (props.innerHTML) { + hasChildrenOverride = true; + push(props.innerHTML); + } else if (props.textContent) { + hasChildrenOverride = true; + push(escapeHtml(props.textContent)); + } else if (tag === "textarea" && props.value) { + hasChildrenOverride = true; + push(escapeHtml(props.value)); + } + } + if (!hasChildrenOverride) { + if (shapeFlag & 8) { + push(escapeHtml(children)); + } else if (shapeFlag & 16) { + renderVNodeChildren( + push, + children, + parentComponent, + slotScopeId + ); + } + } + push(`</${tag}>`); + } +} +function applySSRDirectives(vnode, rawProps, dirs) { + const toMerge = []; + for (let i = 0; i < dirs.length; i++) { + const binding = dirs[i]; + const { + dir: { getSSRProps } + } = binding; + if (getSSRProps) { + const props = getSSRProps(binding, vnode); + if (props) toMerge.push(props); + } + } + return mergeProps(rawProps || {}, ...toMerge); +} +function renderTeleportVNode(push, vnode, parentComponent, slotScopeId) { + const target = vnode.props && vnode.props.to; + const disabled = vnode.props && vnode.props.disabled; + if (!target) { + if (!disabled) { + warn$2(`[@vue/server-renderer] Teleport is missing target prop.`); + } + return []; + } + if (!isString(target)) { + warn$2( + `[@vue/server-renderer] Teleport target must be a query selector string.` + ); + return []; + } + ssrRenderTeleport( + push, + (push2) => { + renderVNodeChildren( + push2, + vnode.children, + parentComponent, + slotScopeId + ); + }, + target, + disabled || disabled === "", + parentComponent + ); +} + +const { isVNode: isVNode$1 } = ssrUtils; +function nestedUnrollBuffer(buffer, parentRet, startIndex) { + if (!buffer.hasAsync) { + return parentRet + unrollBufferSync$1(buffer); + } + let ret = parentRet; + for (let i = startIndex; i < buffer.length; i += 1) { + const item = buffer[i]; + if (isString(item)) { + ret += item; + continue; + } + if (isPromise(item)) { + return item.then((nestedItem) => { + buffer[i] = nestedItem; + return nestedUnrollBuffer(buffer, ret, i); + }); + } + const result = nestedUnrollBuffer(item, ret, 0); + if (isPromise(result)) { + return result.then((nestedItem) => { + buffer[i] = nestedItem; + return nestedUnrollBuffer(buffer, "", i); + }); + } + ret = result; + } + return ret; +} +function unrollBuffer$1(buffer) { + return nestedUnrollBuffer(buffer, "", 0); +} +function unrollBufferSync$1(buffer) { + let ret = ""; + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (isString(item)) { + ret += item; + } else { + ret += unrollBufferSync$1(item); + } + } + return ret; +} +async function renderToString(input, context = {}) { + if (isVNode$1(input)) { + return renderToString(createApp({ render: () => input }), context); + } + const vnode = createVNode(input._component, input._props); + vnode.appContext = input._context; + input.provide(ssrContextKey, context); + const buffer = await renderComponentVNode(vnode); + const result = await unrollBuffer$1(buffer); + await resolveTeleports(context); + if (context.__watcherHandles) { + for (const unwatch of context.__watcherHandles) { + unwatch(); + } + } + return result; +} +async function resolveTeleports(context) { + if (context.__teleportBuffers) { + context.teleports = context.teleports || {}; + for (const key in context.__teleportBuffers) { + context.teleports[key] = await unrollBuffer$1( + await Promise.all([context.__teleportBuffers[key]]) + ); + } + } +} + +const { isVNode } = ssrUtils; +async function unrollBuffer(buffer, stream) { + if (buffer.hasAsync) { + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (isPromise(item)) { + item = await item; + } + if (isString(item)) { + stream.push(item); + } else { + await unrollBuffer(item, stream); + } + } + } else { + unrollBufferSync(buffer, stream); + } +} +function unrollBufferSync(buffer, stream) { + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (isString(item)) { + stream.push(item); + } else { + unrollBufferSync(item, stream); + } + } +} +function renderToSimpleStream(input, context, stream) { + if (isVNode(input)) { + return renderToSimpleStream( + createApp({ render: () => input }), + context, + stream + ); + } + const vnode = createVNode(input._component, input._props); + vnode.appContext = input._context; + input.provide(ssrContextKey, context); + Promise.resolve(renderComponentVNode(vnode)).then((buffer) => unrollBuffer(buffer, stream)).then(() => resolveTeleports(context)).then(() => { + if (context.__watcherHandles) { + for (const unwatch of context.__watcherHandles) { + unwatch(); + } + } + }).then(() => stream.push(null)).catch((error) => { + stream.destroy(error); + }); + return stream; +} +function renderToStream(input, context = {}) { + console.warn( + `[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead.` + ); + return renderToNodeStream(input, context); +} +function renderToNodeStream(input, context = {}) { + { + throw new Error( + `ESM build of renderToStream() does not support renderToNodeStream(). Use pipeToNodeWritable() with an existing Node.js Writable stream instance instead.` + ); + } +} +function pipeToNodeWritable(input, context = {}, writable) { + renderToSimpleStream(input, context, { + push(content) { + if (content != null) { + writable.write(content); + } else { + writable.end(); + } + }, + destroy(err) { + writable.destroy(err); + } + }); +} +function renderToWebStream(input, context = {}) { + if (typeof ReadableStream !== "function") { + throw new Error( + `ReadableStream constructor is not available in the global scope. If the target environment does support web streams, consider using pipeToWebWritable() with an existing WritableStream instance instead.` + ); + } + const encoder = new TextEncoder(); + let cancelled = false; + return new ReadableStream({ + start(controller) { + renderToSimpleStream(input, context, { + push(content) { + if (cancelled) return; + if (content != null) { + controller.enqueue(encoder.encode(content)); + } else { + controller.close(); + } + }, + destroy(err) { + controller.error(err); + } + }); + }, + cancel() { + cancelled = true; + } + }); +} +function pipeToWebWritable(input, context = {}, writable) { + const writer = writable.getWriter(); + const encoder = new TextEncoder(); + let hasReady = false; + try { + hasReady = isPromise(writer.ready); + } catch (e) { + } + renderToSimpleStream(input, context, { + async push(content) { + if (hasReady) { + await writer.ready; + } + if (content != null) { + return writer.write(encoder.encode(content)); + } else { + return writer.close(); + } + }, + destroy(err) { + console.log(err); + writer.close(); + } + }); +} + +initDirectivesForSSR(); + +export { pipeToNodeWritable, pipeToWebWritable, renderToNodeStream, renderToSimpleStream, renderToStream, renderToString, renderToWebStream, ssrGetDirectiveProps, ssrGetDynamicModelProps, ssrInterpolate, ssrLooseContain, ssrLooseEqual, ssrRenderAttr, ssrRenderAttrs, ssrRenderClass, ssrRenderComponent, ssrRenderDynamicAttr, ssrRenderDynamicModel, ssrRenderList, ssrRenderSlot, ssrRenderSlotInner, ssrRenderStyle, ssrRenderSuspense, ssrRenderTeleport, renderVNode as ssrRenderVNode }; diff --git a/vuetest/node_modules/@vue/server-renderer/index.js b/vuetest/node_modules/@vue/server-renderer/index.js new file mode 100644 index 0000000..f5a3d90 --- /dev/null +++ b/vuetest/node_modules/@vue/server-renderer/index.js @@ -0,0 +1,7 @@ +'use strict' + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/server-renderer.cjs.prod.js') +} else { + module.exports = require('./dist/server-renderer.cjs.js') +} diff --git a/vuetest/node_modules/@vue/server-renderer/package.json b/vuetest/node_modules/@vue/server-renderer/package.json new file mode 100644 index 0000000..d44abb9 --- /dev/null +++ b/vuetest/node_modules/@vue/server-renderer/package.json @@ -0,0 +1,55 @@ +{ + "name": "@vue/server-renderer", + "version": "3.5.13", + "description": "@vue/server-renderer", + "main": "index.js", + "module": "dist/server-renderer.esm-bundler.js", + "types": "dist/server-renderer.d.ts", + "files": [ + "index.js", + "dist" + ], + "exports": { + ".": { + "types": "./dist/server-renderer.d.ts", + "node": { + "production": "./dist/server-renderer.cjs.prod.js", + "development": "./dist/server-renderer.cjs.js", + "default": "./index.js" + }, + "module": "./dist/server-renderer.esm-bundler.js", + "import": "./dist/server-renderer.esm-bundler.js", + "require": "./index.js" + }, + "./*": "./*" + }, + "buildOptions": { + "name": "VueServerRenderer", + "formats": [ + "esm-bundler", + "esm-browser", + "cjs" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/vuejs/core.git", + "directory": "packages/server-renderer" + }, + "keywords": [ + "vue" + ], + "author": "Evan You", + "license": "MIT", + "bugs": { + "url": "https://github.com/vuejs/core/issues" + }, + "homepage": "https://github.com/vuejs/core/tree/main/packages/server-renderer#readme", + "peerDependencies": { + "vue": "3.5.13" + }, + "dependencies": { + "@vue/shared": "3.5.13", + "@vue/compiler-ssr": "3.5.13" + } +} \ No newline at end of file diff --git a/vuetest/node_modules/@vue/shared/LICENSE b/vuetest/node_modules/@vue/shared/LICENSE new file mode 100644 index 0000000..15f1f7e --- /dev/null +++ b/vuetest/node_modules/@vue/shared/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018-present, Yuxi (Evan) You + +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. diff --git a/vuetest/node_modules/@vue/shared/README.md b/vuetest/node_modules/@vue/shared/README.md new file mode 100644 index 0000000..1d01f2f --- /dev/null +++ b/vuetest/node_modules/@vue/shared/README.md @@ -0,0 +1,3 @@ +# @vue/shared + +Internal utility functions and constants shared across `@vue` packages. diff --git a/vuetest/node_modules/@vue/shared/dist/shared.cjs.js b/vuetest/node_modules/@vue/shared/dist/shared.cjs.js new file mode 100644 index 0000000..94f7cc6 --- /dev/null +++ b/vuetest/node_modules/@vue/shared/dist/shared.cjs.js @@ -0,0 +1,594 @@ +/** +* @vue/shared v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function makeMap(str) { + const map = /* @__PURE__ */ Object.create(null); + for (const key of str.split(",")) map[key] = 1; + return (val) => val in map; +} + +const EMPTY_OBJ = Object.freeze({}) ; +const EMPTY_ARR = Object.freeze([]) ; +const NOOP = () => { +}; +const NO = () => false; +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +const isModelListener = (key) => key.startsWith("onUpdate:"); +const extend = Object.assign; +const remove = (arr, el) => { + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } +}; +const hasOwnProperty = Object.prototype.hasOwnProperty; +const hasOwn = (val, key) => hasOwnProperty.call(val, key); +const isArray = Array.isArray; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isDate = (val) => toTypeString(val) === "[object Date]"; +const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; +const isFunction = (val) => typeof val === "function"; +const isString = (val) => typeof val === "string"; +const isSymbol = (val) => typeof val === "symbol"; +const isObject = (val) => val !== null && typeof val === "object"; +const isPromise = (val) => { + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); +}; +const objectToString = Object.prototype.toString; +const toTypeString = (value) => objectToString.call(value); +const toRawType = (value) => { + return toTypeString(value).slice(8, -1); +}; +const isPlainObject = (val) => toTypeString(val) === "[object Object]"; +const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); +const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +}; +const camelizeRE = /-(\w)/g; +const camelize = cacheStringFunction( + (str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); + } +); +const hyphenateRE = /\B([A-Z])/g; +const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() +); +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const toHandlerKey = cacheStringFunction( + (str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + } +); +const hasChanged = (value, oldValue) => !Object.is(value, oldValue); +const invokeArrayFns = (fns, ...arg) => { + for (let i = 0; i < fns.length; i++) { + fns[i](...arg); + } +}; +const def = (obj, key, value, writable = false) => { + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + writable, + value + }); +}; +const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; +}; +const toNumber = (val) => { + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; +}; +let _globalThis; +const getGlobalThis = () => { + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); +}; +const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/; +function genPropsAccessExp(name) { + return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`; +} +function genCacheKey(source, options) { + return source + JSON.stringify( + options, + (_, val) => typeof val === "function" ? val.toString() : val + ); +} + +const PatchFlags = { + "TEXT": 1, + "1": "TEXT", + "CLASS": 2, + "2": "CLASS", + "STYLE": 4, + "4": "STYLE", + "PROPS": 8, + "8": "PROPS", + "FULL_PROPS": 16, + "16": "FULL_PROPS", + "NEED_HYDRATION": 32, + "32": "NEED_HYDRATION", + "STABLE_FRAGMENT": 64, + "64": "STABLE_FRAGMENT", + "KEYED_FRAGMENT": 128, + "128": "KEYED_FRAGMENT", + "UNKEYED_FRAGMENT": 256, + "256": "UNKEYED_FRAGMENT", + "NEED_PATCH": 512, + "512": "NEED_PATCH", + "DYNAMIC_SLOTS": 1024, + "1024": "DYNAMIC_SLOTS", + "DEV_ROOT_FRAGMENT": 2048, + "2048": "DEV_ROOT_FRAGMENT", + "CACHED": -1, + "-1": "CACHED", + "BAIL": -2, + "-2": "BAIL" +}; +const PatchFlagNames = { + [1]: `TEXT`, + [2]: `CLASS`, + [4]: `STYLE`, + [8]: `PROPS`, + [16]: `FULL_PROPS`, + [32]: `NEED_HYDRATION`, + [64]: `STABLE_FRAGMENT`, + [128]: `KEYED_FRAGMENT`, + [256]: `UNKEYED_FRAGMENT`, + [512]: `NEED_PATCH`, + [1024]: `DYNAMIC_SLOTS`, + [2048]: `DEV_ROOT_FRAGMENT`, + [-1]: `HOISTED`, + [-2]: `BAIL` +}; + +const ShapeFlags = { + "ELEMENT": 1, + "1": "ELEMENT", + "FUNCTIONAL_COMPONENT": 2, + "2": "FUNCTIONAL_COMPONENT", + "STATEFUL_COMPONENT": 4, + "4": "STATEFUL_COMPONENT", + "TEXT_CHILDREN": 8, + "8": "TEXT_CHILDREN", + "ARRAY_CHILDREN": 16, + "16": "ARRAY_CHILDREN", + "SLOTS_CHILDREN": 32, + "32": "SLOTS_CHILDREN", + "TELEPORT": 64, + "64": "TELEPORT", + "SUSPENSE": 128, + "128": "SUSPENSE", + "COMPONENT_SHOULD_KEEP_ALIVE": 256, + "256": "COMPONENT_SHOULD_KEEP_ALIVE", + "COMPONENT_KEPT_ALIVE": 512, + "512": "COMPONENT_KEPT_ALIVE", + "COMPONENT": 6, + "6": "COMPONENT" +}; + +const SlotFlags = { + "STABLE": 1, + "1": "STABLE", + "DYNAMIC": 2, + "2": "DYNAMIC", + "FORWARDED": 3, + "3": "FORWARDED" +}; +const slotFlagsText = { + [1]: "STABLE", + [2]: "DYNAMIC", + [3]: "FORWARDED" +}; + +const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; +const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); +const isGloballyWhitelisted = isGloballyAllowed; + +const range = 2; +function generateCodeFrame(source, start = 0, end = source.length) { + start = Math.max(0, Math.min(start, source.length)); + end = Math.max(0, Math.min(end, source.length)); + if (start > end) return ""; + let lines = source.split(/(\r?\n)/); + const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); + lines = lines.filter((_, idx) => idx % 2 === 0); + let count = 0; + const res = []; + for (let i = 0; i < lines.length; i++) { + count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); + if (count >= start) { + for (let j = i - range; j <= i + range || end > count; j++) { + if (j < 0 || j >= lines.length) continue; + const line = j + 1; + res.push( + `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` + ); + const lineLength = lines[j].length; + const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; + if (j === i) { + const pad = start - (count - (lineLength + newLineSeqLength)); + const length = Math.max( + 1, + end > count ? lineLength - pad : end - start + ); + res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); + } else if (j > i) { + if (end > count) { + const length = Math.max(Math.min(end - count, lineLength), 1); + res.push(` | ` + "^".repeat(length)); + } + count += lineLength + newLineSeqLength; + } + } + break; + } + } + return res.join("\n"); +} + +function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } +} +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:([^]+)/; +const styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function stringifyStyle(styles) { + if (!styles) return ""; + if (isString(styles)) return styles; + let ret = ""; + for (const key in styles) { + const value = styles[key]; + if (isString(value) || typeof value === "number") { + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + ret += `${normalizedKey}:${value};`; + } + } + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} +function normalizeProps(props) { + if (!props) return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; +} + +const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; +const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); +const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); +const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); +const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); + +const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); +const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` +); +function includeBooleanAttr(value) { + return !!value || value === ""; +} +const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; +const attrValidationCache = {}; +function isSSRSafeAttrName(name) { + if (attrValidationCache.hasOwnProperty(name)) { + return attrValidationCache[name]; + } + const isUnsafe = unsafeAttrCharRE.test(name); + if (isUnsafe) { + console.error(`unsafe attribute name: ${name}`); + } + return attrValidationCache[name] = !isUnsafe; +} +const propsToAttrMap = { + acceptCharset: "accept-charset", + className: "class", + htmlFor: "for", + httpEquiv: "http-equiv" +}; +const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` +); +const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` +); +const isKnownMathMLAttr = /* @__PURE__ */ makeMap( + `accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns` +); +function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; +} + +const escapeRE = /["'&<>]/; +function escapeHtml(string) { + const str = "" + string; + const match = escapeRE.exec(str); + if (!match) { + return str; + } + let html = ""; + let escaped; + let index; + let lastIndex = 0; + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + escaped = """; + break; + case 38: + escaped = "&"; + break; + case 39: + escaped = "'"; + break; + case 60: + escaped = "<"; + break; + case 62: + escaped = ">"; + break; + default: + continue; + } + if (lastIndex !== index) { + html += str.slice(lastIndex, index); + } + lastIndex = index + 1; + html += escaped; + } + return lastIndex !== index ? html + str.slice(lastIndex, index) : html; +} +const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g; +function escapeHtmlComment(src) { + return src.replace(commentStripRE, ""); +} +const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; +function getEscapedCssVarName(key, doubleEscape) { + return key.replace( + cssVarNameEscapeSymbolsRE, + (s) => doubleEscape ? s === '"' ? '\\\\\\"' : `\\\\${s}` : `\\${s}` + ); +} + +function looseCompareArrays(a, b) { + if (a.length !== b.length) return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; +} +function looseEqual(a, b) { + if (a === b) return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); +} +function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); +} + +const isRef = (val) => { + return !!(val && val["__v_isRef"] === true); +}; +const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); +}; +const replacer = (_key, val) => { + if (isRef(val)) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; +}; +const stringifySymbol = (v, i = "") => { + var _a; + return ( + // Symbol.description in es2019+ so we need to cast here to pass + // the lib: es2016 check + isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v + ); +}; + +exports.EMPTY_ARR = EMPTY_ARR; +exports.EMPTY_OBJ = EMPTY_OBJ; +exports.NO = NO; +exports.NOOP = NOOP; +exports.PatchFlagNames = PatchFlagNames; +exports.PatchFlags = PatchFlags; +exports.ShapeFlags = ShapeFlags; +exports.SlotFlags = SlotFlags; +exports.camelize = camelize; +exports.capitalize = capitalize; +exports.cssVarNameEscapeSymbolsRE = cssVarNameEscapeSymbolsRE; +exports.def = def; +exports.escapeHtml = escapeHtml; +exports.escapeHtmlComment = escapeHtmlComment; +exports.extend = extend; +exports.genCacheKey = genCacheKey; +exports.genPropsAccessExp = genPropsAccessExp; +exports.generateCodeFrame = generateCodeFrame; +exports.getEscapedCssVarName = getEscapedCssVarName; +exports.getGlobalThis = getGlobalThis; +exports.hasChanged = hasChanged; +exports.hasOwn = hasOwn; +exports.hyphenate = hyphenate; +exports.includeBooleanAttr = includeBooleanAttr; +exports.invokeArrayFns = invokeArrayFns; +exports.isArray = isArray; +exports.isBooleanAttr = isBooleanAttr; +exports.isBuiltInDirective = isBuiltInDirective; +exports.isDate = isDate; +exports.isFunction = isFunction; +exports.isGloballyAllowed = isGloballyAllowed; +exports.isGloballyWhitelisted = isGloballyWhitelisted; +exports.isHTMLTag = isHTMLTag; +exports.isIntegerKey = isIntegerKey; +exports.isKnownHtmlAttr = isKnownHtmlAttr; +exports.isKnownMathMLAttr = isKnownMathMLAttr; +exports.isKnownSvgAttr = isKnownSvgAttr; +exports.isMap = isMap; +exports.isMathMLTag = isMathMLTag; +exports.isModelListener = isModelListener; +exports.isObject = isObject; +exports.isOn = isOn; +exports.isPlainObject = isPlainObject; +exports.isPromise = isPromise; +exports.isRegExp = isRegExp; +exports.isRenderableAttrValue = isRenderableAttrValue; +exports.isReservedProp = isReservedProp; +exports.isSSRSafeAttrName = isSSRSafeAttrName; +exports.isSVGTag = isSVGTag; +exports.isSet = isSet; +exports.isSpecialBooleanAttr = isSpecialBooleanAttr; +exports.isString = isString; +exports.isSymbol = isSymbol; +exports.isVoidTag = isVoidTag; +exports.looseEqual = looseEqual; +exports.looseIndexOf = looseIndexOf; +exports.looseToNumber = looseToNumber; +exports.makeMap = makeMap; +exports.normalizeClass = normalizeClass; +exports.normalizeProps = normalizeProps; +exports.normalizeStyle = normalizeStyle; +exports.objectToString = objectToString; +exports.parseStringStyle = parseStringStyle; +exports.propsToAttrMap = propsToAttrMap; +exports.remove = remove; +exports.slotFlagsText = slotFlagsText; +exports.stringifyStyle = stringifyStyle; +exports.toDisplayString = toDisplayString; +exports.toHandlerKey = toHandlerKey; +exports.toNumber = toNumber; +exports.toRawType = toRawType; +exports.toTypeString = toTypeString; diff --git a/vuetest/node_modules/@vue/shared/dist/shared.cjs.prod.js b/vuetest/node_modules/@vue/shared/dist/shared.cjs.prod.js new file mode 100644 index 0000000..14b1902 --- /dev/null +++ b/vuetest/node_modules/@vue/shared/dist/shared.cjs.prod.js @@ -0,0 +1,594 @@ +/** +* @vue/shared v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function makeMap(str) { + const map = /* @__PURE__ */ Object.create(null); + for (const key of str.split(",")) map[key] = 1; + return (val) => val in map; +} + +const EMPTY_OBJ = {}; +const EMPTY_ARR = []; +const NOOP = () => { +}; +const NO = () => false; +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +const isModelListener = (key) => key.startsWith("onUpdate:"); +const extend = Object.assign; +const remove = (arr, el) => { + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } +}; +const hasOwnProperty = Object.prototype.hasOwnProperty; +const hasOwn = (val, key) => hasOwnProperty.call(val, key); +const isArray = Array.isArray; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isDate = (val) => toTypeString(val) === "[object Date]"; +const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; +const isFunction = (val) => typeof val === "function"; +const isString = (val) => typeof val === "string"; +const isSymbol = (val) => typeof val === "symbol"; +const isObject = (val) => val !== null && typeof val === "object"; +const isPromise = (val) => { + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); +}; +const objectToString = Object.prototype.toString; +const toTypeString = (value) => objectToString.call(value); +const toRawType = (value) => { + return toTypeString(value).slice(8, -1); +}; +const isPlainObject = (val) => toTypeString(val) === "[object Object]"; +const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); +const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +}; +const camelizeRE = /-(\w)/g; +const camelize = cacheStringFunction( + (str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); + } +); +const hyphenateRE = /\B([A-Z])/g; +const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() +); +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const toHandlerKey = cacheStringFunction( + (str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + } +); +const hasChanged = (value, oldValue) => !Object.is(value, oldValue); +const invokeArrayFns = (fns, ...arg) => { + for (let i = 0; i < fns.length; i++) { + fns[i](...arg); + } +}; +const def = (obj, key, value, writable = false) => { + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + writable, + value + }); +}; +const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; +}; +const toNumber = (val) => { + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; +}; +let _globalThis; +const getGlobalThis = () => { + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); +}; +const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/; +function genPropsAccessExp(name) { + return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`; +} +function genCacheKey(source, options) { + return source + JSON.stringify( + options, + (_, val) => typeof val === "function" ? val.toString() : val + ); +} + +const PatchFlags = { + "TEXT": 1, + "1": "TEXT", + "CLASS": 2, + "2": "CLASS", + "STYLE": 4, + "4": "STYLE", + "PROPS": 8, + "8": "PROPS", + "FULL_PROPS": 16, + "16": "FULL_PROPS", + "NEED_HYDRATION": 32, + "32": "NEED_HYDRATION", + "STABLE_FRAGMENT": 64, + "64": "STABLE_FRAGMENT", + "KEYED_FRAGMENT": 128, + "128": "KEYED_FRAGMENT", + "UNKEYED_FRAGMENT": 256, + "256": "UNKEYED_FRAGMENT", + "NEED_PATCH": 512, + "512": "NEED_PATCH", + "DYNAMIC_SLOTS": 1024, + "1024": "DYNAMIC_SLOTS", + "DEV_ROOT_FRAGMENT": 2048, + "2048": "DEV_ROOT_FRAGMENT", + "CACHED": -1, + "-1": "CACHED", + "BAIL": -2, + "-2": "BAIL" +}; +const PatchFlagNames = { + [1]: `TEXT`, + [2]: `CLASS`, + [4]: `STYLE`, + [8]: `PROPS`, + [16]: `FULL_PROPS`, + [32]: `NEED_HYDRATION`, + [64]: `STABLE_FRAGMENT`, + [128]: `KEYED_FRAGMENT`, + [256]: `UNKEYED_FRAGMENT`, + [512]: `NEED_PATCH`, + [1024]: `DYNAMIC_SLOTS`, + [2048]: `DEV_ROOT_FRAGMENT`, + [-1]: `HOISTED`, + [-2]: `BAIL` +}; + +const ShapeFlags = { + "ELEMENT": 1, + "1": "ELEMENT", + "FUNCTIONAL_COMPONENT": 2, + "2": "FUNCTIONAL_COMPONENT", + "STATEFUL_COMPONENT": 4, + "4": "STATEFUL_COMPONENT", + "TEXT_CHILDREN": 8, + "8": "TEXT_CHILDREN", + "ARRAY_CHILDREN": 16, + "16": "ARRAY_CHILDREN", + "SLOTS_CHILDREN": 32, + "32": "SLOTS_CHILDREN", + "TELEPORT": 64, + "64": "TELEPORT", + "SUSPENSE": 128, + "128": "SUSPENSE", + "COMPONENT_SHOULD_KEEP_ALIVE": 256, + "256": "COMPONENT_SHOULD_KEEP_ALIVE", + "COMPONENT_KEPT_ALIVE": 512, + "512": "COMPONENT_KEPT_ALIVE", + "COMPONENT": 6, + "6": "COMPONENT" +}; + +const SlotFlags = { + "STABLE": 1, + "1": "STABLE", + "DYNAMIC": 2, + "2": "DYNAMIC", + "FORWARDED": 3, + "3": "FORWARDED" +}; +const slotFlagsText = { + [1]: "STABLE", + [2]: "DYNAMIC", + [3]: "FORWARDED" +}; + +const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; +const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); +const isGloballyWhitelisted = isGloballyAllowed; + +const range = 2; +function generateCodeFrame(source, start = 0, end = source.length) { + start = Math.max(0, Math.min(start, source.length)); + end = Math.max(0, Math.min(end, source.length)); + if (start > end) return ""; + let lines = source.split(/(\r?\n)/); + const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); + lines = lines.filter((_, idx) => idx % 2 === 0); + let count = 0; + const res = []; + for (let i = 0; i < lines.length; i++) { + count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); + if (count >= start) { + for (let j = i - range; j <= i + range || end > count; j++) { + if (j < 0 || j >= lines.length) continue; + const line = j + 1; + res.push( + `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` + ); + const lineLength = lines[j].length; + const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; + if (j === i) { + const pad = start - (count - (lineLength + newLineSeqLength)); + const length = Math.max( + 1, + end > count ? lineLength - pad : end - start + ); + res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); + } else if (j > i) { + if (end > count) { + const length = Math.max(Math.min(end - count, lineLength), 1); + res.push(` | ` + "^".repeat(length)); + } + count += lineLength + newLineSeqLength; + } + } + break; + } + } + return res.join("\n"); +} + +function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } +} +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:([^]+)/; +const styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function stringifyStyle(styles) { + if (!styles) return ""; + if (isString(styles)) return styles; + let ret = ""; + for (const key in styles) { + const value = styles[key]; + if (isString(value) || typeof value === "number") { + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + ret += `${normalizedKey}:${value};`; + } + } + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} +function normalizeProps(props) { + if (!props) return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; +} + +const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; +const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); +const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); +const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); +const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); + +const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); +const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` +); +function includeBooleanAttr(value) { + return !!value || value === ""; +} +const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; +const attrValidationCache = {}; +function isSSRSafeAttrName(name) { + if (attrValidationCache.hasOwnProperty(name)) { + return attrValidationCache[name]; + } + const isUnsafe = unsafeAttrCharRE.test(name); + if (isUnsafe) { + console.error(`unsafe attribute name: ${name}`); + } + return attrValidationCache[name] = !isUnsafe; +} +const propsToAttrMap = { + acceptCharset: "accept-charset", + className: "class", + htmlFor: "for", + httpEquiv: "http-equiv" +}; +const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` +); +const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` +); +const isKnownMathMLAttr = /* @__PURE__ */ makeMap( + `accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns` +); +function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; +} + +const escapeRE = /["'&<>]/; +function escapeHtml(string) { + const str = "" + string; + const match = escapeRE.exec(str); + if (!match) { + return str; + } + let html = ""; + let escaped; + let index; + let lastIndex = 0; + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + escaped = """; + break; + case 38: + escaped = "&"; + break; + case 39: + escaped = "'"; + break; + case 60: + escaped = "<"; + break; + case 62: + escaped = ">"; + break; + default: + continue; + } + if (lastIndex !== index) { + html += str.slice(lastIndex, index); + } + lastIndex = index + 1; + html += escaped; + } + return lastIndex !== index ? html + str.slice(lastIndex, index) : html; +} +const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g; +function escapeHtmlComment(src) { + return src.replace(commentStripRE, ""); +} +const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; +function getEscapedCssVarName(key, doubleEscape) { + return key.replace( + cssVarNameEscapeSymbolsRE, + (s) => doubleEscape ? s === '"' ? '\\\\\\"' : `\\\\${s}` : `\\${s}` + ); +} + +function looseCompareArrays(a, b) { + if (a.length !== b.length) return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; +} +function looseEqual(a, b) { + if (a === b) return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); +} +function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); +} + +const isRef = (val) => { + return !!(val && val["__v_isRef"] === true); +}; +const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); +}; +const replacer = (_key, val) => { + if (isRef(val)) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; +}; +const stringifySymbol = (v, i = "") => { + var _a; + return ( + // Symbol.description in es2019+ so we need to cast here to pass + // the lib: es2016 check + isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v + ); +}; + +exports.EMPTY_ARR = EMPTY_ARR; +exports.EMPTY_OBJ = EMPTY_OBJ; +exports.NO = NO; +exports.NOOP = NOOP; +exports.PatchFlagNames = PatchFlagNames; +exports.PatchFlags = PatchFlags; +exports.ShapeFlags = ShapeFlags; +exports.SlotFlags = SlotFlags; +exports.camelize = camelize; +exports.capitalize = capitalize; +exports.cssVarNameEscapeSymbolsRE = cssVarNameEscapeSymbolsRE; +exports.def = def; +exports.escapeHtml = escapeHtml; +exports.escapeHtmlComment = escapeHtmlComment; +exports.extend = extend; +exports.genCacheKey = genCacheKey; +exports.genPropsAccessExp = genPropsAccessExp; +exports.generateCodeFrame = generateCodeFrame; +exports.getEscapedCssVarName = getEscapedCssVarName; +exports.getGlobalThis = getGlobalThis; +exports.hasChanged = hasChanged; +exports.hasOwn = hasOwn; +exports.hyphenate = hyphenate; +exports.includeBooleanAttr = includeBooleanAttr; +exports.invokeArrayFns = invokeArrayFns; +exports.isArray = isArray; +exports.isBooleanAttr = isBooleanAttr; +exports.isBuiltInDirective = isBuiltInDirective; +exports.isDate = isDate; +exports.isFunction = isFunction; +exports.isGloballyAllowed = isGloballyAllowed; +exports.isGloballyWhitelisted = isGloballyWhitelisted; +exports.isHTMLTag = isHTMLTag; +exports.isIntegerKey = isIntegerKey; +exports.isKnownHtmlAttr = isKnownHtmlAttr; +exports.isKnownMathMLAttr = isKnownMathMLAttr; +exports.isKnownSvgAttr = isKnownSvgAttr; +exports.isMap = isMap; +exports.isMathMLTag = isMathMLTag; +exports.isModelListener = isModelListener; +exports.isObject = isObject; +exports.isOn = isOn; +exports.isPlainObject = isPlainObject; +exports.isPromise = isPromise; +exports.isRegExp = isRegExp; +exports.isRenderableAttrValue = isRenderableAttrValue; +exports.isReservedProp = isReservedProp; +exports.isSSRSafeAttrName = isSSRSafeAttrName; +exports.isSVGTag = isSVGTag; +exports.isSet = isSet; +exports.isSpecialBooleanAttr = isSpecialBooleanAttr; +exports.isString = isString; +exports.isSymbol = isSymbol; +exports.isVoidTag = isVoidTag; +exports.looseEqual = looseEqual; +exports.looseIndexOf = looseIndexOf; +exports.looseToNumber = looseToNumber; +exports.makeMap = makeMap; +exports.normalizeClass = normalizeClass; +exports.normalizeProps = normalizeProps; +exports.normalizeStyle = normalizeStyle; +exports.objectToString = objectToString; +exports.parseStringStyle = parseStringStyle; +exports.propsToAttrMap = propsToAttrMap; +exports.remove = remove; +exports.slotFlagsText = slotFlagsText; +exports.stringifyStyle = stringifyStyle; +exports.toDisplayString = toDisplayString; +exports.toHandlerKey = toHandlerKey; +exports.toNumber = toNumber; +exports.toRawType = toRawType; +exports.toTypeString = toTypeString; diff --git a/vuetest/node_modules/@vue/shared/dist/shared.d.ts b/vuetest/node_modules/@vue/shared/dist/shared.d.ts new file mode 100644 index 0000000..ab2199d --- /dev/null +++ b/vuetest/node_modules/@vue/shared/dist/shared.d.ts @@ -0,0 +1,328 @@ +/** + * Make a map and return a function for checking if a key + * is in that map. + * IMPORTANT: all calls of this function must be prefixed with + * \/\*#\_\_PURE\_\_\*\/ + * So that rollup can tree-shake them if necessary. + */ +/*! #__NO_SIDE_EFFECTS__ */ +export declare function makeMap(str: string): (key: string) => boolean; + +export declare const EMPTY_OBJ: { + readonly [key: string]: any; +}; +export declare const EMPTY_ARR: readonly never[]; +export declare const NOOP: () => void; +/** + * Always return false. + */ +export declare const NO: () => boolean; +export declare const isOn: (key: string) => boolean; +export declare const isModelListener: (key: string) => key is `onUpdate:${string}`; +export declare const extend: typeof Object.assign; +export declare const remove: <T>(arr: T[], el: T) => void; +export declare const hasOwn: (val: object, key: string | symbol) => key is keyof typeof val; +export declare const isArray: typeof Array.isArray; +export declare const isMap: (val: unknown) => val is Map<any, any>; +export declare const isSet: (val: unknown) => val is Set<any>; +export declare const isDate: (val: unknown) => val is Date; +export declare const isRegExp: (val: unknown) => val is RegExp; +export declare const isFunction: (val: unknown) => val is Function; +export declare const isString: (val: unknown) => val is string; +export declare const isSymbol: (val: unknown) => val is symbol; +export declare const isObject: (val: unknown) => val is Record<any, any>; +export declare const isPromise: <T = any>(val: unknown) => val is Promise<T>; +export declare const objectToString: typeof Object.prototype.toString; +export declare const toTypeString: (value: unknown) => string; +export declare const toRawType: (value: unknown) => string; +export declare const isPlainObject: (val: unknown) => val is object; +export declare const isIntegerKey: (key: unknown) => boolean; +export declare const isReservedProp: (key: string) => boolean; +export declare const isBuiltInDirective: (key: string) => boolean; +/** + * @private + */ +export declare const camelize: (str: string) => string; +/** + * @private + */ +export declare const hyphenate: (str: string) => string; +/** + * @private + */ +export declare const capitalize: <T extends string>(str: T) => Capitalize<T>; +/** + * @private + */ +export declare const toHandlerKey: <T extends string>(str: T) => T extends '' ? '' : `on${Capitalize<T>}`; +export declare const hasChanged: (value: any, oldValue: any) => boolean; +export declare const invokeArrayFns: (fns: Function[], ...arg: any[]) => void; +export declare const def: (obj: object, key: string | symbol, value: any, writable?: boolean) => void; +/** + * "123-foo" will be parsed to 123 + * This is used for the .number modifier in v-model + */ +export declare const looseToNumber: (val: any) => any; +/** + * Only concerns number-like strings + * "123-foo" will be returned as-is + */ +export declare const toNumber: (val: any) => any; +export declare const getGlobalThis: () => any; +export declare function genPropsAccessExp(name: string): string; +export declare function genCacheKey(source: string, options: any): string; + +/** + * Patch flags are optimization hints generated by the compiler. + * when a block with dynamicChildren is encountered during diff, the algorithm + * enters "optimized mode". In this mode, we know that the vdom is produced by + * a render function generated by the compiler, so the algorithm only needs to + * handle updates explicitly marked by these patch flags. + * + * Patch flags can be combined using the | bitwise operator and can be checked + * using the & operator, e.g. + * + * ```js + * const flag = TEXT | CLASS + * if (flag & TEXT) { ... } + * ``` + * + * Check the `patchElement` function in '../../runtime-core/src/renderer.ts' to see how the + * flags are handled during diff. + */ +export declare enum PatchFlags { + /** + * Indicates an element with dynamic textContent (children fast path) + */ + TEXT = 1, + /** + * Indicates an element with dynamic class binding. + */ + CLASS = 2, + /** + * Indicates an element with dynamic style + * The compiler pre-compiles static string styles into static objects + * + detects and hoists inline static objects + * e.g. `style="color: red"` and `:style="{ color: 'red' }"` both get hoisted + * as: + * ```js + * const style = { color: 'red' } + * render() { return e('div', { style }) } + * ``` + */ + STYLE = 4, + /** + * Indicates an element that has non-class/style dynamic props. + * Can also be on a component that has any dynamic props (includes + * class/style). when this flag is present, the vnode also has a dynamicProps + * array that contains the keys of the props that may change so the runtime + * can diff them faster (without having to worry about removed props) + */ + PROPS = 8, + /** + * Indicates an element with props with dynamic keys. When keys change, a full + * diff is always needed to remove the old key. This flag is mutually + * exclusive with CLASS, STYLE and PROPS. + */ + FULL_PROPS = 16, + /** + * Indicates an element that requires props hydration + * (but not necessarily patching) + * e.g. event listeners & v-bind with prop modifier + */ + NEED_HYDRATION = 32, + /** + * Indicates a fragment whose children order doesn't change. + */ + STABLE_FRAGMENT = 64, + /** + * Indicates a fragment with keyed or partially keyed children + */ + KEYED_FRAGMENT = 128, + /** + * Indicates a fragment with unkeyed children. + */ + UNKEYED_FRAGMENT = 256, + /** + * Indicates an element that only needs non-props patching, e.g. ref or + * directives (onVnodeXXX hooks). since every patched vnode checks for refs + * and onVnodeXXX hooks, it simply marks the vnode so that a parent block + * will track it. + */ + NEED_PATCH = 512, + /** + * Indicates a component with dynamic slots (e.g. slot that references a v-for + * iterated value, or dynamic slot names). + * Components with this flag are always force updated. + */ + DYNAMIC_SLOTS = 1024, + /** + * Indicates a fragment that was created only because the user has placed + * comments at the root level of a template. This is a dev-only flag since + * comments are stripped in production. + */ + DEV_ROOT_FRAGMENT = 2048, + /** + * SPECIAL FLAGS ------------------------------------------------------------- + * Special flags are negative integers. They are never matched against using + * bitwise operators (bitwise matching should only happen in branches where + * patchFlag > 0), and are mutually exclusive. When checking for a special + * flag, simply check patchFlag === FLAG. + */ + /** + * Indicates a cached static vnode. This is also a hint for hydration to skip + * the entire sub tree since static content never needs to be updated. + */ + CACHED = -1, + /** + * A special flag that indicates that the diffing algorithm should bail out + * of optimized mode. For example, on block fragments created by renderSlot() + * when encountering non-compiler generated slots (i.e. manually written + * render functions, which should always be fully diffed) + * OR manually cloneVNodes + */ + BAIL = -2 +} +/** + * dev only flag -> name mapping + */ +export declare const PatchFlagNames: Record<PatchFlags, string>; + +export declare enum ShapeFlags { + ELEMENT = 1, + FUNCTIONAL_COMPONENT = 2, + STATEFUL_COMPONENT = 4, + TEXT_CHILDREN = 8, + ARRAY_CHILDREN = 16, + SLOTS_CHILDREN = 32, + TELEPORT = 64, + SUSPENSE = 128, + COMPONENT_SHOULD_KEEP_ALIVE = 256, + COMPONENT_KEPT_ALIVE = 512, + COMPONENT = 6 +} + +export declare enum SlotFlags { + /** + * Stable slots that only reference slot props or context state. The slot + * can fully capture its own dependencies so when passed down the parent won't + * need to force the child to update. + */ + STABLE = 1, + /** + * Slots that reference scope variables (v-for or an outer slot prop), or + * has conditional structure (v-if, v-for). The parent will need to force + * the child to update because the slot does not fully capture its dependencies. + */ + DYNAMIC = 2, + /** + * `<slot/>` being forwarded into a child component. Whether the parent needs + * to update the child is dependent on what kind of slots the parent itself + * received. This has to be refined at runtime, when the child's vnode + * is being created (in `normalizeChildren`) + */ + FORWARDED = 3 +} +/** + * Dev only + */ +export declare const slotFlagsText: Record<SlotFlags, string>; + +export declare const isGloballyAllowed: (key: string) => boolean; +/** @deprecated use `isGloballyAllowed` instead */ +export declare const isGloballyWhitelisted: (key: string) => boolean; + +export declare function generateCodeFrame(source: string, start?: number, end?: number): string; + +export type NormalizedStyle = Record<string, string | number>; +export declare function normalizeStyle(value: unknown): NormalizedStyle | string | undefined; +export declare function parseStringStyle(cssText: string): NormalizedStyle; +export declare function stringifyStyle(styles: NormalizedStyle | string | undefined): string; +export declare function normalizeClass(value: unknown): string; +export declare function normalizeProps(props: Record<string, any> | null): Record<string, any> | null; + +/** + * Compiler only. + * Do NOT use in runtime code paths unless behind `__DEV__` flag. + */ +export declare const isHTMLTag: (key: string) => boolean; +/** + * Compiler only. + * Do NOT use in runtime code paths unless behind `__DEV__` flag. + */ +export declare const isSVGTag: (key: string) => boolean; +/** + * Compiler only. + * Do NOT use in runtime code paths unless behind `__DEV__` flag. + */ +export declare const isMathMLTag: (key: string) => boolean; +/** + * Compiler only. + * Do NOT use in runtime code paths unless behind `__DEV__` flag. + */ +export declare const isVoidTag: (key: string) => boolean; + +export declare const isSpecialBooleanAttr: (key: string) => boolean; +/** + * The full list is needed during SSR to produce the correct initial markup. + */ +export declare const isBooleanAttr: (key: string) => boolean; +/** + * Boolean attributes should be included if the value is truthy or ''. + * e.g. `<select multiple>` compiles to `{ multiple: '' }` + */ +export declare function includeBooleanAttr(value: unknown): boolean; +export declare function isSSRSafeAttrName(name: string): boolean; +export declare const propsToAttrMap: Record<string, string | undefined>; +/** + * Known attributes, this is used for stringification of runtime static nodes + * so that we don't stringify bindings that cannot be set from HTML. + * Don't also forget to allow `data-*` and `aria-*`! + * Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes + */ +export declare const isKnownHtmlAttr: (key: string) => boolean; +/** + * Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute + */ +export declare const isKnownSvgAttr: (key: string) => boolean; +/** + * Generated from https://developer.mozilla.org/en-US/docs/Web/MathML/Attribute + */ +export declare const isKnownMathMLAttr: (key: string) => boolean; +/** + * Shared between server-renderer and runtime-core hydration logic + */ +export declare function isRenderableAttrValue(value: unknown): boolean; + +export declare function escapeHtml(string: unknown): string; +export declare function escapeHtmlComment(src: string): string; +export declare const cssVarNameEscapeSymbolsRE: RegExp; +export declare function getEscapedCssVarName(key: string, doubleEscape: boolean): string; + +export declare function looseEqual(a: any, b: any): boolean; +export declare function looseIndexOf(arr: any[], val: any): number; + +/** + * For converting {{ interpolation }} values to displayed strings. + * @private + */ +export declare const toDisplayString: (val: unknown) => string; + +export type Prettify<T> = { + [K in keyof T]: T[K]; +} & {}; +export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; +export type LooseRequired<T> = { + [P in keyof (T & Required<T>)]: T[P]; +}; +export type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N; +export type IsKeyValues<T, K = string> = IfAny<T, false, T extends object ? (keyof T extends K ? true : false) : false>; +/** + * Utility for extracting the parameters from a function overload (for typed emits) + * https://github.com/microsoft/TypeScript/issues/32164#issuecomment-1146737709 + */ +export type OverloadParameters<T extends (...args: any[]) => any> = Parameters<OverloadUnion<T>>; +type OverloadProps<TOverload> = Pick<TOverload, keyof TOverload>; +type OverloadUnionRecursive<TOverload, TPartialOverload = unknown> = TOverload extends (...args: infer TArgs) => infer TReturn ? TPartialOverload extends TOverload ? never : OverloadUnionRecursive<TPartialOverload & TOverload, TPartialOverload & ((...args: TArgs) => TReturn) & OverloadProps<TOverload>> | ((...args: TArgs) => TReturn) : never; +type OverloadUnion<TOverload extends (...args: any[]) => any> = Exclude<OverloadUnionRecursive<(() => never) & TOverload>, TOverload extends () => never ? never : () => never>; + diff --git a/vuetest/node_modules/@vue/shared/dist/shared.esm-bundler.js b/vuetest/node_modules/@vue/shared/dist/shared.esm-bundler.js new file mode 100644 index 0000000..68f3306 --- /dev/null +++ b/vuetest/node_modules/@vue/shared/dist/shared.esm-bundler.js @@ -0,0 +1,519 @@ +/** +* @vue/shared v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function makeMap(str) { + const map = /* @__PURE__ */ Object.create(null); + for (const key of str.split(",")) map[key] = 1; + return (val) => val in map; +} + +const EMPTY_OBJ = !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {}; +const EMPTY_ARR = !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : []; +const NOOP = () => { +}; +const NO = () => false; +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +const isModelListener = (key) => key.startsWith("onUpdate:"); +const extend = Object.assign; +const remove = (arr, el) => { + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } +}; +const hasOwnProperty = Object.prototype.hasOwnProperty; +const hasOwn = (val, key) => hasOwnProperty.call(val, key); +const isArray = Array.isArray; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isDate = (val) => toTypeString(val) === "[object Date]"; +const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; +const isFunction = (val) => typeof val === "function"; +const isString = (val) => typeof val === "string"; +const isSymbol = (val) => typeof val === "symbol"; +const isObject = (val) => val !== null && typeof val === "object"; +const isPromise = (val) => { + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); +}; +const objectToString = Object.prototype.toString; +const toTypeString = (value) => objectToString.call(value); +const toRawType = (value) => { + return toTypeString(value).slice(8, -1); +}; +const isPlainObject = (val) => toTypeString(val) === "[object Object]"; +const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); +const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +}; +const camelizeRE = /-(\w)/g; +const camelize = cacheStringFunction( + (str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); + } +); +const hyphenateRE = /\B([A-Z])/g; +const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() +); +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const toHandlerKey = cacheStringFunction( + (str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + } +); +const hasChanged = (value, oldValue) => !Object.is(value, oldValue); +const invokeArrayFns = (fns, ...arg) => { + for (let i = 0; i < fns.length; i++) { + fns[i](...arg); + } +}; +const def = (obj, key, value, writable = false) => { + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + writable, + value + }); +}; +const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; +}; +const toNumber = (val) => { + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; +}; +let _globalThis; +const getGlobalThis = () => { + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); +}; +const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/; +function genPropsAccessExp(name) { + return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`; +} +function genCacheKey(source, options) { + return source + JSON.stringify( + options, + (_, val) => typeof val === "function" ? val.toString() : val + ); +} + +const PatchFlags = { + "TEXT": 1, + "1": "TEXT", + "CLASS": 2, + "2": "CLASS", + "STYLE": 4, + "4": "STYLE", + "PROPS": 8, + "8": "PROPS", + "FULL_PROPS": 16, + "16": "FULL_PROPS", + "NEED_HYDRATION": 32, + "32": "NEED_HYDRATION", + "STABLE_FRAGMENT": 64, + "64": "STABLE_FRAGMENT", + "KEYED_FRAGMENT": 128, + "128": "KEYED_FRAGMENT", + "UNKEYED_FRAGMENT": 256, + "256": "UNKEYED_FRAGMENT", + "NEED_PATCH": 512, + "512": "NEED_PATCH", + "DYNAMIC_SLOTS": 1024, + "1024": "DYNAMIC_SLOTS", + "DEV_ROOT_FRAGMENT": 2048, + "2048": "DEV_ROOT_FRAGMENT", + "CACHED": -1, + "-1": "CACHED", + "BAIL": -2, + "-2": "BAIL" +}; +const PatchFlagNames = { + [1]: `TEXT`, + [2]: `CLASS`, + [4]: `STYLE`, + [8]: `PROPS`, + [16]: `FULL_PROPS`, + [32]: `NEED_HYDRATION`, + [64]: `STABLE_FRAGMENT`, + [128]: `KEYED_FRAGMENT`, + [256]: `UNKEYED_FRAGMENT`, + [512]: `NEED_PATCH`, + [1024]: `DYNAMIC_SLOTS`, + [2048]: `DEV_ROOT_FRAGMENT`, + [-1]: `HOISTED`, + [-2]: `BAIL` +}; + +const ShapeFlags = { + "ELEMENT": 1, + "1": "ELEMENT", + "FUNCTIONAL_COMPONENT": 2, + "2": "FUNCTIONAL_COMPONENT", + "STATEFUL_COMPONENT": 4, + "4": "STATEFUL_COMPONENT", + "TEXT_CHILDREN": 8, + "8": "TEXT_CHILDREN", + "ARRAY_CHILDREN": 16, + "16": "ARRAY_CHILDREN", + "SLOTS_CHILDREN": 32, + "32": "SLOTS_CHILDREN", + "TELEPORT": 64, + "64": "TELEPORT", + "SUSPENSE": 128, + "128": "SUSPENSE", + "COMPONENT_SHOULD_KEEP_ALIVE": 256, + "256": "COMPONENT_SHOULD_KEEP_ALIVE", + "COMPONENT_KEPT_ALIVE": 512, + "512": "COMPONENT_KEPT_ALIVE", + "COMPONENT": 6, + "6": "COMPONENT" +}; + +const SlotFlags = { + "STABLE": 1, + "1": "STABLE", + "DYNAMIC": 2, + "2": "DYNAMIC", + "FORWARDED": 3, + "3": "FORWARDED" +}; +const slotFlagsText = { + [1]: "STABLE", + [2]: "DYNAMIC", + [3]: "FORWARDED" +}; + +const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; +const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); +const isGloballyWhitelisted = isGloballyAllowed; + +const range = 2; +function generateCodeFrame(source, start = 0, end = source.length) { + start = Math.max(0, Math.min(start, source.length)); + end = Math.max(0, Math.min(end, source.length)); + if (start > end) return ""; + let lines = source.split(/(\r?\n)/); + const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); + lines = lines.filter((_, idx) => idx % 2 === 0); + let count = 0; + const res = []; + for (let i = 0; i < lines.length; i++) { + count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); + if (count >= start) { + for (let j = i - range; j <= i + range || end > count; j++) { + if (j < 0 || j >= lines.length) continue; + const line = j + 1; + res.push( + `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` + ); + const lineLength = lines[j].length; + const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; + if (j === i) { + const pad = start - (count - (lineLength + newLineSeqLength)); + const length = Math.max( + 1, + end > count ? lineLength - pad : end - start + ); + res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); + } else if (j > i) { + if (end > count) { + const length = Math.max(Math.min(end - count, lineLength), 1); + res.push(` | ` + "^".repeat(length)); + } + count += lineLength + newLineSeqLength; + } + } + break; + } + } + return res.join("\n"); +} + +function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } +} +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:([^]+)/; +const styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function stringifyStyle(styles) { + if (!styles) return ""; + if (isString(styles)) return styles; + let ret = ""; + for (const key in styles) { + const value = styles[key]; + if (isString(value) || typeof value === "number") { + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + ret += `${normalizedKey}:${value};`; + } + } + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} +function normalizeProps(props) { + if (!props) return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; +} + +const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; +const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); +const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); +const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); +const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); + +const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); +const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` +); +function includeBooleanAttr(value) { + return !!value || value === ""; +} +const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; +const attrValidationCache = {}; +function isSSRSafeAttrName(name) { + if (attrValidationCache.hasOwnProperty(name)) { + return attrValidationCache[name]; + } + const isUnsafe = unsafeAttrCharRE.test(name); + if (isUnsafe) { + console.error(`unsafe attribute name: ${name}`); + } + return attrValidationCache[name] = !isUnsafe; +} +const propsToAttrMap = { + acceptCharset: "accept-charset", + className: "class", + htmlFor: "for", + httpEquiv: "http-equiv" +}; +const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` +); +const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` +); +const isKnownMathMLAttr = /* @__PURE__ */ makeMap( + `accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns` +); +function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; +} + +const escapeRE = /["'&<>]/; +function escapeHtml(string) { + const str = "" + string; + const match = escapeRE.exec(str); + if (!match) { + return str; + } + let html = ""; + let escaped; + let index; + let lastIndex = 0; + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + escaped = """; + break; + case 38: + escaped = "&"; + break; + case 39: + escaped = "'"; + break; + case 60: + escaped = "<"; + break; + case 62: + escaped = ">"; + break; + default: + continue; + } + if (lastIndex !== index) { + html += str.slice(lastIndex, index); + } + lastIndex = index + 1; + html += escaped; + } + return lastIndex !== index ? html + str.slice(lastIndex, index) : html; +} +const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g; +function escapeHtmlComment(src) { + return src.replace(commentStripRE, ""); +} +const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; +function getEscapedCssVarName(key, doubleEscape) { + return key.replace( + cssVarNameEscapeSymbolsRE, + (s) => doubleEscape ? s === '"' ? '\\\\\\"' : `\\\\${s}` : `\\${s}` + ); +} + +function looseCompareArrays(a, b) { + if (a.length !== b.length) return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; +} +function looseEqual(a, b) { + if (a === b) return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); +} +function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); +} + +const isRef = (val) => { + return !!(val && val["__v_isRef"] === true); +}; +const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); +}; +const replacer = (_key, val) => { + if (isRef(val)) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; +}; +const stringifySymbol = (v, i = "") => { + var _a; + return ( + // Symbol.description in es2019+ so we need to cast here to pass + // the lib: es2016 check + isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v + ); +}; + +export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, cssVarNameEscapeSymbolsRE, def, escapeHtml, escapeHtmlComment, extend, genCacheKey, genPropsAccessExp, generateCodeFrame, getEscapedCssVarName, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownMathMLAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString }; diff --git a/vuetest/node_modules/@vue/shared/index.js b/vuetest/node_modules/@vue/shared/index.js new file mode 100644 index 0000000..a2ee43e --- /dev/null +++ b/vuetest/node_modules/@vue/shared/index.js @@ -0,0 +1,7 @@ +'use strict' + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/shared.cjs.prod.js') +} else { + module.exports = require('./dist/shared.cjs.js') +} diff --git a/vuetest/node_modules/@vue/shared/package.json b/vuetest/node_modules/@vue/shared/package.json new file mode 100644 index 0000000..9541478 --- /dev/null +++ b/vuetest/node_modules/@vue/shared/package.json @@ -0,0 +1,47 @@ +{ + "name": "@vue/shared", + "version": "3.5.13", + "description": "internal utils shared across @vue packages", + "main": "index.js", + "module": "dist/shared.esm-bundler.js", + "types": "dist/shared.d.ts", + "files": [ + "index.js", + "dist" + ], + "exports": { + ".": { + "types": "./dist/shared.d.ts", + "node": { + "production": "./dist/shared.cjs.prod.js", + "development": "./dist/shared.cjs.js", + "default": "./index.js" + }, + "module": "./dist/shared.esm-bundler.js", + "import": "./dist/shared.esm-bundler.js", + "require": "./index.js" + }, + "./*": "./*" + }, + "sideEffects": false, + "buildOptions": { + "formats": [ + "esm-bundler", + "cjs" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/vuejs/core.git", + "directory": "packages/shared" + }, + "keywords": [ + "vue" + ], + "author": "Evan You", + "license": "MIT", + "bugs": { + "url": "https://github.com/vuejs/core/issues" + }, + "homepage": "https://github.com/vuejs/core/tree/main/packages/shared#readme" +} \ No newline at end of file diff --git a/vuetest/node_modules/csstype/LICENSE b/vuetest/node_modules/csstype/LICENSE new file mode 100644 index 0000000..ac06f62 --- /dev/null +++ b/vuetest/node_modules/csstype/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2017-2018 Fredrik Nicol + +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. diff --git a/vuetest/node_modules/csstype/README.md b/vuetest/node_modules/csstype/README.md new file mode 100644 index 0000000..75947e1 --- /dev/null +++ b/vuetest/node_modules/csstype/README.md @@ -0,0 +1,277 @@ +# CSSType + +[![npm](https://img.shields.io/npm/v/csstype.svg)](https://www.npmjs.com/package/csstype) + +TypeScript and Flow definitions for CSS, generated by [data from MDN](https://github.com/mdn/data). It provides autocompletion and type checking for CSS properties and values. + +**TypeScript** + +```ts +import type * as CSS from 'csstype'; + +const style: CSS.Properties = { + colour: 'white', // Type error on property + textAlign: 'middle', // Type error on value +}; +``` + +**Flow** + +```js +// @flow strict +import * as CSS from 'csstype'; + +const style: CSS.Properties<> = { + colour: 'white', // Type error on property + textAlign: 'middle', // Type error on value +}; +``` + +_Further examples below will be in TypeScript!_ + +## Getting started + +```sh +$ npm install csstype +``` + +## Table of content + +- [Style types](#style-types) +- [At-rule types](#at-rule-types) +- [Pseudo types](#pseudo-types) +- [Generics](#generics) +- [Usage](#usage) +- [What should I do when I get type errors?](#what-should-i-do-when-i-get-type-errors) +- [Version 3.0](#version-30) +- [Contributing](#contributing) + +## Style types + +Properties are categorized in different uses and in several technical variations to provide typings that suits as many as possible. + +| | Default | `Hyphen` | `Fallback` | `HyphenFallback` | +| -------------- | -------------------- | -------------------------- | ---------------------------- | ---------------------------------- | +| **All** | `Properties` | `PropertiesHyphen` | `PropertiesFallback` | `PropertiesHyphenFallback` | +| **`Standard`** | `StandardProperties` | `StandardPropertiesHyphen` | `StandardPropertiesFallback` | `StandardPropertiesHyphenFallback` | +| **`Vendor`** | `VendorProperties` | `VendorPropertiesHyphen` | `VendorPropertiesFallback` | `VendorPropertiesHyphenFallback` | +| **`Obsolete`** | `ObsoleteProperties` | `ObsoletePropertiesHyphen` | `ObsoletePropertiesFallback` | `ObsoletePropertiesHyphenFallback` | +| **`Svg`** | `SvgProperties` | `SvgPropertiesHyphen` | `SvgPropertiesFallback` | `SvgPropertiesHyphenFallback` | + +Categories: + +- **All** - Includes `Standard`, `Vendor`, `Obsolete` and `Svg` +- **`Standard`** - Current properties and extends subcategories `StandardLonghand` and `StandardShorthand` _(e.g. `StandardShorthandProperties`)_ +- **`Vendor`** - Vendor prefixed properties and extends subcategories `VendorLonghand` and `VendorShorthand` _(e.g. `VendorShorthandProperties`)_ +- **`Obsolete`** - Removed or deprecated properties +- **`Svg`** - SVG-specific properties + +Variations: + +- **Default** - JavaScript (camel) cased property names +- **`Hyphen`** - CSS (kebab) cased property names +- **`Fallback`** - Also accepts array of values e.g. `string | string[]` + +## At-rule types + +At-rule interfaces with descriptors. + +**TypeScript**: These will be found in the `AtRule` namespace, e.g. `AtRule.Viewport`. +**Flow**: These will be prefixed with `AtRule$`, e.g. `AtRule$Viewport`. + +| | Default | `Hyphen` | `Fallback` | `HyphenFallback` | +| -------------------- | -------------- | -------------------- | ---------------------- | ---------------------------- | +| **`@counter-style`** | `CounterStyle` | `CounterStyleHyphen` | `CounterStyleFallback` | `CounterStyleHyphenFallback` | +| **`@font-face`** | `FontFace` | `FontFaceHyphen` | `FontFaceFallback` | `FontFaceHyphenFallback` | +| **`@viewport`** | `Viewport` | `ViewportHyphen` | `ViewportFallback` | `ViewportHyphenFallback` | + +## Pseudo types + +String literals of pseudo classes and pseudo elements + +- `Pseudos` + + Extends: + + - `AdvancedPseudos` + + Function-like pseudos e.g. `:not(:first-child)`. The string literal contains the value excluding the parenthesis: `:not`. These are separated because they require an argument that results in infinite number of variations. + + - `SimplePseudos` + + Plain pseudos e.g. `:hover` that can only be **one** variation. + +## Generics + +All interfaces has two optional generic argument to define length and time: `CSS.Properties<TLength = string | 0, TTime = string>` + +- **Length** is the first generic parameter and defaults to `string | 0` because `0` is the only [length where the unit identifier is optional](https://drafts.csswg.org/css-values-3/#lengths). You can specify this, e.g. `string | number`, for platforms and libraries that accepts any numeric value as length with a specific unit. + ```tsx + const style: CSS.Properties<string | number> = { + width: 100, + }; + ``` +- **Time** is the second generic argument and defaults to `string`. You can specify this, e.g. `string | number`, for platforms and libraries that accepts any numeric value as length with a specific unit. + ```tsx + const style: CSS.Properties<string | number, number> = { + transitionDuration: 1000, + }; + ``` + +## Usage + +```ts +import type * as CSS from 'csstype'; + +const style: CSS.Properties = { + width: '10px', + margin: '1em', +}; +``` + +In some cases, like for CSS-in-JS libraries, an array of values is a way to provide fallback values in CSS. Using `CSS.PropertiesFallback` instead of `CSS.Properties` will add the possibility to use any property value as an array of values. + +```ts +import type * as CSS from 'csstype'; + +const style: CSS.PropertiesFallback = { + display: ['-webkit-flex', 'flex'], + color: 'white', +}; +``` + +There's even string literals for pseudo selectors and elements. + +```ts +import type * as CSS from 'csstype'; + +const pseudos: { [P in CSS.SimplePseudos]?: CSS.Properties } = { + ':hover': { + display: 'flex', + }, +}; +``` + +Hyphen cased (kebab cased) properties are provided in `CSS.PropertiesHyphen` and `CSS.PropertiesHyphenFallback`. It's not **not** added by default in `CSS.Properties`. To allow both of them, you can simply extend with `CSS.PropertiesHyphen` or/and `CSS.PropertiesHyphenFallback`. + +```ts +import type * as CSS from 'csstype'; + +interface Style extends CSS.Properties, CSS.PropertiesHyphen {} + +const style: Style = { + 'flex-grow': 1, + 'flex-shrink': 0, + 'font-weight': 'normal', + backgroundColor: 'white', +}; +``` + +Adding type checked CSS properties to a `HTMLElement`. + +```ts +import type * as CSS from 'csstype'; + +const style: CSS.Properties = { + color: 'red', + margin: '1em', +}; + +let button = document.createElement('button'); + +Object.assign(button.style, style); +``` + +## What should I do when I get type errors? + +The goal is to have as perfect types as possible and we're trying to do our best. But with CSS Custom Properties, the CSS specification changing frequently and vendors implementing their own specifications with new releases sometimes causes type errors even if it should work. Here's some steps you could take to get it fixed: + +_If you're using CSS Custom Properties you can step directly to step 3._ + +1. **First of all, make sure you're doing it right.** A type error could also indicate that you're not :wink: + + - Some CSS specs that some vendors has implemented could have been officially rejected or haven't yet received any official acceptance and are therefor not included + - If you're using TypeScript, [type widening](https://blog.mariusschulz.com/2017/02/04/TypeScript-2-1-literal-type-widening) could be the reason you get `Type 'string' is not assignable to...` errors + +2. **Have a look in [issues](https://github.com/frenic/csstype/issues) to see if an issue already has been filed. If not, create a new one.** To help us out, please refer to any information you have found. +3. Fix the issue locally with **TypeScript** (Flow further down): + + - The recommended way is to use **module augmentation**. Here's a few examples: + + ```ts + // My css.d.ts file + import type * as CSS from 'csstype'; + + declare module 'csstype' { + interface Properties { + // Add a missing property + WebkitRocketLauncher?: string; + + // Add a CSS Custom Property + '--theme-color'?: 'black' | 'white'; + + // Allow namespaced CSS Custom Properties + [index: `--theme-${string}`]: any; + + // Allow any CSS Custom Properties + [index: `--${string}`]: any; + + // ...or allow any other property + [index: string]: any; + } + } + ``` + + - The alternative way is to use **type assertion**. Here's a few examples: + + ```ts + const style: CSS.Properties = { + // Add a missing property + ['WebkitRocketLauncher' as any]: 'launching', + + // Add a CSS Custom Property + ['--theme-color' as any]: 'black', + }; + ``` + + Fix the issue locally with **Flow**: + + - Use **type assertion**. Here's a few examples: + + ```js + const style: $Exact<CSS.Properties<*>> = { + // Add a missing property + [('WebkitRocketLauncher': any)]: 'launching', + + // Add a CSS Custom Property + [('--theme-color': any)]: 'black', + }; + ``` + +## Version 3.0 + +- **All property types are exposed with namespace** + TypeScript: `Property.AlignContent` (was `AlignContentProperty` before) + Flow: `Property$AlignContent` +- **All at-rules are exposed with namespace** + TypeScript: `AtRule.FontFace` (was `FontFace` before) + Flow: `AtRule$FontFace` +- **Data types are NOT exposed** + E.g. `Color` and `Box`. Because the generation of data types may suddenly be removed or renamed. +- **TypeScript hack for autocompletion** + Uses `(string & {})` for literal string unions and `(number & {})` for literal number unions ([related issue](https://github.com/microsoft/TypeScript/issues/29729)). Utilize `PropertyValue<T>` to unpack types from e.g. `(string & {})` to `string`. +- **New generic for time** + Read more on the ["Generics"](#generics) section. +- **Flow types improvements** + Flow Strict enabled and exact types are used. + +## Contributing + +**Never modify `index.d.ts` and `index.js.flow` directly. They are generated automatically and committed so that we can easily follow any change it results in.** Therefor it's important that you run `$ git config merge.ours.driver true` after you've forked and cloned. That setting prevents merge conflicts when doing rebase. + +### Commands + +- `npm run build` Generates typings and type checks them +- `npm run watch` Runs build on each save +- `npm run test` Runs the tests +- `npm run lazy` Type checks, lints and formats everything diff --git a/vuetest/node_modules/csstype/index.d.ts b/vuetest/node_modules/csstype/index.d.ts new file mode 100644 index 0000000..b466d21 --- /dev/null +++ b/vuetest/node_modules/csstype/index.d.ts @@ -0,0 +1,21297 @@ +export {}; + +export type PropertyValue<TValue> = TValue extends Array<infer AValue> + ? Array<AValue extends infer TUnpacked & {} ? TUnpacked : AValue> + : TValue extends infer TUnpacked & {} + ? TUnpacked + : TValue; + +export type Fallback<T> = { [P in keyof T]: T[P] | readonly NonNullable<T[P]>[] }; + +export interface StandardLonghandProperties<TLength = (string & {}) | 0, TTime = string & {}> { + /** + * The **`accent-color`** CSS property sets the accent color for user-interface controls generated by some elements. + * + * **Syntax**: `auto | <color>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **93** | **92** | **15.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/accent-color + */ + accentColor?: Property.AccentColor | undefined; + /** + * The CSS **`align-content`** property sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis. + * + * **Syntax**: `normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **29** | **28** | **9** | **12** | **11** | + * | 21 _-x-_ | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/align-content + */ + alignContent?: Property.AlignContent | undefined; + /** + * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. In Flexbox, it controls the alignment of items on the Cross Axis. In Grid Layout, it controls the alignment of items on the Block Axis within their grid area. + * + * **Syntax**: `normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **29** | **20** | **9** | **12** | **11** | + * | 21 _-x-_ | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/align-items + */ + alignItems?: Property.AlignItems | undefined; + /** + * The **`align-self`** CSS property overrides a grid or flex item's `align-items` value. In Grid, it aligns the item inside the grid area. In Flexbox, it aligns the item on the cross axis. + * + * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **29** | **20** | **9** | **12** | **10** | + * | 21 _-x-_ | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/align-self + */ + alignSelf?: Property.AlignSelf | undefined; + /** + * The **`align-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their block axis. + * + * **Syntax**: `[ normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position> ]#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/align-tracks + */ + alignTracks?: Property.AlignTracks | undefined; + /** + * The **`animation-composition`** CSS property specifies the composite operation to use when multiple animations affect the same property simultaneously. + * + * **Syntax**: `<single-animation-composition>#` + * + * **Initial value**: `replace` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **112** | **115** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-composition + */ + animationComposition?: Property.AnimationComposition | undefined; + /** + * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **43** | **16** | **9** | **12** | **10** | + * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-delay + */ + animationDelay?: Property.AnimationDelay<TTime> | undefined; + /** + * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. + * + * **Syntax**: `<single-animation-direction>#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **43** | **16** | **9** | **12** | **10** | + * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-direction + */ + animationDirection?: Property.AnimationDirection | undefined; + /** + * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **43** | **16** | **9** | **12** | **10** | + * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-duration + */ + animationDuration?: Property.AnimationDuration<TTime> | undefined; + /** + * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. + * + * **Syntax**: `<single-animation-fill-mode>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **43** | **16** | **9** | **12** | **10** | + * | 3 _-x-_ | 5 _-x-_ | 5 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode + */ + animationFillMode?: Property.AnimationFillMode | undefined; + /** + * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. + * + * **Syntax**: `<single-animation-iteration-count>#` + * + * **Initial value**: `1` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **43** | **16** | **9** | **12** | **10** | + * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count + */ + animationIterationCount?: Property.AnimationIterationCount | undefined; + /** + * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. + * + * **Syntax**: `[ none | <keyframes-name> ]#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **43** | **16** | **9** | **12** | **10** | + * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-name + */ + animationName?: Property.AnimationName | undefined; + /** + * The **`animation-play-state`** CSS property sets whether an animation is running or paused. + * + * **Syntax**: `<single-animation-play-state>#` + * + * **Initial value**: `running` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **43** | **16** | **9** | **12** | **10** | + * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-play-state + */ + animationPlayState?: Property.AnimationPlayState | undefined; + /** + * The **`animation-range-end`** CSS property is used to set the end of an animation's attachment range along its timeline, i.e. where along the timeline an animation will end. + * + * **Syntax**: `[ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-range-end + */ + animationRangeEnd?: Property.AnimationRangeEnd<TLength> | undefined; + /** + * The **`animation-range-start`** CSS property is used to set the start of an animation's attachment range along its timeline, i.e. where along the timeline an animation will start. + * + * **Syntax**: `[ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-range-start + */ + animationRangeStart?: Property.AnimationRangeStart<TLength> | undefined; + /** + * The **`animation-timeline`** CSS property specifies the timeline that is used to control the progress of an animation. + * + * **Syntax**: `<single-animation-timeline>#` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-timeline + */ + animationTimeline?: Property.AnimationTimeline | undefined; + /** + * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **43** | **16** | **9** | **12** | **10** | + * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-timing-function + */ + animationTimingFunction?: Property.AnimationTimingFunction | undefined; + /** + * The **`appearance`** CSS property is used to control native appearance of UI controls, that are based on operating system's theme. + * + * **Syntax**: `none | auto | textfield | menulist-button | <compat-auto>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :------: | :-: | + * | **84** | **80** | **15.4** | **84** | No | + * | 1 _-x-_ | 1 _-x-_ | 3 _-x-_ | 12 _-x-_ | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/appearance + */ + appearance?: Property.Appearance | undefined; + /** + * The **`aspect-ratio`** CSS property sets a **preferred aspect ratio** for the box, which will be used in the calculation of auto sizes and some other layout functions. + * + * **Syntax**: `auto | <ratio>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **88** | **89** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/aspect-ratio + */ + aspectRatio?: Property.AspectRatio | undefined; + /** + * The **`backdrop-filter`** CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything _behind_ the element, to see the effect you must make the element or its background at least partially transparent. + * + * **Syntax**: `none | <filter-function-list>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :---------: | :----: | :-: | + * | **76** | **103** | **9** _-x-_ | **17** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/backdrop-filter + */ + backdropFilter?: Property.BackdropFilter | undefined; + /** + * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. + * + * **Syntax**: `visible | hidden` + * + * **Initial value**: `visible` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-------: | :----: | :----: | + * | **36** | **16** | **15.4** | **12** | **10** | + * | 12 _-x-_ | | 5.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/backface-visibility + */ + backfaceVisibility?: Property.BackfaceVisibility | undefined; + /** + * The **`background-attachment`** CSS property sets whether a background image's position is fixed within the viewport, or scrolls with its containing block. + * + * **Syntax**: `<attachment>#` + * + * **Initial value**: `scroll` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-attachment + */ + backgroundAttachment?: Property.BackgroundAttachment | undefined; + /** + * The **`background-blend-mode`** CSS property sets how an element's background images should blend with each other and with the element's background color. + * + * **Syntax**: `<blend-mode>#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **35** | **30** | **8** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-blend-mode + */ + backgroundBlendMode?: Property.BackgroundBlendMode | undefined; + /** + * The **`background-clip`** CSS property sets whether an element's background extends underneath its border box, padding box, or content box. + * + * **Syntax**: `<box>#` + * + * **Initial value**: `border-box` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **4** | **5** | **12** | **9** | + * | | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-clip + */ + backgroundClip?: Property.BackgroundClip | undefined; + /** + * The **`background-color`** CSS property sets the background color of an element. + * + * **Syntax**: `<color>` + * + * **Initial value**: `transparent` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-color + */ + backgroundColor?: Property.BackgroundColor | undefined; + /** + * The **`background-image`** CSS property sets one or more background images on an element. + * + * **Syntax**: `<bg-image>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-image + */ + backgroundImage?: Property.BackgroundImage | undefined; + /** + * The **`background-origin`** CSS property sets the background's origin: from the border start, inside the border, or inside the padding. + * + * **Syntax**: `<box>#` + * + * **Initial value**: `padding-box` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **4** | **3** | **12** | **9** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-origin + */ + backgroundOrigin?: Property.BackgroundOrigin | undefined; + /** + * The **`background-position-x`** CSS property sets the initial horizontal position for each background image. The position is relative to the position layer set by `background-origin`. + * + * **Syntax**: `[ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#` + * + * **Initial value**: `0%` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **49** | **1** | **12** | **6** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-position-x + */ + backgroundPositionX?: Property.BackgroundPositionX<TLength> | undefined; + /** + * The **`background-position-y`** CSS property sets the initial vertical position for each background image. The position is relative to the position layer set by `background-origin`. + * + * **Syntax**: `[ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#` + * + * **Initial value**: `0%` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **49** | **1** | **12** | **6** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-position-y + */ + backgroundPositionY?: Property.BackgroundPositionY<TLength> | undefined; + /** + * The **`background-repeat`** CSS property sets how background images are repeated. A background image can be repeated along the horizontal and vertical axes, or not repeated at all. + * + * **Syntax**: `<repeat-style>#` + * + * **Initial value**: `repeat` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-repeat + */ + backgroundRepeat?: Property.BackgroundRepeat | undefined; + /** + * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. + * + * **Syntax**: `<bg-size>#` + * + * **Initial value**: `auto auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :---: | + * | **3** | **4** | **5** | **12** | **9** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-size + */ + backgroundSize?: Property.BackgroundSize<TLength> | undefined; + /** + * **Syntax**: `clip | ellipsis | <string>` + * + * **Initial value**: `clip` + */ + blockOverflow?: Property.BlockOverflow | undefined; + /** + * The **`block-size`** CSS property defines the horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `width` or the `height` property, depending on the value of `writing-mode`. + * + * **Syntax**: `<'width'>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **57** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/block-size + */ + blockSize?: Property.BlockSize<TLength> | undefined; + /** + * The **`border-block-color`** CSS property defines the color of the logical block borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-color'>{1,2}` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-color + */ + borderBlockColor?: Property.BorderBlockColor | undefined; + /** + * The **`border-block-end-color`** CSS property defines the color of the logical block-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-color'>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-color + */ + borderBlockEndColor?: Property.BorderBlockEndColor | undefined; + /** + * The **`border-block-end-style`** CSS property defines the style of the logical block-end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-style'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-style + */ + borderBlockEndStyle?: Property.BorderBlockEndStyle | undefined; + /** + * The **`border-block-end-width`** CSS property defines the width of the logical block-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-width'>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-width + */ + borderBlockEndWidth?: Property.BorderBlockEndWidth<TLength> | undefined; + /** + * The **`border-block-start-color`** CSS property defines the color of the logical block-start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-color'>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-color + */ + borderBlockStartColor?: Property.BorderBlockStartColor | undefined; + /** + * The **`border-block-start-style`** CSS property defines the style of the logical block start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-style'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-style + */ + borderBlockStartStyle?: Property.BorderBlockStartStyle | undefined; + /** + * The **`border-block-start-width`** CSS property defines the width of the logical block-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-width'>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-width + */ + borderBlockStartWidth?: Property.BorderBlockStartWidth<TLength> | undefined; + /** + * The **`border-block-style`** CSS property defines the style of the logical block borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-style'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-style + */ + borderBlockStyle?: Property.BorderBlockStyle | undefined; + /** + * The **`border-block-width`** CSS property defines the width of the logical block borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-width'>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-width + */ + borderBlockWidth?: Property.BorderBlockWidth<TLength> | undefined; + /** + * The **`border-bottom-color`** CSS property sets the color of an element's bottom border. It can also be set with the shorthand CSS properties `border-color` or `border-bottom`. + * + * **Syntax**: `<'border-top-color'>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-color + */ + borderBottomColor?: Property.BorderBottomColor | undefined; + /** + * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :---: | + * | **4** | **4** | **5** | **12** | **9** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius + */ + borderBottomLeftRadius?: Property.BorderBottomLeftRadius<TLength> | undefined; + /** + * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :---: | + * | **4** | **4** | **5** | **12** | **9** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius + */ + borderBottomRightRadius?: Property.BorderBottomRightRadius<TLength> | undefined; + /** + * The **`border-bottom-style`** CSS property sets the line style of an element's bottom `border`. + * + * **Syntax**: `<line-style>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-style + */ + borderBottomStyle?: Property.BorderBottomStyle | undefined; + /** + * The **`border-bottom-width`** CSS property sets the width of the bottom border of an element. + * + * **Syntax**: `<line-width>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-width + */ + borderBottomWidth?: Property.BorderBottomWidth<TLength> | undefined; + /** + * The **`border-collapse`** CSS property sets whether cells inside a `<table>` have shared or separate borders. + * + * **Syntax**: `collapse | separate` + * + * **Initial value**: `separate` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **1** | **1.2** | **12** | **5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-collapse + */ + borderCollapse?: Property.BorderCollapse | undefined; + /** + * The **`border-end-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **89** | **66** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius + */ + borderEndEndRadius?: Property.BorderEndEndRadius<TLength> | undefined; + /** + * The **`border-end-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **89** | **66** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius + */ + borderEndStartRadius?: Property.BorderEndStartRadius<TLength> | undefined; + /** + * The **`border-image-outset`** CSS property sets the distance by which an element's border image is set out from its border box. + * + * **Syntax**: `[ <length> | <number> ]{1,4}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **15** | **15** | **6** | **12** | **11** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-image-outset + */ + borderImageOutset?: Property.BorderImageOutset<TLength> | undefined; + /** + * The **`border-image-repeat`** CSS property defines how the edge regions and middle region of a source image are adjusted to fit the dimensions of an element's border image. The middle region can be displayed by using the keyword "fill" in the border-image-slice property. + * + * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` + * + * **Initial value**: `stretch` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **15** | **15** | **6** | **12** | **11** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-image-repeat + */ + borderImageRepeat?: Property.BorderImageRepeat | undefined; + /** + * The **`border-image-slice`** CSS property divides the image specified by `border-image-source` into regions. These regions form the components of an element's border image. + * + * **Syntax**: `<number-percentage>{1,4} && fill?` + * + * **Initial value**: `100%` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **15** | **15** | **6** | **12** | **11** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-image-slice + */ + borderImageSlice?: Property.BorderImageSlice | undefined; + /** + * The **`border-image-source`** CSS property sets the source image used to create an element's border image. + * + * **Syntax**: `none | <image>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **15** | **15** | **6** | **12** | **11** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-image-source + */ + borderImageSource?: Property.BorderImageSource | undefined; + /** + * The **`border-image-width`** CSS property sets the width of an element's border image. + * + * **Syntax**: `[ <length-percentage> | <number> | auto ]{1,4}` + * + * **Initial value**: `1` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **15** | **13** | **6** | **12** | **11** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-image-width + */ + borderImageWidth?: Property.BorderImageWidth<TLength> | undefined; + /** + * The **`border-inline-color`** CSS property defines the color of the logical inline borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-color'>{1,2}` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-color + */ + borderInlineColor?: Property.BorderInlineColor | undefined; + /** + * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-color'>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-------------------------: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * | | 3 _(-moz-border-end-color)_ | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color + */ + borderInlineEndColor?: Property.BorderInlineEndColor | undefined; + /** + * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-style'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-------------------------: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * | | 3 _(-moz-border-end-style)_ | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style + */ + borderInlineEndStyle?: Property.BorderInlineEndStyle | undefined; + /** + * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-width'>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-------------------------: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * | | 3 _(-moz-border-end-width)_ | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width + */ + borderInlineEndWidth?: Property.BorderInlineEndWidth<TLength> | undefined; + /** + * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-color'>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :---------------------------: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * | | 3 _(-moz-border-start-color)_ | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color + */ + borderInlineStartColor?: Property.BorderInlineStartColor | undefined; + /** + * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-style'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :---------------------------: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * | | 3 _(-moz-border-start-style)_ | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style + */ + borderInlineStartStyle?: Property.BorderInlineStartStyle | undefined; + /** + * The **`border-inline-start-width`** CSS property defines the width of the logical inline-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-width'>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width + */ + borderInlineStartWidth?: Property.BorderInlineStartWidth<TLength> | undefined; + /** + * The **`border-inline-style`** CSS property defines the style of the logical inline borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-style'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-style + */ + borderInlineStyle?: Property.BorderInlineStyle | undefined; + /** + * The **`border-inline-width`** CSS property defines the width of the logical inline borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-width'>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-width + */ + borderInlineWidth?: Property.BorderInlineWidth<TLength> | undefined; + /** + * The **`border-left-color`** CSS property sets the color of an element's left border. It can also be set with the shorthand CSS properties `border-color` or `border-left`. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-left-color + */ + borderLeftColor?: Property.BorderLeftColor | undefined; + /** + * The **`border-left-style`** CSS property sets the line style of an element's left `border`. + * + * **Syntax**: `<line-style>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-left-style + */ + borderLeftStyle?: Property.BorderLeftStyle | undefined; + /** + * The **`border-left-width`** CSS property sets the width of the left border of an element. + * + * **Syntax**: `<line-width>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-left-width + */ + borderLeftWidth?: Property.BorderLeftWidth<TLength> | undefined; + /** + * The **`border-right-color`** CSS property sets the color of an element's right border. It can also be set with the shorthand CSS properties `border-color` or `border-right`. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-right-color + */ + borderRightColor?: Property.BorderRightColor | undefined; + /** + * The **`border-right-style`** CSS property sets the line style of an element's right `border`. + * + * **Syntax**: `<line-style>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-right-style + */ + borderRightStyle?: Property.BorderRightStyle | undefined; + /** + * The **`border-right-width`** CSS property sets the width of the right border of an element. + * + * **Syntax**: `<line-width>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-right-width + */ + borderRightWidth?: Property.BorderRightWidth<TLength> | undefined; + /** + * The **`border-spacing`** CSS property sets the distance between the borders of adjacent cells in a `<table>`. This property applies only when `border-collapse` is `separate`. + * + * **Syntax**: `<length> <length>?` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-spacing + */ + borderSpacing?: Property.BorderSpacing<TLength> | undefined; + /** + * The **`border-start-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **89** | **66** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius + */ + borderStartEndRadius?: Property.BorderStartEndRadius<TLength> | undefined; + /** + * The **`border-start-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **89** | **66** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius + */ + borderStartStartRadius?: Property.BorderStartStartRadius<TLength> | undefined; + /** + * The **`border-top-color`** CSS property sets the color of an element's top border. It can also be set with the shorthand CSS properties `border-color` or `border-top`. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-top-color + */ + borderTopColor?: Property.BorderTopColor | undefined; + /** + * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :---: | + * | **4** | **4** | **5** | **12** | **9** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius + */ + borderTopLeftRadius?: Property.BorderTopLeftRadius<TLength> | undefined; + /** + * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :---: | + * | **4** | **4** | **5** | **12** | **9** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius + */ + borderTopRightRadius?: Property.BorderTopRightRadius<TLength> | undefined; + /** + * The **`border-top-style`** CSS property sets the line style of an element's top `border`. + * + * **Syntax**: `<line-style>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-top-style + */ + borderTopStyle?: Property.BorderTopStyle | undefined; + /** + * The **`border-top-width`** CSS property sets the width of the top border of an element. + * + * **Syntax**: `<line-width>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-top-width + */ + borderTopWidth?: Property.BorderTopWidth<TLength> | undefined; + /** + * The **`bottom`** CSS property participates in setting the vertical position of a positioned element. It has no effect on non-positioned elements. + * + * **Syntax**: `<length> | <percentage> | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/bottom + */ + bottom?: Property.Bottom<TLength> | undefined; + /** + * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. + * + * **Syntax**: `slice | clone` + * + * **Initial value**: `slice` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----------: | :-----: | :---------: | :--: | :-: | + * | **22** _-x-_ | **32** | **7** _-x-_ | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/box-decoration-break + */ + boxDecorationBreak?: Property.BoxDecorationBreak | undefined; + /** + * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. + * + * **Syntax**: `none | <shadow>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :---: | + * | **10** | **4** | **5.1** | **12** | **9** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/box-shadow + */ + boxShadow?: Property.BoxShadow | undefined; + /** + * The **`box-sizing`** CSS property sets how the total width and height of an element is calculated. + * + * **Syntax**: `content-box | border-box` + * + * **Initial value**: `content-box` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :---: | + * | **10** | **29** | **5.1** | **12** | **8** | + * | 1 _-x-_ | 1 _-x-_ | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/box-sizing + */ + boxSizing?: Property.BoxSizing | undefined; + /** + * The **`break-after`** CSS property sets how page, column, or region breaks should behave after a generated box. If there is no generated box, the property is ignored. + * + * **Syntax**: `auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **50** | **65** | **10** | **12** | **10** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/break-after + */ + breakAfter?: Property.BreakAfter | undefined; + /** + * The **`break-before`** CSS property sets how page, column, or region breaks should behave before a generated box. If there is no generated box, the property is ignored. + * + * **Syntax**: `auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **50** | **65** | **10** | **12** | **10** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/break-before + */ + breakBefore?: Property.BreakBefore | undefined; + /** + * The **`break-inside`** CSS property sets how page, column, or region breaks should behave inside a generated box. If there is no generated box, the property is ignored. + * + * **Syntax**: `auto | avoid | avoid-page | avoid-column | avoid-region` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **50** | **65** | **10** | **12** | **10** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/break-inside + */ + breakInside?: Property.BreakInside | undefined; + /** + * The **`caption-side`** CSS property puts the content of a table's `<caption>` on the specified side. The values are relative to the `writing-mode` of the table. + * + * **Syntax**: `top | bottom | block-start | block-end | inline-start | inline-end` + * + * **Initial value**: `top` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/caption-side + */ + captionSide?: Property.CaptionSide | undefined; + /** + * The **`caret-color`** CSS property sets the color of the **insertion caret**, the visible marker where the next character typed will be inserted. This is sometimes referred to as the **text input cursor**. The caret appears in elements such as `<input>` or those with the `contenteditable` attribute. The caret is typically a thin vertical line that flashes to help make it more noticeable. By default, it is black, but its color can be altered with this property. + * + * **Syntax**: `auto | <color>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **57** | **53** | **11.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/caret-color + */ + caretColor?: Property.CaretColor | undefined; + /** + * **Syntax**: `auto | bar | block | underscore` + * + * **Initial value**: `auto` + */ + caretShape?: Property.CaretShape | undefined; + /** + * The **`clear`** CSS property sets whether an element must be moved below (cleared) floating elements that precede it. The `clear` property applies to floating and non-floating elements. + * + * **Syntax**: `none | left | right | both | inline-start | inline-end` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/clear + */ + clear?: Property.Clear | undefined; + /** + * The **`clip-path`** CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. + * + * **Syntax**: `<clip-source> | [ <basic-shape> || <geometry-box> ] | none` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **55** | **3.5** | **9.1** | **79** | **10** | + * | 23 _-x-_ | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/clip-path + */ + clipPath?: Property.ClipPath | undefined; + /** + * The **`color`** CSS property sets the foreground color value of an element's text and text decorations, and sets the `currentcolor` value. `currentcolor` may be used as an indirect value on _other_ properties and is the default for other color properties, such as `border-color`. + * + * **Syntax**: `<color>` + * + * **Initial value**: `canvastext` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/color + */ + color?: Property.Color | undefined; + /** + * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. + * + * **Syntax**: `economy | exact` + * + * **Initial value**: `economy` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----------: | :-----------------: | :------: | :----------: | :-: | + * | **17** _-x-_ | **97** | **15.4** | **79** _-x-_ | No | + * | | 48 _(color-adjust)_ | 6 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/print-color-adjust + */ + colorAdjust?: Property.PrintColorAdjust | undefined; + /** + * The **`color-scheme`** CSS property allows an element to indicate which color schemes it can comfortably be rendered in. + * + * **Syntax**: `normal | [ light | dark | <custom-ident> ]+ && only?` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **81** | **96** | **13** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/color-scheme + */ + colorScheme?: Property.ColorScheme | undefined; + /** + * The **`column-count`** CSS property breaks an element's content into the specified number of columns. + * + * **Syntax**: `<integer> | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **50** | **52** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/column-count + */ + columnCount?: Property.ColumnCount | undefined; + /** + * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. + * + * **Syntax**: `auto | balance | balance-all` + * + * **Initial value**: `balance` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :----: | + * | **50** | **52** | **9** | **12** | **10** | + * | | | 8 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/column-fill + */ + columnFill?: Property.ColumnFill | undefined; + /** + * The **`column-gap`** CSS property sets the size of the gap (gutter) between an element's columns. + * + * **Syntax**: `normal | <length-percentage>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **1** | **1.5** | **3** | **12** | **10** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/column-gap + */ + columnGap?: Property.ColumnGap<TLength> | undefined; + /** + * The **`column-rule-color`** CSS property sets the color of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **50** | **52** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-color + */ + columnRuleColor?: Property.ColumnRuleColor | undefined; + /** + * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<'border-style'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **50** | **52** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-style + */ + columnRuleStyle?: Property.ColumnRuleStyle | undefined; + /** + * The **`column-rule-width`** CSS property sets the width of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<'border-width'>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **50** | **52** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-width + */ + columnRuleWidth?: Property.ColumnRuleWidth<TLength> | undefined; + /** + * The **`column-span`** CSS property makes it possible for an element to span across all columns when its value is set to `all`. + * + * **Syntax**: `none | all` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :----: | :----: | + * | **50** | **71** | **9** | **12** | **10** | + * | 6 _-x-_ | | 5.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/column-span + */ + columnSpan?: Property.ColumnSpan | undefined; + /** + * The **`column-width`** CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. + * + * **Syntax**: `<length> | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **50** | **50** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/column-width + */ + columnWidth?: Property.ColumnWidth<TLength> | undefined; + /** + * The **`contain`** CSS property indicates that an element and its contents are, as much as possible, independent from the rest of the document tree. Containment enables isolating a subsection of the DOM, providing performance benefits by limiting calculations of layout, style, paint, size, or any combination to a DOM subtree rather than the entire page. Containment can also be used to scope CSS counters and quotes. + * + * **Syntax**: `none | strict | content | [ [ size || inline-size ] || layout || style || paint ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **52** | **69** | **15.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain + */ + contain?: Property.Contain | undefined; + /** + * The **`contain-intrinsic-block-size`** CSS logical property defines the block size of an element that a browser can use for layout when the element is subject to size containment. + * + * **Syntax**: `auto? [ none | <length> ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **95** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-contain-intrinsic-block-size + */ + containIntrinsicBlockSize?: Property.ContainIntrinsicBlockSize<TLength> | undefined; + /** + * The **`contain-intrinsic-length`** CSS property sets the height of an element that a browser can use for layout when the element is subject to size containment. + * + * **Syntax**: `auto? [ none | <length> ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **95** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-height + */ + containIntrinsicHeight?: Property.ContainIntrinsicHeight<TLength> | undefined; + /** + * The **`contain-intrinsic-inline-size`** CSS logical property defines the inline-size of an element that a browser can use for layout when the element is subject to size containment. + * + * **Syntax**: `auto? [ none | <length> ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **95** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-contain-intrinsic-inline-size + */ + containIntrinsicInlineSize?: Property.ContainIntrinsicInlineSize<TLength> | undefined; + /** + * The **`contain-intrinsic-width`** CSS property sets the width of an element that a browser will use for layout when the element is subject to size containment. + * + * **Syntax**: `auto? [ none | <length> ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **95** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-width + */ + containIntrinsicWidth?: Property.ContainIntrinsicWidth<TLength> | undefined; + /** + * The **container-name** CSS property specifies a list of query container names used by the @container at-rule in a container query. A container query will apply styles to elements based on the size of the nearest ancestor with a containment context. When a containment context is given a name, it can be specifically targeted using the `@container` at-rule instead of the nearest ancestor with containment. + * + * **Syntax**: `none | <custom-ident>+` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **105** | **110** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/container-name + */ + containerName?: Property.ContainerName | undefined; + /** + * The **container-type** CSS property is used to define the type of containment used in a container query. + * + * **Syntax**: `normal | size | inline-size` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **105** | **110** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/container-type + */ + containerType?: Property.ContainerType | undefined; + /** + * The **`content`** CSS property replaces an element with a generated value. Objects inserted using the `content` property are **anonymous replaced elements**. + * + * **Syntax**: `normal | none | [ <content-replacement> | <content-list> ] [/ [ <string> | <counter> ]+ ]?` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/content + */ + content?: Property.Content | undefined; + /** + * The **`content-visibility`** CSS property controls whether or not an element renders its contents at all, along with forcing a strong set of containments, allowing user agents to potentially omit large swathes of layout and rendering work until it becomes needed. It enables the user agent to skip an element's rendering work (including layout and painting) until it is needed — which makes the initial page load much faster. + * + * **Syntax**: `visible | auto | hidden` + * + * **Initial value**: `visible` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :---------: | :----: | :--: | :-: | + * | **85** | **preview** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/content-visibility + */ + contentVisibility?: Property.ContentVisibility | undefined; + /** + * The **`counter-increment`** CSS property increases or decreases the value of a CSS counter by a given value. + * + * **Syntax**: `[ <counter-name> <integer>? ]+ | none` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **2** | **1** | **3** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/counter-increment + */ + counterIncrement?: Property.CounterIncrement | undefined; + /** + * The **`counter-reset`** CSS property resets a CSS counter to a given value. This property will create a new counter or reversed counter with the given name on the specified element. + * + * **Syntax**: `[ <counter-name> <integer>? | <reversed-counter-name> <integer>? ]+ | none` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **2** | **1** | **3** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/counter-reset + */ + counterReset?: Property.CounterReset | undefined; + /** + * The **`counter-set`** CSS property sets a CSS counter to a given value. It manipulates the value of existing counters, and will only create new counters if there isn't already a counter of the given name on the element. + * + * **Syntax**: `[ <counter-name> <integer>? ]+ | none` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **85** | **68** | **17.2** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/counter-set + */ + counterSet?: Property.CounterSet | undefined; + /** + * The **`cursor`** CSS property sets the mouse cursor, if any, to show when the mouse pointer is over an element. + * + * **Syntax**: `[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ]` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **1** | **1.2** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/cursor + */ + cursor?: Property.Cursor | undefined; + /** + * The **`direction`** CSS property sets the direction of text, table columns, and horizontal overflow. Use `rtl` for languages written from right to left (like Hebrew or Arabic), and `ltr` for those written from left to right (like English and most other languages). + * + * **Syntax**: `ltr | rtl` + * + * **Initial value**: `ltr` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **2** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/direction + */ + direction?: Property.Direction | undefined; + /** + * The **`display`** CSS property sets whether an element is treated as a block or inline element and the layout used for its children, such as flow layout, grid or flex. + * + * **Syntax**: `[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy>` + * + * **Initial value**: `inline` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/display + */ + display?: Property.Display | undefined; + /** + * The **`empty-cells`** CSS property sets whether borders and backgrounds appear around `<table>` cells that have no visible content. + * + * **Syntax**: `show | hide` + * + * **Initial value**: `show` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **1** | **1.2** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/empty-cells + */ + emptyCells?: Property.EmptyCells | undefined; + /** + * The **`filter`** CSS property applies graphical effects like blur or color shift to an element. Filters are commonly used to adjust the rendering of images, backgrounds, and borders. + * + * **Syntax**: `none | <filter-function-list>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :-: | + * | **53** | **35** | **9.1** | **12** | No | + * | 18 _-x-_ | | 6 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/filter + */ + filter?: Property.Filter | undefined; + /** + * The **`flex-basis`** CSS property sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with `box-sizing`. + * + * **Syntax**: `content | <'width'>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **29** | **22** | **9** | **12** | **11** | + * | 22 _-x-_ | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/flex-basis + */ + flexBasis?: Property.FlexBasis<TLength> | undefined; + /** + * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). + * + * **Syntax**: `row | row-reverse | column | column-reverse` + * + * **Initial value**: `row` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :------: | :-----: | :----: | :------: | + * | **29** | **81** | **9** | **12** | **11** | + * | 21 _-x-_ | 49 _-x-_ | 7 _-x-_ | | 10 _-x-_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/flex-direction + */ + flexDirection?: Property.FlexDirection | undefined; + /** + * The **`flex-grow`** CSS property sets the flex grow factor of a flex item's main size. + * + * **Syntax**: `<number>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----------------------: | + * | **29** | **20** | **9** | **12** | **11** | + * | 22 _-x-_ | | 7 _-x-_ | | 10 _(-ms-flex-positive)_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/flex-grow + */ + flexGrow?: Property.FlexGrow | undefined; + /** + * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. + * + * **Syntax**: `<number>` + * + * **Initial value**: `1` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **29** | **20** | **9** | **12** | **10** | + * | 22 _-x-_ | | 8 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/flex-shrink + */ + flexShrink?: Property.FlexShrink | undefined; + /** + * The **`flex-wrap`** CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. + * + * **Syntax**: `nowrap | wrap | wrap-reverse` + * + * **Initial value**: `nowrap` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **29** | **28** | **9** | **12** | **11** | + * | 21 _-x-_ | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/flex-wrap + */ + flexWrap?: Property.FlexWrap | undefined; + /** + * The **`float`** CSS property places an element on the left or right side of its container, allowing text and inline elements to wrap around it. The element is removed from the normal flow of the page, though still remaining a part of the flow (in contrast to absolute positioning). + * + * **Syntax**: `left | right | none | inline-start | inline-end` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/float + */ + float?: Property.Float | undefined; + /** + * The **`font-family`** CSS property specifies a prioritized list of one or more font family names and/or generic family names for the selected element. + * + * **Syntax**: `[ <family-name> | <generic-family> ]#` + * + * **Initial value**: depends on user agent + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-family + */ + fontFamily?: Property.FontFamily | undefined; + /** + * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. + * + * **Syntax**: `normal | <feature-tag-value>#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :------: | :-----: | :----: | :----: | + * | **48** | **34** | **9.1** | **15** | **10** | + * | 16 _-x-_ | 15 _-x-_ | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-feature-settings + */ + fontFeatureSettings?: Property.FontFeatureSettings | undefined; + /** + * The **`font-kerning`** CSS property sets the use of the kerning information stored in a font. + * + * **Syntax**: `auto | normal | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :--: | :-: | + * | **33** | **32** | **9** | n/a | No | + * | | | 6 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-kerning + */ + fontKerning?: Property.FontKerning | undefined; + /** + * The **`font-language-override`** CSS property controls the use of language-specific glyphs in a typeface. + * + * **Syntax**: `normal | <string>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | **34** | No | n/a | No | + * | | 4 _-x-_ | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-language-override + */ + fontLanguageOverride?: Property.FontLanguageOverride | undefined; + /** + * The **`font-optical-sizing`** CSS property sets whether text rendering is optimized for viewing at different sizes. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-: | + * | **79** | **62** | **11** | **17** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing + */ + fontOpticalSizing?: Property.FontOpticalSizing | undefined; + /** + * **Syntax**: `normal | light | dark | <palette-identifier>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **101** | **107** | **15.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-palette + */ + fontPalette?: Property.FontPalette | undefined; + /** + * The **`font-size`** CSS property sets the size of the font. Changing the font size also updates the sizes of the font size-relative `<length>` units, such as `em`, `ex`, and so forth. + * + * **Syntax**: `<absolute-size> | <relative-size> | <length-percentage>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-size + */ + fontSize?: Property.FontSize<TLength> | undefined; + /** + * The **`font-size-adjust`** CSS property sets the size of lower-case letters relative to the current font size (which defines the size of upper-case letters). + * + * **Syntax**: `none | [ ex-height | cap-height | ch-width | ic-width | ic-height ]? [ from-font | <number> ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | No | **3** | **16.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-size-adjust + */ + fontSizeAdjust?: Property.FontSizeAdjust | undefined; + /** + * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. + * + * **Syntax**: `auto | never | always | <absolute-size> | <length>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------------: | :--------------------------------: | :------------------------------: | :--: | :-: | + * | **5** _(-webkit-font-smoothing)_ | **25** _(-moz-osx-font-smoothing)_ | **4** _(-webkit-font-smoothing)_ | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-smooth + */ + fontSmooth?: Property.FontSmooth<TLength> | undefined; + /** + * The **`font-stretch`** CSS property selects a normal, condensed, or expanded face from a font. + * + * **Syntax**: `<font-stretch-absolute>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **60** | **9** | **11** | **12** | **9** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-stretch + */ + fontStretch?: Property.FontStretch | undefined; + /** + * The **`font-style`** CSS property sets whether a font should be styled with a normal, italic, or oblique face from its `font-family`. + * + * **Syntax**: `normal | italic | oblique <angle>?` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-style + */ + fontStyle?: Property.FontStyle | undefined; + /** + * The **`font-synthesis`** CSS property controls which missing typefaces, bold, italic, or small-caps, may be synthesized by the browser. + * + * **Syntax**: `none | [ weight || style || small-caps || position]` + * + * **Initial value**: `weight style small-caps position ` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **97** | **34** | **9** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis + */ + fontSynthesis?: Property.FontSynthesis | undefined; + /** + * The **`font-synthesis-position`** CSS property lets you specify whether or not a browser may synthesize the subscript and superscript "position" typefaces when they are missing in a font family, while using `font-variant-position` to set the positions. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | **118** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-position + */ + fontSynthesisPosition?: Property.FontSynthesisPosition | undefined; + /** + * The **`font-synthesis-small-caps`** CSS property lets you specify whether or not the browser may synthesize small-caps typeface when it is missing in a font family. Small-caps glyphs typically use the form of uppercase letters but are reduced to the size of lowercase letters. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **97** | **111** | **16.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-small-caps + */ + fontSynthesisSmallCaps?: Property.FontSynthesisSmallCaps | undefined; + /** + * The **`font-synthesis-style`** CSS property lets you specify whether or not the browser may synthesize the oblique typeface when it is missing in a font family. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **97** | **111** | **16.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-style + */ + fontSynthesisStyle?: Property.FontSynthesisStyle | undefined; + /** + * The **`font-synthesis-weight`** CSS property lets you specify whether or not the browser may synthesize the bold typeface when it is missing in a font family. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **97** | **111** | **16.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-weight + */ + fontSynthesisWeight?: Property.FontSynthesisWeight | undefined; + /** + * The **`font-variant`** CSS shorthand property allows you to set all the font variants for a font. + * + * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variant + */ + fontVariant?: Property.FontVariant | undefined; + /** + * The **`font-variant-alternates`** CSS property controls the usage of alternate glyphs. These alternate glyphs may be referenced by alternative names defined in `@font-feature-values`. + * + * **Syntax**: `normal | [ stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :--: | :-: | + * | **111** | **34** | **9.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates + */ + fontVariantAlternates?: Property.FontVariantAlternates | undefined; + /** + * The **`font-variant-caps`** CSS property controls the use of alternate glyphs for capital letters. + * + * **Syntax**: `normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :--: | :-: | + * | **52** | **34** | **9.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-caps + */ + fontVariantCaps?: Property.FontVariantCaps | undefined; + /** + * The **`font-variant-east-asian`** CSS property controls the use of alternate glyphs for East Asian scripts, like Japanese and Chinese. + * + * **Syntax**: `normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :--: | :-: | + * | **63** | **34** | **9.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian + */ + fontVariantEastAsian?: Property.FontVariantEastAsian | undefined; + /** + * **Syntax**: `normal | text | emoji | unicode` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-emoji + */ + fontVariantEmoji?: Property.FontVariantEmoji | undefined; + /** + * The **`font-variant-ligatures`** CSS property controls which ligatures and contextual forms are used in textual content of the elements it applies to. This leads to more harmonized forms in the resulting text. + * + * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :--: | :-: | + * | **34** | **34** | **9.1** | n/a | No | + * | 31 _-x-_ | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures + */ + fontVariantLigatures?: Property.FontVariantLigatures | undefined; + /** + * The **`font-variant-numeric`** CSS property controls the usage of alternate glyphs for numbers, fractions, and ordinal markers. + * + * **Syntax**: `normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :--: | :-: | + * | **52** | **34** | **9.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric + */ + fontVariantNumeric?: Property.FontVariantNumeric | undefined; + /** + * The **`font-variant-position`** CSS property controls the use of alternate, smaller glyphs that are positioned as superscript or subscript. + * + * **Syntax**: `normal | sub | super` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :--: | :-: | + * | **117** | **34** | **9.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-position + */ + fontVariantPosition?: Property.FontVariantPosition | undefined; + /** + * The **`font-variation-settings`** CSS property provides low-level control over variable font characteristics, by specifying the four letter axis names of the characteristics you want to vary, along with their values. + * + * **Syntax**: `normal | [ <string> <number> ]#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-: | + * | **62** | **62** | **11** | **17** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variation-settings + */ + fontVariationSettings?: Property.FontVariationSettings | undefined; + /** + * The **`font-weight`** CSS property sets the weight (or boldness) of the font. The weights available depend on the `font-family` that is currently set. + * + * **Syntax**: `<font-weight-absolute> | bolder | lighter` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **2** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-weight + */ + fontWeight?: Property.FontWeight | undefined; + /** + * The **`forced-color-adjust`** CSS property allows authors to opt certain elements out of forced colors mode. This then restores the control of those values to CSS. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :-----------------------------: | :---------------------------------: | + * | **89** | **113** | No | **79** | **10** _(-ms-high-contrast-adjust)_ | + * | | | | 12 _(-ms-high-contrast-adjust)_ | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/forced-color-adjust + */ + forcedColorAdjust?: Property.ForcedColorAdjust | undefined; + /** + * The **`grid-auto-columns`** CSS property specifies the size of an implicitly-created grid column track or pattern of tracks. + * + * **Syntax**: `<track-size>+` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-------------------------: | + * | **57** | **70** | **10.1** | **16** | **10** _(-ms-grid-columns)_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns + */ + gridAutoColumns?: Property.GridAutoColumns<TLength> | undefined; + /** + * The **`grid-auto-flow`** CSS property controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid. + * + * **Syntax**: `[ row | column ] || dense` + * + * **Initial value**: `row` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow + */ + gridAutoFlow?: Property.GridAutoFlow | undefined; + /** + * The **`grid-auto-rows`** CSS property specifies the size of an implicitly-created grid row track or pattern of tracks. + * + * **Syntax**: `<track-size>+` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :----------------------: | + * | **57** | **70** | **10.1** | **16** | **10** _(-ms-grid-rows)_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows + */ + gridAutoRows?: Property.GridAutoRows<TLength> | undefined; + /** + * The **`grid-column-end`** CSS property specifies a grid item's end position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the block-end edge of its grid area. + * + * **Syntax**: `<grid-line>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-column-end + */ + gridColumnEnd?: Property.GridColumnEnd | undefined; + /** + * The **`grid-column-start`** CSS property specifies a grid item's start position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement. This start position defines the block-start edge of the grid area. + * + * **Syntax**: `<grid-line>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-column-start + */ + gridColumnStart?: Property.GridColumnStart | undefined; + /** + * The **`grid-row-end`** CSS property specifies a grid item's end position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-end edge of its grid area. + * + * **Syntax**: `<grid-line>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-row-end + */ + gridRowEnd?: Property.GridRowEnd | undefined; + /** + * The **`grid-row-start`** CSS property specifies a grid item's start position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start edge of its grid area. + * + * **Syntax**: `<grid-line>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-row-start + */ + gridRowStart?: Property.GridRowStart | undefined; + /** + * The **`grid-template-areas`** CSS property specifies named grid areas, establishing the cells in the grid and assigning them names. + * + * **Syntax**: `none | <string>+` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-areas + */ + gridTemplateAreas?: Property.GridTemplateAreas | undefined; + /** + * The **`grid-template-columns`** CSS property defines the line names and track sizing functions of the grid columns. + * + * **Syntax**: `none | <track-list> | <auto-track-list> | subgrid <line-name-list>?` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-------------------------: | + * | **57** | **52** | **10.1** | **16** | **10** _(-ms-grid-columns)_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-columns + */ + gridTemplateColumns?: Property.GridTemplateColumns<TLength> | undefined; + /** + * The **`grid-template-rows`** CSS property defines the line names and track sizing functions of the grid rows. + * + * **Syntax**: `none | <track-list> | <auto-track-list> | subgrid <line-name-list>?` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :----------------------: | + * | **57** | **52** | **10.1** | **16** | **10** _(-ms-grid-rows)_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-rows + */ + gridTemplateRows?: Property.GridTemplateRows<TLength> | undefined; + /** + * The **`hanging-punctuation`** CSS property specifies whether a punctuation mark should hang at the start or end of a line of text. Hanging punctuation may be placed outside the line box. + * + * **Syntax**: `none | [ first || [ force-end | allow-end ] || last ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | No | **10** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation + */ + hangingPunctuation?: Property.HangingPunctuation | undefined; + /** + * The **`height`** CSS property specifies the height of an element. By default, the property defines the height of the content area. If `box-sizing` is set to `border-box`, however, it instead determines the height of the border area. + * + * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/height + */ + height?: Property.Height<TLength> | undefined; + /** + * The **`hyphenate-character`** CSS property sets the character (or string) used at the end of a line before a hyphenation break. + * + * **Syntax**: `auto | <string>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :--: | :-: | + * | **106** | **98** | **17** | n/a | No | + * | 6 _-x-_ | | 5.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/hyphenate-character + */ + hyphenateCharacter?: Property.HyphenateCharacter | undefined; + /** + * The **`hyphenate-limit-chars`** CSS property specifies the minimum word length to allow hyphenation of words as well as the the minimum number of characters before and after the hyphen. + * + * **Syntax**: `[ auto | <integer> ]{1,3}` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **109** | No | No | n/a | No | + */ + hyphenateLimitChars?: Property.HyphenateLimitChars | undefined; + /** + * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. + * + * **Syntax**: `none | manual | auto` + * + * **Initial value**: `manual` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-------: | :----: | :----------: | + * | **55** | **43** | **17** | **79** | **10** _-x-_ | + * | 13 _-x-_ | 6 _-x-_ | 5.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/hyphens + */ + hyphens?: Property.Hyphens | undefined; + /** + * The **`image-orientation`** CSS property specifies a layout-independent correction to the orientation of an image. + * + * **Syntax**: `from-image | <angle> | [ <angle>? flip ]` + * + * **Initial value**: `from-image` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **81** | **26** | **13.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/image-orientation + */ + imageOrientation?: Property.ImageOrientation | undefined; + /** + * The **`image-rendering`** CSS property sets an image scaling algorithm. The property applies to an element itself, to any images set in its other properties, and to its descendants. + * + * **Syntax**: `auto | crisp-edges | pixelated` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **13** | **3.6** | **6** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/image-rendering + */ + imageRendering?: Property.ImageRendering | undefined; + /** + * **Syntax**: `[ from-image || <resolution> ] && snap?` + * + * **Initial value**: `1dppx` + */ + imageResolution?: Property.ImageResolution | undefined; + /** + * The `initial-letter` CSS property sets styling for dropped, raised, and sunken initial letters. + * + * **Syntax**: `normal | [ <number> <integer>? ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :---------: | :--: | :-: | + * | **110** | No | **9** _-x-_ | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/initial-letter + */ + initialLetter?: Property.InitialLetter | undefined; + /** + * The **`inline-size`** CSS property defines the horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `width` or the `height` property, depending on the value of `writing-mode`. + * + * **Syntax**: `<'width'>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **57** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inline-size + */ + inlineSize?: Property.InlineSize<TLength> | undefined; + /** + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + */ + inputSecurity?: Property.InputSecurity | undefined; + /** + * The **`inset-block-end`** CSS property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **63** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset-block-end + */ + insetBlockEnd?: Property.InsetBlockEnd<TLength> | undefined; + /** + * The **`inset-block-start`** CSS property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **63** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset-block-start + */ + insetBlockStart?: Property.InsetBlockStart<TLength> | undefined; + /** + * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **63** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline-end + */ + insetInlineEnd?: Property.InsetInlineEnd<TLength> | undefined; + /** + * The **`inset-inline-start`** CSS property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **63** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline-start + */ + insetInlineStart?: Property.InsetInlineStart<TLength> | undefined; + /** + * The **`isolation`** CSS property determines whether an element must create a new stacking context. + * + * **Syntax**: `auto | isolate` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **41** | **36** | **8** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/isolation + */ + isolation?: Property.Isolation | undefined; + /** + * The CSS **`justify-content`** property defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container. + * + * **Syntax**: `normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **29** | **20** | **9** | **12** | **11** | + * | 21 _-x-_ | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/justify-content + */ + justifyContent?: Property.JustifyContent | undefined; + /** + * The CSS **`justify-items`** property defines the default `justify-self` for all items of the box, giving them all a default way of justifying each box along the appropriate axis. + * + * **Syntax**: `normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]` + * + * **Initial value**: `legacy` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **52** | **20** | **9** | **12** | **11** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/justify-items + */ + justifyItems?: Property.JustifyItems | undefined; + /** + * The CSS **`justify-self`** property sets the way a box is justified inside its alignment container along the appropriate axis. + * + * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ]` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :----: | + * | **57** | **45** | **10.1** | **16** | **10** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/justify-self + */ + justifySelf?: Property.JustifySelf | undefined; + /** + * The **`justify-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their inline axis. + * + * **Syntax**: `[ normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ] ]#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/justify-tracks + */ + justifyTracks?: Property.JustifyTracks | undefined; + /** + * The **`left`** CSS property participates in specifying the horizontal position of a positioned element. It has no effect on non-positioned elements. + * + * **Syntax**: `<length> | <percentage> | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/left + */ + left?: Property.Left<TLength> | undefined; + /** + * The **`letter-spacing`** CSS property sets the horizontal spacing behavior between text characters. This value is added to the natural spacing between characters while rendering the text. Positive values of `letter-spacing` causes characters to spread farther apart, while negative values of `letter-spacing` bring characters closer together. + * + * **Syntax**: `normal | <length>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/letter-spacing + */ + letterSpacing?: Property.LetterSpacing<TLength> | undefined; + /** + * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. + * + * **Syntax**: `auto | loose | normal | strict | anywhere` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :-----: | + * | **58** | **69** | **11** | **14** | **5.5** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/line-break + */ + lineBreak?: Property.LineBreak | undefined; + /** + * The **`line-height`** CSS property sets the height of a line box. It's commonly used to set the distance between lines of text. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height. + * + * **Syntax**: `normal | <number> | <length> | <percentage>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/line-height + */ + lineHeight?: Property.LineHeight<TLength> | undefined; + /** + * The **`line-height-step`** CSS property sets the step unit for line box heights. When the property is set, line box heights are rounded up to the closest multiple of the unit. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | n/a | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/line-height-step + */ + lineHeightStep?: Property.LineHeightStep<TLength> | undefined; + /** + * The **`list-style-image`** CSS property sets an image to be used as the list item marker. + * + * **Syntax**: `<image> | none` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/list-style-image + */ + listStyleImage?: Property.ListStyleImage | undefined; + /** + * The **`list-style-position`** CSS property sets the position of the `::marker` relative to a list item. + * + * **Syntax**: `inside | outside` + * + * **Initial value**: `outside` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/list-style-position + */ + listStylePosition?: Property.ListStylePosition | undefined; + /** + * The **`list-style-type`** CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element. + * + * **Syntax**: `<counter-style> | <string> | none` + * + * **Initial value**: `disc` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/list-style-type + */ + listStyleType?: Property.ListStyleType | undefined; + /** + * The **`margin-block-end`** CSS property defines the logical block end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'margin-left'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-block-end + */ + marginBlockEnd?: Property.MarginBlockEnd<TLength> | undefined; + /** + * The **`margin-block-start`** CSS property defines the logical block start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'margin-left'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-block-start + */ + marginBlockStart?: Property.MarginBlockStart<TLength> | undefined; + /** + * The **`margin-bottom`** CSS property sets the margin area on the bottom of an element. A positive value places it farther from its neighbors, while a negative value places it closer. + * + * **Syntax**: `<length> | <percentage> | auto` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-bottom + */ + marginBottom?: Property.MarginBottom<TLength> | undefined; + /** + * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'margin-left'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----------------------: | :-------------------: | :----------------------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * | 2 _(-webkit-margin-end)_ | 3 _(-moz-margin-end)_ | 3 _(-webkit-margin-end)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline-end + */ + marginInlineEnd?: Property.MarginInlineEnd<TLength> | undefined; + /** + * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'margin-left'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------: | :---------------------: | :------------------------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * | 2 _(-webkit-margin-start)_ | 3 _(-moz-margin-start)_ | 3 _(-webkit-margin-start)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline-start + */ + marginInlineStart?: Property.MarginInlineStart<TLength> | undefined; + /** + * The **`margin-left`** CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. + * + * **Syntax**: `<length> | <percentage> | auto` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-left + */ + marginLeft?: Property.MarginLeft<TLength> | undefined; + /** + * The **`margin-right`** CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. + * + * **Syntax**: `<length> | <percentage> | auto` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-right + */ + marginRight?: Property.MarginRight<TLength> | undefined; + /** + * The **`margin-top`** CSS property sets the margin area on the top of an element. A positive value places it farther from its neighbors, while a negative value places it closer. + * + * **Syntax**: `<length> | <percentage> | auto` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-top + */ + marginTop?: Property.MarginTop<TLength> | undefined; + /** + * The `margin-trim` property allows the container to trim the margins of its children where they adjoin the container's edges. + * + * **Syntax**: `none | in-flow | all` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | No | No | **16.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-trim + */ + marginTrim?: Property.MarginTrim | undefined; + /** + * The **`mask-border-mode`** CSS property specifies the blending mode used in a mask border. + * + * **Syntax**: `luminance | alpha` + * + * **Initial value**: `alpha` + */ + maskBorderMode?: Property.MaskBorderMode | undefined; + /** + * The **`mask-border-outset`** CSS property specifies the distance by which an element's mask border is set out from its border box. + * + * **Syntax**: `[ <length> | <number> ]{1,4}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-------------------------------------: | :-----: | :-----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-outset)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-outset)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-outset + */ + maskBorderOutset?: Property.MaskBorderOutset<TLength> | undefined; + /** + * The **`mask-border-repeat`** CSS property sets how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border. + * + * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` + * + * **Initial value**: `stretch` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-------------------------------------: | :-----: | :-----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-repeat)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-repeat)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-repeat + */ + maskBorderRepeat?: Property.MaskBorderRepeat | undefined; + /** + * The **`mask-border-slice`** CSS property divides the image set by `mask-border-source` into regions. These regions are used to form the components of an element's mask border. + * + * **Syntax**: `<number-percentage>{1,4} fill?` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------------------: | :-----: | :----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-slice)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-slice)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-slice + */ + maskBorderSlice?: Property.MaskBorderSlice | undefined; + /** + * The **`mask-border-source`** CSS property sets the source image used to create an element's mask border. + * + * **Syntax**: `none | <image>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-------------------------------------: | :-----: | :-----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-source)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-source)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-source + */ + maskBorderSource?: Property.MaskBorderSource | undefined; + /** + * The **`mask-border-width`** CSS property sets the width of an element's mask border. + * + * **Syntax**: `[ <length-percentage> | <number> | auto ]{1,4}` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------------------: | :-----: | :----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-width)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-width)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-width + */ + maskBorderWidth?: Property.MaskBorderWidth<TLength> | undefined; + /** + * The **`mask-clip`** CSS property determines the area which is affected by a mask. The painted content of an element must be restricted to this area. + * + * **Syntax**: `[ <geometry-box> | no-clip ]#` + * + * **Initial value**: `border-box` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **120** | **53** | **15.4** | n/a | No | + * | 1 _-x-_ | | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-clip + */ + maskClip?: Property.MaskClip | undefined; + /** + * The **`mask-composite`** CSS property represents a compositing operation used on the current mask layer with the mask layers below it. + * + * **Syntax**: `<compositing-operator>#` + * + * **Initial value**: `add` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :---: | :-: | + * | **120** | **53** | **15.4** | 18-79 | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-composite + */ + maskComposite?: Property.MaskComposite | undefined; + /** + * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. By default this means the alpha channel of the mask image will be multiplied with the alpha channel of the element. This can be controlled with the `mask-mode` property. + * + * **Syntax**: `<mask-reference>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :---: | :-: | + * | **120** | **53** | **15.4** | 16-79 | No | + * | 1 _-x-_ | | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-image + */ + maskImage?: Property.MaskImage | undefined; + /** + * The **`mask-mode`** CSS property sets whether the mask reference defined by `mask-image` is treated as a luminance or alpha mask. + * + * **Syntax**: `<masking-mode>#` + * + * **Initial value**: `match-source` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **120** | **53** | **15.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-mode + */ + maskMode?: Property.MaskMode | undefined; + /** + * The **`mask-origin`** CSS property sets the origin of a mask. + * + * **Syntax**: `<geometry-box>#` + * + * **Initial value**: `border-box` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **120** | **53** | **15.4** | n/a | No | + * | 1 _-x-_ | | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-origin + */ + maskOrigin?: Property.MaskOrigin | undefined; + /** + * The **`mask-position`** CSS property sets the initial position, relative to the mask position layer set by `mask-origin`, for each defined mask image. + * + * **Syntax**: `<position>#` + * + * **Initial value**: `center` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :---: | :-: | + * | **120** | **53** | **15.4** | 18-79 | No | + * | 1 _-x-_ | | 3.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-position + */ + maskPosition?: Property.MaskPosition<TLength> | undefined; + /** + * The **`mask-repeat`** CSS property sets how mask images are repeated. A mask image can be repeated along the horizontal axis, the vertical axis, both axes, or not repeated at all. + * + * **Syntax**: `<repeat-style>#` + * + * **Initial value**: `repeat` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :---: | :-: | + * | **120** | **53** | **15.4** | 18-79 | No | + * | 1 _-x-_ | | 3.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-repeat + */ + maskRepeat?: Property.MaskRepeat | undefined; + /** + * The **`mask-size`** CSS property specifies the sizes of the mask images. The size of the image can be fully or partially constrained in order to preserve its intrinsic ratio. + * + * **Syntax**: `<bg-size>#` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :---: | :-: | + * | **120** | **53** | **15.4** | 18-79 | No | + * | 4 _-x-_ | | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-size + */ + maskSize?: Property.MaskSize<TLength> | undefined; + /** + * The **`mask-type`** CSS property sets whether an SVG `<mask>` element is used as a _luminance_ or an _alpha_ mask. It applies to the `<mask>` element itself. + * + * **Syntax**: `luminance | alpha` + * + * **Initial value**: `luminance` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **24** | **35** | **7** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-type + */ + maskType?: Property.MaskType | undefined; + /** + * This feature is not Baseline because it does not work in some of the most widely-used browsers. + * + * **Syntax**: `[ pack | next ] || [ definite-first | ordered ]` + * + * **Initial value**: `pack` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :---------: | :--: | :-: | + * | No | No | **preview** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/masonry-auto-flow + */ + masonryAutoFlow?: Property.MasonryAutoFlow | undefined; + /** + * The **`math-depth`** property describes a notion of _depth_ for each element of a mathematical formula, with respect to the top-level container of that formula. Concretely, this is used to determine the computed value of the font-size property when its specified value is `math`. + * + * **Syntax**: `auto-add | add(<integer>) | <integer>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **109** | **117** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/math-depth + */ + mathDepth?: Property.MathDepth | undefined; + /** + * The `math-shift` property indicates whether superscripts inside MathML formulas should be raised by a normal or compact shift. + * + * **Syntax**: `normal | compact` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **109** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/math-shift + */ + mathShift?: Property.MathShift | undefined; + /** + * The `math-style` property indicates whether MathML equations should render with normal or compact height. + * + * **Syntax**: `normal | compact` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **109** | **117** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/math-style + */ + mathStyle?: Property.MathStyle | undefined; + /** + * The **`max-block-size`** CSS property specifies the maximum size of an element in the direction opposite that of the writing direction as specified by `writing-mode`. That is, if the writing direction is horizontal, then `max-block-size` is equivalent to `max-height`; if the writing direction is vertical, `max-block-size` is the same as `max-width`. + * + * **Syntax**: `<'max-width'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **57** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/max-block-size + */ + maxBlockSize?: Property.MaxBlockSize<TLength> | undefined; + /** + * The **`max-height`** CSS property sets the maximum height of an element. It prevents the used value of the `height` property from becoming larger than the value specified for `max-height`. + * + * **Syntax**: `none | <length-percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **18** | **1** | **1.3** | **12** | **7** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/max-height + */ + maxHeight?: Property.MaxHeight<TLength> | undefined; + /** + * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block, depending on its writing mode. It corresponds to either the `max-width` or the `max-height` property, depending on the value of `writing-mode`. + * + * **Syntax**: `<'max-width'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :--------: | :--: | :-: | + * | **57** | **41** | **12.1** | n/a | No | + * | | | 10.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/max-inline-size + */ + maxInlineSize?: Property.MaxInlineSize<TLength> | undefined; + /** + * **Syntax**: `none | <integer>` + * + * **Initial value**: `none` + */ + maxLines?: Property.MaxLines | undefined; + /** + * The **`max-width`** CSS property sets the maximum width of an element. It prevents the used value of the `width` property from becoming larger than the value specified by `max-width`. + * + * **Syntax**: `none | <length-percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **7** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/max-width + */ + maxWidth?: Property.MaxWidth<TLength> | undefined; + /** + * The **`min-block-size`** CSS property defines the minimum horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `min-width` or the `min-height` property, depending on the value of `writing-mode`. + * + * **Syntax**: `<'min-width'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **57** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/min-block-size + */ + minBlockSize?: Property.MinBlockSize<TLength> | undefined; + /** + * The **`min-height`** CSS property sets the minimum height of an element. It prevents the used value of the `height` property from becoming smaller than the value specified for `min-height`. + * + * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **3** | **1.3** | **12** | **7** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/min-height + */ + minHeight?: Property.MinHeight<TLength> | undefined; + /** + * The **`min-inline-size`** CSS property defines the horizontal or vertical minimal size of an element's block, depending on its writing mode. It corresponds to either the `min-width` or the `min-height` property, depending on the value of `writing-mode`. + * + * **Syntax**: `<'min-width'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **57** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/min-inline-size + */ + minInlineSize?: Property.MinInlineSize<TLength> | undefined; + /** + * The **`min-width`** CSS property sets the minimum width of an element. It prevents the used value of the `width` property from becoming smaller than the value specified for `min-width`. + * + * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **7** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/min-width + */ + minWidth?: Property.MinWidth<TLength> | undefined; + /** + * The **`mix-blend-mode`** CSS property sets how an element's content should blend with the content of the element's parent and the element's background. + * + * **Syntax**: `<blend-mode> | plus-lighter` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **41** | **32** | **8** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode + */ + mixBlendMode?: Property.MixBlendMode | undefined; + /** + * The **`offset-distance`** CSS property specifies a position along an `offset-path` for an element to be placed. + * + * **Syntax**: `<length-percentage>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :--------------------: | :-----: | :----: | :--: | :-: | + * | **55** | **72** | **16** | n/a | No | + * | 46 _(motion-distance)_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-distance + */ + motionDistance?: Property.OffsetDistance<TLength> | undefined; + /** + * The **`offset-path`** CSS property specifies a motion path for an element to follow and defines the element's positioning within the parent container or SVG coordinate system. + * + * **Syntax**: `none | <offset-path> || <coord-box>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----------------: | :-----: | :------: | :--: | :-: | + * | **55** | **72** | **15.4** | n/a | No | + * | 46 _(motion-path)_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-path + */ + motionPath?: Property.OffsetPath | undefined; + /** + * The **`offset-rotate`** CSS property defines the orientation/direction of the element as it is positioned along the `offset-path`. + * + * **Syntax**: `[ auto | reverse ] || <angle>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :--------------------: | :-----: | :----: | :--: | :-: | + * | **56** | **72** | **16** | n/a | No | + * | 46 _(motion-rotation)_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate + */ + motionRotation?: Property.OffsetRotate | undefined; + /** + * The **`object-fit`** CSS property sets how the content of a replaced element, such as an `<img>` or `<video>`, should be resized to fit its container. + * + * **Syntax**: `fill | contain | cover | none | scale-down` + * + * **Initial value**: `fill` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-: | + * | **32** | **36** | **10** | **79** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/object-fit + */ + objectFit?: Property.ObjectFit | undefined; + /** + * The **`object-position`** CSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background. + * + * **Syntax**: `<position>` + * + * **Initial value**: `50% 50%` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-: | + * | **32** | **36** | **10** | **79** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/object-position + */ + objectPosition?: Property.ObjectPosition<TLength> | undefined; + /** + * **Syntax**: `auto | <position>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **116** | **72** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-anchor + */ + offsetAnchor?: Property.OffsetAnchor<TLength> | undefined; + /** + * The **`offset-distance`** CSS property specifies a position along an `offset-path` for an element to be placed. + * + * **Syntax**: `<length-percentage>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :--------------------: | :-----: | :----: | :--: | :-: | + * | **55** | **72** | **16** | n/a | No | + * | 46 _(motion-distance)_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-distance + */ + offsetDistance?: Property.OffsetDistance<TLength> | undefined; + /** + * The **`offset-path`** CSS property specifies a motion path for an element to follow and defines the element's positioning within the parent container or SVG coordinate system. + * + * **Syntax**: `none | <offset-path> || <coord-box>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----------------: | :-----: | :------: | :--: | :-: | + * | **55** | **72** | **15.4** | n/a | No | + * | 46 _(motion-path)_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-path + */ + offsetPath?: Property.OffsetPath | undefined; + /** + * **Syntax**: `normal | auto | <position>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **116** | n/a | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-position + */ + offsetPosition?: Property.OffsetPosition<TLength> | undefined; + /** + * The **`offset-rotate`** CSS property defines the orientation/direction of the element as it is positioned along the `offset-path`. + * + * **Syntax**: `[ auto | reverse ] || <angle>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :--------------------: | :-----: | :----: | :--: | :-: | + * | **56** | **72** | **16** | n/a | No | + * | 46 _(motion-rotation)_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate + */ + offsetRotate?: Property.OffsetRotate | undefined; + /** + * The **`offset-rotate`** CSS property defines the orientation/direction of the element as it is positioned along the `offset-path`. + * + * **Syntax**: `[ auto | reverse ] || <angle>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :--------------------: | :-----: | :----: | :--: | :-: | + * | **56** | **72** | **16** | n/a | No | + * | 46 _(motion-rotation)_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate + */ + offsetRotation?: Property.OffsetRotate | undefined; + /** + * The **`opacity`** CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. + * + * **Syntax**: `<alpha-value>` + * + * **Initial value**: `1` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **2** | **12** | **9** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/opacity + */ + opacity?: Property.Opacity | undefined; + /** + * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :------: | + * | **29** | **20** | **9** | **12** | **11** | + * | 21 _-x-_ | | 7 _-x-_ | | 10 _-x-_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/order + */ + order?: Property.Order | undefined; + /** + * The **`orphans`** CSS property sets the minimum number of lines in a block container that must be shown at the _bottom_ of a page, region, or column. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `2` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **25** | No | **1.3** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/orphans + */ + orphans?: Property.Orphans | undefined; + /** + * The **`outline-color`** CSS property sets the color of an element's outline. + * + * **Syntax**: `<color> | invert` + * + * **Initial value**: `invert`, for browsers supporting it, `currentColor` for the other + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **1.5** | **1.2** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/outline-color + */ + outlineColor?: Property.OutlineColor | undefined; + /** + * The **`outline-offset`** CSS property sets the amount of space between an outline and the edge or border of an element. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :-: | + * | **1** | **1.5** | **1.2** | **15** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/outline-offset + */ + outlineOffset?: Property.OutlineOffset<TLength> | undefined; + /** + * The **`outline-style`** CSS property sets the style of an element's outline. An outline is a line that is drawn around an element, outside the `border`. + * + * **Syntax**: `auto | <'border-style'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **1.5** | **1.2** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/outline-style + */ + outlineStyle?: Property.OutlineStyle | undefined; + /** + * The CSS **`outline-width`** property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. + * + * **Syntax**: `<line-width>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **1.5** | **1.2** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/outline-width + */ + outlineWidth?: Property.OutlineWidth<TLength> | undefined; + /** + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **56** | **66** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overflow-anchor + */ + overflowAnchor?: Property.OverflowAnchor | undefined; + /** + * **Syntax**: `visible | hidden | clip | scroll | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | **69** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overflow-block + */ + overflowBlock?: Property.OverflowBlock | undefined; + /** + * The **`overflow-clip-box`** CSS property specifies relative to which box the clipping happens when there is an overflow. It is short hand for the `overflow-clip-box-inline` and `overflow-clip-box-block` properties. + * + * **Syntax**: `padding-box | content-box` + * + * **Initial value**: `padding-box` + */ + overflowClipBox?: Property.OverflowClipBox | undefined; + /** + * **Syntax**: `<visual-box> || <length [0,∞]>` + * + * **Initial value**: `0px` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **90** | **102** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overflow-clip-margin + */ + overflowClipMargin?: Property.OverflowClipMargin<TLength> | undefined; + /** + * **Syntax**: `visible | hidden | clip | scroll | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | **69** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overflow-inline + */ + overflowInline?: Property.OverflowInline | undefined; + /** + * The **`overflow-wrap`** CSS property applies to inline elements, setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box. + * + * **Syntax**: `normal | break-word | anywhere` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-------------: | :---------------: | :-------------: | :--------------: | :-------------------: | + * | **23** | **49** | **7** | **18** | **5.5** _(word-wrap)_ | + * | 1 _(word-wrap)_ | 3.5 _(word-wrap)_ | 1 _(word-wrap)_ | 12 _(word-wrap)_ | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overflow-wrap + */ + overflowWrap?: Property.OverflowWrap | undefined; + /** + * The **`overflow-x`** CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content. + * + * **Syntax**: `visible | hidden | clip | scroll | auto` + * + * **Initial value**: `visible` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **3.5** | **3** | **12** | **5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overflow-x + */ + overflowX?: Property.OverflowX | undefined; + /** + * The **`overflow-y`** CSS property sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content. + * + * **Syntax**: `visible | hidden | clip | scroll | auto` + * + * **Initial value**: `visible` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **3.5** | **3** | **12** | **5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overflow-y + */ + overflowY?: Property.OverflowY | undefined; + /** + * The **`overlay`** CSS property specifies whether an element appearing in the top layer (for example, a shown popover or modal `<dialog>` element) is actually rendered in the top layer. This property is only relevant within a list of `transition-property` values, and only if `allow-discrete` is set as the `transition-behavior`. + * + * **Syntax**: `none | auto` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **117** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overlay + */ + overlay?: Property.Overlay | undefined; + /** + * The **`overscroll-behavior-block`** CSS property sets the browser's behavior when the block direction boundary of a scrolling area is reached. + * + * **Syntax**: `contain | none | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **77** | **73** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block + */ + overscrollBehaviorBlock?: Property.OverscrollBehaviorBlock | undefined; + /** + * The **`overscroll-behavior-inline`** CSS property sets the browser's behavior when the inline direction boundary of a scrolling area is reached. + * + * **Syntax**: `contain | none | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **77** | **73** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline + */ + overscrollBehaviorInline?: Property.OverscrollBehaviorInline | undefined; + /** + * The **`overscroll-behavior-x`** CSS property sets the browser's behavior when the horizontal boundary of a scrolling area is reached. + * + * **Syntax**: `contain | none | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-: | + * | **63** | **59** | **16** | **18** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x + */ + overscrollBehaviorX?: Property.OverscrollBehaviorX | undefined; + /** + * The **`overscroll-behavior-y`** CSS property sets the browser's behavior when the vertical boundary of a scrolling area is reached. + * + * **Syntax**: `contain | none | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-: | + * | **63** | **59** | **16** | **18** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y + */ + overscrollBehaviorY?: Property.OverscrollBehaviorY | undefined; + /** + * The **`padding-block-end`** CSS property defines the logical block end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-block-end + */ + paddingBlockEnd?: Property.PaddingBlockEnd<TLength> | undefined; + /** + * The **`padding-block-start`** CSS property defines the logical block start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-block-start + */ + paddingBlockStart?: Property.PaddingBlockStart<TLength> | undefined; + /** + * The **`padding-bottom`** CSS property sets the height of the padding area on the bottom of an element. + * + * **Syntax**: `<length> | <percentage>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-bottom + */ + paddingBottom?: Property.PaddingBottom<TLength> | undefined; + /** + * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----------------------: | :--------------------: | :-----------------------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * | 2 _(-webkit-padding-end)_ | 3 _(-moz-padding-end)_ | 3 _(-webkit-padding-end)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline-end + */ + paddingInlineEnd?: Property.PaddingInlineEnd<TLength> | undefined; + /** + * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-------------------------: | :----------------------: | :-------------------------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * | 2 _(-webkit-padding-start)_ | 3 _(-moz-padding-start)_ | 3 _(-webkit-padding-start)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline-start + */ + paddingInlineStart?: Property.PaddingInlineStart<TLength> | undefined; + /** + * The **`padding-left`** CSS property sets the width of the padding area to the left of an element. + * + * **Syntax**: `<length> | <percentage>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-left + */ + paddingLeft?: Property.PaddingLeft<TLength> | undefined; + /** + * The **`padding-right`** CSS property sets the width of the padding area on the right of an element. + * + * **Syntax**: `<length> | <percentage>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-right + */ + paddingRight?: Property.PaddingRight<TLength> | undefined; + /** + * The **`padding-top`** CSS property sets the height of the padding area on the top of an element. + * + * **Syntax**: `<length> | <percentage>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-top + */ + paddingTop?: Property.PaddingTop<TLength> | undefined; + /** + * The **`page`** CSS property is used to specify the named page, a specific type of page defined by the `@page` at-rule. + * + * **Syntax**: `auto | <custom-ident>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-------: | :--: | :-: | + * | **85** | **110** | **≤13.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/page + */ + page?: Property.Page | undefined; + /** + * The **`page-break-after`** CSS property adjusts page breaks _after_ the current element. + * + * **Syntax**: `auto | always | avoid | left | right | recto | verso` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **1** | **1.2** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/page-break-after + */ + pageBreakAfter?: Property.PageBreakAfter | undefined; + /** + * The **`page-break-before`** CSS property adjusts page breaks _before_ the current element. + * + * **Syntax**: `auto | always | avoid | left | right | recto | verso` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **1** | **1.2** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/page-break-before + */ + pageBreakBefore?: Property.PageBreakBefore | undefined; + /** + * The **`page-break-inside`** CSS property adjusts page breaks _inside_ the current element. + * + * **Syntax**: `auto | avoid` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **19** | **1.3** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/page-break-inside + */ + pageBreakInside?: Property.PageBreakInside | undefined; + /** + * The **`paint-order`** CSS property lets you control the order in which the fill and stroke (and painting markers) of text content and shapes are drawn. + * + * **Syntax**: `normal | [ fill || stroke || markers ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-: | + * | **35** | **60** | **8** | **17** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/paint-order + */ + paintOrder?: Property.PaintOrder | undefined; + /** + * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. + * + * **Syntax**: `none | <length>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **36** | **16** | **9** | **12** | **10** | + * | 12 _-x-_ | | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/perspective + */ + perspective?: Property.Perspective<TLength> | undefined; + /** + * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. + * + * **Syntax**: `<position>` + * + * **Initial value**: `50% 50%` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **36** | **16** | **9** | **12** | **10** | + * | 12 _-x-_ | | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/perspective-origin + */ + perspectiveOrigin?: Property.PerspectiveOrigin<TLength> | undefined; + /** + * The **`pointer-events`** CSS property sets under what circumstances (if any) a particular graphic element can become the target of pointer events. + * + * **Syntax**: `auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **1** | **1.5** | **4** | **12** | **11** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/pointer-events + */ + pointerEvents?: Property.PointerEvents | undefined; + /** + * The **`position`** CSS property sets how an element is positioned in a document. The `top`, `right`, `bottom`, and `left` properties determine the final location of positioned elements. + * + * **Syntax**: `static | relative | absolute | sticky | fixed` + * + * **Initial value**: `static` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/position + */ + position?: Property.Position | undefined; + /** + * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. + * + * **Syntax**: `economy | exact` + * + * **Initial value**: `economy` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----------: | :-----------------: | :------: | :----------: | :-: | + * | **17** _-x-_ | **97** | **15.4** | **79** _-x-_ | No | + * | | 48 _(color-adjust)_ | 6 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/print-color-adjust + */ + printColorAdjust?: Property.PrintColorAdjust | undefined; + /** + * The **`quotes`** CSS property sets how the browser should render quotation marks that are added using the `open-quotes` or `close-quotes` values of the CSS `content` property. + * + * **Syntax**: `none | auto | [ <string> <string> ]+` + * + * **Initial value**: depends on user agent + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **11** | **1.5** | **9** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/quotes + */ + quotes?: Property.Quotes | undefined; + /** + * The **`resize`** CSS property sets whether an element is resizable, and if so, in which directions. + * + * **Syntax**: `none | both | horizontal | vertical | block | inline` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **1** | **4** | **3** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/resize + */ + resize?: Property.Resize | undefined; + /** + * The **`right`** CSS property participates in specifying the horizontal position of a positioned element. It has no effect on non-positioned elements. + * + * **Syntax**: `<length> | <percentage> | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/right + */ + right?: Property.Right<TLength> | undefined; + /** + * The **`rotate`** CSS property allows you to specify rotation transforms individually and independently of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` property. + * + * **Syntax**: `none | <angle> | [ x | y | z | <number>{3} ] && <angle>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **104** | **72** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/rotate + */ + rotate?: Property.Rotate | undefined; + /** + * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's rows. + * + * **Syntax**: `normal | <length-percentage>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **47** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/row-gap + */ + rowGap?: Property.RowGap<TLength> | undefined; + /** + * The **`ruby-align`** CSS property defines the distribution of the different ruby elements over the base. + * + * **Syntax**: `start | center | space-between | space-around` + * + * **Initial value**: `space-around` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | **38** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/ruby-align + */ + rubyAlign?: Property.RubyAlign | undefined; + /** + * **Syntax**: `separate | collapse | auto` + * + * **Initial value**: `separate` + */ + rubyMerge?: Property.RubyMerge | undefined; + /** + * The **`ruby-position`** CSS property defines the position of a ruby element relatives to its base element. It can be positioned over the element (`over`), under it (`under`), or between the characters on their right side (`inter-character`). + * + * **Syntax**: `[ alternate || [ over | under ] ] | inter-character` + * + * **Initial value**: `alternate` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :---------: | :---: | :-: | + * | **84** | **38** | **7** _-x-_ | 12-79 | No | + * | 1 _-x-_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/ruby-position + */ + rubyPosition?: Property.RubyPosition | undefined; + /** + * The **`scale`** CSS property allows you to specify scale transforms individually and independently of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. + * + * **Syntax**: `none | <number>{1,3}` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **104** | **72** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scale + */ + scale?: Property.Scale | undefined; + /** + * The **`scroll-behavior`** CSS property sets the behavior for a scrolling box when scrolling is triggered by the navigation or CSSOM scrolling APIs. + * + * **Syntax**: `auto | smooth` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **61** | **36** | **15.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-behavior + */ + scrollBehavior?: Property.ScrollBehavior | undefined; + /** + * The `scroll-margin-block-end` property defines the margin of the scroll snap area at the end of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end + */ + scrollMarginBlockEnd?: Property.ScrollMarginBlockEnd<TLength> | undefined; + /** + * The `scroll-margin-block-start` property defines the margin of the scroll snap area at the start of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start + */ + scrollMarginBlockStart?: Property.ScrollMarginBlockStart<TLength> | undefined; + /** + * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------------------------------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin-bottom)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom + */ + scrollMarginBottom?: Property.ScrollMarginBottom<TLength> | undefined; + /** + * The `scroll-margin-inline-end` property defines the margin of the scroll snap area at the end of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end + */ + scrollMarginInlineEnd?: Property.ScrollMarginInlineEnd<TLength> | undefined; + /** + * The `scroll-margin-inline-start` property defines the margin of the scroll snap area at the start of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start + */ + scrollMarginInlineStart?: Property.ScrollMarginInlineStart<TLength> | undefined; + /** + * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----------------------------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin-left)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left + */ + scrollMarginLeft?: Property.ScrollMarginLeft<TLength> | undefined; + /** + * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----------------------------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin-right)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right + */ + scrollMarginRight?: Property.ScrollMarginRight<TLength> | undefined; + /** + * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :---------------------------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin-top)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top + */ + scrollMarginTop?: Property.ScrollMarginTop<TLength> | undefined; + /** + * The `scroll-padding-block-end` property defines offsets for the end edge in the block dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. + * + * **Syntax**: `auto | <length-percentage>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end + */ + scrollPaddingBlockEnd?: Property.ScrollPaddingBlockEnd<TLength> | undefined; + /** + * The `scroll-padding-block-start` property defines offsets for the start edge in the block dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. + * + * **Syntax**: `auto | <length-percentage>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start + */ + scrollPaddingBlockStart?: Property.ScrollPaddingBlockStart<TLength> | undefined; + /** + * The `scroll-padding-bottom` property defines offsets for the bottom of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. + * + * **Syntax**: `auto | <length-percentage>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom + */ + scrollPaddingBottom?: Property.ScrollPaddingBottom<TLength> | undefined; + /** + * The `scroll-padding-inline-end` property defines offsets for the end edge in the inline dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. + * + * **Syntax**: `auto | <length-percentage>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end + */ + scrollPaddingInlineEnd?: Property.ScrollPaddingInlineEnd<TLength> | undefined; + /** + * The `scroll-padding-inline-start` property defines offsets for the start edge in the inline dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. + * + * **Syntax**: `auto | <length-percentage>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start + */ + scrollPaddingInlineStart?: Property.ScrollPaddingInlineStart<TLength> | undefined; + /** + * The `scroll-padding-left` property defines offsets for the left of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. + * + * **Syntax**: `auto | <length-percentage>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left + */ + scrollPaddingLeft?: Property.ScrollPaddingLeft<TLength> | undefined; + /** + * The `scroll-padding-right` property defines offsets for the right of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. + * + * **Syntax**: `auto | <length-percentage>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right + */ + scrollPaddingRight?: Property.ScrollPaddingRight<TLength> | undefined; + /** + * The **`scroll-padding-top`** property defines offsets for the top of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. + * + * **Syntax**: `auto | <length-percentage>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top + */ + scrollPaddingTop?: Property.ScrollPaddingTop<TLength> | undefined; + /** + * The `scroll-snap-align` property specifies the box's snap position as an alignment of its snap area (as the alignment subject) within its snap container's snapport (as the alignment container). The two values specify the snapping alignment in the block axis and inline axis, respectively. If only one value is specified, the second value defaults to the same value. + * + * **Syntax**: `[ none | start | end | center ]{1,2}` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **11** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align + */ + scrollSnapAlign?: Property.ScrollSnapAlign | undefined; + /** + * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------------------------------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin-bottom)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom + */ + scrollSnapMarginBottom?: Property.ScrollMarginBottom<TLength> | undefined; + /** + * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----------------------------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin-left)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left + */ + scrollSnapMarginLeft?: Property.ScrollMarginLeft<TLength> | undefined; + /** + * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----------------------------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin-right)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right + */ + scrollSnapMarginRight?: Property.ScrollMarginRight<TLength> | undefined; + /** + * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :---------------------------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin-top)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top + */ + scrollSnapMarginTop?: Property.ScrollMarginTop<TLength> | undefined; + /** + * The **`scroll-snap-stop`** CSS property defines whether or not the scroll container is allowed to "pass over" possible snap positions. + * + * **Syntax**: `normal | always` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **75** | **103** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop + */ + scrollSnapStop?: Property.ScrollSnapStop | undefined; + /** + * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. + * + * **Syntax**: `none | [ x | y | block | inline | both ] [ mandatory | proximity ]?` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :----------: | + * | **69** | 39-68 | **11** | **79** | **10** _-x-_ | + * | | | 9 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type + */ + scrollSnapType?: Property.ScrollSnapType | undefined; + /** + * The **`scroll-timeline-axis`** CSS property can be used to specify the scrollbar that will be used to provide the timeline for a scroll-timeline animation. + * + * **Syntax**: `[ block | inline | x | y ]#` + * + * **Initial value**: `block` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-axis + */ + scrollTimelineAxis?: Property.ScrollTimelineAxis | undefined; + /** + * The **`scroll-timeline-name`** CSS property defines a name that can be used to identify an element as the source of a scroll timeline for an animation. + * + * **Syntax**: `none | <dashed-ident>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-name + */ + scrollTimelineName?: Property.ScrollTimelineName | undefined; + /** + * The **`scrollbar-color`** CSS property sets the color of the scrollbar track and thumb. + * + * **Syntax**: `auto | <color>{2}` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **121** | **64** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-color + */ + scrollbarColor?: Property.ScrollbarColor | undefined; + /** + * The **`scrollbar-gutter`** CSS property allows authors to reserve space for the scrollbar, preventing unwanted layout changes as the content grows while also avoiding unnecessary visuals when scrolling isn't needed. + * + * **Syntax**: `auto | stable && both-edges?` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **94** | **97** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter + */ + scrollbarGutter?: Property.ScrollbarGutter | undefined; + /** + * The **`scrollbar-width`** property allows the author to set the maximum thickness of an element's scrollbars when they are shown. + * + * **Syntax**: `auto | thin | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **121** | **64** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-width + */ + scrollbarWidth?: Property.ScrollbarWidth | undefined; + /** + * The **`shape-image-threshold`** CSS property sets the alpha channel threshold used to extract the shape using an image as the value for `shape-outside`. + * + * **Syntax**: `<alpha-value>` + * + * **Initial value**: `0.0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **37** | **62** | **10.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold + */ + shapeImageThreshold?: Property.ShapeImageThreshold | undefined; + /** + * The **`shape-margin`** CSS property sets a margin for a CSS shape created using `shape-outside`. + * + * **Syntax**: `<length-percentage>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **37** | **62** | **10.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/shape-margin + */ + shapeMargin?: Property.ShapeMargin<TLength> | undefined; + /** + * The **`shape-outside`** CSS property defines a shape—which may be non-rectangular—around which adjacent inline content should wrap. By default, inline content wraps around its margin box; `shape-outside` provides a way to customize this wrapping, making it possible to wrap text around complex objects rather than simple boxes. + * + * **Syntax**: `none | [ <shape-box> || <basic-shape> ] | <image>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **37** | **62** | **10.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/shape-outside + */ + shapeOutside?: Property.ShapeOutside | undefined; + /** + * The **`tab-size`** CSS property is used to customize the width of tab characters (U+0009). + * + * **Syntax**: `<integer> | <length>` + * + * **Initial value**: `8` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **21** | **91** | **7** | n/a | No | + * | | 4 _-x-_ | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/tab-size + */ + tabSize?: Property.TabSize<TLength> | undefined; + /** + * The **`table-layout`** CSS property sets the algorithm used to lay out `<table>` cells, rows, and columns. + * + * **Syntax**: `auto | fixed` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **14** | **1** | **1** | **12** | **5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/table-layout + */ + tableLayout?: Property.TableLayout | undefined; + /** + * The **`text-align`** CSS property sets the horizontal alignment of the inline-level content inside a block element or table-cell box. This means it works like `vertical-align` but in the horizontal direction. + * + * **Syntax**: `start | end | left | right | center | justify | match-parent` + * + * **Initial value**: `start`, or a nameless value that acts as `left` if _direction_ is `ltr`, `right` if _direction_ is `rtl` if `start` is not supported by the browser. + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-align + */ + textAlign?: Property.TextAlign | undefined; + /** + * The **`text-align-last`** CSS property sets how the last line of a block or a line, right before a forced line break, is aligned. + * + * **Syntax**: `auto | start | end | left | right | center | justify` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **47** | **49** | **16** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-align-last + */ + textAlignLast?: Property.TextAlignLast | undefined; + /** + * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. + * + * **Syntax**: `none | all | [ digits <integer>? ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------: | :-----: | :--------------------------: | :----: | :------------------------------------: | + * | **48** | **48** | **15.4** | **79** | **11** _(-ms-text-combine-horizontal)_ | + * | 9 _(-webkit-text-combine)_ | | 5.1 _(-webkit-text-combine)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-combine-upright + */ + textCombineUpright?: Property.TextCombineUpright | undefined; + /** + * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **57** | **36** | **12.1** | n/a | No | + * | | | 8 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-color + */ + textDecorationColor?: Property.TextDecorationColor | undefined; + /** + * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. + * + * **Syntax**: `none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **57** | **36** | **12.1** | n/a | No | + * | | | 8 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-line + */ + textDecorationLine?: Property.TextDecorationLine | undefined; + /** + * The **`text-decoration-skip`** CSS property sets what parts of an element's content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. + * + * **Syntax**: `none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]` + * + * **Initial value**: `objects` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | 57-64 | No | **12.1** | n/a | No | + * | | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip + */ + textDecorationSkip?: Property.TextDecorationSkip | undefined; + /** + * The **`text-decoration-skip-ink`** CSS property specifies how overlines and underlines are drawn when they pass over glyph ascenders and descenders. + * + * **Syntax**: `auto | all | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **64** | **70** | **15.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink + */ + textDecorationSkipInk?: Property.TextDecorationSkipInk | undefined; + /** + * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. + * + * **Syntax**: `solid | double | dotted | dashed | wavy` + * + * **Initial value**: `solid` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **57** | **36** | **12.1** | n/a | No | + * | | | 8 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-style + */ + textDecorationStyle?: Property.TextDecorationStyle | undefined; + /** + * The **`text-decoration-thickness`** CSS property sets the stroke thickness of the decoration line that is used on text in an element, such as a line-through, underline, or overline. + * + * **Syntax**: `auto | from-font | <length> | <percentage> ` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **89** | **70** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness + */ + textDecorationThickness?: Property.TextDecorationThickness<TLength> | undefined; + /** + * The **`text-emphasis-color`** CSS property sets the color of emphasis marks. This value can also be set using the `text-emphasis` shorthand. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :----: | :--: | :-: | + * | **99** | **46** | **7** | n/a | No | + * | 25 _-x-_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color + */ + textEmphasisColor?: Property.TextEmphasisColor | undefined; + /** + * The **`text-emphasis-position`** CSS property sets where emphasis marks are drawn. Like ruby text, if there isn't enough room for emphasis marks, the line height is increased. + * + * **Syntax**: `[ over | under ] && [ right | left ]` + * + * **Initial value**: `over right` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :----: | :--: | :-: | + * | **99** | **46** | **7** | n/a | No | + * | 25 _-x-_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position + */ + textEmphasisPosition?: Property.TextEmphasisPosition | undefined; + /** + * The **`text-emphasis-style`** CSS property sets the appearance of emphasis marks. It can also be set, and reset, using the `text-emphasis` shorthand. + * + * **Syntax**: `none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :----: | :--: | :-: | + * | **99** | **46** | **7** | n/a | No | + * | 25 _-x-_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style + */ + textEmphasisStyle?: Property.TextEmphasisStyle | undefined; + /** + * The **`text-indent`** CSS property sets the length of empty space (indentation) that is put before lines of text in a block. + * + * **Syntax**: `<length-percentage> && hanging? && each-line?` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-indent + */ + textIndent?: Property.TextIndent<TLength> | undefined; + /** + * The **`text-justify`** CSS property sets what type of justification should be applied to text when `text-align``: justify;` is set on an element. + * + * **Syntax**: `auto | inter-character | inter-word | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :---: | :----: | + * | n/a | **55** | No | 12-79 | **11** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-justify + */ + textJustify?: Property.TextJustify | undefined; + /** + * The **`text-orientation`** CSS property sets the orientation of the text characters in a line. It only affects text in vertical mode (when `writing-mode` is not `horizontal-tb`). It is useful for controlling the display of languages that use vertical script, and also for making vertical table headers. + * + * **Syntax**: `mixed | upright | sideways` + * + * **Initial value**: `mixed` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-------: | :--: | :-: | + * | **48** | **41** | **14** | n/a | No | + * | 11 _-x-_ | | 5.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-orientation + */ + textOrientation?: Property.TextOrientation | undefined; + /** + * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. + * + * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` + * + * **Initial value**: `clip` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **7** | **1.3** | **12** | **6** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-overflow + */ + textOverflow?: Property.TextOverflow | undefined; + /** + * The **`text-rendering`** CSS property provides information to the rendering engine about what to optimize for when rendering text. + * + * **Syntax**: `auto | optimizeSpeed | optimizeLegibility | geometricPrecision` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **4** | **1** | **5** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-rendering + */ + textRendering?: Property.TextRendering | undefined; + /** + * The **`text-shadow`** CSS property adds shadows to text. It accepts a comma-separated list of shadows to be applied to the text and any of its `decorations`. Each shadow is described by some combination of X and Y offsets from the element, blur radius, and color. + * + * **Syntax**: `none | <shadow-t>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :----: | + * | **2** | **3.5** | **1.1** | **12** | **10** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-shadow + */ + textShadow?: Property.TextShadow | undefined; + /** + * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. + * + * **Syntax**: `none | auto | <percentage>` + * + * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-: | + * | **54** | No | No | **79** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-size-adjust + */ + textSizeAdjust?: Property.TextSizeAdjust | undefined; + /** + * The **`text-transform`** CSS property specifies how to capitalize an element's text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. It also can help improve legibility for ruby. + * + * **Syntax**: `none | capitalize | uppercase | lowercase | full-width | full-size-kana` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-transform + */ + textTransform?: Property.TextTransform | undefined; + /** + * The **`text-underline-offset`** CSS property sets the offset distance of an underline text decoration line (applied using `text-decoration`) from its original position. + * + * **Syntax**: `auto | <length> | <percentage> ` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **70** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-underline-offset + */ + textUnderlineOffset?: Property.TextUnderlineOffset<TLength> | undefined; + /** + * The **`text-underline-position`** CSS property specifies the position of the underline which is set using the `text-decoration` property's `underline` value. + * + * **Syntax**: `auto | from-font | [ under || [ left | right ] ]` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :---: | + * | **33** | **74** | **12.1** | **12** | **6** | + * | | | 9 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-underline-position + */ + textUnderlinePosition?: Property.TextUnderlinePosition | undefined; + /** + * The **`text-wrap`** CSS property controls how text inside an element is wrapped. The different values provide: + * + * **Syntax**: `wrap | nowrap | balance | stable | pretty` + * + * **Initial value**: `wrap` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **114** | **121** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-wrap + */ + textWrap?: Property.TextWrap | undefined; + /** + * The **`timeline-scope`** CSS property modifies the scope of a named animation timeline. + * + * **Syntax**: `none | <dashed-ident>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **116** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/timeline-scope + */ + timelineScope?: Property.TimelineScope | undefined; + /** + * The **`top`** CSS property participates in specifying the vertical position of a positioned element. It has no effect on non-positioned elements. + * + * **Syntax**: `<length> | <percentage> | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/top + */ + top?: Property.Top<TLength> | undefined; + /** + * The **`touch-action`** CSS property sets how an element's region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). + * + * **Syntax**: `auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :------: | + * | **36** | **52** | **13** | **12** | **11** | + * | | | | | 10 _-x-_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/touch-action + */ + touchAction?: Property.TouchAction | undefined; + /** + * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. + * + * **Syntax**: `none | <transform-list>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :----: | :-----: | + * | **36** | **16** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3.1 _-x-_ | | 9 _-x-_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transform + */ + transform?: Property.Transform | undefined; + /** + * The **`transform-box`** CSS property defines the layout box to which the `transform`, individual transform properties `translate`,`scale`, and `rotate`, and `transform-origin` properties relate. + * + * **Syntax**: `content-box | border-box | fill-box | stroke-box | view-box` + * + * **Initial value**: `view-box` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **64** | **55** | **11** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transform-box + */ + transformBox?: Property.TransformBox | undefined; + /** + * The **`transform-origin`** CSS property sets the origin for an element's transformations. + * + * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` + * + * **Initial value**: `50% 50% 0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :-----: | + * | **36** | **16** | **9** | **12** | **10** | + * | 1 _-x-_ | | 2 _-x-_ | | 9 _-x-_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transform-origin + */ + transformOrigin?: Property.TransformOrigin<TLength> | undefined; + /** + * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. + * + * **Syntax**: `flat | preserve-3d` + * + * **Initial value**: `flat` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :-: | + * | **36** | **16** | **9** | **12** | No | + * | 12 _-x-_ | | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transform-style + */ + transformStyle?: Property.TransformStyle | undefined; + /** + * The **`transition-behavior`** CSS property specifies whether transitions will be started for properties whose animation behavior is discrete. + * + * **Syntax**: `<transition-behavior-value>#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **117** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transition-behavior + */ + transitionBehavior?: Property.TransitionBehavior | undefined; + /** + * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **26** | **16** | **9** | **12** | **10** | + * | 1 _-x-_ | | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transition-delay + */ + transitionDelay?: Property.TransitionDelay<TTime> | undefined; + /** + * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :----: | :----: | + * | **26** | **16** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transition-duration + */ + transitionDuration?: Property.TransitionDuration<TTime> | undefined; + /** + * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. + * + * **Syntax**: `none | <single-transition-property>#` + * + * **Initial value**: all + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :----: | :----: | + * | **26** | **16** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transition-property + */ + transitionProperty?: Property.TransitionProperty | undefined; + /** + * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :----: | :----: | + * | **26** | **16** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transition-timing-function + */ + transitionTimingFunction?: Property.TransitionTimingFunction | undefined; + /** + * The **`translate`** CSS property allows you to specify translation transforms individually and independently of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. + * + * **Syntax**: `none | <length-percentage> [ <length-percentage> <length>? ]?` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **104** | **72** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/translate + */ + translate?: Property.Translate<TLength> | undefined; + /** + * The **`unicode-bidi`** CSS property, together with the `direction` property, determines how bidirectional text in a document is handled. For example, if a block of content contains both left-to-right and right-to-left text, the user-agent uses a complex Unicode algorithm to decide how to display the text. The `unicode-bidi` property overrides this algorithm and allows the developer to control the text embedding. + * + * **Syntax**: `normal | embed | isolate | bidi-override | isolate-override | plaintext` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :-----: | + * | **2** | **1** | **1.3** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/unicode-bidi + */ + unicodeBidi?: Property.UnicodeBidi | undefined; + /** + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. + * + * **Syntax**: `auto | text | none | contain | all` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :---------: | :------: | :----------: | + * | **54** | **69** | **3** _-x-_ | **79** | **10** _-x-_ | + * | 1 _-x-_ | 1 _-x-_ | | 12 _-x-_ | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/user-select + */ + userSelect?: Property.UserSelect | undefined; + /** + * The **`vertical-align`** CSS property sets vertical alignment of an inline, inline-block or table-cell box. + * + * **Syntax**: `baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length>` + * + * **Initial value**: `baseline` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/vertical-align + */ + verticalAlign?: Property.VerticalAlign<TLength> | undefined; + /** + * The **`view-timeline-axis`** CSS property is used to specify the scrollbar direction that will be used to provide the timeline for a _named view progress timeline_ animation, which is progressed through based on the change in visibility of an element (known as the _subject_) inside a scrollable element (_scroller_). `view-timeline-axis` is set on the subject. See CSS scroll-driven animations for more details. + * + * **Syntax**: `[ block | inline | x | y ]#` + * + * **Initial value**: `block` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline-axis + */ + viewTimelineAxis?: Property.ViewTimelineAxis | undefined; + /** + * The **`view-timeline-inset`** CSS property is used to specify one or two values representing an adjustment to the position of the scrollport (see Scroll container for more details) in which the subject element of a _named view progress timeline_ animation is deemed to be visible. Put another way, this allows you to specify start and/or end inset (or outset) values that offset the position of the timeline. + * + * **Syntax**: `[ [ auto | <length-percentage> ]{1,2} ]#` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline-inset + */ + viewTimelineInset?: Property.ViewTimelineInset<TLength> | undefined; + /** + * The **`view-timeline-name`** CSS property is used to define the name of a _named view progress timeline_, which is progressed through based on the change in visibility of an element (known as the _subject_) inside a scrollable element (_scroller_). `view-timeline` is set on the subject. + * + * **Syntax**: `none | <dashed-ident>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline-name + */ + viewTimelineName?: Property.ViewTimelineName | undefined; + /** + * The **`view-transition-name`** CSS property provides the selected element with a distinct identifying name (a `<custom-ident>`) and causes it to participate in a separate view transition from the root view transition — or no view transition if the `none` value is specified. + * + * **Syntax**: `none | <custom-ident>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **111** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-transition-name + */ + viewTransitionName?: Property.ViewTransitionName | undefined; + /** + * The **`visibility`** CSS property shows or hides an element without changing the layout of a document. The property can also hide rows or columns in a `<table>`. + * + * **Syntax**: `visible | hidden | collapse` + * + * **Initial value**: `visible` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/visibility + */ + visibility?: Property.Visibility | undefined; + /** + * The **`white-space`** CSS property sets how white space inside an element is handled. + * + * **Syntax**: `normal | pre | nowrap | pre-wrap | pre-line | break-spaces | [ <'white-space-collapse'> || <'text-wrap'> || <'white-space-trim'> ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/white-space + */ + whiteSpace?: Property.WhiteSpace | undefined; + /** + * The **`white-space-collapse`** CSS property controls how white space inside an element is collapsed. + * + * **Syntax**: `collapse | discard | preserve | preserve-breaks | preserve-spaces | break-spaces` + * + * **Initial value**: `collapse` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **114** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/white-space-collapse + */ + whiteSpaceCollapse?: Property.WhiteSpaceCollapse | undefined; + /** + * **Syntax**: `none | discard-before || discard-after || discard-inner` + * + * **Initial value**: `none` + */ + whiteSpaceTrim?: Property.WhiteSpaceTrim | undefined; + /** + * The **`widows`** CSS property sets the minimum number of lines in a block container that must be shown at the _top_ of a page, region, or column. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `2` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **25** | No | **1.3** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/widows + */ + widows?: Property.Widows | undefined; + /** + * The **`width`** CSS property sets an element's width. By default, it sets the width of the content area, but if `box-sizing` is set to `border-box`, it sets the width of the border area. + * + * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/width + */ + width?: Property.Width<TLength> | undefined; + /** + * The **`will-change`** CSS property hints to browsers how an element is expected to change. Browsers may set up optimizations before an element is actually changed. These kinds of optimizations can increase the responsiveness of a page by doing potentially expensive work before they are actually required. + * + * **Syntax**: `auto | <animateable-feature>#` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :--: | :-: | + * | **36** | **36** | **9.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/will-change + */ + willChange?: Property.WillChange | undefined; + /** + * The **`word-break`** CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box. + * + * **Syntax**: `normal | break-all | keep-all | break-word` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **15** | **3** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/word-break + */ + wordBreak?: Property.WordBreak | undefined; + /** + * The **`word-spacing`** CSS property sets the length of space between words and between tags. + * + * **Syntax**: `normal | <length>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **6** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/word-spacing + */ + wordSpacing?: Property.WordSpacing<TLength> | undefined; + /** + * The **`overflow-wrap`** CSS property applies to inline elements, setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box. + * + * **Syntax**: `normal | break-word` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :-----: | :-: | + * | **≤80** | **≤72** | **≤13.1** | **≤80** | No | + */ + wordWrap?: Property.WordWrap | undefined; + /** + * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. When set for an entire document, it should be set on the root element (`html` element for HTML documents). + * + * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` + * + * **Initial value**: `horizontal-tb` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :----: | :---: | + * | **48** | **41** | **10.1** | **12** | **9** | + * | 8 _-x-_ | | 5.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/writing-mode + */ + writingMode?: Property.WritingMode | undefined; + /** + * The **`z-index`** CSS property sets the z-order of a positioned element and its descendants or flex items. Overlapping elements with a larger z-index cover those with a smaller one. + * + * **Syntax**: `auto | <integer>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/z-index + */ + zIndex?: Property.ZIndex | undefined; + /** + * The non-standard **`zoom`** CSS property can be used to control the magnification level of an element. `transform: scale()` should be used instead of this property, if possible. However, unlike CSS Transforms, `zoom` affects the layout size of the element. + * + * **Syntax**: `normal | reset | <number> | <percentage>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :-----: | + * | **1** | n/a | **3.1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/zoom + */ + zoom?: Property.Zoom | undefined; +} + +export interface StandardShorthandProperties<TLength = (string & {}) | 0, TTime = string & {}> { + /** + * The **`all`** shorthand CSS property resets all of an element's properties except `unicode-bidi`, `direction`, and CSS Custom Properties. It can set properties to their initial or inherited values, or to the values specified in another cascade layer or stylesheet origin. + * + * **Syntax**: `initial | inherit | unset | revert | revert-layer` + * + * **Initial value**: There is no practical initial value for it. + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :--: | :-: | + * | **37** | **27** | **9.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/all + */ + all?: Property.All | undefined; + /** + * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. + * + * **Syntax**: `<single-animation>#` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **43** | **16** | **9** | **12** | **10** | + * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation + */ + animation?: Property.Animation<TTime> | undefined; + /** + * The **`animation-range`** CSS shorthand property is used to set the start and end of an animation's attachment range along its timeline, i.e. where along the timeline an animation will start and end. + * + * **Syntax**: `[ <'animation-range-start'> <'animation-range-end'>? ]#` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-range + */ + animationRange?: Property.AnimationRange<TLength> | undefined; + /** + * The **`background`** shorthand CSS property sets all background style properties at once, such as color, image, origin and size, or repeat method. + * + * **Syntax**: `[ <bg-layer> , ]* <final-bg-layer>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background + */ + background?: Property.Background<TLength> | undefined; + /** + * The **`background-position`** CSS property sets the initial position for each background image. The position is relative to the position layer set by `background-origin`. + * + * **Syntax**: `<bg-position>#` + * + * **Initial value**: `0% 0%` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-position + */ + backgroundPosition?: Property.BackgroundPosition<TLength> | undefined; + /** + * The **`border`** shorthand CSS property sets an element's border. It sets the values of `border-width`, `border-style`, and `border-color`. + * + * **Syntax**: `<line-width> || <line-style> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border + */ + border?: Property.Border<TLength> | undefined; + /** + * The **`border-block`** CSS property is a shorthand property for setting the individual logical block border property values in a single place in the style sheet. + * + * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block + */ + borderBlock?: Property.BorderBlock<TLength> | undefined; + /** + * The **`border-block-end`** CSS property is a shorthand property for setting the individual logical block-end border property values in a single place in the style sheet. + * + * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end + */ + borderBlockEnd?: Property.BorderBlockEnd<TLength> | undefined; + /** + * The **`border-block-start`** CSS property is a shorthand property for setting the individual logical block-start border property values in a single place in the style sheet. + * + * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start + */ + borderBlockStart?: Property.BorderBlockStart<TLength> | undefined; + /** + * The **`border-bottom`** shorthand CSS property sets an element's bottom border. It sets the values of `border-bottom-width`, `border-bottom-style` and `border-bottom-color`. + * + * **Syntax**: `<line-width> || <line-style> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom + */ + borderBottom?: Property.BorderBottom<TLength> | undefined; + /** + * The **`border-color`** shorthand CSS property sets the color of an element's border. + * + * **Syntax**: `<color>{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-color + */ + borderColor?: Property.BorderColor | undefined; + /** + * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. + * + * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-------: | :-----: | :----: | :----: | + * | **16** | **15** | **6** | **12** | **11** | + * | 7 _-x-_ | 3.5 _-x-_ | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-image + */ + borderImage?: Property.BorderImage | undefined; + /** + * The **`border-inline`** CSS property is a shorthand property for setting the individual logical inline border property values in a single place in the style sheet. + * + * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline + */ + borderInline?: Property.BorderInline<TLength> | undefined; + /** + * The **`border-inline-end`** CSS property is a shorthand property for setting the individual logical inline-end border property values in a single place in the style sheet. + * + * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end + */ + borderInlineEnd?: Property.BorderInlineEnd<TLength> | undefined; + /** + * The **`border-inline-start`** CSS property is a shorthand property for setting the individual logical inline-start border property values in a single place in the style sheet. + * + * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start + */ + borderInlineStart?: Property.BorderInlineStart<TLength> | undefined; + /** + * The **`border-left`** shorthand CSS property sets all the properties of an element's left border. + * + * **Syntax**: `<line-width> || <line-style> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-left + */ + borderLeft?: Property.BorderLeft<TLength> | undefined; + /** + * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. + * + * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :---: | + * | **4** | **4** | **5** | **12** | **9** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-radius + */ + borderRadius?: Property.BorderRadius<TLength> | undefined; + /** + * The **`border-right`** shorthand CSS property sets all the properties of an element's right border. + * + * **Syntax**: `<line-width> || <line-style> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-right + */ + borderRight?: Property.BorderRight<TLength> | undefined; + /** + * The **`border-style`** shorthand CSS property sets the line style for all four sides of an element's border. + * + * **Syntax**: `<line-style>{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-style + */ + borderStyle?: Property.BorderStyle | undefined; + /** + * The **`border-top`** shorthand CSS property sets all the properties of an element's top border. + * + * **Syntax**: `<line-width> || <line-style> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-top + */ + borderTop?: Property.BorderTop<TLength> | undefined; + /** + * The **`border-width`** shorthand CSS property sets the width of an element's border. + * + * **Syntax**: `<line-width>{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-width + */ + borderWidth?: Property.BorderWidth<TLength> | undefined; + /** **Syntax**: `<'caret-color'> || <'caret-shape'>` */ + caret?: Property.Caret | undefined; + /** + * The **`column-rule`** shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **50** | **52** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/column-rule + */ + columnRule?: Property.ColumnRule<TLength> | undefined; + /** + * The **`columns`** CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths. + * + * **Syntax**: `<'column-width'> || <'column-count'>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :----: | + * | **50** | **52** | **9** | **12** | **10** | + * | | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/columns + */ + columns?: Property.Columns<TLength> | undefined; + /** + * The **`contain-intrinsic-size`** CSS shorthand property sets the size of an element that a browser will use for layout when the element is subject to size containment. + * + * **Syntax**: `[ auto? [ none | <length> ] ]{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **83** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-size + */ + containIntrinsicSize?: Property.ContainIntrinsicSize<TLength> | undefined; + /** + * The **container** shorthand CSS property establishes the element as a query container and specifies the name or name for the containment context used in a container query. + * + * **Syntax**: `<'container-name'> [ / <'container-type'> ]?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **105** | **110** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/container + */ + container?: Property.Container | undefined; + /** + * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container. + * + * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :------: | + * | **29** | **20** | **9** | **12** | **11** | + * | 21 _-x-_ | | 7 _-x-_ | | 10 _-x-_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/flex + */ + flex?: Property.Flex<TLength> | undefined; + /** + * The **`flex-flow`** CSS shorthand property specifies the direction of a flex container, as well as its wrapping behavior. + * + * **Syntax**: `<'flex-direction'> || <'flex-wrap'>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **29** | **28** | **9** | **12** | **11** | + * | 21 _-x-_ | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/flex-flow + */ + flexFlow?: Property.FlexFlow | undefined; + /** + * The **`font`** CSS shorthand property sets all the different properties of an element's font. Alternatively, it sets an element's font to a system font. + * + * **Syntax**: `[ [ <'font-style'> || <font-variant-css21> || <'font-weight'> || <'font-stretch'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font + */ + font?: Property.Font | undefined; + /** + * The **`gap`** CSS property sets the gaps (gutters) between rows and columns. It is a shorthand for `row-gap` and `column-gap`. + * + * **Syntax**: `<'row-gap'> <'column-gap'>?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/gap + */ + gap?: Property.Gap<TLength> | undefined; + /** + * The **`grid`** CSS property is a shorthand property that sets all of the explicit and implicit grid properties in a single declaration. + * + * **Syntax**: `<'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid + */ + grid?: Property.Grid | undefined; + /** + * The **`grid-area`** CSS shorthand property specifies a grid item's size and location within a grid by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the edges of its grid area. + * + * **Syntax**: `<grid-line> [ / <grid-line> ]{0,3}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-area + */ + gridArea?: Property.GridArea | undefined; + /** + * The **`grid-column`** CSS shorthand property specifies a grid item's size and location within a grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. + * + * **Syntax**: `<grid-line> [ / <grid-line> ]?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-column + */ + gridColumn?: Property.GridColumn | undefined; + /** + * The **`grid-row`** CSS shorthand property specifies a grid item's size and location within a grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. + * + * **Syntax**: `<grid-line> [ / <grid-line> ]?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-row + */ + gridRow?: Property.GridRow | undefined; + /** + * The **`grid-template`** CSS property is a shorthand property for defining grid columns, grid rows, and grid areas. + * + * **Syntax**: `none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-template + */ + gridTemplate?: Property.GridTemplate | undefined; + /** + * The **`inset`** CSS property is a shorthand that corresponds to the `top`, `right`, `bottom`, and/or `left` properties. It has the same multi-value syntax of the `margin` shorthand. + * + * **Syntax**: `<'top'>{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset + */ + inset?: Property.Inset<TLength> | undefined; + /** + * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **63** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset-block + */ + insetBlock?: Property.InsetBlock<TLength> | undefined; + /** + * The **`inset-inline`** CSS property defines the logical start and end offsets of an element in the inline direction, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **63** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline + */ + insetInline?: Property.InsetInline<TLength> | undefined; + /** + * **Syntax**: `none | <integer>` + * + * **Initial value**: `none` + */ + lineClamp?: Property.LineClamp | undefined; + /** + * The **`list-style`** CSS shorthand property allows you to set all the list style properties at once. + * + * **Syntax**: `<'list-style-type'> || <'list-style-position'> || <'list-style-image'>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/list-style + */ + listStyle?: Property.ListStyle | undefined; + /** + * The **`margin`** CSS shorthand property sets the margin area on all four sides of an element. + * + * **Syntax**: `[ <length> | <percentage> | auto ]{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin + */ + margin?: Property.Margin<TLength> | undefined; + /** + * The **`margin-block`** CSS shorthand property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'margin-left'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-block + */ + marginBlock?: Property.MarginBlock<TLength> | undefined; + /** + * The **`margin-inline`** CSS shorthand property is a shorthand property that defines both the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'margin-left'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline + */ + marginInline?: Property.MarginInline<TLength> | undefined; + /** + * The **`mask`** CSS shorthand property hides an element (partially or fully) by masking or clipping the image at specific points. + * + * **Syntax**: `<mask-layer>#` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-------: | :---: | :-: | + * | **1** | **53** | **15.4** | 12-79 | No | + * | | | 3.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask + */ + mask?: Property.Mask<TLength> | undefined; + /** + * The **`mask-border`** CSS shorthand property lets you create a mask along the edge of an element's border. + * + * **Syntax**: `<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------------: | :-----: | :----------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-border + */ + maskBorder?: Property.MaskBorder | undefined; + /** + * The **`offset`** CSS shorthand property sets all the properties required for animating an element along a defined path. + * + * **Syntax**: `[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----------: | :-----: | :----: | :--: | :-: | + * | **55** | **72** | **16** | n/a | No | + * | 46 _(motion)_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset + */ + motion?: Property.Offset<TLength> | undefined; + /** + * The **`offset`** CSS shorthand property sets all the properties required for animating an element along a defined path. + * + * **Syntax**: `[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----------: | :-----: | :----: | :--: | :-: | + * | **55** | **72** | **16** | n/a | No | + * | 46 _(motion)_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset + */ + offset?: Property.Offset<TLength> | undefined; + /** + * The **`outline`** CSS shorthand property sets most of the outline properties in a single declaration. + * + * **Syntax**: `[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :---: | + * | **94** | **88** | **16.4** | **94** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/outline + */ + outline?: Property.Outline<TLength> | undefined; + /** + * The **`overflow`** CSS shorthand property sets the desired behavior for an element's overflow — i.e. when an element's content is too big to fit in its block formatting context — in both directions. + * + * **Syntax**: `[ visible | hidden | clip | scroll | auto ]{1,2}` + * + * **Initial value**: `visible` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overflow + */ + overflow?: Property.Overflow | undefined; + /** + * The **`overscroll-behavior`** CSS property sets what a browser does when reaching the boundary of a scrolling area. It's a shorthand for `overscroll-behavior-x` and `overscroll-behavior-y`. + * + * **Syntax**: `[ contain | none | auto ]{1,2}` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-: | + * | **63** | **59** | **16** | **18** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior + */ + overscrollBehavior?: Property.OverscrollBehavior | undefined; + /** + * The **`padding`** CSS shorthand property sets the padding area on all four sides of an element at once. + * + * **Syntax**: `[ <length> | <percentage> ]{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding + */ + padding?: Property.Padding<TLength> | undefined; + /** + * The **`padding-block`** CSS shorthand property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-block + */ + paddingBlock?: Property.PaddingBlock<TLength> | undefined; + /** + * The **`padding-inline`** CSS shorthand property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline + */ + paddingInline?: Property.PaddingInline<TLength> | undefined; + /** + * The **`place-content`** CSS shorthand property allows you to align content along both the block and inline directions at once (i.e. the `align-content` and `justify-content` properties) in a relevant layout system such as Grid or Flexbox. + * + * **Syntax**: `<'align-content'> <'justify-content'>?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **59** | **45** | **9** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/place-content + */ + placeContent?: Property.PlaceContent | undefined; + /** + * The CSS **`place-items`** shorthand property allows you to align items along both the block and inline directions at once (i.e. the `align-items` and `justify-items` properties) in a relevant layout system such as Grid or Flexbox. If the second value is not set, the first value is also used for it. + * + * **Syntax**: `<'align-items'> <'justify-items'>?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **59** | **45** | **11** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/place-items + */ + placeItems?: Property.PlaceItems | undefined; + /** + * The **`place-self`** CSS shorthand property allows you to align an individual item in both the block and inline directions at once (i.e. the `align-self` and `justify-self` properties) in a relevant layout system such as Grid or Flexbox. If the second value is not present, the first value is also used for it. + * + * **Syntax**: `<'align-self'> <'justify-self'>?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **59** | **45** | **11** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/place-self + */ + placeSelf?: Property.PlaceSelf | undefined; + /** + * The **`scroll-margin`** shorthand property sets all of the scroll margins of an element at once, assigning values much like the `margin` property does for margins of an element. + * + * **Syntax**: `<length>{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----------------------: | :--: | :-: | + * | **69** | **90** | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin + */ + scrollMargin?: Property.ScrollMargin<TLength> | undefined; + /** + * The `scroll-margin-block` shorthand property sets the scroll margins of an element in the block dimension. + * + * **Syntax**: `<length>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block + */ + scrollMarginBlock?: Property.ScrollMarginBlock<TLength> | undefined; + /** + * The `scroll-margin-inline` shorthand property sets the scroll margins of an element in the inline dimension. + * + * **Syntax**: `<length>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline + */ + scrollMarginInline?: Property.ScrollMarginInline<TLength> | undefined; + /** + * The **`scroll-padding`** shorthand property sets scroll padding on all sides of an element at once, much like the `padding` property does for padding on an element. + * + * **Syntax**: `[ auto | <length-percentage> ]{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding + */ + scrollPadding?: Property.ScrollPadding<TLength> | undefined; + /** + * The `scroll-padding-block` shorthand property sets the scroll padding of an element in the block dimension. + * + * **Syntax**: `[ auto | <length-percentage> ]{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block + */ + scrollPaddingBlock?: Property.ScrollPaddingBlock<TLength> | undefined; + /** + * The `scroll-padding-inline` shorthand property sets the scroll padding of an element in the inline dimension. + * + * **Syntax**: `[ auto | <length-percentage> ]{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline + */ + scrollPaddingInline?: Property.ScrollPaddingInline<TLength> | undefined; + /** + * The **`scroll-margin`** shorthand property sets all of the scroll margins of an element at once, assigning values much like the `margin` property does for margins of an element. + * + * **Syntax**: `<length>{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----------------------: | :--: | :-: | + * | **69** | 68-90 | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin + */ + scrollSnapMargin?: Property.ScrollMargin<TLength> | undefined; + /** + * The **`scroll-timeline`** CSS shorthand property defines a name that can be used to identify the source element of a scroll timeline, along with the scrollbar axis that should provide the timeline. + * + * **Syntax**: `[ <'scroll-timeline-name'> <'scroll-timeline-axis'>? ]#` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-timeline + */ + scrollTimeline?: Property.ScrollTimeline | undefined; + /** + * The **`text-decoration`** shorthand CSS property sets the appearance of decorative lines on text. It is a shorthand for `text-decoration-line`, `text-decoration-color`, `text-decoration-style`, and the newer `text-decoration-thickness` property. + * + * **Syntax**: `<'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> || <'text-decoration-thickness'>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration + */ + textDecoration?: Property.TextDecoration<TLength> | undefined; + /** + * The **`text-emphasis`** CSS property applies emphasis marks to text (except spaces and control characters). It is a shorthand for `text-emphasis-style` and `text-emphasis-color`. + * + * **Syntax**: `<'text-emphasis-style'> || <'text-emphasis-color'>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :----: | :--: | :-: | + * | **99** | **46** | **7** | n/a | No | + * | 25 _-x-_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis + */ + textEmphasis?: Property.TextEmphasis | undefined; + /** + * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. + * + * **Syntax**: `<single-transition>#` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :----: | :----: | + * | **26** | **16** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transition + */ + transition?: Property.Transition<TTime> | undefined; + /** + * The **`view-timeline`** CSS shorthand property is used to define a _named view progress timeline_, which is progressed through based on the change in visibility of an element (known as the _subject_) inside a scrollable element (_scroller_). `view-timeline` is set on the subject. + * + * **Syntax**: `[ <'view-timeline-name'> <'view-timeline-axis'>? ]#` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline + */ + viewTimeline?: Property.ViewTimeline | undefined; +} + +export interface StandardProperties<TLength = (string & {}) | 0, TTime = string & {}> + extends StandardLonghandProperties<TLength, TTime>, + StandardShorthandProperties<TLength, TTime> {} + +export interface VendorLonghandProperties<TLength = (string & {}) | 0, TTime = string & {}> { + /** + * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + */ + MozAnimationDelay?: Property.AnimationDelay<TTime> | undefined; + /** + * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. + * + * **Syntax**: `<single-animation-direction>#` + * + * **Initial value**: `normal` + */ + MozAnimationDirection?: Property.AnimationDirection | undefined; + /** + * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + */ + MozAnimationDuration?: Property.AnimationDuration<TTime> | undefined; + /** + * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. + * + * **Syntax**: `<single-animation-fill-mode>#` + * + * **Initial value**: `none` + */ + MozAnimationFillMode?: Property.AnimationFillMode | undefined; + /** + * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. + * + * **Syntax**: `<single-animation-iteration-count>#` + * + * **Initial value**: `1` + */ + MozAnimationIterationCount?: Property.AnimationIterationCount | undefined; + /** + * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. + * + * **Syntax**: `[ none | <keyframes-name> ]#` + * + * **Initial value**: `none` + */ + MozAnimationName?: Property.AnimationName | undefined; + /** + * The **`animation-play-state`** CSS property sets whether an animation is running or paused. + * + * **Syntax**: `<single-animation-play-state>#` + * + * **Initial value**: `running` + */ + MozAnimationPlayState?: Property.AnimationPlayState | undefined; + /** + * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + */ + MozAnimationTimingFunction?: Property.AnimationTimingFunction | undefined; + /** + * The **`appearance`** CSS property is used to control native appearance of UI controls, that are based on operating system's theme. + * + * **Syntax**: `none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized` + * + * **Initial value**: `none` (but this value is overridden in the user agent CSS) + */ + MozAppearance?: Property.MozAppearance | undefined; + /** + * The **`-moz-binding`** CSS property is used by Mozilla-based applications to attach an XBL binding to a DOM element. + * + * **Syntax**: `<url> | none` + * + * **Initial value**: `none` + */ + MozBinding?: Property.MozBinding | undefined; + /** + * In Mozilla applications like Firefox, the **`-moz-border-bottom-colors`** CSS property sets a list of colors for the bottom border. + * + * **Syntax**: `<color>+ | none` + * + * **Initial value**: `none` + */ + MozBorderBottomColors?: Property.MozBorderBottomColors | undefined; + /** + * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-color'>` + * + * **Initial value**: `currentcolor` + */ + MozBorderEndColor?: Property.BorderInlineEndColor | undefined; + /** + * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-style'>` + * + * **Initial value**: `none` + */ + MozBorderEndStyle?: Property.BorderInlineEndStyle | undefined; + /** + * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-width'>` + * + * **Initial value**: `medium` + */ + MozBorderEndWidth?: Property.BorderInlineEndWidth<TLength> | undefined; + /** + * In Mozilla applications like Firefox, the **`-moz-border-left-colors`** CSS property sets a list of colors for the left border. + * + * **Syntax**: `<color>+ | none` + * + * **Initial value**: `none` + */ + MozBorderLeftColors?: Property.MozBorderLeftColors | undefined; + /** + * In Mozilla applications like Firefox, the **`-moz-border-right-colors`** CSS property sets a list of colors for the right border. + * + * **Syntax**: `<color>+ | none` + * + * **Initial value**: `none` + */ + MozBorderRightColors?: Property.MozBorderRightColors | undefined; + /** + * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-color'>` + * + * **Initial value**: `currentcolor` + */ + MozBorderStartColor?: Property.BorderInlineStartColor | undefined; + /** + * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-style'>` + * + * **Initial value**: `none` + */ + MozBorderStartStyle?: Property.BorderInlineStartStyle | undefined; + /** + * In Mozilla applications like Firefox, the **`-moz-border-top-colors`** CSS property sets a list of colors for the top border. + * + * **Syntax**: `<color>+ | none` + * + * **Initial value**: `none` + */ + MozBorderTopColors?: Property.MozBorderTopColors | undefined; + /** + * The **`box-sizing`** CSS property sets how the total width and height of an element is calculated. + * + * **Syntax**: `content-box | border-box` + * + * **Initial value**: `content-box` + */ + MozBoxSizing?: Property.BoxSizing | undefined; + /** + * The **`column-count`** CSS property breaks an element's content into the specified number of columns. + * + * **Syntax**: `<integer> | auto` + * + * **Initial value**: `auto` + */ + MozColumnCount?: Property.ColumnCount | undefined; + /** + * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. + * + * **Syntax**: `auto | balance | balance-all` + * + * **Initial value**: `balance` + */ + MozColumnFill?: Property.ColumnFill | undefined; + /** + * The **`column-rule-color`** CSS property sets the color of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + */ + MozColumnRuleColor?: Property.ColumnRuleColor | undefined; + /** + * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<'border-style'>` + * + * **Initial value**: `none` + */ + MozColumnRuleStyle?: Property.ColumnRuleStyle | undefined; + /** + * The **`column-rule-width`** CSS property sets the width of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<'border-width'>` + * + * **Initial value**: `medium` + */ + MozColumnRuleWidth?: Property.ColumnRuleWidth<TLength> | undefined; + /** + * The **`column-width`** CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. + * + * **Syntax**: `<length> | auto` + * + * **Initial value**: `auto` + */ + MozColumnWidth?: Property.ColumnWidth<TLength> | undefined; + /** + * The **`-moz-context-properties`** property can be used within privileged contexts in Firefox to share the values of specified properties of the element with a child SVG image. + * + * **Syntax**: `none | [ fill | fill-opacity | stroke | stroke-opacity ]#` + * + * **Initial value**: `none` + */ + MozContextProperties?: Property.MozContextProperties | undefined; + /** + * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. + * + * **Syntax**: `normal | <feature-tag-value>#` + * + * **Initial value**: `normal` + */ + MozFontFeatureSettings?: Property.FontFeatureSettings | undefined; + /** + * The **`font-language-override`** CSS property controls the use of language-specific glyphs in a typeface. + * + * **Syntax**: `normal | <string>` + * + * **Initial value**: `normal` + */ + MozFontLanguageOverride?: Property.FontLanguageOverride | undefined; + /** + * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. + * + * **Syntax**: `none | manual | auto` + * + * **Initial value**: `manual` + */ + MozHyphens?: Property.Hyphens | undefined; + /** + * For certain XUL elements and pseudo-elements that use an image from the `list-style-image` property, this property specifies a region of the image that is used in place of the whole image. This allows elements to use different pieces of the same image to improve performance. + * + * **Syntax**: `<shape> | auto` + * + * **Initial value**: `auto` + */ + MozImageRegion?: Property.MozImageRegion | undefined; + /** + * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'margin-left'>` + * + * **Initial value**: `0` + */ + MozMarginEnd?: Property.MarginInlineEnd<TLength> | undefined; + /** + * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'margin-left'>` + * + * **Initial value**: `0` + */ + MozMarginStart?: Property.MarginInlineStart<TLength> | undefined; + /** + * The **`-moz-orient`** CSS property specifies the orientation of the element to which it's applied. + * + * **Syntax**: `inline | block | horizontal | vertical` + * + * **Initial value**: `inline` + */ + MozOrient?: Property.MozOrient | undefined; + /** + * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. + * + * **Syntax**: `auto | never | always | <absolute-size> | <length>` + * + * **Initial value**: `auto` + */ + MozOsxFontSmoothing?: Property.FontSmooth<TLength> | undefined; + /** + * In Mozilla applications, the **`-moz-outline-radius-bottomleft`** CSS property can be used to round the bottom-left corner of an element's `outline`. + * + * **Syntax**: `<outline-radius>` + * + * **Initial value**: `0` + */ + MozOutlineRadiusBottomleft?: Property.MozOutlineRadiusBottomleft<TLength> | undefined; + /** + * In Mozilla applications, the **`-moz-outline-radius-bottomright`** CSS property can be used to round the bottom-right corner of an element's `outline`. + * + * **Syntax**: `<outline-radius>` + * + * **Initial value**: `0` + */ + MozOutlineRadiusBottomright?: Property.MozOutlineRadiusBottomright<TLength> | undefined; + /** + * In Mozilla applications, the **`-moz-outline-radius-topleft`** CSS property can be used to round the top-left corner of an element's `outline`. + * + * **Syntax**: `<outline-radius>` + * + * **Initial value**: `0` + */ + MozOutlineRadiusTopleft?: Property.MozOutlineRadiusTopleft<TLength> | undefined; + /** + * In Mozilla applications, the **`-moz-outline-radius-topright`** CSS property can be used to round the top-right corner of an element's `outline`. + * + * **Syntax**: `<outline-radius>` + * + * **Initial value**: `0` + */ + MozOutlineRadiusTopright?: Property.MozOutlineRadiusTopright<TLength> | undefined; + /** + * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>` + * + * **Initial value**: `0` + */ + MozPaddingEnd?: Property.PaddingInlineEnd<TLength> | undefined; + /** + * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>` + * + * **Initial value**: `0` + */ + MozPaddingStart?: Property.PaddingInlineStart<TLength> | undefined; + /** + * **`-moz-stack-sizing`** is an extended CSS property. Normally, a `<xul:stack>` will change its size so that all of its child elements are completely visible. For example, moving a child of the stack far to the right will widen the stack so the child remains visible. + * + * **Syntax**: `ignore | stretch-to-fit` + * + * **Initial value**: `stretch-to-fit` + */ + MozStackSizing?: Property.MozStackSizing | undefined; + /** + * The **`tab-size`** CSS property is used to customize the width of tab characters (U+0009). + * + * **Syntax**: `<integer> | <length>` + * + * **Initial value**: `8` + */ + MozTabSize?: Property.TabSize<TLength> | undefined; + /** + * The **`-moz-text-blink`** non-standard Mozilla CSS extension specifies the blink mode. + * + * **Syntax**: `none | blink` + * + * **Initial value**: `none` + */ + MozTextBlink?: Property.MozTextBlink | undefined; + /** + * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. + * + * **Syntax**: `none | auto | <percentage>` + * + * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). + */ + MozTextSizeAdjust?: Property.TextSizeAdjust | undefined; + /** + * The **`-moz-user-focus`** CSS property is used to indicate whether an element can have the focus. + * + * **Syntax**: `ignore | normal | select-after | select-before | select-menu | select-same | select-all | none` + * + * **Initial value**: `none` + */ + MozUserFocus?: Property.MozUserFocus | undefined; + /** + * The **`user-modify`** property has no effect in Firefox. It was originally planned to determine whether or not the content of an element can be edited by a user. + * + * **Syntax**: `read-only | read-write | write-only` + * + * **Initial value**: `read-only` + */ + MozUserModify?: Property.MozUserModify | undefined; + /** + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. + * + * **Syntax**: `auto | text | none | contain | all` + * + * **Initial value**: `auto` + */ + MozUserSelect?: Property.UserSelect | undefined; + /** + * The **`-moz-window-dragging`** CSS property specifies whether a window is draggable or not. It only works in Chrome code, and only on Mac OS X. + * + * **Syntax**: `drag | no-drag` + * + * **Initial value**: `drag` + */ + MozWindowDragging?: Property.MozWindowDragging | undefined; + /** + * The **`-moz-window-shadow`** CSS property specifies whether a window will have a shadow. It only works on Mac OS X. + * + * **Syntax**: `default | menu | tooltip | sheet | none` + * + * **Initial value**: `default` + */ + MozWindowShadow?: Property.MozWindowShadow | undefined; + /** + * The **`-ms-accelerator`** CSS property is a Microsoft extension that sets or retrieves a string indicating whether the object represents a keyboard shortcut. + * + * **Syntax**: `false | true` + * + * **Initial value**: `false` + */ + msAccelerator?: Property.MsAccelerator | undefined; + /** + * The **`-ms-block-progression`** CSS property is a Microsoft extension that specifies the block progression and layout orientation. + * + * **Syntax**: `tb | rl | bt | lr` + * + * **Initial value**: `tb` + */ + msBlockProgression?: Property.MsBlockProgression | undefined; + /** + * The **`-ms-content-zoom-chaining`** CSS property is a Microsoft extension specifying the zoom behavior that occurs when a user hits the zoom limit during page manipulation. + * + * **Syntax**: `none | chained` + * + * **Initial value**: `none` + */ + msContentZoomChaining?: Property.MsContentZoomChaining | undefined; + /** + * The **`-ms-content-zoom-limit-max`** CSS property is a Microsoft extension that specifies the selected elements' maximum zoom factor. + * + * **Syntax**: `<percentage>` + * + * **Initial value**: `400%` + */ + msContentZoomLimitMax?: Property.MsContentZoomLimitMax | undefined; + /** + * The **`-ms-content-zoom-limit-min`** CSS property is a Microsoft extension that specifies the minimum zoom factor. + * + * **Syntax**: `<percentage>` + * + * **Initial value**: `100%` + */ + msContentZoomLimitMin?: Property.MsContentZoomLimitMin | undefined; + /** + * The **`-ms-content-zoom-snap-points`** CSS property is a Microsoft extension that specifies where zoom snap-points are located. + * + * **Syntax**: `snapInterval( <percentage>, <percentage> ) | snapList( <percentage># )` + * + * **Initial value**: `snapInterval(0%, 100%)` + */ + msContentZoomSnapPoints?: Property.MsContentZoomSnapPoints | undefined; + /** + * The **`-ms-content-zoom-snap-type`** CSS property is a Microsoft extension that specifies how zooming is affected by defined snap-points. + * + * **Syntax**: `none | proximity | mandatory` + * + * **Initial value**: `none` + */ + msContentZoomSnapType?: Property.MsContentZoomSnapType | undefined; + /** + * The **`-ms-content-zooming`** CSS property is a Microsoft extension that specifies whether zooming is enabled. + * + * **Syntax**: `none | zoom` + * + * **Initial value**: zoom for the top level element, none for all other elements + */ + msContentZooming?: Property.MsContentZooming | undefined; + /** + * The `-ms-filter` CSS property is a Microsoft extension that sets or retrieves the filter or collection of filters applied to an object. + * + * **Syntax**: `<string>` + * + * **Initial value**: "" (the empty string) + */ + msFilter?: Property.MsFilter | undefined; + /** + * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). + * + * **Syntax**: `row | row-reverse | column | column-reverse` + * + * **Initial value**: `row` + */ + msFlexDirection?: Property.FlexDirection | undefined; + /** + * The **`flex-grow`** CSS property sets the flex grow factor of a flex item's main size. + * + * **Syntax**: `<number>` + * + * **Initial value**: `0` + */ + msFlexPositive?: Property.FlexGrow | undefined; + /** + * The **`-ms-flow-from`** CSS property is a Microsoft extension that gets or sets a value identifying a region container in the document that accepts the content flow from the data source. + * + * **Syntax**: `[ none | <custom-ident> ]#` + * + * **Initial value**: `none` + */ + msFlowFrom?: Property.MsFlowFrom | undefined; + /** + * The **`-ms-flow-into`** CSS property is a Microsoft extension that gets or sets a value identifying an iframe container in the document that serves as the region's data source. + * + * **Syntax**: `[ none | <custom-ident> ]#` + * + * **Initial value**: `none` + */ + msFlowInto?: Property.MsFlowInto | undefined; + /** + * The **`grid-template-columns`** CSS property defines the line names and track sizing functions of the grid columns. + * + * **Syntax**: `none | <track-list> | <auto-track-list>` + * + * **Initial value**: `none` + */ + msGridColumns?: Property.MsGridColumns<TLength> | undefined; + /** + * The **`grid-template-rows`** CSS property defines the line names and track sizing functions of the grid rows. + * + * **Syntax**: `none | <track-list> | <auto-track-list>` + * + * **Initial value**: `none` + */ + msGridRows?: Property.MsGridRows<TLength> | undefined; + /** + * The **`-ms-high-contrast-adjust`** CSS property is a Microsoft extension that gets or sets a value indicating whether to override any CSS properties that would have been set in high contrast mode. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + */ + msHighContrastAdjust?: Property.MsHighContrastAdjust | undefined; + /** + * The **`-ms-hyphenate-limit-chars`** CSS property is a Microsoft extension that specifies one to three values indicating the minimum number of characters in a hyphenated word. If the word does not meet the required minimum number of characters in the word, before the hyphen, or after the hyphen, then the word is not hyphenated. + * + * **Syntax**: `auto | <integer>{1,3}` + * + * **Initial value**: `auto` + */ + msHyphenateLimitChars?: Property.MsHyphenateLimitChars | undefined; + /** + * The **`-ms-hyphenate-limit-lines`** CSS property is a Microsoft extension specifying the maximum number of consecutive lines in an element that may be ended with a hyphenated word. + * + * **Syntax**: `no-limit | <integer>` + * + * **Initial value**: `no-limit` + */ + msHyphenateLimitLines?: Property.MsHyphenateLimitLines | undefined; + /** + * The `**-ms-hyphenate-limit-zone**` CSS property is a Microsoft extension specifying the width of the hyphenation zone. + * + * **Syntax**: `<percentage> | <length>` + * + * **Initial value**: `0` + */ + msHyphenateLimitZone?: Property.MsHyphenateLimitZone<TLength> | undefined; + /** + * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. + * + * **Syntax**: `none | manual | auto` + * + * **Initial value**: `manual` + */ + msHyphens?: Property.Hyphens | undefined; + /** + * The **`-ms-ime-align`** CSS property is a Microsoft extension aligning the Input Method Editor (IME) candidate window box relative to the element on which the IME composition is active. The extension is implemented in Microsoft Edge and Internet Explorer 11. + * + * **Syntax**: `auto | after` + * + * **Initial value**: `auto` + */ + msImeAlign?: Property.MsImeAlign | undefined; + /** + * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. + * + * **Syntax**: `auto | loose | normal | strict | anywhere` + * + * **Initial value**: `auto` + */ + msLineBreak?: Property.LineBreak | undefined; + /** + * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `0` + */ + msOrder?: Property.Order | undefined; + /** + * The **`-ms-overflow-style`** CSS property is a Microsoft extension controlling the behavior of scrollbars when the content of an element overflows. + * + * **Syntax**: `auto | none | scrollbar | -ms-autohiding-scrollbar` + * + * **Initial value**: `auto` + */ + msOverflowStyle?: Property.MsOverflowStyle | undefined; + /** + * The **`overflow-x`** CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content. + * + * **Syntax**: `visible | hidden | clip | scroll | auto` + * + * **Initial value**: `visible` + */ + msOverflowX?: Property.OverflowX | undefined; + /** + * The **`overflow-y`** CSS property sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content. + * + * **Syntax**: `visible | hidden | clip | scroll | auto` + * + * **Initial value**: `visible` + */ + msOverflowY?: Property.OverflowY | undefined; + /** + * The `**-ms-scroll-chaining**` CSS property is a Microsoft extension that specifies the scrolling behavior that occurs when a user hits the scroll limit during a manipulation. + * + * **Syntax**: `chained | none` + * + * **Initial value**: `chained` + */ + msScrollChaining?: Property.MsScrollChaining | undefined; + /** + * The `**-ms-scroll-limit-x-max**` CSS property is a Microsoft extension that specifies the maximum value for the `Element.scrollLeft` property. + * + * **Syntax**: `auto | <length>` + * + * **Initial value**: `auto` + */ + msScrollLimitXMax?: Property.MsScrollLimitXMax<TLength> | undefined; + /** + * The **`-ms-scroll-limit-x-min`** CSS property is a Microsoft extension that specifies the minimum value for the `Element.scrollLeft` property. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + */ + msScrollLimitXMin?: Property.MsScrollLimitXMin<TLength> | undefined; + /** + * The **`-ms-scroll-limit-y-max`** CSS property is a Microsoft extension that specifies the maximum value for the `Element.scrollTop` property. + * + * **Syntax**: `auto | <length>` + * + * **Initial value**: `auto` + */ + msScrollLimitYMax?: Property.MsScrollLimitYMax<TLength> | undefined; + /** + * The **`-ms-scroll-limit-y-min`** CSS property is a Microsoft extension that specifies the minimum value for the `Element.scrollTop` property. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + */ + msScrollLimitYMin?: Property.MsScrollLimitYMin<TLength> | undefined; + /** + * The **`-ms-scroll-rails`** CSS property is a Microsoft extension that specifies whether scrolling locks to the primary axis of motion. + * + * **Syntax**: `none | railed` + * + * **Initial value**: `railed` + */ + msScrollRails?: Property.MsScrollRails | undefined; + /** + * The **`-ms-scroll-snap-points-x`** CSS property is a Microsoft extension that specifies where snap-points will be located along the x-axis. + * + * **Syntax**: `snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )` + * + * **Initial value**: `snapInterval(0px, 100%)` + */ + msScrollSnapPointsX?: Property.MsScrollSnapPointsX | undefined; + /** + * The **`-ms-scroll-snap-points-y`** CSS property is a Microsoft extension that specifies where snap-points will be located along the y-axis. + * + * **Syntax**: `snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )` + * + * **Initial value**: `snapInterval(0px, 100%)` + */ + msScrollSnapPointsY?: Property.MsScrollSnapPointsY | undefined; + /** + * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. + * + * **Syntax**: `none | proximity | mandatory` + * + * **Initial value**: `none` + */ + msScrollSnapType?: Property.MsScrollSnapType | undefined; + /** + * The **`-ms-scroll-translation`** CSS property is a Microsoft extension that specifies whether vertical-to-horizontal scroll wheel translation occurs on the specified element. + * + * **Syntax**: `none | vertical-to-horizontal` + * + * **Initial value**: `none` + */ + msScrollTranslation?: Property.MsScrollTranslation | undefined; + /** + * The **`-ms-scrollbar-3dlight-color`** CSS property is a Microsoft extension specifying the color of the top and left edges of the scroll box and scroll arrows of a scroll bar. + * + * **Syntax**: `<color>` + * + * **Initial value**: depends on user agent + */ + msScrollbar3dlightColor?: Property.MsScrollbar3dlightColor | undefined; + /** + * The **`-ms-scrollbar-arrow-color`** CSS property is a Microsoft extension that specifies the color of the arrow elements of a scroll arrow. + * + * **Syntax**: `<color>` + * + * **Initial value**: `ButtonText` + */ + msScrollbarArrowColor?: Property.MsScrollbarArrowColor | undefined; + /** + * The `**-ms-scrollbar-base-color**` CSS property is a Microsoft extension that specifies the base color of the main elements of a scroll bar. + * + * **Syntax**: `<color>` + * + * **Initial value**: depends on user agent + */ + msScrollbarBaseColor?: Property.MsScrollbarBaseColor | undefined; + /** + * The **`-ms-scrollbar-darkshadow-color`** CSS property is a Microsoft extension that specifies the color of a scroll bar's gutter. + * + * **Syntax**: `<color>` + * + * **Initial value**: `ThreeDDarkShadow` + */ + msScrollbarDarkshadowColor?: Property.MsScrollbarDarkshadowColor | undefined; + /** + * The `**-ms-scrollbar-face-color**` CSS property is a Microsoft extension that specifies the color of the scroll box and scroll arrows of a scroll bar. + * + * **Syntax**: `<color>` + * + * **Initial value**: `ThreeDFace` + */ + msScrollbarFaceColor?: Property.MsScrollbarFaceColor | undefined; + /** + * The `**-ms-scrollbar-highlight-color**` CSS property is a Microsoft extension that specifies the color of the slider tray, the top and left edges of the scroll box, and the scroll arrows of a scroll bar. + * + * **Syntax**: `<color>` + * + * **Initial value**: `ThreeDHighlight` + */ + msScrollbarHighlightColor?: Property.MsScrollbarHighlightColor | undefined; + /** + * The **`-ms-scrollbar-shadow-color`** CSS property is a Microsoft extension that specifies the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar. + * + * **Syntax**: `<color>` + * + * **Initial value**: `ThreeDDarkShadow` + */ + msScrollbarShadowColor?: Property.MsScrollbarShadowColor | undefined; + /** + * The **`-ms-scrollbar-track-color`** CSS property is a Microsoft extension that specifies the color of the track element of a scrollbar. + * + * **Syntax**: `<color>` + * + * **Initial value**: `Scrollbar` + */ + msScrollbarTrackColor?: Property.MsScrollbarTrackColor | undefined; + /** + * The **`-ms-text-autospace`** CSS property is a Microsoft extension that specifies the autospacing and narrow space width adjustment of text. + * + * **Syntax**: `none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space` + * + * **Initial value**: `none` + */ + msTextAutospace?: Property.MsTextAutospace | undefined; + /** + * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. + * + * **Syntax**: `none | all | [ digits <integer>? ]` + * + * **Initial value**: `none` + */ + msTextCombineHorizontal?: Property.TextCombineUpright | undefined; + /** + * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. + * + * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` + * + * **Initial value**: `clip` + */ + msTextOverflow?: Property.TextOverflow | undefined; + /** + * The **`touch-action`** CSS property sets how an element's region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). + * + * **Syntax**: `auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation` + * + * **Initial value**: `auto` + */ + msTouchAction?: Property.TouchAction | undefined; + /** + * The **`-ms-touch-select`** CSS property is a Microsoft extension that toggles the gripper visual elements that enable touch text selection. + * + * **Syntax**: `grippers | none` + * + * **Initial value**: `grippers` + */ + msTouchSelect?: Property.MsTouchSelect | undefined; + /** + * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. + * + * **Syntax**: `none | <transform-list>` + * + * **Initial value**: `none` + */ + msTransform?: Property.Transform | undefined; + /** + * The **`transform-origin`** CSS property sets the origin for an element's transformations. + * + * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` + * + * **Initial value**: `50% 50% 0` + */ + msTransformOrigin?: Property.TransformOrigin<TLength> | undefined; + /** + * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + */ + msTransitionDelay?: Property.TransitionDelay<TTime> | undefined; + /** + * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + */ + msTransitionDuration?: Property.TransitionDuration<TTime> | undefined; + /** + * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. + * + * **Syntax**: `none | <single-transition-property>#` + * + * **Initial value**: all + */ + msTransitionProperty?: Property.TransitionProperty | undefined; + /** + * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + */ + msTransitionTimingFunction?: Property.TransitionTimingFunction | undefined; + /** + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. + * + * **Syntax**: `none | element | text` + * + * **Initial value**: `text` + */ + msUserSelect?: Property.MsUserSelect | undefined; + /** + * The **`word-break`** CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box. + * + * **Syntax**: `normal | break-all | keep-all | break-word` + * + * **Initial value**: `normal` + */ + msWordBreak?: Property.WordBreak | undefined; + /** + * The **`-ms-wrap-flow`** CSS property is a Microsoft extension that specifies how exclusions impact inline content within block-level elements. + * + * **Syntax**: `auto | both | start | end | maximum | clear` + * + * **Initial value**: `auto` + */ + msWrapFlow?: Property.MsWrapFlow | undefined; + /** + * The **`-ms-wrap-margin`** CSS property is a Microsoft extension that specifies a margin that offsets the inner wrap shape from other shapes. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + */ + msWrapMargin?: Property.MsWrapMargin<TLength> | undefined; + /** + * The **`-ms-wrap-through`** CSS property is a Microsoft extension that specifies how content should wrap around an exclusion element. + * + * **Syntax**: `wrap | none` + * + * **Initial value**: `wrap` + */ + msWrapThrough?: Property.MsWrapThrough | undefined; + /** + * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. When set for an entire document, it should be set on the root element (`html` element for HTML documents). + * + * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` + * + * **Initial value**: `horizontal-tb` + */ + msWritingMode?: Property.WritingMode | undefined; + /** + * The CSS **`align-content`** property sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis. + * + * **Syntax**: `normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>` + * + * **Initial value**: `normal` + */ + WebkitAlignContent?: Property.AlignContent | undefined; + /** + * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. In Flexbox, it controls the alignment of items on the Cross Axis. In Grid Layout, it controls the alignment of items on the Block Axis within their grid area. + * + * **Syntax**: `normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]` + * + * **Initial value**: `normal` + */ + WebkitAlignItems?: Property.AlignItems | undefined; + /** + * The **`align-self`** CSS property overrides a grid or flex item's `align-items` value. In Grid, it aligns the item inside the grid area. In Flexbox, it aligns the item on the cross axis. + * + * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>` + * + * **Initial value**: `auto` + */ + WebkitAlignSelf?: Property.AlignSelf | undefined; + /** + * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + */ + WebkitAnimationDelay?: Property.AnimationDelay<TTime> | undefined; + /** + * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. + * + * **Syntax**: `<single-animation-direction>#` + * + * **Initial value**: `normal` + */ + WebkitAnimationDirection?: Property.AnimationDirection | undefined; + /** + * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + */ + WebkitAnimationDuration?: Property.AnimationDuration<TTime> | undefined; + /** + * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. + * + * **Syntax**: `<single-animation-fill-mode>#` + * + * **Initial value**: `none` + */ + WebkitAnimationFillMode?: Property.AnimationFillMode | undefined; + /** + * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. + * + * **Syntax**: `<single-animation-iteration-count>#` + * + * **Initial value**: `1` + */ + WebkitAnimationIterationCount?: Property.AnimationIterationCount | undefined; + /** + * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. + * + * **Syntax**: `[ none | <keyframes-name> ]#` + * + * **Initial value**: `none` + */ + WebkitAnimationName?: Property.AnimationName | undefined; + /** + * The **`animation-play-state`** CSS property sets whether an animation is running or paused. + * + * **Syntax**: `<single-animation-play-state>#` + * + * **Initial value**: `running` + */ + WebkitAnimationPlayState?: Property.AnimationPlayState | undefined; + /** + * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + */ + WebkitAnimationTimingFunction?: Property.AnimationTimingFunction | undefined; + /** + * The **`appearance`** CSS property is used to control native appearance of UI controls, that are based on operating system's theme. + * + * **Syntax**: `none | button | button-bevel | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button` + * + * **Initial value**: `none` (but this value is overridden in the user agent CSS) + */ + WebkitAppearance?: Property.WebkitAppearance | undefined; + /** + * The **`backdrop-filter`** CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything _behind_ the element, to see the effect you must make the element or its background at least partially transparent. + * + * **Syntax**: `none | <filter-function-list>` + * + * **Initial value**: `none` + */ + WebkitBackdropFilter?: Property.BackdropFilter | undefined; + /** + * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. + * + * **Syntax**: `visible | hidden` + * + * **Initial value**: `visible` + */ + WebkitBackfaceVisibility?: Property.BackfaceVisibility | undefined; + /** + * The **`background-clip`** CSS property sets whether an element's background extends underneath its border box, padding box, or content box. + * + * **Syntax**: `<box>#` + * + * **Initial value**: `border-box` + */ + WebkitBackgroundClip?: Property.BackgroundClip | undefined; + /** + * The **`background-origin`** CSS property sets the background's origin: from the border start, inside the border, or inside the padding. + * + * **Syntax**: `<box>#` + * + * **Initial value**: `padding-box` + */ + WebkitBackgroundOrigin?: Property.BackgroundOrigin | undefined; + /** + * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. + * + * **Syntax**: `<bg-size>#` + * + * **Initial value**: `auto auto` + */ + WebkitBackgroundSize?: Property.BackgroundSize<TLength> | undefined; + /** + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + */ + WebkitBorderBeforeColor?: Property.WebkitBorderBeforeColor | undefined; + /** + * **Syntax**: `<'border-style'>` + * + * **Initial value**: `none` + */ + WebkitBorderBeforeStyle?: Property.WebkitBorderBeforeStyle | undefined; + /** + * **Syntax**: `<'border-width'>` + * + * **Initial value**: `medium` + */ + WebkitBorderBeforeWidth?: Property.WebkitBorderBeforeWidth<TLength> | undefined; + /** + * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + */ + WebkitBorderBottomLeftRadius?: Property.BorderBottomLeftRadius<TLength> | undefined; + /** + * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + */ + WebkitBorderBottomRightRadius?: Property.BorderBottomRightRadius<TLength> | undefined; + /** + * The **`border-image-slice`** CSS property divides the image specified by `border-image-source` into regions. These regions form the components of an element's border image. + * + * **Syntax**: `<number-percentage>{1,4} && fill?` + * + * **Initial value**: `100%` + */ + WebkitBorderImageSlice?: Property.BorderImageSlice | undefined; + /** + * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + */ + WebkitBorderTopLeftRadius?: Property.BorderTopLeftRadius<TLength> | undefined; + /** + * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + */ + WebkitBorderTopRightRadius?: Property.BorderTopRightRadius<TLength> | undefined; + /** + * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. + * + * **Syntax**: `slice | clone` + * + * **Initial value**: `slice` + */ + WebkitBoxDecorationBreak?: Property.BoxDecorationBreak | undefined; + /** + * The **`-webkit-box-reflect`** CSS property lets you reflect the content of an element in one specific direction. + * + * **Syntax**: `[ above | below | right | left ]? <length>? <image>?` + * + * **Initial value**: `none` + */ + WebkitBoxReflect?: Property.WebkitBoxReflect<TLength> | undefined; + /** + * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. + * + * **Syntax**: `none | <shadow>#` + * + * **Initial value**: `none` + */ + WebkitBoxShadow?: Property.BoxShadow | undefined; + /** + * The **`box-sizing`** CSS property sets how the total width and height of an element is calculated. + * + * **Syntax**: `content-box | border-box` + * + * **Initial value**: `content-box` + */ + WebkitBoxSizing?: Property.BoxSizing | undefined; + /** + * The **`clip-path`** CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. + * + * **Syntax**: `<clip-source> | [ <basic-shape> || <geometry-box> ] | none` + * + * **Initial value**: `none` + */ + WebkitClipPath?: Property.ClipPath | undefined; + /** + * The **`column-count`** CSS property breaks an element's content into the specified number of columns. + * + * **Syntax**: `<integer> | auto` + * + * **Initial value**: `auto` + */ + WebkitColumnCount?: Property.ColumnCount | undefined; + /** + * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. + * + * **Syntax**: `auto | balance | balance-all` + * + * **Initial value**: `balance` + */ + WebkitColumnFill?: Property.ColumnFill | undefined; + /** + * The **`column-rule-color`** CSS property sets the color of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + */ + WebkitColumnRuleColor?: Property.ColumnRuleColor | undefined; + /** + * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<'border-style'>` + * + * **Initial value**: `none` + */ + WebkitColumnRuleStyle?: Property.ColumnRuleStyle | undefined; + /** + * The **`column-rule-width`** CSS property sets the width of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<'border-width'>` + * + * **Initial value**: `medium` + */ + WebkitColumnRuleWidth?: Property.ColumnRuleWidth<TLength> | undefined; + /** + * The **`column-span`** CSS property makes it possible for an element to span across all columns when its value is set to `all`. + * + * **Syntax**: `none | all` + * + * **Initial value**: `none` + */ + WebkitColumnSpan?: Property.ColumnSpan | undefined; + /** + * The **`column-width`** CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. + * + * **Syntax**: `<length> | auto` + * + * **Initial value**: `auto` + */ + WebkitColumnWidth?: Property.ColumnWidth<TLength> | undefined; + /** + * The **`filter`** CSS property applies graphical effects like blur or color shift to an element. Filters are commonly used to adjust the rendering of images, backgrounds, and borders. + * + * **Syntax**: `none | <filter-function-list>` + * + * **Initial value**: `none` + */ + WebkitFilter?: Property.Filter | undefined; + /** + * The **`flex-basis`** CSS property sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with `box-sizing`. + * + * **Syntax**: `content | <'width'>` + * + * **Initial value**: `auto` + */ + WebkitFlexBasis?: Property.FlexBasis<TLength> | undefined; + /** + * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). + * + * **Syntax**: `row | row-reverse | column | column-reverse` + * + * **Initial value**: `row` + */ + WebkitFlexDirection?: Property.FlexDirection | undefined; + /** + * The **`flex-grow`** CSS property sets the flex grow factor of a flex item's main size. + * + * **Syntax**: `<number>` + * + * **Initial value**: `0` + */ + WebkitFlexGrow?: Property.FlexGrow | undefined; + /** + * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. + * + * **Syntax**: `<number>` + * + * **Initial value**: `1` + */ + WebkitFlexShrink?: Property.FlexShrink | undefined; + /** + * The **`flex-wrap`** CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. + * + * **Syntax**: `nowrap | wrap | wrap-reverse` + * + * **Initial value**: `nowrap` + */ + WebkitFlexWrap?: Property.FlexWrap | undefined; + /** + * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. + * + * **Syntax**: `normal | <feature-tag-value>#` + * + * **Initial value**: `normal` + */ + WebkitFontFeatureSettings?: Property.FontFeatureSettings | undefined; + /** + * The **`font-kerning`** CSS property sets the use of the kerning information stored in a font. + * + * **Syntax**: `auto | normal | none` + * + * **Initial value**: `auto` + */ + WebkitFontKerning?: Property.FontKerning | undefined; + /** + * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. + * + * **Syntax**: `auto | never | always | <absolute-size> | <length>` + * + * **Initial value**: `auto` + */ + WebkitFontSmoothing?: Property.FontSmooth<TLength> | undefined; + /** + * The **`font-variant-ligatures`** CSS property controls which ligatures and contextual forms are used in textual content of the elements it applies to. This leads to more harmonized forms in the resulting text. + * + * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]` + * + * **Initial value**: `normal` + */ + WebkitFontVariantLigatures?: Property.FontVariantLigatures | undefined; + /** + * The **`hyphenate-character`** CSS property sets the character (or string) used at the end of a line before a hyphenation break. + * + * **Syntax**: `auto | <string>` + * + * **Initial value**: `auto` + */ + WebkitHyphenateCharacter?: Property.HyphenateCharacter | undefined; + /** + * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. + * + * **Syntax**: `none | manual | auto` + * + * **Initial value**: `manual` + */ + WebkitHyphens?: Property.Hyphens | undefined; + /** + * The `initial-letter` CSS property sets styling for dropped, raised, and sunken initial letters. + * + * **Syntax**: `normal | [ <number> <integer>? ]` + * + * **Initial value**: `normal` + */ + WebkitInitialLetter?: Property.InitialLetter | undefined; + /** + * The CSS **`justify-content`** property defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container. + * + * **Syntax**: `normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]` + * + * **Initial value**: `normal` + */ + WebkitJustifyContent?: Property.JustifyContent | undefined; + /** + * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. + * + * **Syntax**: `auto | loose | normal | strict | anywhere` + * + * **Initial value**: `auto` + */ + WebkitLineBreak?: Property.LineBreak | undefined; + /** + * The **`-webkit-line-clamp`** CSS property allows limiting of the contents of a block to the specified number of lines. + * + * **Syntax**: `none | <integer>` + * + * **Initial value**: `none` + */ + WebkitLineClamp?: Property.WebkitLineClamp | undefined; + /** + * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'margin-left'>` + * + * **Initial value**: `0` + */ + WebkitMarginEnd?: Property.MarginInlineEnd<TLength> | undefined; + /** + * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'margin-left'>` + * + * **Initial value**: `0` + */ + WebkitMarginStart?: Property.MarginInlineStart<TLength> | undefined; + /** + * If a `mask-image` is specified, `-webkit-mask-attachment` determines whether the mask image's position is fixed within the viewport, or scrolls along with its containing block. + * + * **Syntax**: `<attachment>#` + * + * **Initial value**: `scroll` + */ + WebkitMaskAttachment?: Property.WebkitMaskAttachment | undefined; + /** + * The **`mask-border-outset`** CSS property specifies the distance by which an element's mask border is set out from its border box. + * + * **Syntax**: `[ <length> | <number> ]{1,4}` + * + * **Initial value**: `0` + */ + WebkitMaskBoxImageOutset?: Property.MaskBorderOutset<TLength> | undefined; + /** + * The **`mask-border-repeat`** CSS property sets how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border. + * + * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` + * + * **Initial value**: `stretch` + */ + WebkitMaskBoxImageRepeat?: Property.MaskBorderRepeat | undefined; + /** + * The **`mask-border-slice`** CSS property divides the image set by `mask-border-source` into regions. These regions are used to form the components of an element's mask border. + * + * **Syntax**: `<number-percentage>{1,4} fill?` + * + * **Initial value**: `0` + */ + WebkitMaskBoxImageSlice?: Property.MaskBorderSlice | undefined; + /** + * The **`mask-border-source`** CSS property sets the source image used to create an element's mask border. + * + * **Syntax**: `none | <image>` + * + * **Initial value**: `none` + */ + WebkitMaskBoxImageSource?: Property.MaskBorderSource | undefined; + /** + * The **`mask-border-width`** CSS property sets the width of an element's mask border. + * + * **Syntax**: `[ <length-percentage> | <number> | auto ]{1,4}` + * + * **Initial value**: `auto` + */ + WebkitMaskBoxImageWidth?: Property.MaskBorderWidth<TLength> | undefined; + /** + * The **`mask-clip`** CSS property determines the area which is affected by a mask. The painted content of an element must be restricted to this area. + * + * **Syntax**: `[ <box> | border | padding | content | text ]#` + * + * **Initial value**: `border` + */ + WebkitMaskClip?: Property.WebkitMaskClip | undefined; + /** + * The **`-webkit-mask-composite`** property specifies the manner in which multiple mask images applied to the same element are composited with one another. Mask images are composited in the opposite order that they are declared with the `-webkit-mask-image` property. + * + * **Syntax**: `<composite-style>#` + * + * **Initial value**: `source-over` + */ + WebkitMaskComposite?: Property.WebkitMaskComposite | undefined; + /** + * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. By default this means the alpha channel of the mask image will be multiplied with the alpha channel of the element. This can be controlled with the `mask-mode` property. + * + * **Syntax**: `<mask-reference>#` + * + * **Initial value**: `none` + */ + WebkitMaskImage?: Property.WebkitMaskImage | undefined; + /** + * The **`mask-origin`** CSS property sets the origin of a mask. + * + * **Syntax**: `[ <box> | border | padding | content ]#` + * + * **Initial value**: `padding` + */ + WebkitMaskOrigin?: Property.WebkitMaskOrigin | undefined; + /** + * The **`mask-position`** CSS property sets the initial position, relative to the mask position layer set by `mask-origin`, for each defined mask image. + * + * **Syntax**: `<position>#` + * + * **Initial value**: `0% 0%` + */ + WebkitMaskPosition?: Property.WebkitMaskPosition<TLength> | undefined; + /** + * The `-webkit-mask-position-x` CSS property sets the initial horizontal position of a mask image. + * + * **Syntax**: `[ <length-percentage> | left | center | right ]#` + * + * **Initial value**: `0%` + */ + WebkitMaskPositionX?: Property.WebkitMaskPositionX<TLength> | undefined; + /** + * The `-webkit-mask-position-y` CSS property sets the initial vertical position of a mask image. + * + * **Syntax**: `[ <length-percentage> | top | center | bottom ]#` + * + * **Initial value**: `0%` + */ + WebkitMaskPositionY?: Property.WebkitMaskPositionY<TLength> | undefined; + /** + * The **`mask-repeat`** CSS property sets how mask images are repeated. A mask image can be repeated along the horizontal axis, the vertical axis, both axes, or not repeated at all. + * + * **Syntax**: `<repeat-style>#` + * + * **Initial value**: `repeat` + */ + WebkitMaskRepeat?: Property.WebkitMaskRepeat | undefined; + /** + * The `-webkit-mask-repeat-x` property specifies whether and how a mask image is repeated (tiled) horizontally. + * + * **Syntax**: `repeat | no-repeat | space | round` + * + * **Initial value**: `repeat` + */ + WebkitMaskRepeatX?: Property.WebkitMaskRepeatX | undefined; + /** + * The `-webkit-mask-repeat-y` property sets whether and how a mask image is repeated (tiled) vertically. + * + * **Syntax**: `repeat | no-repeat | space | round` + * + * **Initial value**: `repeat` + */ + WebkitMaskRepeatY?: Property.WebkitMaskRepeatY | undefined; + /** + * The **`mask-size`** CSS property specifies the sizes of the mask images. The size of the image can be fully or partially constrained in order to preserve its intrinsic ratio. + * + * **Syntax**: `<bg-size>#` + * + * **Initial value**: `auto auto` + */ + WebkitMaskSize?: Property.WebkitMaskSize<TLength> | undefined; + /** + * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block, depending on its writing mode. It corresponds to either the `max-width` or the `max-height` property, depending on the value of `writing-mode`. + * + * **Syntax**: `<'max-width'>` + * + * **Initial value**: `none` + */ + WebkitMaxInlineSize?: Property.MaxInlineSize<TLength> | undefined; + /** + * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `0` + */ + WebkitOrder?: Property.Order | undefined; + /** + * The `-webkit-overflow-scrolling` CSS property controls whether or not touch devices use momentum-based scrolling for a given element. + * + * **Syntax**: `auto | touch` + * + * **Initial value**: `auto` + */ + WebkitOverflowScrolling?: Property.WebkitOverflowScrolling | undefined; + /** + * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>` + * + * **Initial value**: `0` + */ + WebkitPaddingEnd?: Property.PaddingInlineEnd<TLength> | undefined; + /** + * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>` + * + * **Initial value**: `0` + */ + WebkitPaddingStart?: Property.PaddingInlineStart<TLength> | undefined; + /** + * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. + * + * **Syntax**: `none | <length>` + * + * **Initial value**: `none` + */ + WebkitPerspective?: Property.Perspective<TLength> | undefined; + /** + * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. + * + * **Syntax**: `<position>` + * + * **Initial value**: `50% 50%` + */ + WebkitPerspectiveOrigin?: Property.PerspectiveOrigin<TLength> | undefined; + /** + * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. + * + * **Syntax**: `economy | exact` + * + * **Initial value**: `economy` + */ + WebkitPrintColorAdjust?: Property.PrintColorAdjust | undefined; + /** + * The **`ruby-position`** CSS property defines the position of a ruby element relatives to its base element. It can be positioned over the element (`over`), under it (`under`), or between the characters on their right side (`inter-character`). + * + * **Syntax**: `[ alternate || [ over | under ] ] | inter-character` + * + * **Initial value**: `alternate` + */ + WebkitRubyPosition?: Property.RubyPosition | undefined; + /** + * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. + * + * **Syntax**: `none | [ x | y | block | inline | both ] [ mandatory | proximity ]?` + * + * **Initial value**: `none` + */ + WebkitScrollSnapType?: Property.ScrollSnapType | undefined; + /** + * The **`shape-margin`** CSS property sets a margin for a CSS shape created using `shape-outside`. + * + * **Syntax**: `<length-percentage>` + * + * **Initial value**: `0` + */ + WebkitShapeMargin?: Property.ShapeMargin<TLength> | undefined; + /** + * **`-webkit-tap-highlight-color`** is a non-standard CSS property that sets the color of the highlight that appears over a link while it's being tapped. The highlighting indicates to the user that their tap is being successfully recognized, and indicates which element they're tapping on. + * + * **Syntax**: `<color>` + * + * **Initial value**: `black` + */ + WebkitTapHighlightColor?: Property.WebkitTapHighlightColor | undefined; + /** + * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. + * + * **Syntax**: `none | all | [ digits <integer>? ]` + * + * **Initial value**: `none` + */ + WebkitTextCombine?: Property.TextCombineUpright | undefined; + /** + * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + */ + WebkitTextDecorationColor?: Property.TextDecorationColor | undefined; + /** + * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. + * + * **Syntax**: `none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error` + * + * **Initial value**: `none` + */ + WebkitTextDecorationLine?: Property.TextDecorationLine | undefined; + /** + * The **`text-decoration-skip`** CSS property sets what parts of an element's content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. + * + * **Syntax**: `none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]` + * + * **Initial value**: `objects` + */ + WebkitTextDecorationSkip?: Property.TextDecorationSkip | undefined; + /** + * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. + * + * **Syntax**: `solid | double | dotted | dashed | wavy` + * + * **Initial value**: `solid` + */ + WebkitTextDecorationStyle?: Property.TextDecorationStyle | undefined; + /** + * The **`text-emphasis-color`** CSS property sets the color of emphasis marks. This value can also be set using the `text-emphasis` shorthand. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + */ + WebkitTextEmphasisColor?: Property.TextEmphasisColor | undefined; + /** + * The **`text-emphasis-position`** CSS property sets where emphasis marks are drawn. Like ruby text, if there isn't enough room for emphasis marks, the line height is increased. + * + * **Syntax**: `[ over | under ] && [ right | left ]` + * + * **Initial value**: `over right` + */ + WebkitTextEmphasisPosition?: Property.TextEmphasisPosition | undefined; + /** + * The **`text-emphasis-style`** CSS property sets the appearance of emphasis marks. It can also be set, and reset, using the `text-emphasis` shorthand. + * + * **Syntax**: `none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>` + * + * **Initial value**: `none` + */ + WebkitTextEmphasisStyle?: Property.TextEmphasisStyle | undefined; + /** + * The **`-webkit-text-fill-color`** CSS property specifies the fill color of characters of text. If this property is not set, the value of the `color` property is used. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + */ + WebkitTextFillColor?: Property.WebkitTextFillColor | undefined; + /** + * The **`text-orientation`** CSS property sets the orientation of the text characters in a line. It only affects text in vertical mode (when `writing-mode` is not `horizontal-tb`). It is useful for controlling the display of languages that use vertical script, and also for making vertical table headers. + * + * **Syntax**: `mixed | upright | sideways` + * + * **Initial value**: `mixed` + */ + WebkitTextOrientation?: Property.TextOrientation | undefined; + /** + * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. + * + * **Syntax**: `none | auto | <percentage>` + * + * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). + */ + WebkitTextSizeAdjust?: Property.TextSizeAdjust | undefined; + /** + * The **`-webkit-text-stroke-color`** CSS property specifies the stroke color of characters of text. If this property is not set, the value of the `color` property is used. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + */ + WebkitTextStrokeColor?: Property.WebkitTextStrokeColor | undefined; + /** + * The **`-webkit-text-stroke-width`** CSS property specifies the width of the stroke for text. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + */ + WebkitTextStrokeWidth?: Property.WebkitTextStrokeWidth<TLength> | undefined; + /** + * The **`text-underline-position`** CSS property specifies the position of the underline which is set using the `text-decoration` property's `underline` value. + * + * **Syntax**: `auto | from-font | [ under || [ left | right ] ]` + * + * **Initial value**: `auto` + */ + WebkitTextUnderlinePosition?: Property.TextUnderlinePosition | undefined; + /** + * The `-webkit-touch-callout` CSS property controls the display of the default callout shown when you touch and hold a touch target. + * + * **Syntax**: `default | none` + * + * **Initial value**: `default` + */ + WebkitTouchCallout?: Property.WebkitTouchCallout | undefined; + /** + * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. + * + * **Syntax**: `none | <transform-list>` + * + * **Initial value**: `none` + */ + WebkitTransform?: Property.Transform | undefined; + /** + * The **`transform-origin`** CSS property sets the origin for an element's transformations. + * + * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` + * + * **Initial value**: `50% 50% 0` + */ + WebkitTransformOrigin?: Property.TransformOrigin<TLength> | undefined; + /** + * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. + * + * **Syntax**: `flat | preserve-3d` + * + * **Initial value**: `flat` + */ + WebkitTransformStyle?: Property.TransformStyle | undefined; + /** + * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + */ + WebkitTransitionDelay?: Property.TransitionDelay<TTime> | undefined; + /** + * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + */ + WebkitTransitionDuration?: Property.TransitionDuration<TTime> | undefined; + /** + * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. + * + * **Syntax**: `none | <single-transition-property>#` + * + * **Initial value**: all + */ + WebkitTransitionProperty?: Property.TransitionProperty | undefined; + /** + * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + */ + WebkitTransitionTimingFunction?: Property.TransitionTimingFunction | undefined; + /** + * **Syntax**: `read-only | read-write | read-write-plaintext-only` + * + * **Initial value**: `read-only` + */ + WebkitUserModify?: Property.WebkitUserModify | undefined; + /** + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. + * + * **Syntax**: `auto | text | none | contain | all` + * + * **Initial value**: `auto` + */ + WebkitUserSelect?: Property.UserSelect | undefined; + /** + * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. When set for an entire document, it should be set on the root element (`html` element for HTML documents). + * + * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` + * + * **Initial value**: `horizontal-tb` + */ + WebkitWritingMode?: Property.WritingMode | undefined; +} + +export interface VendorShorthandProperties<TLength = (string & {}) | 0, TTime = string & {}> { + /** + * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. + * + * **Syntax**: `<single-animation>#` + */ + MozAnimation?: Property.Animation<TTime> | undefined; + /** + * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. + * + * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` + */ + MozBorderImage?: Property.BorderImage | undefined; + /** + * The **`column-rule`** shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` + */ + MozColumnRule?: Property.ColumnRule<TLength> | undefined; + /** + * The **`columns`** CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths. + * + * **Syntax**: `<'column-width'> || <'column-count'>` + */ + MozColumns?: Property.Columns<TLength> | undefined; + /** + * In Mozilla applications like Firefox, the **`-moz-outline-radius`** CSS shorthand property can be used to give an element's `outline` rounded corners. + * + * **Syntax**: `<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?` + */ + MozOutlineRadius?: Property.MozOutlineRadius<TLength> | undefined; + /** + * The **`-ms-content-zoom-limit`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-content-zoom-limit-min` and `-ms-content-zoom-limit-max` properties. + * + * **Syntax**: `<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>` + */ + msContentZoomLimit?: Property.MsContentZoomLimit | undefined; + /** + * The **`-ms-content-zoom-snap`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-content-zoom-snap-type` and `-ms-content-zoom-snap-points` properties. + * + * **Syntax**: `<'-ms-content-zoom-snap-type'> || <'-ms-content-zoom-snap-points'>` + */ + msContentZoomSnap?: Property.MsContentZoomSnap | undefined; + /** + * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container. + * + * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` + */ + msFlex?: Property.Flex<TLength> | undefined; + /** + * The **\-ms-scroll-limit** CSS property is a Microsoft extension that specifies values for the `-ms-scroll-limit-x-min`, `-ms-scroll-limit-y-min`, `-ms-scroll-limit-x-max`, and `-ms-scroll-limit-y-max` properties. + * + * **Syntax**: `<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>` + */ + msScrollLimit?: Property.MsScrollLimit | undefined; + /** + * The **`-ms-scroll-snap-x`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-scroll-snap-type` and `-ms-scroll-snap-points-x` properties. + * + * **Syntax**: `<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>` + */ + msScrollSnapX?: Property.MsScrollSnapX | undefined; + /** + * The **`-ms-scroll-snap-x`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-scroll-snap-type` and `-ms-scroll-snap-points-y` properties. + * + * **Syntax**: `<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>` + */ + msScrollSnapY?: Property.MsScrollSnapY | undefined; + /** + * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. + * + * **Syntax**: `<single-transition>#` + */ + msTransition?: Property.Transition<TTime> | undefined; + /** + * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. + * + * **Syntax**: `<single-animation>#` + */ + WebkitAnimation?: Property.Animation<TTime> | undefined; + /** + * The **`-webkit-border-before`** CSS property is a shorthand property for setting the individual logical block start border property values in a single place in the style sheet. + * + * **Syntax**: `<'border-width'> || <'border-style'> || <color>` + */ + WebkitBorderBefore?: Property.WebkitBorderBefore<TLength> | undefined; + /** + * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. + * + * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` + */ + WebkitBorderImage?: Property.BorderImage | undefined; + /** + * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. + * + * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` + */ + WebkitBorderRadius?: Property.BorderRadius<TLength> | undefined; + /** + * The **`column-rule`** shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` + */ + WebkitColumnRule?: Property.ColumnRule<TLength> | undefined; + /** + * The **`columns`** CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths. + * + * **Syntax**: `<'column-width'> || <'column-count'>` + */ + WebkitColumns?: Property.Columns<TLength> | undefined; + /** + * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container. + * + * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` + */ + WebkitFlex?: Property.Flex<TLength> | undefined; + /** + * The **`flex-flow`** CSS shorthand property specifies the direction of a flex container, as well as its wrapping behavior. + * + * **Syntax**: `<'flex-direction'> || <'flex-wrap'>` + */ + WebkitFlexFlow?: Property.FlexFlow | undefined; + /** + * The **`mask`** CSS shorthand property hides an element (partially or fully) by masking or clipping the image at specific points. + * + * **Syntax**: `[ <mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || [ <box> | border | padding | content | text ] || [ <box> | border | padding | content ] ]#` + */ + WebkitMask?: Property.WebkitMask<TLength> | undefined; + /** + * The **`mask-border`** CSS shorthand property lets you create a mask along the edge of an element's border. + * + * **Syntax**: `<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>` + */ + WebkitMaskBoxImage?: Property.MaskBorder | undefined; + /** + * The **`text-emphasis`** CSS property applies emphasis marks to text (except spaces and control characters). It is a shorthand for `text-emphasis-style` and `text-emphasis-color`. + * + * **Syntax**: `<'text-emphasis-style'> || <'text-emphasis-color'>` + */ + WebkitTextEmphasis?: Property.TextEmphasis | undefined; + /** + * The **`-webkit-text-stroke`** CSS property specifies the width and color of strokes for text characters. This is a shorthand property for the longhand properties `-webkit-text-stroke-width` and `-webkit-text-stroke-color`. + * + * **Syntax**: `<length> || <color>` + */ + WebkitTextStroke?: Property.WebkitTextStroke<TLength> | undefined; + /** + * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. + * + * **Syntax**: `<single-transition>#` + */ + WebkitTransition?: Property.Transition<TTime> | undefined; +} + +export interface VendorProperties<TLength = (string & {}) | 0, TTime = string & {}> extends VendorLonghandProperties<TLength, TTime>, VendorShorthandProperties<TLength, TTime> {} + +export interface ObsoleteProperties<TLength = (string & {}) | 0, TTime = string & {}> { + /** + * In combination with `elevation`, the **`azimuth`** CSS property enables different audio sources to be positioned spatially for aural presentation. This is important in that it provides a natural way to tell several voices apart, as each can be positioned to originate at a different location on the sound stage. Stereo output produce a lateral sound stage, while binaural headphones and multi-speaker setups allow for a fully three-dimensional stage. + * + * **Syntax**: `<angle> | [ [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards` + * + * **Initial value**: `center` + * + * @deprecated + */ + azimuth?: Property.Azimuth | undefined; + /** + * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. + * + * **Syntax**: `start | center | end | baseline | stretch` + * + * **Initial value**: `stretch` + * + * @deprecated + */ + boxAlign?: Property.BoxAlign | undefined; + /** + * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). + * + * **Syntax**: `normal | reverse | inherit` + * + * **Initial value**: `normal` + * + * @deprecated + */ + boxDirection?: Property.BoxDirection | undefined; + /** + * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. + * + * **Syntax**: `<number>` + * + * **Initial value**: `0` + * + * @deprecated + */ + boxFlex?: Property.BoxFlex | undefined; + /** + * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `1` + * + * @deprecated + */ + boxFlexGroup?: Property.BoxFlexGroup | undefined; + /** + * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). + * + * **Syntax**: `single | multiple` + * + * **Initial value**: `single` + * + * @deprecated + */ + boxLines?: Property.BoxLines | undefined; + /** + * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `1` + * + * @deprecated + */ + boxOrdinalGroup?: Property.BoxOrdinalGroup | undefined; + /** + * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. + * + * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` + * + * **Initial value**: `inline-axis` (`horizontal` in XUL) + * + * @deprecated + */ + boxOrient?: Property.BoxOrient | undefined; + /** + * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. + * + * **Syntax**: `start | center | end | justify` + * + * **Initial value**: `start` + * + * @deprecated + */ + boxPack?: Property.BoxPack | undefined; + /** + * The **`clip`** CSS property defines a visible portion of an element. The `clip` property applies only to absolutely positioned elements — that is, elements with `position:absolute` or `position:fixed`. + * + * **Syntax**: `<shape> | auto` + * + * **Initial value**: `auto` + * + * @deprecated + */ + clip?: Property.Clip | undefined; + /** + * The **`column-gap`** CSS property sets the size of the gap (gutter) between an element's columns. + * + * **Syntax**: `<length-percentage>` + * + * **Initial value**: `0` + * + * @deprecated + */ + gridColumnGap?: Property.GridColumnGap<TLength> | undefined; + /** + * The **`gap`** CSS property sets the gaps (gutters) between rows and columns. It is a shorthand for `row-gap` and `column-gap`. + * + * **Syntax**: `<'grid-row-gap'> <'grid-column-gap'>?` + * + * @deprecated + */ + gridGap?: Property.GridGap<TLength> | undefined; + /** + * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's rows. + * + * **Syntax**: `<length-percentage>` + * + * **Initial value**: `0` + * + * @deprecated + */ + gridRowGap?: Property.GridRowGap<TLength> | undefined; + /** + * The **`ime-mode`** CSS property controls the state of the input method editor (IME) for text fields. This property is obsolete. + * + * **Syntax**: `auto | normal | active | inactive | disabled` + * + * **Initial value**: `auto` + * + * @deprecated + */ + imeMode?: Property.ImeMode | undefined; + /** + * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>{1,2}` + * + * @deprecated + */ + offsetBlock?: Property.InsetBlock<TLength> | undefined; + /** + * The **`inset-block-end`** CSS property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>` + * + * **Initial value**: `auto` + * + * @deprecated + */ + offsetBlockEnd?: Property.InsetBlockEnd<TLength> | undefined; + /** + * The **`inset-block-start`** CSS property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>` + * + * **Initial value**: `auto` + * + * @deprecated + */ + offsetBlockStart?: Property.InsetBlockStart<TLength> | undefined; + /** + * The **`inset-inline`** CSS property defines the logical start and end offsets of an element in the inline direction, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>{1,2}` + * + * @deprecated + */ + offsetInline?: Property.InsetInline<TLength> | undefined; + /** + * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>` + * + * **Initial value**: `auto` + * + * @deprecated + */ + offsetInlineEnd?: Property.InsetInlineEnd<TLength> | undefined; + /** + * The **`inset-inline-start`** CSS property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>` + * + * **Initial value**: `auto` + * + * @deprecated + */ + offsetInlineStart?: Property.InsetInlineStart<TLength> | undefined; + /** + * The **`scroll-snap-coordinate`** CSS property defines the x and y coordinate positions within an element that will align with its nearest ancestor scroll container's `scroll-snap-destination` for each respective axis. + * + * **Syntax**: `none | <position>#` + * + * **Initial value**: `none` + * + * @deprecated + */ + scrollSnapCoordinate?: Property.ScrollSnapCoordinate<TLength> | undefined; + /** + * The **`scroll-snap-destination`** CSS property defines the position in x and y coordinates within the scroll container's visual viewport which element snap points align with. + * + * **Syntax**: `<position>` + * + * **Initial value**: `0px 0px` + * + * @deprecated + */ + scrollSnapDestination?: Property.ScrollSnapDestination<TLength> | undefined; + /** + * The **`scroll-snap-points-x`** CSS property defines the horizontal positioning of snap points within the content of the scroll container they are applied to. + * + * **Syntax**: `none | repeat( <length-percentage> )` + * + * **Initial value**: `none` + * + * @deprecated + */ + scrollSnapPointsX?: Property.ScrollSnapPointsX | undefined; + /** + * The **`scroll-snap-points-y`** CSS property defines the vertical positioning of snap points within the content of the scroll container they are applied to. + * + * **Syntax**: `none | repeat( <length-percentage> )` + * + * **Initial value**: `none` + * + * @deprecated + */ + scrollSnapPointsY?: Property.ScrollSnapPointsY | undefined; + /** + * The **`scroll-snap-type-x`** CSS property defines how strictly snap points are enforced on the horizontal axis of the scroll container in case there is one. + * + * **Syntax**: `none | mandatory | proximity` + * + * **Initial value**: `none` + * + * @deprecated + */ + scrollSnapTypeX?: Property.ScrollSnapTypeX | undefined; + /** + * The **`scroll-snap-type-y`** CSS property defines how strictly snap points are enforced on the vertical axis of the scroll container in case there is one. + * + * **Syntax**: `none | mandatory | proximity` + * + * **Initial value**: `none` + * + * @deprecated + */ + scrollSnapTypeY?: Property.ScrollSnapTypeY | undefined; + /** + * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. + * + * **Syntax**: `start | center | end | baseline | stretch` + * + * **Initial value**: `stretch` + * + * @deprecated + */ + KhtmlBoxAlign?: Property.BoxAlign | undefined; + /** + * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). + * + * **Syntax**: `normal | reverse | inherit` + * + * **Initial value**: `normal` + * + * @deprecated + */ + KhtmlBoxDirection?: Property.BoxDirection | undefined; + /** + * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. + * + * **Syntax**: `<number>` + * + * **Initial value**: `0` + * + * @deprecated + */ + KhtmlBoxFlex?: Property.BoxFlex | undefined; + /** + * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `1` + * + * @deprecated + */ + KhtmlBoxFlexGroup?: Property.BoxFlexGroup | undefined; + /** + * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). + * + * **Syntax**: `single | multiple` + * + * **Initial value**: `single` + * + * @deprecated + */ + KhtmlBoxLines?: Property.BoxLines | undefined; + /** + * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `1` + * + * @deprecated + */ + KhtmlBoxOrdinalGroup?: Property.BoxOrdinalGroup | undefined; + /** + * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. + * + * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` + * + * **Initial value**: `inline-axis` (`horizontal` in XUL) + * + * @deprecated + */ + KhtmlBoxOrient?: Property.BoxOrient | undefined; + /** + * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. + * + * **Syntax**: `start | center | end | justify` + * + * **Initial value**: `start` + * + * @deprecated + */ + KhtmlBoxPack?: Property.BoxPack | undefined; + /** + * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. + * + * **Syntax**: `auto | loose | normal | strict | anywhere` + * + * **Initial value**: `auto` + * + * @deprecated + */ + KhtmlLineBreak?: Property.LineBreak | undefined; + /** + * The **`opacity`** CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. + * + * **Syntax**: `<alpha-value>` + * + * **Initial value**: `1` + * + * @deprecated + */ + KhtmlOpacity?: Property.Opacity | undefined; + /** + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. + * + * **Syntax**: `auto | text | none | contain | all` + * + * **Initial value**: `auto` + * + * @deprecated + */ + KhtmlUserSelect?: Property.UserSelect | undefined; + /** + * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. + * + * **Syntax**: `visible | hidden` + * + * **Initial value**: `visible` + * + * @deprecated + */ + MozBackfaceVisibility?: Property.BackfaceVisibility | undefined; + /** + * The **`background-clip`** CSS property sets whether an element's background extends underneath its border box, padding box, or content box. + * + * **Syntax**: `<box>#` + * + * **Initial value**: `border-box` + * + * @deprecated + */ + MozBackgroundClip?: Property.BackgroundClip | undefined; + /** + * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. + * + * **Syntax**: `slice | clone` + * + * **Initial value**: `slice` + * + * @deprecated + */ + MozBackgroundInlinePolicy?: Property.BoxDecorationBreak | undefined; + /** + * The **`background-origin`** CSS property sets the background's origin: from the border start, inside the border, or inside the padding. + * + * **Syntax**: `<box>#` + * + * **Initial value**: `padding-box` + * + * @deprecated + */ + MozBackgroundOrigin?: Property.BackgroundOrigin | undefined; + /** + * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. + * + * **Syntax**: `<bg-size>#` + * + * **Initial value**: `auto auto` + * + * @deprecated + */ + MozBackgroundSize?: Property.BackgroundSize<TLength> | undefined; + /** + * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. + * + * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` + * + * @deprecated + */ + MozBorderRadius?: Property.BorderRadius<TLength> | undefined; + /** + * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * @deprecated + */ + MozBorderRadiusBottomleft?: Property.BorderBottomLeftRadius<TLength> | undefined; + /** + * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * @deprecated + */ + MozBorderRadiusBottomright?: Property.BorderBottomRightRadius<TLength> | undefined; + /** + * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * @deprecated + */ + MozBorderRadiusTopleft?: Property.BorderTopLeftRadius<TLength> | undefined; + /** + * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * @deprecated + */ + MozBorderRadiusTopright?: Property.BorderTopRightRadius<TLength> | undefined; + /** + * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. + * + * **Syntax**: `start | center | end | baseline | stretch` + * + * **Initial value**: `stretch` + * + * @deprecated + */ + MozBoxAlign?: Property.BoxAlign | undefined; + /** + * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). + * + * **Syntax**: `normal | reverse | inherit` + * + * **Initial value**: `normal` + * + * @deprecated + */ + MozBoxDirection?: Property.BoxDirection | undefined; + /** + * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. + * + * **Syntax**: `<number>` + * + * **Initial value**: `0` + * + * @deprecated + */ + MozBoxFlex?: Property.BoxFlex | undefined; + /** + * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `1` + * + * @deprecated + */ + MozBoxOrdinalGroup?: Property.BoxOrdinalGroup | undefined; + /** + * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. + * + * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` + * + * **Initial value**: `inline-axis` (`horizontal` in XUL) + * + * @deprecated + */ + MozBoxOrient?: Property.BoxOrient | undefined; + /** + * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. + * + * **Syntax**: `start | center | end | justify` + * + * **Initial value**: `start` + * + * @deprecated + */ + MozBoxPack?: Property.BoxPack | undefined; + /** + * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. + * + * **Syntax**: `none | <shadow>#` + * + * **Initial value**: `none` + * + * @deprecated + */ + MozBoxShadow?: Property.BoxShadow | undefined; + /** + * The non-standard **`-moz-float-edge`** CSS property specifies whether the height and width properties of the element include the margin, border, or padding thickness. + * + * **Syntax**: `border-box | content-box | margin-box | padding-box` + * + * **Initial value**: `content-box` + * + * @deprecated + */ + MozFloatEdge?: Property.MozFloatEdge | undefined; + /** + * The **`-moz-force-broken-image-icon`** extended CSS property can be used to force the broken image icon to be shown even when a broken image has an `alt` attribute. + * + * **Syntax**: `0 | 1` + * + * **Initial value**: `0` + * + * @deprecated + */ + MozForceBrokenImageIcon?: Property.MozForceBrokenImageIcon | undefined; + /** + * The **`opacity`** CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. + * + * **Syntax**: `<alpha-value>` + * + * **Initial value**: `1` + * + * @deprecated + */ + MozOpacity?: Property.Opacity | undefined; + /** + * The **`outline`** CSS shorthand property sets most of the outline properties in a single declaration. + * + * **Syntax**: `[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]` + * + * @deprecated + */ + MozOutline?: Property.Outline<TLength> | undefined; + /** + * The **`outline-color`** CSS property sets the color of an element's outline. + * + * **Syntax**: `<color> | invert` + * + * **Initial value**: `invert`, for browsers supporting it, `currentColor` for the other + * + * @deprecated + */ + MozOutlineColor?: Property.OutlineColor | undefined; + /** + * The **`outline-style`** CSS property sets the style of an element's outline. An outline is a line that is drawn around an element, outside the `border`. + * + * **Syntax**: `auto | <'border-style'>` + * + * **Initial value**: `none` + * + * @deprecated + */ + MozOutlineStyle?: Property.OutlineStyle | undefined; + /** + * The CSS **`outline-width`** property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. + * + * **Syntax**: `<line-width>` + * + * **Initial value**: `medium` + * + * @deprecated + */ + MozOutlineWidth?: Property.OutlineWidth<TLength> | undefined; + /** + * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. + * + * **Syntax**: `none | <length>` + * + * **Initial value**: `none` + * + * @deprecated + */ + MozPerspective?: Property.Perspective<TLength> | undefined; + /** + * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. + * + * **Syntax**: `<position>` + * + * **Initial value**: `50% 50%` + * + * @deprecated + */ + MozPerspectiveOrigin?: Property.PerspectiveOrigin<TLength> | undefined; + /** + * The **`text-align-last`** CSS property sets how the last line of a block or a line, right before a forced line break, is aligned. + * + * **Syntax**: `auto | start | end | left | right | center | justify` + * + * **Initial value**: `auto` + * + * @deprecated + */ + MozTextAlignLast?: Property.TextAlignLast | undefined; + /** + * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + * + * @deprecated + */ + MozTextDecorationColor?: Property.TextDecorationColor | undefined; + /** + * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. + * + * **Syntax**: `none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error` + * + * **Initial value**: `none` + * + * @deprecated + */ + MozTextDecorationLine?: Property.TextDecorationLine | undefined; + /** + * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. + * + * **Syntax**: `solid | double | dotted | dashed | wavy` + * + * **Initial value**: `solid` + * + * @deprecated + */ + MozTextDecorationStyle?: Property.TextDecorationStyle | undefined; + /** + * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. + * + * **Syntax**: `none | <transform-list>` + * + * **Initial value**: `none` + * + * @deprecated + */ + MozTransform?: Property.Transform | undefined; + /** + * The **`transform-origin`** CSS property sets the origin for an element's transformations. + * + * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` + * + * **Initial value**: `50% 50% 0` + * + * @deprecated + */ + MozTransformOrigin?: Property.TransformOrigin<TLength> | undefined; + /** + * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. + * + * **Syntax**: `flat | preserve-3d` + * + * **Initial value**: `flat` + * + * @deprecated + */ + MozTransformStyle?: Property.TransformStyle | undefined; + /** + * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. + * + * **Syntax**: `<single-transition>#` + * + * @deprecated + */ + MozTransition?: Property.Transition<TTime> | undefined; + /** + * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + MozTransitionDelay?: Property.TransitionDelay<TTime> | undefined; + /** + * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + MozTransitionDuration?: Property.TransitionDuration<TTime> | undefined; + /** + * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. + * + * **Syntax**: `none | <single-transition-property>#` + * + * **Initial value**: all + * + * @deprecated + */ + MozTransitionProperty?: Property.TransitionProperty | undefined; + /** + * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + * + * @deprecated + */ + MozTransitionTimingFunction?: Property.TransitionTimingFunction | undefined; + /** + * In Mozilla applications, **`-moz-user-input`** determines if an element will accept user input. + * + * **Syntax**: `auto | none | enabled | disabled` + * + * **Initial value**: `auto` + * + * @deprecated + */ + MozUserInput?: Property.MozUserInput | undefined; + /** + * The **`ime-mode`** CSS property controls the state of the input method editor (IME) for text fields. This property is obsolete. + * + * **Syntax**: `auto | normal | active | inactive | disabled` + * + * **Initial value**: `auto` + * + * @deprecated + */ + msImeMode?: Property.ImeMode | undefined; + /** + * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. + * + * **Syntax**: `<single-animation>#` + * + * @deprecated + */ + OAnimation?: Property.Animation<TTime> | undefined; + /** + * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + OAnimationDelay?: Property.AnimationDelay<TTime> | undefined; + /** + * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. + * + * **Syntax**: `<single-animation-direction>#` + * + * **Initial value**: `normal` + * + * @deprecated + */ + OAnimationDirection?: Property.AnimationDirection | undefined; + /** + * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + OAnimationDuration?: Property.AnimationDuration<TTime> | undefined; + /** + * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. + * + * **Syntax**: `<single-animation-fill-mode>#` + * + * **Initial value**: `none` + * + * @deprecated + */ + OAnimationFillMode?: Property.AnimationFillMode | undefined; + /** + * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. + * + * **Syntax**: `<single-animation-iteration-count>#` + * + * **Initial value**: `1` + * + * @deprecated + */ + OAnimationIterationCount?: Property.AnimationIterationCount | undefined; + /** + * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. + * + * **Syntax**: `[ none | <keyframes-name> ]#` + * + * **Initial value**: `none` + * + * @deprecated + */ + OAnimationName?: Property.AnimationName | undefined; + /** + * The **`animation-play-state`** CSS property sets whether an animation is running or paused. + * + * **Syntax**: `<single-animation-play-state>#` + * + * **Initial value**: `running` + * + * @deprecated + */ + OAnimationPlayState?: Property.AnimationPlayState | undefined; + /** + * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + * + * @deprecated + */ + OAnimationTimingFunction?: Property.AnimationTimingFunction | undefined; + /** + * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. + * + * **Syntax**: `<bg-size>#` + * + * **Initial value**: `auto auto` + * + * @deprecated + */ + OBackgroundSize?: Property.BackgroundSize<TLength> | undefined; + /** + * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. + * + * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` + * + * @deprecated + */ + OBorderImage?: Property.BorderImage | undefined; + /** + * The **`object-fit`** CSS property sets how the content of a replaced element, such as an `<img>` or `<video>`, should be resized to fit its container. + * + * **Syntax**: `fill | contain | cover | none | scale-down` + * + * **Initial value**: `fill` + * + * @deprecated + */ + OObjectFit?: Property.ObjectFit | undefined; + /** + * The **`object-position`** CSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background. + * + * **Syntax**: `<position>` + * + * **Initial value**: `50% 50%` + * + * @deprecated + */ + OObjectPosition?: Property.ObjectPosition<TLength> | undefined; + /** + * The **`tab-size`** CSS property is used to customize the width of tab characters (U+0009). + * + * **Syntax**: `<integer> | <length>` + * + * **Initial value**: `8` + * + * @deprecated + */ + OTabSize?: Property.TabSize<TLength> | undefined; + /** + * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. + * + * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` + * + * **Initial value**: `clip` + * + * @deprecated + */ + OTextOverflow?: Property.TextOverflow | undefined; + /** + * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. + * + * **Syntax**: `none | <transform-list>` + * + * **Initial value**: `none` + * + * @deprecated + */ + OTransform?: Property.Transform | undefined; + /** + * The **`transform-origin`** CSS property sets the origin for an element's transformations. + * + * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` + * + * **Initial value**: `50% 50% 0` + * + * @deprecated + */ + OTransformOrigin?: Property.TransformOrigin<TLength> | undefined; + /** + * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. + * + * **Syntax**: `<single-transition>#` + * + * @deprecated + */ + OTransition?: Property.Transition<TTime> | undefined; + /** + * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + OTransitionDelay?: Property.TransitionDelay<TTime> | undefined; + /** + * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + OTransitionDuration?: Property.TransitionDuration<TTime> | undefined; + /** + * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. + * + * **Syntax**: `none | <single-transition-property>#` + * + * **Initial value**: all + * + * @deprecated + */ + OTransitionProperty?: Property.TransitionProperty | undefined; + /** + * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + * + * @deprecated + */ + OTransitionTimingFunction?: Property.TransitionTimingFunction | undefined; + /** + * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. + * + * **Syntax**: `start | center | end | baseline | stretch` + * + * **Initial value**: `stretch` + * + * @deprecated + */ + WebkitBoxAlign?: Property.BoxAlign | undefined; + /** + * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). + * + * **Syntax**: `normal | reverse | inherit` + * + * **Initial value**: `normal` + * + * @deprecated + */ + WebkitBoxDirection?: Property.BoxDirection | undefined; + /** + * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. + * + * **Syntax**: `<number>` + * + * **Initial value**: `0` + * + * @deprecated + */ + WebkitBoxFlex?: Property.BoxFlex | undefined; + /** + * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `1` + * + * @deprecated + */ + WebkitBoxFlexGroup?: Property.BoxFlexGroup | undefined; + /** + * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). + * + * **Syntax**: `single | multiple` + * + * **Initial value**: `single` + * + * @deprecated + */ + WebkitBoxLines?: Property.BoxLines | undefined; + /** + * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `1` + * + * @deprecated + */ + WebkitBoxOrdinalGroup?: Property.BoxOrdinalGroup | undefined; + /** + * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. + * + * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` + * + * **Initial value**: `inline-axis` (`horizontal` in XUL) + * + * @deprecated + */ + WebkitBoxOrient?: Property.BoxOrient | undefined; + /** + * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. + * + * **Syntax**: `start | center | end | justify` + * + * **Initial value**: `start` + * + * @deprecated + */ + WebkitBoxPack?: Property.BoxPack | undefined; +} + +export interface SvgProperties<TLength = (string & {}) | 0, TTime = string & {}> { + alignmentBaseline?: Property.AlignmentBaseline | undefined; + baselineShift?: Property.BaselineShift<TLength> | undefined; + clip?: Property.Clip | undefined; + clipPath?: Property.ClipPath | undefined; + clipRule?: Property.ClipRule | undefined; + color?: Property.Color | undefined; + colorInterpolation?: Property.ColorInterpolation | undefined; + colorRendering?: Property.ColorRendering | undefined; + cursor?: Property.Cursor | undefined; + direction?: Property.Direction | undefined; + display?: Property.Display | undefined; + dominantBaseline?: Property.DominantBaseline | undefined; + fill?: Property.Fill | undefined; + fillOpacity?: Property.FillOpacity | undefined; + fillRule?: Property.FillRule | undefined; + filter?: Property.Filter | undefined; + floodColor?: Property.FloodColor | undefined; + floodOpacity?: Property.FloodOpacity | undefined; + font?: Property.Font | undefined; + fontFamily?: Property.FontFamily | undefined; + fontSize?: Property.FontSize<TLength> | undefined; + fontSizeAdjust?: Property.FontSizeAdjust | undefined; + fontStretch?: Property.FontStretch | undefined; + fontStyle?: Property.FontStyle | undefined; + fontVariant?: Property.FontVariant | undefined; + fontWeight?: Property.FontWeight | undefined; + glyphOrientationVertical?: Property.GlyphOrientationVertical | undefined; + imageRendering?: Property.ImageRendering | undefined; + letterSpacing?: Property.LetterSpacing<TLength> | undefined; + lightingColor?: Property.LightingColor | undefined; + lineHeight?: Property.LineHeight<TLength> | undefined; + marker?: Property.Marker | undefined; + markerEnd?: Property.MarkerEnd | undefined; + markerMid?: Property.MarkerMid | undefined; + markerStart?: Property.MarkerStart | undefined; + mask?: Property.Mask<TLength> | undefined; + opacity?: Property.Opacity | undefined; + overflow?: Property.Overflow | undefined; + paintOrder?: Property.PaintOrder | undefined; + pointerEvents?: Property.PointerEvents | undefined; + shapeRendering?: Property.ShapeRendering | undefined; + stopColor?: Property.StopColor | undefined; + stopOpacity?: Property.StopOpacity | undefined; + stroke?: Property.Stroke | undefined; + strokeDasharray?: Property.StrokeDasharray<TLength> | undefined; + strokeDashoffset?: Property.StrokeDashoffset<TLength> | undefined; + strokeLinecap?: Property.StrokeLinecap | undefined; + strokeLinejoin?: Property.StrokeLinejoin | undefined; + strokeMiterlimit?: Property.StrokeMiterlimit | undefined; + strokeOpacity?: Property.StrokeOpacity | undefined; + strokeWidth?: Property.StrokeWidth<TLength> | undefined; + textAnchor?: Property.TextAnchor | undefined; + textDecoration?: Property.TextDecoration<TLength> | undefined; + textRendering?: Property.TextRendering | undefined; + unicodeBidi?: Property.UnicodeBidi | undefined; + vectorEffect?: Property.VectorEffect | undefined; + visibility?: Property.Visibility | undefined; + whiteSpace?: Property.WhiteSpace | undefined; + wordSpacing?: Property.WordSpacing<TLength> | undefined; + writingMode?: Property.WritingMode | undefined; +} + +export interface Properties<TLength = (string & {}) | 0, TTime = string & {}> + extends StandardProperties<TLength, TTime>, + VendorProperties<TLength, TTime>, + ObsoleteProperties<TLength, TTime>, + SvgProperties<TLength, TTime> {} + +export interface StandardLonghandPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { + /** + * The **`accent-color`** CSS property sets the accent color for user-interface controls generated by some elements. + * + * **Syntax**: `auto | <color>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **93** | **92** | **15.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/accent-color + */ + "accent-color"?: Property.AccentColor | undefined; + /** + * The CSS **`align-content`** property sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis. + * + * **Syntax**: `normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **29** | **28** | **9** | **12** | **11** | + * | 21 _-x-_ | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/align-content + */ + "align-content"?: Property.AlignContent | undefined; + /** + * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. In Flexbox, it controls the alignment of items on the Cross Axis. In Grid Layout, it controls the alignment of items on the Block Axis within their grid area. + * + * **Syntax**: `normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **29** | **20** | **9** | **12** | **11** | + * | 21 _-x-_ | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/align-items + */ + "align-items"?: Property.AlignItems | undefined; + /** + * The **`align-self`** CSS property overrides a grid or flex item's `align-items` value. In Grid, it aligns the item inside the grid area. In Flexbox, it aligns the item on the cross axis. + * + * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **29** | **20** | **9** | **12** | **10** | + * | 21 _-x-_ | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/align-self + */ + "align-self"?: Property.AlignSelf | undefined; + /** + * The **`align-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their block axis. + * + * **Syntax**: `[ normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position> ]#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/align-tracks + */ + "align-tracks"?: Property.AlignTracks | undefined; + /** + * The **`animation-composition`** CSS property specifies the composite operation to use when multiple animations affect the same property simultaneously. + * + * **Syntax**: `<single-animation-composition>#` + * + * **Initial value**: `replace` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **112** | **115** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-composition + */ + "animation-composition"?: Property.AnimationComposition | undefined; + /** + * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **43** | **16** | **9** | **12** | **10** | + * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-delay + */ + "animation-delay"?: Property.AnimationDelay<TTime> | undefined; + /** + * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. + * + * **Syntax**: `<single-animation-direction>#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **43** | **16** | **9** | **12** | **10** | + * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-direction + */ + "animation-direction"?: Property.AnimationDirection | undefined; + /** + * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **43** | **16** | **9** | **12** | **10** | + * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-duration + */ + "animation-duration"?: Property.AnimationDuration<TTime> | undefined; + /** + * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. + * + * **Syntax**: `<single-animation-fill-mode>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **43** | **16** | **9** | **12** | **10** | + * | 3 _-x-_ | 5 _-x-_ | 5 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode + */ + "animation-fill-mode"?: Property.AnimationFillMode | undefined; + /** + * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. + * + * **Syntax**: `<single-animation-iteration-count>#` + * + * **Initial value**: `1` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **43** | **16** | **9** | **12** | **10** | + * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count + */ + "animation-iteration-count"?: Property.AnimationIterationCount | undefined; + /** + * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. + * + * **Syntax**: `[ none | <keyframes-name> ]#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **43** | **16** | **9** | **12** | **10** | + * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-name + */ + "animation-name"?: Property.AnimationName | undefined; + /** + * The **`animation-play-state`** CSS property sets whether an animation is running or paused. + * + * **Syntax**: `<single-animation-play-state>#` + * + * **Initial value**: `running` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **43** | **16** | **9** | **12** | **10** | + * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-play-state + */ + "animation-play-state"?: Property.AnimationPlayState | undefined; + /** + * The **`animation-range-end`** CSS property is used to set the end of an animation's attachment range along its timeline, i.e. where along the timeline an animation will end. + * + * **Syntax**: `[ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-range-end + */ + "animation-range-end"?: Property.AnimationRangeEnd<TLength> | undefined; + /** + * The **`animation-range-start`** CSS property is used to set the start of an animation's attachment range along its timeline, i.e. where along the timeline an animation will start. + * + * **Syntax**: `[ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-range-start + */ + "animation-range-start"?: Property.AnimationRangeStart<TLength> | undefined; + /** + * The **`animation-timeline`** CSS property specifies the timeline that is used to control the progress of an animation. + * + * **Syntax**: `<single-animation-timeline>#` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-timeline + */ + "animation-timeline"?: Property.AnimationTimeline | undefined; + /** + * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **43** | **16** | **9** | **12** | **10** | + * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-timing-function + */ + "animation-timing-function"?: Property.AnimationTimingFunction | undefined; + /** + * The **`appearance`** CSS property is used to control native appearance of UI controls, that are based on operating system's theme. + * + * **Syntax**: `none | auto | textfield | menulist-button | <compat-auto>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :------: | :-: | + * | **84** | **80** | **15.4** | **84** | No | + * | 1 _-x-_ | 1 _-x-_ | 3 _-x-_ | 12 _-x-_ | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/appearance + */ + appearance?: Property.Appearance | undefined; + /** + * The **`aspect-ratio`** CSS property sets a **preferred aspect ratio** for the box, which will be used in the calculation of auto sizes and some other layout functions. + * + * **Syntax**: `auto | <ratio>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **88** | **89** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/aspect-ratio + */ + "aspect-ratio"?: Property.AspectRatio | undefined; + /** + * The **`backdrop-filter`** CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything _behind_ the element, to see the effect you must make the element or its background at least partially transparent. + * + * **Syntax**: `none | <filter-function-list>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :---------: | :----: | :-: | + * | **76** | **103** | **9** _-x-_ | **17** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/backdrop-filter + */ + "backdrop-filter"?: Property.BackdropFilter | undefined; + /** + * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. + * + * **Syntax**: `visible | hidden` + * + * **Initial value**: `visible` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-------: | :----: | :----: | + * | **36** | **16** | **15.4** | **12** | **10** | + * | 12 _-x-_ | | 5.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/backface-visibility + */ + "backface-visibility"?: Property.BackfaceVisibility | undefined; + /** + * The **`background-attachment`** CSS property sets whether a background image's position is fixed within the viewport, or scrolls with its containing block. + * + * **Syntax**: `<attachment>#` + * + * **Initial value**: `scroll` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-attachment + */ + "background-attachment"?: Property.BackgroundAttachment | undefined; + /** + * The **`background-blend-mode`** CSS property sets how an element's background images should blend with each other and with the element's background color. + * + * **Syntax**: `<blend-mode>#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **35** | **30** | **8** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-blend-mode + */ + "background-blend-mode"?: Property.BackgroundBlendMode | undefined; + /** + * The **`background-clip`** CSS property sets whether an element's background extends underneath its border box, padding box, or content box. + * + * **Syntax**: `<box>#` + * + * **Initial value**: `border-box` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **4** | **5** | **12** | **9** | + * | | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-clip + */ + "background-clip"?: Property.BackgroundClip | undefined; + /** + * The **`background-color`** CSS property sets the background color of an element. + * + * **Syntax**: `<color>` + * + * **Initial value**: `transparent` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-color + */ + "background-color"?: Property.BackgroundColor | undefined; + /** + * The **`background-image`** CSS property sets one or more background images on an element. + * + * **Syntax**: `<bg-image>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-image + */ + "background-image"?: Property.BackgroundImage | undefined; + /** + * The **`background-origin`** CSS property sets the background's origin: from the border start, inside the border, or inside the padding. + * + * **Syntax**: `<box>#` + * + * **Initial value**: `padding-box` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **4** | **3** | **12** | **9** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-origin + */ + "background-origin"?: Property.BackgroundOrigin | undefined; + /** + * The **`background-position-x`** CSS property sets the initial horizontal position for each background image. The position is relative to the position layer set by `background-origin`. + * + * **Syntax**: `[ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#` + * + * **Initial value**: `0%` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **49** | **1** | **12** | **6** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-position-x + */ + "background-position-x"?: Property.BackgroundPositionX<TLength> | undefined; + /** + * The **`background-position-y`** CSS property sets the initial vertical position for each background image. The position is relative to the position layer set by `background-origin`. + * + * **Syntax**: `[ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#` + * + * **Initial value**: `0%` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **49** | **1** | **12** | **6** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-position-y + */ + "background-position-y"?: Property.BackgroundPositionY<TLength> | undefined; + /** + * The **`background-repeat`** CSS property sets how background images are repeated. A background image can be repeated along the horizontal and vertical axes, or not repeated at all. + * + * **Syntax**: `<repeat-style>#` + * + * **Initial value**: `repeat` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-repeat + */ + "background-repeat"?: Property.BackgroundRepeat | undefined; + /** + * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. + * + * **Syntax**: `<bg-size>#` + * + * **Initial value**: `auto auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :---: | + * | **3** | **4** | **5** | **12** | **9** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-size + */ + "background-size"?: Property.BackgroundSize<TLength> | undefined; + /** + * **Syntax**: `clip | ellipsis | <string>` + * + * **Initial value**: `clip` + */ + "block-overflow"?: Property.BlockOverflow | undefined; + /** + * The **`block-size`** CSS property defines the horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `width` or the `height` property, depending on the value of `writing-mode`. + * + * **Syntax**: `<'width'>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **57** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/block-size + */ + "block-size"?: Property.BlockSize<TLength> | undefined; + /** + * The **`border-block-color`** CSS property defines the color of the logical block borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-color'>{1,2}` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-color + */ + "border-block-color"?: Property.BorderBlockColor | undefined; + /** + * The **`border-block-end-color`** CSS property defines the color of the logical block-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-color'>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-color + */ + "border-block-end-color"?: Property.BorderBlockEndColor | undefined; + /** + * The **`border-block-end-style`** CSS property defines the style of the logical block-end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-style'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-style + */ + "border-block-end-style"?: Property.BorderBlockEndStyle | undefined; + /** + * The **`border-block-end-width`** CSS property defines the width of the logical block-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-width'>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-width + */ + "border-block-end-width"?: Property.BorderBlockEndWidth<TLength> | undefined; + /** + * The **`border-block-start-color`** CSS property defines the color of the logical block-start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-color'>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-color + */ + "border-block-start-color"?: Property.BorderBlockStartColor | undefined; + /** + * The **`border-block-start-style`** CSS property defines the style of the logical block start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-style'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-style + */ + "border-block-start-style"?: Property.BorderBlockStartStyle | undefined; + /** + * The **`border-block-start-width`** CSS property defines the width of the logical block-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-width'>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-width + */ + "border-block-start-width"?: Property.BorderBlockStartWidth<TLength> | undefined; + /** + * The **`border-block-style`** CSS property defines the style of the logical block borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-style'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-style + */ + "border-block-style"?: Property.BorderBlockStyle | undefined; + /** + * The **`border-block-width`** CSS property defines the width of the logical block borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-width'>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-width + */ + "border-block-width"?: Property.BorderBlockWidth<TLength> | undefined; + /** + * The **`border-bottom-color`** CSS property sets the color of an element's bottom border. It can also be set with the shorthand CSS properties `border-color` or `border-bottom`. + * + * **Syntax**: `<'border-top-color'>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-color + */ + "border-bottom-color"?: Property.BorderBottomColor | undefined; + /** + * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :---: | + * | **4** | **4** | **5** | **12** | **9** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius + */ + "border-bottom-left-radius"?: Property.BorderBottomLeftRadius<TLength> | undefined; + /** + * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :---: | + * | **4** | **4** | **5** | **12** | **9** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius + */ + "border-bottom-right-radius"?: Property.BorderBottomRightRadius<TLength> | undefined; + /** + * The **`border-bottom-style`** CSS property sets the line style of an element's bottom `border`. + * + * **Syntax**: `<line-style>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-style + */ + "border-bottom-style"?: Property.BorderBottomStyle | undefined; + /** + * The **`border-bottom-width`** CSS property sets the width of the bottom border of an element. + * + * **Syntax**: `<line-width>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-width + */ + "border-bottom-width"?: Property.BorderBottomWidth<TLength> | undefined; + /** + * The **`border-collapse`** CSS property sets whether cells inside a `<table>` have shared or separate borders. + * + * **Syntax**: `collapse | separate` + * + * **Initial value**: `separate` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **1** | **1.2** | **12** | **5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-collapse + */ + "border-collapse"?: Property.BorderCollapse | undefined; + /** + * The **`border-end-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **89** | **66** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius + */ + "border-end-end-radius"?: Property.BorderEndEndRadius<TLength> | undefined; + /** + * The **`border-end-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **89** | **66** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius + */ + "border-end-start-radius"?: Property.BorderEndStartRadius<TLength> | undefined; + /** + * The **`border-image-outset`** CSS property sets the distance by which an element's border image is set out from its border box. + * + * **Syntax**: `[ <length> | <number> ]{1,4}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **15** | **15** | **6** | **12** | **11** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-image-outset + */ + "border-image-outset"?: Property.BorderImageOutset<TLength> | undefined; + /** + * The **`border-image-repeat`** CSS property defines how the edge regions and middle region of a source image are adjusted to fit the dimensions of an element's border image. The middle region can be displayed by using the keyword "fill" in the border-image-slice property. + * + * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` + * + * **Initial value**: `stretch` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **15** | **15** | **6** | **12** | **11** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-image-repeat + */ + "border-image-repeat"?: Property.BorderImageRepeat | undefined; + /** + * The **`border-image-slice`** CSS property divides the image specified by `border-image-source` into regions. These regions form the components of an element's border image. + * + * **Syntax**: `<number-percentage>{1,4} && fill?` + * + * **Initial value**: `100%` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **15** | **15** | **6** | **12** | **11** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-image-slice + */ + "border-image-slice"?: Property.BorderImageSlice | undefined; + /** + * The **`border-image-source`** CSS property sets the source image used to create an element's border image. + * + * **Syntax**: `none | <image>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **15** | **15** | **6** | **12** | **11** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-image-source + */ + "border-image-source"?: Property.BorderImageSource | undefined; + /** + * The **`border-image-width`** CSS property sets the width of an element's border image. + * + * **Syntax**: `[ <length-percentage> | <number> | auto ]{1,4}` + * + * **Initial value**: `1` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **15** | **13** | **6** | **12** | **11** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-image-width + */ + "border-image-width"?: Property.BorderImageWidth<TLength> | undefined; + /** + * The **`border-inline-color`** CSS property defines the color of the logical inline borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-color'>{1,2}` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-color + */ + "border-inline-color"?: Property.BorderInlineColor | undefined; + /** + * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-color'>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-------------------------: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * | | 3 _(-moz-border-end-color)_ | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color + */ + "border-inline-end-color"?: Property.BorderInlineEndColor | undefined; + /** + * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-style'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-------------------------: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * | | 3 _(-moz-border-end-style)_ | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style + */ + "border-inline-end-style"?: Property.BorderInlineEndStyle | undefined; + /** + * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-width'>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-------------------------: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * | | 3 _(-moz-border-end-width)_ | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width + */ + "border-inline-end-width"?: Property.BorderInlineEndWidth<TLength> | undefined; + /** + * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-color'>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :---------------------------: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * | | 3 _(-moz-border-start-color)_ | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color + */ + "border-inline-start-color"?: Property.BorderInlineStartColor | undefined; + /** + * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-style'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :---------------------------: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * | | 3 _(-moz-border-start-style)_ | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style + */ + "border-inline-start-style"?: Property.BorderInlineStartStyle | undefined; + /** + * The **`border-inline-start-width`** CSS property defines the width of the logical inline-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-width'>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width + */ + "border-inline-start-width"?: Property.BorderInlineStartWidth<TLength> | undefined; + /** + * The **`border-inline-style`** CSS property defines the style of the logical inline borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-style'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-style + */ + "border-inline-style"?: Property.BorderInlineStyle | undefined; + /** + * The **`border-inline-width`** CSS property defines the width of the logical inline borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-width'>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-width + */ + "border-inline-width"?: Property.BorderInlineWidth<TLength> | undefined; + /** + * The **`border-left-color`** CSS property sets the color of an element's left border. It can also be set with the shorthand CSS properties `border-color` or `border-left`. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-left-color + */ + "border-left-color"?: Property.BorderLeftColor | undefined; + /** + * The **`border-left-style`** CSS property sets the line style of an element's left `border`. + * + * **Syntax**: `<line-style>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-left-style + */ + "border-left-style"?: Property.BorderLeftStyle | undefined; + /** + * The **`border-left-width`** CSS property sets the width of the left border of an element. + * + * **Syntax**: `<line-width>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-left-width + */ + "border-left-width"?: Property.BorderLeftWidth<TLength> | undefined; + /** + * The **`border-right-color`** CSS property sets the color of an element's right border. It can also be set with the shorthand CSS properties `border-color` or `border-right`. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-right-color + */ + "border-right-color"?: Property.BorderRightColor | undefined; + /** + * The **`border-right-style`** CSS property sets the line style of an element's right `border`. + * + * **Syntax**: `<line-style>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-right-style + */ + "border-right-style"?: Property.BorderRightStyle | undefined; + /** + * The **`border-right-width`** CSS property sets the width of the right border of an element. + * + * **Syntax**: `<line-width>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-right-width + */ + "border-right-width"?: Property.BorderRightWidth<TLength> | undefined; + /** + * The **`border-spacing`** CSS property sets the distance between the borders of adjacent cells in a `<table>`. This property applies only when `border-collapse` is `separate`. + * + * **Syntax**: `<length> <length>?` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-spacing + */ + "border-spacing"?: Property.BorderSpacing<TLength> | undefined; + /** + * The **`border-start-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **89** | **66** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius + */ + "border-start-end-radius"?: Property.BorderStartEndRadius<TLength> | undefined; + /** + * The **`border-start-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **89** | **66** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius + */ + "border-start-start-radius"?: Property.BorderStartStartRadius<TLength> | undefined; + /** + * The **`border-top-color`** CSS property sets the color of an element's top border. It can also be set with the shorthand CSS properties `border-color` or `border-top`. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-top-color + */ + "border-top-color"?: Property.BorderTopColor | undefined; + /** + * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :---: | + * | **4** | **4** | **5** | **12** | **9** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius + */ + "border-top-left-radius"?: Property.BorderTopLeftRadius<TLength> | undefined; + /** + * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :---: | + * | **4** | **4** | **5** | **12** | **9** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius + */ + "border-top-right-radius"?: Property.BorderTopRightRadius<TLength> | undefined; + /** + * The **`border-top-style`** CSS property sets the line style of an element's top `border`. + * + * **Syntax**: `<line-style>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-top-style + */ + "border-top-style"?: Property.BorderTopStyle | undefined; + /** + * The **`border-top-width`** CSS property sets the width of the top border of an element. + * + * **Syntax**: `<line-width>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-top-width + */ + "border-top-width"?: Property.BorderTopWidth<TLength> | undefined; + /** + * The **`bottom`** CSS property participates in setting the vertical position of a positioned element. It has no effect on non-positioned elements. + * + * **Syntax**: `<length> | <percentage> | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/bottom + */ + bottom?: Property.Bottom<TLength> | undefined; + /** + * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. + * + * **Syntax**: `slice | clone` + * + * **Initial value**: `slice` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----------: | :-----: | :---------: | :--: | :-: | + * | **22** _-x-_ | **32** | **7** _-x-_ | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/box-decoration-break + */ + "box-decoration-break"?: Property.BoxDecorationBreak | undefined; + /** + * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. + * + * **Syntax**: `none | <shadow>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :---: | + * | **10** | **4** | **5.1** | **12** | **9** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/box-shadow + */ + "box-shadow"?: Property.BoxShadow | undefined; + /** + * The **`box-sizing`** CSS property sets how the total width and height of an element is calculated. + * + * **Syntax**: `content-box | border-box` + * + * **Initial value**: `content-box` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :---: | + * | **10** | **29** | **5.1** | **12** | **8** | + * | 1 _-x-_ | 1 _-x-_ | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/box-sizing + */ + "box-sizing"?: Property.BoxSizing | undefined; + /** + * The **`break-after`** CSS property sets how page, column, or region breaks should behave after a generated box. If there is no generated box, the property is ignored. + * + * **Syntax**: `auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **50** | **65** | **10** | **12** | **10** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/break-after + */ + "break-after"?: Property.BreakAfter | undefined; + /** + * The **`break-before`** CSS property sets how page, column, or region breaks should behave before a generated box. If there is no generated box, the property is ignored. + * + * **Syntax**: `auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **50** | **65** | **10** | **12** | **10** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/break-before + */ + "break-before"?: Property.BreakBefore | undefined; + /** + * The **`break-inside`** CSS property sets how page, column, or region breaks should behave inside a generated box. If there is no generated box, the property is ignored. + * + * **Syntax**: `auto | avoid | avoid-page | avoid-column | avoid-region` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **50** | **65** | **10** | **12** | **10** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/break-inside + */ + "break-inside"?: Property.BreakInside | undefined; + /** + * The **`caption-side`** CSS property puts the content of a table's `<caption>` on the specified side. The values are relative to the `writing-mode` of the table. + * + * **Syntax**: `top | bottom | block-start | block-end | inline-start | inline-end` + * + * **Initial value**: `top` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/caption-side + */ + "caption-side"?: Property.CaptionSide | undefined; + /** + * The **`caret-color`** CSS property sets the color of the **insertion caret**, the visible marker where the next character typed will be inserted. This is sometimes referred to as the **text input cursor**. The caret appears in elements such as `<input>` or those with the `contenteditable` attribute. The caret is typically a thin vertical line that flashes to help make it more noticeable. By default, it is black, but its color can be altered with this property. + * + * **Syntax**: `auto | <color>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **57** | **53** | **11.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/caret-color + */ + "caret-color"?: Property.CaretColor | undefined; + /** + * **Syntax**: `auto | bar | block | underscore` + * + * **Initial value**: `auto` + */ + "caret-shape"?: Property.CaretShape | undefined; + /** + * The **`clear`** CSS property sets whether an element must be moved below (cleared) floating elements that precede it. The `clear` property applies to floating and non-floating elements. + * + * **Syntax**: `none | left | right | both | inline-start | inline-end` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/clear + */ + clear?: Property.Clear | undefined; + /** + * The **`clip-path`** CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. + * + * **Syntax**: `<clip-source> | [ <basic-shape> || <geometry-box> ] | none` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **55** | **3.5** | **9.1** | **79** | **10** | + * | 23 _-x-_ | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/clip-path + */ + "clip-path"?: Property.ClipPath | undefined; + /** + * The **`color`** CSS property sets the foreground color value of an element's text and text decorations, and sets the `currentcolor` value. `currentcolor` may be used as an indirect value on _other_ properties and is the default for other color properties, such as `border-color`. + * + * **Syntax**: `<color>` + * + * **Initial value**: `canvastext` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/color + */ + color?: Property.Color | undefined; + /** + * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. + * + * **Syntax**: `economy | exact` + * + * **Initial value**: `economy` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----------: | :-----------------: | :------: | :----------: | :-: | + * | **17** _-x-_ | **97** | **15.4** | **79** _-x-_ | No | + * | | 48 _(color-adjust)_ | 6 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/print-color-adjust + */ + "color-adjust"?: Property.PrintColorAdjust | undefined; + /** + * The **`color-scheme`** CSS property allows an element to indicate which color schemes it can comfortably be rendered in. + * + * **Syntax**: `normal | [ light | dark | <custom-ident> ]+ && only?` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **81** | **96** | **13** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/color-scheme + */ + "color-scheme"?: Property.ColorScheme | undefined; + /** + * The **`column-count`** CSS property breaks an element's content into the specified number of columns. + * + * **Syntax**: `<integer> | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **50** | **52** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/column-count + */ + "column-count"?: Property.ColumnCount | undefined; + /** + * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. + * + * **Syntax**: `auto | balance | balance-all` + * + * **Initial value**: `balance` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :----: | + * | **50** | **52** | **9** | **12** | **10** | + * | | | 8 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/column-fill + */ + "column-fill"?: Property.ColumnFill | undefined; + /** + * The **`column-gap`** CSS property sets the size of the gap (gutter) between an element's columns. + * + * **Syntax**: `normal | <length-percentage>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **1** | **1.5** | **3** | **12** | **10** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/column-gap + */ + "column-gap"?: Property.ColumnGap<TLength> | undefined; + /** + * The **`column-rule-color`** CSS property sets the color of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **50** | **52** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-color + */ + "column-rule-color"?: Property.ColumnRuleColor | undefined; + /** + * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<'border-style'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **50** | **52** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-style + */ + "column-rule-style"?: Property.ColumnRuleStyle | undefined; + /** + * The **`column-rule-width`** CSS property sets the width of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<'border-width'>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **50** | **52** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-width + */ + "column-rule-width"?: Property.ColumnRuleWidth<TLength> | undefined; + /** + * The **`column-span`** CSS property makes it possible for an element to span across all columns when its value is set to `all`. + * + * **Syntax**: `none | all` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :----: | :----: | + * | **50** | **71** | **9** | **12** | **10** | + * | 6 _-x-_ | | 5.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/column-span + */ + "column-span"?: Property.ColumnSpan | undefined; + /** + * The **`column-width`** CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. + * + * **Syntax**: `<length> | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **50** | **50** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/column-width + */ + "column-width"?: Property.ColumnWidth<TLength> | undefined; + /** + * The **`contain`** CSS property indicates that an element and its contents are, as much as possible, independent from the rest of the document tree. Containment enables isolating a subsection of the DOM, providing performance benefits by limiting calculations of layout, style, paint, size, or any combination to a DOM subtree rather than the entire page. Containment can also be used to scope CSS counters and quotes. + * + * **Syntax**: `none | strict | content | [ [ size || inline-size ] || layout || style || paint ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **52** | **69** | **15.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain + */ + contain?: Property.Contain | undefined; + /** + * The **`contain-intrinsic-block-size`** CSS logical property defines the block size of an element that a browser can use for layout when the element is subject to size containment. + * + * **Syntax**: `auto? [ none | <length> ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **95** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-contain-intrinsic-block-size + */ + "contain-intrinsic-block-size"?: Property.ContainIntrinsicBlockSize<TLength> | undefined; + /** + * The **`contain-intrinsic-length`** CSS property sets the height of an element that a browser can use for layout when the element is subject to size containment. + * + * **Syntax**: `auto? [ none | <length> ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **95** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-height + */ + "contain-intrinsic-height"?: Property.ContainIntrinsicHeight<TLength> | undefined; + /** + * The **`contain-intrinsic-inline-size`** CSS logical property defines the inline-size of an element that a browser can use for layout when the element is subject to size containment. + * + * **Syntax**: `auto? [ none | <length> ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **95** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-contain-intrinsic-inline-size + */ + "contain-intrinsic-inline-size"?: Property.ContainIntrinsicInlineSize<TLength> | undefined; + /** + * The **`contain-intrinsic-width`** CSS property sets the width of an element that a browser will use for layout when the element is subject to size containment. + * + * **Syntax**: `auto? [ none | <length> ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **95** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-width + */ + "contain-intrinsic-width"?: Property.ContainIntrinsicWidth<TLength> | undefined; + /** + * The **container-name** CSS property specifies a list of query container names used by the @container at-rule in a container query. A container query will apply styles to elements based on the size of the nearest ancestor with a containment context. When a containment context is given a name, it can be specifically targeted using the `@container` at-rule instead of the nearest ancestor with containment. + * + * **Syntax**: `none | <custom-ident>+` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **105** | **110** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/container-name + */ + "container-name"?: Property.ContainerName | undefined; + /** + * The **container-type** CSS property is used to define the type of containment used in a container query. + * + * **Syntax**: `normal | size | inline-size` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **105** | **110** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/container-type + */ + "container-type"?: Property.ContainerType | undefined; + /** + * The **`content`** CSS property replaces an element with a generated value. Objects inserted using the `content` property are **anonymous replaced elements**. + * + * **Syntax**: `normal | none | [ <content-replacement> | <content-list> ] [/ [ <string> | <counter> ]+ ]?` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/content + */ + content?: Property.Content | undefined; + /** + * The **`content-visibility`** CSS property controls whether or not an element renders its contents at all, along with forcing a strong set of containments, allowing user agents to potentially omit large swathes of layout and rendering work until it becomes needed. It enables the user agent to skip an element's rendering work (including layout and painting) until it is needed — which makes the initial page load much faster. + * + * **Syntax**: `visible | auto | hidden` + * + * **Initial value**: `visible` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :---------: | :----: | :--: | :-: | + * | **85** | **preview** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/content-visibility + */ + "content-visibility"?: Property.ContentVisibility | undefined; + /** + * The **`counter-increment`** CSS property increases or decreases the value of a CSS counter by a given value. + * + * **Syntax**: `[ <counter-name> <integer>? ]+ | none` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **2** | **1** | **3** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/counter-increment + */ + "counter-increment"?: Property.CounterIncrement | undefined; + /** + * The **`counter-reset`** CSS property resets a CSS counter to a given value. This property will create a new counter or reversed counter with the given name on the specified element. + * + * **Syntax**: `[ <counter-name> <integer>? | <reversed-counter-name> <integer>? ]+ | none` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **2** | **1** | **3** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/counter-reset + */ + "counter-reset"?: Property.CounterReset | undefined; + /** + * The **`counter-set`** CSS property sets a CSS counter to a given value. It manipulates the value of existing counters, and will only create new counters if there isn't already a counter of the given name on the element. + * + * **Syntax**: `[ <counter-name> <integer>? ]+ | none` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **85** | **68** | **17.2** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/counter-set + */ + "counter-set"?: Property.CounterSet | undefined; + /** + * The **`cursor`** CSS property sets the mouse cursor, if any, to show when the mouse pointer is over an element. + * + * **Syntax**: `[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ]` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **1** | **1.2** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/cursor + */ + cursor?: Property.Cursor | undefined; + /** + * The **`direction`** CSS property sets the direction of text, table columns, and horizontal overflow. Use `rtl` for languages written from right to left (like Hebrew or Arabic), and `ltr` for those written from left to right (like English and most other languages). + * + * **Syntax**: `ltr | rtl` + * + * **Initial value**: `ltr` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **2** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/direction + */ + direction?: Property.Direction | undefined; + /** + * The **`display`** CSS property sets whether an element is treated as a block or inline element and the layout used for its children, such as flow layout, grid or flex. + * + * **Syntax**: `[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy>` + * + * **Initial value**: `inline` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/display + */ + display?: Property.Display | undefined; + /** + * The **`empty-cells`** CSS property sets whether borders and backgrounds appear around `<table>` cells that have no visible content. + * + * **Syntax**: `show | hide` + * + * **Initial value**: `show` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **1** | **1.2** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/empty-cells + */ + "empty-cells"?: Property.EmptyCells | undefined; + /** + * The **`filter`** CSS property applies graphical effects like blur or color shift to an element. Filters are commonly used to adjust the rendering of images, backgrounds, and borders. + * + * **Syntax**: `none | <filter-function-list>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :-: | + * | **53** | **35** | **9.1** | **12** | No | + * | 18 _-x-_ | | 6 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/filter + */ + filter?: Property.Filter | undefined; + /** + * The **`flex-basis`** CSS property sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with `box-sizing`. + * + * **Syntax**: `content | <'width'>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **29** | **22** | **9** | **12** | **11** | + * | 22 _-x-_ | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/flex-basis + */ + "flex-basis"?: Property.FlexBasis<TLength> | undefined; + /** + * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). + * + * **Syntax**: `row | row-reverse | column | column-reverse` + * + * **Initial value**: `row` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :------: | :-----: | :----: | :------: | + * | **29** | **81** | **9** | **12** | **11** | + * | 21 _-x-_ | 49 _-x-_ | 7 _-x-_ | | 10 _-x-_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/flex-direction + */ + "flex-direction"?: Property.FlexDirection | undefined; + /** + * The **`flex-grow`** CSS property sets the flex grow factor of a flex item's main size. + * + * **Syntax**: `<number>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----------------------: | + * | **29** | **20** | **9** | **12** | **11** | + * | 22 _-x-_ | | 7 _-x-_ | | 10 _(-ms-flex-positive)_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/flex-grow + */ + "flex-grow"?: Property.FlexGrow | undefined; + /** + * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. + * + * **Syntax**: `<number>` + * + * **Initial value**: `1` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **29** | **20** | **9** | **12** | **10** | + * | 22 _-x-_ | | 8 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/flex-shrink + */ + "flex-shrink"?: Property.FlexShrink | undefined; + /** + * The **`flex-wrap`** CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. + * + * **Syntax**: `nowrap | wrap | wrap-reverse` + * + * **Initial value**: `nowrap` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **29** | **28** | **9** | **12** | **11** | + * | 21 _-x-_ | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/flex-wrap + */ + "flex-wrap"?: Property.FlexWrap | undefined; + /** + * The **`float`** CSS property places an element on the left or right side of its container, allowing text and inline elements to wrap around it. The element is removed from the normal flow of the page, though still remaining a part of the flow (in contrast to absolute positioning). + * + * **Syntax**: `left | right | none | inline-start | inline-end` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/float + */ + float?: Property.Float | undefined; + /** + * The **`font-family`** CSS property specifies a prioritized list of one or more font family names and/or generic family names for the selected element. + * + * **Syntax**: `[ <family-name> | <generic-family> ]#` + * + * **Initial value**: depends on user agent + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-family + */ + "font-family"?: Property.FontFamily | undefined; + /** + * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. + * + * **Syntax**: `normal | <feature-tag-value>#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :------: | :-----: | :----: | :----: | + * | **48** | **34** | **9.1** | **15** | **10** | + * | 16 _-x-_ | 15 _-x-_ | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-feature-settings + */ + "font-feature-settings"?: Property.FontFeatureSettings | undefined; + /** + * The **`font-kerning`** CSS property sets the use of the kerning information stored in a font. + * + * **Syntax**: `auto | normal | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :--: | :-: | + * | **33** | **32** | **9** | n/a | No | + * | | | 6 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-kerning + */ + "font-kerning"?: Property.FontKerning | undefined; + /** + * The **`font-language-override`** CSS property controls the use of language-specific glyphs in a typeface. + * + * **Syntax**: `normal | <string>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | **34** | No | n/a | No | + * | | 4 _-x-_ | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-language-override + */ + "font-language-override"?: Property.FontLanguageOverride | undefined; + /** + * The **`font-optical-sizing`** CSS property sets whether text rendering is optimized for viewing at different sizes. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-: | + * | **79** | **62** | **11** | **17** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing + */ + "font-optical-sizing"?: Property.FontOpticalSizing | undefined; + /** + * **Syntax**: `normal | light | dark | <palette-identifier>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **101** | **107** | **15.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-palette + */ + "font-palette"?: Property.FontPalette | undefined; + /** + * The **`font-size`** CSS property sets the size of the font. Changing the font size also updates the sizes of the font size-relative `<length>` units, such as `em`, `ex`, and so forth. + * + * **Syntax**: `<absolute-size> | <relative-size> | <length-percentage>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-size + */ + "font-size"?: Property.FontSize<TLength> | undefined; + /** + * The **`font-size-adjust`** CSS property sets the size of lower-case letters relative to the current font size (which defines the size of upper-case letters). + * + * **Syntax**: `none | [ ex-height | cap-height | ch-width | ic-width | ic-height ]? [ from-font | <number> ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | No | **3** | **16.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-size-adjust + */ + "font-size-adjust"?: Property.FontSizeAdjust | undefined; + /** + * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. + * + * **Syntax**: `auto | never | always | <absolute-size> | <length>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------------: | :--------------------------------: | :------------------------------: | :--: | :-: | + * | **5** _(-webkit-font-smoothing)_ | **25** _(-moz-osx-font-smoothing)_ | **4** _(-webkit-font-smoothing)_ | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-smooth + */ + "font-smooth"?: Property.FontSmooth<TLength> | undefined; + /** + * The **`font-stretch`** CSS property selects a normal, condensed, or expanded face from a font. + * + * **Syntax**: `<font-stretch-absolute>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **60** | **9** | **11** | **12** | **9** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-stretch + */ + "font-stretch"?: Property.FontStretch | undefined; + /** + * The **`font-style`** CSS property sets whether a font should be styled with a normal, italic, or oblique face from its `font-family`. + * + * **Syntax**: `normal | italic | oblique <angle>?` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-style + */ + "font-style"?: Property.FontStyle | undefined; + /** + * The **`font-synthesis`** CSS property controls which missing typefaces, bold, italic, or small-caps, may be synthesized by the browser. + * + * **Syntax**: `none | [ weight || style || small-caps || position]` + * + * **Initial value**: `weight style small-caps position ` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **97** | **34** | **9** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis + */ + "font-synthesis"?: Property.FontSynthesis | undefined; + /** + * The **`font-synthesis-position`** CSS property lets you specify whether or not a browser may synthesize the subscript and superscript "position" typefaces when they are missing in a font family, while using `font-variant-position` to set the positions. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | **118** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-position + */ + "font-synthesis-position"?: Property.FontSynthesisPosition | undefined; + /** + * The **`font-synthesis-small-caps`** CSS property lets you specify whether or not the browser may synthesize small-caps typeface when it is missing in a font family. Small-caps glyphs typically use the form of uppercase letters but are reduced to the size of lowercase letters. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **97** | **111** | **16.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-small-caps + */ + "font-synthesis-small-caps"?: Property.FontSynthesisSmallCaps | undefined; + /** + * The **`font-synthesis-style`** CSS property lets you specify whether or not the browser may synthesize the oblique typeface when it is missing in a font family. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **97** | **111** | **16.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-style + */ + "font-synthesis-style"?: Property.FontSynthesisStyle | undefined; + /** + * The **`font-synthesis-weight`** CSS property lets you specify whether or not the browser may synthesize the bold typeface when it is missing in a font family. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **97** | **111** | **16.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-weight + */ + "font-synthesis-weight"?: Property.FontSynthesisWeight | undefined; + /** + * The **`font-variant`** CSS shorthand property allows you to set all the font variants for a font. + * + * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variant + */ + "font-variant"?: Property.FontVariant | undefined; + /** + * The **`font-variant-alternates`** CSS property controls the usage of alternate glyphs. These alternate glyphs may be referenced by alternative names defined in `@font-feature-values`. + * + * **Syntax**: `normal | [ stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :--: | :-: | + * | **111** | **34** | **9.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates + */ + "font-variant-alternates"?: Property.FontVariantAlternates | undefined; + /** + * The **`font-variant-caps`** CSS property controls the use of alternate glyphs for capital letters. + * + * **Syntax**: `normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :--: | :-: | + * | **52** | **34** | **9.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-caps + */ + "font-variant-caps"?: Property.FontVariantCaps | undefined; + /** + * The **`font-variant-east-asian`** CSS property controls the use of alternate glyphs for East Asian scripts, like Japanese and Chinese. + * + * **Syntax**: `normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :--: | :-: | + * | **63** | **34** | **9.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian + */ + "font-variant-east-asian"?: Property.FontVariantEastAsian | undefined; + /** + * **Syntax**: `normal | text | emoji | unicode` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-emoji + */ + "font-variant-emoji"?: Property.FontVariantEmoji | undefined; + /** + * The **`font-variant-ligatures`** CSS property controls which ligatures and contextual forms are used in textual content of the elements it applies to. This leads to more harmonized forms in the resulting text. + * + * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :--: | :-: | + * | **34** | **34** | **9.1** | n/a | No | + * | 31 _-x-_ | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures + */ + "font-variant-ligatures"?: Property.FontVariantLigatures | undefined; + /** + * The **`font-variant-numeric`** CSS property controls the usage of alternate glyphs for numbers, fractions, and ordinal markers. + * + * **Syntax**: `normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :--: | :-: | + * | **52** | **34** | **9.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric + */ + "font-variant-numeric"?: Property.FontVariantNumeric | undefined; + /** + * The **`font-variant-position`** CSS property controls the use of alternate, smaller glyphs that are positioned as superscript or subscript. + * + * **Syntax**: `normal | sub | super` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :--: | :-: | + * | **117** | **34** | **9.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-position + */ + "font-variant-position"?: Property.FontVariantPosition | undefined; + /** + * The **`font-variation-settings`** CSS property provides low-level control over variable font characteristics, by specifying the four letter axis names of the characteristics you want to vary, along with their values. + * + * **Syntax**: `normal | [ <string> <number> ]#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-: | + * | **62** | **62** | **11** | **17** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variation-settings + */ + "font-variation-settings"?: Property.FontVariationSettings | undefined; + /** + * The **`font-weight`** CSS property sets the weight (or boldness) of the font. The weights available depend on the `font-family` that is currently set. + * + * **Syntax**: `<font-weight-absolute> | bolder | lighter` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **2** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-weight + */ + "font-weight"?: Property.FontWeight | undefined; + /** + * The **`forced-color-adjust`** CSS property allows authors to opt certain elements out of forced colors mode. This then restores the control of those values to CSS. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :-----------------------------: | :---------------------------------: | + * | **89** | **113** | No | **79** | **10** _(-ms-high-contrast-adjust)_ | + * | | | | 12 _(-ms-high-contrast-adjust)_ | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/forced-color-adjust + */ + "forced-color-adjust"?: Property.ForcedColorAdjust | undefined; + /** + * The **`grid-auto-columns`** CSS property specifies the size of an implicitly-created grid column track or pattern of tracks. + * + * **Syntax**: `<track-size>+` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-------------------------: | + * | **57** | **70** | **10.1** | **16** | **10** _(-ms-grid-columns)_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns + */ + "grid-auto-columns"?: Property.GridAutoColumns<TLength> | undefined; + /** + * The **`grid-auto-flow`** CSS property controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid. + * + * **Syntax**: `[ row | column ] || dense` + * + * **Initial value**: `row` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow + */ + "grid-auto-flow"?: Property.GridAutoFlow | undefined; + /** + * The **`grid-auto-rows`** CSS property specifies the size of an implicitly-created grid row track or pattern of tracks. + * + * **Syntax**: `<track-size>+` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :----------------------: | + * | **57** | **70** | **10.1** | **16** | **10** _(-ms-grid-rows)_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows + */ + "grid-auto-rows"?: Property.GridAutoRows<TLength> | undefined; + /** + * The **`grid-column-end`** CSS property specifies a grid item's end position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the block-end edge of its grid area. + * + * **Syntax**: `<grid-line>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-column-end + */ + "grid-column-end"?: Property.GridColumnEnd | undefined; + /** + * The **`grid-column-start`** CSS property specifies a grid item's start position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement. This start position defines the block-start edge of the grid area. + * + * **Syntax**: `<grid-line>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-column-start + */ + "grid-column-start"?: Property.GridColumnStart | undefined; + /** + * The **`grid-row-end`** CSS property specifies a grid item's end position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-end edge of its grid area. + * + * **Syntax**: `<grid-line>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-row-end + */ + "grid-row-end"?: Property.GridRowEnd | undefined; + /** + * The **`grid-row-start`** CSS property specifies a grid item's start position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start edge of its grid area. + * + * **Syntax**: `<grid-line>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-row-start + */ + "grid-row-start"?: Property.GridRowStart | undefined; + /** + * The **`grid-template-areas`** CSS property specifies named grid areas, establishing the cells in the grid and assigning them names. + * + * **Syntax**: `none | <string>+` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-areas + */ + "grid-template-areas"?: Property.GridTemplateAreas | undefined; + /** + * The **`grid-template-columns`** CSS property defines the line names and track sizing functions of the grid columns. + * + * **Syntax**: `none | <track-list> | <auto-track-list> | subgrid <line-name-list>?` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-------------------------: | + * | **57** | **52** | **10.1** | **16** | **10** _(-ms-grid-columns)_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-columns + */ + "grid-template-columns"?: Property.GridTemplateColumns<TLength> | undefined; + /** + * The **`grid-template-rows`** CSS property defines the line names and track sizing functions of the grid rows. + * + * **Syntax**: `none | <track-list> | <auto-track-list> | subgrid <line-name-list>?` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :----------------------: | + * | **57** | **52** | **10.1** | **16** | **10** _(-ms-grid-rows)_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-rows + */ + "grid-template-rows"?: Property.GridTemplateRows<TLength> | undefined; + /** + * The **`hanging-punctuation`** CSS property specifies whether a punctuation mark should hang at the start or end of a line of text. Hanging punctuation may be placed outside the line box. + * + * **Syntax**: `none | [ first || [ force-end | allow-end ] || last ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | No | **10** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation + */ + "hanging-punctuation"?: Property.HangingPunctuation | undefined; + /** + * The **`height`** CSS property specifies the height of an element. By default, the property defines the height of the content area. If `box-sizing` is set to `border-box`, however, it instead determines the height of the border area. + * + * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/height + */ + height?: Property.Height<TLength> | undefined; + /** + * The **`hyphenate-character`** CSS property sets the character (or string) used at the end of a line before a hyphenation break. + * + * **Syntax**: `auto | <string>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :--: | :-: | + * | **106** | **98** | **17** | n/a | No | + * | 6 _-x-_ | | 5.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/hyphenate-character + */ + "hyphenate-character"?: Property.HyphenateCharacter | undefined; + /** + * The **`hyphenate-limit-chars`** CSS property specifies the minimum word length to allow hyphenation of words as well as the the minimum number of characters before and after the hyphen. + * + * **Syntax**: `[ auto | <integer> ]{1,3}` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **109** | No | No | n/a | No | + */ + "hyphenate-limit-chars"?: Property.HyphenateLimitChars | undefined; + /** + * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. + * + * **Syntax**: `none | manual | auto` + * + * **Initial value**: `manual` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-------: | :----: | :----------: | + * | **55** | **43** | **17** | **79** | **10** _-x-_ | + * | 13 _-x-_ | 6 _-x-_ | 5.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/hyphens + */ + hyphens?: Property.Hyphens | undefined; + /** + * The **`image-orientation`** CSS property specifies a layout-independent correction to the orientation of an image. + * + * **Syntax**: `from-image | <angle> | [ <angle>? flip ]` + * + * **Initial value**: `from-image` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **81** | **26** | **13.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/image-orientation + */ + "image-orientation"?: Property.ImageOrientation | undefined; + /** + * The **`image-rendering`** CSS property sets an image scaling algorithm. The property applies to an element itself, to any images set in its other properties, and to its descendants. + * + * **Syntax**: `auto | crisp-edges | pixelated` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **13** | **3.6** | **6** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/image-rendering + */ + "image-rendering"?: Property.ImageRendering | undefined; + /** + * **Syntax**: `[ from-image || <resolution> ] && snap?` + * + * **Initial value**: `1dppx` + */ + "image-resolution"?: Property.ImageResolution | undefined; + /** + * The `initial-letter` CSS property sets styling for dropped, raised, and sunken initial letters. + * + * **Syntax**: `normal | [ <number> <integer>? ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :---------: | :--: | :-: | + * | **110** | No | **9** _-x-_ | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/initial-letter + */ + "initial-letter"?: Property.InitialLetter | undefined; + /** + * The **`inline-size`** CSS property defines the horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `width` or the `height` property, depending on the value of `writing-mode`. + * + * **Syntax**: `<'width'>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **57** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inline-size + */ + "inline-size"?: Property.InlineSize<TLength> | undefined; + /** + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + */ + "input-security"?: Property.InputSecurity | undefined; + /** + * The **`inset-block-end`** CSS property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **63** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset-block-end + */ + "inset-block-end"?: Property.InsetBlockEnd<TLength> | undefined; + /** + * The **`inset-block-start`** CSS property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **63** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset-block-start + */ + "inset-block-start"?: Property.InsetBlockStart<TLength> | undefined; + /** + * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **63** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline-end + */ + "inset-inline-end"?: Property.InsetInlineEnd<TLength> | undefined; + /** + * The **`inset-inline-start`** CSS property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **63** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline-start + */ + "inset-inline-start"?: Property.InsetInlineStart<TLength> | undefined; + /** + * The **`isolation`** CSS property determines whether an element must create a new stacking context. + * + * **Syntax**: `auto | isolate` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **41** | **36** | **8** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/isolation + */ + isolation?: Property.Isolation | undefined; + /** + * The CSS **`justify-content`** property defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container. + * + * **Syntax**: `normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **29** | **20** | **9** | **12** | **11** | + * | 21 _-x-_ | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/justify-content + */ + "justify-content"?: Property.JustifyContent | undefined; + /** + * The CSS **`justify-items`** property defines the default `justify-self` for all items of the box, giving them all a default way of justifying each box along the appropriate axis. + * + * **Syntax**: `normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]` + * + * **Initial value**: `legacy` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **52** | **20** | **9** | **12** | **11** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/justify-items + */ + "justify-items"?: Property.JustifyItems | undefined; + /** + * The CSS **`justify-self`** property sets the way a box is justified inside its alignment container along the appropriate axis. + * + * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ]` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :----: | + * | **57** | **45** | **10.1** | **16** | **10** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/justify-self + */ + "justify-self"?: Property.JustifySelf | undefined; + /** + * The **`justify-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their inline axis. + * + * **Syntax**: `[ normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ] ]#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/justify-tracks + */ + "justify-tracks"?: Property.JustifyTracks | undefined; + /** + * The **`left`** CSS property participates in specifying the horizontal position of a positioned element. It has no effect on non-positioned elements. + * + * **Syntax**: `<length> | <percentage> | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/left + */ + left?: Property.Left<TLength> | undefined; + /** + * The **`letter-spacing`** CSS property sets the horizontal spacing behavior between text characters. This value is added to the natural spacing between characters while rendering the text. Positive values of `letter-spacing` causes characters to spread farther apart, while negative values of `letter-spacing` bring characters closer together. + * + * **Syntax**: `normal | <length>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/letter-spacing + */ + "letter-spacing"?: Property.LetterSpacing<TLength> | undefined; + /** + * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. + * + * **Syntax**: `auto | loose | normal | strict | anywhere` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :-----: | + * | **58** | **69** | **11** | **14** | **5.5** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/line-break + */ + "line-break"?: Property.LineBreak | undefined; + /** + * The **`line-height`** CSS property sets the height of a line box. It's commonly used to set the distance between lines of text. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height. + * + * **Syntax**: `normal | <number> | <length> | <percentage>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/line-height + */ + "line-height"?: Property.LineHeight<TLength> | undefined; + /** + * The **`line-height-step`** CSS property sets the step unit for line box heights. When the property is set, line box heights are rounded up to the closest multiple of the unit. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | n/a | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/line-height-step + */ + "line-height-step"?: Property.LineHeightStep<TLength> | undefined; + /** + * The **`list-style-image`** CSS property sets an image to be used as the list item marker. + * + * **Syntax**: `<image> | none` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/list-style-image + */ + "list-style-image"?: Property.ListStyleImage | undefined; + /** + * The **`list-style-position`** CSS property sets the position of the `::marker` relative to a list item. + * + * **Syntax**: `inside | outside` + * + * **Initial value**: `outside` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/list-style-position + */ + "list-style-position"?: Property.ListStylePosition | undefined; + /** + * The **`list-style-type`** CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element. + * + * **Syntax**: `<counter-style> | <string> | none` + * + * **Initial value**: `disc` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/list-style-type + */ + "list-style-type"?: Property.ListStyleType | undefined; + /** + * The **`margin-block-end`** CSS property defines the logical block end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'margin-left'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-block-end + */ + "margin-block-end"?: Property.MarginBlockEnd<TLength> | undefined; + /** + * The **`margin-block-start`** CSS property defines the logical block start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'margin-left'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-block-start + */ + "margin-block-start"?: Property.MarginBlockStart<TLength> | undefined; + /** + * The **`margin-bottom`** CSS property sets the margin area on the bottom of an element. A positive value places it farther from its neighbors, while a negative value places it closer. + * + * **Syntax**: `<length> | <percentage> | auto` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-bottom + */ + "margin-bottom"?: Property.MarginBottom<TLength> | undefined; + /** + * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'margin-left'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----------------------: | :-------------------: | :----------------------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * | 2 _(-webkit-margin-end)_ | 3 _(-moz-margin-end)_ | 3 _(-webkit-margin-end)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline-end + */ + "margin-inline-end"?: Property.MarginInlineEnd<TLength> | undefined; + /** + * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'margin-left'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------: | :---------------------: | :------------------------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * | 2 _(-webkit-margin-start)_ | 3 _(-moz-margin-start)_ | 3 _(-webkit-margin-start)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline-start + */ + "margin-inline-start"?: Property.MarginInlineStart<TLength> | undefined; + /** + * The **`margin-left`** CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. + * + * **Syntax**: `<length> | <percentage> | auto` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-left + */ + "margin-left"?: Property.MarginLeft<TLength> | undefined; + /** + * The **`margin-right`** CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. + * + * **Syntax**: `<length> | <percentage> | auto` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-right + */ + "margin-right"?: Property.MarginRight<TLength> | undefined; + /** + * The **`margin-top`** CSS property sets the margin area on the top of an element. A positive value places it farther from its neighbors, while a negative value places it closer. + * + * **Syntax**: `<length> | <percentage> | auto` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-top + */ + "margin-top"?: Property.MarginTop<TLength> | undefined; + /** + * The `margin-trim` property allows the container to trim the margins of its children where they adjoin the container's edges. + * + * **Syntax**: `none | in-flow | all` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | No | No | **16.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-trim + */ + "margin-trim"?: Property.MarginTrim | undefined; + /** + * The **`mask-border-mode`** CSS property specifies the blending mode used in a mask border. + * + * **Syntax**: `luminance | alpha` + * + * **Initial value**: `alpha` + */ + "mask-border-mode"?: Property.MaskBorderMode | undefined; + /** + * The **`mask-border-outset`** CSS property specifies the distance by which an element's mask border is set out from its border box. + * + * **Syntax**: `[ <length> | <number> ]{1,4}` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-------------------------------------: | :-----: | :-----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-outset)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-outset)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-outset + */ + "mask-border-outset"?: Property.MaskBorderOutset<TLength> | undefined; + /** + * The **`mask-border-repeat`** CSS property sets how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border. + * + * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` + * + * **Initial value**: `stretch` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-------------------------------------: | :-----: | :-----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-repeat)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-repeat)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-repeat + */ + "mask-border-repeat"?: Property.MaskBorderRepeat | undefined; + /** + * The **`mask-border-slice`** CSS property divides the image set by `mask-border-source` into regions. These regions are used to form the components of an element's mask border. + * + * **Syntax**: `<number-percentage>{1,4} fill?` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------------------: | :-----: | :----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-slice)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-slice)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-slice + */ + "mask-border-slice"?: Property.MaskBorderSlice | undefined; + /** + * The **`mask-border-source`** CSS property sets the source image used to create an element's mask border. + * + * **Syntax**: `none | <image>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-------------------------------------: | :-----: | :-----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-source)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-source)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-source + */ + "mask-border-source"?: Property.MaskBorderSource | undefined; + /** + * The **`mask-border-width`** CSS property sets the width of an element's mask border. + * + * **Syntax**: `[ <length-percentage> | <number> | auto ]{1,4}` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------------------: | :-----: | :----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-width)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-width)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-width + */ + "mask-border-width"?: Property.MaskBorderWidth<TLength> | undefined; + /** + * The **`mask-clip`** CSS property determines the area which is affected by a mask. The painted content of an element must be restricted to this area. + * + * **Syntax**: `[ <geometry-box> | no-clip ]#` + * + * **Initial value**: `border-box` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **120** | **53** | **15.4** | n/a | No | + * | 1 _-x-_ | | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-clip + */ + "mask-clip"?: Property.MaskClip | undefined; + /** + * The **`mask-composite`** CSS property represents a compositing operation used on the current mask layer with the mask layers below it. + * + * **Syntax**: `<compositing-operator>#` + * + * **Initial value**: `add` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :---: | :-: | + * | **120** | **53** | **15.4** | 18-79 | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-composite + */ + "mask-composite"?: Property.MaskComposite | undefined; + /** + * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. By default this means the alpha channel of the mask image will be multiplied with the alpha channel of the element. This can be controlled with the `mask-mode` property. + * + * **Syntax**: `<mask-reference>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :---: | :-: | + * | **120** | **53** | **15.4** | 16-79 | No | + * | 1 _-x-_ | | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-image + */ + "mask-image"?: Property.MaskImage | undefined; + /** + * The **`mask-mode`** CSS property sets whether the mask reference defined by `mask-image` is treated as a luminance or alpha mask. + * + * **Syntax**: `<masking-mode>#` + * + * **Initial value**: `match-source` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **120** | **53** | **15.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-mode + */ + "mask-mode"?: Property.MaskMode | undefined; + /** + * The **`mask-origin`** CSS property sets the origin of a mask. + * + * **Syntax**: `<geometry-box>#` + * + * **Initial value**: `border-box` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **120** | **53** | **15.4** | n/a | No | + * | 1 _-x-_ | | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-origin + */ + "mask-origin"?: Property.MaskOrigin | undefined; + /** + * The **`mask-position`** CSS property sets the initial position, relative to the mask position layer set by `mask-origin`, for each defined mask image. + * + * **Syntax**: `<position>#` + * + * **Initial value**: `center` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :---: | :-: | + * | **120** | **53** | **15.4** | 18-79 | No | + * | 1 _-x-_ | | 3.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-position + */ + "mask-position"?: Property.MaskPosition<TLength> | undefined; + /** + * The **`mask-repeat`** CSS property sets how mask images are repeated. A mask image can be repeated along the horizontal axis, the vertical axis, both axes, or not repeated at all. + * + * **Syntax**: `<repeat-style>#` + * + * **Initial value**: `repeat` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :---: | :-: | + * | **120** | **53** | **15.4** | 18-79 | No | + * | 1 _-x-_ | | 3.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-repeat + */ + "mask-repeat"?: Property.MaskRepeat | undefined; + /** + * The **`mask-size`** CSS property specifies the sizes of the mask images. The size of the image can be fully or partially constrained in order to preserve its intrinsic ratio. + * + * **Syntax**: `<bg-size>#` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :---: | :-: | + * | **120** | **53** | **15.4** | 18-79 | No | + * | 4 _-x-_ | | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-size + */ + "mask-size"?: Property.MaskSize<TLength> | undefined; + /** + * The **`mask-type`** CSS property sets whether an SVG `<mask>` element is used as a _luminance_ or an _alpha_ mask. It applies to the `<mask>` element itself. + * + * **Syntax**: `luminance | alpha` + * + * **Initial value**: `luminance` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **24** | **35** | **7** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-type + */ + "mask-type"?: Property.MaskType | undefined; + /** + * This feature is not Baseline because it does not work in some of the most widely-used browsers. + * + * **Syntax**: `[ pack | next ] || [ definite-first | ordered ]` + * + * **Initial value**: `pack` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :---------: | :--: | :-: | + * | No | No | **preview** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/masonry-auto-flow + */ + "masonry-auto-flow"?: Property.MasonryAutoFlow | undefined; + /** + * The **`math-depth`** property describes a notion of _depth_ for each element of a mathematical formula, with respect to the top-level container of that formula. Concretely, this is used to determine the computed value of the font-size property when its specified value is `math`. + * + * **Syntax**: `auto-add | add(<integer>) | <integer>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **109** | **117** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/math-depth + */ + "math-depth"?: Property.MathDepth | undefined; + /** + * The `math-shift` property indicates whether superscripts inside MathML formulas should be raised by a normal or compact shift. + * + * **Syntax**: `normal | compact` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **109** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/math-shift + */ + "math-shift"?: Property.MathShift | undefined; + /** + * The `math-style` property indicates whether MathML equations should render with normal or compact height. + * + * **Syntax**: `normal | compact` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **109** | **117** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/math-style + */ + "math-style"?: Property.MathStyle | undefined; + /** + * The **`max-block-size`** CSS property specifies the maximum size of an element in the direction opposite that of the writing direction as specified by `writing-mode`. That is, if the writing direction is horizontal, then `max-block-size` is equivalent to `max-height`; if the writing direction is vertical, `max-block-size` is the same as `max-width`. + * + * **Syntax**: `<'max-width'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **57** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/max-block-size + */ + "max-block-size"?: Property.MaxBlockSize<TLength> | undefined; + /** + * The **`max-height`** CSS property sets the maximum height of an element. It prevents the used value of the `height` property from becoming larger than the value specified for `max-height`. + * + * **Syntax**: `none | <length-percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **18** | **1** | **1.3** | **12** | **7** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/max-height + */ + "max-height"?: Property.MaxHeight<TLength> | undefined; + /** + * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block, depending on its writing mode. It corresponds to either the `max-width` or the `max-height` property, depending on the value of `writing-mode`. + * + * **Syntax**: `<'max-width'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :--------: | :--: | :-: | + * | **57** | **41** | **12.1** | n/a | No | + * | | | 10.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/max-inline-size + */ + "max-inline-size"?: Property.MaxInlineSize<TLength> | undefined; + /** + * **Syntax**: `none | <integer>` + * + * **Initial value**: `none` + */ + "max-lines"?: Property.MaxLines | undefined; + /** + * The **`max-width`** CSS property sets the maximum width of an element. It prevents the used value of the `width` property from becoming larger than the value specified by `max-width`. + * + * **Syntax**: `none | <length-percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **7** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/max-width + */ + "max-width"?: Property.MaxWidth<TLength> | undefined; + /** + * The **`min-block-size`** CSS property defines the minimum horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `min-width` or the `min-height` property, depending on the value of `writing-mode`. + * + * **Syntax**: `<'min-width'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **57** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/min-block-size + */ + "min-block-size"?: Property.MinBlockSize<TLength> | undefined; + /** + * The **`min-height`** CSS property sets the minimum height of an element. It prevents the used value of the `height` property from becoming smaller than the value specified for `min-height`. + * + * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **3** | **1.3** | **12** | **7** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/min-height + */ + "min-height"?: Property.MinHeight<TLength> | undefined; + /** + * The **`min-inline-size`** CSS property defines the horizontal or vertical minimal size of an element's block, depending on its writing mode. It corresponds to either the `min-width` or the `min-height` property, depending on the value of `writing-mode`. + * + * **Syntax**: `<'min-width'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **57** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/min-inline-size + */ + "min-inline-size"?: Property.MinInlineSize<TLength> | undefined; + /** + * The **`min-width`** CSS property sets the minimum width of an element. It prevents the used value of the `width` property from becoming smaller than the value specified for `min-width`. + * + * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **7** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/min-width + */ + "min-width"?: Property.MinWidth<TLength> | undefined; + /** + * The **`mix-blend-mode`** CSS property sets how an element's content should blend with the content of the element's parent and the element's background. + * + * **Syntax**: `<blend-mode> | plus-lighter` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **41** | **32** | **8** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode + */ + "mix-blend-mode"?: Property.MixBlendMode | undefined; + /** + * The **`offset-distance`** CSS property specifies a position along an `offset-path` for an element to be placed. + * + * **Syntax**: `<length-percentage>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :--------------------: | :-----: | :----: | :--: | :-: | + * | **55** | **72** | **16** | n/a | No | + * | 46 _(motion-distance)_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-distance + */ + "motion-distance"?: Property.OffsetDistance<TLength> | undefined; + /** + * The **`offset-path`** CSS property specifies a motion path for an element to follow and defines the element's positioning within the parent container or SVG coordinate system. + * + * **Syntax**: `none | <offset-path> || <coord-box>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----------------: | :-----: | :------: | :--: | :-: | + * | **55** | **72** | **15.4** | n/a | No | + * | 46 _(motion-path)_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-path + */ + "motion-path"?: Property.OffsetPath | undefined; + /** + * The **`offset-rotate`** CSS property defines the orientation/direction of the element as it is positioned along the `offset-path`. + * + * **Syntax**: `[ auto | reverse ] || <angle>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :--------------------: | :-----: | :----: | :--: | :-: | + * | **56** | **72** | **16** | n/a | No | + * | 46 _(motion-rotation)_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate + */ + "motion-rotation"?: Property.OffsetRotate | undefined; + /** + * The **`object-fit`** CSS property sets how the content of a replaced element, such as an `<img>` or `<video>`, should be resized to fit its container. + * + * **Syntax**: `fill | contain | cover | none | scale-down` + * + * **Initial value**: `fill` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-: | + * | **32** | **36** | **10** | **79** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/object-fit + */ + "object-fit"?: Property.ObjectFit | undefined; + /** + * The **`object-position`** CSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background. + * + * **Syntax**: `<position>` + * + * **Initial value**: `50% 50%` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-: | + * | **32** | **36** | **10** | **79** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/object-position + */ + "object-position"?: Property.ObjectPosition<TLength> | undefined; + /** + * **Syntax**: `auto | <position>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **116** | **72** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-anchor + */ + "offset-anchor"?: Property.OffsetAnchor<TLength> | undefined; + /** + * The **`offset-distance`** CSS property specifies a position along an `offset-path` for an element to be placed. + * + * **Syntax**: `<length-percentage>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :--------------------: | :-----: | :----: | :--: | :-: | + * | **55** | **72** | **16** | n/a | No | + * | 46 _(motion-distance)_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-distance + */ + "offset-distance"?: Property.OffsetDistance<TLength> | undefined; + /** + * The **`offset-path`** CSS property specifies a motion path for an element to follow and defines the element's positioning within the parent container or SVG coordinate system. + * + * **Syntax**: `none | <offset-path> || <coord-box>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----------------: | :-----: | :------: | :--: | :-: | + * | **55** | **72** | **15.4** | n/a | No | + * | 46 _(motion-path)_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-path + */ + "offset-path"?: Property.OffsetPath | undefined; + /** + * **Syntax**: `normal | auto | <position>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **116** | n/a | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-position + */ + "offset-position"?: Property.OffsetPosition<TLength> | undefined; + /** + * The **`offset-rotate`** CSS property defines the orientation/direction of the element as it is positioned along the `offset-path`. + * + * **Syntax**: `[ auto | reverse ] || <angle>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :--------------------: | :-----: | :----: | :--: | :-: | + * | **56** | **72** | **16** | n/a | No | + * | 46 _(motion-rotation)_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate + */ + "offset-rotate"?: Property.OffsetRotate | undefined; + /** + * The **`offset-rotate`** CSS property defines the orientation/direction of the element as it is positioned along the `offset-path`. + * + * **Syntax**: `[ auto | reverse ] || <angle>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :--------------------: | :-----: | :----: | :--: | :-: | + * | **56** | **72** | **16** | n/a | No | + * | 46 _(motion-rotation)_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate + */ + "offset-rotation"?: Property.OffsetRotate | undefined; + /** + * The **`opacity`** CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. + * + * **Syntax**: `<alpha-value>` + * + * **Initial value**: `1` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **2** | **12** | **9** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/opacity + */ + opacity?: Property.Opacity | undefined; + /** + * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :------: | + * | **29** | **20** | **9** | **12** | **11** | + * | 21 _-x-_ | | 7 _-x-_ | | 10 _-x-_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/order + */ + order?: Property.Order | undefined; + /** + * The **`orphans`** CSS property sets the minimum number of lines in a block container that must be shown at the _bottom_ of a page, region, or column. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `2` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **25** | No | **1.3** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/orphans + */ + orphans?: Property.Orphans | undefined; + /** + * The **`outline-color`** CSS property sets the color of an element's outline. + * + * **Syntax**: `<color> | invert` + * + * **Initial value**: `invert`, for browsers supporting it, `currentColor` for the other + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **1.5** | **1.2** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/outline-color + */ + "outline-color"?: Property.OutlineColor | undefined; + /** + * The **`outline-offset`** CSS property sets the amount of space between an outline and the edge or border of an element. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :-: | + * | **1** | **1.5** | **1.2** | **15** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/outline-offset + */ + "outline-offset"?: Property.OutlineOffset<TLength> | undefined; + /** + * The **`outline-style`** CSS property sets the style of an element's outline. An outline is a line that is drawn around an element, outside the `border`. + * + * **Syntax**: `auto | <'border-style'>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **1.5** | **1.2** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/outline-style + */ + "outline-style"?: Property.OutlineStyle | undefined; + /** + * The CSS **`outline-width`** property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. + * + * **Syntax**: `<line-width>` + * + * **Initial value**: `medium` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **1.5** | **1.2** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/outline-width + */ + "outline-width"?: Property.OutlineWidth<TLength> | undefined; + /** + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **56** | **66** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overflow-anchor + */ + "overflow-anchor"?: Property.OverflowAnchor | undefined; + /** + * **Syntax**: `visible | hidden | clip | scroll | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | **69** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overflow-block + */ + "overflow-block"?: Property.OverflowBlock | undefined; + /** + * The **`overflow-clip-box`** CSS property specifies relative to which box the clipping happens when there is an overflow. It is short hand for the `overflow-clip-box-inline` and `overflow-clip-box-block` properties. + * + * **Syntax**: `padding-box | content-box` + * + * **Initial value**: `padding-box` + */ + "overflow-clip-box"?: Property.OverflowClipBox | undefined; + /** + * **Syntax**: `<visual-box> || <length [0,∞]>` + * + * **Initial value**: `0px` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **90** | **102** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overflow-clip-margin + */ + "overflow-clip-margin"?: Property.OverflowClipMargin<TLength> | undefined; + /** + * **Syntax**: `visible | hidden | clip | scroll | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | **69** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overflow-inline + */ + "overflow-inline"?: Property.OverflowInline | undefined; + /** + * The **`overflow-wrap`** CSS property applies to inline elements, setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box. + * + * **Syntax**: `normal | break-word | anywhere` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-------------: | :---------------: | :-------------: | :--------------: | :-------------------: | + * | **23** | **49** | **7** | **18** | **5.5** _(word-wrap)_ | + * | 1 _(word-wrap)_ | 3.5 _(word-wrap)_ | 1 _(word-wrap)_ | 12 _(word-wrap)_ | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overflow-wrap + */ + "overflow-wrap"?: Property.OverflowWrap | undefined; + /** + * The **`overflow-x`** CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content. + * + * **Syntax**: `visible | hidden | clip | scroll | auto` + * + * **Initial value**: `visible` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **3.5** | **3** | **12** | **5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overflow-x + */ + "overflow-x"?: Property.OverflowX | undefined; + /** + * The **`overflow-y`** CSS property sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content. + * + * **Syntax**: `visible | hidden | clip | scroll | auto` + * + * **Initial value**: `visible` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **3.5** | **3** | **12** | **5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overflow-y + */ + "overflow-y"?: Property.OverflowY | undefined; + /** + * The **`overlay`** CSS property specifies whether an element appearing in the top layer (for example, a shown popover or modal `<dialog>` element) is actually rendered in the top layer. This property is only relevant within a list of `transition-property` values, and only if `allow-discrete` is set as the `transition-behavior`. + * + * **Syntax**: `none | auto` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **117** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overlay + */ + overlay?: Property.Overlay | undefined; + /** + * The **`overscroll-behavior-block`** CSS property sets the browser's behavior when the block direction boundary of a scrolling area is reached. + * + * **Syntax**: `contain | none | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **77** | **73** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block + */ + "overscroll-behavior-block"?: Property.OverscrollBehaviorBlock | undefined; + /** + * The **`overscroll-behavior-inline`** CSS property sets the browser's behavior when the inline direction boundary of a scrolling area is reached. + * + * **Syntax**: `contain | none | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **77** | **73** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline + */ + "overscroll-behavior-inline"?: Property.OverscrollBehaviorInline | undefined; + /** + * The **`overscroll-behavior-x`** CSS property sets the browser's behavior when the horizontal boundary of a scrolling area is reached. + * + * **Syntax**: `contain | none | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-: | + * | **63** | **59** | **16** | **18** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x + */ + "overscroll-behavior-x"?: Property.OverscrollBehaviorX | undefined; + /** + * The **`overscroll-behavior-y`** CSS property sets the browser's behavior when the vertical boundary of a scrolling area is reached. + * + * **Syntax**: `contain | none | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-: | + * | **63** | **59** | **16** | **18** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y + */ + "overscroll-behavior-y"?: Property.OverscrollBehaviorY | undefined; + /** + * The **`padding-block-end`** CSS property defines the logical block end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-block-end + */ + "padding-block-end"?: Property.PaddingBlockEnd<TLength> | undefined; + /** + * The **`padding-block-start`** CSS property defines the logical block start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-block-start + */ + "padding-block-start"?: Property.PaddingBlockStart<TLength> | undefined; + /** + * The **`padding-bottom`** CSS property sets the height of the padding area on the bottom of an element. + * + * **Syntax**: `<length> | <percentage>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-bottom + */ + "padding-bottom"?: Property.PaddingBottom<TLength> | undefined; + /** + * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----------------------: | :--------------------: | :-----------------------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * | 2 _(-webkit-padding-end)_ | 3 _(-moz-padding-end)_ | 3 _(-webkit-padding-end)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline-end + */ + "padding-inline-end"?: Property.PaddingInlineEnd<TLength> | undefined; + /** + * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-------------------------: | :----------------------: | :-------------------------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * | 2 _(-webkit-padding-start)_ | 3 _(-moz-padding-start)_ | 3 _(-webkit-padding-start)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline-start + */ + "padding-inline-start"?: Property.PaddingInlineStart<TLength> | undefined; + /** + * The **`padding-left`** CSS property sets the width of the padding area to the left of an element. + * + * **Syntax**: `<length> | <percentage>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-left + */ + "padding-left"?: Property.PaddingLeft<TLength> | undefined; + /** + * The **`padding-right`** CSS property sets the width of the padding area on the right of an element. + * + * **Syntax**: `<length> | <percentage>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-right + */ + "padding-right"?: Property.PaddingRight<TLength> | undefined; + /** + * The **`padding-top`** CSS property sets the height of the padding area on the top of an element. + * + * **Syntax**: `<length> | <percentage>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-top + */ + "padding-top"?: Property.PaddingTop<TLength> | undefined; + /** + * The **`page`** CSS property is used to specify the named page, a specific type of page defined by the `@page` at-rule. + * + * **Syntax**: `auto | <custom-ident>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-------: | :--: | :-: | + * | **85** | **110** | **≤13.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/page + */ + page?: Property.Page | undefined; + /** + * The **`page-break-after`** CSS property adjusts page breaks _after_ the current element. + * + * **Syntax**: `auto | always | avoid | left | right | recto | verso` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **1** | **1.2** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/page-break-after + */ + "page-break-after"?: Property.PageBreakAfter | undefined; + /** + * The **`page-break-before`** CSS property adjusts page breaks _before_ the current element. + * + * **Syntax**: `auto | always | avoid | left | right | recto | verso` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **1** | **1.2** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/page-break-before + */ + "page-break-before"?: Property.PageBreakBefore | undefined; + /** + * The **`page-break-inside`** CSS property adjusts page breaks _inside_ the current element. + * + * **Syntax**: `auto | avoid` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **19** | **1.3** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/page-break-inside + */ + "page-break-inside"?: Property.PageBreakInside | undefined; + /** + * The **`paint-order`** CSS property lets you control the order in which the fill and stroke (and painting markers) of text content and shapes are drawn. + * + * **Syntax**: `normal | [ fill || stroke || markers ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-: | + * | **35** | **60** | **8** | **17** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/paint-order + */ + "paint-order"?: Property.PaintOrder | undefined; + /** + * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. + * + * **Syntax**: `none | <length>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **36** | **16** | **9** | **12** | **10** | + * | 12 _-x-_ | | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/perspective + */ + perspective?: Property.Perspective<TLength> | undefined; + /** + * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. + * + * **Syntax**: `<position>` + * + * **Initial value**: `50% 50%` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **36** | **16** | **9** | **12** | **10** | + * | 12 _-x-_ | | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/perspective-origin + */ + "perspective-origin"?: Property.PerspectiveOrigin<TLength> | undefined; + /** + * The **`pointer-events`** CSS property sets under what circumstances (if any) a particular graphic element can become the target of pointer events. + * + * **Syntax**: `auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :----: | + * | **1** | **1.5** | **4** | **12** | **11** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/pointer-events + */ + "pointer-events"?: Property.PointerEvents | undefined; + /** + * The **`position`** CSS property sets how an element is positioned in a document. The `top`, `right`, `bottom`, and `left` properties determine the final location of positioned elements. + * + * **Syntax**: `static | relative | absolute | sticky | fixed` + * + * **Initial value**: `static` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/position + */ + position?: Property.Position | undefined; + /** + * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. + * + * **Syntax**: `economy | exact` + * + * **Initial value**: `economy` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----------: | :-----------------: | :------: | :----------: | :-: | + * | **17** _-x-_ | **97** | **15.4** | **79** _-x-_ | No | + * | | 48 _(color-adjust)_ | 6 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/print-color-adjust + */ + "print-color-adjust"?: Property.PrintColorAdjust | undefined; + /** + * The **`quotes`** CSS property sets how the browser should render quotation marks that are added using the `open-quotes` or `close-quotes` values of the CSS `content` property. + * + * **Syntax**: `none | auto | [ <string> <string> ]+` + * + * **Initial value**: depends on user agent + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **11** | **1.5** | **9** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/quotes + */ + quotes?: Property.Quotes | undefined; + /** + * The **`resize`** CSS property sets whether an element is resizable, and if so, in which directions. + * + * **Syntax**: `none | both | horizontal | vertical | block | inline` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **1** | **4** | **3** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/resize + */ + resize?: Property.Resize | undefined; + /** + * The **`right`** CSS property participates in specifying the horizontal position of a positioned element. It has no effect on non-positioned elements. + * + * **Syntax**: `<length> | <percentage> | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/right + */ + right?: Property.Right<TLength> | undefined; + /** + * The **`rotate`** CSS property allows you to specify rotation transforms individually and independently of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` property. + * + * **Syntax**: `none | <angle> | [ x | y | z | <number>{3} ] && <angle>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **104** | **72** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/rotate + */ + rotate?: Property.Rotate | undefined; + /** + * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's rows. + * + * **Syntax**: `normal | <length-percentage>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **47** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/row-gap + */ + "row-gap"?: Property.RowGap<TLength> | undefined; + /** + * The **`ruby-align`** CSS property defines the distribution of the different ruby elements over the base. + * + * **Syntax**: `start | center | space-between | space-around` + * + * **Initial value**: `space-around` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | **38** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/ruby-align + */ + "ruby-align"?: Property.RubyAlign | undefined; + /** + * **Syntax**: `separate | collapse | auto` + * + * **Initial value**: `separate` + */ + "ruby-merge"?: Property.RubyMerge | undefined; + /** + * The **`ruby-position`** CSS property defines the position of a ruby element relatives to its base element. It can be positioned over the element (`over`), under it (`under`), or between the characters on their right side (`inter-character`). + * + * **Syntax**: `[ alternate || [ over | under ] ] | inter-character` + * + * **Initial value**: `alternate` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :---------: | :---: | :-: | + * | **84** | **38** | **7** _-x-_ | 12-79 | No | + * | 1 _-x-_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/ruby-position + */ + "ruby-position"?: Property.RubyPosition | undefined; + /** + * The **`scale`** CSS property allows you to specify scale transforms individually and independently of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. + * + * **Syntax**: `none | <number>{1,3}` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **104** | **72** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scale + */ + scale?: Property.Scale | undefined; + /** + * The **`scroll-behavior`** CSS property sets the behavior for a scrolling box when scrolling is triggered by the navigation or CSSOM scrolling APIs. + * + * **Syntax**: `auto | smooth` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **61** | **36** | **15.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-behavior + */ + "scroll-behavior"?: Property.ScrollBehavior | undefined; + /** + * The `scroll-margin-block-end` property defines the margin of the scroll snap area at the end of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end + */ + "scroll-margin-block-end"?: Property.ScrollMarginBlockEnd<TLength> | undefined; + /** + * The `scroll-margin-block-start` property defines the margin of the scroll snap area at the start of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start + */ + "scroll-margin-block-start"?: Property.ScrollMarginBlockStart<TLength> | undefined; + /** + * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------------------------------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin-bottom)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom + */ + "scroll-margin-bottom"?: Property.ScrollMarginBottom<TLength> | undefined; + /** + * The `scroll-margin-inline-end` property defines the margin of the scroll snap area at the end of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end + */ + "scroll-margin-inline-end"?: Property.ScrollMarginInlineEnd<TLength> | undefined; + /** + * The `scroll-margin-inline-start` property defines the margin of the scroll snap area at the start of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start + */ + "scroll-margin-inline-start"?: Property.ScrollMarginInlineStart<TLength> | undefined; + /** + * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----------------------------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin-left)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left + */ + "scroll-margin-left"?: Property.ScrollMarginLeft<TLength> | undefined; + /** + * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----------------------------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin-right)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right + */ + "scroll-margin-right"?: Property.ScrollMarginRight<TLength> | undefined; + /** + * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :---------------------------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin-top)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top + */ + "scroll-margin-top"?: Property.ScrollMarginTop<TLength> | undefined; + /** + * The `scroll-padding-block-end` property defines offsets for the end edge in the block dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. + * + * **Syntax**: `auto | <length-percentage>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end + */ + "scroll-padding-block-end"?: Property.ScrollPaddingBlockEnd<TLength> | undefined; + /** + * The `scroll-padding-block-start` property defines offsets for the start edge in the block dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. + * + * **Syntax**: `auto | <length-percentage>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start + */ + "scroll-padding-block-start"?: Property.ScrollPaddingBlockStart<TLength> | undefined; + /** + * The `scroll-padding-bottom` property defines offsets for the bottom of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. + * + * **Syntax**: `auto | <length-percentage>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom + */ + "scroll-padding-bottom"?: Property.ScrollPaddingBottom<TLength> | undefined; + /** + * The `scroll-padding-inline-end` property defines offsets for the end edge in the inline dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. + * + * **Syntax**: `auto | <length-percentage>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end + */ + "scroll-padding-inline-end"?: Property.ScrollPaddingInlineEnd<TLength> | undefined; + /** + * The `scroll-padding-inline-start` property defines offsets for the start edge in the inline dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. + * + * **Syntax**: `auto | <length-percentage>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start + */ + "scroll-padding-inline-start"?: Property.ScrollPaddingInlineStart<TLength> | undefined; + /** + * The `scroll-padding-left` property defines offsets for the left of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. + * + * **Syntax**: `auto | <length-percentage>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left + */ + "scroll-padding-left"?: Property.ScrollPaddingLeft<TLength> | undefined; + /** + * The `scroll-padding-right` property defines offsets for the right of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. + * + * **Syntax**: `auto | <length-percentage>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right + */ + "scroll-padding-right"?: Property.ScrollPaddingRight<TLength> | undefined; + /** + * The **`scroll-padding-top`** property defines offsets for the top of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. + * + * **Syntax**: `auto | <length-percentage>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top + */ + "scroll-padding-top"?: Property.ScrollPaddingTop<TLength> | undefined; + /** + * The `scroll-snap-align` property specifies the box's snap position as an alignment of its snap area (as the alignment subject) within its snap container's snapport (as the alignment container). The two values specify the snapping alignment in the block axis and inline axis, respectively. If only one value is specified, the second value defaults to the same value. + * + * **Syntax**: `[ none | start | end | center ]{1,2}` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **11** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align + */ + "scroll-snap-align"?: Property.ScrollSnapAlign | undefined; + /** + * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------------------------------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin-bottom)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom + */ + "scroll-snap-margin-bottom"?: Property.ScrollMarginBottom<TLength> | undefined; + /** + * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----------------------------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin-left)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left + */ + "scroll-snap-margin-left"?: Property.ScrollMarginLeft<TLength> | undefined; + /** + * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----------------------------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin-right)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right + */ + "scroll-snap-margin-right"?: Property.ScrollMarginRight<TLength> | undefined; + /** + * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :---------------------------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin-top)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top + */ + "scroll-snap-margin-top"?: Property.ScrollMarginTop<TLength> | undefined; + /** + * The **`scroll-snap-stop`** CSS property defines whether or not the scroll container is allowed to "pass over" possible snap positions. + * + * **Syntax**: `normal | always` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **75** | **103** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop + */ + "scroll-snap-stop"?: Property.ScrollSnapStop | undefined; + /** + * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. + * + * **Syntax**: `none | [ x | y | block | inline | both ] [ mandatory | proximity ]?` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :----------: | + * | **69** | 39-68 | **11** | **79** | **10** _-x-_ | + * | | | 9 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type + */ + "scroll-snap-type"?: Property.ScrollSnapType | undefined; + /** + * The **`scroll-timeline-axis`** CSS property can be used to specify the scrollbar that will be used to provide the timeline for a scroll-timeline animation. + * + * **Syntax**: `[ block | inline | x | y ]#` + * + * **Initial value**: `block` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-axis + */ + "scroll-timeline-axis"?: Property.ScrollTimelineAxis | undefined; + /** + * The **`scroll-timeline-name`** CSS property defines a name that can be used to identify an element as the source of a scroll timeline for an animation. + * + * **Syntax**: `none | <dashed-ident>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-name + */ + "scroll-timeline-name"?: Property.ScrollTimelineName | undefined; + /** + * The **`scrollbar-color`** CSS property sets the color of the scrollbar track and thumb. + * + * **Syntax**: `auto | <color>{2}` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **121** | **64** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-color + */ + "scrollbar-color"?: Property.ScrollbarColor | undefined; + /** + * The **`scrollbar-gutter`** CSS property allows authors to reserve space for the scrollbar, preventing unwanted layout changes as the content grows while also avoiding unnecessary visuals when scrolling isn't needed. + * + * **Syntax**: `auto | stable && both-edges?` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **94** | **97** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter + */ + "scrollbar-gutter"?: Property.ScrollbarGutter | undefined; + /** + * The **`scrollbar-width`** property allows the author to set the maximum thickness of an element's scrollbars when they are shown. + * + * **Syntax**: `auto | thin | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **121** | **64** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-width + */ + "scrollbar-width"?: Property.ScrollbarWidth | undefined; + /** + * The **`shape-image-threshold`** CSS property sets the alpha channel threshold used to extract the shape using an image as the value for `shape-outside`. + * + * **Syntax**: `<alpha-value>` + * + * **Initial value**: `0.0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **37** | **62** | **10.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold + */ + "shape-image-threshold"?: Property.ShapeImageThreshold | undefined; + /** + * The **`shape-margin`** CSS property sets a margin for a CSS shape created using `shape-outside`. + * + * **Syntax**: `<length-percentage>` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **37** | **62** | **10.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/shape-margin + */ + "shape-margin"?: Property.ShapeMargin<TLength> | undefined; + /** + * The **`shape-outside`** CSS property defines a shape—which may be non-rectangular—around which adjacent inline content should wrap. By default, inline content wraps around its margin box; `shape-outside` provides a way to customize this wrapping, making it possible to wrap text around complex objects rather than simple boxes. + * + * **Syntax**: `none | [ <shape-box> || <basic-shape> ] | <image>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **37** | **62** | **10.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/shape-outside + */ + "shape-outside"?: Property.ShapeOutside | undefined; + /** + * The **`tab-size`** CSS property is used to customize the width of tab characters (U+0009). + * + * **Syntax**: `<integer> | <length>` + * + * **Initial value**: `8` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **21** | **91** | **7** | n/a | No | + * | | 4 _-x-_ | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/tab-size + */ + "tab-size"?: Property.TabSize<TLength> | undefined; + /** + * The **`table-layout`** CSS property sets the algorithm used to lay out `<table>` cells, rows, and columns. + * + * **Syntax**: `auto | fixed` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **14** | **1** | **1** | **12** | **5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/table-layout + */ + "table-layout"?: Property.TableLayout | undefined; + /** + * The **`text-align`** CSS property sets the horizontal alignment of the inline-level content inside a block element or table-cell box. This means it works like `vertical-align` but in the horizontal direction. + * + * **Syntax**: `start | end | left | right | center | justify | match-parent` + * + * **Initial value**: `start`, or a nameless value that acts as `left` if _direction_ is `ltr`, `right` if _direction_ is `rtl` if `start` is not supported by the browser. + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-align + */ + "text-align"?: Property.TextAlign | undefined; + /** + * The **`text-align-last`** CSS property sets how the last line of a block or a line, right before a forced line break, is aligned. + * + * **Syntax**: `auto | start | end | left | right | center | justify` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **47** | **49** | **16** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-align-last + */ + "text-align-last"?: Property.TextAlignLast | undefined; + /** + * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. + * + * **Syntax**: `none | all | [ digits <integer>? ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------: | :-----: | :--------------------------: | :----: | :------------------------------------: | + * | **48** | **48** | **15.4** | **79** | **11** _(-ms-text-combine-horizontal)_ | + * | 9 _(-webkit-text-combine)_ | | 5.1 _(-webkit-text-combine)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-combine-upright + */ + "text-combine-upright"?: Property.TextCombineUpright | undefined; + /** + * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **57** | **36** | **12.1** | n/a | No | + * | | | 8 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-color + */ + "text-decoration-color"?: Property.TextDecorationColor | undefined; + /** + * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. + * + * **Syntax**: `none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **57** | **36** | **12.1** | n/a | No | + * | | | 8 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-line + */ + "text-decoration-line"?: Property.TextDecorationLine | undefined; + /** + * The **`text-decoration-skip`** CSS property sets what parts of an element's content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. + * + * **Syntax**: `none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]` + * + * **Initial value**: `objects` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | 57-64 | No | **12.1** | n/a | No | + * | | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip + */ + "text-decoration-skip"?: Property.TextDecorationSkip | undefined; + /** + * The **`text-decoration-skip-ink`** CSS property specifies how overlines and underlines are drawn when they pass over glyph ascenders and descenders. + * + * **Syntax**: `auto | all | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **64** | **70** | **15.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink + */ + "text-decoration-skip-ink"?: Property.TextDecorationSkipInk | undefined; + /** + * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. + * + * **Syntax**: `solid | double | dotted | dashed | wavy` + * + * **Initial value**: `solid` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **57** | **36** | **12.1** | n/a | No | + * | | | 8 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-style + */ + "text-decoration-style"?: Property.TextDecorationStyle | undefined; + /** + * The **`text-decoration-thickness`** CSS property sets the stroke thickness of the decoration line that is used on text in an element, such as a line-through, underline, or overline. + * + * **Syntax**: `auto | from-font | <length> | <percentage> ` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **89** | **70** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness + */ + "text-decoration-thickness"?: Property.TextDecorationThickness<TLength> | undefined; + /** + * The **`text-emphasis-color`** CSS property sets the color of emphasis marks. This value can also be set using the `text-emphasis` shorthand. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :----: | :--: | :-: | + * | **99** | **46** | **7** | n/a | No | + * | 25 _-x-_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color + */ + "text-emphasis-color"?: Property.TextEmphasisColor | undefined; + /** + * The **`text-emphasis-position`** CSS property sets where emphasis marks are drawn. Like ruby text, if there isn't enough room for emphasis marks, the line height is increased. + * + * **Syntax**: `[ over | under ] && [ right | left ]` + * + * **Initial value**: `over right` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :----: | :--: | :-: | + * | **99** | **46** | **7** | n/a | No | + * | 25 _-x-_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position + */ + "text-emphasis-position"?: Property.TextEmphasisPosition | undefined; + /** + * The **`text-emphasis-style`** CSS property sets the appearance of emphasis marks. It can also be set, and reset, using the `text-emphasis` shorthand. + * + * **Syntax**: `none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :----: | :--: | :-: | + * | **99** | **46** | **7** | n/a | No | + * | 25 _-x-_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style + */ + "text-emphasis-style"?: Property.TextEmphasisStyle | undefined; + /** + * The **`text-indent`** CSS property sets the length of empty space (indentation) that is put before lines of text in a block. + * + * **Syntax**: `<length-percentage> && hanging? && each-line?` + * + * **Initial value**: `0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-indent + */ + "text-indent"?: Property.TextIndent<TLength> | undefined; + /** + * The **`text-justify`** CSS property sets what type of justification should be applied to text when `text-align``: justify;` is set on an element. + * + * **Syntax**: `auto | inter-character | inter-word | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :---: | :----: | + * | n/a | **55** | No | 12-79 | **11** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-justify + */ + "text-justify"?: Property.TextJustify | undefined; + /** + * The **`text-orientation`** CSS property sets the orientation of the text characters in a line. It only affects text in vertical mode (when `writing-mode` is not `horizontal-tb`). It is useful for controlling the display of languages that use vertical script, and also for making vertical table headers. + * + * **Syntax**: `mixed | upright | sideways` + * + * **Initial value**: `mixed` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-------: | :--: | :-: | + * | **48** | **41** | **14** | n/a | No | + * | 11 _-x-_ | | 5.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-orientation + */ + "text-orientation"?: Property.TextOrientation | undefined; + /** + * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. + * + * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` + * + * **Initial value**: `clip` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **1** | **7** | **1.3** | **12** | **6** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-overflow + */ + "text-overflow"?: Property.TextOverflow | undefined; + /** + * The **`text-rendering`** CSS property provides information to the rendering engine about what to optimize for when rendering text. + * + * **Syntax**: `auto | optimizeSpeed | optimizeLegibility | geometricPrecision` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **4** | **1** | **5** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-rendering + */ + "text-rendering"?: Property.TextRendering | undefined; + /** + * The **`text-shadow`** CSS property adds shadows to text. It accepts a comma-separated list of shadows to be applied to the text and any of its `decorations`. Each shadow is described by some combination of X and Y offsets from the element, blur radius, and color. + * + * **Syntax**: `none | <shadow-t>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :----: | + * | **2** | **3.5** | **1.1** | **12** | **10** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-shadow + */ + "text-shadow"?: Property.TextShadow | undefined; + /** + * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. + * + * **Syntax**: `none | auto | <percentage>` + * + * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-: | + * | **54** | No | No | **79** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-size-adjust + */ + "text-size-adjust"?: Property.TextSizeAdjust | undefined; + /** + * The **`text-transform`** CSS property specifies how to capitalize an element's text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. It also can help improve legibility for ruby. + * + * **Syntax**: `none | capitalize | uppercase | lowercase | full-width | full-size-kana` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-transform + */ + "text-transform"?: Property.TextTransform | undefined; + /** + * The **`text-underline-offset`** CSS property sets the offset distance of an underline text decoration line (applied using `text-decoration`) from its original position. + * + * **Syntax**: `auto | <length> | <percentage> ` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **70** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-underline-offset + */ + "text-underline-offset"?: Property.TextUnderlineOffset<TLength> | undefined; + /** + * The **`text-underline-position`** CSS property specifies the position of the underline which is set using the `text-decoration` property's `underline` value. + * + * **Syntax**: `auto | from-font | [ under || [ left | right ] ]` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :---: | + * | **33** | **74** | **12.1** | **12** | **6** | + * | | | 9 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-underline-position + */ + "text-underline-position"?: Property.TextUnderlinePosition | undefined; + /** + * The **`text-wrap`** CSS property controls how text inside an element is wrapped. The different values provide: + * + * **Syntax**: `wrap | nowrap | balance | stable | pretty` + * + * **Initial value**: `wrap` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **114** | **121** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-wrap + */ + "text-wrap"?: Property.TextWrap | undefined; + /** + * The **`timeline-scope`** CSS property modifies the scope of a named animation timeline. + * + * **Syntax**: `none | <dashed-ident>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **116** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/timeline-scope + */ + "timeline-scope"?: Property.TimelineScope | undefined; + /** + * The **`top`** CSS property participates in specifying the vertical position of a positioned element. It has no effect on non-positioned elements. + * + * **Syntax**: `<length> | <percentage> | auto` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/top + */ + top?: Property.Top<TLength> | undefined; + /** + * The **`touch-action`** CSS property sets how an element's region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). + * + * **Syntax**: `auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :------: | + * | **36** | **52** | **13** | **12** | **11** | + * | | | | | 10 _-x-_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/touch-action + */ + "touch-action"?: Property.TouchAction | undefined; + /** + * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. + * + * **Syntax**: `none | <transform-list>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :----: | :-----: | + * | **36** | **16** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3.1 _-x-_ | | 9 _-x-_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transform + */ + transform?: Property.Transform | undefined; + /** + * The **`transform-box`** CSS property defines the layout box to which the `transform`, individual transform properties `translate`,`scale`, and `rotate`, and `transform-origin` properties relate. + * + * **Syntax**: `content-box | border-box | fill-box | stroke-box | view-box` + * + * **Initial value**: `view-box` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **64** | **55** | **11** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transform-box + */ + "transform-box"?: Property.TransformBox | undefined; + /** + * The **`transform-origin`** CSS property sets the origin for an element's transformations. + * + * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` + * + * **Initial value**: `50% 50% 0` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :-----: | + * | **36** | **16** | **9** | **12** | **10** | + * | 1 _-x-_ | | 2 _-x-_ | | 9 _-x-_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transform-origin + */ + "transform-origin"?: Property.TransformOrigin<TLength> | undefined; + /** + * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. + * + * **Syntax**: `flat | preserve-3d` + * + * **Initial value**: `flat` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :-: | + * | **36** | **16** | **9** | **12** | No | + * | 12 _-x-_ | | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transform-style + */ + "transform-style"?: Property.TransformStyle | undefined; + /** + * The **`transition-behavior`** CSS property specifies whether transitions will be started for properties whose animation behavior is discrete. + * + * **Syntax**: `<transition-behavior-value>#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **117** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transition-behavior + */ + "transition-behavior"?: Property.TransitionBehavior | undefined; + /** + * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **26** | **16** | **9** | **12** | **10** | + * | 1 _-x-_ | | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transition-delay + */ + "transition-delay"?: Property.TransitionDelay<TTime> | undefined; + /** + * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :----: | :----: | + * | **26** | **16** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transition-duration + */ + "transition-duration"?: Property.TransitionDuration<TTime> | undefined; + /** + * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. + * + * **Syntax**: `none | <single-transition-property>#` + * + * **Initial value**: all + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :----: | :----: | + * | **26** | **16** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transition-property + */ + "transition-property"?: Property.TransitionProperty | undefined; + /** + * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :----: | :----: | + * | **26** | **16** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transition-timing-function + */ + "transition-timing-function"?: Property.TransitionTimingFunction | undefined; + /** + * The **`translate`** CSS property allows you to specify translation transforms individually and independently of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. + * + * **Syntax**: `none | <length-percentage> [ <length-percentage> <length>? ]?` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **104** | **72** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/translate + */ + translate?: Property.Translate<TLength> | undefined; + /** + * The **`unicode-bidi`** CSS property, together with the `direction` property, determines how bidirectional text in a document is handled. For example, if a block of content contains both left-to-right and right-to-left text, the user-agent uses a complex Unicode algorithm to decide how to display the text. The `unicode-bidi` property overrides this algorithm and allows the developer to control the text embedding. + * + * **Syntax**: `normal | embed | isolate | bidi-override | isolate-override | plaintext` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :-----: | + * | **2** | **1** | **1.3** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/unicode-bidi + */ + "unicode-bidi"?: Property.UnicodeBidi | undefined; + /** + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. + * + * **Syntax**: `auto | text | none | contain | all` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :---------: | :------: | :----------: | + * | **54** | **69** | **3** _-x-_ | **79** | **10** _-x-_ | + * | 1 _-x-_ | 1 _-x-_ | | 12 _-x-_ | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/user-select + */ + "user-select"?: Property.UserSelect | undefined; + /** + * The **`vertical-align`** CSS property sets vertical alignment of an inline, inline-block or table-cell box. + * + * **Syntax**: `baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length>` + * + * **Initial value**: `baseline` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/vertical-align + */ + "vertical-align"?: Property.VerticalAlign<TLength> | undefined; + /** + * The **`view-timeline-axis`** CSS property is used to specify the scrollbar direction that will be used to provide the timeline for a _named view progress timeline_ animation, which is progressed through based on the change in visibility of an element (known as the _subject_) inside a scrollable element (_scroller_). `view-timeline-axis` is set on the subject. See CSS scroll-driven animations for more details. + * + * **Syntax**: `[ block | inline | x | y ]#` + * + * **Initial value**: `block` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline-axis + */ + "view-timeline-axis"?: Property.ViewTimelineAxis | undefined; + /** + * The **`view-timeline-inset`** CSS property is used to specify one or two values representing an adjustment to the position of the scrollport (see Scroll container for more details) in which the subject element of a _named view progress timeline_ animation is deemed to be visible. Put another way, this allows you to specify start and/or end inset (or outset) values that offset the position of the timeline. + * + * **Syntax**: `[ [ auto | <length-percentage> ]{1,2} ]#` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline-inset + */ + "view-timeline-inset"?: Property.ViewTimelineInset<TLength> | undefined; + /** + * The **`view-timeline-name`** CSS property is used to define the name of a _named view progress timeline_, which is progressed through based on the change in visibility of an element (known as the _subject_) inside a scrollable element (_scroller_). `view-timeline` is set on the subject. + * + * **Syntax**: `none | <dashed-ident>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline-name + */ + "view-timeline-name"?: Property.ViewTimelineName | undefined; + /** + * The **`view-transition-name`** CSS property provides the selected element with a distinct identifying name (a `<custom-ident>`) and causes it to participate in a separate view transition from the root view transition — or no view transition if the `none` value is specified. + * + * **Syntax**: `none | <custom-ident>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **111** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-transition-name + */ + "view-transition-name"?: Property.ViewTransitionName | undefined; + /** + * The **`visibility`** CSS property shows or hides an element without changing the layout of a document. The property can also hide rows or columns in a `<table>`. + * + * **Syntax**: `visible | hidden | collapse` + * + * **Initial value**: `visible` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/visibility + */ + visibility?: Property.Visibility | undefined; + /** + * The **`white-space`** CSS property sets how white space inside an element is handled. + * + * **Syntax**: `normal | pre | nowrap | pre-wrap | pre-line | break-spaces | [ <'white-space-collapse'> || <'text-wrap'> || <'white-space-trim'> ]` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/white-space + */ + "white-space"?: Property.WhiteSpace | undefined; + /** + * The **`white-space-collapse`** CSS property controls how white space inside an element is collapsed. + * + * **Syntax**: `collapse | discard | preserve | preserve-breaks | preserve-spaces | break-spaces` + * + * **Initial value**: `collapse` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **114** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/white-space-collapse + */ + "white-space-collapse"?: Property.WhiteSpaceCollapse | undefined; + /** + * **Syntax**: `none | discard-before || discard-after || discard-inner` + * + * **Initial value**: `none` + */ + "white-space-trim"?: Property.WhiteSpaceTrim | undefined; + /** + * The **`widows`** CSS property sets the minimum number of lines in a block container that must be shown at the _top_ of a page, region, or column. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `2` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :---: | + * | **25** | No | **1.3** | **12** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/widows + */ + widows?: Property.Widows | undefined; + /** + * The **`width`** CSS property sets an element's width. By default, it sets the width of the content area, but if `box-sizing` is set to `border-box`, it sets the width of the border area. + * + * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/width + */ + width?: Property.Width<TLength> | undefined; + /** + * The **`will-change`** CSS property hints to browsers how an element is expected to change. Browsers may set up optimizations before an element is actually changed. These kinds of optimizations can increase the responsiveness of a page by doing potentially expensive work before they are actually required. + * + * **Syntax**: `auto | <animateable-feature>#` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :--: | :-: | + * | **36** | **36** | **9.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/will-change + */ + "will-change"?: Property.WillChange | undefined; + /** + * The **`word-break`** CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box. + * + * **Syntax**: `normal | break-all | keep-all | break-word` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **15** | **3** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/word-break + */ + "word-break"?: Property.WordBreak | undefined; + /** + * The **`word-spacing`** CSS property sets the length of space between words and between tags. + * + * **Syntax**: `normal | <length>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **6** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/word-spacing + */ + "word-spacing"?: Property.WordSpacing<TLength> | undefined; + /** + * The **`overflow-wrap`** CSS property applies to inline elements, setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box. + * + * **Syntax**: `normal | break-word` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :-----: | :-: | + * | **≤80** | **≤72** | **≤13.1** | **≤80** | No | + */ + "word-wrap"?: Property.WordWrap | undefined; + /** + * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. When set for an entire document, it should be set on the root element (`html` element for HTML documents). + * + * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` + * + * **Initial value**: `horizontal-tb` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :----: | :---: | + * | **48** | **41** | **10.1** | **12** | **9** | + * | 8 _-x-_ | | 5.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/writing-mode + */ + "writing-mode"?: Property.WritingMode | undefined; + /** + * The **`z-index`** CSS property sets the z-order of a positioned element and its descendants or flex items. Overlapping elements with a larger z-index cover those with a smaller one. + * + * **Syntax**: `auto | <integer>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/z-index + */ + "z-index"?: Property.ZIndex | undefined; + /** + * The non-standard **`zoom`** CSS property can be used to control the magnification level of an element. `transform: scale()` should be used instead of this property, if possible. However, unlike CSS Transforms, `zoom` affects the layout size of the element. + * + * **Syntax**: `normal | reset | <number> | <percentage>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :-----: | + * | **1** | n/a | **3.1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/zoom + */ + zoom?: Property.Zoom | undefined; +} + +export interface StandardShorthandPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { + /** + * The **`all`** shorthand CSS property resets all of an element's properties except `unicode-bidi`, `direction`, and CSS Custom Properties. It can set properties to their initial or inherited values, or to the values specified in another cascade layer or stylesheet origin. + * + * **Syntax**: `initial | inherit | unset | revert | revert-layer` + * + * **Initial value**: There is no practical initial value for it. + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :--: | :-: | + * | **37** | **27** | **9.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/all + */ + all?: Property.All | undefined; + /** + * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. + * + * **Syntax**: `<single-animation>#` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **43** | **16** | **9** | **12** | **10** | + * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation + */ + animation?: Property.Animation<TTime> | undefined; + /** + * The **`animation-range`** CSS shorthand property is used to set the start and end of an animation's attachment range along its timeline, i.e. where along the timeline an animation will start and end. + * + * **Syntax**: `[ <'animation-range-start'> <'animation-range-end'>? ]#` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-range + */ + "animation-range"?: Property.AnimationRange<TLength> | undefined; + /** + * The **`background`** shorthand CSS property sets all background style properties at once, such as color, image, origin and size, or repeat method. + * + * **Syntax**: `[ <bg-layer> , ]* <final-bg-layer>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background + */ + background?: Property.Background<TLength> | undefined; + /** + * The **`background-position`** CSS property sets the initial position for each background image. The position is relative to the position layer set by `background-origin`. + * + * **Syntax**: `<bg-position>#` + * + * **Initial value**: `0% 0%` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/background-position + */ + "background-position"?: Property.BackgroundPosition<TLength> | undefined; + /** + * The **`border`** shorthand CSS property sets an element's border. It sets the values of `border-width`, `border-style`, and `border-color`. + * + * **Syntax**: `<line-width> || <line-style> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border + */ + border?: Property.Border<TLength> | undefined; + /** + * The **`border-block`** CSS property is a shorthand property for setting the individual logical block border property values in a single place in the style sheet. + * + * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block + */ + "border-block"?: Property.BorderBlock<TLength> | undefined; + /** + * The **`border-block-end`** CSS property is a shorthand property for setting the individual logical block-end border property values in a single place in the style sheet. + * + * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end + */ + "border-block-end"?: Property.BorderBlockEnd<TLength> | undefined; + /** + * The **`border-block-start`** CSS property is a shorthand property for setting the individual logical block-start border property values in a single place in the style sheet. + * + * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start + */ + "border-block-start"?: Property.BorderBlockStart<TLength> | undefined; + /** + * The **`border-bottom`** shorthand CSS property sets an element's bottom border. It sets the values of `border-bottom-width`, `border-bottom-style` and `border-bottom-color`. + * + * **Syntax**: `<line-width> || <line-style> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom + */ + "border-bottom"?: Property.BorderBottom<TLength> | undefined; + /** + * The **`border-color`** shorthand CSS property sets the color of an element's border. + * + * **Syntax**: `<color>{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-color + */ + "border-color"?: Property.BorderColor | undefined; + /** + * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. + * + * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-------: | :-----: | :----: | :----: | + * | **16** | **15** | **6** | **12** | **11** | + * | 7 _-x-_ | 3.5 _-x-_ | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-image + */ + "border-image"?: Property.BorderImage | undefined; + /** + * The **`border-inline`** CSS property is a shorthand property for setting the individual logical inline border property values in a single place in the style sheet. + * + * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline + */ + "border-inline"?: Property.BorderInline<TLength> | undefined; + /** + * The **`border-inline-end`** CSS property is a shorthand property for setting the individual logical inline-end border property values in a single place in the style sheet. + * + * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end + */ + "border-inline-end"?: Property.BorderInlineEnd<TLength> | undefined; + /** + * The **`border-inline-start`** CSS property is a shorthand property for setting the individual logical inline-start border property values in a single place in the style sheet. + * + * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **41** | **12.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start + */ + "border-inline-start"?: Property.BorderInlineStart<TLength> | undefined; + /** + * The **`border-left`** shorthand CSS property sets all the properties of an element's left border. + * + * **Syntax**: `<line-width> || <line-style> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-left + */ + "border-left"?: Property.BorderLeft<TLength> | undefined; + /** + * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. + * + * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :---: | + * | **4** | **4** | **5** | **12** | **9** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-radius + */ + "border-radius"?: Property.BorderRadius<TLength> | undefined; + /** + * The **`border-right`** shorthand CSS property sets all the properties of an element's right border. + * + * **Syntax**: `<line-width> || <line-style> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-----: | + * | **1** | **1** | **1** | **12** | **5.5** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-right + */ + "border-right"?: Property.BorderRight<TLength> | undefined; + /** + * The **`border-style`** shorthand CSS property sets the line style for all four sides of an element's border. + * + * **Syntax**: `<line-style>{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-style + */ + "border-style"?: Property.BorderStyle | undefined; + /** + * The **`border-top`** shorthand CSS property sets all the properties of an element's top border. + * + * **Syntax**: `<line-width> || <line-style> || <color>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-top + */ + "border-top"?: Property.BorderTop<TLength> | undefined; + /** + * The **`border-width`** shorthand CSS property sets the width of an element's border. + * + * **Syntax**: `<line-width>{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/border-width + */ + "border-width"?: Property.BorderWidth<TLength> | undefined; + /** **Syntax**: `<'caret-color'> || <'caret-shape'>` */ + caret?: Property.Caret | undefined; + /** + * The **`column-rule`** shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :----: | + * | **50** | **52** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/column-rule + */ + "column-rule"?: Property.ColumnRule<TLength> | undefined; + /** + * The **`columns`** CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths. + * + * **Syntax**: `<'column-width'> || <'column-count'>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----: | :----: | :----: | + * | **50** | **52** | **9** | **12** | **10** | + * | | | 3 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/columns + */ + columns?: Property.Columns<TLength> | undefined; + /** + * The **`contain-intrinsic-size`** CSS shorthand property sets the size of an element that a browser will use for layout when the element is subject to size containment. + * + * **Syntax**: `[ auto? [ none | <length> ] ]{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **83** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-size + */ + "contain-intrinsic-size"?: Property.ContainIntrinsicSize<TLength> | undefined; + /** + * The **container** shorthand CSS property establishes the element as a query container and specifies the name or name for the containment context used in a container query. + * + * **Syntax**: `<'container-name'> [ / <'container-type'> ]?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **105** | **110** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/container + */ + container?: Property.Container | undefined; + /** + * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container. + * + * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :------: | + * | **29** | **20** | **9** | **12** | **11** | + * | 21 _-x-_ | | 7 _-x-_ | | 10 _-x-_ | + * + * @see https://developer.mozilla.org/docs/Web/CSS/flex + */ + flex?: Property.Flex<TLength> | undefined; + /** + * The **`flex-flow`** CSS shorthand property specifies the direction of a flex container, as well as its wrapping behavior. + * + * **Syntax**: `<'flex-direction'> || <'flex-wrap'>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **29** | **28** | **9** | **12** | **11** | + * | 21 _-x-_ | | 7 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/flex-flow + */ + "flex-flow"?: Property.FlexFlow | undefined; + /** + * The **`font`** CSS shorthand property sets all the different properties of an element's font. Alternatively, it sets an element's font to a system font. + * + * **Syntax**: `[ [ <'font-style'> || <font-variant-css21> || <'font-weight'> || <'font-stretch'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font + */ + font?: Property.Font | undefined; + /** + * The **`gap`** CSS property sets the gaps (gutters) between rows and columns. It is a shorthand for `row-gap` and `column-gap`. + * + * **Syntax**: `<'row-gap'> <'column-gap'>?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/gap + */ + gap?: Property.Gap<TLength> | undefined; + /** + * The **`grid`** CSS property is a shorthand property that sets all of the explicit and implicit grid properties in a single declaration. + * + * **Syntax**: `<'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid + */ + grid?: Property.Grid | undefined; + /** + * The **`grid-area`** CSS shorthand property specifies a grid item's size and location within a grid by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the edges of its grid area. + * + * **Syntax**: `<grid-line> [ / <grid-line> ]{0,3}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-area + */ + "grid-area"?: Property.GridArea | undefined; + /** + * The **`grid-column`** CSS shorthand property specifies a grid item's size and location within a grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. + * + * **Syntax**: `<grid-line> [ / <grid-line> ]?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-column + */ + "grid-column"?: Property.GridColumn | undefined; + /** + * The **`grid-row`** CSS shorthand property specifies a grid item's size and location within a grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. + * + * **Syntax**: `<grid-line> [ / <grid-line> ]?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-row + */ + "grid-row"?: Property.GridRow | undefined; + /** + * The **`grid-template`** CSS property is a shorthand property for defining grid columns, grid rows, and grid areas. + * + * **Syntax**: `none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :-: | + * | **57** | **52** | **10.1** | **16** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/grid-template + */ + "grid-template"?: Property.GridTemplate | undefined; + /** + * The **`inset`** CSS property is a shorthand that corresponds to the `top`, `right`, `bottom`, and/or `left` properties. It has the same multi-value syntax of the `margin` shorthand. + * + * **Syntax**: `<'top'>{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset + */ + inset?: Property.Inset<TLength> | undefined; + /** + * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **63** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset-block + */ + "inset-block"?: Property.InsetBlock<TLength> | undefined; + /** + * The **`inset-inline`** CSS property defines the logical start and end offsets of an element in the inline direction, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **63** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline + */ + "inset-inline"?: Property.InsetInline<TLength> | undefined; + /** + * **Syntax**: `none | <integer>` + * + * **Initial value**: `none` + */ + "line-clamp"?: Property.LineClamp | undefined; + /** + * The **`list-style`** CSS shorthand property allows you to set all the list style properties at once. + * + * **Syntax**: `<'list-style-type'> || <'list-style-position'> || <'list-style-image'>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/list-style + */ + "list-style"?: Property.ListStyle | undefined; + /** + * The **`margin`** CSS shorthand property sets the margin area on all four sides of an element. + * + * **Syntax**: `[ <length> | <percentage> | auto ]{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin + */ + margin?: Property.Margin<TLength> | undefined; + /** + * The **`margin-block`** CSS shorthand property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'margin-left'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-block + */ + "margin-block"?: Property.MarginBlock<TLength> | undefined; + /** + * The **`margin-inline`** CSS shorthand property is a shorthand property that defines both the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'margin-left'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline + */ + "margin-inline"?: Property.MarginInline<TLength> | undefined; + /** + * The **`mask`** CSS shorthand property hides an element (partially or fully) by masking or clipping the image at specific points. + * + * **Syntax**: `<mask-layer>#` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-------: | :---: | :-: | + * | **1** | **53** | **15.4** | 12-79 | No | + * | | | 3.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask + */ + mask?: Property.Mask<TLength> | undefined; + /** + * The **`mask-border`** CSS shorthand property lets you create a mask along the edge of an element's border. + * + * **Syntax**: `<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------------: | :-----: | :----------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/mask-border + */ + "mask-border"?: Property.MaskBorder | undefined; + /** + * The **`offset`** CSS shorthand property sets all the properties required for animating an element along a defined path. + * + * **Syntax**: `[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----------: | :-----: | :----: | :--: | :-: | + * | **55** | **72** | **16** | n/a | No | + * | 46 _(motion)_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset + */ + motion?: Property.Offset<TLength> | undefined; + /** + * The **`offset`** CSS shorthand property sets all the properties required for animating an element along a defined path. + * + * **Syntax**: `[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----------: | :-----: | :----: | :--: | :-: | + * | **55** | **72** | **16** | n/a | No | + * | 46 _(motion)_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset + */ + offset?: Property.Offset<TLength> | undefined; + /** + * The **`outline`** CSS shorthand property sets most of the outline properties in a single declaration. + * + * **Syntax**: `[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :---: | + * | **94** | **88** | **16.4** | **94** | **8** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/outline + */ + outline?: Property.Outline<TLength> | undefined; + /** + * The **`overflow`** CSS shorthand property sets the desired behavior for an element's overflow — i.e. when an element's content is too big to fit in its block formatting context — in both directions. + * + * **Syntax**: `[ visible | hidden | clip | scroll | auto ]{1,2}` + * + * **Initial value**: `visible` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overflow + */ + overflow?: Property.Overflow | undefined; + /** + * The **`overscroll-behavior`** CSS property sets what a browser does when reaching the boundary of a scrolling area. It's a shorthand for `overscroll-behavior-x` and `overscroll-behavior-y`. + * + * **Syntax**: `[ contain | none | auto ]{1,2}` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :-: | + * | **63** | **59** | **16** | **18** | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior + */ + "overscroll-behavior"?: Property.OverscrollBehavior | undefined; + /** + * The **`padding`** CSS shorthand property sets the padding area on all four sides of an element at once. + * + * **Syntax**: `[ <length> | <percentage> ]{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **4** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding + */ + padding?: Property.Padding<TLength> | undefined; + /** + * The **`padding-block`** CSS shorthand property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-block + */ + "padding-block"?: Property.PaddingBlock<TLength> | undefined; + /** + * The **`padding-inline`** CSS shorthand property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline + */ + "padding-inline"?: Property.PaddingInline<TLength> | undefined; + /** + * The **`place-content`** CSS shorthand property allows you to align content along both the block and inline directions at once (i.e. the `align-content` and `justify-content` properties) in a relevant layout system such as Grid or Flexbox. + * + * **Syntax**: `<'align-content'> <'justify-content'>?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **59** | **45** | **9** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/place-content + */ + "place-content"?: Property.PlaceContent | undefined; + /** + * The CSS **`place-items`** shorthand property allows you to align items along both the block and inline directions at once (i.e. the `align-items` and `justify-items` properties) in a relevant layout system such as Grid or Flexbox. If the second value is not set, the first value is also used for it. + * + * **Syntax**: `<'align-items'> <'justify-items'>?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **59** | **45** | **11** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/place-items + */ + "place-items"?: Property.PlaceItems | undefined; + /** + * The **`place-self`** CSS shorthand property allows you to align an individual item in both the block and inline directions at once (i.e. the `align-self` and `justify-self` properties) in a relevant layout system such as Grid or Flexbox. If the second value is not present, the first value is also used for it. + * + * **Syntax**: `<'align-self'> <'justify-self'>?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **59** | **45** | **11** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/place-self + */ + "place-self"?: Property.PlaceSelf | undefined; + /** + * The **`scroll-margin`** shorthand property sets all of the scroll margins of an element at once, assigning values much like the `margin` property does for margins of an element. + * + * **Syntax**: `<length>{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----------------------: | :--: | :-: | + * | **69** | **90** | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin + */ + "scroll-margin"?: Property.ScrollMargin<TLength> | undefined; + /** + * The `scroll-margin-block` shorthand property sets the scroll margins of an element in the block dimension. + * + * **Syntax**: `<length>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block + */ + "scroll-margin-block"?: Property.ScrollMarginBlock<TLength> | undefined; + /** + * The `scroll-margin-inline` shorthand property sets the scroll margins of an element in the inline dimension. + * + * **Syntax**: `<length>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline + */ + "scroll-margin-inline"?: Property.ScrollMarginInline<TLength> | undefined; + /** + * The **`scroll-padding`** shorthand property sets scroll padding on all sides of an element at once, much like the `padding` property does for padding on an element. + * + * **Syntax**: `[ auto | <length-percentage> ]{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding + */ + "scroll-padding"?: Property.ScrollPadding<TLength> | undefined; + /** + * The `scroll-padding-block` shorthand property sets the scroll padding of an element in the block dimension. + * + * **Syntax**: `[ auto | <length-percentage> ]{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block + */ + "scroll-padding-block"?: Property.ScrollPaddingBlock<TLength> | undefined; + /** + * The `scroll-padding-inline` shorthand property sets the scroll padding of an element in the inline dimension. + * + * **Syntax**: `[ auto | <length-percentage> ]{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline + */ + "scroll-padding-inline"?: Property.ScrollPaddingInline<TLength> | undefined; + /** + * The **`scroll-margin`** shorthand property sets all of the scroll margins of an element at once, assigning values much like the `margin` property does for margins of an element. + * + * **Syntax**: `<length>{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----------------------: | :--: | :-: | + * | **69** | 68-90 | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin + */ + "scroll-snap-margin"?: Property.ScrollMargin<TLength> | undefined; + /** + * The **`scroll-timeline`** CSS shorthand property defines a name that can be used to identify the source element of a scroll timeline, along with the scrollbar axis that should provide the timeline. + * + * **Syntax**: `[ <'scroll-timeline-name'> <'scroll-timeline-axis'>? ]#` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-timeline + */ + "scroll-timeline"?: Property.ScrollTimeline | undefined; + /** + * The **`text-decoration`** shorthand CSS property sets the appearance of decorative lines on text. It is a shorthand for `text-decoration-line`, `text-decoration-color`, `text-decoration-style`, and the newer `text-decoration-thickness` property. + * + * **Syntax**: `<'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> || <'text-decoration-thickness'>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :----: | :---: | + * | **1** | **1** | **1** | **12** | **3** | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration + */ + "text-decoration"?: Property.TextDecoration<TLength> | undefined; + /** + * The **`text-emphasis`** CSS property applies emphasis marks to text (except spaces and control characters). It is a shorthand for `text-emphasis-style` and `text-emphasis-color`. + * + * **Syntax**: `<'text-emphasis-style'> || <'text-emphasis-color'>` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :----: | :--: | :-: | + * | **99** | **46** | **7** | n/a | No | + * | 25 _-x-_ | | | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis + */ + "text-emphasis"?: Property.TextEmphasis | undefined; + /** + * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. + * + * **Syntax**: `<single-transition>#` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :----: | :----: | + * | **26** | **16** | **9** | **12** | **10** | + * | 1 _-x-_ | | 3.1 _-x-_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transition + */ + transition?: Property.Transition<TTime> | undefined; + /** + * The **`view-timeline`** CSS shorthand property is used to define a _named view progress timeline_, which is progressed through based on the change in visibility of an element (known as the _subject_) inside a scrollable element (_scroller_). `view-timeline` is set on the subject. + * + * **Syntax**: `[ <'view-timeline-name'> <'view-timeline-axis'>? ]#` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline + */ + "view-timeline"?: Property.ViewTimeline | undefined; +} + +export interface StandardPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> + extends StandardLonghandPropertiesHyphen<TLength, TTime>, + StandardShorthandPropertiesHyphen<TLength, TTime> {} + +export interface VendorLonghandPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { + /** + * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + */ + "-moz-animation-delay"?: Property.AnimationDelay<TTime> | undefined; + /** + * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. + * + * **Syntax**: `<single-animation-direction>#` + * + * **Initial value**: `normal` + */ + "-moz-animation-direction"?: Property.AnimationDirection | undefined; + /** + * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + */ + "-moz-animation-duration"?: Property.AnimationDuration<TTime> | undefined; + /** + * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. + * + * **Syntax**: `<single-animation-fill-mode>#` + * + * **Initial value**: `none` + */ + "-moz-animation-fill-mode"?: Property.AnimationFillMode | undefined; + /** + * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. + * + * **Syntax**: `<single-animation-iteration-count>#` + * + * **Initial value**: `1` + */ + "-moz-animation-iteration-count"?: Property.AnimationIterationCount | undefined; + /** + * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. + * + * **Syntax**: `[ none | <keyframes-name> ]#` + * + * **Initial value**: `none` + */ + "-moz-animation-name"?: Property.AnimationName | undefined; + /** + * The **`animation-play-state`** CSS property sets whether an animation is running or paused. + * + * **Syntax**: `<single-animation-play-state>#` + * + * **Initial value**: `running` + */ + "-moz-animation-play-state"?: Property.AnimationPlayState | undefined; + /** + * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + */ + "-moz-animation-timing-function"?: Property.AnimationTimingFunction | undefined; + /** + * The **`appearance`** CSS property is used to control native appearance of UI controls, that are based on operating system's theme. + * + * **Syntax**: `none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized` + * + * **Initial value**: `none` (but this value is overridden in the user agent CSS) + */ + "-moz-appearance"?: Property.MozAppearance | undefined; + /** + * The **`-moz-binding`** CSS property is used by Mozilla-based applications to attach an XBL binding to a DOM element. + * + * **Syntax**: `<url> | none` + * + * **Initial value**: `none` + */ + "-moz-binding"?: Property.MozBinding | undefined; + /** + * In Mozilla applications like Firefox, the **`-moz-border-bottom-colors`** CSS property sets a list of colors for the bottom border. + * + * **Syntax**: `<color>+ | none` + * + * **Initial value**: `none` + */ + "-moz-border-bottom-colors"?: Property.MozBorderBottomColors | undefined; + /** + * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-color'>` + * + * **Initial value**: `currentcolor` + */ + "-moz-border-end-color"?: Property.BorderInlineEndColor | undefined; + /** + * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-style'>` + * + * **Initial value**: `none` + */ + "-moz-border-end-style"?: Property.BorderInlineEndStyle | undefined; + /** + * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-width'>` + * + * **Initial value**: `medium` + */ + "-moz-border-end-width"?: Property.BorderInlineEndWidth<TLength> | undefined; + /** + * In Mozilla applications like Firefox, the **`-moz-border-left-colors`** CSS property sets a list of colors for the left border. + * + * **Syntax**: `<color>+ | none` + * + * **Initial value**: `none` + */ + "-moz-border-left-colors"?: Property.MozBorderLeftColors | undefined; + /** + * In Mozilla applications like Firefox, the **`-moz-border-right-colors`** CSS property sets a list of colors for the right border. + * + * **Syntax**: `<color>+ | none` + * + * **Initial value**: `none` + */ + "-moz-border-right-colors"?: Property.MozBorderRightColors | undefined; + /** + * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-color'>` + * + * **Initial value**: `currentcolor` + */ + "-moz-border-start-color"?: Property.BorderInlineStartColor | undefined; + /** + * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'border-top-style'>` + * + * **Initial value**: `none` + */ + "-moz-border-start-style"?: Property.BorderInlineStartStyle | undefined; + /** + * In Mozilla applications like Firefox, the **`-moz-border-top-colors`** CSS property sets a list of colors for the top border. + * + * **Syntax**: `<color>+ | none` + * + * **Initial value**: `none` + */ + "-moz-border-top-colors"?: Property.MozBorderTopColors | undefined; + /** + * The **`box-sizing`** CSS property sets how the total width and height of an element is calculated. + * + * **Syntax**: `content-box | border-box` + * + * **Initial value**: `content-box` + */ + "-moz-box-sizing"?: Property.BoxSizing | undefined; + /** + * The **`column-count`** CSS property breaks an element's content into the specified number of columns. + * + * **Syntax**: `<integer> | auto` + * + * **Initial value**: `auto` + */ + "-moz-column-count"?: Property.ColumnCount | undefined; + /** + * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. + * + * **Syntax**: `auto | balance | balance-all` + * + * **Initial value**: `balance` + */ + "-moz-column-fill"?: Property.ColumnFill | undefined; + /** + * The **`column-rule-color`** CSS property sets the color of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + */ + "-moz-column-rule-color"?: Property.ColumnRuleColor | undefined; + /** + * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<'border-style'>` + * + * **Initial value**: `none` + */ + "-moz-column-rule-style"?: Property.ColumnRuleStyle | undefined; + /** + * The **`column-rule-width`** CSS property sets the width of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<'border-width'>` + * + * **Initial value**: `medium` + */ + "-moz-column-rule-width"?: Property.ColumnRuleWidth<TLength> | undefined; + /** + * The **`column-width`** CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. + * + * **Syntax**: `<length> | auto` + * + * **Initial value**: `auto` + */ + "-moz-column-width"?: Property.ColumnWidth<TLength> | undefined; + /** + * The **`-moz-context-properties`** property can be used within privileged contexts in Firefox to share the values of specified properties of the element with a child SVG image. + * + * **Syntax**: `none | [ fill | fill-opacity | stroke | stroke-opacity ]#` + * + * **Initial value**: `none` + */ + "-moz-context-properties"?: Property.MozContextProperties | undefined; + /** + * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. + * + * **Syntax**: `normal | <feature-tag-value>#` + * + * **Initial value**: `normal` + */ + "-moz-font-feature-settings"?: Property.FontFeatureSettings | undefined; + /** + * The **`font-language-override`** CSS property controls the use of language-specific glyphs in a typeface. + * + * **Syntax**: `normal | <string>` + * + * **Initial value**: `normal` + */ + "-moz-font-language-override"?: Property.FontLanguageOverride | undefined; + /** + * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. + * + * **Syntax**: `none | manual | auto` + * + * **Initial value**: `manual` + */ + "-moz-hyphens"?: Property.Hyphens | undefined; + /** + * For certain XUL elements and pseudo-elements that use an image from the `list-style-image` property, this property specifies a region of the image that is used in place of the whole image. This allows elements to use different pieces of the same image to improve performance. + * + * **Syntax**: `<shape> | auto` + * + * **Initial value**: `auto` + */ + "-moz-image-region"?: Property.MozImageRegion | undefined; + /** + * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'margin-left'>` + * + * **Initial value**: `0` + */ + "-moz-margin-end"?: Property.MarginInlineEnd<TLength> | undefined; + /** + * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'margin-left'>` + * + * **Initial value**: `0` + */ + "-moz-margin-start"?: Property.MarginInlineStart<TLength> | undefined; + /** + * The **`-moz-orient`** CSS property specifies the orientation of the element to which it's applied. + * + * **Syntax**: `inline | block | horizontal | vertical` + * + * **Initial value**: `inline` + */ + "-moz-orient"?: Property.MozOrient | undefined; + /** + * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. + * + * **Syntax**: `auto | never | always | <absolute-size> | <length>` + * + * **Initial value**: `auto` + */ + "-moz-osx-font-smoothing"?: Property.FontSmooth<TLength> | undefined; + /** + * In Mozilla applications, the **`-moz-outline-radius-bottomleft`** CSS property can be used to round the bottom-left corner of an element's `outline`. + * + * **Syntax**: `<outline-radius>` + * + * **Initial value**: `0` + */ + "-moz-outline-radius-bottomleft"?: Property.MozOutlineRadiusBottomleft<TLength> | undefined; + /** + * In Mozilla applications, the **`-moz-outline-radius-bottomright`** CSS property can be used to round the bottom-right corner of an element's `outline`. + * + * **Syntax**: `<outline-radius>` + * + * **Initial value**: `0` + */ + "-moz-outline-radius-bottomright"?: Property.MozOutlineRadiusBottomright<TLength> | undefined; + /** + * In Mozilla applications, the **`-moz-outline-radius-topleft`** CSS property can be used to round the top-left corner of an element's `outline`. + * + * **Syntax**: `<outline-radius>` + * + * **Initial value**: `0` + */ + "-moz-outline-radius-topleft"?: Property.MozOutlineRadiusTopleft<TLength> | undefined; + /** + * In Mozilla applications, the **`-moz-outline-radius-topright`** CSS property can be used to round the top-right corner of an element's `outline`. + * + * **Syntax**: `<outline-radius>` + * + * **Initial value**: `0` + */ + "-moz-outline-radius-topright"?: Property.MozOutlineRadiusTopright<TLength> | undefined; + /** + * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>` + * + * **Initial value**: `0` + */ + "-moz-padding-end"?: Property.PaddingInlineEnd<TLength> | undefined; + /** + * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>` + * + * **Initial value**: `0` + */ + "-moz-padding-start"?: Property.PaddingInlineStart<TLength> | undefined; + /** + * **`-moz-stack-sizing`** is an extended CSS property. Normally, a `<xul:stack>` will change its size so that all of its child elements are completely visible. For example, moving a child of the stack far to the right will widen the stack so the child remains visible. + * + * **Syntax**: `ignore | stretch-to-fit` + * + * **Initial value**: `stretch-to-fit` + */ + "-moz-stack-sizing"?: Property.MozStackSizing | undefined; + /** + * The **`tab-size`** CSS property is used to customize the width of tab characters (U+0009). + * + * **Syntax**: `<integer> | <length>` + * + * **Initial value**: `8` + */ + "-moz-tab-size"?: Property.TabSize<TLength> | undefined; + /** + * The **`-moz-text-blink`** non-standard Mozilla CSS extension specifies the blink mode. + * + * **Syntax**: `none | blink` + * + * **Initial value**: `none` + */ + "-moz-text-blink"?: Property.MozTextBlink | undefined; + /** + * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. + * + * **Syntax**: `none | auto | <percentage>` + * + * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). + */ + "-moz-text-size-adjust"?: Property.TextSizeAdjust | undefined; + /** + * The **`-moz-user-focus`** CSS property is used to indicate whether an element can have the focus. + * + * **Syntax**: `ignore | normal | select-after | select-before | select-menu | select-same | select-all | none` + * + * **Initial value**: `none` + */ + "-moz-user-focus"?: Property.MozUserFocus | undefined; + /** + * The **`user-modify`** property has no effect in Firefox. It was originally planned to determine whether or not the content of an element can be edited by a user. + * + * **Syntax**: `read-only | read-write | write-only` + * + * **Initial value**: `read-only` + */ + "-moz-user-modify"?: Property.MozUserModify | undefined; + /** + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. + * + * **Syntax**: `auto | text | none | contain | all` + * + * **Initial value**: `auto` + */ + "-moz-user-select"?: Property.UserSelect | undefined; + /** + * The **`-moz-window-dragging`** CSS property specifies whether a window is draggable or not. It only works in Chrome code, and only on Mac OS X. + * + * **Syntax**: `drag | no-drag` + * + * **Initial value**: `drag` + */ + "-moz-window-dragging"?: Property.MozWindowDragging | undefined; + /** + * The **`-moz-window-shadow`** CSS property specifies whether a window will have a shadow. It only works on Mac OS X. + * + * **Syntax**: `default | menu | tooltip | sheet | none` + * + * **Initial value**: `default` + */ + "-moz-window-shadow"?: Property.MozWindowShadow | undefined; + /** + * The **`-ms-accelerator`** CSS property is a Microsoft extension that sets or retrieves a string indicating whether the object represents a keyboard shortcut. + * + * **Syntax**: `false | true` + * + * **Initial value**: `false` + */ + "-ms-accelerator"?: Property.MsAccelerator | undefined; + /** + * The **`-ms-block-progression`** CSS property is a Microsoft extension that specifies the block progression and layout orientation. + * + * **Syntax**: `tb | rl | bt | lr` + * + * **Initial value**: `tb` + */ + "-ms-block-progression"?: Property.MsBlockProgression | undefined; + /** + * The **`-ms-content-zoom-chaining`** CSS property is a Microsoft extension specifying the zoom behavior that occurs when a user hits the zoom limit during page manipulation. + * + * **Syntax**: `none | chained` + * + * **Initial value**: `none` + */ + "-ms-content-zoom-chaining"?: Property.MsContentZoomChaining | undefined; + /** + * The **`-ms-content-zoom-limit-max`** CSS property is a Microsoft extension that specifies the selected elements' maximum zoom factor. + * + * **Syntax**: `<percentage>` + * + * **Initial value**: `400%` + */ + "-ms-content-zoom-limit-max"?: Property.MsContentZoomLimitMax | undefined; + /** + * The **`-ms-content-zoom-limit-min`** CSS property is a Microsoft extension that specifies the minimum zoom factor. + * + * **Syntax**: `<percentage>` + * + * **Initial value**: `100%` + */ + "-ms-content-zoom-limit-min"?: Property.MsContentZoomLimitMin | undefined; + /** + * The **`-ms-content-zoom-snap-points`** CSS property is a Microsoft extension that specifies where zoom snap-points are located. + * + * **Syntax**: `snapInterval( <percentage>, <percentage> ) | snapList( <percentage># )` + * + * **Initial value**: `snapInterval(0%, 100%)` + */ + "-ms-content-zoom-snap-points"?: Property.MsContentZoomSnapPoints | undefined; + /** + * The **`-ms-content-zoom-snap-type`** CSS property is a Microsoft extension that specifies how zooming is affected by defined snap-points. + * + * **Syntax**: `none | proximity | mandatory` + * + * **Initial value**: `none` + */ + "-ms-content-zoom-snap-type"?: Property.MsContentZoomSnapType | undefined; + /** + * The **`-ms-content-zooming`** CSS property is a Microsoft extension that specifies whether zooming is enabled. + * + * **Syntax**: `none | zoom` + * + * **Initial value**: zoom for the top level element, none for all other elements + */ + "-ms-content-zooming"?: Property.MsContentZooming | undefined; + /** + * The `-ms-filter` CSS property is a Microsoft extension that sets or retrieves the filter or collection of filters applied to an object. + * + * **Syntax**: `<string>` + * + * **Initial value**: "" (the empty string) + */ + "-ms-filter"?: Property.MsFilter | undefined; + /** + * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). + * + * **Syntax**: `row | row-reverse | column | column-reverse` + * + * **Initial value**: `row` + */ + "-ms-flex-direction"?: Property.FlexDirection | undefined; + /** + * The **`flex-grow`** CSS property sets the flex grow factor of a flex item's main size. + * + * **Syntax**: `<number>` + * + * **Initial value**: `0` + */ + "-ms-flex-positive"?: Property.FlexGrow | undefined; + /** + * The **`-ms-flow-from`** CSS property is a Microsoft extension that gets or sets a value identifying a region container in the document that accepts the content flow from the data source. + * + * **Syntax**: `[ none | <custom-ident> ]#` + * + * **Initial value**: `none` + */ + "-ms-flow-from"?: Property.MsFlowFrom | undefined; + /** + * The **`-ms-flow-into`** CSS property is a Microsoft extension that gets or sets a value identifying an iframe container in the document that serves as the region's data source. + * + * **Syntax**: `[ none | <custom-ident> ]#` + * + * **Initial value**: `none` + */ + "-ms-flow-into"?: Property.MsFlowInto | undefined; + /** + * The **`grid-template-columns`** CSS property defines the line names and track sizing functions of the grid columns. + * + * **Syntax**: `none | <track-list> | <auto-track-list>` + * + * **Initial value**: `none` + */ + "-ms-grid-columns"?: Property.MsGridColumns<TLength> | undefined; + /** + * The **`grid-template-rows`** CSS property defines the line names and track sizing functions of the grid rows. + * + * **Syntax**: `none | <track-list> | <auto-track-list>` + * + * **Initial value**: `none` + */ + "-ms-grid-rows"?: Property.MsGridRows<TLength> | undefined; + /** + * The **`-ms-high-contrast-adjust`** CSS property is a Microsoft extension that gets or sets a value indicating whether to override any CSS properties that would have been set in high contrast mode. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + */ + "-ms-high-contrast-adjust"?: Property.MsHighContrastAdjust | undefined; + /** + * The **`-ms-hyphenate-limit-chars`** CSS property is a Microsoft extension that specifies one to three values indicating the minimum number of characters in a hyphenated word. If the word does not meet the required minimum number of characters in the word, before the hyphen, or after the hyphen, then the word is not hyphenated. + * + * **Syntax**: `auto | <integer>{1,3}` + * + * **Initial value**: `auto` + */ + "-ms-hyphenate-limit-chars"?: Property.MsHyphenateLimitChars | undefined; + /** + * The **`-ms-hyphenate-limit-lines`** CSS property is a Microsoft extension specifying the maximum number of consecutive lines in an element that may be ended with a hyphenated word. + * + * **Syntax**: `no-limit | <integer>` + * + * **Initial value**: `no-limit` + */ + "-ms-hyphenate-limit-lines"?: Property.MsHyphenateLimitLines | undefined; + /** + * The `**-ms-hyphenate-limit-zone**` CSS property is a Microsoft extension specifying the width of the hyphenation zone. + * + * **Syntax**: `<percentage> | <length>` + * + * **Initial value**: `0` + */ + "-ms-hyphenate-limit-zone"?: Property.MsHyphenateLimitZone<TLength> | undefined; + /** + * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. + * + * **Syntax**: `none | manual | auto` + * + * **Initial value**: `manual` + */ + "-ms-hyphens"?: Property.Hyphens | undefined; + /** + * The **`-ms-ime-align`** CSS property is a Microsoft extension aligning the Input Method Editor (IME) candidate window box relative to the element on which the IME composition is active. The extension is implemented in Microsoft Edge and Internet Explorer 11. + * + * **Syntax**: `auto | after` + * + * **Initial value**: `auto` + */ + "-ms-ime-align"?: Property.MsImeAlign | undefined; + /** + * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. + * + * **Syntax**: `auto | loose | normal | strict | anywhere` + * + * **Initial value**: `auto` + */ + "-ms-line-break"?: Property.LineBreak | undefined; + /** + * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `0` + */ + "-ms-order"?: Property.Order | undefined; + /** + * The **`-ms-overflow-style`** CSS property is a Microsoft extension controlling the behavior of scrollbars when the content of an element overflows. + * + * **Syntax**: `auto | none | scrollbar | -ms-autohiding-scrollbar` + * + * **Initial value**: `auto` + */ + "-ms-overflow-style"?: Property.MsOverflowStyle | undefined; + /** + * The **`overflow-x`** CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content. + * + * **Syntax**: `visible | hidden | clip | scroll | auto` + * + * **Initial value**: `visible` + */ + "-ms-overflow-x"?: Property.OverflowX | undefined; + /** + * The **`overflow-y`** CSS property sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content. + * + * **Syntax**: `visible | hidden | clip | scroll | auto` + * + * **Initial value**: `visible` + */ + "-ms-overflow-y"?: Property.OverflowY | undefined; + /** + * The `**-ms-scroll-chaining**` CSS property is a Microsoft extension that specifies the scrolling behavior that occurs when a user hits the scroll limit during a manipulation. + * + * **Syntax**: `chained | none` + * + * **Initial value**: `chained` + */ + "-ms-scroll-chaining"?: Property.MsScrollChaining | undefined; + /** + * The `**-ms-scroll-limit-x-max**` CSS property is a Microsoft extension that specifies the maximum value for the `Element.scrollLeft` property. + * + * **Syntax**: `auto | <length>` + * + * **Initial value**: `auto` + */ + "-ms-scroll-limit-x-max"?: Property.MsScrollLimitXMax<TLength> | undefined; + /** + * The **`-ms-scroll-limit-x-min`** CSS property is a Microsoft extension that specifies the minimum value for the `Element.scrollLeft` property. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + */ + "-ms-scroll-limit-x-min"?: Property.MsScrollLimitXMin<TLength> | undefined; + /** + * The **`-ms-scroll-limit-y-max`** CSS property is a Microsoft extension that specifies the maximum value for the `Element.scrollTop` property. + * + * **Syntax**: `auto | <length>` + * + * **Initial value**: `auto` + */ + "-ms-scroll-limit-y-max"?: Property.MsScrollLimitYMax<TLength> | undefined; + /** + * The **`-ms-scroll-limit-y-min`** CSS property is a Microsoft extension that specifies the minimum value for the `Element.scrollTop` property. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + */ + "-ms-scroll-limit-y-min"?: Property.MsScrollLimitYMin<TLength> | undefined; + /** + * The **`-ms-scroll-rails`** CSS property is a Microsoft extension that specifies whether scrolling locks to the primary axis of motion. + * + * **Syntax**: `none | railed` + * + * **Initial value**: `railed` + */ + "-ms-scroll-rails"?: Property.MsScrollRails | undefined; + /** + * The **`-ms-scroll-snap-points-x`** CSS property is a Microsoft extension that specifies where snap-points will be located along the x-axis. + * + * **Syntax**: `snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )` + * + * **Initial value**: `snapInterval(0px, 100%)` + */ + "-ms-scroll-snap-points-x"?: Property.MsScrollSnapPointsX | undefined; + /** + * The **`-ms-scroll-snap-points-y`** CSS property is a Microsoft extension that specifies where snap-points will be located along the y-axis. + * + * **Syntax**: `snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )` + * + * **Initial value**: `snapInterval(0px, 100%)` + */ + "-ms-scroll-snap-points-y"?: Property.MsScrollSnapPointsY | undefined; + /** + * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. + * + * **Syntax**: `none | proximity | mandatory` + * + * **Initial value**: `none` + */ + "-ms-scroll-snap-type"?: Property.MsScrollSnapType | undefined; + /** + * The **`-ms-scroll-translation`** CSS property is a Microsoft extension that specifies whether vertical-to-horizontal scroll wheel translation occurs on the specified element. + * + * **Syntax**: `none | vertical-to-horizontal` + * + * **Initial value**: `none` + */ + "-ms-scroll-translation"?: Property.MsScrollTranslation | undefined; + /** + * The **`-ms-scrollbar-3dlight-color`** CSS property is a Microsoft extension specifying the color of the top and left edges of the scroll box and scroll arrows of a scroll bar. + * + * **Syntax**: `<color>` + * + * **Initial value**: depends on user agent + */ + "-ms-scrollbar-3dlight-color"?: Property.MsScrollbar3dlightColor | undefined; + /** + * The **`-ms-scrollbar-arrow-color`** CSS property is a Microsoft extension that specifies the color of the arrow elements of a scroll arrow. + * + * **Syntax**: `<color>` + * + * **Initial value**: `ButtonText` + */ + "-ms-scrollbar-arrow-color"?: Property.MsScrollbarArrowColor | undefined; + /** + * The `**-ms-scrollbar-base-color**` CSS property is a Microsoft extension that specifies the base color of the main elements of a scroll bar. + * + * **Syntax**: `<color>` + * + * **Initial value**: depends on user agent + */ + "-ms-scrollbar-base-color"?: Property.MsScrollbarBaseColor | undefined; + /** + * The **`-ms-scrollbar-darkshadow-color`** CSS property is a Microsoft extension that specifies the color of a scroll bar's gutter. + * + * **Syntax**: `<color>` + * + * **Initial value**: `ThreeDDarkShadow` + */ + "-ms-scrollbar-darkshadow-color"?: Property.MsScrollbarDarkshadowColor | undefined; + /** + * The `**-ms-scrollbar-face-color**` CSS property is a Microsoft extension that specifies the color of the scroll box and scroll arrows of a scroll bar. + * + * **Syntax**: `<color>` + * + * **Initial value**: `ThreeDFace` + */ + "-ms-scrollbar-face-color"?: Property.MsScrollbarFaceColor | undefined; + /** + * The `**-ms-scrollbar-highlight-color**` CSS property is a Microsoft extension that specifies the color of the slider tray, the top and left edges of the scroll box, and the scroll arrows of a scroll bar. + * + * **Syntax**: `<color>` + * + * **Initial value**: `ThreeDHighlight` + */ + "-ms-scrollbar-highlight-color"?: Property.MsScrollbarHighlightColor | undefined; + /** + * The **`-ms-scrollbar-shadow-color`** CSS property is a Microsoft extension that specifies the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar. + * + * **Syntax**: `<color>` + * + * **Initial value**: `ThreeDDarkShadow` + */ + "-ms-scrollbar-shadow-color"?: Property.MsScrollbarShadowColor | undefined; + /** + * The **`-ms-scrollbar-track-color`** CSS property is a Microsoft extension that specifies the color of the track element of a scrollbar. + * + * **Syntax**: `<color>` + * + * **Initial value**: `Scrollbar` + */ + "-ms-scrollbar-track-color"?: Property.MsScrollbarTrackColor | undefined; + /** + * The **`-ms-text-autospace`** CSS property is a Microsoft extension that specifies the autospacing and narrow space width adjustment of text. + * + * **Syntax**: `none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space` + * + * **Initial value**: `none` + */ + "-ms-text-autospace"?: Property.MsTextAutospace | undefined; + /** + * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. + * + * **Syntax**: `none | all | [ digits <integer>? ]` + * + * **Initial value**: `none` + */ + "-ms-text-combine-horizontal"?: Property.TextCombineUpright | undefined; + /** + * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. + * + * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` + * + * **Initial value**: `clip` + */ + "-ms-text-overflow"?: Property.TextOverflow | undefined; + /** + * The **`touch-action`** CSS property sets how an element's region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). + * + * **Syntax**: `auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation` + * + * **Initial value**: `auto` + */ + "-ms-touch-action"?: Property.TouchAction | undefined; + /** + * The **`-ms-touch-select`** CSS property is a Microsoft extension that toggles the gripper visual elements that enable touch text selection. + * + * **Syntax**: `grippers | none` + * + * **Initial value**: `grippers` + */ + "-ms-touch-select"?: Property.MsTouchSelect | undefined; + /** + * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. + * + * **Syntax**: `none | <transform-list>` + * + * **Initial value**: `none` + */ + "-ms-transform"?: Property.Transform | undefined; + /** + * The **`transform-origin`** CSS property sets the origin for an element's transformations. + * + * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` + * + * **Initial value**: `50% 50% 0` + */ + "-ms-transform-origin"?: Property.TransformOrigin<TLength> | undefined; + /** + * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + */ + "-ms-transition-delay"?: Property.TransitionDelay<TTime> | undefined; + /** + * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + */ + "-ms-transition-duration"?: Property.TransitionDuration<TTime> | undefined; + /** + * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. + * + * **Syntax**: `none | <single-transition-property>#` + * + * **Initial value**: all + */ + "-ms-transition-property"?: Property.TransitionProperty | undefined; + /** + * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + */ + "-ms-transition-timing-function"?: Property.TransitionTimingFunction | undefined; + /** + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. + * + * **Syntax**: `none | element | text` + * + * **Initial value**: `text` + */ + "-ms-user-select"?: Property.MsUserSelect | undefined; + /** + * The **`word-break`** CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box. + * + * **Syntax**: `normal | break-all | keep-all | break-word` + * + * **Initial value**: `normal` + */ + "-ms-word-break"?: Property.WordBreak | undefined; + /** + * The **`-ms-wrap-flow`** CSS property is a Microsoft extension that specifies how exclusions impact inline content within block-level elements. + * + * **Syntax**: `auto | both | start | end | maximum | clear` + * + * **Initial value**: `auto` + */ + "-ms-wrap-flow"?: Property.MsWrapFlow | undefined; + /** + * The **`-ms-wrap-margin`** CSS property is a Microsoft extension that specifies a margin that offsets the inner wrap shape from other shapes. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + */ + "-ms-wrap-margin"?: Property.MsWrapMargin<TLength> | undefined; + /** + * The **`-ms-wrap-through`** CSS property is a Microsoft extension that specifies how content should wrap around an exclusion element. + * + * **Syntax**: `wrap | none` + * + * **Initial value**: `wrap` + */ + "-ms-wrap-through"?: Property.MsWrapThrough | undefined; + /** + * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. When set for an entire document, it should be set on the root element (`html` element for HTML documents). + * + * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` + * + * **Initial value**: `horizontal-tb` + */ + "-ms-writing-mode"?: Property.WritingMode | undefined; + /** + * The CSS **`align-content`** property sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis. + * + * **Syntax**: `normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>` + * + * **Initial value**: `normal` + */ + "-webkit-align-content"?: Property.AlignContent | undefined; + /** + * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. In Flexbox, it controls the alignment of items on the Cross Axis. In Grid Layout, it controls the alignment of items on the Block Axis within their grid area. + * + * **Syntax**: `normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]` + * + * **Initial value**: `normal` + */ + "-webkit-align-items"?: Property.AlignItems | undefined; + /** + * The **`align-self`** CSS property overrides a grid or flex item's `align-items` value. In Grid, it aligns the item inside the grid area. In Flexbox, it aligns the item on the cross axis. + * + * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>` + * + * **Initial value**: `auto` + */ + "-webkit-align-self"?: Property.AlignSelf | undefined; + /** + * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + */ + "-webkit-animation-delay"?: Property.AnimationDelay<TTime> | undefined; + /** + * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. + * + * **Syntax**: `<single-animation-direction>#` + * + * **Initial value**: `normal` + */ + "-webkit-animation-direction"?: Property.AnimationDirection | undefined; + /** + * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + */ + "-webkit-animation-duration"?: Property.AnimationDuration<TTime> | undefined; + /** + * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. + * + * **Syntax**: `<single-animation-fill-mode>#` + * + * **Initial value**: `none` + */ + "-webkit-animation-fill-mode"?: Property.AnimationFillMode | undefined; + /** + * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. + * + * **Syntax**: `<single-animation-iteration-count>#` + * + * **Initial value**: `1` + */ + "-webkit-animation-iteration-count"?: Property.AnimationIterationCount | undefined; + /** + * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. + * + * **Syntax**: `[ none | <keyframes-name> ]#` + * + * **Initial value**: `none` + */ + "-webkit-animation-name"?: Property.AnimationName | undefined; + /** + * The **`animation-play-state`** CSS property sets whether an animation is running or paused. + * + * **Syntax**: `<single-animation-play-state>#` + * + * **Initial value**: `running` + */ + "-webkit-animation-play-state"?: Property.AnimationPlayState | undefined; + /** + * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + */ + "-webkit-animation-timing-function"?: Property.AnimationTimingFunction | undefined; + /** + * The **`appearance`** CSS property is used to control native appearance of UI controls, that are based on operating system's theme. + * + * **Syntax**: `none | button | button-bevel | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button` + * + * **Initial value**: `none` (but this value is overridden in the user agent CSS) + */ + "-webkit-appearance"?: Property.WebkitAppearance | undefined; + /** + * The **`backdrop-filter`** CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything _behind_ the element, to see the effect you must make the element or its background at least partially transparent. + * + * **Syntax**: `none | <filter-function-list>` + * + * **Initial value**: `none` + */ + "-webkit-backdrop-filter"?: Property.BackdropFilter | undefined; + /** + * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. + * + * **Syntax**: `visible | hidden` + * + * **Initial value**: `visible` + */ + "-webkit-backface-visibility"?: Property.BackfaceVisibility | undefined; + /** + * The **`background-clip`** CSS property sets whether an element's background extends underneath its border box, padding box, or content box. + * + * **Syntax**: `<box>#` + * + * **Initial value**: `border-box` + */ + "-webkit-background-clip"?: Property.BackgroundClip | undefined; + /** + * The **`background-origin`** CSS property sets the background's origin: from the border start, inside the border, or inside the padding. + * + * **Syntax**: `<box>#` + * + * **Initial value**: `padding-box` + */ + "-webkit-background-origin"?: Property.BackgroundOrigin | undefined; + /** + * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. + * + * **Syntax**: `<bg-size>#` + * + * **Initial value**: `auto auto` + */ + "-webkit-background-size"?: Property.BackgroundSize<TLength> | undefined; + /** + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + */ + "-webkit-border-before-color"?: Property.WebkitBorderBeforeColor | undefined; + /** + * **Syntax**: `<'border-style'>` + * + * **Initial value**: `none` + */ + "-webkit-border-before-style"?: Property.WebkitBorderBeforeStyle | undefined; + /** + * **Syntax**: `<'border-width'>` + * + * **Initial value**: `medium` + */ + "-webkit-border-before-width"?: Property.WebkitBorderBeforeWidth<TLength> | undefined; + /** + * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + */ + "-webkit-border-bottom-left-radius"?: Property.BorderBottomLeftRadius<TLength> | undefined; + /** + * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + */ + "-webkit-border-bottom-right-radius"?: Property.BorderBottomRightRadius<TLength> | undefined; + /** + * The **`border-image-slice`** CSS property divides the image specified by `border-image-source` into regions. These regions form the components of an element's border image. + * + * **Syntax**: `<number-percentage>{1,4} && fill?` + * + * **Initial value**: `100%` + */ + "-webkit-border-image-slice"?: Property.BorderImageSlice | undefined; + /** + * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + */ + "-webkit-border-top-left-radius"?: Property.BorderTopLeftRadius<TLength> | undefined; + /** + * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + */ + "-webkit-border-top-right-radius"?: Property.BorderTopRightRadius<TLength> | undefined; + /** + * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. + * + * **Syntax**: `slice | clone` + * + * **Initial value**: `slice` + */ + "-webkit-box-decoration-break"?: Property.BoxDecorationBreak | undefined; + /** + * The **`-webkit-box-reflect`** CSS property lets you reflect the content of an element in one specific direction. + * + * **Syntax**: `[ above | below | right | left ]? <length>? <image>?` + * + * **Initial value**: `none` + */ + "-webkit-box-reflect"?: Property.WebkitBoxReflect<TLength> | undefined; + /** + * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. + * + * **Syntax**: `none | <shadow>#` + * + * **Initial value**: `none` + */ + "-webkit-box-shadow"?: Property.BoxShadow | undefined; + /** + * The **`box-sizing`** CSS property sets how the total width and height of an element is calculated. + * + * **Syntax**: `content-box | border-box` + * + * **Initial value**: `content-box` + */ + "-webkit-box-sizing"?: Property.BoxSizing | undefined; + /** + * The **`clip-path`** CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. + * + * **Syntax**: `<clip-source> | [ <basic-shape> || <geometry-box> ] | none` + * + * **Initial value**: `none` + */ + "-webkit-clip-path"?: Property.ClipPath | undefined; + /** + * The **`column-count`** CSS property breaks an element's content into the specified number of columns. + * + * **Syntax**: `<integer> | auto` + * + * **Initial value**: `auto` + */ + "-webkit-column-count"?: Property.ColumnCount | undefined; + /** + * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. + * + * **Syntax**: `auto | balance | balance-all` + * + * **Initial value**: `balance` + */ + "-webkit-column-fill"?: Property.ColumnFill | undefined; + /** + * The **`column-rule-color`** CSS property sets the color of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + */ + "-webkit-column-rule-color"?: Property.ColumnRuleColor | undefined; + /** + * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<'border-style'>` + * + * **Initial value**: `none` + */ + "-webkit-column-rule-style"?: Property.ColumnRuleStyle | undefined; + /** + * The **`column-rule-width`** CSS property sets the width of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<'border-width'>` + * + * **Initial value**: `medium` + */ + "-webkit-column-rule-width"?: Property.ColumnRuleWidth<TLength> | undefined; + /** + * The **`column-span`** CSS property makes it possible for an element to span across all columns when its value is set to `all`. + * + * **Syntax**: `none | all` + * + * **Initial value**: `none` + */ + "-webkit-column-span"?: Property.ColumnSpan | undefined; + /** + * The **`column-width`** CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. + * + * **Syntax**: `<length> | auto` + * + * **Initial value**: `auto` + */ + "-webkit-column-width"?: Property.ColumnWidth<TLength> | undefined; + /** + * The **`filter`** CSS property applies graphical effects like blur or color shift to an element. Filters are commonly used to adjust the rendering of images, backgrounds, and borders. + * + * **Syntax**: `none | <filter-function-list>` + * + * **Initial value**: `none` + */ + "-webkit-filter"?: Property.Filter | undefined; + /** + * The **`flex-basis`** CSS property sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with `box-sizing`. + * + * **Syntax**: `content | <'width'>` + * + * **Initial value**: `auto` + */ + "-webkit-flex-basis"?: Property.FlexBasis<TLength> | undefined; + /** + * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). + * + * **Syntax**: `row | row-reverse | column | column-reverse` + * + * **Initial value**: `row` + */ + "-webkit-flex-direction"?: Property.FlexDirection | undefined; + /** + * The **`flex-grow`** CSS property sets the flex grow factor of a flex item's main size. + * + * **Syntax**: `<number>` + * + * **Initial value**: `0` + */ + "-webkit-flex-grow"?: Property.FlexGrow | undefined; + /** + * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. + * + * **Syntax**: `<number>` + * + * **Initial value**: `1` + */ + "-webkit-flex-shrink"?: Property.FlexShrink | undefined; + /** + * The **`flex-wrap`** CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. + * + * **Syntax**: `nowrap | wrap | wrap-reverse` + * + * **Initial value**: `nowrap` + */ + "-webkit-flex-wrap"?: Property.FlexWrap | undefined; + /** + * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. + * + * **Syntax**: `normal | <feature-tag-value>#` + * + * **Initial value**: `normal` + */ + "-webkit-font-feature-settings"?: Property.FontFeatureSettings | undefined; + /** + * The **`font-kerning`** CSS property sets the use of the kerning information stored in a font. + * + * **Syntax**: `auto | normal | none` + * + * **Initial value**: `auto` + */ + "-webkit-font-kerning"?: Property.FontKerning | undefined; + /** + * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. + * + * **Syntax**: `auto | never | always | <absolute-size> | <length>` + * + * **Initial value**: `auto` + */ + "-webkit-font-smoothing"?: Property.FontSmooth<TLength> | undefined; + /** + * The **`font-variant-ligatures`** CSS property controls which ligatures and contextual forms are used in textual content of the elements it applies to. This leads to more harmonized forms in the resulting text. + * + * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]` + * + * **Initial value**: `normal` + */ + "-webkit-font-variant-ligatures"?: Property.FontVariantLigatures | undefined; + /** + * The **`hyphenate-character`** CSS property sets the character (or string) used at the end of a line before a hyphenation break. + * + * **Syntax**: `auto | <string>` + * + * **Initial value**: `auto` + */ + "-webkit-hyphenate-character"?: Property.HyphenateCharacter | undefined; + /** + * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. + * + * **Syntax**: `none | manual | auto` + * + * **Initial value**: `manual` + */ + "-webkit-hyphens"?: Property.Hyphens | undefined; + /** + * The `initial-letter` CSS property sets styling for dropped, raised, and sunken initial letters. + * + * **Syntax**: `normal | [ <number> <integer>? ]` + * + * **Initial value**: `normal` + */ + "-webkit-initial-letter"?: Property.InitialLetter | undefined; + /** + * The CSS **`justify-content`** property defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container. + * + * **Syntax**: `normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]` + * + * **Initial value**: `normal` + */ + "-webkit-justify-content"?: Property.JustifyContent | undefined; + /** + * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. + * + * **Syntax**: `auto | loose | normal | strict | anywhere` + * + * **Initial value**: `auto` + */ + "-webkit-line-break"?: Property.LineBreak | undefined; + /** + * The **`-webkit-line-clamp`** CSS property allows limiting of the contents of a block to the specified number of lines. + * + * **Syntax**: `none | <integer>` + * + * **Initial value**: `none` + */ + "-webkit-line-clamp"?: Property.WebkitLineClamp | undefined; + /** + * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'margin-left'>` + * + * **Initial value**: `0` + */ + "-webkit-margin-end"?: Property.MarginInlineEnd<TLength> | undefined; + /** + * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'margin-left'>` + * + * **Initial value**: `0` + */ + "-webkit-margin-start"?: Property.MarginInlineStart<TLength> | undefined; + /** + * If a `mask-image` is specified, `-webkit-mask-attachment` determines whether the mask image's position is fixed within the viewport, or scrolls along with its containing block. + * + * **Syntax**: `<attachment>#` + * + * **Initial value**: `scroll` + */ + "-webkit-mask-attachment"?: Property.WebkitMaskAttachment | undefined; + /** + * The **`mask-border-outset`** CSS property specifies the distance by which an element's mask border is set out from its border box. + * + * **Syntax**: `[ <length> | <number> ]{1,4}` + * + * **Initial value**: `0` + */ + "-webkit-mask-box-image-outset"?: Property.MaskBorderOutset<TLength> | undefined; + /** + * The **`mask-border-repeat`** CSS property sets how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border. + * + * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` + * + * **Initial value**: `stretch` + */ + "-webkit-mask-box-image-repeat"?: Property.MaskBorderRepeat | undefined; + /** + * The **`mask-border-slice`** CSS property divides the image set by `mask-border-source` into regions. These regions are used to form the components of an element's mask border. + * + * **Syntax**: `<number-percentage>{1,4} fill?` + * + * **Initial value**: `0` + */ + "-webkit-mask-box-image-slice"?: Property.MaskBorderSlice | undefined; + /** + * The **`mask-border-source`** CSS property sets the source image used to create an element's mask border. + * + * **Syntax**: `none | <image>` + * + * **Initial value**: `none` + */ + "-webkit-mask-box-image-source"?: Property.MaskBorderSource | undefined; + /** + * The **`mask-border-width`** CSS property sets the width of an element's mask border. + * + * **Syntax**: `[ <length-percentage> | <number> | auto ]{1,4}` + * + * **Initial value**: `auto` + */ + "-webkit-mask-box-image-width"?: Property.MaskBorderWidth<TLength> | undefined; + /** + * The **`mask-clip`** CSS property determines the area which is affected by a mask. The painted content of an element must be restricted to this area. + * + * **Syntax**: `[ <box> | border | padding | content | text ]#` + * + * **Initial value**: `border` + */ + "-webkit-mask-clip"?: Property.WebkitMaskClip | undefined; + /** + * The **`-webkit-mask-composite`** property specifies the manner in which multiple mask images applied to the same element are composited with one another. Mask images are composited in the opposite order that they are declared with the `-webkit-mask-image` property. + * + * **Syntax**: `<composite-style>#` + * + * **Initial value**: `source-over` + */ + "-webkit-mask-composite"?: Property.WebkitMaskComposite | undefined; + /** + * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. By default this means the alpha channel of the mask image will be multiplied with the alpha channel of the element. This can be controlled with the `mask-mode` property. + * + * **Syntax**: `<mask-reference>#` + * + * **Initial value**: `none` + */ + "-webkit-mask-image"?: Property.WebkitMaskImage | undefined; + /** + * The **`mask-origin`** CSS property sets the origin of a mask. + * + * **Syntax**: `[ <box> | border | padding | content ]#` + * + * **Initial value**: `padding` + */ + "-webkit-mask-origin"?: Property.WebkitMaskOrigin | undefined; + /** + * The **`mask-position`** CSS property sets the initial position, relative to the mask position layer set by `mask-origin`, for each defined mask image. + * + * **Syntax**: `<position>#` + * + * **Initial value**: `0% 0%` + */ + "-webkit-mask-position"?: Property.WebkitMaskPosition<TLength> | undefined; + /** + * The `-webkit-mask-position-x` CSS property sets the initial horizontal position of a mask image. + * + * **Syntax**: `[ <length-percentage> | left | center | right ]#` + * + * **Initial value**: `0%` + */ + "-webkit-mask-position-x"?: Property.WebkitMaskPositionX<TLength> | undefined; + /** + * The `-webkit-mask-position-y` CSS property sets the initial vertical position of a mask image. + * + * **Syntax**: `[ <length-percentage> | top | center | bottom ]#` + * + * **Initial value**: `0%` + */ + "-webkit-mask-position-y"?: Property.WebkitMaskPositionY<TLength> | undefined; + /** + * The **`mask-repeat`** CSS property sets how mask images are repeated. A mask image can be repeated along the horizontal axis, the vertical axis, both axes, or not repeated at all. + * + * **Syntax**: `<repeat-style>#` + * + * **Initial value**: `repeat` + */ + "-webkit-mask-repeat"?: Property.WebkitMaskRepeat | undefined; + /** + * The `-webkit-mask-repeat-x` property specifies whether and how a mask image is repeated (tiled) horizontally. + * + * **Syntax**: `repeat | no-repeat | space | round` + * + * **Initial value**: `repeat` + */ + "-webkit-mask-repeat-x"?: Property.WebkitMaskRepeatX | undefined; + /** + * The `-webkit-mask-repeat-y` property sets whether and how a mask image is repeated (tiled) vertically. + * + * **Syntax**: `repeat | no-repeat | space | round` + * + * **Initial value**: `repeat` + */ + "-webkit-mask-repeat-y"?: Property.WebkitMaskRepeatY | undefined; + /** + * The **`mask-size`** CSS property specifies the sizes of the mask images. The size of the image can be fully or partially constrained in order to preserve its intrinsic ratio. + * + * **Syntax**: `<bg-size>#` + * + * **Initial value**: `auto auto` + */ + "-webkit-mask-size"?: Property.WebkitMaskSize<TLength> | undefined; + /** + * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block, depending on its writing mode. It corresponds to either the `max-width` or the `max-height` property, depending on the value of `writing-mode`. + * + * **Syntax**: `<'max-width'>` + * + * **Initial value**: `none` + */ + "-webkit-max-inline-size"?: Property.MaxInlineSize<TLength> | undefined; + /** + * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `0` + */ + "-webkit-order"?: Property.Order | undefined; + /** + * The `-webkit-overflow-scrolling` CSS property controls whether or not touch devices use momentum-based scrolling for a given element. + * + * **Syntax**: `auto | touch` + * + * **Initial value**: `auto` + */ + "-webkit-overflow-scrolling"?: Property.WebkitOverflowScrolling | undefined; + /** + * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>` + * + * **Initial value**: `0` + */ + "-webkit-padding-end"?: Property.PaddingInlineEnd<TLength> | undefined; + /** + * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>` + * + * **Initial value**: `0` + */ + "-webkit-padding-start"?: Property.PaddingInlineStart<TLength> | undefined; + /** + * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. + * + * **Syntax**: `none | <length>` + * + * **Initial value**: `none` + */ + "-webkit-perspective"?: Property.Perspective<TLength> | undefined; + /** + * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. + * + * **Syntax**: `<position>` + * + * **Initial value**: `50% 50%` + */ + "-webkit-perspective-origin"?: Property.PerspectiveOrigin<TLength> | undefined; + /** + * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. + * + * **Syntax**: `economy | exact` + * + * **Initial value**: `economy` + */ + "-webkit-print-color-adjust"?: Property.PrintColorAdjust | undefined; + /** + * The **`ruby-position`** CSS property defines the position of a ruby element relatives to its base element. It can be positioned over the element (`over`), under it (`under`), or between the characters on their right side (`inter-character`). + * + * **Syntax**: `[ alternate || [ over | under ] ] | inter-character` + * + * **Initial value**: `alternate` + */ + "-webkit-ruby-position"?: Property.RubyPosition | undefined; + /** + * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. + * + * **Syntax**: `none | [ x | y | block | inline | both ] [ mandatory | proximity ]?` + * + * **Initial value**: `none` + */ + "-webkit-scroll-snap-type"?: Property.ScrollSnapType | undefined; + /** + * The **`shape-margin`** CSS property sets a margin for a CSS shape created using `shape-outside`. + * + * **Syntax**: `<length-percentage>` + * + * **Initial value**: `0` + */ + "-webkit-shape-margin"?: Property.ShapeMargin<TLength> | undefined; + /** + * **`-webkit-tap-highlight-color`** is a non-standard CSS property that sets the color of the highlight that appears over a link while it's being tapped. The highlighting indicates to the user that their tap is being successfully recognized, and indicates which element they're tapping on. + * + * **Syntax**: `<color>` + * + * **Initial value**: `black` + */ + "-webkit-tap-highlight-color"?: Property.WebkitTapHighlightColor | undefined; + /** + * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. + * + * **Syntax**: `none | all | [ digits <integer>? ]` + * + * **Initial value**: `none` + */ + "-webkit-text-combine"?: Property.TextCombineUpright | undefined; + /** + * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + */ + "-webkit-text-decoration-color"?: Property.TextDecorationColor | undefined; + /** + * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. + * + * **Syntax**: `none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error` + * + * **Initial value**: `none` + */ + "-webkit-text-decoration-line"?: Property.TextDecorationLine | undefined; + /** + * The **`text-decoration-skip`** CSS property sets what parts of an element's content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. + * + * **Syntax**: `none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]` + * + * **Initial value**: `objects` + */ + "-webkit-text-decoration-skip"?: Property.TextDecorationSkip | undefined; + /** + * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. + * + * **Syntax**: `solid | double | dotted | dashed | wavy` + * + * **Initial value**: `solid` + */ + "-webkit-text-decoration-style"?: Property.TextDecorationStyle | undefined; + /** + * The **`text-emphasis-color`** CSS property sets the color of emphasis marks. This value can also be set using the `text-emphasis` shorthand. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + */ + "-webkit-text-emphasis-color"?: Property.TextEmphasisColor | undefined; + /** + * The **`text-emphasis-position`** CSS property sets where emphasis marks are drawn. Like ruby text, if there isn't enough room for emphasis marks, the line height is increased. + * + * **Syntax**: `[ over | under ] && [ right | left ]` + * + * **Initial value**: `over right` + */ + "-webkit-text-emphasis-position"?: Property.TextEmphasisPosition | undefined; + /** + * The **`text-emphasis-style`** CSS property sets the appearance of emphasis marks. It can also be set, and reset, using the `text-emphasis` shorthand. + * + * **Syntax**: `none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>` + * + * **Initial value**: `none` + */ + "-webkit-text-emphasis-style"?: Property.TextEmphasisStyle | undefined; + /** + * The **`-webkit-text-fill-color`** CSS property specifies the fill color of characters of text. If this property is not set, the value of the `color` property is used. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + */ + "-webkit-text-fill-color"?: Property.WebkitTextFillColor | undefined; + /** + * The **`text-orientation`** CSS property sets the orientation of the text characters in a line. It only affects text in vertical mode (when `writing-mode` is not `horizontal-tb`). It is useful for controlling the display of languages that use vertical script, and also for making vertical table headers. + * + * **Syntax**: `mixed | upright | sideways` + * + * **Initial value**: `mixed` + */ + "-webkit-text-orientation"?: Property.TextOrientation | undefined; + /** + * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. + * + * **Syntax**: `none | auto | <percentage>` + * + * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). + */ + "-webkit-text-size-adjust"?: Property.TextSizeAdjust | undefined; + /** + * The **`-webkit-text-stroke-color`** CSS property specifies the stroke color of characters of text. If this property is not set, the value of the `color` property is used. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + */ + "-webkit-text-stroke-color"?: Property.WebkitTextStrokeColor | undefined; + /** + * The **`-webkit-text-stroke-width`** CSS property specifies the width of the stroke for text. + * + * **Syntax**: `<length>` + * + * **Initial value**: `0` + */ + "-webkit-text-stroke-width"?: Property.WebkitTextStrokeWidth<TLength> | undefined; + /** + * The **`text-underline-position`** CSS property specifies the position of the underline which is set using the `text-decoration` property's `underline` value. + * + * **Syntax**: `auto | from-font | [ under || [ left | right ] ]` + * + * **Initial value**: `auto` + */ + "-webkit-text-underline-position"?: Property.TextUnderlinePosition | undefined; + /** + * The `-webkit-touch-callout` CSS property controls the display of the default callout shown when you touch and hold a touch target. + * + * **Syntax**: `default | none` + * + * **Initial value**: `default` + */ + "-webkit-touch-callout"?: Property.WebkitTouchCallout | undefined; + /** + * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. + * + * **Syntax**: `none | <transform-list>` + * + * **Initial value**: `none` + */ + "-webkit-transform"?: Property.Transform | undefined; + /** + * The **`transform-origin`** CSS property sets the origin for an element's transformations. + * + * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` + * + * **Initial value**: `50% 50% 0` + */ + "-webkit-transform-origin"?: Property.TransformOrigin<TLength> | undefined; + /** + * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. + * + * **Syntax**: `flat | preserve-3d` + * + * **Initial value**: `flat` + */ + "-webkit-transform-style"?: Property.TransformStyle | undefined; + /** + * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + */ + "-webkit-transition-delay"?: Property.TransitionDelay<TTime> | undefined; + /** + * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + */ + "-webkit-transition-duration"?: Property.TransitionDuration<TTime> | undefined; + /** + * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. + * + * **Syntax**: `none | <single-transition-property>#` + * + * **Initial value**: all + */ + "-webkit-transition-property"?: Property.TransitionProperty | undefined; + /** + * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + */ + "-webkit-transition-timing-function"?: Property.TransitionTimingFunction | undefined; + /** + * **Syntax**: `read-only | read-write | read-write-plaintext-only` + * + * **Initial value**: `read-only` + */ + "-webkit-user-modify"?: Property.WebkitUserModify | undefined; + /** + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. + * + * **Syntax**: `auto | text | none | contain | all` + * + * **Initial value**: `auto` + */ + "-webkit-user-select"?: Property.UserSelect | undefined; + /** + * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. When set for an entire document, it should be set on the root element (`html` element for HTML documents). + * + * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` + * + * **Initial value**: `horizontal-tb` + */ + "-webkit-writing-mode"?: Property.WritingMode | undefined; +} + +export interface VendorShorthandPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { + /** + * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. + * + * **Syntax**: `<single-animation>#` + */ + "-moz-animation"?: Property.Animation<TTime> | undefined; + /** + * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. + * + * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` + */ + "-moz-border-image"?: Property.BorderImage | undefined; + /** + * The **`column-rule`** shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` + */ + "-moz-column-rule"?: Property.ColumnRule<TLength> | undefined; + /** + * The **`columns`** CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths. + * + * **Syntax**: `<'column-width'> || <'column-count'>` + */ + "-moz-columns"?: Property.Columns<TLength> | undefined; + /** + * In Mozilla applications like Firefox, the **`-moz-outline-radius`** CSS shorthand property can be used to give an element's `outline` rounded corners. + * + * **Syntax**: `<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?` + */ + "-moz-outline-radius"?: Property.MozOutlineRadius<TLength> | undefined; + /** + * The **`-ms-content-zoom-limit`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-content-zoom-limit-min` and `-ms-content-zoom-limit-max` properties. + * + * **Syntax**: `<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>` + */ + "-ms-content-zoom-limit"?: Property.MsContentZoomLimit | undefined; + /** + * The **`-ms-content-zoom-snap`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-content-zoom-snap-type` and `-ms-content-zoom-snap-points` properties. + * + * **Syntax**: `<'-ms-content-zoom-snap-type'> || <'-ms-content-zoom-snap-points'>` + */ + "-ms-content-zoom-snap"?: Property.MsContentZoomSnap | undefined; + /** + * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container. + * + * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` + */ + "-ms-flex"?: Property.Flex<TLength> | undefined; + /** + * The **\-ms-scroll-limit** CSS property is a Microsoft extension that specifies values for the `-ms-scroll-limit-x-min`, `-ms-scroll-limit-y-min`, `-ms-scroll-limit-x-max`, and `-ms-scroll-limit-y-max` properties. + * + * **Syntax**: `<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>` + */ + "-ms-scroll-limit"?: Property.MsScrollLimit | undefined; + /** + * The **`-ms-scroll-snap-x`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-scroll-snap-type` and `-ms-scroll-snap-points-x` properties. + * + * **Syntax**: `<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>` + */ + "-ms-scroll-snap-x"?: Property.MsScrollSnapX | undefined; + /** + * The **`-ms-scroll-snap-x`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-scroll-snap-type` and `-ms-scroll-snap-points-y` properties. + * + * **Syntax**: `<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>` + */ + "-ms-scroll-snap-y"?: Property.MsScrollSnapY | undefined; + /** + * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. + * + * **Syntax**: `<single-transition>#` + */ + "-ms-transition"?: Property.Transition<TTime> | undefined; + /** + * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. + * + * **Syntax**: `<single-animation>#` + */ + "-webkit-animation"?: Property.Animation<TTime> | undefined; + /** + * The **`-webkit-border-before`** CSS property is a shorthand property for setting the individual logical block start border property values in a single place in the style sheet. + * + * **Syntax**: `<'border-width'> || <'border-style'> || <color>` + */ + "-webkit-border-before"?: Property.WebkitBorderBefore<TLength> | undefined; + /** + * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. + * + * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` + */ + "-webkit-border-image"?: Property.BorderImage | undefined; + /** + * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. + * + * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` + */ + "-webkit-border-radius"?: Property.BorderRadius<TLength> | undefined; + /** + * The **`column-rule`** shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout. + * + * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` + */ + "-webkit-column-rule"?: Property.ColumnRule<TLength> | undefined; + /** + * The **`columns`** CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths. + * + * **Syntax**: `<'column-width'> || <'column-count'>` + */ + "-webkit-columns"?: Property.Columns<TLength> | undefined; + /** + * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container. + * + * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` + */ + "-webkit-flex"?: Property.Flex<TLength> | undefined; + /** + * The **`flex-flow`** CSS shorthand property specifies the direction of a flex container, as well as its wrapping behavior. + * + * **Syntax**: `<'flex-direction'> || <'flex-wrap'>` + */ + "-webkit-flex-flow"?: Property.FlexFlow | undefined; + /** + * The **`mask`** CSS shorthand property hides an element (partially or fully) by masking or clipping the image at specific points. + * + * **Syntax**: `[ <mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || [ <box> | border | padding | content | text ] || [ <box> | border | padding | content ] ]#` + */ + "-webkit-mask"?: Property.WebkitMask<TLength> | undefined; + /** + * The **`mask-border`** CSS shorthand property lets you create a mask along the edge of an element's border. + * + * **Syntax**: `<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>` + */ + "-webkit-mask-box-image"?: Property.MaskBorder | undefined; + /** + * The **`text-emphasis`** CSS property applies emphasis marks to text (except spaces and control characters). It is a shorthand for `text-emphasis-style` and `text-emphasis-color`. + * + * **Syntax**: `<'text-emphasis-style'> || <'text-emphasis-color'>` + */ + "-webkit-text-emphasis"?: Property.TextEmphasis | undefined; + /** + * The **`-webkit-text-stroke`** CSS property specifies the width and color of strokes for text characters. This is a shorthand property for the longhand properties `-webkit-text-stroke-width` and `-webkit-text-stroke-color`. + * + * **Syntax**: `<length> || <color>` + */ + "-webkit-text-stroke"?: Property.WebkitTextStroke<TLength> | undefined; + /** + * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. + * + * **Syntax**: `<single-transition>#` + */ + "-webkit-transition"?: Property.Transition<TTime> | undefined; +} + +export interface VendorPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> + extends VendorLonghandPropertiesHyphen<TLength, TTime>, + VendorShorthandPropertiesHyphen<TLength, TTime> {} + +export interface ObsoletePropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { + /** + * In combination with `elevation`, the **`azimuth`** CSS property enables different audio sources to be positioned spatially for aural presentation. This is important in that it provides a natural way to tell several voices apart, as each can be positioned to originate at a different location on the sound stage. Stereo output produce a lateral sound stage, while binaural headphones and multi-speaker setups allow for a fully three-dimensional stage. + * + * **Syntax**: `<angle> | [ [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards` + * + * **Initial value**: `center` + * + * @deprecated + */ + azimuth?: Property.Azimuth | undefined; + /** + * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. + * + * **Syntax**: `start | center | end | baseline | stretch` + * + * **Initial value**: `stretch` + * + * @deprecated + */ + "box-align"?: Property.BoxAlign | undefined; + /** + * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). + * + * **Syntax**: `normal | reverse | inherit` + * + * **Initial value**: `normal` + * + * @deprecated + */ + "box-direction"?: Property.BoxDirection | undefined; + /** + * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. + * + * **Syntax**: `<number>` + * + * **Initial value**: `0` + * + * @deprecated + */ + "box-flex"?: Property.BoxFlex | undefined; + /** + * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `1` + * + * @deprecated + */ + "box-flex-group"?: Property.BoxFlexGroup | undefined; + /** + * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). + * + * **Syntax**: `single | multiple` + * + * **Initial value**: `single` + * + * @deprecated + */ + "box-lines"?: Property.BoxLines | undefined; + /** + * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `1` + * + * @deprecated + */ + "box-ordinal-group"?: Property.BoxOrdinalGroup | undefined; + /** + * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. + * + * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` + * + * **Initial value**: `inline-axis` (`horizontal` in XUL) + * + * @deprecated + */ + "box-orient"?: Property.BoxOrient | undefined; + /** + * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. + * + * **Syntax**: `start | center | end | justify` + * + * **Initial value**: `start` + * + * @deprecated + */ + "box-pack"?: Property.BoxPack | undefined; + /** + * The **`clip`** CSS property defines a visible portion of an element. The `clip` property applies only to absolutely positioned elements — that is, elements with `position:absolute` or `position:fixed`. + * + * **Syntax**: `<shape> | auto` + * + * **Initial value**: `auto` + * + * @deprecated + */ + clip?: Property.Clip | undefined; + /** + * The **`column-gap`** CSS property sets the size of the gap (gutter) between an element's columns. + * + * **Syntax**: `<length-percentage>` + * + * **Initial value**: `0` + * + * @deprecated + */ + "grid-column-gap"?: Property.GridColumnGap<TLength> | undefined; + /** + * The **`gap`** CSS property sets the gaps (gutters) between rows and columns. It is a shorthand for `row-gap` and `column-gap`. + * + * **Syntax**: `<'grid-row-gap'> <'grid-column-gap'>?` + * + * @deprecated + */ + "grid-gap"?: Property.GridGap<TLength> | undefined; + /** + * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's rows. + * + * **Syntax**: `<length-percentage>` + * + * **Initial value**: `0` + * + * @deprecated + */ + "grid-row-gap"?: Property.GridRowGap<TLength> | undefined; + /** + * The **`ime-mode`** CSS property controls the state of the input method editor (IME) for text fields. This property is obsolete. + * + * **Syntax**: `auto | normal | active | inactive | disabled` + * + * **Initial value**: `auto` + * + * @deprecated + */ + "ime-mode"?: Property.ImeMode | undefined; + /** + * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>{1,2}` + * + * @deprecated + */ + "offset-block"?: Property.InsetBlock<TLength> | undefined; + /** + * The **`inset-block-end`** CSS property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>` + * + * **Initial value**: `auto` + * + * @deprecated + */ + "offset-block-end"?: Property.InsetBlockEnd<TLength> | undefined; + /** + * The **`inset-block-start`** CSS property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>` + * + * **Initial value**: `auto` + * + * @deprecated + */ + "offset-block-start"?: Property.InsetBlockStart<TLength> | undefined; + /** + * The **`inset-inline`** CSS property defines the logical start and end offsets of an element in the inline direction, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>{1,2}` + * + * @deprecated + */ + "offset-inline"?: Property.InsetInline<TLength> | undefined; + /** + * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>` + * + * **Initial value**: `auto` + * + * @deprecated + */ + "offset-inline-end"?: Property.InsetInlineEnd<TLength> | undefined; + /** + * The **`inset-inline-start`** CSS property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>` + * + * **Initial value**: `auto` + * + * @deprecated + */ + "offset-inline-start"?: Property.InsetInlineStart<TLength> | undefined; + /** + * The **`scroll-snap-coordinate`** CSS property defines the x and y coordinate positions within an element that will align with its nearest ancestor scroll container's `scroll-snap-destination` for each respective axis. + * + * **Syntax**: `none | <position>#` + * + * **Initial value**: `none` + * + * @deprecated + */ + "scroll-snap-coordinate"?: Property.ScrollSnapCoordinate<TLength> | undefined; + /** + * The **`scroll-snap-destination`** CSS property defines the position in x and y coordinates within the scroll container's visual viewport which element snap points align with. + * + * **Syntax**: `<position>` + * + * **Initial value**: `0px 0px` + * + * @deprecated + */ + "scroll-snap-destination"?: Property.ScrollSnapDestination<TLength> | undefined; + /** + * The **`scroll-snap-points-x`** CSS property defines the horizontal positioning of snap points within the content of the scroll container they are applied to. + * + * **Syntax**: `none | repeat( <length-percentage> )` + * + * **Initial value**: `none` + * + * @deprecated + */ + "scroll-snap-points-x"?: Property.ScrollSnapPointsX | undefined; + /** + * The **`scroll-snap-points-y`** CSS property defines the vertical positioning of snap points within the content of the scroll container they are applied to. + * + * **Syntax**: `none | repeat( <length-percentage> )` + * + * **Initial value**: `none` + * + * @deprecated + */ + "scroll-snap-points-y"?: Property.ScrollSnapPointsY | undefined; + /** + * The **`scroll-snap-type-x`** CSS property defines how strictly snap points are enforced on the horizontal axis of the scroll container in case there is one. + * + * **Syntax**: `none | mandatory | proximity` + * + * **Initial value**: `none` + * + * @deprecated + */ + "scroll-snap-type-x"?: Property.ScrollSnapTypeX | undefined; + /** + * The **`scroll-snap-type-y`** CSS property defines how strictly snap points are enforced on the vertical axis of the scroll container in case there is one. + * + * **Syntax**: `none | mandatory | proximity` + * + * **Initial value**: `none` + * + * @deprecated + */ + "scroll-snap-type-y"?: Property.ScrollSnapTypeY | undefined; + /** + * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. + * + * **Syntax**: `start | center | end | baseline | stretch` + * + * **Initial value**: `stretch` + * + * @deprecated + */ + "-khtml-box-align"?: Property.BoxAlign | undefined; + /** + * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). + * + * **Syntax**: `normal | reverse | inherit` + * + * **Initial value**: `normal` + * + * @deprecated + */ + "-khtml-box-direction"?: Property.BoxDirection | undefined; + /** + * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. + * + * **Syntax**: `<number>` + * + * **Initial value**: `0` + * + * @deprecated + */ + "-khtml-box-flex"?: Property.BoxFlex | undefined; + /** + * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `1` + * + * @deprecated + */ + "-khtml-box-flex-group"?: Property.BoxFlexGroup | undefined; + /** + * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). + * + * **Syntax**: `single | multiple` + * + * **Initial value**: `single` + * + * @deprecated + */ + "-khtml-box-lines"?: Property.BoxLines | undefined; + /** + * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `1` + * + * @deprecated + */ + "-khtml-box-ordinal-group"?: Property.BoxOrdinalGroup | undefined; + /** + * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. + * + * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` + * + * **Initial value**: `inline-axis` (`horizontal` in XUL) + * + * @deprecated + */ + "-khtml-box-orient"?: Property.BoxOrient | undefined; + /** + * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. + * + * **Syntax**: `start | center | end | justify` + * + * **Initial value**: `start` + * + * @deprecated + */ + "-khtml-box-pack"?: Property.BoxPack | undefined; + /** + * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. + * + * **Syntax**: `auto | loose | normal | strict | anywhere` + * + * **Initial value**: `auto` + * + * @deprecated + */ + "-khtml-line-break"?: Property.LineBreak | undefined; + /** + * The **`opacity`** CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. + * + * **Syntax**: `<alpha-value>` + * + * **Initial value**: `1` + * + * @deprecated + */ + "-khtml-opacity"?: Property.Opacity | undefined; + /** + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. + * + * **Syntax**: `auto | text | none | contain | all` + * + * **Initial value**: `auto` + * + * @deprecated + */ + "-khtml-user-select"?: Property.UserSelect | undefined; + /** + * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. + * + * **Syntax**: `visible | hidden` + * + * **Initial value**: `visible` + * + * @deprecated + */ + "-moz-backface-visibility"?: Property.BackfaceVisibility | undefined; + /** + * The **`background-clip`** CSS property sets whether an element's background extends underneath its border box, padding box, or content box. + * + * **Syntax**: `<box>#` + * + * **Initial value**: `border-box` + * + * @deprecated + */ + "-moz-background-clip"?: Property.BackgroundClip | undefined; + /** + * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. + * + * **Syntax**: `slice | clone` + * + * **Initial value**: `slice` + * + * @deprecated + */ + "-moz-background-inline-policy"?: Property.BoxDecorationBreak | undefined; + /** + * The **`background-origin`** CSS property sets the background's origin: from the border start, inside the border, or inside the padding. + * + * **Syntax**: `<box>#` + * + * **Initial value**: `padding-box` + * + * @deprecated + */ + "-moz-background-origin"?: Property.BackgroundOrigin | undefined; + /** + * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. + * + * **Syntax**: `<bg-size>#` + * + * **Initial value**: `auto auto` + * + * @deprecated + */ + "-moz-background-size"?: Property.BackgroundSize<TLength> | undefined; + /** + * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. + * + * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` + * + * @deprecated + */ + "-moz-border-radius"?: Property.BorderRadius<TLength> | undefined; + /** + * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * @deprecated + */ + "-moz-border-radius-bottomleft"?: Property.BorderBottomLeftRadius<TLength> | undefined; + /** + * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * @deprecated + */ + "-moz-border-radius-bottomright"?: Property.BorderBottomRightRadius<TLength> | undefined; + /** + * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * @deprecated + */ + "-moz-border-radius-topleft"?: Property.BorderTopLeftRadius<TLength> | undefined; + /** + * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. + * + * **Syntax**: `<length-percentage>{1,2}` + * + * **Initial value**: `0` + * + * @deprecated + */ + "-moz-border-radius-topright"?: Property.BorderTopRightRadius<TLength> | undefined; + /** + * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. + * + * **Syntax**: `start | center | end | baseline | stretch` + * + * **Initial value**: `stretch` + * + * @deprecated + */ + "-moz-box-align"?: Property.BoxAlign | undefined; + /** + * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). + * + * **Syntax**: `normal | reverse | inherit` + * + * **Initial value**: `normal` + * + * @deprecated + */ + "-moz-box-direction"?: Property.BoxDirection | undefined; + /** + * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. + * + * **Syntax**: `<number>` + * + * **Initial value**: `0` + * + * @deprecated + */ + "-moz-box-flex"?: Property.BoxFlex | undefined; + /** + * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `1` + * + * @deprecated + */ + "-moz-box-ordinal-group"?: Property.BoxOrdinalGroup | undefined; + /** + * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. + * + * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` + * + * **Initial value**: `inline-axis` (`horizontal` in XUL) + * + * @deprecated + */ + "-moz-box-orient"?: Property.BoxOrient | undefined; + /** + * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. + * + * **Syntax**: `start | center | end | justify` + * + * **Initial value**: `start` + * + * @deprecated + */ + "-moz-box-pack"?: Property.BoxPack | undefined; + /** + * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. + * + * **Syntax**: `none | <shadow>#` + * + * **Initial value**: `none` + * + * @deprecated + */ + "-moz-box-shadow"?: Property.BoxShadow | undefined; + /** + * The non-standard **`-moz-float-edge`** CSS property specifies whether the height and width properties of the element include the margin, border, or padding thickness. + * + * **Syntax**: `border-box | content-box | margin-box | padding-box` + * + * **Initial value**: `content-box` + * + * @deprecated + */ + "-moz-float-edge"?: Property.MozFloatEdge | undefined; + /** + * The **`-moz-force-broken-image-icon`** extended CSS property can be used to force the broken image icon to be shown even when a broken image has an `alt` attribute. + * + * **Syntax**: `0 | 1` + * + * **Initial value**: `0` + * + * @deprecated + */ + "-moz-force-broken-image-icon"?: Property.MozForceBrokenImageIcon | undefined; + /** + * The **`opacity`** CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. + * + * **Syntax**: `<alpha-value>` + * + * **Initial value**: `1` + * + * @deprecated + */ + "-moz-opacity"?: Property.Opacity | undefined; + /** + * The **`outline`** CSS shorthand property sets most of the outline properties in a single declaration. + * + * **Syntax**: `[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]` + * + * @deprecated + */ + "-moz-outline"?: Property.Outline<TLength> | undefined; + /** + * The **`outline-color`** CSS property sets the color of an element's outline. + * + * **Syntax**: `<color> | invert` + * + * **Initial value**: `invert`, for browsers supporting it, `currentColor` for the other + * + * @deprecated + */ + "-moz-outline-color"?: Property.OutlineColor | undefined; + /** + * The **`outline-style`** CSS property sets the style of an element's outline. An outline is a line that is drawn around an element, outside the `border`. + * + * **Syntax**: `auto | <'border-style'>` + * + * **Initial value**: `none` + * + * @deprecated + */ + "-moz-outline-style"?: Property.OutlineStyle | undefined; + /** + * The CSS **`outline-width`** property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. + * + * **Syntax**: `<line-width>` + * + * **Initial value**: `medium` + * + * @deprecated + */ + "-moz-outline-width"?: Property.OutlineWidth<TLength> | undefined; + /** + * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. + * + * **Syntax**: `none | <length>` + * + * **Initial value**: `none` + * + * @deprecated + */ + "-moz-perspective"?: Property.Perspective<TLength> | undefined; + /** + * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. + * + * **Syntax**: `<position>` + * + * **Initial value**: `50% 50%` + * + * @deprecated + */ + "-moz-perspective-origin"?: Property.PerspectiveOrigin<TLength> | undefined; + /** + * The **`text-align-last`** CSS property sets how the last line of a block or a line, right before a forced line break, is aligned. + * + * **Syntax**: `auto | start | end | left | right | center | justify` + * + * **Initial value**: `auto` + * + * @deprecated + */ + "-moz-text-align-last"?: Property.TextAlignLast | undefined; + /** + * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. + * + * **Syntax**: `<color>` + * + * **Initial value**: `currentcolor` + * + * @deprecated + */ + "-moz-text-decoration-color"?: Property.TextDecorationColor | undefined; + /** + * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. + * + * **Syntax**: `none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error` + * + * **Initial value**: `none` + * + * @deprecated + */ + "-moz-text-decoration-line"?: Property.TextDecorationLine | undefined; + /** + * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. + * + * **Syntax**: `solid | double | dotted | dashed | wavy` + * + * **Initial value**: `solid` + * + * @deprecated + */ + "-moz-text-decoration-style"?: Property.TextDecorationStyle | undefined; + /** + * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. + * + * **Syntax**: `none | <transform-list>` + * + * **Initial value**: `none` + * + * @deprecated + */ + "-moz-transform"?: Property.Transform | undefined; + /** + * The **`transform-origin`** CSS property sets the origin for an element's transformations. + * + * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` + * + * **Initial value**: `50% 50% 0` + * + * @deprecated + */ + "-moz-transform-origin"?: Property.TransformOrigin<TLength> | undefined; + /** + * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. + * + * **Syntax**: `flat | preserve-3d` + * + * **Initial value**: `flat` + * + * @deprecated + */ + "-moz-transform-style"?: Property.TransformStyle | undefined; + /** + * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. + * + * **Syntax**: `<single-transition>#` + * + * @deprecated + */ + "-moz-transition"?: Property.Transition<TTime> | undefined; + /** + * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + "-moz-transition-delay"?: Property.TransitionDelay<TTime> | undefined; + /** + * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + "-moz-transition-duration"?: Property.TransitionDuration<TTime> | undefined; + /** + * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. + * + * **Syntax**: `none | <single-transition-property>#` + * + * **Initial value**: all + * + * @deprecated + */ + "-moz-transition-property"?: Property.TransitionProperty | undefined; + /** + * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + * + * @deprecated + */ + "-moz-transition-timing-function"?: Property.TransitionTimingFunction | undefined; + /** + * In Mozilla applications, **`-moz-user-input`** determines if an element will accept user input. + * + * **Syntax**: `auto | none | enabled | disabled` + * + * **Initial value**: `auto` + * + * @deprecated + */ + "-moz-user-input"?: Property.MozUserInput | undefined; + /** + * The **`ime-mode`** CSS property controls the state of the input method editor (IME) for text fields. This property is obsolete. + * + * **Syntax**: `auto | normal | active | inactive | disabled` + * + * **Initial value**: `auto` + * + * @deprecated + */ + "-ms-ime-mode"?: Property.ImeMode | undefined; + /** + * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. + * + * **Syntax**: `<single-animation>#` + * + * @deprecated + */ + "-o-animation"?: Property.Animation<TTime> | undefined; + /** + * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + "-o-animation-delay"?: Property.AnimationDelay<TTime> | undefined; + /** + * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. + * + * **Syntax**: `<single-animation-direction>#` + * + * **Initial value**: `normal` + * + * @deprecated + */ + "-o-animation-direction"?: Property.AnimationDirection | undefined; + /** + * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + "-o-animation-duration"?: Property.AnimationDuration<TTime> | undefined; + /** + * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. + * + * **Syntax**: `<single-animation-fill-mode>#` + * + * **Initial value**: `none` + * + * @deprecated + */ + "-o-animation-fill-mode"?: Property.AnimationFillMode | undefined; + /** + * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. + * + * **Syntax**: `<single-animation-iteration-count>#` + * + * **Initial value**: `1` + * + * @deprecated + */ + "-o-animation-iteration-count"?: Property.AnimationIterationCount | undefined; + /** + * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. + * + * **Syntax**: `[ none | <keyframes-name> ]#` + * + * **Initial value**: `none` + * + * @deprecated + */ + "-o-animation-name"?: Property.AnimationName | undefined; + /** + * The **`animation-play-state`** CSS property sets whether an animation is running or paused. + * + * **Syntax**: `<single-animation-play-state>#` + * + * **Initial value**: `running` + * + * @deprecated + */ + "-o-animation-play-state"?: Property.AnimationPlayState | undefined; + /** + * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + * + * @deprecated + */ + "-o-animation-timing-function"?: Property.AnimationTimingFunction | undefined; + /** + * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. + * + * **Syntax**: `<bg-size>#` + * + * **Initial value**: `auto auto` + * + * @deprecated + */ + "-o-background-size"?: Property.BackgroundSize<TLength> | undefined; + /** + * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. + * + * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` + * + * @deprecated + */ + "-o-border-image"?: Property.BorderImage | undefined; + /** + * The **`object-fit`** CSS property sets how the content of a replaced element, such as an `<img>` or `<video>`, should be resized to fit its container. + * + * **Syntax**: `fill | contain | cover | none | scale-down` + * + * **Initial value**: `fill` + * + * @deprecated + */ + "-o-object-fit"?: Property.ObjectFit | undefined; + /** + * The **`object-position`** CSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background. + * + * **Syntax**: `<position>` + * + * **Initial value**: `50% 50%` + * + * @deprecated + */ + "-o-object-position"?: Property.ObjectPosition<TLength> | undefined; + /** + * The **`tab-size`** CSS property is used to customize the width of tab characters (U+0009). + * + * **Syntax**: `<integer> | <length>` + * + * **Initial value**: `8` + * + * @deprecated + */ + "-o-tab-size"?: Property.TabSize<TLength> | undefined; + /** + * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. + * + * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` + * + * **Initial value**: `clip` + * + * @deprecated + */ + "-o-text-overflow"?: Property.TextOverflow | undefined; + /** + * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. + * + * **Syntax**: `none | <transform-list>` + * + * **Initial value**: `none` + * + * @deprecated + */ + "-o-transform"?: Property.Transform | undefined; + /** + * The **`transform-origin`** CSS property sets the origin for an element's transformations. + * + * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` + * + * **Initial value**: `50% 50% 0` + * + * @deprecated + */ + "-o-transform-origin"?: Property.TransformOrigin<TLength> | undefined; + /** + * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. + * + * **Syntax**: `<single-transition>#` + * + * @deprecated + */ + "-o-transition"?: Property.Transition<TTime> | undefined; + /** + * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + "-o-transition-delay"?: Property.TransitionDelay<TTime> | undefined; + /** + * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + "-o-transition-duration"?: Property.TransitionDuration<TTime> | undefined; + /** + * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. + * + * **Syntax**: `none | <single-transition-property>#` + * + * **Initial value**: all + * + * @deprecated + */ + "-o-transition-property"?: Property.TransitionProperty | undefined; + /** + * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + * + * @deprecated + */ + "-o-transition-timing-function"?: Property.TransitionTimingFunction | undefined; + /** + * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. + * + * **Syntax**: `start | center | end | baseline | stretch` + * + * **Initial value**: `stretch` + * + * @deprecated + */ + "-webkit-box-align"?: Property.BoxAlign | undefined; + /** + * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). + * + * **Syntax**: `normal | reverse | inherit` + * + * **Initial value**: `normal` + * + * @deprecated + */ + "-webkit-box-direction"?: Property.BoxDirection | undefined; + /** + * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. + * + * **Syntax**: `<number>` + * + * **Initial value**: `0` + * + * @deprecated + */ + "-webkit-box-flex"?: Property.BoxFlex | undefined; + /** + * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `1` + * + * @deprecated + */ + "-webkit-box-flex-group"?: Property.BoxFlexGroup | undefined; + /** + * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). + * + * **Syntax**: `single | multiple` + * + * **Initial value**: `single` + * + * @deprecated + */ + "-webkit-box-lines"?: Property.BoxLines | undefined; + /** + * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. + * + * **Syntax**: `<integer>` + * + * **Initial value**: `1` + * + * @deprecated + */ + "-webkit-box-ordinal-group"?: Property.BoxOrdinalGroup | undefined; + /** + * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. + * + * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` + * + * **Initial value**: `inline-axis` (`horizontal` in XUL) + * + * @deprecated + */ + "-webkit-box-orient"?: Property.BoxOrient | undefined; + /** + * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. + * + * **Syntax**: `start | center | end | justify` + * + * **Initial value**: `start` + * + * @deprecated + */ + "-webkit-box-pack"?: Property.BoxPack | undefined; +} + +export interface SvgPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { + "alignment-baseline"?: Property.AlignmentBaseline | undefined; + "baseline-shift"?: Property.BaselineShift<TLength> | undefined; + clip?: Property.Clip | undefined; + "clip-path"?: Property.ClipPath | undefined; + "clip-rule"?: Property.ClipRule | undefined; + color?: Property.Color | undefined; + "color-interpolation"?: Property.ColorInterpolation | undefined; + "color-rendering"?: Property.ColorRendering | undefined; + cursor?: Property.Cursor | undefined; + direction?: Property.Direction | undefined; + display?: Property.Display | undefined; + "dominant-baseline"?: Property.DominantBaseline | undefined; + fill?: Property.Fill | undefined; + "fill-opacity"?: Property.FillOpacity | undefined; + "fill-rule"?: Property.FillRule | undefined; + filter?: Property.Filter | undefined; + "flood-color"?: Property.FloodColor | undefined; + "flood-opacity"?: Property.FloodOpacity | undefined; + font?: Property.Font | undefined; + "font-family"?: Property.FontFamily | undefined; + "font-size"?: Property.FontSize<TLength> | undefined; + "font-size-adjust"?: Property.FontSizeAdjust | undefined; + "font-stretch"?: Property.FontStretch | undefined; + "font-style"?: Property.FontStyle | undefined; + "font-variant"?: Property.FontVariant | undefined; + "font-weight"?: Property.FontWeight | undefined; + "glyph-orientation-vertical"?: Property.GlyphOrientationVertical | undefined; + "image-rendering"?: Property.ImageRendering | undefined; + "letter-spacing"?: Property.LetterSpacing<TLength> | undefined; + "lighting-color"?: Property.LightingColor | undefined; + "line-height"?: Property.LineHeight<TLength> | undefined; + marker?: Property.Marker | undefined; + "marker-end"?: Property.MarkerEnd | undefined; + "marker-mid"?: Property.MarkerMid | undefined; + "marker-start"?: Property.MarkerStart | undefined; + mask?: Property.Mask<TLength> | undefined; + opacity?: Property.Opacity | undefined; + overflow?: Property.Overflow | undefined; + "paint-order"?: Property.PaintOrder | undefined; + "pointer-events"?: Property.PointerEvents | undefined; + "shape-rendering"?: Property.ShapeRendering | undefined; + "stop-color"?: Property.StopColor | undefined; + "stop-opacity"?: Property.StopOpacity | undefined; + stroke?: Property.Stroke | undefined; + "stroke-dasharray"?: Property.StrokeDasharray<TLength> | undefined; + "stroke-dashoffset"?: Property.StrokeDashoffset<TLength> | undefined; + "stroke-linecap"?: Property.StrokeLinecap | undefined; + "stroke-linejoin"?: Property.StrokeLinejoin | undefined; + "stroke-miterlimit"?: Property.StrokeMiterlimit | undefined; + "stroke-opacity"?: Property.StrokeOpacity | undefined; + "stroke-width"?: Property.StrokeWidth<TLength> | undefined; + "text-anchor"?: Property.TextAnchor | undefined; + "text-decoration"?: Property.TextDecoration<TLength> | undefined; + "text-rendering"?: Property.TextRendering | undefined; + "unicode-bidi"?: Property.UnicodeBidi | undefined; + "vector-effect"?: Property.VectorEffect | undefined; + visibility?: Property.Visibility | undefined; + "white-space"?: Property.WhiteSpace | undefined; + "word-spacing"?: Property.WordSpacing<TLength> | undefined; + "writing-mode"?: Property.WritingMode | undefined; +} + +export interface PropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> + extends StandardPropertiesHyphen<TLength, TTime>, + VendorPropertiesHyphen<TLength, TTime>, + ObsoletePropertiesHyphen<TLength, TTime>, + SvgPropertiesHyphen<TLength, TTime> {} + +export type StandardLonghandPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardLonghandProperties<TLength, TTime>>; + +export type StandardShorthandPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardShorthandProperties<TLength, TTime>>; + +export interface StandardPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> + extends StandardLonghandPropertiesFallback<TLength, TTime>, + StandardShorthandPropertiesFallback<TLength, TTime> {} + +export type VendorLonghandPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<VendorLonghandProperties<TLength, TTime>>; + +export type VendorShorthandPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<VendorShorthandProperties<TLength, TTime>>; + +export interface VendorPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> + extends VendorLonghandPropertiesFallback<TLength, TTime>, + VendorShorthandPropertiesFallback<TLength, TTime> {} + +export type ObsoletePropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<ObsoleteProperties<TLength, TTime>>; + +export type SvgPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<SvgProperties<TLength, TTime>>; + +export interface PropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> + extends StandardPropertiesFallback<TLength, TTime>, + VendorPropertiesFallback<TLength, TTime>, + ObsoletePropertiesFallback<TLength, TTime>, + SvgPropertiesFallback<TLength, TTime> {} + +export type StandardLonghandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardLonghandPropertiesHyphen<TLength, TTime>>; + +export type StandardShorthandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardShorthandPropertiesHyphen<TLength, TTime>>; + +export interface StandardPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> + extends StandardLonghandPropertiesHyphenFallback<TLength, TTime>, + StandardShorthandPropertiesHyphenFallback<TLength, TTime> {} + +export type VendorLonghandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<VendorLonghandPropertiesHyphen<TLength, TTime>>; + +export type VendorShorthandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<VendorShorthandPropertiesHyphen<TLength, TTime>>; + +export interface VendorPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> + extends VendorLonghandPropertiesHyphenFallback<TLength, TTime>, + VendorShorthandPropertiesHyphenFallback<TLength, TTime> {} + +export type ObsoletePropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<ObsoletePropertiesHyphen<TLength, TTime>>; + +export type SvgPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<SvgPropertiesHyphen<TLength, TTime>>; + +export interface PropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> + extends StandardPropertiesHyphenFallback<TLength, TTime>, + VendorPropertiesHyphenFallback<TLength, TTime>, + ObsoletePropertiesHyphenFallback<TLength, TTime>, + SvgPropertiesHyphenFallback<TLength, TTime> {} + +export type AtRules = + | "@charset" + | "@counter-style" + | "@document" + | "@font-face" + | "@font-feature-values" + | "@font-palette-values" + | "@import" + | "@keyframes" + | "@layer" + | "@media" + | "@namespace" + | "@page" + | "@property" + | "@scope" + | "@scroll-timeline" + | "@starting-style" + | "@supports" + | "@viewport"; + +export type AdvancedPseudos = + | ":-moz-any()" + | ":-moz-dir" + | ":-webkit-any()" + | "::cue" + | "::cue-region" + | "::part" + | "::slotted" + | "::view-transition-group" + | "::view-transition-image-pair" + | "::view-transition-new" + | "::view-transition-old" + | ":dir" + | ":has" + | ":host" + | ":host-context" + | ":is" + | ":lang" + | ":matches()" + | ":not" + | ":nth-child" + | ":nth-last-child" + | ":nth-last-of-type" + | ":nth-of-type" + | ":where"; + +export type SimplePseudos = + | ":-khtml-any-link" + | ":-moz-any-link" + | ":-moz-focusring" + | ":-moz-full-screen" + | ":-moz-placeholder" + | ":-moz-read-only" + | ":-moz-read-write" + | ":-moz-ui-invalid" + | ":-moz-ui-valid" + | ":-ms-fullscreen" + | ":-ms-input-placeholder" + | ":-webkit-any-link" + | ":-webkit-full-screen" + | "::-moz-placeholder" + | "::-moz-progress-bar" + | "::-moz-range-progress" + | "::-moz-range-thumb" + | "::-moz-range-track" + | "::-moz-selection" + | "::-ms-backdrop" + | "::-ms-browse" + | "::-ms-check" + | "::-ms-clear" + | "::-ms-expand" + | "::-ms-fill" + | "::-ms-fill-lower" + | "::-ms-fill-upper" + | "::-ms-input-placeholder" + | "::-ms-reveal" + | "::-ms-thumb" + | "::-ms-ticks-after" + | "::-ms-ticks-before" + | "::-ms-tooltip" + | "::-ms-track" + | "::-ms-value" + | "::-webkit-backdrop" + | "::-webkit-input-placeholder" + | "::-webkit-progress-bar" + | "::-webkit-progress-inner-value" + | "::-webkit-progress-value" + | "::-webkit-slider-runnable-track" + | "::-webkit-slider-thumb" + | "::after" + | "::backdrop" + | "::before" + | "::cue" + | "::cue-region" + | "::first-letter" + | "::first-line" + | "::grammar-error" + | "::marker" + | "::placeholder" + | "::selection" + | "::spelling-error" + | "::target-text" + | "::view-transition" + | ":active" + | ":after" + | ":any-link" + | ":before" + | ":blank" + | ":checked" + | ":current" + | ":default" + | ":defined" + | ":disabled" + | ":empty" + | ":enabled" + | ":first" + | ":first-child" + | ":first-letter" + | ":first-line" + | ":first-of-type" + | ":focus" + | ":focus-visible" + | ":focus-within" + | ":fullscreen" + | ":future" + | ":hover" + | ":in-range" + | ":indeterminate" + | ":invalid" + | ":last-child" + | ":last-of-type" + | ":left" + | ":link" + | ":local-link" + | ":nth-col" + | ":nth-last-col" + | ":only-child" + | ":only-of-type" + | ":optional" + | ":out-of-range" + | ":past" + | ":paused" + | ":picture-in-picture" + | ":placeholder-shown" + | ":playing" + | ":read-only" + | ":read-write" + | ":required" + | ":right" + | ":root" + | ":scope" + | ":target" + | ":target-within" + | ":user-invalid" + | ":user-valid" + | ":valid" + | ":visited"; + +export type Pseudos = AdvancedPseudos | SimplePseudos; + +export type HtmlAttributes = + | "[abbr]" + | "[accept-charset]" + | "[accept]" + | "[accesskey]" + | "[action]" + | "[align]" + | "[alink]" + | "[allow]" + | "[allowfullscreen]" + | "[allowpaymentrequest]" + | "[alt]" + | "[archive]" + | "[async]" + | "[attributionsrc]" + | "[autobuffer]" + | "[autocapitalize]" + | "[autocomplete]" + | "[autofocus]" + | "[autoplay]" + | "[axis]" + | "[background]" + | "[behavior]" + | "[bgcolor]" + | "[blocking]" + | "[border]" + | "[bottommargin]" + | "[browsingtopics]" + | "[capture]" + | "[cellpadding]" + | "[cellspacing]" + | "[char]" + | "[charoff]" + | "[charset]" + | "[checked]" + | "[cite]" + | "[class]" + | "[classid]" + | "[clear]" + | "[codebase]" + | "[codetype]" + | "[color]" + | "[cols]" + | "[colspan]" + | "[compact]" + | "[content]" + | "[contenteditable]" + | "[contextmenu]" + | "[controls]" + | "[coords]" + | "[credentialless]" + | "[crossorigin]" + | "[data]" + | "[datetime]" + | "[declare]" + | "[decoding]" + | "[default]" + | "[defer]" + | "[dir]" + | "[direction]" + | "[dirname]" + | "[disabled]" + | "[download]" + | "[draggable]" + | "[enctype]" + | "[enterkeyhint]" + | "[exportparts]" + | "[face]" + | "[fetchpriority]" + | "[for]" + | "[form]" + | "[formaction]" + | "[formenctype]" + | "[formmethod]" + | "[formnovalidate]" + | "[formtarget]" + | "[frame]" + | "[frameborder]" + | "[headers]" + | "[height]" + | "[hidden]" + | "[high]" + | "[href]" + | "[hreflang]" + | "[hspace]" + | "[http-equiv]" + | "[id]" + | "[imagesizes]" + | "[imagesrcset]" + | "[inert]" + | "[inputmode]" + | "[integrity]" + | "[is]" + | "[ismap]" + | "[itemid]" + | "[itemprop]" + | "[itemref]" + | "[itemscope]" + | "[itemtype]" + | "[kind]" + | "[label]" + | "[lang]" + | "[language]" + | "[leftmargin]" + | "[link]" + | "[list]" + | "[loading]" + | "[longdesc]" + | "[loop]" + | "[low]" + | "[manifest]" + | "[marginheight]" + | "[marginwidth]" + | "[max]" + | "[maxlength]" + | "[media]" + | "[method]" + | "[methods]" + | "[min]" + | "[minlength]" + | "[moz-opaque]" + | "[mozactionhint]" + | "[mozallowfullscreen]" + | "[msallowfullscreen]" + | "[multiple]" + | "[muted]" + | "[name]" + | "[nohref]" + | "[nomodule]" + | "[nonce]" + | "[noresize]" + | "[noshade]" + | "[novalidate]" + | "[nowrap]" + | "[onerror]" + | "[open]" + | "[optimum]" + | "[part]" + | "[pattern]" + | "[ping]" + | "[placeholder]" + | "[popover]" + | "[popovertarget]" + | "[popovertargetaction]" + | "[poster]" + | "[preload]" + | "[profile]" + | "[readonly]" + | "[referrerpolicy]" + | "[rel]" + | "[required]" + | "[rev]" + | "[reversed]" + | "[rightmargin]" + | "[rows]" + | "[rowspan]" + | "[rules]" + | "[sandbox]" + | "[scope]" + | "[scrollamount]" + | "[scrolldelay]" + | "[scrolling]" + | "[selected]" + | "[shadowroot]" + | "[shadowrootmode]" + | "[shape]" + | "[size]" + | "[sizes]" + | "[slot]" + | "[span]" + | "[spellcheck]" + | "[src]" + | "[srcdoc]" + | "[srclang]" + | "[srcset]" + | "[standby]" + | "[start]" + | "[step]" + | "[style]" + | "[summary]" + | "[tabindex]" + | "[target]" + | "[text]" + | "[title]" + | "[topmargin]" + | "[translate]" + | "[truespeed]" + | "[type]" + | "[usemap]" + | "[valign]" + | "[value]" + | "[valuetype]" + | "[version]" + | "[virtualkeyboardpolicy]" + | "[vlink]" + | "[vspace]" + | "[webkitallowfullscreen]" + | "[width]" + | "[wrap]" + | "[x-moz-errormessage]" + | "[xmlns]"; + +export type SvgAttributes = + | "[accent-height]" + | "[alignment-baseline]" + | "[allowReorder]" + | "[alphabetic]" + | "[animation]" + | "[arabic-form]" + | "[ascent]" + | "[async]" + | "[attributeName]" + | "[attributeType]" + | "[azimuth]" + | "[baseFrequency]" + | "[baseProfile]" + | "[baseline-shift]" + | "[bbox]" + | "[bias]" + | "[by]" + | "[calcMode]" + | "[cap-height]" + | "[class]" + | "[clip-path]" + | "[clip-rule]" + | "[clipPathUnits]" + | "[clip]" + | "[color-interpolation-filters]" + | "[color-interpolation]" + | "[color-profile]" + | "[color]" + | "[contentScriptType]" + | "[contentStyleType]" + | "[crossorigin]" + | "[cursor]" + | "[cx]" + | "[cy]" + | "[d]" + | "[decoding]" + | "[defer]" + | "[descent]" + | "[diffuseConstant]" + | "[direction]" + | "[display]" + | "[divisor]" + | "[document]" + | "[dominant-baseline]" + | "[download]" + | "[dur]" + | "[dx]" + | "[dy]" + | "[edgeMode]" + | "[elevation]" + | "[enable-background]" + | "[fill-opacity]" + | "[fill-rule]" + | "[fill]" + | "[filterRes]" + | "[filterUnits]" + | "[filter]" + | "[flood-color]" + | "[flood-opacity]" + | "[font-family]" + | "[font-size-adjust]" + | "[font-size]" + | "[font-stretch]" + | "[font-style]" + | "[font-variant]" + | "[font-weight]" + | "[format]" + | "[fr]" + | "[from]" + | "[fx]" + | "[fy]" + | "[g1]" + | "[g2]" + | "[global]" + | "[glyph-name]" + | "[glyph-orientation-horizontal]" + | "[glyph-orientation-vertical]" + | "[glyphRef]" + | "[gradientTransform]" + | "[gradientUnits]" + | "[graphical]" + | "[hanging]" + | "[height]" + | "[horiz-adv-x]" + | "[horiz-origin-x]" + | "[horiz-origin-y]" + | "[href]" + | "[hreflang]" + | "[id]" + | "[ideographic]" + | "[image-rendering]" + | "[in2]" + | "[in]" + | "[k1]" + | "[k2]" + | "[k3]" + | "[k4]" + | "[k]" + | "[kernelMatrix]" + | "[kernelUnitLength]" + | "[kerning]" + | "[keyPoints]" + | "[lang]" + | "[lengthAdjust]" + | "[letter-spacing]" + | "[lighting-color]" + | "[limitingConeAngle]" + | "[marker-end]" + | "[marker-mid]" + | "[marker-start]" + | "[markerHeight]" + | "[markerUnits]" + | "[markerWidth]" + | "[maskContentUnits]" + | "[maskUnits]" + | "[mask]" + | "[mathematical]" + | "[media]" + | "[mode]" + | "[name]" + | "[numOctaves]" + | "[offset]" + | "[opacity]" + | "[operator]" + | "[order]" + | "[orient]" + | "[orientation]" + | "[origin]" + | "[overflow]" + | "[overline-position]" + | "[overline-thickness]" + | "[paint-order]" + | "[panose-1]" + | "[path]" + | "[patternContentUnits]" + | "[patternTransform]" + | "[patternUnits]" + | "[ping]" + | "[pointer-events]" + | "[pointsAtX]" + | "[pointsAtY]" + | "[pointsAtZ]" + | "[points]" + | "[preserveAlpha]" + | "[preserveAspectRatio]" + | "[primitiveUnits]" + | "[r]" + | "[radius]" + | "[refX]" + | "[refY]" + | "[referrerpolicy]" + | "[rel]" + | "[repeatCount]" + | "[requiredExtensions]" + | "[requiredFeatures]" + | "[rotate]" + | "[rx]" + | "[ry]" + | "[scale]" + | "[seed]" + | "[shape-rendering]" + | "[side]" + | "[slope]" + | "[solid-color]" + | "[solid-opacity]" + | "[spacing]" + | "[specularConstant]" + | "[specularExponent]" + | "[spreadMethod]" + | "[startOffset]" + | "[stdDeviation]" + | "[stemh]" + | "[stemv]" + | "[stitchTiles]" + | "[stop-color]" + | "[stop-opacity]" + | "[strikethrough-position]" + | "[strikethrough-thickness]" + | "[string]" + | "[stroke-dasharray]" + | "[stroke-dashoffset]" + | "[stroke-linecap]" + | "[stroke-linejoin]" + | "[stroke-miterlimit]" + | "[stroke-opacity]" + | "[stroke-width]" + | "[stroke]" + | "[style]" + | "[surfaceScale]" + | "[systemLanguage]" + | "[tabindex]" + | "[targetX]" + | "[targetY]" + | "[target]" + | "[text-anchor]" + | "[text-decoration]" + | "[text-overflow]" + | "[text-rendering]" + | "[textLength]" + | "[title]" + | "[to]" + | "[transform-origin]" + | "[transform]" + | "[type]" + | "[u1]" + | "[u2]" + | "[underline-position]" + | "[underline-thickness]" + | "[unicode-bidi]" + | "[unicode-range]" + | "[unicode]" + | "[units-per-em]" + | "[v-alphabetic]" + | "[v-hanging]" + | "[v-ideographic]" + | "[v-mathematical]" + | "[values]" + | "[vector-effect]" + | "[version]" + | "[vert-adv-y]" + | "[vert-origin-x]" + | "[vert-origin-y]" + | "[viewBox]" + | "[viewTarget]" + | "[visibility]" + | "[white-space]" + | "[width]" + | "[widths]" + | "[word-spacing]" + | "[writing-mode]" + | "[x-height]" + | "[x1]" + | "[x2]" + | "[xChannelSelector]" + | "[x]" + | "[y1]" + | "[y2]" + | "[yChannelSelector]" + | "[y]" + | "[z]" + | "[zoomAndPan]"; + +export type Globals = "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset"; + +export namespace Property { + export type AccentColor = Globals | DataType.Color | "auto"; + + export type AlignContent = Globals | DataType.ContentDistribution | DataType.ContentPosition | "baseline" | "normal" | (string & {}); + + export type AlignItems = Globals | DataType.SelfPosition | "baseline" | "normal" | "stretch" | (string & {}); + + export type AlignSelf = Globals | DataType.SelfPosition | "auto" | "baseline" | "normal" | "stretch" | (string & {}); + + export type AlignTracks = Globals | DataType.ContentDistribution | DataType.ContentPosition | "baseline" | "normal" | (string & {}); + + export type All = Globals; + + export type Animation<TTime = string & {}> = Globals | DataType.SingleAnimation<TTime> | (string & {}); + + export type AnimationComposition = Globals | DataType.SingleAnimationComposition | (string & {}); + + export type AnimationDelay<TTime = string & {}> = Globals | TTime | (string & {}); + + export type AnimationDirection = Globals | DataType.SingleAnimationDirection | (string & {}); + + export type AnimationDuration<TTime = string & {}> = Globals | TTime | (string & {}); + + export type AnimationFillMode = Globals | DataType.SingleAnimationFillMode | (string & {}); + + export type AnimationIterationCount = Globals | "infinite" | (string & {}) | (number & {}); + + export type AnimationName = Globals | "none" | (string & {}); + + export type AnimationPlayState = Globals | "paused" | "running" | (string & {}); + + export type AnimationRange<TLength = (string & {}) | 0> = Globals | DataType.TimelineRangeName | TLength | "normal" | (string & {}); + + export type AnimationRangeEnd<TLength = (string & {}) | 0> = Globals | DataType.TimelineRangeName | TLength | "normal" | (string & {}); + + export type AnimationRangeStart<TLength = (string & {}) | 0> = Globals | DataType.TimelineRangeName | TLength | "normal" | (string & {}); + + export type AnimationTimeline = Globals | DataType.SingleAnimationTimeline | (string & {}); + + export type AnimationTimingFunction = Globals | DataType.EasingFunction | (string & {}); + + export type Appearance = Globals | DataType.CompatAuto | "auto" | "menulist-button" | "none" | "textfield"; + + export type AspectRatio = Globals | "auto" | (string & {}) | (number & {}); + + export type Azimuth = + | Globals + | "behind" + | "center" + | "center-left" + | "center-right" + | "far-left" + | "far-right" + | "left" + | "left-side" + | "leftwards" + | "right" + | "right-side" + | "rightwards" + | (string & {}); + + export type BackdropFilter = Globals | "none" | (string & {}); + + export type BackfaceVisibility = Globals | "hidden" | "visible"; + + export type Background<TLength = (string & {}) | 0> = Globals | DataType.FinalBgLayer<TLength> | (string & {}); + + export type BackgroundAttachment = Globals | DataType.Attachment | (string & {}); + + export type BackgroundBlendMode = Globals | DataType.BlendMode | (string & {}); + + export type BackgroundClip = Globals | DataType.Box | (string & {}); + + export type BackgroundColor = Globals | DataType.Color; + + export type BackgroundImage = Globals | "none" | (string & {}); + + export type BackgroundOrigin = Globals | DataType.Box | (string & {}); + + export type BackgroundPosition<TLength = (string & {}) | 0> = Globals | DataType.BgPosition<TLength> | (string & {}); + + export type BackgroundPositionX<TLength = (string & {}) | 0> = Globals | TLength | "center" | "left" | "right" | "x-end" | "x-start" | (string & {}); + + export type BackgroundPositionY<TLength = (string & {}) | 0> = Globals | TLength | "bottom" | "center" | "top" | "y-end" | "y-start" | (string & {}); + + export type BackgroundRepeat = Globals | DataType.RepeatStyle | (string & {}); + + export type BackgroundSize<TLength = (string & {}) | 0> = Globals | DataType.BgSize<TLength> | (string & {}); + + export type BlockOverflow = Globals | "clip" | "ellipsis" | (string & {}); + + export type BlockSize<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "auto" + | "fit-content" + | "max-content" + | "min-content" + | (string & {}); + + export type Border<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); + + export type BorderBlock<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); + + export type BorderBlockColor = Globals | DataType.Color | (string & {}); + + export type BorderBlockEnd<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); + + export type BorderBlockEndColor = Globals | DataType.Color; + + export type BorderBlockEndStyle = Globals | DataType.LineStyle; + + export type BorderBlockEndWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; + + export type BorderBlockStart<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); + + export type BorderBlockStartColor = Globals | DataType.Color; + + export type BorderBlockStartStyle = Globals | DataType.LineStyle; + + export type BorderBlockStartWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; + + export type BorderBlockStyle = Globals | DataType.LineStyle; + + export type BorderBlockWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; + + export type BorderBottom<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); + + export type BorderBottomColor = Globals | DataType.Color; + + export type BorderBottomLeftRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type BorderBottomRightRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type BorderBottomStyle = Globals | DataType.LineStyle; + + export type BorderBottomWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; + + export type BorderCollapse = Globals | "collapse" | "separate"; + + export type BorderColor = Globals | DataType.Color | (string & {}); + + export type BorderEndEndRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type BorderEndStartRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type BorderImage = Globals | "none" | "repeat" | "round" | "space" | "stretch" | (string & {}) | (number & {}); + + export type BorderImageOutset<TLength = (string & {}) | 0> = Globals | TLength | (string & {}) | (number & {}); + + export type BorderImageRepeat = Globals | "repeat" | "round" | "space" | "stretch" | (string & {}); + + export type BorderImageSlice = Globals | (string & {}) | (number & {}); + + export type BorderImageSource = Globals | "none" | (string & {}); + + export type BorderImageWidth<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}) | (number & {}); + + export type BorderInline<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); + + export type BorderInlineColor = Globals | DataType.Color | (string & {}); + + export type BorderInlineEnd<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); + + export type BorderInlineEndColor = Globals | DataType.Color; + + export type BorderInlineEndStyle = Globals | DataType.LineStyle; + + export type BorderInlineEndWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; + + export type BorderInlineStart<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); + + export type BorderInlineStartColor = Globals | DataType.Color; + + export type BorderInlineStartStyle = Globals | DataType.LineStyle; + + export type BorderInlineStartWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; + + export type BorderInlineStyle = Globals | DataType.LineStyle; + + export type BorderInlineWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; + + export type BorderLeft<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); + + export type BorderLeftColor = Globals | DataType.Color; + + export type BorderLeftStyle = Globals | DataType.LineStyle; + + export type BorderLeftWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; + + export type BorderRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type BorderRight<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); + + export type BorderRightColor = Globals | DataType.Color; + + export type BorderRightStyle = Globals | DataType.LineStyle; + + export type BorderRightWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; + + export type BorderSpacing<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type BorderStartEndRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type BorderStartStartRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type BorderStyle = Globals | DataType.LineStyle | (string & {}); + + export type BorderTop<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); + + export type BorderTopColor = Globals | DataType.Color; + + export type BorderTopLeftRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type BorderTopRightRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type BorderTopStyle = Globals | DataType.LineStyle; + + export type BorderTopWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; + + export type BorderWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | (string & {}); + + export type Bottom<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type BoxAlign = Globals | "baseline" | "center" | "end" | "start" | "stretch"; + + export type BoxDecorationBreak = Globals | "clone" | "slice"; + + export type BoxDirection = Globals | "inherit" | "normal" | "reverse"; + + export type BoxFlex = Globals | (number & {}) | (string & {}); + + export type BoxFlexGroup = Globals | (number & {}) | (string & {}); + + export type BoxLines = Globals | "multiple" | "single"; + + export type BoxOrdinalGroup = Globals | (number & {}) | (string & {}); + + export type BoxOrient = Globals | "block-axis" | "horizontal" | "inherit" | "inline-axis" | "vertical"; + + export type BoxPack = Globals | "center" | "end" | "justify" | "start"; + + export type BoxShadow = Globals | "none" | (string & {}); + + export type BoxSizing = Globals | "border-box" | "content-box"; + + export type BreakAfter = + | Globals + | "all" + | "always" + | "auto" + | "avoid" + | "avoid-column" + | "avoid-page" + | "avoid-region" + | "column" + | "left" + | "page" + | "recto" + | "region" + | "right" + | "verso"; + + export type BreakBefore = + | Globals + | "all" + | "always" + | "auto" + | "avoid" + | "avoid-column" + | "avoid-page" + | "avoid-region" + | "column" + | "left" + | "page" + | "recto" + | "region" + | "right" + | "verso"; + + export type BreakInside = Globals | "auto" | "avoid" | "avoid-column" | "avoid-page" | "avoid-region"; + + export type CaptionSide = Globals | "block-end" | "block-start" | "bottom" | "inline-end" | "inline-start" | "top"; + + export type Caret = Globals | DataType.Color | "auto" | "bar" | "block" | "underscore" | (string & {}); + + export type CaretColor = Globals | DataType.Color | "auto"; + + export type CaretShape = Globals | "auto" | "bar" | "block" | "underscore"; + + export type Clear = Globals | "both" | "inline-end" | "inline-start" | "left" | "none" | "right"; + + export type Clip = Globals | "auto" | (string & {}); + + export type ClipPath = Globals | DataType.GeometryBox | "none" | (string & {}); + + export type Color = Globals | DataType.Color; + + export type PrintColorAdjust = Globals | "economy" | "exact"; + + export type ColorScheme = Globals | "dark" | "light" | "normal" | (string & {}); + + export type ColumnCount = Globals | "auto" | (number & {}) | (string & {}); + + export type ColumnFill = Globals | "auto" | "balance" | "balance-all"; + + export type ColumnGap<TLength = (string & {}) | 0> = Globals | TLength | "normal" | (string & {}); + + export type ColumnRule<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); + + export type ColumnRuleColor = Globals | DataType.Color; + + export type ColumnRuleStyle = Globals | DataType.LineStyle | (string & {}); + + export type ColumnRuleWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | (string & {}); + + export type ColumnSpan = Globals | "all" | "none"; + + export type ColumnWidth<TLength = (string & {}) | 0> = Globals | TLength | "auto"; + + export type Columns<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}) | (number & {}); + + export type Contain = Globals | "content" | "inline-size" | "layout" | "none" | "paint" | "size" | "strict" | "style" | (string & {}); + + export type ContainIntrinsicBlockSize<TLength = (string & {}) | 0> = Globals | TLength | "none" | (string & {}); + + export type ContainIntrinsicHeight<TLength = (string & {}) | 0> = Globals | TLength | "none" | (string & {}); + + export type ContainIntrinsicInlineSize<TLength = (string & {}) | 0> = Globals | TLength | "none" | (string & {}); + + export type ContainIntrinsicSize<TLength = (string & {}) | 0> = Globals | TLength | "none" | (string & {}); + + export type ContainIntrinsicWidth<TLength = (string & {}) | 0> = Globals | TLength | "none" | (string & {}); + + export type Container = Globals | "none" | (string & {}); + + export type ContainerName = Globals | "none" | (string & {}); + + export type ContainerType = Globals | "inline-size" | "normal" | "size"; + + export type Content = Globals | DataType.ContentList | "none" | "normal" | (string & {}); + + export type ContentVisibility = Globals | "auto" | "hidden" | "visible"; + + export type CounterIncrement = Globals | "none" | (string & {}); + + export type CounterReset = Globals | "none" | (string & {}); + + export type CounterSet = Globals | "none" | (string & {}); + + export type Cursor = + | Globals + | "-moz-grab" + | "-webkit-grab" + | "alias" + | "all-scroll" + | "auto" + | "cell" + | "col-resize" + | "context-menu" + | "copy" + | "crosshair" + | "default" + | "e-resize" + | "ew-resize" + | "grab" + | "grabbing" + | "help" + | "move" + | "n-resize" + | "ne-resize" + | "nesw-resize" + | "no-drop" + | "none" + | "not-allowed" + | "ns-resize" + | "nw-resize" + | "nwse-resize" + | "pointer" + | "progress" + | "row-resize" + | "s-resize" + | "se-resize" + | "sw-resize" + | "text" + | "vertical-text" + | "w-resize" + | "wait" + | "zoom-in" + | "zoom-out" + | (string & {}); + + export type Direction = Globals | "ltr" | "rtl"; + + export type Display = + | Globals + | DataType.DisplayOutside + | DataType.DisplayInside + | DataType.DisplayInternal + | DataType.DisplayLegacy + | "contents" + | "list-item" + | "none" + | (string & {}); + + export type EmptyCells = Globals | "hide" | "show"; + + export type Filter = Globals | "none" | (string & {}); + + export type Flex<TLength = (string & {}) | 0> = Globals | TLength | "auto" | "content" | "fit-content" | "max-content" | "min-content" | "none" | (string & {}) | (number & {}); + + export type FlexBasis<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-auto" + | "auto" + | "content" + | "fit-content" + | "max-content" + | "min-content" + | (string & {}); + + export type FlexDirection = Globals | "column" | "column-reverse" | "row" | "row-reverse"; + + export type FlexFlow = Globals | "column" | "column-reverse" | "nowrap" | "row" | "row-reverse" | "wrap" | "wrap-reverse" | (string & {}); + + export type FlexGrow = Globals | (number & {}) | (string & {}); + + export type FlexShrink = Globals | (number & {}) | (string & {}); + + export type FlexWrap = Globals | "nowrap" | "wrap" | "wrap-reverse"; + + export type Float = Globals | "inline-end" | "inline-start" | "left" | "none" | "right"; + + export type Font = Globals | "caption" | "icon" | "menu" | "message-box" | "small-caption" | "status-bar" | (string & {}); + + export type FontFamily = Globals | DataType.GenericFamily | (string & {}); + + export type FontFeatureSettings = Globals | "normal" | (string & {}); + + export type FontKerning = Globals | "auto" | "none" | "normal"; + + export type FontLanguageOverride = Globals | "normal" | (string & {}); + + export type FontOpticalSizing = Globals | "auto" | "none"; + + export type FontPalette = Globals | "dark" | "light" | "normal" | (string & {}); + + export type FontSize<TLength = (string & {}) | 0> = Globals | DataType.AbsoluteSize | TLength | "larger" | "smaller" | (string & {}); + + export type FontSizeAdjust = Globals | "from-font" | "none" | (string & {}) | (number & {}); + + export type FontSmooth<TLength = (string & {}) | 0> = Globals | DataType.AbsoluteSize | TLength | "always" | "auto" | "never"; + + export type FontStretch = Globals | DataType.FontStretchAbsolute; + + export type FontStyle = Globals | "italic" | "normal" | "oblique" | (string & {}); + + export type FontSynthesis = Globals | "none" | "position" | "small-caps" | "style" | "weight" | (string & {}); + + export type FontSynthesisPosition = Globals | "auto" | "none"; + + export type FontSynthesisSmallCaps = Globals | "auto" | "none"; + + export type FontSynthesisStyle = Globals | "auto" | "none"; + + export type FontSynthesisWeight = Globals | "auto" | "none"; + + export type FontVariant = + | Globals + | DataType.EastAsianVariantValues + | "all-petite-caps" + | "all-small-caps" + | "common-ligatures" + | "contextual" + | "diagonal-fractions" + | "discretionary-ligatures" + | "full-width" + | "historical-forms" + | "historical-ligatures" + | "lining-nums" + | "no-common-ligatures" + | "no-contextual" + | "no-discretionary-ligatures" + | "no-historical-ligatures" + | "none" + | "normal" + | "oldstyle-nums" + | "ordinal" + | "petite-caps" + | "proportional-nums" + | "proportional-width" + | "ruby" + | "slashed-zero" + | "small-caps" + | "stacked-fractions" + | "tabular-nums" + | "titling-caps" + | "unicase" + | (string & {}); + + export type FontVariantAlternates = Globals | "historical-forms" | "normal" | (string & {}); + + export type FontVariantCaps = Globals | "all-petite-caps" | "all-small-caps" | "normal" | "petite-caps" | "small-caps" | "titling-caps" | "unicase"; + + export type FontVariantEastAsian = Globals | DataType.EastAsianVariantValues | "full-width" | "normal" | "proportional-width" | "ruby" | (string & {}); + + export type FontVariantEmoji = Globals | "emoji" | "normal" | "text" | "unicode"; + + export type FontVariantLigatures = + | Globals + | "common-ligatures" + | "contextual" + | "discretionary-ligatures" + | "historical-ligatures" + | "no-common-ligatures" + | "no-contextual" + | "no-discretionary-ligatures" + | "no-historical-ligatures" + | "none" + | "normal" + | (string & {}); + + export type FontVariantNumeric = + | Globals + | "diagonal-fractions" + | "lining-nums" + | "normal" + | "oldstyle-nums" + | "ordinal" + | "proportional-nums" + | "slashed-zero" + | "stacked-fractions" + | "tabular-nums" + | (string & {}); + + export type FontVariantPosition = Globals | "normal" | "sub" | "super"; + + export type FontVariationSettings = Globals | "normal" | (string & {}); + + export type FontWeight = Globals | DataType.FontWeightAbsolute | "bolder" | "lighter"; + + export type ForcedColorAdjust = Globals | "auto" | "none"; + + export type Gap<TLength = (string & {}) | 0> = Globals | TLength | "normal" | (string & {}); + + export type Grid = Globals | "none" | (string & {}); + + export type GridArea = Globals | DataType.GridLine | (string & {}); + + export type GridAutoColumns<TLength = (string & {}) | 0> = Globals | DataType.TrackBreadth<TLength> | (string & {}); + + export type GridAutoFlow = Globals | "column" | "dense" | "row" | (string & {}); + + export type GridAutoRows<TLength = (string & {}) | 0> = Globals | DataType.TrackBreadth<TLength> | (string & {}); + + export type GridColumn = Globals | DataType.GridLine | (string & {}); + + export type GridColumnEnd = Globals | DataType.GridLine; + + export type GridColumnGap<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type GridColumnStart = Globals | DataType.GridLine; + + export type GridGap<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type GridRow = Globals | DataType.GridLine | (string & {}); + + export type GridRowEnd = Globals | DataType.GridLine; + + export type GridRowGap<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type GridRowStart = Globals | DataType.GridLine; + + export type GridTemplate = Globals | "none" | (string & {}); + + export type GridTemplateAreas = Globals | "none" | (string & {}); + + export type GridTemplateColumns<TLength = (string & {}) | 0> = Globals | DataType.TrackBreadth<TLength> | "none" | "subgrid" | (string & {}); + + export type GridTemplateRows<TLength = (string & {}) | 0> = Globals | DataType.TrackBreadth<TLength> | "none" | "subgrid" | (string & {}); + + export type HangingPunctuation = Globals | "allow-end" | "first" | "force-end" | "last" | "none" | (string & {}); + + export type Height<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fit-content" + | "auto" + | "fit-content" + | "max-content" + | "min-content" + | (string & {}); + + export type HyphenateCharacter = Globals | "auto" | (string & {}); + + export type HyphenateLimitChars = Globals | "auto" | (string & {}) | (number & {}); + + export type Hyphens = Globals | "auto" | "manual" | "none"; + + export type ImageOrientation = Globals | "flip" | "from-image" | (string & {}); + + export type ImageRendering = Globals | "-moz-crisp-edges" | "-webkit-optimize-contrast" | "auto" | "crisp-edges" | "pixelated"; + + export type ImageResolution = Globals | "from-image" | (string & {}); + + export type ImeMode = Globals | "active" | "auto" | "disabled" | "inactive" | "normal"; + + export type InitialLetter = Globals | "normal" | (string & {}) | (number & {}); + + export type InlineSize<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fill-available" + | "auto" + | "fit-content" + | "max-content" + | "min-content" + | (string & {}); + + export type InputSecurity = Globals | "auto" | "none"; + + export type Inset<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type InsetBlock<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type InsetBlockEnd<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type InsetBlockStart<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type InsetInline<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type InsetInlineEnd<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type InsetInlineStart<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type Isolation = Globals | "auto" | "isolate"; + + export type JustifyContent = Globals | DataType.ContentDistribution | DataType.ContentPosition | "left" | "normal" | "right" | (string & {}); + + export type JustifyItems = Globals | DataType.SelfPosition | "baseline" | "left" | "legacy" | "normal" | "right" | "stretch" | (string & {}); + + export type JustifySelf = Globals | DataType.SelfPosition | "auto" | "baseline" | "left" | "normal" | "right" | "stretch" | (string & {}); + + export type JustifyTracks = Globals | DataType.ContentDistribution | DataType.ContentPosition | "left" | "normal" | "right" | (string & {}); + + export type Left<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type LetterSpacing<TLength = (string & {}) | 0> = Globals | TLength | "normal"; + + export type LineBreak = Globals | "anywhere" | "auto" | "loose" | "normal" | "strict"; + + export type LineClamp = Globals | "none" | (number & {}) | (string & {}); + + export type LineHeight<TLength = (string & {}) | 0> = Globals | TLength | "normal" | (string & {}) | (number & {}); + + export type LineHeightStep<TLength = (string & {}) | 0> = Globals | TLength; + + export type ListStyle = Globals | "inside" | "none" | "outside" | (string & {}); + + export type ListStyleImage = Globals | "none" | (string & {}); + + export type ListStylePosition = Globals | "inside" | "outside"; + + export type ListStyleType = Globals | "none" | (string & {}); + + export type Margin<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type MarginBlock<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type MarginBlockEnd<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type MarginBlockStart<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type MarginBottom<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type MarginInline<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type MarginInlineEnd<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type MarginInlineStart<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type MarginLeft<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type MarginRight<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type MarginTop<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type MarginTrim = Globals | "all" | "in-flow" | "none"; + + export type Mask<TLength = (string & {}) | 0> = Globals | DataType.MaskLayer<TLength> | (string & {}); + + export type MaskBorder = Globals | "alpha" | "luminance" | "none" | "repeat" | "round" | "space" | "stretch" | (string & {}) | (number & {}); + + export type MaskBorderMode = Globals | "alpha" | "luminance"; + + export type MaskBorderOutset<TLength = (string & {}) | 0> = Globals | TLength | (string & {}) | (number & {}); + + export type MaskBorderRepeat = Globals | "repeat" | "round" | "space" | "stretch" | (string & {}); + + export type MaskBorderSlice = Globals | (string & {}) | (number & {}); + + export type MaskBorderSource = Globals | "none" | (string & {}); + + export type MaskBorderWidth<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}) | (number & {}); + + export type MaskClip = Globals | DataType.GeometryBox | "no-clip" | (string & {}); + + export type MaskComposite = Globals | DataType.CompositingOperator | (string & {}); + + export type MaskImage = Globals | "none" | (string & {}); + + export type MaskMode = Globals | DataType.MaskingMode | (string & {}); + + export type MaskOrigin = Globals | DataType.GeometryBox | (string & {}); + + export type MaskPosition<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength> | (string & {}); + + export type MaskRepeat = Globals | DataType.RepeatStyle | (string & {}); + + export type MaskSize<TLength = (string & {}) | 0> = Globals | DataType.BgSize<TLength> | (string & {}); + + export type MaskType = Globals | "alpha" | "luminance"; + + export type MasonryAutoFlow = Globals | "definite-first" | "next" | "ordered" | "pack" | (string & {}); + + export type MathDepth = Globals | "auto-add" | (string & {}) | (number & {}); + + export type MathShift = Globals | "compact" | "normal"; + + export type MathStyle = Globals | "compact" | "normal"; + + export type MaxBlockSize<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fill-available" + | "fit-content" + | "max-content" + | "min-content" + | "none" + | (string & {}); + + export type MaxHeight<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fit-content" + | "-webkit-max-content" + | "-webkit-min-content" + | "fit-content" + | "intrinsic" + | "max-content" + | "min-content" + | "none" + | (string & {}); + + export type MaxInlineSize<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fill-available" + | "fit-content" + | "max-content" + | "min-content" + | "none" + | (string & {}); + + export type MaxLines = Globals | "none" | (number & {}) | (string & {}); + + export type MaxWidth<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fit-content" + | "-webkit-max-content" + | "-webkit-min-content" + | "fit-content" + | "intrinsic" + | "max-content" + | "min-content" + | "none" + | (string & {}); + + export type MinBlockSize<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fill-available" + | "auto" + | "fit-content" + | "max-content" + | "min-content" + | (string & {}); + + export type MinHeight<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fit-content" + | "-webkit-max-content" + | "-webkit-min-content" + | "auto" + | "fit-content" + | "intrinsic" + | "max-content" + | "min-content" + | (string & {}); + + export type MinInlineSize<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fill-available" + | "auto" + | "fit-content" + | "max-content" + | "min-content" + | (string & {}); + + export type MinWidth<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fill-available" + | "-webkit-fit-content" + | "-webkit-max-content" + | "-webkit-min-content" + | "auto" + | "fit-content" + | "intrinsic" + | "max-content" + | "min-content" + | "min-intrinsic" + | (string & {}); + + export type MixBlendMode = Globals | DataType.BlendMode | "plus-lighter"; + + export type Offset<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength> | "auto" | "none" | "normal" | (string & {}); + + export type OffsetDistance<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type OffsetPath = Globals | "none" | (string & {}); + + export type OffsetRotate = Globals | "auto" | "reverse" | (string & {}); + + export type ObjectFit = Globals | "contain" | "cover" | "fill" | "none" | "scale-down"; + + export type ObjectPosition<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength>; + + export type OffsetAnchor<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength> | "auto"; + + export type OffsetPosition<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength> | "auto" | "normal"; + + export type Opacity = Globals | (string & {}) | (number & {}); + + export type Order = Globals | (number & {}) | (string & {}); + + export type Orphans = Globals | (number & {}) | (string & {}); + + export type Outline<TLength = (string & {}) | 0> = Globals | DataType.Color | DataType.LineStyle | DataType.LineWidth<TLength> | "auto" | "invert" | (string & {}); + + export type OutlineColor = Globals | DataType.Color | "invert"; + + export type OutlineOffset<TLength = (string & {}) | 0> = Globals | TLength; + + export type OutlineStyle = Globals | DataType.LineStyle | "auto" | (string & {}); + + export type OutlineWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; + + export type Overflow = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible" | (string & {}); + + export type OverflowAnchor = Globals | "auto" | "none"; + + export type OverflowBlock = Globals | "auto" | "clip" | "hidden" | "scroll" | "visible"; + + export type OverflowClipBox = Globals | "content-box" | "padding-box"; + + export type OverflowClipMargin<TLength = (string & {}) | 0> = Globals | DataType.VisualBox | TLength | (string & {}); + + export type OverflowInline = Globals | "auto" | "clip" | "hidden" | "scroll" | "visible"; + + export type OverflowWrap = Globals | "anywhere" | "break-word" | "normal"; + + export type OverflowX = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible"; + + export type OverflowY = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible"; + + export type Overlay = Globals | "auto" | "none"; + + export type OverscrollBehavior = Globals | "auto" | "contain" | "none" | (string & {}); + + export type OverscrollBehaviorBlock = Globals | "auto" | "contain" | "none"; + + export type OverscrollBehaviorInline = Globals | "auto" | "contain" | "none"; + + export type OverscrollBehaviorX = Globals | "auto" | "contain" | "none"; + + export type OverscrollBehaviorY = Globals | "auto" | "contain" | "none"; + + export type Padding<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type PaddingBlock<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type PaddingBlockEnd<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type PaddingBlockStart<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type PaddingBottom<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type PaddingInline<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type PaddingInlineEnd<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type PaddingInlineStart<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type PaddingLeft<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type PaddingRight<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type PaddingTop<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type Page = Globals | "auto" | (string & {}); + + export type PageBreakAfter = Globals | "always" | "auto" | "avoid" | "left" | "recto" | "right" | "verso"; + + export type PageBreakBefore = Globals | "always" | "auto" | "avoid" | "left" | "recto" | "right" | "verso"; + + export type PageBreakInside = Globals | "auto" | "avoid"; + + export type PaintOrder = Globals | "fill" | "markers" | "normal" | "stroke" | (string & {}); + + export type Perspective<TLength = (string & {}) | 0> = Globals | TLength | "none"; + + export type PerspectiveOrigin<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength>; + + export type PlaceContent = Globals | DataType.ContentDistribution | DataType.ContentPosition | "baseline" | "normal" | (string & {}); + + export type PlaceItems = Globals | DataType.SelfPosition | "baseline" | "normal" | "stretch" | (string & {}); + + export type PlaceSelf = Globals | DataType.SelfPosition | "auto" | "baseline" | "normal" | "stretch" | (string & {}); + + export type PointerEvents = Globals | "all" | "auto" | "fill" | "inherit" | "none" | "painted" | "stroke" | "visible" | "visibleFill" | "visiblePainted" | "visibleStroke"; + + export type Position = Globals | "-webkit-sticky" | "absolute" | "fixed" | "relative" | "static" | "sticky"; + + export type Quotes = Globals | "auto" | "none" | (string & {}); + + export type Resize = Globals | "block" | "both" | "horizontal" | "inline" | "none" | "vertical"; + + export type Right<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type Rotate = Globals | "none" | (string & {}); + + export type RowGap<TLength = (string & {}) | 0> = Globals | TLength | "normal" | (string & {}); + + export type RubyAlign = Globals | "center" | "space-around" | "space-between" | "start"; + + export type RubyMerge = Globals | "auto" | "collapse" | "separate"; + + export type RubyPosition = Globals | "alternate" | "inter-character" | "over" | "under" | (string & {}); + + export type Scale = Globals | "none" | (string & {}) | (number & {}); + + export type ScrollBehavior = Globals | "auto" | "smooth"; + + export type ScrollMargin<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type ScrollMarginBlock<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type ScrollMarginBlockEnd<TLength = (string & {}) | 0> = Globals | TLength; + + export type ScrollMarginBlockStart<TLength = (string & {}) | 0> = Globals | TLength; + + export type ScrollMarginBottom<TLength = (string & {}) | 0> = Globals | TLength; + + export type ScrollMarginInline<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type ScrollMarginInlineEnd<TLength = (string & {}) | 0> = Globals | TLength; + + export type ScrollMarginInlineStart<TLength = (string & {}) | 0> = Globals | TLength; + + export type ScrollMarginLeft<TLength = (string & {}) | 0> = Globals | TLength; + + export type ScrollMarginRight<TLength = (string & {}) | 0> = Globals | TLength; + + export type ScrollMarginTop<TLength = (string & {}) | 0> = Globals | TLength; + + export type ScrollPadding<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type ScrollPaddingBlock<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type ScrollPaddingBlockEnd<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type ScrollPaddingBlockStart<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type ScrollPaddingBottom<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type ScrollPaddingInline<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type ScrollPaddingInlineEnd<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type ScrollPaddingInlineStart<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type ScrollPaddingLeft<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type ScrollPaddingRight<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type ScrollPaddingTop<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type ScrollSnapAlign = Globals | "center" | "end" | "none" | "start" | (string & {}); + + export type ScrollSnapCoordinate<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength> | "none" | (string & {}); + + export type ScrollSnapDestination<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength>; + + export type ScrollSnapPointsX = Globals | "none" | (string & {}); + + export type ScrollSnapPointsY = Globals | "none" | (string & {}); + + export type ScrollSnapStop = Globals | "always" | "normal"; + + export type ScrollSnapType = Globals | "block" | "both" | "inline" | "none" | "x" | "y" | (string & {}); + + export type ScrollSnapTypeX = Globals | "mandatory" | "none" | "proximity"; + + export type ScrollSnapTypeY = Globals | "mandatory" | "none" | "proximity"; + + export type ScrollTimeline = Globals | "none" | (string & {}); + + export type ScrollTimelineAxis = Globals | "block" | "inline" | "x" | "y" | (string & {}); + + export type ScrollTimelineName = Globals | "none" | (string & {}); + + export type ScrollbarColor = Globals | "auto" | (string & {}); + + export type ScrollbarGutter = Globals | "auto" | "stable" | (string & {}); + + export type ScrollbarWidth = Globals | "auto" | "none" | "thin"; + + export type ShapeImageThreshold = Globals | (string & {}) | (number & {}); + + export type ShapeMargin<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type ShapeOutside = Globals | DataType.Box | "margin-box" | "none" | (string & {}); + + export type TabSize<TLength = (string & {}) | 0> = Globals | TLength | (number & {}) | (string & {}); + + export type TableLayout = Globals | "auto" | "fixed"; + + export type TextAlign = Globals | "-webkit-match-parent" | "center" | "end" | "justify" | "left" | "match-parent" | "right" | "start"; + + export type TextAlignLast = Globals | "auto" | "center" | "end" | "justify" | "left" | "right" | "start"; + + export type TextCombineUpright = Globals | "all" | "none" | (string & {}); + + export type TextDecoration<TLength = (string & {}) | 0> = + | Globals + | DataType.Color + | TLength + | "auto" + | "blink" + | "dashed" + | "dotted" + | "double" + | "from-font" + | "grammar-error" + | "line-through" + | "none" + | "overline" + | "solid" + | "spelling-error" + | "underline" + | "wavy" + | (string & {}); + + export type TextDecorationColor = Globals | DataType.Color; + + export type TextDecorationLine = Globals | "blink" | "grammar-error" | "line-through" | "none" | "overline" | "spelling-error" | "underline" | (string & {}); + + export type TextDecorationSkip = Globals | "box-decoration" | "edges" | "leading-spaces" | "none" | "objects" | "spaces" | "trailing-spaces" | (string & {}); + + export type TextDecorationSkipInk = Globals | "all" | "auto" | "none"; + + export type TextDecorationStyle = Globals | "dashed" | "dotted" | "double" | "solid" | "wavy"; + + export type TextDecorationThickness<TLength = (string & {}) | 0> = Globals | TLength | "auto" | "from-font" | (string & {}); + + export type TextEmphasis = Globals | DataType.Color | "circle" | "dot" | "double-circle" | "filled" | "none" | "open" | "sesame" | "triangle" | (string & {}); + + export type TextEmphasisColor = Globals | DataType.Color; + + export type TextEmphasisPosition = Globals | (string & {}); + + export type TextEmphasisStyle = Globals | "circle" | "dot" | "double-circle" | "filled" | "none" | "open" | "sesame" | "triangle" | (string & {}); + + export type TextIndent<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type TextJustify = Globals | "auto" | "inter-character" | "inter-word" | "none"; + + export type TextOrientation = Globals | "mixed" | "sideways" | "upright"; + + export type TextOverflow = Globals | "clip" | "ellipsis" | (string & {}); + + export type TextRendering = Globals | "auto" | "geometricPrecision" | "optimizeLegibility" | "optimizeSpeed"; + + export type TextShadow = Globals | "none" | (string & {}); + + export type TextSizeAdjust = Globals | "auto" | "none" | (string & {}); + + export type TextTransform = Globals | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "none" | "uppercase"; + + export type TextUnderlineOffset<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type TextUnderlinePosition = Globals | "auto" | "from-font" | "left" | "right" | "under" | (string & {}); + + export type TextWrap = Globals | "balance" | "nowrap" | "pretty" | "stable" | "wrap"; + + export type TimelineScope = Globals | "none" | (string & {}); + + export type Top<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type TouchAction = + | Globals + | "-ms-manipulation" + | "-ms-none" + | "-ms-pinch-zoom" + | "auto" + | "manipulation" + | "none" + | "pan-down" + | "pan-left" + | "pan-right" + | "pan-up" + | "pan-x" + | "pan-y" + | "pinch-zoom" + | (string & {}); + + export type Transform = Globals | "none" | (string & {}); + + export type TransformBox = Globals | "border-box" | "content-box" | "fill-box" | "stroke-box" | "view-box"; + + export type TransformOrigin<TLength = (string & {}) | 0> = Globals | TLength | "bottom" | "center" | "left" | "right" | "top" | (string & {}); + + export type TransformStyle = Globals | "flat" | "preserve-3d"; + + export type Transition<TTime = string & {}> = Globals | DataType.SingleTransition<TTime> | (string & {}); + + export type TransitionBehavior = Globals | "allow-discrete" | "normal" | (string & {}); + + export type TransitionDelay<TTime = string & {}> = Globals | TTime | (string & {}); + + export type TransitionDuration<TTime = string & {}> = Globals | TTime | (string & {}); + + export type TransitionProperty = Globals | "all" | "none" | (string & {}); + + export type TransitionTimingFunction = Globals | DataType.EasingFunction | (string & {}); + + export type Translate<TLength = (string & {}) | 0> = Globals | TLength | "none" | (string & {}); + + export type UnicodeBidi = + | Globals + | "-moz-isolate" + | "-moz-isolate-override" + | "-moz-plaintext" + | "-webkit-isolate" + | "-webkit-isolate-override" + | "-webkit-plaintext" + | "bidi-override" + | "embed" + | "isolate" + | "isolate-override" + | "normal" + | "plaintext"; + + export type UserSelect = Globals | "-moz-none" | "all" | "auto" | "contain" | "element" | "none" | "text"; + + export type VerticalAlign<TLength = (string & {}) | 0> = + | Globals + | TLength + | "baseline" + | "bottom" + | "middle" + | "sub" + | "super" + | "text-bottom" + | "text-top" + | "top" + | (string & {}); + + export type ViewTimeline = Globals | "none" | (string & {}); + + export type ViewTimelineAxis = Globals | "block" | "inline" | "x" | "y" | (string & {}); + + export type ViewTimelineInset<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type ViewTimelineName = Globals | "none" | (string & {}); + + export type ViewTransitionName = Globals | "none" | (string & {}); + + export type Visibility = Globals | "collapse" | "hidden" | "visible"; + + export type WhiteSpace = + | Globals + | "-moz-pre-wrap" + | "balance" + | "break-spaces" + | "collapse" + | "discard" + | "discard-after" + | "discard-before" + | "discard-inner" + | "none" + | "normal" + | "nowrap" + | "pre" + | "pre-line" + | "pre-wrap" + | "preserve" + | "preserve-breaks" + | "preserve-spaces" + | "pretty" + | "stable" + | "wrap" + | (string & {}); + + export type WhiteSpaceCollapse = Globals | "break-spaces" | "collapse" | "discard" | "preserve" | "preserve-breaks" | "preserve-spaces"; + + export type WhiteSpaceTrim = Globals | "discard-after" | "discard-before" | "discard-inner" | "none" | (string & {}); + + export type Widows = Globals | (number & {}) | (string & {}); + + export type Width<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fit-content" + | "-webkit-max-content" + | "auto" + | "fit-content" + | "intrinsic" + | "max-content" + | "min-content" + | "min-intrinsic" + | (string & {}); + + export type WillChange = Globals | DataType.AnimateableFeature | "auto" | (string & {}); + + export type WordBreak = Globals | "break-all" | "break-word" | "keep-all" | "normal"; + + export type WordSpacing<TLength = (string & {}) | 0> = Globals | TLength | "normal"; + + export type WordWrap = Globals | "break-word" | "normal"; + + export type WritingMode = Globals | "horizontal-tb" | "sideways-lr" | "sideways-rl" | "vertical-lr" | "vertical-rl"; + + export type ZIndex = Globals | "auto" | (number & {}) | (string & {}); + + export type Zoom = Globals | "normal" | "reset" | (string & {}) | (number & {}); + + export type MozAppearance = + | Globals + | "-moz-mac-unified-toolbar" + | "-moz-win-borderless-glass" + | "-moz-win-browsertabbar-toolbox" + | "-moz-win-communications-toolbox" + | "-moz-win-communicationstext" + | "-moz-win-exclude-glass" + | "-moz-win-glass" + | "-moz-win-media-toolbox" + | "-moz-win-mediatext" + | "-moz-window-button-box" + | "-moz-window-button-box-maximized" + | "-moz-window-button-close" + | "-moz-window-button-maximize" + | "-moz-window-button-minimize" + | "-moz-window-button-restore" + | "-moz-window-frame-bottom" + | "-moz-window-frame-left" + | "-moz-window-frame-right" + | "-moz-window-titlebar" + | "-moz-window-titlebar-maximized" + | "button" + | "button-arrow-down" + | "button-arrow-next" + | "button-arrow-previous" + | "button-arrow-up" + | "button-bevel" + | "button-focus" + | "caret" + | "checkbox" + | "checkbox-container" + | "checkbox-label" + | "checkmenuitem" + | "dualbutton" + | "groupbox" + | "listbox" + | "listitem" + | "menuarrow" + | "menubar" + | "menucheckbox" + | "menuimage" + | "menuitem" + | "menuitemtext" + | "menulist" + | "menulist-button" + | "menulist-text" + | "menulist-textfield" + | "menupopup" + | "menuradio" + | "menuseparator" + | "meterbar" + | "meterchunk" + | "none" + | "progressbar" + | "progressbar-vertical" + | "progresschunk" + | "progresschunk-vertical" + | "radio" + | "radio-container" + | "radio-label" + | "radiomenuitem" + | "range" + | "range-thumb" + | "resizer" + | "resizerpanel" + | "scale-horizontal" + | "scale-vertical" + | "scalethumb-horizontal" + | "scalethumb-vertical" + | "scalethumbend" + | "scalethumbstart" + | "scalethumbtick" + | "scrollbarbutton-down" + | "scrollbarbutton-left" + | "scrollbarbutton-right" + | "scrollbarbutton-up" + | "scrollbarthumb-horizontal" + | "scrollbarthumb-vertical" + | "scrollbartrack-horizontal" + | "scrollbartrack-vertical" + | "searchfield" + | "separator" + | "sheet" + | "spinner" + | "spinner-downbutton" + | "spinner-textfield" + | "spinner-upbutton" + | "splitter" + | "statusbar" + | "statusbarpanel" + | "tab" + | "tab-scroll-arrow-back" + | "tab-scroll-arrow-forward" + | "tabpanel" + | "tabpanels" + | "textfield" + | "textfield-multiline" + | "toolbar" + | "toolbarbutton" + | "toolbarbutton-dropdown" + | "toolbargripper" + | "toolbox" + | "tooltip" + | "treeheader" + | "treeheadercell" + | "treeheadersortarrow" + | "treeitem" + | "treeline" + | "treetwisty" + | "treetwistyopen" + | "treeview"; + + export type MozBinding = Globals | "none" | (string & {}); + + export type MozBorderBottomColors = Globals | DataType.Color | "none" | (string & {}); + + export type MozBorderLeftColors = Globals | DataType.Color | "none" | (string & {}); + + export type MozBorderRightColors = Globals | DataType.Color | "none" | (string & {}); + + export type MozBorderTopColors = Globals | DataType.Color | "none" | (string & {}); + + export type MozContextProperties = Globals | "fill" | "fill-opacity" | "none" | "stroke" | "stroke-opacity" | (string & {}); + + export type MozFloatEdge = Globals | "border-box" | "content-box" | "margin-box" | "padding-box"; + + export type MozForceBrokenImageIcon = Globals | 0 | (string & {}) | 1; + + export type MozImageRegion = Globals | "auto" | (string & {}); + + export type MozOrient = Globals | "block" | "horizontal" | "inline" | "vertical"; + + export type MozOutlineRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type MozOutlineRadiusBottomleft<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type MozOutlineRadiusBottomright<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type MozOutlineRadiusTopleft<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type MozOutlineRadiusTopright<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type MozStackSizing = Globals | "ignore" | "stretch-to-fit"; + + export type MozTextBlink = Globals | "blink" | "none"; + + export type MozUserFocus = Globals | "ignore" | "none" | "normal" | "select-after" | "select-all" | "select-before" | "select-menu" | "select-same"; + + export type MozUserInput = Globals | "auto" | "disabled" | "enabled" | "none"; + + export type MozUserModify = Globals | "read-only" | "read-write" | "write-only"; + + export type MozWindowDragging = Globals | "drag" | "no-drag"; + + export type MozWindowShadow = Globals | "default" | "menu" | "none" | "sheet" | "tooltip"; + + export type MsAccelerator = Globals | "false" | "true"; + + export type MsBlockProgression = Globals | "bt" | "lr" | "rl" | "tb"; + + export type MsContentZoomChaining = Globals | "chained" | "none"; + + export type MsContentZoomLimit = Globals | (string & {}); + + export type MsContentZoomLimitMax = Globals | (string & {}); + + export type MsContentZoomLimitMin = Globals | (string & {}); + + export type MsContentZoomSnap = Globals | "mandatory" | "none" | "proximity" | (string & {}); + + export type MsContentZoomSnapPoints = Globals | (string & {}); + + export type MsContentZoomSnapType = Globals | "mandatory" | "none" | "proximity"; + + export type MsContentZooming = Globals | "none" | "zoom"; + + export type MsFilter = Globals | (string & {}); + + export type MsFlowFrom = Globals | "none" | (string & {}); + + export type MsFlowInto = Globals | "none" | (string & {}); + + export type MsGridColumns<TLength = (string & {}) | 0> = Globals | DataType.TrackBreadth<TLength> | "none" | (string & {}); + + export type MsGridRows<TLength = (string & {}) | 0> = Globals | DataType.TrackBreadth<TLength> | "none" | (string & {}); + + export type MsHighContrastAdjust = Globals | "auto" | "none"; + + export type MsHyphenateLimitChars = Globals | "auto" | (string & {}) | (number & {}); + + export type MsHyphenateLimitLines = Globals | "no-limit" | (number & {}) | (string & {}); + + export type MsHyphenateLimitZone<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type MsImeAlign = Globals | "after" | "auto"; + + export type MsOverflowStyle = Globals | "-ms-autohiding-scrollbar" | "auto" | "none" | "scrollbar"; + + export type MsScrollChaining = Globals | "chained" | "none"; + + export type MsScrollLimit = Globals | (string & {}); + + export type MsScrollLimitXMax<TLength = (string & {}) | 0> = Globals | TLength | "auto"; + + export type MsScrollLimitXMin<TLength = (string & {}) | 0> = Globals | TLength; + + export type MsScrollLimitYMax<TLength = (string & {}) | 0> = Globals | TLength | "auto"; + + export type MsScrollLimitYMin<TLength = (string & {}) | 0> = Globals | TLength; + + export type MsScrollRails = Globals | "none" | "railed"; + + export type MsScrollSnapPointsX = Globals | (string & {}); + + export type MsScrollSnapPointsY = Globals | (string & {}); + + export type MsScrollSnapType = Globals | "mandatory" | "none" | "proximity"; + + export type MsScrollSnapX = Globals | (string & {}); + + export type MsScrollSnapY = Globals | (string & {}); + + export type MsScrollTranslation = Globals | "none" | "vertical-to-horizontal"; + + export type MsScrollbar3dlightColor = Globals | DataType.Color; + + export type MsScrollbarArrowColor = Globals | DataType.Color; + + export type MsScrollbarBaseColor = Globals | DataType.Color; + + export type MsScrollbarDarkshadowColor = Globals | DataType.Color; + + export type MsScrollbarFaceColor = Globals | DataType.Color; + + export type MsScrollbarHighlightColor = Globals | DataType.Color; + + export type MsScrollbarShadowColor = Globals | DataType.Color; + + export type MsScrollbarTrackColor = Globals | DataType.Color; + + export type MsTextAutospace = Globals | "ideograph-alpha" | "ideograph-numeric" | "ideograph-parenthesis" | "ideograph-space" | "none"; + + export type MsTouchSelect = Globals | "grippers" | "none"; + + export type MsUserSelect = Globals | "element" | "none" | "text"; + + export type MsWrapFlow = Globals | "auto" | "both" | "clear" | "end" | "maximum" | "start"; + + export type MsWrapMargin<TLength = (string & {}) | 0> = Globals | TLength; + + export type MsWrapThrough = Globals | "none" | "wrap"; + + export type WebkitAppearance = + | Globals + | "-apple-pay-button" + | "button" + | "button-bevel" + | "caret" + | "checkbox" + | "default-button" + | "inner-spin-button" + | "listbox" + | "listitem" + | "media-controls-background" + | "media-controls-fullscreen-background" + | "media-current-time-display" + | "media-enter-fullscreen-button" + | "media-exit-fullscreen-button" + | "media-fullscreen-button" + | "media-mute-button" + | "media-overlay-play-button" + | "media-play-button" + | "media-seek-back-button" + | "media-seek-forward-button" + | "media-slider" + | "media-sliderthumb" + | "media-time-remaining-display" + | "media-toggle-closed-captions-button" + | "media-volume-slider" + | "media-volume-slider-container" + | "media-volume-sliderthumb" + | "menulist" + | "menulist-button" + | "menulist-text" + | "menulist-textfield" + | "meter" + | "none" + | "progress-bar" + | "progress-bar-value" + | "push-button" + | "radio" + | "searchfield" + | "searchfield-cancel-button" + | "searchfield-decoration" + | "searchfield-results-button" + | "searchfield-results-decoration" + | "slider-horizontal" + | "slider-vertical" + | "sliderthumb-horizontal" + | "sliderthumb-vertical" + | "square-button" + | "textarea" + | "textfield"; + + export type WebkitBorderBefore<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); + + export type WebkitBorderBeforeColor = Globals | DataType.Color; + + export type WebkitBorderBeforeStyle = Globals | DataType.LineStyle | (string & {}); + + export type WebkitBorderBeforeWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | (string & {}); + + export type WebkitBoxReflect<TLength = (string & {}) | 0> = Globals | TLength | "above" | "below" | "left" | "right" | (string & {}); + + export type WebkitLineClamp = Globals | "none" | (number & {}) | (string & {}); + + export type WebkitMask<TLength = (string & {}) | 0> = + | Globals + | DataType.Position<TLength> + | DataType.RepeatStyle + | DataType.Box + | "border" + | "content" + | "none" + | "padding" + | "text" + | (string & {}); + + export type WebkitMaskAttachment = Globals | DataType.Attachment | (string & {}); + + export type WebkitMaskClip = Globals | DataType.Box | "border" | "content" | "padding" | "text" | (string & {}); + + export type WebkitMaskComposite = Globals | DataType.CompositeStyle | (string & {}); + + export type WebkitMaskImage = Globals | "none" | (string & {}); + + export type WebkitMaskOrigin = Globals | DataType.Box | "border" | "content" | "padding" | (string & {}); + + export type WebkitMaskPosition<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength> | (string & {}); + + export type WebkitMaskPositionX<TLength = (string & {}) | 0> = Globals | TLength | "center" | "left" | "right" | (string & {}); + + export type WebkitMaskPositionY<TLength = (string & {}) | 0> = Globals | TLength | "bottom" | "center" | "top" | (string & {}); + + export type WebkitMaskRepeat = Globals | DataType.RepeatStyle | (string & {}); + + export type WebkitMaskRepeatX = Globals | "no-repeat" | "repeat" | "round" | "space"; + + export type WebkitMaskRepeatY = Globals | "no-repeat" | "repeat" | "round" | "space"; + + export type WebkitMaskSize<TLength = (string & {}) | 0> = Globals | DataType.BgSize<TLength> | (string & {}); + + export type WebkitOverflowScrolling = Globals | "auto" | "touch"; + + export type WebkitTapHighlightColor = Globals | DataType.Color; + + export type WebkitTextFillColor = Globals | DataType.Color; + + export type WebkitTextStroke<TLength = (string & {}) | 0> = Globals | DataType.Color | TLength | (string & {}); + + export type WebkitTextStrokeColor = Globals | DataType.Color; + + export type WebkitTextStrokeWidth<TLength = (string & {}) | 0> = Globals | TLength; + + export type WebkitTouchCallout = Globals | "default" | "none"; + + export type WebkitUserModify = Globals | "read-only" | "read-write" | "read-write-plaintext-only"; + + export type AlignmentBaseline = + | Globals + | "after-edge" + | "alphabetic" + | "auto" + | "baseline" + | "before-edge" + | "central" + | "hanging" + | "ideographic" + | "mathematical" + | "middle" + | "text-after-edge" + | "text-before-edge"; + + export type BaselineShift<TLength = (string & {}) | 0> = Globals | TLength | "baseline" | "sub" | "super" | (string & {}); + + export type ClipRule = Globals | "evenodd" | "nonzero"; + + export type ColorInterpolation = Globals | "auto" | "linearRGB" | "sRGB"; + + export type ColorRendering = Globals | "auto" | "optimizeQuality" | "optimizeSpeed"; + + export type DominantBaseline = + | Globals + | "alphabetic" + | "auto" + | "central" + | "hanging" + | "ideographic" + | "mathematical" + | "middle" + | "no-change" + | "reset-size" + | "text-after-edge" + | "text-before-edge" + | "use-script"; + + export type Fill = Globals | DataType.Paint; + + export type FillOpacity = Globals | (number & {}) | (string & {}); + + export type FillRule = Globals | "evenodd" | "nonzero"; + + export type FloodColor = Globals | DataType.Color | "currentColor"; + + export type FloodOpacity = Globals | (number & {}) | (string & {}); + + export type GlyphOrientationVertical = Globals | "auto" | (string & {}) | (number & {}); + + export type LightingColor = Globals | DataType.Color | "currentColor"; + + export type Marker = Globals | "none" | (string & {}); + + export type MarkerEnd = Globals | "none" | (string & {}); + + export type MarkerMid = Globals | "none" | (string & {}); + + export type MarkerStart = Globals | "none" | (string & {}); + + export type ShapeRendering = Globals | "auto" | "crispEdges" | "geometricPrecision" | "optimizeSpeed"; + + export type StopColor = Globals | DataType.Color | "currentColor"; + + export type StopOpacity = Globals | (number & {}) | (string & {}); + + export type Stroke = Globals | DataType.Paint; + + export type StrokeDasharray<TLength = (string & {}) | 0> = Globals | DataType.Dasharray<TLength> | "none"; + + export type StrokeDashoffset<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type StrokeLinecap = Globals | "butt" | "round" | "square"; + + export type StrokeLinejoin = Globals | "bevel" | "miter" | "round"; + + export type StrokeMiterlimit = Globals | (number & {}) | (string & {}); + + export type StrokeOpacity = Globals | (number & {}) | (string & {}); + + export type StrokeWidth<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type TextAnchor = Globals | "end" | "middle" | "start"; + + export type VectorEffect = Globals | "non-scaling-stroke" | "none"; +} + +export namespace AtRule { + export interface CounterStyle<TLength = (string & {}) | 0, TTime = string & {}> { + additiveSymbols?: string | undefined; + fallback?: string | undefined; + negative?: string | undefined; + pad?: string | undefined; + prefix?: string | undefined; + range?: Range | undefined; + speakAs?: SpeakAs | undefined; + suffix?: string | undefined; + symbols?: string | undefined; + system?: System | undefined; + } + + export interface CounterStyleHyphen<TLength = (string & {}) | 0, TTime = string & {}> { + "additive-symbols"?: string | undefined; + fallback?: string | undefined; + negative?: string | undefined; + pad?: string | undefined; + prefix?: string | undefined; + range?: Range | undefined; + "speak-as"?: SpeakAs | undefined; + suffix?: string | undefined; + symbols?: string | undefined; + system?: System | undefined; + } + + export type CounterStyleFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<CounterStyle<TLength, TTime>>; + + export type CounterStyleHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<CounterStyleHyphen<TLength, TTime>>; + + export interface FontFace<TLength = (string & {}) | 0, TTime = string & {}> { + MozFontFeatureSettings?: FontFeatureSettings | undefined; + ascentOverride?: AscentOverride | undefined; + descentOverride?: DescentOverride | undefined; + fontDisplay?: FontDisplay | undefined; + fontFamily?: string | undefined; + fontFeatureSettings?: FontFeatureSettings | undefined; + fontStretch?: FontStretch | undefined; + fontStyle?: FontStyle | undefined; + fontVariant?: FontVariant | undefined; + fontVariationSettings?: FontVariationSettings | undefined; + fontWeight?: FontWeight | undefined; + lineGapOverride?: LineGapOverride | undefined; + sizeAdjust?: string | undefined; + src?: string | undefined; + unicodeRange?: string | undefined; + } + + export interface FontFaceHyphen<TLength = (string & {}) | 0, TTime = string & {}> { + "-moz-font-feature-settings"?: FontFeatureSettings | undefined; + "ascent-override"?: AscentOverride | undefined; + "descent-override"?: DescentOverride | undefined; + "font-display"?: FontDisplay | undefined; + "font-family"?: string | undefined; + "font-feature-settings"?: FontFeatureSettings | undefined; + "font-stretch"?: FontStretch | undefined; + "font-style"?: FontStyle | undefined; + "font-variant"?: FontVariant | undefined; + "font-variation-settings"?: FontVariationSettings | undefined; + "font-weight"?: FontWeight | undefined; + "line-gap-override"?: LineGapOverride | undefined; + "size-adjust"?: string | undefined; + src?: string | undefined; + "unicode-range"?: string | undefined; + } + + export type FontFaceFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<FontFace<TLength, TTime>>; + + export type FontFaceHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<FontFaceHyphen<TLength, TTime>>; + + export interface FontPaletteValues<TLength = (string & {}) | 0, TTime = string & {}> { + basePalette?: BasePalette | undefined; + fontFamily?: string | undefined; + overrideColors?: string | undefined; + } + + export interface FontPaletteValuesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { + "base-palette"?: BasePalette | undefined; + "font-family"?: string | undefined; + "override-colors"?: string | undefined; + } + + export type FontPaletteValuesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<FontPaletteValues<TLength, TTime>>; + + export type FontPaletteValuesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<FontPaletteValuesHyphen<TLength, TTime>>; + + export interface Page<TLength = (string & {}) | 0, TTime = string & {}> { + bleed?: Bleed<TLength> | undefined; + marks?: Marks | undefined; + pageOrientation?: PageOrientation | undefined; + size?: Size<TLength> | undefined; + } + + export interface PageHyphen<TLength = (string & {}) | 0, TTime = string & {}> { + bleed?: Bleed<TLength> | undefined; + marks?: Marks | undefined; + "page-orientation"?: PageOrientation | undefined; + size?: Size<TLength> | undefined; + } + + export type PageFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<Page<TLength, TTime>>; + + export type PageHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<PageHyphen<TLength, TTime>>; + + export interface Property<TLength = (string & {}) | 0, TTime = string & {}> { + inherits?: Inherits | undefined; + initialValue?: string | undefined; + syntax?: string | undefined; + } + + export interface PropertyHyphen<TLength = (string & {}) | 0, TTime = string & {}> { + inherits?: Inherits | undefined; + "initial-value"?: string | undefined; + syntax?: string | undefined; + } + + export type PropertyFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<Property<TLength, TTime>>; + + export type PropertyHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<PropertyHyphen<TLength, TTime>>; + + export interface Viewport<TLength = (string & {}) | 0, TTime = string & {}> { + height?: Height<TLength> | undefined; + maxHeight?: MaxHeight<TLength> | undefined; + maxWidth?: MaxWidth<TLength> | undefined; + maxZoom?: MaxZoom | undefined; + minHeight?: MinHeight<TLength> | undefined; + minWidth?: MinWidth<TLength> | undefined; + minZoom?: MinZoom | undefined; + orientation?: Orientation | undefined; + userZoom?: UserZoom | undefined; + viewportFit?: ViewportFit | undefined; + width?: Width<TLength> | undefined; + zoom?: Zoom | undefined; + } + + export interface ViewportHyphen<TLength = (string & {}) | 0, TTime = string & {}> { + height?: Height<TLength> | undefined; + "max-height"?: MaxHeight<TLength> | undefined; + "max-width"?: MaxWidth<TLength> | undefined; + "max-zoom"?: MaxZoom | undefined; + "min-height"?: MinHeight<TLength> | undefined; + "min-width"?: MinWidth<TLength> | undefined; + "min-zoom"?: MinZoom | undefined; + orientation?: Orientation | undefined; + "user-zoom"?: UserZoom | undefined; + "viewport-fit"?: ViewportFit | undefined; + width?: Width<TLength> | undefined; + zoom?: Zoom | undefined; + } + + export type ViewportFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<Viewport<TLength, TTime>>; + + export type ViewportHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<ViewportHyphen<TLength, TTime>>; + + type Range = "auto" | (string & {}); + + type SpeakAs = "auto" | "bullets" | "numbers" | "spell-out" | "words" | (string & {}); + + type System = "additive" | "alphabetic" | "cyclic" | "fixed" | "numeric" | "symbolic" | (string & {}); + + type FontFeatureSettings = "normal" | (string & {}); + + type AscentOverride = "normal" | (string & {}); + + type DescentOverride = "normal" | (string & {}); + + type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; + + type FontStretch = DataType.FontStretchAbsolute | (string & {}); + + type FontStyle = "italic" | "normal" | "oblique" | (string & {}); + + type FontVariant = + | DataType.EastAsianVariantValues + | "all-petite-caps" + | "all-small-caps" + | "common-ligatures" + | "contextual" + | "diagonal-fractions" + | "discretionary-ligatures" + | "full-width" + | "historical-forms" + | "historical-ligatures" + | "lining-nums" + | "no-common-ligatures" + | "no-contextual" + | "no-discretionary-ligatures" + | "no-historical-ligatures" + | "none" + | "normal" + | "oldstyle-nums" + | "ordinal" + | "petite-caps" + | "proportional-nums" + | "proportional-width" + | "ruby" + | "slashed-zero" + | "small-caps" + | "stacked-fractions" + | "tabular-nums" + | "titling-caps" + | "unicase" + | (string & {}); + + type FontVariationSettings = "normal" | (string & {}); + + type FontWeight = DataType.FontWeightAbsolute | (string & {}); + + type LineGapOverride = "normal" | (string & {}); + + type BasePalette = "dark" | "light" | (number & {}) | (string & {}); + + type Bleed<TLength> = TLength | "auto"; + + type Marks = "crop" | "cross" | "none" | (string & {}); + + type PageOrientation = "rotate-left" | "rotate-right" | "upright"; + + type Size<TLength> = DataType.PageSize | TLength | "auto" | "landscape" | "portrait" | (string & {}); + + type Inherits = "false" | "true"; + + type Height<TLength> = DataType.ViewportLength<TLength> | (string & {}); + + type MaxHeight<TLength> = DataType.ViewportLength<TLength>; + + type MaxWidth<TLength> = DataType.ViewportLength<TLength>; + + type MaxZoom = "auto" | (string & {}) | (number & {}); + + type MinHeight<TLength> = DataType.ViewportLength<TLength>; + + type MinWidth<TLength> = DataType.ViewportLength<TLength>; + + type MinZoom = "auto" | (string & {}) | (number & {}); + + type Orientation = "auto" | "landscape" | "portrait"; + + type UserZoom = "fixed" | "zoom"; + + type ViewportFit = "auto" | "contain" | "cover"; + + type Width<TLength> = DataType.ViewportLength<TLength> | (string & {}); + + type Zoom = "auto" | (string & {}) | (number & {}); +} + +/** + * **Attention!** Data types receives its name from the spec. E.g. `<color>` becomes `DataType.Color` and + * `<content-distribution>` becomes `DataType.ContentDistribution`. It happens quite frequent that these data types + * are split into several data types or/and name changes as the spec develops. So there's a risk that a minor/patch + * update from `csstype` can break your typing if you're using the `DataType` namespace. + */ +export namespace DataType { + type AbsoluteSize = "large" | "medium" | "small" | "x-large" | "x-small" | "xx-large" | "xx-small" | "xxx-large"; + + type AnimateableFeature = "contents" | "scroll-position" | (string & {}); + + type Attachment = "fixed" | "local" | "scroll"; + + type BgPosition<TLength> = TLength | "bottom" | "center" | "left" | "right" | "top" | (string & {}); + + type BgSize<TLength> = TLength | "auto" | "contain" | "cover" | (string & {}); + + type BlendMode = + | "color" + | "color-burn" + | "color-dodge" + | "darken" + | "difference" + | "exclusion" + | "hard-light" + | "hue" + | "lighten" + | "luminosity" + | "multiply" + | "normal" + | "overlay" + | "saturation" + | "screen" + | "soft-light"; + + type Box = "border-box" | "content-box" | "padding-box"; + + type Color = NamedColor | DeprecatedSystemColor | "currentcolor" | (string & {}); + + type CompatAuto = + | "button" + | "checkbox" + | "listbox" + | "menulist" + | "meter" + | "progress-bar" + | "push-button" + | "radio" + | "searchfield" + | "slider-horizontal" + | "square-button" + | "textarea"; + + type CompositeStyle = + | "clear" + | "copy" + | "destination-atop" + | "destination-in" + | "destination-out" + | "destination-over" + | "source-atop" + | "source-in" + | "source-out" + | "source-over" + | "xor"; + + type CompositingOperator = "add" | "exclude" | "intersect" | "subtract"; + + type ContentDistribution = "space-around" | "space-between" | "space-evenly" | "stretch"; + + type ContentList = Quote | "contents" | (string & {}); + + type ContentPosition = "center" | "end" | "flex-end" | "flex-start" | "start"; + + type CubicBezierTimingFunction = "ease" | "ease-in" | "ease-in-out" | "ease-out" | (string & {}); + + type Dasharray<TLength> = TLength | (string & {}) | (number & {}); + + type DeprecatedSystemColor = + | "ActiveBorder" + | "ActiveCaption" + | "AppWorkspace" + | "Background" + | "ButtonFace" + | "ButtonHighlight" + | "ButtonShadow" + | "ButtonText" + | "CaptionText" + | "GrayText" + | "Highlight" + | "HighlightText" + | "InactiveBorder" + | "InactiveCaption" + | "InactiveCaptionText" + | "InfoBackground" + | "InfoText" + | "Menu" + | "MenuText" + | "Scrollbar" + | "ThreeDDarkShadow" + | "ThreeDFace" + | "ThreeDHighlight" + | "ThreeDLightShadow" + | "ThreeDShadow" + | "Window" + | "WindowFrame" + | "WindowText"; + + type DisplayInside = "-ms-flexbox" | "-ms-grid" | "-webkit-flex" | "flex" | "flow" | "flow-root" | "grid" | "ruby" | "table"; + + type DisplayInternal = + | "ruby-base" + | "ruby-base-container" + | "ruby-text" + | "ruby-text-container" + | "table-caption" + | "table-cell" + | "table-column" + | "table-column-group" + | "table-footer-group" + | "table-header-group" + | "table-row" + | "table-row-group"; + + type DisplayLegacy = "-ms-inline-flexbox" | "-ms-inline-grid" | "-webkit-inline-flex" | "inline-block" | "inline-flex" | "inline-grid" | "inline-list-item" | "inline-table"; + + type DisplayOutside = "block" | "inline" | "run-in"; + + type EasingFunction = CubicBezierTimingFunction | StepTimingFunction | "linear"; + + type EastAsianVariantValues = "jis04" | "jis78" | "jis83" | "jis90" | "simplified" | "traditional"; + + type FinalBgLayer<TLength> = Color | BgPosition<TLength> | RepeatStyle | Attachment | Box | "none" | (string & {}); + + type FontStretchAbsolute = + | "condensed" + | "expanded" + | "extra-condensed" + | "extra-expanded" + | "normal" + | "semi-condensed" + | "semi-expanded" + | "ultra-condensed" + | "ultra-expanded" + | (string & {}); + + type FontWeightAbsolute = "bold" | "normal" | (number & {}) | (string & {}); + + type GenericFamily = "cursive" | "fantasy" | "monospace" | "sans-serif" | "serif"; + + type GeometryBox = Box | "fill-box" | "margin-box" | "stroke-box" | "view-box"; + + type GridLine = "auto" | (string & {}) | (number & {}); + + type LineStyle = "dashed" | "dotted" | "double" | "groove" | "hidden" | "inset" | "none" | "outset" | "ridge" | "solid"; + + type LineWidth<TLength> = TLength | "medium" | "thick" | "thin"; + + type MaskLayer<TLength> = Position<TLength> | RepeatStyle | GeometryBox | CompositingOperator | MaskingMode | "no-clip" | "none" | (string & {}); + + type MaskingMode = "alpha" | "luminance" | "match-source"; + + type NamedColor = + | "aliceblue" + | "antiquewhite" + | "aqua" + | "aquamarine" + | "azure" + | "beige" + | "bisque" + | "black" + | "blanchedalmond" + | "blue" + | "blueviolet" + | "brown" + | "burlywood" + | "cadetblue" + | "chartreuse" + | "chocolate" + | "coral" + | "cornflowerblue" + | "cornsilk" + | "crimson" + | "cyan" + | "darkblue" + | "darkcyan" + | "darkgoldenrod" + | "darkgray" + | "darkgreen" + | "darkgrey" + | "darkkhaki" + | "darkmagenta" + | "darkolivegreen" + | "darkorange" + | "darkorchid" + | "darkred" + | "darksalmon" + | "darkseagreen" + | "darkslateblue" + | "darkslategray" + | "darkslategrey" + | "darkturquoise" + | "darkviolet" + | "deeppink" + | "deepskyblue" + | "dimgray" + | "dimgrey" + | "dodgerblue" + | "firebrick" + | "floralwhite" + | "forestgreen" + | "fuchsia" + | "gainsboro" + | "ghostwhite" + | "gold" + | "goldenrod" + | "gray" + | "green" + | "greenyellow" + | "grey" + | "honeydew" + | "hotpink" + | "indianred" + | "indigo" + | "ivory" + | "khaki" + | "lavender" + | "lavenderblush" + | "lawngreen" + | "lemonchiffon" + | "lightblue" + | "lightcoral" + | "lightcyan" + | "lightgoldenrodyellow" + | "lightgray" + | "lightgreen" + | "lightgrey" + | "lightpink" + | "lightsalmon" + | "lightseagreen" + | "lightskyblue" + | "lightslategray" + | "lightslategrey" + | "lightsteelblue" + | "lightyellow" + | "lime" + | "limegreen" + | "linen" + | "magenta" + | "maroon" + | "mediumaquamarine" + | "mediumblue" + | "mediumorchid" + | "mediumpurple" + | "mediumseagreen" + | "mediumslateblue" + | "mediumspringgreen" + | "mediumturquoise" + | "mediumvioletred" + | "midnightblue" + | "mintcream" + | "mistyrose" + | "moccasin" + | "navajowhite" + | "navy" + | "oldlace" + | "olive" + | "olivedrab" + | "orange" + | "orangered" + | "orchid" + | "palegoldenrod" + | "palegreen" + | "paleturquoise" + | "palevioletred" + | "papayawhip" + | "peachpuff" + | "peru" + | "pink" + | "plum" + | "powderblue" + | "purple" + | "rebeccapurple" + | "red" + | "rosybrown" + | "royalblue" + | "saddlebrown" + | "salmon" + | "sandybrown" + | "seagreen" + | "seashell" + | "sienna" + | "silver" + | "skyblue" + | "slateblue" + | "slategray" + | "slategrey" + | "snow" + | "springgreen" + | "steelblue" + | "tan" + | "teal" + | "thistle" + | "tomato" + | "transparent" + | "turquoise" + | "violet" + | "wheat" + | "white" + | "whitesmoke" + | "yellow" + | "yellowgreen"; + + type PageSize = "A3" | "A4" | "A5" | "B4" | "B5" | "JIS-B4" | "JIS-B5" | "ledger" | "legal" | "letter"; + + type Paint = Color | "child" | "context-fill" | "context-stroke" | "none" | (string & {}); + + type Position<TLength> = TLength | "bottom" | "center" | "left" | "right" | "top" | (string & {}); + + type Quote = "close-quote" | "no-close-quote" | "no-open-quote" | "open-quote"; + + type RepeatStyle = "no-repeat" | "repeat" | "repeat-x" | "repeat-y" | "round" | "space" | (string & {}); + + type SelfPosition = "center" | "end" | "flex-end" | "flex-start" | "self-end" | "self-start" | "start"; + + type SingleAnimation<TTime> = + | EasingFunction + | SingleAnimationDirection + | SingleAnimationFillMode + | SingleAnimationTimeline + | TTime + | "infinite" + | "none" + | "paused" + | "running" + | (string & {}) + | (number & {}); + + type SingleAnimationComposition = "accumulate" | "add" | "replace"; + + type SingleAnimationDirection = "alternate" | "alternate-reverse" | "normal" | "reverse"; + + type SingleAnimationFillMode = "backwards" | "both" | "forwards" | "none"; + + type SingleAnimationTimeline = "auto" | "none" | (string & {}); + + type SingleTransition<TTime> = EasingFunction | TTime | "all" | "allow-discrete" | "none" | "normal" | (string & {}); + + type StepTimingFunction = "step-end" | "step-start" | (string & {}); + + type TimelineRangeName = "contain" | "cover" | "entry" | "entry-crossing" | "exit" | "exit-crossing"; + + type TrackBreadth<TLength> = TLength | "auto" | "max-content" | "min-content" | (string & {}); + + type ViewportLength<TLength> = TLength | "auto" | (string & {}); + + type VisualBox = "border-box" | "content-box" | "padding-box"; +} diff --git a/vuetest/node_modules/csstype/index.js.flow b/vuetest/node_modules/csstype/index.js.flow new file mode 100644 index 0000000..0b45a32 --- /dev/null +++ b/vuetest/node_modules/csstype/index.js.flow @@ -0,0 +1,6612 @@ +// @flow strict + +export type StandardLonghandProperties<TLength = string | 0, TTime = string> = {| + accentColor?: Property$AccentColor, + alignContent?: Property$AlignContent, + alignItems?: Property$AlignItems, + alignSelf?: Property$AlignSelf, + alignTracks?: Property$AlignTracks, + animationComposition?: Property$AnimationComposition, + animationDelay?: Property$AnimationDelay<TTime>, + animationDirection?: Property$AnimationDirection, + animationDuration?: Property$AnimationDuration<TTime>, + animationFillMode?: Property$AnimationFillMode, + animationIterationCount?: Property$AnimationIterationCount, + animationName?: Property$AnimationName, + animationPlayState?: Property$AnimationPlayState, + animationRangeEnd?: Property$AnimationRangeEnd<TLength>, + animationRangeStart?: Property$AnimationRangeStart<TLength>, + animationTimeline?: Property$AnimationTimeline, + animationTimingFunction?: Property$AnimationTimingFunction, + appearance?: Property$Appearance, + aspectRatio?: Property$AspectRatio, + backdropFilter?: Property$BackdropFilter, + backfaceVisibility?: Property$BackfaceVisibility, + backgroundAttachment?: Property$BackgroundAttachment, + backgroundBlendMode?: Property$BackgroundBlendMode, + backgroundClip?: Property$BackgroundClip, + backgroundColor?: Property$BackgroundColor, + backgroundImage?: Property$BackgroundImage, + backgroundOrigin?: Property$BackgroundOrigin, + backgroundPositionX?: Property$BackgroundPositionX<TLength>, + backgroundPositionY?: Property$BackgroundPositionY<TLength>, + backgroundRepeat?: Property$BackgroundRepeat, + backgroundSize?: Property$BackgroundSize<TLength>, + blockOverflow?: Property$BlockOverflow, + blockSize?: Property$BlockSize<TLength>, + borderBlockColor?: Property$BorderBlockColor, + borderBlockEndColor?: Property$BorderBlockEndColor, + borderBlockEndStyle?: Property$BorderBlockEndStyle, + borderBlockEndWidth?: Property$BorderBlockEndWidth<TLength>, + borderBlockStartColor?: Property$BorderBlockStartColor, + borderBlockStartStyle?: Property$BorderBlockStartStyle, + borderBlockStartWidth?: Property$BorderBlockStartWidth<TLength>, + borderBlockStyle?: Property$BorderBlockStyle, + borderBlockWidth?: Property$BorderBlockWidth<TLength>, + borderBottomColor?: Property$BorderBottomColor, + borderBottomLeftRadius?: Property$BorderBottomLeftRadius<TLength>, + borderBottomRightRadius?: Property$BorderBottomRightRadius<TLength>, + borderBottomStyle?: Property$BorderBottomStyle, + borderBottomWidth?: Property$BorderBottomWidth<TLength>, + borderCollapse?: Property$BorderCollapse, + borderEndEndRadius?: Property$BorderEndEndRadius<TLength>, + borderEndStartRadius?: Property$BorderEndStartRadius<TLength>, + borderImageOutset?: Property$BorderImageOutset<TLength>, + borderImageRepeat?: Property$BorderImageRepeat, + borderImageSlice?: Property$BorderImageSlice, + borderImageSource?: Property$BorderImageSource, + borderImageWidth?: Property$BorderImageWidth<TLength>, + borderInlineColor?: Property$BorderInlineColor, + borderInlineEndColor?: Property$BorderInlineEndColor, + borderInlineEndStyle?: Property$BorderInlineEndStyle, + borderInlineEndWidth?: Property$BorderInlineEndWidth<TLength>, + borderInlineStartColor?: Property$BorderInlineStartColor, + borderInlineStartStyle?: Property$BorderInlineStartStyle, + borderInlineStartWidth?: Property$BorderInlineStartWidth<TLength>, + borderInlineStyle?: Property$BorderInlineStyle, + borderInlineWidth?: Property$BorderInlineWidth<TLength>, + borderLeftColor?: Property$BorderLeftColor, + borderLeftStyle?: Property$BorderLeftStyle, + borderLeftWidth?: Property$BorderLeftWidth<TLength>, + borderRightColor?: Property$BorderRightColor, + borderRightStyle?: Property$BorderRightStyle, + borderRightWidth?: Property$BorderRightWidth<TLength>, + borderSpacing?: Property$BorderSpacing<TLength>, + borderStartEndRadius?: Property$BorderStartEndRadius<TLength>, + borderStartStartRadius?: Property$BorderStartStartRadius<TLength>, + borderTopColor?: Property$BorderTopColor, + borderTopLeftRadius?: Property$BorderTopLeftRadius<TLength>, + borderTopRightRadius?: Property$BorderTopRightRadius<TLength>, + borderTopStyle?: Property$BorderTopStyle, + borderTopWidth?: Property$BorderTopWidth<TLength>, + bottom?: Property$Bottom<TLength>, + boxDecorationBreak?: Property$BoxDecorationBreak, + boxShadow?: Property$BoxShadow, + boxSizing?: Property$BoxSizing, + breakAfter?: Property$BreakAfter, + breakBefore?: Property$BreakBefore, + breakInside?: Property$BreakInside, + captionSide?: Property$CaptionSide, + caretColor?: Property$CaretColor, + caretShape?: Property$CaretShape, + clear?: Property$Clear, + clipPath?: Property$ClipPath, + color?: Property$Color, + colorAdjust?: Property$PrintColorAdjust, + colorScheme?: Property$ColorScheme, + columnCount?: Property$ColumnCount, + columnFill?: Property$ColumnFill, + columnGap?: Property$ColumnGap<TLength>, + columnRuleColor?: Property$ColumnRuleColor, + columnRuleStyle?: Property$ColumnRuleStyle, + columnRuleWidth?: Property$ColumnRuleWidth<TLength>, + columnSpan?: Property$ColumnSpan, + columnWidth?: Property$ColumnWidth<TLength>, + contain?: Property$Contain, + containIntrinsicBlockSize?: Property$ContainIntrinsicBlockSize<TLength>, + containIntrinsicHeight?: Property$ContainIntrinsicHeight<TLength>, + containIntrinsicInlineSize?: Property$ContainIntrinsicInlineSize<TLength>, + containIntrinsicWidth?: Property$ContainIntrinsicWidth<TLength>, + containerName?: Property$ContainerName, + containerType?: Property$ContainerType, + content?: Property$Content, + contentVisibility?: Property$ContentVisibility, + counterIncrement?: Property$CounterIncrement, + counterReset?: Property$CounterReset, + counterSet?: Property$CounterSet, + cursor?: Property$Cursor, + direction?: Property$Direction, + display?: Property$Display, + emptyCells?: Property$EmptyCells, + filter?: Property$Filter, + flexBasis?: Property$FlexBasis<TLength>, + flexDirection?: Property$FlexDirection, + flexGrow?: Property$FlexGrow, + flexShrink?: Property$FlexShrink, + flexWrap?: Property$FlexWrap, + float?: Property$Float, + fontFamily?: Property$FontFamily, + fontFeatureSettings?: Property$FontFeatureSettings, + fontKerning?: Property$FontKerning, + fontLanguageOverride?: Property$FontLanguageOverride, + fontOpticalSizing?: Property$FontOpticalSizing, + fontPalette?: Property$FontPalette, + fontSize?: Property$FontSize<TLength>, + fontSizeAdjust?: Property$FontSizeAdjust, + fontSmooth?: Property$FontSmooth<TLength>, + fontStretch?: Property$FontStretch, + fontStyle?: Property$FontStyle, + fontSynthesis?: Property$FontSynthesis, + fontSynthesisPosition?: Property$FontSynthesisPosition, + fontSynthesisSmallCaps?: Property$FontSynthesisSmallCaps, + fontSynthesisStyle?: Property$FontSynthesisStyle, + fontSynthesisWeight?: Property$FontSynthesisWeight, + fontVariant?: Property$FontVariant, + fontVariantAlternates?: Property$FontVariantAlternates, + fontVariantCaps?: Property$FontVariantCaps, + fontVariantEastAsian?: Property$FontVariantEastAsian, + fontVariantEmoji?: Property$FontVariantEmoji, + fontVariantLigatures?: Property$FontVariantLigatures, + fontVariantNumeric?: Property$FontVariantNumeric, + fontVariantPosition?: Property$FontVariantPosition, + fontVariationSettings?: Property$FontVariationSettings, + fontWeight?: Property$FontWeight, + forcedColorAdjust?: Property$ForcedColorAdjust, + gridAutoColumns?: Property$GridAutoColumns<TLength>, + gridAutoFlow?: Property$GridAutoFlow, + gridAutoRows?: Property$GridAutoRows<TLength>, + gridColumnEnd?: Property$GridColumnEnd, + gridColumnStart?: Property$GridColumnStart, + gridRowEnd?: Property$GridRowEnd, + gridRowStart?: Property$GridRowStart, + gridTemplateAreas?: Property$GridTemplateAreas, + gridTemplateColumns?: Property$GridTemplateColumns<TLength>, + gridTemplateRows?: Property$GridTemplateRows<TLength>, + hangingPunctuation?: Property$HangingPunctuation, + height?: Property$Height<TLength>, + hyphenateCharacter?: Property$HyphenateCharacter, + hyphenateLimitChars?: Property$HyphenateLimitChars, + hyphens?: Property$Hyphens, + imageOrientation?: Property$ImageOrientation, + imageRendering?: Property$ImageRendering, + imageResolution?: Property$ImageResolution, + initialLetter?: Property$InitialLetter, + inlineSize?: Property$InlineSize<TLength>, + inputSecurity?: Property$InputSecurity, + insetBlockEnd?: Property$InsetBlockEnd<TLength>, + insetBlockStart?: Property$InsetBlockStart<TLength>, + insetInlineEnd?: Property$InsetInlineEnd<TLength>, + insetInlineStart?: Property$InsetInlineStart<TLength>, + isolation?: Property$Isolation, + justifyContent?: Property$JustifyContent, + justifyItems?: Property$JustifyItems, + justifySelf?: Property$JustifySelf, + justifyTracks?: Property$JustifyTracks, + left?: Property$Left<TLength>, + letterSpacing?: Property$LetterSpacing<TLength>, + lineBreak?: Property$LineBreak, + lineHeight?: Property$LineHeight<TLength>, + lineHeightStep?: Property$LineHeightStep<TLength>, + listStyleImage?: Property$ListStyleImage, + listStylePosition?: Property$ListStylePosition, + listStyleType?: Property$ListStyleType, + marginBlockEnd?: Property$MarginBlockEnd<TLength>, + marginBlockStart?: Property$MarginBlockStart<TLength>, + marginBottom?: Property$MarginBottom<TLength>, + marginInlineEnd?: Property$MarginInlineEnd<TLength>, + marginInlineStart?: Property$MarginInlineStart<TLength>, + marginLeft?: Property$MarginLeft<TLength>, + marginRight?: Property$MarginRight<TLength>, + marginTop?: Property$MarginTop<TLength>, + marginTrim?: Property$MarginTrim, + maskBorderMode?: Property$MaskBorderMode, + maskBorderOutset?: Property$MaskBorderOutset<TLength>, + maskBorderRepeat?: Property$MaskBorderRepeat, + maskBorderSlice?: Property$MaskBorderSlice, + maskBorderSource?: Property$MaskBorderSource, + maskBorderWidth?: Property$MaskBorderWidth<TLength>, + maskClip?: Property$MaskClip, + maskComposite?: Property$MaskComposite, + maskImage?: Property$MaskImage, + maskMode?: Property$MaskMode, + maskOrigin?: Property$MaskOrigin, + maskPosition?: Property$MaskPosition<TLength>, + maskRepeat?: Property$MaskRepeat, + maskSize?: Property$MaskSize<TLength>, + maskType?: Property$MaskType, + masonryAutoFlow?: Property$MasonryAutoFlow, + mathDepth?: Property$MathDepth, + mathShift?: Property$MathShift, + mathStyle?: Property$MathStyle, + maxBlockSize?: Property$MaxBlockSize<TLength>, + maxHeight?: Property$MaxHeight<TLength>, + maxInlineSize?: Property$MaxInlineSize<TLength>, + maxLines?: Property$MaxLines, + maxWidth?: Property$MaxWidth<TLength>, + minBlockSize?: Property$MinBlockSize<TLength>, + minHeight?: Property$MinHeight<TLength>, + minInlineSize?: Property$MinInlineSize<TLength>, + minWidth?: Property$MinWidth<TLength>, + mixBlendMode?: Property$MixBlendMode, + motionDistance?: Property$OffsetDistance<TLength>, + motionPath?: Property$OffsetPath, + motionRotation?: Property$OffsetRotate, + objectFit?: Property$ObjectFit, + objectPosition?: Property$ObjectPosition<TLength>, + offsetAnchor?: Property$OffsetAnchor<TLength>, + offsetDistance?: Property$OffsetDistance<TLength>, + offsetPath?: Property$OffsetPath, + offsetPosition?: Property$OffsetPosition<TLength>, + offsetRotate?: Property$OffsetRotate, + offsetRotation?: Property$OffsetRotate, + opacity?: Property$Opacity, + order?: Property$Order, + orphans?: Property$Orphans, + outlineColor?: Property$OutlineColor, + outlineOffset?: Property$OutlineOffset<TLength>, + outlineStyle?: Property$OutlineStyle, + outlineWidth?: Property$OutlineWidth<TLength>, + overflowAnchor?: Property$OverflowAnchor, + overflowBlock?: Property$OverflowBlock, + overflowClipBox?: Property$OverflowClipBox, + overflowClipMargin?: Property$OverflowClipMargin<TLength>, + overflowInline?: Property$OverflowInline, + overflowWrap?: Property$OverflowWrap, + overflowX?: Property$OverflowX, + overflowY?: Property$OverflowY, + overlay?: Property$Overlay, + overscrollBehaviorBlock?: Property$OverscrollBehaviorBlock, + overscrollBehaviorInline?: Property$OverscrollBehaviorInline, + overscrollBehaviorX?: Property$OverscrollBehaviorX, + overscrollBehaviorY?: Property$OverscrollBehaviorY, + paddingBlockEnd?: Property$PaddingBlockEnd<TLength>, + paddingBlockStart?: Property$PaddingBlockStart<TLength>, + paddingBottom?: Property$PaddingBottom<TLength>, + paddingInlineEnd?: Property$PaddingInlineEnd<TLength>, + paddingInlineStart?: Property$PaddingInlineStart<TLength>, + paddingLeft?: Property$PaddingLeft<TLength>, + paddingRight?: Property$PaddingRight<TLength>, + paddingTop?: Property$PaddingTop<TLength>, + page?: Property$Page, + pageBreakAfter?: Property$PageBreakAfter, + pageBreakBefore?: Property$PageBreakBefore, + pageBreakInside?: Property$PageBreakInside, + paintOrder?: Property$PaintOrder, + perspective?: Property$Perspective<TLength>, + perspectiveOrigin?: Property$PerspectiveOrigin<TLength>, + pointerEvents?: Property$PointerEvents, + position?: Property$Position, + printColorAdjust?: Property$PrintColorAdjust, + quotes?: Property$Quotes, + resize?: Property$Resize, + right?: Property$Right<TLength>, + rotate?: Property$Rotate, + rowGap?: Property$RowGap<TLength>, + rubyAlign?: Property$RubyAlign, + rubyMerge?: Property$RubyMerge, + rubyPosition?: Property$RubyPosition, + scale?: Property$Scale, + scrollBehavior?: Property$ScrollBehavior, + scrollMarginBlockEnd?: Property$ScrollMarginBlockEnd<TLength>, + scrollMarginBlockStart?: Property$ScrollMarginBlockStart<TLength>, + scrollMarginBottom?: Property$ScrollMarginBottom<TLength>, + scrollMarginInlineEnd?: Property$ScrollMarginInlineEnd<TLength>, + scrollMarginInlineStart?: Property$ScrollMarginInlineStart<TLength>, + scrollMarginLeft?: Property$ScrollMarginLeft<TLength>, + scrollMarginRight?: Property$ScrollMarginRight<TLength>, + scrollMarginTop?: Property$ScrollMarginTop<TLength>, + scrollPaddingBlockEnd?: Property$ScrollPaddingBlockEnd<TLength>, + scrollPaddingBlockStart?: Property$ScrollPaddingBlockStart<TLength>, + scrollPaddingBottom?: Property$ScrollPaddingBottom<TLength>, + scrollPaddingInlineEnd?: Property$ScrollPaddingInlineEnd<TLength>, + scrollPaddingInlineStart?: Property$ScrollPaddingInlineStart<TLength>, + scrollPaddingLeft?: Property$ScrollPaddingLeft<TLength>, + scrollPaddingRight?: Property$ScrollPaddingRight<TLength>, + scrollPaddingTop?: Property$ScrollPaddingTop<TLength>, + scrollSnapAlign?: Property$ScrollSnapAlign, + scrollSnapMarginBottom?: Property$ScrollMarginBottom<TLength>, + scrollSnapMarginLeft?: Property$ScrollMarginLeft<TLength>, + scrollSnapMarginRight?: Property$ScrollMarginRight<TLength>, + scrollSnapMarginTop?: Property$ScrollMarginTop<TLength>, + scrollSnapStop?: Property$ScrollSnapStop, + scrollSnapType?: Property$ScrollSnapType, + scrollTimelineAxis?: Property$ScrollTimelineAxis, + scrollTimelineName?: Property$ScrollTimelineName, + scrollbarColor?: Property$ScrollbarColor, + scrollbarGutter?: Property$ScrollbarGutter, + scrollbarWidth?: Property$ScrollbarWidth, + shapeImageThreshold?: Property$ShapeImageThreshold, + shapeMargin?: Property$ShapeMargin<TLength>, + shapeOutside?: Property$ShapeOutside, + tabSize?: Property$TabSize<TLength>, + tableLayout?: Property$TableLayout, + textAlign?: Property$TextAlign, + textAlignLast?: Property$TextAlignLast, + textCombineUpright?: Property$TextCombineUpright, + textDecorationColor?: Property$TextDecorationColor, + textDecorationLine?: Property$TextDecorationLine, + textDecorationSkip?: Property$TextDecorationSkip, + textDecorationSkipInk?: Property$TextDecorationSkipInk, + textDecorationStyle?: Property$TextDecorationStyle, + textDecorationThickness?: Property$TextDecorationThickness<TLength>, + textEmphasisColor?: Property$TextEmphasisColor, + textEmphasisPosition?: Property$TextEmphasisPosition, + textEmphasisStyle?: Property$TextEmphasisStyle, + textIndent?: Property$TextIndent<TLength>, + textJustify?: Property$TextJustify, + textOrientation?: Property$TextOrientation, + textOverflow?: Property$TextOverflow, + textRendering?: Property$TextRendering, + textShadow?: Property$TextShadow, + textSizeAdjust?: Property$TextSizeAdjust, + textTransform?: Property$TextTransform, + textUnderlineOffset?: Property$TextUnderlineOffset<TLength>, + textUnderlinePosition?: Property$TextUnderlinePosition, + textWrap?: Property$TextWrap, + timelineScope?: Property$TimelineScope, + top?: Property$Top<TLength>, + touchAction?: Property$TouchAction, + transform?: Property$Transform, + transformBox?: Property$TransformBox, + transformOrigin?: Property$TransformOrigin<TLength>, + transformStyle?: Property$TransformStyle, + transitionBehavior?: Property$TransitionBehavior, + transitionDelay?: Property$TransitionDelay<TTime>, + transitionDuration?: Property$TransitionDuration<TTime>, + transitionProperty?: Property$TransitionProperty, + transitionTimingFunction?: Property$TransitionTimingFunction, + translate?: Property$Translate<TLength>, + unicodeBidi?: Property$UnicodeBidi, + userSelect?: Property$UserSelect, + verticalAlign?: Property$VerticalAlign<TLength>, + viewTimelineAxis?: Property$ViewTimelineAxis, + viewTimelineInset?: Property$ViewTimelineInset<TLength>, + viewTimelineName?: Property$ViewTimelineName, + viewTransitionName?: Property$ViewTransitionName, + visibility?: Property$Visibility, + whiteSpace?: Property$WhiteSpace, + whiteSpaceCollapse?: Property$WhiteSpaceCollapse, + whiteSpaceTrim?: Property$WhiteSpaceTrim, + widows?: Property$Widows, + width?: Property$Width<TLength>, + willChange?: Property$WillChange, + wordBreak?: Property$WordBreak, + wordSpacing?: Property$WordSpacing<TLength>, + wordWrap?: Property$WordWrap, + writingMode?: Property$WritingMode, + zIndex?: Property$ZIndex, + zoom?: Property$Zoom, +|}; + +export type StandardShorthandProperties<TLength = string | 0, TTime = string> = {| + all?: Property$All, + animation?: Property$Animation<TTime>, + animationRange?: Property$AnimationRange<TLength>, + background?: Property$Background<TLength>, + backgroundPosition?: Property$BackgroundPosition<TLength>, + border?: Property$Border<TLength>, + borderBlock?: Property$BorderBlock<TLength>, + borderBlockEnd?: Property$BorderBlockEnd<TLength>, + borderBlockStart?: Property$BorderBlockStart<TLength>, + borderBottom?: Property$BorderBottom<TLength>, + borderColor?: Property$BorderColor, + borderImage?: Property$BorderImage, + borderInline?: Property$BorderInline<TLength>, + borderInlineEnd?: Property$BorderInlineEnd<TLength>, + borderInlineStart?: Property$BorderInlineStart<TLength>, + borderLeft?: Property$BorderLeft<TLength>, + borderRadius?: Property$BorderRadius<TLength>, + borderRight?: Property$BorderRight<TLength>, + borderStyle?: Property$BorderStyle, + borderTop?: Property$BorderTop<TLength>, + borderWidth?: Property$BorderWidth<TLength>, + caret?: Property$Caret, + columnRule?: Property$ColumnRule<TLength>, + columns?: Property$Columns<TLength>, + containIntrinsicSize?: Property$ContainIntrinsicSize<TLength>, + container?: Property$Container, + flex?: Property$Flex<TLength>, + flexFlow?: Property$FlexFlow, + font?: Property$Font, + gap?: Property$Gap<TLength>, + grid?: Property$Grid, + gridArea?: Property$GridArea, + gridColumn?: Property$GridColumn, + gridRow?: Property$GridRow, + gridTemplate?: Property$GridTemplate, + inset?: Property$Inset<TLength>, + insetBlock?: Property$InsetBlock<TLength>, + insetInline?: Property$InsetInline<TLength>, + lineClamp?: Property$LineClamp, + listStyle?: Property$ListStyle, + margin?: Property$Margin<TLength>, + marginBlock?: Property$MarginBlock<TLength>, + marginInline?: Property$MarginInline<TLength>, + mask?: Property$Mask<TLength>, + maskBorder?: Property$MaskBorder, + motion?: Property$Offset<TLength>, + offset?: Property$Offset<TLength>, + outline?: Property$Outline<TLength>, + overflow?: Property$Overflow, + overscrollBehavior?: Property$OverscrollBehavior, + padding?: Property$Padding<TLength>, + paddingBlock?: Property$PaddingBlock<TLength>, + paddingInline?: Property$PaddingInline<TLength>, + placeContent?: Property$PlaceContent, + placeItems?: Property$PlaceItems, + placeSelf?: Property$PlaceSelf, + scrollMargin?: Property$ScrollMargin<TLength>, + scrollMarginBlock?: Property$ScrollMarginBlock<TLength>, + scrollMarginInline?: Property$ScrollMarginInline<TLength>, + scrollPadding?: Property$ScrollPadding<TLength>, + scrollPaddingBlock?: Property$ScrollPaddingBlock<TLength>, + scrollPaddingInline?: Property$ScrollPaddingInline<TLength>, + scrollSnapMargin?: Property$ScrollMargin<TLength>, + scrollTimeline?: Property$ScrollTimeline, + textDecoration?: Property$TextDecoration<TLength>, + textEmphasis?: Property$TextEmphasis, + transition?: Property$Transition<TTime>, + viewTimeline?: Property$ViewTimeline, +|}; + +export type StandardProperties<TLength = string | 0, TTime = string> = {| ...StandardLonghandProperties<TLength, TTime>, ...StandardShorthandProperties<TLength, TTime> |}; + +export type VendorLonghandProperties<TLength = string | 0, TTime = string> = {| + MozAnimationDelay?: Property$AnimationDelay<TTime>, + MozAnimationDirection?: Property$AnimationDirection, + MozAnimationDuration?: Property$AnimationDuration<TTime>, + MozAnimationFillMode?: Property$AnimationFillMode, + MozAnimationIterationCount?: Property$AnimationIterationCount, + MozAnimationName?: Property$AnimationName, + MozAnimationPlayState?: Property$AnimationPlayState, + MozAnimationTimingFunction?: Property$AnimationTimingFunction, + MozAppearance?: Property$MozAppearance, + MozBinding?: Property$MozBinding, + MozBorderBottomColors?: Property$MozBorderBottomColors, + MozBorderEndColor?: Property$BorderInlineEndColor, + MozBorderEndStyle?: Property$BorderInlineEndStyle, + MozBorderEndWidth?: Property$BorderInlineEndWidth<TLength>, + MozBorderLeftColors?: Property$MozBorderLeftColors, + MozBorderRightColors?: Property$MozBorderRightColors, + MozBorderStartColor?: Property$BorderInlineStartColor, + MozBorderStartStyle?: Property$BorderInlineStartStyle, + MozBorderTopColors?: Property$MozBorderTopColors, + MozBoxSizing?: Property$BoxSizing, + MozColumnCount?: Property$ColumnCount, + MozColumnFill?: Property$ColumnFill, + MozColumnRuleColor?: Property$ColumnRuleColor, + MozColumnRuleStyle?: Property$ColumnRuleStyle, + MozColumnRuleWidth?: Property$ColumnRuleWidth<TLength>, + MozColumnWidth?: Property$ColumnWidth<TLength>, + MozContextProperties?: Property$MozContextProperties, + MozFontFeatureSettings?: Property$FontFeatureSettings, + MozFontLanguageOverride?: Property$FontLanguageOverride, + MozHyphens?: Property$Hyphens, + MozImageRegion?: Property$MozImageRegion, + MozMarginEnd?: Property$MarginInlineEnd<TLength>, + MozMarginStart?: Property$MarginInlineStart<TLength>, + MozOrient?: Property$MozOrient, + MozOsxFontSmoothing?: Property$FontSmooth<TLength>, + MozOutlineRadiusBottomleft?: Property$MozOutlineRadiusBottomleft<TLength>, + MozOutlineRadiusBottomright?: Property$MozOutlineRadiusBottomright<TLength>, + MozOutlineRadiusTopleft?: Property$MozOutlineRadiusTopleft<TLength>, + MozOutlineRadiusTopright?: Property$MozOutlineRadiusTopright<TLength>, + MozPaddingEnd?: Property$PaddingInlineEnd<TLength>, + MozPaddingStart?: Property$PaddingInlineStart<TLength>, + MozStackSizing?: Property$MozStackSizing, + MozTabSize?: Property$TabSize<TLength>, + MozTextBlink?: Property$MozTextBlink, + MozTextSizeAdjust?: Property$TextSizeAdjust, + MozUserFocus?: Property$MozUserFocus, + MozUserModify?: Property$MozUserModify, + MozUserSelect?: Property$UserSelect, + MozWindowDragging?: Property$MozWindowDragging, + MozWindowShadow?: Property$MozWindowShadow, + msAccelerator?: Property$MsAccelerator, + msBlockProgression?: Property$MsBlockProgression, + msContentZoomChaining?: Property$MsContentZoomChaining, + msContentZoomLimitMax?: Property$MsContentZoomLimitMax, + msContentZoomLimitMin?: Property$MsContentZoomLimitMin, + msContentZoomSnapPoints?: Property$MsContentZoomSnapPoints, + msContentZoomSnapType?: Property$MsContentZoomSnapType, + msContentZooming?: Property$MsContentZooming, + msFilter?: Property$MsFilter, + msFlexDirection?: Property$FlexDirection, + msFlexPositive?: Property$FlexGrow, + msFlowFrom?: Property$MsFlowFrom, + msFlowInto?: Property$MsFlowInto, + msGridColumns?: Property$MsGridColumns<TLength>, + msGridRows?: Property$MsGridRows<TLength>, + msHighContrastAdjust?: Property$MsHighContrastAdjust, + msHyphenateLimitChars?: Property$MsHyphenateLimitChars, + msHyphenateLimitLines?: Property$MsHyphenateLimitLines, + msHyphenateLimitZone?: Property$MsHyphenateLimitZone<TLength>, + msHyphens?: Property$Hyphens, + msImeAlign?: Property$MsImeAlign, + msLineBreak?: Property$LineBreak, + msOrder?: Property$Order, + msOverflowStyle?: Property$MsOverflowStyle, + msOverflowX?: Property$OverflowX, + msOverflowY?: Property$OverflowY, + msScrollChaining?: Property$MsScrollChaining, + msScrollLimitXMax?: Property$MsScrollLimitXMax<TLength>, + msScrollLimitXMin?: Property$MsScrollLimitXMin<TLength>, + msScrollLimitYMax?: Property$MsScrollLimitYMax<TLength>, + msScrollLimitYMin?: Property$MsScrollLimitYMin<TLength>, + msScrollRails?: Property$MsScrollRails, + msScrollSnapPointsX?: Property$MsScrollSnapPointsX, + msScrollSnapPointsY?: Property$MsScrollSnapPointsY, + msScrollSnapType?: Property$MsScrollSnapType, + msScrollTranslation?: Property$MsScrollTranslation, + msScrollbar3dlightColor?: Property$MsScrollbar3dlightColor, + msScrollbarArrowColor?: Property$MsScrollbarArrowColor, + msScrollbarBaseColor?: Property$MsScrollbarBaseColor, + msScrollbarDarkshadowColor?: Property$MsScrollbarDarkshadowColor, + msScrollbarFaceColor?: Property$MsScrollbarFaceColor, + msScrollbarHighlightColor?: Property$MsScrollbarHighlightColor, + msScrollbarShadowColor?: Property$MsScrollbarShadowColor, + msScrollbarTrackColor?: Property$MsScrollbarTrackColor, + msTextAutospace?: Property$MsTextAutospace, + msTextCombineHorizontal?: Property$TextCombineUpright, + msTextOverflow?: Property$TextOverflow, + msTouchAction?: Property$TouchAction, + msTouchSelect?: Property$MsTouchSelect, + msTransform?: Property$Transform, + msTransformOrigin?: Property$TransformOrigin<TLength>, + msTransitionDelay?: Property$TransitionDelay<TTime>, + msTransitionDuration?: Property$TransitionDuration<TTime>, + msTransitionProperty?: Property$TransitionProperty, + msTransitionTimingFunction?: Property$TransitionTimingFunction, + msUserSelect?: Property$MsUserSelect, + msWordBreak?: Property$WordBreak, + msWrapFlow?: Property$MsWrapFlow, + msWrapMargin?: Property$MsWrapMargin<TLength>, + msWrapThrough?: Property$MsWrapThrough, + msWritingMode?: Property$WritingMode, + WebkitAlignContent?: Property$AlignContent, + WebkitAlignItems?: Property$AlignItems, + WebkitAlignSelf?: Property$AlignSelf, + WebkitAnimationDelay?: Property$AnimationDelay<TTime>, + WebkitAnimationDirection?: Property$AnimationDirection, + WebkitAnimationDuration?: Property$AnimationDuration<TTime>, + WebkitAnimationFillMode?: Property$AnimationFillMode, + WebkitAnimationIterationCount?: Property$AnimationIterationCount, + WebkitAnimationName?: Property$AnimationName, + WebkitAnimationPlayState?: Property$AnimationPlayState, + WebkitAnimationTimingFunction?: Property$AnimationTimingFunction, + WebkitAppearance?: Property$WebkitAppearance, + WebkitBackdropFilter?: Property$BackdropFilter, + WebkitBackfaceVisibility?: Property$BackfaceVisibility, + WebkitBackgroundClip?: Property$BackgroundClip, + WebkitBackgroundOrigin?: Property$BackgroundOrigin, + WebkitBackgroundSize?: Property$BackgroundSize<TLength>, + WebkitBorderBeforeColor?: Property$WebkitBorderBeforeColor, + WebkitBorderBeforeStyle?: Property$WebkitBorderBeforeStyle, + WebkitBorderBeforeWidth?: Property$WebkitBorderBeforeWidth<TLength>, + WebkitBorderBottomLeftRadius?: Property$BorderBottomLeftRadius<TLength>, + WebkitBorderBottomRightRadius?: Property$BorderBottomRightRadius<TLength>, + WebkitBorderImageSlice?: Property$BorderImageSlice, + WebkitBorderTopLeftRadius?: Property$BorderTopLeftRadius<TLength>, + WebkitBorderTopRightRadius?: Property$BorderTopRightRadius<TLength>, + WebkitBoxDecorationBreak?: Property$BoxDecorationBreak, + WebkitBoxReflect?: Property$WebkitBoxReflect<TLength>, + WebkitBoxShadow?: Property$BoxShadow, + WebkitBoxSizing?: Property$BoxSizing, + WebkitClipPath?: Property$ClipPath, + WebkitColumnCount?: Property$ColumnCount, + WebkitColumnFill?: Property$ColumnFill, + WebkitColumnRuleColor?: Property$ColumnRuleColor, + WebkitColumnRuleStyle?: Property$ColumnRuleStyle, + WebkitColumnRuleWidth?: Property$ColumnRuleWidth<TLength>, + WebkitColumnSpan?: Property$ColumnSpan, + WebkitColumnWidth?: Property$ColumnWidth<TLength>, + WebkitFilter?: Property$Filter, + WebkitFlexBasis?: Property$FlexBasis<TLength>, + WebkitFlexDirection?: Property$FlexDirection, + WebkitFlexGrow?: Property$FlexGrow, + WebkitFlexShrink?: Property$FlexShrink, + WebkitFlexWrap?: Property$FlexWrap, + WebkitFontFeatureSettings?: Property$FontFeatureSettings, + WebkitFontKerning?: Property$FontKerning, + WebkitFontSmoothing?: Property$FontSmooth<TLength>, + WebkitFontVariantLigatures?: Property$FontVariantLigatures, + WebkitHyphenateCharacter?: Property$HyphenateCharacter, + WebkitHyphens?: Property$Hyphens, + WebkitInitialLetter?: Property$InitialLetter, + WebkitJustifyContent?: Property$JustifyContent, + WebkitLineBreak?: Property$LineBreak, + WebkitLineClamp?: Property$WebkitLineClamp, + WebkitMarginEnd?: Property$MarginInlineEnd<TLength>, + WebkitMarginStart?: Property$MarginInlineStart<TLength>, + WebkitMaskAttachment?: Property$WebkitMaskAttachment, + WebkitMaskBoxImageOutset?: Property$MaskBorderOutset<TLength>, + WebkitMaskBoxImageRepeat?: Property$MaskBorderRepeat, + WebkitMaskBoxImageSlice?: Property$MaskBorderSlice, + WebkitMaskBoxImageSource?: Property$MaskBorderSource, + WebkitMaskBoxImageWidth?: Property$MaskBorderWidth<TLength>, + WebkitMaskClip?: Property$WebkitMaskClip, + WebkitMaskComposite?: Property$WebkitMaskComposite, + WebkitMaskImage?: Property$WebkitMaskImage, + WebkitMaskOrigin?: Property$WebkitMaskOrigin, + WebkitMaskPosition?: Property$WebkitMaskPosition<TLength>, + WebkitMaskPositionX?: Property$WebkitMaskPositionX<TLength>, + WebkitMaskPositionY?: Property$WebkitMaskPositionY<TLength>, + WebkitMaskRepeat?: Property$WebkitMaskRepeat, + WebkitMaskRepeatX?: Property$WebkitMaskRepeatX, + WebkitMaskRepeatY?: Property$WebkitMaskRepeatY, + WebkitMaskSize?: Property$WebkitMaskSize<TLength>, + WebkitMaxInlineSize?: Property$MaxInlineSize<TLength>, + WebkitOrder?: Property$Order, + WebkitOverflowScrolling?: Property$WebkitOverflowScrolling, + WebkitPaddingEnd?: Property$PaddingInlineEnd<TLength>, + WebkitPaddingStart?: Property$PaddingInlineStart<TLength>, + WebkitPerspective?: Property$Perspective<TLength>, + WebkitPerspectiveOrigin?: Property$PerspectiveOrigin<TLength>, + WebkitPrintColorAdjust?: Property$PrintColorAdjust, + WebkitRubyPosition?: Property$RubyPosition, + WebkitScrollSnapType?: Property$ScrollSnapType, + WebkitShapeMargin?: Property$ShapeMargin<TLength>, + WebkitTapHighlightColor?: Property$WebkitTapHighlightColor, + WebkitTextCombine?: Property$TextCombineUpright, + WebkitTextDecorationColor?: Property$TextDecorationColor, + WebkitTextDecorationLine?: Property$TextDecorationLine, + WebkitTextDecorationSkip?: Property$TextDecorationSkip, + WebkitTextDecorationStyle?: Property$TextDecorationStyle, + WebkitTextEmphasisColor?: Property$TextEmphasisColor, + WebkitTextEmphasisPosition?: Property$TextEmphasisPosition, + WebkitTextEmphasisStyle?: Property$TextEmphasisStyle, + WebkitTextFillColor?: Property$WebkitTextFillColor, + WebkitTextOrientation?: Property$TextOrientation, + WebkitTextSizeAdjust?: Property$TextSizeAdjust, + WebkitTextStrokeColor?: Property$WebkitTextStrokeColor, + WebkitTextStrokeWidth?: Property$WebkitTextStrokeWidth<TLength>, + WebkitTextUnderlinePosition?: Property$TextUnderlinePosition, + WebkitTouchCallout?: Property$WebkitTouchCallout, + WebkitTransform?: Property$Transform, + WebkitTransformOrigin?: Property$TransformOrigin<TLength>, + WebkitTransformStyle?: Property$TransformStyle, + WebkitTransitionDelay?: Property$TransitionDelay<TTime>, + WebkitTransitionDuration?: Property$TransitionDuration<TTime>, + WebkitTransitionProperty?: Property$TransitionProperty, + WebkitTransitionTimingFunction?: Property$TransitionTimingFunction, + WebkitUserModify?: Property$WebkitUserModify, + WebkitUserSelect?: Property$UserSelect, + WebkitWritingMode?: Property$WritingMode, +|}; + +export type VendorShorthandProperties<TLength = string | 0, TTime = string> = {| + MozAnimation?: Property$Animation<TTime>, + MozBorderImage?: Property$BorderImage, + MozColumnRule?: Property$ColumnRule<TLength>, + MozColumns?: Property$Columns<TLength>, + MozOutlineRadius?: Property$MozOutlineRadius<TLength>, + msContentZoomLimit?: Property$MsContentZoomLimit, + msContentZoomSnap?: Property$MsContentZoomSnap, + msFlex?: Property$Flex<TLength>, + msScrollLimit?: Property$MsScrollLimit, + msScrollSnapX?: Property$MsScrollSnapX, + msScrollSnapY?: Property$MsScrollSnapY, + msTransition?: Property$Transition<TTime>, + WebkitAnimation?: Property$Animation<TTime>, + WebkitBorderBefore?: Property$WebkitBorderBefore<TLength>, + WebkitBorderImage?: Property$BorderImage, + WebkitBorderRadius?: Property$BorderRadius<TLength>, + WebkitColumnRule?: Property$ColumnRule<TLength>, + WebkitColumns?: Property$Columns<TLength>, + WebkitFlex?: Property$Flex<TLength>, + WebkitFlexFlow?: Property$FlexFlow, + WebkitMask?: Property$WebkitMask<TLength>, + WebkitMaskBoxImage?: Property$MaskBorder, + WebkitTextEmphasis?: Property$TextEmphasis, + WebkitTextStroke?: Property$WebkitTextStroke<TLength>, + WebkitTransition?: Property$Transition<TTime>, +|}; + +export type VendorProperties<TLength = string | 0, TTime = string> = {| ...VendorLonghandProperties<TLength, TTime>, ...VendorShorthandProperties<TLength, TTime> |}; + +export type ObsoleteProperties<TLength = string | 0, TTime = string> = {| + azimuth?: Property$Azimuth, + boxAlign?: Property$BoxAlign, + boxDirection?: Property$BoxDirection, + boxFlex?: Property$BoxFlex, + boxFlexGroup?: Property$BoxFlexGroup, + boxLines?: Property$BoxLines, + boxOrdinalGroup?: Property$BoxOrdinalGroup, + boxOrient?: Property$BoxOrient, + boxPack?: Property$BoxPack, + clip?: Property$Clip, + gridColumnGap?: Property$GridColumnGap<TLength>, + gridGap?: Property$GridGap<TLength>, + gridRowGap?: Property$GridRowGap<TLength>, + imeMode?: Property$ImeMode, + offsetBlock?: Property$InsetBlock<TLength>, + offsetBlockEnd?: Property$InsetBlockEnd<TLength>, + offsetBlockStart?: Property$InsetBlockStart<TLength>, + offsetInline?: Property$InsetInline<TLength>, + offsetInlineEnd?: Property$InsetInlineEnd<TLength>, + offsetInlineStart?: Property$InsetInlineStart<TLength>, + scrollSnapCoordinate?: Property$ScrollSnapCoordinate<TLength>, + scrollSnapDestination?: Property$ScrollSnapDestination<TLength>, + scrollSnapPointsX?: Property$ScrollSnapPointsX, + scrollSnapPointsY?: Property$ScrollSnapPointsY, + scrollSnapTypeX?: Property$ScrollSnapTypeX, + scrollSnapTypeY?: Property$ScrollSnapTypeY, + KhtmlBoxAlign?: Property$BoxAlign, + KhtmlBoxDirection?: Property$BoxDirection, + KhtmlBoxFlex?: Property$BoxFlex, + KhtmlBoxFlexGroup?: Property$BoxFlexGroup, + KhtmlBoxLines?: Property$BoxLines, + KhtmlBoxOrdinalGroup?: Property$BoxOrdinalGroup, + KhtmlBoxOrient?: Property$BoxOrient, + KhtmlBoxPack?: Property$BoxPack, + KhtmlLineBreak?: Property$LineBreak, + KhtmlOpacity?: Property$Opacity, + KhtmlUserSelect?: Property$UserSelect, + MozBackfaceVisibility?: Property$BackfaceVisibility, + MozBackgroundClip?: Property$BackgroundClip, + MozBackgroundInlinePolicy?: Property$BoxDecorationBreak, + MozBackgroundOrigin?: Property$BackgroundOrigin, + MozBackgroundSize?: Property$BackgroundSize<TLength>, + MozBorderRadius?: Property$BorderRadius<TLength>, + MozBorderRadiusBottomleft?: Property$BorderBottomLeftRadius<TLength>, + MozBorderRadiusBottomright?: Property$BorderBottomRightRadius<TLength>, + MozBorderRadiusTopleft?: Property$BorderTopLeftRadius<TLength>, + MozBorderRadiusTopright?: Property$BorderTopRightRadius<TLength>, + MozBoxAlign?: Property$BoxAlign, + MozBoxDirection?: Property$BoxDirection, + MozBoxFlex?: Property$BoxFlex, + MozBoxOrdinalGroup?: Property$BoxOrdinalGroup, + MozBoxOrient?: Property$BoxOrient, + MozBoxPack?: Property$BoxPack, + MozBoxShadow?: Property$BoxShadow, + MozFloatEdge?: Property$MozFloatEdge, + MozForceBrokenImageIcon?: Property$MozForceBrokenImageIcon, + MozOpacity?: Property$Opacity, + MozOutline?: Property$Outline<TLength>, + MozOutlineColor?: Property$OutlineColor, + MozOutlineStyle?: Property$OutlineStyle, + MozOutlineWidth?: Property$OutlineWidth<TLength>, + MozPerspective?: Property$Perspective<TLength>, + MozPerspectiveOrigin?: Property$PerspectiveOrigin<TLength>, + MozTextAlignLast?: Property$TextAlignLast, + MozTextDecorationColor?: Property$TextDecorationColor, + MozTextDecorationLine?: Property$TextDecorationLine, + MozTextDecorationStyle?: Property$TextDecorationStyle, + MozTransform?: Property$Transform, + MozTransformOrigin?: Property$TransformOrigin<TLength>, + MozTransformStyle?: Property$TransformStyle, + MozTransition?: Property$Transition<TTime>, + MozTransitionDelay?: Property$TransitionDelay<TTime>, + MozTransitionDuration?: Property$TransitionDuration<TTime>, + MozTransitionProperty?: Property$TransitionProperty, + MozTransitionTimingFunction?: Property$TransitionTimingFunction, + MozUserInput?: Property$MozUserInput, + msImeMode?: Property$ImeMode, + OAnimation?: Property$Animation<TTime>, + OAnimationDelay?: Property$AnimationDelay<TTime>, + OAnimationDirection?: Property$AnimationDirection, + OAnimationDuration?: Property$AnimationDuration<TTime>, + OAnimationFillMode?: Property$AnimationFillMode, + OAnimationIterationCount?: Property$AnimationIterationCount, + OAnimationName?: Property$AnimationName, + OAnimationPlayState?: Property$AnimationPlayState, + OAnimationTimingFunction?: Property$AnimationTimingFunction, + OBackgroundSize?: Property$BackgroundSize<TLength>, + OBorderImage?: Property$BorderImage, + OObjectFit?: Property$ObjectFit, + OObjectPosition?: Property$ObjectPosition<TLength>, + OTabSize?: Property$TabSize<TLength>, + OTextOverflow?: Property$TextOverflow, + OTransform?: Property$Transform, + OTransformOrigin?: Property$TransformOrigin<TLength>, + OTransition?: Property$Transition<TTime>, + OTransitionDelay?: Property$TransitionDelay<TTime>, + OTransitionDuration?: Property$TransitionDuration<TTime>, + OTransitionProperty?: Property$TransitionProperty, + OTransitionTimingFunction?: Property$TransitionTimingFunction, + WebkitBoxAlign?: Property$BoxAlign, + WebkitBoxDirection?: Property$BoxDirection, + WebkitBoxFlex?: Property$BoxFlex, + WebkitBoxFlexGroup?: Property$BoxFlexGroup, + WebkitBoxLines?: Property$BoxLines, + WebkitBoxOrdinalGroup?: Property$BoxOrdinalGroup, + WebkitBoxOrient?: Property$BoxOrient, + WebkitBoxPack?: Property$BoxPack, +|}; + +export type SvgProperties<TLength = string | 0, TTime = string> = {| + alignmentBaseline?: Property$AlignmentBaseline, + baselineShift?: Property$BaselineShift<TLength>, + clip?: Property$Clip, + clipPath?: Property$ClipPath, + clipRule?: Property$ClipRule, + color?: Property$Color, + colorInterpolation?: Property$ColorInterpolation, + colorRendering?: Property$ColorRendering, + cursor?: Property$Cursor, + direction?: Property$Direction, + display?: Property$Display, + dominantBaseline?: Property$DominantBaseline, + fill?: Property$Fill, + fillOpacity?: Property$FillOpacity, + fillRule?: Property$FillRule, + filter?: Property$Filter, + floodColor?: Property$FloodColor, + floodOpacity?: Property$FloodOpacity, + font?: Property$Font, + fontFamily?: Property$FontFamily, + fontSize?: Property$FontSize<TLength>, + fontSizeAdjust?: Property$FontSizeAdjust, + fontStretch?: Property$FontStretch, + fontStyle?: Property$FontStyle, + fontVariant?: Property$FontVariant, + fontWeight?: Property$FontWeight, + glyphOrientationVertical?: Property$GlyphOrientationVertical, + imageRendering?: Property$ImageRendering, + letterSpacing?: Property$LetterSpacing<TLength>, + lightingColor?: Property$LightingColor, + lineHeight?: Property$LineHeight<TLength>, + marker?: Property$Marker, + markerEnd?: Property$MarkerEnd, + markerMid?: Property$MarkerMid, + markerStart?: Property$MarkerStart, + mask?: Property$Mask<TLength>, + opacity?: Property$Opacity, + overflow?: Property$Overflow, + paintOrder?: Property$PaintOrder, + pointerEvents?: Property$PointerEvents, + shapeRendering?: Property$ShapeRendering, + stopColor?: Property$StopColor, + stopOpacity?: Property$StopOpacity, + stroke?: Property$Stroke, + strokeDasharray?: Property$StrokeDasharray<TLength>, + strokeDashoffset?: Property$StrokeDashoffset<TLength>, + strokeLinecap?: Property$StrokeLinecap, + strokeLinejoin?: Property$StrokeLinejoin, + strokeMiterlimit?: Property$StrokeMiterlimit, + strokeOpacity?: Property$StrokeOpacity, + strokeWidth?: Property$StrokeWidth<TLength>, + textAnchor?: Property$TextAnchor, + textDecoration?: Property$TextDecoration<TLength>, + textRendering?: Property$TextRendering, + unicodeBidi?: Property$UnicodeBidi, + vectorEffect?: Property$VectorEffect, + visibility?: Property$Visibility, + whiteSpace?: Property$WhiteSpace, + wordSpacing?: Property$WordSpacing<TLength>, + writingMode?: Property$WritingMode, +|}; + +export type Properties<TLength = string | 0, TTime = string> = {| + ...StandardProperties<TLength, TTime>, + ...VendorProperties<TLength, TTime>, + ...ObsoleteProperties<TLength, TTime>, + ...SvgProperties<TLength, TTime>, +|}; + +export type StandardLonghandPropertiesHyphen<TLength = string | 0, TTime = string> = {| + "accent-color"?: Property$AccentColor, + "align-content"?: Property$AlignContent, + "align-items"?: Property$AlignItems, + "align-self"?: Property$AlignSelf, + "align-tracks"?: Property$AlignTracks, + "animation-composition"?: Property$AnimationComposition, + "animation-delay"?: Property$AnimationDelay<TTime>, + "animation-direction"?: Property$AnimationDirection, + "animation-duration"?: Property$AnimationDuration<TTime>, + "animation-fill-mode"?: Property$AnimationFillMode, + "animation-iteration-count"?: Property$AnimationIterationCount, + "animation-name"?: Property$AnimationName, + "animation-play-state"?: Property$AnimationPlayState, + "animation-range-end"?: Property$AnimationRangeEnd<TLength>, + "animation-range-start"?: Property$AnimationRangeStart<TLength>, + "animation-timeline"?: Property$AnimationTimeline, + "animation-timing-function"?: Property$AnimationTimingFunction, + appearance?: Property$Appearance, + "aspect-ratio"?: Property$AspectRatio, + "backdrop-filter"?: Property$BackdropFilter, + "backface-visibility"?: Property$BackfaceVisibility, + "background-attachment"?: Property$BackgroundAttachment, + "background-blend-mode"?: Property$BackgroundBlendMode, + "background-clip"?: Property$BackgroundClip, + "background-color"?: Property$BackgroundColor, + "background-image"?: Property$BackgroundImage, + "background-origin"?: Property$BackgroundOrigin, + "background-position-x"?: Property$BackgroundPositionX<TLength>, + "background-position-y"?: Property$BackgroundPositionY<TLength>, + "background-repeat"?: Property$BackgroundRepeat, + "background-size"?: Property$BackgroundSize<TLength>, + "block-overflow"?: Property$BlockOverflow, + "block-size"?: Property$BlockSize<TLength>, + "border-block-color"?: Property$BorderBlockColor, + "border-block-end-color"?: Property$BorderBlockEndColor, + "border-block-end-style"?: Property$BorderBlockEndStyle, + "border-block-end-width"?: Property$BorderBlockEndWidth<TLength>, + "border-block-start-color"?: Property$BorderBlockStartColor, + "border-block-start-style"?: Property$BorderBlockStartStyle, + "border-block-start-width"?: Property$BorderBlockStartWidth<TLength>, + "border-block-style"?: Property$BorderBlockStyle, + "border-block-width"?: Property$BorderBlockWidth<TLength>, + "border-bottom-color"?: Property$BorderBottomColor, + "border-bottom-left-radius"?: Property$BorderBottomLeftRadius<TLength>, + "border-bottom-right-radius"?: Property$BorderBottomRightRadius<TLength>, + "border-bottom-style"?: Property$BorderBottomStyle, + "border-bottom-width"?: Property$BorderBottomWidth<TLength>, + "border-collapse"?: Property$BorderCollapse, + "border-end-end-radius"?: Property$BorderEndEndRadius<TLength>, + "border-end-start-radius"?: Property$BorderEndStartRadius<TLength>, + "border-image-outset"?: Property$BorderImageOutset<TLength>, + "border-image-repeat"?: Property$BorderImageRepeat, + "border-image-slice"?: Property$BorderImageSlice, + "border-image-source"?: Property$BorderImageSource, + "border-image-width"?: Property$BorderImageWidth<TLength>, + "border-inline-color"?: Property$BorderInlineColor, + "border-inline-end-color"?: Property$BorderInlineEndColor, + "border-inline-end-style"?: Property$BorderInlineEndStyle, + "border-inline-end-width"?: Property$BorderInlineEndWidth<TLength>, + "border-inline-start-color"?: Property$BorderInlineStartColor, + "border-inline-start-style"?: Property$BorderInlineStartStyle, + "border-inline-start-width"?: Property$BorderInlineStartWidth<TLength>, + "border-inline-style"?: Property$BorderInlineStyle, + "border-inline-width"?: Property$BorderInlineWidth<TLength>, + "border-left-color"?: Property$BorderLeftColor, + "border-left-style"?: Property$BorderLeftStyle, + "border-left-width"?: Property$BorderLeftWidth<TLength>, + "border-right-color"?: Property$BorderRightColor, + "border-right-style"?: Property$BorderRightStyle, + "border-right-width"?: Property$BorderRightWidth<TLength>, + "border-spacing"?: Property$BorderSpacing<TLength>, + "border-start-end-radius"?: Property$BorderStartEndRadius<TLength>, + "border-start-start-radius"?: Property$BorderStartStartRadius<TLength>, + "border-top-color"?: Property$BorderTopColor, + "border-top-left-radius"?: Property$BorderTopLeftRadius<TLength>, + "border-top-right-radius"?: Property$BorderTopRightRadius<TLength>, + "border-top-style"?: Property$BorderTopStyle, + "border-top-width"?: Property$BorderTopWidth<TLength>, + bottom?: Property$Bottom<TLength>, + "box-decoration-break"?: Property$BoxDecorationBreak, + "box-shadow"?: Property$BoxShadow, + "box-sizing"?: Property$BoxSizing, + "break-after"?: Property$BreakAfter, + "break-before"?: Property$BreakBefore, + "break-inside"?: Property$BreakInside, + "caption-side"?: Property$CaptionSide, + "caret-color"?: Property$CaretColor, + "caret-shape"?: Property$CaretShape, + clear?: Property$Clear, + "clip-path"?: Property$ClipPath, + color?: Property$Color, + "color-adjust"?: Property$PrintColorAdjust, + "color-scheme"?: Property$ColorScheme, + "column-count"?: Property$ColumnCount, + "column-fill"?: Property$ColumnFill, + "column-gap"?: Property$ColumnGap<TLength>, + "column-rule-color"?: Property$ColumnRuleColor, + "column-rule-style"?: Property$ColumnRuleStyle, + "column-rule-width"?: Property$ColumnRuleWidth<TLength>, + "column-span"?: Property$ColumnSpan, + "column-width"?: Property$ColumnWidth<TLength>, + contain?: Property$Contain, + "contain-intrinsic-block-size"?: Property$ContainIntrinsicBlockSize<TLength>, + "contain-intrinsic-height"?: Property$ContainIntrinsicHeight<TLength>, + "contain-intrinsic-inline-size"?: Property$ContainIntrinsicInlineSize<TLength>, + "contain-intrinsic-width"?: Property$ContainIntrinsicWidth<TLength>, + "container-name"?: Property$ContainerName, + "container-type"?: Property$ContainerType, + content?: Property$Content, + "content-visibility"?: Property$ContentVisibility, + "counter-increment"?: Property$CounterIncrement, + "counter-reset"?: Property$CounterReset, + "counter-set"?: Property$CounterSet, + cursor?: Property$Cursor, + direction?: Property$Direction, + display?: Property$Display, + "empty-cells"?: Property$EmptyCells, + filter?: Property$Filter, + "flex-basis"?: Property$FlexBasis<TLength>, + "flex-direction"?: Property$FlexDirection, + "flex-grow"?: Property$FlexGrow, + "flex-shrink"?: Property$FlexShrink, + "flex-wrap"?: Property$FlexWrap, + float?: Property$Float, + "font-family"?: Property$FontFamily, + "font-feature-settings"?: Property$FontFeatureSettings, + "font-kerning"?: Property$FontKerning, + "font-language-override"?: Property$FontLanguageOverride, + "font-optical-sizing"?: Property$FontOpticalSizing, + "font-palette"?: Property$FontPalette, + "font-size"?: Property$FontSize<TLength>, + "font-size-adjust"?: Property$FontSizeAdjust, + "font-smooth"?: Property$FontSmooth<TLength>, + "font-stretch"?: Property$FontStretch, + "font-style"?: Property$FontStyle, + "font-synthesis"?: Property$FontSynthesis, + "font-synthesis-position"?: Property$FontSynthesisPosition, + "font-synthesis-small-caps"?: Property$FontSynthesisSmallCaps, + "font-synthesis-style"?: Property$FontSynthesisStyle, + "font-synthesis-weight"?: Property$FontSynthesisWeight, + "font-variant"?: Property$FontVariant, + "font-variant-alternates"?: Property$FontVariantAlternates, + "font-variant-caps"?: Property$FontVariantCaps, + "font-variant-east-asian"?: Property$FontVariantEastAsian, + "font-variant-emoji"?: Property$FontVariantEmoji, + "font-variant-ligatures"?: Property$FontVariantLigatures, + "font-variant-numeric"?: Property$FontVariantNumeric, + "font-variant-position"?: Property$FontVariantPosition, + "font-variation-settings"?: Property$FontVariationSettings, + "font-weight"?: Property$FontWeight, + "forced-color-adjust"?: Property$ForcedColorAdjust, + "grid-auto-columns"?: Property$GridAutoColumns<TLength>, + "grid-auto-flow"?: Property$GridAutoFlow, + "grid-auto-rows"?: Property$GridAutoRows<TLength>, + "grid-column-end"?: Property$GridColumnEnd, + "grid-column-start"?: Property$GridColumnStart, + "grid-row-end"?: Property$GridRowEnd, + "grid-row-start"?: Property$GridRowStart, + "grid-template-areas"?: Property$GridTemplateAreas, + "grid-template-columns"?: Property$GridTemplateColumns<TLength>, + "grid-template-rows"?: Property$GridTemplateRows<TLength>, + "hanging-punctuation"?: Property$HangingPunctuation, + height?: Property$Height<TLength>, + "hyphenate-character"?: Property$HyphenateCharacter, + "hyphenate-limit-chars"?: Property$HyphenateLimitChars, + hyphens?: Property$Hyphens, + "image-orientation"?: Property$ImageOrientation, + "image-rendering"?: Property$ImageRendering, + "image-resolution"?: Property$ImageResolution, + "initial-letter"?: Property$InitialLetter, + "inline-size"?: Property$InlineSize<TLength>, + "input-security"?: Property$InputSecurity, + "inset-block-end"?: Property$InsetBlockEnd<TLength>, + "inset-block-start"?: Property$InsetBlockStart<TLength>, + "inset-inline-end"?: Property$InsetInlineEnd<TLength>, + "inset-inline-start"?: Property$InsetInlineStart<TLength>, + isolation?: Property$Isolation, + "justify-content"?: Property$JustifyContent, + "justify-items"?: Property$JustifyItems, + "justify-self"?: Property$JustifySelf, + "justify-tracks"?: Property$JustifyTracks, + left?: Property$Left<TLength>, + "letter-spacing"?: Property$LetterSpacing<TLength>, + "line-break"?: Property$LineBreak, + "line-height"?: Property$LineHeight<TLength>, + "line-height-step"?: Property$LineHeightStep<TLength>, + "list-style-image"?: Property$ListStyleImage, + "list-style-position"?: Property$ListStylePosition, + "list-style-type"?: Property$ListStyleType, + "margin-block-end"?: Property$MarginBlockEnd<TLength>, + "margin-block-start"?: Property$MarginBlockStart<TLength>, + "margin-bottom"?: Property$MarginBottom<TLength>, + "margin-inline-end"?: Property$MarginInlineEnd<TLength>, + "margin-inline-start"?: Property$MarginInlineStart<TLength>, + "margin-left"?: Property$MarginLeft<TLength>, + "margin-right"?: Property$MarginRight<TLength>, + "margin-top"?: Property$MarginTop<TLength>, + "margin-trim"?: Property$MarginTrim, + "mask-border-mode"?: Property$MaskBorderMode, + "mask-border-outset"?: Property$MaskBorderOutset<TLength>, + "mask-border-repeat"?: Property$MaskBorderRepeat, + "mask-border-slice"?: Property$MaskBorderSlice, + "mask-border-source"?: Property$MaskBorderSource, + "mask-border-width"?: Property$MaskBorderWidth<TLength>, + "mask-clip"?: Property$MaskClip, + "mask-composite"?: Property$MaskComposite, + "mask-image"?: Property$MaskImage, + "mask-mode"?: Property$MaskMode, + "mask-origin"?: Property$MaskOrigin, + "mask-position"?: Property$MaskPosition<TLength>, + "mask-repeat"?: Property$MaskRepeat, + "mask-size"?: Property$MaskSize<TLength>, + "mask-type"?: Property$MaskType, + "masonry-auto-flow"?: Property$MasonryAutoFlow, + "math-depth"?: Property$MathDepth, + "math-shift"?: Property$MathShift, + "math-style"?: Property$MathStyle, + "max-block-size"?: Property$MaxBlockSize<TLength>, + "max-height"?: Property$MaxHeight<TLength>, + "max-inline-size"?: Property$MaxInlineSize<TLength>, + "max-lines"?: Property$MaxLines, + "max-width"?: Property$MaxWidth<TLength>, + "min-block-size"?: Property$MinBlockSize<TLength>, + "min-height"?: Property$MinHeight<TLength>, + "min-inline-size"?: Property$MinInlineSize<TLength>, + "min-width"?: Property$MinWidth<TLength>, + "mix-blend-mode"?: Property$MixBlendMode, + "motion-distance"?: Property$OffsetDistance<TLength>, + "motion-path"?: Property$OffsetPath, + "motion-rotation"?: Property$OffsetRotate, + "object-fit"?: Property$ObjectFit, + "object-position"?: Property$ObjectPosition<TLength>, + "offset-anchor"?: Property$OffsetAnchor<TLength>, + "offset-distance"?: Property$OffsetDistance<TLength>, + "offset-path"?: Property$OffsetPath, + "offset-position"?: Property$OffsetPosition<TLength>, + "offset-rotate"?: Property$OffsetRotate, + "offset-rotation"?: Property$OffsetRotate, + opacity?: Property$Opacity, + order?: Property$Order, + orphans?: Property$Orphans, + "outline-color"?: Property$OutlineColor, + "outline-offset"?: Property$OutlineOffset<TLength>, + "outline-style"?: Property$OutlineStyle, + "outline-width"?: Property$OutlineWidth<TLength>, + "overflow-anchor"?: Property$OverflowAnchor, + "overflow-block"?: Property$OverflowBlock, + "overflow-clip-box"?: Property$OverflowClipBox, + "overflow-clip-margin"?: Property$OverflowClipMargin<TLength>, + "overflow-inline"?: Property$OverflowInline, + "overflow-wrap"?: Property$OverflowWrap, + "overflow-x"?: Property$OverflowX, + "overflow-y"?: Property$OverflowY, + overlay?: Property$Overlay, + "overscroll-behavior-block"?: Property$OverscrollBehaviorBlock, + "overscroll-behavior-inline"?: Property$OverscrollBehaviorInline, + "overscroll-behavior-x"?: Property$OverscrollBehaviorX, + "overscroll-behavior-y"?: Property$OverscrollBehaviorY, + "padding-block-end"?: Property$PaddingBlockEnd<TLength>, + "padding-block-start"?: Property$PaddingBlockStart<TLength>, + "padding-bottom"?: Property$PaddingBottom<TLength>, + "padding-inline-end"?: Property$PaddingInlineEnd<TLength>, + "padding-inline-start"?: Property$PaddingInlineStart<TLength>, + "padding-left"?: Property$PaddingLeft<TLength>, + "padding-right"?: Property$PaddingRight<TLength>, + "padding-top"?: Property$PaddingTop<TLength>, + page?: Property$Page, + "page-break-after"?: Property$PageBreakAfter, + "page-break-before"?: Property$PageBreakBefore, + "page-break-inside"?: Property$PageBreakInside, + "paint-order"?: Property$PaintOrder, + perspective?: Property$Perspective<TLength>, + "perspective-origin"?: Property$PerspectiveOrigin<TLength>, + "pointer-events"?: Property$PointerEvents, + position?: Property$Position, + "print-color-adjust"?: Property$PrintColorAdjust, + quotes?: Property$Quotes, + resize?: Property$Resize, + right?: Property$Right<TLength>, + rotate?: Property$Rotate, + "row-gap"?: Property$RowGap<TLength>, + "ruby-align"?: Property$RubyAlign, + "ruby-merge"?: Property$RubyMerge, + "ruby-position"?: Property$RubyPosition, + scale?: Property$Scale, + "scroll-behavior"?: Property$ScrollBehavior, + "scroll-margin-block-end"?: Property$ScrollMarginBlockEnd<TLength>, + "scroll-margin-block-start"?: Property$ScrollMarginBlockStart<TLength>, + "scroll-margin-bottom"?: Property$ScrollMarginBottom<TLength>, + "scroll-margin-inline-end"?: Property$ScrollMarginInlineEnd<TLength>, + "scroll-margin-inline-start"?: Property$ScrollMarginInlineStart<TLength>, + "scroll-margin-left"?: Property$ScrollMarginLeft<TLength>, + "scroll-margin-right"?: Property$ScrollMarginRight<TLength>, + "scroll-margin-top"?: Property$ScrollMarginTop<TLength>, + "scroll-padding-block-end"?: Property$ScrollPaddingBlockEnd<TLength>, + "scroll-padding-block-start"?: Property$ScrollPaddingBlockStart<TLength>, + "scroll-padding-bottom"?: Property$ScrollPaddingBottom<TLength>, + "scroll-padding-inline-end"?: Property$ScrollPaddingInlineEnd<TLength>, + "scroll-padding-inline-start"?: Property$ScrollPaddingInlineStart<TLength>, + "scroll-padding-left"?: Property$ScrollPaddingLeft<TLength>, + "scroll-padding-right"?: Property$ScrollPaddingRight<TLength>, + "scroll-padding-top"?: Property$ScrollPaddingTop<TLength>, + "scroll-snap-align"?: Property$ScrollSnapAlign, + "scroll-snap-margin-bottom"?: Property$ScrollMarginBottom<TLength>, + "scroll-snap-margin-left"?: Property$ScrollMarginLeft<TLength>, + "scroll-snap-margin-right"?: Property$ScrollMarginRight<TLength>, + "scroll-snap-margin-top"?: Property$ScrollMarginTop<TLength>, + "scroll-snap-stop"?: Property$ScrollSnapStop, + "scroll-snap-type"?: Property$ScrollSnapType, + "scroll-timeline-axis"?: Property$ScrollTimelineAxis, + "scroll-timeline-name"?: Property$ScrollTimelineName, + "scrollbar-color"?: Property$ScrollbarColor, + "scrollbar-gutter"?: Property$ScrollbarGutter, + "scrollbar-width"?: Property$ScrollbarWidth, + "shape-image-threshold"?: Property$ShapeImageThreshold, + "shape-margin"?: Property$ShapeMargin<TLength>, + "shape-outside"?: Property$ShapeOutside, + "tab-size"?: Property$TabSize<TLength>, + "table-layout"?: Property$TableLayout, + "text-align"?: Property$TextAlign, + "text-align-last"?: Property$TextAlignLast, + "text-combine-upright"?: Property$TextCombineUpright, + "text-decoration-color"?: Property$TextDecorationColor, + "text-decoration-line"?: Property$TextDecorationLine, + "text-decoration-skip"?: Property$TextDecorationSkip, + "text-decoration-skip-ink"?: Property$TextDecorationSkipInk, + "text-decoration-style"?: Property$TextDecorationStyle, + "text-decoration-thickness"?: Property$TextDecorationThickness<TLength>, + "text-emphasis-color"?: Property$TextEmphasisColor, + "text-emphasis-position"?: Property$TextEmphasisPosition, + "text-emphasis-style"?: Property$TextEmphasisStyle, + "text-indent"?: Property$TextIndent<TLength>, + "text-justify"?: Property$TextJustify, + "text-orientation"?: Property$TextOrientation, + "text-overflow"?: Property$TextOverflow, + "text-rendering"?: Property$TextRendering, + "text-shadow"?: Property$TextShadow, + "text-size-adjust"?: Property$TextSizeAdjust, + "text-transform"?: Property$TextTransform, + "text-underline-offset"?: Property$TextUnderlineOffset<TLength>, + "text-underline-position"?: Property$TextUnderlinePosition, + "text-wrap"?: Property$TextWrap, + "timeline-scope"?: Property$TimelineScope, + top?: Property$Top<TLength>, + "touch-action"?: Property$TouchAction, + transform?: Property$Transform, + "transform-box"?: Property$TransformBox, + "transform-origin"?: Property$TransformOrigin<TLength>, + "transform-style"?: Property$TransformStyle, + "transition-behavior"?: Property$TransitionBehavior, + "transition-delay"?: Property$TransitionDelay<TTime>, + "transition-duration"?: Property$TransitionDuration<TTime>, + "transition-property"?: Property$TransitionProperty, + "transition-timing-function"?: Property$TransitionTimingFunction, + translate?: Property$Translate<TLength>, + "unicode-bidi"?: Property$UnicodeBidi, + "user-select"?: Property$UserSelect, + "vertical-align"?: Property$VerticalAlign<TLength>, + "view-timeline-axis"?: Property$ViewTimelineAxis, + "view-timeline-inset"?: Property$ViewTimelineInset<TLength>, + "view-timeline-name"?: Property$ViewTimelineName, + "view-transition-name"?: Property$ViewTransitionName, + visibility?: Property$Visibility, + "white-space"?: Property$WhiteSpace, + "white-space-collapse"?: Property$WhiteSpaceCollapse, + "white-space-trim"?: Property$WhiteSpaceTrim, + widows?: Property$Widows, + width?: Property$Width<TLength>, + "will-change"?: Property$WillChange, + "word-break"?: Property$WordBreak, + "word-spacing"?: Property$WordSpacing<TLength>, + "word-wrap"?: Property$WordWrap, + "writing-mode"?: Property$WritingMode, + "z-index"?: Property$ZIndex, + zoom?: Property$Zoom, +|}; + +export type StandardShorthandPropertiesHyphen<TLength = string | 0, TTime = string> = {| + all?: Property$All, + animation?: Property$Animation<TTime>, + "animation-range"?: Property$AnimationRange<TLength>, + background?: Property$Background<TLength>, + "background-position"?: Property$BackgroundPosition<TLength>, + border?: Property$Border<TLength>, + "border-block"?: Property$BorderBlock<TLength>, + "border-block-end"?: Property$BorderBlockEnd<TLength>, + "border-block-start"?: Property$BorderBlockStart<TLength>, + "border-bottom"?: Property$BorderBottom<TLength>, + "border-color"?: Property$BorderColor, + "border-image"?: Property$BorderImage, + "border-inline"?: Property$BorderInline<TLength>, + "border-inline-end"?: Property$BorderInlineEnd<TLength>, + "border-inline-start"?: Property$BorderInlineStart<TLength>, + "border-left"?: Property$BorderLeft<TLength>, + "border-radius"?: Property$BorderRadius<TLength>, + "border-right"?: Property$BorderRight<TLength>, + "border-style"?: Property$BorderStyle, + "border-top"?: Property$BorderTop<TLength>, + "border-width"?: Property$BorderWidth<TLength>, + caret?: Property$Caret, + "column-rule"?: Property$ColumnRule<TLength>, + columns?: Property$Columns<TLength>, + "contain-intrinsic-size"?: Property$ContainIntrinsicSize<TLength>, + container?: Property$Container, + flex?: Property$Flex<TLength>, + "flex-flow"?: Property$FlexFlow, + font?: Property$Font, + gap?: Property$Gap<TLength>, + grid?: Property$Grid, + "grid-area"?: Property$GridArea, + "grid-column"?: Property$GridColumn, + "grid-row"?: Property$GridRow, + "grid-template"?: Property$GridTemplate, + inset?: Property$Inset<TLength>, + "inset-block"?: Property$InsetBlock<TLength>, + "inset-inline"?: Property$InsetInline<TLength>, + "line-clamp"?: Property$LineClamp, + "list-style"?: Property$ListStyle, + margin?: Property$Margin<TLength>, + "margin-block"?: Property$MarginBlock<TLength>, + "margin-inline"?: Property$MarginInline<TLength>, + mask?: Property$Mask<TLength>, + "mask-border"?: Property$MaskBorder, + motion?: Property$Offset<TLength>, + offset?: Property$Offset<TLength>, + outline?: Property$Outline<TLength>, + overflow?: Property$Overflow, + "overscroll-behavior"?: Property$OverscrollBehavior, + padding?: Property$Padding<TLength>, + "padding-block"?: Property$PaddingBlock<TLength>, + "padding-inline"?: Property$PaddingInline<TLength>, + "place-content"?: Property$PlaceContent, + "place-items"?: Property$PlaceItems, + "place-self"?: Property$PlaceSelf, + "scroll-margin"?: Property$ScrollMargin<TLength>, + "scroll-margin-block"?: Property$ScrollMarginBlock<TLength>, + "scroll-margin-inline"?: Property$ScrollMarginInline<TLength>, + "scroll-padding"?: Property$ScrollPadding<TLength>, + "scroll-padding-block"?: Property$ScrollPaddingBlock<TLength>, + "scroll-padding-inline"?: Property$ScrollPaddingInline<TLength>, + "scroll-snap-margin"?: Property$ScrollMargin<TLength>, + "scroll-timeline"?: Property$ScrollTimeline, + "text-decoration"?: Property$TextDecoration<TLength>, + "text-emphasis"?: Property$TextEmphasis, + transition?: Property$Transition<TTime>, + "view-timeline"?: Property$ViewTimeline, +|}; + +export type StandardPropertiesHyphen<TLength = string | 0, TTime = string> = {| + ...StandardLonghandPropertiesHyphen<TLength, TTime>, + ...StandardShorthandPropertiesHyphen<TLength, TTime>, +|}; + +export type VendorLonghandPropertiesHyphen<TLength = string | 0, TTime = string> = {| + "-moz-animation-delay"?: Property$AnimationDelay<TTime>, + "-moz-animation-direction"?: Property$AnimationDirection, + "-moz-animation-duration"?: Property$AnimationDuration<TTime>, + "-moz-animation-fill-mode"?: Property$AnimationFillMode, + "-moz-animation-iteration-count"?: Property$AnimationIterationCount, + "-moz-animation-name"?: Property$AnimationName, + "-moz-animation-play-state"?: Property$AnimationPlayState, + "-moz-animation-timing-function"?: Property$AnimationTimingFunction, + "-moz-appearance"?: Property$MozAppearance, + "-moz-binding"?: Property$MozBinding, + "-moz-border-bottom-colors"?: Property$MozBorderBottomColors, + "-moz-border-end-color"?: Property$BorderInlineEndColor, + "-moz-border-end-style"?: Property$BorderInlineEndStyle, + "-moz-border-end-width"?: Property$BorderInlineEndWidth<TLength>, + "-moz-border-left-colors"?: Property$MozBorderLeftColors, + "-moz-border-right-colors"?: Property$MozBorderRightColors, + "-moz-border-start-color"?: Property$BorderInlineStartColor, + "-moz-border-start-style"?: Property$BorderInlineStartStyle, + "-moz-border-top-colors"?: Property$MozBorderTopColors, + "-moz-box-sizing"?: Property$BoxSizing, + "-moz-column-count"?: Property$ColumnCount, + "-moz-column-fill"?: Property$ColumnFill, + "-moz-column-rule-color"?: Property$ColumnRuleColor, + "-moz-column-rule-style"?: Property$ColumnRuleStyle, + "-moz-column-rule-width"?: Property$ColumnRuleWidth<TLength>, + "-moz-column-width"?: Property$ColumnWidth<TLength>, + "-moz-context-properties"?: Property$MozContextProperties, + "-moz-font-feature-settings"?: Property$FontFeatureSettings, + "-moz-font-language-override"?: Property$FontLanguageOverride, + "-moz-hyphens"?: Property$Hyphens, + "-moz-image-region"?: Property$MozImageRegion, + "-moz-margin-end"?: Property$MarginInlineEnd<TLength>, + "-moz-margin-start"?: Property$MarginInlineStart<TLength>, + "-moz-orient"?: Property$MozOrient, + "-moz-osx-font-smoothing"?: Property$FontSmooth<TLength>, + "-moz-outline-radius-bottomleft"?: Property$MozOutlineRadiusBottomleft<TLength>, + "-moz-outline-radius-bottomright"?: Property$MozOutlineRadiusBottomright<TLength>, + "-moz-outline-radius-topleft"?: Property$MozOutlineRadiusTopleft<TLength>, + "-moz-outline-radius-topright"?: Property$MozOutlineRadiusTopright<TLength>, + "-moz-padding-end"?: Property$PaddingInlineEnd<TLength>, + "-moz-padding-start"?: Property$PaddingInlineStart<TLength>, + "-moz-stack-sizing"?: Property$MozStackSizing, + "-moz-tab-size"?: Property$TabSize<TLength>, + "-moz-text-blink"?: Property$MozTextBlink, + "-moz-text-size-adjust"?: Property$TextSizeAdjust, + "-moz-user-focus"?: Property$MozUserFocus, + "-moz-user-modify"?: Property$MozUserModify, + "-moz-user-select"?: Property$UserSelect, + "-moz-window-dragging"?: Property$MozWindowDragging, + "-moz-window-shadow"?: Property$MozWindowShadow, + "-ms-accelerator"?: Property$MsAccelerator, + "-ms-block-progression"?: Property$MsBlockProgression, + "-ms-content-zoom-chaining"?: Property$MsContentZoomChaining, + "-ms-content-zoom-limit-max"?: Property$MsContentZoomLimitMax, + "-ms-content-zoom-limit-min"?: Property$MsContentZoomLimitMin, + "-ms-content-zoom-snap-points"?: Property$MsContentZoomSnapPoints, + "-ms-content-zoom-snap-type"?: Property$MsContentZoomSnapType, + "-ms-content-zooming"?: Property$MsContentZooming, + "-ms-filter"?: Property$MsFilter, + "-ms-flex-direction"?: Property$FlexDirection, + "-ms-flex-positive"?: Property$FlexGrow, + "-ms-flow-from"?: Property$MsFlowFrom, + "-ms-flow-into"?: Property$MsFlowInto, + "-ms-grid-columns"?: Property$MsGridColumns<TLength>, + "-ms-grid-rows"?: Property$MsGridRows<TLength>, + "-ms-high-contrast-adjust"?: Property$MsHighContrastAdjust, + "-ms-hyphenate-limit-chars"?: Property$MsHyphenateLimitChars, + "-ms-hyphenate-limit-lines"?: Property$MsHyphenateLimitLines, + "-ms-hyphenate-limit-zone"?: Property$MsHyphenateLimitZone<TLength>, + "-ms-hyphens"?: Property$Hyphens, + "-ms-ime-align"?: Property$MsImeAlign, + "-ms-line-break"?: Property$LineBreak, + "-ms-order"?: Property$Order, + "-ms-overflow-style"?: Property$MsOverflowStyle, + "-ms-overflow-x"?: Property$OverflowX, + "-ms-overflow-y"?: Property$OverflowY, + "-ms-scroll-chaining"?: Property$MsScrollChaining, + "-ms-scroll-limit-x-max"?: Property$MsScrollLimitXMax<TLength>, + "-ms-scroll-limit-x-min"?: Property$MsScrollLimitXMin<TLength>, + "-ms-scroll-limit-y-max"?: Property$MsScrollLimitYMax<TLength>, + "-ms-scroll-limit-y-min"?: Property$MsScrollLimitYMin<TLength>, + "-ms-scroll-rails"?: Property$MsScrollRails, + "-ms-scroll-snap-points-x"?: Property$MsScrollSnapPointsX, + "-ms-scroll-snap-points-y"?: Property$MsScrollSnapPointsY, + "-ms-scroll-snap-type"?: Property$MsScrollSnapType, + "-ms-scroll-translation"?: Property$MsScrollTranslation, + "-ms-scrollbar-3dlight-color"?: Property$MsScrollbar3dlightColor, + "-ms-scrollbar-arrow-color"?: Property$MsScrollbarArrowColor, + "-ms-scrollbar-base-color"?: Property$MsScrollbarBaseColor, + "-ms-scrollbar-darkshadow-color"?: Property$MsScrollbarDarkshadowColor, + "-ms-scrollbar-face-color"?: Property$MsScrollbarFaceColor, + "-ms-scrollbar-highlight-color"?: Property$MsScrollbarHighlightColor, + "-ms-scrollbar-shadow-color"?: Property$MsScrollbarShadowColor, + "-ms-scrollbar-track-color"?: Property$MsScrollbarTrackColor, + "-ms-text-autospace"?: Property$MsTextAutospace, + "-ms-text-combine-horizontal"?: Property$TextCombineUpright, + "-ms-text-overflow"?: Property$TextOverflow, + "-ms-touch-action"?: Property$TouchAction, + "-ms-touch-select"?: Property$MsTouchSelect, + "-ms-transform"?: Property$Transform, + "-ms-transform-origin"?: Property$TransformOrigin<TLength>, + "-ms-transition-delay"?: Property$TransitionDelay<TTime>, + "-ms-transition-duration"?: Property$TransitionDuration<TTime>, + "-ms-transition-property"?: Property$TransitionProperty, + "-ms-transition-timing-function"?: Property$TransitionTimingFunction, + "-ms-user-select"?: Property$MsUserSelect, + "-ms-word-break"?: Property$WordBreak, + "-ms-wrap-flow"?: Property$MsWrapFlow, + "-ms-wrap-margin"?: Property$MsWrapMargin<TLength>, + "-ms-wrap-through"?: Property$MsWrapThrough, + "-ms-writing-mode"?: Property$WritingMode, + "-webkit-align-content"?: Property$AlignContent, + "-webkit-align-items"?: Property$AlignItems, + "-webkit-align-self"?: Property$AlignSelf, + "-webkit-animation-delay"?: Property$AnimationDelay<TTime>, + "-webkit-animation-direction"?: Property$AnimationDirection, + "-webkit-animation-duration"?: Property$AnimationDuration<TTime>, + "-webkit-animation-fill-mode"?: Property$AnimationFillMode, + "-webkit-animation-iteration-count"?: Property$AnimationIterationCount, + "-webkit-animation-name"?: Property$AnimationName, + "-webkit-animation-play-state"?: Property$AnimationPlayState, + "-webkit-animation-timing-function"?: Property$AnimationTimingFunction, + "-webkit-appearance"?: Property$WebkitAppearance, + "-webkit-backdrop-filter"?: Property$BackdropFilter, + "-webkit-backface-visibility"?: Property$BackfaceVisibility, + "-webkit-background-clip"?: Property$BackgroundClip, + "-webkit-background-origin"?: Property$BackgroundOrigin, + "-webkit-background-size"?: Property$BackgroundSize<TLength>, + "-webkit-border-before-color"?: Property$WebkitBorderBeforeColor, + "-webkit-border-before-style"?: Property$WebkitBorderBeforeStyle, + "-webkit-border-before-width"?: Property$WebkitBorderBeforeWidth<TLength>, + "-webkit-border-bottom-left-radius"?: Property$BorderBottomLeftRadius<TLength>, + "-webkit-border-bottom-right-radius"?: Property$BorderBottomRightRadius<TLength>, + "-webkit-border-image-slice"?: Property$BorderImageSlice, + "-webkit-border-top-left-radius"?: Property$BorderTopLeftRadius<TLength>, + "-webkit-border-top-right-radius"?: Property$BorderTopRightRadius<TLength>, + "-webkit-box-decoration-break"?: Property$BoxDecorationBreak, + "-webkit-box-reflect"?: Property$WebkitBoxReflect<TLength>, + "-webkit-box-shadow"?: Property$BoxShadow, + "-webkit-box-sizing"?: Property$BoxSizing, + "-webkit-clip-path"?: Property$ClipPath, + "-webkit-column-count"?: Property$ColumnCount, + "-webkit-column-fill"?: Property$ColumnFill, + "-webkit-column-rule-color"?: Property$ColumnRuleColor, + "-webkit-column-rule-style"?: Property$ColumnRuleStyle, + "-webkit-column-rule-width"?: Property$ColumnRuleWidth<TLength>, + "-webkit-column-span"?: Property$ColumnSpan, + "-webkit-column-width"?: Property$ColumnWidth<TLength>, + "-webkit-filter"?: Property$Filter, + "-webkit-flex-basis"?: Property$FlexBasis<TLength>, + "-webkit-flex-direction"?: Property$FlexDirection, + "-webkit-flex-grow"?: Property$FlexGrow, + "-webkit-flex-shrink"?: Property$FlexShrink, + "-webkit-flex-wrap"?: Property$FlexWrap, + "-webkit-font-feature-settings"?: Property$FontFeatureSettings, + "-webkit-font-kerning"?: Property$FontKerning, + "-webkit-font-smoothing"?: Property$FontSmooth<TLength>, + "-webkit-font-variant-ligatures"?: Property$FontVariantLigatures, + "-webkit-hyphenate-character"?: Property$HyphenateCharacter, + "-webkit-hyphens"?: Property$Hyphens, + "-webkit-initial-letter"?: Property$InitialLetter, + "-webkit-justify-content"?: Property$JustifyContent, + "-webkit-line-break"?: Property$LineBreak, + "-webkit-line-clamp"?: Property$WebkitLineClamp, + "-webkit-margin-end"?: Property$MarginInlineEnd<TLength>, + "-webkit-margin-start"?: Property$MarginInlineStart<TLength>, + "-webkit-mask-attachment"?: Property$WebkitMaskAttachment, + "-webkit-mask-box-image-outset"?: Property$MaskBorderOutset<TLength>, + "-webkit-mask-box-image-repeat"?: Property$MaskBorderRepeat, + "-webkit-mask-box-image-slice"?: Property$MaskBorderSlice, + "-webkit-mask-box-image-source"?: Property$MaskBorderSource, + "-webkit-mask-box-image-width"?: Property$MaskBorderWidth<TLength>, + "-webkit-mask-clip"?: Property$WebkitMaskClip, + "-webkit-mask-composite"?: Property$WebkitMaskComposite, + "-webkit-mask-image"?: Property$WebkitMaskImage, + "-webkit-mask-origin"?: Property$WebkitMaskOrigin, + "-webkit-mask-position"?: Property$WebkitMaskPosition<TLength>, + "-webkit-mask-position-x"?: Property$WebkitMaskPositionX<TLength>, + "-webkit-mask-position-y"?: Property$WebkitMaskPositionY<TLength>, + "-webkit-mask-repeat"?: Property$WebkitMaskRepeat, + "-webkit-mask-repeat-x"?: Property$WebkitMaskRepeatX, + "-webkit-mask-repeat-y"?: Property$WebkitMaskRepeatY, + "-webkit-mask-size"?: Property$WebkitMaskSize<TLength>, + "-webkit-max-inline-size"?: Property$MaxInlineSize<TLength>, + "-webkit-order"?: Property$Order, + "-webkit-overflow-scrolling"?: Property$WebkitOverflowScrolling, + "-webkit-padding-end"?: Property$PaddingInlineEnd<TLength>, + "-webkit-padding-start"?: Property$PaddingInlineStart<TLength>, + "-webkit-perspective"?: Property$Perspective<TLength>, + "-webkit-perspective-origin"?: Property$PerspectiveOrigin<TLength>, + "-webkit-print-color-adjust"?: Property$PrintColorAdjust, + "-webkit-ruby-position"?: Property$RubyPosition, + "-webkit-scroll-snap-type"?: Property$ScrollSnapType, + "-webkit-shape-margin"?: Property$ShapeMargin<TLength>, + "-webkit-tap-highlight-color"?: Property$WebkitTapHighlightColor, + "-webkit-text-combine"?: Property$TextCombineUpright, + "-webkit-text-decoration-color"?: Property$TextDecorationColor, + "-webkit-text-decoration-line"?: Property$TextDecorationLine, + "-webkit-text-decoration-skip"?: Property$TextDecorationSkip, + "-webkit-text-decoration-style"?: Property$TextDecorationStyle, + "-webkit-text-emphasis-color"?: Property$TextEmphasisColor, + "-webkit-text-emphasis-position"?: Property$TextEmphasisPosition, + "-webkit-text-emphasis-style"?: Property$TextEmphasisStyle, + "-webkit-text-fill-color"?: Property$WebkitTextFillColor, + "-webkit-text-orientation"?: Property$TextOrientation, + "-webkit-text-size-adjust"?: Property$TextSizeAdjust, + "-webkit-text-stroke-color"?: Property$WebkitTextStrokeColor, + "-webkit-text-stroke-width"?: Property$WebkitTextStrokeWidth<TLength>, + "-webkit-text-underline-position"?: Property$TextUnderlinePosition, + "-webkit-touch-callout"?: Property$WebkitTouchCallout, + "-webkit-transform"?: Property$Transform, + "-webkit-transform-origin"?: Property$TransformOrigin<TLength>, + "-webkit-transform-style"?: Property$TransformStyle, + "-webkit-transition-delay"?: Property$TransitionDelay<TTime>, + "-webkit-transition-duration"?: Property$TransitionDuration<TTime>, + "-webkit-transition-property"?: Property$TransitionProperty, + "-webkit-transition-timing-function"?: Property$TransitionTimingFunction, + "-webkit-user-modify"?: Property$WebkitUserModify, + "-webkit-user-select"?: Property$UserSelect, + "-webkit-writing-mode"?: Property$WritingMode, +|}; + +export type VendorShorthandPropertiesHyphen<TLength = string | 0, TTime = string> = {| + "-moz-animation"?: Property$Animation<TTime>, + "-moz-border-image"?: Property$BorderImage, + "-moz-column-rule"?: Property$ColumnRule<TLength>, + "-moz-columns"?: Property$Columns<TLength>, + "-moz-outline-radius"?: Property$MozOutlineRadius<TLength>, + "-ms-content-zoom-limit"?: Property$MsContentZoomLimit, + "-ms-content-zoom-snap"?: Property$MsContentZoomSnap, + "-ms-flex"?: Property$Flex<TLength>, + "-ms-scroll-limit"?: Property$MsScrollLimit, + "-ms-scroll-snap-x"?: Property$MsScrollSnapX, + "-ms-scroll-snap-y"?: Property$MsScrollSnapY, + "-ms-transition"?: Property$Transition<TTime>, + "-webkit-animation"?: Property$Animation<TTime>, + "-webkit-border-before"?: Property$WebkitBorderBefore<TLength>, + "-webkit-border-image"?: Property$BorderImage, + "-webkit-border-radius"?: Property$BorderRadius<TLength>, + "-webkit-column-rule"?: Property$ColumnRule<TLength>, + "-webkit-columns"?: Property$Columns<TLength>, + "-webkit-flex"?: Property$Flex<TLength>, + "-webkit-flex-flow"?: Property$FlexFlow, + "-webkit-mask"?: Property$WebkitMask<TLength>, + "-webkit-mask-box-image"?: Property$MaskBorder, + "-webkit-text-emphasis"?: Property$TextEmphasis, + "-webkit-text-stroke"?: Property$WebkitTextStroke<TLength>, + "-webkit-transition"?: Property$Transition<TTime>, +|}; + +export type VendorPropertiesHyphen<TLength = string | 0, TTime = string> = {| + ...VendorLonghandPropertiesHyphen<TLength, TTime>, + ...VendorShorthandPropertiesHyphen<TLength, TTime>, +|}; + +export type ObsoletePropertiesHyphen<TLength = string | 0, TTime = string> = {| + azimuth?: Property$Azimuth, + "box-align"?: Property$BoxAlign, + "box-direction"?: Property$BoxDirection, + "box-flex"?: Property$BoxFlex, + "box-flex-group"?: Property$BoxFlexGroup, + "box-lines"?: Property$BoxLines, + "box-ordinal-group"?: Property$BoxOrdinalGroup, + "box-orient"?: Property$BoxOrient, + "box-pack"?: Property$BoxPack, + clip?: Property$Clip, + "grid-column-gap"?: Property$GridColumnGap<TLength>, + "grid-gap"?: Property$GridGap<TLength>, + "grid-row-gap"?: Property$GridRowGap<TLength>, + "ime-mode"?: Property$ImeMode, + "offset-block"?: Property$InsetBlock<TLength>, + "offset-block-end"?: Property$InsetBlockEnd<TLength>, + "offset-block-start"?: Property$InsetBlockStart<TLength>, + "offset-inline"?: Property$InsetInline<TLength>, + "offset-inline-end"?: Property$InsetInlineEnd<TLength>, + "offset-inline-start"?: Property$InsetInlineStart<TLength>, + "scroll-snap-coordinate"?: Property$ScrollSnapCoordinate<TLength>, + "scroll-snap-destination"?: Property$ScrollSnapDestination<TLength>, + "scroll-snap-points-x"?: Property$ScrollSnapPointsX, + "scroll-snap-points-y"?: Property$ScrollSnapPointsY, + "scroll-snap-type-x"?: Property$ScrollSnapTypeX, + "scroll-snap-type-y"?: Property$ScrollSnapTypeY, + "-khtml-box-align"?: Property$BoxAlign, + "-khtml-box-direction"?: Property$BoxDirection, + "-khtml-box-flex"?: Property$BoxFlex, + "-khtml-box-flex-group"?: Property$BoxFlexGroup, + "-khtml-box-lines"?: Property$BoxLines, + "-khtml-box-ordinal-group"?: Property$BoxOrdinalGroup, + "-khtml-box-orient"?: Property$BoxOrient, + "-khtml-box-pack"?: Property$BoxPack, + "-khtml-line-break"?: Property$LineBreak, + "-khtml-opacity"?: Property$Opacity, + "-khtml-user-select"?: Property$UserSelect, + "-moz-backface-visibility"?: Property$BackfaceVisibility, + "-moz-background-clip"?: Property$BackgroundClip, + "-moz-background-inline-policy"?: Property$BoxDecorationBreak, + "-moz-background-origin"?: Property$BackgroundOrigin, + "-moz-background-size"?: Property$BackgroundSize<TLength>, + "-moz-border-radius"?: Property$BorderRadius<TLength>, + "-moz-border-radius-bottomleft"?: Property$BorderBottomLeftRadius<TLength>, + "-moz-border-radius-bottomright"?: Property$BorderBottomRightRadius<TLength>, + "-moz-border-radius-topleft"?: Property$BorderTopLeftRadius<TLength>, + "-moz-border-radius-topright"?: Property$BorderTopRightRadius<TLength>, + "-moz-box-align"?: Property$BoxAlign, + "-moz-box-direction"?: Property$BoxDirection, + "-moz-box-flex"?: Property$BoxFlex, + "-moz-box-ordinal-group"?: Property$BoxOrdinalGroup, + "-moz-box-orient"?: Property$BoxOrient, + "-moz-box-pack"?: Property$BoxPack, + "-moz-box-shadow"?: Property$BoxShadow, + "-moz-float-edge"?: Property$MozFloatEdge, + "-moz-force-broken-image-icon"?: Property$MozForceBrokenImageIcon, + "-moz-opacity"?: Property$Opacity, + "-moz-outline"?: Property$Outline<TLength>, + "-moz-outline-color"?: Property$OutlineColor, + "-moz-outline-style"?: Property$OutlineStyle, + "-moz-outline-width"?: Property$OutlineWidth<TLength>, + "-moz-perspective"?: Property$Perspective<TLength>, + "-moz-perspective-origin"?: Property$PerspectiveOrigin<TLength>, + "-moz-text-align-last"?: Property$TextAlignLast, + "-moz-text-decoration-color"?: Property$TextDecorationColor, + "-moz-text-decoration-line"?: Property$TextDecorationLine, + "-moz-text-decoration-style"?: Property$TextDecorationStyle, + "-moz-transform"?: Property$Transform, + "-moz-transform-origin"?: Property$TransformOrigin<TLength>, + "-moz-transform-style"?: Property$TransformStyle, + "-moz-transition"?: Property$Transition<TTime>, + "-moz-transition-delay"?: Property$TransitionDelay<TTime>, + "-moz-transition-duration"?: Property$TransitionDuration<TTime>, + "-moz-transition-property"?: Property$TransitionProperty, + "-moz-transition-timing-function"?: Property$TransitionTimingFunction, + "-moz-user-input"?: Property$MozUserInput, + "-ms-ime-mode"?: Property$ImeMode, + "-o-animation"?: Property$Animation<TTime>, + "-o-animation-delay"?: Property$AnimationDelay<TTime>, + "-o-animation-direction"?: Property$AnimationDirection, + "-o-animation-duration"?: Property$AnimationDuration<TTime>, + "-o-animation-fill-mode"?: Property$AnimationFillMode, + "-o-animation-iteration-count"?: Property$AnimationIterationCount, + "-o-animation-name"?: Property$AnimationName, + "-o-animation-play-state"?: Property$AnimationPlayState, + "-o-animation-timing-function"?: Property$AnimationTimingFunction, + "-o-background-size"?: Property$BackgroundSize<TLength>, + "-o-border-image"?: Property$BorderImage, + "-o-object-fit"?: Property$ObjectFit, + "-o-object-position"?: Property$ObjectPosition<TLength>, + "-o-tab-size"?: Property$TabSize<TLength>, + "-o-text-overflow"?: Property$TextOverflow, + "-o-transform"?: Property$Transform, + "-o-transform-origin"?: Property$TransformOrigin<TLength>, + "-o-transition"?: Property$Transition<TTime>, + "-o-transition-delay"?: Property$TransitionDelay<TTime>, + "-o-transition-duration"?: Property$TransitionDuration<TTime>, + "-o-transition-property"?: Property$TransitionProperty, + "-o-transition-timing-function"?: Property$TransitionTimingFunction, + "-webkit-box-align"?: Property$BoxAlign, + "-webkit-box-direction"?: Property$BoxDirection, + "-webkit-box-flex"?: Property$BoxFlex, + "-webkit-box-flex-group"?: Property$BoxFlexGroup, + "-webkit-box-lines"?: Property$BoxLines, + "-webkit-box-ordinal-group"?: Property$BoxOrdinalGroup, + "-webkit-box-orient"?: Property$BoxOrient, + "-webkit-box-pack"?: Property$BoxPack, +|}; + +export type SvgPropertiesHyphen<TLength = string | 0, TTime = string> = {| + "alignment-baseline"?: Property$AlignmentBaseline, + "baseline-shift"?: Property$BaselineShift<TLength>, + clip?: Property$Clip, + "clip-path"?: Property$ClipPath, + "clip-rule"?: Property$ClipRule, + color?: Property$Color, + "color-interpolation"?: Property$ColorInterpolation, + "color-rendering"?: Property$ColorRendering, + cursor?: Property$Cursor, + direction?: Property$Direction, + display?: Property$Display, + "dominant-baseline"?: Property$DominantBaseline, + fill?: Property$Fill, + "fill-opacity"?: Property$FillOpacity, + "fill-rule"?: Property$FillRule, + filter?: Property$Filter, + "flood-color"?: Property$FloodColor, + "flood-opacity"?: Property$FloodOpacity, + font?: Property$Font, + "font-family"?: Property$FontFamily, + "font-size"?: Property$FontSize<TLength>, + "font-size-adjust"?: Property$FontSizeAdjust, + "font-stretch"?: Property$FontStretch, + "font-style"?: Property$FontStyle, + "font-variant"?: Property$FontVariant, + "font-weight"?: Property$FontWeight, + "glyph-orientation-vertical"?: Property$GlyphOrientationVertical, + "image-rendering"?: Property$ImageRendering, + "letter-spacing"?: Property$LetterSpacing<TLength>, + "lighting-color"?: Property$LightingColor, + "line-height"?: Property$LineHeight<TLength>, + marker?: Property$Marker, + "marker-end"?: Property$MarkerEnd, + "marker-mid"?: Property$MarkerMid, + "marker-start"?: Property$MarkerStart, + mask?: Property$Mask<TLength>, + opacity?: Property$Opacity, + overflow?: Property$Overflow, + "paint-order"?: Property$PaintOrder, + "pointer-events"?: Property$PointerEvents, + "shape-rendering"?: Property$ShapeRendering, + "stop-color"?: Property$StopColor, + "stop-opacity"?: Property$StopOpacity, + stroke?: Property$Stroke, + "stroke-dasharray"?: Property$StrokeDasharray<TLength>, + "stroke-dashoffset"?: Property$StrokeDashoffset<TLength>, + "stroke-linecap"?: Property$StrokeLinecap, + "stroke-linejoin"?: Property$StrokeLinejoin, + "stroke-miterlimit"?: Property$StrokeMiterlimit, + "stroke-opacity"?: Property$StrokeOpacity, + "stroke-width"?: Property$StrokeWidth<TLength>, + "text-anchor"?: Property$TextAnchor, + "text-decoration"?: Property$TextDecoration<TLength>, + "text-rendering"?: Property$TextRendering, + "unicode-bidi"?: Property$UnicodeBidi, + "vector-effect"?: Property$VectorEffect, + visibility?: Property$Visibility, + "white-space"?: Property$WhiteSpace, + "word-spacing"?: Property$WordSpacing<TLength>, + "writing-mode"?: Property$WritingMode, +|}; + +export type PropertiesHyphen<TLength = string | 0, TTime = string> = {| + ...StandardPropertiesHyphen<TLength, TTime>, + ...VendorPropertiesHyphen<TLength, TTime>, + ...ObsoletePropertiesHyphen<TLength, TTime>, + ...SvgPropertiesHyphen<TLength, TTime>, +|}; + +export type StandardLonghandPropertiesFallback<TLength = string | 0, TTime = string> = {| + accentColor?: Property$AccentColor | Array<Property$AccentColor>, + alignContent?: Property$AlignContent | Array<Property$AlignContent>, + alignItems?: Property$AlignItems | Array<Property$AlignItems>, + alignSelf?: Property$AlignSelf | Array<Property$AlignSelf>, + alignTracks?: Property$AlignTracks | Array<Property$AlignTracks>, + animationComposition?: Property$AnimationComposition | Array<Property$AnimationComposition>, + animationDelay?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, + animationDirection?: Property$AnimationDirection | Array<Property$AnimationDirection>, + animationDuration?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, + animationFillMode?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, + animationIterationCount?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, + animationName?: Property$AnimationName | Array<Property$AnimationName>, + animationPlayState?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, + animationRangeEnd?: Property$AnimationRangeEnd<TLength> | Array<Property$AnimationRangeEnd<TLength>>, + animationRangeStart?: Property$AnimationRangeStart<TLength> | Array<Property$AnimationRangeStart<TLength>>, + animationTimeline?: Property$AnimationTimeline | Array<Property$AnimationTimeline>, + animationTimingFunction?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, + appearance?: Property$Appearance | Array<Property$Appearance>, + aspectRatio?: Property$AspectRatio | Array<Property$AspectRatio>, + backdropFilter?: Property$BackdropFilter | Array<Property$BackdropFilter>, + backfaceVisibility?: Property$BackfaceVisibility | Array<Property$BackfaceVisibility>, + backgroundAttachment?: Property$BackgroundAttachment | Array<Property$BackgroundAttachment>, + backgroundBlendMode?: Property$BackgroundBlendMode | Array<Property$BackgroundBlendMode>, + backgroundClip?: Property$BackgroundClip | Array<Property$BackgroundClip>, + backgroundColor?: Property$BackgroundColor | Array<Property$BackgroundColor>, + backgroundImage?: Property$BackgroundImage | Array<Property$BackgroundImage>, + backgroundOrigin?: Property$BackgroundOrigin | Array<Property$BackgroundOrigin>, + backgroundPositionX?: Property$BackgroundPositionX<TLength> | Array<Property$BackgroundPositionX<TLength>>, + backgroundPositionY?: Property$BackgroundPositionY<TLength> | Array<Property$BackgroundPositionY<TLength>>, + backgroundRepeat?: Property$BackgroundRepeat | Array<Property$BackgroundRepeat>, + backgroundSize?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, + blockOverflow?: Property$BlockOverflow | Array<Property$BlockOverflow>, + blockSize?: Property$BlockSize<TLength> | Array<Property$BlockSize<TLength>>, + borderBlockColor?: Property$BorderBlockColor | Array<Property$BorderBlockColor>, + borderBlockEndColor?: Property$BorderBlockEndColor | Array<Property$BorderBlockEndColor>, + borderBlockEndStyle?: Property$BorderBlockEndStyle | Array<Property$BorderBlockEndStyle>, + borderBlockEndWidth?: Property$BorderBlockEndWidth<TLength> | Array<Property$BorderBlockEndWidth<TLength>>, + borderBlockStartColor?: Property$BorderBlockStartColor | Array<Property$BorderBlockStartColor>, + borderBlockStartStyle?: Property$BorderBlockStartStyle | Array<Property$BorderBlockStartStyle>, + borderBlockStartWidth?: Property$BorderBlockStartWidth<TLength> | Array<Property$BorderBlockStartWidth<TLength>>, + borderBlockStyle?: Property$BorderBlockStyle | Array<Property$BorderBlockStyle>, + borderBlockWidth?: Property$BorderBlockWidth<TLength> | Array<Property$BorderBlockWidth<TLength>>, + borderBottomColor?: Property$BorderBottomColor | Array<Property$BorderBottomColor>, + borderBottomLeftRadius?: Property$BorderBottomLeftRadius<TLength> | Array<Property$BorderBottomLeftRadius<TLength>>, + borderBottomRightRadius?: Property$BorderBottomRightRadius<TLength> | Array<Property$BorderBottomRightRadius<TLength>>, + borderBottomStyle?: Property$BorderBottomStyle | Array<Property$BorderBottomStyle>, + borderBottomWidth?: Property$BorderBottomWidth<TLength> | Array<Property$BorderBottomWidth<TLength>>, + borderCollapse?: Property$BorderCollapse | Array<Property$BorderCollapse>, + borderEndEndRadius?: Property$BorderEndEndRadius<TLength> | Array<Property$BorderEndEndRadius<TLength>>, + borderEndStartRadius?: Property$BorderEndStartRadius<TLength> | Array<Property$BorderEndStartRadius<TLength>>, + borderImageOutset?: Property$BorderImageOutset<TLength> | Array<Property$BorderImageOutset<TLength>>, + borderImageRepeat?: Property$BorderImageRepeat | Array<Property$BorderImageRepeat>, + borderImageSlice?: Property$BorderImageSlice | Array<Property$BorderImageSlice>, + borderImageSource?: Property$BorderImageSource | Array<Property$BorderImageSource>, + borderImageWidth?: Property$BorderImageWidth<TLength> | Array<Property$BorderImageWidth<TLength>>, + borderInlineColor?: Property$BorderInlineColor | Array<Property$BorderInlineColor>, + borderInlineEndColor?: Property$BorderInlineEndColor | Array<Property$BorderInlineEndColor>, + borderInlineEndStyle?: Property$BorderInlineEndStyle | Array<Property$BorderInlineEndStyle>, + borderInlineEndWidth?: Property$BorderInlineEndWidth<TLength> | Array<Property$BorderInlineEndWidth<TLength>>, + borderInlineStartColor?: Property$BorderInlineStartColor | Array<Property$BorderInlineStartColor>, + borderInlineStartStyle?: Property$BorderInlineStartStyle | Array<Property$BorderInlineStartStyle>, + borderInlineStartWidth?: Property$BorderInlineStartWidth<TLength> | Array<Property$BorderInlineStartWidth<TLength>>, + borderInlineStyle?: Property$BorderInlineStyle | Array<Property$BorderInlineStyle>, + borderInlineWidth?: Property$BorderInlineWidth<TLength> | Array<Property$BorderInlineWidth<TLength>>, + borderLeftColor?: Property$BorderLeftColor | Array<Property$BorderLeftColor>, + borderLeftStyle?: Property$BorderLeftStyle | Array<Property$BorderLeftStyle>, + borderLeftWidth?: Property$BorderLeftWidth<TLength> | Array<Property$BorderLeftWidth<TLength>>, + borderRightColor?: Property$BorderRightColor | Array<Property$BorderRightColor>, + borderRightStyle?: Property$BorderRightStyle | Array<Property$BorderRightStyle>, + borderRightWidth?: Property$BorderRightWidth<TLength> | Array<Property$BorderRightWidth<TLength>>, + borderSpacing?: Property$BorderSpacing<TLength> | Array<Property$BorderSpacing<TLength>>, + borderStartEndRadius?: Property$BorderStartEndRadius<TLength> | Array<Property$BorderStartEndRadius<TLength>>, + borderStartStartRadius?: Property$BorderStartStartRadius<TLength> | Array<Property$BorderStartStartRadius<TLength>>, + borderTopColor?: Property$BorderTopColor | Array<Property$BorderTopColor>, + borderTopLeftRadius?: Property$BorderTopLeftRadius<TLength> | Array<Property$BorderTopLeftRadius<TLength>>, + borderTopRightRadius?: Property$BorderTopRightRadius<TLength> | Array<Property$BorderTopRightRadius<TLength>>, + borderTopStyle?: Property$BorderTopStyle | Array<Property$BorderTopStyle>, + borderTopWidth?: Property$BorderTopWidth<TLength> | Array<Property$BorderTopWidth<TLength>>, + bottom?: Property$Bottom<TLength> | Array<Property$Bottom<TLength>>, + boxDecorationBreak?: Property$BoxDecorationBreak | Array<Property$BoxDecorationBreak>, + boxShadow?: Property$BoxShadow | Array<Property$BoxShadow>, + boxSizing?: Property$BoxSizing | Array<Property$BoxSizing>, + breakAfter?: Property$BreakAfter | Array<Property$BreakAfter>, + breakBefore?: Property$BreakBefore | Array<Property$BreakBefore>, + breakInside?: Property$BreakInside | Array<Property$BreakInside>, + captionSide?: Property$CaptionSide | Array<Property$CaptionSide>, + caretColor?: Property$CaretColor | Array<Property$CaretColor>, + caretShape?: Property$CaretShape | Array<Property$CaretShape>, + clear?: Property$Clear | Array<Property$Clear>, + clipPath?: Property$ClipPath | Array<Property$ClipPath>, + color?: Property$Color | Array<Property$Color>, + colorAdjust?: Property$PrintColorAdjust | Array<Property$PrintColorAdjust>, + colorScheme?: Property$ColorScheme | Array<Property$ColorScheme>, + columnCount?: Property$ColumnCount | Array<Property$ColumnCount>, + columnFill?: Property$ColumnFill | Array<Property$ColumnFill>, + columnGap?: Property$ColumnGap<TLength> | Array<Property$ColumnGap<TLength>>, + columnRuleColor?: Property$ColumnRuleColor | Array<Property$ColumnRuleColor>, + columnRuleStyle?: Property$ColumnRuleStyle | Array<Property$ColumnRuleStyle>, + columnRuleWidth?: Property$ColumnRuleWidth<TLength> | Array<Property$ColumnRuleWidth<TLength>>, + columnSpan?: Property$ColumnSpan | Array<Property$ColumnSpan>, + columnWidth?: Property$ColumnWidth<TLength> | Array<Property$ColumnWidth<TLength>>, + contain?: Property$Contain | Array<Property$Contain>, + containIntrinsicBlockSize?: Property$ContainIntrinsicBlockSize<TLength> | Array<Property$ContainIntrinsicBlockSize<TLength>>, + containIntrinsicHeight?: Property$ContainIntrinsicHeight<TLength> | Array<Property$ContainIntrinsicHeight<TLength>>, + containIntrinsicInlineSize?: Property$ContainIntrinsicInlineSize<TLength> | Array<Property$ContainIntrinsicInlineSize<TLength>>, + containIntrinsicWidth?: Property$ContainIntrinsicWidth<TLength> | Array<Property$ContainIntrinsicWidth<TLength>>, + containerName?: Property$ContainerName | Array<Property$ContainerName>, + containerType?: Property$ContainerType | Array<Property$ContainerType>, + content?: Property$Content | Array<Property$Content>, + contentVisibility?: Property$ContentVisibility | Array<Property$ContentVisibility>, + counterIncrement?: Property$CounterIncrement | Array<Property$CounterIncrement>, + counterReset?: Property$CounterReset | Array<Property$CounterReset>, + counterSet?: Property$CounterSet | Array<Property$CounterSet>, + cursor?: Property$Cursor | Array<Property$Cursor>, + direction?: Property$Direction | Array<Property$Direction>, + display?: Property$Display | Array<Property$Display>, + emptyCells?: Property$EmptyCells | Array<Property$EmptyCells>, + filter?: Property$Filter | Array<Property$Filter>, + flexBasis?: Property$FlexBasis<TLength> | Array<Property$FlexBasis<TLength>>, + flexDirection?: Property$FlexDirection | Array<Property$FlexDirection>, + flexGrow?: Property$FlexGrow | Array<Property$FlexGrow>, + flexShrink?: Property$FlexShrink | Array<Property$FlexShrink>, + flexWrap?: Property$FlexWrap | Array<Property$FlexWrap>, + float?: Property$Float | Array<Property$Float>, + fontFamily?: Property$FontFamily | Array<Property$FontFamily>, + fontFeatureSettings?: Property$FontFeatureSettings | Array<Property$FontFeatureSettings>, + fontKerning?: Property$FontKerning | Array<Property$FontKerning>, + fontLanguageOverride?: Property$FontLanguageOverride | Array<Property$FontLanguageOverride>, + fontOpticalSizing?: Property$FontOpticalSizing | Array<Property$FontOpticalSizing>, + fontPalette?: Property$FontPalette | Array<Property$FontPalette>, + fontSize?: Property$FontSize<TLength> | Array<Property$FontSize<TLength>>, + fontSizeAdjust?: Property$FontSizeAdjust | Array<Property$FontSizeAdjust>, + fontSmooth?: Property$FontSmooth<TLength> | Array<Property$FontSmooth<TLength>>, + fontStretch?: Property$FontStretch | Array<Property$FontStretch>, + fontStyle?: Property$FontStyle | Array<Property$FontStyle>, + fontSynthesis?: Property$FontSynthesis | Array<Property$FontSynthesis>, + fontSynthesisPosition?: Property$FontSynthesisPosition | Array<Property$FontSynthesisPosition>, + fontSynthesisSmallCaps?: Property$FontSynthesisSmallCaps | Array<Property$FontSynthesisSmallCaps>, + fontSynthesisStyle?: Property$FontSynthesisStyle | Array<Property$FontSynthesisStyle>, + fontSynthesisWeight?: Property$FontSynthesisWeight | Array<Property$FontSynthesisWeight>, + fontVariant?: Property$FontVariant | Array<Property$FontVariant>, + fontVariantAlternates?: Property$FontVariantAlternates | Array<Property$FontVariantAlternates>, + fontVariantCaps?: Property$FontVariantCaps | Array<Property$FontVariantCaps>, + fontVariantEastAsian?: Property$FontVariantEastAsian | Array<Property$FontVariantEastAsian>, + fontVariantEmoji?: Property$FontVariantEmoji | Array<Property$FontVariantEmoji>, + fontVariantLigatures?: Property$FontVariantLigatures | Array<Property$FontVariantLigatures>, + fontVariantNumeric?: Property$FontVariantNumeric | Array<Property$FontVariantNumeric>, + fontVariantPosition?: Property$FontVariantPosition | Array<Property$FontVariantPosition>, + fontVariationSettings?: Property$FontVariationSettings | Array<Property$FontVariationSettings>, + fontWeight?: Property$FontWeight | Array<Property$FontWeight>, + forcedColorAdjust?: Property$ForcedColorAdjust | Array<Property$ForcedColorAdjust>, + gridAutoColumns?: Property$GridAutoColumns<TLength> | Array<Property$GridAutoColumns<TLength>>, + gridAutoFlow?: Property$GridAutoFlow | Array<Property$GridAutoFlow>, + gridAutoRows?: Property$GridAutoRows<TLength> | Array<Property$GridAutoRows<TLength>>, + gridColumnEnd?: Property$GridColumnEnd | Array<Property$GridColumnEnd>, + gridColumnStart?: Property$GridColumnStart | Array<Property$GridColumnStart>, + gridRowEnd?: Property$GridRowEnd | Array<Property$GridRowEnd>, + gridRowStart?: Property$GridRowStart | Array<Property$GridRowStart>, + gridTemplateAreas?: Property$GridTemplateAreas | Array<Property$GridTemplateAreas>, + gridTemplateColumns?: Property$GridTemplateColumns<TLength> | Array<Property$GridTemplateColumns<TLength>>, + gridTemplateRows?: Property$GridTemplateRows<TLength> | Array<Property$GridTemplateRows<TLength>>, + hangingPunctuation?: Property$HangingPunctuation | Array<Property$HangingPunctuation>, + height?: Property$Height<TLength> | Array<Property$Height<TLength>>, + hyphenateCharacter?: Property$HyphenateCharacter | Array<Property$HyphenateCharacter>, + hyphenateLimitChars?: Property$HyphenateLimitChars | Array<Property$HyphenateLimitChars>, + hyphens?: Property$Hyphens | Array<Property$Hyphens>, + imageOrientation?: Property$ImageOrientation | Array<Property$ImageOrientation>, + imageRendering?: Property$ImageRendering | Array<Property$ImageRendering>, + imageResolution?: Property$ImageResolution | Array<Property$ImageResolution>, + initialLetter?: Property$InitialLetter | Array<Property$InitialLetter>, + inlineSize?: Property$InlineSize<TLength> | Array<Property$InlineSize<TLength>>, + inputSecurity?: Property$InputSecurity | Array<Property$InputSecurity>, + insetBlockEnd?: Property$InsetBlockEnd<TLength> | Array<Property$InsetBlockEnd<TLength>>, + insetBlockStart?: Property$InsetBlockStart<TLength> | Array<Property$InsetBlockStart<TLength>>, + insetInlineEnd?: Property$InsetInlineEnd<TLength> | Array<Property$InsetInlineEnd<TLength>>, + insetInlineStart?: Property$InsetInlineStart<TLength> | Array<Property$InsetInlineStart<TLength>>, + isolation?: Property$Isolation | Array<Property$Isolation>, + justifyContent?: Property$JustifyContent | Array<Property$JustifyContent>, + justifyItems?: Property$JustifyItems | Array<Property$JustifyItems>, + justifySelf?: Property$JustifySelf | Array<Property$JustifySelf>, + justifyTracks?: Property$JustifyTracks | Array<Property$JustifyTracks>, + left?: Property$Left<TLength> | Array<Property$Left<TLength>>, + letterSpacing?: Property$LetterSpacing<TLength> | Array<Property$LetterSpacing<TLength>>, + lineBreak?: Property$LineBreak | Array<Property$LineBreak>, + lineHeight?: Property$LineHeight<TLength> | Array<Property$LineHeight<TLength>>, + lineHeightStep?: Property$LineHeightStep<TLength> | Array<Property$LineHeightStep<TLength>>, + listStyleImage?: Property$ListStyleImage | Array<Property$ListStyleImage>, + listStylePosition?: Property$ListStylePosition | Array<Property$ListStylePosition>, + listStyleType?: Property$ListStyleType | Array<Property$ListStyleType>, + marginBlockEnd?: Property$MarginBlockEnd<TLength> | Array<Property$MarginBlockEnd<TLength>>, + marginBlockStart?: Property$MarginBlockStart<TLength> | Array<Property$MarginBlockStart<TLength>>, + marginBottom?: Property$MarginBottom<TLength> | Array<Property$MarginBottom<TLength>>, + marginInlineEnd?: Property$MarginInlineEnd<TLength> | Array<Property$MarginInlineEnd<TLength>>, + marginInlineStart?: Property$MarginInlineStart<TLength> | Array<Property$MarginInlineStart<TLength>>, + marginLeft?: Property$MarginLeft<TLength> | Array<Property$MarginLeft<TLength>>, + marginRight?: Property$MarginRight<TLength> | Array<Property$MarginRight<TLength>>, + marginTop?: Property$MarginTop<TLength> | Array<Property$MarginTop<TLength>>, + marginTrim?: Property$MarginTrim | Array<Property$MarginTrim>, + maskBorderMode?: Property$MaskBorderMode | Array<Property$MaskBorderMode>, + maskBorderOutset?: Property$MaskBorderOutset<TLength> | Array<Property$MaskBorderOutset<TLength>>, + maskBorderRepeat?: Property$MaskBorderRepeat | Array<Property$MaskBorderRepeat>, + maskBorderSlice?: Property$MaskBorderSlice | Array<Property$MaskBorderSlice>, + maskBorderSource?: Property$MaskBorderSource | Array<Property$MaskBorderSource>, + maskBorderWidth?: Property$MaskBorderWidth<TLength> | Array<Property$MaskBorderWidth<TLength>>, + maskClip?: Property$MaskClip | Array<Property$MaskClip>, + maskComposite?: Property$MaskComposite | Array<Property$MaskComposite>, + maskImage?: Property$MaskImage | Array<Property$MaskImage>, + maskMode?: Property$MaskMode | Array<Property$MaskMode>, + maskOrigin?: Property$MaskOrigin | Array<Property$MaskOrigin>, + maskPosition?: Property$MaskPosition<TLength> | Array<Property$MaskPosition<TLength>>, + maskRepeat?: Property$MaskRepeat | Array<Property$MaskRepeat>, + maskSize?: Property$MaskSize<TLength> | Array<Property$MaskSize<TLength>>, + maskType?: Property$MaskType | Array<Property$MaskType>, + masonryAutoFlow?: Property$MasonryAutoFlow | Array<Property$MasonryAutoFlow>, + mathDepth?: Property$MathDepth | Array<Property$MathDepth>, + mathShift?: Property$MathShift | Array<Property$MathShift>, + mathStyle?: Property$MathStyle | Array<Property$MathStyle>, + maxBlockSize?: Property$MaxBlockSize<TLength> | Array<Property$MaxBlockSize<TLength>>, + maxHeight?: Property$MaxHeight<TLength> | Array<Property$MaxHeight<TLength>>, + maxInlineSize?: Property$MaxInlineSize<TLength> | Array<Property$MaxInlineSize<TLength>>, + maxLines?: Property$MaxLines | Array<Property$MaxLines>, + maxWidth?: Property$MaxWidth<TLength> | Array<Property$MaxWidth<TLength>>, + minBlockSize?: Property$MinBlockSize<TLength> | Array<Property$MinBlockSize<TLength>>, + minHeight?: Property$MinHeight<TLength> | Array<Property$MinHeight<TLength>>, + minInlineSize?: Property$MinInlineSize<TLength> | Array<Property$MinInlineSize<TLength>>, + minWidth?: Property$MinWidth<TLength> | Array<Property$MinWidth<TLength>>, + mixBlendMode?: Property$MixBlendMode | Array<Property$MixBlendMode>, + motionDistance?: Property$OffsetDistance<TLength> | Array<Property$OffsetDistance<TLength>>, + motionPath?: Property$OffsetPath | Array<Property$OffsetPath>, + motionRotation?: Property$OffsetRotate | Array<Property$OffsetRotate>, + objectFit?: Property$ObjectFit | Array<Property$ObjectFit>, + objectPosition?: Property$ObjectPosition<TLength> | Array<Property$ObjectPosition<TLength>>, + offsetAnchor?: Property$OffsetAnchor<TLength> | Array<Property$OffsetAnchor<TLength>>, + offsetDistance?: Property$OffsetDistance<TLength> | Array<Property$OffsetDistance<TLength>>, + offsetPath?: Property$OffsetPath | Array<Property$OffsetPath>, + offsetPosition?: Property$OffsetPosition<TLength> | Array<Property$OffsetPosition<TLength>>, + offsetRotate?: Property$OffsetRotate | Array<Property$OffsetRotate>, + offsetRotation?: Property$OffsetRotate | Array<Property$OffsetRotate>, + opacity?: Property$Opacity | Array<Property$Opacity>, + order?: Property$Order | Array<Property$Order>, + orphans?: Property$Orphans | Array<Property$Orphans>, + outlineColor?: Property$OutlineColor | Array<Property$OutlineColor>, + outlineOffset?: Property$OutlineOffset<TLength> | Array<Property$OutlineOffset<TLength>>, + outlineStyle?: Property$OutlineStyle | Array<Property$OutlineStyle>, + outlineWidth?: Property$OutlineWidth<TLength> | Array<Property$OutlineWidth<TLength>>, + overflowAnchor?: Property$OverflowAnchor | Array<Property$OverflowAnchor>, + overflowBlock?: Property$OverflowBlock | Array<Property$OverflowBlock>, + overflowClipBox?: Property$OverflowClipBox | Array<Property$OverflowClipBox>, + overflowClipMargin?: Property$OverflowClipMargin<TLength> | Array<Property$OverflowClipMargin<TLength>>, + overflowInline?: Property$OverflowInline | Array<Property$OverflowInline>, + overflowWrap?: Property$OverflowWrap | Array<Property$OverflowWrap>, + overflowX?: Property$OverflowX | Array<Property$OverflowX>, + overflowY?: Property$OverflowY | Array<Property$OverflowY>, + overlay?: Property$Overlay | Array<Property$Overlay>, + overscrollBehaviorBlock?: Property$OverscrollBehaviorBlock | Array<Property$OverscrollBehaviorBlock>, + overscrollBehaviorInline?: Property$OverscrollBehaviorInline | Array<Property$OverscrollBehaviorInline>, + overscrollBehaviorX?: Property$OverscrollBehaviorX | Array<Property$OverscrollBehaviorX>, + overscrollBehaviorY?: Property$OverscrollBehaviorY | Array<Property$OverscrollBehaviorY>, + paddingBlockEnd?: Property$PaddingBlockEnd<TLength> | Array<Property$PaddingBlockEnd<TLength>>, + paddingBlockStart?: Property$PaddingBlockStart<TLength> | Array<Property$PaddingBlockStart<TLength>>, + paddingBottom?: Property$PaddingBottom<TLength> | Array<Property$PaddingBottom<TLength>>, + paddingInlineEnd?: Property$PaddingInlineEnd<TLength> | Array<Property$PaddingInlineEnd<TLength>>, + paddingInlineStart?: Property$PaddingInlineStart<TLength> | Array<Property$PaddingInlineStart<TLength>>, + paddingLeft?: Property$PaddingLeft<TLength> | Array<Property$PaddingLeft<TLength>>, + paddingRight?: Property$PaddingRight<TLength> | Array<Property$PaddingRight<TLength>>, + paddingTop?: Property$PaddingTop<TLength> | Array<Property$PaddingTop<TLength>>, + page?: Property$Page | Array<Property$Page>, + pageBreakAfter?: Property$PageBreakAfter | Array<Property$PageBreakAfter>, + pageBreakBefore?: Property$PageBreakBefore | Array<Property$PageBreakBefore>, + pageBreakInside?: Property$PageBreakInside | Array<Property$PageBreakInside>, + paintOrder?: Property$PaintOrder | Array<Property$PaintOrder>, + perspective?: Property$Perspective<TLength> | Array<Property$Perspective<TLength>>, + perspectiveOrigin?: Property$PerspectiveOrigin<TLength> | Array<Property$PerspectiveOrigin<TLength>>, + pointerEvents?: Property$PointerEvents | Array<Property$PointerEvents>, + position?: Property$Position | Array<Property$Position>, + printColorAdjust?: Property$PrintColorAdjust | Array<Property$PrintColorAdjust>, + quotes?: Property$Quotes | Array<Property$Quotes>, + resize?: Property$Resize | Array<Property$Resize>, + right?: Property$Right<TLength> | Array<Property$Right<TLength>>, + rotate?: Property$Rotate | Array<Property$Rotate>, + rowGap?: Property$RowGap<TLength> | Array<Property$RowGap<TLength>>, + rubyAlign?: Property$RubyAlign | Array<Property$RubyAlign>, + rubyMerge?: Property$RubyMerge | Array<Property$RubyMerge>, + rubyPosition?: Property$RubyPosition | Array<Property$RubyPosition>, + scale?: Property$Scale | Array<Property$Scale>, + scrollBehavior?: Property$ScrollBehavior | Array<Property$ScrollBehavior>, + scrollMarginBlockEnd?: Property$ScrollMarginBlockEnd<TLength> | Array<Property$ScrollMarginBlockEnd<TLength>>, + scrollMarginBlockStart?: Property$ScrollMarginBlockStart<TLength> | Array<Property$ScrollMarginBlockStart<TLength>>, + scrollMarginBottom?: Property$ScrollMarginBottom<TLength> | Array<Property$ScrollMarginBottom<TLength>>, + scrollMarginInlineEnd?: Property$ScrollMarginInlineEnd<TLength> | Array<Property$ScrollMarginInlineEnd<TLength>>, + scrollMarginInlineStart?: Property$ScrollMarginInlineStart<TLength> | Array<Property$ScrollMarginInlineStart<TLength>>, + scrollMarginLeft?: Property$ScrollMarginLeft<TLength> | Array<Property$ScrollMarginLeft<TLength>>, + scrollMarginRight?: Property$ScrollMarginRight<TLength> | Array<Property$ScrollMarginRight<TLength>>, + scrollMarginTop?: Property$ScrollMarginTop<TLength> | Array<Property$ScrollMarginTop<TLength>>, + scrollPaddingBlockEnd?: Property$ScrollPaddingBlockEnd<TLength> | Array<Property$ScrollPaddingBlockEnd<TLength>>, + scrollPaddingBlockStart?: Property$ScrollPaddingBlockStart<TLength> | Array<Property$ScrollPaddingBlockStart<TLength>>, + scrollPaddingBottom?: Property$ScrollPaddingBottom<TLength> | Array<Property$ScrollPaddingBottom<TLength>>, + scrollPaddingInlineEnd?: Property$ScrollPaddingInlineEnd<TLength> | Array<Property$ScrollPaddingInlineEnd<TLength>>, + scrollPaddingInlineStart?: Property$ScrollPaddingInlineStart<TLength> | Array<Property$ScrollPaddingInlineStart<TLength>>, + scrollPaddingLeft?: Property$ScrollPaddingLeft<TLength> | Array<Property$ScrollPaddingLeft<TLength>>, + scrollPaddingRight?: Property$ScrollPaddingRight<TLength> | Array<Property$ScrollPaddingRight<TLength>>, + scrollPaddingTop?: Property$ScrollPaddingTop<TLength> | Array<Property$ScrollPaddingTop<TLength>>, + scrollSnapAlign?: Property$ScrollSnapAlign | Array<Property$ScrollSnapAlign>, + scrollSnapMarginBottom?: Property$ScrollMarginBottom<TLength> | Array<Property$ScrollMarginBottom<TLength>>, + scrollSnapMarginLeft?: Property$ScrollMarginLeft<TLength> | Array<Property$ScrollMarginLeft<TLength>>, + scrollSnapMarginRight?: Property$ScrollMarginRight<TLength> | Array<Property$ScrollMarginRight<TLength>>, + scrollSnapMarginTop?: Property$ScrollMarginTop<TLength> | Array<Property$ScrollMarginTop<TLength>>, + scrollSnapStop?: Property$ScrollSnapStop | Array<Property$ScrollSnapStop>, + scrollSnapType?: Property$ScrollSnapType | Array<Property$ScrollSnapType>, + scrollTimelineAxis?: Property$ScrollTimelineAxis | Array<Property$ScrollTimelineAxis>, + scrollTimelineName?: Property$ScrollTimelineName | Array<Property$ScrollTimelineName>, + scrollbarColor?: Property$ScrollbarColor | Array<Property$ScrollbarColor>, + scrollbarGutter?: Property$ScrollbarGutter | Array<Property$ScrollbarGutter>, + scrollbarWidth?: Property$ScrollbarWidth | Array<Property$ScrollbarWidth>, + shapeImageThreshold?: Property$ShapeImageThreshold | Array<Property$ShapeImageThreshold>, + shapeMargin?: Property$ShapeMargin<TLength> | Array<Property$ShapeMargin<TLength>>, + shapeOutside?: Property$ShapeOutside | Array<Property$ShapeOutside>, + tabSize?: Property$TabSize<TLength> | Array<Property$TabSize<TLength>>, + tableLayout?: Property$TableLayout | Array<Property$TableLayout>, + textAlign?: Property$TextAlign | Array<Property$TextAlign>, + textAlignLast?: Property$TextAlignLast | Array<Property$TextAlignLast>, + textCombineUpright?: Property$TextCombineUpright | Array<Property$TextCombineUpright>, + textDecorationColor?: Property$TextDecorationColor | Array<Property$TextDecorationColor>, + textDecorationLine?: Property$TextDecorationLine | Array<Property$TextDecorationLine>, + textDecorationSkip?: Property$TextDecorationSkip | Array<Property$TextDecorationSkip>, + textDecorationSkipInk?: Property$TextDecorationSkipInk | Array<Property$TextDecorationSkipInk>, + textDecorationStyle?: Property$TextDecorationStyle | Array<Property$TextDecorationStyle>, + textDecorationThickness?: Property$TextDecorationThickness<TLength> | Array<Property$TextDecorationThickness<TLength>>, + textEmphasisColor?: Property$TextEmphasisColor | Array<Property$TextEmphasisColor>, + textEmphasisPosition?: Property$TextEmphasisPosition | Array<Property$TextEmphasisPosition>, + textEmphasisStyle?: Property$TextEmphasisStyle | Array<Property$TextEmphasisStyle>, + textIndent?: Property$TextIndent<TLength> | Array<Property$TextIndent<TLength>>, + textJustify?: Property$TextJustify | Array<Property$TextJustify>, + textOrientation?: Property$TextOrientation | Array<Property$TextOrientation>, + textOverflow?: Property$TextOverflow | Array<Property$TextOverflow>, + textRendering?: Property$TextRendering | Array<Property$TextRendering>, + textShadow?: Property$TextShadow | Array<Property$TextShadow>, + textSizeAdjust?: Property$TextSizeAdjust | Array<Property$TextSizeAdjust>, + textTransform?: Property$TextTransform | Array<Property$TextTransform>, + textUnderlineOffset?: Property$TextUnderlineOffset<TLength> | Array<Property$TextUnderlineOffset<TLength>>, + textUnderlinePosition?: Property$TextUnderlinePosition | Array<Property$TextUnderlinePosition>, + textWrap?: Property$TextWrap | Array<Property$TextWrap>, + timelineScope?: Property$TimelineScope | Array<Property$TimelineScope>, + top?: Property$Top<TLength> | Array<Property$Top<TLength>>, + touchAction?: Property$TouchAction | Array<Property$TouchAction>, + transform?: Property$Transform | Array<Property$Transform>, + transformBox?: Property$TransformBox | Array<Property$TransformBox>, + transformOrigin?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + transformStyle?: Property$TransformStyle | Array<Property$TransformStyle>, + transitionBehavior?: Property$TransitionBehavior | Array<Property$TransitionBehavior>, + transitionDelay?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + transitionDuration?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + transitionProperty?: Property$TransitionProperty | Array<Property$TransitionProperty>, + transitionTimingFunction?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + translate?: Property$Translate<TLength> | Array<Property$Translate<TLength>>, + unicodeBidi?: Property$UnicodeBidi | Array<Property$UnicodeBidi>, + userSelect?: Property$UserSelect | Array<Property$UserSelect>, + verticalAlign?: Property$VerticalAlign<TLength> | Array<Property$VerticalAlign<TLength>>, + viewTimelineAxis?: Property$ViewTimelineAxis | Array<Property$ViewTimelineAxis>, + viewTimelineInset?: Property$ViewTimelineInset<TLength> | Array<Property$ViewTimelineInset<TLength>>, + viewTimelineName?: Property$ViewTimelineName | Array<Property$ViewTimelineName>, + viewTransitionName?: Property$ViewTransitionName | Array<Property$ViewTransitionName>, + visibility?: Property$Visibility | Array<Property$Visibility>, + whiteSpace?: Property$WhiteSpace | Array<Property$WhiteSpace>, + whiteSpaceCollapse?: Property$WhiteSpaceCollapse | Array<Property$WhiteSpaceCollapse>, + whiteSpaceTrim?: Property$WhiteSpaceTrim | Array<Property$WhiteSpaceTrim>, + widows?: Property$Widows | Array<Property$Widows>, + width?: Property$Width<TLength> | Array<Property$Width<TLength>>, + willChange?: Property$WillChange | Array<Property$WillChange>, + wordBreak?: Property$WordBreak | Array<Property$WordBreak>, + wordSpacing?: Property$WordSpacing<TLength> | Array<Property$WordSpacing<TLength>>, + wordWrap?: Property$WordWrap | Array<Property$WordWrap>, + writingMode?: Property$WritingMode | Array<Property$WritingMode>, + zIndex?: Property$ZIndex | Array<Property$ZIndex>, + zoom?: Property$Zoom | Array<Property$Zoom>, +|}; + +export type StandardShorthandPropertiesFallback<TLength = string | 0, TTime = string> = {| + all?: Property$All | Array<Property$All>, + animation?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, + animationRange?: Property$AnimationRange<TLength> | Array<Property$AnimationRange<TLength>>, + background?: Property$Background<TLength> | Array<Property$Background<TLength>>, + backgroundPosition?: Property$BackgroundPosition<TLength> | Array<Property$BackgroundPosition<TLength>>, + border?: Property$Border<TLength> | Array<Property$Border<TLength>>, + borderBlock?: Property$BorderBlock<TLength> | Array<Property$BorderBlock<TLength>>, + borderBlockEnd?: Property$BorderBlockEnd<TLength> | Array<Property$BorderBlockEnd<TLength>>, + borderBlockStart?: Property$BorderBlockStart<TLength> | Array<Property$BorderBlockStart<TLength>>, + borderBottom?: Property$BorderBottom<TLength> | Array<Property$BorderBottom<TLength>>, + borderColor?: Property$BorderColor | Array<Property$BorderColor>, + borderImage?: Property$BorderImage | Array<Property$BorderImage>, + borderInline?: Property$BorderInline<TLength> | Array<Property$BorderInline<TLength>>, + borderInlineEnd?: Property$BorderInlineEnd<TLength> | Array<Property$BorderInlineEnd<TLength>>, + borderInlineStart?: Property$BorderInlineStart<TLength> | Array<Property$BorderInlineStart<TLength>>, + borderLeft?: Property$BorderLeft<TLength> | Array<Property$BorderLeft<TLength>>, + borderRadius?: Property$BorderRadius<TLength> | Array<Property$BorderRadius<TLength>>, + borderRight?: Property$BorderRight<TLength> | Array<Property$BorderRight<TLength>>, + borderStyle?: Property$BorderStyle | Array<Property$BorderStyle>, + borderTop?: Property$BorderTop<TLength> | Array<Property$BorderTop<TLength>>, + borderWidth?: Property$BorderWidth<TLength> | Array<Property$BorderWidth<TLength>>, + caret?: Property$Caret | Array<Property$Caret>, + columnRule?: Property$ColumnRule<TLength> | Array<Property$ColumnRule<TLength>>, + columns?: Property$Columns<TLength> | Array<Property$Columns<TLength>>, + containIntrinsicSize?: Property$ContainIntrinsicSize<TLength> | Array<Property$ContainIntrinsicSize<TLength>>, + container?: Property$Container | Array<Property$Container>, + flex?: Property$Flex<TLength> | Array<Property$Flex<TLength>>, + flexFlow?: Property$FlexFlow | Array<Property$FlexFlow>, + font?: Property$Font | Array<Property$Font>, + gap?: Property$Gap<TLength> | Array<Property$Gap<TLength>>, + grid?: Property$Grid | Array<Property$Grid>, + gridArea?: Property$GridArea | Array<Property$GridArea>, + gridColumn?: Property$GridColumn | Array<Property$GridColumn>, + gridRow?: Property$GridRow | Array<Property$GridRow>, + gridTemplate?: Property$GridTemplate | Array<Property$GridTemplate>, + inset?: Property$Inset<TLength> | Array<Property$Inset<TLength>>, + insetBlock?: Property$InsetBlock<TLength> | Array<Property$InsetBlock<TLength>>, + insetInline?: Property$InsetInline<TLength> | Array<Property$InsetInline<TLength>>, + lineClamp?: Property$LineClamp | Array<Property$LineClamp>, + listStyle?: Property$ListStyle | Array<Property$ListStyle>, + margin?: Property$Margin<TLength> | Array<Property$Margin<TLength>>, + marginBlock?: Property$MarginBlock<TLength> | Array<Property$MarginBlock<TLength>>, + marginInline?: Property$MarginInline<TLength> | Array<Property$MarginInline<TLength>>, + mask?: Property$Mask<TLength> | Array<Property$Mask<TLength>>, + maskBorder?: Property$MaskBorder | Array<Property$MaskBorder>, + motion?: Property$Offset<TLength> | Array<Property$Offset<TLength>>, + offset?: Property$Offset<TLength> | Array<Property$Offset<TLength>>, + outline?: Property$Outline<TLength> | Array<Property$Outline<TLength>>, + overflow?: Property$Overflow | Array<Property$Overflow>, + overscrollBehavior?: Property$OverscrollBehavior | Array<Property$OverscrollBehavior>, + padding?: Property$Padding<TLength> | Array<Property$Padding<TLength>>, + paddingBlock?: Property$PaddingBlock<TLength> | Array<Property$PaddingBlock<TLength>>, + paddingInline?: Property$PaddingInline<TLength> | Array<Property$PaddingInline<TLength>>, + placeContent?: Property$PlaceContent | Array<Property$PlaceContent>, + placeItems?: Property$PlaceItems | Array<Property$PlaceItems>, + placeSelf?: Property$PlaceSelf | Array<Property$PlaceSelf>, + scrollMargin?: Property$ScrollMargin<TLength> | Array<Property$ScrollMargin<TLength>>, + scrollMarginBlock?: Property$ScrollMarginBlock<TLength> | Array<Property$ScrollMarginBlock<TLength>>, + scrollMarginInline?: Property$ScrollMarginInline<TLength> | Array<Property$ScrollMarginInline<TLength>>, + scrollPadding?: Property$ScrollPadding<TLength> | Array<Property$ScrollPadding<TLength>>, + scrollPaddingBlock?: Property$ScrollPaddingBlock<TLength> | Array<Property$ScrollPaddingBlock<TLength>>, + scrollPaddingInline?: Property$ScrollPaddingInline<TLength> | Array<Property$ScrollPaddingInline<TLength>>, + scrollSnapMargin?: Property$ScrollMargin<TLength> | Array<Property$ScrollMargin<TLength>>, + scrollTimeline?: Property$ScrollTimeline | Array<Property$ScrollTimeline>, + textDecoration?: Property$TextDecoration<TLength> | Array<Property$TextDecoration<TLength>>, + textEmphasis?: Property$TextEmphasis | Array<Property$TextEmphasis>, + transition?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, + viewTimeline?: Property$ViewTimeline | Array<Property$ViewTimeline>, +|}; + +export type StandardPropertiesFallback<TLength = string | 0, TTime = string> = {| + ...StandardLonghandPropertiesFallback<TLength, TTime>, + ...StandardShorthandPropertiesFallback<TLength, TTime>, +|}; + +export type VendorLonghandPropertiesFallback<TLength = string | 0, TTime = string> = {| + MozAnimationDelay?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, + MozAnimationDirection?: Property$AnimationDirection | Array<Property$AnimationDirection>, + MozAnimationDuration?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, + MozAnimationFillMode?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, + MozAnimationIterationCount?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, + MozAnimationName?: Property$AnimationName | Array<Property$AnimationName>, + MozAnimationPlayState?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, + MozAnimationTimingFunction?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, + MozAppearance?: Property$MozAppearance | Array<Property$MozAppearance>, + MozBinding?: Property$MozBinding | Array<Property$MozBinding>, + MozBorderBottomColors?: Property$MozBorderBottomColors | Array<Property$MozBorderBottomColors>, + MozBorderEndColor?: Property$BorderInlineEndColor | Array<Property$BorderInlineEndColor>, + MozBorderEndStyle?: Property$BorderInlineEndStyle | Array<Property$BorderInlineEndStyle>, + MozBorderEndWidth?: Property$BorderInlineEndWidth<TLength> | Array<Property$BorderInlineEndWidth<TLength>>, + MozBorderLeftColors?: Property$MozBorderLeftColors | Array<Property$MozBorderLeftColors>, + MozBorderRightColors?: Property$MozBorderRightColors | Array<Property$MozBorderRightColors>, + MozBorderStartColor?: Property$BorderInlineStartColor | Array<Property$BorderInlineStartColor>, + MozBorderStartStyle?: Property$BorderInlineStartStyle | Array<Property$BorderInlineStartStyle>, + MozBorderTopColors?: Property$MozBorderTopColors | Array<Property$MozBorderTopColors>, + MozBoxSizing?: Property$BoxSizing | Array<Property$BoxSizing>, + MozColumnCount?: Property$ColumnCount | Array<Property$ColumnCount>, + MozColumnFill?: Property$ColumnFill | Array<Property$ColumnFill>, + MozColumnRuleColor?: Property$ColumnRuleColor | Array<Property$ColumnRuleColor>, + MozColumnRuleStyle?: Property$ColumnRuleStyle | Array<Property$ColumnRuleStyle>, + MozColumnRuleWidth?: Property$ColumnRuleWidth<TLength> | Array<Property$ColumnRuleWidth<TLength>>, + MozColumnWidth?: Property$ColumnWidth<TLength> | Array<Property$ColumnWidth<TLength>>, + MozContextProperties?: Property$MozContextProperties | Array<Property$MozContextProperties>, + MozFontFeatureSettings?: Property$FontFeatureSettings | Array<Property$FontFeatureSettings>, + MozFontLanguageOverride?: Property$FontLanguageOverride | Array<Property$FontLanguageOverride>, + MozHyphens?: Property$Hyphens | Array<Property$Hyphens>, + MozImageRegion?: Property$MozImageRegion | Array<Property$MozImageRegion>, + MozMarginEnd?: Property$MarginInlineEnd<TLength> | Array<Property$MarginInlineEnd<TLength>>, + MozMarginStart?: Property$MarginInlineStart<TLength> | Array<Property$MarginInlineStart<TLength>>, + MozOrient?: Property$MozOrient | Array<Property$MozOrient>, + MozOsxFontSmoothing?: Property$FontSmooth<TLength> | Array<Property$FontSmooth<TLength>>, + MozOutlineRadiusBottomleft?: Property$MozOutlineRadiusBottomleft<TLength> | Array<Property$MozOutlineRadiusBottomleft<TLength>>, + MozOutlineRadiusBottomright?: Property$MozOutlineRadiusBottomright<TLength> | Array<Property$MozOutlineRadiusBottomright<TLength>>, + MozOutlineRadiusTopleft?: Property$MozOutlineRadiusTopleft<TLength> | Array<Property$MozOutlineRadiusTopleft<TLength>>, + MozOutlineRadiusTopright?: Property$MozOutlineRadiusTopright<TLength> | Array<Property$MozOutlineRadiusTopright<TLength>>, + MozPaddingEnd?: Property$PaddingInlineEnd<TLength> | Array<Property$PaddingInlineEnd<TLength>>, + MozPaddingStart?: Property$PaddingInlineStart<TLength> | Array<Property$PaddingInlineStart<TLength>>, + MozStackSizing?: Property$MozStackSizing | Array<Property$MozStackSizing>, + MozTabSize?: Property$TabSize<TLength> | Array<Property$TabSize<TLength>>, + MozTextBlink?: Property$MozTextBlink | Array<Property$MozTextBlink>, + MozTextSizeAdjust?: Property$TextSizeAdjust | Array<Property$TextSizeAdjust>, + MozUserFocus?: Property$MozUserFocus | Array<Property$MozUserFocus>, + MozUserModify?: Property$MozUserModify | Array<Property$MozUserModify>, + MozUserSelect?: Property$UserSelect | Array<Property$UserSelect>, + MozWindowDragging?: Property$MozWindowDragging | Array<Property$MozWindowDragging>, + MozWindowShadow?: Property$MozWindowShadow | Array<Property$MozWindowShadow>, + msAccelerator?: Property$MsAccelerator | Array<Property$MsAccelerator>, + msBlockProgression?: Property$MsBlockProgression | Array<Property$MsBlockProgression>, + msContentZoomChaining?: Property$MsContentZoomChaining | Array<Property$MsContentZoomChaining>, + msContentZoomLimitMax?: Property$MsContentZoomLimitMax | Array<Property$MsContentZoomLimitMax>, + msContentZoomLimitMin?: Property$MsContentZoomLimitMin | Array<Property$MsContentZoomLimitMin>, + msContentZoomSnapPoints?: Property$MsContentZoomSnapPoints | Array<Property$MsContentZoomSnapPoints>, + msContentZoomSnapType?: Property$MsContentZoomSnapType | Array<Property$MsContentZoomSnapType>, + msContentZooming?: Property$MsContentZooming | Array<Property$MsContentZooming>, + msFilter?: Property$MsFilter | Array<Property$MsFilter>, + msFlexDirection?: Property$FlexDirection | Array<Property$FlexDirection>, + msFlexPositive?: Property$FlexGrow | Array<Property$FlexGrow>, + msFlowFrom?: Property$MsFlowFrom | Array<Property$MsFlowFrom>, + msFlowInto?: Property$MsFlowInto | Array<Property$MsFlowInto>, + msGridColumns?: Property$MsGridColumns<TLength> | Array<Property$MsGridColumns<TLength>>, + msGridRows?: Property$MsGridRows<TLength> | Array<Property$MsGridRows<TLength>>, + msHighContrastAdjust?: Property$MsHighContrastAdjust | Array<Property$MsHighContrastAdjust>, + msHyphenateLimitChars?: Property$MsHyphenateLimitChars | Array<Property$MsHyphenateLimitChars>, + msHyphenateLimitLines?: Property$MsHyphenateLimitLines | Array<Property$MsHyphenateLimitLines>, + msHyphenateLimitZone?: Property$MsHyphenateLimitZone<TLength> | Array<Property$MsHyphenateLimitZone<TLength>>, + msHyphens?: Property$Hyphens | Array<Property$Hyphens>, + msImeAlign?: Property$MsImeAlign | Array<Property$MsImeAlign>, + msLineBreak?: Property$LineBreak | Array<Property$LineBreak>, + msOrder?: Property$Order | Array<Property$Order>, + msOverflowStyle?: Property$MsOverflowStyle | Array<Property$MsOverflowStyle>, + msOverflowX?: Property$OverflowX | Array<Property$OverflowX>, + msOverflowY?: Property$OverflowY | Array<Property$OverflowY>, + msScrollChaining?: Property$MsScrollChaining | Array<Property$MsScrollChaining>, + msScrollLimitXMax?: Property$MsScrollLimitXMax<TLength> | Array<Property$MsScrollLimitXMax<TLength>>, + msScrollLimitXMin?: Property$MsScrollLimitXMin<TLength> | Array<Property$MsScrollLimitXMin<TLength>>, + msScrollLimitYMax?: Property$MsScrollLimitYMax<TLength> | Array<Property$MsScrollLimitYMax<TLength>>, + msScrollLimitYMin?: Property$MsScrollLimitYMin<TLength> | Array<Property$MsScrollLimitYMin<TLength>>, + msScrollRails?: Property$MsScrollRails | Array<Property$MsScrollRails>, + msScrollSnapPointsX?: Property$MsScrollSnapPointsX | Array<Property$MsScrollSnapPointsX>, + msScrollSnapPointsY?: Property$MsScrollSnapPointsY | Array<Property$MsScrollSnapPointsY>, + msScrollSnapType?: Property$MsScrollSnapType | Array<Property$MsScrollSnapType>, + msScrollTranslation?: Property$MsScrollTranslation | Array<Property$MsScrollTranslation>, + msScrollbar3dlightColor?: Property$MsScrollbar3dlightColor | Array<Property$MsScrollbar3dlightColor>, + msScrollbarArrowColor?: Property$MsScrollbarArrowColor | Array<Property$MsScrollbarArrowColor>, + msScrollbarBaseColor?: Property$MsScrollbarBaseColor | Array<Property$MsScrollbarBaseColor>, + msScrollbarDarkshadowColor?: Property$MsScrollbarDarkshadowColor | Array<Property$MsScrollbarDarkshadowColor>, + msScrollbarFaceColor?: Property$MsScrollbarFaceColor | Array<Property$MsScrollbarFaceColor>, + msScrollbarHighlightColor?: Property$MsScrollbarHighlightColor | Array<Property$MsScrollbarHighlightColor>, + msScrollbarShadowColor?: Property$MsScrollbarShadowColor | Array<Property$MsScrollbarShadowColor>, + msScrollbarTrackColor?: Property$MsScrollbarTrackColor | Array<Property$MsScrollbarTrackColor>, + msTextAutospace?: Property$MsTextAutospace | Array<Property$MsTextAutospace>, + msTextCombineHorizontal?: Property$TextCombineUpright | Array<Property$TextCombineUpright>, + msTextOverflow?: Property$TextOverflow | Array<Property$TextOverflow>, + msTouchAction?: Property$TouchAction | Array<Property$TouchAction>, + msTouchSelect?: Property$MsTouchSelect | Array<Property$MsTouchSelect>, + msTransform?: Property$Transform | Array<Property$Transform>, + msTransformOrigin?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + msTransitionDelay?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + msTransitionDuration?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + msTransitionProperty?: Property$TransitionProperty | Array<Property$TransitionProperty>, + msTransitionTimingFunction?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + msUserSelect?: Property$MsUserSelect | Array<Property$MsUserSelect>, + msWordBreak?: Property$WordBreak | Array<Property$WordBreak>, + msWrapFlow?: Property$MsWrapFlow | Array<Property$MsWrapFlow>, + msWrapMargin?: Property$MsWrapMargin<TLength> | Array<Property$MsWrapMargin<TLength>>, + msWrapThrough?: Property$MsWrapThrough | Array<Property$MsWrapThrough>, + msWritingMode?: Property$WritingMode | Array<Property$WritingMode>, + WebkitAlignContent?: Property$AlignContent | Array<Property$AlignContent>, + WebkitAlignItems?: Property$AlignItems | Array<Property$AlignItems>, + WebkitAlignSelf?: Property$AlignSelf | Array<Property$AlignSelf>, + WebkitAnimationDelay?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, + WebkitAnimationDirection?: Property$AnimationDirection | Array<Property$AnimationDirection>, + WebkitAnimationDuration?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, + WebkitAnimationFillMode?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, + WebkitAnimationIterationCount?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, + WebkitAnimationName?: Property$AnimationName | Array<Property$AnimationName>, + WebkitAnimationPlayState?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, + WebkitAnimationTimingFunction?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, + WebkitAppearance?: Property$WebkitAppearance | Array<Property$WebkitAppearance>, + WebkitBackdropFilter?: Property$BackdropFilter | Array<Property$BackdropFilter>, + WebkitBackfaceVisibility?: Property$BackfaceVisibility | Array<Property$BackfaceVisibility>, + WebkitBackgroundClip?: Property$BackgroundClip | Array<Property$BackgroundClip>, + WebkitBackgroundOrigin?: Property$BackgroundOrigin | Array<Property$BackgroundOrigin>, + WebkitBackgroundSize?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, + WebkitBorderBeforeColor?: Property$WebkitBorderBeforeColor | Array<Property$WebkitBorderBeforeColor>, + WebkitBorderBeforeStyle?: Property$WebkitBorderBeforeStyle | Array<Property$WebkitBorderBeforeStyle>, + WebkitBorderBeforeWidth?: Property$WebkitBorderBeforeWidth<TLength> | Array<Property$WebkitBorderBeforeWidth<TLength>>, + WebkitBorderBottomLeftRadius?: Property$BorderBottomLeftRadius<TLength> | Array<Property$BorderBottomLeftRadius<TLength>>, + WebkitBorderBottomRightRadius?: Property$BorderBottomRightRadius<TLength> | Array<Property$BorderBottomRightRadius<TLength>>, + WebkitBorderImageSlice?: Property$BorderImageSlice | Array<Property$BorderImageSlice>, + WebkitBorderTopLeftRadius?: Property$BorderTopLeftRadius<TLength> | Array<Property$BorderTopLeftRadius<TLength>>, + WebkitBorderTopRightRadius?: Property$BorderTopRightRadius<TLength> | Array<Property$BorderTopRightRadius<TLength>>, + WebkitBoxDecorationBreak?: Property$BoxDecorationBreak | Array<Property$BoxDecorationBreak>, + WebkitBoxReflect?: Property$WebkitBoxReflect<TLength> | Array<Property$WebkitBoxReflect<TLength>>, + WebkitBoxShadow?: Property$BoxShadow | Array<Property$BoxShadow>, + WebkitBoxSizing?: Property$BoxSizing | Array<Property$BoxSizing>, + WebkitClipPath?: Property$ClipPath | Array<Property$ClipPath>, + WebkitColumnCount?: Property$ColumnCount | Array<Property$ColumnCount>, + WebkitColumnFill?: Property$ColumnFill | Array<Property$ColumnFill>, + WebkitColumnRuleColor?: Property$ColumnRuleColor | Array<Property$ColumnRuleColor>, + WebkitColumnRuleStyle?: Property$ColumnRuleStyle | Array<Property$ColumnRuleStyle>, + WebkitColumnRuleWidth?: Property$ColumnRuleWidth<TLength> | Array<Property$ColumnRuleWidth<TLength>>, + WebkitColumnSpan?: Property$ColumnSpan | Array<Property$ColumnSpan>, + WebkitColumnWidth?: Property$ColumnWidth<TLength> | Array<Property$ColumnWidth<TLength>>, + WebkitFilter?: Property$Filter | Array<Property$Filter>, + WebkitFlexBasis?: Property$FlexBasis<TLength> | Array<Property$FlexBasis<TLength>>, + WebkitFlexDirection?: Property$FlexDirection | Array<Property$FlexDirection>, + WebkitFlexGrow?: Property$FlexGrow | Array<Property$FlexGrow>, + WebkitFlexShrink?: Property$FlexShrink | Array<Property$FlexShrink>, + WebkitFlexWrap?: Property$FlexWrap | Array<Property$FlexWrap>, + WebkitFontFeatureSettings?: Property$FontFeatureSettings | Array<Property$FontFeatureSettings>, + WebkitFontKerning?: Property$FontKerning | Array<Property$FontKerning>, + WebkitFontSmoothing?: Property$FontSmooth<TLength> | Array<Property$FontSmooth<TLength>>, + WebkitFontVariantLigatures?: Property$FontVariantLigatures | Array<Property$FontVariantLigatures>, + WebkitHyphenateCharacter?: Property$HyphenateCharacter | Array<Property$HyphenateCharacter>, + WebkitHyphens?: Property$Hyphens | Array<Property$Hyphens>, + WebkitInitialLetter?: Property$InitialLetter | Array<Property$InitialLetter>, + WebkitJustifyContent?: Property$JustifyContent | Array<Property$JustifyContent>, + WebkitLineBreak?: Property$LineBreak | Array<Property$LineBreak>, + WebkitLineClamp?: Property$WebkitLineClamp | Array<Property$WebkitLineClamp>, + WebkitMarginEnd?: Property$MarginInlineEnd<TLength> | Array<Property$MarginInlineEnd<TLength>>, + WebkitMarginStart?: Property$MarginInlineStart<TLength> | Array<Property$MarginInlineStart<TLength>>, + WebkitMaskAttachment?: Property$WebkitMaskAttachment | Array<Property$WebkitMaskAttachment>, + WebkitMaskBoxImageOutset?: Property$MaskBorderOutset<TLength> | Array<Property$MaskBorderOutset<TLength>>, + WebkitMaskBoxImageRepeat?: Property$MaskBorderRepeat | Array<Property$MaskBorderRepeat>, + WebkitMaskBoxImageSlice?: Property$MaskBorderSlice | Array<Property$MaskBorderSlice>, + WebkitMaskBoxImageSource?: Property$MaskBorderSource | Array<Property$MaskBorderSource>, + WebkitMaskBoxImageWidth?: Property$MaskBorderWidth<TLength> | Array<Property$MaskBorderWidth<TLength>>, + WebkitMaskClip?: Property$WebkitMaskClip | Array<Property$WebkitMaskClip>, + WebkitMaskComposite?: Property$WebkitMaskComposite | Array<Property$WebkitMaskComposite>, + WebkitMaskImage?: Property$WebkitMaskImage | Array<Property$WebkitMaskImage>, + WebkitMaskOrigin?: Property$WebkitMaskOrigin | Array<Property$WebkitMaskOrigin>, + WebkitMaskPosition?: Property$WebkitMaskPosition<TLength> | Array<Property$WebkitMaskPosition<TLength>>, + WebkitMaskPositionX?: Property$WebkitMaskPositionX<TLength> | Array<Property$WebkitMaskPositionX<TLength>>, + WebkitMaskPositionY?: Property$WebkitMaskPositionY<TLength> | Array<Property$WebkitMaskPositionY<TLength>>, + WebkitMaskRepeat?: Property$WebkitMaskRepeat | Array<Property$WebkitMaskRepeat>, + WebkitMaskRepeatX?: Property$WebkitMaskRepeatX | Array<Property$WebkitMaskRepeatX>, + WebkitMaskRepeatY?: Property$WebkitMaskRepeatY | Array<Property$WebkitMaskRepeatY>, + WebkitMaskSize?: Property$WebkitMaskSize<TLength> | Array<Property$WebkitMaskSize<TLength>>, + WebkitMaxInlineSize?: Property$MaxInlineSize<TLength> | Array<Property$MaxInlineSize<TLength>>, + WebkitOrder?: Property$Order | Array<Property$Order>, + WebkitOverflowScrolling?: Property$WebkitOverflowScrolling | Array<Property$WebkitOverflowScrolling>, + WebkitPaddingEnd?: Property$PaddingInlineEnd<TLength> | Array<Property$PaddingInlineEnd<TLength>>, + WebkitPaddingStart?: Property$PaddingInlineStart<TLength> | Array<Property$PaddingInlineStart<TLength>>, + WebkitPerspective?: Property$Perspective<TLength> | Array<Property$Perspective<TLength>>, + WebkitPerspectiveOrigin?: Property$PerspectiveOrigin<TLength> | Array<Property$PerspectiveOrigin<TLength>>, + WebkitPrintColorAdjust?: Property$PrintColorAdjust | Array<Property$PrintColorAdjust>, + WebkitRubyPosition?: Property$RubyPosition | Array<Property$RubyPosition>, + WebkitScrollSnapType?: Property$ScrollSnapType | Array<Property$ScrollSnapType>, + WebkitShapeMargin?: Property$ShapeMargin<TLength> | Array<Property$ShapeMargin<TLength>>, + WebkitTapHighlightColor?: Property$WebkitTapHighlightColor | Array<Property$WebkitTapHighlightColor>, + WebkitTextCombine?: Property$TextCombineUpright | Array<Property$TextCombineUpright>, + WebkitTextDecorationColor?: Property$TextDecorationColor | Array<Property$TextDecorationColor>, + WebkitTextDecorationLine?: Property$TextDecorationLine | Array<Property$TextDecorationLine>, + WebkitTextDecorationSkip?: Property$TextDecorationSkip | Array<Property$TextDecorationSkip>, + WebkitTextDecorationStyle?: Property$TextDecorationStyle | Array<Property$TextDecorationStyle>, + WebkitTextEmphasisColor?: Property$TextEmphasisColor | Array<Property$TextEmphasisColor>, + WebkitTextEmphasisPosition?: Property$TextEmphasisPosition | Array<Property$TextEmphasisPosition>, + WebkitTextEmphasisStyle?: Property$TextEmphasisStyle | Array<Property$TextEmphasisStyle>, + WebkitTextFillColor?: Property$WebkitTextFillColor | Array<Property$WebkitTextFillColor>, + WebkitTextOrientation?: Property$TextOrientation | Array<Property$TextOrientation>, + WebkitTextSizeAdjust?: Property$TextSizeAdjust | Array<Property$TextSizeAdjust>, + WebkitTextStrokeColor?: Property$WebkitTextStrokeColor | Array<Property$WebkitTextStrokeColor>, + WebkitTextStrokeWidth?: Property$WebkitTextStrokeWidth<TLength> | Array<Property$WebkitTextStrokeWidth<TLength>>, + WebkitTextUnderlinePosition?: Property$TextUnderlinePosition | Array<Property$TextUnderlinePosition>, + WebkitTouchCallout?: Property$WebkitTouchCallout | Array<Property$WebkitTouchCallout>, + WebkitTransform?: Property$Transform | Array<Property$Transform>, + WebkitTransformOrigin?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + WebkitTransformStyle?: Property$TransformStyle | Array<Property$TransformStyle>, + WebkitTransitionDelay?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + WebkitTransitionDuration?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + WebkitTransitionProperty?: Property$TransitionProperty | Array<Property$TransitionProperty>, + WebkitTransitionTimingFunction?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + WebkitUserModify?: Property$WebkitUserModify | Array<Property$WebkitUserModify>, + WebkitUserSelect?: Property$UserSelect | Array<Property$UserSelect>, + WebkitWritingMode?: Property$WritingMode | Array<Property$WritingMode>, +|}; + +export type VendorShorthandPropertiesFallback<TLength = string | 0, TTime = string> = {| + MozAnimation?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, + MozBorderImage?: Property$BorderImage | Array<Property$BorderImage>, + MozColumnRule?: Property$ColumnRule<TLength> | Array<Property$ColumnRule<TLength>>, + MozColumns?: Property$Columns<TLength> | Array<Property$Columns<TLength>>, + MozOutlineRadius?: Property$MozOutlineRadius<TLength> | Array<Property$MozOutlineRadius<TLength>>, + msContentZoomLimit?: Property$MsContentZoomLimit | Array<Property$MsContentZoomLimit>, + msContentZoomSnap?: Property$MsContentZoomSnap | Array<Property$MsContentZoomSnap>, + msFlex?: Property$Flex<TLength> | Array<Property$Flex<TLength>>, + msScrollLimit?: Property$MsScrollLimit | Array<Property$MsScrollLimit>, + msScrollSnapX?: Property$MsScrollSnapX | Array<Property$MsScrollSnapX>, + msScrollSnapY?: Property$MsScrollSnapY | Array<Property$MsScrollSnapY>, + msTransition?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, + WebkitAnimation?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, + WebkitBorderBefore?: Property$WebkitBorderBefore<TLength> | Array<Property$WebkitBorderBefore<TLength>>, + WebkitBorderImage?: Property$BorderImage | Array<Property$BorderImage>, + WebkitBorderRadius?: Property$BorderRadius<TLength> | Array<Property$BorderRadius<TLength>>, + WebkitColumnRule?: Property$ColumnRule<TLength> | Array<Property$ColumnRule<TLength>>, + WebkitColumns?: Property$Columns<TLength> | Array<Property$Columns<TLength>>, + WebkitFlex?: Property$Flex<TLength> | Array<Property$Flex<TLength>>, + WebkitFlexFlow?: Property$FlexFlow | Array<Property$FlexFlow>, + WebkitMask?: Property$WebkitMask<TLength> | Array<Property$WebkitMask<TLength>>, + WebkitMaskBoxImage?: Property$MaskBorder | Array<Property$MaskBorder>, + WebkitTextEmphasis?: Property$TextEmphasis | Array<Property$TextEmphasis>, + WebkitTextStroke?: Property$WebkitTextStroke<TLength> | Array<Property$WebkitTextStroke<TLength>>, + WebkitTransition?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, +|}; + +export type VendorPropertiesFallback<TLength = string | 0, TTime = string> = {| + ...VendorLonghandPropertiesFallback<TLength, TTime>, + ...VendorShorthandPropertiesFallback<TLength, TTime>, +|}; + +export type ObsoletePropertiesFallback<TLength = string | 0, TTime = string> = {| + azimuth?: Property$Azimuth | Array<Property$Azimuth>, + boxAlign?: Property$BoxAlign | Array<Property$BoxAlign>, + boxDirection?: Property$BoxDirection | Array<Property$BoxDirection>, + boxFlex?: Property$BoxFlex | Array<Property$BoxFlex>, + boxFlexGroup?: Property$BoxFlexGroup | Array<Property$BoxFlexGroup>, + boxLines?: Property$BoxLines | Array<Property$BoxLines>, + boxOrdinalGroup?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, + boxOrient?: Property$BoxOrient | Array<Property$BoxOrient>, + boxPack?: Property$BoxPack | Array<Property$BoxPack>, + clip?: Property$Clip | Array<Property$Clip>, + gridColumnGap?: Property$GridColumnGap<TLength> | Array<Property$GridColumnGap<TLength>>, + gridGap?: Property$GridGap<TLength> | Array<Property$GridGap<TLength>>, + gridRowGap?: Property$GridRowGap<TLength> | Array<Property$GridRowGap<TLength>>, + imeMode?: Property$ImeMode | Array<Property$ImeMode>, + offsetBlock?: Property$InsetBlock<TLength> | Array<Property$InsetBlock<TLength>>, + offsetBlockEnd?: Property$InsetBlockEnd<TLength> | Array<Property$InsetBlockEnd<TLength>>, + offsetBlockStart?: Property$InsetBlockStart<TLength> | Array<Property$InsetBlockStart<TLength>>, + offsetInline?: Property$InsetInline<TLength> | Array<Property$InsetInline<TLength>>, + offsetInlineEnd?: Property$InsetInlineEnd<TLength> | Array<Property$InsetInlineEnd<TLength>>, + offsetInlineStart?: Property$InsetInlineStart<TLength> | Array<Property$InsetInlineStart<TLength>>, + scrollSnapCoordinate?: Property$ScrollSnapCoordinate<TLength> | Array<Property$ScrollSnapCoordinate<TLength>>, + scrollSnapDestination?: Property$ScrollSnapDestination<TLength> | Array<Property$ScrollSnapDestination<TLength>>, + scrollSnapPointsX?: Property$ScrollSnapPointsX | Array<Property$ScrollSnapPointsX>, + scrollSnapPointsY?: Property$ScrollSnapPointsY | Array<Property$ScrollSnapPointsY>, + scrollSnapTypeX?: Property$ScrollSnapTypeX | Array<Property$ScrollSnapTypeX>, + scrollSnapTypeY?: Property$ScrollSnapTypeY | Array<Property$ScrollSnapTypeY>, + KhtmlBoxAlign?: Property$BoxAlign | Array<Property$BoxAlign>, + KhtmlBoxDirection?: Property$BoxDirection | Array<Property$BoxDirection>, + KhtmlBoxFlex?: Property$BoxFlex | Array<Property$BoxFlex>, + KhtmlBoxFlexGroup?: Property$BoxFlexGroup | Array<Property$BoxFlexGroup>, + KhtmlBoxLines?: Property$BoxLines | Array<Property$BoxLines>, + KhtmlBoxOrdinalGroup?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, + KhtmlBoxOrient?: Property$BoxOrient | Array<Property$BoxOrient>, + KhtmlBoxPack?: Property$BoxPack | Array<Property$BoxPack>, + KhtmlLineBreak?: Property$LineBreak | Array<Property$LineBreak>, + KhtmlOpacity?: Property$Opacity | Array<Property$Opacity>, + KhtmlUserSelect?: Property$UserSelect | Array<Property$UserSelect>, + MozBackfaceVisibility?: Property$BackfaceVisibility | Array<Property$BackfaceVisibility>, + MozBackgroundClip?: Property$BackgroundClip | Array<Property$BackgroundClip>, + MozBackgroundInlinePolicy?: Property$BoxDecorationBreak | Array<Property$BoxDecorationBreak>, + MozBackgroundOrigin?: Property$BackgroundOrigin | Array<Property$BackgroundOrigin>, + MozBackgroundSize?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, + MozBorderRadius?: Property$BorderRadius<TLength> | Array<Property$BorderRadius<TLength>>, + MozBorderRadiusBottomleft?: Property$BorderBottomLeftRadius<TLength> | Array<Property$BorderBottomLeftRadius<TLength>>, + MozBorderRadiusBottomright?: Property$BorderBottomRightRadius<TLength> | Array<Property$BorderBottomRightRadius<TLength>>, + MozBorderRadiusTopleft?: Property$BorderTopLeftRadius<TLength> | Array<Property$BorderTopLeftRadius<TLength>>, + MozBorderRadiusTopright?: Property$BorderTopRightRadius<TLength> | Array<Property$BorderTopRightRadius<TLength>>, + MozBoxAlign?: Property$BoxAlign | Array<Property$BoxAlign>, + MozBoxDirection?: Property$BoxDirection | Array<Property$BoxDirection>, + MozBoxFlex?: Property$BoxFlex | Array<Property$BoxFlex>, + MozBoxOrdinalGroup?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, + MozBoxOrient?: Property$BoxOrient | Array<Property$BoxOrient>, + MozBoxPack?: Property$BoxPack | Array<Property$BoxPack>, + MozBoxShadow?: Property$BoxShadow | Array<Property$BoxShadow>, + MozFloatEdge?: Property$MozFloatEdge | Array<Property$MozFloatEdge>, + MozForceBrokenImageIcon?: Property$MozForceBrokenImageIcon | Array<Property$MozForceBrokenImageIcon>, + MozOpacity?: Property$Opacity | Array<Property$Opacity>, + MozOutline?: Property$Outline<TLength> | Array<Property$Outline<TLength>>, + MozOutlineColor?: Property$OutlineColor | Array<Property$OutlineColor>, + MozOutlineStyle?: Property$OutlineStyle | Array<Property$OutlineStyle>, + MozOutlineWidth?: Property$OutlineWidth<TLength> | Array<Property$OutlineWidth<TLength>>, + MozPerspective?: Property$Perspective<TLength> | Array<Property$Perspective<TLength>>, + MozPerspectiveOrigin?: Property$PerspectiveOrigin<TLength> | Array<Property$PerspectiveOrigin<TLength>>, + MozTextAlignLast?: Property$TextAlignLast | Array<Property$TextAlignLast>, + MozTextDecorationColor?: Property$TextDecorationColor | Array<Property$TextDecorationColor>, + MozTextDecorationLine?: Property$TextDecorationLine | Array<Property$TextDecorationLine>, + MozTextDecorationStyle?: Property$TextDecorationStyle | Array<Property$TextDecorationStyle>, + MozTransform?: Property$Transform | Array<Property$Transform>, + MozTransformOrigin?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + MozTransformStyle?: Property$TransformStyle | Array<Property$TransformStyle>, + MozTransition?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, + MozTransitionDelay?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + MozTransitionDuration?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + MozTransitionProperty?: Property$TransitionProperty | Array<Property$TransitionProperty>, + MozTransitionTimingFunction?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + MozUserInput?: Property$MozUserInput | Array<Property$MozUserInput>, + msImeMode?: Property$ImeMode | Array<Property$ImeMode>, + OAnimation?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, + OAnimationDelay?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, + OAnimationDirection?: Property$AnimationDirection | Array<Property$AnimationDirection>, + OAnimationDuration?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, + OAnimationFillMode?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, + OAnimationIterationCount?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, + OAnimationName?: Property$AnimationName | Array<Property$AnimationName>, + OAnimationPlayState?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, + OAnimationTimingFunction?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, + OBackgroundSize?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, + OBorderImage?: Property$BorderImage | Array<Property$BorderImage>, + OObjectFit?: Property$ObjectFit | Array<Property$ObjectFit>, + OObjectPosition?: Property$ObjectPosition<TLength> | Array<Property$ObjectPosition<TLength>>, + OTabSize?: Property$TabSize<TLength> | Array<Property$TabSize<TLength>>, + OTextOverflow?: Property$TextOverflow | Array<Property$TextOverflow>, + OTransform?: Property$Transform | Array<Property$Transform>, + OTransformOrigin?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + OTransition?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, + OTransitionDelay?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + OTransitionDuration?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + OTransitionProperty?: Property$TransitionProperty | Array<Property$TransitionProperty>, + OTransitionTimingFunction?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + WebkitBoxAlign?: Property$BoxAlign | Array<Property$BoxAlign>, + WebkitBoxDirection?: Property$BoxDirection | Array<Property$BoxDirection>, + WebkitBoxFlex?: Property$BoxFlex | Array<Property$BoxFlex>, + WebkitBoxFlexGroup?: Property$BoxFlexGroup | Array<Property$BoxFlexGroup>, + WebkitBoxLines?: Property$BoxLines | Array<Property$BoxLines>, + WebkitBoxOrdinalGroup?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, + WebkitBoxOrient?: Property$BoxOrient | Array<Property$BoxOrient>, + WebkitBoxPack?: Property$BoxPack | Array<Property$BoxPack>, +|}; + +export type SvgPropertiesFallback<TLength = string | 0, TTime = string> = {| + alignmentBaseline?: Property$AlignmentBaseline | Array<Property$AlignmentBaseline>, + baselineShift?: Property$BaselineShift<TLength> | Array<Property$BaselineShift<TLength>>, + clip?: Property$Clip | Array<Property$Clip>, + clipPath?: Property$ClipPath | Array<Property$ClipPath>, + clipRule?: Property$ClipRule | Array<Property$ClipRule>, + color?: Property$Color | Array<Property$Color>, + colorInterpolation?: Property$ColorInterpolation | Array<Property$ColorInterpolation>, + colorRendering?: Property$ColorRendering | Array<Property$ColorRendering>, + cursor?: Property$Cursor | Array<Property$Cursor>, + direction?: Property$Direction | Array<Property$Direction>, + display?: Property$Display | Array<Property$Display>, + dominantBaseline?: Property$DominantBaseline | Array<Property$DominantBaseline>, + fill?: Property$Fill | Array<Property$Fill>, + fillOpacity?: Property$FillOpacity | Array<Property$FillOpacity>, + fillRule?: Property$FillRule | Array<Property$FillRule>, + filter?: Property$Filter | Array<Property$Filter>, + floodColor?: Property$FloodColor | Array<Property$FloodColor>, + floodOpacity?: Property$FloodOpacity | Array<Property$FloodOpacity>, + font?: Property$Font | Array<Property$Font>, + fontFamily?: Property$FontFamily | Array<Property$FontFamily>, + fontSize?: Property$FontSize<TLength> | Array<Property$FontSize<TLength>>, + fontSizeAdjust?: Property$FontSizeAdjust | Array<Property$FontSizeAdjust>, + fontStretch?: Property$FontStretch | Array<Property$FontStretch>, + fontStyle?: Property$FontStyle | Array<Property$FontStyle>, + fontVariant?: Property$FontVariant | Array<Property$FontVariant>, + fontWeight?: Property$FontWeight | Array<Property$FontWeight>, + glyphOrientationVertical?: Property$GlyphOrientationVertical | Array<Property$GlyphOrientationVertical>, + imageRendering?: Property$ImageRendering | Array<Property$ImageRendering>, + letterSpacing?: Property$LetterSpacing<TLength> | Array<Property$LetterSpacing<TLength>>, + lightingColor?: Property$LightingColor | Array<Property$LightingColor>, + lineHeight?: Property$LineHeight<TLength> | Array<Property$LineHeight<TLength>>, + marker?: Property$Marker | Array<Property$Marker>, + markerEnd?: Property$MarkerEnd | Array<Property$MarkerEnd>, + markerMid?: Property$MarkerMid | Array<Property$MarkerMid>, + markerStart?: Property$MarkerStart | Array<Property$MarkerStart>, + mask?: Property$Mask<TLength> | Array<Property$Mask<TLength>>, + opacity?: Property$Opacity | Array<Property$Opacity>, + overflow?: Property$Overflow | Array<Property$Overflow>, + paintOrder?: Property$PaintOrder | Array<Property$PaintOrder>, + pointerEvents?: Property$PointerEvents | Array<Property$PointerEvents>, + shapeRendering?: Property$ShapeRendering | Array<Property$ShapeRendering>, + stopColor?: Property$StopColor | Array<Property$StopColor>, + stopOpacity?: Property$StopOpacity | Array<Property$StopOpacity>, + stroke?: Property$Stroke | Array<Property$Stroke>, + strokeDasharray?: Property$StrokeDasharray<TLength> | Array<Property$StrokeDasharray<TLength>>, + strokeDashoffset?: Property$StrokeDashoffset<TLength> | Array<Property$StrokeDashoffset<TLength>>, + strokeLinecap?: Property$StrokeLinecap | Array<Property$StrokeLinecap>, + strokeLinejoin?: Property$StrokeLinejoin | Array<Property$StrokeLinejoin>, + strokeMiterlimit?: Property$StrokeMiterlimit | Array<Property$StrokeMiterlimit>, + strokeOpacity?: Property$StrokeOpacity | Array<Property$StrokeOpacity>, + strokeWidth?: Property$StrokeWidth<TLength> | Array<Property$StrokeWidth<TLength>>, + textAnchor?: Property$TextAnchor | Array<Property$TextAnchor>, + textDecoration?: Property$TextDecoration<TLength> | Array<Property$TextDecoration<TLength>>, + textRendering?: Property$TextRendering | Array<Property$TextRendering>, + unicodeBidi?: Property$UnicodeBidi | Array<Property$UnicodeBidi>, + vectorEffect?: Property$VectorEffect | Array<Property$VectorEffect>, + visibility?: Property$Visibility | Array<Property$Visibility>, + whiteSpace?: Property$WhiteSpace | Array<Property$WhiteSpace>, + wordSpacing?: Property$WordSpacing<TLength> | Array<Property$WordSpacing<TLength>>, + writingMode?: Property$WritingMode | Array<Property$WritingMode>, +|}; + +export type PropertiesFallback<TLength = string | 0, TTime = string> = {| + ...StandardPropertiesFallback<TLength, TTime>, + ...VendorPropertiesFallback<TLength, TTime>, + ...ObsoletePropertiesFallback<TLength, TTime>, + ...SvgPropertiesFallback<TLength, TTime>, +|}; + +export type StandardLonghandPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| + "accent-color"?: Property$AccentColor | Array<Property$AccentColor>, + "align-content"?: Property$AlignContent | Array<Property$AlignContent>, + "align-items"?: Property$AlignItems | Array<Property$AlignItems>, + "align-self"?: Property$AlignSelf | Array<Property$AlignSelf>, + "align-tracks"?: Property$AlignTracks | Array<Property$AlignTracks>, + "animation-composition"?: Property$AnimationComposition | Array<Property$AnimationComposition>, + "animation-delay"?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, + "animation-direction"?: Property$AnimationDirection | Array<Property$AnimationDirection>, + "animation-duration"?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, + "animation-fill-mode"?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, + "animation-iteration-count"?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, + "animation-name"?: Property$AnimationName | Array<Property$AnimationName>, + "animation-play-state"?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, + "animation-range-end"?: Property$AnimationRangeEnd<TLength> | Array<Property$AnimationRangeEnd<TLength>>, + "animation-range-start"?: Property$AnimationRangeStart<TLength> | Array<Property$AnimationRangeStart<TLength>>, + "animation-timeline"?: Property$AnimationTimeline | Array<Property$AnimationTimeline>, + "animation-timing-function"?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, + appearance?: Property$Appearance | Array<Property$Appearance>, + "aspect-ratio"?: Property$AspectRatio | Array<Property$AspectRatio>, + "backdrop-filter"?: Property$BackdropFilter | Array<Property$BackdropFilter>, + "backface-visibility"?: Property$BackfaceVisibility | Array<Property$BackfaceVisibility>, + "background-attachment"?: Property$BackgroundAttachment | Array<Property$BackgroundAttachment>, + "background-blend-mode"?: Property$BackgroundBlendMode | Array<Property$BackgroundBlendMode>, + "background-clip"?: Property$BackgroundClip | Array<Property$BackgroundClip>, + "background-color"?: Property$BackgroundColor | Array<Property$BackgroundColor>, + "background-image"?: Property$BackgroundImage | Array<Property$BackgroundImage>, + "background-origin"?: Property$BackgroundOrigin | Array<Property$BackgroundOrigin>, + "background-position-x"?: Property$BackgroundPositionX<TLength> | Array<Property$BackgroundPositionX<TLength>>, + "background-position-y"?: Property$BackgroundPositionY<TLength> | Array<Property$BackgroundPositionY<TLength>>, + "background-repeat"?: Property$BackgroundRepeat | Array<Property$BackgroundRepeat>, + "background-size"?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, + "block-overflow"?: Property$BlockOverflow | Array<Property$BlockOverflow>, + "block-size"?: Property$BlockSize<TLength> | Array<Property$BlockSize<TLength>>, + "border-block-color"?: Property$BorderBlockColor | Array<Property$BorderBlockColor>, + "border-block-end-color"?: Property$BorderBlockEndColor | Array<Property$BorderBlockEndColor>, + "border-block-end-style"?: Property$BorderBlockEndStyle | Array<Property$BorderBlockEndStyle>, + "border-block-end-width"?: Property$BorderBlockEndWidth<TLength> | Array<Property$BorderBlockEndWidth<TLength>>, + "border-block-start-color"?: Property$BorderBlockStartColor | Array<Property$BorderBlockStartColor>, + "border-block-start-style"?: Property$BorderBlockStartStyle | Array<Property$BorderBlockStartStyle>, + "border-block-start-width"?: Property$BorderBlockStartWidth<TLength> | Array<Property$BorderBlockStartWidth<TLength>>, + "border-block-style"?: Property$BorderBlockStyle | Array<Property$BorderBlockStyle>, + "border-block-width"?: Property$BorderBlockWidth<TLength> | Array<Property$BorderBlockWidth<TLength>>, + "border-bottom-color"?: Property$BorderBottomColor | Array<Property$BorderBottomColor>, + "border-bottom-left-radius"?: Property$BorderBottomLeftRadius<TLength> | Array<Property$BorderBottomLeftRadius<TLength>>, + "border-bottom-right-radius"?: Property$BorderBottomRightRadius<TLength> | Array<Property$BorderBottomRightRadius<TLength>>, + "border-bottom-style"?: Property$BorderBottomStyle | Array<Property$BorderBottomStyle>, + "border-bottom-width"?: Property$BorderBottomWidth<TLength> | Array<Property$BorderBottomWidth<TLength>>, + "border-collapse"?: Property$BorderCollapse | Array<Property$BorderCollapse>, + "border-end-end-radius"?: Property$BorderEndEndRadius<TLength> | Array<Property$BorderEndEndRadius<TLength>>, + "border-end-start-radius"?: Property$BorderEndStartRadius<TLength> | Array<Property$BorderEndStartRadius<TLength>>, + "border-image-outset"?: Property$BorderImageOutset<TLength> | Array<Property$BorderImageOutset<TLength>>, + "border-image-repeat"?: Property$BorderImageRepeat | Array<Property$BorderImageRepeat>, + "border-image-slice"?: Property$BorderImageSlice | Array<Property$BorderImageSlice>, + "border-image-source"?: Property$BorderImageSource | Array<Property$BorderImageSource>, + "border-image-width"?: Property$BorderImageWidth<TLength> | Array<Property$BorderImageWidth<TLength>>, + "border-inline-color"?: Property$BorderInlineColor | Array<Property$BorderInlineColor>, + "border-inline-end-color"?: Property$BorderInlineEndColor | Array<Property$BorderInlineEndColor>, + "border-inline-end-style"?: Property$BorderInlineEndStyle | Array<Property$BorderInlineEndStyle>, + "border-inline-end-width"?: Property$BorderInlineEndWidth<TLength> | Array<Property$BorderInlineEndWidth<TLength>>, + "border-inline-start-color"?: Property$BorderInlineStartColor | Array<Property$BorderInlineStartColor>, + "border-inline-start-style"?: Property$BorderInlineStartStyle | Array<Property$BorderInlineStartStyle>, + "border-inline-start-width"?: Property$BorderInlineStartWidth<TLength> | Array<Property$BorderInlineStartWidth<TLength>>, + "border-inline-style"?: Property$BorderInlineStyle | Array<Property$BorderInlineStyle>, + "border-inline-width"?: Property$BorderInlineWidth<TLength> | Array<Property$BorderInlineWidth<TLength>>, + "border-left-color"?: Property$BorderLeftColor | Array<Property$BorderLeftColor>, + "border-left-style"?: Property$BorderLeftStyle | Array<Property$BorderLeftStyle>, + "border-left-width"?: Property$BorderLeftWidth<TLength> | Array<Property$BorderLeftWidth<TLength>>, + "border-right-color"?: Property$BorderRightColor | Array<Property$BorderRightColor>, + "border-right-style"?: Property$BorderRightStyle | Array<Property$BorderRightStyle>, + "border-right-width"?: Property$BorderRightWidth<TLength> | Array<Property$BorderRightWidth<TLength>>, + "border-spacing"?: Property$BorderSpacing<TLength> | Array<Property$BorderSpacing<TLength>>, + "border-start-end-radius"?: Property$BorderStartEndRadius<TLength> | Array<Property$BorderStartEndRadius<TLength>>, + "border-start-start-radius"?: Property$BorderStartStartRadius<TLength> | Array<Property$BorderStartStartRadius<TLength>>, + "border-top-color"?: Property$BorderTopColor | Array<Property$BorderTopColor>, + "border-top-left-radius"?: Property$BorderTopLeftRadius<TLength> | Array<Property$BorderTopLeftRadius<TLength>>, + "border-top-right-radius"?: Property$BorderTopRightRadius<TLength> | Array<Property$BorderTopRightRadius<TLength>>, + "border-top-style"?: Property$BorderTopStyle | Array<Property$BorderTopStyle>, + "border-top-width"?: Property$BorderTopWidth<TLength> | Array<Property$BorderTopWidth<TLength>>, + bottom?: Property$Bottom<TLength> | Array<Property$Bottom<TLength>>, + "box-decoration-break"?: Property$BoxDecorationBreak | Array<Property$BoxDecorationBreak>, + "box-shadow"?: Property$BoxShadow | Array<Property$BoxShadow>, + "box-sizing"?: Property$BoxSizing | Array<Property$BoxSizing>, + "break-after"?: Property$BreakAfter | Array<Property$BreakAfter>, + "break-before"?: Property$BreakBefore | Array<Property$BreakBefore>, + "break-inside"?: Property$BreakInside | Array<Property$BreakInside>, + "caption-side"?: Property$CaptionSide | Array<Property$CaptionSide>, + "caret-color"?: Property$CaretColor | Array<Property$CaretColor>, + "caret-shape"?: Property$CaretShape | Array<Property$CaretShape>, + clear?: Property$Clear | Array<Property$Clear>, + "clip-path"?: Property$ClipPath | Array<Property$ClipPath>, + color?: Property$Color | Array<Property$Color>, + "color-adjust"?: Property$PrintColorAdjust | Array<Property$PrintColorAdjust>, + "color-scheme"?: Property$ColorScheme | Array<Property$ColorScheme>, + "column-count"?: Property$ColumnCount | Array<Property$ColumnCount>, + "column-fill"?: Property$ColumnFill | Array<Property$ColumnFill>, + "column-gap"?: Property$ColumnGap<TLength> | Array<Property$ColumnGap<TLength>>, + "column-rule-color"?: Property$ColumnRuleColor | Array<Property$ColumnRuleColor>, + "column-rule-style"?: Property$ColumnRuleStyle | Array<Property$ColumnRuleStyle>, + "column-rule-width"?: Property$ColumnRuleWidth<TLength> | Array<Property$ColumnRuleWidth<TLength>>, + "column-span"?: Property$ColumnSpan | Array<Property$ColumnSpan>, + "column-width"?: Property$ColumnWidth<TLength> | Array<Property$ColumnWidth<TLength>>, + contain?: Property$Contain | Array<Property$Contain>, + "contain-intrinsic-block-size"?: Property$ContainIntrinsicBlockSize<TLength> | Array<Property$ContainIntrinsicBlockSize<TLength>>, + "contain-intrinsic-height"?: Property$ContainIntrinsicHeight<TLength> | Array<Property$ContainIntrinsicHeight<TLength>>, + "contain-intrinsic-inline-size"?: Property$ContainIntrinsicInlineSize<TLength> | Array<Property$ContainIntrinsicInlineSize<TLength>>, + "contain-intrinsic-width"?: Property$ContainIntrinsicWidth<TLength> | Array<Property$ContainIntrinsicWidth<TLength>>, + "container-name"?: Property$ContainerName | Array<Property$ContainerName>, + "container-type"?: Property$ContainerType | Array<Property$ContainerType>, + content?: Property$Content | Array<Property$Content>, + "content-visibility"?: Property$ContentVisibility | Array<Property$ContentVisibility>, + "counter-increment"?: Property$CounterIncrement | Array<Property$CounterIncrement>, + "counter-reset"?: Property$CounterReset | Array<Property$CounterReset>, + "counter-set"?: Property$CounterSet | Array<Property$CounterSet>, + cursor?: Property$Cursor | Array<Property$Cursor>, + direction?: Property$Direction | Array<Property$Direction>, + display?: Property$Display | Array<Property$Display>, + "empty-cells"?: Property$EmptyCells | Array<Property$EmptyCells>, + filter?: Property$Filter | Array<Property$Filter>, + "flex-basis"?: Property$FlexBasis<TLength> | Array<Property$FlexBasis<TLength>>, + "flex-direction"?: Property$FlexDirection | Array<Property$FlexDirection>, + "flex-grow"?: Property$FlexGrow | Array<Property$FlexGrow>, + "flex-shrink"?: Property$FlexShrink | Array<Property$FlexShrink>, + "flex-wrap"?: Property$FlexWrap | Array<Property$FlexWrap>, + float?: Property$Float | Array<Property$Float>, + "font-family"?: Property$FontFamily | Array<Property$FontFamily>, + "font-feature-settings"?: Property$FontFeatureSettings | Array<Property$FontFeatureSettings>, + "font-kerning"?: Property$FontKerning | Array<Property$FontKerning>, + "font-language-override"?: Property$FontLanguageOverride | Array<Property$FontLanguageOverride>, + "font-optical-sizing"?: Property$FontOpticalSizing | Array<Property$FontOpticalSizing>, + "font-palette"?: Property$FontPalette | Array<Property$FontPalette>, + "font-size"?: Property$FontSize<TLength> | Array<Property$FontSize<TLength>>, + "font-size-adjust"?: Property$FontSizeAdjust | Array<Property$FontSizeAdjust>, + "font-smooth"?: Property$FontSmooth<TLength> | Array<Property$FontSmooth<TLength>>, + "font-stretch"?: Property$FontStretch | Array<Property$FontStretch>, + "font-style"?: Property$FontStyle | Array<Property$FontStyle>, + "font-synthesis"?: Property$FontSynthesis | Array<Property$FontSynthesis>, + "font-synthesis-position"?: Property$FontSynthesisPosition | Array<Property$FontSynthesisPosition>, + "font-synthesis-small-caps"?: Property$FontSynthesisSmallCaps | Array<Property$FontSynthesisSmallCaps>, + "font-synthesis-style"?: Property$FontSynthesisStyle | Array<Property$FontSynthesisStyle>, + "font-synthesis-weight"?: Property$FontSynthesisWeight | Array<Property$FontSynthesisWeight>, + "font-variant"?: Property$FontVariant | Array<Property$FontVariant>, + "font-variant-alternates"?: Property$FontVariantAlternates | Array<Property$FontVariantAlternates>, + "font-variant-caps"?: Property$FontVariantCaps | Array<Property$FontVariantCaps>, + "font-variant-east-asian"?: Property$FontVariantEastAsian | Array<Property$FontVariantEastAsian>, + "font-variant-emoji"?: Property$FontVariantEmoji | Array<Property$FontVariantEmoji>, + "font-variant-ligatures"?: Property$FontVariantLigatures | Array<Property$FontVariantLigatures>, + "font-variant-numeric"?: Property$FontVariantNumeric | Array<Property$FontVariantNumeric>, + "font-variant-position"?: Property$FontVariantPosition | Array<Property$FontVariantPosition>, + "font-variation-settings"?: Property$FontVariationSettings | Array<Property$FontVariationSettings>, + "font-weight"?: Property$FontWeight | Array<Property$FontWeight>, + "forced-color-adjust"?: Property$ForcedColorAdjust | Array<Property$ForcedColorAdjust>, + "grid-auto-columns"?: Property$GridAutoColumns<TLength> | Array<Property$GridAutoColumns<TLength>>, + "grid-auto-flow"?: Property$GridAutoFlow | Array<Property$GridAutoFlow>, + "grid-auto-rows"?: Property$GridAutoRows<TLength> | Array<Property$GridAutoRows<TLength>>, + "grid-column-end"?: Property$GridColumnEnd | Array<Property$GridColumnEnd>, + "grid-column-start"?: Property$GridColumnStart | Array<Property$GridColumnStart>, + "grid-row-end"?: Property$GridRowEnd | Array<Property$GridRowEnd>, + "grid-row-start"?: Property$GridRowStart | Array<Property$GridRowStart>, + "grid-template-areas"?: Property$GridTemplateAreas | Array<Property$GridTemplateAreas>, + "grid-template-columns"?: Property$GridTemplateColumns<TLength> | Array<Property$GridTemplateColumns<TLength>>, + "grid-template-rows"?: Property$GridTemplateRows<TLength> | Array<Property$GridTemplateRows<TLength>>, + "hanging-punctuation"?: Property$HangingPunctuation | Array<Property$HangingPunctuation>, + height?: Property$Height<TLength> | Array<Property$Height<TLength>>, + "hyphenate-character"?: Property$HyphenateCharacter | Array<Property$HyphenateCharacter>, + "hyphenate-limit-chars"?: Property$HyphenateLimitChars | Array<Property$HyphenateLimitChars>, + hyphens?: Property$Hyphens | Array<Property$Hyphens>, + "image-orientation"?: Property$ImageOrientation | Array<Property$ImageOrientation>, + "image-rendering"?: Property$ImageRendering | Array<Property$ImageRendering>, + "image-resolution"?: Property$ImageResolution | Array<Property$ImageResolution>, + "initial-letter"?: Property$InitialLetter | Array<Property$InitialLetter>, + "inline-size"?: Property$InlineSize<TLength> | Array<Property$InlineSize<TLength>>, + "input-security"?: Property$InputSecurity | Array<Property$InputSecurity>, + "inset-block-end"?: Property$InsetBlockEnd<TLength> | Array<Property$InsetBlockEnd<TLength>>, + "inset-block-start"?: Property$InsetBlockStart<TLength> | Array<Property$InsetBlockStart<TLength>>, + "inset-inline-end"?: Property$InsetInlineEnd<TLength> | Array<Property$InsetInlineEnd<TLength>>, + "inset-inline-start"?: Property$InsetInlineStart<TLength> | Array<Property$InsetInlineStart<TLength>>, + isolation?: Property$Isolation | Array<Property$Isolation>, + "justify-content"?: Property$JustifyContent | Array<Property$JustifyContent>, + "justify-items"?: Property$JustifyItems | Array<Property$JustifyItems>, + "justify-self"?: Property$JustifySelf | Array<Property$JustifySelf>, + "justify-tracks"?: Property$JustifyTracks | Array<Property$JustifyTracks>, + left?: Property$Left<TLength> | Array<Property$Left<TLength>>, + "letter-spacing"?: Property$LetterSpacing<TLength> | Array<Property$LetterSpacing<TLength>>, + "line-break"?: Property$LineBreak | Array<Property$LineBreak>, + "line-height"?: Property$LineHeight<TLength> | Array<Property$LineHeight<TLength>>, + "line-height-step"?: Property$LineHeightStep<TLength> | Array<Property$LineHeightStep<TLength>>, + "list-style-image"?: Property$ListStyleImage | Array<Property$ListStyleImage>, + "list-style-position"?: Property$ListStylePosition | Array<Property$ListStylePosition>, + "list-style-type"?: Property$ListStyleType | Array<Property$ListStyleType>, + "margin-block-end"?: Property$MarginBlockEnd<TLength> | Array<Property$MarginBlockEnd<TLength>>, + "margin-block-start"?: Property$MarginBlockStart<TLength> | Array<Property$MarginBlockStart<TLength>>, + "margin-bottom"?: Property$MarginBottom<TLength> | Array<Property$MarginBottom<TLength>>, + "margin-inline-end"?: Property$MarginInlineEnd<TLength> | Array<Property$MarginInlineEnd<TLength>>, + "margin-inline-start"?: Property$MarginInlineStart<TLength> | Array<Property$MarginInlineStart<TLength>>, + "margin-left"?: Property$MarginLeft<TLength> | Array<Property$MarginLeft<TLength>>, + "margin-right"?: Property$MarginRight<TLength> | Array<Property$MarginRight<TLength>>, + "margin-top"?: Property$MarginTop<TLength> | Array<Property$MarginTop<TLength>>, + "margin-trim"?: Property$MarginTrim | Array<Property$MarginTrim>, + "mask-border-mode"?: Property$MaskBorderMode | Array<Property$MaskBorderMode>, + "mask-border-outset"?: Property$MaskBorderOutset<TLength> | Array<Property$MaskBorderOutset<TLength>>, + "mask-border-repeat"?: Property$MaskBorderRepeat | Array<Property$MaskBorderRepeat>, + "mask-border-slice"?: Property$MaskBorderSlice | Array<Property$MaskBorderSlice>, + "mask-border-source"?: Property$MaskBorderSource | Array<Property$MaskBorderSource>, + "mask-border-width"?: Property$MaskBorderWidth<TLength> | Array<Property$MaskBorderWidth<TLength>>, + "mask-clip"?: Property$MaskClip | Array<Property$MaskClip>, + "mask-composite"?: Property$MaskComposite | Array<Property$MaskComposite>, + "mask-image"?: Property$MaskImage | Array<Property$MaskImage>, + "mask-mode"?: Property$MaskMode | Array<Property$MaskMode>, + "mask-origin"?: Property$MaskOrigin | Array<Property$MaskOrigin>, + "mask-position"?: Property$MaskPosition<TLength> | Array<Property$MaskPosition<TLength>>, + "mask-repeat"?: Property$MaskRepeat | Array<Property$MaskRepeat>, + "mask-size"?: Property$MaskSize<TLength> | Array<Property$MaskSize<TLength>>, + "mask-type"?: Property$MaskType | Array<Property$MaskType>, + "masonry-auto-flow"?: Property$MasonryAutoFlow | Array<Property$MasonryAutoFlow>, + "math-depth"?: Property$MathDepth | Array<Property$MathDepth>, + "math-shift"?: Property$MathShift | Array<Property$MathShift>, + "math-style"?: Property$MathStyle | Array<Property$MathStyle>, + "max-block-size"?: Property$MaxBlockSize<TLength> | Array<Property$MaxBlockSize<TLength>>, + "max-height"?: Property$MaxHeight<TLength> | Array<Property$MaxHeight<TLength>>, + "max-inline-size"?: Property$MaxInlineSize<TLength> | Array<Property$MaxInlineSize<TLength>>, + "max-lines"?: Property$MaxLines | Array<Property$MaxLines>, + "max-width"?: Property$MaxWidth<TLength> | Array<Property$MaxWidth<TLength>>, + "min-block-size"?: Property$MinBlockSize<TLength> | Array<Property$MinBlockSize<TLength>>, + "min-height"?: Property$MinHeight<TLength> | Array<Property$MinHeight<TLength>>, + "min-inline-size"?: Property$MinInlineSize<TLength> | Array<Property$MinInlineSize<TLength>>, + "min-width"?: Property$MinWidth<TLength> | Array<Property$MinWidth<TLength>>, + "mix-blend-mode"?: Property$MixBlendMode | Array<Property$MixBlendMode>, + "motion-distance"?: Property$OffsetDistance<TLength> | Array<Property$OffsetDistance<TLength>>, + "motion-path"?: Property$OffsetPath | Array<Property$OffsetPath>, + "motion-rotation"?: Property$OffsetRotate | Array<Property$OffsetRotate>, + "object-fit"?: Property$ObjectFit | Array<Property$ObjectFit>, + "object-position"?: Property$ObjectPosition<TLength> | Array<Property$ObjectPosition<TLength>>, + "offset-anchor"?: Property$OffsetAnchor<TLength> | Array<Property$OffsetAnchor<TLength>>, + "offset-distance"?: Property$OffsetDistance<TLength> | Array<Property$OffsetDistance<TLength>>, + "offset-path"?: Property$OffsetPath | Array<Property$OffsetPath>, + "offset-position"?: Property$OffsetPosition<TLength> | Array<Property$OffsetPosition<TLength>>, + "offset-rotate"?: Property$OffsetRotate | Array<Property$OffsetRotate>, + "offset-rotation"?: Property$OffsetRotate | Array<Property$OffsetRotate>, + opacity?: Property$Opacity | Array<Property$Opacity>, + order?: Property$Order | Array<Property$Order>, + orphans?: Property$Orphans | Array<Property$Orphans>, + "outline-color"?: Property$OutlineColor | Array<Property$OutlineColor>, + "outline-offset"?: Property$OutlineOffset<TLength> | Array<Property$OutlineOffset<TLength>>, + "outline-style"?: Property$OutlineStyle | Array<Property$OutlineStyle>, + "outline-width"?: Property$OutlineWidth<TLength> | Array<Property$OutlineWidth<TLength>>, + "overflow-anchor"?: Property$OverflowAnchor | Array<Property$OverflowAnchor>, + "overflow-block"?: Property$OverflowBlock | Array<Property$OverflowBlock>, + "overflow-clip-box"?: Property$OverflowClipBox | Array<Property$OverflowClipBox>, + "overflow-clip-margin"?: Property$OverflowClipMargin<TLength> | Array<Property$OverflowClipMargin<TLength>>, + "overflow-inline"?: Property$OverflowInline | Array<Property$OverflowInline>, + "overflow-wrap"?: Property$OverflowWrap | Array<Property$OverflowWrap>, + "overflow-x"?: Property$OverflowX | Array<Property$OverflowX>, + "overflow-y"?: Property$OverflowY | Array<Property$OverflowY>, + overlay?: Property$Overlay | Array<Property$Overlay>, + "overscroll-behavior-block"?: Property$OverscrollBehaviorBlock | Array<Property$OverscrollBehaviorBlock>, + "overscroll-behavior-inline"?: Property$OverscrollBehaviorInline | Array<Property$OverscrollBehaviorInline>, + "overscroll-behavior-x"?: Property$OverscrollBehaviorX | Array<Property$OverscrollBehaviorX>, + "overscroll-behavior-y"?: Property$OverscrollBehaviorY | Array<Property$OverscrollBehaviorY>, + "padding-block-end"?: Property$PaddingBlockEnd<TLength> | Array<Property$PaddingBlockEnd<TLength>>, + "padding-block-start"?: Property$PaddingBlockStart<TLength> | Array<Property$PaddingBlockStart<TLength>>, + "padding-bottom"?: Property$PaddingBottom<TLength> | Array<Property$PaddingBottom<TLength>>, + "padding-inline-end"?: Property$PaddingInlineEnd<TLength> | Array<Property$PaddingInlineEnd<TLength>>, + "padding-inline-start"?: Property$PaddingInlineStart<TLength> | Array<Property$PaddingInlineStart<TLength>>, + "padding-left"?: Property$PaddingLeft<TLength> | Array<Property$PaddingLeft<TLength>>, + "padding-right"?: Property$PaddingRight<TLength> | Array<Property$PaddingRight<TLength>>, + "padding-top"?: Property$PaddingTop<TLength> | Array<Property$PaddingTop<TLength>>, + page?: Property$Page | Array<Property$Page>, + "page-break-after"?: Property$PageBreakAfter | Array<Property$PageBreakAfter>, + "page-break-before"?: Property$PageBreakBefore | Array<Property$PageBreakBefore>, + "page-break-inside"?: Property$PageBreakInside | Array<Property$PageBreakInside>, + "paint-order"?: Property$PaintOrder | Array<Property$PaintOrder>, + perspective?: Property$Perspective<TLength> | Array<Property$Perspective<TLength>>, + "perspective-origin"?: Property$PerspectiveOrigin<TLength> | Array<Property$PerspectiveOrigin<TLength>>, + "pointer-events"?: Property$PointerEvents | Array<Property$PointerEvents>, + position?: Property$Position | Array<Property$Position>, + "print-color-adjust"?: Property$PrintColorAdjust | Array<Property$PrintColorAdjust>, + quotes?: Property$Quotes | Array<Property$Quotes>, + resize?: Property$Resize | Array<Property$Resize>, + right?: Property$Right<TLength> | Array<Property$Right<TLength>>, + rotate?: Property$Rotate | Array<Property$Rotate>, + "row-gap"?: Property$RowGap<TLength> | Array<Property$RowGap<TLength>>, + "ruby-align"?: Property$RubyAlign | Array<Property$RubyAlign>, + "ruby-merge"?: Property$RubyMerge | Array<Property$RubyMerge>, + "ruby-position"?: Property$RubyPosition | Array<Property$RubyPosition>, + scale?: Property$Scale | Array<Property$Scale>, + "scroll-behavior"?: Property$ScrollBehavior | Array<Property$ScrollBehavior>, + "scroll-margin-block-end"?: Property$ScrollMarginBlockEnd<TLength> | Array<Property$ScrollMarginBlockEnd<TLength>>, + "scroll-margin-block-start"?: Property$ScrollMarginBlockStart<TLength> | Array<Property$ScrollMarginBlockStart<TLength>>, + "scroll-margin-bottom"?: Property$ScrollMarginBottom<TLength> | Array<Property$ScrollMarginBottom<TLength>>, + "scroll-margin-inline-end"?: Property$ScrollMarginInlineEnd<TLength> | Array<Property$ScrollMarginInlineEnd<TLength>>, + "scroll-margin-inline-start"?: Property$ScrollMarginInlineStart<TLength> | Array<Property$ScrollMarginInlineStart<TLength>>, + "scroll-margin-left"?: Property$ScrollMarginLeft<TLength> | Array<Property$ScrollMarginLeft<TLength>>, + "scroll-margin-right"?: Property$ScrollMarginRight<TLength> | Array<Property$ScrollMarginRight<TLength>>, + "scroll-margin-top"?: Property$ScrollMarginTop<TLength> | Array<Property$ScrollMarginTop<TLength>>, + "scroll-padding-block-end"?: Property$ScrollPaddingBlockEnd<TLength> | Array<Property$ScrollPaddingBlockEnd<TLength>>, + "scroll-padding-block-start"?: Property$ScrollPaddingBlockStart<TLength> | Array<Property$ScrollPaddingBlockStart<TLength>>, + "scroll-padding-bottom"?: Property$ScrollPaddingBottom<TLength> | Array<Property$ScrollPaddingBottom<TLength>>, + "scroll-padding-inline-end"?: Property$ScrollPaddingInlineEnd<TLength> | Array<Property$ScrollPaddingInlineEnd<TLength>>, + "scroll-padding-inline-start"?: Property$ScrollPaddingInlineStart<TLength> | Array<Property$ScrollPaddingInlineStart<TLength>>, + "scroll-padding-left"?: Property$ScrollPaddingLeft<TLength> | Array<Property$ScrollPaddingLeft<TLength>>, + "scroll-padding-right"?: Property$ScrollPaddingRight<TLength> | Array<Property$ScrollPaddingRight<TLength>>, + "scroll-padding-top"?: Property$ScrollPaddingTop<TLength> | Array<Property$ScrollPaddingTop<TLength>>, + "scroll-snap-align"?: Property$ScrollSnapAlign | Array<Property$ScrollSnapAlign>, + "scroll-snap-margin-bottom"?: Property$ScrollMarginBottom<TLength> | Array<Property$ScrollMarginBottom<TLength>>, + "scroll-snap-margin-left"?: Property$ScrollMarginLeft<TLength> | Array<Property$ScrollMarginLeft<TLength>>, + "scroll-snap-margin-right"?: Property$ScrollMarginRight<TLength> | Array<Property$ScrollMarginRight<TLength>>, + "scroll-snap-margin-top"?: Property$ScrollMarginTop<TLength> | Array<Property$ScrollMarginTop<TLength>>, + "scroll-snap-stop"?: Property$ScrollSnapStop | Array<Property$ScrollSnapStop>, + "scroll-snap-type"?: Property$ScrollSnapType | Array<Property$ScrollSnapType>, + "scroll-timeline-axis"?: Property$ScrollTimelineAxis | Array<Property$ScrollTimelineAxis>, + "scroll-timeline-name"?: Property$ScrollTimelineName | Array<Property$ScrollTimelineName>, + "scrollbar-color"?: Property$ScrollbarColor | Array<Property$ScrollbarColor>, + "scrollbar-gutter"?: Property$ScrollbarGutter | Array<Property$ScrollbarGutter>, + "scrollbar-width"?: Property$ScrollbarWidth | Array<Property$ScrollbarWidth>, + "shape-image-threshold"?: Property$ShapeImageThreshold | Array<Property$ShapeImageThreshold>, + "shape-margin"?: Property$ShapeMargin<TLength> | Array<Property$ShapeMargin<TLength>>, + "shape-outside"?: Property$ShapeOutside | Array<Property$ShapeOutside>, + "tab-size"?: Property$TabSize<TLength> | Array<Property$TabSize<TLength>>, + "table-layout"?: Property$TableLayout | Array<Property$TableLayout>, + "text-align"?: Property$TextAlign | Array<Property$TextAlign>, + "text-align-last"?: Property$TextAlignLast | Array<Property$TextAlignLast>, + "text-combine-upright"?: Property$TextCombineUpright | Array<Property$TextCombineUpright>, + "text-decoration-color"?: Property$TextDecorationColor | Array<Property$TextDecorationColor>, + "text-decoration-line"?: Property$TextDecorationLine | Array<Property$TextDecorationLine>, + "text-decoration-skip"?: Property$TextDecorationSkip | Array<Property$TextDecorationSkip>, + "text-decoration-skip-ink"?: Property$TextDecorationSkipInk | Array<Property$TextDecorationSkipInk>, + "text-decoration-style"?: Property$TextDecorationStyle | Array<Property$TextDecorationStyle>, + "text-decoration-thickness"?: Property$TextDecorationThickness<TLength> | Array<Property$TextDecorationThickness<TLength>>, + "text-emphasis-color"?: Property$TextEmphasisColor | Array<Property$TextEmphasisColor>, + "text-emphasis-position"?: Property$TextEmphasisPosition | Array<Property$TextEmphasisPosition>, + "text-emphasis-style"?: Property$TextEmphasisStyle | Array<Property$TextEmphasisStyle>, + "text-indent"?: Property$TextIndent<TLength> | Array<Property$TextIndent<TLength>>, + "text-justify"?: Property$TextJustify | Array<Property$TextJustify>, + "text-orientation"?: Property$TextOrientation | Array<Property$TextOrientation>, + "text-overflow"?: Property$TextOverflow | Array<Property$TextOverflow>, + "text-rendering"?: Property$TextRendering | Array<Property$TextRendering>, + "text-shadow"?: Property$TextShadow | Array<Property$TextShadow>, + "text-size-adjust"?: Property$TextSizeAdjust | Array<Property$TextSizeAdjust>, + "text-transform"?: Property$TextTransform | Array<Property$TextTransform>, + "text-underline-offset"?: Property$TextUnderlineOffset<TLength> | Array<Property$TextUnderlineOffset<TLength>>, + "text-underline-position"?: Property$TextUnderlinePosition | Array<Property$TextUnderlinePosition>, + "text-wrap"?: Property$TextWrap | Array<Property$TextWrap>, + "timeline-scope"?: Property$TimelineScope | Array<Property$TimelineScope>, + top?: Property$Top<TLength> | Array<Property$Top<TLength>>, + "touch-action"?: Property$TouchAction | Array<Property$TouchAction>, + transform?: Property$Transform | Array<Property$Transform>, + "transform-box"?: Property$TransformBox | Array<Property$TransformBox>, + "transform-origin"?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + "transform-style"?: Property$TransformStyle | Array<Property$TransformStyle>, + "transition-behavior"?: Property$TransitionBehavior | Array<Property$TransitionBehavior>, + "transition-delay"?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + "transition-duration"?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + "transition-property"?: Property$TransitionProperty | Array<Property$TransitionProperty>, + "transition-timing-function"?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + translate?: Property$Translate<TLength> | Array<Property$Translate<TLength>>, + "unicode-bidi"?: Property$UnicodeBidi | Array<Property$UnicodeBidi>, + "user-select"?: Property$UserSelect | Array<Property$UserSelect>, + "vertical-align"?: Property$VerticalAlign<TLength> | Array<Property$VerticalAlign<TLength>>, + "view-timeline-axis"?: Property$ViewTimelineAxis | Array<Property$ViewTimelineAxis>, + "view-timeline-inset"?: Property$ViewTimelineInset<TLength> | Array<Property$ViewTimelineInset<TLength>>, + "view-timeline-name"?: Property$ViewTimelineName | Array<Property$ViewTimelineName>, + "view-transition-name"?: Property$ViewTransitionName | Array<Property$ViewTransitionName>, + visibility?: Property$Visibility | Array<Property$Visibility>, + "white-space"?: Property$WhiteSpace | Array<Property$WhiteSpace>, + "white-space-collapse"?: Property$WhiteSpaceCollapse | Array<Property$WhiteSpaceCollapse>, + "white-space-trim"?: Property$WhiteSpaceTrim | Array<Property$WhiteSpaceTrim>, + widows?: Property$Widows | Array<Property$Widows>, + width?: Property$Width<TLength> | Array<Property$Width<TLength>>, + "will-change"?: Property$WillChange | Array<Property$WillChange>, + "word-break"?: Property$WordBreak | Array<Property$WordBreak>, + "word-spacing"?: Property$WordSpacing<TLength> | Array<Property$WordSpacing<TLength>>, + "word-wrap"?: Property$WordWrap | Array<Property$WordWrap>, + "writing-mode"?: Property$WritingMode | Array<Property$WritingMode>, + "z-index"?: Property$ZIndex | Array<Property$ZIndex>, + zoom?: Property$Zoom | Array<Property$Zoom>, +|}; + +export type StandardShorthandPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| + all?: Property$All | Array<Property$All>, + animation?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, + "animation-range"?: Property$AnimationRange<TLength> | Array<Property$AnimationRange<TLength>>, + background?: Property$Background<TLength> | Array<Property$Background<TLength>>, + "background-position"?: Property$BackgroundPosition<TLength> | Array<Property$BackgroundPosition<TLength>>, + border?: Property$Border<TLength> | Array<Property$Border<TLength>>, + "border-block"?: Property$BorderBlock<TLength> | Array<Property$BorderBlock<TLength>>, + "border-block-end"?: Property$BorderBlockEnd<TLength> | Array<Property$BorderBlockEnd<TLength>>, + "border-block-start"?: Property$BorderBlockStart<TLength> | Array<Property$BorderBlockStart<TLength>>, + "border-bottom"?: Property$BorderBottom<TLength> | Array<Property$BorderBottom<TLength>>, + "border-color"?: Property$BorderColor | Array<Property$BorderColor>, + "border-image"?: Property$BorderImage | Array<Property$BorderImage>, + "border-inline"?: Property$BorderInline<TLength> | Array<Property$BorderInline<TLength>>, + "border-inline-end"?: Property$BorderInlineEnd<TLength> | Array<Property$BorderInlineEnd<TLength>>, + "border-inline-start"?: Property$BorderInlineStart<TLength> | Array<Property$BorderInlineStart<TLength>>, + "border-left"?: Property$BorderLeft<TLength> | Array<Property$BorderLeft<TLength>>, + "border-radius"?: Property$BorderRadius<TLength> | Array<Property$BorderRadius<TLength>>, + "border-right"?: Property$BorderRight<TLength> | Array<Property$BorderRight<TLength>>, + "border-style"?: Property$BorderStyle | Array<Property$BorderStyle>, + "border-top"?: Property$BorderTop<TLength> | Array<Property$BorderTop<TLength>>, + "border-width"?: Property$BorderWidth<TLength> | Array<Property$BorderWidth<TLength>>, + caret?: Property$Caret | Array<Property$Caret>, + "column-rule"?: Property$ColumnRule<TLength> | Array<Property$ColumnRule<TLength>>, + columns?: Property$Columns<TLength> | Array<Property$Columns<TLength>>, + "contain-intrinsic-size"?: Property$ContainIntrinsicSize<TLength> | Array<Property$ContainIntrinsicSize<TLength>>, + container?: Property$Container | Array<Property$Container>, + flex?: Property$Flex<TLength> | Array<Property$Flex<TLength>>, + "flex-flow"?: Property$FlexFlow | Array<Property$FlexFlow>, + font?: Property$Font | Array<Property$Font>, + gap?: Property$Gap<TLength> | Array<Property$Gap<TLength>>, + grid?: Property$Grid | Array<Property$Grid>, + "grid-area"?: Property$GridArea | Array<Property$GridArea>, + "grid-column"?: Property$GridColumn | Array<Property$GridColumn>, + "grid-row"?: Property$GridRow | Array<Property$GridRow>, + "grid-template"?: Property$GridTemplate | Array<Property$GridTemplate>, + inset?: Property$Inset<TLength> | Array<Property$Inset<TLength>>, + "inset-block"?: Property$InsetBlock<TLength> | Array<Property$InsetBlock<TLength>>, + "inset-inline"?: Property$InsetInline<TLength> | Array<Property$InsetInline<TLength>>, + "line-clamp"?: Property$LineClamp | Array<Property$LineClamp>, + "list-style"?: Property$ListStyle | Array<Property$ListStyle>, + margin?: Property$Margin<TLength> | Array<Property$Margin<TLength>>, + "margin-block"?: Property$MarginBlock<TLength> | Array<Property$MarginBlock<TLength>>, + "margin-inline"?: Property$MarginInline<TLength> | Array<Property$MarginInline<TLength>>, + mask?: Property$Mask<TLength> | Array<Property$Mask<TLength>>, + "mask-border"?: Property$MaskBorder | Array<Property$MaskBorder>, + motion?: Property$Offset<TLength> | Array<Property$Offset<TLength>>, + offset?: Property$Offset<TLength> | Array<Property$Offset<TLength>>, + outline?: Property$Outline<TLength> | Array<Property$Outline<TLength>>, + overflow?: Property$Overflow | Array<Property$Overflow>, + "overscroll-behavior"?: Property$OverscrollBehavior | Array<Property$OverscrollBehavior>, + padding?: Property$Padding<TLength> | Array<Property$Padding<TLength>>, + "padding-block"?: Property$PaddingBlock<TLength> | Array<Property$PaddingBlock<TLength>>, + "padding-inline"?: Property$PaddingInline<TLength> | Array<Property$PaddingInline<TLength>>, + "place-content"?: Property$PlaceContent | Array<Property$PlaceContent>, + "place-items"?: Property$PlaceItems | Array<Property$PlaceItems>, + "place-self"?: Property$PlaceSelf | Array<Property$PlaceSelf>, + "scroll-margin"?: Property$ScrollMargin<TLength> | Array<Property$ScrollMargin<TLength>>, + "scroll-margin-block"?: Property$ScrollMarginBlock<TLength> | Array<Property$ScrollMarginBlock<TLength>>, + "scroll-margin-inline"?: Property$ScrollMarginInline<TLength> | Array<Property$ScrollMarginInline<TLength>>, + "scroll-padding"?: Property$ScrollPadding<TLength> | Array<Property$ScrollPadding<TLength>>, + "scroll-padding-block"?: Property$ScrollPaddingBlock<TLength> | Array<Property$ScrollPaddingBlock<TLength>>, + "scroll-padding-inline"?: Property$ScrollPaddingInline<TLength> | Array<Property$ScrollPaddingInline<TLength>>, + "scroll-snap-margin"?: Property$ScrollMargin<TLength> | Array<Property$ScrollMargin<TLength>>, + "scroll-timeline"?: Property$ScrollTimeline | Array<Property$ScrollTimeline>, + "text-decoration"?: Property$TextDecoration<TLength> | Array<Property$TextDecoration<TLength>>, + "text-emphasis"?: Property$TextEmphasis | Array<Property$TextEmphasis>, + transition?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, + "view-timeline"?: Property$ViewTimeline | Array<Property$ViewTimeline>, +|}; + +export type StandardPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| + ...StandardLonghandPropertiesHyphenFallback<TLength, TTime>, + ...StandardShorthandPropertiesHyphenFallback<TLength, TTime>, +|}; + +export type VendorLonghandPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| + "-moz-animation-delay"?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, + "-moz-animation-direction"?: Property$AnimationDirection | Array<Property$AnimationDirection>, + "-moz-animation-duration"?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, + "-moz-animation-fill-mode"?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, + "-moz-animation-iteration-count"?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, + "-moz-animation-name"?: Property$AnimationName | Array<Property$AnimationName>, + "-moz-animation-play-state"?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, + "-moz-animation-timing-function"?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, + "-moz-appearance"?: Property$MozAppearance | Array<Property$MozAppearance>, + "-moz-binding"?: Property$MozBinding | Array<Property$MozBinding>, + "-moz-border-bottom-colors"?: Property$MozBorderBottomColors | Array<Property$MozBorderBottomColors>, + "-moz-border-end-color"?: Property$BorderInlineEndColor | Array<Property$BorderInlineEndColor>, + "-moz-border-end-style"?: Property$BorderInlineEndStyle | Array<Property$BorderInlineEndStyle>, + "-moz-border-end-width"?: Property$BorderInlineEndWidth<TLength> | Array<Property$BorderInlineEndWidth<TLength>>, + "-moz-border-left-colors"?: Property$MozBorderLeftColors | Array<Property$MozBorderLeftColors>, + "-moz-border-right-colors"?: Property$MozBorderRightColors | Array<Property$MozBorderRightColors>, + "-moz-border-start-color"?: Property$BorderInlineStartColor | Array<Property$BorderInlineStartColor>, + "-moz-border-start-style"?: Property$BorderInlineStartStyle | Array<Property$BorderInlineStartStyle>, + "-moz-border-top-colors"?: Property$MozBorderTopColors | Array<Property$MozBorderTopColors>, + "-moz-box-sizing"?: Property$BoxSizing | Array<Property$BoxSizing>, + "-moz-column-count"?: Property$ColumnCount | Array<Property$ColumnCount>, + "-moz-column-fill"?: Property$ColumnFill | Array<Property$ColumnFill>, + "-moz-column-rule-color"?: Property$ColumnRuleColor | Array<Property$ColumnRuleColor>, + "-moz-column-rule-style"?: Property$ColumnRuleStyle | Array<Property$ColumnRuleStyle>, + "-moz-column-rule-width"?: Property$ColumnRuleWidth<TLength> | Array<Property$ColumnRuleWidth<TLength>>, + "-moz-column-width"?: Property$ColumnWidth<TLength> | Array<Property$ColumnWidth<TLength>>, + "-moz-context-properties"?: Property$MozContextProperties | Array<Property$MozContextProperties>, + "-moz-font-feature-settings"?: Property$FontFeatureSettings | Array<Property$FontFeatureSettings>, + "-moz-font-language-override"?: Property$FontLanguageOverride | Array<Property$FontLanguageOverride>, + "-moz-hyphens"?: Property$Hyphens | Array<Property$Hyphens>, + "-moz-image-region"?: Property$MozImageRegion | Array<Property$MozImageRegion>, + "-moz-margin-end"?: Property$MarginInlineEnd<TLength> | Array<Property$MarginInlineEnd<TLength>>, + "-moz-margin-start"?: Property$MarginInlineStart<TLength> | Array<Property$MarginInlineStart<TLength>>, + "-moz-orient"?: Property$MozOrient | Array<Property$MozOrient>, + "-moz-osx-font-smoothing"?: Property$FontSmooth<TLength> | Array<Property$FontSmooth<TLength>>, + "-moz-outline-radius-bottomleft"?: Property$MozOutlineRadiusBottomleft<TLength> | Array<Property$MozOutlineRadiusBottomleft<TLength>>, + "-moz-outline-radius-bottomright"?: Property$MozOutlineRadiusBottomright<TLength> | Array<Property$MozOutlineRadiusBottomright<TLength>>, + "-moz-outline-radius-topleft"?: Property$MozOutlineRadiusTopleft<TLength> | Array<Property$MozOutlineRadiusTopleft<TLength>>, + "-moz-outline-radius-topright"?: Property$MozOutlineRadiusTopright<TLength> | Array<Property$MozOutlineRadiusTopright<TLength>>, + "-moz-padding-end"?: Property$PaddingInlineEnd<TLength> | Array<Property$PaddingInlineEnd<TLength>>, + "-moz-padding-start"?: Property$PaddingInlineStart<TLength> | Array<Property$PaddingInlineStart<TLength>>, + "-moz-stack-sizing"?: Property$MozStackSizing | Array<Property$MozStackSizing>, + "-moz-tab-size"?: Property$TabSize<TLength> | Array<Property$TabSize<TLength>>, + "-moz-text-blink"?: Property$MozTextBlink | Array<Property$MozTextBlink>, + "-moz-text-size-adjust"?: Property$TextSizeAdjust | Array<Property$TextSizeAdjust>, + "-moz-user-focus"?: Property$MozUserFocus | Array<Property$MozUserFocus>, + "-moz-user-modify"?: Property$MozUserModify | Array<Property$MozUserModify>, + "-moz-user-select"?: Property$UserSelect | Array<Property$UserSelect>, + "-moz-window-dragging"?: Property$MozWindowDragging | Array<Property$MozWindowDragging>, + "-moz-window-shadow"?: Property$MozWindowShadow | Array<Property$MozWindowShadow>, + "-ms-accelerator"?: Property$MsAccelerator | Array<Property$MsAccelerator>, + "-ms-block-progression"?: Property$MsBlockProgression | Array<Property$MsBlockProgression>, + "-ms-content-zoom-chaining"?: Property$MsContentZoomChaining | Array<Property$MsContentZoomChaining>, + "-ms-content-zoom-limit-max"?: Property$MsContentZoomLimitMax | Array<Property$MsContentZoomLimitMax>, + "-ms-content-zoom-limit-min"?: Property$MsContentZoomLimitMin | Array<Property$MsContentZoomLimitMin>, + "-ms-content-zoom-snap-points"?: Property$MsContentZoomSnapPoints | Array<Property$MsContentZoomSnapPoints>, + "-ms-content-zoom-snap-type"?: Property$MsContentZoomSnapType | Array<Property$MsContentZoomSnapType>, + "-ms-content-zooming"?: Property$MsContentZooming | Array<Property$MsContentZooming>, + "-ms-filter"?: Property$MsFilter | Array<Property$MsFilter>, + "-ms-flex-direction"?: Property$FlexDirection | Array<Property$FlexDirection>, + "-ms-flex-positive"?: Property$FlexGrow | Array<Property$FlexGrow>, + "-ms-flow-from"?: Property$MsFlowFrom | Array<Property$MsFlowFrom>, + "-ms-flow-into"?: Property$MsFlowInto | Array<Property$MsFlowInto>, + "-ms-grid-columns"?: Property$MsGridColumns<TLength> | Array<Property$MsGridColumns<TLength>>, + "-ms-grid-rows"?: Property$MsGridRows<TLength> | Array<Property$MsGridRows<TLength>>, + "-ms-high-contrast-adjust"?: Property$MsHighContrastAdjust | Array<Property$MsHighContrastAdjust>, + "-ms-hyphenate-limit-chars"?: Property$MsHyphenateLimitChars | Array<Property$MsHyphenateLimitChars>, + "-ms-hyphenate-limit-lines"?: Property$MsHyphenateLimitLines | Array<Property$MsHyphenateLimitLines>, + "-ms-hyphenate-limit-zone"?: Property$MsHyphenateLimitZone<TLength> | Array<Property$MsHyphenateLimitZone<TLength>>, + "-ms-hyphens"?: Property$Hyphens | Array<Property$Hyphens>, + "-ms-ime-align"?: Property$MsImeAlign | Array<Property$MsImeAlign>, + "-ms-line-break"?: Property$LineBreak | Array<Property$LineBreak>, + "-ms-order"?: Property$Order | Array<Property$Order>, + "-ms-overflow-style"?: Property$MsOverflowStyle | Array<Property$MsOverflowStyle>, + "-ms-overflow-x"?: Property$OverflowX | Array<Property$OverflowX>, + "-ms-overflow-y"?: Property$OverflowY | Array<Property$OverflowY>, + "-ms-scroll-chaining"?: Property$MsScrollChaining | Array<Property$MsScrollChaining>, + "-ms-scroll-limit-x-max"?: Property$MsScrollLimitXMax<TLength> | Array<Property$MsScrollLimitXMax<TLength>>, + "-ms-scroll-limit-x-min"?: Property$MsScrollLimitXMin<TLength> | Array<Property$MsScrollLimitXMin<TLength>>, + "-ms-scroll-limit-y-max"?: Property$MsScrollLimitYMax<TLength> | Array<Property$MsScrollLimitYMax<TLength>>, + "-ms-scroll-limit-y-min"?: Property$MsScrollLimitYMin<TLength> | Array<Property$MsScrollLimitYMin<TLength>>, + "-ms-scroll-rails"?: Property$MsScrollRails | Array<Property$MsScrollRails>, + "-ms-scroll-snap-points-x"?: Property$MsScrollSnapPointsX | Array<Property$MsScrollSnapPointsX>, + "-ms-scroll-snap-points-y"?: Property$MsScrollSnapPointsY | Array<Property$MsScrollSnapPointsY>, + "-ms-scroll-snap-type"?: Property$MsScrollSnapType | Array<Property$MsScrollSnapType>, + "-ms-scroll-translation"?: Property$MsScrollTranslation | Array<Property$MsScrollTranslation>, + "-ms-scrollbar-3dlight-color"?: Property$MsScrollbar3dlightColor | Array<Property$MsScrollbar3dlightColor>, + "-ms-scrollbar-arrow-color"?: Property$MsScrollbarArrowColor | Array<Property$MsScrollbarArrowColor>, + "-ms-scrollbar-base-color"?: Property$MsScrollbarBaseColor | Array<Property$MsScrollbarBaseColor>, + "-ms-scrollbar-darkshadow-color"?: Property$MsScrollbarDarkshadowColor | Array<Property$MsScrollbarDarkshadowColor>, + "-ms-scrollbar-face-color"?: Property$MsScrollbarFaceColor | Array<Property$MsScrollbarFaceColor>, + "-ms-scrollbar-highlight-color"?: Property$MsScrollbarHighlightColor | Array<Property$MsScrollbarHighlightColor>, + "-ms-scrollbar-shadow-color"?: Property$MsScrollbarShadowColor | Array<Property$MsScrollbarShadowColor>, + "-ms-scrollbar-track-color"?: Property$MsScrollbarTrackColor | Array<Property$MsScrollbarTrackColor>, + "-ms-text-autospace"?: Property$MsTextAutospace | Array<Property$MsTextAutospace>, + "-ms-text-combine-horizontal"?: Property$TextCombineUpright | Array<Property$TextCombineUpright>, + "-ms-text-overflow"?: Property$TextOverflow | Array<Property$TextOverflow>, + "-ms-touch-action"?: Property$TouchAction | Array<Property$TouchAction>, + "-ms-touch-select"?: Property$MsTouchSelect | Array<Property$MsTouchSelect>, + "-ms-transform"?: Property$Transform | Array<Property$Transform>, + "-ms-transform-origin"?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + "-ms-transition-delay"?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + "-ms-transition-duration"?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + "-ms-transition-property"?: Property$TransitionProperty | Array<Property$TransitionProperty>, + "-ms-transition-timing-function"?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + "-ms-user-select"?: Property$MsUserSelect | Array<Property$MsUserSelect>, + "-ms-word-break"?: Property$WordBreak | Array<Property$WordBreak>, + "-ms-wrap-flow"?: Property$MsWrapFlow | Array<Property$MsWrapFlow>, + "-ms-wrap-margin"?: Property$MsWrapMargin<TLength> | Array<Property$MsWrapMargin<TLength>>, + "-ms-wrap-through"?: Property$MsWrapThrough | Array<Property$MsWrapThrough>, + "-ms-writing-mode"?: Property$WritingMode | Array<Property$WritingMode>, + "-webkit-align-content"?: Property$AlignContent | Array<Property$AlignContent>, + "-webkit-align-items"?: Property$AlignItems | Array<Property$AlignItems>, + "-webkit-align-self"?: Property$AlignSelf | Array<Property$AlignSelf>, + "-webkit-animation-delay"?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, + "-webkit-animation-direction"?: Property$AnimationDirection | Array<Property$AnimationDirection>, + "-webkit-animation-duration"?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, + "-webkit-animation-fill-mode"?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, + "-webkit-animation-iteration-count"?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, + "-webkit-animation-name"?: Property$AnimationName | Array<Property$AnimationName>, + "-webkit-animation-play-state"?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, + "-webkit-animation-timing-function"?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, + "-webkit-appearance"?: Property$WebkitAppearance | Array<Property$WebkitAppearance>, + "-webkit-backdrop-filter"?: Property$BackdropFilter | Array<Property$BackdropFilter>, + "-webkit-backface-visibility"?: Property$BackfaceVisibility | Array<Property$BackfaceVisibility>, + "-webkit-background-clip"?: Property$BackgroundClip | Array<Property$BackgroundClip>, + "-webkit-background-origin"?: Property$BackgroundOrigin | Array<Property$BackgroundOrigin>, + "-webkit-background-size"?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, + "-webkit-border-before-color"?: Property$WebkitBorderBeforeColor | Array<Property$WebkitBorderBeforeColor>, + "-webkit-border-before-style"?: Property$WebkitBorderBeforeStyle | Array<Property$WebkitBorderBeforeStyle>, + "-webkit-border-before-width"?: Property$WebkitBorderBeforeWidth<TLength> | Array<Property$WebkitBorderBeforeWidth<TLength>>, + "-webkit-border-bottom-left-radius"?: Property$BorderBottomLeftRadius<TLength> | Array<Property$BorderBottomLeftRadius<TLength>>, + "-webkit-border-bottom-right-radius"?: Property$BorderBottomRightRadius<TLength> | Array<Property$BorderBottomRightRadius<TLength>>, + "-webkit-border-image-slice"?: Property$BorderImageSlice | Array<Property$BorderImageSlice>, + "-webkit-border-top-left-radius"?: Property$BorderTopLeftRadius<TLength> | Array<Property$BorderTopLeftRadius<TLength>>, + "-webkit-border-top-right-radius"?: Property$BorderTopRightRadius<TLength> | Array<Property$BorderTopRightRadius<TLength>>, + "-webkit-box-decoration-break"?: Property$BoxDecorationBreak | Array<Property$BoxDecorationBreak>, + "-webkit-box-reflect"?: Property$WebkitBoxReflect<TLength> | Array<Property$WebkitBoxReflect<TLength>>, + "-webkit-box-shadow"?: Property$BoxShadow | Array<Property$BoxShadow>, + "-webkit-box-sizing"?: Property$BoxSizing | Array<Property$BoxSizing>, + "-webkit-clip-path"?: Property$ClipPath | Array<Property$ClipPath>, + "-webkit-column-count"?: Property$ColumnCount | Array<Property$ColumnCount>, + "-webkit-column-fill"?: Property$ColumnFill | Array<Property$ColumnFill>, + "-webkit-column-rule-color"?: Property$ColumnRuleColor | Array<Property$ColumnRuleColor>, + "-webkit-column-rule-style"?: Property$ColumnRuleStyle | Array<Property$ColumnRuleStyle>, + "-webkit-column-rule-width"?: Property$ColumnRuleWidth<TLength> | Array<Property$ColumnRuleWidth<TLength>>, + "-webkit-column-span"?: Property$ColumnSpan | Array<Property$ColumnSpan>, + "-webkit-column-width"?: Property$ColumnWidth<TLength> | Array<Property$ColumnWidth<TLength>>, + "-webkit-filter"?: Property$Filter | Array<Property$Filter>, + "-webkit-flex-basis"?: Property$FlexBasis<TLength> | Array<Property$FlexBasis<TLength>>, + "-webkit-flex-direction"?: Property$FlexDirection | Array<Property$FlexDirection>, + "-webkit-flex-grow"?: Property$FlexGrow | Array<Property$FlexGrow>, + "-webkit-flex-shrink"?: Property$FlexShrink | Array<Property$FlexShrink>, + "-webkit-flex-wrap"?: Property$FlexWrap | Array<Property$FlexWrap>, + "-webkit-font-feature-settings"?: Property$FontFeatureSettings | Array<Property$FontFeatureSettings>, + "-webkit-font-kerning"?: Property$FontKerning | Array<Property$FontKerning>, + "-webkit-font-smoothing"?: Property$FontSmooth<TLength> | Array<Property$FontSmooth<TLength>>, + "-webkit-font-variant-ligatures"?: Property$FontVariantLigatures | Array<Property$FontVariantLigatures>, + "-webkit-hyphenate-character"?: Property$HyphenateCharacter | Array<Property$HyphenateCharacter>, + "-webkit-hyphens"?: Property$Hyphens | Array<Property$Hyphens>, + "-webkit-initial-letter"?: Property$InitialLetter | Array<Property$InitialLetter>, + "-webkit-justify-content"?: Property$JustifyContent | Array<Property$JustifyContent>, + "-webkit-line-break"?: Property$LineBreak | Array<Property$LineBreak>, + "-webkit-line-clamp"?: Property$WebkitLineClamp | Array<Property$WebkitLineClamp>, + "-webkit-margin-end"?: Property$MarginInlineEnd<TLength> | Array<Property$MarginInlineEnd<TLength>>, + "-webkit-margin-start"?: Property$MarginInlineStart<TLength> | Array<Property$MarginInlineStart<TLength>>, + "-webkit-mask-attachment"?: Property$WebkitMaskAttachment | Array<Property$WebkitMaskAttachment>, + "-webkit-mask-box-image-outset"?: Property$MaskBorderOutset<TLength> | Array<Property$MaskBorderOutset<TLength>>, + "-webkit-mask-box-image-repeat"?: Property$MaskBorderRepeat | Array<Property$MaskBorderRepeat>, + "-webkit-mask-box-image-slice"?: Property$MaskBorderSlice | Array<Property$MaskBorderSlice>, + "-webkit-mask-box-image-source"?: Property$MaskBorderSource | Array<Property$MaskBorderSource>, + "-webkit-mask-box-image-width"?: Property$MaskBorderWidth<TLength> | Array<Property$MaskBorderWidth<TLength>>, + "-webkit-mask-clip"?: Property$WebkitMaskClip | Array<Property$WebkitMaskClip>, + "-webkit-mask-composite"?: Property$WebkitMaskComposite | Array<Property$WebkitMaskComposite>, + "-webkit-mask-image"?: Property$WebkitMaskImage | Array<Property$WebkitMaskImage>, + "-webkit-mask-origin"?: Property$WebkitMaskOrigin | Array<Property$WebkitMaskOrigin>, + "-webkit-mask-position"?: Property$WebkitMaskPosition<TLength> | Array<Property$WebkitMaskPosition<TLength>>, + "-webkit-mask-position-x"?: Property$WebkitMaskPositionX<TLength> | Array<Property$WebkitMaskPositionX<TLength>>, + "-webkit-mask-position-y"?: Property$WebkitMaskPositionY<TLength> | Array<Property$WebkitMaskPositionY<TLength>>, + "-webkit-mask-repeat"?: Property$WebkitMaskRepeat | Array<Property$WebkitMaskRepeat>, + "-webkit-mask-repeat-x"?: Property$WebkitMaskRepeatX | Array<Property$WebkitMaskRepeatX>, + "-webkit-mask-repeat-y"?: Property$WebkitMaskRepeatY | Array<Property$WebkitMaskRepeatY>, + "-webkit-mask-size"?: Property$WebkitMaskSize<TLength> | Array<Property$WebkitMaskSize<TLength>>, + "-webkit-max-inline-size"?: Property$MaxInlineSize<TLength> | Array<Property$MaxInlineSize<TLength>>, + "-webkit-order"?: Property$Order | Array<Property$Order>, + "-webkit-overflow-scrolling"?: Property$WebkitOverflowScrolling | Array<Property$WebkitOverflowScrolling>, + "-webkit-padding-end"?: Property$PaddingInlineEnd<TLength> | Array<Property$PaddingInlineEnd<TLength>>, + "-webkit-padding-start"?: Property$PaddingInlineStart<TLength> | Array<Property$PaddingInlineStart<TLength>>, + "-webkit-perspective"?: Property$Perspective<TLength> | Array<Property$Perspective<TLength>>, + "-webkit-perspective-origin"?: Property$PerspectiveOrigin<TLength> | Array<Property$PerspectiveOrigin<TLength>>, + "-webkit-print-color-adjust"?: Property$PrintColorAdjust | Array<Property$PrintColorAdjust>, + "-webkit-ruby-position"?: Property$RubyPosition | Array<Property$RubyPosition>, + "-webkit-scroll-snap-type"?: Property$ScrollSnapType | Array<Property$ScrollSnapType>, + "-webkit-shape-margin"?: Property$ShapeMargin<TLength> | Array<Property$ShapeMargin<TLength>>, + "-webkit-tap-highlight-color"?: Property$WebkitTapHighlightColor | Array<Property$WebkitTapHighlightColor>, + "-webkit-text-combine"?: Property$TextCombineUpright | Array<Property$TextCombineUpright>, + "-webkit-text-decoration-color"?: Property$TextDecorationColor | Array<Property$TextDecorationColor>, + "-webkit-text-decoration-line"?: Property$TextDecorationLine | Array<Property$TextDecorationLine>, + "-webkit-text-decoration-skip"?: Property$TextDecorationSkip | Array<Property$TextDecorationSkip>, + "-webkit-text-decoration-style"?: Property$TextDecorationStyle | Array<Property$TextDecorationStyle>, + "-webkit-text-emphasis-color"?: Property$TextEmphasisColor | Array<Property$TextEmphasisColor>, + "-webkit-text-emphasis-position"?: Property$TextEmphasisPosition | Array<Property$TextEmphasisPosition>, + "-webkit-text-emphasis-style"?: Property$TextEmphasisStyle | Array<Property$TextEmphasisStyle>, + "-webkit-text-fill-color"?: Property$WebkitTextFillColor | Array<Property$WebkitTextFillColor>, + "-webkit-text-orientation"?: Property$TextOrientation | Array<Property$TextOrientation>, + "-webkit-text-size-adjust"?: Property$TextSizeAdjust | Array<Property$TextSizeAdjust>, + "-webkit-text-stroke-color"?: Property$WebkitTextStrokeColor | Array<Property$WebkitTextStrokeColor>, + "-webkit-text-stroke-width"?: Property$WebkitTextStrokeWidth<TLength> | Array<Property$WebkitTextStrokeWidth<TLength>>, + "-webkit-text-underline-position"?: Property$TextUnderlinePosition | Array<Property$TextUnderlinePosition>, + "-webkit-touch-callout"?: Property$WebkitTouchCallout | Array<Property$WebkitTouchCallout>, + "-webkit-transform"?: Property$Transform | Array<Property$Transform>, + "-webkit-transform-origin"?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + "-webkit-transform-style"?: Property$TransformStyle | Array<Property$TransformStyle>, + "-webkit-transition-delay"?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + "-webkit-transition-duration"?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + "-webkit-transition-property"?: Property$TransitionProperty | Array<Property$TransitionProperty>, + "-webkit-transition-timing-function"?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + "-webkit-user-modify"?: Property$WebkitUserModify | Array<Property$WebkitUserModify>, + "-webkit-user-select"?: Property$UserSelect | Array<Property$UserSelect>, + "-webkit-writing-mode"?: Property$WritingMode | Array<Property$WritingMode>, +|}; + +export type VendorShorthandPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| + "-moz-animation"?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, + "-moz-border-image"?: Property$BorderImage | Array<Property$BorderImage>, + "-moz-column-rule"?: Property$ColumnRule<TLength> | Array<Property$ColumnRule<TLength>>, + "-moz-columns"?: Property$Columns<TLength> | Array<Property$Columns<TLength>>, + "-moz-outline-radius"?: Property$MozOutlineRadius<TLength> | Array<Property$MozOutlineRadius<TLength>>, + "-ms-content-zoom-limit"?: Property$MsContentZoomLimit | Array<Property$MsContentZoomLimit>, + "-ms-content-zoom-snap"?: Property$MsContentZoomSnap | Array<Property$MsContentZoomSnap>, + "-ms-flex"?: Property$Flex<TLength> | Array<Property$Flex<TLength>>, + "-ms-scroll-limit"?: Property$MsScrollLimit | Array<Property$MsScrollLimit>, + "-ms-scroll-snap-x"?: Property$MsScrollSnapX | Array<Property$MsScrollSnapX>, + "-ms-scroll-snap-y"?: Property$MsScrollSnapY | Array<Property$MsScrollSnapY>, + "-ms-transition"?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, + "-webkit-animation"?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, + "-webkit-border-before"?: Property$WebkitBorderBefore<TLength> | Array<Property$WebkitBorderBefore<TLength>>, + "-webkit-border-image"?: Property$BorderImage | Array<Property$BorderImage>, + "-webkit-border-radius"?: Property$BorderRadius<TLength> | Array<Property$BorderRadius<TLength>>, + "-webkit-column-rule"?: Property$ColumnRule<TLength> | Array<Property$ColumnRule<TLength>>, + "-webkit-columns"?: Property$Columns<TLength> | Array<Property$Columns<TLength>>, + "-webkit-flex"?: Property$Flex<TLength> | Array<Property$Flex<TLength>>, + "-webkit-flex-flow"?: Property$FlexFlow | Array<Property$FlexFlow>, + "-webkit-mask"?: Property$WebkitMask<TLength> | Array<Property$WebkitMask<TLength>>, + "-webkit-mask-box-image"?: Property$MaskBorder | Array<Property$MaskBorder>, + "-webkit-text-emphasis"?: Property$TextEmphasis | Array<Property$TextEmphasis>, + "-webkit-text-stroke"?: Property$WebkitTextStroke<TLength> | Array<Property$WebkitTextStroke<TLength>>, + "-webkit-transition"?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, +|}; + +export type VendorPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| + ...VendorLonghandPropertiesHyphenFallback<TLength, TTime>, + ...VendorShorthandPropertiesHyphenFallback<TLength, TTime>, +|}; + +export type ObsoletePropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| + azimuth?: Property$Azimuth | Array<Property$Azimuth>, + "box-align"?: Property$BoxAlign | Array<Property$BoxAlign>, + "box-direction"?: Property$BoxDirection | Array<Property$BoxDirection>, + "box-flex"?: Property$BoxFlex | Array<Property$BoxFlex>, + "box-flex-group"?: Property$BoxFlexGroup | Array<Property$BoxFlexGroup>, + "box-lines"?: Property$BoxLines | Array<Property$BoxLines>, + "box-ordinal-group"?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, + "box-orient"?: Property$BoxOrient | Array<Property$BoxOrient>, + "box-pack"?: Property$BoxPack | Array<Property$BoxPack>, + clip?: Property$Clip | Array<Property$Clip>, + "grid-column-gap"?: Property$GridColumnGap<TLength> | Array<Property$GridColumnGap<TLength>>, + "grid-gap"?: Property$GridGap<TLength> | Array<Property$GridGap<TLength>>, + "grid-row-gap"?: Property$GridRowGap<TLength> | Array<Property$GridRowGap<TLength>>, + "ime-mode"?: Property$ImeMode | Array<Property$ImeMode>, + "offset-block"?: Property$InsetBlock<TLength> | Array<Property$InsetBlock<TLength>>, + "offset-block-end"?: Property$InsetBlockEnd<TLength> | Array<Property$InsetBlockEnd<TLength>>, + "offset-block-start"?: Property$InsetBlockStart<TLength> | Array<Property$InsetBlockStart<TLength>>, + "offset-inline"?: Property$InsetInline<TLength> | Array<Property$InsetInline<TLength>>, + "offset-inline-end"?: Property$InsetInlineEnd<TLength> | Array<Property$InsetInlineEnd<TLength>>, + "offset-inline-start"?: Property$InsetInlineStart<TLength> | Array<Property$InsetInlineStart<TLength>>, + "scroll-snap-coordinate"?: Property$ScrollSnapCoordinate<TLength> | Array<Property$ScrollSnapCoordinate<TLength>>, + "scroll-snap-destination"?: Property$ScrollSnapDestination<TLength> | Array<Property$ScrollSnapDestination<TLength>>, + "scroll-snap-points-x"?: Property$ScrollSnapPointsX | Array<Property$ScrollSnapPointsX>, + "scroll-snap-points-y"?: Property$ScrollSnapPointsY | Array<Property$ScrollSnapPointsY>, + "scroll-snap-type-x"?: Property$ScrollSnapTypeX | Array<Property$ScrollSnapTypeX>, + "scroll-snap-type-y"?: Property$ScrollSnapTypeY | Array<Property$ScrollSnapTypeY>, + "-khtml-box-align"?: Property$BoxAlign | Array<Property$BoxAlign>, + "-khtml-box-direction"?: Property$BoxDirection | Array<Property$BoxDirection>, + "-khtml-box-flex"?: Property$BoxFlex | Array<Property$BoxFlex>, + "-khtml-box-flex-group"?: Property$BoxFlexGroup | Array<Property$BoxFlexGroup>, + "-khtml-box-lines"?: Property$BoxLines | Array<Property$BoxLines>, + "-khtml-box-ordinal-group"?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, + "-khtml-box-orient"?: Property$BoxOrient | Array<Property$BoxOrient>, + "-khtml-box-pack"?: Property$BoxPack | Array<Property$BoxPack>, + "-khtml-line-break"?: Property$LineBreak | Array<Property$LineBreak>, + "-khtml-opacity"?: Property$Opacity | Array<Property$Opacity>, + "-khtml-user-select"?: Property$UserSelect | Array<Property$UserSelect>, + "-moz-backface-visibility"?: Property$BackfaceVisibility | Array<Property$BackfaceVisibility>, + "-moz-background-clip"?: Property$BackgroundClip | Array<Property$BackgroundClip>, + "-moz-background-inline-policy"?: Property$BoxDecorationBreak | Array<Property$BoxDecorationBreak>, + "-moz-background-origin"?: Property$BackgroundOrigin | Array<Property$BackgroundOrigin>, + "-moz-background-size"?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, + "-moz-border-radius"?: Property$BorderRadius<TLength> | Array<Property$BorderRadius<TLength>>, + "-moz-border-radius-bottomleft"?: Property$BorderBottomLeftRadius<TLength> | Array<Property$BorderBottomLeftRadius<TLength>>, + "-moz-border-radius-bottomright"?: Property$BorderBottomRightRadius<TLength> | Array<Property$BorderBottomRightRadius<TLength>>, + "-moz-border-radius-topleft"?: Property$BorderTopLeftRadius<TLength> | Array<Property$BorderTopLeftRadius<TLength>>, + "-moz-border-radius-topright"?: Property$BorderTopRightRadius<TLength> | Array<Property$BorderTopRightRadius<TLength>>, + "-moz-box-align"?: Property$BoxAlign | Array<Property$BoxAlign>, + "-moz-box-direction"?: Property$BoxDirection | Array<Property$BoxDirection>, + "-moz-box-flex"?: Property$BoxFlex | Array<Property$BoxFlex>, + "-moz-box-ordinal-group"?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, + "-moz-box-orient"?: Property$BoxOrient | Array<Property$BoxOrient>, + "-moz-box-pack"?: Property$BoxPack | Array<Property$BoxPack>, + "-moz-box-shadow"?: Property$BoxShadow | Array<Property$BoxShadow>, + "-moz-float-edge"?: Property$MozFloatEdge | Array<Property$MozFloatEdge>, + "-moz-force-broken-image-icon"?: Property$MozForceBrokenImageIcon | Array<Property$MozForceBrokenImageIcon>, + "-moz-opacity"?: Property$Opacity | Array<Property$Opacity>, + "-moz-outline"?: Property$Outline<TLength> | Array<Property$Outline<TLength>>, + "-moz-outline-color"?: Property$OutlineColor | Array<Property$OutlineColor>, + "-moz-outline-style"?: Property$OutlineStyle | Array<Property$OutlineStyle>, + "-moz-outline-width"?: Property$OutlineWidth<TLength> | Array<Property$OutlineWidth<TLength>>, + "-moz-perspective"?: Property$Perspective<TLength> | Array<Property$Perspective<TLength>>, + "-moz-perspective-origin"?: Property$PerspectiveOrigin<TLength> | Array<Property$PerspectiveOrigin<TLength>>, + "-moz-text-align-last"?: Property$TextAlignLast | Array<Property$TextAlignLast>, + "-moz-text-decoration-color"?: Property$TextDecorationColor | Array<Property$TextDecorationColor>, + "-moz-text-decoration-line"?: Property$TextDecorationLine | Array<Property$TextDecorationLine>, + "-moz-text-decoration-style"?: Property$TextDecorationStyle | Array<Property$TextDecorationStyle>, + "-moz-transform"?: Property$Transform | Array<Property$Transform>, + "-moz-transform-origin"?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + "-moz-transform-style"?: Property$TransformStyle | Array<Property$TransformStyle>, + "-moz-transition"?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, + "-moz-transition-delay"?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + "-moz-transition-duration"?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + "-moz-transition-property"?: Property$TransitionProperty | Array<Property$TransitionProperty>, + "-moz-transition-timing-function"?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + "-moz-user-input"?: Property$MozUserInput | Array<Property$MozUserInput>, + "-ms-ime-mode"?: Property$ImeMode | Array<Property$ImeMode>, + "-o-animation"?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, + "-o-animation-delay"?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, + "-o-animation-direction"?: Property$AnimationDirection | Array<Property$AnimationDirection>, + "-o-animation-duration"?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, + "-o-animation-fill-mode"?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, + "-o-animation-iteration-count"?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, + "-o-animation-name"?: Property$AnimationName | Array<Property$AnimationName>, + "-o-animation-play-state"?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, + "-o-animation-timing-function"?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, + "-o-background-size"?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, + "-o-border-image"?: Property$BorderImage | Array<Property$BorderImage>, + "-o-object-fit"?: Property$ObjectFit | Array<Property$ObjectFit>, + "-o-object-position"?: Property$ObjectPosition<TLength> | Array<Property$ObjectPosition<TLength>>, + "-o-tab-size"?: Property$TabSize<TLength> | Array<Property$TabSize<TLength>>, + "-o-text-overflow"?: Property$TextOverflow | Array<Property$TextOverflow>, + "-o-transform"?: Property$Transform | Array<Property$Transform>, + "-o-transform-origin"?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + "-o-transition"?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, + "-o-transition-delay"?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + "-o-transition-duration"?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + "-o-transition-property"?: Property$TransitionProperty | Array<Property$TransitionProperty>, + "-o-transition-timing-function"?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + "-webkit-box-align"?: Property$BoxAlign | Array<Property$BoxAlign>, + "-webkit-box-direction"?: Property$BoxDirection | Array<Property$BoxDirection>, + "-webkit-box-flex"?: Property$BoxFlex | Array<Property$BoxFlex>, + "-webkit-box-flex-group"?: Property$BoxFlexGroup | Array<Property$BoxFlexGroup>, + "-webkit-box-lines"?: Property$BoxLines | Array<Property$BoxLines>, + "-webkit-box-ordinal-group"?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, + "-webkit-box-orient"?: Property$BoxOrient | Array<Property$BoxOrient>, + "-webkit-box-pack"?: Property$BoxPack | Array<Property$BoxPack>, +|}; + +export type SvgPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| + "alignment-baseline"?: Property$AlignmentBaseline | Array<Property$AlignmentBaseline>, + "baseline-shift"?: Property$BaselineShift<TLength> | Array<Property$BaselineShift<TLength>>, + clip?: Property$Clip | Array<Property$Clip>, + "clip-path"?: Property$ClipPath | Array<Property$ClipPath>, + "clip-rule"?: Property$ClipRule | Array<Property$ClipRule>, + color?: Property$Color | Array<Property$Color>, + "color-interpolation"?: Property$ColorInterpolation | Array<Property$ColorInterpolation>, + "color-rendering"?: Property$ColorRendering | Array<Property$ColorRendering>, + cursor?: Property$Cursor | Array<Property$Cursor>, + direction?: Property$Direction | Array<Property$Direction>, + display?: Property$Display | Array<Property$Display>, + "dominant-baseline"?: Property$DominantBaseline | Array<Property$DominantBaseline>, + fill?: Property$Fill | Array<Property$Fill>, + "fill-opacity"?: Property$FillOpacity | Array<Property$FillOpacity>, + "fill-rule"?: Property$FillRule | Array<Property$FillRule>, + filter?: Property$Filter | Array<Property$Filter>, + "flood-color"?: Property$FloodColor | Array<Property$FloodColor>, + "flood-opacity"?: Property$FloodOpacity | Array<Property$FloodOpacity>, + font?: Property$Font | Array<Property$Font>, + "font-family"?: Property$FontFamily | Array<Property$FontFamily>, + "font-size"?: Property$FontSize<TLength> | Array<Property$FontSize<TLength>>, + "font-size-adjust"?: Property$FontSizeAdjust | Array<Property$FontSizeAdjust>, + "font-stretch"?: Property$FontStretch | Array<Property$FontStretch>, + "font-style"?: Property$FontStyle | Array<Property$FontStyle>, + "font-variant"?: Property$FontVariant | Array<Property$FontVariant>, + "font-weight"?: Property$FontWeight | Array<Property$FontWeight>, + "glyph-orientation-vertical"?: Property$GlyphOrientationVertical | Array<Property$GlyphOrientationVertical>, + "image-rendering"?: Property$ImageRendering | Array<Property$ImageRendering>, + "letter-spacing"?: Property$LetterSpacing<TLength> | Array<Property$LetterSpacing<TLength>>, + "lighting-color"?: Property$LightingColor | Array<Property$LightingColor>, + "line-height"?: Property$LineHeight<TLength> | Array<Property$LineHeight<TLength>>, + marker?: Property$Marker | Array<Property$Marker>, + "marker-end"?: Property$MarkerEnd | Array<Property$MarkerEnd>, + "marker-mid"?: Property$MarkerMid | Array<Property$MarkerMid>, + "marker-start"?: Property$MarkerStart | Array<Property$MarkerStart>, + mask?: Property$Mask<TLength> | Array<Property$Mask<TLength>>, + opacity?: Property$Opacity | Array<Property$Opacity>, + overflow?: Property$Overflow | Array<Property$Overflow>, + "paint-order"?: Property$PaintOrder | Array<Property$PaintOrder>, + "pointer-events"?: Property$PointerEvents | Array<Property$PointerEvents>, + "shape-rendering"?: Property$ShapeRendering | Array<Property$ShapeRendering>, + "stop-color"?: Property$StopColor | Array<Property$StopColor>, + "stop-opacity"?: Property$StopOpacity | Array<Property$StopOpacity>, + stroke?: Property$Stroke | Array<Property$Stroke>, + "stroke-dasharray"?: Property$StrokeDasharray<TLength> | Array<Property$StrokeDasharray<TLength>>, + "stroke-dashoffset"?: Property$StrokeDashoffset<TLength> | Array<Property$StrokeDashoffset<TLength>>, + "stroke-linecap"?: Property$StrokeLinecap | Array<Property$StrokeLinecap>, + "stroke-linejoin"?: Property$StrokeLinejoin | Array<Property$StrokeLinejoin>, + "stroke-miterlimit"?: Property$StrokeMiterlimit | Array<Property$StrokeMiterlimit>, + "stroke-opacity"?: Property$StrokeOpacity | Array<Property$StrokeOpacity>, + "stroke-width"?: Property$StrokeWidth<TLength> | Array<Property$StrokeWidth<TLength>>, + "text-anchor"?: Property$TextAnchor | Array<Property$TextAnchor>, + "text-decoration"?: Property$TextDecoration<TLength> | Array<Property$TextDecoration<TLength>>, + "text-rendering"?: Property$TextRendering | Array<Property$TextRendering>, + "unicode-bidi"?: Property$UnicodeBidi | Array<Property$UnicodeBidi>, + "vector-effect"?: Property$VectorEffect | Array<Property$VectorEffect>, + visibility?: Property$Visibility | Array<Property$Visibility>, + "white-space"?: Property$WhiteSpace | Array<Property$WhiteSpace>, + "word-spacing"?: Property$WordSpacing<TLength> | Array<Property$WordSpacing<TLength>>, + "writing-mode"?: Property$WritingMode | Array<Property$WritingMode>, +|}; + +export type PropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| + ...StandardPropertiesHyphenFallback<TLength, TTime>, + ...VendorPropertiesHyphenFallback<TLength, TTime>, + ...ObsoletePropertiesHyphenFallback<TLength, TTime>, + ...SvgPropertiesHyphenFallback<TLength, TTime>, +|}; + +export type AtRules = + | "@charset" + | "@counter-style" + | "@document" + | "@font-face" + | "@font-feature-values" + | "@font-palette-values" + | "@import" + | "@keyframes" + | "@layer" + | "@media" + | "@namespace" + | "@page" + | "@property" + | "@scope" + | "@scroll-timeline" + | "@starting-style" + | "@supports" + | "@viewport"; + +export type AdvancedPseudos = + | ":-moz-any()" + | ":-moz-dir" + | ":-webkit-any()" + | "::cue" + | "::cue-region" + | "::part" + | "::slotted" + | "::view-transition-group" + | "::view-transition-image-pair" + | "::view-transition-new" + | "::view-transition-old" + | ":dir" + | ":has" + | ":host" + | ":host-context" + | ":is" + | ":lang" + | ":matches()" + | ":not" + | ":nth-child" + | ":nth-last-child" + | ":nth-last-of-type" + | ":nth-of-type" + | ":where"; + +export type SimplePseudos = + | ":-khtml-any-link" + | ":-moz-any-link" + | ":-moz-focusring" + | ":-moz-full-screen" + | ":-moz-placeholder" + | ":-moz-read-only" + | ":-moz-read-write" + | ":-moz-ui-invalid" + | ":-moz-ui-valid" + | ":-ms-fullscreen" + | ":-ms-input-placeholder" + | ":-webkit-any-link" + | ":-webkit-full-screen" + | "::-moz-placeholder" + | "::-moz-progress-bar" + | "::-moz-range-progress" + | "::-moz-range-thumb" + | "::-moz-range-track" + | "::-moz-selection" + | "::-ms-backdrop" + | "::-ms-browse" + | "::-ms-check" + | "::-ms-clear" + | "::-ms-expand" + | "::-ms-fill" + | "::-ms-fill-lower" + | "::-ms-fill-upper" + | "::-ms-input-placeholder" + | "::-ms-reveal" + | "::-ms-thumb" + | "::-ms-ticks-after" + | "::-ms-ticks-before" + | "::-ms-tooltip" + | "::-ms-track" + | "::-ms-value" + | "::-webkit-backdrop" + | "::-webkit-input-placeholder" + | "::-webkit-progress-bar" + | "::-webkit-progress-inner-value" + | "::-webkit-progress-value" + | "::-webkit-slider-runnable-track" + | "::-webkit-slider-thumb" + | "::after" + | "::backdrop" + | "::before" + | "::cue" + | "::cue-region" + | "::first-letter" + | "::first-line" + | "::grammar-error" + | "::marker" + | "::placeholder" + | "::selection" + | "::spelling-error" + | "::target-text" + | "::view-transition" + | ":active" + | ":after" + | ":any-link" + | ":before" + | ":blank" + | ":checked" + | ":current" + | ":default" + | ":defined" + | ":disabled" + | ":empty" + | ":enabled" + | ":first" + | ":first-child" + | ":first-letter" + | ":first-line" + | ":first-of-type" + | ":focus" + | ":focus-visible" + | ":focus-within" + | ":fullscreen" + | ":future" + | ":hover" + | ":in-range" + | ":indeterminate" + | ":invalid" + | ":last-child" + | ":last-of-type" + | ":left" + | ":link" + | ":local-link" + | ":nth-col" + | ":nth-last-col" + | ":only-child" + | ":only-of-type" + | ":optional" + | ":out-of-range" + | ":past" + | ":paused" + | ":picture-in-picture" + | ":placeholder-shown" + | ":playing" + | ":read-only" + | ":read-write" + | ":required" + | ":right" + | ":root" + | ":scope" + | ":target" + | ":target-within" + | ":user-invalid" + | ":user-valid" + | ":valid" + | ":visited"; + +export type Pseudos = AdvancedPseudos | SimplePseudos; + +export type HtmlAttributes = + | "[abbr]" + | "[accept-charset]" + | "[accept]" + | "[accesskey]" + | "[action]" + | "[align]" + | "[alink]" + | "[allow]" + | "[allowfullscreen]" + | "[allowpaymentrequest]" + | "[alt]" + | "[archive]" + | "[async]" + | "[attributionsrc]" + | "[autobuffer]" + | "[autocapitalize]" + | "[autocomplete]" + | "[autofocus]" + | "[autoplay]" + | "[axis]" + | "[background]" + | "[behavior]" + | "[bgcolor]" + | "[blocking]" + | "[border]" + | "[bottommargin]" + | "[browsingtopics]" + | "[capture]" + | "[cellpadding]" + | "[cellspacing]" + | "[char]" + | "[charoff]" + | "[charset]" + | "[checked]" + | "[cite]" + | "[class]" + | "[classid]" + | "[clear]" + | "[codebase]" + | "[codetype]" + | "[color]" + | "[cols]" + | "[colspan]" + | "[compact]" + | "[content]" + | "[contenteditable]" + | "[contextmenu]" + | "[controls]" + | "[coords]" + | "[credentialless]" + | "[crossorigin]" + | "[data]" + | "[datetime]" + | "[declare]" + | "[decoding]" + | "[default]" + | "[defer]" + | "[dir]" + | "[direction]" + | "[dirname]" + | "[disabled]" + | "[download]" + | "[draggable]" + | "[enctype]" + | "[enterkeyhint]" + | "[exportparts]" + | "[face]" + | "[fetchpriority]" + | "[for]" + | "[form]" + | "[formaction]" + | "[formenctype]" + | "[formmethod]" + | "[formnovalidate]" + | "[formtarget]" + | "[frame]" + | "[frameborder]" + | "[headers]" + | "[height]" + | "[hidden]" + | "[high]" + | "[href]" + | "[hreflang]" + | "[hspace]" + | "[http-equiv]" + | "[id]" + | "[imagesizes]" + | "[imagesrcset]" + | "[inert]" + | "[inputmode]" + | "[integrity]" + | "[is]" + | "[ismap]" + | "[itemid]" + | "[itemprop]" + | "[itemref]" + | "[itemscope]" + | "[itemtype]" + | "[kind]" + | "[label]" + | "[lang]" + | "[language]" + | "[leftmargin]" + | "[link]" + | "[list]" + | "[loading]" + | "[longdesc]" + | "[loop]" + | "[low]" + | "[manifest]" + | "[marginheight]" + | "[marginwidth]" + | "[max]" + | "[maxlength]" + | "[media]" + | "[method]" + | "[methods]" + | "[min]" + | "[minlength]" + | "[moz-opaque]" + | "[mozactionhint]" + | "[mozallowfullscreen]" + | "[msallowfullscreen]" + | "[multiple]" + | "[muted]" + | "[name]" + | "[nohref]" + | "[nomodule]" + | "[nonce]" + | "[noresize]" + | "[noshade]" + | "[novalidate]" + | "[nowrap]" + | "[onerror]" + | "[open]" + | "[optimum]" + | "[part]" + | "[pattern]" + | "[ping]" + | "[placeholder]" + | "[popover]" + | "[popovertarget]" + | "[popovertargetaction]" + | "[poster]" + | "[preload]" + | "[profile]" + | "[readonly]" + | "[referrerpolicy]" + | "[rel]" + | "[required]" + | "[rev]" + | "[reversed]" + | "[rightmargin]" + | "[rows]" + | "[rowspan]" + | "[rules]" + | "[sandbox]" + | "[scope]" + | "[scrollamount]" + | "[scrolldelay]" + | "[scrolling]" + | "[selected]" + | "[shadowroot]" + | "[shadowrootmode]" + | "[shape]" + | "[size]" + | "[sizes]" + | "[slot]" + | "[span]" + | "[spellcheck]" + | "[src]" + | "[srcdoc]" + | "[srclang]" + | "[srcset]" + | "[standby]" + | "[start]" + | "[step]" + | "[style]" + | "[summary]" + | "[tabindex]" + | "[target]" + | "[text]" + | "[title]" + | "[topmargin]" + | "[translate]" + | "[truespeed]" + | "[type]" + | "[usemap]" + | "[valign]" + | "[value]" + | "[valuetype]" + | "[version]" + | "[virtualkeyboardpolicy]" + | "[vlink]" + | "[vspace]" + | "[webkitallowfullscreen]" + | "[width]" + | "[wrap]" + | "[x-moz-errormessage]" + | "[xmlns]"; + +export type SvgAttributes = + | "[accent-height]" + | "[alignment-baseline]" + | "[allowReorder]" + | "[alphabetic]" + | "[animation]" + | "[arabic-form]" + | "[ascent]" + | "[async]" + | "[attributeName]" + | "[attributeType]" + | "[azimuth]" + | "[baseFrequency]" + | "[baseProfile]" + | "[baseline-shift]" + | "[bbox]" + | "[bias]" + | "[by]" + | "[calcMode]" + | "[cap-height]" + | "[class]" + | "[clip-path]" + | "[clip-rule]" + | "[clipPathUnits]" + | "[clip]" + | "[color-interpolation-filters]" + | "[color-interpolation]" + | "[color-profile]" + | "[color]" + | "[contentScriptType]" + | "[contentStyleType]" + | "[crossorigin]" + | "[cursor]" + | "[cx]" + | "[cy]" + | "[d]" + | "[decoding]" + | "[defer]" + | "[descent]" + | "[diffuseConstant]" + | "[direction]" + | "[display]" + | "[divisor]" + | "[document]" + | "[dominant-baseline]" + | "[download]" + | "[dur]" + | "[dx]" + | "[dy]" + | "[edgeMode]" + | "[elevation]" + | "[enable-background]" + | "[fill-opacity]" + | "[fill-rule]" + | "[fill]" + | "[filterRes]" + | "[filterUnits]" + | "[filter]" + | "[flood-color]" + | "[flood-opacity]" + | "[font-family]" + | "[font-size-adjust]" + | "[font-size]" + | "[font-stretch]" + | "[font-style]" + | "[font-variant]" + | "[font-weight]" + | "[format]" + | "[fr]" + | "[from]" + | "[fx]" + | "[fy]" + | "[g1]" + | "[g2]" + | "[global]" + | "[glyph-name]" + | "[glyph-orientation-horizontal]" + | "[glyph-orientation-vertical]" + | "[glyphRef]" + | "[gradientTransform]" + | "[gradientUnits]" + | "[graphical]" + | "[hanging]" + | "[height]" + | "[horiz-adv-x]" + | "[horiz-origin-x]" + | "[horiz-origin-y]" + | "[href]" + | "[hreflang]" + | "[id]" + | "[ideographic]" + | "[image-rendering]" + | "[in2]" + | "[in]" + | "[k1]" + | "[k2]" + | "[k3]" + | "[k4]" + | "[k]" + | "[kernelMatrix]" + | "[kernelUnitLength]" + | "[kerning]" + | "[keyPoints]" + | "[lang]" + | "[lengthAdjust]" + | "[letter-spacing]" + | "[lighting-color]" + | "[limitingConeAngle]" + | "[marker-end]" + | "[marker-mid]" + | "[marker-start]" + | "[markerHeight]" + | "[markerUnits]" + | "[markerWidth]" + | "[maskContentUnits]" + | "[maskUnits]" + | "[mask]" + | "[mathematical]" + | "[media]" + | "[mode]" + | "[name]" + | "[numOctaves]" + | "[offset]" + | "[opacity]" + | "[operator]" + | "[order]" + | "[orient]" + | "[orientation]" + | "[origin]" + | "[overflow]" + | "[overline-position]" + | "[overline-thickness]" + | "[paint-order]" + | "[panose-1]" + | "[path]" + | "[patternContentUnits]" + | "[patternTransform]" + | "[patternUnits]" + | "[ping]" + | "[pointer-events]" + | "[pointsAtX]" + | "[pointsAtY]" + | "[pointsAtZ]" + | "[points]" + | "[preserveAlpha]" + | "[preserveAspectRatio]" + | "[primitiveUnits]" + | "[r]" + | "[radius]" + | "[refX]" + | "[refY]" + | "[referrerpolicy]" + | "[rel]" + | "[repeatCount]" + | "[requiredExtensions]" + | "[requiredFeatures]" + | "[rotate]" + | "[rx]" + | "[ry]" + | "[scale]" + | "[seed]" + | "[shape-rendering]" + | "[side]" + | "[slope]" + | "[solid-color]" + | "[solid-opacity]" + | "[spacing]" + | "[specularConstant]" + | "[specularExponent]" + | "[spreadMethod]" + | "[startOffset]" + | "[stdDeviation]" + | "[stemh]" + | "[stemv]" + | "[stitchTiles]" + | "[stop-color]" + | "[stop-opacity]" + | "[strikethrough-position]" + | "[strikethrough-thickness]" + | "[string]" + | "[stroke-dasharray]" + | "[stroke-dashoffset]" + | "[stroke-linecap]" + | "[stroke-linejoin]" + | "[stroke-miterlimit]" + | "[stroke-opacity]" + | "[stroke-width]" + | "[stroke]" + | "[style]" + | "[surfaceScale]" + | "[systemLanguage]" + | "[tabindex]" + | "[targetX]" + | "[targetY]" + | "[target]" + | "[text-anchor]" + | "[text-decoration]" + | "[text-overflow]" + | "[text-rendering]" + | "[textLength]" + | "[title]" + | "[to]" + | "[transform-origin]" + | "[transform]" + | "[type]" + | "[u1]" + | "[u2]" + | "[underline-position]" + | "[underline-thickness]" + | "[unicode-bidi]" + | "[unicode-range]" + | "[unicode]" + | "[units-per-em]" + | "[v-alphabetic]" + | "[v-hanging]" + | "[v-ideographic]" + | "[v-mathematical]" + | "[values]" + | "[vector-effect]" + | "[version]" + | "[vert-adv-y]" + | "[vert-origin-x]" + | "[vert-origin-y]" + | "[viewBox]" + | "[viewTarget]" + | "[visibility]" + | "[white-space]" + | "[width]" + | "[widths]" + | "[word-spacing]" + | "[writing-mode]" + | "[x-height]" + | "[x1]" + | "[x2]" + | "[xChannelSelector]" + | "[x]" + | "[y1]" + | "[y2]" + | "[yChannelSelector]" + | "[y]" + | "[z]" + | "[zoomAndPan]"; + +export type Globals = "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset"; + +export type Property$AccentColor = Globals | DataType$Color | "auto"; + +export type Property$AlignContent = Globals | DataType$ContentDistribution | DataType$ContentPosition | "baseline" | "normal" | string; + +export type Property$AlignItems = Globals | DataType$SelfPosition | "baseline" | "normal" | "stretch" | string; + +export type Property$AlignSelf = Globals | DataType$SelfPosition | "auto" | "baseline" | "normal" | "stretch" | string; + +export type Property$AlignTracks = Globals | DataType$ContentDistribution | DataType$ContentPosition | "baseline" | "normal" | string; + +export type Property$All = Globals; + +export type Property$Animation<TTime = string> = Globals | DataType$SingleAnimation<TTime> | string; + +export type Property$AnimationComposition = Globals | DataType$SingleAnimationComposition | string; + +export type Property$AnimationDelay<TTime = string> = Globals | TTime | string; + +export type Property$AnimationDirection = Globals | DataType$SingleAnimationDirection | string; + +export type Property$AnimationDuration<TTime = string> = Globals | TTime | string; + +export type Property$AnimationFillMode = Globals | DataType$SingleAnimationFillMode | string; + +export type Property$AnimationIterationCount = Globals | "infinite" | string | number; + +export type Property$AnimationName = Globals | "none" | string; + +export type Property$AnimationPlayState = Globals | "paused" | "running" | string; + +export type Property$AnimationRange<TLength = string | 0> = Globals | DataType$TimelineRangeName | TLength | "normal" | string; + +export type Property$AnimationRangeEnd<TLength = string | 0> = Globals | DataType$TimelineRangeName | TLength | "normal" | string; + +export type Property$AnimationRangeStart<TLength = string | 0> = Globals | DataType$TimelineRangeName | TLength | "normal" | string; + +export type Property$AnimationTimeline = Globals | DataType$SingleAnimationTimeline | string; + +export type Property$AnimationTimingFunction = Globals | DataType$EasingFunction | string; + +export type Property$Appearance = Globals | DataType$CompatAuto | "auto" | "menulist-button" | "none" | "textfield"; + +export type Property$AspectRatio = Globals | "auto" | string | number; + +export type Property$Azimuth = + | Globals + | "behind" + | "center" + | "center-left" + | "center-right" + | "far-left" + | "far-right" + | "left" + | "left-side" + | "leftwards" + | "right" + | "right-side" + | "rightwards" + | string; + +export type Property$BackdropFilter = Globals | "none" | string; + +export type Property$BackfaceVisibility = Globals | "hidden" | "visible"; + +export type Property$Background<TLength = string | 0> = Globals | DataType$FinalBgLayer<TLength> | string; + +export type Property$BackgroundAttachment = Globals | DataType$Attachment | string; + +export type Property$BackgroundBlendMode = Globals | DataType$BlendMode | string; + +export type Property$BackgroundClip = Globals | DataType$Box | string; + +export type Property$BackgroundColor = Globals | DataType$Color; + +export type Property$BackgroundImage = Globals | "none" | string; + +export type Property$BackgroundOrigin = Globals | DataType$Box | string; + +export type Property$BackgroundPosition<TLength = string | 0> = Globals | DataType$BgPosition<TLength> | string; + +export type Property$BackgroundPositionX<TLength = string | 0> = Globals | TLength | "center" | "left" | "right" | "x-end" | "x-start" | string; + +export type Property$BackgroundPositionY<TLength = string | 0> = Globals | TLength | "bottom" | "center" | "top" | "y-end" | "y-start" | string; + +export type Property$BackgroundRepeat = Globals | DataType$RepeatStyle | string; + +export type Property$BackgroundSize<TLength = string | 0> = Globals | DataType$BgSize<TLength> | string; + +export type Property$BlockOverflow = Globals | "clip" | "ellipsis" | string; + +export type Property$BlockSize<TLength = string | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "auto" + | "fit-content" + | "max-content" + | "min-content" + | string; + +export type Property$Border<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; + +export type Property$BorderBlock<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; + +export type Property$BorderBlockColor = Globals | DataType$Color | string; + +export type Property$BorderBlockEnd<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; + +export type Property$BorderBlockEndColor = Globals | DataType$Color; + +export type Property$BorderBlockEndStyle = Globals | DataType$LineStyle; + +export type Property$BorderBlockEndWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; + +export type Property$BorderBlockStart<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; + +export type Property$BorderBlockStartColor = Globals | DataType$Color; + +export type Property$BorderBlockStartStyle = Globals | DataType$LineStyle; + +export type Property$BorderBlockStartWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; + +export type Property$BorderBlockStyle = Globals | DataType$LineStyle; + +export type Property$BorderBlockWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; + +export type Property$BorderBottom<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; + +export type Property$BorderBottomColor = Globals | DataType$Color; + +export type Property$BorderBottomLeftRadius<TLength = string | 0> = Globals | TLength | string; + +export type Property$BorderBottomRightRadius<TLength = string | 0> = Globals | TLength | string; + +export type Property$BorderBottomStyle = Globals | DataType$LineStyle; + +export type Property$BorderBottomWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; + +export type Property$BorderCollapse = Globals | "collapse" | "separate"; + +export type Property$BorderColor = Globals | DataType$Color | string; + +export type Property$BorderEndEndRadius<TLength = string | 0> = Globals | TLength | string; + +export type Property$BorderEndStartRadius<TLength = string | 0> = Globals | TLength | string; + +export type Property$BorderImage = Globals | "none" | "repeat" | "round" | "space" | "stretch" | string | number; + +export type Property$BorderImageOutset<TLength = string | 0> = Globals | TLength | string | number; + +export type Property$BorderImageRepeat = Globals | "repeat" | "round" | "space" | "stretch" | string; + +export type Property$BorderImageSlice = Globals | string | number; + +export type Property$BorderImageSource = Globals | "none" | string; + +export type Property$BorderImageWidth<TLength = string | 0> = Globals | TLength | "auto" | string | number; + +export type Property$BorderInline<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; + +export type Property$BorderInlineColor = Globals | DataType$Color | string; + +export type Property$BorderInlineEnd<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; + +export type Property$BorderInlineEndColor = Globals | DataType$Color; + +export type Property$BorderInlineEndStyle = Globals | DataType$LineStyle; + +export type Property$BorderInlineEndWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; + +export type Property$BorderInlineStart<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; + +export type Property$BorderInlineStartColor = Globals | DataType$Color; + +export type Property$BorderInlineStartStyle = Globals | DataType$LineStyle; + +export type Property$BorderInlineStartWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; + +export type Property$BorderInlineStyle = Globals | DataType$LineStyle; + +export type Property$BorderInlineWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; + +export type Property$BorderLeft<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; + +export type Property$BorderLeftColor = Globals | DataType$Color; + +export type Property$BorderLeftStyle = Globals | DataType$LineStyle; + +export type Property$BorderLeftWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; + +export type Property$BorderRadius<TLength = string | 0> = Globals | TLength | string; + +export type Property$BorderRight<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; + +export type Property$BorderRightColor = Globals | DataType$Color; + +export type Property$BorderRightStyle = Globals | DataType$LineStyle; + +export type Property$BorderRightWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; + +export type Property$BorderSpacing<TLength = string | 0> = Globals | TLength | string; + +export type Property$BorderStartEndRadius<TLength = string | 0> = Globals | TLength | string; + +export type Property$BorderStartStartRadius<TLength = string | 0> = Globals | TLength | string; + +export type Property$BorderStyle = Globals | DataType$LineStyle | string; + +export type Property$BorderTop<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; + +export type Property$BorderTopColor = Globals | DataType$Color; + +export type Property$BorderTopLeftRadius<TLength = string | 0> = Globals | TLength | string; + +export type Property$BorderTopRightRadius<TLength = string | 0> = Globals | TLength | string; + +export type Property$BorderTopStyle = Globals | DataType$LineStyle; + +export type Property$BorderTopWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; + +export type Property$BorderWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | string; + +export type Property$Bottom<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$BoxAlign = Globals | "baseline" | "center" | "end" | "start" | "stretch"; + +export type Property$BoxDecorationBreak = Globals | "clone" | "slice"; + +export type Property$BoxDirection = Globals | "inherit" | "normal" | "reverse"; + +export type Property$BoxFlex = Globals | number; + +export type Property$BoxFlexGroup = Globals | number; + +export type Property$BoxLines = Globals | "multiple" | "single"; + +export type Property$BoxOrdinalGroup = Globals | number; + +export type Property$BoxOrient = Globals | "block-axis" | "horizontal" | "inherit" | "inline-axis" | "vertical"; + +export type Property$BoxPack = Globals | "center" | "end" | "justify" | "start"; + +export type Property$BoxShadow = Globals | "none" | string; + +export type Property$BoxSizing = Globals | "border-box" | "content-box"; + +export type Property$BreakAfter = + | Globals + | "all" + | "always" + | "auto" + | "avoid" + | "avoid-column" + | "avoid-page" + | "avoid-region" + | "column" + | "left" + | "page" + | "recto" + | "region" + | "right" + | "verso"; + +export type Property$BreakBefore = + | Globals + | "all" + | "always" + | "auto" + | "avoid" + | "avoid-column" + | "avoid-page" + | "avoid-region" + | "column" + | "left" + | "page" + | "recto" + | "region" + | "right" + | "verso"; + +export type Property$BreakInside = Globals | "auto" | "avoid" | "avoid-column" | "avoid-page" | "avoid-region"; + +export type Property$CaptionSide = Globals | "block-end" | "block-start" | "bottom" | "inline-end" | "inline-start" | "top"; + +export type Property$Caret = Globals | DataType$Color | "auto" | "bar" | "block" | "underscore" | string; + +export type Property$CaretColor = Globals | DataType$Color | "auto"; + +export type Property$CaretShape = Globals | "auto" | "bar" | "block" | "underscore"; + +export type Property$Clear = Globals | "both" | "inline-end" | "inline-start" | "left" | "none" | "right"; + +export type Property$Clip = Globals | "auto" | string; + +export type Property$ClipPath = Globals | DataType$GeometryBox | "none" | string; + +export type Property$Color = Globals | DataType$Color; + +export type Property$PrintColorAdjust = Globals | "economy" | "exact"; + +export type Property$ColorScheme = Globals | "dark" | "light" | "normal" | string; + +export type Property$ColumnCount = Globals | "auto" | number; + +export type Property$ColumnFill = Globals | "auto" | "balance" | "balance-all"; + +export type Property$ColumnGap<TLength = string | 0> = Globals | TLength | "normal" | string; + +export type Property$ColumnRule<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; + +export type Property$ColumnRuleColor = Globals | DataType$Color; + +export type Property$ColumnRuleStyle = Globals | DataType$LineStyle | string; + +export type Property$ColumnRuleWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | string; + +export type Property$ColumnSpan = Globals | "all" | "none"; + +export type Property$ColumnWidth<TLength = string | 0> = Globals | TLength | "auto"; + +export type Property$Columns<TLength = string | 0> = Globals | TLength | "auto" | string | number; + +export type Property$Contain = Globals | "content" | "inline-size" | "layout" | "none" | "paint" | "size" | "strict" | "style" | string; + +export type Property$ContainIntrinsicBlockSize<TLength = string | 0> = Globals | TLength | "none" | string; + +export type Property$ContainIntrinsicHeight<TLength = string | 0> = Globals | TLength | "none" | string; + +export type Property$ContainIntrinsicInlineSize<TLength = string | 0> = Globals | TLength | "none" | string; + +export type Property$ContainIntrinsicSize<TLength = string | 0> = Globals | TLength | "none" | string; + +export type Property$ContainIntrinsicWidth<TLength = string | 0> = Globals | TLength | "none" | string; + +export type Property$Container = Globals | "none" | string; + +export type Property$ContainerName = Globals | "none" | string; + +export type Property$ContainerType = Globals | "inline-size" | "normal" | "size"; + +export type Property$Content = Globals | DataType$ContentList | "none" | "normal" | string; + +export type Property$ContentVisibility = Globals | "auto" | "hidden" | "visible"; + +export type Property$CounterIncrement = Globals | "none" | string; + +export type Property$CounterReset = Globals | "none" | string; + +export type Property$CounterSet = Globals | "none" | string; + +export type Property$Cursor = + | Globals + | "-moz-grab" + | "-webkit-grab" + | "alias" + | "all-scroll" + | "auto" + | "cell" + | "col-resize" + | "context-menu" + | "copy" + | "crosshair" + | "default" + | "e-resize" + | "ew-resize" + | "grab" + | "grabbing" + | "help" + | "move" + | "n-resize" + | "ne-resize" + | "nesw-resize" + | "no-drop" + | "none" + | "not-allowed" + | "ns-resize" + | "nw-resize" + | "nwse-resize" + | "pointer" + | "progress" + | "row-resize" + | "s-resize" + | "se-resize" + | "sw-resize" + | "text" + | "vertical-text" + | "w-resize" + | "wait" + | "zoom-in" + | "zoom-out" + | string; + +export type Property$Direction = Globals | "ltr" | "rtl"; + +export type Property$Display = + | Globals + | DataType$DisplayOutside + | DataType$DisplayInside + | DataType$DisplayInternal + | DataType$DisplayLegacy + | "contents" + | "list-item" + | "none" + | string; + +export type Property$EmptyCells = Globals | "hide" | "show"; + +export type Property$Filter = Globals | "none" | string; + +export type Property$Flex<TLength = string | 0> = Globals | TLength | "auto" | "content" | "fit-content" | "max-content" | "min-content" | "none" | string | number; + +export type Property$FlexBasis<TLength = string | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-auto" + | "auto" + | "content" + | "fit-content" + | "max-content" + | "min-content" + | string; + +export type Property$FlexDirection = Globals | "column" | "column-reverse" | "row" | "row-reverse"; + +export type Property$FlexFlow = Globals | "column" | "column-reverse" | "nowrap" | "row" | "row-reverse" | "wrap" | "wrap-reverse" | string; + +export type Property$FlexGrow = Globals | number; + +export type Property$FlexShrink = Globals | number; + +export type Property$FlexWrap = Globals | "nowrap" | "wrap" | "wrap-reverse"; + +export type Property$Float = Globals | "inline-end" | "inline-start" | "left" | "none" | "right"; + +export type Property$Font = Globals | "caption" | "icon" | "menu" | "message-box" | "small-caption" | "status-bar" | string; + +export type Property$FontFamily = Globals | DataType$GenericFamily | string; + +export type Property$FontFeatureSettings = Globals | "normal" | string; + +export type Property$FontKerning = Globals | "auto" | "none" | "normal"; + +export type Property$FontLanguageOverride = Globals | "normal" | string; + +export type Property$FontOpticalSizing = Globals | "auto" | "none"; + +export type Property$FontPalette = Globals | "dark" | "light" | "normal" | string; + +export type Property$FontSize<TLength = string | 0> = Globals | DataType$AbsoluteSize | TLength | "larger" | "smaller" | string; + +export type Property$FontSizeAdjust = Globals | "from-font" | "none" | string | number; + +export type Property$FontSmooth<TLength = string | 0> = Globals | DataType$AbsoluteSize | TLength | "always" | "auto" | "never"; + +export type Property$FontStretch = Globals | DataType$FontStretchAbsolute; + +export type Property$FontStyle = Globals | "italic" | "normal" | "oblique" | string; + +export type Property$FontSynthesis = Globals | "none" | "position" | "small-caps" | "style" | "weight" | string; + +export type Property$FontSynthesisPosition = Globals | "auto" | "none"; + +export type Property$FontSynthesisSmallCaps = Globals | "auto" | "none"; + +export type Property$FontSynthesisStyle = Globals | "auto" | "none"; + +export type Property$FontSynthesisWeight = Globals | "auto" | "none"; + +export type Property$FontVariant = + | Globals + | DataType$EastAsianVariantValues + | "all-petite-caps" + | "all-small-caps" + | "common-ligatures" + | "contextual" + | "diagonal-fractions" + | "discretionary-ligatures" + | "full-width" + | "historical-forms" + | "historical-ligatures" + | "lining-nums" + | "no-common-ligatures" + | "no-contextual" + | "no-discretionary-ligatures" + | "no-historical-ligatures" + | "none" + | "normal" + | "oldstyle-nums" + | "ordinal" + | "petite-caps" + | "proportional-nums" + | "proportional-width" + | "ruby" + | "slashed-zero" + | "small-caps" + | "stacked-fractions" + | "tabular-nums" + | "titling-caps" + | "unicase" + | string; + +export type Property$FontVariantAlternates = Globals | "historical-forms" | "normal" | string; + +export type Property$FontVariantCaps = Globals | "all-petite-caps" | "all-small-caps" | "normal" | "petite-caps" | "small-caps" | "titling-caps" | "unicase"; + +export type Property$FontVariantEastAsian = Globals | DataType$EastAsianVariantValues | "full-width" | "normal" | "proportional-width" | "ruby" | string; + +export type Property$FontVariantEmoji = Globals | "emoji" | "normal" | "text" | "unicode"; + +export type Property$FontVariantLigatures = + | Globals + | "common-ligatures" + | "contextual" + | "discretionary-ligatures" + | "historical-ligatures" + | "no-common-ligatures" + | "no-contextual" + | "no-discretionary-ligatures" + | "no-historical-ligatures" + | "none" + | "normal" + | string; + +export type Property$FontVariantNumeric = + | Globals + | "diagonal-fractions" + | "lining-nums" + | "normal" + | "oldstyle-nums" + | "ordinal" + | "proportional-nums" + | "slashed-zero" + | "stacked-fractions" + | "tabular-nums" + | string; + +export type Property$FontVariantPosition = Globals | "normal" | "sub" | "super"; + +export type Property$FontVariationSettings = Globals | "normal" | string; + +export type Property$FontWeight = Globals | DataType$FontWeightAbsolute | "bolder" | "lighter"; + +export type Property$ForcedColorAdjust = Globals | "auto" | "none"; + +export type Property$Gap<TLength = string | 0> = Globals | TLength | "normal" | string; + +export type Property$Grid = Globals | "none" | string; + +export type Property$GridArea = Globals | DataType$GridLine | string; + +export type Property$GridAutoColumns<TLength = string | 0> = Globals | DataType$TrackBreadth<TLength> | string; + +export type Property$GridAutoFlow = Globals | "column" | "dense" | "row" | string; + +export type Property$GridAutoRows<TLength = string | 0> = Globals | DataType$TrackBreadth<TLength> | string; + +export type Property$GridColumn = Globals | DataType$GridLine | string; + +export type Property$GridColumnEnd = Globals | DataType$GridLine; + +export type Property$GridColumnGap<TLength = string | 0> = Globals | TLength | string; + +export type Property$GridColumnStart = Globals | DataType$GridLine; + +export type Property$GridGap<TLength = string | 0> = Globals | TLength | string; + +export type Property$GridRow = Globals | DataType$GridLine | string; + +export type Property$GridRowEnd = Globals | DataType$GridLine; + +export type Property$GridRowGap<TLength = string | 0> = Globals | TLength | string; + +export type Property$GridRowStart = Globals | DataType$GridLine; + +export type Property$GridTemplate = Globals | "none" | string; + +export type Property$GridTemplateAreas = Globals | "none" | string; + +export type Property$GridTemplateColumns<TLength = string | 0> = Globals | DataType$TrackBreadth<TLength> | "none" | "subgrid" | string; + +export type Property$GridTemplateRows<TLength = string | 0> = Globals | DataType$TrackBreadth<TLength> | "none" | "subgrid" | string; + +export type Property$HangingPunctuation = Globals | "allow-end" | "first" | "force-end" | "last" | "none" | string; + +export type Property$Height<TLength = string | 0> = + | Globals + | TLength + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fit-content" + | "auto" + | "fit-content" + | "max-content" + | "min-content" + | string; + +export type Property$HyphenateCharacter = Globals | "auto" | string; + +export type Property$HyphenateLimitChars = Globals | "auto" | string | number; + +export type Property$Hyphens = Globals | "auto" | "manual" | "none"; + +export type Property$ImageOrientation = Globals | "flip" | "from-image" | string; + +export type Property$ImageRendering = Globals | "-moz-crisp-edges" | "-webkit-optimize-contrast" | "auto" | "crisp-edges" | "pixelated"; + +export type Property$ImageResolution = Globals | "from-image" | string; + +export type Property$ImeMode = Globals | "active" | "auto" | "disabled" | "inactive" | "normal"; + +export type Property$InitialLetter = Globals | "normal" | string | number; + +export type Property$InlineSize<TLength = string | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fill-available" + | "auto" + | "fit-content" + | "max-content" + | "min-content" + | string; + +export type Property$InputSecurity = Globals | "auto" | "none"; + +export type Property$Inset<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$InsetBlock<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$InsetBlockEnd<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$InsetBlockStart<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$InsetInline<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$InsetInlineEnd<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$InsetInlineStart<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$Isolation = Globals | "auto" | "isolate"; + +export type Property$JustifyContent = Globals | DataType$ContentDistribution | DataType$ContentPosition | "left" | "normal" | "right" | string; + +export type Property$JustifyItems = Globals | DataType$SelfPosition | "baseline" | "left" | "legacy" | "normal" | "right" | "stretch" | string; + +export type Property$JustifySelf = Globals | DataType$SelfPosition | "auto" | "baseline" | "left" | "normal" | "right" | "stretch" | string; + +export type Property$JustifyTracks = Globals | DataType$ContentDistribution | DataType$ContentPosition | "left" | "normal" | "right" | string; + +export type Property$Left<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$LetterSpacing<TLength = string | 0> = Globals | TLength | "normal"; + +export type Property$LineBreak = Globals | "anywhere" | "auto" | "loose" | "normal" | "strict"; + +export type Property$LineClamp = Globals | "none" | number; + +export type Property$LineHeight<TLength = string | 0> = Globals | TLength | "normal" | string | number; + +export type Property$LineHeightStep<TLength = string | 0> = Globals | TLength; + +export type Property$ListStyle = Globals | "inside" | "none" | "outside" | string; + +export type Property$ListStyleImage = Globals | "none" | string; + +export type Property$ListStylePosition = Globals | "inside" | "outside"; + +export type Property$ListStyleType = Globals | "none" | string; + +export type Property$Margin<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$MarginBlock<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$MarginBlockEnd<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$MarginBlockStart<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$MarginBottom<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$MarginInline<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$MarginInlineEnd<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$MarginInlineStart<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$MarginLeft<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$MarginRight<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$MarginTop<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$MarginTrim = Globals | "all" | "in-flow" | "none"; + +export type Property$Mask<TLength = string | 0> = Globals | DataType$MaskLayer<TLength> | string; + +export type Property$MaskBorder = Globals | "alpha" | "luminance" | "none" | "repeat" | "round" | "space" | "stretch" | string | number; + +export type Property$MaskBorderMode = Globals | "alpha" | "luminance"; + +export type Property$MaskBorderOutset<TLength = string | 0> = Globals | TLength | string | number; + +export type Property$MaskBorderRepeat = Globals | "repeat" | "round" | "space" | "stretch" | string; + +export type Property$MaskBorderSlice = Globals | string | number; + +export type Property$MaskBorderSource = Globals | "none" | string; + +export type Property$MaskBorderWidth<TLength = string | 0> = Globals | TLength | "auto" | string | number; + +export type Property$MaskClip = Globals | DataType$GeometryBox | "no-clip" | string; + +export type Property$MaskComposite = Globals | DataType$CompositingOperator | string; + +export type Property$MaskImage = Globals | "none" | string; + +export type Property$MaskMode = Globals | DataType$MaskingMode | string; + +export type Property$MaskOrigin = Globals | DataType$GeometryBox | string; + +export type Property$MaskPosition<TLength = string | 0> = Globals | DataType$Position<TLength> | string; + +export type Property$MaskRepeat = Globals | DataType$RepeatStyle | string; + +export type Property$MaskSize<TLength = string | 0> = Globals | DataType$BgSize<TLength> | string; + +export type Property$MaskType = Globals | "alpha" | "luminance"; + +export type Property$MasonryAutoFlow = Globals | "definite-first" | "next" | "ordered" | "pack" | string; + +export type Property$MathDepth = Globals | "auto-add" | string | number; + +export type Property$MathShift = Globals | "compact" | "normal"; + +export type Property$MathStyle = Globals | "compact" | "normal"; + +export type Property$MaxBlockSize<TLength = string | 0> = + | Globals + | TLength + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fill-available" + | "fit-content" + | "max-content" + | "min-content" + | "none" + | string; + +export type Property$MaxHeight<TLength = string | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fit-content" + | "-webkit-max-content" + | "-webkit-min-content" + | "fit-content" + | "intrinsic" + | "max-content" + | "min-content" + | "none" + | string; + +export type Property$MaxInlineSize<TLength = string | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fill-available" + | "fit-content" + | "max-content" + | "min-content" + | "none" + | string; + +export type Property$MaxLines = Globals | "none" | number; + +export type Property$MaxWidth<TLength = string | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fit-content" + | "-webkit-max-content" + | "-webkit-min-content" + | "fit-content" + | "intrinsic" + | "max-content" + | "min-content" + | "none" + | string; + +export type Property$MinBlockSize<TLength = string | 0> = + | Globals + | TLength + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fill-available" + | "auto" + | "fit-content" + | "max-content" + | "min-content" + | string; + +export type Property$MinHeight<TLength = string | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fit-content" + | "-webkit-max-content" + | "-webkit-min-content" + | "auto" + | "fit-content" + | "intrinsic" + | "max-content" + | "min-content" + | string; + +export type Property$MinInlineSize<TLength = string | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fill-available" + | "auto" + | "fit-content" + | "max-content" + | "min-content" + | string; + +export type Property$MinWidth<TLength = string | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fill-available" + | "-webkit-fit-content" + | "-webkit-max-content" + | "-webkit-min-content" + | "auto" + | "fit-content" + | "intrinsic" + | "max-content" + | "min-content" + | "min-intrinsic" + | string; + +export type Property$MixBlendMode = Globals | DataType$BlendMode | "plus-lighter"; + +export type Property$Offset<TLength = string | 0> = Globals | DataType$Position<TLength> | "auto" | "none" | "normal" | string; + +export type Property$OffsetDistance<TLength = string | 0> = Globals | TLength | string; + +export type Property$OffsetPath = Globals | "none" | string; + +export type Property$OffsetRotate = Globals | "auto" | "reverse" | string; + +export type Property$ObjectFit = Globals | "contain" | "cover" | "fill" | "none" | "scale-down"; + +export type Property$ObjectPosition<TLength = string | 0> = Globals | DataType$Position<TLength>; + +export type Property$OffsetAnchor<TLength = string | 0> = Globals | DataType$Position<TLength> | "auto"; + +export type Property$OffsetPosition<TLength = string | 0> = Globals | DataType$Position<TLength> | "auto" | "normal"; + +export type Property$Opacity = Globals | string | number; + +export type Property$Order = Globals | number; + +export type Property$Orphans = Globals | number; + +export type Property$Outline<TLength = string | 0> = Globals | DataType$Color | DataType$LineStyle | DataType$LineWidth<TLength> | "auto" | "invert" | string; + +export type Property$OutlineColor = Globals | DataType$Color | "invert"; + +export type Property$OutlineOffset<TLength = string | 0> = Globals | TLength; + +export type Property$OutlineStyle = Globals | DataType$LineStyle | "auto" | string; + +export type Property$OutlineWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; + +export type Property$Overflow = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible" | string; + +export type Property$OverflowAnchor = Globals | "auto" | "none"; + +export type Property$OverflowBlock = Globals | "auto" | "clip" | "hidden" | "scroll" | "visible"; + +export type Property$OverflowClipBox = Globals | "content-box" | "padding-box"; + +export type Property$OverflowClipMargin<TLength = string | 0> = Globals | DataType$VisualBox | TLength | string; + +export type Property$OverflowInline = Globals | "auto" | "clip" | "hidden" | "scroll" | "visible"; + +export type Property$OverflowWrap = Globals | "anywhere" | "break-word" | "normal"; + +export type Property$OverflowX = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible"; + +export type Property$OverflowY = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible"; + +export type Property$Overlay = Globals | "auto" | "none"; + +export type Property$OverscrollBehavior = Globals | "auto" | "contain" | "none" | string; + +export type Property$OverscrollBehaviorBlock = Globals | "auto" | "contain" | "none"; + +export type Property$OverscrollBehaviorInline = Globals | "auto" | "contain" | "none"; + +export type Property$OverscrollBehaviorX = Globals | "auto" | "contain" | "none"; + +export type Property$OverscrollBehaviorY = Globals | "auto" | "contain" | "none"; + +export type Property$Padding<TLength = string | 0> = Globals | TLength | string; + +export type Property$PaddingBlock<TLength = string | 0> = Globals | TLength | string; + +export type Property$PaddingBlockEnd<TLength = string | 0> = Globals | TLength | string; + +export type Property$PaddingBlockStart<TLength = string | 0> = Globals | TLength | string; + +export type Property$PaddingBottom<TLength = string | 0> = Globals | TLength | string; + +export type Property$PaddingInline<TLength = string | 0> = Globals | TLength | string; + +export type Property$PaddingInlineEnd<TLength = string | 0> = Globals | TLength | string; + +export type Property$PaddingInlineStart<TLength = string | 0> = Globals | TLength | string; + +export type Property$PaddingLeft<TLength = string | 0> = Globals | TLength | string; + +export type Property$PaddingRight<TLength = string | 0> = Globals | TLength | string; + +export type Property$PaddingTop<TLength = string | 0> = Globals | TLength | string; + +export type Property$Page = Globals | "auto" | string; + +export type Property$PageBreakAfter = Globals | "always" | "auto" | "avoid" | "left" | "recto" | "right" | "verso"; + +export type Property$PageBreakBefore = Globals | "always" | "auto" | "avoid" | "left" | "recto" | "right" | "verso"; + +export type Property$PageBreakInside = Globals | "auto" | "avoid"; + +export type Property$PaintOrder = Globals | "fill" | "markers" | "normal" | "stroke" | string; + +export type Property$Perspective<TLength = string | 0> = Globals | TLength | "none"; + +export type Property$PerspectiveOrigin<TLength = string | 0> = Globals | DataType$Position<TLength>; + +export type Property$PlaceContent = Globals | DataType$ContentDistribution | DataType$ContentPosition | "baseline" | "normal" | string; + +export type Property$PlaceItems = Globals | DataType$SelfPosition | "baseline" | "normal" | "stretch" | string; + +export type Property$PlaceSelf = Globals | DataType$SelfPosition | "auto" | "baseline" | "normal" | "stretch" | string; + +export type Property$PointerEvents = Globals | "all" | "auto" | "fill" | "inherit" | "none" | "painted" | "stroke" | "visible" | "visibleFill" | "visiblePainted" | "visibleStroke"; + +export type Property$Position = Globals | "-webkit-sticky" | "absolute" | "fixed" | "relative" | "static" | "sticky"; + +export type Property$Quotes = Globals | "auto" | "none" | string; + +export type Property$Resize = Globals | "block" | "both" | "horizontal" | "inline" | "none" | "vertical"; + +export type Property$Right<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$Rotate = Globals | "none" | string; + +export type Property$RowGap<TLength = string | 0> = Globals | TLength | "normal" | string; + +export type Property$RubyAlign = Globals | "center" | "space-around" | "space-between" | "start"; + +export type Property$RubyMerge = Globals | "auto" | "collapse" | "separate"; + +export type Property$RubyPosition = Globals | "alternate" | "inter-character" | "over" | "under" | string; + +export type Property$Scale = Globals | "none" | string | number; + +export type Property$ScrollBehavior = Globals | "auto" | "smooth"; + +export type Property$ScrollMargin<TLength = string | 0> = Globals | TLength | string; + +export type Property$ScrollMarginBlock<TLength = string | 0> = Globals | TLength | string; + +export type Property$ScrollMarginBlockEnd<TLength = string | 0> = Globals | TLength; + +export type Property$ScrollMarginBlockStart<TLength = string | 0> = Globals | TLength; + +export type Property$ScrollMarginBottom<TLength = string | 0> = Globals | TLength; + +export type Property$ScrollMarginInline<TLength = string | 0> = Globals | TLength | string; + +export type Property$ScrollMarginInlineEnd<TLength = string | 0> = Globals | TLength; + +export type Property$ScrollMarginInlineStart<TLength = string | 0> = Globals | TLength; + +export type Property$ScrollMarginLeft<TLength = string | 0> = Globals | TLength; + +export type Property$ScrollMarginRight<TLength = string | 0> = Globals | TLength; + +export type Property$ScrollMarginTop<TLength = string | 0> = Globals | TLength; + +export type Property$ScrollPadding<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$ScrollPaddingBlock<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$ScrollPaddingBlockEnd<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$ScrollPaddingBlockStart<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$ScrollPaddingBottom<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$ScrollPaddingInline<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$ScrollPaddingInlineEnd<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$ScrollPaddingInlineStart<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$ScrollPaddingLeft<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$ScrollPaddingRight<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$ScrollPaddingTop<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$ScrollSnapAlign = Globals | "center" | "end" | "none" | "start" | string; + +export type Property$ScrollSnapCoordinate<TLength = string | 0> = Globals | DataType$Position<TLength> | "none" | string; + +export type Property$ScrollSnapDestination<TLength = string | 0> = Globals | DataType$Position<TLength>; + +export type Property$ScrollSnapPointsX = Globals | "none" | string; + +export type Property$ScrollSnapPointsY = Globals | "none" | string; + +export type Property$ScrollSnapStop = Globals | "always" | "normal"; + +export type Property$ScrollSnapType = Globals | "block" | "both" | "inline" | "none" | "x" | "y" | string; + +export type Property$ScrollSnapTypeX = Globals | "mandatory" | "none" | "proximity"; + +export type Property$ScrollSnapTypeY = Globals | "mandatory" | "none" | "proximity"; + +export type Property$ScrollTimeline = Globals | "none" | string; + +export type Property$ScrollTimelineAxis = Globals | "block" | "inline" | "x" | "y" | string; + +export type Property$ScrollTimelineName = Globals | "none" | string; + +export type Property$ScrollbarColor = Globals | "auto" | string; + +export type Property$ScrollbarGutter = Globals | "auto" | "stable" | string; + +export type Property$ScrollbarWidth = Globals | "auto" | "none" | "thin"; + +export type Property$ShapeImageThreshold = Globals | string | number; + +export type Property$ShapeMargin<TLength = string | 0> = Globals | TLength | string; + +export type Property$ShapeOutside = Globals | DataType$Box | "margin-box" | "none" | string; + +export type Property$TabSize<TLength = string | 0> = Globals | TLength | number; + +export type Property$TableLayout = Globals | "auto" | "fixed"; + +export type Property$TextAlign = Globals | "-webkit-match-parent" | "center" | "end" | "justify" | "left" | "match-parent" | "right" | "start"; + +export type Property$TextAlignLast = Globals | "auto" | "center" | "end" | "justify" | "left" | "right" | "start"; + +export type Property$TextCombineUpright = Globals | "all" | "none" | string; + +export type Property$TextDecoration<TLength = string | 0> = + | Globals + | DataType$Color + | TLength + | "auto" + | "blink" + | "dashed" + | "dotted" + | "double" + | "from-font" + | "grammar-error" + | "line-through" + | "none" + | "overline" + | "solid" + | "spelling-error" + | "underline" + | "wavy" + | string; + +export type Property$TextDecorationColor = Globals | DataType$Color; + +export type Property$TextDecorationLine = Globals | "blink" | "grammar-error" | "line-through" | "none" | "overline" | "spelling-error" | "underline" | string; + +export type Property$TextDecorationSkip = Globals | "box-decoration" | "edges" | "leading-spaces" | "none" | "objects" | "spaces" | "trailing-spaces" | string; + +export type Property$TextDecorationSkipInk = Globals | "all" | "auto" | "none"; + +export type Property$TextDecorationStyle = Globals | "dashed" | "dotted" | "double" | "solid" | "wavy"; + +export type Property$TextDecorationThickness<TLength = string | 0> = Globals | TLength | "auto" | "from-font" | string; + +export type Property$TextEmphasis = Globals | DataType$Color | "circle" | "dot" | "double-circle" | "filled" | "none" | "open" | "sesame" | "triangle" | string; + +export type Property$TextEmphasisColor = Globals | DataType$Color; + +export type Property$TextEmphasisPosition = Globals | string; + +export type Property$TextEmphasisStyle = Globals | "circle" | "dot" | "double-circle" | "filled" | "none" | "open" | "sesame" | "triangle" | string; + +export type Property$TextIndent<TLength = string | 0> = Globals | TLength | string; + +export type Property$TextJustify = Globals | "auto" | "inter-character" | "inter-word" | "none"; + +export type Property$TextOrientation = Globals | "mixed" | "sideways" | "upright"; + +export type Property$TextOverflow = Globals | "clip" | "ellipsis" | string; + +export type Property$TextRendering = Globals | "auto" | "geometricPrecision" | "optimizeLegibility" | "optimizeSpeed"; + +export type Property$TextShadow = Globals | "none" | string; + +export type Property$TextSizeAdjust = Globals | "auto" | "none" | string; + +export type Property$TextTransform = Globals | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "none" | "uppercase"; + +export type Property$TextUnderlineOffset<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$TextUnderlinePosition = Globals | "auto" | "from-font" | "left" | "right" | "under" | string; + +export type Property$TextWrap = Globals | "balance" | "nowrap" | "pretty" | "stable" | "wrap"; + +export type Property$TimelineScope = Globals | "none" | string; + +export type Property$Top<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$TouchAction = + | Globals + | "-ms-manipulation" + | "-ms-none" + | "-ms-pinch-zoom" + | "auto" + | "manipulation" + | "none" + | "pan-down" + | "pan-left" + | "pan-right" + | "pan-up" + | "pan-x" + | "pan-y" + | "pinch-zoom" + | string; + +export type Property$Transform = Globals | "none" | string; + +export type Property$TransformBox = Globals | "border-box" | "content-box" | "fill-box" | "stroke-box" | "view-box"; + +export type Property$TransformOrigin<TLength = string | 0> = Globals | TLength | "bottom" | "center" | "left" | "right" | "top" | string; + +export type Property$TransformStyle = Globals | "flat" | "preserve-3d"; + +export type Property$Transition<TTime = string> = Globals | DataType$SingleTransition<TTime> | string; + +export type Property$TransitionBehavior = Globals | "allow-discrete" | "normal" | string; + +export type Property$TransitionDelay<TTime = string> = Globals | TTime | string; + +export type Property$TransitionDuration<TTime = string> = Globals | TTime | string; + +export type Property$TransitionProperty = Globals | "all" | "none" | string; + +export type Property$TransitionTimingFunction = Globals | DataType$EasingFunction | string; + +export type Property$Translate<TLength = string | 0> = Globals | TLength | "none" | string; + +export type Property$UnicodeBidi = + | Globals + | "-moz-isolate" + | "-moz-isolate-override" + | "-moz-plaintext" + | "-webkit-isolate" + | "-webkit-isolate-override" + | "-webkit-plaintext" + | "bidi-override" + | "embed" + | "isolate" + | "isolate-override" + | "normal" + | "plaintext"; + +export type Property$UserSelect = Globals | "-moz-none" | "all" | "auto" | "contain" | "element" | "none" | "text"; + +export type Property$VerticalAlign<TLength = string | 0> = Globals | TLength | "baseline" | "bottom" | "middle" | "sub" | "super" | "text-bottom" | "text-top" | "top" | string; + +export type Property$ViewTimeline = Globals | "none" | string; + +export type Property$ViewTimelineAxis = Globals | "block" | "inline" | "x" | "y" | string; + +export type Property$ViewTimelineInset<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$ViewTimelineName = Globals | "none" | string; + +export type Property$ViewTransitionName = Globals | "none" | string; + +export type Property$Visibility = Globals | "collapse" | "hidden" | "visible"; + +export type Property$WhiteSpace = + | Globals + | "-moz-pre-wrap" + | "balance" + | "break-spaces" + | "collapse" + | "discard" + | "discard-after" + | "discard-before" + | "discard-inner" + | "none" + | "normal" + | "nowrap" + | "pre" + | "pre-line" + | "pre-wrap" + | "preserve" + | "preserve-breaks" + | "preserve-spaces" + | "pretty" + | "stable" + | "wrap" + | string; + +export type Property$WhiteSpaceCollapse = Globals | "break-spaces" | "collapse" | "discard" | "preserve" | "preserve-breaks" | "preserve-spaces"; + +export type Property$WhiteSpaceTrim = Globals | "discard-after" | "discard-before" | "discard-inner" | "none" | string; + +export type Property$Widows = Globals | number; + +export type Property$Width<TLength = string | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fit-content" + | "-webkit-max-content" + | "auto" + | "fit-content" + | "intrinsic" + | "max-content" + | "min-content" + | "min-intrinsic" + | string; + +export type Property$WillChange = Globals | DataType$AnimateableFeature | "auto" | string; + +export type Property$WordBreak = Globals | "break-all" | "break-word" | "keep-all" | "normal"; + +export type Property$WordSpacing<TLength = string | 0> = Globals | TLength | "normal"; + +export type Property$WordWrap = Globals | "break-word" | "normal"; + +export type Property$WritingMode = Globals | "horizontal-tb" | "sideways-lr" | "sideways-rl" | "vertical-lr" | "vertical-rl"; + +export type Property$ZIndex = Globals | "auto" | number; + +export type Property$Zoom = Globals | "normal" | "reset" | string | number; + +export type Property$MozAppearance = + | Globals + | "-moz-mac-unified-toolbar" + | "-moz-win-borderless-glass" + | "-moz-win-browsertabbar-toolbox" + | "-moz-win-communications-toolbox" + | "-moz-win-communicationstext" + | "-moz-win-exclude-glass" + | "-moz-win-glass" + | "-moz-win-media-toolbox" + | "-moz-win-mediatext" + | "-moz-window-button-box" + | "-moz-window-button-box-maximized" + | "-moz-window-button-close" + | "-moz-window-button-maximize" + | "-moz-window-button-minimize" + | "-moz-window-button-restore" + | "-moz-window-frame-bottom" + | "-moz-window-frame-left" + | "-moz-window-frame-right" + | "-moz-window-titlebar" + | "-moz-window-titlebar-maximized" + | "button" + | "button-arrow-down" + | "button-arrow-next" + | "button-arrow-previous" + | "button-arrow-up" + | "button-bevel" + | "button-focus" + | "caret" + | "checkbox" + | "checkbox-container" + | "checkbox-label" + | "checkmenuitem" + | "dualbutton" + | "groupbox" + | "listbox" + | "listitem" + | "menuarrow" + | "menubar" + | "menucheckbox" + | "menuimage" + | "menuitem" + | "menuitemtext" + | "menulist" + | "menulist-button" + | "menulist-text" + | "menulist-textfield" + | "menupopup" + | "menuradio" + | "menuseparator" + | "meterbar" + | "meterchunk" + | "none" + | "progressbar" + | "progressbar-vertical" + | "progresschunk" + | "progresschunk-vertical" + | "radio" + | "radio-container" + | "radio-label" + | "radiomenuitem" + | "range" + | "range-thumb" + | "resizer" + | "resizerpanel" + | "scale-horizontal" + | "scale-vertical" + | "scalethumb-horizontal" + | "scalethumb-vertical" + | "scalethumbend" + | "scalethumbstart" + | "scalethumbtick" + | "scrollbarbutton-down" + | "scrollbarbutton-left" + | "scrollbarbutton-right" + | "scrollbarbutton-up" + | "scrollbarthumb-horizontal" + | "scrollbarthumb-vertical" + | "scrollbartrack-horizontal" + | "scrollbartrack-vertical" + | "searchfield" + | "separator" + | "sheet" + | "spinner" + | "spinner-downbutton" + | "spinner-textfield" + | "spinner-upbutton" + | "splitter" + | "statusbar" + | "statusbarpanel" + | "tab" + | "tab-scroll-arrow-back" + | "tab-scroll-arrow-forward" + | "tabpanel" + | "tabpanels" + | "textfield" + | "textfield-multiline" + | "toolbar" + | "toolbarbutton" + | "toolbarbutton-dropdown" + | "toolbargripper" + | "toolbox" + | "tooltip" + | "treeheader" + | "treeheadercell" + | "treeheadersortarrow" + | "treeitem" + | "treeline" + | "treetwisty" + | "treetwistyopen" + | "treeview"; + +export type Property$MozBinding = Globals | "none" | string; + +export type Property$MozBorderBottomColors = Globals | DataType$Color | "none" | string; + +export type Property$MozBorderLeftColors = Globals | DataType$Color | "none" | string; + +export type Property$MozBorderRightColors = Globals | DataType$Color | "none" | string; + +export type Property$MozBorderTopColors = Globals | DataType$Color | "none" | string; + +export type Property$MozContextProperties = Globals | "fill" | "fill-opacity" | "none" | "stroke" | "stroke-opacity" | string; + +export type Property$MozFloatEdge = Globals | "border-box" | "content-box" | "margin-box" | "padding-box"; + +export type Property$MozForceBrokenImageIcon = Globals | 0 | 1; + +export type Property$MozImageRegion = Globals | "auto" | string; + +export type Property$MozOrient = Globals | "block" | "horizontal" | "inline" | "vertical"; + +export type Property$MozOutlineRadius<TLength = string | 0> = Globals | TLength | string; + +export type Property$MozOutlineRadiusBottomleft<TLength = string | 0> = Globals | TLength | string; + +export type Property$MozOutlineRadiusBottomright<TLength = string | 0> = Globals | TLength | string; + +export type Property$MozOutlineRadiusTopleft<TLength = string | 0> = Globals | TLength | string; + +export type Property$MozOutlineRadiusTopright<TLength = string | 0> = Globals | TLength | string; + +export type Property$MozStackSizing = Globals | "ignore" | "stretch-to-fit"; + +export type Property$MozTextBlink = Globals | "blink" | "none"; + +export type Property$MozUserFocus = Globals | "ignore" | "none" | "normal" | "select-after" | "select-all" | "select-before" | "select-menu" | "select-same"; + +export type Property$MozUserInput = Globals | "auto" | "disabled" | "enabled" | "none"; + +export type Property$MozUserModify = Globals | "read-only" | "read-write" | "write-only"; + +export type Property$MozWindowDragging = Globals | "drag" | "no-drag"; + +export type Property$MozWindowShadow = Globals | "default" | "menu" | "none" | "sheet" | "tooltip"; + +export type Property$MsAccelerator = Globals | "false" | "true"; + +export type Property$MsBlockProgression = Globals | "bt" | "lr" | "rl" | "tb"; + +export type Property$MsContentZoomChaining = Globals | "chained" | "none"; + +export type Property$MsContentZoomLimit = Globals | string; + +export type Property$MsContentZoomLimitMax = Globals | string; + +export type Property$MsContentZoomLimitMin = Globals | string; + +export type Property$MsContentZoomSnap = Globals | "mandatory" | "none" | "proximity" | string; + +export type Property$MsContentZoomSnapPoints = Globals | string; + +export type Property$MsContentZoomSnapType = Globals | "mandatory" | "none" | "proximity"; + +export type Property$MsContentZooming = Globals | "none" | "zoom"; + +export type Property$MsFilter = Globals | string; + +export type Property$MsFlowFrom = Globals | "none" | string; + +export type Property$MsFlowInto = Globals | "none" | string; + +export type Property$MsGridColumns<TLength = string | 0> = Globals | DataType$TrackBreadth<TLength> | "none" | string; + +export type Property$MsGridRows<TLength = string | 0> = Globals | DataType$TrackBreadth<TLength> | "none" | string; + +export type Property$MsHighContrastAdjust = Globals | "auto" | "none"; + +export type Property$MsHyphenateLimitChars = Globals | "auto" | string | number; + +export type Property$MsHyphenateLimitLines = Globals | "no-limit" | number; + +export type Property$MsHyphenateLimitZone<TLength = string | 0> = Globals | TLength | string; + +export type Property$MsImeAlign = Globals | "after" | "auto"; + +export type Property$MsOverflowStyle = Globals | "-ms-autohiding-scrollbar" | "auto" | "none" | "scrollbar"; + +export type Property$MsScrollChaining = Globals | "chained" | "none"; + +export type Property$MsScrollLimit = Globals | string; + +export type Property$MsScrollLimitXMax<TLength = string | 0> = Globals | TLength | "auto"; + +export type Property$MsScrollLimitXMin<TLength = string | 0> = Globals | TLength; + +export type Property$MsScrollLimitYMax<TLength = string | 0> = Globals | TLength | "auto"; + +export type Property$MsScrollLimitYMin<TLength = string | 0> = Globals | TLength; + +export type Property$MsScrollRails = Globals | "none" | "railed"; + +export type Property$MsScrollSnapPointsX = Globals | string; + +export type Property$MsScrollSnapPointsY = Globals | string; + +export type Property$MsScrollSnapType = Globals | "mandatory" | "none" | "proximity"; + +export type Property$MsScrollSnapX = Globals | string; + +export type Property$MsScrollSnapY = Globals | string; + +export type Property$MsScrollTranslation = Globals | "none" | "vertical-to-horizontal"; + +export type Property$MsScrollbar3dlightColor = Globals | DataType$Color; + +export type Property$MsScrollbarArrowColor = Globals | DataType$Color; + +export type Property$MsScrollbarBaseColor = Globals | DataType$Color; + +export type Property$MsScrollbarDarkshadowColor = Globals | DataType$Color; + +export type Property$MsScrollbarFaceColor = Globals | DataType$Color; + +export type Property$MsScrollbarHighlightColor = Globals | DataType$Color; + +export type Property$MsScrollbarShadowColor = Globals | DataType$Color; + +export type Property$MsScrollbarTrackColor = Globals | DataType$Color; + +export type Property$MsTextAutospace = Globals | "ideograph-alpha" | "ideograph-numeric" | "ideograph-parenthesis" | "ideograph-space" | "none"; + +export type Property$MsTouchSelect = Globals | "grippers" | "none"; + +export type Property$MsUserSelect = Globals | "element" | "none" | "text"; + +export type Property$MsWrapFlow = Globals | "auto" | "both" | "clear" | "end" | "maximum" | "start"; + +export type Property$MsWrapMargin<TLength = string | 0> = Globals | TLength; + +export type Property$MsWrapThrough = Globals | "none" | "wrap"; + +export type Property$WebkitAppearance = + | Globals + | "-apple-pay-button" + | "button" + | "button-bevel" + | "caret" + | "checkbox" + | "default-button" + | "inner-spin-button" + | "listbox" + | "listitem" + | "media-controls-background" + | "media-controls-fullscreen-background" + | "media-current-time-display" + | "media-enter-fullscreen-button" + | "media-exit-fullscreen-button" + | "media-fullscreen-button" + | "media-mute-button" + | "media-overlay-play-button" + | "media-play-button" + | "media-seek-back-button" + | "media-seek-forward-button" + | "media-slider" + | "media-sliderthumb" + | "media-time-remaining-display" + | "media-toggle-closed-captions-button" + | "media-volume-slider" + | "media-volume-slider-container" + | "media-volume-sliderthumb" + | "menulist" + | "menulist-button" + | "menulist-text" + | "menulist-textfield" + | "meter" + | "none" + | "progress-bar" + | "progress-bar-value" + | "push-button" + | "radio" + | "searchfield" + | "searchfield-cancel-button" + | "searchfield-decoration" + | "searchfield-results-button" + | "searchfield-results-decoration" + | "slider-horizontal" + | "slider-vertical" + | "sliderthumb-horizontal" + | "sliderthumb-vertical" + | "square-button" + | "textarea" + | "textfield"; + +export type Property$WebkitBorderBefore<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; + +export type Property$WebkitBorderBeforeColor = Globals | DataType$Color; + +export type Property$WebkitBorderBeforeStyle = Globals | DataType$LineStyle | string; + +export type Property$WebkitBorderBeforeWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | string; + +export type Property$WebkitBoxReflect<TLength = string | 0> = Globals | TLength | "above" | "below" | "left" | "right" | string; + +export type Property$WebkitLineClamp = Globals | "none" | number; + +export type Property$WebkitMask<TLength = string | 0> = + | Globals + | DataType$Position<TLength> + | DataType$RepeatStyle + | DataType$Box + | "border" + | "content" + | "none" + | "padding" + | "text" + | string; + +export type Property$WebkitMaskAttachment = Globals | DataType$Attachment | string; + +export type Property$WebkitMaskClip = Globals | DataType$Box | "border" | "content" | "padding" | "text" | string; + +export type Property$WebkitMaskComposite = Globals | DataType$CompositeStyle | string; + +export type Property$WebkitMaskImage = Globals | "none" | string; + +export type Property$WebkitMaskOrigin = Globals | DataType$Box | "border" | "content" | "padding" | string; + +export type Property$WebkitMaskPosition<TLength = string | 0> = Globals | DataType$Position<TLength> | string; + +export type Property$WebkitMaskPositionX<TLength = string | 0> = Globals | TLength | "center" | "left" | "right" | string; + +export type Property$WebkitMaskPositionY<TLength = string | 0> = Globals | TLength | "bottom" | "center" | "top" | string; + +export type Property$WebkitMaskRepeat = Globals | DataType$RepeatStyle | string; + +export type Property$WebkitMaskRepeatX = Globals | "no-repeat" | "repeat" | "round" | "space"; + +export type Property$WebkitMaskRepeatY = Globals | "no-repeat" | "repeat" | "round" | "space"; + +export type Property$WebkitMaskSize<TLength = string | 0> = Globals | DataType$BgSize<TLength> | string; + +export type Property$WebkitOverflowScrolling = Globals | "auto" | "touch"; + +export type Property$WebkitTapHighlightColor = Globals | DataType$Color; + +export type Property$WebkitTextFillColor = Globals | DataType$Color; + +export type Property$WebkitTextStroke<TLength = string | 0> = Globals | DataType$Color | TLength | string; + +export type Property$WebkitTextStrokeColor = Globals | DataType$Color; + +export type Property$WebkitTextStrokeWidth<TLength = string | 0> = Globals | TLength; + +export type Property$WebkitTouchCallout = Globals | "default" | "none"; + +export type Property$WebkitUserModify = Globals | "read-only" | "read-write" | "read-write-plaintext-only"; + +export type Property$AlignmentBaseline = + | Globals + | "after-edge" + | "alphabetic" + | "auto" + | "baseline" + | "before-edge" + | "central" + | "hanging" + | "ideographic" + | "mathematical" + | "middle" + | "text-after-edge" + | "text-before-edge"; + +export type Property$BaselineShift<TLength = string | 0> = Globals | TLength | "baseline" | "sub" | "super" | string; + +export type Property$ClipRule = Globals | "evenodd" | "nonzero"; + +export type Property$ColorInterpolation = Globals | "auto" | "linearRGB" | "sRGB"; + +export type Property$ColorRendering = Globals | "auto" | "optimizeQuality" | "optimizeSpeed"; + +export type Property$DominantBaseline = + | Globals + | "alphabetic" + | "auto" + | "central" + | "hanging" + | "ideographic" + | "mathematical" + | "middle" + | "no-change" + | "reset-size" + | "text-after-edge" + | "text-before-edge" + | "use-script"; + +export type Property$Fill = Globals | DataType$Paint; + +export type Property$FillOpacity = Globals | number; + +export type Property$FillRule = Globals | "evenodd" | "nonzero"; + +export type Property$FloodColor = Globals | DataType$Color | "currentColor"; + +export type Property$FloodOpacity = Globals | number; + +export type Property$GlyphOrientationVertical = Globals | "auto" | string | number; + +export type Property$LightingColor = Globals | DataType$Color | "currentColor"; + +export type Property$Marker = Globals | "none" | string; + +export type Property$MarkerEnd = Globals | "none" | string; + +export type Property$MarkerMid = Globals | "none" | string; + +export type Property$MarkerStart = Globals | "none" | string; + +export type Property$ShapeRendering = Globals | "auto" | "crispEdges" | "geometricPrecision" | "optimizeSpeed"; + +export type Property$StopColor = Globals | DataType$Color | "currentColor"; + +export type Property$StopOpacity = Globals | number; + +export type Property$Stroke = Globals | DataType$Paint; + +export type Property$StrokeDasharray<TLength = string | 0> = Globals | DataType$Dasharray<TLength> | "none"; + +export type Property$StrokeDashoffset<TLength = string | 0> = Globals | TLength | string; + +export type Property$StrokeLinecap = Globals | "butt" | "round" | "square"; + +export type Property$StrokeLinejoin = Globals | "bevel" | "miter" | "round"; + +export type Property$StrokeMiterlimit = Globals | number; + +export type Property$StrokeOpacity = Globals | number; + +export type Property$StrokeWidth<TLength = string | 0> = Globals | TLength | string; + +export type Property$TextAnchor = Globals | "end" | "middle" | "start"; + +export type Property$VectorEffect = Globals | "non-scaling-stroke" | "none"; + +export type AtRule$CounterStyle<TLength = string | 0, TTime = string> = {| + additiveSymbols?: string, + fallback?: string, + negative?: string, + pad?: string, + prefix?: string, + range?: AtRule$Range, + speakAs?: AtRule$SpeakAs, + suffix?: string, + symbols?: string, + system?: AtRule$System, +|}; + +export type AtRule$CounterStyleHyphen<TLength = string | 0, TTime = string> = {| + "additive-symbols"?: string, + fallback?: string, + negative?: string, + pad?: string, + prefix?: string, + range?: AtRule$Range, + "speak-as"?: AtRule$SpeakAs, + suffix?: string, + symbols?: string, + system?: AtRule$System, +|}; + +export type AtRule$CounterStyleFallback<TLength = string | 0, TTime = string> = {| + additiveSymbols?: string | Array<string>, + fallback?: string | Array<string>, + negative?: string | Array<string>, + pad?: string | Array<string>, + prefix?: string | Array<string>, + range?: AtRule$Range | Array<AtRule$Range>, + speakAs?: AtRule$SpeakAs | Array<AtRule$SpeakAs>, + suffix?: string | Array<string>, + symbols?: string | Array<string>, + system?: AtRule$System | Array<AtRule$System>, +|}; + +export type AtRule$CounterStyleHyphenFallback<TLength = string | 0, TTime = string> = {| + "additive-symbols"?: string | Array<string>, + fallback?: string | Array<string>, + negative?: string | Array<string>, + pad?: string | Array<string>, + prefix?: string | Array<string>, + range?: AtRule$Range | Array<AtRule$Range>, + "speak-as"?: AtRule$SpeakAs | Array<AtRule$SpeakAs>, + suffix?: string | Array<string>, + symbols?: string | Array<string>, + system?: AtRule$System | Array<AtRule$System>, +|}; + +export type AtRule$FontFace<TLength = string | 0, TTime = string> = {| + MozFontFeatureSettings?: AtRule$FontFeatureSettings, + ascentOverride?: AtRule$AscentOverride, + descentOverride?: AtRule$DescentOverride, + fontDisplay?: AtRule$FontDisplay, + fontFamily?: string, + fontFeatureSettings?: AtRule$FontFeatureSettings, + fontStretch?: AtRule$FontStretch, + fontStyle?: AtRule$FontStyle, + fontVariant?: AtRule$FontVariant, + fontVariationSettings?: AtRule$FontVariationSettings, + fontWeight?: AtRule$FontWeight, + lineGapOverride?: AtRule$LineGapOverride, + sizeAdjust?: string, + src?: string, + unicodeRange?: string, +|}; + +export type AtRule$FontFaceHyphen<TLength = string | 0, TTime = string> = {| + "-moz-font-feature-settings"?: AtRule$FontFeatureSettings, + "ascent-override"?: AtRule$AscentOverride, + "descent-override"?: AtRule$DescentOverride, + "font-display"?: AtRule$FontDisplay, + "font-family"?: string, + "font-feature-settings"?: AtRule$FontFeatureSettings, + "font-stretch"?: AtRule$FontStretch, + "font-style"?: AtRule$FontStyle, + "font-variant"?: AtRule$FontVariant, + "font-variation-settings"?: AtRule$FontVariationSettings, + "font-weight"?: AtRule$FontWeight, + "line-gap-override"?: AtRule$LineGapOverride, + "size-adjust"?: string, + src?: string, + "unicode-range"?: string, +|}; + +export type AtRule$FontFaceFallback<TLength = string | 0, TTime = string> = {| + MozFontFeatureSettings?: AtRule$FontFeatureSettings | Array<AtRule$FontFeatureSettings>, + ascentOverride?: AtRule$AscentOverride | Array<AtRule$AscentOverride>, + descentOverride?: AtRule$DescentOverride | Array<AtRule$DescentOverride>, + fontDisplay?: AtRule$FontDisplay | Array<AtRule$FontDisplay>, + fontFamily?: string | Array<string>, + fontFeatureSettings?: AtRule$FontFeatureSettings | Array<AtRule$FontFeatureSettings>, + fontStretch?: AtRule$FontStretch | Array<AtRule$FontStretch>, + fontStyle?: AtRule$FontStyle | Array<AtRule$FontStyle>, + fontVariant?: AtRule$FontVariant | Array<AtRule$FontVariant>, + fontVariationSettings?: AtRule$FontVariationSettings | Array<AtRule$FontVariationSettings>, + fontWeight?: AtRule$FontWeight | Array<AtRule$FontWeight>, + lineGapOverride?: AtRule$LineGapOverride | Array<AtRule$LineGapOverride>, + sizeAdjust?: string | Array<string>, + src?: string | Array<string>, + unicodeRange?: string | Array<string>, +|}; + +export type AtRule$FontFaceHyphenFallback<TLength = string | 0, TTime = string> = {| + "-moz-font-feature-settings"?: AtRule$FontFeatureSettings | Array<AtRule$FontFeatureSettings>, + "ascent-override"?: AtRule$AscentOverride | Array<AtRule$AscentOverride>, + "descent-override"?: AtRule$DescentOverride | Array<AtRule$DescentOverride>, + "font-display"?: AtRule$FontDisplay | Array<AtRule$FontDisplay>, + "font-family"?: string | Array<string>, + "font-feature-settings"?: AtRule$FontFeatureSettings | Array<AtRule$FontFeatureSettings>, + "font-stretch"?: AtRule$FontStretch | Array<AtRule$FontStretch>, + "font-style"?: AtRule$FontStyle | Array<AtRule$FontStyle>, + "font-variant"?: AtRule$FontVariant | Array<AtRule$FontVariant>, + "font-variation-settings"?: AtRule$FontVariationSettings | Array<AtRule$FontVariationSettings>, + "font-weight"?: AtRule$FontWeight | Array<AtRule$FontWeight>, + "line-gap-override"?: AtRule$LineGapOverride | Array<AtRule$LineGapOverride>, + "size-adjust"?: string | Array<string>, + src?: string | Array<string>, + "unicode-range"?: string | Array<string>, +|}; + +export type AtRule$FontPaletteValues<TLength = string | 0, TTime = string> = {| + basePalette?: AtRule$BasePalette, + fontFamily?: string, + overrideColors?: string, +|}; + +export type AtRule$FontPaletteValuesHyphen<TLength = string | 0, TTime = string> = {| + "base-palette"?: AtRule$BasePalette, + "font-family"?: string, + "override-colors"?: string, +|}; + +export type AtRule$FontPaletteValuesFallback<TLength = string | 0, TTime = string> = {| + basePalette?: AtRule$BasePalette | Array<AtRule$BasePalette>, + fontFamily?: string | Array<string>, + overrideColors?: string | Array<string>, +|}; + +export type AtRule$FontPaletteValuesHyphenFallback<TLength = string | 0, TTime = string> = {| + "base-palette"?: AtRule$BasePalette | Array<AtRule$BasePalette>, + "font-family"?: string | Array<string>, + "override-colors"?: string | Array<string>, +|}; + +export type AtRule$Page<TLength = string | 0, TTime = string> = {| + bleed?: AtRule$Bleed<TLength>, + marks?: AtRule$Marks, + pageOrientation?: AtRule$PageOrientation, + size?: AtRule$Size<TLength>, +|}; + +export type AtRule$PageHyphen<TLength = string | 0, TTime = string> = {| + bleed?: AtRule$Bleed<TLength>, + marks?: AtRule$Marks, + "page-orientation"?: AtRule$PageOrientation, + size?: AtRule$Size<TLength>, +|}; + +export type AtRule$PageFallback<TLength = string | 0, TTime = string> = {| + bleed?: AtRule$Bleed<TLength> | Array<AtRule$Bleed<TLength>>, + marks?: AtRule$Marks | Array<AtRule$Marks>, + pageOrientation?: AtRule$PageOrientation | Array<AtRule$PageOrientation>, + size?: AtRule$Size<TLength> | Array<AtRule$Size<TLength>>, +|}; + +export type AtRule$PageHyphenFallback<TLength = string | 0, TTime = string> = {| + bleed?: AtRule$Bleed<TLength> | Array<AtRule$Bleed<TLength>>, + marks?: AtRule$Marks | Array<AtRule$Marks>, + "page-orientation"?: AtRule$PageOrientation | Array<AtRule$PageOrientation>, + size?: AtRule$Size<TLength> | Array<AtRule$Size<TLength>>, +|}; + +export type AtRule$Property<TLength = string | 0, TTime = string> = {| + inherits?: AtRule$Inherits, + initialValue?: string, + syntax?: string, +|}; + +export type AtRule$PropertyHyphen<TLength = string | 0, TTime = string> = {| + inherits?: AtRule$Inherits, + "initial-value"?: string, + syntax?: string, +|}; + +export type AtRule$PropertyFallback<TLength = string | 0, TTime = string> = {| + inherits?: AtRule$Inherits | Array<AtRule$Inherits>, + initialValue?: string | Array<string>, + syntax?: string | Array<string>, +|}; + +export type AtRule$PropertyHyphenFallback<TLength = string | 0, TTime = string> = {| + inherits?: AtRule$Inherits | Array<AtRule$Inherits>, + "initial-value"?: string | Array<string>, + syntax?: string | Array<string>, +|}; + +export type AtRule$Viewport<TLength = string | 0, TTime = string> = {| + height?: AtRule$Height<TLength>, + maxHeight?: AtRule$MaxHeight<TLength>, + maxWidth?: AtRule$MaxWidth<TLength>, + maxZoom?: AtRule$MaxZoom, + minHeight?: AtRule$MinHeight<TLength>, + minWidth?: AtRule$MinWidth<TLength>, + minZoom?: AtRule$MinZoom, + orientation?: AtRule$Orientation, + userZoom?: AtRule$UserZoom, + viewportFit?: AtRule$ViewportFit, + width?: AtRule$Width<TLength>, + zoom?: AtRule$Zoom, +|}; + +export type AtRule$ViewportHyphen<TLength = string | 0, TTime = string> = {| + height?: AtRule$Height<TLength>, + "max-height"?: AtRule$MaxHeight<TLength>, + "max-width"?: AtRule$MaxWidth<TLength>, + "max-zoom"?: AtRule$MaxZoom, + "min-height"?: AtRule$MinHeight<TLength>, + "min-width"?: AtRule$MinWidth<TLength>, + "min-zoom"?: AtRule$MinZoom, + orientation?: AtRule$Orientation, + "user-zoom"?: AtRule$UserZoom, + "viewport-fit"?: AtRule$ViewportFit, + width?: AtRule$Width<TLength>, + zoom?: AtRule$Zoom, +|}; + +export type AtRule$ViewportFallback<TLength = string | 0, TTime = string> = {| + height?: AtRule$Height<TLength> | Array<AtRule$Height<TLength>>, + maxHeight?: AtRule$MaxHeight<TLength> | Array<AtRule$MaxHeight<TLength>>, + maxWidth?: AtRule$MaxWidth<TLength> | Array<AtRule$MaxWidth<TLength>>, + maxZoom?: AtRule$MaxZoom | Array<AtRule$MaxZoom>, + minHeight?: AtRule$MinHeight<TLength> | Array<AtRule$MinHeight<TLength>>, + minWidth?: AtRule$MinWidth<TLength> | Array<AtRule$MinWidth<TLength>>, + minZoom?: AtRule$MinZoom | Array<AtRule$MinZoom>, + orientation?: AtRule$Orientation | Array<AtRule$Orientation>, + userZoom?: AtRule$UserZoom | Array<AtRule$UserZoom>, + viewportFit?: AtRule$ViewportFit | Array<AtRule$ViewportFit>, + width?: AtRule$Width<TLength> | Array<AtRule$Width<TLength>>, + zoom?: AtRule$Zoom | Array<AtRule$Zoom>, +|}; + +export type AtRule$ViewportHyphenFallback<TLength = string | 0, TTime = string> = {| + height?: AtRule$Height<TLength> | Array<AtRule$Height<TLength>>, + "max-height"?: AtRule$MaxHeight<TLength> | Array<AtRule$MaxHeight<TLength>>, + "max-width"?: AtRule$MaxWidth<TLength> | Array<AtRule$MaxWidth<TLength>>, + "max-zoom"?: AtRule$MaxZoom | Array<AtRule$MaxZoom>, + "min-height"?: AtRule$MinHeight<TLength> | Array<AtRule$MinHeight<TLength>>, + "min-width"?: AtRule$MinWidth<TLength> | Array<AtRule$MinWidth<TLength>>, + "min-zoom"?: AtRule$MinZoom | Array<AtRule$MinZoom>, + orientation?: AtRule$Orientation | Array<AtRule$Orientation>, + "user-zoom"?: AtRule$UserZoom | Array<AtRule$UserZoom>, + "viewport-fit"?: AtRule$ViewportFit | Array<AtRule$ViewportFit>, + width?: AtRule$Width<TLength> | Array<AtRule$Width<TLength>>, + zoom?: AtRule$Zoom | Array<AtRule$Zoom>, +|}; + +type AtRule$Range = "auto" | string; + +type AtRule$SpeakAs = "auto" | "bullets" | "numbers" | "spell-out" | "words" | string; + +type AtRule$System = "additive" | "alphabetic" | "cyclic" | "fixed" | "numeric" | "symbolic" | string; + +type AtRule$FontFeatureSettings = "normal" | string; + +type AtRule$AscentOverride = "normal" | string; + +type AtRule$DescentOverride = "normal" | string; + +type AtRule$FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; + +type AtRule$FontStretch = DataType$FontStretchAbsolute | string; + +type AtRule$FontStyle = "italic" | "normal" | "oblique" | string; + +type AtRule$FontVariant = + | DataType$EastAsianVariantValues + | "all-petite-caps" + | "all-small-caps" + | "common-ligatures" + | "contextual" + | "diagonal-fractions" + | "discretionary-ligatures" + | "full-width" + | "historical-forms" + | "historical-ligatures" + | "lining-nums" + | "no-common-ligatures" + | "no-contextual" + | "no-discretionary-ligatures" + | "no-historical-ligatures" + | "none" + | "normal" + | "oldstyle-nums" + | "ordinal" + | "petite-caps" + | "proportional-nums" + | "proportional-width" + | "ruby" + | "slashed-zero" + | "small-caps" + | "stacked-fractions" + | "tabular-nums" + | "titling-caps" + | "unicase" + | string; + +type AtRule$FontVariationSettings = "normal" | string; + +type AtRule$FontWeight = DataType$FontWeightAbsolute | string; + +type AtRule$LineGapOverride = "normal" | string; + +type AtRule$BasePalette = "dark" | "light" | number; + +type AtRule$Bleed<TLength> = TLength | "auto"; + +type AtRule$Marks = "crop" | "cross" | "none" | string; + +type AtRule$PageOrientation = "rotate-left" | "rotate-right" | "upright"; + +type AtRule$Size<TLength> = DataType$PageSize | TLength | "auto" | "landscape" | "portrait" | string; + +type AtRule$Inherits = "false" | "true"; + +type AtRule$Height<TLength> = DataType$ViewportLength<TLength> | string; + +type AtRule$MaxHeight<TLength> = DataType$ViewportLength<TLength>; + +type AtRule$MaxWidth<TLength> = DataType$ViewportLength<TLength>; + +type AtRule$MaxZoom = "auto" | string | number; + +type AtRule$MinHeight<TLength> = DataType$ViewportLength<TLength>; + +type AtRule$MinWidth<TLength> = DataType$ViewportLength<TLength>; + +type AtRule$MinZoom = "auto" | string | number; + +type AtRule$Orientation = "auto" | "landscape" | "portrait"; + +type AtRule$UserZoom = "fixed" | "zoom"; + +type AtRule$ViewportFit = "auto" | "contain" | "cover"; + +type AtRule$Width<TLength> = DataType$ViewportLength<TLength> | string; + +type AtRule$Zoom = "auto" | string | number; + +type DataType$AbsoluteSize = "large" | "medium" | "small" | "x-large" | "x-small" | "xx-large" | "xx-small" | "xxx-large"; + +type DataType$AnimateableFeature = "contents" | "scroll-position" | string; + +type DataType$Attachment = "fixed" | "local" | "scroll"; + +type DataType$BgPosition<TLength> = TLength | "bottom" | "center" | "left" | "right" | "top" | string; + +type DataType$BgSize<TLength> = TLength | "auto" | "contain" | "cover" | string; + +type DataType$BlendMode = + | "color" + | "color-burn" + | "color-dodge" + | "darken" + | "difference" + | "exclusion" + | "hard-light" + | "hue" + | "lighten" + | "luminosity" + | "multiply" + | "normal" + | "overlay" + | "saturation" + | "screen" + | "soft-light"; + +type DataType$Box = "border-box" | "content-box" | "padding-box"; + +type DataType$Color = DataType$NamedColor | DataType$DeprecatedSystemColor | "currentcolor" | string; + +type DataType$CompatAuto = + | "button" + | "checkbox" + | "listbox" + | "menulist" + | "meter" + | "progress-bar" + | "push-button" + | "radio" + | "searchfield" + | "slider-horizontal" + | "square-button" + | "textarea"; + +type DataType$CompositeStyle = + | "clear" + | "copy" + | "destination-atop" + | "destination-in" + | "destination-out" + | "destination-over" + | "source-atop" + | "source-in" + | "source-out" + | "source-over" + | "xor"; + +type DataType$CompositingOperator = "add" | "exclude" | "intersect" | "subtract"; + +type DataType$ContentDistribution = "space-around" | "space-between" | "space-evenly" | "stretch"; + +type DataType$ContentList = DataType$Quote | "contents" | string; + +type DataType$ContentPosition = "center" | "end" | "flex-end" | "flex-start" | "start"; + +type DataType$CubicBezierTimingFunction = "ease" | "ease-in" | "ease-in-out" | "ease-out" | string; + +type DataType$Dasharray<TLength> = TLength | string | number; + +type DataType$DeprecatedSystemColor = + | "ActiveBorder" + | "ActiveCaption" + | "AppWorkspace" + | "Background" + | "ButtonFace" + | "ButtonHighlight" + | "ButtonShadow" + | "ButtonText" + | "CaptionText" + | "GrayText" + | "Highlight" + | "HighlightText" + | "InactiveBorder" + | "InactiveCaption" + | "InactiveCaptionText" + | "InfoBackground" + | "InfoText" + | "Menu" + | "MenuText" + | "Scrollbar" + | "ThreeDDarkShadow" + | "ThreeDFace" + | "ThreeDHighlight" + | "ThreeDLightShadow" + | "ThreeDShadow" + | "Window" + | "WindowFrame" + | "WindowText"; + +type DataType$DisplayInside = "-ms-flexbox" | "-ms-grid" | "-webkit-flex" | "flex" | "flow" | "flow-root" | "grid" | "ruby" | "table"; + +type DataType$DisplayInternal = + | "ruby-base" + | "ruby-base-container" + | "ruby-text" + | "ruby-text-container" + | "table-caption" + | "table-cell" + | "table-column" + | "table-column-group" + | "table-footer-group" + | "table-header-group" + | "table-row" + | "table-row-group"; + +type DataType$DisplayLegacy = + | "-ms-inline-flexbox" + | "-ms-inline-grid" + | "-webkit-inline-flex" + | "inline-block" + | "inline-flex" + | "inline-grid" + | "inline-list-item" + | "inline-table"; + +type DataType$DisplayOutside = "block" | "inline" | "run-in"; + +type DataType$EasingFunction = DataType$CubicBezierTimingFunction | DataType$StepTimingFunction | "linear"; + +type DataType$EastAsianVariantValues = "jis04" | "jis78" | "jis83" | "jis90" | "simplified" | "traditional"; + +type DataType$FinalBgLayer<TLength> = DataType$Color | DataType$BgPosition<TLength> | DataType$RepeatStyle | DataType$Attachment | DataType$Box | "none" | string; + +type DataType$FontStretchAbsolute = + | "condensed" + | "expanded" + | "extra-condensed" + | "extra-expanded" + | "normal" + | "semi-condensed" + | "semi-expanded" + | "ultra-condensed" + | "ultra-expanded" + | string; + +type DataType$FontWeightAbsolute = "bold" | "normal" | number; + +type DataType$GenericFamily = "cursive" | "fantasy" | "monospace" | "sans-serif" | "serif"; + +type DataType$GeometryBox = DataType$Box | "fill-box" | "margin-box" | "stroke-box" | "view-box"; + +type DataType$GridLine = "auto" | string | number; + +type DataType$LineStyle = "dashed" | "dotted" | "double" | "groove" | "hidden" | "inset" | "none" | "outset" | "ridge" | "solid"; + +type DataType$LineWidth<TLength> = TLength | "medium" | "thick" | "thin"; + +type DataType$MaskLayer<TLength> = + | DataType$Position<TLength> + | DataType$RepeatStyle + | DataType$GeometryBox + | DataType$CompositingOperator + | DataType$MaskingMode + | "no-clip" + | "none" + | string; + +type DataType$MaskingMode = "alpha" | "luminance" | "match-source"; + +type DataType$NamedColor = + | "aliceblue" + | "antiquewhite" + | "aqua" + | "aquamarine" + | "azure" + | "beige" + | "bisque" + | "black" + | "blanchedalmond" + | "blue" + | "blueviolet" + | "brown" + | "burlywood" + | "cadetblue" + | "chartreuse" + | "chocolate" + | "coral" + | "cornflowerblue" + | "cornsilk" + | "crimson" + | "cyan" + | "darkblue" + | "darkcyan" + | "darkgoldenrod" + | "darkgray" + | "darkgreen" + | "darkgrey" + | "darkkhaki" + | "darkmagenta" + | "darkolivegreen" + | "darkorange" + | "darkorchid" + | "darkred" + | "darksalmon" + | "darkseagreen" + | "darkslateblue" + | "darkslategray" + | "darkslategrey" + | "darkturquoise" + | "darkviolet" + | "deeppink" + | "deepskyblue" + | "dimgray" + | "dimgrey" + | "dodgerblue" + | "firebrick" + | "floralwhite" + | "forestgreen" + | "fuchsia" + | "gainsboro" + | "ghostwhite" + | "gold" + | "goldenrod" + | "gray" + | "green" + | "greenyellow" + | "grey" + | "honeydew" + | "hotpink" + | "indianred" + | "indigo" + | "ivory" + | "khaki" + | "lavender" + | "lavenderblush" + | "lawngreen" + | "lemonchiffon" + | "lightblue" + | "lightcoral" + | "lightcyan" + | "lightgoldenrodyellow" + | "lightgray" + | "lightgreen" + | "lightgrey" + | "lightpink" + | "lightsalmon" + | "lightseagreen" + | "lightskyblue" + | "lightslategray" + | "lightslategrey" + | "lightsteelblue" + | "lightyellow" + | "lime" + | "limegreen" + | "linen" + | "magenta" + | "maroon" + | "mediumaquamarine" + | "mediumblue" + | "mediumorchid" + | "mediumpurple" + | "mediumseagreen" + | "mediumslateblue" + | "mediumspringgreen" + | "mediumturquoise" + | "mediumvioletred" + | "midnightblue" + | "mintcream" + | "mistyrose" + | "moccasin" + | "navajowhite" + | "navy" + | "oldlace" + | "olive" + | "olivedrab" + | "orange" + | "orangered" + | "orchid" + | "palegoldenrod" + | "palegreen" + | "paleturquoise" + | "palevioletred" + | "papayawhip" + | "peachpuff" + | "peru" + | "pink" + | "plum" + | "powderblue" + | "purple" + | "rebeccapurple" + | "red" + | "rosybrown" + | "royalblue" + | "saddlebrown" + | "salmon" + | "sandybrown" + | "seagreen" + | "seashell" + | "sienna" + | "silver" + | "skyblue" + | "slateblue" + | "slategray" + | "slategrey" + | "snow" + | "springgreen" + | "steelblue" + | "tan" + | "teal" + | "thistle" + | "tomato" + | "transparent" + | "turquoise" + | "violet" + | "wheat" + | "white" + | "whitesmoke" + | "yellow" + | "yellowgreen"; + +type DataType$PageSize = "A3" | "A4" | "A5" | "B4" | "B5" | "JIS-B4" | "JIS-B5" | "ledger" | "legal" | "letter"; + +type DataType$Paint = DataType$Color | "child" | "context-fill" | "context-stroke" | "none" | string; + +type DataType$Position<TLength> = TLength | "bottom" | "center" | "left" | "right" | "top" | string; + +type DataType$Quote = "close-quote" | "no-close-quote" | "no-open-quote" | "open-quote"; + +type DataType$RepeatStyle = "no-repeat" | "repeat" | "repeat-x" | "repeat-y" | "round" | "space" | string; + +type DataType$SelfPosition = "center" | "end" | "flex-end" | "flex-start" | "self-end" | "self-start" | "start"; + +type DataType$SingleAnimation<TTime> = + | DataType$EasingFunction + | DataType$SingleAnimationDirection + | DataType$SingleAnimationFillMode + | DataType$SingleAnimationTimeline + | TTime + | "infinite" + | "none" + | "paused" + | "running" + | string + | number; + +type DataType$SingleAnimationComposition = "accumulate" | "add" | "replace"; + +type DataType$SingleAnimationDirection = "alternate" | "alternate-reverse" | "normal" | "reverse"; + +type DataType$SingleAnimationFillMode = "backwards" | "both" | "forwards" | "none"; + +type DataType$SingleAnimationTimeline = "auto" | "none" | string; + +type DataType$SingleTransition<TTime> = DataType$EasingFunction | TTime | "all" | "allow-discrete" | "none" | "normal" | string; + +type DataType$StepTimingFunction = "step-end" | "step-start" | string; + +type DataType$TimelineRangeName = "contain" | "cover" | "entry" | "entry-crossing" | "exit" | "exit-crossing"; + +type DataType$TrackBreadth<TLength> = TLength | "auto" | "max-content" | "min-content" | string; + +type DataType$ViewportLength<TLength> = TLength | "auto" | string; + +type DataType$VisualBox = "border-box" | "content-box" | "padding-box"; diff --git a/vuetest/node_modules/csstype/package.json b/vuetest/node_modules/csstype/package.json new file mode 100644 index 0000000..2400fc3 --- /dev/null +++ b/vuetest/node_modules/csstype/package.json @@ -0,0 +1,66 @@ +{ + "name": "csstype", + "version": "3.1.3", + "main": "", + "types": "index.d.ts", + "description": "Strict TypeScript and Flow types for style based on MDN data", + "repository": "https://github.com/frenic/csstype", + "author": "Fredrik Nicol <fredrik.nicol@gmail.com>", + "license": "MIT", + "devDependencies": { + "@types/chokidar": "^2.1.3", + "@types/css-tree": "^2.3.1", + "@types/jest": "^29.5.0", + "@types/jsdom": "^21.1.1", + "@types/node": "^16.18.23", + "@types/prettier": "^2.7.2", + "@types/request": "^2.48.8", + "@types/turndown": "^5.0.1", + "@typescript-eslint/eslint-plugin": "^5.57.0", + "@typescript-eslint/parser": "^5.57.0", + "chalk": "^4.1.2", + "chokidar": "^3.5.3", + "eslint": "^8.37.0", + "css-tree": "^2.3.1", + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-prettier": "^4.2.1", + "fast-glob": "^3.2.12", + "flow-bin": "^0.203.1", + "jest": "^29.5.0", + "jsdom": "^21.1.1", + "mdn-browser-compat-data": "git+https://github.com/mdn/browser-compat-data.git#1bf44517bd08de735e9ec20dbfe8e86c96341054", + "mdn-data": "git+https://github.com/mdn/data.git#7f0c865a3c4b5d891285c93308ee5c25cb5cfee8", + "prettier": "^2.8.7", + "request": "^2.88.2", + "ts-jest": "^29.0.5", + "ts-node": "^10.9.1", + "turndown": "^7.1.2", + "typescript": "~5.0.3" + }, + "scripts": { + "prepublish": "npm install --prefix __tests__ && npm install --prefix __tests__/__fixtures__", + "prepublishOnly": "tsc && npm run test:src && npm run build && ts-node --files prepublish.ts", + "update": "ts-node --files update.ts", + "build": "ts-node --files build.ts --start", + "watch": "ts-node --files build.ts --watch", + "lint": "eslint . --ext .js,.jsx,.ts,.tsx --fix", + "pretty": "prettier --write build.ts **/*.{ts,js,json,md}", + "lazy": "tsc && npm run lint", + "test": "jest --runInBand", + "test:src": "jest src.*.ts", + "test:dist": "jest dist.*.ts --runInBand" + }, + "files": [ + "index.d.ts", + "index.js.flow" + ], + "keywords": [ + "css", + "style", + "typescript", + "flow", + "typings", + "types", + "definitions" + ] +} diff --git a/vuetest/node_modules/entities/LICENSE b/vuetest/node_modules/entities/LICENSE new file mode 100644 index 0000000..c464f86 --- /dev/null +++ b/vuetest/node_modules/entities/LICENSE @@ -0,0 +1,11 @@ +Copyright (c) Felix Böhm +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vuetest/node_modules/entities/lib/decode.d.ts b/vuetest/node_modules/entities/lib/decode.d.ts new file mode 100644 index 0000000..ccfd9fb --- /dev/null +++ b/vuetest/node_modules/entities/lib/decode.d.ts @@ -0,0 +1,211 @@ +import htmlDecodeTree from "./generated/decode-data-html.js"; +import xmlDecodeTree from "./generated/decode-data-xml.js"; +import decodeCodePoint from "./decode_codepoint.js"; +export { htmlDecodeTree, xmlDecodeTree, decodeCodePoint }; +export { replaceCodePoint, fromCodePoint } from "./decode_codepoint.js"; +export declare enum BinTrieFlags { + VALUE_LENGTH = 49152, + BRANCH_LENGTH = 16256, + JUMP_TABLE = 127 +} +export declare enum DecodingMode { + /** Entities in text nodes that can end with any character. */ + Legacy = 0, + /** Only allow entities terminated with a semicolon. */ + Strict = 1, + /** Entities in attributes have limitations on ending characters. */ + Attribute = 2 +} +/** + * Producers for character reference errors as defined in the HTML spec. + */ +export interface EntityErrorProducer { + missingSemicolonAfterCharacterReference(): void; + absenceOfDigitsInNumericCharacterReference(consumedCharacters: number): void; + validateNumericCharacterReference(code: number): void; +} +/** + * Token decoder with support of writing partial entities. + */ +export declare class EntityDecoder { + /** The tree used to decode entities. */ + private readonly decodeTree; + /** + * The function that is called when a codepoint is decoded. + * + * For multi-byte named entities, this will be called multiple times, + * with the second codepoint, and the same `consumed` value. + * + * @param codepoint The decoded codepoint. + * @param consumed The number of bytes consumed by the decoder. + */ + private readonly emitCodePoint; + /** An object that is used to produce errors. */ + private readonly errors?; + constructor( + /** The tree used to decode entities. */ + decodeTree: Uint16Array, + /** + * The function that is called when a codepoint is decoded. + * + * For multi-byte named entities, this will be called multiple times, + * with the second codepoint, and the same `consumed` value. + * + * @param codepoint The decoded codepoint. + * @param consumed The number of bytes consumed by the decoder. + */ + emitCodePoint: (cp: number, consumed: number) => void, + /** An object that is used to produce errors. */ + errors?: EntityErrorProducer | undefined); + /** The current state of the decoder. */ + private state; + /** Characters that were consumed while parsing an entity. */ + private consumed; + /** + * The result of the entity. + * + * Either the result index of a numeric entity, or the codepoint of a + * numeric entity. + */ + private result; + /** The current index in the decode tree. */ + private treeIndex; + /** The number of characters that were consumed in excess. */ + private excess; + /** The mode in which the decoder is operating. */ + private decodeMode; + /** Resets the instance to make it reusable. */ + startEntity(decodeMode: DecodingMode): void; + /** + * Write an entity to the decoder. This can be called multiple times with partial entities. + * If the entity is incomplete, the decoder will return -1. + * + * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the + * entity is incomplete, and resume when the next string is written. + * + * @param string The string containing the entity (or a continuation of the entity). + * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + write(str: string, offset: number): number; + /** + * Switches between the numeric decimal and hexadecimal states. + * + * Equivalent to the `Numeric character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + private stateNumericStart; + private addToNumericResult; + /** + * Parses a hexadecimal numeric entity. + * + * Equivalent to the `Hexademical character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + private stateNumericHex; + /** + * Parses a decimal numeric entity. + * + * Equivalent to the `Decimal character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + private stateNumericDecimal; + /** + * Validate and emit a numeric entity. + * + * Implements the logic from the `Hexademical character reference start + * state` and `Numeric character reference end state` in the HTML spec. + * + * @param lastCp The last code point of the entity. Used to see if the + * entity was terminated with a semicolon. + * @param expectedLength The minimum number of characters that should be + * consumed. Used to validate that at least one digit + * was consumed. + * @returns The number of characters that were consumed. + */ + private emitNumericEntity; + /** + * Parses a named entity. + * + * Equivalent to the `Named character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + private stateNamedEntity; + /** + * Emit a named entity that was not terminated with a semicolon. + * + * @returns The number of characters consumed. + */ + private emitNotTerminatedNamedEntity; + /** + * Emit a named entity. + * + * @param result The index of the entity in the decode tree. + * @param valueLength The number of bytes in the entity. + * @param consumed The number of characters consumed. + * + * @returns The number of characters consumed. + */ + private emitNamedEntityData; + /** + * Signal to the parser that the end of the input was reached. + * + * Remaining data will be emitted and relevant errors will be produced. + * + * @returns The number of characters consumed. + */ + end(): number; +} +/** + * Determines the branch of the current node that is taken given the current + * character. This function is used to traverse the trie. + * + * @param decodeTree The trie. + * @param current The current node. + * @param nodeIdx The index right after the current node and its value. + * @param char The current character. + * @returns The index of the next node, or -1 if no branch is taken. + */ +export declare function determineBranch(decodeTree: Uint16Array, current: number, nodeIdx: number, char: number): number; +/** + * Decodes an HTML string. + * + * @param str The string to decode. + * @param mode The decoding mode. + * @returns The decoded string. + */ +export declare function decodeHTML(str: string, mode?: DecodingMode): string; +/** + * Decodes an HTML string in an attribute. + * + * @param str The string to decode. + * @returns The decoded string. + */ +export declare function decodeHTMLAttribute(str: string): string; +/** + * Decodes an HTML string, requiring all entities to be terminated by a semicolon. + * + * @param str The string to decode. + * @returns The decoded string. + */ +export declare function decodeHTMLStrict(str: string): string; +/** + * Decodes an XML string, requiring all entities to be terminated by a semicolon. + * + * @param str The string to decode. + * @returns The decoded string. + */ +export declare function decodeXML(str: string): string; +//# sourceMappingURL=decode.d.ts.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/decode.d.ts.map b/vuetest/node_modules/entities/lib/decode.d.ts.map new file mode 100644 index 0000000..4c0b4b4 --- /dev/null +++ b/vuetest/node_modules/entities/lib/decode.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,eAGN,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAoBxE,oBAAY,YAAY;IACpB,YAAY,QAAwB;IACpC,aAAa,QAAwB;IACrC,UAAU,MAAwB;CACrC;AAuCD,oBAAY,YAAY;IACpB,8DAA8D;IAC9D,MAAM,IAAI;IACV,uDAAuD;IACvD,MAAM,IAAI;IACV,oEAAoE;IACpE,SAAS,IAAI;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,uCAAuC,IAAI,IAAI,CAAC;IAChD,0CAA0C,CACtC,kBAAkB,EAAE,MAAM,GAC3B,IAAI,CAAC;IACR,iCAAiC,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACzD;AAED;;GAEG;AACH,qBAAa,aAAa;IAElB,wCAAwC;IACxC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B;;;;;;;;OAQG;IACH,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,gDAAgD;IAChD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;;IAbxB,wCAAwC;IACvB,UAAU,EAAE,WAAW;IACxC;;;;;;;;OAQG;IACc,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI;IACtE,gDAAgD;IAC/B,MAAM,CAAC,iCAAqB;IAGjD,wCAAwC;IACxC,OAAO,CAAC,KAAK,CAAkC;IAC/C,6DAA6D;IAC7D,OAAO,CAAC,QAAQ,CAAK;IACrB;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAK;IAEnB,4CAA4C;IAC5C,OAAO,CAAC,SAAS,CAAK;IACtB,6DAA6D;IAC7D,OAAO,CAAC,MAAM,CAAK;IACnB,kDAAkD;IAClD,OAAO,CAAC,UAAU,CAAuB;IAEzC,+CAA+C;IAC/C,WAAW,CAAC,UAAU,EAAE,YAAY,GAAG,IAAI;IAS3C;;;;;;;;;;OAUG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IA8B1C;;;;;;;;OAQG;IACH,OAAO,CAAC,iBAAiB;IAezB,OAAO,CAAC,kBAAkB;IAe1B;;;;;;;;OAQG;IACH,OAAO,CAAC,eAAe;IAkBvB;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;IAkB3B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,iBAAiB;IA6BzB;;;;;;;;OAQG;IACH,OAAO,CAAC,gBAAgB;IAsDxB;;;;OAIG;IACH,OAAO,CAAC,4BAA4B;IAYpC;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;IAqB3B;;;;;;OAMG;IACH,GAAG,IAAI,MAAM;CA6BhB;AAoDD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC3B,UAAU,EAAE,WAAW,EACvB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,GACb,MAAM,CAsCR;AAKD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,eAAsB,GAAG,MAAM,CAE1E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/decode.js b/vuetest/node_modules/entities/lib/decode.js new file mode 100644 index 0000000..aa4a42c --- /dev/null +++ b/vuetest/node_modules/entities/lib/decode.js @@ -0,0 +1,536 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decodeXML = exports.decodeHTMLStrict = exports.decodeHTMLAttribute = exports.decodeHTML = exports.determineBranch = exports.EntityDecoder = exports.DecodingMode = exports.BinTrieFlags = exports.fromCodePoint = exports.replaceCodePoint = exports.decodeCodePoint = exports.xmlDecodeTree = exports.htmlDecodeTree = void 0; +var decode_data_html_js_1 = __importDefault(require("./generated/decode-data-html.js")); +exports.htmlDecodeTree = decode_data_html_js_1.default; +var decode_data_xml_js_1 = __importDefault(require("./generated/decode-data-xml.js")); +exports.xmlDecodeTree = decode_data_xml_js_1.default; +var decode_codepoint_js_1 = __importStar(require("./decode_codepoint.js")); +exports.decodeCodePoint = decode_codepoint_js_1.default; +var decode_codepoint_js_2 = require("./decode_codepoint.js"); +Object.defineProperty(exports, "replaceCodePoint", { enumerable: true, get: function () { return decode_codepoint_js_2.replaceCodePoint; } }); +Object.defineProperty(exports, "fromCodePoint", { enumerable: true, get: function () { return decode_codepoint_js_2.fromCodePoint; } }); +var CharCodes; +(function (CharCodes) { + CharCodes[CharCodes["NUM"] = 35] = "NUM"; + CharCodes[CharCodes["SEMI"] = 59] = "SEMI"; + CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS"; + CharCodes[CharCodes["ZERO"] = 48] = "ZERO"; + CharCodes[CharCodes["NINE"] = 57] = "NINE"; + CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A"; + CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F"; + CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X"; + CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z"; + CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A"; + CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F"; + CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z"; +})(CharCodes || (CharCodes = {})); +/** Bit that needs to be set to convert an upper case ASCII character to lower case */ +var TO_LOWER_BIT = 32; +var BinTrieFlags; +(function (BinTrieFlags) { + BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH"; + BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH"; + BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE"; +})(BinTrieFlags = exports.BinTrieFlags || (exports.BinTrieFlags = {})); +function isNumber(code) { + return code >= CharCodes.ZERO && code <= CharCodes.NINE; +} +function isHexadecimalCharacter(code) { + return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) || + (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F)); +} +function isAsciiAlphaNumeric(code) { + return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) || + (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) || + isNumber(code)); +} +/** + * Checks if the given character is a valid end character for an entity in an attribute. + * + * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error. + * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state + */ +function isEntityInAttributeInvalidEnd(code) { + return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code); +} +var EntityDecoderState; +(function (EntityDecoderState) { + EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart"; + EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart"; + EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal"; + EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex"; + EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity"; +})(EntityDecoderState || (EntityDecoderState = {})); +var DecodingMode; +(function (DecodingMode) { + /** Entities in text nodes that can end with any character. */ + DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy"; + /** Only allow entities terminated with a semicolon. */ + DecodingMode[DecodingMode["Strict"] = 1] = "Strict"; + /** Entities in attributes have limitations on ending characters. */ + DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute"; +})(DecodingMode = exports.DecodingMode || (exports.DecodingMode = {})); +/** + * Token decoder with support of writing partial entities. + */ +var EntityDecoder = /** @class */ (function () { + function EntityDecoder( + /** The tree used to decode entities. */ + decodeTree, + /** + * The function that is called when a codepoint is decoded. + * + * For multi-byte named entities, this will be called multiple times, + * with the second codepoint, and the same `consumed` value. + * + * @param codepoint The decoded codepoint. + * @param consumed The number of bytes consumed by the decoder. + */ + emitCodePoint, + /** An object that is used to produce errors. */ + errors) { + this.decodeTree = decodeTree; + this.emitCodePoint = emitCodePoint; + this.errors = errors; + /** The current state of the decoder. */ + this.state = EntityDecoderState.EntityStart; + /** Characters that were consumed while parsing an entity. */ + this.consumed = 1; + /** + * The result of the entity. + * + * Either the result index of a numeric entity, or the codepoint of a + * numeric entity. + */ + this.result = 0; + /** The current index in the decode tree. */ + this.treeIndex = 0; + /** The number of characters that were consumed in excess. */ + this.excess = 1; + /** The mode in which the decoder is operating. */ + this.decodeMode = DecodingMode.Strict; + } + /** Resets the instance to make it reusable. */ + EntityDecoder.prototype.startEntity = function (decodeMode) { + this.decodeMode = decodeMode; + this.state = EntityDecoderState.EntityStart; + this.result = 0; + this.treeIndex = 0; + this.excess = 1; + this.consumed = 1; + }; + /** + * Write an entity to the decoder. This can be called multiple times with partial entities. + * If the entity is incomplete, the decoder will return -1. + * + * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the + * entity is incomplete, and resume when the next string is written. + * + * @param string The string containing the entity (or a continuation of the entity). + * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + EntityDecoder.prototype.write = function (str, offset) { + switch (this.state) { + case EntityDecoderState.EntityStart: { + if (str.charCodeAt(offset) === CharCodes.NUM) { + this.state = EntityDecoderState.NumericStart; + this.consumed += 1; + return this.stateNumericStart(str, offset + 1); + } + this.state = EntityDecoderState.NamedEntity; + return this.stateNamedEntity(str, offset); + } + case EntityDecoderState.NumericStart: { + return this.stateNumericStart(str, offset); + } + case EntityDecoderState.NumericDecimal: { + return this.stateNumericDecimal(str, offset); + } + case EntityDecoderState.NumericHex: { + return this.stateNumericHex(str, offset); + } + case EntityDecoderState.NamedEntity: { + return this.stateNamedEntity(str, offset); + } + } + }; + /** + * Switches between the numeric decimal and hexadecimal states. + * + * Equivalent to the `Numeric character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + EntityDecoder.prototype.stateNumericStart = function (str, offset) { + if (offset >= str.length) { + return -1; + } + if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) { + this.state = EntityDecoderState.NumericHex; + this.consumed += 1; + return this.stateNumericHex(str, offset + 1); + } + this.state = EntityDecoderState.NumericDecimal; + return this.stateNumericDecimal(str, offset); + }; + EntityDecoder.prototype.addToNumericResult = function (str, start, end, base) { + if (start !== end) { + var digitCount = end - start; + this.result = + this.result * Math.pow(base, digitCount) + + parseInt(str.substr(start, digitCount), base); + this.consumed += digitCount; + } + }; + /** + * Parses a hexadecimal numeric entity. + * + * Equivalent to the `Hexademical character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + EntityDecoder.prototype.stateNumericHex = function (str, offset) { + var startIdx = offset; + while (offset < str.length) { + var char = str.charCodeAt(offset); + if (isNumber(char) || isHexadecimalCharacter(char)) { + offset += 1; + } + else { + this.addToNumericResult(str, startIdx, offset, 16); + return this.emitNumericEntity(char, 3); + } + } + this.addToNumericResult(str, startIdx, offset, 16); + return -1; + }; + /** + * Parses a decimal numeric entity. + * + * Equivalent to the `Decimal character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + EntityDecoder.prototype.stateNumericDecimal = function (str, offset) { + var startIdx = offset; + while (offset < str.length) { + var char = str.charCodeAt(offset); + if (isNumber(char)) { + offset += 1; + } + else { + this.addToNumericResult(str, startIdx, offset, 10); + return this.emitNumericEntity(char, 2); + } + } + this.addToNumericResult(str, startIdx, offset, 10); + return -1; + }; + /** + * Validate and emit a numeric entity. + * + * Implements the logic from the `Hexademical character reference start + * state` and `Numeric character reference end state` in the HTML spec. + * + * @param lastCp The last code point of the entity. Used to see if the + * entity was terminated with a semicolon. + * @param expectedLength The minimum number of characters that should be + * consumed. Used to validate that at least one digit + * was consumed. + * @returns The number of characters that were consumed. + */ + EntityDecoder.prototype.emitNumericEntity = function (lastCp, expectedLength) { + var _a; + // Ensure we consumed at least one digit. + if (this.consumed <= expectedLength) { + (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); + return 0; + } + // Figure out if this is a legit end of the entity + if (lastCp === CharCodes.SEMI) { + this.consumed += 1; + } + else if (this.decodeMode === DecodingMode.Strict) { + return 0; + } + this.emitCodePoint((0, decode_codepoint_js_1.replaceCodePoint)(this.result), this.consumed); + if (this.errors) { + if (lastCp !== CharCodes.SEMI) { + this.errors.missingSemicolonAfterCharacterReference(); + } + this.errors.validateNumericCharacterReference(this.result); + } + return this.consumed; + }; + /** + * Parses a named entity. + * + * Equivalent to the `Named character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + EntityDecoder.prototype.stateNamedEntity = function (str, offset) { + var decodeTree = this.decodeTree; + var current = decodeTree[this.treeIndex]; + // The mask is the number of bytes of the value, including the current byte. + var valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; + for (; offset < str.length; offset++, this.excess++) { + var char = str.charCodeAt(offset); + this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); + if (this.treeIndex < 0) { + return this.result === 0 || + // If we are parsing an attribute + (this.decodeMode === DecodingMode.Attribute && + // We shouldn't have consumed any characters after the entity, + (valueLength === 0 || + // And there should be no invalid characters. + isEntityInAttributeInvalidEnd(char))) + ? 0 + : this.emitNotTerminatedNamedEntity(); + } + current = decodeTree[this.treeIndex]; + valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; + // If the branch is a value, store it and continue + if (valueLength !== 0) { + // If the entity is terminated by a semicolon, we are done. + if (char === CharCodes.SEMI) { + return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); + } + // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it. + if (this.decodeMode !== DecodingMode.Strict) { + this.result = this.treeIndex; + this.consumed += this.excess; + this.excess = 0; + } + } + } + return -1; + }; + /** + * Emit a named entity that was not terminated with a semicolon. + * + * @returns The number of characters consumed. + */ + EntityDecoder.prototype.emitNotTerminatedNamedEntity = function () { + var _a; + var _b = this, result = _b.result, decodeTree = _b.decodeTree; + var valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14; + this.emitNamedEntityData(result, valueLength, this.consumed); + (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference(); + return this.consumed; + }; + /** + * Emit a named entity. + * + * @param result The index of the entity in the decode tree. + * @param valueLength The number of bytes in the entity. + * @param consumed The number of characters consumed. + * + * @returns The number of characters consumed. + */ + EntityDecoder.prototype.emitNamedEntityData = function (result, valueLength, consumed) { + var decodeTree = this.decodeTree; + this.emitCodePoint(valueLength === 1 + ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH + : decodeTree[result + 1], consumed); + if (valueLength === 3) { + // For multi-byte values, we need to emit the second byte. + this.emitCodePoint(decodeTree[result + 2], consumed); + } + return consumed; + }; + /** + * Signal to the parser that the end of the input was reached. + * + * Remaining data will be emitted and relevant errors will be produced. + * + * @returns The number of characters consumed. + */ + EntityDecoder.prototype.end = function () { + var _a; + switch (this.state) { + case EntityDecoderState.NamedEntity: { + // Emit a named entity if we have one. + return this.result !== 0 && + (this.decodeMode !== DecodingMode.Attribute || + this.result === this.treeIndex) + ? this.emitNotTerminatedNamedEntity() + : 0; + } + // Otherwise, emit a numeric entity if we have one. + case EntityDecoderState.NumericDecimal: { + return this.emitNumericEntity(0, 2); + } + case EntityDecoderState.NumericHex: { + return this.emitNumericEntity(0, 3); + } + case EntityDecoderState.NumericStart: { + (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); + return 0; + } + case EntityDecoderState.EntityStart: { + // Return 0 if we have no entity. + return 0; + } + } + }; + return EntityDecoder; +}()); +exports.EntityDecoder = EntityDecoder; +/** + * Creates a function that decodes entities in a string. + * + * @param decodeTree The decode tree. + * @returns A function that decodes entities in a string. + */ +function getDecoder(decodeTree) { + var ret = ""; + var decoder = new EntityDecoder(decodeTree, function (str) { return (ret += (0, decode_codepoint_js_1.fromCodePoint)(str)); }); + return function decodeWithTrie(str, decodeMode) { + var lastIndex = 0; + var offset = 0; + while ((offset = str.indexOf("&", offset)) >= 0) { + ret += str.slice(lastIndex, offset); + decoder.startEntity(decodeMode); + var len = decoder.write(str, + // Skip the "&" + offset + 1); + if (len < 0) { + lastIndex = offset + decoder.end(); + break; + } + lastIndex = offset + len; + // If `len` is 0, skip the current `&` and continue. + offset = len === 0 ? lastIndex + 1 : lastIndex; + } + var result = ret + str.slice(lastIndex); + // Make sure we don't keep a reference to the final string. + ret = ""; + return result; + }; +} +/** + * Determines the branch of the current node that is taken given the current + * character. This function is used to traverse the trie. + * + * @param decodeTree The trie. + * @param current The current node. + * @param nodeIdx The index right after the current node and its value. + * @param char The current character. + * @returns The index of the next node, or -1 if no branch is taken. + */ +function determineBranch(decodeTree, current, nodeIdx, char) { + var branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; + var jumpOffset = current & BinTrieFlags.JUMP_TABLE; + // Case 1: Single branch encoded in jump offset + if (branchCount === 0) { + return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1; + } + // Case 2: Multiple branches encoded in jump table + if (jumpOffset) { + var value = char - jumpOffset; + return value < 0 || value >= branchCount + ? -1 + : decodeTree[nodeIdx + value] - 1; + } + // Case 3: Multiple branches encoded in dictionary + // Binary search for the character. + var lo = nodeIdx; + var hi = lo + branchCount - 1; + while (lo <= hi) { + var mid = (lo + hi) >>> 1; + var midVal = decodeTree[mid]; + if (midVal < char) { + lo = mid + 1; + } + else if (midVal > char) { + hi = mid - 1; + } + else { + return decodeTree[mid + branchCount]; + } + } + return -1; +} +exports.determineBranch = determineBranch; +var htmlDecoder = getDecoder(decode_data_html_js_1.default); +var xmlDecoder = getDecoder(decode_data_xml_js_1.default); +/** + * Decodes an HTML string. + * + * @param str The string to decode. + * @param mode The decoding mode. + * @returns The decoded string. + */ +function decodeHTML(str, mode) { + if (mode === void 0) { mode = DecodingMode.Legacy; } + return htmlDecoder(str, mode); +} +exports.decodeHTML = decodeHTML; +/** + * Decodes an HTML string in an attribute. + * + * @param str The string to decode. + * @returns The decoded string. + */ +function decodeHTMLAttribute(str) { + return htmlDecoder(str, DecodingMode.Attribute); +} +exports.decodeHTMLAttribute = decodeHTMLAttribute; +/** + * Decodes an HTML string, requiring all entities to be terminated by a semicolon. + * + * @param str The string to decode. + * @returns The decoded string. + */ +function decodeHTMLStrict(str) { + return htmlDecoder(str, DecodingMode.Strict); +} +exports.decodeHTMLStrict = decodeHTMLStrict; +/** + * Decodes an XML string, requiring all entities to be terminated by a semicolon. + * + * @param str The string to decode. + * @returns The decoded string. + */ +function decodeXML(str) { + return xmlDecoder(str, DecodingMode.Strict); +} +exports.decodeXML = decodeXML; +//# sourceMappingURL=decode.js.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/decode.js.map b/vuetest/node_modules/entities/lib/decode.js.map new file mode 100644 index 0000000..afcad7e --- /dev/null +++ b/vuetest/node_modules/entities/lib/decode.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decode.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wFAA6D;AAQpD,yBARF,6BAAc,CAQE;AAPvB,sFAA2D;AAOlC,wBAPlB,4BAAa,CAOkB;AANtC,2EAG+B;AAGS,0BANjC,6BAAe,CAMiC;AACvD,6DAAwE;AAA/D,uHAAA,gBAAgB,OAAA;AAAE,oHAAA,aAAa,OAAA;AAExC,IAAW,SAaV;AAbD,WAAW,SAAS;IAChB,wCAAQ,CAAA;IACR,0CAAS,CAAA;IACT,8CAAW,CAAA;IACX,0CAAS,CAAA;IACT,0CAAS,CAAA;IACT,gDAAY,CAAA;IACZ,iDAAa,CAAA;IACb,iDAAa,CAAA;IACb,iDAAa,CAAA;IACb,gDAAY,CAAA;IACZ,gDAAY,CAAA;IACZ,gDAAY,CAAA;AAChB,CAAC,EAbU,SAAS,KAAT,SAAS,QAanB;AAED,sFAAsF;AACtF,IAAM,YAAY,GAAG,EAAQ,CAAC;AAE9B,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,mEAAoC,CAAA;IACpC,qEAAqC,CAAA;IACrC,6DAAkC,CAAA;AACtC,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB;AAED,SAAS,QAAQ,CAAC,IAAY;IAC1B,OAAO,IAAI,IAAI,SAAS,CAAC,IAAI,IAAI,IAAI,IAAI,SAAS,CAAC,IAAI,CAAC;AAC5D,CAAC;AAED,SAAS,sBAAsB,CAAC,IAAY;IACxC,OAAO,CACH,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC;QACxD,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC,CAC3D,CAAC;AACN,CAAC;AAED,SAAS,mBAAmB,CAAC,IAAY;IACrC,OAAO,CACH,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC;QACxD,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC;QACxD,QAAQ,CAAC,IAAI,CAAC,CACjB,CAAC;AACN,CAAC;AAED;;;;;GAKG;AACH,SAAS,6BAA6B,CAAC,IAAY;IAC/C,OAAO,IAAI,KAAK,SAAS,CAAC,MAAM,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;AAClE,CAAC;AAED,IAAW,kBAMV;AAND,WAAW,kBAAkB;IACzB,yEAAW,CAAA;IACX,2EAAY,CAAA;IACZ,+EAAc,CAAA;IACd,uEAAU,CAAA;IACV,yEAAW,CAAA;AACf,CAAC,EANU,kBAAkB,KAAlB,kBAAkB,QAM5B;AAED,IAAY,YAOX;AAPD,WAAY,YAAY;IACpB,8DAA8D;IAC9D,mDAAU,CAAA;IACV,uDAAuD;IACvD,mDAAU,CAAA;IACV,oEAAoE;IACpE,yDAAa,CAAA;AACjB,CAAC,EAPW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAOvB;AAaD;;GAEG;AACH;IACI;IACI,wCAAwC;IACvB,UAAuB;IACxC;;;;;;;;OAQG;IACc,aAAqD;IACtE,gDAAgD;IAC/B,MAA4B;QAZ5B,eAAU,GAAV,UAAU,CAAa;QAUvB,kBAAa,GAAb,aAAa,CAAwC;QAErD,WAAM,GAAN,MAAM,CAAsB;QAGjD,wCAAwC;QAChC,UAAK,GAAG,kBAAkB,CAAC,WAAW,CAAC;QAC/C,6DAA6D;QACrD,aAAQ,GAAG,CAAC,CAAC;QACrB;;;;;WAKG;QACK,WAAM,GAAG,CAAC,CAAC;QAEnB,4CAA4C;QACpC,cAAS,GAAG,CAAC,CAAC;QACtB,6DAA6D;QACrD,WAAM,GAAG,CAAC,CAAC;QACnB,kDAAkD;QAC1C,eAAU,GAAG,YAAY,CAAC,MAAM,CAAC;IAnBtC,CAAC;IAqBJ,+CAA+C;IAC/C,mCAAW,GAAX,UAAY,UAAwB;QAChC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,WAAW,CAAC;QAC5C,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;IACtB,CAAC;IAED;;;;;;;;;;OAUG;IACH,6BAAK,GAAL,UAAM,GAAW,EAAE,MAAc;QAC7B,QAAQ,IAAI,CAAC,KAAK,EAAE;YAChB,KAAK,kBAAkB,CAAC,WAAW,CAAC,CAAC;gBACjC,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,SAAS,CAAC,GAAG,EAAE;oBAC1C,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,YAAY,CAAC;oBAC7C,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;oBACnB,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;iBAClD;gBACD,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,WAAW,CAAC;gBAC5C,OAAO,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC7C;YAED,KAAK,kBAAkB,CAAC,YAAY,CAAC,CAAC;gBAClC,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC9C;YAED,KAAK,kBAAkB,CAAC,cAAc,CAAC,CAAC;gBACpC,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAChD;YAED,KAAK,kBAAkB,CAAC,UAAU,CAAC,CAAC;gBAChC,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC5C;YAED,KAAK,kBAAkB,CAAC,WAAW,CAAC,CAAC;gBACjC,OAAO,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC7C;SACJ;IACL,CAAC;IAED;;;;;;;;OAQG;IACK,yCAAiB,GAAzB,UAA0B,GAAW,EAAE,MAAc;QACjD,IAAI,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE;YACtB,OAAO,CAAC,CAAC,CAAC;SACb;QAED,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,KAAK,SAAS,CAAC,OAAO,EAAE;YAC/D,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,UAAU,CAAC;YAC3C,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;YACnB,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;SAChD;QAED,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,cAAc,CAAC;QAC/C,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;IAEO,0CAAkB,GAA1B,UACI,GAAW,EACX,KAAa,EACb,GAAW,EACX,IAAY;QAEZ,IAAI,KAAK,KAAK,GAAG,EAAE;YACf,IAAM,UAAU,GAAG,GAAG,GAAG,KAAK,CAAC;YAC/B,IAAI,CAAC,MAAM;gBACP,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC;oBACxC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,CAAC;YAClD,IAAI,CAAC,QAAQ,IAAI,UAAU,CAAC;SAC/B;IACL,CAAC;IAED;;;;;;;;OAQG;IACK,uCAAe,GAAvB,UAAwB,GAAW,EAAE,MAAc;QAC/C,IAAM,QAAQ,GAAG,MAAM,CAAC;QAExB,OAAO,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE;YACxB,IAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACpC,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,sBAAsB,CAAC,IAAI,CAAC,EAAE;gBAChD,MAAM,IAAI,CAAC,CAAC;aACf;iBAAM;gBACH,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;gBACnD,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;aAC1C;SACJ;QAED,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QAEnD,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED;;;;;;;;OAQG;IACK,2CAAmB,GAA3B,UAA4B,GAAW,EAAE,MAAc;QACnD,IAAM,QAAQ,GAAG,MAAM,CAAC;QAExB,OAAO,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE;YACxB,IAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACpC,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE;gBAChB,MAAM,IAAI,CAAC,CAAC;aACf;iBAAM;gBACH,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;gBACnD,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;aAC1C;SACJ;QAED,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QAEnD,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;OAYG;IACK,yCAAiB,GAAzB,UAA0B,MAAc,EAAE,cAAsB;;QAC5D,yCAAyC;QACzC,IAAI,IAAI,CAAC,QAAQ,IAAI,cAAc,EAAE;YACjC,MAAA,IAAI,CAAC,MAAM,0CAAE,0CAA0C,CACnD,IAAI,CAAC,QAAQ,CAChB,CAAC;YACF,OAAO,CAAC,CAAC;SACZ;QAED,kDAAkD;QAClD,IAAI,MAAM,KAAK,SAAS,CAAC,IAAI,EAAE;YAC3B,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;SACtB;aAAM,IAAI,IAAI,CAAC,UAAU,KAAK,YAAY,CAAC,MAAM,EAAE;YAChD,OAAO,CAAC,CAAC;SACZ;QAED,IAAI,CAAC,aAAa,CAAC,IAAA,sCAAgB,EAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEjE,IAAI,IAAI,CAAC,MAAM,EAAE;YACb,IAAI,MAAM,KAAK,SAAS,CAAC,IAAI,EAAE;gBAC3B,IAAI,CAAC,MAAM,CAAC,uCAAuC,EAAE,CAAC;aACzD;YAED,IAAI,CAAC,MAAM,CAAC,iCAAiC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAC9D;QAED,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;;;;;;;OAQG;IACK,wCAAgB,GAAxB,UAAyB,GAAW,EAAE,MAAc;QACxC,IAAA,UAAU,GAAK,IAAI,WAAT,CAAU;QAC5B,IAAI,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACzC,4EAA4E;QAC5E,IAAI,WAAW,GAAG,CAAC,OAAO,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QAE9D,OAAO,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE;YACjD,IAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YAEpC,IAAI,CAAC,SAAS,GAAG,eAAe,CAC5B,UAAU,EACV,OAAO,EACP,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,EACzC,IAAI,CACP,CAAC;YAEF,IAAI,IAAI,CAAC,SAAS,GAAG,CAAC,EAAE;gBACpB,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC;oBACpB,iCAAiC;oBACjC,CAAC,IAAI,CAAC,UAAU,KAAK,YAAY,CAAC,SAAS;wBACvC,8DAA8D;wBAC9D,CAAC,WAAW,KAAK,CAAC;4BACd,6CAA6C;4BAC7C,6BAA6B,CAAC,IAAI,CAAC,CAAC,CAAC;oBAC7C,CAAC,CAAC,CAAC;oBACH,CAAC,CAAC,IAAI,CAAC,4BAA4B,EAAE,CAAC;aAC7C;YAED,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACrC,WAAW,GAAG,CAAC,OAAO,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;YAE1D,kDAAkD;YAClD,IAAI,WAAW,KAAK,CAAC,EAAE;gBACnB,2DAA2D;gBAC3D,IAAI,IAAI,KAAK,SAAS,CAAC,IAAI,EAAE;oBACzB,OAAO,IAAI,CAAC,mBAAmB,CAC3B,IAAI,CAAC,SAAS,EACd,WAAW,EACX,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAC9B,CAAC;iBACL;gBAED,2FAA2F;gBAC3F,IAAI,IAAI,CAAC,UAAU,KAAK,YAAY,CAAC,MAAM,EAAE;oBACzC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC;oBAC7B,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC;oBAC7B,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;iBACnB;aACJ;SACJ;QAED,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED;;;;OAIG;IACK,oDAA4B,GAApC;;QACU,IAAA,KAAyB,IAAI,EAA3B,MAAM,YAAA,EAAE,UAAU,gBAAS,CAAC;QAEpC,IAAM,WAAW,GACb,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QAE3D,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7D,MAAA,IAAI,CAAC,MAAM,0CAAE,uCAAuC,EAAE,CAAC;QAEvD,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;;;;;;;OAQG;IACK,2CAAmB,GAA3B,UACI,MAAc,EACd,WAAmB,EACnB,QAAgB;QAER,IAAA,UAAU,GAAK,IAAI,WAAT,CAAU;QAE5B,IAAI,CAAC,aAAa,CACd,WAAW,KAAK,CAAC;YACb,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,YAAY;YACjD,CAAC,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,EAC5B,QAAQ,CACX,CAAC;QACF,IAAI,WAAW,KAAK,CAAC,EAAE;YACnB,0DAA0D;YAC1D,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;SACxD;QAED,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED;;;;;;OAMG;IACH,2BAAG,GAAH;;QACI,QAAQ,IAAI,CAAC,KAAK,EAAE;YAChB,KAAK,kBAAkB,CAAC,WAAW,CAAC,CAAC;gBACjC,sCAAsC;gBACtC,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC;oBACpB,CAAC,IAAI,CAAC,UAAU,KAAK,YAAY,CAAC,SAAS;wBACvC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,SAAS,CAAC;oBACnC,CAAC,CAAC,IAAI,CAAC,4BAA4B,EAAE;oBACrC,CAAC,CAAC,CAAC,CAAC;aACX;YACD,mDAAmD;YACnD,KAAK,kBAAkB,CAAC,cAAc,CAAC,CAAC;gBACpC,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aACvC;YACD,KAAK,kBAAkB,CAAC,UAAU,CAAC,CAAC;gBAChC,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aACvC;YACD,KAAK,kBAAkB,CAAC,YAAY,CAAC,CAAC;gBAClC,MAAA,IAAI,CAAC,MAAM,0CAAE,0CAA0C,CACnD,IAAI,CAAC,QAAQ,CAChB,CAAC;gBACF,OAAO,CAAC,CAAC;aACZ;YACD,KAAK,kBAAkB,CAAC,WAAW,CAAC,CAAC;gBACjC,iCAAiC;gBACjC,OAAO,CAAC,CAAC;aACZ;SACJ;IACL,CAAC;IACL,oBAAC;AAAD,CAAC,AAjXD,IAiXC;AAjXY,sCAAa;AAmX1B;;;;;GAKG;AACH,SAAS,UAAU,CAAC,UAAuB;IACvC,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAM,OAAO,GAAG,IAAI,aAAa,CAC7B,UAAU,EACV,UAAC,GAAG,IAAK,OAAA,CAAC,GAAG,IAAI,IAAA,mCAAa,EAAC,GAAG,CAAC,CAAC,EAA3B,CAA2B,CACvC,CAAC;IAEF,OAAO,SAAS,cAAc,CAC1B,GAAW,EACX,UAAwB;QAExB,IAAI,SAAS,GAAG,CAAC,CAAC;QAClB,IAAI,MAAM,GAAG,CAAC,CAAC;QAEf,OAAO,CAAC,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE;YAC7C,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YAEpC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YAEhC,IAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CACrB,GAAG;YACH,eAAe;YACf,MAAM,GAAG,CAAC,CACb,CAAC;YAEF,IAAI,GAAG,GAAG,CAAC,EAAE;gBACT,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;gBACnC,MAAM;aACT;YAED,SAAS,GAAG,MAAM,GAAG,GAAG,CAAC;YACzB,oDAAoD;YACpD,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;SAClD;QAED,IAAM,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAE1C,2DAA2D;QAC3D,GAAG,GAAG,EAAE,CAAC;QAET,OAAO,MAAM,CAAC;IAClB,CAAC,CAAC;AACN,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,eAAe,CAC3B,UAAuB,EACvB,OAAe,EACf,OAAe,EACf,IAAY;IAEZ,IAAM,WAAW,GAAG,CAAC,OAAO,GAAG,YAAY,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAChE,IAAM,UAAU,GAAG,OAAO,GAAG,YAAY,CAAC,UAAU,CAAC;IAErD,+CAA+C;IAC/C,IAAI,WAAW,KAAK,CAAC,EAAE;QACnB,OAAO,UAAU,KAAK,CAAC,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACjE;IAED,kDAAkD;IAClD,IAAI,UAAU,EAAE;QACZ,IAAM,KAAK,GAAG,IAAI,GAAG,UAAU,CAAC;QAEhC,OAAO,KAAK,GAAG,CAAC,IAAI,KAAK,IAAI,WAAW;YACpC,CAAC,CAAC,CAAC,CAAC;YACJ,CAAC,CAAC,UAAU,CAAC,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;KACzC;IAED,kDAAkD;IAElD,mCAAmC;IACnC,IAAI,EAAE,GAAG,OAAO,CAAC;IACjB,IAAI,EAAE,GAAG,EAAE,GAAG,WAAW,GAAG,CAAC,CAAC;IAE9B,OAAO,EAAE,IAAI,EAAE,EAAE;QACb,IAAM,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;QAC5B,IAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;QAE/B,IAAI,MAAM,GAAG,IAAI,EAAE;YACf,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;SAChB;aAAM,IAAI,MAAM,GAAG,IAAI,EAAE;YACtB,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;SAChB;aAAM;YACH,OAAO,UAAU,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC;SACxC;KACJ;IAED,OAAO,CAAC,CAAC,CAAC;AACd,CAAC;AA3CD,0CA2CC;AAED,IAAM,WAAW,GAAG,UAAU,CAAC,6BAAc,CAAC,CAAC;AAC/C,IAAM,UAAU,GAAG,UAAU,CAAC,4BAAa,CAAC,CAAC;AAE7C;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,GAAW,EAAE,IAA0B;IAA1B,qBAAA,EAAA,OAAO,YAAY,CAAC,MAAM;IAC9D,OAAO,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAFD,gCAEC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,GAAW;IAC3C,OAAO,WAAW,CAAC,GAAG,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;AACpD,CAAC;AAFD,kDAEC;AAED;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,GAAW;IACxC,OAAO,WAAW,CAAC,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;AACjD,CAAC;AAFD,4CAEC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,GAAW;IACjC,OAAO,UAAU,CAAC,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAFD,8BAEC"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/decode_codepoint.d.ts b/vuetest/node_modules/entities/lib/decode_codepoint.d.ts new file mode 100644 index 0000000..84ae206 --- /dev/null +++ b/vuetest/node_modules/entities/lib/decode_codepoint.d.ts @@ -0,0 +1,19 @@ +/** + * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. + */ +export declare const fromCodePoint: (...codePoints: number[]) => string; +/** + * Replace the given code point with a replacement character if it is a + * surrogate or is outside the valid range. Otherwise return the code + * point unchanged. + */ +export declare function replaceCodePoint(codePoint: number): number; +/** + * Replace the code point if relevant, then convert it to a string. + * + * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead. + * @param codePoint The code point to decode. + * @returns The decoded code point. + */ +export default function decodeCodePoint(codePoint: number): string; +//# sourceMappingURL=decode_codepoint.d.ts.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/decode_codepoint.d.ts.map b/vuetest/node_modules/entities/lib/decode_codepoint.d.ts.map new file mode 100644 index 0000000..38a8dea --- /dev/null +++ b/vuetest/node_modules/entities/lib/decode_codepoint.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decode_codepoint.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode_codepoint.ts"],"names":[],"mappings":"AAkCA;;GAEG;AACH,eAAO,MAAM,aAAa,qCAgBrB,CAAC;AAEN;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,UAMjD;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEjE"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/decode_codepoint.js b/vuetest/node_modules/entities/lib/decode_codepoint.js new file mode 100644 index 0000000..1205346 --- /dev/null +++ b/vuetest/node_modules/entities/lib/decode_codepoint.js @@ -0,0 +1,76 @@ +"use strict"; +// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134 +var _a; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.replaceCodePoint = exports.fromCodePoint = void 0; +var decodeMap = new Map([ + [0, 65533], + // C1 Unicode control character reference replacements + [128, 8364], + [130, 8218], + [131, 402], + [132, 8222], + [133, 8230], + [134, 8224], + [135, 8225], + [136, 710], + [137, 8240], + [138, 352], + [139, 8249], + [140, 338], + [142, 381], + [145, 8216], + [146, 8217], + [147, 8220], + [148, 8221], + [149, 8226], + [150, 8211], + [151, 8212], + [152, 732], + [153, 8482], + [154, 353], + [155, 8250], + [156, 339], + [158, 382], + [159, 376], +]); +/** + * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. + */ +exports.fromCodePoint = +// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins +(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function (codePoint) { + var output = ""; + if (codePoint > 0xffff) { + codePoint -= 0x10000; + output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800); + codePoint = 0xdc00 | (codePoint & 0x3ff); + } + output += String.fromCharCode(codePoint); + return output; +}; +/** + * Replace the given code point with a replacement character if it is a + * surrogate or is outside the valid range. Otherwise return the code + * point unchanged. + */ +function replaceCodePoint(codePoint) { + var _a; + if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) { + return 0xfffd; + } + return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint; +} +exports.replaceCodePoint = replaceCodePoint; +/** + * Replace the code point if relevant, then convert it to a string. + * + * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead. + * @param codePoint The code point to decode. + * @returns The decoded code point. + */ +function decodeCodePoint(codePoint) { + return (0, exports.fromCodePoint)(replaceCodePoint(codePoint)); +} +exports.default = decodeCodePoint; +//# sourceMappingURL=decode_codepoint.js.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/decode_codepoint.js.map b/vuetest/node_modules/entities/lib/decode_codepoint.js.map new file mode 100644 index 0000000..2747865 --- /dev/null +++ b/vuetest/node_modules/entities/lib/decode_codepoint.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decode_codepoint.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode_codepoint.ts"],"names":[],"mappings":";AAAA,qHAAqH;;;;AAErH,IAAM,SAAS,GAAG,IAAI,GAAG,CAAC;IACtB,CAAC,CAAC,EAAE,KAAK,CAAC;IACV,sDAAsD;IACtD,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;CACb,CAAC,CAAC;AAEH;;GAEG;AACU,QAAA,aAAa;AACtB,iHAAiH;AACjH,MAAA,MAAM,CAAC,aAAa,mCACpB,UAAU,SAAiB;IACvB,IAAI,MAAM,GAAG,EAAE,CAAC;IAEhB,IAAI,SAAS,GAAG,MAAM,EAAE;QACpB,SAAS,IAAI,OAAO,CAAC;QACrB,MAAM,IAAI,MAAM,CAAC,YAAY,CACzB,CAAC,CAAC,SAAS,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CACxC,CAAC;QACF,SAAS,GAAG,MAAM,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC;KAC5C;IAED,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IACzC,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAEN;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,SAAiB;;IAC9C,IAAI,CAAC,SAAS,IAAI,MAAM,IAAI,SAAS,IAAI,MAAM,CAAC,IAAI,SAAS,GAAG,QAAQ,EAAE;QACtE,OAAO,MAAM,CAAC;KACjB;IAED,OAAO,MAAA,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,mCAAI,SAAS,CAAC;AACjD,CAAC;AAND,4CAMC;AAED;;;;;;GAMG;AACH,SAAwB,eAAe,CAAC,SAAiB;IACrD,OAAO,IAAA,qBAAa,EAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;AACtD,CAAC;AAFD,kCAEC"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/encode.d.ts b/vuetest/node_modules/entities/lib/encode.d.ts new file mode 100644 index 0000000..f09c4ee --- /dev/null +++ b/vuetest/node_modules/entities/lib/encode.d.ts @@ -0,0 +1,22 @@ +/** + * Encodes all characters in the input using HTML entities. This includes + * characters that are valid ASCII characters in HTML documents, such as `#`. + * + * To get a more compact output, consider using the `encodeNonAsciiHTML` + * function, which will only encode characters that are not valid in HTML + * documents, as well as non-ASCII characters. + * + * If a character has no equivalent entity, a numeric hexadecimal reference + * (eg. `ü`) will be used. + */ +export declare function encodeHTML(data: string): string; +/** + * Encodes all non-ASCII characters, as well as characters not valid in HTML + * documents using HTML entities. This function will not encode characters that + * are valid in HTML documents, such as `#`. + * + * If a character has no equivalent entity, a numeric hexadecimal reference + * (eg. `ü`) will be used. + */ +export declare function encodeNonAsciiHTML(data: string): string; +//# sourceMappingURL=encode.d.ts.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/encode.d.ts.map b/vuetest/node_modules/entities/lib/encode.d.ts.map new file mode 100644 index 0000000..e24c05b --- /dev/null +++ b/vuetest/node_modules/entities/lib/encode.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"encode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AACD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/encode.js b/vuetest/node_modules/entities/lib/encode.js new file mode 100644 index 0000000..4786a03 --- /dev/null +++ b/vuetest/node_modules/entities/lib/encode.js @@ -0,0 +1,77 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.encodeNonAsciiHTML = exports.encodeHTML = void 0; +var encode_html_js_1 = __importDefault(require("./generated/encode-html.js")); +var escape_js_1 = require("./escape.js"); +var htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g; +/** + * Encodes all characters in the input using HTML entities. This includes + * characters that are valid ASCII characters in HTML documents, such as `#`. + * + * To get a more compact output, consider using the `encodeNonAsciiHTML` + * function, which will only encode characters that are not valid in HTML + * documents, as well as non-ASCII characters. + * + * If a character has no equivalent entity, a numeric hexadecimal reference + * (eg. `ü`) will be used. + */ +function encodeHTML(data) { + return encodeHTMLTrieRe(htmlReplacer, data); +} +exports.encodeHTML = encodeHTML; +/** + * Encodes all non-ASCII characters, as well as characters not valid in HTML + * documents using HTML entities. This function will not encode characters that + * are valid in HTML documents, such as `#`. + * + * If a character has no equivalent entity, a numeric hexadecimal reference + * (eg. `ü`) will be used. + */ +function encodeNonAsciiHTML(data) { + return encodeHTMLTrieRe(escape_js_1.xmlReplacer, data); +} +exports.encodeNonAsciiHTML = encodeNonAsciiHTML; +function encodeHTMLTrieRe(regExp, str) { + var ret = ""; + var lastIdx = 0; + var match; + while ((match = regExp.exec(str)) !== null) { + var i = match.index; + ret += str.substring(lastIdx, i); + var char = str.charCodeAt(i); + var next = encode_html_js_1.default.get(char); + if (typeof next === "object") { + // We are in a branch. Try to match the next char. + if (i + 1 < str.length) { + var nextChar = str.charCodeAt(i + 1); + var value = typeof next.n === "number" + ? next.n === nextChar + ? next.o + : undefined + : next.n.get(nextChar); + if (value !== undefined) { + ret += value; + lastIdx = regExp.lastIndex += 1; + continue; + } + } + next = next.v; + } + // We might have a tree node without a value; skip and use a numeric entity. + if (next !== undefined) { + ret += next; + lastIdx = i + 1; + } + else { + var cp = (0, escape_js_1.getCodePoint)(str, i); + ret += "&#x".concat(cp.toString(16), ";"); + // Increase by 1 if we have a surrogate pair + lastIdx = regExp.lastIndex += Number(cp !== char); + } + } + return ret + str.substr(lastIdx); +} +//# sourceMappingURL=encode.js.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/encode.js.map b/vuetest/node_modules/entities/lib/encode.js.map new file mode 100644 index 0000000..9d47162 --- /dev/null +++ b/vuetest/node_modules/entities/lib/encode.js.map @@ -0,0 +1 @@ +{"version":3,"file":"encode.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":";;;;;;AAAA,8EAAkD;AAClD,yCAAwD;AAExD,IAAM,YAAY,GAAG,qCAAqC,CAAC;AAE3D;;;;;;;;;;GAUG;AACH,SAAgB,UAAU,CAAC,IAAY;IACnC,OAAO,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC;AAFD,gCAEC;AACD;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAAC,IAAY;IAC3C,OAAO,gBAAgB,CAAC,uBAAW,EAAE,IAAI,CAAC,CAAC;AAC/C,CAAC;AAFD,gDAEC;AAED,SAAS,gBAAgB,CAAC,MAAc,EAAE,GAAW;IACjD,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,KAAK,CAAC;IAEV,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE;QACxC,IAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;QACtB,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACjC,IAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC/B,IAAI,IAAI,GAAG,wBAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAE9B,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC1B,kDAAkD;YAClD,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE;gBACpB,IAAM,QAAQ,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBACvC,IAAM,KAAK,GACP,OAAO,IAAI,CAAC,CAAC,KAAK,QAAQ;oBACtB,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,QAAQ;wBACjB,CAAC,CAAC,IAAI,CAAC,CAAC;wBACR,CAAC,CAAC,SAAS;oBACf,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;gBAE/B,IAAI,KAAK,KAAK,SAAS,EAAE;oBACrB,GAAG,IAAI,KAAK,CAAC;oBACb,OAAO,GAAG,MAAM,CAAC,SAAS,IAAI,CAAC,CAAC;oBAChC,SAAS;iBACZ;aACJ;YAED,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC;SACjB;QAED,4EAA4E;QAC5E,IAAI,IAAI,KAAK,SAAS,EAAE;YACpB,GAAG,IAAI,IAAI,CAAC;YACZ,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;SACnB;aAAM;YACH,IAAM,EAAE,GAAG,IAAA,wBAAY,EAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YAChC,GAAG,IAAI,aAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAG,CAAC;YAChC,4CAA4C;YAC5C,OAAO,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC;SACrD;KACJ;IAED,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/escape.d.ts b/vuetest/node_modules/entities/lib/escape.d.ts new file mode 100644 index 0000000..c07ecdc --- /dev/null +++ b/vuetest/node_modules/entities/lib/escape.d.ts @@ -0,0 +1,43 @@ +export declare const xmlReplacer: RegExp; +export declare const getCodePoint: (str: string, index: number) => number; +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using XML entities. + * + * If a character has no equivalent entity, a + * numeric hexadecimal reference (eg. `ü`) will be used. + */ +export declare function encodeXML(str: string): string; +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using numeric hexadecimal reference (eg. `ü`). + * + * Have a look at `escapeUTF8` if you want a more concise output at the expense + * of reduced transportability. + * + * @param data String to escape. + */ +export declare const escape: typeof encodeXML; +/** + * Encodes all characters not valid in XML documents using XML entities. + * + * Note that the output will be character-set dependent. + * + * @param data String to escape. + */ +export declare const escapeUTF8: (data: string) => string; +/** + * Encodes all characters that have to be escaped in HTML attributes, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + * + * @param data String to escape. + */ +export declare const escapeAttribute: (data: string) => string; +/** + * Encodes all characters that have to be escaped in HTML text, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + * + * @param data String to escape. + */ +export declare const escapeText: (data: string) => string; +//# sourceMappingURL=escape.d.ts.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/escape.d.ts.map b/vuetest/node_modules/entities/lib/escape.d.ts.map new file mode 100644 index 0000000..fa19825 --- /dev/null +++ b/vuetest/node_modules/entities/lib/escape.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"escape.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QAAyB,CAAC;AAWlD,eAAO,MAAM,YAAY,QAGT,MAAM,SAAS,MAAM,KAAG,MAQD,CAAC;AAExC;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA0B7C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,kBAAY,CAAC;AAqChC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,SA7Bb,MAAM,KAAK,MA6BuC,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,eAAe,SArClB,MAAM,KAAK,MA4CpB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,SApDb,MAAM,KAAK,MA4DpB,CAAC"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/escape.js b/vuetest/node_modules/entities/lib/escape.js new file mode 100644 index 0000000..9f36272 --- /dev/null +++ b/vuetest/node_modules/entities/lib/escape.js @@ -0,0 +1,122 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.getCodePoint = exports.xmlReplacer = void 0; +exports.xmlReplacer = /["&'<>$\x80-\uFFFF]/g; +var xmlCodeMap = new Map([ + [34, """], + [38, "&"], + [39, "'"], + [60, "<"], + [62, ">"], +]); +// For compatibility with node < 4, we wrap `codePointAt` +exports.getCodePoint = +// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition +String.prototype.codePointAt != null + ? function (str, index) { return str.codePointAt(index); } + : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + function (c, index) { + return (c.charCodeAt(index) & 0xfc00) === 0xd800 + ? (c.charCodeAt(index) - 0xd800) * 0x400 + + c.charCodeAt(index + 1) - + 0xdc00 + + 0x10000 + : c.charCodeAt(index); + }; +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using XML entities. + * + * If a character has no equivalent entity, a + * numeric hexadecimal reference (eg. `ü`) will be used. + */ +function encodeXML(str) { + var ret = ""; + var lastIdx = 0; + var match; + while ((match = exports.xmlReplacer.exec(str)) !== null) { + var i = match.index; + var char = str.charCodeAt(i); + var next = xmlCodeMap.get(char); + if (next !== undefined) { + ret += str.substring(lastIdx, i) + next; + lastIdx = i + 1; + } + else { + ret += "".concat(str.substring(lastIdx, i), "&#x").concat((0, exports.getCodePoint)(str, i).toString(16), ";"); + // Increase by 1 if we have a surrogate pair + lastIdx = exports.xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800); + } + } + return ret + str.substr(lastIdx); +} +exports.encodeXML = encodeXML; +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using numeric hexadecimal reference (eg. `ü`). + * + * Have a look at `escapeUTF8` if you want a more concise output at the expense + * of reduced transportability. + * + * @param data String to escape. + */ +exports.escape = encodeXML; +/** + * Creates a function that escapes all characters matched by the given regular + * expression using the given map of characters to escape to their entities. + * + * @param regex Regular expression to match characters to escape. + * @param map Map of characters to escape to their entities. + * + * @returns Function that escapes all characters matched by the given regular + * expression using the given map of characters to escape to their entities. + */ +function getEscaper(regex, map) { + return function escape(data) { + var match; + var lastIdx = 0; + var result = ""; + while ((match = regex.exec(data))) { + if (lastIdx !== match.index) { + result += data.substring(lastIdx, match.index); + } + // We know that this character will be in the map. + result += map.get(match[0].charCodeAt(0)); + // Every match will be of length 1 + lastIdx = match.index + 1; + } + return result + data.substring(lastIdx); + }; +} +/** + * Encodes all characters not valid in XML documents using XML entities. + * + * Note that the output will be character-set dependent. + * + * @param data String to escape. + */ +exports.escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap); +/** + * Encodes all characters that have to be escaped in HTML attributes, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + * + * @param data String to escape. + */ +exports.escapeAttribute = getEscaper(/["&\u00A0]/g, new Map([ + [34, """], + [38, "&"], + [160, " "], +])); +/** + * Encodes all characters that have to be escaped in HTML text, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + * + * @param data String to escape. + */ +exports.escapeText = getEscaper(/[&<>\u00A0]/g, new Map([ + [38, "&"], + [60, "<"], + [62, ">"], + [160, " "], +])); +//# sourceMappingURL=escape.js.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/escape.js.map b/vuetest/node_modules/entities/lib/escape.js.map new file mode 100644 index 0000000..f96d022 --- /dev/null +++ b/vuetest/node_modules/entities/lib/escape.js.map @@ -0,0 +1 @@ +{"version":3,"file":"escape.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,sBAAsB,CAAC;AAElD,IAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACvB,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,yDAAyD;AAC5C,QAAA,YAAY;AACrB,uEAAuE;AACvE,MAAM,CAAC,SAAS,CAAC,WAAW,IAAI,IAAI;IAChC,CAAC,CAAC,UAAC,GAAW,EAAE,KAAa,IAAa,OAAA,GAAG,CAAC,WAAW,CAAC,KAAK,CAAE,EAAvB,CAAuB;IACjE,CAAC,CAAC,uEAAuE;QACvE,UAAC,CAAS,EAAE,KAAa;YACrB,OAAA,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,MAAM;gBACrC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,KAAK;oBACtC,CAAC,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC,CAAC;oBACvB,MAAM;oBACN,OAAO;gBACT,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC;QALzB,CAKyB,CAAC;AAExC;;;;;;GAMG;AACH,SAAgB,SAAS,CAAC,GAAW;IACjC,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,KAAK,CAAC;IAEV,OAAO,CAAC,KAAK,GAAG,mBAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE;QAC7C,IAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;QACtB,IAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC/B,IAAM,IAAI,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAElC,IAAI,IAAI,KAAK,SAAS,EAAE;YACpB,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;YACxC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;SACnB;aAAM;YACH,GAAG,IAAI,UAAG,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,gBAAM,IAAA,oBAAY,EACjD,GAAG,EACH,CAAC,CACJ,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAG,CAAC;YAClB,4CAA4C;YAC5C,OAAO,GAAG,mBAAW,CAAC,SAAS,IAAI,MAAM,CACrC,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK,MAAM,CAC7B,CAAC;SACL;KACJ;IAED,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC;AA1BD,8BA0BC;AAED;;;;;;;;GAQG;AACU,QAAA,MAAM,GAAG,SAAS,CAAC;AAEhC;;;;;;;;;GASG;AACH,SAAS,UAAU,CACf,KAAa,EACb,GAAwB;IAExB,OAAO,SAAS,MAAM,CAAC,IAAY;QAC/B,IAAI,KAAK,CAAC;QACV,IAAI,OAAO,GAAG,CAAC,CAAC;QAChB,IAAI,MAAM,GAAG,EAAE,CAAC;QAEhB,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE;YAC/B,IAAI,OAAO,KAAK,KAAK,CAAC,KAAK,EAAE;gBACzB,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;aAClD;YAED,kDAAkD;YAClD,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAE,CAAC;YAE3C,kCAAkC;YAClC,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC;SAC7B;QAED,OAAO,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC,CAAC;AACN,CAAC;AAED;;;;;;GAMG;AACU,QAAA,UAAU,GAAG,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAE7D;;;;;GAKG;AACU,QAAA,eAAe,GAAG,UAAU,CACrC,aAAa,EACb,IAAI,GAAG,CAAC;IACJ,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,GAAG,EAAE,QAAQ,CAAC;CAClB,CAAC,CACL,CAAC;AAEF;;;;;GAKG;AACU,QAAA,UAAU,GAAG,UAAU,CAChC,cAAc,EACd,IAAI,GAAG,CAAC;IACJ,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,GAAG,EAAE,QAAQ,CAAC;CAClB,CAAC,CACL,CAAC"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/decode.d.ts b/vuetest/node_modules/entities/lib/esm/decode.d.ts new file mode 100644 index 0000000..ccfd9fb --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/decode.d.ts @@ -0,0 +1,211 @@ +import htmlDecodeTree from "./generated/decode-data-html.js"; +import xmlDecodeTree from "./generated/decode-data-xml.js"; +import decodeCodePoint from "./decode_codepoint.js"; +export { htmlDecodeTree, xmlDecodeTree, decodeCodePoint }; +export { replaceCodePoint, fromCodePoint } from "./decode_codepoint.js"; +export declare enum BinTrieFlags { + VALUE_LENGTH = 49152, + BRANCH_LENGTH = 16256, + JUMP_TABLE = 127 +} +export declare enum DecodingMode { + /** Entities in text nodes that can end with any character. */ + Legacy = 0, + /** Only allow entities terminated with a semicolon. */ + Strict = 1, + /** Entities in attributes have limitations on ending characters. */ + Attribute = 2 +} +/** + * Producers for character reference errors as defined in the HTML spec. + */ +export interface EntityErrorProducer { + missingSemicolonAfterCharacterReference(): void; + absenceOfDigitsInNumericCharacterReference(consumedCharacters: number): void; + validateNumericCharacterReference(code: number): void; +} +/** + * Token decoder with support of writing partial entities. + */ +export declare class EntityDecoder { + /** The tree used to decode entities. */ + private readonly decodeTree; + /** + * The function that is called when a codepoint is decoded. + * + * For multi-byte named entities, this will be called multiple times, + * with the second codepoint, and the same `consumed` value. + * + * @param codepoint The decoded codepoint. + * @param consumed The number of bytes consumed by the decoder. + */ + private readonly emitCodePoint; + /** An object that is used to produce errors. */ + private readonly errors?; + constructor( + /** The tree used to decode entities. */ + decodeTree: Uint16Array, + /** + * The function that is called when a codepoint is decoded. + * + * For multi-byte named entities, this will be called multiple times, + * with the second codepoint, and the same `consumed` value. + * + * @param codepoint The decoded codepoint. + * @param consumed The number of bytes consumed by the decoder. + */ + emitCodePoint: (cp: number, consumed: number) => void, + /** An object that is used to produce errors. */ + errors?: EntityErrorProducer | undefined); + /** The current state of the decoder. */ + private state; + /** Characters that were consumed while parsing an entity. */ + private consumed; + /** + * The result of the entity. + * + * Either the result index of a numeric entity, or the codepoint of a + * numeric entity. + */ + private result; + /** The current index in the decode tree. */ + private treeIndex; + /** The number of characters that were consumed in excess. */ + private excess; + /** The mode in which the decoder is operating. */ + private decodeMode; + /** Resets the instance to make it reusable. */ + startEntity(decodeMode: DecodingMode): void; + /** + * Write an entity to the decoder. This can be called multiple times with partial entities. + * If the entity is incomplete, the decoder will return -1. + * + * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the + * entity is incomplete, and resume when the next string is written. + * + * @param string The string containing the entity (or a continuation of the entity). + * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + write(str: string, offset: number): number; + /** + * Switches between the numeric decimal and hexadecimal states. + * + * Equivalent to the `Numeric character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + private stateNumericStart; + private addToNumericResult; + /** + * Parses a hexadecimal numeric entity. + * + * Equivalent to the `Hexademical character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + private stateNumericHex; + /** + * Parses a decimal numeric entity. + * + * Equivalent to the `Decimal character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + private stateNumericDecimal; + /** + * Validate and emit a numeric entity. + * + * Implements the logic from the `Hexademical character reference start + * state` and `Numeric character reference end state` in the HTML spec. + * + * @param lastCp The last code point of the entity. Used to see if the + * entity was terminated with a semicolon. + * @param expectedLength The minimum number of characters that should be + * consumed. Used to validate that at least one digit + * was consumed. + * @returns The number of characters that were consumed. + */ + private emitNumericEntity; + /** + * Parses a named entity. + * + * Equivalent to the `Named character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + private stateNamedEntity; + /** + * Emit a named entity that was not terminated with a semicolon. + * + * @returns The number of characters consumed. + */ + private emitNotTerminatedNamedEntity; + /** + * Emit a named entity. + * + * @param result The index of the entity in the decode tree. + * @param valueLength The number of bytes in the entity. + * @param consumed The number of characters consumed. + * + * @returns The number of characters consumed. + */ + private emitNamedEntityData; + /** + * Signal to the parser that the end of the input was reached. + * + * Remaining data will be emitted and relevant errors will be produced. + * + * @returns The number of characters consumed. + */ + end(): number; +} +/** + * Determines the branch of the current node that is taken given the current + * character. This function is used to traverse the trie. + * + * @param decodeTree The trie. + * @param current The current node. + * @param nodeIdx The index right after the current node and its value. + * @param char The current character. + * @returns The index of the next node, or -1 if no branch is taken. + */ +export declare function determineBranch(decodeTree: Uint16Array, current: number, nodeIdx: number, char: number): number; +/** + * Decodes an HTML string. + * + * @param str The string to decode. + * @param mode The decoding mode. + * @returns The decoded string. + */ +export declare function decodeHTML(str: string, mode?: DecodingMode): string; +/** + * Decodes an HTML string in an attribute. + * + * @param str The string to decode. + * @returns The decoded string. + */ +export declare function decodeHTMLAttribute(str: string): string; +/** + * Decodes an HTML string, requiring all entities to be terminated by a semicolon. + * + * @param str The string to decode. + * @returns The decoded string. + */ +export declare function decodeHTMLStrict(str: string): string; +/** + * Decodes an XML string, requiring all entities to be terminated by a semicolon. + * + * @param str The string to decode. + * @returns The decoded string. + */ +export declare function decodeXML(str: string): string; +//# sourceMappingURL=decode.d.ts.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/decode.d.ts.map b/vuetest/node_modules/entities/lib/esm/decode.d.ts.map new file mode 100644 index 0000000..4c0b4b4 --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/decode.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,eAGN,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAoBxE,oBAAY,YAAY;IACpB,YAAY,QAAwB;IACpC,aAAa,QAAwB;IACrC,UAAU,MAAwB;CACrC;AAuCD,oBAAY,YAAY;IACpB,8DAA8D;IAC9D,MAAM,IAAI;IACV,uDAAuD;IACvD,MAAM,IAAI;IACV,oEAAoE;IACpE,SAAS,IAAI;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,uCAAuC,IAAI,IAAI,CAAC;IAChD,0CAA0C,CACtC,kBAAkB,EAAE,MAAM,GAC3B,IAAI,CAAC;IACR,iCAAiC,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACzD;AAED;;GAEG;AACH,qBAAa,aAAa;IAElB,wCAAwC;IACxC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B;;;;;;;;OAQG;IACH,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,gDAAgD;IAChD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;;IAbxB,wCAAwC;IACvB,UAAU,EAAE,WAAW;IACxC;;;;;;;;OAQG;IACc,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI;IACtE,gDAAgD;IAC/B,MAAM,CAAC,iCAAqB;IAGjD,wCAAwC;IACxC,OAAO,CAAC,KAAK,CAAkC;IAC/C,6DAA6D;IAC7D,OAAO,CAAC,QAAQ,CAAK;IACrB;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAK;IAEnB,4CAA4C;IAC5C,OAAO,CAAC,SAAS,CAAK;IACtB,6DAA6D;IAC7D,OAAO,CAAC,MAAM,CAAK;IACnB,kDAAkD;IAClD,OAAO,CAAC,UAAU,CAAuB;IAEzC,+CAA+C;IAC/C,WAAW,CAAC,UAAU,EAAE,YAAY,GAAG,IAAI;IAS3C;;;;;;;;;;OAUG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IA8B1C;;;;;;;;OAQG;IACH,OAAO,CAAC,iBAAiB;IAezB,OAAO,CAAC,kBAAkB;IAe1B;;;;;;;;OAQG;IACH,OAAO,CAAC,eAAe;IAkBvB;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;IAkB3B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,iBAAiB;IA6BzB;;;;;;;;OAQG;IACH,OAAO,CAAC,gBAAgB;IAsDxB;;;;OAIG;IACH,OAAO,CAAC,4BAA4B;IAYpC;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;IAqB3B;;;;;;OAMG;IACH,GAAG,IAAI,MAAM;CA6BhB;AAoDD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC3B,UAAU,EAAE,WAAW,EACvB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,GACb,MAAM,CAsCR;AAKD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,eAAsB,GAAG,MAAM,CAE1E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/decode.js b/vuetest/node_modules/entities/lib/esm/decode.js new file mode 100644 index 0000000..de225ec --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/decode.js @@ -0,0 +1,496 @@ +import htmlDecodeTree from "./generated/decode-data-html.js"; +import xmlDecodeTree from "./generated/decode-data-xml.js"; +import decodeCodePoint, { replaceCodePoint, fromCodePoint, } from "./decode_codepoint.js"; +// Re-export for use by eg. htmlparser2 +export { htmlDecodeTree, xmlDecodeTree, decodeCodePoint }; +export { replaceCodePoint, fromCodePoint } from "./decode_codepoint.js"; +var CharCodes; +(function (CharCodes) { + CharCodes[CharCodes["NUM"] = 35] = "NUM"; + CharCodes[CharCodes["SEMI"] = 59] = "SEMI"; + CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS"; + CharCodes[CharCodes["ZERO"] = 48] = "ZERO"; + CharCodes[CharCodes["NINE"] = 57] = "NINE"; + CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A"; + CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F"; + CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X"; + CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z"; + CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A"; + CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F"; + CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z"; +})(CharCodes || (CharCodes = {})); +/** Bit that needs to be set to convert an upper case ASCII character to lower case */ +const TO_LOWER_BIT = 0b100000; +export var BinTrieFlags; +(function (BinTrieFlags) { + BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH"; + BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH"; + BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE"; +})(BinTrieFlags || (BinTrieFlags = {})); +function isNumber(code) { + return code >= CharCodes.ZERO && code <= CharCodes.NINE; +} +function isHexadecimalCharacter(code) { + return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) || + (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F)); +} +function isAsciiAlphaNumeric(code) { + return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) || + (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) || + isNumber(code)); +} +/** + * Checks if the given character is a valid end character for an entity in an attribute. + * + * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error. + * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state + */ +function isEntityInAttributeInvalidEnd(code) { + return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code); +} +var EntityDecoderState; +(function (EntityDecoderState) { + EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart"; + EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart"; + EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal"; + EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex"; + EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity"; +})(EntityDecoderState || (EntityDecoderState = {})); +export var DecodingMode; +(function (DecodingMode) { + /** Entities in text nodes that can end with any character. */ + DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy"; + /** Only allow entities terminated with a semicolon. */ + DecodingMode[DecodingMode["Strict"] = 1] = "Strict"; + /** Entities in attributes have limitations on ending characters. */ + DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute"; +})(DecodingMode || (DecodingMode = {})); +/** + * Token decoder with support of writing partial entities. + */ +export class EntityDecoder { + constructor( + /** The tree used to decode entities. */ + decodeTree, + /** + * The function that is called when a codepoint is decoded. + * + * For multi-byte named entities, this will be called multiple times, + * with the second codepoint, and the same `consumed` value. + * + * @param codepoint The decoded codepoint. + * @param consumed The number of bytes consumed by the decoder. + */ + emitCodePoint, + /** An object that is used to produce errors. */ + errors) { + this.decodeTree = decodeTree; + this.emitCodePoint = emitCodePoint; + this.errors = errors; + /** The current state of the decoder. */ + this.state = EntityDecoderState.EntityStart; + /** Characters that were consumed while parsing an entity. */ + this.consumed = 1; + /** + * The result of the entity. + * + * Either the result index of a numeric entity, or the codepoint of a + * numeric entity. + */ + this.result = 0; + /** The current index in the decode tree. */ + this.treeIndex = 0; + /** The number of characters that were consumed in excess. */ + this.excess = 1; + /** The mode in which the decoder is operating. */ + this.decodeMode = DecodingMode.Strict; + } + /** Resets the instance to make it reusable. */ + startEntity(decodeMode) { + this.decodeMode = decodeMode; + this.state = EntityDecoderState.EntityStart; + this.result = 0; + this.treeIndex = 0; + this.excess = 1; + this.consumed = 1; + } + /** + * Write an entity to the decoder. This can be called multiple times with partial entities. + * If the entity is incomplete, the decoder will return -1. + * + * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the + * entity is incomplete, and resume when the next string is written. + * + * @param string The string containing the entity (or a continuation of the entity). + * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + write(str, offset) { + switch (this.state) { + case EntityDecoderState.EntityStart: { + if (str.charCodeAt(offset) === CharCodes.NUM) { + this.state = EntityDecoderState.NumericStart; + this.consumed += 1; + return this.stateNumericStart(str, offset + 1); + } + this.state = EntityDecoderState.NamedEntity; + return this.stateNamedEntity(str, offset); + } + case EntityDecoderState.NumericStart: { + return this.stateNumericStart(str, offset); + } + case EntityDecoderState.NumericDecimal: { + return this.stateNumericDecimal(str, offset); + } + case EntityDecoderState.NumericHex: { + return this.stateNumericHex(str, offset); + } + case EntityDecoderState.NamedEntity: { + return this.stateNamedEntity(str, offset); + } + } + } + /** + * Switches between the numeric decimal and hexadecimal states. + * + * Equivalent to the `Numeric character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNumericStart(str, offset) { + if (offset >= str.length) { + return -1; + } + if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) { + this.state = EntityDecoderState.NumericHex; + this.consumed += 1; + return this.stateNumericHex(str, offset + 1); + } + this.state = EntityDecoderState.NumericDecimal; + return this.stateNumericDecimal(str, offset); + } + addToNumericResult(str, start, end, base) { + if (start !== end) { + const digitCount = end - start; + this.result = + this.result * Math.pow(base, digitCount) + + parseInt(str.substr(start, digitCount), base); + this.consumed += digitCount; + } + } + /** + * Parses a hexadecimal numeric entity. + * + * Equivalent to the `Hexademical character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNumericHex(str, offset) { + const startIdx = offset; + while (offset < str.length) { + const char = str.charCodeAt(offset); + if (isNumber(char) || isHexadecimalCharacter(char)) { + offset += 1; + } + else { + this.addToNumericResult(str, startIdx, offset, 16); + return this.emitNumericEntity(char, 3); + } + } + this.addToNumericResult(str, startIdx, offset, 16); + return -1; + } + /** + * Parses a decimal numeric entity. + * + * Equivalent to the `Decimal character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNumericDecimal(str, offset) { + const startIdx = offset; + while (offset < str.length) { + const char = str.charCodeAt(offset); + if (isNumber(char)) { + offset += 1; + } + else { + this.addToNumericResult(str, startIdx, offset, 10); + return this.emitNumericEntity(char, 2); + } + } + this.addToNumericResult(str, startIdx, offset, 10); + return -1; + } + /** + * Validate and emit a numeric entity. + * + * Implements the logic from the `Hexademical character reference start + * state` and `Numeric character reference end state` in the HTML spec. + * + * @param lastCp The last code point of the entity. Used to see if the + * entity was terminated with a semicolon. + * @param expectedLength The minimum number of characters that should be + * consumed. Used to validate that at least one digit + * was consumed. + * @returns The number of characters that were consumed. + */ + emitNumericEntity(lastCp, expectedLength) { + var _a; + // Ensure we consumed at least one digit. + if (this.consumed <= expectedLength) { + (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); + return 0; + } + // Figure out if this is a legit end of the entity + if (lastCp === CharCodes.SEMI) { + this.consumed += 1; + } + else if (this.decodeMode === DecodingMode.Strict) { + return 0; + } + this.emitCodePoint(replaceCodePoint(this.result), this.consumed); + if (this.errors) { + if (lastCp !== CharCodes.SEMI) { + this.errors.missingSemicolonAfterCharacterReference(); + } + this.errors.validateNumericCharacterReference(this.result); + } + return this.consumed; + } + /** + * Parses a named entity. + * + * Equivalent to the `Named character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNamedEntity(str, offset) { + const { decodeTree } = this; + let current = decodeTree[this.treeIndex]; + // The mask is the number of bytes of the value, including the current byte. + let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; + for (; offset < str.length; offset++, this.excess++) { + const char = str.charCodeAt(offset); + this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); + if (this.treeIndex < 0) { + return this.result === 0 || + // If we are parsing an attribute + (this.decodeMode === DecodingMode.Attribute && + // We shouldn't have consumed any characters after the entity, + (valueLength === 0 || + // And there should be no invalid characters. + isEntityInAttributeInvalidEnd(char))) + ? 0 + : this.emitNotTerminatedNamedEntity(); + } + current = decodeTree[this.treeIndex]; + valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; + // If the branch is a value, store it and continue + if (valueLength !== 0) { + // If the entity is terminated by a semicolon, we are done. + if (char === CharCodes.SEMI) { + return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); + } + // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it. + if (this.decodeMode !== DecodingMode.Strict) { + this.result = this.treeIndex; + this.consumed += this.excess; + this.excess = 0; + } + } + } + return -1; + } + /** + * Emit a named entity that was not terminated with a semicolon. + * + * @returns The number of characters consumed. + */ + emitNotTerminatedNamedEntity() { + var _a; + const { result, decodeTree } = this; + const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14; + this.emitNamedEntityData(result, valueLength, this.consumed); + (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference(); + return this.consumed; + } + /** + * Emit a named entity. + * + * @param result The index of the entity in the decode tree. + * @param valueLength The number of bytes in the entity. + * @param consumed The number of characters consumed. + * + * @returns The number of characters consumed. + */ + emitNamedEntityData(result, valueLength, consumed) { + const { decodeTree } = this; + this.emitCodePoint(valueLength === 1 + ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH + : decodeTree[result + 1], consumed); + if (valueLength === 3) { + // For multi-byte values, we need to emit the second byte. + this.emitCodePoint(decodeTree[result + 2], consumed); + } + return consumed; + } + /** + * Signal to the parser that the end of the input was reached. + * + * Remaining data will be emitted and relevant errors will be produced. + * + * @returns The number of characters consumed. + */ + end() { + var _a; + switch (this.state) { + case EntityDecoderState.NamedEntity: { + // Emit a named entity if we have one. + return this.result !== 0 && + (this.decodeMode !== DecodingMode.Attribute || + this.result === this.treeIndex) + ? this.emitNotTerminatedNamedEntity() + : 0; + } + // Otherwise, emit a numeric entity if we have one. + case EntityDecoderState.NumericDecimal: { + return this.emitNumericEntity(0, 2); + } + case EntityDecoderState.NumericHex: { + return this.emitNumericEntity(0, 3); + } + case EntityDecoderState.NumericStart: { + (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); + return 0; + } + case EntityDecoderState.EntityStart: { + // Return 0 if we have no entity. + return 0; + } + } + } +} +/** + * Creates a function that decodes entities in a string. + * + * @param decodeTree The decode tree. + * @returns A function that decodes entities in a string. + */ +function getDecoder(decodeTree) { + let ret = ""; + const decoder = new EntityDecoder(decodeTree, (str) => (ret += fromCodePoint(str))); + return function decodeWithTrie(str, decodeMode) { + let lastIndex = 0; + let offset = 0; + while ((offset = str.indexOf("&", offset)) >= 0) { + ret += str.slice(lastIndex, offset); + decoder.startEntity(decodeMode); + const len = decoder.write(str, + // Skip the "&" + offset + 1); + if (len < 0) { + lastIndex = offset + decoder.end(); + break; + } + lastIndex = offset + len; + // If `len` is 0, skip the current `&` and continue. + offset = len === 0 ? lastIndex + 1 : lastIndex; + } + const result = ret + str.slice(lastIndex); + // Make sure we don't keep a reference to the final string. + ret = ""; + return result; + }; +} +/** + * Determines the branch of the current node that is taken given the current + * character. This function is used to traverse the trie. + * + * @param decodeTree The trie. + * @param current The current node. + * @param nodeIdx The index right after the current node and its value. + * @param char The current character. + * @returns The index of the next node, or -1 if no branch is taken. + */ +export function determineBranch(decodeTree, current, nodeIdx, char) { + const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; + const jumpOffset = current & BinTrieFlags.JUMP_TABLE; + // Case 1: Single branch encoded in jump offset + if (branchCount === 0) { + return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1; + } + // Case 2: Multiple branches encoded in jump table + if (jumpOffset) { + const value = char - jumpOffset; + return value < 0 || value >= branchCount + ? -1 + : decodeTree[nodeIdx + value] - 1; + } + // Case 3: Multiple branches encoded in dictionary + // Binary search for the character. + let lo = nodeIdx; + let hi = lo + branchCount - 1; + while (lo <= hi) { + const mid = (lo + hi) >>> 1; + const midVal = decodeTree[mid]; + if (midVal < char) { + lo = mid + 1; + } + else if (midVal > char) { + hi = mid - 1; + } + else { + return decodeTree[mid + branchCount]; + } + } + return -1; +} +const htmlDecoder = getDecoder(htmlDecodeTree); +const xmlDecoder = getDecoder(xmlDecodeTree); +/** + * Decodes an HTML string. + * + * @param str The string to decode. + * @param mode The decoding mode. + * @returns The decoded string. + */ +export function decodeHTML(str, mode = DecodingMode.Legacy) { + return htmlDecoder(str, mode); +} +/** + * Decodes an HTML string in an attribute. + * + * @param str The string to decode. + * @returns The decoded string. + */ +export function decodeHTMLAttribute(str) { + return htmlDecoder(str, DecodingMode.Attribute); +} +/** + * Decodes an HTML string, requiring all entities to be terminated by a semicolon. + * + * @param str The string to decode. + * @returns The decoded string. + */ +export function decodeHTMLStrict(str) { + return htmlDecoder(str, DecodingMode.Strict); +} +/** + * Decodes an XML string, requiring all entities to be terminated by a semicolon. + * + * @param str The string to decode. + * @returns The decoded string. + */ +export function decodeXML(str) { + return xmlDecoder(str, DecodingMode.Strict); +} +//# sourceMappingURL=decode.js.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/decode.js.map b/vuetest/node_modules/entities/lib/esm/decode.js.map new file mode 100644 index 0000000..2db1510 --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/decode.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decode.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,eAAe,EAAE,EACpB,gBAAgB,EAChB,aAAa,GAChB,MAAM,uBAAuB,CAAC;AAE/B,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAExE,IAAW,SAaV;AAbD,WAAW,SAAS;IAChB,wCAAQ,CAAA;IACR,0CAAS,CAAA;IACT,8CAAW,CAAA;IACX,0CAAS,CAAA;IACT,0CAAS,CAAA;IACT,gDAAY,CAAA;IACZ,iDAAa,CAAA;IACb,iDAAa,CAAA;IACb,iDAAa,CAAA;IACb,gDAAY,CAAA;IACZ,gDAAY,CAAA;IACZ,gDAAY,CAAA;AAChB,CAAC,EAbU,SAAS,KAAT,SAAS,QAanB;AAED,sFAAsF;AACtF,MAAM,YAAY,GAAG,QAAQ,CAAC;AAE9B,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,mEAAoC,CAAA;IACpC,qEAAqC,CAAA;IACrC,6DAAkC,CAAA;AACtC,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AAED,SAAS,QAAQ,CAAC,IAAY;IAC1B,OAAO,IAAI,IAAI,SAAS,CAAC,IAAI,IAAI,IAAI,IAAI,SAAS,CAAC,IAAI,CAAC;AAC5D,CAAC;AAED,SAAS,sBAAsB,CAAC,IAAY;IACxC,OAAO,CACH,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC;QACxD,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC,CAC3D,CAAC;AACN,CAAC;AAED,SAAS,mBAAmB,CAAC,IAAY;IACrC,OAAO,CACH,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC;QACxD,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC;QACxD,QAAQ,CAAC,IAAI,CAAC,CACjB,CAAC;AACN,CAAC;AAED;;;;;GAKG;AACH,SAAS,6BAA6B,CAAC,IAAY;IAC/C,OAAO,IAAI,KAAK,SAAS,CAAC,MAAM,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;AAClE,CAAC;AAED,IAAW,kBAMV;AAND,WAAW,kBAAkB;IACzB,yEAAW,CAAA;IACX,2EAAY,CAAA;IACZ,+EAAc,CAAA;IACd,uEAAU,CAAA;IACV,yEAAW,CAAA;AACf,CAAC,EANU,kBAAkB,KAAlB,kBAAkB,QAM5B;AAED,MAAM,CAAN,IAAY,YAOX;AAPD,WAAY,YAAY;IACpB,8DAA8D;IAC9D,mDAAU,CAAA;IACV,uDAAuD;IACvD,mDAAU,CAAA;IACV,oEAAoE;IACpE,yDAAa,CAAA;AACjB,CAAC,EAPW,YAAY,KAAZ,YAAY,QAOvB;AAaD;;GAEG;AACH,MAAM,OAAO,aAAa;IACtB;IACI,wCAAwC;IACvB,UAAuB;IACxC;;;;;;;;OAQG;IACc,aAAqD;IACtE,gDAAgD;IAC/B,MAA4B;QAZ5B,eAAU,GAAV,UAAU,CAAa;QAUvB,kBAAa,GAAb,aAAa,CAAwC;QAErD,WAAM,GAAN,MAAM,CAAsB;QAGjD,wCAAwC;QAChC,UAAK,GAAG,kBAAkB,CAAC,WAAW,CAAC;QAC/C,6DAA6D;QACrD,aAAQ,GAAG,CAAC,CAAC;QACrB;;;;;WAKG;QACK,WAAM,GAAG,CAAC,CAAC;QAEnB,4CAA4C;QACpC,cAAS,GAAG,CAAC,CAAC;QACtB,6DAA6D;QACrD,WAAM,GAAG,CAAC,CAAC;QACnB,kDAAkD;QAC1C,eAAU,GAAG,YAAY,CAAC,MAAM,CAAC;IAnBtC,CAAC;IAqBJ,+CAA+C;IAC/C,WAAW,CAAC,UAAwB;QAChC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,WAAW,CAAC;QAC5C,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;IACtB,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,GAAW,EAAE,MAAc;QAC7B,QAAQ,IAAI,CAAC,KAAK,EAAE;YAChB,KAAK,kBAAkB,CAAC,WAAW,CAAC,CAAC;gBACjC,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,SAAS,CAAC,GAAG,EAAE;oBAC1C,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,YAAY,CAAC;oBAC7C,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;oBACnB,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;iBAClD;gBACD,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,WAAW,CAAC;gBAC5C,OAAO,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC7C;YAED,KAAK,kBAAkB,CAAC,YAAY,CAAC,CAAC;gBAClC,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC9C;YAED,KAAK,kBAAkB,CAAC,cAAc,CAAC,CAAC;gBACpC,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAChD;YAED,KAAK,kBAAkB,CAAC,UAAU,CAAC,CAAC;gBAChC,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC5C;YAED,KAAK,kBAAkB,CAAC,WAAW,CAAC,CAAC;gBACjC,OAAO,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC7C;SACJ;IACL,CAAC;IAED;;;;;;;;OAQG;IACK,iBAAiB,CAAC,GAAW,EAAE,MAAc;QACjD,IAAI,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE;YACtB,OAAO,CAAC,CAAC,CAAC;SACb;QAED,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,KAAK,SAAS,CAAC,OAAO,EAAE;YAC/D,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,UAAU,CAAC;YAC3C,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;YACnB,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;SAChD;QAED,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,cAAc,CAAC;QAC/C,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;IAEO,kBAAkB,CACtB,GAAW,EACX,KAAa,EACb,GAAW,EACX,IAAY;QAEZ,IAAI,KAAK,KAAK,GAAG,EAAE;YACf,MAAM,UAAU,GAAG,GAAG,GAAG,KAAK,CAAC;YAC/B,IAAI,CAAC,MAAM;gBACP,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC;oBACxC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,CAAC;YAClD,IAAI,CAAC,QAAQ,IAAI,UAAU,CAAC;SAC/B;IACL,CAAC;IAED;;;;;;;;OAQG;IACK,eAAe,CAAC,GAAW,EAAE,MAAc;QAC/C,MAAM,QAAQ,GAAG,MAAM,CAAC;QAExB,OAAO,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE;YACxB,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACpC,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,sBAAsB,CAAC,IAAI,CAAC,EAAE;gBAChD,MAAM,IAAI,CAAC,CAAC;aACf;iBAAM;gBACH,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;gBACnD,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;aAC1C;SACJ;QAED,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QAEnD,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED;;;;;;;;OAQG;IACK,mBAAmB,CAAC,GAAW,EAAE,MAAc;QACnD,MAAM,QAAQ,GAAG,MAAM,CAAC;QAExB,OAAO,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE;YACxB,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACpC,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE;gBAChB,MAAM,IAAI,CAAC,CAAC;aACf;iBAAM;gBACH,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;gBACnD,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;aAC1C;SACJ;QAED,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QAEnD,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;OAYG;IACK,iBAAiB,CAAC,MAAc,EAAE,cAAsB;;QAC5D,yCAAyC;QACzC,IAAI,IAAI,CAAC,QAAQ,IAAI,cAAc,EAAE;YACjC,MAAA,IAAI,CAAC,MAAM,0CAAE,0CAA0C,CACnD,IAAI,CAAC,QAAQ,CAChB,CAAC;YACF,OAAO,CAAC,CAAC;SACZ;QAED,kDAAkD;QAClD,IAAI,MAAM,KAAK,SAAS,CAAC,IAAI,EAAE;YAC3B,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;SACtB;aAAM,IAAI,IAAI,CAAC,UAAU,KAAK,YAAY,CAAC,MAAM,EAAE;YAChD,OAAO,CAAC,CAAC;SACZ;QAED,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEjE,IAAI,IAAI,CAAC,MAAM,EAAE;YACb,IAAI,MAAM,KAAK,SAAS,CAAC,IAAI,EAAE;gBAC3B,IAAI,CAAC,MAAM,CAAC,uCAAuC,EAAE,CAAC;aACzD;YAED,IAAI,CAAC,MAAM,CAAC,iCAAiC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAC9D;QAED,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;;;;;;;OAQG;IACK,gBAAgB,CAAC,GAAW,EAAE,MAAc;QAChD,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAC5B,IAAI,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACzC,4EAA4E;QAC5E,IAAI,WAAW,GAAG,CAAC,OAAO,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QAE9D,OAAO,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE;YACjD,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YAEpC,IAAI,CAAC,SAAS,GAAG,eAAe,CAC5B,UAAU,EACV,OAAO,EACP,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,EACzC,IAAI,CACP,CAAC;YAEF,IAAI,IAAI,CAAC,SAAS,GAAG,CAAC,EAAE;gBACpB,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC;oBACpB,iCAAiC;oBACjC,CAAC,IAAI,CAAC,UAAU,KAAK,YAAY,CAAC,SAAS;wBACvC,8DAA8D;wBAC9D,CAAC,WAAW,KAAK,CAAC;4BACd,6CAA6C;4BAC7C,6BAA6B,CAAC,IAAI,CAAC,CAAC,CAAC;oBAC7C,CAAC,CAAC,CAAC;oBACH,CAAC,CAAC,IAAI,CAAC,4BAA4B,EAAE,CAAC;aAC7C;YAED,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACrC,WAAW,GAAG,CAAC,OAAO,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;YAE1D,kDAAkD;YAClD,IAAI,WAAW,KAAK,CAAC,EAAE;gBACnB,2DAA2D;gBAC3D,IAAI,IAAI,KAAK,SAAS,CAAC,IAAI,EAAE;oBACzB,OAAO,IAAI,CAAC,mBAAmB,CAC3B,IAAI,CAAC,SAAS,EACd,WAAW,EACX,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAC9B,CAAC;iBACL;gBAED,2FAA2F;gBAC3F,IAAI,IAAI,CAAC,UAAU,KAAK,YAAY,CAAC,MAAM,EAAE;oBACzC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC;oBAC7B,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC;oBAC7B,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;iBACnB;aACJ;SACJ;QAED,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED;;;;OAIG;IACK,4BAA4B;;QAChC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAEpC,MAAM,WAAW,GACb,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QAE3D,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7D,MAAA,IAAI,CAAC,MAAM,0CAAE,uCAAuC,EAAE,CAAC;QAEvD,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;;;;;;;OAQG;IACK,mBAAmB,CACvB,MAAc,EACd,WAAmB,EACnB,QAAgB;QAEhB,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAE5B,IAAI,CAAC,aAAa,CACd,WAAW,KAAK,CAAC;YACb,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,YAAY;YACjD,CAAC,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,EAC5B,QAAQ,CACX,CAAC;QACF,IAAI,WAAW,KAAK,CAAC,EAAE;YACnB,0DAA0D;YAC1D,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;SACxD;QAED,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED;;;;;;OAMG;IACH,GAAG;;QACC,QAAQ,IAAI,CAAC,KAAK,EAAE;YAChB,KAAK,kBAAkB,CAAC,WAAW,CAAC,CAAC;gBACjC,sCAAsC;gBACtC,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC;oBACpB,CAAC,IAAI,CAAC,UAAU,KAAK,YAAY,CAAC,SAAS;wBACvC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,SAAS,CAAC;oBACnC,CAAC,CAAC,IAAI,CAAC,4BAA4B,EAAE;oBACrC,CAAC,CAAC,CAAC,CAAC;aACX;YACD,mDAAmD;YACnD,KAAK,kBAAkB,CAAC,cAAc,CAAC,CAAC;gBACpC,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aACvC;YACD,KAAK,kBAAkB,CAAC,UAAU,CAAC,CAAC;gBAChC,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aACvC;YACD,KAAK,kBAAkB,CAAC,YAAY,CAAC,CAAC;gBAClC,MAAA,IAAI,CAAC,MAAM,0CAAE,0CAA0C,CACnD,IAAI,CAAC,QAAQ,CAChB,CAAC;gBACF,OAAO,CAAC,CAAC;aACZ;YACD,KAAK,kBAAkB,CAAC,WAAW,CAAC,CAAC;gBACjC,iCAAiC;gBACjC,OAAO,CAAC,CAAC;aACZ;SACJ;IACL,CAAC;CACJ;AAED;;;;;GAKG;AACH,SAAS,UAAU,CAAC,UAAuB;IACvC,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,MAAM,OAAO,GAAG,IAAI,aAAa,CAC7B,UAAU,EACV,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC,CACvC,CAAC;IAEF,OAAO,SAAS,cAAc,CAC1B,GAAW,EACX,UAAwB;QAExB,IAAI,SAAS,GAAG,CAAC,CAAC;QAClB,IAAI,MAAM,GAAG,CAAC,CAAC;QAEf,OAAO,CAAC,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE;YAC7C,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YAEpC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YAEhC,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CACrB,GAAG;YACH,eAAe;YACf,MAAM,GAAG,CAAC,CACb,CAAC;YAEF,IAAI,GAAG,GAAG,CAAC,EAAE;gBACT,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;gBACnC,MAAM;aACT;YAED,SAAS,GAAG,MAAM,GAAG,GAAG,CAAC;YACzB,oDAAoD;YACpD,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;SAClD;QAED,MAAM,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAE1C,2DAA2D;QAC3D,GAAG,GAAG,EAAE,CAAC;QAET,OAAO,MAAM,CAAC;IAClB,CAAC,CAAC;AACN,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAC3B,UAAuB,EACvB,OAAe,EACf,OAAe,EACf,IAAY;IAEZ,MAAM,WAAW,GAAG,CAAC,OAAO,GAAG,YAAY,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAChE,MAAM,UAAU,GAAG,OAAO,GAAG,YAAY,CAAC,UAAU,CAAC;IAErD,+CAA+C;IAC/C,IAAI,WAAW,KAAK,CAAC,EAAE;QACnB,OAAO,UAAU,KAAK,CAAC,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACjE;IAED,kDAAkD;IAClD,IAAI,UAAU,EAAE;QACZ,MAAM,KAAK,GAAG,IAAI,GAAG,UAAU,CAAC;QAEhC,OAAO,KAAK,GAAG,CAAC,IAAI,KAAK,IAAI,WAAW;YACpC,CAAC,CAAC,CAAC,CAAC;YACJ,CAAC,CAAC,UAAU,CAAC,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;KACzC;IAED,kDAAkD;IAElD,mCAAmC;IACnC,IAAI,EAAE,GAAG,OAAO,CAAC;IACjB,IAAI,EAAE,GAAG,EAAE,GAAG,WAAW,GAAG,CAAC,CAAC;IAE9B,OAAO,EAAE,IAAI,EAAE,EAAE;QACb,MAAM,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;QAC5B,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;QAE/B,IAAI,MAAM,GAAG,IAAI,EAAE;YACf,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;SAChB;aAAM,IAAI,MAAM,GAAG,IAAI,EAAE;YACtB,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;SAChB;aAAM;YACH,OAAO,UAAU,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC;SACxC;KACJ;IAED,OAAO,CAAC,CAAC,CAAC;AACd,CAAC;AAED,MAAM,WAAW,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;AAC/C,MAAM,UAAU,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,GAAW,EAAE,IAAI,GAAG,YAAY,CAAC,MAAM;IAC9D,OAAO,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAW;IAC3C,OAAO,WAAW,CAAC,GAAG,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;AACpD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAW;IACxC,OAAO,WAAW,CAAC,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;AACjD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW;IACjC,OAAO,UAAU,CAAC,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/decode_codepoint.d.ts b/vuetest/node_modules/entities/lib/esm/decode_codepoint.d.ts new file mode 100644 index 0000000..84ae206 --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/decode_codepoint.d.ts @@ -0,0 +1,19 @@ +/** + * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. + */ +export declare const fromCodePoint: (...codePoints: number[]) => string; +/** + * Replace the given code point with a replacement character if it is a + * surrogate or is outside the valid range. Otherwise return the code + * point unchanged. + */ +export declare function replaceCodePoint(codePoint: number): number; +/** + * Replace the code point if relevant, then convert it to a string. + * + * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead. + * @param codePoint The code point to decode. + * @returns The decoded code point. + */ +export default function decodeCodePoint(codePoint: number): string; +//# sourceMappingURL=decode_codepoint.d.ts.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/decode_codepoint.d.ts.map b/vuetest/node_modules/entities/lib/esm/decode_codepoint.d.ts.map new file mode 100644 index 0000000..38a8dea --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/decode_codepoint.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decode_codepoint.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode_codepoint.ts"],"names":[],"mappings":"AAkCA;;GAEG;AACH,eAAO,MAAM,aAAa,qCAgBrB,CAAC;AAEN;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,UAMjD;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEjE"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/decode_codepoint.js b/vuetest/node_modules/entities/lib/esm/decode_codepoint.js new file mode 100644 index 0000000..4d8281e --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/decode_codepoint.js @@ -0,0 +1,71 @@ +// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134 +var _a; +const decodeMap = new Map([ + [0, 65533], + // C1 Unicode control character reference replacements + [128, 8364], + [130, 8218], + [131, 402], + [132, 8222], + [133, 8230], + [134, 8224], + [135, 8225], + [136, 710], + [137, 8240], + [138, 352], + [139, 8249], + [140, 338], + [142, 381], + [145, 8216], + [146, 8217], + [147, 8220], + [148, 8221], + [149, 8226], + [150, 8211], + [151, 8212], + [152, 732], + [153, 8482], + [154, 353], + [155, 8250], + [156, 339], + [158, 382], + [159, 376], +]); +/** + * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. + */ +export const fromCodePoint = +// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins +(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function (codePoint) { + let output = ""; + if (codePoint > 0xffff) { + codePoint -= 0x10000; + output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800); + codePoint = 0xdc00 | (codePoint & 0x3ff); + } + output += String.fromCharCode(codePoint); + return output; +}; +/** + * Replace the given code point with a replacement character if it is a + * surrogate or is outside the valid range. Otherwise return the code + * point unchanged. + */ +export function replaceCodePoint(codePoint) { + var _a; + if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) { + return 0xfffd; + } + return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint; +} +/** + * Replace the code point if relevant, then convert it to a string. + * + * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead. + * @param codePoint The code point to decode. + * @returns The decoded code point. + */ +export default function decodeCodePoint(codePoint) { + return fromCodePoint(replaceCodePoint(codePoint)); +} +//# sourceMappingURL=decode_codepoint.js.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/decode_codepoint.js.map b/vuetest/node_modules/entities/lib/esm/decode_codepoint.js.map new file mode 100644 index 0000000..53a32b6 --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/decode_codepoint.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decode_codepoint.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode_codepoint.ts"],"names":[],"mappings":"AAAA,qHAAqH;;AAErH,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC;IACtB,CAAC,CAAC,EAAE,KAAK,CAAC;IACV,sDAAsD;IACtD,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;CACb,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa;AACtB,iHAAiH;AACjH,MAAA,MAAM,CAAC,aAAa,mCACpB,UAAU,SAAiB;IACvB,IAAI,MAAM,GAAG,EAAE,CAAC;IAEhB,IAAI,SAAS,GAAG,MAAM,EAAE;QACpB,SAAS,IAAI,OAAO,CAAC;QACrB,MAAM,IAAI,MAAM,CAAC,YAAY,CACzB,CAAC,CAAC,SAAS,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CACxC,CAAC;QACF,SAAS,GAAG,MAAM,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC;KAC5C;IAED,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IACzC,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAEN;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,SAAiB;;IAC9C,IAAI,CAAC,SAAS,IAAI,MAAM,IAAI,SAAS,IAAI,MAAM,CAAC,IAAI,SAAS,GAAG,QAAQ,EAAE;QACtE,OAAO,MAAM,CAAC;KACjB;IAED,OAAO,MAAA,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,mCAAI,SAAS,CAAC;AACjD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,SAAiB;IACrD,OAAO,aAAa,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;AACtD,CAAC"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/encode.d.ts b/vuetest/node_modules/entities/lib/esm/encode.d.ts new file mode 100644 index 0000000..f09c4ee --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/encode.d.ts @@ -0,0 +1,22 @@ +/** + * Encodes all characters in the input using HTML entities. This includes + * characters that are valid ASCII characters in HTML documents, such as `#`. + * + * To get a more compact output, consider using the `encodeNonAsciiHTML` + * function, which will only encode characters that are not valid in HTML + * documents, as well as non-ASCII characters. + * + * If a character has no equivalent entity, a numeric hexadecimal reference + * (eg. `ü`) will be used. + */ +export declare function encodeHTML(data: string): string; +/** + * Encodes all non-ASCII characters, as well as characters not valid in HTML + * documents using HTML entities. This function will not encode characters that + * are valid in HTML documents, such as `#`. + * + * If a character has no equivalent entity, a numeric hexadecimal reference + * (eg. `ü`) will be used. + */ +export declare function encodeNonAsciiHTML(data: string): string; +//# sourceMappingURL=encode.d.ts.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/encode.d.ts.map b/vuetest/node_modules/entities/lib/esm/encode.d.ts.map new file mode 100644 index 0000000..e24c05b --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/encode.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"encode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AACD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/encode.js b/vuetest/node_modules/entities/lib/esm/encode.js new file mode 100644 index 0000000..9c2364f --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/encode.js @@ -0,0 +1,69 @@ +import htmlTrie from "./generated/encode-html.js"; +import { xmlReplacer, getCodePoint } from "./escape.js"; +const htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g; +/** + * Encodes all characters in the input using HTML entities. This includes + * characters that are valid ASCII characters in HTML documents, such as `#`. + * + * To get a more compact output, consider using the `encodeNonAsciiHTML` + * function, which will only encode characters that are not valid in HTML + * documents, as well as non-ASCII characters. + * + * If a character has no equivalent entity, a numeric hexadecimal reference + * (eg. `ü`) will be used. + */ +export function encodeHTML(data) { + return encodeHTMLTrieRe(htmlReplacer, data); +} +/** + * Encodes all non-ASCII characters, as well as characters not valid in HTML + * documents using HTML entities. This function will not encode characters that + * are valid in HTML documents, such as `#`. + * + * If a character has no equivalent entity, a numeric hexadecimal reference + * (eg. `ü`) will be used. + */ +export function encodeNonAsciiHTML(data) { + return encodeHTMLTrieRe(xmlReplacer, data); +} +function encodeHTMLTrieRe(regExp, str) { + let ret = ""; + let lastIdx = 0; + let match; + while ((match = regExp.exec(str)) !== null) { + const i = match.index; + ret += str.substring(lastIdx, i); + const char = str.charCodeAt(i); + let next = htmlTrie.get(char); + if (typeof next === "object") { + // We are in a branch. Try to match the next char. + if (i + 1 < str.length) { + const nextChar = str.charCodeAt(i + 1); + const value = typeof next.n === "number" + ? next.n === nextChar + ? next.o + : undefined + : next.n.get(nextChar); + if (value !== undefined) { + ret += value; + lastIdx = regExp.lastIndex += 1; + continue; + } + } + next = next.v; + } + // We might have a tree node without a value; skip and use a numeric entity. + if (next !== undefined) { + ret += next; + lastIdx = i + 1; + } + else { + const cp = getCodePoint(str, i); + ret += `&#x${cp.toString(16)};`; + // Increase by 1 if we have a surrogate pair + lastIdx = regExp.lastIndex += Number(cp !== char); + } + } + return ret + str.substr(lastIdx); +} +//# sourceMappingURL=encode.js.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/encode.js.map b/vuetest/node_modules/entities/lib/esm/encode.js.map new file mode 100644 index 0000000..14ac068 --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/encode.js.map @@ -0,0 +1 @@ +{"version":3,"file":"encode.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,YAAY,GAAG,qCAAqC,CAAC;AAE3D;;;;;;;;;;GAUG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY;IACnC,OAAO,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC;AACD;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC3C,OAAO,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,gBAAgB,CAAC,MAAc,EAAE,GAAW;IACjD,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,KAAK,CAAC;IAEV,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE;QACxC,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;QACtB,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACjC,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC/B,IAAI,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAE9B,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC1B,kDAAkD;YAClD,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE;gBACpB,MAAM,QAAQ,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBACvC,MAAM,KAAK,GACP,OAAO,IAAI,CAAC,CAAC,KAAK,QAAQ;oBACtB,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,QAAQ;wBACjB,CAAC,CAAC,IAAI,CAAC,CAAC;wBACR,CAAC,CAAC,SAAS;oBACf,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;gBAE/B,IAAI,KAAK,KAAK,SAAS,EAAE;oBACrB,GAAG,IAAI,KAAK,CAAC;oBACb,OAAO,GAAG,MAAM,CAAC,SAAS,IAAI,CAAC,CAAC;oBAChC,SAAS;iBACZ;aACJ;YAED,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC;SACjB;QAED,4EAA4E;QAC5E,IAAI,IAAI,KAAK,SAAS,EAAE;YACpB,GAAG,IAAI,IAAI,CAAC;YACZ,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;SACnB;aAAM;YACH,MAAM,EAAE,GAAG,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YAChC,GAAG,IAAI,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC;YAChC,4CAA4C;YAC5C,OAAO,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC;SACrD;KACJ;IAED,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/escape.d.ts b/vuetest/node_modules/entities/lib/esm/escape.d.ts new file mode 100644 index 0000000..c07ecdc --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/escape.d.ts @@ -0,0 +1,43 @@ +export declare const xmlReplacer: RegExp; +export declare const getCodePoint: (str: string, index: number) => number; +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using XML entities. + * + * If a character has no equivalent entity, a + * numeric hexadecimal reference (eg. `ü`) will be used. + */ +export declare function encodeXML(str: string): string; +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using numeric hexadecimal reference (eg. `ü`). + * + * Have a look at `escapeUTF8` if you want a more concise output at the expense + * of reduced transportability. + * + * @param data String to escape. + */ +export declare const escape: typeof encodeXML; +/** + * Encodes all characters not valid in XML documents using XML entities. + * + * Note that the output will be character-set dependent. + * + * @param data String to escape. + */ +export declare const escapeUTF8: (data: string) => string; +/** + * Encodes all characters that have to be escaped in HTML attributes, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + * + * @param data String to escape. + */ +export declare const escapeAttribute: (data: string) => string; +/** + * Encodes all characters that have to be escaped in HTML text, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + * + * @param data String to escape. + */ +export declare const escapeText: (data: string) => string; +//# sourceMappingURL=escape.d.ts.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/escape.d.ts.map b/vuetest/node_modules/entities/lib/esm/escape.d.ts.map new file mode 100644 index 0000000..fa19825 --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/escape.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"escape.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QAAyB,CAAC;AAWlD,eAAO,MAAM,YAAY,QAGT,MAAM,SAAS,MAAM,KAAG,MAQD,CAAC;AAExC;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA0B7C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,kBAAY,CAAC;AAqChC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,SA7Bb,MAAM,KAAK,MA6BuC,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,eAAe,SArClB,MAAM,KAAK,MA4CpB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,SApDb,MAAM,KAAK,MA4DpB,CAAC"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/escape.js b/vuetest/node_modules/entities/lib/esm/escape.js new file mode 100644 index 0000000..c64da6e --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/escape.js @@ -0,0 +1,116 @@ +export const xmlReplacer = /["&'<>$\x80-\uFFFF]/g; +const xmlCodeMap = new Map([ + [34, """], + [38, "&"], + [39, "'"], + [60, "<"], + [62, ">"], +]); +// For compatibility with node < 4, we wrap `codePointAt` +export const getCodePoint = +// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition +String.prototype.codePointAt != null + ? (str, index) => str.codePointAt(index) + : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + (c, index) => (c.charCodeAt(index) & 0xfc00) === 0xd800 + ? (c.charCodeAt(index) - 0xd800) * 0x400 + + c.charCodeAt(index + 1) - + 0xdc00 + + 0x10000 + : c.charCodeAt(index); +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using XML entities. + * + * If a character has no equivalent entity, a + * numeric hexadecimal reference (eg. `ü`) will be used. + */ +export function encodeXML(str) { + let ret = ""; + let lastIdx = 0; + let match; + while ((match = xmlReplacer.exec(str)) !== null) { + const i = match.index; + const char = str.charCodeAt(i); + const next = xmlCodeMap.get(char); + if (next !== undefined) { + ret += str.substring(lastIdx, i) + next; + lastIdx = i + 1; + } + else { + ret += `${str.substring(lastIdx, i)}&#x${getCodePoint(str, i).toString(16)};`; + // Increase by 1 if we have a surrogate pair + lastIdx = xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800); + } + } + return ret + str.substr(lastIdx); +} +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using numeric hexadecimal reference (eg. `ü`). + * + * Have a look at `escapeUTF8` if you want a more concise output at the expense + * of reduced transportability. + * + * @param data String to escape. + */ +export const escape = encodeXML; +/** + * Creates a function that escapes all characters matched by the given regular + * expression using the given map of characters to escape to their entities. + * + * @param regex Regular expression to match characters to escape. + * @param map Map of characters to escape to their entities. + * + * @returns Function that escapes all characters matched by the given regular + * expression using the given map of characters to escape to their entities. + */ +function getEscaper(regex, map) { + return function escape(data) { + let match; + let lastIdx = 0; + let result = ""; + while ((match = regex.exec(data))) { + if (lastIdx !== match.index) { + result += data.substring(lastIdx, match.index); + } + // We know that this character will be in the map. + result += map.get(match[0].charCodeAt(0)); + // Every match will be of length 1 + lastIdx = match.index + 1; + } + return result + data.substring(lastIdx); + }; +} +/** + * Encodes all characters not valid in XML documents using XML entities. + * + * Note that the output will be character-set dependent. + * + * @param data String to escape. + */ +export const escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap); +/** + * Encodes all characters that have to be escaped in HTML attributes, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + * + * @param data String to escape. + */ +export const escapeAttribute = getEscaper(/["&\u00A0]/g, new Map([ + [34, """], + [38, "&"], + [160, " "], +])); +/** + * Encodes all characters that have to be escaped in HTML text, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + * + * @param data String to escape. + */ +export const escapeText = getEscaper(/[&<>\u00A0]/g, new Map([ + [38, "&"], + [60, "<"], + [62, ">"], + [160, " "], +])); +//# sourceMappingURL=escape.js.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/escape.js.map b/vuetest/node_modules/entities/lib/esm/escape.js.map new file mode 100644 index 0000000..164301c --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/escape.js.map @@ -0,0 +1 @@ +{"version":3,"file":"escape.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAElD,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACvB,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,yDAAyD;AACzD,MAAM,CAAC,MAAM,YAAY;AACrB,uEAAuE;AACvE,MAAM,CAAC,SAAS,CAAC,WAAW,IAAI,IAAI;IAChC,CAAC,CAAC,CAAC,GAAW,EAAE,KAAa,EAAU,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAE;IACjE,CAAC,CAAC,uEAAuE;QACvE,CAAC,CAAS,EAAE,KAAa,EAAU,EAAE,CACjC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,MAAM;YACrC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,KAAK;gBACtC,CAAC,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC,CAAC;gBACvB,MAAM;gBACN,OAAO;YACT,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW;IACjC,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,KAAK,CAAC;IAEV,OAAO,CAAC,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE;QAC7C,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;QACtB,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,IAAI,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAElC,IAAI,IAAI,KAAK,SAAS,EAAE;YACpB,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;YACxC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;SACnB;aAAM;YACH,GAAG,IAAI,GAAG,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,YAAY,CACjD,GAAG,EACH,CAAC,CACJ,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC;YAClB,4CAA4C;YAC5C,OAAO,GAAG,WAAW,CAAC,SAAS,IAAI,MAAM,CACrC,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK,MAAM,CAC7B,CAAC;SACL;KACJ;IAED,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC;AAEhC;;;;;;;;;GASG;AACH,SAAS,UAAU,CACf,KAAa,EACb,GAAwB;IAExB,OAAO,SAAS,MAAM,CAAC,IAAY;QAC/B,IAAI,KAAK,CAAC;QACV,IAAI,OAAO,GAAG,CAAC,CAAC;QAChB,IAAI,MAAM,GAAG,EAAE,CAAC;QAEhB,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE;YAC/B,IAAI,OAAO,KAAK,KAAK,CAAC,KAAK,EAAE;gBACzB,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;aAClD;YAED,kDAAkD;YAClD,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAE,CAAC;YAE3C,kCAAkC;YAClC,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC;SAC7B;QAED,OAAO,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC,CAAC;AACN,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CACrC,aAAa,EACb,IAAI,GAAG,CAAC;IACJ,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,GAAG,EAAE,QAAQ,CAAC;CAClB,CAAC,CACL,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAChC,cAAc,EACd,IAAI,GAAG,CAAC;IACJ,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,GAAG,EAAE,QAAQ,CAAC;CAClB,CAAC,CACL,CAAC"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/generated/decode-data-html.d.ts b/vuetest/node_modules/entities/lib/esm/generated/decode-data-html.d.ts new file mode 100644 index 0000000..9cfc4f4 --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/generated/decode-data-html.d.ts @@ -0,0 +1,3 @@ +declare const _default: Uint16Array; +export default _default; +//# sourceMappingURL=decode-data-html.d.ts.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map b/vuetest/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map new file mode 100644 index 0000000..6d4d64b --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decode-data-html.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-html.ts"],"names":[],"mappings":";AAEA,wBAKE"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/generated/decode-data-html.js b/vuetest/node_modules/entities/lib/esm/generated/decode-data-html.js new file mode 100644 index 0000000..0791b55 --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/generated/decode-data-html.js @@ -0,0 +1,7 @@ +// Generated using scripts/write-decode-map.ts +export default new Uint16Array( +// prettier-ignore +"\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\u40cc\u0180;ap\u0720\u072f\u073f\u0100cg\u0734\u0737r;\u412ainaryI;\u6148lie\xf3\u03dd\u01f4\u0749\0\u0762\u0100;e\u074d\u074e\u622c\u0100gr\u0753\u0758ral;\u622bsection;\u62c2isible\u0100CT\u076c\u0772omma;\u6063imes;\u6062\u0180gpt\u077f\u0783\u0788on;\u412ef;\uc000\ud835\udd40a;\u4399cr;\u6110ilde;\u4128\u01eb\u079a\0\u079ecy;\u4406l\u803b\xcf\u40cf\u0280cfosu\u07ac\u07b7\u07bc\u07c2\u07d0\u0100iy\u07b1\u07b5rc;\u4134;\u4419r;\uc000\ud835\udd0dpf;\uc000\ud835\udd41\u01e3\u07c7\0\u07ccr;\uc000\ud835\udca5rcy;\u4408kcy;\u4404\u0380HJacfos\u07e4\u07e8\u07ec\u07f1\u07fd\u0802\u0808cy;\u4425cy;\u440cppa;\u439a\u0100ey\u07f6\u07fbdil;\u4136;\u441ar;\uc000\ud835\udd0epf;\uc000\ud835\udd42cr;\uc000\ud835\udca6\u0580JTaceflmost\u0825\u0829\u082c\u0850\u0863\u09b3\u09b8\u09c7\u09cd\u0a37\u0a47cy;\u4409\u803b<\u403c\u0280cmnpr\u0837\u083c\u0841\u0844\u084dute;\u4139bda;\u439bg;\u67ealacetrf;\u6112r;\u619e\u0180aey\u0857\u085c\u0861ron;\u413ddil;\u413b;\u441b\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087e\u08a9\u08b1\u08e0\u08e6\u08fc\u092f\u095b\u0390\u096a\u0100nr\u0883\u088fgleBracket;\u67e8row\u0180;BR\u0899\u089a\u089e\u6190ar;\u61e4ightArrow;\u61c6eiling;\u6308o\u01f5\u08b7\0\u08c3bleBracket;\u67e6n\u01d4\u08c8\0\u08d2eeVector;\u6961ector\u0100;B\u08db\u08dc\u61c3ar;\u6959loor;\u630aight\u0100AV\u08ef\u08f5rrow;\u6194ector;\u694e\u0100er\u0901\u0917e\u0180;AV\u0909\u090a\u0910\u62a3rrow;\u61a4ector;\u695aiangle\u0180;BE\u0924\u0925\u0929\u62b2ar;\u69cfqual;\u62b4p\u0180DTV\u0937\u0942\u094cownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61bfar;\u6958ector\u0100;B\u0965\u0966\u61bcar;\u6952ight\xe1\u039cs\u0300EFGLST\u097e\u098b\u0995\u099d\u09a2\u09adqualGreater;\u62daullEqual;\u6266reater;\u6276ess;\u6aa1lantEqual;\u6a7dilde;\u6272r;\uc000\ud835\udd0f\u0100;e\u09bd\u09be\u62d8ftarrow;\u61daidot;\u413f\u0180npw\u09d4\u0a16\u0a1bg\u0200LRlr\u09de\u09f7\u0a02\u0a10eft\u0100AR\u09e6\u09ecrrow;\u67f5ightArrow;\u67f7ightArrow;\u67f6eft\u0100ar\u03b3\u0a0aight\xe1\u03bfight\xe1\u03caf;\uc000\ud835\udd43er\u0100LR\u0a22\u0a2ceftArrow;\u6199ightArrow;\u6198\u0180cht\u0a3e\u0a40\u0a42\xf2\u084c;\u61b0rok;\u4141;\u626a\u0400acefiosu\u0a5a\u0a5d\u0a60\u0a77\u0a7c\u0a85\u0a8b\u0a8ep;\u6905y;\u441c\u0100dl\u0a65\u0a6fiumSpace;\u605flintrf;\u6133r;\uc000\ud835\udd10nusPlus;\u6213pf;\uc000\ud835\udd44c\xf2\u0a76;\u439c\u0480Jacefostu\u0aa3\u0aa7\u0aad\u0ac0\u0b14\u0b19\u0d91\u0d97\u0d9ecy;\u440acute;\u4143\u0180aey\u0ab4\u0ab9\u0aberon;\u4147dil;\u4145;\u441d\u0180gsw\u0ac7\u0af0\u0b0eative\u0180MTV\u0ad3\u0adf\u0ae8ediumSpace;\u600bhi\u0100cn\u0ae6\u0ad8\xeb\u0ad9eryThi\xee\u0ad9ted\u0100GL\u0af8\u0b06reaterGreate\xf2\u0673essLes\xf3\u0a48Line;\u400ar;\uc000\ud835\udd11\u0200Bnpt\u0b22\u0b28\u0b37\u0b3areak;\u6060BreakingSpace;\u40a0f;\u6115\u0680;CDEGHLNPRSTV\u0b55\u0b56\u0b6a\u0b7c\u0ba1\u0beb\u0c04\u0c5e\u0c84\u0ca6\u0cd8\u0d61\u0d85\u6aec\u0100ou\u0b5b\u0b64ngruent;\u6262pCap;\u626doubleVerticalBar;\u6226\u0180lqx\u0b83\u0b8a\u0b9bement;\u6209ual\u0100;T\u0b92\u0b93\u6260ilde;\uc000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0bb6\u0bb7\u0bbd\u0bc9\u0bd3\u0bd8\u0be5\u626fqual;\u6271ullEqual;\uc000\u2267\u0338reater;\uc000\u226b\u0338ess;\u6279lantEqual;\uc000\u2a7e\u0338ilde;\u6275ump\u0144\u0bf2\u0bfdownHump;\uc000\u224e\u0338qual;\uc000\u224f\u0338e\u0100fs\u0c0a\u0c27tTriangle\u0180;BE\u0c1a\u0c1b\u0c21\u62eaar;\uc000\u29cf\u0338qual;\u62ecs\u0300;EGLST\u0c35\u0c36\u0c3c\u0c44\u0c4b\u0c58\u626equal;\u6270reater;\u6278ess;\uc000\u226a\u0338lantEqual;\uc000\u2a7d\u0338ilde;\u6274ested\u0100GL\u0c68\u0c79reaterGreater;\uc000\u2aa2\u0338essLess;\uc000\u2aa1\u0338recedes\u0180;ES\u0c92\u0c93\u0c9b\u6280qual;\uc000\u2aaf\u0338lantEqual;\u62e0\u0100ei\u0cab\u0cb9verseElement;\u620cghtTriangle\u0180;BE\u0ccb\u0ccc\u0cd2\u62ebar;\uc000\u29d0\u0338qual;\u62ed\u0100qu\u0cdd\u0d0cuareSu\u0100bp\u0ce8\u0cf9set\u0100;E\u0cf0\u0cf3\uc000\u228f\u0338qual;\u62e2erset\u0100;E\u0d03\u0d06\uc000\u2290\u0338qual;\u62e3\u0180bcp\u0d13\u0d24\u0d4eset\u0100;E\u0d1b\u0d1e\uc000\u2282\u20d2qual;\u6288ceeds\u0200;EST\u0d32\u0d33\u0d3b\u0d46\u6281qual;\uc000\u2ab0\u0338lantEqual;\u62e1ilde;\uc000\u227f\u0338erset\u0100;E\u0d58\u0d5b\uc000\u2283\u20d2qual;\u6289ilde\u0200;EFT\u0d6e\u0d6f\u0d75\u0d7f\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uc000\ud835\udca9ilde\u803b\xd1\u40d1;\u439d\u0700Eacdfgmoprstuv\u0dbd\u0dc2\u0dc9\u0dd5\u0ddb\u0de0\u0de7\u0dfc\u0e02\u0e20\u0e22\u0e32\u0e3f\u0e44lig;\u4152cute\u803b\xd3\u40d3\u0100iy\u0dce\u0dd3rc\u803b\xd4\u40d4;\u441eblac;\u4150r;\uc000\ud835\udd12rave\u803b\xd2\u40d2\u0180aei\u0dee\u0df2\u0df6cr;\u414cga;\u43a9cron;\u439fpf;\uc000\ud835\udd46enCurly\u0100DQ\u0e0e\u0e1aoubleQuote;\u601cuote;\u6018;\u6a54\u0100cl\u0e27\u0e2cr;\uc000\ud835\udcaaash\u803b\xd8\u40d8i\u016c\u0e37\u0e3cde\u803b\xd5\u40d5es;\u6a37ml\u803b\xd6\u40d6er\u0100BP\u0e4b\u0e60\u0100ar\u0e50\u0e53r;\u603eac\u0100ek\u0e5a\u0e5c;\u63deet;\u63b4arenthesis;\u63dc\u0480acfhilors\u0e7f\u0e87\u0e8a\u0e8f\u0e92\u0e94\u0e9d\u0eb0\u0efcrtialD;\u6202y;\u441fr;\uc000\ud835\udd13i;\u43a6;\u43a0usMinus;\u40b1\u0100ip\u0ea2\u0eadncareplan\xe5\u069df;\u6119\u0200;eio\u0eb9\u0eba\u0ee0\u0ee4\u6abbcedes\u0200;EST\u0ec8\u0ec9\u0ecf\u0eda\u627aqual;\u6aaflantEqual;\u627cilde;\u627eme;\u6033\u0100dp\u0ee9\u0eeeuct;\u620fortion\u0100;a\u0225\u0ef9l;\u621d\u0100ci\u0f01\u0f06r;\uc000\ud835\udcab;\u43a8\u0200Ufos\u0f11\u0f16\u0f1b\u0f1fOT\u803b\"\u4022r;\uc000\ud835\udd14pf;\u611acr;\uc000\ud835\udcac\u0600BEacefhiorsu\u0f3e\u0f43\u0f47\u0f60\u0f73\u0fa7\u0faa\u0fad\u1096\u10a9\u10b4\u10bearr;\u6910G\u803b\xae\u40ae\u0180cnr\u0f4e\u0f53\u0f56ute;\u4154g;\u67ebr\u0100;t\u0f5c\u0f5d\u61a0l;\u6916\u0180aey\u0f67\u0f6c\u0f71ron;\u4158dil;\u4156;\u4420\u0100;v\u0f78\u0f79\u611cerse\u0100EU\u0f82\u0f99\u0100lq\u0f87\u0f8eement;\u620builibrium;\u61cbpEquilibrium;\u696fr\xbb\u0f79o;\u43a1ght\u0400ACDFTUVa\u0fc1\u0feb\u0ff3\u1022\u1028\u105b\u1087\u03d8\u0100nr\u0fc6\u0fd2gleBracket;\u67e9row\u0180;BL\u0fdc\u0fdd\u0fe1\u6192ar;\u61e5eftArrow;\u61c4eiling;\u6309o\u01f5\u0ff9\0\u1005bleBracket;\u67e7n\u01d4\u100a\0\u1014eeVector;\u695dector\u0100;B\u101d\u101e\u61c2ar;\u6955loor;\u630b\u0100er\u102d\u1043e\u0180;AV\u1035\u1036\u103c\u62a2rrow;\u61a6ector;\u695biangle\u0180;BE\u1050\u1051\u1055\u62b3ar;\u69d0qual;\u62b5p\u0180DTV\u1063\u106e\u1078ownVector;\u694feeVector;\u695cector\u0100;B\u1082\u1083\u61bear;\u6954ector\u0100;B\u1091\u1092\u61c0ar;\u6953\u0100pu\u109b\u109ef;\u611dndImplies;\u6970ightarrow;\u61db\u0100ch\u10b9\u10bcr;\u611b;\u61b1leDelayed;\u69f4\u0680HOacfhimoqstu\u10e4\u10f1\u10f7\u10fd\u1119\u111e\u1151\u1156\u1161\u1167\u11b5\u11bb\u11bf\u0100Cc\u10e9\u10eeHcy;\u4429y;\u4428FTcy;\u442ccute;\u415a\u0280;aeiy\u1108\u1109\u110e\u1113\u1117\u6abcron;\u4160dil;\u415erc;\u415c;\u4421r;\uc000\ud835\udd16ort\u0200DLRU\u112a\u1134\u113e\u1149ownArrow\xbb\u041eeftArrow\xbb\u089aightArrow\xbb\u0fddpArrow;\u6191gma;\u43a3allCircle;\u6218pf;\uc000\ud835\udd4a\u0272\u116d\0\0\u1170t;\u621aare\u0200;ISU\u117b\u117c\u1189\u11af\u65a1ntersection;\u6293u\u0100bp\u118f\u119eset\u0100;E\u1197\u1198\u628fqual;\u6291erset\u0100;E\u11a8\u11a9\u6290qual;\u6292nion;\u6294cr;\uc000\ud835\udcaear;\u62c6\u0200bcmp\u11c8\u11db\u1209\u120b\u0100;s\u11cd\u11ce\u62d0et\u0100;E\u11cd\u11d5qual;\u6286\u0100ch\u11e0\u1205eeds\u0200;EST\u11ed\u11ee\u11f4\u11ff\u627bqual;\u6ab0lantEqual;\u627dilde;\u627fTh\xe1\u0f8c;\u6211\u0180;es\u1212\u1213\u1223\u62d1rset\u0100;E\u121c\u121d\u6283qual;\u6287et\xbb\u1213\u0580HRSacfhiors\u123e\u1244\u1249\u1255\u125e\u1271\u1276\u129f\u12c2\u12c8\u12d1ORN\u803b\xde\u40deADE;\u6122\u0100Hc\u124e\u1252cy;\u440by;\u4426\u0100bu\u125a\u125c;\u4009;\u43a4\u0180aey\u1265\u126a\u126fron;\u4164dil;\u4162;\u4422r;\uc000\ud835\udd17\u0100ei\u127b\u1289\u01f2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128e\u1298kSpace;\uc000\u205f\u200aSpace;\u6009lde\u0200;EFT\u12ab\u12ac\u12b2\u12bc\u623cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uc000\ud835\udd4bipleDot;\u60db\u0100ct\u12d6\u12dbr;\uc000\ud835\udcafrok;\u4166\u0ae1\u12f7\u130e\u131a\u1326\0\u132c\u1331\0\0\0\0\0\u1338\u133d\u1377\u1385\0\u13ff\u1404\u140a\u1410\u0100cr\u12fb\u1301ute\u803b\xda\u40dar\u0100;o\u1307\u1308\u619fcir;\u6949r\u01e3\u1313\0\u1316y;\u440eve;\u416c\u0100iy\u131e\u1323rc\u803b\xdb\u40db;\u4423blac;\u4170r;\uc000\ud835\udd18rave\u803b\xd9\u40d9acr;\u416a\u0100di\u1341\u1369er\u0100BP\u1348\u135d\u0100ar\u134d\u1350r;\u405fac\u0100ek\u1357\u1359;\u63dfet;\u63b5arenthesis;\u63ddon\u0100;P\u1370\u1371\u62c3lus;\u628e\u0100gp\u137b\u137fon;\u4172f;\uc000\ud835\udd4c\u0400ADETadps\u1395\u13ae\u13b8\u13c4\u03e8\u13d2\u13d7\u13f3rrow\u0180;BD\u1150\u13a0\u13a4ar;\u6912ownArrow;\u61c5ownArrow;\u6195quilibrium;\u696eee\u0100;A\u13cb\u13cc\u62a5rrow;\u61a5own\xe1\u03f3er\u0100LR\u13de\u13e8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13f9\u13fa\u43d2on;\u43a5ing;\u416ecr;\uc000\ud835\udcb0ilde;\u4168ml\u803b\xdc\u40dc\u0480Dbcdefosv\u1427\u142c\u1430\u1433\u143e\u1485\u148a\u1490\u1496ash;\u62abar;\u6aeby;\u4412ash\u0100;l\u143b\u143c\u62a9;\u6ae6\u0100er\u1443\u1445;\u62c1\u0180bty\u144c\u1450\u147aar;\u6016\u0100;i\u144f\u1455cal\u0200BLST\u1461\u1465\u146a\u1474ar;\u6223ine;\u407ceparator;\u6758ilde;\u6240ThinSpace;\u600ar;\uc000\ud835\udd19pf;\uc000\ud835\udd4dcr;\uc000\ud835\udcb1dash;\u62aa\u0280cefos\u14a7\u14ac\u14b1\u14b6\u14bcirc;\u4174dge;\u62c0r;\uc000\ud835\udd1apf;\uc000\ud835\udd4ecr;\uc000\ud835\udcb2\u0200fios\u14cb\u14d0\u14d2\u14d8r;\uc000\ud835\udd1b;\u439epf;\uc000\ud835\udd4fcr;\uc000\ud835\udcb3\u0480AIUacfosu\u14f1\u14f5\u14f9\u14fd\u1504\u150f\u1514\u151a\u1520cy;\u442fcy;\u4407cy;\u442ecute\u803b\xdd\u40dd\u0100iy\u1509\u150drc;\u4176;\u442br;\uc000\ud835\udd1cpf;\uc000\ud835\udd50cr;\uc000\ud835\udcb4ml;\u4178\u0400Hacdefos\u1535\u1539\u153f\u154b\u154f\u155d\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417d;\u4417ot;\u417b\u01f2\u1554\0\u155boWidt\xe8\u0ad9a;\u4396r;\u6128pf;\u6124cr;\uc000\ud835\udcb5\u0be1\u1583\u158a\u1590\0\u15b0\u15b6\u15bf\0\0\0\0\u15c6\u15db\u15eb\u165f\u166d\0\u1695\u169b\u16b2\u16b9\0\u16becute\u803b\xe1\u40e1reve;\u4103\u0300;Ediuy\u159c\u159d\u15a1\u15a3\u15a8\u15ad\u623e;\uc000\u223e\u0333;\u623frc\u803b\xe2\u40e2te\u80bb\xb4\u0306;\u4430lig\u803b\xe6\u40e6\u0100;r\xb2\u15ba;\uc000\ud835\udd1erave\u803b\xe0\u40e0\u0100ep\u15ca\u15d6\u0100fp\u15cf\u15d4sym;\u6135\xe8\u15d3ha;\u43b1\u0100ap\u15dfc\u0100cl\u15e4\u15e7r;\u4101g;\u6a3f\u0264\u15f0\0\0\u160a\u0280;adsv\u15fa\u15fb\u15ff\u1601\u1607\u6227nd;\u6a55;\u6a5clope;\u6a58;\u6a5a\u0380;elmrsz\u1618\u1619\u161b\u161e\u163f\u164f\u1659\u6220;\u69a4e\xbb\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163a\u163c\u163e;\u69a8;\u69a9;\u69aa;\u69ab;\u69ac;\u69ad;\u69ae;\u69aft\u0100;v\u1645\u1646\u621fb\u0100;d\u164c\u164d\u62be;\u699d\u0100pt\u1654\u1657h;\u6222\xbb\xb9arr;\u637c\u0100gp\u1663\u1667on;\u4105f;\uc000\ud835\udd52\u0380;Eaeiop\u12c1\u167b\u167d\u1682\u1684\u1687\u168a;\u6a70cir;\u6a6f;\u624ad;\u624bs;\u4027rox\u0100;e\u12c1\u1692\xf1\u1683ing\u803b\xe5\u40e5\u0180cty\u16a1\u16a6\u16a8r;\uc000\ud835\udcb6;\u402amp\u0100;e\u12c1\u16af\xf1\u0288ilde\u803b\xe3\u40e3ml\u803b\xe4\u40e4\u0100ci\u16c2\u16c8onin\xf4\u0272nt;\u6a11\u0800Nabcdefiklnoprsu\u16ed\u16f1\u1730\u173c\u1743\u1748\u1778\u177d\u17e0\u17e6\u1839\u1850\u170d\u193d\u1948\u1970ot;\u6aed\u0100cr\u16f6\u171ek\u0200ceps\u1700\u1705\u170d\u1713ong;\u624cpsilon;\u43f6rime;\u6035im\u0100;e\u171a\u171b\u623dq;\u62cd\u0176\u1722\u1726ee;\u62bded\u0100;g\u172c\u172d\u6305e\xbb\u172drk\u0100;t\u135c\u1737brk;\u63b6\u0100oy\u1701\u1741;\u4431quo;\u601e\u0280cmprt\u1753\u175b\u1761\u1764\u1768aus\u0100;e\u010a\u0109ptyv;\u69b0s\xe9\u170cno\xf5\u0113\u0180ahw\u176f\u1771\u1773;\u43b2;\u6136een;\u626cr;\uc000\ud835\udd1fg\u0380costuvw\u178d\u179d\u17b3\u17c1\u17d5\u17db\u17de\u0180aiu\u1794\u1796\u179a\xf0\u0760rc;\u65efp\xbb\u1371\u0180dpt\u17a4\u17a8\u17adot;\u6a00lus;\u6a01imes;\u6a02\u0271\u17b9\0\0\u17becup;\u6a06ar;\u6605riangle\u0100du\u17cd\u17d2own;\u65bdp;\u65b3plus;\u6a04e\xe5\u1444\xe5\u14adarow;\u690d\u0180ako\u17ed\u1826\u1835\u0100cn\u17f2\u1823k\u0180lst\u17fa\u05ab\u1802ozenge;\u69ebriangle\u0200;dlr\u1812\u1813\u1818\u181d\u65b4own;\u65beeft;\u65c2ight;\u65b8k;\u6423\u01b1\u182b\0\u1833\u01b2\u182f\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183e\u184d\u0100;q\u1843\u1846\uc000=\u20e5uiv;\uc000\u2261\u20e5t;\u6310\u0200ptwx\u1859\u185e\u1867\u186cf;\uc000\ud835\udd53\u0100;t\u13cb\u1863om\xbb\u13cctie;\u62c8\u0600DHUVbdhmptuv\u1885\u1896\u18aa\u18bb\u18d7\u18db\u18ec\u18ff\u1905\u190a\u1910\u1921\u0200LRlr\u188e\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18a1\u18a2\u18a4\u18a6\u18a8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18b3\u18b5\u18b7\u18b9;\u655d;\u655a;\u655c;\u6559\u0380;HLRhlr\u18ca\u18cb\u18cd\u18cf\u18d1\u18d3\u18d5\u6551;\u656c;\u6563;\u6560;\u656b;\u6562;\u655fox;\u69c9\u0200LRlr\u18e4\u18e6\u18e8\u18ea;\u6555;\u6552;\u6510;\u650c\u0280;DUdu\u06bd\u18f7\u18f9\u18fb\u18fd;\u6565;\u6568;\u652c;\u6534inus;\u629flus;\u629eimes;\u62a0\u0200LRlr\u1919\u191b\u191d\u191f;\u655b;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193b\u6502;\u656a;\u6561;\u655e;\u653c;\u6524;\u651c\u0100ev\u0123\u1942bar\u803b\xa6\u40a6\u0200ceio\u1951\u1956\u195a\u1960r;\uc000\ud835\udcb7mi;\u604fm\u0100;e\u171a\u171cl\u0180;bh\u1968\u1969\u196b\u405c;\u69c5sub;\u67c8\u016c\u1974\u197el\u0100;e\u1979\u197a\u6022t\xbb\u197ap\u0180;Ee\u012f\u1985\u1987;\u6aae\u0100;q\u06dc\u06db\u0ce1\u19a7\0\u19e8\u1a11\u1a15\u1a32\0\u1a37\u1a50\0\0\u1ab4\0\0\u1ac1\0\0\u1b21\u1b2e\u1b4d\u1b52\0\u1bfd\0\u1c0c\u0180cpr\u19ad\u19b2\u19ddute;\u4107\u0300;abcds\u19bf\u19c0\u19c4\u19ca\u19d5\u19d9\u6229nd;\u6a44rcup;\u6a49\u0100au\u19cf\u19d2p;\u6a4bp;\u6a47ot;\u6a40;\uc000\u2229\ufe00\u0100eo\u19e2\u19e5t;\u6041\xee\u0693\u0200aeiu\u19f0\u19fb\u1a01\u1a05\u01f0\u19f5\0\u19f8s;\u6a4don;\u410ddil\u803b\xe7\u40e7rc;\u4109ps\u0100;s\u1a0c\u1a0d\u6a4cm;\u6a50ot;\u410b\u0180dmn\u1a1b\u1a20\u1a26il\u80bb\xb8\u01adptyv;\u69b2t\u8100\xa2;e\u1a2d\u1a2e\u40a2r\xe4\u01b2r;\uc000\ud835\udd20\u0180cei\u1a3d\u1a40\u1a4dy;\u4447ck\u0100;m\u1a47\u1a48\u6713ark\xbb\u1a48;\u43c7r\u0380;Ecefms\u1a5f\u1a60\u1a62\u1a6b\u1aa4\u1aaa\u1aae\u65cb;\u69c3\u0180;el\u1a69\u1a6a\u1a6d\u42c6q;\u6257e\u0261\u1a74\0\0\u1a88rrow\u0100lr\u1a7c\u1a81eft;\u61baight;\u61bb\u0280RSacd\u1a92\u1a94\u1a96\u1a9a\u1a9f\xbb\u0f47;\u64c8st;\u629birc;\u629aash;\u629dnint;\u6a10id;\u6aefcir;\u69c2ubs\u0100;u\u1abb\u1abc\u6663it\xbb\u1abc\u02ec\u1ac7\u1ad4\u1afa\0\u1b0aon\u0100;e\u1acd\u1ace\u403a\u0100;q\xc7\xc6\u026d\u1ad9\0\0\u1ae2a\u0100;t\u1ade\u1adf\u402c;\u4040\u0180;fl\u1ae8\u1ae9\u1aeb\u6201\xee\u1160e\u0100mx\u1af1\u1af6ent\xbb\u1ae9e\xf3\u024d\u01e7\u1afe\0\u1b07\u0100;d\u12bb\u1b02ot;\u6a6dn\xf4\u0246\u0180fry\u1b10\u1b14\u1b17;\uc000\ud835\udd54o\xe4\u0254\u8100\xa9;s\u0155\u1b1dr;\u6117\u0100ao\u1b25\u1b29rr;\u61b5ss;\u6717\u0100cu\u1b32\u1b37r;\uc000\ud835\udcb8\u0100bp\u1b3c\u1b44\u0100;e\u1b41\u1b42\u6acf;\u6ad1\u0100;e\u1b49\u1b4a\u6ad0;\u6ad2dot;\u62ef\u0380delprvw\u1b60\u1b6c\u1b77\u1b82\u1bac\u1bd4\u1bf9arr\u0100lr\u1b68\u1b6a;\u6938;\u6935\u0270\u1b72\0\0\u1b75r;\u62dec;\u62dfarr\u0100;p\u1b7f\u1b80\u61b6;\u693d\u0300;bcdos\u1b8f\u1b90\u1b96\u1ba1\u1ba5\u1ba8\u622arcap;\u6a48\u0100au\u1b9b\u1b9ep;\u6a46p;\u6a4aot;\u628dr;\u6a45;\uc000\u222a\ufe00\u0200alrv\u1bb5\u1bbf\u1bde\u1be3rr\u0100;m\u1bbc\u1bbd\u61b7;\u693cy\u0180evw\u1bc7\u1bd4\u1bd8q\u0270\u1bce\0\0\u1bd2re\xe3\u1b73u\xe3\u1b75ee;\u62ceedge;\u62cfen\u803b\xa4\u40a4earrow\u0100lr\u1bee\u1bf3eft\xbb\u1b80ight\xbb\u1bbde\xe4\u1bdd\u0100ci\u1c01\u1c07onin\xf4\u01f7nt;\u6231lcty;\u632d\u0980AHabcdefhijlorstuwz\u1c38\u1c3b\u1c3f\u1c5d\u1c69\u1c75\u1c8a\u1c9e\u1cac\u1cb7\u1cfb\u1cff\u1d0d\u1d7b\u1d91\u1dab\u1dbb\u1dc6\u1dcdr\xf2\u0381ar;\u6965\u0200glrs\u1c48\u1c4d\u1c52\u1c54ger;\u6020eth;\u6138\xf2\u1133h\u0100;v\u1c5a\u1c5b\u6010\xbb\u090a\u016b\u1c61\u1c67arow;\u690fa\xe3\u0315\u0100ay\u1c6e\u1c73ron;\u410f;\u4434\u0180;ao\u0332\u1c7c\u1c84\u0100gr\u02bf\u1c81r;\u61catseq;\u6a77\u0180glm\u1c91\u1c94\u1c98\u803b\xb0\u40b0ta;\u43b4ptyv;\u69b1\u0100ir\u1ca3\u1ca8sht;\u697f;\uc000\ud835\udd21ar\u0100lr\u1cb3\u1cb5\xbb\u08dc\xbb\u101e\u0280aegsv\u1cc2\u0378\u1cd6\u1cdc\u1ce0m\u0180;os\u0326\u1cca\u1cd4nd\u0100;s\u0326\u1cd1uit;\u6666amma;\u43ddin;\u62f2\u0180;io\u1ce7\u1ce8\u1cf8\u40f7de\u8100\xf7;o\u1ce7\u1cf0ntimes;\u62c7n\xf8\u1cf7cy;\u4452c\u026f\u1d06\0\0\u1d0arn;\u631eop;\u630d\u0280lptuw\u1d18\u1d1d\u1d22\u1d49\u1d55lar;\u4024f;\uc000\ud835\udd55\u0280;emps\u030b\u1d2d\u1d37\u1d3d\u1d42q\u0100;d\u0352\u1d33ot;\u6251inus;\u6238lus;\u6214quare;\u62a1blebarwedg\xe5\xfan\u0180adh\u112e\u1d5d\u1d67ownarrow\xf3\u1c83arpoon\u0100lr\u1d72\u1d76ef\xf4\u1cb4igh\xf4\u1cb6\u0162\u1d7f\u1d85karo\xf7\u0f42\u026f\u1d8a\0\0\u1d8ern;\u631fop;\u630c\u0180cot\u1d98\u1da3\u1da6\u0100ry\u1d9d\u1da1;\uc000\ud835\udcb9;\u4455l;\u69f6rok;\u4111\u0100dr\u1db0\u1db4ot;\u62f1i\u0100;f\u1dba\u1816\u65bf\u0100ah\u1dc0\u1dc3r\xf2\u0429a\xf2\u0fa6angle;\u69a6\u0100ci\u1dd2\u1dd5y;\u445fgrarr;\u67ff\u0900Dacdefglmnopqrstux\u1e01\u1e09\u1e19\u1e38\u0578\u1e3c\u1e49\u1e61\u1e7e\u1ea5\u1eaf\u1ebd\u1ee1\u1f2a\u1f37\u1f44\u1f4e\u1f5a\u0100Do\u1e06\u1d34o\xf4\u1c89\u0100cs\u1e0e\u1e14ute\u803b\xe9\u40e9ter;\u6a6e\u0200aioy\u1e22\u1e27\u1e31\u1e36ron;\u411br\u0100;c\u1e2d\u1e2e\u6256\u803b\xea\u40ealon;\u6255;\u444dot;\u4117\u0100Dr\u1e41\u1e45ot;\u6252;\uc000\ud835\udd22\u0180;rs\u1e50\u1e51\u1e57\u6a9aave\u803b\xe8\u40e8\u0100;d\u1e5c\u1e5d\u6a96ot;\u6a98\u0200;ils\u1e6a\u1e6b\u1e72\u1e74\u6a99nters;\u63e7;\u6113\u0100;d\u1e79\u1e7a\u6a95ot;\u6a97\u0180aps\u1e85\u1e89\u1e97cr;\u4113ty\u0180;sv\u1e92\u1e93\u1e95\u6205et\xbb\u1e93p\u01001;\u1e9d\u1ea4\u0133\u1ea1\u1ea3;\u6004;\u6005\u6003\u0100gs\u1eaa\u1eac;\u414bp;\u6002\u0100gp\u1eb4\u1eb8on;\u4119f;\uc000\ud835\udd56\u0180als\u1ec4\u1ece\u1ed2r\u0100;s\u1eca\u1ecb\u62d5l;\u69e3us;\u6a71i\u0180;lv\u1eda\u1edb\u1edf\u43b5on\xbb\u1edb;\u43f5\u0200csuv\u1eea\u1ef3\u1f0b\u1f23\u0100io\u1eef\u1e31rc\xbb\u1e2e\u0269\u1ef9\0\0\u1efb\xed\u0548ant\u0100gl\u1f02\u1f06tr\xbb\u1e5dess\xbb\u1e7a\u0180aei\u1f12\u1f16\u1f1als;\u403dst;\u625fv\u0100;D\u0235\u1f20D;\u6a78parsl;\u69e5\u0100Da\u1f2f\u1f33ot;\u6253rr;\u6971\u0180cdi\u1f3e\u1f41\u1ef8r;\u612fo\xf4\u0352\u0100ah\u1f49\u1f4b;\u43b7\u803b\xf0\u40f0\u0100mr\u1f53\u1f57l\u803b\xeb\u40ebo;\u60ac\u0180cip\u1f61\u1f64\u1f67l;\u4021s\xf4\u056e\u0100eo\u1f6c\u1f74ctatio\xee\u0559nential\xe5\u0579\u09e1\u1f92\0\u1f9e\0\u1fa1\u1fa7\0\0\u1fc6\u1fcc\0\u1fd3\0\u1fe6\u1fea\u2000\0\u2008\u205allingdotse\xf1\u1e44y;\u4444male;\u6640\u0180ilr\u1fad\u1fb3\u1fc1lig;\u8000\ufb03\u0269\u1fb9\0\0\u1fbdg;\u8000\ufb00ig;\u8000\ufb04;\uc000\ud835\udd23lig;\u8000\ufb01lig;\uc000fj\u0180alt\u1fd9\u1fdc\u1fe1t;\u666dig;\u8000\ufb02ns;\u65b1of;\u4192\u01f0\u1fee\0\u1ff3f;\uc000\ud835\udd57\u0100ak\u05bf\u1ff7\u0100;v\u1ffc\u1ffd\u62d4;\u6ad9artint;\u6a0d\u0100ao\u200c\u2055\u0100cs\u2011\u2052\u03b1\u201a\u2030\u2038\u2045\u2048\0\u2050\u03b2\u2022\u2025\u2027\u202a\u202c\0\u202e\u803b\xbd\u40bd;\u6153\u803b\xbc\u40bc;\u6155;\u6159;\u615b\u01b3\u2034\0\u2036;\u6154;\u6156\u02b4\u203e\u2041\0\0\u2043\u803b\xbe\u40be;\u6157;\u615c5;\u6158\u01b6\u204c\0\u204e;\u615a;\u615d8;\u615el;\u6044wn;\u6322cr;\uc000\ud835\udcbb\u0880Eabcdefgijlnorstv\u2082\u2089\u209f\u20a5\u20b0\u20b4\u20f0\u20f5\u20fa\u20ff\u2103\u2112\u2138\u0317\u213e\u2152\u219e\u0100;l\u064d\u2087;\u6a8c\u0180cmp\u2090\u2095\u209dute;\u41f5ma\u0100;d\u209c\u1cda\u43b3;\u6a86reve;\u411f\u0100iy\u20aa\u20aerc;\u411d;\u4433ot;\u4121\u0200;lqs\u063e\u0642\u20bd\u20c9\u0180;qs\u063e\u064c\u20c4lan\xf4\u0665\u0200;cdl\u0665\u20d2\u20d5\u20e5c;\u6aa9ot\u0100;o\u20dc\u20dd\u6a80\u0100;l\u20e2\u20e3\u6a82;\u6a84\u0100;e\u20ea\u20ed\uc000\u22db\ufe00s;\u6a94r;\uc000\ud835\udd24\u0100;g\u0673\u061bmel;\u6137cy;\u4453\u0200;Eaj\u065a\u210c\u210e\u2110;\u6a92;\u6aa5;\u6aa4\u0200Eaes\u211b\u211d\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6a8arox\xbb\u2124\u0100;q\u212e\u212f\u6a88\u0100;q\u212e\u211bim;\u62e7pf;\uc000\ud835\udd58\u0100ci\u2143\u2146r;\u610am\u0180;el\u066b\u214e\u2150;\u6a8e;\u6a90\u8300>;cdlqr\u05ee\u2160\u216a\u216e\u2173\u2179\u0100ci\u2165\u2167;\u6aa7r;\u6a7aot;\u62d7Par;\u6995uest;\u6a7c\u0280adels\u2184\u216a\u2190\u0656\u219b\u01f0\u2189\0\u218epro\xf8\u209er;\u6978q\u0100lq\u063f\u2196les\xf3\u2088i\xed\u066b\u0100en\u21a3\u21adrtneqq;\uc000\u2269\ufe00\xc5\u21aa\u0500Aabcefkosy\u21c4\u21c7\u21f1\u21f5\u21fa\u2218\u221d\u222f\u2268\u227dr\xf2\u03a0\u0200ilmr\u21d0\u21d4\u21d7\u21dbrs\xf0\u1484f\xbb\u2024il\xf4\u06a9\u0100dr\u21e0\u21e4cy;\u444a\u0180;cw\u08f4\u21eb\u21efir;\u6948;\u61adar;\u610firc;\u4125\u0180alr\u2201\u220e\u2213rts\u0100;u\u2209\u220a\u6665it\xbb\u220alip;\u6026con;\u62b9r;\uc000\ud835\udd25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223a\u223e\u2243\u225e\u2263rr;\u61fftht;\u623bk\u0100lr\u2249\u2253eftarrow;\u61a9ightarrow;\u61aaf;\uc000\ud835\udd59bar;\u6015\u0180clt\u226f\u2274\u2278r;\uc000\ud835\udcbdas\xe8\u21f4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xbb\u1c5b\u0ae1\u22a3\0\u22aa\0\u22b8\u22c5\u22ce\0\u22d5\u22f3\0\0\u22f8\u2322\u2367\u2362\u237f\0\u2386\u23aa\u23b4cute\u803b\xed\u40ed\u0180;iy\u0771\u22b0\u22b5rc\u803b\xee\u40ee;\u4438\u0100cx\u22bc\u22bfy;\u4435cl\u803b\xa1\u40a1\u0100fr\u039f\u22c9;\uc000\ud835\udd26rave\u803b\xec\u40ec\u0200;ino\u073e\u22dd\u22e9\u22ee\u0100in\u22e2\u22e6nt;\u6a0ct;\u622dfin;\u69dcta;\u6129lig;\u4133\u0180aop\u22fe\u231a\u231d\u0180cgt\u2305\u2308\u2317r;\u412b\u0180elp\u071f\u230f\u2313in\xe5\u078ear\xf4\u0720h;\u4131f;\u62b7ed;\u41b5\u0280;cfot\u04f4\u232c\u2331\u233d\u2341are;\u6105in\u0100;t\u2338\u2339\u621eie;\u69dddo\xf4\u2319\u0280;celp\u0757\u234c\u2350\u235b\u2361al;\u62ba\u0100gr\u2355\u2359er\xf3\u1563\xe3\u234darhk;\u6a17rod;\u6a3c\u0200cgpt\u236f\u2372\u2376\u237by;\u4451on;\u412ff;\uc000\ud835\udd5aa;\u43b9uest\u803b\xbf\u40bf\u0100ci\u238a\u238fr;\uc000\ud835\udcben\u0280;Edsv\u04f4\u239b\u239d\u23a1\u04f3;\u62f9ot;\u62f5\u0100;v\u23a6\u23a7\u62f4;\u62f3\u0100;i\u0777\u23aelde;\u4129\u01eb\u23b8\0\u23bccy;\u4456l\u803b\xef\u40ef\u0300cfmosu\u23cc\u23d7\u23dc\u23e1\u23e7\u23f5\u0100iy\u23d1\u23d5rc;\u4135;\u4439r;\uc000\ud835\udd27ath;\u4237pf;\uc000\ud835\udd5b\u01e3\u23ec\0\u23f1r;\uc000\ud835\udcbfrcy;\u4458kcy;\u4454\u0400acfghjos\u240b\u2416\u2422\u2427\u242d\u2431\u2435\u243bppa\u0100;v\u2413\u2414\u43ba;\u43f0\u0100ey\u241b\u2420dil;\u4137;\u443ar;\uc000\ud835\udd28reen;\u4138cy;\u4445cy;\u445cpf;\uc000\ud835\udd5ccr;\uc000\ud835\udcc0\u0b80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248d\u2491\u250e\u253d\u255a\u2580\u264e\u265e\u2665\u2679\u267d\u269a\u26b2\u26d8\u275d\u2768\u278b\u27c0\u2801\u2812\u0180art\u2477\u247a\u247cr\xf2\u09c6\xf2\u0395ail;\u691barr;\u690e\u0100;g\u0994\u248b;\u6a8bar;\u6962\u0963\u24a5\0\u24aa\0\u24b1\0\0\0\0\0\u24b5\u24ba\0\u24c6\u24c8\u24cd\0\u24f9ute;\u413amptyv;\u69b4ra\xee\u084cbda;\u43bbg\u0180;dl\u088e\u24c1\u24c3;\u6991\xe5\u088e;\u6a85uo\u803b\xab\u40abr\u0400;bfhlpst\u0899\u24de\u24e6\u24e9\u24eb\u24ee\u24f1\u24f5\u0100;f\u089d\u24e3s;\u691fs;\u691d\xeb\u2252p;\u61abl;\u6939im;\u6973l;\u61a2\u0180;ae\u24ff\u2500\u2504\u6aabil;\u6919\u0100;s\u2509\u250a\u6aad;\uc000\u2aad\ufe00\u0180abr\u2515\u2519\u251drr;\u690crk;\u6772\u0100ak\u2522\u252cc\u0100ek\u2528\u252a;\u407b;\u405b\u0100es\u2531\u2533;\u698bl\u0100du\u2539\u253b;\u698f;\u698d\u0200aeuy\u2546\u254b\u2556\u2558ron;\u413e\u0100di\u2550\u2554il;\u413c\xec\u08b0\xe2\u2529;\u443b\u0200cqrs\u2563\u2566\u256d\u257da;\u6936uo\u0100;r\u0e19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694bh;\u61b2\u0280;fgqs\u258b\u258c\u0989\u25f3\u25ff\u6264t\u0280ahlrt\u2598\u25a4\u25b7\u25c2\u25e8rrow\u0100;t\u0899\u25a1a\xe9\u24f6arpoon\u0100du\u25af\u25b4own\xbb\u045ap\xbb\u0966eftarrows;\u61c7ight\u0180ahs\u25cd\u25d6\u25derrow\u0100;s\u08f4\u08a7arpoon\xf3\u0f98quigarro\xf7\u21f0hreetimes;\u62cb\u0180;qs\u258b\u0993\u25falan\xf4\u09ac\u0280;cdgs\u09ac\u260a\u260d\u261d\u2628c;\u6aa8ot\u0100;o\u2614\u2615\u6a7f\u0100;r\u261a\u261b\u6a81;\u6a83\u0100;e\u2622\u2625\uc000\u22da\ufe00s;\u6a93\u0280adegs\u2633\u2639\u263d\u2649\u264bppro\xf8\u24c6ot;\u62d6q\u0100gq\u2643\u2645\xf4\u0989gt\xf2\u248c\xf4\u099bi\xed\u09b2\u0180ilr\u2655\u08e1\u265asht;\u697c;\uc000\ud835\udd29\u0100;E\u099c\u2663;\u6a91\u0161\u2669\u2676r\u0100du\u25b2\u266e\u0100;l\u0965\u2673;\u696alk;\u6584cy;\u4459\u0280;acht\u0a48\u2688\u268b\u2691\u2696r\xf2\u25c1orne\xf2\u1d08ard;\u696bri;\u65fa\u0100io\u269f\u26a4dot;\u4140ust\u0100;a\u26ac\u26ad\u63b0che\xbb\u26ad\u0200Eaes\u26bb\u26bd\u26c9\u26d4;\u6268p\u0100;p\u26c3\u26c4\u6a89rox\xbb\u26c4\u0100;q\u26ce\u26cf\u6a87\u0100;q\u26ce\u26bbim;\u62e6\u0400abnoptwz\u26e9\u26f4\u26f7\u271a\u272f\u2741\u2747\u2750\u0100nr\u26ee\u26f1g;\u67ecr;\u61fdr\xeb\u08c1g\u0180lmr\u26ff\u270d\u2714eft\u0100ar\u09e6\u2707ight\xe1\u09f2apsto;\u67fcight\xe1\u09fdparrow\u0100lr\u2725\u2729ef\xf4\u24edight;\u61ac\u0180afl\u2736\u2739\u273dr;\u6985;\uc000\ud835\udd5dus;\u6a2dimes;\u6a34\u0161\u274b\u274fst;\u6217\xe1\u134e\u0180;ef\u2757\u2758\u1800\u65cange\xbb\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277c\u2785\u2787r\xf2\u08a8orne\xf2\u1d8car\u0100;d\u0f98\u2783;\u696d;\u600eri;\u62bf\u0300achiqt\u2798\u279d\u0a40\u27a2\u27ae\u27bbquo;\u6039r;\uc000\ud835\udcc1m\u0180;eg\u09b2\u27aa\u27ac;\u6a8d;\u6a8f\u0100bu\u252a\u27b3o\u0100;r\u0e1f\u27b9;\u601arok;\u4142\u8400<;cdhilqr\u082b\u27d2\u2639\u27dc\u27e0\u27e5\u27ea\u27f0\u0100ci\u27d7\u27d9;\u6aa6r;\u6a79re\xe5\u25f2mes;\u62c9arr;\u6976uest;\u6a7b\u0100Pi\u27f5\u27f9ar;\u6996\u0180;ef\u2800\u092d\u181b\u65c3r\u0100du\u2807\u280dshar;\u694ahar;\u6966\u0100en\u2817\u2821rtneqq;\uc000\u2268\ufe00\xc5\u281e\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288e\u2893\u28a0\u28a5\u28a8\u28da\u28e2\u28e4\u0a83\u28f3\u2902Dot;\u623a\u0200clpr\u284e\u2852\u2863\u287dr\u803b\xaf\u40af\u0100et\u2857\u2859;\u6642\u0100;e\u285e\u285f\u6720se\xbb\u285f\u0100;s\u103b\u2868to\u0200;dlu\u103b\u2873\u2877\u287bow\xee\u048cef\xf4\u090f\xf0\u13d1ker;\u65ae\u0100oy\u2887\u288cmma;\u6a29;\u443cash;\u6014asuredangle\xbb\u1626r;\uc000\ud835\udd2ao;\u6127\u0180cdn\u28af\u28b4\u28c9ro\u803b\xb5\u40b5\u0200;acd\u1464\u28bd\u28c0\u28c4s\xf4\u16a7ir;\u6af0ot\u80bb\xb7\u01b5us\u0180;bd\u28d2\u1903\u28d3\u6212\u0100;u\u1d3c\u28d8;\u6a2a\u0163\u28de\u28e1p;\u6adb\xf2\u2212\xf0\u0a81\u0100dp\u28e9\u28eeels;\u62a7f;\uc000\ud835\udd5e\u0100ct\u28f8\u28fdr;\uc000\ud835\udcc2pos\xbb\u159d\u0180;lm\u2909\u290a\u290d\u43bctimap;\u62b8\u0c00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297e\u2989\u2998\u29da\u29e9\u2a15\u2a1a\u2a58\u2a5d\u2a83\u2a95\u2aa4\u2aa8\u2b04\u2b07\u2b44\u2b7f\u2bae\u2c34\u2c67\u2c7c\u2ce9\u0100gt\u2947\u294b;\uc000\u22d9\u0338\u0100;v\u2950\u0bcf\uc000\u226b\u20d2\u0180elt\u295a\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61cdightarrow;\u61ce;\uc000\u22d8\u0338\u0100;v\u297b\u0c47\uc000\u226a\u20d2ightarrow;\u61cf\u0100Dd\u298e\u2993ash;\u62afash;\u62ae\u0280bcnpt\u29a3\u29a7\u29ac\u29b1\u29ccla\xbb\u02deute;\u4144g;\uc000\u2220\u20d2\u0280;Eiop\u0d84\u29bc\u29c0\u29c5\u29c8;\uc000\u2a70\u0338d;\uc000\u224b\u0338s;\u4149ro\xf8\u0d84ur\u0100;a\u29d3\u29d4\u666el\u0100;s\u29d3\u0b38\u01f3\u29df\0\u29e3p\u80bb\xa0\u0b37mp\u0100;e\u0bf9\u0c00\u0280aeouy\u29f4\u29fe\u2a03\u2a10\u2a13\u01f0\u29f9\0\u29fb;\u6a43on;\u4148dil;\u4146ng\u0100;d\u0d7e\u2a0aot;\uc000\u2a6d\u0338p;\u6a42;\u443dash;\u6013\u0380;Aadqsx\u0b92\u2a29\u2a2d\u2a3b\u2a41\u2a45\u2a50rr;\u61d7r\u0100hr\u2a33\u2a36k;\u6924\u0100;o\u13f2\u13f0ot;\uc000\u2250\u0338ui\xf6\u0b63\u0100ei\u2a4a\u2a4ear;\u6928\xed\u0b98ist\u0100;s\u0ba0\u0b9fr;\uc000\ud835\udd2b\u0200Eest\u0bc5\u2a66\u2a79\u2a7c\u0180;qs\u0bbc\u2a6d\u0be1\u0180;qs\u0bbc\u0bc5\u2a74lan\xf4\u0be2i\xed\u0bea\u0100;r\u0bb6\u2a81\xbb\u0bb7\u0180Aap\u2a8a\u2a8d\u2a91r\xf2\u2971rr;\u61aear;\u6af2\u0180;sv\u0f8d\u2a9c\u0f8c\u0100;d\u2aa1\u2aa2\u62fc;\u62facy;\u445a\u0380AEadest\u2ab7\u2aba\u2abe\u2ac2\u2ac5\u2af6\u2af9r\xf2\u2966;\uc000\u2266\u0338rr;\u619ar;\u6025\u0200;fqs\u0c3b\u2ace\u2ae3\u2aeft\u0100ar\u2ad4\u2ad9rro\xf7\u2ac1ightarro\xf7\u2a90\u0180;qs\u0c3b\u2aba\u2aealan\xf4\u0c55\u0100;s\u0c55\u2af4\xbb\u0c36i\xed\u0c5d\u0100;r\u0c35\u2afei\u0100;e\u0c1a\u0c25i\xe4\u0d90\u0100pt\u2b0c\u2b11f;\uc000\ud835\udd5f\u8180\xac;in\u2b19\u2b1a\u2b36\u40acn\u0200;Edv\u0b89\u2b24\u2b28\u2b2e;\uc000\u22f9\u0338ot;\uc000\u22f5\u0338\u01e1\u0b89\u2b33\u2b35;\u62f7;\u62f6i\u0100;v\u0cb8\u2b3c\u01e1\u0cb8\u2b41\u2b43;\u62fe;\u62fd\u0180aor\u2b4b\u2b63\u2b69r\u0200;ast\u0b7b\u2b55\u2b5a\u2b5flle\xec\u0b7bl;\uc000\u2afd\u20e5;\uc000\u2202\u0338lint;\u6a14\u0180;ce\u0c92\u2b70\u2b73u\xe5\u0ca5\u0100;c\u0c98\u2b78\u0100;e\u0c92\u2b7d\xf1\u0c98\u0200Aait\u2b88\u2b8b\u2b9d\u2ba7r\xf2\u2988rr\u0180;cw\u2b94\u2b95\u2b99\u619b;\uc000\u2933\u0338;\uc000\u219d\u0338ghtarrow\xbb\u2b95ri\u0100;e\u0ccb\u0cd6\u0380chimpqu\u2bbd\u2bcd\u2bd9\u2b04\u0b78\u2be4\u2bef\u0200;cer\u0d32\u2bc6\u0d37\u2bc9u\xe5\u0d45;\uc000\ud835\udcc3ort\u026d\u2b05\0\0\u2bd6ar\xe1\u2b56m\u0100;e\u0d6e\u2bdf\u0100;q\u0d74\u0d73su\u0100bp\u2beb\u2bed\xe5\u0cf8\xe5\u0d0b\u0180bcp\u2bf6\u2c11\u2c19\u0200;Ees\u2bff\u2c00\u0d22\u2c04\u6284;\uc000\u2ac5\u0338et\u0100;e\u0d1b\u2c0bq\u0100;q\u0d23\u2c00c\u0100;e\u0d32\u2c17\xf1\u0d38\u0200;Ees\u2c22\u2c23\u0d5f\u2c27\u6285;\uc000\u2ac6\u0338et\u0100;e\u0d58\u2c2eq\u0100;q\u0d60\u2c23\u0200gilr\u2c3d\u2c3f\u2c45\u2c47\xec\u0bd7lde\u803b\xf1\u40f1\xe7\u0c43iangle\u0100lr\u2c52\u2c5ceft\u0100;e\u0c1a\u2c5a\xf1\u0c26ight\u0100;e\u0ccb\u2c65\xf1\u0cd7\u0100;m\u2c6c\u2c6d\u43bd\u0180;es\u2c74\u2c75\u2c79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2c8f\u2c94\u2c99\u2c9e\u2ca3\u2cb0\u2cb6\u2cd3\u2ce3ash;\u62adarr;\u6904p;\uc000\u224d\u20d2ash;\u62ac\u0100et\u2ca8\u2cac;\uc000\u2265\u20d2;\uc000>\u20d2nfin;\u69de\u0180Aet\u2cbd\u2cc1\u2cc5rr;\u6902;\uc000\u2264\u20d2\u0100;r\u2cca\u2ccd\uc000<\u20d2ie;\uc000\u22b4\u20d2\u0100At\u2cd8\u2cdcrr;\u6903rie;\uc000\u22b5\u20d2im;\uc000\u223c\u20d2\u0180Aan\u2cf0\u2cf4\u2d02rr;\u61d6r\u0100hr\u2cfa\u2cfdk;\u6923\u0100;o\u13e7\u13e5ear;\u6927\u1253\u1a95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2d2d\0\u2d38\u2d48\u2d60\u2d65\u2d72\u2d84\u1b07\0\0\u2d8d\u2dab\0\u2dc8\u2dce\0\u2ddc\u2e19\u2e2b\u2e3e\u2e43\u0100cs\u2d31\u1a97ute\u803b\xf3\u40f3\u0100iy\u2d3c\u2d45r\u0100;c\u1a9e\u2d42\u803b\xf4\u40f4;\u443e\u0280abios\u1aa0\u2d52\u2d57\u01c8\u2d5alac;\u4151v;\u6a38old;\u69bclig;\u4153\u0100cr\u2d69\u2d6dir;\u69bf;\uc000\ud835\udd2c\u036f\u2d79\0\0\u2d7c\0\u2d82n;\u42dbave\u803b\xf2\u40f2;\u69c1\u0100bm\u2d88\u0df4ar;\u69b5\u0200acit\u2d95\u2d98\u2da5\u2da8r\xf2\u1a80\u0100ir\u2d9d\u2da0r;\u69beoss;\u69bbn\xe5\u0e52;\u69c0\u0180aei\u2db1\u2db5\u2db9cr;\u414dga;\u43c9\u0180cdn\u2dc0\u2dc5\u01cdron;\u43bf;\u69b6pf;\uc000\ud835\udd60\u0180ael\u2dd4\u2dd7\u01d2r;\u69b7rp;\u69b9\u0380;adiosv\u2dea\u2deb\u2dee\u2e08\u2e0d\u2e10\u2e16\u6228r\xf2\u1a86\u0200;efm\u2df7\u2df8\u2e02\u2e05\u6a5dr\u0100;o\u2dfe\u2dff\u6134f\xbb\u2dff\u803b\xaa\u40aa\u803b\xba\u40bagof;\u62b6r;\u6a56lope;\u6a57;\u6a5b\u0180clo\u2e1f\u2e21\u2e27\xf2\u2e01ash\u803b\xf8\u40f8l;\u6298i\u016c\u2e2f\u2e34de\u803b\xf5\u40f5es\u0100;a\u01db\u2e3as;\u6a36ml\u803b\xf6\u40f6bar;\u633d\u0ae1\u2e5e\0\u2e7d\0\u2e80\u2e9d\0\u2ea2\u2eb9\0\0\u2ecb\u0e9c\0\u2f13\0\0\u2f2b\u2fbc\0\u2fc8r\u0200;ast\u0403\u2e67\u2e72\u0e85\u8100\xb6;l\u2e6d\u2e6e\u40b6le\xec\u0403\u0269\u2e78\0\0\u2e7bm;\u6af3;\u6afdy;\u443fr\u0280cimpt\u2e8b\u2e8f\u2e93\u1865\u2e97nt;\u4025od;\u402eil;\u6030enk;\u6031r;\uc000\ud835\udd2d\u0180imo\u2ea8\u2eb0\u2eb4\u0100;v\u2ead\u2eae\u43c6;\u43d5ma\xf4\u0a76ne;\u660e\u0180;tv\u2ebf\u2ec0\u2ec8\u43c0chfork\xbb\u1ffd;\u43d6\u0100au\u2ecf\u2edfn\u0100ck\u2ed5\u2eddk\u0100;h\u21f4\u2edb;\u610e\xf6\u21f4s\u0480;abcdemst\u2ef3\u2ef4\u1908\u2ef9\u2efd\u2f04\u2f06\u2f0a\u2f0e\u402bcir;\u6a23ir;\u6a22\u0100ou\u1d40\u2f02;\u6a25;\u6a72n\u80bb\xb1\u0e9dim;\u6a26wo;\u6a27\u0180ipu\u2f19\u2f20\u2f25ntint;\u6a15f;\uc000\ud835\udd61nd\u803b\xa3\u40a3\u0500;Eaceinosu\u0ec8\u2f3f\u2f41\u2f44\u2f47\u2f81\u2f89\u2f92\u2f7e\u2fb6;\u6ab3p;\u6ab7u\xe5\u0ed9\u0100;c\u0ece\u2f4c\u0300;acens\u0ec8\u2f59\u2f5f\u2f66\u2f68\u2f7eppro\xf8\u2f43urlye\xf1\u0ed9\xf1\u0ece\u0180aes\u2f6f\u2f76\u2f7approx;\u6ab9qq;\u6ab5im;\u62e8i\xed\u0edfme\u0100;s\u2f88\u0eae\u6032\u0180Eas\u2f78\u2f90\u2f7a\xf0\u2f75\u0180dfp\u0eec\u2f99\u2faf\u0180als\u2fa0\u2fa5\u2faalar;\u632eine;\u6312urf;\u6313\u0100;t\u0efb\u2fb4\xef\u0efbrel;\u62b0\u0100ci\u2fc0\u2fc5r;\uc000\ud835\udcc5;\u43c8ncsp;\u6008\u0300fiopsu\u2fda\u22e2\u2fdf\u2fe5\u2feb\u2ff1r;\uc000\ud835\udd2epf;\uc000\ud835\udd62rime;\u6057cr;\uc000\ud835\udcc6\u0180aeo\u2ff8\u3009\u3013t\u0100ei\u2ffe\u3005rnion\xf3\u06b0nt;\u6a16st\u0100;e\u3010\u3011\u403f\xf1\u1f19\xf4\u0f14\u0a80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30e0\u310e\u312b\u3147\u3162\u3172\u318e\u3206\u3215\u3224\u3229\u3258\u326e\u3272\u3290\u32b0\u32b7\u0180art\u3047\u304a\u304cr\xf2\u10b3\xf2\u03ddail;\u691car\xf2\u1c65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307f\u308f\u3094\u30cc\u0100eu\u306d\u3071;\uc000\u223d\u0331te;\u4155i\xe3\u116emptyv;\u69b3g\u0200;del\u0fd1\u3089\u308b\u308d;\u6992;\u69a5\xe5\u0fd1uo\u803b\xbb\u40bbr\u0580;abcfhlpstw\u0fdc\u30ac\u30af\u30b7\u30b9\u30bc\u30be\u30c0\u30c3\u30c7\u30cap;\u6975\u0100;f\u0fe0\u30b4s;\u6920;\u6933s;\u691e\xeb\u225d\xf0\u272el;\u6945im;\u6974l;\u61a3;\u619d\u0100ai\u30d1\u30d5il;\u691ao\u0100;n\u30db\u30dc\u6236al\xf3\u0f1e\u0180abr\u30e7\u30ea\u30eer\xf2\u17e5rk;\u6773\u0100ak\u30f3\u30fdc\u0100ek\u30f9\u30fb;\u407d;\u405d\u0100es\u3102\u3104;\u698cl\u0100du\u310a\u310c;\u698e;\u6990\u0200aeuy\u3117\u311c\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xec\u0ff2\xe2\u30fa;\u4440\u0200clqs\u3134\u3137\u313d\u3144a;\u6937dhar;\u6969uo\u0100;r\u020e\u020dh;\u61b3\u0180acg\u314e\u315f\u0f44l\u0200;ips\u0f78\u3158\u315b\u109cn\xe5\u10bbar\xf4\u0fa9t;\u65ad\u0180ilr\u3169\u1023\u316esht;\u697d;\uc000\ud835\udd2f\u0100ao\u3177\u3186r\u0100du\u317d\u317f\xbb\u047b\u0100;l\u1091\u3184;\u696c\u0100;v\u318b\u318c\u43c1;\u43f1\u0180gns\u3195\u31f9\u31fcht\u0300ahlrst\u31a4\u31b0\u31c2\u31d8\u31e4\u31eerrow\u0100;t\u0fdc\u31ada\xe9\u30c8arpoon\u0100du\u31bb\u31bfow\xee\u317ep\xbb\u1092eft\u0100ah\u31ca\u31d0rrow\xf3\u0feaarpoon\xf3\u0551ightarrows;\u61c9quigarro\xf7\u30cbhreetimes;\u62ccg;\u42daingdotse\xf1\u1f32\u0180ahm\u320d\u3210\u3213r\xf2\u0feaa\xf2\u0551;\u600foust\u0100;a\u321e\u321f\u63b1che\xbb\u321fmid;\u6aee\u0200abpt\u3232\u323d\u3240\u3252\u0100nr\u3237\u323ag;\u67edr;\u61fer\xeb\u1003\u0180afl\u3247\u324a\u324er;\u6986;\uc000\ud835\udd63us;\u6a2eimes;\u6a35\u0100ap\u325d\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6a12ar\xf2\u31e3\u0200achq\u327b\u3280\u10bc\u3285quo;\u603ar;\uc000\ud835\udcc7\u0100bu\u30fb\u328ao\u0100;r\u0214\u0213\u0180hir\u3297\u329b\u32a0re\xe5\u31f8mes;\u62cai\u0200;efl\u32aa\u1059\u1821\u32ab\u65b9tri;\u69celuhar;\u6968;\u611e\u0d61\u32d5\u32db\u32df\u332c\u3338\u3371\0\u337a\u33a4\0\0\u33ec\u33f0\0\u3428\u3448\u345a\u34ad\u34b1\u34ca\u34f1\0\u3616\0\0\u3633cute;\u415bqu\xef\u27ba\u0500;Eaceinpsy\u11ed\u32f3\u32f5\u32ff\u3302\u330b\u330f\u331f\u3326\u3329;\u6ab4\u01f0\u32fa\0\u32fc;\u6ab8on;\u4161u\xe5\u11fe\u0100;d\u11f3\u3307il;\u415frc;\u415d\u0180Eas\u3316\u3318\u331b;\u6ab6p;\u6abaim;\u62e9olint;\u6a13i\xed\u1204;\u4441ot\u0180;be\u3334\u1d47\u3335\u62c5;\u6a66\u0380Aacmstx\u3346\u334a\u3357\u335b\u335e\u3363\u336drr;\u61d8r\u0100hr\u3350\u3352\xeb\u2228\u0100;o\u0a36\u0a34t\u803b\xa7\u40a7i;\u403bwar;\u6929m\u0100in\u3369\xf0nu\xf3\xf1t;\u6736r\u0100;o\u3376\u2055\uc000\ud835\udd30\u0200acoy\u3382\u3386\u3391\u33a0rp;\u666f\u0100hy\u338b\u338fcy;\u4449;\u4448rt\u026d\u3399\0\0\u339ci\xe4\u1464ara\xec\u2e6f\u803b\xad\u40ad\u0100gm\u33a8\u33b4ma\u0180;fv\u33b1\u33b2\u33b2\u43c3;\u43c2\u0400;deglnpr\u12ab\u33c5\u33c9\u33ce\u33d6\u33de\u33e1\u33e6ot;\u6a6a\u0100;q\u12b1\u12b0\u0100;E\u33d3\u33d4\u6a9e;\u6aa0\u0100;E\u33db\u33dc\u6a9d;\u6a9fe;\u6246lus;\u6a24arr;\u6972ar\xf2\u113d\u0200aeit\u33f8\u3408\u340f\u3417\u0100ls\u33fd\u3404lsetm\xe9\u336ahp;\u6a33parsl;\u69e4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341c\u341d\u6aaa\u0100;s\u3422\u3423\u6aac;\uc000\u2aac\ufe00\u0180flp\u342e\u3433\u3442tcy;\u444c\u0100;b\u3438\u3439\u402f\u0100;a\u343e\u343f\u69c4r;\u633ff;\uc000\ud835\udd64a\u0100dr\u344d\u0402es\u0100;u\u3454\u3455\u6660it\xbb\u3455\u0180csu\u3460\u3479\u349f\u0100au\u3465\u346fp\u0100;s\u1188\u346b;\uc000\u2293\ufe00p\u0100;s\u11b4\u3475;\uc000\u2294\ufe00u\u0100bp\u347f\u348f\u0180;es\u1197\u119c\u3486et\u0100;e\u1197\u348d\xf1\u119d\u0180;es\u11a8\u11ad\u3496et\u0100;e\u11a8\u349d\xf1\u11ae\u0180;af\u117b\u34a6\u05b0r\u0165\u34ab\u05b1\xbb\u117car\xf2\u1148\u0200cemt\u34b9\u34be\u34c2\u34c5r;\uc000\ud835\udcc8tm\xee\xf1i\xec\u3415ar\xe6\u11be\u0100ar\u34ce\u34d5r\u0100;f\u34d4\u17bf\u6606\u0100an\u34da\u34edight\u0100ep\u34e3\u34eapsilo\xee\u1ee0h\xe9\u2eafs\xbb\u2852\u0280bcmnp\u34fb\u355e\u1209\u358b\u358e\u0480;Edemnprs\u350e\u350f\u3511\u3515\u351e\u3523\u352c\u3531\u3536\u6282;\u6ac5ot;\u6abd\u0100;d\u11da\u351aot;\u6ac3ult;\u6ac1\u0100Ee\u3528\u352a;\u6acb;\u628alus;\u6abfarr;\u6979\u0180eiu\u353d\u3552\u3555t\u0180;en\u350e\u3545\u354bq\u0100;q\u11da\u350feq\u0100;q\u352b\u3528m;\u6ac7\u0100bp\u355a\u355c;\u6ad5;\u6ad3c\u0300;acens\u11ed\u356c\u3572\u3579\u357b\u3326ppro\xf8\u32faurlye\xf1\u11fe\xf1\u11f3\u0180aes\u3582\u3588\u331bppro\xf8\u331aq\xf1\u3317g;\u666a\u0680123;Edehlmnps\u35a9\u35ac\u35af\u121c\u35b2\u35b4\u35c0\u35c9\u35d5\u35da\u35df\u35e8\u35ed\u803b\xb9\u40b9\u803b\xb2\u40b2\u803b\xb3\u40b3;\u6ac6\u0100os\u35b9\u35bct;\u6abeub;\u6ad8\u0100;d\u1222\u35c5ot;\u6ac4s\u0100ou\u35cf\u35d2l;\u67c9b;\u6ad7arr;\u697bult;\u6ac2\u0100Ee\u35e4\u35e6;\u6acc;\u628blus;\u6ac0\u0180eiu\u35f4\u3609\u360ct\u0180;en\u121c\u35fc\u3602q\u0100;q\u1222\u35b2eq\u0100;q\u35e7\u35e4m;\u6ac8\u0100bp\u3611\u3613;\u6ad4;\u6ad6\u0180Aan\u361c\u3620\u362drr;\u61d9r\u0100hr\u3626\u3628\xeb\u222e\u0100;o\u0a2b\u0a29war;\u692alig\u803b\xdf\u40df\u0be1\u3651\u365d\u3660\u12ce\u3673\u3679\0\u367e\u36c2\0\0\0\0\0\u36db\u3703\0\u3709\u376c\0\0\0\u3787\u0272\u3656\0\0\u365bget;\u6316;\u43c4r\xeb\u0e5f\u0180aey\u3666\u366b\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uc000\ud835\udd31\u0200eiko\u3686\u369d\u36b5\u36bc\u01f2\u368b\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369b\u43b8ym;\u43d1\u0100cn\u36a2\u36b2k\u0100as\u36a8\u36aeppro\xf8\u12c1im\xbb\u12acs\xf0\u129e\u0100as\u36ba\u36ae\xf0\u12c1rn\u803b\xfe\u40fe\u01ec\u031f\u36c6\u22e7es\u8180\xd7;bd\u36cf\u36d0\u36d8\u40d7\u0100;a\u190f\u36d5r;\u6a31;\u6a30\u0180eps\u36e1\u36e3\u3700\xe1\u2a4d\u0200;bcf\u0486\u36ec\u36f0\u36f4ot;\u6336ir;\u6af1\u0100;o\u36f9\u36fc\uc000\ud835\udd65rk;\u6ada\xe1\u3362rime;\u6034\u0180aip\u370f\u3712\u3764d\xe5\u1248\u0380adempst\u3721\u374d\u3740\u3751\u3757\u375c\u375fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65b5own\xbb\u1dbbeft\u0100;e\u2800\u373e\xf1\u092e;\u625cight\u0100;e\u32aa\u374b\xf1\u105aot;\u65ecinus;\u6a3alus;\u6a39b;\u69cdime;\u6a3bezium;\u63e2\u0180cht\u3772\u377d\u3781\u0100ry\u3777\u377b;\uc000\ud835\udcc9;\u4446cy;\u445brok;\u4167\u0100io\u378b\u378ex\xf4\u1777head\u0100lr\u3797\u37a0eftarro\xf7\u084fightarrow\xbb\u0f5d\u0900AHabcdfghlmoprstuw\u37d0\u37d3\u37d7\u37e4\u37f0\u37fc\u380e\u381c\u3823\u3834\u3851\u385d\u386b\u38a9\u38cc\u38d2\u38ea\u38f6r\xf2\u03edar;\u6963\u0100cr\u37dc\u37e2ute\u803b\xfa\u40fa\xf2\u1150r\u01e3\u37ea\0\u37edy;\u445eve;\u416d\u0100iy\u37f5\u37farc\u803b\xfb\u40fb;\u4443\u0180abh\u3803\u3806\u380br\xf2\u13adlac;\u4171a\xf2\u13c3\u0100ir\u3813\u3818sht;\u697e;\uc000\ud835\udd32rave\u803b\xf9\u40f9\u0161\u3827\u3831r\u0100lr\u382c\u382e\xbb\u0957\xbb\u1083lk;\u6580\u0100ct\u3839\u384d\u026f\u383f\0\0\u384arn\u0100;e\u3845\u3846\u631cr\xbb\u3846op;\u630fri;\u65f8\u0100al\u3856\u385acr;\u416b\u80bb\xa8\u0349\u0100gp\u3862\u3866on;\u4173f;\uc000\ud835\udd66\u0300adhlsu\u114b\u3878\u387d\u1372\u3891\u38a0own\xe1\u13b3arpoon\u0100lr\u3888\u388cef\xf4\u382digh\xf4\u382fi\u0180;hl\u3899\u389a\u389c\u43c5\xbb\u13faon\xbb\u389aparrows;\u61c8\u0180cit\u38b0\u38c4\u38c8\u026f\u38b6\0\0\u38c1rn\u0100;e\u38bc\u38bd\u631dr\xbb\u38bdop;\u630eng;\u416fri;\u65f9cr;\uc000\ud835\udcca\u0180dir\u38d9\u38dd\u38e2ot;\u62f0lde;\u4169i\u0100;f\u3730\u38e8\xbb\u1813\u0100am\u38ef\u38f2r\xf2\u38a8l\u803b\xfc\u40fcangle;\u69a7\u0780ABDacdeflnoprsz\u391c\u391f\u3929\u392d\u39b5\u39b8\u39bd\u39df\u39e4\u39e8\u39f3\u39f9\u39fd\u3a01\u3a20r\xf2\u03f7ar\u0100;v\u3926\u3927\u6ae8;\u6ae9as\xe8\u03e1\u0100nr\u3932\u3937grt;\u699c\u0380eknprst\u34e3\u3946\u394b\u3952\u395d\u3964\u3996app\xe1\u2415othin\xe7\u1e96\u0180hir\u34eb\u2ec8\u3959op\xf4\u2fb5\u0100;h\u13b7\u3962\xef\u318d\u0100iu\u3969\u396dgm\xe1\u33b3\u0100bp\u3972\u3984setneq\u0100;q\u397d\u3980\uc000\u228a\ufe00;\uc000\u2acb\ufe00setneq\u0100;q\u398f\u3992\uc000\u228b\ufe00;\uc000\u2acc\ufe00\u0100hr\u399b\u399fet\xe1\u369ciangle\u0100lr\u39aa\u39afeft\xbb\u0925ight\xbb\u1051y;\u4432ash\xbb\u1036\u0180elr\u39c4\u39d2\u39d7\u0180;be\u2dea\u39cb\u39cfar;\u62bbq;\u625alip;\u62ee\u0100bt\u39dc\u1468a\xf2\u1469r;\uc000\ud835\udd33tr\xe9\u39aesu\u0100bp\u39ef\u39f1\xbb\u0d1c\xbb\u0d59pf;\uc000\ud835\udd67ro\xf0\u0efbtr\xe9\u39b4\u0100cu\u3a06\u3a0br;\uc000\ud835\udccb\u0100bp\u3a10\u3a18n\u0100Ee\u3980\u3a16\xbb\u397en\u0100Ee\u3992\u3a1e\xbb\u3990igzag;\u699a\u0380cefoprs\u3a36\u3a3b\u3a56\u3a5b\u3a54\u3a61\u3a6airc;\u4175\u0100di\u3a40\u3a51\u0100bg\u3a45\u3a49ar;\u6a5fe\u0100;q\u15fa\u3a4f;\u6259erp;\u6118r;\uc000\ud835\udd34pf;\uc000\ud835\udd68\u0100;e\u1479\u3a66at\xe8\u1479cr;\uc000\ud835\udccc\u0ae3\u178e\u3a87\0\u3a8b\0\u3a90\u3a9b\0\0\u3a9d\u3aa8\u3aab\u3aaf\0\0\u3ac3\u3ace\0\u3ad8\u17dc\u17dftr\xe9\u17d1r;\uc000\ud835\udd35\u0100Aa\u3a94\u3a97r\xf2\u03c3r\xf2\u09f6;\u43be\u0100Aa\u3aa1\u3aa4r\xf2\u03b8r\xf2\u09eba\xf0\u2713is;\u62fb\u0180dpt\u17a4\u3ab5\u3abe\u0100fl\u3aba\u17a9;\uc000\ud835\udd69im\xe5\u17b2\u0100Aa\u3ac7\u3acar\xf2\u03cer\xf2\u0a01\u0100cq\u3ad2\u17b8r;\uc000\ud835\udccd\u0100pt\u17d6\u3adcr\xe9\u17d4\u0400acefiosu\u3af0\u3afd\u3b08\u3b0c\u3b11\u3b15\u3b1b\u3b21c\u0100uy\u3af6\u3afbte\u803b\xfd\u40fd;\u444f\u0100iy\u3b02\u3b06rc;\u4177;\u444bn\u803b\xa5\u40a5r;\uc000\ud835\udd36cy;\u4457pf;\uc000\ud835\udd6acr;\uc000\ud835\udcce\u0100cm\u3b26\u3b29y;\u444el\u803b\xff\u40ff\u0500acdefhiosw\u3b42\u3b48\u3b54\u3b58\u3b64\u3b69\u3b6d\u3b74\u3b7a\u3b80cute;\u417a\u0100ay\u3b4d\u3b52ron;\u417e;\u4437ot;\u417c\u0100et\u3b5d\u3b61tr\xe6\u155fa;\u43b6r;\uc000\ud835\udd37cy;\u4436grarr;\u61ddpf;\uc000\ud835\udd6bcr;\uc000\ud835\udccf\u0100jn\u3b85\u3b87;\u600dj;\u600c" + .split("") + .map((c) => c.charCodeAt(0))); +//# sourceMappingURL=decode-data-html.js.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/generated/decode-data-html.js.map b/vuetest/node_modules/entities/lib/esm/generated/decode-data-html.js.map new file mode 100644 index 0000000..c4b1e6b --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/generated/decode-data-html.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decode-data-html.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-html.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAE9C,eAAe,IAAI,WAAW;AAC1B,kBAAkB;AAClB,268CAA268C;KACt68C,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACnC,CAAC"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts b/vuetest/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts new file mode 100644 index 0000000..4a3f533 --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts @@ -0,0 +1,3 @@ +declare const _default: Uint16Array; +export default _default; +//# sourceMappingURL=decode-data-xml.d.ts.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map b/vuetest/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map new file mode 100644 index 0000000..be2a9a2 --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decode-data-xml.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-xml.ts"],"names":[],"mappings":";AAEA,wBAKE"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/generated/decode-data-xml.js b/vuetest/node_modules/entities/lib/esm/generated/decode-data-xml.js new file mode 100644 index 0000000..b01dec7 --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/generated/decode-data-xml.js @@ -0,0 +1,7 @@ +// Generated using scripts/write-decode-map.ts +export default new Uint16Array( +// prettier-ignore +"\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022" + .split("") + .map((c) => c.charCodeAt(0))); +//# sourceMappingURL=decode-data-xml.js.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/generated/decode-data-xml.js.map b/vuetest/node_modules/entities/lib/esm/generated/decode-data-xml.js.map new file mode 100644 index 0000000..86f7150 --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/generated/decode-data-xml.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decode-data-xml.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-xml.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAE9C,eAAe,IAAI,WAAW;AAC1B,kBAAkB;AAClB,uFAAuF;KAClF,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACnC,CAAC"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/generated/encode-html.d.ts b/vuetest/node_modules/entities/lib/esm/generated/encode-html.d.ts new file mode 100644 index 0000000..0704827 --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/generated/encode-html.d.ts @@ -0,0 +1,8 @@ +type EncodeTrieNode = string | { + v?: string; + n: number | Map<number, EncodeTrieNode>; + o?: string; +}; +declare const _default: Map<number, EncodeTrieNode>; +export default _default; +//# sourceMappingURL=encode-html.d.ts.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/generated/encode-html.d.ts.map b/vuetest/node_modules/entities/lib/esm/generated/encode-html.d.ts.map new file mode 100644 index 0000000..e665a6e --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/generated/encode-html.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"encode-html.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/encode-html.ts"],"names":[],"mappings":"AAEA,KAAK,cAAc,GACb,MAAM,GACN;IAAE,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;;AAY1E,wBAAo+tB"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/generated/encode-html.js b/vuetest/node_modules/entities/lib/esm/generated/encode-html.js new file mode 100644 index 0000000..9f1858b --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/generated/encode-html.js @@ -0,0 +1,10 @@ +// Generated using scripts/write-encode-map.ts +function restoreDiff(arr) { + for (let i = 1; i < arr.length; i++) { + arr[i][0] += arr[i - 1][0] + 1; + } + return arr; +} +// prettier-ignore +export default new Map(/* #__PURE__ */ restoreDiff([[9, " "], [0, " "], [22, "!"], [0, """], [0, "#"], [0, "$"], [0, "%"], [0, "&"], [0, "'"], [0, "("], [0, ")"], [0, "*"], [0, "+"], [0, ","], [1, "."], [0, "/"], [10, ":"], [0, ";"], [0, { v: "<", n: 8402, o: "<⃒" }], [0, { v: "=", n: 8421, o: "=⃥" }], [0, { v: ">", n: 8402, o: ">⃒" }], [0, "?"], [0, "@"], [26, "["], [0, "\"], [0, "]"], [0, "^"], [0, "_"], [0, "`"], [5, { n: 106, o: "fj" }], [20, "{"], [0, "|"], [0, "}"], [34, " "], [0, "¡"], [0, "¢"], [0, "£"], [0, "¤"], [0, "¥"], [0, "¦"], [0, "§"], [0, "¨"], [0, "©"], [0, "ª"], [0, "«"], [0, "¬"], [0, "­"], [0, "®"], [0, "¯"], [0, "°"], [0, "±"], [0, "²"], [0, "³"], [0, "´"], [0, "µ"], [0, "¶"], [0, "·"], [0, "¸"], [0, "¹"], [0, "º"], [0, "»"], [0, "¼"], [0, "½"], [0, "¾"], [0, "¿"], [0, "À"], [0, "Á"], [0, "Â"], [0, "Ã"], [0, "Ä"], [0, "Å"], [0, "Æ"], [0, "Ç"], [0, "È"], [0, "É"], [0, "Ê"], [0, "Ë"], [0, "Ì"], [0, "Í"], [0, "Î"], [0, "Ï"], [0, "Ð"], [0, "Ñ"], [0, "Ò"], [0, "Ó"], [0, "Ô"], [0, "Õ"], [0, "Ö"], [0, "×"], [0, "Ø"], [0, "Ù"], [0, "Ú"], [0, "Û"], [0, "Ü"], [0, "Ý"], [0, "Þ"], [0, "ß"], [0, "à"], [0, "á"], [0, "â"], [0, "ã"], [0, "ä"], [0, "å"], [0, "æ"], [0, "ç"], [0, "è"], [0, "é"], [0, "ê"], [0, "ë"], [0, "ì"], [0, "í"], [0, "î"], [0, "ï"], [0, "ð"], [0, "ñ"], [0, "ò"], [0, "ó"], [0, "ô"], [0, "õ"], [0, "ö"], [0, "÷"], [0, "ø"], [0, "ù"], [0, "ú"], [0, "û"], [0, "ü"], [0, "ý"], [0, "þ"], [0, "ÿ"], [0, "Ā"], [0, "ā"], [0, "Ă"], [0, "ă"], [0, "Ą"], [0, "ą"], [0, "Ć"], [0, "ć"], [0, "Ĉ"], [0, "ĉ"], [0, "Ċ"], [0, "ċ"], [0, "Č"], [0, "č"], [0, "Ď"], [0, "ď"], [0, "Đ"], [0, "đ"], [0, "Ē"], [0, "ē"], [2, "Ė"], [0, "ė"], [0, "Ę"], [0, "ę"], [0, "Ě"], [0, "ě"], [0, "Ĝ"], [0, "ĝ"], [0, "Ğ"], [0, "ğ"], [0, "Ġ"], [0, "ġ"], [0, "Ģ"], [1, "Ĥ"], [0, "ĥ"], [0, "Ħ"], [0, "ħ"], [0, "Ĩ"], [0, "ĩ"], [0, "Ī"], [0, "ī"], [2, "Į"], [0, "į"], [0, "İ"], [0, "ı"], [0, "IJ"], [0, "ij"], [0, "Ĵ"], [0, "ĵ"], [0, "Ķ"], [0, "ķ"], [0, "ĸ"], [0, "Ĺ"], [0, "ĺ"], [0, "Ļ"], [0, "ļ"], [0, "Ľ"], [0, "ľ"], [0, "Ŀ"], [0, "ŀ"], [0, "Ł"], [0, "ł"], [0, "Ń"], [0, "ń"], [0, "Ņ"], [0, "ņ"], [0, "Ň"], [0, "ň"], [0, "ʼn"], [0, "Ŋ"], [0, "ŋ"], [0, "Ō"], [0, "ō"], [2, "Ő"], [0, "ő"], [0, "Œ"], [0, "œ"], [0, "Ŕ"], [0, "ŕ"], [0, "Ŗ"], [0, "ŗ"], [0, "Ř"], [0, "ř"], [0, "Ś"], [0, "ś"], [0, "Ŝ"], [0, "ŝ"], [0, "Ş"], [0, "ş"], [0, "Š"], [0, "š"], [0, "Ţ"], [0, "ţ"], [0, "Ť"], [0, "ť"], [0, "Ŧ"], [0, "ŧ"], [0, "Ũ"], [0, "ũ"], [0, "Ū"], [0, "ū"], [0, "Ŭ"], [0, "ŭ"], [0, "Ů"], [0, "ů"], [0, "Ű"], [0, "ű"], [0, "Ų"], [0, "ų"], [0, "Ŵ"], [0, "ŵ"], [0, "Ŷ"], [0, "ŷ"], [0, "Ÿ"], [0, "Ź"], [0, "ź"], [0, "Ż"], [0, "ż"], [0, "Ž"], [0, "ž"], [19, "ƒ"], [34, "Ƶ"], [63, "ǵ"], [65, "ȷ"], [142, "ˆ"], [0, "ˇ"], [16, "˘"], [0, "˙"], [0, "˚"], [0, "˛"], [0, "˜"], [0, "˝"], [51, "̑"], [127, "Α"], [0, "Β"], [0, "Γ"], [0, "Δ"], [0, "Ε"], [0, "Ζ"], [0, "Η"], [0, "Θ"], [0, "Ι"], [0, "Κ"], [0, "Λ"], [0, "Μ"], [0, "Ν"], [0, "Ξ"], [0, "Ο"], [0, "Π"], [0, "Ρ"], [1, "Σ"], [0, "Τ"], [0, "Υ"], [0, "Φ"], [0, "Χ"], [0, "Ψ"], [0, "Ω"], [7, "α"], [0, "β"], [0, "γ"], [0, "δ"], [0, "ε"], [0, "ζ"], [0, "η"], [0, "θ"], [0, "ι"], [0, "κ"], [0, "λ"], [0, "μ"], [0, "ν"], [0, "ξ"], [0, "ο"], [0, "π"], [0, "ρ"], [0, "ς"], [0, "σ"], [0, "τ"], [0, "υ"], [0, "φ"], [0, "χ"], [0, "ψ"], [0, "ω"], [7, "ϑ"], [0, "ϒ"], [2, "ϕ"], [0, "ϖ"], [5, "Ϝ"], [0, "ϝ"], [18, "ϰ"], [0, "ϱ"], [3, "ϵ"], [0, "϶"], [10, "Ё"], [0, "Ђ"], [0, "Ѓ"], [0, "Є"], [0, "Ѕ"], [0, "І"], [0, "Ї"], [0, "Ј"], [0, "Љ"], [0, "Њ"], [0, "Ћ"], [0, "Ќ"], [1, "Ў"], [0, "Џ"], [0, "А"], [0, "Б"], [0, "В"], [0, "Г"], [0, "Д"], [0, "Е"], [0, "Ж"], [0, "З"], [0, "И"], [0, "Й"], [0, "К"], [0, "Л"], [0, "М"], [0, "Н"], [0, "О"], [0, "П"], [0, "Р"], [0, "С"], [0, "Т"], [0, "У"], [0, "Ф"], [0, "Х"], [0, "Ц"], [0, "Ч"], [0, "Ш"], [0, "Щ"], [0, "Ъ"], [0, "Ы"], [0, "Ь"], [0, "Э"], [0, "Ю"], [0, "Я"], [0, "а"], [0, "б"], [0, "в"], [0, "г"], [0, "д"], [0, "е"], [0, "ж"], [0, "з"], [0, "и"], [0, "й"], [0, "к"], [0, "л"], [0, "м"], [0, "н"], [0, "о"], [0, "п"], [0, "р"], [0, "с"], [0, "т"], [0, "у"], [0, "ф"], [0, "х"], [0, "ц"], [0, "ч"], [0, "ш"], [0, "щ"], [0, "ъ"], [0, "ы"], [0, "ь"], [0, "э"], [0, "ю"], [0, "я"], [1, "ё"], [0, "ђ"], [0, "ѓ"], [0, "є"], [0, "ѕ"], [0, "і"], [0, "ї"], [0, "ј"], [0, "љ"], [0, "њ"], [0, "ћ"], [0, "ќ"], [1, "ў"], [0, "џ"], [7074, " "], [0, " "], [0, " "], [0, " "], [1, " "], [0, " "], [0, " "], [0, " "], [0, "​"], [0, "‌"], [0, "‍"], [0, "‎"], [0, "‏"], [0, "‐"], [2, "–"], [0, "—"], [0, "―"], [0, "‖"], [1, "‘"], [0, "’"], [0, "‚"], [1, "“"], [0, "”"], [0, "„"], [1, "†"], [0, "‡"], [0, "•"], [2, "‥"], [0, "…"], [9, "‰"], [0, "‱"], [0, "′"], [0, "″"], [0, "‴"], [0, "‵"], [3, "‹"], [0, "›"], [3, "‾"], [2, "⁁"], [1, "⁃"], [0, "⁄"], [10, "⁏"], [7, "⁗"], [7, { v: " ", n: 8202, o: "  " }], [0, "⁠"], [0, "⁡"], [0, "⁢"], [0, "⁣"], [72, "€"], [46, "⃛"], [0, "⃜"], [37, "ℂ"], [2, "℅"], [4, "ℊ"], [0, "ℋ"], [0, "ℌ"], [0, "ℍ"], [0, "ℎ"], [0, "ℏ"], [0, "ℐ"], [0, "ℑ"], [0, "ℒ"], [0, "ℓ"], [1, "ℕ"], [0, "№"], [0, "℗"], [0, "℘"], [0, "ℙ"], [0, "ℚ"], [0, "ℛ"], [0, "ℜ"], [0, "ℝ"], [0, "℞"], [3, "™"], [1, "ℤ"], [2, "℧"], [0, "ℨ"], [0, "℩"], [2, "ℬ"], [0, "ℭ"], [1, "ℯ"], [0, "ℰ"], [0, "ℱ"], [1, "ℳ"], [0, "ℴ"], [0, "ℵ"], [0, "ℶ"], [0, "ℷ"], [0, "ℸ"], [12, "ⅅ"], [0, "ⅆ"], [0, "ⅇ"], [0, "ⅈ"], [10, "⅓"], [0, "⅔"], [0, "⅕"], [0, "⅖"], [0, "⅗"], [0, "⅘"], [0, "⅙"], [0, "⅚"], [0, "⅛"], [0, "⅜"], [0, "⅝"], [0, "⅞"], [49, "←"], [0, "↑"], [0, "→"], [0, "↓"], [0, "↔"], [0, "↕"], [0, "↖"], [0, "↗"], [0, "↘"], [0, "↙"], [0, "↚"], [0, "↛"], [1, { v: "↝", n: 824, o: "↝̸" }], [0, "↞"], [0, "↟"], [0, "↠"], [0, "↡"], [0, "↢"], [0, "↣"], [0, "↤"], [0, "↥"], [0, "↦"], [0, "↧"], [1, "↩"], [0, "↪"], [0, "↫"], [0, "↬"], [0, "↭"], [0, "↮"], [1, "↰"], [0, "↱"], [0, "↲"], [0, "↳"], [1, "↵"], [0, "↶"], [0, "↷"], [2, "↺"], [0, "↻"], [0, "↼"], [0, "↽"], [0, "↾"], [0, "↿"], [0, "⇀"], [0, "⇁"], [0, "⇂"], [0, "⇃"], [0, "⇄"], [0, "⇅"], [0, "⇆"], [0, "⇇"], [0, "⇈"], [0, "⇉"], [0, "⇊"], [0, "⇋"], [0, "⇌"], [0, "⇍"], [0, "⇎"], [0, "⇏"], [0, "⇐"], [0, "⇑"], [0, "⇒"], [0, "⇓"], [0, "⇔"], [0, "⇕"], [0, "⇖"], [0, "⇗"], [0, "⇘"], [0, "⇙"], [0, "⇚"], [0, "⇛"], [1, "⇝"], [6, "⇤"], [0, "⇥"], [15, "⇵"], [7, "⇽"], [0, "⇾"], [0, "⇿"], [0, "∀"], [0, "∁"], [0, { v: "∂", n: 824, o: "∂̸" }], [0, "∃"], [0, "∄"], [0, "∅"], [1, "∇"], [0, "∈"], [0, "∉"], [1, "∋"], [0, "∌"], [2, "∏"], [0, "∐"], [0, "∑"], [0, "−"], [0, "∓"], [0, "∔"], [1, "∖"], [0, "∗"], [0, "∘"], [1, "√"], [2, "∝"], [0, "∞"], [0, "∟"], [0, { v: "∠", n: 8402, o: "∠⃒" }], [0, "∡"], [0, "∢"], [0, "∣"], [0, "∤"], [0, "∥"], [0, "∦"], [0, "∧"], [0, "∨"], [0, { v: "∩", n: 65024, o: "∩︀" }], [0, { v: "∪", n: 65024, o: "∪︀" }], [0, "∫"], [0, "∬"], [0, "∭"], [0, "∮"], [0, "∯"], [0, "∰"], [0, "∱"], [0, "∲"], [0, "∳"], [0, "∴"], [0, "∵"], [0, "∶"], [0, "∷"], [0, "∸"], [1, "∺"], [0, "∻"], [0, { v: "∼", n: 8402, o: "∼⃒" }], [0, { v: "∽", n: 817, o: "∽̱" }], [0, { v: "∾", n: 819, o: "∾̳" }], [0, "∿"], [0, "≀"], [0, "≁"], [0, { v: "≂", n: 824, o: "≂̸" }], [0, "≃"], [0, "≄"], [0, "≅"], [0, "≆"], [0, "≇"], [0, "≈"], [0, "≉"], [0, "≊"], [0, { v: "≋", n: 824, o: "≋̸" }], [0, "≌"], [0, { v: "≍", n: 8402, o: "≍⃒" }], [0, { v: "≎", n: 824, o: "≎̸" }], [0, { v: "≏", n: 824, o: "≏̸" }], [0, { v: "≐", n: 824, o: "≐̸" }], [0, "≑"], [0, "≒"], [0, "≓"], [0, "≔"], [0, "≕"], [0, "≖"], [0, "≗"], [1, "≙"], [0, "≚"], [1, "≜"], [2, "≟"], [0, "≠"], [0, { v: "≡", n: 8421, o: "≡⃥" }], [0, "≢"], [1, { v: "≤", n: 8402, o: "≤⃒" }], [0, { v: "≥", n: 8402, o: "≥⃒" }], [0, { v: "≦", n: 824, o: "≦̸" }], [0, { v: "≧", n: 824, o: "≧̸" }], [0, { v: "≨", n: 65024, o: "≨︀" }], [0, { v: "≩", n: 65024, o: "≩︀" }], [0, { v: "≪", n: new Map(/* #__PURE__ */ restoreDiff([[824, "≪̸"], [7577, "≪⃒"]])) }], [0, { v: "≫", n: new Map(/* #__PURE__ */ restoreDiff([[824, "≫̸"], [7577, "≫⃒"]])) }], [0, "≬"], [0, "≭"], [0, "≮"], [0, "≯"], [0, "≰"], [0, "≱"], [0, "≲"], [0, "≳"], [0, "≴"], [0, "≵"], [0, "≶"], [0, "≷"], [0, "≸"], [0, "≹"], [0, "≺"], [0, "≻"], [0, "≼"], [0, "≽"], [0, "≾"], [0, { v: "≿", n: 824, o: "≿̸" }], [0, "⊀"], [0, "⊁"], [0, { v: "⊂", n: 8402, o: "⊂⃒" }], [0, { v: "⊃", n: 8402, o: "⊃⃒" }], [0, "⊄"], [0, "⊅"], [0, "⊆"], [0, "⊇"], [0, "⊈"], [0, "⊉"], [0, { v: "⊊", n: 65024, o: "⊊︀" }], [0, { v: "⊋", n: 65024, o: "⊋︀" }], [1, "⊍"], [0, "⊎"], [0, { v: "⊏", n: 824, o: "⊏̸" }], [0, { v: "⊐", n: 824, o: "⊐̸" }], [0, "⊑"], [0, "⊒"], [0, { v: "⊓", n: 65024, o: "⊓︀" }], [0, { v: "⊔", n: 65024, o: "⊔︀" }], [0, "⊕"], [0, "⊖"], [0, "⊗"], [0, "⊘"], [0, "⊙"], [0, "⊚"], [0, "⊛"], [1, "⊝"], [0, "⊞"], [0, "⊟"], [0, "⊠"], [0, "⊡"], [0, "⊢"], [0, "⊣"], [0, "⊤"], [0, "⊥"], [1, "⊧"], [0, "⊨"], [0, "⊩"], [0, "⊪"], [0, "⊫"], [0, "⊬"], [0, "⊭"], [0, "⊮"], [0, "⊯"], [0, "⊰"], [1, "⊲"], [0, "⊳"], [0, { v: "⊴", n: 8402, o: "⊴⃒" }], [0, { v: "⊵", n: 8402, o: "⊵⃒" }], [0, "⊶"], [0, "⊷"], [0, "⊸"], [0, "⊹"], [0, "⊺"], [0, "⊻"], [1, "⊽"], [0, "⊾"], [0, "⊿"], [0, "⋀"], [0, "⋁"], [0, "⋂"], [0, "⋃"], [0, "⋄"], [0, "⋅"], [0, "⋆"], [0, "⋇"], [0, "⋈"], [0, "⋉"], [0, "⋊"], [0, "⋋"], [0, "⋌"], [0, "⋍"], [0, "⋎"], [0, "⋏"], [0, "⋐"], [0, "⋑"], [0, "⋒"], [0, "⋓"], [0, "⋔"], [0, "⋕"], [0, "⋖"], [0, "⋗"], [0, { v: "⋘", n: 824, o: "⋘̸" }], [0, { v: "⋙", n: 824, o: "⋙̸" }], [0, { v: "⋚", n: 65024, o: "⋚︀" }], [0, { v: "⋛", n: 65024, o: "⋛︀" }], [2, "⋞"], [0, "⋟"], [0, "⋠"], [0, "⋡"], [0, "⋢"], [0, "⋣"], [2, "⋦"], [0, "⋧"], [0, "⋨"], [0, "⋩"], [0, "⋪"], [0, "⋫"], [0, "⋬"], [0, "⋭"], [0, "⋮"], [0, "⋯"], [0, "⋰"], [0, "⋱"], [0, "⋲"], [0, "⋳"], [0, "⋴"], [0, { v: "⋵", n: 824, o: "⋵̸" }], [0, "⋶"], [0, "⋷"], [1, { v: "⋹", n: 824, o: "⋹̸" }], [0, "⋺"], [0, "⋻"], [0, "⋼"], [0, "⋽"], [0, "⋾"], [6, "⌅"], [0, "⌆"], [1, "⌈"], [0, "⌉"], [0, "⌊"], [0, "⌋"], [0, "⌌"], [0, "⌍"], [0, "⌎"], [0, "⌏"], [0, "⌐"], [1, "⌒"], [0, "⌓"], [1, "⌕"], [0, "⌖"], [5, "⌜"], [0, "⌝"], [0, "⌞"], [0, "⌟"], [2, "⌢"], [0, "⌣"], [9, "⌭"], [0, "⌮"], [7, "⌶"], [6, "⌽"], [1, "⌿"], [60, "⍼"], [51, "⎰"], [0, "⎱"], [2, "⎴"], [0, "⎵"], [0, "⎶"], [37, "⏜"], [0, "⏝"], [0, "⏞"], [0, "⏟"], [2, "⏢"], [4, "⏧"], [59, "␣"], [164, "Ⓢ"], [55, "─"], [1, "│"], [9, "┌"], [3, "┐"], [3, "└"], [3, "┘"], [3, "├"], [7, "┤"], [7, "┬"], [7, "┴"], [7, "┼"], [19, "═"], [0, "║"], [0, "╒"], [0, "╓"], [0, "╔"], [0, "╕"], [0, "╖"], [0, "╗"], [0, "╘"], [0, "╙"], [0, "╚"], [0, "╛"], [0, "╜"], [0, "╝"], [0, "╞"], [0, "╟"], [0, "╠"], [0, "╡"], [0, "╢"], [0, "╣"], [0, "╤"], [0, "╥"], [0, "╦"], [0, "╧"], [0, "╨"], [0, "╩"], [0, "╪"], [0, "╫"], [0, "╬"], [19, "▀"], [3, "▄"], [3, "█"], [8, "░"], [0, "▒"], [0, "▓"], [13, "□"], [8, "▪"], [0, "▫"], [1, "▭"], [0, "▮"], [2, "▱"], [1, "△"], [0, "▴"], [0, "▵"], [2, "▸"], [0, "▹"], [3, "▽"], [0, "▾"], [0, "▿"], [2, "◂"], [0, "◃"], [6, "◊"], [0, "○"], [32, "◬"], [2, "◯"], [8, "◸"], [0, "◹"], [0, "◺"], [0, "◻"], [0, "◼"], [8, "★"], [0, "☆"], [7, "☎"], [49, "♀"], [1, "♂"], [29, "♠"], [2, "♣"], [1, "♥"], [0, "♦"], [3, "♪"], [2, "♭"], [0, "♮"], [0, "♯"], [163, "✓"], [3, "✗"], [8, "✠"], [21, "✶"], [33, "❘"], [25, "❲"], [0, "❳"], [84, "⟈"], [0, "⟉"], [28, "⟦"], [0, "⟧"], [0, "⟨"], [0, "⟩"], [0, "⟪"], [0, "⟫"], [0, "⟬"], [0, "⟭"], [7, "⟵"], [0, "⟶"], [0, "⟷"], [0, "⟸"], [0, "⟹"], [0, "⟺"], [1, "⟼"], [2, "⟿"], [258, "⤂"], [0, "⤃"], [0, "⤄"], [0, "⤅"], [6, "⤌"], [0, "⤍"], [0, "⤎"], [0, "⤏"], [0, "⤐"], [0, "⤑"], [0, "⤒"], [0, "⤓"], [2, "⤖"], [2, "⤙"], [0, "⤚"], [0, "⤛"], [0, "⤜"], [0, "⤝"], [0, "⤞"], [0, "⤟"], [0, "⤠"], [2, "⤣"], [0, "⤤"], [0, "⤥"], [0, "⤦"], [0, "⤧"], [0, "⤨"], [0, "⤩"], [0, "⤪"], [8, { v: "⤳", n: 824, o: "⤳̸" }], [1, "⤵"], [0, "⤶"], [0, "⤷"], [0, "⤸"], [0, "⤹"], [2, "⤼"], [0, "⤽"], [7, "⥅"], [2, "⥈"], [0, "⥉"], [0, "⥊"], [0, "⥋"], [2, "⥎"], [0, "⥏"], [0, "⥐"], [0, "⥑"], [0, "⥒"], [0, "⥓"], [0, "⥔"], [0, "⥕"], [0, "⥖"], [0, "⥗"], [0, "⥘"], [0, "⥙"], [0, "⥚"], [0, "⥛"], [0, "⥜"], [0, "⥝"], [0, "⥞"], [0, "⥟"], [0, "⥠"], [0, "⥡"], [0, "⥢"], [0, "⥣"], [0, "⥤"], [0, "⥥"], [0, "⥦"], [0, "⥧"], [0, "⥨"], [0, "⥩"], [0, "⥪"], [0, "⥫"], [0, "⥬"], [0, "⥭"], [0, "⥮"], [0, "⥯"], [0, "⥰"], [0, "⥱"], [0, "⥲"], [0, "⥳"], [0, "⥴"], [0, "⥵"], [0, "⥶"], [1, "⥸"], [0, "⥹"], [1, "⥻"], [0, "⥼"], [0, "⥽"], [0, "⥾"], [0, "⥿"], [5, "⦅"], [0, "⦆"], [4, "⦋"], [0, "⦌"], [0, "⦍"], [0, "⦎"], [0, "⦏"], [0, "⦐"], [0, "⦑"], [0, "⦒"], [0, "⦓"], [0, "⦔"], [0, "⦕"], [0, "⦖"], [3, "⦚"], [1, "⦜"], [0, "⦝"], [6, "⦤"], [0, "⦥"], [0, "⦦"], [0, "⦧"], [0, "⦨"], [0, "⦩"], [0, "⦪"], [0, "⦫"], [0, "⦬"], [0, "⦭"], [0, "⦮"], [0, "⦯"], [0, "⦰"], [0, "⦱"], [0, "⦲"], [0, "⦳"], [0, "⦴"], [0, "⦵"], [0, "⦶"], [0, "⦷"], [1, "⦹"], [1, "⦻"], [0, "⦼"], [1, "⦾"], [0, "⦿"], [0, "⧀"], [0, "⧁"], [0, "⧂"], [0, "⧃"], [0, "⧄"], [0, "⧅"], [3, "⧉"], [3, "⧍"], [0, "⧎"], [0, { v: "⧏", n: 824, o: "⧏̸" }], [0, { v: "⧐", n: 824, o: "⧐̸" }], [11, "⧜"], [0, "⧝"], [0, "⧞"], [4, "⧣"], [0, "⧤"], [0, "⧥"], [5, "⧫"], [8, "⧴"], [1, "⧶"], [9, "⨀"], [0, "⨁"], [0, "⨂"], [1, "⨄"], [1, "⨆"], [5, "⨌"], [0, "⨍"], [2, "⨐"], [0, "⨑"], [0, "⨒"], [0, "⨓"], [0, "⨔"], [0, "⨕"], [0, "⨖"], [0, "⨗"], [10, "⨢"], [0, "⨣"], [0, "⨤"], [0, "⨥"], [0, "⨦"], [0, "⨧"], [1, "⨩"], [0, "⨪"], [2, "⨭"], [0, "⨮"], [0, "⨯"], [0, "⨰"], [0, "⨱"], [1, "⨳"], [0, "⨴"], [0, "⨵"], [0, "⨶"], [0, "⨷"], [0, "⨸"], [0, "⨹"], [0, "⨺"], [0, "⨻"], [0, "⨼"], [2, "⨿"], [0, "⩀"], [1, "⩂"], [0, "⩃"], [0, "⩄"], [0, "⩅"], [0, "⩆"], [0, "⩇"], [0, "⩈"], [0, "⩉"], [0, "⩊"], [0, "⩋"], [0, "⩌"], [0, "⩍"], [2, "⩐"], [2, "⩓"], [0, "⩔"], [0, "⩕"], [0, "⩖"], [0, "⩗"], [0, "⩘"], [1, "⩚"], [0, "⩛"], [0, "⩜"], [0, "⩝"], [1, "⩟"], [6, "⩦"], [3, "⩪"], [2, { v: "⩭", n: 824, o: "⩭̸" }], [0, "⩮"], [0, "⩯"], [0, { v: "⩰", n: 824, o: "⩰̸" }], [0, "⩱"], [0, "⩲"], [0, "⩳"], [0, "⩴"], [0, "⩵"], [1, "⩷"], [0, "⩸"], [0, "⩹"], [0, "⩺"], [0, "⩻"], [0, "⩼"], [0, { v: "⩽", n: 824, o: "⩽̸" }], [0, { v: "⩾", n: 824, o: "⩾̸" }], [0, "⩿"], [0, "⪀"], [0, "⪁"], [0, "⪂"], [0, "⪃"], [0, "⪄"], [0, "⪅"], [0, "⪆"], [0, "⪇"], [0, "⪈"], [0, "⪉"], [0, "⪊"], [0, "⪋"], [0, "⪌"], [0, "⪍"], [0, "⪎"], [0, "⪏"], [0, "⪐"], [0, "⪑"], [0, "⪒"], [0, "⪓"], [0, "⪔"], [0, "⪕"], [0, "⪖"], [0, "⪗"], [0, "⪘"], [0, "⪙"], [0, "⪚"], [2, "⪝"], [0, "⪞"], [0, "⪟"], [0, "⪠"], [0, { v: "⪡", n: 824, o: "⪡̸" }], [0, { v: "⪢", n: 824, o: "⪢̸" }], [1, "⪤"], [0, "⪥"], [0, "⪦"], [0, "⪧"], [0, "⪨"], [0, "⪩"], [0, "⪪"], [0, "⪫"], [0, { v: "⪬", n: 65024, o: "⪬︀" }], [0, { v: "⪭", n: 65024, o: "⪭︀" }], [0, "⪮"], [0, { v: "⪯", n: 824, o: "⪯̸" }], [0, { v: "⪰", n: 824, o: "⪰̸" }], [2, "⪳"], [0, "⪴"], [0, "⪵"], [0, "⪶"], [0, "⪷"], [0, "⪸"], [0, "⪹"], [0, "⪺"], [0, "⪻"], [0, "⪼"], [0, "⪽"], [0, "⪾"], [0, "⪿"], [0, "⫀"], [0, "⫁"], [0, "⫂"], [0, "⫃"], [0, "⫄"], [0, { v: "⫅", n: 824, o: "⫅̸" }], [0, { v: "⫆", n: 824, o: "⫆̸" }], [0, "⫇"], [0, "⫈"], [2, { v: "⫋", n: 65024, o: "⫋︀" }], [0, { v: "⫌", n: 65024, o: "⫌︀" }], [2, "⫏"], [0, "⫐"], [0, "⫑"], [0, "⫒"], [0, "⫓"], [0, "⫔"], [0, "⫕"], [0, "⫖"], [0, "⫗"], [0, "⫘"], [0, "⫙"], [0, "⫚"], [0, "⫛"], [8, "⫤"], [1, "⫦"], [0, "⫧"], [0, "⫨"], [0, "⫩"], [1, "⫫"], [0, "⫬"], [0, "⫭"], [0, "⫮"], [0, "⫯"], [0, "⫰"], [0, "⫱"], [0, "⫲"], [0, "⫳"], [9, { v: "⫽", n: 8421, o: "⫽⃥" }], [44343, { n: new Map(/* #__PURE__ */ restoreDiff([[56476, "𝒜"], [1, "𝒞"], [0, "𝒟"], [2, "𝒢"], [2, "𝒥"], [0, "𝒦"], [2, "𝒩"], [0, "𝒪"], [0, "𝒫"], [0, "𝒬"], [1, "𝒮"], [0, "𝒯"], [0, "𝒰"], [0, "𝒱"], [0, "𝒲"], [0, "𝒳"], [0, "𝒴"], [0, "𝒵"], [0, "𝒶"], [0, "𝒷"], [0, "𝒸"], [0, "𝒹"], [1, "𝒻"], [1, "𝒽"], [0, "𝒾"], [0, "𝒿"], [0, "𝓀"], [0, "𝓁"], [0, "𝓂"], [0, "𝓃"], [1, "𝓅"], [0, "𝓆"], [0, "𝓇"], [0, "𝓈"], [0, "𝓉"], [0, "𝓊"], [0, "𝓋"], [0, "𝓌"], [0, "𝓍"], [0, "𝓎"], [0, "𝓏"], [52, "𝔄"], [0, "𝔅"], [1, "𝔇"], [0, "𝔈"], [0, "𝔉"], [0, "𝔊"], [2, "𝔍"], [0, "𝔎"], [0, "𝔏"], [0, "𝔐"], [0, "𝔑"], [0, "𝔒"], [0, "𝔓"], [0, "𝔔"], [1, "𝔖"], [0, "𝔗"], [0, "𝔘"], [0, "𝔙"], [0, "𝔚"], [0, "𝔛"], [0, "𝔜"], [1, "𝔞"], [0, "𝔟"], [0, "𝔠"], [0, "𝔡"], [0, "𝔢"], [0, "𝔣"], [0, "𝔤"], [0, "𝔥"], [0, "𝔦"], [0, "𝔧"], [0, "𝔨"], [0, "𝔩"], [0, "𝔪"], [0, "𝔫"], [0, "𝔬"], [0, "𝔭"], [0, "𝔮"], [0, "𝔯"], [0, "𝔰"], [0, "𝔱"], [0, "𝔲"], [0, "𝔳"], [0, "𝔴"], [0, "𝔵"], [0, "𝔶"], [0, "𝔷"], [0, "𝔸"], [0, "𝔹"], [1, "𝔻"], [0, "𝔼"], [0, "𝔽"], [0, "𝔾"], [1, "𝕀"], [0, "𝕁"], [0, "𝕂"], [0, "𝕃"], [0, "𝕄"], [1, "𝕆"], [3, "𝕊"], [0, "𝕋"], [0, "𝕌"], [0, "𝕍"], [0, "𝕎"], [0, "𝕏"], [0, "𝕐"], [1, "𝕒"], [0, "𝕓"], [0, "𝕔"], [0, "𝕕"], [0, "𝕖"], [0, "𝕗"], [0, "𝕘"], [0, "𝕙"], [0, "𝕚"], [0, "𝕛"], [0, "𝕜"], [0, "𝕝"], [0, "𝕞"], [0, "𝕟"], [0, "𝕠"], [0, "𝕡"], [0, "𝕢"], [0, "𝕣"], [0, "𝕤"], [0, "𝕥"], [0, "𝕦"], [0, "𝕧"], [0, "𝕨"], [0, "𝕩"], [0, "𝕪"], [0, "𝕫"]])) }], [8906, "ff"], [0, "fi"], [0, "fl"], [0, "ffi"], [0, "ffl"]])); +//# sourceMappingURL=encode-html.js.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/generated/encode-html.js.map b/vuetest/node_modules/entities/lib/esm/generated/encode-html.js.map new file mode 100644 index 0000000..8906ff8 --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/generated/encode-html.js.map @@ -0,0 +1 @@ +{"version":3,"file":"encode-html.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/encode-html.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAM9C,SAAS,WAAW,CAChB,GAAM;IAEN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;KAClC;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAED,kBAAkB;AAClB,eAAe,IAAI,GAAG,CAAwB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,GAAG,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,aAAa,CAAC,EAAC,CAAC,GAAG,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,IAAI,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,yBAAyB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,eAAe,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,cAAc,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,4BAA4B,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,GAAG,CAAgB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,GAAG,EAAC,QAAQ,CAAC,EAAC,CAAC,IAAI,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,GAAG,CAAgB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,GAAG,EAAC,QAAQ,CAAC,EAAC,CAAC,IAAI,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,oBAAoB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,eAAe,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,gBAAgB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,gBAAgB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,mBAAmB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,qBAAqB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,qBAAqB,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,sBAAsB,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,yBAAyB,CAAC,EAAC,CAAC,CAAC,EAAC,yBAAyB,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,0BAA0B,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,yBAAyB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,EAAE,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,GAAG,EAAC,YAAY,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,GAAG,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,qBAAqB,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,4BAA4B,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,GAAG,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,mBAAmB,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,sBAAsB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,oBAAoB,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,uBAAuB,EAAC,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,EAAE,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,qBAAqB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,kBAAkB,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,2BAA2B,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,iBAAiB,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,oBAAoB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,oBAAoB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,iBAAiB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,iBAAiB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,KAAK,EAAC,EAAC,CAAC,EAAC,IAAI,GAAG,CAAgB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,KAAK,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,IAAI,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/index.d.ts b/vuetest/node_modules/entities/lib/esm/index.d.ts new file mode 100644 index 0000000..dd4eb11 --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/index.d.ts @@ -0,0 +1,96 @@ +import { DecodingMode } from "./decode.js"; +/** The level of entities to support. */ +export declare enum EntityLevel { + /** Support only XML entities. */ + XML = 0, + /** Support HTML entities, which are a superset of XML entities. */ + HTML = 1 +} +export declare enum EncodingMode { + /** + * The output is UTF-8 encoded. Only characters that need escaping within + * XML will be escaped. + */ + UTF8 = 0, + /** + * The output consists only of ASCII characters. Characters that need + * escaping within HTML, and characters that aren't ASCII characters will + * be escaped. + */ + ASCII = 1, + /** + * Encode all characters that have an equivalent entity, as well as all + * characters that are not ASCII characters. + */ + Extensive = 2, + /** + * Encode all characters that have to be escaped in HTML attributes, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + */ + Attribute = 3, + /** + * Encode all characters that have to be escaped in HTML text, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + */ + Text = 4 +} +export interface DecodingOptions { + /** + * The level of entities to support. + * @default {@link EntityLevel.XML} + */ + level?: EntityLevel; + /** + * Decoding mode. If `Legacy`, will support legacy entities not terminated + * with a semicolon (`;`). + * + * Always `Strict` for XML. For HTML, set this to `true` if you are parsing + * an attribute value. + * + * The deprecated `decodeStrict` function defaults this to `Strict`. + * + * @default {@link DecodingMode.Legacy} + */ + mode?: DecodingMode | undefined; +} +/** + * Decodes a string with entities. + * + * @param data String to decode. + * @param options Decoding options. + */ +export declare function decode(data: string, options?: DecodingOptions | EntityLevel): string; +/** + * Decodes a string with entities. Does not allow missing trailing semicolons for entities. + * + * @param data String to decode. + * @param options Decoding options. + * @deprecated Use `decode` with the `mode` set to `Strict`. + */ +export declare function decodeStrict(data: string, options?: DecodingOptions | EntityLevel): string; +/** + * Options for `encode`. + */ +export interface EncodingOptions { + /** + * The level of entities to support. + * @default {@link EntityLevel.XML} + */ + level?: EntityLevel; + /** + * Output format. + * @default {@link EncodingMode.Extensive} + */ + mode?: EncodingMode; +} +/** + * Encodes a string with entities. + * + * @param data String to encode. + * @param options Encoding options. + */ +export declare function encode(data: string, options?: EncodingOptions | EntityLevel): string; +export { encodeXML, escape, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js"; +export { encodeHTML, encodeNonAsciiHTML, encodeHTML as encodeHTML4, encodeHTML as encodeHTML5, } from "./encode.js"; +export { EntityDecoder, DecodingMode, decodeXML, decodeHTML, decodeHTMLStrict, decodeHTMLAttribute, decodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML as decodeXMLStrict, } from "./decode.js"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/index.d.ts.map b/vuetest/node_modules/entities/lib/esm/index.d.ts.map new file mode 100644 index 0000000..cfeef9f --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,YAAY,EAAE,MAAM,aAAa,CAAC;AASlE,wCAAwC;AACxC,oBAAY,WAAW;IACnB,iCAAiC;IACjC,GAAG,IAAI;IACP,mEAAmE;IACnE,IAAI,IAAI;CACX;AAED,oBAAY,YAAY;IACpB;;;OAGG;IACH,IAAI,IAAA;IACJ;;;;OAIG;IACH,KAAK,IAAA;IACL;;;OAGG;IACH,SAAS,IAAA;IACT;;;OAGG;IACH,SAAS,IAAA;IACT;;;OAGG;IACH,IAAI,IAAA;CACP;AAED,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACnC;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CASR;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CAKR;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CAkBR;AAED,OAAO,EACH,SAAS,EACT,MAAM,EACN,UAAU,EACV,eAAe,EACf,UAAU,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,UAAU,EACV,kBAAkB,EAElB,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,GAC5B,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,aAAa,EACb,YAAY,EACZ,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,mBAAmB,EAEnB,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,EACzB,gBAAgB,IAAI,iBAAiB,EACrC,gBAAgB,IAAI,iBAAiB,EACrC,SAAS,IAAI,eAAe,GAC/B,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/index.js b/vuetest/node_modules/entities/lib/esm/index.js new file mode 100644 index 0000000..acc6dbe --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/index.js @@ -0,0 +1,99 @@ +import { decodeXML, decodeHTML, DecodingMode } from "./decode.js"; +import { encodeHTML, encodeNonAsciiHTML } from "./encode.js"; +import { encodeXML, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js"; +/** The level of entities to support. */ +export var EntityLevel; +(function (EntityLevel) { + /** Support only XML entities. */ + EntityLevel[EntityLevel["XML"] = 0] = "XML"; + /** Support HTML entities, which are a superset of XML entities. */ + EntityLevel[EntityLevel["HTML"] = 1] = "HTML"; +})(EntityLevel || (EntityLevel = {})); +export var EncodingMode; +(function (EncodingMode) { + /** + * The output is UTF-8 encoded. Only characters that need escaping within + * XML will be escaped. + */ + EncodingMode[EncodingMode["UTF8"] = 0] = "UTF8"; + /** + * The output consists only of ASCII characters. Characters that need + * escaping within HTML, and characters that aren't ASCII characters will + * be escaped. + */ + EncodingMode[EncodingMode["ASCII"] = 1] = "ASCII"; + /** + * Encode all characters that have an equivalent entity, as well as all + * characters that are not ASCII characters. + */ + EncodingMode[EncodingMode["Extensive"] = 2] = "Extensive"; + /** + * Encode all characters that have to be escaped in HTML attributes, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + */ + EncodingMode[EncodingMode["Attribute"] = 3] = "Attribute"; + /** + * Encode all characters that have to be escaped in HTML text, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + */ + EncodingMode[EncodingMode["Text"] = 4] = "Text"; +})(EncodingMode || (EncodingMode = {})); +/** + * Decodes a string with entities. + * + * @param data String to decode. + * @param options Decoding options. + */ +export function decode(data, options = EntityLevel.XML) { + const level = typeof options === "number" ? options : options.level; + if (level === EntityLevel.HTML) { + const mode = typeof options === "object" ? options.mode : undefined; + return decodeHTML(data, mode); + } + return decodeXML(data); +} +/** + * Decodes a string with entities. Does not allow missing trailing semicolons for entities. + * + * @param data String to decode. + * @param options Decoding options. + * @deprecated Use `decode` with the `mode` set to `Strict`. + */ +export function decodeStrict(data, options = EntityLevel.XML) { + var _a; + const opts = typeof options === "number" ? { level: options } : options; + (_a = opts.mode) !== null && _a !== void 0 ? _a : (opts.mode = DecodingMode.Strict); + return decode(data, opts); +} +/** + * Encodes a string with entities. + * + * @param data String to encode. + * @param options Encoding options. + */ +export function encode(data, options = EntityLevel.XML) { + const opts = typeof options === "number" ? { level: options } : options; + // Mode `UTF8` just escapes XML entities + if (opts.mode === EncodingMode.UTF8) + return escapeUTF8(data); + if (opts.mode === EncodingMode.Attribute) + return escapeAttribute(data); + if (opts.mode === EncodingMode.Text) + return escapeText(data); + if (opts.level === EntityLevel.HTML) { + if (opts.mode === EncodingMode.ASCII) { + return encodeNonAsciiHTML(data); + } + return encodeHTML(data); + } + // ASCII and Extensive are equivalent + return encodeXML(data); +} +export { encodeXML, escape, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js"; +export { encodeHTML, encodeNonAsciiHTML, +// Legacy aliases (deprecated) +encodeHTML as encodeHTML4, encodeHTML as encodeHTML5, } from "./encode.js"; +export { EntityDecoder, DecodingMode, decodeXML, decodeHTML, decodeHTMLStrict, decodeHTMLAttribute, +// Legacy aliases (deprecated) +decodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML as decodeXMLStrict, } from "./decode.js"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/index.js.map b/vuetest/node_modules/entities/lib/esm/index.js.map new file mode 100644 index 0000000..5f634fc --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EACH,SAAS,EACT,UAAU,EACV,eAAe,EACf,UAAU,GACb,MAAM,aAAa,CAAC;AAErB,wCAAwC;AACxC,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,iCAAiC;IACjC,2CAAO,CAAA;IACP,mEAAmE;IACnE,6CAAQ,CAAA;AACZ,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAED,MAAM,CAAN,IAAY,YA2BX;AA3BD,WAAY,YAAY;IACpB;;;OAGG;IACH,+CAAI,CAAA;IACJ;;;;OAIG;IACH,iDAAK,CAAA;IACL;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,+CAAI,CAAA;AACR,CAAC,EA3BW,YAAY,KAAZ,YAAY,QA2BvB;AAsBD;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAClB,IAAY,EACZ,UAAyC,WAAW,CAAC,GAAG;IAExD,MAAM,KAAK,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAEpE,IAAI,KAAK,KAAK,WAAW,CAAC,IAAI,EAAE;QAC5B,MAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;QACpE,OAAO,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KACjC;IAED,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CACxB,IAAY,EACZ,UAAyC,WAAW,CAAC,GAAG;;IAExD,MAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IACxE,MAAA,IAAI,CAAC,IAAI,oCAAT,IAAI,CAAC,IAAI,GAAK,YAAY,CAAC,MAAM,EAAC;IAElC,OAAO,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC9B,CAAC;AAkBD;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAClB,IAAY,EACZ,UAAyC,WAAW,CAAC,GAAG;IAExD,MAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IAExE,wCAAwC;IACxC,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,IAAI;QAAE,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;IAC7D,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,SAAS;QAAE,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;IACvE,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,IAAI;QAAE,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;IAE7D,IAAI,IAAI,CAAC,KAAK,KAAK,WAAW,CAAC,IAAI,EAAE;QACjC,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,KAAK,EAAE;YAClC,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC;SACnC;QAED,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;KAC3B;IAED,qCAAqC;IACrC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED,OAAO,EACH,SAAS,EACT,MAAM,EACN,UAAU,EACV,eAAe,EACf,UAAU,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,UAAU,EACV,kBAAkB;AAClB,8BAA8B;AAC9B,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,GAC5B,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,aAAa,EACb,YAAY,EACZ,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,mBAAmB;AACnB,8BAA8B;AAC9B,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,EACzB,gBAAgB,IAAI,iBAAiB,EACrC,gBAAgB,IAAI,iBAAiB,EACrC,SAAS,IAAI,eAAe,GAC/B,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/esm/package.json b/vuetest/node_modules/entities/lib/esm/package.json new file mode 100644 index 0000000..089153b --- /dev/null +++ b/vuetest/node_modules/entities/lib/esm/package.json @@ -0,0 +1 @@ +{"type":"module"} diff --git a/vuetest/node_modules/entities/lib/generated/decode-data-html.d.ts b/vuetest/node_modules/entities/lib/generated/decode-data-html.d.ts new file mode 100644 index 0000000..9cfc4f4 --- /dev/null +++ b/vuetest/node_modules/entities/lib/generated/decode-data-html.d.ts @@ -0,0 +1,3 @@ +declare const _default: Uint16Array; +export default _default; +//# sourceMappingURL=decode-data-html.d.ts.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/generated/decode-data-html.d.ts.map b/vuetest/node_modules/entities/lib/generated/decode-data-html.d.ts.map new file mode 100644 index 0000000..6d4d64b --- /dev/null +++ b/vuetest/node_modules/entities/lib/generated/decode-data-html.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decode-data-html.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-html.ts"],"names":[],"mappings":";AAEA,wBAKE"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/generated/decode-data-html.js b/vuetest/node_modules/entities/lib/generated/decode-data-html.js new file mode 100644 index 0000000..295cd9b --- /dev/null +++ b/vuetest/node_modules/entities/lib/generated/decode-data-html.js @@ -0,0 +1,9 @@ +"use strict"; +// Generated using scripts/write-decode-map.ts +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = new Uint16Array( +// prettier-ignore +"\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\u40cc\u0180;ap\u0720\u072f\u073f\u0100cg\u0734\u0737r;\u412ainaryI;\u6148lie\xf3\u03dd\u01f4\u0749\0\u0762\u0100;e\u074d\u074e\u622c\u0100gr\u0753\u0758ral;\u622bsection;\u62c2isible\u0100CT\u076c\u0772omma;\u6063imes;\u6062\u0180gpt\u077f\u0783\u0788on;\u412ef;\uc000\ud835\udd40a;\u4399cr;\u6110ilde;\u4128\u01eb\u079a\0\u079ecy;\u4406l\u803b\xcf\u40cf\u0280cfosu\u07ac\u07b7\u07bc\u07c2\u07d0\u0100iy\u07b1\u07b5rc;\u4134;\u4419r;\uc000\ud835\udd0dpf;\uc000\ud835\udd41\u01e3\u07c7\0\u07ccr;\uc000\ud835\udca5rcy;\u4408kcy;\u4404\u0380HJacfos\u07e4\u07e8\u07ec\u07f1\u07fd\u0802\u0808cy;\u4425cy;\u440cppa;\u439a\u0100ey\u07f6\u07fbdil;\u4136;\u441ar;\uc000\ud835\udd0epf;\uc000\ud835\udd42cr;\uc000\ud835\udca6\u0580JTaceflmost\u0825\u0829\u082c\u0850\u0863\u09b3\u09b8\u09c7\u09cd\u0a37\u0a47cy;\u4409\u803b<\u403c\u0280cmnpr\u0837\u083c\u0841\u0844\u084dute;\u4139bda;\u439bg;\u67ealacetrf;\u6112r;\u619e\u0180aey\u0857\u085c\u0861ron;\u413ddil;\u413b;\u441b\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087e\u08a9\u08b1\u08e0\u08e6\u08fc\u092f\u095b\u0390\u096a\u0100nr\u0883\u088fgleBracket;\u67e8row\u0180;BR\u0899\u089a\u089e\u6190ar;\u61e4ightArrow;\u61c6eiling;\u6308o\u01f5\u08b7\0\u08c3bleBracket;\u67e6n\u01d4\u08c8\0\u08d2eeVector;\u6961ector\u0100;B\u08db\u08dc\u61c3ar;\u6959loor;\u630aight\u0100AV\u08ef\u08f5rrow;\u6194ector;\u694e\u0100er\u0901\u0917e\u0180;AV\u0909\u090a\u0910\u62a3rrow;\u61a4ector;\u695aiangle\u0180;BE\u0924\u0925\u0929\u62b2ar;\u69cfqual;\u62b4p\u0180DTV\u0937\u0942\u094cownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61bfar;\u6958ector\u0100;B\u0965\u0966\u61bcar;\u6952ight\xe1\u039cs\u0300EFGLST\u097e\u098b\u0995\u099d\u09a2\u09adqualGreater;\u62daullEqual;\u6266reater;\u6276ess;\u6aa1lantEqual;\u6a7dilde;\u6272r;\uc000\ud835\udd0f\u0100;e\u09bd\u09be\u62d8ftarrow;\u61daidot;\u413f\u0180npw\u09d4\u0a16\u0a1bg\u0200LRlr\u09de\u09f7\u0a02\u0a10eft\u0100AR\u09e6\u09ecrrow;\u67f5ightArrow;\u67f7ightArrow;\u67f6eft\u0100ar\u03b3\u0a0aight\xe1\u03bfight\xe1\u03caf;\uc000\ud835\udd43er\u0100LR\u0a22\u0a2ceftArrow;\u6199ightArrow;\u6198\u0180cht\u0a3e\u0a40\u0a42\xf2\u084c;\u61b0rok;\u4141;\u626a\u0400acefiosu\u0a5a\u0a5d\u0a60\u0a77\u0a7c\u0a85\u0a8b\u0a8ep;\u6905y;\u441c\u0100dl\u0a65\u0a6fiumSpace;\u605flintrf;\u6133r;\uc000\ud835\udd10nusPlus;\u6213pf;\uc000\ud835\udd44c\xf2\u0a76;\u439c\u0480Jacefostu\u0aa3\u0aa7\u0aad\u0ac0\u0b14\u0b19\u0d91\u0d97\u0d9ecy;\u440acute;\u4143\u0180aey\u0ab4\u0ab9\u0aberon;\u4147dil;\u4145;\u441d\u0180gsw\u0ac7\u0af0\u0b0eative\u0180MTV\u0ad3\u0adf\u0ae8ediumSpace;\u600bhi\u0100cn\u0ae6\u0ad8\xeb\u0ad9eryThi\xee\u0ad9ted\u0100GL\u0af8\u0b06reaterGreate\xf2\u0673essLes\xf3\u0a48Line;\u400ar;\uc000\ud835\udd11\u0200Bnpt\u0b22\u0b28\u0b37\u0b3areak;\u6060BreakingSpace;\u40a0f;\u6115\u0680;CDEGHLNPRSTV\u0b55\u0b56\u0b6a\u0b7c\u0ba1\u0beb\u0c04\u0c5e\u0c84\u0ca6\u0cd8\u0d61\u0d85\u6aec\u0100ou\u0b5b\u0b64ngruent;\u6262pCap;\u626doubleVerticalBar;\u6226\u0180lqx\u0b83\u0b8a\u0b9bement;\u6209ual\u0100;T\u0b92\u0b93\u6260ilde;\uc000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0bb6\u0bb7\u0bbd\u0bc9\u0bd3\u0bd8\u0be5\u626fqual;\u6271ullEqual;\uc000\u2267\u0338reater;\uc000\u226b\u0338ess;\u6279lantEqual;\uc000\u2a7e\u0338ilde;\u6275ump\u0144\u0bf2\u0bfdownHump;\uc000\u224e\u0338qual;\uc000\u224f\u0338e\u0100fs\u0c0a\u0c27tTriangle\u0180;BE\u0c1a\u0c1b\u0c21\u62eaar;\uc000\u29cf\u0338qual;\u62ecs\u0300;EGLST\u0c35\u0c36\u0c3c\u0c44\u0c4b\u0c58\u626equal;\u6270reater;\u6278ess;\uc000\u226a\u0338lantEqual;\uc000\u2a7d\u0338ilde;\u6274ested\u0100GL\u0c68\u0c79reaterGreater;\uc000\u2aa2\u0338essLess;\uc000\u2aa1\u0338recedes\u0180;ES\u0c92\u0c93\u0c9b\u6280qual;\uc000\u2aaf\u0338lantEqual;\u62e0\u0100ei\u0cab\u0cb9verseElement;\u620cghtTriangle\u0180;BE\u0ccb\u0ccc\u0cd2\u62ebar;\uc000\u29d0\u0338qual;\u62ed\u0100qu\u0cdd\u0d0cuareSu\u0100bp\u0ce8\u0cf9set\u0100;E\u0cf0\u0cf3\uc000\u228f\u0338qual;\u62e2erset\u0100;E\u0d03\u0d06\uc000\u2290\u0338qual;\u62e3\u0180bcp\u0d13\u0d24\u0d4eset\u0100;E\u0d1b\u0d1e\uc000\u2282\u20d2qual;\u6288ceeds\u0200;EST\u0d32\u0d33\u0d3b\u0d46\u6281qual;\uc000\u2ab0\u0338lantEqual;\u62e1ilde;\uc000\u227f\u0338erset\u0100;E\u0d58\u0d5b\uc000\u2283\u20d2qual;\u6289ilde\u0200;EFT\u0d6e\u0d6f\u0d75\u0d7f\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uc000\ud835\udca9ilde\u803b\xd1\u40d1;\u439d\u0700Eacdfgmoprstuv\u0dbd\u0dc2\u0dc9\u0dd5\u0ddb\u0de0\u0de7\u0dfc\u0e02\u0e20\u0e22\u0e32\u0e3f\u0e44lig;\u4152cute\u803b\xd3\u40d3\u0100iy\u0dce\u0dd3rc\u803b\xd4\u40d4;\u441eblac;\u4150r;\uc000\ud835\udd12rave\u803b\xd2\u40d2\u0180aei\u0dee\u0df2\u0df6cr;\u414cga;\u43a9cron;\u439fpf;\uc000\ud835\udd46enCurly\u0100DQ\u0e0e\u0e1aoubleQuote;\u601cuote;\u6018;\u6a54\u0100cl\u0e27\u0e2cr;\uc000\ud835\udcaaash\u803b\xd8\u40d8i\u016c\u0e37\u0e3cde\u803b\xd5\u40d5es;\u6a37ml\u803b\xd6\u40d6er\u0100BP\u0e4b\u0e60\u0100ar\u0e50\u0e53r;\u603eac\u0100ek\u0e5a\u0e5c;\u63deet;\u63b4arenthesis;\u63dc\u0480acfhilors\u0e7f\u0e87\u0e8a\u0e8f\u0e92\u0e94\u0e9d\u0eb0\u0efcrtialD;\u6202y;\u441fr;\uc000\ud835\udd13i;\u43a6;\u43a0usMinus;\u40b1\u0100ip\u0ea2\u0eadncareplan\xe5\u069df;\u6119\u0200;eio\u0eb9\u0eba\u0ee0\u0ee4\u6abbcedes\u0200;EST\u0ec8\u0ec9\u0ecf\u0eda\u627aqual;\u6aaflantEqual;\u627cilde;\u627eme;\u6033\u0100dp\u0ee9\u0eeeuct;\u620fortion\u0100;a\u0225\u0ef9l;\u621d\u0100ci\u0f01\u0f06r;\uc000\ud835\udcab;\u43a8\u0200Ufos\u0f11\u0f16\u0f1b\u0f1fOT\u803b\"\u4022r;\uc000\ud835\udd14pf;\u611acr;\uc000\ud835\udcac\u0600BEacefhiorsu\u0f3e\u0f43\u0f47\u0f60\u0f73\u0fa7\u0faa\u0fad\u1096\u10a9\u10b4\u10bearr;\u6910G\u803b\xae\u40ae\u0180cnr\u0f4e\u0f53\u0f56ute;\u4154g;\u67ebr\u0100;t\u0f5c\u0f5d\u61a0l;\u6916\u0180aey\u0f67\u0f6c\u0f71ron;\u4158dil;\u4156;\u4420\u0100;v\u0f78\u0f79\u611cerse\u0100EU\u0f82\u0f99\u0100lq\u0f87\u0f8eement;\u620builibrium;\u61cbpEquilibrium;\u696fr\xbb\u0f79o;\u43a1ght\u0400ACDFTUVa\u0fc1\u0feb\u0ff3\u1022\u1028\u105b\u1087\u03d8\u0100nr\u0fc6\u0fd2gleBracket;\u67e9row\u0180;BL\u0fdc\u0fdd\u0fe1\u6192ar;\u61e5eftArrow;\u61c4eiling;\u6309o\u01f5\u0ff9\0\u1005bleBracket;\u67e7n\u01d4\u100a\0\u1014eeVector;\u695dector\u0100;B\u101d\u101e\u61c2ar;\u6955loor;\u630b\u0100er\u102d\u1043e\u0180;AV\u1035\u1036\u103c\u62a2rrow;\u61a6ector;\u695biangle\u0180;BE\u1050\u1051\u1055\u62b3ar;\u69d0qual;\u62b5p\u0180DTV\u1063\u106e\u1078ownVector;\u694feeVector;\u695cector\u0100;B\u1082\u1083\u61bear;\u6954ector\u0100;B\u1091\u1092\u61c0ar;\u6953\u0100pu\u109b\u109ef;\u611dndImplies;\u6970ightarrow;\u61db\u0100ch\u10b9\u10bcr;\u611b;\u61b1leDelayed;\u69f4\u0680HOacfhimoqstu\u10e4\u10f1\u10f7\u10fd\u1119\u111e\u1151\u1156\u1161\u1167\u11b5\u11bb\u11bf\u0100Cc\u10e9\u10eeHcy;\u4429y;\u4428FTcy;\u442ccute;\u415a\u0280;aeiy\u1108\u1109\u110e\u1113\u1117\u6abcron;\u4160dil;\u415erc;\u415c;\u4421r;\uc000\ud835\udd16ort\u0200DLRU\u112a\u1134\u113e\u1149ownArrow\xbb\u041eeftArrow\xbb\u089aightArrow\xbb\u0fddpArrow;\u6191gma;\u43a3allCircle;\u6218pf;\uc000\ud835\udd4a\u0272\u116d\0\0\u1170t;\u621aare\u0200;ISU\u117b\u117c\u1189\u11af\u65a1ntersection;\u6293u\u0100bp\u118f\u119eset\u0100;E\u1197\u1198\u628fqual;\u6291erset\u0100;E\u11a8\u11a9\u6290qual;\u6292nion;\u6294cr;\uc000\ud835\udcaear;\u62c6\u0200bcmp\u11c8\u11db\u1209\u120b\u0100;s\u11cd\u11ce\u62d0et\u0100;E\u11cd\u11d5qual;\u6286\u0100ch\u11e0\u1205eeds\u0200;EST\u11ed\u11ee\u11f4\u11ff\u627bqual;\u6ab0lantEqual;\u627dilde;\u627fTh\xe1\u0f8c;\u6211\u0180;es\u1212\u1213\u1223\u62d1rset\u0100;E\u121c\u121d\u6283qual;\u6287et\xbb\u1213\u0580HRSacfhiors\u123e\u1244\u1249\u1255\u125e\u1271\u1276\u129f\u12c2\u12c8\u12d1ORN\u803b\xde\u40deADE;\u6122\u0100Hc\u124e\u1252cy;\u440by;\u4426\u0100bu\u125a\u125c;\u4009;\u43a4\u0180aey\u1265\u126a\u126fron;\u4164dil;\u4162;\u4422r;\uc000\ud835\udd17\u0100ei\u127b\u1289\u01f2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128e\u1298kSpace;\uc000\u205f\u200aSpace;\u6009lde\u0200;EFT\u12ab\u12ac\u12b2\u12bc\u623cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uc000\ud835\udd4bipleDot;\u60db\u0100ct\u12d6\u12dbr;\uc000\ud835\udcafrok;\u4166\u0ae1\u12f7\u130e\u131a\u1326\0\u132c\u1331\0\0\0\0\0\u1338\u133d\u1377\u1385\0\u13ff\u1404\u140a\u1410\u0100cr\u12fb\u1301ute\u803b\xda\u40dar\u0100;o\u1307\u1308\u619fcir;\u6949r\u01e3\u1313\0\u1316y;\u440eve;\u416c\u0100iy\u131e\u1323rc\u803b\xdb\u40db;\u4423blac;\u4170r;\uc000\ud835\udd18rave\u803b\xd9\u40d9acr;\u416a\u0100di\u1341\u1369er\u0100BP\u1348\u135d\u0100ar\u134d\u1350r;\u405fac\u0100ek\u1357\u1359;\u63dfet;\u63b5arenthesis;\u63ddon\u0100;P\u1370\u1371\u62c3lus;\u628e\u0100gp\u137b\u137fon;\u4172f;\uc000\ud835\udd4c\u0400ADETadps\u1395\u13ae\u13b8\u13c4\u03e8\u13d2\u13d7\u13f3rrow\u0180;BD\u1150\u13a0\u13a4ar;\u6912ownArrow;\u61c5ownArrow;\u6195quilibrium;\u696eee\u0100;A\u13cb\u13cc\u62a5rrow;\u61a5own\xe1\u03f3er\u0100LR\u13de\u13e8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13f9\u13fa\u43d2on;\u43a5ing;\u416ecr;\uc000\ud835\udcb0ilde;\u4168ml\u803b\xdc\u40dc\u0480Dbcdefosv\u1427\u142c\u1430\u1433\u143e\u1485\u148a\u1490\u1496ash;\u62abar;\u6aeby;\u4412ash\u0100;l\u143b\u143c\u62a9;\u6ae6\u0100er\u1443\u1445;\u62c1\u0180bty\u144c\u1450\u147aar;\u6016\u0100;i\u144f\u1455cal\u0200BLST\u1461\u1465\u146a\u1474ar;\u6223ine;\u407ceparator;\u6758ilde;\u6240ThinSpace;\u600ar;\uc000\ud835\udd19pf;\uc000\ud835\udd4dcr;\uc000\ud835\udcb1dash;\u62aa\u0280cefos\u14a7\u14ac\u14b1\u14b6\u14bcirc;\u4174dge;\u62c0r;\uc000\ud835\udd1apf;\uc000\ud835\udd4ecr;\uc000\ud835\udcb2\u0200fios\u14cb\u14d0\u14d2\u14d8r;\uc000\ud835\udd1b;\u439epf;\uc000\ud835\udd4fcr;\uc000\ud835\udcb3\u0480AIUacfosu\u14f1\u14f5\u14f9\u14fd\u1504\u150f\u1514\u151a\u1520cy;\u442fcy;\u4407cy;\u442ecute\u803b\xdd\u40dd\u0100iy\u1509\u150drc;\u4176;\u442br;\uc000\ud835\udd1cpf;\uc000\ud835\udd50cr;\uc000\ud835\udcb4ml;\u4178\u0400Hacdefos\u1535\u1539\u153f\u154b\u154f\u155d\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417d;\u4417ot;\u417b\u01f2\u1554\0\u155boWidt\xe8\u0ad9a;\u4396r;\u6128pf;\u6124cr;\uc000\ud835\udcb5\u0be1\u1583\u158a\u1590\0\u15b0\u15b6\u15bf\0\0\0\0\u15c6\u15db\u15eb\u165f\u166d\0\u1695\u169b\u16b2\u16b9\0\u16becute\u803b\xe1\u40e1reve;\u4103\u0300;Ediuy\u159c\u159d\u15a1\u15a3\u15a8\u15ad\u623e;\uc000\u223e\u0333;\u623frc\u803b\xe2\u40e2te\u80bb\xb4\u0306;\u4430lig\u803b\xe6\u40e6\u0100;r\xb2\u15ba;\uc000\ud835\udd1erave\u803b\xe0\u40e0\u0100ep\u15ca\u15d6\u0100fp\u15cf\u15d4sym;\u6135\xe8\u15d3ha;\u43b1\u0100ap\u15dfc\u0100cl\u15e4\u15e7r;\u4101g;\u6a3f\u0264\u15f0\0\0\u160a\u0280;adsv\u15fa\u15fb\u15ff\u1601\u1607\u6227nd;\u6a55;\u6a5clope;\u6a58;\u6a5a\u0380;elmrsz\u1618\u1619\u161b\u161e\u163f\u164f\u1659\u6220;\u69a4e\xbb\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163a\u163c\u163e;\u69a8;\u69a9;\u69aa;\u69ab;\u69ac;\u69ad;\u69ae;\u69aft\u0100;v\u1645\u1646\u621fb\u0100;d\u164c\u164d\u62be;\u699d\u0100pt\u1654\u1657h;\u6222\xbb\xb9arr;\u637c\u0100gp\u1663\u1667on;\u4105f;\uc000\ud835\udd52\u0380;Eaeiop\u12c1\u167b\u167d\u1682\u1684\u1687\u168a;\u6a70cir;\u6a6f;\u624ad;\u624bs;\u4027rox\u0100;e\u12c1\u1692\xf1\u1683ing\u803b\xe5\u40e5\u0180cty\u16a1\u16a6\u16a8r;\uc000\ud835\udcb6;\u402amp\u0100;e\u12c1\u16af\xf1\u0288ilde\u803b\xe3\u40e3ml\u803b\xe4\u40e4\u0100ci\u16c2\u16c8onin\xf4\u0272nt;\u6a11\u0800Nabcdefiklnoprsu\u16ed\u16f1\u1730\u173c\u1743\u1748\u1778\u177d\u17e0\u17e6\u1839\u1850\u170d\u193d\u1948\u1970ot;\u6aed\u0100cr\u16f6\u171ek\u0200ceps\u1700\u1705\u170d\u1713ong;\u624cpsilon;\u43f6rime;\u6035im\u0100;e\u171a\u171b\u623dq;\u62cd\u0176\u1722\u1726ee;\u62bded\u0100;g\u172c\u172d\u6305e\xbb\u172drk\u0100;t\u135c\u1737brk;\u63b6\u0100oy\u1701\u1741;\u4431quo;\u601e\u0280cmprt\u1753\u175b\u1761\u1764\u1768aus\u0100;e\u010a\u0109ptyv;\u69b0s\xe9\u170cno\xf5\u0113\u0180ahw\u176f\u1771\u1773;\u43b2;\u6136een;\u626cr;\uc000\ud835\udd1fg\u0380costuvw\u178d\u179d\u17b3\u17c1\u17d5\u17db\u17de\u0180aiu\u1794\u1796\u179a\xf0\u0760rc;\u65efp\xbb\u1371\u0180dpt\u17a4\u17a8\u17adot;\u6a00lus;\u6a01imes;\u6a02\u0271\u17b9\0\0\u17becup;\u6a06ar;\u6605riangle\u0100du\u17cd\u17d2own;\u65bdp;\u65b3plus;\u6a04e\xe5\u1444\xe5\u14adarow;\u690d\u0180ako\u17ed\u1826\u1835\u0100cn\u17f2\u1823k\u0180lst\u17fa\u05ab\u1802ozenge;\u69ebriangle\u0200;dlr\u1812\u1813\u1818\u181d\u65b4own;\u65beeft;\u65c2ight;\u65b8k;\u6423\u01b1\u182b\0\u1833\u01b2\u182f\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183e\u184d\u0100;q\u1843\u1846\uc000=\u20e5uiv;\uc000\u2261\u20e5t;\u6310\u0200ptwx\u1859\u185e\u1867\u186cf;\uc000\ud835\udd53\u0100;t\u13cb\u1863om\xbb\u13cctie;\u62c8\u0600DHUVbdhmptuv\u1885\u1896\u18aa\u18bb\u18d7\u18db\u18ec\u18ff\u1905\u190a\u1910\u1921\u0200LRlr\u188e\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18a1\u18a2\u18a4\u18a6\u18a8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18b3\u18b5\u18b7\u18b9;\u655d;\u655a;\u655c;\u6559\u0380;HLRhlr\u18ca\u18cb\u18cd\u18cf\u18d1\u18d3\u18d5\u6551;\u656c;\u6563;\u6560;\u656b;\u6562;\u655fox;\u69c9\u0200LRlr\u18e4\u18e6\u18e8\u18ea;\u6555;\u6552;\u6510;\u650c\u0280;DUdu\u06bd\u18f7\u18f9\u18fb\u18fd;\u6565;\u6568;\u652c;\u6534inus;\u629flus;\u629eimes;\u62a0\u0200LRlr\u1919\u191b\u191d\u191f;\u655b;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193b\u6502;\u656a;\u6561;\u655e;\u653c;\u6524;\u651c\u0100ev\u0123\u1942bar\u803b\xa6\u40a6\u0200ceio\u1951\u1956\u195a\u1960r;\uc000\ud835\udcb7mi;\u604fm\u0100;e\u171a\u171cl\u0180;bh\u1968\u1969\u196b\u405c;\u69c5sub;\u67c8\u016c\u1974\u197el\u0100;e\u1979\u197a\u6022t\xbb\u197ap\u0180;Ee\u012f\u1985\u1987;\u6aae\u0100;q\u06dc\u06db\u0ce1\u19a7\0\u19e8\u1a11\u1a15\u1a32\0\u1a37\u1a50\0\0\u1ab4\0\0\u1ac1\0\0\u1b21\u1b2e\u1b4d\u1b52\0\u1bfd\0\u1c0c\u0180cpr\u19ad\u19b2\u19ddute;\u4107\u0300;abcds\u19bf\u19c0\u19c4\u19ca\u19d5\u19d9\u6229nd;\u6a44rcup;\u6a49\u0100au\u19cf\u19d2p;\u6a4bp;\u6a47ot;\u6a40;\uc000\u2229\ufe00\u0100eo\u19e2\u19e5t;\u6041\xee\u0693\u0200aeiu\u19f0\u19fb\u1a01\u1a05\u01f0\u19f5\0\u19f8s;\u6a4don;\u410ddil\u803b\xe7\u40e7rc;\u4109ps\u0100;s\u1a0c\u1a0d\u6a4cm;\u6a50ot;\u410b\u0180dmn\u1a1b\u1a20\u1a26il\u80bb\xb8\u01adptyv;\u69b2t\u8100\xa2;e\u1a2d\u1a2e\u40a2r\xe4\u01b2r;\uc000\ud835\udd20\u0180cei\u1a3d\u1a40\u1a4dy;\u4447ck\u0100;m\u1a47\u1a48\u6713ark\xbb\u1a48;\u43c7r\u0380;Ecefms\u1a5f\u1a60\u1a62\u1a6b\u1aa4\u1aaa\u1aae\u65cb;\u69c3\u0180;el\u1a69\u1a6a\u1a6d\u42c6q;\u6257e\u0261\u1a74\0\0\u1a88rrow\u0100lr\u1a7c\u1a81eft;\u61baight;\u61bb\u0280RSacd\u1a92\u1a94\u1a96\u1a9a\u1a9f\xbb\u0f47;\u64c8st;\u629birc;\u629aash;\u629dnint;\u6a10id;\u6aefcir;\u69c2ubs\u0100;u\u1abb\u1abc\u6663it\xbb\u1abc\u02ec\u1ac7\u1ad4\u1afa\0\u1b0aon\u0100;e\u1acd\u1ace\u403a\u0100;q\xc7\xc6\u026d\u1ad9\0\0\u1ae2a\u0100;t\u1ade\u1adf\u402c;\u4040\u0180;fl\u1ae8\u1ae9\u1aeb\u6201\xee\u1160e\u0100mx\u1af1\u1af6ent\xbb\u1ae9e\xf3\u024d\u01e7\u1afe\0\u1b07\u0100;d\u12bb\u1b02ot;\u6a6dn\xf4\u0246\u0180fry\u1b10\u1b14\u1b17;\uc000\ud835\udd54o\xe4\u0254\u8100\xa9;s\u0155\u1b1dr;\u6117\u0100ao\u1b25\u1b29rr;\u61b5ss;\u6717\u0100cu\u1b32\u1b37r;\uc000\ud835\udcb8\u0100bp\u1b3c\u1b44\u0100;e\u1b41\u1b42\u6acf;\u6ad1\u0100;e\u1b49\u1b4a\u6ad0;\u6ad2dot;\u62ef\u0380delprvw\u1b60\u1b6c\u1b77\u1b82\u1bac\u1bd4\u1bf9arr\u0100lr\u1b68\u1b6a;\u6938;\u6935\u0270\u1b72\0\0\u1b75r;\u62dec;\u62dfarr\u0100;p\u1b7f\u1b80\u61b6;\u693d\u0300;bcdos\u1b8f\u1b90\u1b96\u1ba1\u1ba5\u1ba8\u622arcap;\u6a48\u0100au\u1b9b\u1b9ep;\u6a46p;\u6a4aot;\u628dr;\u6a45;\uc000\u222a\ufe00\u0200alrv\u1bb5\u1bbf\u1bde\u1be3rr\u0100;m\u1bbc\u1bbd\u61b7;\u693cy\u0180evw\u1bc7\u1bd4\u1bd8q\u0270\u1bce\0\0\u1bd2re\xe3\u1b73u\xe3\u1b75ee;\u62ceedge;\u62cfen\u803b\xa4\u40a4earrow\u0100lr\u1bee\u1bf3eft\xbb\u1b80ight\xbb\u1bbde\xe4\u1bdd\u0100ci\u1c01\u1c07onin\xf4\u01f7nt;\u6231lcty;\u632d\u0980AHabcdefhijlorstuwz\u1c38\u1c3b\u1c3f\u1c5d\u1c69\u1c75\u1c8a\u1c9e\u1cac\u1cb7\u1cfb\u1cff\u1d0d\u1d7b\u1d91\u1dab\u1dbb\u1dc6\u1dcdr\xf2\u0381ar;\u6965\u0200glrs\u1c48\u1c4d\u1c52\u1c54ger;\u6020eth;\u6138\xf2\u1133h\u0100;v\u1c5a\u1c5b\u6010\xbb\u090a\u016b\u1c61\u1c67arow;\u690fa\xe3\u0315\u0100ay\u1c6e\u1c73ron;\u410f;\u4434\u0180;ao\u0332\u1c7c\u1c84\u0100gr\u02bf\u1c81r;\u61catseq;\u6a77\u0180glm\u1c91\u1c94\u1c98\u803b\xb0\u40b0ta;\u43b4ptyv;\u69b1\u0100ir\u1ca3\u1ca8sht;\u697f;\uc000\ud835\udd21ar\u0100lr\u1cb3\u1cb5\xbb\u08dc\xbb\u101e\u0280aegsv\u1cc2\u0378\u1cd6\u1cdc\u1ce0m\u0180;os\u0326\u1cca\u1cd4nd\u0100;s\u0326\u1cd1uit;\u6666amma;\u43ddin;\u62f2\u0180;io\u1ce7\u1ce8\u1cf8\u40f7de\u8100\xf7;o\u1ce7\u1cf0ntimes;\u62c7n\xf8\u1cf7cy;\u4452c\u026f\u1d06\0\0\u1d0arn;\u631eop;\u630d\u0280lptuw\u1d18\u1d1d\u1d22\u1d49\u1d55lar;\u4024f;\uc000\ud835\udd55\u0280;emps\u030b\u1d2d\u1d37\u1d3d\u1d42q\u0100;d\u0352\u1d33ot;\u6251inus;\u6238lus;\u6214quare;\u62a1blebarwedg\xe5\xfan\u0180adh\u112e\u1d5d\u1d67ownarrow\xf3\u1c83arpoon\u0100lr\u1d72\u1d76ef\xf4\u1cb4igh\xf4\u1cb6\u0162\u1d7f\u1d85karo\xf7\u0f42\u026f\u1d8a\0\0\u1d8ern;\u631fop;\u630c\u0180cot\u1d98\u1da3\u1da6\u0100ry\u1d9d\u1da1;\uc000\ud835\udcb9;\u4455l;\u69f6rok;\u4111\u0100dr\u1db0\u1db4ot;\u62f1i\u0100;f\u1dba\u1816\u65bf\u0100ah\u1dc0\u1dc3r\xf2\u0429a\xf2\u0fa6angle;\u69a6\u0100ci\u1dd2\u1dd5y;\u445fgrarr;\u67ff\u0900Dacdefglmnopqrstux\u1e01\u1e09\u1e19\u1e38\u0578\u1e3c\u1e49\u1e61\u1e7e\u1ea5\u1eaf\u1ebd\u1ee1\u1f2a\u1f37\u1f44\u1f4e\u1f5a\u0100Do\u1e06\u1d34o\xf4\u1c89\u0100cs\u1e0e\u1e14ute\u803b\xe9\u40e9ter;\u6a6e\u0200aioy\u1e22\u1e27\u1e31\u1e36ron;\u411br\u0100;c\u1e2d\u1e2e\u6256\u803b\xea\u40ealon;\u6255;\u444dot;\u4117\u0100Dr\u1e41\u1e45ot;\u6252;\uc000\ud835\udd22\u0180;rs\u1e50\u1e51\u1e57\u6a9aave\u803b\xe8\u40e8\u0100;d\u1e5c\u1e5d\u6a96ot;\u6a98\u0200;ils\u1e6a\u1e6b\u1e72\u1e74\u6a99nters;\u63e7;\u6113\u0100;d\u1e79\u1e7a\u6a95ot;\u6a97\u0180aps\u1e85\u1e89\u1e97cr;\u4113ty\u0180;sv\u1e92\u1e93\u1e95\u6205et\xbb\u1e93p\u01001;\u1e9d\u1ea4\u0133\u1ea1\u1ea3;\u6004;\u6005\u6003\u0100gs\u1eaa\u1eac;\u414bp;\u6002\u0100gp\u1eb4\u1eb8on;\u4119f;\uc000\ud835\udd56\u0180als\u1ec4\u1ece\u1ed2r\u0100;s\u1eca\u1ecb\u62d5l;\u69e3us;\u6a71i\u0180;lv\u1eda\u1edb\u1edf\u43b5on\xbb\u1edb;\u43f5\u0200csuv\u1eea\u1ef3\u1f0b\u1f23\u0100io\u1eef\u1e31rc\xbb\u1e2e\u0269\u1ef9\0\0\u1efb\xed\u0548ant\u0100gl\u1f02\u1f06tr\xbb\u1e5dess\xbb\u1e7a\u0180aei\u1f12\u1f16\u1f1als;\u403dst;\u625fv\u0100;D\u0235\u1f20D;\u6a78parsl;\u69e5\u0100Da\u1f2f\u1f33ot;\u6253rr;\u6971\u0180cdi\u1f3e\u1f41\u1ef8r;\u612fo\xf4\u0352\u0100ah\u1f49\u1f4b;\u43b7\u803b\xf0\u40f0\u0100mr\u1f53\u1f57l\u803b\xeb\u40ebo;\u60ac\u0180cip\u1f61\u1f64\u1f67l;\u4021s\xf4\u056e\u0100eo\u1f6c\u1f74ctatio\xee\u0559nential\xe5\u0579\u09e1\u1f92\0\u1f9e\0\u1fa1\u1fa7\0\0\u1fc6\u1fcc\0\u1fd3\0\u1fe6\u1fea\u2000\0\u2008\u205allingdotse\xf1\u1e44y;\u4444male;\u6640\u0180ilr\u1fad\u1fb3\u1fc1lig;\u8000\ufb03\u0269\u1fb9\0\0\u1fbdg;\u8000\ufb00ig;\u8000\ufb04;\uc000\ud835\udd23lig;\u8000\ufb01lig;\uc000fj\u0180alt\u1fd9\u1fdc\u1fe1t;\u666dig;\u8000\ufb02ns;\u65b1of;\u4192\u01f0\u1fee\0\u1ff3f;\uc000\ud835\udd57\u0100ak\u05bf\u1ff7\u0100;v\u1ffc\u1ffd\u62d4;\u6ad9artint;\u6a0d\u0100ao\u200c\u2055\u0100cs\u2011\u2052\u03b1\u201a\u2030\u2038\u2045\u2048\0\u2050\u03b2\u2022\u2025\u2027\u202a\u202c\0\u202e\u803b\xbd\u40bd;\u6153\u803b\xbc\u40bc;\u6155;\u6159;\u615b\u01b3\u2034\0\u2036;\u6154;\u6156\u02b4\u203e\u2041\0\0\u2043\u803b\xbe\u40be;\u6157;\u615c5;\u6158\u01b6\u204c\0\u204e;\u615a;\u615d8;\u615el;\u6044wn;\u6322cr;\uc000\ud835\udcbb\u0880Eabcdefgijlnorstv\u2082\u2089\u209f\u20a5\u20b0\u20b4\u20f0\u20f5\u20fa\u20ff\u2103\u2112\u2138\u0317\u213e\u2152\u219e\u0100;l\u064d\u2087;\u6a8c\u0180cmp\u2090\u2095\u209dute;\u41f5ma\u0100;d\u209c\u1cda\u43b3;\u6a86reve;\u411f\u0100iy\u20aa\u20aerc;\u411d;\u4433ot;\u4121\u0200;lqs\u063e\u0642\u20bd\u20c9\u0180;qs\u063e\u064c\u20c4lan\xf4\u0665\u0200;cdl\u0665\u20d2\u20d5\u20e5c;\u6aa9ot\u0100;o\u20dc\u20dd\u6a80\u0100;l\u20e2\u20e3\u6a82;\u6a84\u0100;e\u20ea\u20ed\uc000\u22db\ufe00s;\u6a94r;\uc000\ud835\udd24\u0100;g\u0673\u061bmel;\u6137cy;\u4453\u0200;Eaj\u065a\u210c\u210e\u2110;\u6a92;\u6aa5;\u6aa4\u0200Eaes\u211b\u211d\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6a8arox\xbb\u2124\u0100;q\u212e\u212f\u6a88\u0100;q\u212e\u211bim;\u62e7pf;\uc000\ud835\udd58\u0100ci\u2143\u2146r;\u610am\u0180;el\u066b\u214e\u2150;\u6a8e;\u6a90\u8300>;cdlqr\u05ee\u2160\u216a\u216e\u2173\u2179\u0100ci\u2165\u2167;\u6aa7r;\u6a7aot;\u62d7Par;\u6995uest;\u6a7c\u0280adels\u2184\u216a\u2190\u0656\u219b\u01f0\u2189\0\u218epro\xf8\u209er;\u6978q\u0100lq\u063f\u2196les\xf3\u2088i\xed\u066b\u0100en\u21a3\u21adrtneqq;\uc000\u2269\ufe00\xc5\u21aa\u0500Aabcefkosy\u21c4\u21c7\u21f1\u21f5\u21fa\u2218\u221d\u222f\u2268\u227dr\xf2\u03a0\u0200ilmr\u21d0\u21d4\u21d7\u21dbrs\xf0\u1484f\xbb\u2024il\xf4\u06a9\u0100dr\u21e0\u21e4cy;\u444a\u0180;cw\u08f4\u21eb\u21efir;\u6948;\u61adar;\u610firc;\u4125\u0180alr\u2201\u220e\u2213rts\u0100;u\u2209\u220a\u6665it\xbb\u220alip;\u6026con;\u62b9r;\uc000\ud835\udd25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223a\u223e\u2243\u225e\u2263rr;\u61fftht;\u623bk\u0100lr\u2249\u2253eftarrow;\u61a9ightarrow;\u61aaf;\uc000\ud835\udd59bar;\u6015\u0180clt\u226f\u2274\u2278r;\uc000\ud835\udcbdas\xe8\u21f4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xbb\u1c5b\u0ae1\u22a3\0\u22aa\0\u22b8\u22c5\u22ce\0\u22d5\u22f3\0\0\u22f8\u2322\u2367\u2362\u237f\0\u2386\u23aa\u23b4cute\u803b\xed\u40ed\u0180;iy\u0771\u22b0\u22b5rc\u803b\xee\u40ee;\u4438\u0100cx\u22bc\u22bfy;\u4435cl\u803b\xa1\u40a1\u0100fr\u039f\u22c9;\uc000\ud835\udd26rave\u803b\xec\u40ec\u0200;ino\u073e\u22dd\u22e9\u22ee\u0100in\u22e2\u22e6nt;\u6a0ct;\u622dfin;\u69dcta;\u6129lig;\u4133\u0180aop\u22fe\u231a\u231d\u0180cgt\u2305\u2308\u2317r;\u412b\u0180elp\u071f\u230f\u2313in\xe5\u078ear\xf4\u0720h;\u4131f;\u62b7ed;\u41b5\u0280;cfot\u04f4\u232c\u2331\u233d\u2341are;\u6105in\u0100;t\u2338\u2339\u621eie;\u69dddo\xf4\u2319\u0280;celp\u0757\u234c\u2350\u235b\u2361al;\u62ba\u0100gr\u2355\u2359er\xf3\u1563\xe3\u234darhk;\u6a17rod;\u6a3c\u0200cgpt\u236f\u2372\u2376\u237by;\u4451on;\u412ff;\uc000\ud835\udd5aa;\u43b9uest\u803b\xbf\u40bf\u0100ci\u238a\u238fr;\uc000\ud835\udcben\u0280;Edsv\u04f4\u239b\u239d\u23a1\u04f3;\u62f9ot;\u62f5\u0100;v\u23a6\u23a7\u62f4;\u62f3\u0100;i\u0777\u23aelde;\u4129\u01eb\u23b8\0\u23bccy;\u4456l\u803b\xef\u40ef\u0300cfmosu\u23cc\u23d7\u23dc\u23e1\u23e7\u23f5\u0100iy\u23d1\u23d5rc;\u4135;\u4439r;\uc000\ud835\udd27ath;\u4237pf;\uc000\ud835\udd5b\u01e3\u23ec\0\u23f1r;\uc000\ud835\udcbfrcy;\u4458kcy;\u4454\u0400acfghjos\u240b\u2416\u2422\u2427\u242d\u2431\u2435\u243bppa\u0100;v\u2413\u2414\u43ba;\u43f0\u0100ey\u241b\u2420dil;\u4137;\u443ar;\uc000\ud835\udd28reen;\u4138cy;\u4445cy;\u445cpf;\uc000\ud835\udd5ccr;\uc000\ud835\udcc0\u0b80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248d\u2491\u250e\u253d\u255a\u2580\u264e\u265e\u2665\u2679\u267d\u269a\u26b2\u26d8\u275d\u2768\u278b\u27c0\u2801\u2812\u0180art\u2477\u247a\u247cr\xf2\u09c6\xf2\u0395ail;\u691barr;\u690e\u0100;g\u0994\u248b;\u6a8bar;\u6962\u0963\u24a5\0\u24aa\0\u24b1\0\0\0\0\0\u24b5\u24ba\0\u24c6\u24c8\u24cd\0\u24f9ute;\u413amptyv;\u69b4ra\xee\u084cbda;\u43bbg\u0180;dl\u088e\u24c1\u24c3;\u6991\xe5\u088e;\u6a85uo\u803b\xab\u40abr\u0400;bfhlpst\u0899\u24de\u24e6\u24e9\u24eb\u24ee\u24f1\u24f5\u0100;f\u089d\u24e3s;\u691fs;\u691d\xeb\u2252p;\u61abl;\u6939im;\u6973l;\u61a2\u0180;ae\u24ff\u2500\u2504\u6aabil;\u6919\u0100;s\u2509\u250a\u6aad;\uc000\u2aad\ufe00\u0180abr\u2515\u2519\u251drr;\u690crk;\u6772\u0100ak\u2522\u252cc\u0100ek\u2528\u252a;\u407b;\u405b\u0100es\u2531\u2533;\u698bl\u0100du\u2539\u253b;\u698f;\u698d\u0200aeuy\u2546\u254b\u2556\u2558ron;\u413e\u0100di\u2550\u2554il;\u413c\xec\u08b0\xe2\u2529;\u443b\u0200cqrs\u2563\u2566\u256d\u257da;\u6936uo\u0100;r\u0e19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694bh;\u61b2\u0280;fgqs\u258b\u258c\u0989\u25f3\u25ff\u6264t\u0280ahlrt\u2598\u25a4\u25b7\u25c2\u25e8rrow\u0100;t\u0899\u25a1a\xe9\u24f6arpoon\u0100du\u25af\u25b4own\xbb\u045ap\xbb\u0966eftarrows;\u61c7ight\u0180ahs\u25cd\u25d6\u25derrow\u0100;s\u08f4\u08a7arpoon\xf3\u0f98quigarro\xf7\u21f0hreetimes;\u62cb\u0180;qs\u258b\u0993\u25falan\xf4\u09ac\u0280;cdgs\u09ac\u260a\u260d\u261d\u2628c;\u6aa8ot\u0100;o\u2614\u2615\u6a7f\u0100;r\u261a\u261b\u6a81;\u6a83\u0100;e\u2622\u2625\uc000\u22da\ufe00s;\u6a93\u0280adegs\u2633\u2639\u263d\u2649\u264bppro\xf8\u24c6ot;\u62d6q\u0100gq\u2643\u2645\xf4\u0989gt\xf2\u248c\xf4\u099bi\xed\u09b2\u0180ilr\u2655\u08e1\u265asht;\u697c;\uc000\ud835\udd29\u0100;E\u099c\u2663;\u6a91\u0161\u2669\u2676r\u0100du\u25b2\u266e\u0100;l\u0965\u2673;\u696alk;\u6584cy;\u4459\u0280;acht\u0a48\u2688\u268b\u2691\u2696r\xf2\u25c1orne\xf2\u1d08ard;\u696bri;\u65fa\u0100io\u269f\u26a4dot;\u4140ust\u0100;a\u26ac\u26ad\u63b0che\xbb\u26ad\u0200Eaes\u26bb\u26bd\u26c9\u26d4;\u6268p\u0100;p\u26c3\u26c4\u6a89rox\xbb\u26c4\u0100;q\u26ce\u26cf\u6a87\u0100;q\u26ce\u26bbim;\u62e6\u0400abnoptwz\u26e9\u26f4\u26f7\u271a\u272f\u2741\u2747\u2750\u0100nr\u26ee\u26f1g;\u67ecr;\u61fdr\xeb\u08c1g\u0180lmr\u26ff\u270d\u2714eft\u0100ar\u09e6\u2707ight\xe1\u09f2apsto;\u67fcight\xe1\u09fdparrow\u0100lr\u2725\u2729ef\xf4\u24edight;\u61ac\u0180afl\u2736\u2739\u273dr;\u6985;\uc000\ud835\udd5dus;\u6a2dimes;\u6a34\u0161\u274b\u274fst;\u6217\xe1\u134e\u0180;ef\u2757\u2758\u1800\u65cange\xbb\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277c\u2785\u2787r\xf2\u08a8orne\xf2\u1d8car\u0100;d\u0f98\u2783;\u696d;\u600eri;\u62bf\u0300achiqt\u2798\u279d\u0a40\u27a2\u27ae\u27bbquo;\u6039r;\uc000\ud835\udcc1m\u0180;eg\u09b2\u27aa\u27ac;\u6a8d;\u6a8f\u0100bu\u252a\u27b3o\u0100;r\u0e1f\u27b9;\u601arok;\u4142\u8400<;cdhilqr\u082b\u27d2\u2639\u27dc\u27e0\u27e5\u27ea\u27f0\u0100ci\u27d7\u27d9;\u6aa6r;\u6a79re\xe5\u25f2mes;\u62c9arr;\u6976uest;\u6a7b\u0100Pi\u27f5\u27f9ar;\u6996\u0180;ef\u2800\u092d\u181b\u65c3r\u0100du\u2807\u280dshar;\u694ahar;\u6966\u0100en\u2817\u2821rtneqq;\uc000\u2268\ufe00\xc5\u281e\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288e\u2893\u28a0\u28a5\u28a8\u28da\u28e2\u28e4\u0a83\u28f3\u2902Dot;\u623a\u0200clpr\u284e\u2852\u2863\u287dr\u803b\xaf\u40af\u0100et\u2857\u2859;\u6642\u0100;e\u285e\u285f\u6720se\xbb\u285f\u0100;s\u103b\u2868to\u0200;dlu\u103b\u2873\u2877\u287bow\xee\u048cef\xf4\u090f\xf0\u13d1ker;\u65ae\u0100oy\u2887\u288cmma;\u6a29;\u443cash;\u6014asuredangle\xbb\u1626r;\uc000\ud835\udd2ao;\u6127\u0180cdn\u28af\u28b4\u28c9ro\u803b\xb5\u40b5\u0200;acd\u1464\u28bd\u28c0\u28c4s\xf4\u16a7ir;\u6af0ot\u80bb\xb7\u01b5us\u0180;bd\u28d2\u1903\u28d3\u6212\u0100;u\u1d3c\u28d8;\u6a2a\u0163\u28de\u28e1p;\u6adb\xf2\u2212\xf0\u0a81\u0100dp\u28e9\u28eeels;\u62a7f;\uc000\ud835\udd5e\u0100ct\u28f8\u28fdr;\uc000\ud835\udcc2pos\xbb\u159d\u0180;lm\u2909\u290a\u290d\u43bctimap;\u62b8\u0c00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297e\u2989\u2998\u29da\u29e9\u2a15\u2a1a\u2a58\u2a5d\u2a83\u2a95\u2aa4\u2aa8\u2b04\u2b07\u2b44\u2b7f\u2bae\u2c34\u2c67\u2c7c\u2ce9\u0100gt\u2947\u294b;\uc000\u22d9\u0338\u0100;v\u2950\u0bcf\uc000\u226b\u20d2\u0180elt\u295a\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61cdightarrow;\u61ce;\uc000\u22d8\u0338\u0100;v\u297b\u0c47\uc000\u226a\u20d2ightarrow;\u61cf\u0100Dd\u298e\u2993ash;\u62afash;\u62ae\u0280bcnpt\u29a3\u29a7\u29ac\u29b1\u29ccla\xbb\u02deute;\u4144g;\uc000\u2220\u20d2\u0280;Eiop\u0d84\u29bc\u29c0\u29c5\u29c8;\uc000\u2a70\u0338d;\uc000\u224b\u0338s;\u4149ro\xf8\u0d84ur\u0100;a\u29d3\u29d4\u666el\u0100;s\u29d3\u0b38\u01f3\u29df\0\u29e3p\u80bb\xa0\u0b37mp\u0100;e\u0bf9\u0c00\u0280aeouy\u29f4\u29fe\u2a03\u2a10\u2a13\u01f0\u29f9\0\u29fb;\u6a43on;\u4148dil;\u4146ng\u0100;d\u0d7e\u2a0aot;\uc000\u2a6d\u0338p;\u6a42;\u443dash;\u6013\u0380;Aadqsx\u0b92\u2a29\u2a2d\u2a3b\u2a41\u2a45\u2a50rr;\u61d7r\u0100hr\u2a33\u2a36k;\u6924\u0100;o\u13f2\u13f0ot;\uc000\u2250\u0338ui\xf6\u0b63\u0100ei\u2a4a\u2a4ear;\u6928\xed\u0b98ist\u0100;s\u0ba0\u0b9fr;\uc000\ud835\udd2b\u0200Eest\u0bc5\u2a66\u2a79\u2a7c\u0180;qs\u0bbc\u2a6d\u0be1\u0180;qs\u0bbc\u0bc5\u2a74lan\xf4\u0be2i\xed\u0bea\u0100;r\u0bb6\u2a81\xbb\u0bb7\u0180Aap\u2a8a\u2a8d\u2a91r\xf2\u2971rr;\u61aear;\u6af2\u0180;sv\u0f8d\u2a9c\u0f8c\u0100;d\u2aa1\u2aa2\u62fc;\u62facy;\u445a\u0380AEadest\u2ab7\u2aba\u2abe\u2ac2\u2ac5\u2af6\u2af9r\xf2\u2966;\uc000\u2266\u0338rr;\u619ar;\u6025\u0200;fqs\u0c3b\u2ace\u2ae3\u2aeft\u0100ar\u2ad4\u2ad9rro\xf7\u2ac1ightarro\xf7\u2a90\u0180;qs\u0c3b\u2aba\u2aealan\xf4\u0c55\u0100;s\u0c55\u2af4\xbb\u0c36i\xed\u0c5d\u0100;r\u0c35\u2afei\u0100;e\u0c1a\u0c25i\xe4\u0d90\u0100pt\u2b0c\u2b11f;\uc000\ud835\udd5f\u8180\xac;in\u2b19\u2b1a\u2b36\u40acn\u0200;Edv\u0b89\u2b24\u2b28\u2b2e;\uc000\u22f9\u0338ot;\uc000\u22f5\u0338\u01e1\u0b89\u2b33\u2b35;\u62f7;\u62f6i\u0100;v\u0cb8\u2b3c\u01e1\u0cb8\u2b41\u2b43;\u62fe;\u62fd\u0180aor\u2b4b\u2b63\u2b69r\u0200;ast\u0b7b\u2b55\u2b5a\u2b5flle\xec\u0b7bl;\uc000\u2afd\u20e5;\uc000\u2202\u0338lint;\u6a14\u0180;ce\u0c92\u2b70\u2b73u\xe5\u0ca5\u0100;c\u0c98\u2b78\u0100;e\u0c92\u2b7d\xf1\u0c98\u0200Aait\u2b88\u2b8b\u2b9d\u2ba7r\xf2\u2988rr\u0180;cw\u2b94\u2b95\u2b99\u619b;\uc000\u2933\u0338;\uc000\u219d\u0338ghtarrow\xbb\u2b95ri\u0100;e\u0ccb\u0cd6\u0380chimpqu\u2bbd\u2bcd\u2bd9\u2b04\u0b78\u2be4\u2bef\u0200;cer\u0d32\u2bc6\u0d37\u2bc9u\xe5\u0d45;\uc000\ud835\udcc3ort\u026d\u2b05\0\0\u2bd6ar\xe1\u2b56m\u0100;e\u0d6e\u2bdf\u0100;q\u0d74\u0d73su\u0100bp\u2beb\u2bed\xe5\u0cf8\xe5\u0d0b\u0180bcp\u2bf6\u2c11\u2c19\u0200;Ees\u2bff\u2c00\u0d22\u2c04\u6284;\uc000\u2ac5\u0338et\u0100;e\u0d1b\u2c0bq\u0100;q\u0d23\u2c00c\u0100;e\u0d32\u2c17\xf1\u0d38\u0200;Ees\u2c22\u2c23\u0d5f\u2c27\u6285;\uc000\u2ac6\u0338et\u0100;e\u0d58\u2c2eq\u0100;q\u0d60\u2c23\u0200gilr\u2c3d\u2c3f\u2c45\u2c47\xec\u0bd7lde\u803b\xf1\u40f1\xe7\u0c43iangle\u0100lr\u2c52\u2c5ceft\u0100;e\u0c1a\u2c5a\xf1\u0c26ight\u0100;e\u0ccb\u2c65\xf1\u0cd7\u0100;m\u2c6c\u2c6d\u43bd\u0180;es\u2c74\u2c75\u2c79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2c8f\u2c94\u2c99\u2c9e\u2ca3\u2cb0\u2cb6\u2cd3\u2ce3ash;\u62adarr;\u6904p;\uc000\u224d\u20d2ash;\u62ac\u0100et\u2ca8\u2cac;\uc000\u2265\u20d2;\uc000>\u20d2nfin;\u69de\u0180Aet\u2cbd\u2cc1\u2cc5rr;\u6902;\uc000\u2264\u20d2\u0100;r\u2cca\u2ccd\uc000<\u20d2ie;\uc000\u22b4\u20d2\u0100At\u2cd8\u2cdcrr;\u6903rie;\uc000\u22b5\u20d2im;\uc000\u223c\u20d2\u0180Aan\u2cf0\u2cf4\u2d02rr;\u61d6r\u0100hr\u2cfa\u2cfdk;\u6923\u0100;o\u13e7\u13e5ear;\u6927\u1253\u1a95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2d2d\0\u2d38\u2d48\u2d60\u2d65\u2d72\u2d84\u1b07\0\0\u2d8d\u2dab\0\u2dc8\u2dce\0\u2ddc\u2e19\u2e2b\u2e3e\u2e43\u0100cs\u2d31\u1a97ute\u803b\xf3\u40f3\u0100iy\u2d3c\u2d45r\u0100;c\u1a9e\u2d42\u803b\xf4\u40f4;\u443e\u0280abios\u1aa0\u2d52\u2d57\u01c8\u2d5alac;\u4151v;\u6a38old;\u69bclig;\u4153\u0100cr\u2d69\u2d6dir;\u69bf;\uc000\ud835\udd2c\u036f\u2d79\0\0\u2d7c\0\u2d82n;\u42dbave\u803b\xf2\u40f2;\u69c1\u0100bm\u2d88\u0df4ar;\u69b5\u0200acit\u2d95\u2d98\u2da5\u2da8r\xf2\u1a80\u0100ir\u2d9d\u2da0r;\u69beoss;\u69bbn\xe5\u0e52;\u69c0\u0180aei\u2db1\u2db5\u2db9cr;\u414dga;\u43c9\u0180cdn\u2dc0\u2dc5\u01cdron;\u43bf;\u69b6pf;\uc000\ud835\udd60\u0180ael\u2dd4\u2dd7\u01d2r;\u69b7rp;\u69b9\u0380;adiosv\u2dea\u2deb\u2dee\u2e08\u2e0d\u2e10\u2e16\u6228r\xf2\u1a86\u0200;efm\u2df7\u2df8\u2e02\u2e05\u6a5dr\u0100;o\u2dfe\u2dff\u6134f\xbb\u2dff\u803b\xaa\u40aa\u803b\xba\u40bagof;\u62b6r;\u6a56lope;\u6a57;\u6a5b\u0180clo\u2e1f\u2e21\u2e27\xf2\u2e01ash\u803b\xf8\u40f8l;\u6298i\u016c\u2e2f\u2e34de\u803b\xf5\u40f5es\u0100;a\u01db\u2e3as;\u6a36ml\u803b\xf6\u40f6bar;\u633d\u0ae1\u2e5e\0\u2e7d\0\u2e80\u2e9d\0\u2ea2\u2eb9\0\0\u2ecb\u0e9c\0\u2f13\0\0\u2f2b\u2fbc\0\u2fc8r\u0200;ast\u0403\u2e67\u2e72\u0e85\u8100\xb6;l\u2e6d\u2e6e\u40b6le\xec\u0403\u0269\u2e78\0\0\u2e7bm;\u6af3;\u6afdy;\u443fr\u0280cimpt\u2e8b\u2e8f\u2e93\u1865\u2e97nt;\u4025od;\u402eil;\u6030enk;\u6031r;\uc000\ud835\udd2d\u0180imo\u2ea8\u2eb0\u2eb4\u0100;v\u2ead\u2eae\u43c6;\u43d5ma\xf4\u0a76ne;\u660e\u0180;tv\u2ebf\u2ec0\u2ec8\u43c0chfork\xbb\u1ffd;\u43d6\u0100au\u2ecf\u2edfn\u0100ck\u2ed5\u2eddk\u0100;h\u21f4\u2edb;\u610e\xf6\u21f4s\u0480;abcdemst\u2ef3\u2ef4\u1908\u2ef9\u2efd\u2f04\u2f06\u2f0a\u2f0e\u402bcir;\u6a23ir;\u6a22\u0100ou\u1d40\u2f02;\u6a25;\u6a72n\u80bb\xb1\u0e9dim;\u6a26wo;\u6a27\u0180ipu\u2f19\u2f20\u2f25ntint;\u6a15f;\uc000\ud835\udd61nd\u803b\xa3\u40a3\u0500;Eaceinosu\u0ec8\u2f3f\u2f41\u2f44\u2f47\u2f81\u2f89\u2f92\u2f7e\u2fb6;\u6ab3p;\u6ab7u\xe5\u0ed9\u0100;c\u0ece\u2f4c\u0300;acens\u0ec8\u2f59\u2f5f\u2f66\u2f68\u2f7eppro\xf8\u2f43urlye\xf1\u0ed9\xf1\u0ece\u0180aes\u2f6f\u2f76\u2f7approx;\u6ab9qq;\u6ab5im;\u62e8i\xed\u0edfme\u0100;s\u2f88\u0eae\u6032\u0180Eas\u2f78\u2f90\u2f7a\xf0\u2f75\u0180dfp\u0eec\u2f99\u2faf\u0180als\u2fa0\u2fa5\u2faalar;\u632eine;\u6312urf;\u6313\u0100;t\u0efb\u2fb4\xef\u0efbrel;\u62b0\u0100ci\u2fc0\u2fc5r;\uc000\ud835\udcc5;\u43c8ncsp;\u6008\u0300fiopsu\u2fda\u22e2\u2fdf\u2fe5\u2feb\u2ff1r;\uc000\ud835\udd2epf;\uc000\ud835\udd62rime;\u6057cr;\uc000\ud835\udcc6\u0180aeo\u2ff8\u3009\u3013t\u0100ei\u2ffe\u3005rnion\xf3\u06b0nt;\u6a16st\u0100;e\u3010\u3011\u403f\xf1\u1f19\xf4\u0f14\u0a80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30e0\u310e\u312b\u3147\u3162\u3172\u318e\u3206\u3215\u3224\u3229\u3258\u326e\u3272\u3290\u32b0\u32b7\u0180art\u3047\u304a\u304cr\xf2\u10b3\xf2\u03ddail;\u691car\xf2\u1c65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307f\u308f\u3094\u30cc\u0100eu\u306d\u3071;\uc000\u223d\u0331te;\u4155i\xe3\u116emptyv;\u69b3g\u0200;del\u0fd1\u3089\u308b\u308d;\u6992;\u69a5\xe5\u0fd1uo\u803b\xbb\u40bbr\u0580;abcfhlpstw\u0fdc\u30ac\u30af\u30b7\u30b9\u30bc\u30be\u30c0\u30c3\u30c7\u30cap;\u6975\u0100;f\u0fe0\u30b4s;\u6920;\u6933s;\u691e\xeb\u225d\xf0\u272el;\u6945im;\u6974l;\u61a3;\u619d\u0100ai\u30d1\u30d5il;\u691ao\u0100;n\u30db\u30dc\u6236al\xf3\u0f1e\u0180abr\u30e7\u30ea\u30eer\xf2\u17e5rk;\u6773\u0100ak\u30f3\u30fdc\u0100ek\u30f9\u30fb;\u407d;\u405d\u0100es\u3102\u3104;\u698cl\u0100du\u310a\u310c;\u698e;\u6990\u0200aeuy\u3117\u311c\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xec\u0ff2\xe2\u30fa;\u4440\u0200clqs\u3134\u3137\u313d\u3144a;\u6937dhar;\u6969uo\u0100;r\u020e\u020dh;\u61b3\u0180acg\u314e\u315f\u0f44l\u0200;ips\u0f78\u3158\u315b\u109cn\xe5\u10bbar\xf4\u0fa9t;\u65ad\u0180ilr\u3169\u1023\u316esht;\u697d;\uc000\ud835\udd2f\u0100ao\u3177\u3186r\u0100du\u317d\u317f\xbb\u047b\u0100;l\u1091\u3184;\u696c\u0100;v\u318b\u318c\u43c1;\u43f1\u0180gns\u3195\u31f9\u31fcht\u0300ahlrst\u31a4\u31b0\u31c2\u31d8\u31e4\u31eerrow\u0100;t\u0fdc\u31ada\xe9\u30c8arpoon\u0100du\u31bb\u31bfow\xee\u317ep\xbb\u1092eft\u0100ah\u31ca\u31d0rrow\xf3\u0feaarpoon\xf3\u0551ightarrows;\u61c9quigarro\xf7\u30cbhreetimes;\u62ccg;\u42daingdotse\xf1\u1f32\u0180ahm\u320d\u3210\u3213r\xf2\u0feaa\xf2\u0551;\u600foust\u0100;a\u321e\u321f\u63b1che\xbb\u321fmid;\u6aee\u0200abpt\u3232\u323d\u3240\u3252\u0100nr\u3237\u323ag;\u67edr;\u61fer\xeb\u1003\u0180afl\u3247\u324a\u324er;\u6986;\uc000\ud835\udd63us;\u6a2eimes;\u6a35\u0100ap\u325d\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6a12ar\xf2\u31e3\u0200achq\u327b\u3280\u10bc\u3285quo;\u603ar;\uc000\ud835\udcc7\u0100bu\u30fb\u328ao\u0100;r\u0214\u0213\u0180hir\u3297\u329b\u32a0re\xe5\u31f8mes;\u62cai\u0200;efl\u32aa\u1059\u1821\u32ab\u65b9tri;\u69celuhar;\u6968;\u611e\u0d61\u32d5\u32db\u32df\u332c\u3338\u3371\0\u337a\u33a4\0\0\u33ec\u33f0\0\u3428\u3448\u345a\u34ad\u34b1\u34ca\u34f1\0\u3616\0\0\u3633cute;\u415bqu\xef\u27ba\u0500;Eaceinpsy\u11ed\u32f3\u32f5\u32ff\u3302\u330b\u330f\u331f\u3326\u3329;\u6ab4\u01f0\u32fa\0\u32fc;\u6ab8on;\u4161u\xe5\u11fe\u0100;d\u11f3\u3307il;\u415frc;\u415d\u0180Eas\u3316\u3318\u331b;\u6ab6p;\u6abaim;\u62e9olint;\u6a13i\xed\u1204;\u4441ot\u0180;be\u3334\u1d47\u3335\u62c5;\u6a66\u0380Aacmstx\u3346\u334a\u3357\u335b\u335e\u3363\u336drr;\u61d8r\u0100hr\u3350\u3352\xeb\u2228\u0100;o\u0a36\u0a34t\u803b\xa7\u40a7i;\u403bwar;\u6929m\u0100in\u3369\xf0nu\xf3\xf1t;\u6736r\u0100;o\u3376\u2055\uc000\ud835\udd30\u0200acoy\u3382\u3386\u3391\u33a0rp;\u666f\u0100hy\u338b\u338fcy;\u4449;\u4448rt\u026d\u3399\0\0\u339ci\xe4\u1464ara\xec\u2e6f\u803b\xad\u40ad\u0100gm\u33a8\u33b4ma\u0180;fv\u33b1\u33b2\u33b2\u43c3;\u43c2\u0400;deglnpr\u12ab\u33c5\u33c9\u33ce\u33d6\u33de\u33e1\u33e6ot;\u6a6a\u0100;q\u12b1\u12b0\u0100;E\u33d3\u33d4\u6a9e;\u6aa0\u0100;E\u33db\u33dc\u6a9d;\u6a9fe;\u6246lus;\u6a24arr;\u6972ar\xf2\u113d\u0200aeit\u33f8\u3408\u340f\u3417\u0100ls\u33fd\u3404lsetm\xe9\u336ahp;\u6a33parsl;\u69e4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341c\u341d\u6aaa\u0100;s\u3422\u3423\u6aac;\uc000\u2aac\ufe00\u0180flp\u342e\u3433\u3442tcy;\u444c\u0100;b\u3438\u3439\u402f\u0100;a\u343e\u343f\u69c4r;\u633ff;\uc000\ud835\udd64a\u0100dr\u344d\u0402es\u0100;u\u3454\u3455\u6660it\xbb\u3455\u0180csu\u3460\u3479\u349f\u0100au\u3465\u346fp\u0100;s\u1188\u346b;\uc000\u2293\ufe00p\u0100;s\u11b4\u3475;\uc000\u2294\ufe00u\u0100bp\u347f\u348f\u0180;es\u1197\u119c\u3486et\u0100;e\u1197\u348d\xf1\u119d\u0180;es\u11a8\u11ad\u3496et\u0100;e\u11a8\u349d\xf1\u11ae\u0180;af\u117b\u34a6\u05b0r\u0165\u34ab\u05b1\xbb\u117car\xf2\u1148\u0200cemt\u34b9\u34be\u34c2\u34c5r;\uc000\ud835\udcc8tm\xee\xf1i\xec\u3415ar\xe6\u11be\u0100ar\u34ce\u34d5r\u0100;f\u34d4\u17bf\u6606\u0100an\u34da\u34edight\u0100ep\u34e3\u34eapsilo\xee\u1ee0h\xe9\u2eafs\xbb\u2852\u0280bcmnp\u34fb\u355e\u1209\u358b\u358e\u0480;Edemnprs\u350e\u350f\u3511\u3515\u351e\u3523\u352c\u3531\u3536\u6282;\u6ac5ot;\u6abd\u0100;d\u11da\u351aot;\u6ac3ult;\u6ac1\u0100Ee\u3528\u352a;\u6acb;\u628alus;\u6abfarr;\u6979\u0180eiu\u353d\u3552\u3555t\u0180;en\u350e\u3545\u354bq\u0100;q\u11da\u350feq\u0100;q\u352b\u3528m;\u6ac7\u0100bp\u355a\u355c;\u6ad5;\u6ad3c\u0300;acens\u11ed\u356c\u3572\u3579\u357b\u3326ppro\xf8\u32faurlye\xf1\u11fe\xf1\u11f3\u0180aes\u3582\u3588\u331bppro\xf8\u331aq\xf1\u3317g;\u666a\u0680123;Edehlmnps\u35a9\u35ac\u35af\u121c\u35b2\u35b4\u35c0\u35c9\u35d5\u35da\u35df\u35e8\u35ed\u803b\xb9\u40b9\u803b\xb2\u40b2\u803b\xb3\u40b3;\u6ac6\u0100os\u35b9\u35bct;\u6abeub;\u6ad8\u0100;d\u1222\u35c5ot;\u6ac4s\u0100ou\u35cf\u35d2l;\u67c9b;\u6ad7arr;\u697bult;\u6ac2\u0100Ee\u35e4\u35e6;\u6acc;\u628blus;\u6ac0\u0180eiu\u35f4\u3609\u360ct\u0180;en\u121c\u35fc\u3602q\u0100;q\u1222\u35b2eq\u0100;q\u35e7\u35e4m;\u6ac8\u0100bp\u3611\u3613;\u6ad4;\u6ad6\u0180Aan\u361c\u3620\u362drr;\u61d9r\u0100hr\u3626\u3628\xeb\u222e\u0100;o\u0a2b\u0a29war;\u692alig\u803b\xdf\u40df\u0be1\u3651\u365d\u3660\u12ce\u3673\u3679\0\u367e\u36c2\0\0\0\0\0\u36db\u3703\0\u3709\u376c\0\0\0\u3787\u0272\u3656\0\0\u365bget;\u6316;\u43c4r\xeb\u0e5f\u0180aey\u3666\u366b\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uc000\ud835\udd31\u0200eiko\u3686\u369d\u36b5\u36bc\u01f2\u368b\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369b\u43b8ym;\u43d1\u0100cn\u36a2\u36b2k\u0100as\u36a8\u36aeppro\xf8\u12c1im\xbb\u12acs\xf0\u129e\u0100as\u36ba\u36ae\xf0\u12c1rn\u803b\xfe\u40fe\u01ec\u031f\u36c6\u22e7es\u8180\xd7;bd\u36cf\u36d0\u36d8\u40d7\u0100;a\u190f\u36d5r;\u6a31;\u6a30\u0180eps\u36e1\u36e3\u3700\xe1\u2a4d\u0200;bcf\u0486\u36ec\u36f0\u36f4ot;\u6336ir;\u6af1\u0100;o\u36f9\u36fc\uc000\ud835\udd65rk;\u6ada\xe1\u3362rime;\u6034\u0180aip\u370f\u3712\u3764d\xe5\u1248\u0380adempst\u3721\u374d\u3740\u3751\u3757\u375c\u375fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65b5own\xbb\u1dbbeft\u0100;e\u2800\u373e\xf1\u092e;\u625cight\u0100;e\u32aa\u374b\xf1\u105aot;\u65ecinus;\u6a3alus;\u6a39b;\u69cdime;\u6a3bezium;\u63e2\u0180cht\u3772\u377d\u3781\u0100ry\u3777\u377b;\uc000\ud835\udcc9;\u4446cy;\u445brok;\u4167\u0100io\u378b\u378ex\xf4\u1777head\u0100lr\u3797\u37a0eftarro\xf7\u084fightarrow\xbb\u0f5d\u0900AHabcdfghlmoprstuw\u37d0\u37d3\u37d7\u37e4\u37f0\u37fc\u380e\u381c\u3823\u3834\u3851\u385d\u386b\u38a9\u38cc\u38d2\u38ea\u38f6r\xf2\u03edar;\u6963\u0100cr\u37dc\u37e2ute\u803b\xfa\u40fa\xf2\u1150r\u01e3\u37ea\0\u37edy;\u445eve;\u416d\u0100iy\u37f5\u37farc\u803b\xfb\u40fb;\u4443\u0180abh\u3803\u3806\u380br\xf2\u13adlac;\u4171a\xf2\u13c3\u0100ir\u3813\u3818sht;\u697e;\uc000\ud835\udd32rave\u803b\xf9\u40f9\u0161\u3827\u3831r\u0100lr\u382c\u382e\xbb\u0957\xbb\u1083lk;\u6580\u0100ct\u3839\u384d\u026f\u383f\0\0\u384arn\u0100;e\u3845\u3846\u631cr\xbb\u3846op;\u630fri;\u65f8\u0100al\u3856\u385acr;\u416b\u80bb\xa8\u0349\u0100gp\u3862\u3866on;\u4173f;\uc000\ud835\udd66\u0300adhlsu\u114b\u3878\u387d\u1372\u3891\u38a0own\xe1\u13b3arpoon\u0100lr\u3888\u388cef\xf4\u382digh\xf4\u382fi\u0180;hl\u3899\u389a\u389c\u43c5\xbb\u13faon\xbb\u389aparrows;\u61c8\u0180cit\u38b0\u38c4\u38c8\u026f\u38b6\0\0\u38c1rn\u0100;e\u38bc\u38bd\u631dr\xbb\u38bdop;\u630eng;\u416fri;\u65f9cr;\uc000\ud835\udcca\u0180dir\u38d9\u38dd\u38e2ot;\u62f0lde;\u4169i\u0100;f\u3730\u38e8\xbb\u1813\u0100am\u38ef\u38f2r\xf2\u38a8l\u803b\xfc\u40fcangle;\u69a7\u0780ABDacdeflnoprsz\u391c\u391f\u3929\u392d\u39b5\u39b8\u39bd\u39df\u39e4\u39e8\u39f3\u39f9\u39fd\u3a01\u3a20r\xf2\u03f7ar\u0100;v\u3926\u3927\u6ae8;\u6ae9as\xe8\u03e1\u0100nr\u3932\u3937grt;\u699c\u0380eknprst\u34e3\u3946\u394b\u3952\u395d\u3964\u3996app\xe1\u2415othin\xe7\u1e96\u0180hir\u34eb\u2ec8\u3959op\xf4\u2fb5\u0100;h\u13b7\u3962\xef\u318d\u0100iu\u3969\u396dgm\xe1\u33b3\u0100bp\u3972\u3984setneq\u0100;q\u397d\u3980\uc000\u228a\ufe00;\uc000\u2acb\ufe00setneq\u0100;q\u398f\u3992\uc000\u228b\ufe00;\uc000\u2acc\ufe00\u0100hr\u399b\u399fet\xe1\u369ciangle\u0100lr\u39aa\u39afeft\xbb\u0925ight\xbb\u1051y;\u4432ash\xbb\u1036\u0180elr\u39c4\u39d2\u39d7\u0180;be\u2dea\u39cb\u39cfar;\u62bbq;\u625alip;\u62ee\u0100bt\u39dc\u1468a\xf2\u1469r;\uc000\ud835\udd33tr\xe9\u39aesu\u0100bp\u39ef\u39f1\xbb\u0d1c\xbb\u0d59pf;\uc000\ud835\udd67ro\xf0\u0efbtr\xe9\u39b4\u0100cu\u3a06\u3a0br;\uc000\ud835\udccb\u0100bp\u3a10\u3a18n\u0100Ee\u3980\u3a16\xbb\u397en\u0100Ee\u3992\u3a1e\xbb\u3990igzag;\u699a\u0380cefoprs\u3a36\u3a3b\u3a56\u3a5b\u3a54\u3a61\u3a6airc;\u4175\u0100di\u3a40\u3a51\u0100bg\u3a45\u3a49ar;\u6a5fe\u0100;q\u15fa\u3a4f;\u6259erp;\u6118r;\uc000\ud835\udd34pf;\uc000\ud835\udd68\u0100;e\u1479\u3a66at\xe8\u1479cr;\uc000\ud835\udccc\u0ae3\u178e\u3a87\0\u3a8b\0\u3a90\u3a9b\0\0\u3a9d\u3aa8\u3aab\u3aaf\0\0\u3ac3\u3ace\0\u3ad8\u17dc\u17dftr\xe9\u17d1r;\uc000\ud835\udd35\u0100Aa\u3a94\u3a97r\xf2\u03c3r\xf2\u09f6;\u43be\u0100Aa\u3aa1\u3aa4r\xf2\u03b8r\xf2\u09eba\xf0\u2713is;\u62fb\u0180dpt\u17a4\u3ab5\u3abe\u0100fl\u3aba\u17a9;\uc000\ud835\udd69im\xe5\u17b2\u0100Aa\u3ac7\u3acar\xf2\u03cer\xf2\u0a01\u0100cq\u3ad2\u17b8r;\uc000\ud835\udccd\u0100pt\u17d6\u3adcr\xe9\u17d4\u0400acefiosu\u3af0\u3afd\u3b08\u3b0c\u3b11\u3b15\u3b1b\u3b21c\u0100uy\u3af6\u3afbte\u803b\xfd\u40fd;\u444f\u0100iy\u3b02\u3b06rc;\u4177;\u444bn\u803b\xa5\u40a5r;\uc000\ud835\udd36cy;\u4457pf;\uc000\ud835\udd6acr;\uc000\ud835\udcce\u0100cm\u3b26\u3b29y;\u444el\u803b\xff\u40ff\u0500acdefhiosw\u3b42\u3b48\u3b54\u3b58\u3b64\u3b69\u3b6d\u3b74\u3b7a\u3b80cute;\u417a\u0100ay\u3b4d\u3b52ron;\u417e;\u4437ot;\u417c\u0100et\u3b5d\u3b61tr\xe6\u155fa;\u43b6r;\uc000\ud835\udd37cy;\u4436grarr;\u61ddpf;\uc000\ud835\udd6bcr;\uc000\ud835\udccf\u0100jn\u3b85\u3b87;\u600dj;\u600c" + .split("") + .map(function (c) { return c.charCodeAt(0); })); +//# sourceMappingURL=decode-data-html.js.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/generated/decode-data-html.js.map b/vuetest/node_modules/entities/lib/generated/decode-data-html.js.map new file mode 100644 index 0000000..5732f6f --- /dev/null +++ b/vuetest/node_modules/entities/lib/generated/decode-data-html.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decode-data-html.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-html.ts"],"names":[],"mappings":";AAAA,8CAA8C;;AAE9C,kBAAe,IAAI,WAAW;AAC1B,kBAAkB;AAClB,268CAA268C;KACt68C,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAf,CAAe,CAAC,CACnC,CAAC"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/generated/decode-data-xml.d.ts b/vuetest/node_modules/entities/lib/generated/decode-data-xml.d.ts new file mode 100644 index 0000000..4a3f533 --- /dev/null +++ b/vuetest/node_modules/entities/lib/generated/decode-data-xml.d.ts @@ -0,0 +1,3 @@ +declare const _default: Uint16Array; +export default _default; +//# sourceMappingURL=decode-data-xml.d.ts.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/generated/decode-data-xml.d.ts.map b/vuetest/node_modules/entities/lib/generated/decode-data-xml.d.ts.map new file mode 100644 index 0000000..be2a9a2 --- /dev/null +++ b/vuetest/node_modules/entities/lib/generated/decode-data-xml.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decode-data-xml.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-xml.ts"],"names":[],"mappings":";AAEA,wBAKE"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/generated/decode-data-xml.js b/vuetest/node_modules/entities/lib/generated/decode-data-xml.js new file mode 100644 index 0000000..8fee783 --- /dev/null +++ b/vuetest/node_modules/entities/lib/generated/decode-data-xml.js @@ -0,0 +1,9 @@ +"use strict"; +// Generated using scripts/write-decode-map.ts +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = new Uint16Array( +// prettier-ignore +"\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022" + .split("") + .map(function (c) { return c.charCodeAt(0); })); +//# sourceMappingURL=decode-data-xml.js.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/generated/decode-data-xml.js.map b/vuetest/node_modules/entities/lib/generated/decode-data-xml.js.map new file mode 100644 index 0000000..569fef4 --- /dev/null +++ b/vuetest/node_modules/entities/lib/generated/decode-data-xml.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decode-data-xml.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-xml.ts"],"names":[],"mappings":";AAAA,8CAA8C;;AAE9C,kBAAe,IAAI,WAAW;AAC1B,kBAAkB;AAClB,uFAAuF;KAClF,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAf,CAAe,CAAC,CACnC,CAAC"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/generated/encode-html.d.ts b/vuetest/node_modules/entities/lib/generated/encode-html.d.ts new file mode 100644 index 0000000..0704827 --- /dev/null +++ b/vuetest/node_modules/entities/lib/generated/encode-html.d.ts @@ -0,0 +1,8 @@ +type EncodeTrieNode = string | { + v?: string; + n: number | Map<number, EncodeTrieNode>; + o?: string; +}; +declare const _default: Map<number, EncodeTrieNode>; +export default _default; +//# sourceMappingURL=encode-html.d.ts.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/generated/encode-html.d.ts.map b/vuetest/node_modules/entities/lib/generated/encode-html.d.ts.map new file mode 100644 index 0000000..e665a6e --- /dev/null +++ b/vuetest/node_modules/entities/lib/generated/encode-html.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"encode-html.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/encode-html.ts"],"names":[],"mappings":"AAEA,KAAK,cAAc,GACb,MAAM,GACN;IAAE,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;;AAY1E,wBAAo+tB"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/generated/encode-html.js b/vuetest/node_modules/entities/lib/generated/encode-html.js new file mode 100644 index 0000000..071e853 --- /dev/null +++ b/vuetest/node_modules/entities/lib/generated/encode-html.js @@ -0,0 +1,12 @@ +"use strict"; +// Generated using scripts/write-encode-map.ts +Object.defineProperty(exports, "__esModule", { value: true }); +function restoreDiff(arr) { + for (var i = 1; i < arr.length; i++) { + arr[i][0] += arr[i - 1][0] + 1; + } + return arr; +} +// prettier-ignore +exports.default = new Map(/* #__PURE__ */ restoreDiff([[9, " "], [0, " "], [22, "!"], [0, """], [0, "#"], [0, "$"], [0, "%"], [0, "&"], [0, "'"], [0, "("], [0, ")"], [0, "*"], [0, "+"], [0, ","], [1, "."], [0, "/"], [10, ":"], [0, ";"], [0, { v: "<", n: 8402, o: "<⃒" }], [0, { v: "=", n: 8421, o: "=⃥" }], [0, { v: ">", n: 8402, o: ">⃒" }], [0, "?"], [0, "@"], [26, "["], [0, "\"], [0, "]"], [0, "^"], [0, "_"], [0, "`"], [5, { n: 106, o: "fj" }], [20, "{"], [0, "|"], [0, "}"], [34, " "], [0, "¡"], [0, "¢"], [0, "£"], [0, "¤"], [0, "¥"], [0, "¦"], [0, "§"], [0, "¨"], [0, "©"], [0, "ª"], [0, "«"], [0, "¬"], [0, "­"], [0, "®"], [0, "¯"], [0, "°"], [0, "±"], [0, "²"], [0, "³"], [0, "´"], [0, "µ"], [0, "¶"], [0, "·"], [0, "¸"], [0, "¹"], [0, "º"], [0, "»"], [0, "¼"], [0, "½"], [0, "¾"], [0, "¿"], [0, "À"], [0, "Á"], [0, "Â"], [0, "Ã"], [0, "Ä"], [0, "Å"], [0, "Æ"], [0, "Ç"], [0, "È"], [0, "É"], [0, "Ê"], [0, "Ë"], [0, "Ì"], [0, "Í"], [0, "Î"], [0, "Ï"], [0, "Ð"], [0, "Ñ"], [0, "Ò"], [0, "Ó"], [0, "Ô"], [0, "Õ"], [0, "Ö"], [0, "×"], [0, "Ø"], [0, "Ù"], [0, "Ú"], [0, "Û"], [0, "Ü"], [0, "Ý"], [0, "Þ"], [0, "ß"], [0, "à"], [0, "á"], [0, "â"], [0, "ã"], [0, "ä"], [0, "å"], [0, "æ"], [0, "ç"], [0, "è"], [0, "é"], [0, "ê"], [0, "ë"], [0, "ì"], [0, "í"], [0, "î"], [0, "ï"], [0, "ð"], [0, "ñ"], [0, "ò"], [0, "ó"], [0, "ô"], [0, "õ"], [0, "ö"], [0, "÷"], [0, "ø"], [0, "ù"], [0, "ú"], [0, "û"], [0, "ü"], [0, "ý"], [0, "þ"], [0, "ÿ"], [0, "Ā"], [0, "ā"], [0, "Ă"], [0, "ă"], [0, "Ą"], [0, "ą"], [0, "Ć"], [0, "ć"], [0, "Ĉ"], [0, "ĉ"], [0, "Ċ"], [0, "ċ"], [0, "Č"], [0, "č"], [0, "Ď"], [0, "ď"], [0, "Đ"], [0, "đ"], [0, "Ē"], [0, "ē"], [2, "Ė"], [0, "ė"], [0, "Ę"], [0, "ę"], [0, "Ě"], [0, "ě"], [0, "Ĝ"], [0, "ĝ"], [0, "Ğ"], [0, "ğ"], [0, "Ġ"], [0, "ġ"], [0, "Ģ"], [1, "Ĥ"], [0, "ĥ"], [0, "Ħ"], [0, "ħ"], [0, "Ĩ"], [0, "ĩ"], [0, "Ī"], [0, "ī"], [2, "Į"], [0, "į"], [0, "İ"], [0, "ı"], [0, "IJ"], [0, "ij"], [0, "Ĵ"], [0, "ĵ"], [0, "Ķ"], [0, "ķ"], [0, "ĸ"], [0, "Ĺ"], [0, "ĺ"], [0, "Ļ"], [0, "ļ"], [0, "Ľ"], [0, "ľ"], [0, "Ŀ"], [0, "ŀ"], [0, "Ł"], [0, "ł"], [0, "Ń"], [0, "ń"], [0, "Ņ"], [0, "ņ"], [0, "Ň"], [0, "ň"], [0, "ʼn"], [0, "Ŋ"], [0, "ŋ"], [0, "Ō"], [0, "ō"], [2, "Ő"], [0, "ő"], [0, "Œ"], [0, "œ"], [0, "Ŕ"], [0, "ŕ"], [0, "Ŗ"], [0, "ŗ"], [0, "Ř"], [0, "ř"], [0, "Ś"], [0, "ś"], [0, "Ŝ"], [0, "ŝ"], [0, "Ş"], [0, "ş"], [0, "Š"], [0, "š"], [0, "Ţ"], [0, "ţ"], [0, "Ť"], [0, "ť"], [0, "Ŧ"], [0, "ŧ"], [0, "Ũ"], [0, "ũ"], [0, "Ū"], [0, "ū"], [0, "Ŭ"], [0, "ŭ"], [0, "Ů"], [0, "ů"], [0, "Ű"], [0, "ű"], [0, "Ų"], [0, "ų"], [0, "Ŵ"], [0, "ŵ"], [0, "Ŷ"], [0, "ŷ"], [0, "Ÿ"], [0, "Ź"], [0, "ź"], [0, "Ż"], [0, "ż"], [0, "Ž"], [0, "ž"], [19, "ƒ"], [34, "Ƶ"], [63, "ǵ"], [65, "ȷ"], [142, "ˆ"], [0, "ˇ"], [16, "˘"], [0, "˙"], [0, "˚"], [0, "˛"], [0, "˜"], [0, "˝"], [51, "̑"], [127, "Α"], [0, "Β"], [0, "Γ"], [0, "Δ"], [0, "Ε"], [0, "Ζ"], [0, "Η"], [0, "Θ"], [0, "Ι"], [0, "Κ"], [0, "Λ"], [0, "Μ"], [0, "Ν"], [0, "Ξ"], [0, "Ο"], [0, "Π"], [0, "Ρ"], [1, "Σ"], [0, "Τ"], [0, "Υ"], [0, "Φ"], [0, "Χ"], [0, "Ψ"], [0, "Ω"], [7, "α"], [0, "β"], [0, "γ"], [0, "δ"], [0, "ε"], [0, "ζ"], [0, "η"], [0, "θ"], [0, "ι"], [0, "κ"], [0, "λ"], [0, "μ"], [0, "ν"], [0, "ξ"], [0, "ο"], [0, "π"], [0, "ρ"], [0, "ς"], [0, "σ"], [0, "τ"], [0, "υ"], [0, "φ"], [0, "χ"], [0, "ψ"], [0, "ω"], [7, "ϑ"], [0, "ϒ"], [2, "ϕ"], [0, "ϖ"], [5, "Ϝ"], [0, "ϝ"], [18, "ϰ"], [0, "ϱ"], [3, "ϵ"], [0, "϶"], [10, "Ё"], [0, "Ђ"], [0, "Ѓ"], [0, "Є"], [0, "Ѕ"], [0, "І"], [0, "Ї"], [0, "Ј"], [0, "Љ"], [0, "Њ"], [0, "Ћ"], [0, "Ќ"], [1, "Ў"], [0, "Џ"], [0, "А"], [0, "Б"], [0, "В"], [0, "Г"], [0, "Д"], [0, "Е"], [0, "Ж"], [0, "З"], [0, "И"], [0, "Й"], [0, "К"], [0, "Л"], [0, "М"], [0, "Н"], [0, "О"], [0, "П"], [0, "Р"], [0, "С"], [0, "Т"], [0, "У"], [0, "Ф"], [0, "Х"], [0, "Ц"], [0, "Ч"], [0, "Ш"], [0, "Щ"], [0, "Ъ"], [0, "Ы"], [0, "Ь"], [0, "Э"], [0, "Ю"], [0, "Я"], [0, "а"], [0, "б"], [0, "в"], [0, "г"], [0, "д"], [0, "е"], [0, "ж"], [0, "з"], [0, "и"], [0, "й"], [0, "к"], [0, "л"], [0, "м"], [0, "н"], [0, "о"], [0, "п"], [0, "р"], [0, "с"], [0, "т"], [0, "у"], [0, "ф"], [0, "х"], [0, "ц"], [0, "ч"], [0, "ш"], [0, "щ"], [0, "ъ"], [0, "ы"], [0, "ь"], [0, "э"], [0, "ю"], [0, "я"], [1, "ё"], [0, "ђ"], [0, "ѓ"], [0, "є"], [0, "ѕ"], [0, "і"], [0, "ї"], [0, "ј"], [0, "љ"], [0, "њ"], [0, "ћ"], [0, "ќ"], [1, "ў"], [0, "џ"], [7074, " "], [0, " "], [0, " "], [0, " "], [1, " "], [0, " "], [0, " "], [0, " "], [0, "​"], [0, "‌"], [0, "‍"], [0, "‎"], [0, "‏"], [0, "‐"], [2, "–"], [0, "—"], [0, "―"], [0, "‖"], [1, "‘"], [0, "’"], [0, "‚"], [1, "“"], [0, "”"], [0, "„"], [1, "†"], [0, "‡"], [0, "•"], [2, "‥"], [0, "…"], [9, "‰"], [0, "‱"], [0, "′"], [0, "″"], [0, "‴"], [0, "‵"], [3, "‹"], [0, "›"], [3, "‾"], [2, "⁁"], [1, "⁃"], [0, "⁄"], [10, "⁏"], [7, "⁗"], [7, { v: " ", n: 8202, o: "  " }], [0, "⁠"], [0, "⁡"], [0, "⁢"], [0, "⁣"], [72, "€"], [46, "⃛"], [0, "⃜"], [37, "ℂ"], [2, "℅"], [4, "ℊ"], [0, "ℋ"], [0, "ℌ"], [0, "ℍ"], [0, "ℎ"], [0, "ℏ"], [0, "ℐ"], [0, "ℑ"], [0, "ℒ"], [0, "ℓ"], [1, "ℕ"], [0, "№"], [0, "℗"], [0, "℘"], [0, "ℙ"], [0, "ℚ"], [0, "ℛ"], [0, "ℜ"], [0, "ℝ"], [0, "℞"], [3, "™"], [1, "ℤ"], [2, "℧"], [0, "ℨ"], [0, "℩"], [2, "ℬ"], [0, "ℭ"], [1, "ℯ"], [0, "ℰ"], [0, "ℱ"], [1, "ℳ"], [0, "ℴ"], [0, "ℵ"], [0, "ℶ"], [0, "ℷ"], [0, "ℸ"], [12, "ⅅ"], [0, "ⅆ"], [0, "ⅇ"], [0, "ⅈ"], [10, "⅓"], [0, "⅔"], [0, "⅕"], [0, "⅖"], [0, "⅗"], [0, "⅘"], [0, "⅙"], [0, "⅚"], [0, "⅛"], [0, "⅜"], [0, "⅝"], [0, "⅞"], [49, "←"], [0, "↑"], [0, "→"], [0, "↓"], [0, "↔"], [0, "↕"], [0, "↖"], [0, "↗"], [0, "↘"], [0, "↙"], [0, "↚"], [0, "↛"], [1, { v: "↝", n: 824, o: "↝̸" }], [0, "↞"], [0, "↟"], [0, "↠"], [0, "↡"], [0, "↢"], [0, "↣"], [0, "↤"], [0, "↥"], [0, "↦"], [0, "↧"], [1, "↩"], [0, "↪"], [0, "↫"], [0, "↬"], [0, "↭"], [0, "↮"], [1, "↰"], [0, "↱"], [0, "↲"], [0, "↳"], [1, "↵"], [0, "↶"], [0, "↷"], [2, "↺"], [0, "↻"], [0, "↼"], [0, "↽"], [0, "↾"], [0, "↿"], [0, "⇀"], [0, "⇁"], [0, "⇂"], [0, "⇃"], [0, "⇄"], [0, "⇅"], [0, "⇆"], [0, "⇇"], [0, "⇈"], [0, "⇉"], [0, "⇊"], [0, "⇋"], [0, "⇌"], [0, "⇍"], [0, "⇎"], [0, "⇏"], [0, "⇐"], [0, "⇑"], [0, "⇒"], [0, "⇓"], [0, "⇔"], [0, "⇕"], [0, "⇖"], [0, "⇗"], [0, "⇘"], [0, "⇙"], [0, "⇚"], [0, "⇛"], [1, "⇝"], [6, "⇤"], [0, "⇥"], [15, "⇵"], [7, "⇽"], [0, "⇾"], [0, "⇿"], [0, "∀"], [0, "∁"], [0, { v: "∂", n: 824, o: "∂̸" }], [0, "∃"], [0, "∄"], [0, "∅"], [1, "∇"], [0, "∈"], [0, "∉"], [1, "∋"], [0, "∌"], [2, "∏"], [0, "∐"], [0, "∑"], [0, "−"], [0, "∓"], [0, "∔"], [1, "∖"], [0, "∗"], [0, "∘"], [1, "√"], [2, "∝"], [0, "∞"], [0, "∟"], [0, { v: "∠", n: 8402, o: "∠⃒" }], [0, "∡"], [0, "∢"], [0, "∣"], [0, "∤"], [0, "∥"], [0, "∦"], [0, "∧"], [0, "∨"], [0, { v: "∩", n: 65024, o: "∩︀" }], [0, { v: "∪", n: 65024, o: "∪︀" }], [0, "∫"], [0, "∬"], [0, "∭"], [0, "∮"], [0, "∯"], [0, "∰"], [0, "∱"], [0, "∲"], [0, "∳"], [0, "∴"], [0, "∵"], [0, "∶"], [0, "∷"], [0, "∸"], [1, "∺"], [0, "∻"], [0, { v: "∼", n: 8402, o: "∼⃒" }], [0, { v: "∽", n: 817, o: "∽̱" }], [0, { v: "∾", n: 819, o: "∾̳" }], [0, "∿"], [0, "≀"], [0, "≁"], [0, { v: "≂", n: 824, o: "≂̸" }], [0, "≃"], [0, "≄"], [0, "≅"], [0, "≆"], [0, "≇"], [0, "≈"], [0, "≉"], [0, "≊"], [0, { v: "≋", n: 824, o: "≋̸" }], [0, "≌"], [0, { v: "≍", n: 8402, o: "≍⃒" }], [0, { v: "≎", n: 824, o: "≎̸" }], [0, { v: "≏", n: 824, o: "≏̸" }], [0, { v: "≐", n: 824, o: "≐̸" }], [0, "≑"], [0, "≒"], [0, "≓"], [0, "≔"], [0, "≕"], [0, "≖"], [0, "≗"], [1, "≙"], [0, "≚"], [1, "≜"], [2, "≟"], [0, "≠"], [0, { v: "≡", n: 8421, o: "≡⃥" }], [0, "≢"], [1, { v: "≤", n: 8402, o: "≤⃒" }], [0, { v: "≥", n: 8402, o: "≥⃒" }], [0, { v: "≦", n: 824, o: "≦̸" }], [0, { v: "≧", n: 824, o: "≧̸" }], [0, { v: "≨", n: 65024, o: "≨︀" }], [0, { v: "≩", n: 65024, o: "≩︀" }], [0, { v: "≪", n: new Map(/* #__PURE__ */ restoreDiff([[824, "≪̸"], [7577, "≪⃒"]])) }], [0, { v: "≫", n: new Map(/* #__PURE__ */ restoreDiff([[824, "≫̸"], [7577, "≫⃒"]])) }], [0, "≬"], [0, "≭"], [0, "≮"], [0, "≯"], [0, "≰"], [0, "≱"], [0, "≲"], [0, "≳"], [0, "≴"], [0, "≵"], [0, "≶"], [0, "≷"], [0, "≸"], [0, "≹"], [0, "≺"], [0, "≻"], [0, "≼"], [0, "≽"], [0, "≾"], [0, { v: "≿", n: 824, o: "≿̸" }], [0, "⊀"], [0, "⊁"], [0, { v: "⊂", n: 8402, o: "⊂⃒" }], [0, { v: "⊃", n: 8402, o: "⊃⃒" }], [0, "⊄"], [0, "⊅"], [0, "⊆"], [0, "⊇"], [0, "⊈"], [0, "⊉"], [0, { v: "⊊", n: 65024, o: "⊊︀" }], [0, { v: "⊋", n: 65024, o: "⊋︀" }], [1, "⊍"], [0, "⊎"], [0, { v: "⊏", n: 824, o: "⊏̸" }], [0, { v: "⊐", n: 824, o: "⊐̸" }], [0, "⊑"], [0, "⊒"], [0, { v: "⊓", n: 65024, o: "⊓︀" }], [0, { v: "⊔", n: 65024, o: "⊔︀" }], [0, "⊕"], [0, "⊖"], [0, "⊗"], [0, "⊘"], [0, "⊙"], [0, "⊚"], [0, "⊛"], [1, "⊝"], [0, "⊞"], [0, "⊟"], [0, "⊠"], [0, "⊡"], [0, "⊢"], [0, "⊣"], [0, "⊤"], [0, "⊥"], [1, "⊧"], [0, "⊨"], [0, "⊩"], [0, "⊪"], [0, "⊫"], [0, "⊬"], [0, "⊭"], [0, "⊮"], [0, "⊯"], [0, "⊰"], [1, "⊲"], [0, "⊳"], [0, { v: "⊴", n: 8402, o: "⊴⃒" }], [0, { v: "⊵", n: 8402, o: "⊵⃒" }], [0, "⊶"], [0, "⊷"], [0, "⊸"], [0, "⊹"], [0, "⊺"], [0, "⊻"], [1, "⊽"], [0, "⊾"], [0, "⊿"], [0, "⋀"], [0, "⋁"], [0, "⋂"], [0, "⋃"], [0, "⋄"], [0, "⋅"], [0, "⋆"], [0, "⋇"], [0, "⋈"], [0, "⋉"], [0, "⋊"], [0, "⋋"], [0, "⋌"], [0, "⋍"], [0, "⋎"], [0, "⋏"], [0, "⋐"], [0, "⋑"], [0, "⋒"], [0, "⋓"], [0, "⋔"], [0, "⋕"], [0, "⋖"], [0, "⋗"], [0, { v: "⋘", n: 824, o: "⋘̸" }], [0, { v: "⋙", n: 824, o: "⋙̸" }], [0, { v: "⋚", n: 65024, o: "⋚︀" }], [0, { v: "⋛", n: 65024, o: "⋛︀" }], [2, "⋞"], [0, "⋟"], [0, "⋠"], [0, "⋡"], [0, "⋢"], [0, "⋣"], [2, "⋦"], [0, "⋧"], [0, "⋨"], [0, "⋩"], [0, "⋪"], [0, "⋫"], [0, "⋬"], [0, "⋭"], [0, "⋮"], [0, "⋯"], [0, "⋰"], [0, "⋱"], [0, "⋲"], [0, "⋳"], [0, "⋴"], [0, { v: "⋵", n: 824, o: "⋵̸" }], [0, "⋶"], [0, "⋷"], [1, { v: "⋹", n: 824, o: "⋹̸" }], [0, "⋺"], [0, "⋻"], [0, "⋼"], [0, "⋽"], [0, "⋾"], [6, "⌅"], [0, "⌆"], [1, "⌈"], [0, "⌉"], [0, "⌊"], [0, "⌋"], [0, "⌌"], [0, "⌍"], [0, "⌎"], [0, "⌏"], [0, "⌐"], [1, "⌒"], [0, "⌓"], [1, "⌕"], [0, "⌖"], [5, "⌜"], [0, "⌝"], [0, "⌞"], [0, "⌟"], [2, "⌢"], [0, "⌣"], [9, "⌭"], [0, "⌮"], [7, "⌶"], [6, "⌽"], [1, "⌿"], [60, "⍼"], [51, "⎰"], [0, "⎱"], [2, "⎴"], [0, "⎵"], [0, "⎶"], [37, "⏜"], [0, "⏝"], [0, "⏞"], [0, "⏟"], [2, "⏢"], [4, "⏧"], [59, "␣"], [164, "Ⓢ"], [55, "─"], [1, "│"], [9, "┌"], [3, "┐"], [3, "└"], [3, "┘"], [3, "├"], [7, "┤"], [7, "┬"], [7, "┴"], [7, "┼"], [19, "═"], [0, "║"], [0, "╒"], [0, "╓"], [0, "╔"], [0, "╕"], [0, "╖"], [0, "╗"], [0, "╘"], [0, "╙"], [0, "╚"], [0, "╛"], [0, "╜"], [0, "╝"], [0, "╞"], [0, "╟"], [0, "╠"], [0, "╡"], [0, "╢"], [0, "╣"], [0, "╤"], [0, "╥"], [0, "╦"], [0, "╧"], [0, "╨"], [0, "╩"], [0, "╪"], [0, "╫"], [0, "╬"], [19, "▀"], [3, "▄"], [3, "█"], [8, "░"], [0, "▒"], [0, "▓"], [13, "□"], [8, "▪"], [0, "▫"], [1, "▭"], [0, "▮"], [2, "▱"], [1, "△"], [0, "▴"], [0, "▵"], [2, "▸"], [0, "▹"], [3, "▽"], [0, "▾"], [0, "▿"], [2, "◂"], [0, "◃"], [6, "◊"], [0, "○"], [32, "◬"], [2, "◯"], [8, "◸"], [0, "◹"], [0, "◺"], [0, "◻"], [0, "◼"], [8, "★"], [0, "☆"], [7, "☎"], [49, "♀"], [1, "♂"], [29, "♠"], [2, "♣"], [1, "♥"], [0, "♦"], [3, "♪"], [2, "♭"], [0, "♮"], [0, "♯"], [163, "✓"], [3, "✗"], [8, "✠"], [21, "✶"], [33, "❘"], [25, "❲"], [0, "❳"], [84, "⟈"], [0, "⟉"], [28, "⟦"], [0, "⟧"], [0, "⟨"], [0, "⟩"], [0, "⟪"], [0, "⟫"], [0, "⟬"], [0, "⟭"], [7, "⟵"], [0, "⟶"], [0, "⟷"], [0, "⟸"], [0, "⟹"], [0, "⟺"], [1, "⟼"], [2, "⟿"], [258, "⤂"], [0, "⤃"], [0, "⤄"], [0, "⤅"], [6, "⤌"], [0, "⤍"], [0, "⤎"], [0, "⤏"], [0, "⤐"], [0, "⤑"], [0, "⤒"], [0, "⤓"], [2, "⤖"], [2, "⤙"], [0, "⤚"], [0, "⤛"], [0, "⤜"], [0, "⤝"], [0, "⤞"], [0, "⤟"], [0, "⤠"], [2, "⤣"], [0, "⤤"], [0, "⤥"], [0, "⤦"], [0, "⤧"], [0, "⤨"], [0, "⤩"], [0, "⤪"], [8, { v: "⤳", n: 824, o: "⤳̸" }], [1, "⤵"], [0, "⤶"], [0, "⤷"], [0, "⤸"], [0, "⤹"], [2, "⤼"], [0, "⤽"], [7, "⥅"], [2, "⥈"], [0, "⥉"], [0, "⥊"], [0, "⥋"], [2, "⥎"], [0, "⥏"], [0, "⥐"], [0, "⥑"], [0, "⥒"], [0, "⥓"], [0, "⥔"], [0, "⥕"], [0, "⥖"], [0, "⥗"], [0, "⥘"], [0, "⥙"], [0, "⥚"], [0, "⥛"], [0, "⥜"], [0, "⥝"], [0, "⥞"], [0, "⥟"], [0, "⥠"], [0, "⥡"], [0, "⥢"], [0, "⥣"], [0, "⥤"], [0, "⥥"], [0, "⥦"], [0, "⥧"], [0, "⥨"], [0, "⥩"], [0, "⥪"], [0, "⥫"], [0, "⥬"], [0, "⥭"], [0, "⥮"], [0, "⥯"], [0, "⥰"], [0, "⥱"], [0, "⥲"], [0, "⥳"], [0, "⥴"], [0, "⥵"], [0, "⥶"], [1, "⥸"], [0, "⥹"], [1, "⥻"], [0, "⥼"], [0, "⥽"], [0, "⥾"], [0, "⥿"], [5, "⦅"], [0, "⦆"], [4, "⦋"], [0, "⦌"], [0, "⦍"], [0, "⦎"], [0, "⦏"], [0, "⦐"], [0, "⦑"], [0, "⦒"], [0, "⦓"], [0, "⦔"], [0, "⦕"], [0, "⦖"], [3, "⦚"], [1, "⦜"], [0, "⦝"], [6, "⦤"], [0, "⦥"], [0, "⦦"], [0, "⦧"], [0, "⦨"], [0, "⦩"], [0, "⦪"], [0, "⦫"], [0, "⦬"], [0, "⦭"], [0, "⦮"], [0, "⦯"], [0, "⦰"], [0, "⦱"], [0, "⦲"], [0, "⦳"], [0, "⦴"], [0, "⦵"], [0, "⦶"], [0, "⦷"], [1, "⦹"], [1, "⦻"], [0, "⦼"], [1, "⦾"], [0, "⦿"], [0, "⧀"], [0, "⧁"], [0, "⧂"], [0, "⧃"], [0, "⧄"], [0, "⧅"], [3, "⧉"], [3, "⧍"], [0, "⧎"], [0, { v: "⧏", n: 824, o: "⧏̸" }], [0, { v: "⧐", n: 824, o: "⧐̸" }], [11, "⧜"], [0, "⧝"], [0, "⧞"], [4, "⧣"], [0, "⧤"], [0, "⧥"], [5, "⧫"], [8, "⧴"], [1, "⧶"], [9, "⨀"], [0, "⨁"], [0, "⨂"], [1, "⨄"], [1, "⨆"], [5, "⨌"], [0, "⨍"], [2, "⨐"], [0, "⨑"], [0, "⨒"], [0, "⨓"], [0, "⨔"], [0, "⨕"], [0, "⨖"], [0, "⨗"], [10, "⨢"], [0, "⨣"], [0, "⨤"], [0, "⨥"], [0, "⨦"], [0, "⨧"], [1, "⨩"], [0, "⨪"], [2, "⨭"], [0, "⨮"], [0, "⨯"], [0, "⨰"], [0, "⨱"], [1, "⨳"], [0, "⨴"], [0, "⨵"], [0, "⨶"], [0, "⨷"], [0, "⨸"], [0, "⨹"], [0, "⨺"], [0, "⨻"], [0, "⨼"], [2, "⨿"], [0, "⩀"], [1, "⩂"], [0, "⩃"], [0, "⩄"], [0, "⩅"], [0, "⩆"], [0, "⩇"], [0, "⩈"], [0, "⩉"], [0, "⩊"], [0, "⩋"], [0, "⩌"], [0, "⩍"], [2, "⩐"], [2, "⩓"], [0, "⩔"], [0, "⩕"], [0, "⩖"], [0, "⩗"], [0, "⩘"], [1, "⩚"], [0, "⩛"], [0, "⩜"], [0, "⩝"], [1, "⩟"], [6, "⩦"], [3, "⩪"], [2, { v: "⩭", n: 824, o: "⩭̸" }], [0, "⩮"], [0, "⩯"], [0, { v: "⩰", n: 824, o: "⩰̸" }], [0, "⩱"], [0, "⩲"], [0, "⩳"], [0, "⩴"], [0, "⩵"], [1, "⩷"], [0, "⩸"], [0, "⩹"], [0, "⩺"], [0, "⩻"], [0, "⩼"], [0, { v: "⩽", n: 824, o: "⩽̸" }], [0, { v: "⩾", n: 824, o: "⩾̸" }], [0, "⩿"], [0, "⪀"], [0, "⪁"], [0, "⪂"], [0, "⪃"], [0, "⪄"], [0, "⪅"], [0, "⪆"], [0, "⪇"], [0, "⪈"], [0, "⪉"], [0, "⪊"], [0, "⪋"], [0, "⪌"], [0, "⪍"], [0, "⪎"], [0, "⪏"], [0, "⪐"], [0, "⪑"], [0, "⪒"], [0, "⪓"], [0, "⪔"], [0, "⪕"], [0, "⪖"], [0, "⪗"], [0, "⪘"], [0, "⪙"], [0, "⪚"], [2, "⪝"], [0, "⪞"], [0, "⪟"], [0, "⪠"], [0, { v: "⪡", n: 824, o: "⪡̸" }], [0, { v: "⪢", n: 824, o: "⪢̸" }], [1, "⪤"], [0, "⪥"], [0, "⪦"], [0, "⪧"], [0, "⪨"], [0, "⪩"], [0, "⪪"], [0, "⪫"], [0, { v: "⪬", n: 65024, o: "⪬︀" }], [0, { v: "⪭", n: 65024, o: "⪭︀" }], [0, "⪮"], [0, { v: "⪯", n: 824, o: "⪯̸" }], [0, { v: "⪰", n: 824, o: "⪰̸" }], [2, "⪳"], [0, "⪴"], [0, "⪵"], [0, "⪶"], [0, "⪷"], [0, "⪸"], [0, "⪹"], [0, "⪺"], [0, "⪻"], [0, "⪼"], [0, "⪽"], [0, "⪾"], [0, "⪿"], [0, "⫀"], [0, "⫁"], [0, "⫂"], [0, "⫃"], [0, "⫄"], [0, { v: "⫅", n: 824, o: "⫅̸" }], [0, { v: "⫆", n: 824, o: "⫆̸" }], [0, "⫇"], [0, "⫈"], [2, { v: "⫋", n: 65024, o: "⫋︀" }], [0, { v: "⫌", n: 65024, o: "⫌︀" }], [2, "⫏"], [0, "⫐"], [0, "⫑"], [0, "⫒"], [0, "⫓"], [0, "⫔"], [0, "⫕"], [0, "⫖"], [0, "⫗"], [0, "⫘"], [0, "⫙"], [0, "⫚"], [0, "⫛"], [8, "⫤"], [1, "⫦"], [0, "⫧"], [0, "⫨"], [0, "⫩"], [1, "⫫"], [0, "⫬"], [0, "⫭"], [0, "⫮"], [0, "⫯"], [0, "⫰"], [0, "⫱"], [0, "⫲"], [0, "⫳"], [9, { v: "⫽", n: 8421, o: "⫽⃥" }], [44343, { n: new Map(/* #__PURE__ */ restoreDiff([[56476, "𝒜"], [1, "𝒞"], [0, "𝒟"], [2, "𝒢"], [2, "𝒥"], [0, "𝒦"], [2, "𝒩"], [0, "𝒪"], [0, "𝒫"], [0, "𝒬"], [1, "𝒮"], [0, "𝒯"], [0, "𝒰"], [0, "𝒱"], [0, "𝒲"], [0, "𝒳"], [0, "𝒴"], [0, "𝒵"], [0, "𝒶"], [0, "𝒷"], [0, "𝒸"], [0, "𝒹"], [1, "𝒻"], [1, "𝒽"], [0, "𝒾"], [0, "𝒿"], [0, "𝓀"], [0, "𝓁"], [0, "𝓂"], [0, "𝓃"], [1, "𝓅"], [0, "𝓆"], [0, "𝓇"], [0, "𝓈"], [0, "𝓉"], [0, "𝓊"], [0, "𝓋"], [0, "𝓌"], [0, "𝓍"], [0, "𝓎"], [0, "𝓏"], [52, "𝔄"], [0, "𝔅"], [1, "𝔇"], [0, "𝔈"], [0, "𝔉"], [0, "𝔊"], [2, "𝔍"], [0, "𝔎"], [0, "𝔏"], [0, "𝔐"], [0, "𝔑"], [0, "𝔒"], [0, "𝔓"], [0, "𝔔"], [1, "𝔖"], [0, "𝔗"], [0, "𝔘"], [0, "𝔙"], [0, "𝔚"], [0, "𝔛"], [0, "𝔜"], [1, "𝔞"], [0, "𝔟"], [0, "𝔠"], [0, "𝔡"], [0, "𝔢"], [0, "𝔣"], [0, "𝔤"], [0, "𝔥"], [0, "𝔦"], [0, "𝔧"], [0, "𝔨"], [0, "𝔩"], [0, "𝔪"], [0, "𝔫"], [0, "𝔬"], [0, "𝔭"], [0, "𝔮"], [0, "𝔯"], [0, "𝔰"], [0, "𝔱"], [0, "𝔲"], [0, "𝔳"], [0, "𝔴"], [0, "𝔵"], [0, "𝔶"], [0, "𝔷"], [0, "𝔸"], [0, "𝔹"], [1, "𝔻"], [0, "𝔼"], [0, "𝔽"], [0, "𝔾"], [1, "𝕀"], [0, "𝕁"], [0, "𝕂"], [0, "𝕃"], [0, "𝕄"], [1, "𝕆"], [3, "𝕊"], [0, "𝕋"], [0, "𝕌"], [0, "𝕍"], [0, "𝕎"], [0, "𝕏"], [0, "𝕐"], [1, "𝕒"], [0, "𝕓"], [0, "𝕔"], [0, "𝕕"], [0, "𝕖"], [0, "𝕗"], [0, "𝕘"], [0, "𝕙"], [0, "𝕚"], [0, "𝕛"], [0, "𝕜"], [0, "𝕝"], [0, "𝕞"], [0, "𝕟"], [0, "𝕠"], [0, "𝕡"], [0, "𝕢"], [0, "𝕣"], [0, "𝕤"], [0, "𝕥"], [0, "𝕦"], [0, "𝕧"], [0, "𝕨"], [0, "𝕩"], [0, "𝕪"], [0, "𝕫"]])) }], [8906, "ff"], [0, "fi"], [0, "fl"], [0, "ffi"], [0, "ffl"]])); +//# sourceMappingURL=encode-html.js.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/generated/encode-html.js.map b/vuetest/node_modules/entities/lib/generated/encode-html.js.map new file mode 100644 index 0000000..2d2d9be --- /dev/null +++ b/vuetest/node_modules/entities/lib/generated/encode-html.js.map @@ -0,0 +1 @@ +{"version":3,"file":"encode-html.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/encode-html.ts"],"names":[],"mappings":";AAAA,8CAA8C;;AAM9C,SAAS,WAAW,CAChB,GAAM;IAEN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;KAClC;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAED,kBAAkB;AAClB,kBAAe,IAAI,GAAG,CAAwB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,GAAG,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,aAAa,CAAC,EAAC,CAAC,GAAG,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,IAAI,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,yBAAyB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,eAAe,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,cAAc,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,4BAA4B,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,GAAG,CAAgB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,GAAG,EAAC,QAAQ,CAAC,EAAC,CAAC,IAAI,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,GAAG,CAAgB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,GAAG,EAAC,QAAQ,CAAC,EAAC,CAAC,IAAI,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,oBAAoB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,eAAe,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,gBAAgB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,gBAAgB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,mBAAmB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,qBAAqB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,qBAAqB,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,sBAAsB,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,yBAAyB,CAAC,EAAC,CAAC,CAAC,EAAC,yBAAyB,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,0BAA0B,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,yBAAyB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,EAAE,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,GAAG,EAAC,YAAY,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,GAAG,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,qBAAqB,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,EAAE,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,wBAAwB,CAAC,EAAC,CAAC,CAAC,EAAC,4BAA4B,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,GAAG,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,uBAAuB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC,EAAC,kBAAkB,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,sBAAsB,CAAC,EAAC,CAAC,CAAC,EAAC,mBAAmB,CAAC,EAAC,CAAC,CAAC,EAAC,qBAAqB,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,mBAAmB,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,sBAAsB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,oBAAoB,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,uBAAuB,EAAC,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,gBAAgB,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,EAAE,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,WAAW,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,aAAa,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,YAAY,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,qBAAqB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,kBAAkB,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,2BAA2B,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,iBAAiB,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,oBAAoB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,oBAAoB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,MAAM,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,iBAAiB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,iBAAiB,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,CAAC,KAAK,EAAC,EAAC,CAAC,EAAC,IAAI,GAAG,CAAgB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,KAAK,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,EAAE,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,IAAI,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/index.d.ts b/vuetest/node_modules/entities/lib/index.d.ts new file mode 100644 index 0000000..dd4eb11 --- /dev/null +++ b/vuetest/node_modules/entities/lib/index.d.ts @@ -0,0 +1,96 @@ +import { DecodingMode } from "./decode.js"; +/** The level of entities to support. */ +export declare enum EntityLevel { + /** Support only XML entities. */ + XML = 0, + /** Support HTML entities, which are a superset of XML entities. */ + HTML = 1 +} +export declare enum EncodingMode { + /** + * The output is UTF-8 encoded. Only characters that need escaping within + * XML will be escaped. + */ + UTF8 = 0, + /** + * The output consists only of ASCII characters. Characters that need + * escaping within HTML, and characters that aren't ASCII characters will + * be escaped. + */ + ASCII = 1, + /** + * Encode all characters that have an equivalent entity, as well as all + * characters that are not ASCII characters. + */ + Extensive = 2, + /** + * Encode all characters that have to be escaped in HTML attributes, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + */ + Attribute = 3, + /** + * Encode all characters that have to be escaped in HTML text, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + */ + Text = 4 +} +export interface DecodingOptions { + /** + * The level of entities to support. + * @default {@link EntityLevel.XML} + */ + level?: EntityLevel; + /** + * Decoding mode. If `Legacy`, will support legacy entities not terminated + * with a semicolon (`;`). + * + * Always `Strict` for XML. For HTML, set this to `true` if you are parsing + * an attribute value. + * + * The deprecated `decodeStrict` function defaults this to `Strict`. + * + * @default {@link DecodingMode.Legacy} + */ + mode?: DecodingMode | undefined; +} +/** + * Decodes a string with entities. + * + * @param data String to decode. + * @param options Decoding options. + */ +export declare function decode(data: string, options?: DecodingOptions | EntityLevel): string; +/** + * Decodes a string with entities. Does not allow missing trailing semicolons for entities. + * + * @param data String to decode. + * @param options Decoding options. + * @deprecated Use `decode` with the `mode` set to `Strict`. + */ +export declare function decodeStrict(data: string, options?: DecodingOptions | EntityLevel): string; +/** + * Options for `encode`. + */ +export interface EncodingOptions { + /** + * The level of entities to support. + * @default {@link EntityLevel.XML} + */ + level?: EntityLevel; + /** + * Output format. + * @default {@link EncodingMode.Extensive} + */ + mode?: EncodingMode; +} +/** + * Encodes a string with entities. + * + * @param data String to encode. + * @param options Encoding options. + */ +export declare function encode(data: string, options?: EncodingOptions | EntityLevel): string; +export { encodeXML, escape, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js"; +export { encodeHTML, encodeNonAsciiHTML, encodeHTML as encodeHTML4, encodeHTML as encodeHTML5, } from "./encode.js"; +export { EntityDecoder, DecodingMode, decodeXML, decodeHTML, decodeHTMLStrict, decodeHTMLAttribute, decodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML as decodeXMLStrict, } from "./decode.js"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/index.d.ts.map b/vuetest/node_modules/entities/lib/index.d.ts.map new file mode 100644 index 0000000..cfeef9f --- /dev/null +++ b/vuetest/node_modules/entities/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,YAAY,EAAE,MAAM,aAAa,CAAC;AASlE,wCAAwC;AACxC,oBAAY,WAAW;IACnB,iCAAiC;IACjC,GAAG,IAAI;IACP,mEAAmE;IACnE,IAAI,IAAI;CACX;AAED,oBAAY,YAAY;IACpB;;;OAGG;IACH,IAAI,IAAA;IACJ;;;;OAIG;IACH,KAAK,IAAA;IACL;;;OAGG;IACH,SAAS,IAAA;IACT;;;OAGG;IACH,SAAS,IAAA;IACT;;;OAGG;IACH,IAAI,IAAA;CACP;AAED,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACnC;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CASR;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CAKR;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CAkBR;AAED,OAAO,EACH,SAAS,EACT,MAAM,EACN,UAAU,EACV,eAAe,EACf,UAAU,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,UAAU,EACV,kBAAkB,EAElB,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,GAC5B,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,aAAa,EACb,YAAY,EACZ,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,mBAAmB,EAEnB,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,EACzB,gBAAgB,IAAI,iBAAiB,EACrC,gBAAgB,IAAI,iBAAiB,EACrC,SAAS,IAAI,eAAe,GAC/B,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/index.js b/vuetest/node_modules/entities/lib/index.js new file mode 100644 index 0000000..f809b1b --- /dev/null +++ b/vuetest/node_modules/entities/lib/index.js @@ -0,0 +1,126 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLAttribute = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.DecodingMode = exports.EntityDecoder = exports.encodeHTML5 = exports.encodeHTML4 = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = exports.EncodingMode = exports.EntityLevel = void 0; +var decode_js_1 = require("./decode.js"); +var encode_js_1 = require("./encode.js"); +var escape_js_1 = require("./escape.js"); +/** The level of entities to support. */ +var EntityLevel; +(function (EntityLevel) { + /** Support only XML entities. */ + EntityLevel[EntityLevel["XML"] = 0] = "XML"; + /** Support HTML entities, which are a superset of XML entities. */ + EntityLevel[EntityLevel["HTML"] = 1] = "HTML"; +})(EntityLevel = exports.EntityLevel || (exports.EntityLevel = {})); +var EncodingMode; +(function (EncodingMode) { + /** + * The output is UTF-8 encoded. Only characters that need escaping within + * XML will be escaped. + */ + EncodingMode[EncodingMode["UTF8"] = 0] = "UTF8"; + /** + * The output consists only of ASCII characters. Characters that need + * escaping within HTML, and characters that aren't ASCII characters will + * be escaped. + */ + EncodingMode[EncodingMode["ASCII"] = 1] = "ASCII"; + /** + * Encode all characters that have an equivalent entity, as well as all + * characters that are not ASCII characters. + */ + EncodingMode[EncodingMode["Extensive"] = 2] = "Extensive"; + /** + * Encode all characters that have to be escaped in HTML attributes, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + */ + EncodingMode[EncodingMode["Attribute"] = 3] = "Attribute"; + /** + * Encode all characters that have to be escaped in HTML text, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + */ + EncodingMode[EncodingMode["Text"] = 4] = "Text"; +})(EncodingMode = exports.EncodingMode || (exports.EncodingMode = {})); +/** + * Decodes a string with entities. + * + * @param data String to decode. + * @param options Decoding options. + */ +function decode(data, options) { + if (options === void 0) { options = EntityLevel.XML; } + var level = typeof options === "number" ? options : options.level; + if (level === EntityLevel.HTML) { + var mode = typeof options === "object" ? options.mode : undefined; + return (0, decode_js_1.decodeHTML)(data, mode); + } + return (0, decode_js_1.decodeXML)(data); +} +exports.decode = decode; +/** + * Decodes a string with entities. Does not allow missing trailing semicolons for entities. + * + * @param data String to decode. + * @param options Decoding options. + * @deprecated Use `decode` with the `mode` set to `Strict`. + */ +function decodeStrict(data, options) { + var _a; + if (options === void 0) { options = EntityLevel.XML; } + var opts = typeof options === "number" ? { level: options } : options; + (_a = opts.mode) !== null && _a !== void 0 ? _a : (opts.mode = decode_js_1.DecodingMode.Strict); + return decode(data, opts); +} +exports.decodeStrict = decodeStrict; +/** + * Encodes a string with entities. + * + * @param data String to encode. + * @param options Encoding options. + */ +function encode(data, options) { + if (options === void 0) { options = EntityLevel.XML; } + var opts = typeof options === "number" ? { level: options } : options; + // Mode `UTF8` just escapes XML entities + if (opts.mode === EncodingMode.UTF8) + return (0, escape_js_1.escapeUTF8)(data); + if (opts.mode === EncodingMode.Attribute) + return (0, escape_js_1.escapeAttribute)(data); + if (opts.mode === EncodingMode.Text) + return (0, escape_js_1.escapeText)(data); + if (opts.level === EntityLevel.HTML) { + if (opts.mode === EncodingMode.ASCII) { + return (0, encode_js_1.encodeNonAsciiHTML)(data); + } + return (0, encode_js_1.encodeHTML)(data); + } + // ASCII and Extensive are equivalent + return (0, escape_js_1.encodeXML)(data); +} +exports.encode = encode; +var escape_js_2 = require("./escape.js"); +Object.defineProperty(exports, "encodeXML", { enumerable: true, get: function () { return escape_js_2.encodeXML; } }); +Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return escape_js_2.escape; } }); +Object.defineProperty(exports, "escapeUTF8", { enumerable: true, get: function () { return escape_js_2.escapeUTF8; } }); +Object.defineProperty(exports, "escapeAttribute", { enumerable: true, get: function () { return escape_js_2.escapeAttribute; } }); +Object.defineProperty(exports, "escapeText", { enumerable: true, get: function () { return escape_js_2.escapeText; } }); +var encode_js_2 = require("./encode.js"); +Object.defineProperty(exports, "encodeHTML", { enumerable: true, get: function () { return encode_js_2.encodeHTML; } }); +Object.defineProperty(exports, "encodeNonAsciiHTML", { enumerable: true, get: function () { return encode_js_2.encodeNonAsciiHTML; } }); +// Legacy aliases (deprecated) +Object.defineProperty(exports, "encodeHTML4", { enumerable: true, get: function () { return encode_js_2.encodeHTML; } }); +Object.defineProperty(exports, "encodeHTML5", { enumerable: true, get: function () { return encode_js_2.encodeHTML; } }); +var decode_js_2 = require("./decode.js"); +Object.defineProperty(exports, "EntityDecoder", { enumerable: true, get: function () { return decode_js_2.EntityDecoder; } }); +Object.defineProperty(exports, "DecodingMode", { enumerable: true, get: function () { return decode_js_2.DecodingMode; } }); +Object.defineProperty(exports, "decodeXML", { enumerable: true, get: function () { return decode_js_2.decodeXML; } }); +Object.defineProperty(exports, "decodeHTML", { enumerable: true, get: function () { return decode_js_2.decodeHTML; } }); +Object.defineProperty(exports, "decodeHTMLStrict", { enumerable: true, get: function () { return decode_js_2.decodeHTMLStrict; } }); +Object.defineProperty(exports, "decodeHTMLAttribute", { enumerable: true, get: function () { return decode_js_2.decodeHTMLAttribute; } }); +// Legacy aliases (deprecated) +Object.defineProperty(exports, "decodeHTML4", { enumerable: true, get: function () { return decode_js_2.decodeHTML; } }); +Object.defineProperty(exports, "decodeHTML5", { enumerable: true, get: function () { return decode_js_2.decodeHTML; } }); +Object.defineProperty(exports, "decodeHTML4Strict", { enumerable: true, get: function () { return decode_js_2.decodeHTMLStrict; } }); +Object.defineProperty(exports, "decodeHTML5Strict", { enumerable: true, get: function () { return decode_js_2.decodeHTMLStrict; } }); +Object.defineProperty(exports, "decodeXMLStrict", { enumerable: true, get: function () { return decode_js_2.decodeXML; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/vuetest/node_modules/entities/lib/index.js.map b/vuetest/node_modules/entities/lib/index.js.map new file mode 100644 index 0000000..2ef7751 --- /dev/null +++ b/vuetest/node_modules/entities/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["index.ts"],"names":[],"mappings":";;;AAAA,yCAAkE;AAClE,yCAA6D;AAC7D,yCAKqB;AAErB,wCAAwC;AACxC,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,iCAAiC;IACjC,2CAAO,CAAA;IACP,mEAAmE;IACnE,6CAAQ,CAAA;AACZ,CAAC,EALW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAKtB;AAED,IAAY,YA2BX;AA3BD,WAAY,YAAY;IACpB;;;OAGG;IACH,+CAAI,CAAA;IACJ;;;;OAIG;IACH,iDAAK,CAAA;IACL;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,+CAAI,CAAA;AACR,CAAC,EA3BW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QA2BvB;AAsBD;;;;;GAKG;AACH,SAAgB,MAAM,CAClB,IAAY,EACZ,OAAwD;IAAxD,wBAAA,EAAA,UAAyC,WAAW,CAAC,GAAG;IAExD,IAAM,KAAK,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAEpE,IAAI,KAAK,KAAK,WAAW,CAAC,IAAI,EAAE;QAC5B,IAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;QACpE,OAAO,IAAA,sBAAU,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KACjC;IAED,OAAO,IAAA,qBAAS,EAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAZD,wBAYC;AAED;;;;;;GAMG;AACH,SAAgB,YAAY,CACxB,IAAY,EACZ,OAAwD;;IAAxD,wBAAA,EAAA,UAAyC,WAAW,CAAC,GAAG;IAExD,IAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IACxE,MAAA,IAAI,CAAC,IAAI,oCAAT,IAAI,CAAC,IAAI,GAAK,wBAAY,CAAC,MAAM,EAAC;IAElC,OAAO,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC9B,CAAC;AARD,oCAQC;AAkBD;;;;;GAKG;AACH,SAAgB,MAAM,CAClB,IAAY,EACZ,OAAwD;IAAxD,wBAAA,EAAA,UAAyC,WAAW,CAAC,GAAG;IAExD,IAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IAExE,wCAAwC;IACxC,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,IAAI;QAAE,OAAO,IAAA,sBAAU,EAAC,IAAI,CAAC,CAAC;IAC7D,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,SAAS;QAAE,OAAO,IAAA,2BAAe,EAAC,IAAI,CAAC,CAAC;IACvE,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,IAAI;QAAE,OAAO,IAAA,sBAAU,EAAC,IAAI,CAAC,CAAC;IAE7D,IAAI,IAAI,CAAC,KAAK,KAAK,WAAW,CAAC,IAAI,EAAE;QACjC,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,KAAK,EAAE;YAClC,OAAO,IAAA,8BAAkB,EAAC,IAAI,CAAC,CAAC;SACnC;QAED,OAAO,IAAA,sBAAU,EAAC,IAAI,CAAC,CAAC;KAC3B;IAED,qCAAqC;IACrC,OAAO,IAAA,qBAAS,EAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AArBD,wBAqBC;AAED,yCAMqB;AALjB,sGAAA,SAAS,OAAA;AACT,mGAAA,MAAM,OAAA;AACN,uGAAA,UAAU,OAAA;AACV,4GAAA,eAAe,OAAA;AACf,uGAAA,UAAU,OAAA;AAGd,yCAMqB;AALjB,uGAAA,UAAU,OAAA;AACV,+GAAA,kBAAkB,OAAA;AAClB,8BAA8B;AAC9B,wGAAA,UAAU,OAAe;AACzB,wGAAA,UAAU,OAAe;AAG7B,yCAaqB;AAZjB,0GAAA,aAAa,OAAA;AACb,yGAAA,YAAY,OAAA;AACZ,sGAAA,SAAS,OAAA;AACT,uGAAA,UAAU,OAAA;AACV,6GAAA,gBAAgB,OAAA;AAChB,gHAAA,mBAAmB,OAAA;AACnB,8BAA8B;AAC9B,wGAAA,UAAU,OAAe;AACzB,wGAAA,UAAU,OAAe;AACzB,8GAAA,gBAAgB,OAAqB;AACrC,8GAAA,gBAAgB,OAAqB;AACrC,4GAAA,SAAS,OAAmB"} \ No newline at end of file diff --git a/vuetest/node_modules/entities/package.json b/vuetest/node_modules/entities/package.json new file mode 100644 index 0000000..2e857f8 --- /dev/null +++ b/vuetest/node_modules/entities/package.json @@ -0,0 +1,90 @@ +{ + "name": "entities", + "version": "4.5.0", + "description": "Encode & decode XML and HTML entities with ease & speed", + "author": "Felix Boehm <me@feedic.com>", + "funding": "https://github.com/fb55/entities?sponsor=1", + "sideEffects": false, + "keywords": [ + "entity", + "decoding", + "encoding", + "html", + "xml", + "html entities" + ], + "directories": { + "lib": "lib/" + }, + "main": "lib/index.js", + "types": "lib/index.d.ts", + "module": "lib/esm/index.js", + "exports": { + ".": { + "require": "./lib/index.js", + "import": "./lib/esm/index.js" + }, + "./lib/decode.js": { + "require": "./lib/decode.js", + "import": "./lib/esm/decode.js" + }, + "./lib/escape.js": { + "require": "./lib/escape.js", + "import": "./lib/esm/escape.js" + } + }, + "files": [ + "lib/**/*" + ], + "engines": { + "node": ">=0.12" + }, + "devDependencies": { + "@types/jest": "^28.1.8", + "@types/node": "^18.15.11", + "@typescript-eslint/eslint-plugin": "^5.58.0", + "@typescript-eslint/parser": "^5.58.0", + "eslint": "^8.38.0", + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-node": "^11.1.0", + "jest": "^28.1.3", + "prettier": "^2.8.7", + "ts-jest": "^28.0.8", + "typedoc": "^0.24.1", + "typescript": "^5.0.4" + }, + "scripts": { + "test": "npm run test:jest && npm run lint", + "test:jest": "jest", + "lint": "npm run lint:es && npm run lint:prettier", + "lint:es": "eslint .", + "lint:prettier": "npm run prettier -- --check", + "format": "npm run format:es && npm run format:prettier", + "format:es": "npm run lint:es -- --fix", + "format:prettier": "npm run prettier -- --write", + "prettier": "prettier '**/*.{ts,md,json,yml}'", + "build": "npm run build:cjs && npm run build:esm", + "build:cjs": "tsc --sourceRoot https://raw.githubusercontent.com/fb55/entities/$(git rev-parse HEAD)/src/", + "build:esm": "npm run build:cjs -- --module esnext --target es2019 --outDir lib/esm && echo '{\"type\":\"module\"}' > lib/esm/package.json", + "build:docs": "typedoc --hideGenerator src/index.ts", + "build:trie": "ts-node scripts/write-decode-map.ts", + "build:encode-trie": "ts-node scripts/write-encode-map.ts", + "prepare": "npm run build" + }, + "repository": { + "type": "git", + "url": "git://github.com/fb55/entities.git" + }, + "license": "BSD-2-Clause", + "jest": { + "preset": "ts-jest", + "coverageProvider": "v8", + "moduleNameMapper": { + "^(.*)\\.js$": "$1" + } + }, + "prettier": { + "tabWidth": 4, + "proseWrap": "always" + } +} diff --git a/vuetest/node_modules/entities/readme.md b/vuetest/node_modules/entities/readme.md new file mode 100644 index 0000000..731d90c --- /dev/null +++ b/vuetest/node_modules/entities/readme.md @@ -0,0 +1,122 @@ +# entities [![NPM version](https://img.shields.io/npm/v/entities.svg)](https://npmjs.org/package/entities) [![Downloads](https://img.shields.io/npm/dm/entities.svg)](https://npmjs.org/package/entities) [![Node.js CI](https://github.com/fb55/entities/actions/workflows/nodejs-test.yml/badge.svg)](https://github.com/fb55/entities/actions/workflows/nodejs-test.yml) + +Encode & decode HTML & XML entities with ease & speed. + +## Features + +- 😇 Tried and true: `entities` is used by many popular libraries; eg. + [`htmlparser2`](https://github.com/fb55/htmlparser2), the official + [AWS SDK](https://github.com/aws/aws-sdk-js-v3) and + [`commonmark`](https://github.com/commonmark/commonmark.js) use it to + process HTML entities. +- ⚡️ Fast: `entities` is the fastest library for decoding HTML entities (as + of April 2022); see [performance](#performance). +- 🎛 Configurable: Get an output tailored for your needs. You are fine with + UTF8? That'll save you some bytes. Prefer to only have ASCII characters? We + can do that as well! + +## How to… + +### …install `entities` + + npm install entities + +### …use `entities` + +```javascript +const entities = require("entities"); + +// Encoding +entities.escapeUTF8("& ü"); // "&#38; ü" +entities.encodeXML("& ü"); // "&#38; ü" +entities.encodeHTML("& ü"); // "&#38; ü" + +// Decoding +entities.decodeXML("asdf & ÿ ü '"); // "asdf & ÿ ü '" +entities.decodeHTML("asdf & ÿ ü '"); // "asdf & ÿ ü '" +``` + +## Performance + +This is how `entities` compares to other libraries on a very basic benchmark +(see `scripts/benchmark.ts`, for 10,000,000 iterations; **lower is better**): + +| Library | Version | `decode` perf | `encode` perf | `escape` perf | +| -------------- | ------- | ------------- | ------------- | ------------- | +| entities | `3.0.1` | 1.418s | 6.786s | 2.196s | +| html-entities | `2.3.2` | 2.530s | 6.829s | 2.415s | +| he | `1.2.0` | 5.800s | 24.237s | 3.624s | +| parse-entities | `3.0.0` | 9.660s | N/A | N/A | + +--- + +## FAQ + +> What methods should I actually use to encode my documents? + +If your target supports UTF-8, the `escapeUTF8` method is going to be your best +choice. Otherwise, use either `encodeHTML` or `encodeXML` based on whether +you're dealing with an HTML or an XML document. + +You can have a look at the options for the `encode` and `decode` methods to see +everything you can configure. + +> When should I use strict decoding? + +When strict decoding, entities not terminated with a semicolon will be ignored. +This is helpful for decoding entities in legacy environments. + +> Why should I use `entities` instead of alternative modules? + +As of April 2022, `entities` is a bit faster than other modules. Still, this is +not a very differentiated space and other modules can catch up. + +**More importantly**, you might already have `entities` in your dependency graph +(as a dependency of eg. `cheerio`, or `htmlparser2`), and including it directly +might not even increase your bundle size. The same is true for other entity +libraries, so have a look through your `node_modules` directory! + +> Does `entities` support tree shaking? + +Yes! `entities` ships as both a CommonJS and a ES module. Note that for best +results, you should not use the `encode` and `decode` functions, as they wrap +around a number of other functions, all of which will remain in the bundle. +Instead, use the functions that you need directly. + +--- + +## Acknowledgements + +This library wouldn't be possible without the work of these individuals. Thanks +to + +- [@mathiasbynens](https://github.com/mathiasbynens) for his explanations + about character encodings, and his library `he`, which was one of the + inspirations for `entities` +- [@inikulin](https://github.com/inikulin) for his work on optimized tries for + decoding HTML entities for the `parse5` project +- [@mdevils](https://github.com/mdevils) for taking on the challenge of + producing a quick entity library with his `html-entities` library. + `entities` would be quite a bit slower if there wasn't any competition. + Right now `entities` is on top, but we'll see how long that lasts! + +--- + +License: BSD-2-Clause + +## Security contact information + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). Tidelift will +coordinate the fix and disclosure. + +## `entities` for enterprise + +Available as part of the Tidelift Subscription + +The maintainers of `entities` and thousands of other packages are working with +Tidelift to deliver commercial support and maintenance for the open source +dependencies you use to build your applications. Save time, reduce risk, and +improve code health, while paying the maintainers of the exact dependencies you +use. +[Learn more.](https://tidelift.com/subscription/pkg/npm-entities?utm_source=npm-entities&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/vuetest/node_modules/estree-walker/CHANGELOG.md b/vuetest/node_modules/estree-walker/CHANGELOG.md new file mode 100644 index 0000000..20e8c7e --- /dev/null +++ b/vuetest/node_modules/estree-walker/CHANGELOG.md @@ -0,0 +1,92 @@ +# changelog + +## 2.0.2 + +* Internal tidying up (change test runner, convert to JS) + +## 2.0.1 + +* Robustify `this.remove()`, pass current index to walker functions ([#18](https://github.com/Rich-Harris/estree-walker/pull/18)) + +## 2.0.0 + +* Add an `asyncWalk` export ([#20](https://github.com/Rich-Harris/estree-walker/pull/20)) +* Internal rewrite + +## 1.0.1 + +* Relax node type to `BaseNode` ([#17](https://github.com/Rich-Harris/estree-walker/pull/17)) + +## 1.0.0 + +* Don't cache child keys + +## 0.9.0 + +* Add `this.remove()` method + +## 0.8.1 + +* Fix pkg.files + +## 0.8.0 + +* Adopt `estree` types + +## 0.7.0 + +* Add a `this.replace(node)` method + +## 0.6.1 + +* Only traverse nodes that exist and have a type ([#9](https://github.com/Rich-Harris/estree-walker/pull/9)) +* Only cache keys for nodes with a type ([#8](https://github.com/Rich-Harris/estree-walker/pull/8)) + +## 0.6.0 + +* Fix walker context type +* Update deps, remove unncessary Bublé transformation + +## 0.5.2 + +* Add types to package + +## 0.5.1 + +* Prevent context corruption when `walk()` is called during a walk + +## 0.5.0 + +* Export `childKeys`, for manually fixing in case of malformed ASTs + +## 0.4.0 + +* Add TypeScript typings ([#3](https://github.com/Rich-Harris/estree-walker/pull/3)) + +## 0.3.1 + +* Include `pkg.repository` ([#2](https://github.com/Rich-Harris/estree-walker/pull/2)) + +## 0.3.0 + +* More predictable ordering + +## 0.2.1 + +* Keep `context` shape + +## 0.2.0 + +* Add ES6 build + +## 0.1.3 + +* npm snafu + +## 0.1.2 + +* Pass current prop and index to `enter`/`leave` callbacks + +## 0.1.1 + +* First release diff --git a/vuetest/node_modules/estree-walker/LICENSE b/vuetest/node_modules/estree-walker/LICENSE new file mode 100644 index 0000000..63b6209 --- /dev/null +++ b/vuetest/node_modules/estree-walker/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2015-20 [these people](https://github.com/Rich-Harris/estree-walker/graphs/contributors) + +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. \ No newline at end of file diff --git a/vuetest/node_modules/estree-walker/README.md b/vuetest/node_modules/estree-walker/README.md new file mode 100644 index 0000000..d877af3 --- /dev/null +++ b/vuetest/node_modules/estree-walker/README.md @@ -0,0 +1,48 @@ +# estree-walker + +Simple utility for walking an [ESTree](https://github.com/estree/estree)-compliant AST, such as one generated by [acorn](https://github.com/marijnh/acorn). + + +## Installation + +```bash +npm i estree-walker +``` + + +## Usage + +```js +var walk = require( 'estree-walker' ).walk; +var acorn = require( 'acorn' ); + +ast = acorn.parse( sourceCode, options ); // https://github.com/acornjs/acorn + +walk( ast, { + enter: function ( node, parent, prop, index ) { + // some code happens + }, + leave: function ( node, parent, prop, index ) { + // some code happens + } +}); +``` + +Inside the `enter` function, calling `this.skip()` will prevent the node's children being walked, or the `leave` function (which is optional) being called. + +Call `this.replace(new_node)` in either `enter` or `leave` to replace the current node with a new one. + +Call `this.remove()` in either `enter` or `leave` to remove the current node. + +## Why not use estraverse? + +The ESTree spec is evolving to accommodate ES6/7. I've had a couple of experiences where [estraverse](https://github.com/estools/estraverse) was unable to handle an AST generated by recent versions of acorn, because it hard-codes visitor keys. + +estree-walker, by contrast, simply enumerates a node's properties to find child nodes (and child lists of nodes), and is therefore resistant to spec changes. It's also much smaller. (The performance, if you're wondering, is basically identical.) + +None of which should be taken as criticism of estraverse, which has more features and has been battle-tested in many more situations, and for which I'm very grateful. + + +## License + +MIT diff --git a/vuetest/node_modules/estree-walker/dist/esm/estree-walker.js b/vuetest/node_modules/estree-walker/dist/esm/estree-walker.js new file mode 100644 index 0000000..a0beeeb --- /dev/null +++ b/vuetest/node_modules/estree-walker/dist/esm/estree-walker.js @@ -0,0 +1,333 @@ +// @ts-check +/** @typedef { import('estree').BaseNode} BaseNode */ + +/** @typedef {{ + skip: () => void; + remove: () => void; + replace: (node: BaseNode) => void; +}} WalkerContext */ + +class WalkerBase { + constructor() { + /** @type {boolean} */ + this.should_skip = false; + + /** @type {boolean} */ + this.should_remove = false; + + /** @type {BaseNode | null} */ + this.replacement = null; + + /** @type {WalkerContext} */ + this.context = { + skip: () => (this.should_skip = true), + remove: () => (this.should_remove = true), + replace: (node) => (this.replacement = node) + }; + } + + /** + * + * @param {any} parent + * @param {string} prop + * @param {number} index + * @param {BaseNode} node + */ + replace(parent, prop, index, node) { + if (parent) { + if (index !== null) { + parent[prop][index] = node; + } else { + parent[prop] = node; + } + } + } + + /** + * + * @param {any} parent + * @param {string} prop + * @param {number} index + */ + remove(parent, prop, index) { + if (parent) { + if (index !== null) { + parent[prop].splice(index, 1); + } else { + delete parent[prop]; + } + } + } +} + +// @ts-check + +/** @typedef { import('estree').BaseNode} BaseNode */ +/** @typedef { import('./walker.js').WalkerContext} WalkerContext */ + +/** @typedef {( + * this: WalkerContext, + * node: BaseNode, + * parent: BaseNode, + * key: string, + * index: number + * ) => void} SyncHandler */ + +class SyncWalker extends WalkerBase { + /** + * + * @param {SyncHandler} enter + * @param {SyncHandler} leave + */ + constructor(enter, leave) { + super(); + + /** @type {SyncHandler} */ + this.enter = enter; + + /** @type {SyncHandler} */ + this.leave = leave; + } + + /** + * + * @param {BaseNode} node + * @param {BaseNode} parent + * @param {string} [prop] + * @param {number} [index] + * @returns {BaseNode} + */ + visit(node, parent, prop, index) { + if (node) { + if (this.enter) { + const _should_skip = this.should_skip; + const _should_remove = this.should_remove; + const _replacement = this.replacement; + this.should_skip = false; + this.should_remove = false; + this.replacement = null; + + this.enter.call(this.context, node, parent, prop, index); + + if (this.replacement) { + node = this.replacement; + this.replace(parent, prop, index, node); + } + + if (this.should_remove) { + this.remove(parent, prop, index); + } + + const skipped = this.should_skip; + const removed = this.should_remove; + + this.should_skip = _should_skip; + this.should_remove = _should_remove; + this.replacement = _replacement; + + if (skipped) return node; + if (removed) return null; + } + + for (const key in node) { + const value = node[key]; + + if (typeof value !== "object") { + continue; + } else if (Array.isArray(value)) { + for (let i = 0; i < value.length; i += 1) { + if (value[i] !== null && typeof value[i].type === 'string') { + if (!this.visit(value[i], node, key, i)) { + // removed + i--; + } + } + } + } else if (value !== null && typeof value.type === "string") { + this.visit(value, node, key, null); + } + } + + if (this.leave) { + const _replacement = this.replacement; + const _should_remove = this.should_remove; + this.replacement = null; + this.should_remove = false; + + this.leave.call(this.context, node, parent, prop, index); + + if (this.replacement) { + node = this.replacement; + this.replace(parent, prop, index, node); + } + + if (this.should_remove) { + this.remove(parent, prop, index); + } + + const removed = this.should_remove; + + this.replacement = _replacement; + this.should_remove = _should_remove; + + if (removed) return null; + } + } + + return node; + } +} + +// @ts-check + +/** @typedef { import('estree').BaseNode} BaseNode */ +/** @typedef { import('./walker').WalkerContext} WalkerContext */ + +/** @typedef {( + * this: WalkerContext, + * node: BaseNode, + * parent: BaseNode, + * key: string, + * index: number + * ) => Promise<void>} AsyncHandler */ + +class AsyncWalker extends WalkerBase { + /** + * + * @param {AsyncHandler} enter + * @param {AsyncHandler} leave + */ + constructor(enter, leave) { + super(); + + /** @type {AsyncHandler} */ + this.enter = enter; + + /** @type {AsyncHandler} */ + this.leave = leave; + } + + /** + * + * @param {BaseNode} node + * @param {BaseNode} parent + * @param {string} [prop] + * @param {number} [index] + * @returns {Promise<BaseNode>} + */ + async visit(node, parent, prop, index) { + if (node) { + if (this.enter) { + const _should_skip = this.should_skip; + const _should_remove = this.should_remove; + const _replacement = this.replacement; + this.should_skip = false; + this.should_remove = false; + this.replacement = null; + + await this.enter.call(this.context, node, parent, prop, index); + + if (this.replacement) { + node = this.replacement; + this.replace(parent, prop, index, node); + } + + if (this.should_remove) { + this.remove(parent, prop, index); + } + + const skipped = this.should_skip; + const removed = this.should_remove; + + this.should_skip = _should_skip; + this.should_remove = _should_remove; + this.replacement = _replacement; + + if (skipped) return node; + if (removed) return null; + } + + for (const key in node) { + const value = node[key]; + + if (typeof value !== "object") { + continue; + } else if (Array.isArray(value)) { + for (let i = 0; i < value.length; i += 1) { + if (value[i] !== null && typeof value[i].type === 'string') { + if (!(await this.visit(value[i], node, key, i))) { + // removed + i--; + } + } + } + } else if (value !== null && typeof value.type === "string") { + await this.visit(value, node, key, null); + } + } + + if (this.leave) { + const _replacement = this.replacement; + const _should_remove = this.should_remove; + this.replacement = null; + this.should_remove = false; + + await this.leave.call(this.context, node, parent, prop, index); + + if (this.replacement) { + node = this.replacement; + this.replace(parent, prop, index, node); + } + + if (this.should_remove) { + this.remove(parent, prop, index); + } + + const removed = this.should_remove; + + this.replacement = _replacement; + this.should_remove = _should_remove; + + if (removed) return null; + } + } + + return node; + } +} + +// @ts-check + +/** @typedef { import('estree').BaseNode} BaseNode */ +/** @typedef { import('./sync.js').SyncHandler} SyncHandler */ +/** @typedef { import('./async.js').AsyncHandler} AsyncHandler */ + +/** + * + * @param {BaseNode} ast + * @param {{ + * enter?: SyncHandler + * leave?: SyncHandler + * }} walker + * @returns {BaseNode} + */ +function walk(ast, { enter, leave }) { + const instance = new SyncWalker(enter, leave); + return instance.visit(ast, null); +} + +/** + * + * @param {BaseNode} ast + * @param {{ + * enter?: AsyncHandler + * leave?: AsyncHandler + * }} walker + * @returns {Promise<BaseNode>} + */ +async function asyncWalk(ast, { enter, leave }) { + const instance = new AsyncWalker(enter, leave); + return await instance.visit(ast, null); +} + +export { asyncWalk, walk }; diff --git a/vuetest/node_modules/estree-walker/dist/esm/package.json b/vuetest/node_modules/estree-walker/dist/esm/package.json new file mode 100644 index 0000000..7c34deb --- /dev/null +++ b/vuetest/node_modules/estree-walker/dist/esm/package.json @@ -0,0 +1 @@ +{"type":"module"} \ No newline at end of file diff --git a/vuetest/node_modules/estree-walker/dist/umd/estree-walker.js b/vuetest/node_modules/estree-walker/dist/umd/estree-walker.js new file mode 100644 index 0000000..46fed0f --- /dev/null +++ b/vuetest/node_modules/estree-walker/dist/umd/estree-walker.js @@ -0,0 +1,344 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = global || self, factory(global.estreeWalker = {})); +}(this, (function (exports) { 'use strict'; + + // @ts-check + /** @typedef { import('estree').BaseNode} BaseNode */ + + /** @typedef {{ + skip: () => void; + remove: () => void; + replace: (node: BaseNode) => void; + }} WalkerContext */ + + class WalkerBase { + constructor() { + /** @type {boolean} */ + this.should_skip = false; + + /** @type {boolean} */ + this.should_remove = false; + + /** @type {BaseNode | null} */ + this.replacement = null; + + /** @type {WalkerContext} */ + this.context = { + skip: () => (this.should_skip = true), + remove: () => (this.should_remove = true), + replace: (node) => (this.replacement = node) + }; + } + + /** + * + * @param {any} parent + * @param {string} prop + * @param {number} index + * @param {BaseNode} node + */ + replace(parent, prop, index, node) { + if (parent) { + if (index !== null) { + parent[prop][index] = node; + } else { + parent[prop] = node; + } + } + } + + /** + * + * @param {any} parent + * @param {string} prop + * @param {number} index + */ + remove(parent, prop, index) { + if (parent) { + if (index !== null) { + parent[prop].splice(index, 1); + } else { + delete parent[prop]; + } + } + } + } + + // @ts-check + + /** @typedef { import('estree').BaseNode} BaseNode */ + /** @typedef { import('./walker.js').WalkerContext} WalkerContext */ + + /** @typedef {( + * this: WalkerContext, + * node: BaseNode, + * parent: BaseNode, + * key: string, + * index: number + * ) => void} SyncHandler */ + + class SyncWalker extends WalkerBase { + /** + * + * @param {SyncHandler} enter + * @param {SyncHandler} leave + */ + constructor(enter, leave) { + super(); + + /** @type {SyncHandler} */ + this.enter = enter; + + /** @type {SyncHandler} */ + this.leave = leave; + } + + /** + * + * @param {BaseNode} node + * @param {BaseNode} parent + * @param {string} [prop] + * @param {number} [index] + * @returns {BaseNode} + */ + visit(node, parent, prop, index) { + if (node) { + if (this.enter) { + const _should_skip = this.should_skip; + const _should_remove = this.should_remove; + const _replacement = this.replacement; + this.should_skip = false; + this.should_remove = false; + this.replacement = null; + + this.enter.call(this.context, node, parent, prop, index); + + if (this.replacement) { + node = this.replacement; + this.replace(parent, prop, index, node); + } + + if (this.should_remove) { + this.remove(parent, prop, index); + } + + const skipped = this.should_skip; + const removed = this.should_remove; + + this.should_skip = _should_skip; + this.should_remove = _should_remove; + this.replacement = _replacement; + + if (skipped) return node; + if (removed) return null; + } + + for (const key in node) { + const value = node[key]; + + if (typeof value !== "object") { + continue; + } else if (Array.isArray(value)) { + for (let i = 0; i < value.length; i += 1) { + if (value[i] !== null && typeof value[i].type === 'string') { + if (!this.visit(value[i], node, key, i)) { + // removed + i--; + } + } + } + } else if (value !== null && typeof value.type === "string") { + this.visit(value, node, key, null); + } + } + + if (this.leave) { + const _replacement = this.replacement; + const _should_remove = this.should_remove; + this.replacement = null; + this.should_remove = false; + + this.leave.call(this.context, node, parent, prop, index); + + if (this.replacement) { + node = this.replacement; + this.replace(parent, prop, index, node); + } + + if (this.should_remove) { + this.remove(parent, prop, index); + } + + const removed = this.should_remove; + + this.replacement = _replacement; + this.should_remove = _should_remove; + + if (removed) return null; + } + } + + return node; + } + } + + // @ts-check + + /** @typedef { import('estree').BaseNode} BaseNode */ + /** @typedef { import('./walker').WalkerContext} WalkerContext */ + + /** @typedef {( + * this: WalkerContext, + * node: BaseNode, + * parent: BaseNode, + * key: string, + * index: number + * ) => Promise<void>} AsyncHandler */ + + class AsyncWalker extends WalkerBase { + /** + * + * @param {AsyncHandler} enter + * @param {AsyncHandler} leave + */ + constructor(enter, leave) { + super(); + + /** @type {AsyncHandler} */ + this.enter = enter; + + /** @type {AsyncHandler} */ + this.leave = leave; + } + + /** + * + * @param {BaseNode} node + * @param {BaseNode} parent + * @param {string} [prop] + * @param {number} [index] + * @returns {Promise<BaseNode>} + */ + async visit(node, parent, prop, index) { + if (node) { + if (this.enter) { + const _should_skip = this.should_skip; + const _should_remove = this.should_remove; + const _replacement = this.replacement; + this.should_skip = false; + this.should_remove = false; + this.replacement = null; + + await this.enter.call(this.context, node, parent, prop, index); + + if (this.replacement) { + node = this.replacement; + this.replace(parent, prop, index, node); + } + + if (this.should_remove) { + this.remove(parent, prop, index); + } + + const skipped = this.should_skip; + const removed = this.should_remove; + + this.should_skip = _should_skip; + this.should_remove = _should_remove; + this.replacement = _replacement; + + if (skipped) return node; + if (removed) return null; + } + + for (const key in node) { + const value = node[key]; + + if (typeof value !== "object") { + continue; + } else if (Array.isArray(value)) { + for (let i = 0; i < value.length; i += 1) { + if (value[i] !== null && typeof value[i].type === 'string') { + if (!(await this.visit(value[i], node, key, i))) { + // removed + i--; + } + } + } + } else if (value !== null && typeof value.type === "string") { + await this.visit(value, node, key, null); + } + } + + if (this.leave) { + const _replacement = this.replacement; + const _should_remove = this.should_remove; + this.replacement = null; + this.should_remove = false; + + await this.leave.call(this.context, node, parent, prop, index); + + if (this.replacement) { + node = this.replacement; + this.replace(parent, prop, index, node); + } + + if (this.should_remove) { + this.remove(parent, prop, index); + } + + const removed = this.should_remove; + + this.replacement = _replacement; + this.should_remove = _should_remove; + + if (removed) return null; + } + } + + return node; + } + } + + // @ts-check + + /** @typedef { import('estree').BaseNode} BaseNode */ + /** @typedef { import('./sync.js').SyncHandler} SyncHandler */ + /** @typedef { import('./async.js').AsyncHandler} AsyncHandler */ + + /** + * + * @param {BaseNode} ast + * @param {{ + * enter?: SyncHandler + * leave?: SyncHandler + * }} walker + * @returns {BaseNode} + */ + function walk(ast, { enter, leave }) { + const instance = new SyncWalker(enter, leave); + return instance.visit(ast, null); + } + + /** + * + * @param {BaseNode} ast + * @param {{ + * enter?: AsyncHandler + * leave?: AsyncHandler + * }} walker + * @returns {Promise<BaseNode>} + */ + async function asyncWalk(ast, { enter, leave }) { + const instance = new AsyncWalker(enter, leave); + return await instance.visit(ast, null); + } + + exports.asyncWalk = asyncWalk; + exports.walk = walk; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}))); diff --git a/vuetest/node_modules/estree-walker/package.json b/vuetest/node_modules/estree-walker/package.json new file mode 100644 index 0000000..f646eb5 --- /dev/null +++ b/vuetest/node_modules/estree-walker/package.json @@ -0,0 +1,37 @@ +{ + "name": "estree-walker", + "description": "Traverse an ESTree-compliant AST", + "version": "2.0.2", + "private": false, + "author": "Rich Harris", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Rich-Harris/estree-walker" + }, + "type": "commonjs", + "main": "./dist/umd/estree-walker.js", + "module": "./dist/esm/estree-walker.js", + "exports": { + "require": "./dist/umd/estree-walker.js", + "import": "./dist/esm/estree-walker.js" + }, + "types": "types/index.d.ts", + "scripts": { + "prepublishOnly": "npm run build && npm test", + "build": "tsc && rollup -c", + "test": "uvu test" + }, + "devDependencies": { + "@types/estree": "0.0.42", + "rollup": "^2.10.9", + "typescript": "^3.7.5", + "uvu": "^0.5.1" + }, + "files": [ + "src", + "dist", + "types", + "README.md" + ] +} diff --git a/vuetest/node_modules/estree-walker/src/async.js b/vuetest/node_modules/estree-walker/src/async.js new file mode 100644 index 0000000..54276b5 --- /dev/null +++ b/vuetest/node_modules/estree-walker/src/async.js @@ -0,0 +1,118 @@ +// @ts-check +import { WalkerBase } from './walker.js'; + +/** @typedef { import('estree').BaseNode} BaseNode */ +/** @typedef { import('./walker').WalkerContext} WalkerContext */ + +/** @typedef {( + * this: WalkerContext, + * node: BaseNode, + * parent: BaseNode, + * key: string, + * index: number + * ) => Promise<void>} AsyncHandler */ + +export class AsyncWalker extends WalkerBase { + /** + * + * @param {AsyncHandler} enter + * @param {AsyncHandler} leave + */ + constructor(enter, leave) { + super(); + + /** @type {AsyncHandler} */ + this.enter = enter; + + /** @type {AsyncHandler} */ + this.leave = leave; + } + + /** + * + * @param {BaseNode} node + * @param {BaseNode} parent + * @param {string} [prop] + * @param {number} [index] + * @returns {Promise<BaseNode>} + */ + async visit(node, parent, prop, index) { + if (node) { + if (this.enter) { + const _should_skip = this.should_skip; + const _should_remove = this.should_remove; + const _replacement = this.replacement; + this.should_skip = false; + this.should_remove = false; + this.replacement = null; + + await this.enter.call(this.context, node, parent, prop, index); + + if (this.replacement) { + node = this.replacement; + this.replace(parent, prop, index, node); + } + + if (this.should_remove) { + this.remove(parent, prop, index); + } + + const skipped = this.should_skip; + const removed = this.should_remove; + + this.should_skip = _should_skip; + this.should_remove = _should_remove; + this.replacement = _replacement; + + if (skipped) return node; + if (removed) return null; + } + + for (const key in node) { + const value = node[key]; + + if (typeof value !== "object") { + continue; + } else if (Array.isArray(value)) { + for (let i = 0; i < value.length; i += 1) { + if (value[i] !== null && typeof value[i].type === 'string') { + if (!(await this.visit(value[i], node, key, i))) { + // removed + i--; + } + } + } + } else if (value !== null && typeof value.type === "string") { + await this.visit(value, node, key, null); + } + } + + if (this.leave) { + const _replacement = this.replacement; + const _should_remove = this.should_remove; + this.replacement = null; + this.should_remove = false; + + await this.leave.call(this.context, node, parent, prop, index); + + if (this.replacement) { + node = this.replacement; + this.replace(parent, prop, index, node); + } + + if (this.should_remove) { + this.remove(parent, prop, index); + } + + const removed = this.should_remove; + + this.replacement = _replacement; + this.should_remove = _should_remove; + + if (removed) return null; + } + } + + return node; + } +} diff --git a/vuetest/node_modules/estree-walker/src/index.js b/vuetest/node_modules/estree-walker/src/index.js new file mode 100644 index 0000000..dcf4c72 --- /dev/null +++ b/vuetest/node_modules/estree-walker/src/index.js @@ -0,0 +1,35 @@ +// @ts-check +import { SyncWalker } from './sync.js'; +import { AsyncWalker } from './async.js'; + +/** @typedef { import('estree').BaseNode} BaseNode */ +/** @typedef { import('./sync.js').SyncHandler} SyncHandler */ +/** @typedef { import('./async.js').AsyncHandler} AsyncHandler */ + +/** + * + * @param {BaseNode} ast + * @param {{ + * enter?: SyncHandler + * leave?: SyncHandler + * }} walker + * @returns {BaseNode} + */ +export function walk(ast, { enter, leave }) { + const instance = new SyncWalker(enter, leave); + return instance.visit(ast, null); +} + +/** + * + * @param {BaseNode} ast + * @param {{ + * enter?: AsyncHandler + * leave?: AsyncHandler + * }} walker + * @returns {Promise<BaseNode>} + */ +export async function asyncWalk(ast, { enter, leave }) { + const instance = new AsyncWalker(enter, leave); + return await instance.visit(ast, null); +} diff --git a/vuetest/node_modules/estree-walker/src/package.json b/vuetest/node_modules/estree-walker/src/package.json new file mode 100644 index 0000000..1632c2c --- /dev/null +++ b/vuetest/node_modules/estree-walker/src/package.json @@ -0,0 +1 @@ +{"type": "module"} \ No newline at end of file diff --git a/vuetest/node_modules/estree-walker/src/sync.js b/vuetest/node_modules/estree-walker/src/sync.js new file mode 100644 index 0000000..b3cea40 --- /dev/null +++ b/vuetest/node_modules/estree-walker/src/sync.js @@ -0,0 +1,118 @@ +// @ts-check +import { WalkerBase } from './walker.js'; + +/** @typedef { import('estree').BaseNode} BaseNode */ +/** @typedef { import('./walker.js').WalkerContext} WalkerContext */ + +/** @typedef {( + * this: WalkerContext, + * node: BaseNode, + * parent: BaseNode, + * key: string, + * index: number + * ) => void} SyncHandler */ + +export class SyncWalker extends WalkerBase { + /** + * + * @param {SyncHandler} enter + * @param {SyncHandler} leave + */ + constructor(enter, leave) { + super(); + + /** @type {SyncHandler} */ + this.enter = enter; + + /** @type {SyncHandler} */ + this.leave = leave; + } + + /** + * + * @param {BaseNode} node + * @param {BaseNode} parent + * @param {string} [prop] + * @param {number} [index] + * @returns {BaseNode} + */ + visit(node, parent, prop, index) { + if (node) { + if (this.enter) { + const _should_skip = this.should_skip; + const _should_remove = this.should_remove; + const _replacement = this.replacement; + this.should_skip = false; + this.should_remove = false; + this.replacement = null; + + this.enter.call(this.context, node, parent, prop, index); + + if (this.replacement) { + node = this.replacement; + this.replace(parent, prop, index, node); + } + + if (this.should_remove) { + this.remove(parent, prop, index); + } + + const skipped = this.should_skip; + const removed = this.should_remove; + + this.should_skip = _should_skip; + this.should_remove = _should_remove; + this.replacement = _replacement; + + if (skipped) return node; + if (removed) return null; + } + + for (const key in node) { + const value = node[key]; + + if (typeof value !== "object") { + continue; + } else if (Array.isArray(value)) { + for (let i = 0; i < value.length; i += 1) { + if (value[i] !== null && typeof value[i].type === 'string') { + if (!this.visit(value[i], node, key, i)) { + // removed + i--; + } + } + } + } else if (value !== null && typeof value.type === "string") { + this.visit(value, node, key, null); + } + } + + if (this.leave) { + const _replacement = this.replacement; + const _should_remove = this.should_remove; + this.replacement = null; + this.should_remove = false; + + this.leave.call(this.context, node, parent, prop, index); + + if (this.replacement) { + node = this.replacement; + this.replace(parent, prop, index, node); + } + + if (this.should_remove) { + this.remove(parent, prop, index); + } + + const removed = this.should_remove; + + this.replacement = _replacement; + this.should_remove = _should_remove; + + if (removed) return null; + } + } + + return node; + } +} diff --git a/vuetest/node_modules/estree-walker/src/walker.js b/vuetest/node_modules/estree-walker/src/walker.js new file mode 100644 index 0000000..3555d88 --- /dev/null +++ b/vuetest/node_modules/estree-walker/src/walker.js @@ -0,0 +1,61 @@ +// @ts-check +/** @typedef { import('estree').BaseNode} BaseNode */ + +/** @typedef {{ + skip: () => void; + remove: () => void; + replace: (node: BaseNode) => void; +}} WalkerContext */ + +export class WalkerBase { + constructor() { + /** @type {boolean} */ + this.should_skip = false; + + /** @type {boolean} */ + this.should_remove = false; + + /** @type {BaseNode | null} */ + this.replacement = null; + + /** @type {WalkerContext} */ + this.context = { + skip: () => (this.should_skip = true), + remove: () => (this.should_remove = true), + replace: (node) => (this.replacement = node) + }; + } + + /** + * + * @param {any} parent + * @param {string} prop + * @param {number} index + * @param {BaseNode} node + */ + replace(parent, prop, index, node) { + if (parent) { + if (index !== null) { + parent[prop][index] = node; + } else { + parent[prop] = node; + } + } + } + + /** + * + * @param {any} parent + * @param {string} prop + * @param {number} index + */ + remove(parent, prop, index) { + if (parent) { + if (index !== null) { + parent[prop].splice(index, 1); + } else { + delete parent[prop]; + } + } + } +} diff --git a/vuetest/node_modules/estree-walker/types/async.d.ts b/vuetest/node_modules/estree-walker/types/async.d.ts new file mode 100644 index 0000000..c85bfdc --- /dev/null +++ b/vuetest/node_modules/estree-walker/types/async.d.ts @@ -0,0 +1,53 @@ +/** @typedef { import('estree').BaseNode} BaseNode */ +/** @typedef { import('./walker').WalkerContext} WalkerContext */ +/** @typedef {( + * this: WalkerContext, + * node: BaseNode, + * parent: BaseNode, + * key: string, + * index: number + * ) => Promise<void>} AsyncHandler */ +export class AsyncWalker extends WalkerBase { + /** + * + * @param {AsyncHandler} enter + * @param {AsyncHandler} leave + */ + constructor(enter: (this: { + skip: () => void; + remove: () => void; + replace: (node: import("estree").BaseNode) => void; + }, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => Promise<void>, leave: (this: { + skip: () => void; + remove: () => void; + replace: (node: import("estree").BaseNode) => void; + }, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => Promise<void>); + /** @type {AsyncHandler} */ + enter: AsyncHandler; + /** @type {AsyncHandler} */ + leave: AsyncHandler; + /** + * + * @param {BaseNode} node + * @param {BaseNode} parent + * @param {string} [prop] + * @param {number} [index] + * @returns {Promise<BaseNode>} + */ + visit(node: import("estree").BaseNode, parent: import("estree").BaseNode, prop?: string, index?: number): Promise<import("estree").BaseNode>; + should_skip: any; + should_remove: any; + replacement: any; +} +export type BaseNode = import("estree").BaseNode; +export type WalkerContext = { + skip: () => void; + remove: () => void; + replace: (node: import("estree").BaseNode) => void; +}; +export type AsyncHandler = (this: { + skip: () => void; + remove: () => void; + replace: (node: import("estree").BaseNode) => void; +}, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => Promise<void>; +import { WalkerBase } from "./walker.js"; diff --git a/vuetest/node_modules/estree-walker/types/index.d.ts b/vuetest/node_modules/estree-walker/types/index.d.ts new file mode 100644 index 0000000..dfc3277 --- /dev/null +++ b/vuetest/node_modules/estree-walker/types/index.d.ts @@ -0,0 +1,56 @@ +/** @typedef { import('estree').BaseNode} BaseNode */ +/** @typedef { import('./sync.js').SyncHandler} SyncHandler */ +/** @typedef { import('./async.js').AsyncHandler} AsyncHandler */ +/** + * + * @param {BaseNode} ast + * @param {{ + * enter?: SyncHandler + * leave?: SyncHandler + * }} walker + * @returns {BaseNode} + */ +export function walk(ast: import("estree").BaseNode, { enter, leave }: { + enter?: (this: { + skip: () => void; + remove: () => void; + replace: (node: import("estree").BaseNode) => void; + }, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => void; + leave?: (this: { + skip: () => void; + remove: () => void; + replace: (node: import("estree").BaseNode) => void; + }, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => void; +}): import("estree").BaseNode; +/** + * + * @param {BaseNode} ast + * @param {{ + * enter?: AsyncHandler + * leave?: AsyncHandler + * }} walker + * @returns {Promise<BaseNode>} + */ +export function asyncWalk(ast: import("estree").BaseNode, { enter, leave }: { + enter?: (this: { + skip: () => void; + remove: () => void; + replace: (node: import("estree").BaseNode) => void; + }, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => Promise<void>; + leave?: (this: { + skip: () => void; + remove: () => void; + replace: (node: import("estree").BaseNode) => void; + }, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => Promise<void>; +}): Promise<import("estree").BaseNode>; +export type BaseNode = import("estree").BaseNode; +export type SyncHandler = (this: { + skip: () => void; + remove: () => void; + replace: (node: import("estree").BaseNode) => void; +}, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => void; +export type AsyncHandler = (this: { + skip: () => void; + remove: () => void; + replace: (node: import("estree").BaseNode) => void; +}, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => Promise<void>; diff --git a/vuetest/node_modules/estree-walker/types/sync.d.ts b/vuetest/node_modules/estree-walker/types/sync.d.ts new file mode 100644 index 0000000..e9e4cc1 --- /dev/null +++ b/vuetest/node_modules/estree-walker/types/sync.d.ts @@ -0,0 +1,53 @@ +/** @typedef { import('estree').BaseNode} BaseNode */ +/** @typedef { import('./walker.js').WalkerContext} WalkerContext */ +/** @typedef {( + * this: WalkerContext, + * node: BaseNode, + * parent: BaseNode, + * key: string, + * index: number + * ) => void} SyncHandler */ +export class SyncWalker extends WalkerBase { + /** + * + * @param {SyncHandler} enter + * @param {SyncHandler} leave + */ + constructor(enter: (this: { + skip: () => void; + remove: () => void; + replace: (node: import("estree").BaseNode) => void; + }, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => void, leave: (this: { + skip: () => void; + remove: () => void; + replace: (node: import("estree").BaseNode) => void; + }, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => void); + /** @type {SyncHandler} */ + enter: SyncHandler; + /** @type {SyncHandler} */ + leave: SyncHandler; + /** + * + * @param {BaseNode} node + * @param {BaseNode} parent + * @param {string} [prop] + * @param {number} [index] + * @returns {BaseNode} + */ + visit(node: import("estree").BaseNode, parent: import("estree").BaseNode, prop?: string, index?: number): import("estree").BaseNode; + should_skip: any; + should_remove: any; + replacement: any; +} +export type BaseNode = import("estree").BaseNode; +export type WalkerContext = { + skip: () => void; + remove: () => void; + replace: (node: import("estree").BaseNode) => void; +}; +export type SyncHandler = (this: { + skip: () => void; + remove: () => void; + replace: (node: import("estree").BaseNode) => void; +}, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => void; +import { WalkerBase } from "./walker.js"; diff --git a/vuetest/node_modules/estree-walker/types/tsconfig.tsbuildinfo b/vuetest/node_modules/estree-walker/types/tsconfig.tsbuildinfo new file mode 100644 index 0000000..799022f --- /dev/null +++ b/vuetest/node_modules/estree-walker/types/tsconfig.tsbuildinfo @@ -0,0 +1,345 @@ +{ + "program": { + "fileInfos": { + "../node_modules/typescript/lib/lib.es5.d.ts": { + "version": "fc43680ad3a1a4ec8c7b8d908af1ec9ddff87845346de5f02c735c9171fa98ea", + "signature": "fc43680ad3a1a4ec8c7b8d908af1ec9ddff87845346de5f02c735c9171fa98ea" + }, + "../node_modules/typescript/lib/lib.es2015.d.ts": { + "version": "7994d44005046d1413ea31d046577cdda33b8b2470f30281fd9c8b3c99fe2d96", + "signature": "7994d44005046d1413ea31d046577cdda33b8b2470f30281fd9c8b3c99fe2d96" + }, + "../node_modules/typescript/lib/lib.es2016.d.ts": { + "version": "5f217838d25704474d9ef93774f04164889169ca31475fe423a9de6758f058d1", + "signature": "5f217838d25704474d9ef93774f04164889169ca31475fe423a9de6758f058d1" + }, + "../node_modules/typescript/lib/lib.es2017.d.ts": { + "version": "459097c7bdd88fc5731367e56591e4f465f2c9de81a35427a7bd473165c34743", + "signature": "459097c7bdd88fc5731367e56591e4f465f2c9de81a35427a7bd473165c34743" + }, + "../node_modules/typescript/lib/lib.dom.d.ts": { + "version": "d93de5e8a7275cb9d47481410e13b3b1debb997e216490954b5d106e37e086de", + "signature": "d93de5e8a7275cb9d47481410e13b3b1debb997e216490954b5d106e37e086de" + }, + "../node_modules/typescript/lib/lib.dom.iterable.d.ts": { + "version": "8329c3401aa8708426c7760f14219170f69a2cb77e4519758cec6f5027270faf", + "signature": "8329c3401aa8708426c7760f14219170f69a2cb77e4519758cec6f5027270faf" + }, + "../node_modules/typescript/lib/lib.webworker.importscripts.d.ts": { + "version": "fe4e59403e34c7ff747abe4ff6abbc7718229556d7c1a5b93473fb53156c913b", + "signature": "fe4e59403e34c7ff747abe4ff6abbc7718229556d7c1a5b93473fb53156c913b" + }, + "../node_modules/typescript/lib/lib.scripthost.d.ts": { + "version": "b9faa17292f17d2ad75e34fac77dd63a6403af1dba02d39cd0cbb9ffdf3de8b9", + "signature": "b9faa17292f17d2ad75e34fac77dd63a6403af1dba02d39cd0cbb9ffdf3de8b9" + }, + "../node_modules/typescript/lib/lib.es2015.core.d.ts": { + "version": "734ddc145e147fbcd55f07d034f50ccff1086f5a880107665ec326fb368876f6", + "signature": "734ddc145e147fbcd55f07d034f50ccff1086f5a880107665ec326fb368876f6" + }, + "../node_modules/typescript/lib/lib.es2015.collection.d.ts": { + "version": "4a0862a21f4700de873db3b916f70e41570e2f558da77d2087c9490f5a0615d8", + "signature": "4a0862a21f4700de873db3b916f70e41570e2f558da77d2087c9490f5a0615d8" + }, + "../node_modules/typescript/lib/lib.es2015.generator.d.ts": { + "version": "765e0e9c9d74cf4d031ca8b0bdb269a853e7d81eda6354c8510218d03db12122", + "signature": "765e0e9c9d74cf4d031ca8b0bdb269a853e7d81eda6354c8510218d03db12122" + }, + "../node_modules/typescript/lib/lib.es2015.iterable.d.ts": { + "version": "285958e7699f1babd76d595830207f18d719662a0c30fac7baca7df7162a9210", + "signature": "285958e7699f1babd76d595830207f18d719662a0c30fac7baca7df7162a9210" + }, + "../node_modules/typescript/lib/lib.es2015.promise.d.ts": { + "version": "d4deaafbb18680e3143e8b471acd650ed6f72a408a33137f0a0dd104fbe7f8ca", + "signature": "d4deaafbb18680e3143e8b471acd650ed6f72a408a33137f0a0dd104fbe7f8ca" + }, + "../node_modules/typescript/lib/lib.es2015.proxy.d.ts": { + "version": "5e72f949a89717db444e3bd9433468890068bb21a5638d8ab15a1359e05e54fe", + "signature": "5e72f949a89717db444e3bd9433468890068bb21a5638d8ab15a1359e05e54fe" + }, + "../node_modules/typescript/lib/lib.es2015.reflect.d.ts": { + "version": "f5b242136ae9bfb1cc99a5971cccc44e99947ae6b5ef6fd8aa54b5ade553b976", + "signature": "f5b242136ae9bfb1cc99a5971cccc44e99947ae6b5ef6fd8aa54b5ade553b976" + }, + "../node_modules/typescript/lib/lib.es2015.symbol.d.ts": { + "version": "9ae2860252d6b5f16e2026d8a2c2069db7b2a3295e98b6031d01337b96437230", + "signature": "9ae2860252d6b5f16e2026d8a2c2069db7b2a3295e98b6031d01337b96437230" + }, + "../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts": { + "version": "3e0a459888f32b42138d5a39f706ff2d55d500ab1031e0988b5568b0f67c2303", + "signature": "3e0a459888f32b42138d5a39f706ff2d55d500ab1031e0988b5568b0f67c2303" + }, + "../node_modules/typescript/lib/lib.es2016.array.include.d.ts": { + "version": "3f96f1e570aedbd97bf818c246727151e873125d0512e4ae904330286c721bc0", + "signature": "3f96f1e570aedbd97bf818c246727151e873125d0512e4ae904330286c721bc0" + }, + "../node_modules/typescript/lib/lib.es2017.object.d.ts": { + "version": "c2d60b2e558d44384e4704b00e6b3d154334721a911f094d3133c35f0917b408", + "signature": "c2d60b2e558d44384e4704b00e6b3d154334721a911f094d3133c35f0917b408" + }, + "../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts": { + "version": "b8667586a618c5cf64523d4e500ae39e781428abfb28f3de441fc66b56144b6f", + "signature": "b8667586a618c5cf64523d4e500ae39e781428abfb28f3de441fc66b56144b6f" + }, + "../node_modules/typescript/lib/lib.es2017.string.d.ts": { + "version": "21df2e0059f14dcb4c3a0e125859f6b6ff01332ee24b0065a741d121250bc71c", + "signature": "21df2e0059f14dcb4c3a0e125859f6b6ff01332ee24b0065a741d121250bc71c" + }, + "../node_modules/typescript/lib/lib.es2017.intl.d.ts": { + "version": "c1759cb171c7619af0d2234f2f8fb2a871ee88e956e2ed91bb61778e41f272c6", + "signature": "c1759cb171c7619af0d2234f2f8fb2a871ee88e956e2ed91bb61778e41f272c6" + }, + "../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts": { + "version": "28569d59e07d4378cb3d54979c4c60f9f06305c9bb6999ffe6cab758957adc46", + "signature": "28569d59e07d4378cb3d54979c4c60f9f06305c9bb6999ffe6cab758957adc46" + }, + "../node_modules/typescript/lib/lib.es2017.full.d.ts": { + "version": "873c09f1c309389742d98b7b67419a8e0a5fa6f10ce59fd5149ecd31a2818594", + "signature": "873c09f1c309389742d98b7b67419a8e0a5fa6f10ce59fd5149ecd31a2818594" + }, + "../node_modules/@types/estree/index.d.ts": { + "version": "c2efad8a2f2d7fb931ff15c7959fb45340e74684cd665ddf0cbf9b3977be1644", + "signature": "c2efad8a2f2d7fb931ff15c7959fb45340e74684cd665ddf0cbf9b3977be1644" + }, + "../src/walker.js": { + "version": "4cc9d0e334d83a4cebeeac502de37a1aeeb953f6d4145a886d9eecea1f2142a7", + "signature": "075872468ccc19c83b03fd717fc9305b5f8ec09592210cf60279cb13eca2bd70" + }, + "../src/async.js": { + "version": "904efd145090ac40c3c98f29cc928332898a62ab642dd5921db2ae249bfe014a", + "signature": "da428f781d6dc6dfd4f4afd0dd5f25a780897dc8b57e5b30462491b7d08f32c0" + }, + "../src/sync.js": { + "version": "85bb22b85042f0a3717d8fac2fc8f62af16894652be34d1e08eb3e63785535f5", + "signature": "5b131a727db18c956611a5e33d08217df96d0f2e0f26d98b804d1ec2407e59ae" + }, + "../src/index.js": { + "version": "99128f4c6cb79cb1e3abf3f2ba96faedd2b820aab4fd7f743aab0b8d710a73af", + "signature": "c52be5c79280bfcfcf359c084c6f2f70f405b0ad14dde96b6703dbc5ef2261f5" + } + }, + "options": { + "allowJs": true, + "target": 4, + "module": 99, + "types": [ + "estree" + ], + "declaration": true, + "declarationDir": "./", + "emitDeclarationOnly": true, + "outDir": "./", + "newLine": 1, + "noImplicitAny": true, + "noImplicitThis": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/walker.js": [ + "../node_modules/@types/estree/index.d.ts" + ], + "../src/async.js": [ + "../src/walker.js", + "../node_modules/@types/estree/index.d.ts" + ], + "../src/sync.js": [ + "../src/walker.js", + "../node_modules/@types/estree/index.d.ts" + ], + "../src/index.js": [ + "../src/sync.js", + "../src/async.js", + "../node_modules/@types/estree/index.d.ts" + ] + }, + "exportedModulesMap": { + "../src/walker.js": [ + "../node_modules/@types/estree/index.d.ts" + ], + "../src/async.js": [ + "../node_modules/@types/estree/index.d.ts" + ], + "../src/sync.js": [ + "../node_modules/@types/estree/index.d.ts" + ], + "../src/index.js": [ + "../node_modules/@types/estree/index.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../node_modules/typescript/lib/lib.es5.d.ts", + "../node_modules/typescript/lib/lib.es2015.d.ts", + "../node_modules/typescript/lib/lib.es2016.d.ts", + "../node_modules/typescript/lib/lib.es2017.d.ts", + "../node_modules/typescript/lib/lib.dom.d.ts", + "../node_modules/typescript/lib/lib.dom.iterable.d.ts", + "../node_modules/typescript/lib/lib.webworker.importscripts.d.ts", + "../node_modules/typescript/lib/lib.scripthost.d.ts", + "../node_modules/typescript/lib/lib.es2015.core.d.ts", + "../node_modules/typescript/lib/lib.es2015.collection.d.ts", + "../node_modules/typescript/lib/lib.es2015.generator.d.ts", + "../node_modules/typescript/lib/lib.es2015.iterable.d.ts", + "../node_modules/typescript/lib/lib.es2015.promise.d.ts", + "../node_modules/typescript/lib/lib.es2015.proxy.d.ts", + "../node_modules/typescript/lib/lib.es2015.reflect.d.ts", + "../node_modules/typescript/lib/lib.es2015.symbol.d.ts", + "../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts", + "../node_modules/typescript/lib/lib.es2016.array.include.d.ts", + "../node_modules/typescript/lib/lib.es2017.object.d.ts", + "../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts", + "../node_modules/typescript/lib/lib.es2017.string.d.ts", + "../node_modules/typescript/lib/lib.es2017.intl.d.ts", + "../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts", + "../node_modules/typescript/lib/lib.es2017.full.d.ts", + "../node_modules/@types/estree/index.d.ts", + "../src/walker.js", + [ + "../src/async.js", + [ + { + "file": "../src/async.js", + "start": 864, + "length": 12, + "messageText": "'_should_skip' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", + "category": 1, + "code": 7022 + }, + { + "file": "../src/async.js", + "start": 907, + "length": 14, + "messageText": "'_should_remove' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", + "category": 1, + "code": 7022 + }, + { + "file": "../src/async.js", + "start": 954, + "length": 12, + "messageText": "'_replacement' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", + "category": 1, + "code": 7022 + }, + { + "file": "../src/async.js", + "start": 991, + "length": 24, + "messageText": "'should_skip' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", + "category": 1, + "code": 7022 + }, + { + "file": "../src/async.js", + "start": 1021, + "length": 26, + "messageText": "'should_remove' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", + "category": 1, + "code": 7022 + }, + { + "file": "../src/async.js", + "start": 1053, + "length": 23, + "messageText": "'replacement' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", + "category": 1, + "code": 7022 + }, + { + "file": "../src/async.js", + "start": 1643, + "length": 9, + "code": 7053, + "category": 1, + "messageText": { + "messageText": "Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'BaseNode'.", + "category": 1, + "code": 7053, + "next": [ + { + "messageText": "No index signature with a parameter of type 'string' was found on type 'BaseNode'.", + "category": 1, + "code": 7054 + } + ] + } + } + ] + ], + [ + "../src/sync.js", + [ + { + "file": "../src/sync.js", + "start": 837, + "length": 12, + "messageText": "'_should_skip' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", + "category": 1, + "code": 7022 + }, + { + "file": "../src/sync.js", + "start": 880, + "length": 14, + "messageText": "'_should_remove' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", + "category": 1, + "code": 7022 + }, + { + "file": "../src/sync.js", + "start": 927, + "length": 12, + "messageText": "'_replacement' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", + "category": 1, + "code": 7022 + }, + { + "file": "../src/sync.js", + "start": 964, + "length": 24, + "messageText": "'should_skip' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", + "category": 1, + "code": 7022 + }, + { + "file": "../src/sync.js", + "start": 994, + "length": 26, + "messageText": "'should_remove' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", + "category": 1, + "code": 7022 + }, + { + "file": "../src/sync.js", + "start": 1026, + "length": 23, + "messageText": "'replacement' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.", + "category": 1, + "code": 7022 + }, + { + "file": "../src/sync.js", + "start": 1610, + "length": 9, + "code": 7053, + "category": 1, + "messageText": { + "messageText": "Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'BaseNode'.", + "category": 1, + "code": 7053, + "next": [ + { + "messageText": "No index signature with a parameter of type 'string' was found on type 'BaseNode'.", + "category": 1, + "code": 7054 + } + ] + } + } + ] + ], + "../src/index.js" + ] + }, + "version": "3.7.5" +} \ No newline at end of file diff --git a/vuetest/node_modules/estree-walker/types/walker.d.ts b/vuetest/node_modules/estree-walker/types/walker.d.ts new file mode 100644 index 0000000..49d8441 --- /dev/null +++ b/vuetest/node_modules/estree-walker/types/walker.d.ts @@ -0,0 +1,37 @@ +/** @typedef { import('estree').BaseNode} BaseNode */ +/** @typedef {{ + skip: () => void; + remove: () => void; + replace: (node: BaseNode) => void; +}} WalkerContext */ +export class WalkerBase { + /** @type {boolean} */ + should_skip: boolean; + /** @type {boolean} */ + should_remove: boolean; + /** @type {BaseNode | null} */ + replacement: BaseNode | null; + /** @type {WalkerContext} */ + context: WalkerContext; + /** + * + * @param {any} parent + * @param {string} prop + * @param {number} index + * @param {BaseNode} node + */ + replace(parent: any, prop: string, index: number, node: import("estree").BaseNode): void; + /** + * + * @param {any} parent + * @param {string} prop + * @param {number} index + */ + remove(parent: any, prop: string, index: number): void; +} +export type BaseNode = import("estree").BaseNode; +export type WalkerContext = { + skip: () => void; + remove: () => void; + replace: (node: import("estree").BaseNode) => void; +}; diff --git a/vuetest/node_modules/magic-string/LICENSE b/vuetest/node_modules/magic-string/LICENSE new file mode 100644 index 0000000..667e8b4 --- /dev/null +++ b/vuetest/node_modules/magic-string/LICENSE @@ -0,0 +1,7 @@ +Copyright 2018 Rich Harris + +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. diff --git a/vuetest/node_modules/magic-string/README.md b/vuetest/node_modules/magic-string/README.md new file mode 100644 index 0000000..b2e9f9a --- /dev/null +++ b/vuetest/node_modules/magic-string/README.md @@ -0,0 +1,324 @@ +# magic-string + +<a href="https://github.com/Rich-Harris/magic-string/actions/workflows/test.yml"> + <img src="https://img.shields.io/github/actions/workflow/status/Rich-Harris/magic-string/test.yml" + alt="build status"> +</a> +<a href="https://npmjs.org/package/magic-string"> + <img src="https://img.shields.io/npm/v/magic-string.svg" + alt="npm version"> +</a> +<a href="https://github.com/Rich-Harris/magic-string/blob/master/LICENSE.md"> + <img src="https://img.shields.io/npm/l/magic-string.svg" + alt="license"> +</a> + +Suppose you have some source code. You want to make some light modifications to it - replacing a few characters here and there, wrapping it with a header and footer, etc - and ideally you'd like to generate a [source map](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/) at the end of it. You've thought about using something like [recast](https://github.com/benjamn/recast) (which allows you to generate an AST from some JavaScript, manipulate it, and reprint it with a sourcemap without losing your comments and formatting), but it seems like overkill for your needs (or maybe the source code isn't JavaScript). + +Your requirements are, frankly, rather niche. But they're requirements that I also have, and for which I made magic-string. It's a small, fast utility for manipulating strings and generating sourcemaps. + +## Installation + +magic-string works in both node.js and browser environments. For node, install with npm: + +```bash +npm i magic-string +``` + +To use in browser, grab the [magic-string.umd.js](https://unpkg.com/magic-string/dist/magic-string.umd.js) file and add it to your page: + +```html +<script src="magic-string.umd.js"></script> +``` + +(It also works with various module systems, if you prefer that sort of thing - it has a dependency on [vlq](https://github.com/Rich-Harris/vlq).) + +## Usage + +These examples assume you're in node.js, or something similar: + +```js +import MagicString from 'magic-string'; +import fs from 'fs'; + +const s = new MagicString('problems = 99'); + +s.update(0, 8, 'answer'); +s.toString(); // 'answer = 99' + +s.update(11, 13, '42'); // character indices always refer to the original string +s.toString(); // 'answer = 42' + +s.prepend('var ').append(';'); // most methods are chainable +s.toString(); // 'var answer = 42;' + +const map = s.generateMap({ + source: 'source.js', + file: 'converted.js.map', + includeContent: true, +}); // generates a v3 sourcemap + +fs.writeFileSync('converted.js', s.toString()); +fs.writeFileSync('converted.js.map', map.toString()); +``` + +You can pass an options argument: + +```js +const s = new MagicString(someCode, { + // these options will be used if you later call `bundle.addSource( s )` - see below + filename: 'foo.js', + indentExclusionRanges: [ + /*...*/ + ], + // mark source as ignore in DevTools, see below #Bundling + ignoreList: false, + // adjust the incoming position - see below + offset: 0, +}); +``` + +## Properties + +### s.offset + +Sets the offset property to adjust the incoming position for the following APIs: `slice`, `update`, `overwrite`, `appendLeft`, `prependLeft`, `appendRight`, `prependRight`, `move`, `reset`, and `remove`. + +Example usage: + +```ts +const s = new MagicString('hello world', { offset: 0 }); +s.offset = 6; +s.slice() === 'world'; +``` + +## Methods + +### s.addSourcemapLocation( index ) + +Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is `false` (see below). + +### s.append( content ) + +Appends the specified content to the end of the string. Returns `this`. + +### s.appendLeft( index, content ) + +Appends the specified `content` at the `index` in the original string. If a range _ending_ with `index` is subsequently moved, the insert will be moved with it. Returns `this`. See also `s.prependLeft(...)`. + +### s.appendRight( index, content ) + +Appends the specified `content` at the `index` in the original string. If a range _starting_ with `index` is subsequently moved, the insert will be moved with it. Returns `this`. See also `s.prependRight(...)`. + +### s.clone() + +Does what you'd expect. + +### s.generateDecodedMap( options ) + +Generates a sourcemap object with raw mappings in array form, rather than encoded as a string. See `generateMap` documentation below for options details. Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead. + +### s.generateMap( options ) + +Generates a [version 3 sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit). All options are, well, optional: + +- `file` - the filename where you plan to write the sourcemap +- `source` - the filename of the file containing the original source +- `includeContent` - whether to include the original content in the map's `sourcesContent` array +- `hires` - whether the mapping should be high-resolution. Hi-res mappings map every single character, meaning (for example) your devtools will always be able to pinpoint the exact location of function calls and so on. With lo-res mappings, devtools may only be able to identify the correct line - but they're quicker to generate and less bulky. You can also set `"boundary"` to generate a semi-hi-res mappings segmented per word boundary instead of per character, suitable for string semantics that are separated by words. If sourcemap locations have been specified with `s.addSourcemapLocation()`, they will be used here. + +The returned sourcemap has two (non-enumerable) methods attached for convenience: + +- `toString` - returns the equivalent of `JSON.stringify(map)` +- `toUrl` - returns a DataURI containing the sourcemap. Useful for doing this sort of thing: + +```js +code += '\n//# sourceMappingURL=' + map.toUrl(); +``` + +### s.hasChanged() + +Indicates if the string has been changed. + +### s.indent( prefix[, options] ) + +Prefixes each line of the string with `prefix`. If `prefix` is not supplied, the indentation will be guessed from the original content, falling back to a single tab character. Returns `this`. + +The `options` argument can have an `exclude` property, which is an array of `[start, end]` character ranges. These ranges will be excluded from the indentation - useful for (e.g.) multiline strings. + +### s.insertLeft( index, content ) + +**DEPRECATED** since 0.17 – use `s.appendLeft(...)` instead + +### s.insertRight( index, content ) + +**DEPRECATED** since 0.17 – use `s.prependRight(...)` instead + +### s.isEmpty() + +Returns true if the resulting source is empty (disregarding white space). + +### s.locate( index ) + +**DEPRECATED** since 0.10 – see [#30](https://github.com/Rich-Harris/magic-string/pull/30) + +### s.locateOrigin( index ) + +**DEPRECATED** since 0.10 – see [#30](https://github.com/Rich-Harris/magic-string/pull/30) + +### s.move( start, end, index ) + +Moves the characters from `start` and `end` to `index`. Returns `this`. + +### s.overwrite( start, end, content[, options] ) + +Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in that range. The same restrictions as `s.remove()` apply. Returns `this`. + +The fourth argument is optional. It can have a `storeName` property — if `true`, the original name will be stored for later inclusion in a sourcemap's `names` array — and a `contentOnly` property which determines whether only the content is overwritten, or anything that was appended/prepended to the range as well. + +It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content. + +### s.prepend( content ) + +Prepends the string with the specified content. Returns `this`. + +### s.prependLeft ( index, content ) + +Same as `s.appendLeft(...)`, except that the inserted content will go _before_ any previous appends or prepends at `index` + +### s.prependRight ( index, content ) + +Same as `s.appendRight(...)`, except that the inserted content will go _before_ any previous appends or prepends at `index` + +### s.replace( regexpOrString, substitution ) + +String replacement with RegExp or string. When using a RegExp, replacer function is also supported. Returns `this`. + +```ts +import MagicString from 'magic-string'; + +const s = new MagicString(source); + +s.replace('foo', 'bar'); +s.replace(/foo/g, 'bar'); +s.replace(/(\w)(\d+)/g, (_, $1, $2) => $1.toUpperCase() + $2); +``` + +The differences from [`String.replace`](<(https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)>): + +- It will always match against the **original string** +- It mutates the magic string state (use `.clone()` to be immutable) + +### s.replaceAll( regexpOrString, substitution ) + +Same as `s.replace`, but replace all matched strings instead of just one. +If `regexpOrString` is a regex, then it must have the global (`g`) flag set, or a `TypeError` is thrown. Matches the behavior of the builtin [`String.property.replaceAll`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll). Returns `this`. + +### s.remove( start, end ) + +Removes the characters from `start` to `end` (of the original string, **not** the generated string). Removing the same content twice, or making removals that partially overlap, will cause an error. Returns `this`. + +### s.reset( start, end ) + +Resets the characters from `start` to `end` (of the original string, **not** the generated string). +It can be used to restore previously removed characters and discard unwanted changes. + +### s.slice( start, end ) + +Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string. Throws error if the indices are for characters that were already removed. + +### s.snip( start, end ) + +Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed. + +### s.toString() + +Returns the generated string. + +### s.trim([ charType ]) + +Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end. Returns `this`. + +### s.trimStart([ charType ]) + +Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start. Returns `this`. + +### s.trimEnd([ charType ]) + +Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end. Returns `this`. + +### s.trimLines() + +Removes empty lines from the start and end. Returns `this`. + +### s.update( start, end, content[, options] ) + +Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply. Returns `this`. + +The fourth argument is optional. It can have a `storeName` property — if `true`, the original name will be stored for later inclusion in a sourcemap's `names` array — and an `overwrite` property which defaults to `false` and determines whether anything that was appended/prepended to the range will be overwritten along with the original content. + +`s.update(start, end, content)` is equivalent to `s.overwrite(start, end, content, { contentOnly: true })`. + +## Bundling + +To concatenate several sources, use `MagicString.Bundle`: + +```js +const bundle = new MagicString.Bundle(); + +bundle.addSource({ + filename: 'foo.js', + content: new MagicString('var answer = 42;'), +}); + +bundle.addSource({ + filename: 'bar.js', + content: new MagicString('console.log( answer )'), +}); + +// Sources can be marked as ignore-listed, which provides a hint to debuggers +// to not step into this code and also don't show the source files depending +// on user preferences. +bundle.addSource({ + filename: 'some-3rdparty-library.js', + content: new MagicString('function myLib(){}'), + ignoreList: false, // <-- +}); + +// Advanced: a source can include an `indentExclusionRanges` property +// alongside `filename` and `content`. This will be passed to `s.indent()` +// - see documentation above + +bundle + .indent() // optionally, pass an indent string, otherwise it will be guessed + .prepend('(function () {\n') + .append('}());'); + +bundle.toString(); +// (function () { +// var answer = 42; +// console.log( answer ); +// }()); + +// options are as per `s.generateMap()` above +const map = bundle.generateMap({ + file: 'bundle.js', + includeContent: true, + hires: true, +}); +``` + +As an alternative syntax, if you a) don't have `filename` or `indentExclusionRanges` options, or b) passed those in when you used `new MagicString(...)`, you can simply pass the `MagicString` instance itself: + +```js +const bundle = new MagicString.Bundle(); +const source = new MagicString(someCode, { + filename: 'foo.js', +}); + +bundle.addSource(source); +``` + +## License + +MIT diff --git a/vuetest/node_modules/magic-string/dist/magic-string.cjs.d.ts b/vuetest/node_modules/magic-string/dist/magic-string.cjs.d.ts new file mode 100644 index 0000000..76cc537 --- /dev/null +++ b/vuetest/node_modules/magic-string/dist/magic-string.cjs.d.ts @@ -0,0 +1,289 @@ +export interface BundleOptions { + intro?: string; + separator?: string; +} + +export interface SourceMapOptions { + /** + * Whether the mapping should be high-resolution. + * Hi-res mappings map every single character, meaning (for example) your devtools will always + * be able to pinpoint the exact location of function calls and so on. + * With lo-res mappings, devtools may only be able to identify the correct + * line - but they're quicker to generate and less bulky. + * You can also set `"boundary"` to generate a semi-hi-res mappings segmented per word boundary + * instead of per character, suitable for string semantics that are separated by words. + * If sourcemap locations have been specified with s.addSourceMapLocation(), they will be used here. + */ + hires?: boolean | 'boundary'; + /** + * The filename where you plan to write the sourcemap. + */ + file?: string; + /** + * The filename of the file containing the original source. + */ + source?: string; + /** + * Whether to include the original content in the map's sourcesContent array. + */ + includeContent?: boolean; +} + +export type SourceMapSegment = + | [number] + | [number, number, number, number] + | [number, number, number, number, number]; + +export interface DecodedSourceMap { + file: string; + sources: string[]; + sourcesContent?: string[]; + names: string[]; + mappings: SourceMapSegment[][]; + x_google_ignoreList?: number[]; +} + +export class SourceMap { + constructor(properties: DecodedSourceMap); + + version: number; + file: string; + sources: string[]; + sourcesContent?: string[]; + names: string[]; + mappings: string; + x_google_ignoreList?: number[]; + debugId?: string; + + /** + * Returns the equivalent of `JSON.stringify(map)` + */ + toString(): string; + /** + * Returns a DataURI containing the sourcemap. Useful for doing this sort of thing: + * `generateMap(options?: SourceMapOptions): SourceMap;` + */ + toUrl(): string; +} + +export class Bundle { + constructor(options?: BundleOptions); + /** + * Adds the specified source to the bundle, which can either be a `MagicString` object directly, + * or an options object that holds a magic string `content` property and optionally provides + * a `filename` for the source within the bundle, as well as an optional `ignoreList` hint + * (which defaults to `false`). The `filename` is used when constructing the source map for the + * bundle, to identify this `source` in the source map's `sources` field. The `ignoreList` hint + * is used to populate the `x_google_ignoreList` extension field in the source map, which is a + * mechanism for tools to signal to debuggers that certain sources should be ignored by default + * (depending on user preferences). + */ + addSource( + source: MagicString | { filename?: string; content: MagicString; ignoreList?: boolean }, + ): this; + append(str: string, options?: BundleOptions): this; + clone(): this; + generateMap( + options?: SourceMapOptions, + ): Omit<SourceMap, 'sourcesContent'> & { sourcesContent: Array<string | null> }; + generateDecodedMap( + options?: SourceMapOptions, + ): Omit<DecodedSourceMap, 'sourcesContent'> & { sourcesContent: Array<string | null> }; + getIndentString(): string; + indent(indentStr?: string): this; + indentExclusionRanges: ExclusionRange | Array<ExclusionRange>; + prepend(str: string): this; + toString(): string; + trimLines(): this; + trim(charType?: string): this; + trimStart(charType?: string): this; + trimEnd(charType?: string): this; + isEmpty(): boolean; + length(): number; +} + +export type ExclusionRange = [number, number]; + +export interface MagicStringOptions { + filename?: string; + indentExclusionRanges?: ExclusionRange | Array<ExclusionRange>; + offset?: number; +} + +export interface IndentOptions { + exclude?: ExclusionRange | Array<ExclusionRange>; + indentStart?: boolean; +} + +export interface OverwriteOptions { + storeName?: boolean; + contentOnly?: boolean; +} + +export interface UpdateOptions { + storeName?: boolean; + overwrite?: boolean; +} + +export default class MagicString { + constructor(str: string, options?: MagicStringOptions); + /** + * Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false. + */ + addSourcemapLocation(char: number): void; + /** + * Appends the specified content to the end of the string. + */ + append(content: string): this; + /** + * Appends the specified content at the index in the original string. + * If a range *ending* with index is subsequently moved, the insert will be moved with it. + * See also `s.prependLeft(...)`. + */ + appendLeft(index: number, content: string): this; + /** + * Appends the specified content at the index in the original string. + * If a range *starting* with index is subsequently moved, the insert will be moved with it. + * See also `s.prependRight(...)`. + */ + appendRight(index: number, content: string): this; + /** + * Does what you'd expect. + */ + clone(): this; + /** + * Generates a version 3 sourcemap. + */ + generateMap(options?: SourceMapOptions): SourceMap; + /** + * Generates a sourcemap object with raw mappings in array form, rather than encoded as a string. + * Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead. + */ + generateDecodedMap(options?: SourceMapOptions): DecodedSourceMap; + getIndentString(): string; + + /** + * Prefixes each line of the string with prefix. + * If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character. + */ + indent(options?: IndentOptions): this; + /** + * Prefixes each line of the string with prefix. + * If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character. + * + * The options argument can have an exclude property, which is an array of [start, end] character ranges. + * These ranges will be excluded from the indentation - useful for (e.g.) multiline strings. + */ + indent(indentStr?: string, options?: IndentOptions): this; + indentExclusionRanges: ExclusionRange | Array<ExclusionRange>; + + /** + * Moves the characters from `start` and `end` to `index`. + */ + move(start: number, end: number, index: number): this; + /** + * Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in + * that range. The same restrictions as `s.remove()` apply. + * + * The fourth argument is optional. It can have a storeName property — if true, the original name will be stored + * for later inclusion in a sourcemap's names array — and a contentOnly property which determines whether only + * the content is overwritten, or anything that was appended/prepended to the range as well. + * + * It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content. + */ + overwrite( + start: number, + end: number, + content: string, + options?: boolean | OverwriteOptions, + ): this; + /** + * Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply. + * + * The fourth argument is optional. It can have a storeName property — if true, the original name will be stored + * for later inclusion in a sourcemap's names array — and an overwrite property which determines whether only + * the content is overwritten, or anything that was appended/prepended to the range as well. + */ + update(start: number, end: number, content: string, options?: boolean | UpdateOptions): this; + /** + * Prepends the string with the specified content. + */ + prepend(content: string): this; + /** + * Same as `s.appendLeft(...)`, except that the inserted content will go *before* any previous appends or prepends at index + */ + prependLeft(index: number, content: string): this; + /** + * Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index` + */ + prependRight(index: number, content: string): this; + /** + * Removes the characters from `start` to `end` (of the original string, **not** the generated string). + * Removing the same content twice, or making removals that partially overlap, will cause an error. + */ + remove(start: number, end: number): this; + /** + * Reset the modified characters from `start` to `end` (of the original string, **not** the generated string). + */ + reset(start: number, end: number): this; + /** + * Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string. + * Throws error if the indices are for characters that were already removed. + */ + slice(start: number, end: number): string; + /** + * Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed. + */ + snip(start: number, end: number): this; + /** + * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end. + */ + trim(charType?: string): this; + /** + * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start. + */ + trimStart(charType?: string): this; + /** + * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end. + */ + trimEnd(charType?: string): this; + /** + * Removes empty lines from the start and end. + */ + trimLines(): this; + /** + * String replacement with RegExp or string. + */ + replace( + regex: RegExp | string, + replacement: string | ((substring: string, ...args: any[]) => string), + ): this; + /** + * Same as `s.replace`, but replace all matched strings instead of just one. + */ + replaceAll( + regex: RegExp | string, + replacement: string | ((substring: string, ...args: any[]) => string), + ): this; + + lastChar(): string; + lastLine(): string; + /** + * Returns true if the resulting source is empty (disregarding white space). + */ + isEmpty(): boolean; + length(): number; + + /** + * Indicates if the string has been changed. + */ + hasChanged(): boolean; + + original: string; + /** + * Returns the generated string. + */ + toString(): string; + + offset: number; +} diff --git a/vuetest/node_modules/magic-string/dist/magic-string.cjs.js b/vuetest/node_modules/magic-string/dist/magic-string.cjs.js new file mode 100644 index 0000000..c7453eb --- /dev/null +++ b/vuetest/node_modules/magic-string/dist/magic-string.cjs.js @@ -0,0 +1,1575 @@ +'use strict'; + +var sourcemapCodec = require('@jridgewell/sourcemap-codec'); + +class BitSet { + constructor(arg) { + this.bits = arg instanceof BitSet ? arg.bits.slice() : []; + } + + add(n) { + this.bits[n >> 5] |= 1 << (n & 31); + } + + has(n) { + return !!(this.bits[n >> 5] & (1 << (n & 31))); + } +} + +class Chunk { + constructor(start, end, content) { + this.start = start; + this.end = end; + this.original = content; + + this.intro = ''; + this.outro = ''; + + this.content = content; + this.storeName = false; + this.edited = false; + + { + this.previous = null; + this.next = null; + } + } + + appendLeft(content) { + this.outro += content; + } + + appendRight(content) { + this.intro = this.intro + content; + } + + clone() { + const chunk = new Chunk(this.start, this.end, this.original); + + chunk.intro = this.intro; + chunk.outro = this.outro; + chunk.content = this.content; + chunk.storeName = this.storeName; + chunk.edited = this.edited; + + return chunk; + } + + contains(index) { + return this.start < index && index < this.end; + } + + eachNext(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.next; + } + } + + eachPrevious(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.previous; + } + } + + edit(content, storeName, contentOnly) { + this.content = content; + if (!contentOnly) { + this.intro = ''; + this.outro = ''; + } + this.storeName = storeName; + + this.edited = true; + + return this; + } + + prependLeft(content) { + this.outro = content + this.outro; + } + + prependRight(content) { + this.intro = content + this.intro; + } + + reset() { + this.intro = ''; + this.outro = ''; + if (this.edited) { + this.content = this.original; + this.storeName = false; + this.edited = false; + } + } + + split(index) { + const sliceIndex = index - this.start; + + const originalBefore = this.original.slice(0, sliceIndex); + const originalAfter = this.original.slice(sliceIndex); + + this.original = originalBefore; + + const newChunk = new Chunk(index, this.end, originalAfter); + newChunk.outro = this.outro; + this.outro = ''; + + this.end = index; + + if (this.edited) { + // after split we should save the edit content record into the correct chunk + // to make sure sourcemap correct + // For example: + // ' test'.trim() + // split -> ' ' + 'test' + // ✔️ edit -> '' + 'test' + // ✖️ edit -> 'test' + '' + // TODO is this block necessary?... + newChunk.edit('', false); + this.content = ''; + } else { + this.content = originalBefore; + } + + newChunk.next = this.next; + if (newChunk.next) newChunk.next.previous = newChunk; + newChunk.previous = this; + this.next = newChunk; + + return newChunk; + } + + toString() { + return this.intro + this.content + this.outro; + } + + trimEnd(rx) { + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + this.split(this.start + trimmed.length).edit('', undefined, true); + if (this.edited) { + // save the change, if it has been edited + this.edit(trimmed, this.storeName, true); + } + } + return true; + } else { + this.edit('', undefined, true); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + } + } + + trimStart(rx) { + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + const newChunk = this.split(this.end - trimmed.length); + if (this.edited) { + // save the change, if it has been edited + newChunk.edit(trimmed, this.storeName, true); + } + this.edit('', undefined, true); + } + return true; + } else { + this.edit('', undefined, true); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + } + } +} + +function getBtoa() { + if (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') { + return (str) => globalThis.btoa(unescape(encodeURIComponent(str))); + } else if (typeof Buffer === 'function') { + return (str) => Buffer.from(str, 'utf-8').toString('base64'); + } else { + return () => { + throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.'); + }; + } +} + +const btoa = /*#__PURE__*/ getBtoa(); + +class SourceMap { + constructor(properties) { + this.version = 3; + this.file = properties.file; + this.sources = properties.sources; + this.sourcesContent = properties.sourcesContent; + this.names = properties.names; + this.mappings = sourcemapCodec.encode(properties.mappings); + if (typeof properties.x_google_ignoreList !== 'undefined') { + this.x_google_ignoreList = properties.x_google_ignoreList; + } + if (typeof properties.debugId !== 'undefined') { + this.debugId = properties.debugId; + } + } + + toString() { + return JSON.stringify(this); + } + + toUrl() { + return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString()); + } +} + +function guessIndent(code) { + const lines = code.split('\n'); + + const tabbed = lines.filter((line) => /^\t+/.test(line)); + const spaced = lines.filter((line) => /^ {2,}/.test(line)); + + if (tabbed.length === 0 && spaced.length === 0) { + return null; + } + + // More lines tabbed than spaced? Assume tabs, and + // default to tabs in the case of a tie (or nothing + // to go on) + if (tabbed.length >= spaced.length) { + return '\t'; + } + + // Otherwise, we need to guess the multiple + const min = spaced.reduce((previous, current) => { + const numSpaces = /^ +/.exec(current)[0].length; + return Math.min(numSpaces, previous); + }, Infinity); + + return new Array(min + 1).join(' '); +} + +function getRelativePath(from, to) { + const fromParts = from.split(/[/\\]/); + const toParts = to.split(/[/\\]/); + + fromParts.pop(); // get dirname + + while (fromParts[0] === toParts[0]) { + fromParts.shift(); + toParts.shift(); + } + + if (fromParts.length) { + let i = fromParts.length; + while (i--) fromParts[i] = '..'; + } + + return fromParts.concat(toParts).join('/'); +} + +const toString = Object.prototype.toString; + +function isObject(thing) { + return toString.call(thing) === '[object Object]'; +} + +function getLocator(source) { + const originalLines = source.split('\n'); + const lineOffsets = []; + + for (let i = 0, pos = 0; i < originalLines.length; i++) { + lineOffsets.push(pos); + pos += originalLines[i].length + 1; + } + + return function locate(index) { + let i = 0; + let j = lineOffsets.length; + while (i < j) { + const m = (i + j) >> 1; + if (index < lineOffsets[m]) { + j = m; + } else { + i = m + 1; + } + } + const line = i - 1; + const column = index - lineOffsets[line]; + return { line, column }; + }; +} + +const wordRegex = /\w/; + +class Mappings { + constructor(hires) { + this.hires = hires; + this.generatedCodeLine = 0; + this.generatedCodeColumn = 0; + this.raw = []; + this.rawSegments = this.raw[this.generatedCodeLine] = []; + this.pending = null; + } + + addEdit(sourceIndex, content, loc, nameIndex) { + if (content.length) { + const contentLengthMinusOne = content.length - 1; + let contentLineEnd = content.indexOf('\n', 0); + let previousContentLineEnd = -1; + // Loop through each line in the content and add a segment, but stop if the last line is empty, + // else code afterwards would fill one line too many + while (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); + + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; + + previousContentLineEnd = contentLineEnd; + contentLineEnd = content.indexOf('\n', contentLineEnd + 1); + } + + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); + + this.advance(content.slice(previousContentLineEnd + 1)); + } else if (this.pending) { + this.rawSegments.push(this.pending); + this.advance(content); + } + + this.pending = null; + } + + addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) { + let originalCharIndex = chunk.start; + let first = true; + // when iterating each char, check if it's in a word boundary + let charInHiresBoundary = false; + + while (originalCharIndex < chunk.end) { + if (original[originalCharIndex] === '\n') { + loc.line += 1; + loc.column = 0; + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; + first = true; + charInHiresBoundary = false; + } else { + if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + + if (this.hires === 'boundary') { + // in hires "boundary", group segments per word boundary than per char + if (wordRegex.test(original[originalCharIndex])) { + // for first char in the boundary found, start the boundary by pushing a segment + if (!charInHiresBoundary) { + this.rawSegments.push(segment); + charInHiresBoundary = true; + } + } else { + // for non-word char, end the boundary by pushing a segment + this.rawSegments.push(segment); + charInHiresBoundary = false; + } + } else { + this.rawSegments.push(segment); + } + } + + loc.column += 1; + this.generatedCodeColumn += 1; + first = false; + } + + originalCharIndex += 1; + } + + this.pending = null; + } + + advance(str) { + if (!str) return; + + const lines = str.split('\n'); + + if (lines.length > 1) { + for (let i = 0; i < lines.length - 1; i++) { + this.generatedCodeLine++; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + } + this.generatedCodeColumn = 0; + } + + this.generatedCodeColumn += lines[lines.length - 1].length; + } +} + +const n = '\n'; + +const warned = { + insertLeft: false, + insertRight: false, + storeName: false, +}; + +class MagicString { + constructor(string, options = {}) { + const chunk = new Chunk(0, string.length, string); + + Object.defineProperties(this, { + original: { writable: true, value: string }, + outro: { writable: true, value: '' }, + intro: { writable: true, value: '' }, + firstChunk: { writable: true, value: chunk }, + lastChunk: { writable: true, value: chunk }, + lastSearchedChunk: { writable: true, value: chunk }, + byStart: { writable: true, value: {} }, + byEnd: { writable: true, value: {} }, + filename: { writable: true, value: options.filename }, + indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, + sourcemapLocations: { writable: true, value: new BitSet() }, + storedNames: { writable: true, value: {} }, + indentStr: { writable: true, value: undefined }, + ignoreList: { writable: true, value: options.ignoreList }, + offset: { writable: true, value: options.offset || 0 }, + }); + + this.byStart[0] = chunk; + this.byEnd[string.length] = chunk; + } + + addSourcemapLocation(char) { + this.sourcemapLocations.add(char); + } + + append(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); + + this.outro += content; + return this; + } + + appendLeft(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byEnd[index]; + + if (chunk) { + chunk.appendLeft(content); + } else { + this.intro += content; + } + return this; + } + + appendRight(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byStart[index]; + + if (chunk) { + chunk.appendRight(content); + } else { + this.outro += content; + } + return this; + } + + clone() { + const cloned = new MagicString(this.original, { filename: this.filename, offset: this.offset }); + + let originalChunk = this.firstChunk; + let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone()); + + while (originalChunk) { + cloned.byStart[clonedChunk.start] = clonedChunk; + cloned.byEnd[clonedChunk.end] = clonedChunk; + + const nextOriginalChunk = originalChunk.next; + const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); + + if (nextClonedChunk) { + clonedChunk.next = nextClonedChunk; + nextClonedChunk.previous = clonedChunk; + + clonedChunk = nextClonedChunk; + } + + originalChunk = nextOriginalChunk; + } + + cloned.lastChunk = clonedChunk; + + if (this.indentExclusionRanges) { + cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); + } + + cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); + + cloned.intro = this.intro; + cloned.outro = this.outro; + + return cloned; + } + + generateDecodedMap(options) { + options = options || {}; + + const sourceIndex = 0; + const names = Object.keys(this.storedNames); + const mappings = new Mappings(options.hires); + + const locate = getLocator(this.original); + + if (this.intro) { + mappings.advance(this.intro); + } + + this.firstChunk.eachNext((chunk) => { + const loc = locate(chunk.start); + + if (chunk.intro.length) mappings.advance(chunk.intro); + + if (chunk.edited) { + mappings.addEdit( + sourceIndex, + chunk.content, + loc, + chunk.storeName ? names.indexOf(chunk.original) : -1, + ); + } else { + mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations); + } + + if (chunk.outro.length) mappings.advance(chunk.outro); + }); + + return { + file: options.file ? options.file.split(/[/\\]/).pop() : undefined, + sources: [ + options.source ? getRelativePath(options.file || '', options.source) : options.file || '', + ], + sourcesContent: options.includeContent ? [this.original] : undefined, + names, + mappings: mappings.raw, + x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined, + }; + } + + generateMap(options) { + return new SourceMap(this.generateDecodedMap(options)); + } + + _ensureindentStr() { + if (this.indentStr === undefined) { + this.indentStr = guessIndent(this.original); + } + } + + _getRawIndentString() { + this._ensureindentStr(); + return this.indentStr; + } + + getIndentString() { + this._ensureindentStr(); + return this.indentStr === null ? '\t' : this.indentStr; + } + + indent(indentStr, options) { + const pattern = /^[^\r\n]/gm; + + if (isObject(indentStr)) { + options = indentStr; + indentStr = undefined; + } + + if (indentStr === undefined) { + this._ensureindentStr(); + indentStr = this.indentStr || '\t'; + } + + if (indentStr === '') return this; // noop + + options = options || {}; + + // Process exclusion ranges + const isExcluded = {}; + + if (options.exclude) { + const exclusions = + typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude; + exclusions.forEach((exclusion) => { + for (let i = exclusion[0]; i < exclusion[1]; i += 1) { + isExcluded[i] = true; + } + }); + } + + let shouldIndentNextCharacter = options.indentStart !== false; + const replacer = (match) => { + if (shouldIndentNextCharacter) return `${indentStr}${match}`; + shouldIndentNextCharacter = true; + return match; + }; + + this.intro = this.intro.replace(pattern, replacer); + + let charIndex = 0; + let chunk = this.firstChunk; + + while (chunk) { + const end = chunk.end; + + if (chunk.edited) { + if (!isExcluded[charIndex]) { + chunk.content = chunk.content.replace(pattern, replacer); + + if (chunk.content.length) { + shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n'; + } + } + } else { + charIndex = chunk.start; + + while (charIndex < end) { + if (!isExcluded[charIndex]) { + const char = this.original[charIndex]; + + if (char === '\n') { + shouldIndentNextCharacter = true; + } else if (char !== '\r' && shouldIndentNextCharacter) { + shouldIndentNextCharacter = false; + + if (charIndex === chunk.start) { + chunk.prependRight(indentStr); + } else { + this._splitChunk(chunk, charIndex); + chunk = chunk.next; + chunk.prependRight(indentStr); + } + } + } + + charIndex += 1; + } + } + + charIndex = chunk.end; + chunk = chunk.next; + } + + this.outro = this.outro.replace(pattern, replacer); + + return this; + } + + insert() { + throw new Error( + 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)', + ); + } + + insertLeft(index, content) { + if (!warned.insertLeft) { + console.warn( + 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead', + ); + warned.insertLeft = true; + } + + return this.appendLeft(index, content); + } + + insertRight(index, content) { + if (!warned.insertRight) { + console.warn( + 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead', + ); + warned.insertRight = true; + } + + return this.prependRight(index, content); + } + + move(start, end, index) { + start = start + this.offset; + end = end + this.offset; + index = index + this.offset; + + if (index >= start && index <= end) throw new Error('Cannot move a selection inside itself'); + + this._split(start); + this._split(end); + this._split(index); + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + const oldLeft = first.previous; + const oldRight = last.next; + + const newRight = this.byStart[index]; + if (!newRight && last === this.lastChunk) return this; + const newLeft = newRight ? newRight.previous : this.lastChunk; + + if (oldLeft) oldLeft.next = oldRight; + if (oldRight) oldRight.previous = oldLeft; + + if (newLeft) newLeft.next = first; + if (newRight) newRight.previous = last; + + if (!first.previous) this.firstChunk = last.next; + if (!last.next) { + this.lastChunk = first.previous; + this.lastChunk.next = null; + } + + first.previous = newLeft; + last.next = newRight || null; + + if (!newLeft) this.firstChunk = first; + if (!newRight) this.lastChunk = last; + return this; + } + + overwrite(start, end, content, options) { + options = options || {}; + return this.update(start, end, content, { ...options, overwrite: !options.contentOnly }); + } + + update(start, end, content, options) { + start = start + this.offset; + end = end + this.offset; + + if (typeof content !== 'string') throw new TypeError('replacement content must be a string'); + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + if (end > this.original.length) throw new Error('end is out of bounds'); + if (start === end) + throw new Error( + 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead', + ); + + this._split(start); + this._split(end); + + if (options === true) { + if (!warned.storeName) { + console.warn( + 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string', + ); + warned.storeName = true; + } + + options = { storeName: true }; + } + const storeName = options !== undefined ? options.storeName : false; + const overwrite = options !== undefined ? options.overwrite : false; + + if (storeName) { + const original = this.original.slice(start, end); + Object.defineProperty(this.storedNames, original, { + writable: true, + value: true, + enumerable: true, + }); + } + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + if (first) { + let chunk = first; + while (chunk !== last) { + if (chunk.next !== this.byStart[chunk.end]) { + throw new Error('Cannot overwrite across a split point'); + } + chunk = chunk.next; + chunk.edit('', false); + } + + first.edit(content, storeName, !overwrite); + } else { + // must be inserting at the end + const newChunk = new Chunk(start, end, '').edit(content, storeName); + + // TODO last chunk in the array may not be the last chunk, if it's moved... + last.next = newChunk; + newChunk.previous = last; + } + return this; + } + + prepend(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); + + this.intro = content + this.intro; + return this; + } + + prependLeft(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byEnd[index]; + + if (chunk) { + chunk.prependLeft(content); + } else { + this.intro = content + this.intro; + } + return this; + } + + prependRight(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byStart[index]; + + if (chunk) { + chunk.prependRight(content); + } else { + this.outro = content + this.outro; + } + return this; + } + + remove(start, end) { + start = start + this.offset; + end = end + this.offset; + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + if (start === end) return this; + + if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); + if (start > end) throw new Error('end must be greater than start'); + + this._split(start); + this._split(end); + + let chunk = this.byStart[start]; + + while (chunk) { + chunk.intro = ''; + chunk.outro = ''; + chunk.edit(''); + + chunk = end > chunk.end ? this.byStart[chunk.end] : null; + } + return this; + } + + reset(start, end) { + start = start + this.offset; + end = end + this.offset; + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + if (start === end) return this; + + if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); + if (start > end) throw new Error('end must be greater than start'); + + this._split(start); + this._split(end); + + let chunk = this.byStart[start]; + + while (chunk) { + chunk.reset(); + + chunk = end > chunk.end ? this.byStart[chunk.end] : null; + } + return this; + } + + lastChar() { + if (this.outro.length) return this.outro[this.outro.length - 1]; + let chunk = this.lastChunk; + do { + if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1]; + if (chunk.content.length) return chunk.content[chunk.content.length - 1]; + if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1]; + } while ((chunk = chunk.previous)); + if (this.intro.length) return this.intro[this.intro.length - 1]; + return ''; + } + + lastLine() { + let lineIndex = this.outro.lastIndexOf(n); + if (lineIndex !== -1) return this.outro.substr(lineIndex + 1); + let lineStr = this.outro; + let chunk = this.lastChunk; + do { + if (chunk.outro.length > 0) { + lineIndex = chunk.outro.lastIndexOf(n); + if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.outro + lineStr; + } + + if (chunk.content.length > 0) { + lineIndex = chunk.content.lastIndexOf(n); + if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr; + lineStr = chunk.content + lineStr; + } + + if (chunk.intro.length > 0) { + lineIndex = chunk.intro.lastIndexOf(n); + if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.intro + lineStr; + } + } while ((chunk = chunk.previous)); + lineIndex = this.intro.lastIndexOf(n); + if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr; + return this.intro + lineStr; + } + + slice(start = 0, end = this.original.length - this.offset) { + start = start + this.offset; + end = end + this.offset; + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + let result = ''; + + // find start chunk + let chunk = this.firstChunk; + while (chunk && (chunk.start > start || chunk.end <= start)) { + // found end chunk before start + if (chunk.start < end && chunk.end >= end) { + return result; + } + + chunk = chunk.next; + } + + if (chunk && chunk.edited && chunk.start !== start) + throw new Error(`Cannot use replaced character ${start} as slice start anchor.`); + + const startChunk = chunk; + while (chunk) { + if (chunk.intro && (startChunk !== chunk || chunk.start === start)) { + result += chunk.intro; + } + + const containsEnd = chunk.start < end && chunk.end >= end; + if (containsEnd && chunk.edited && chunk.end !== end) + throw new Error(`Cannot use replaced character ${end} as slice end anchor.`); + + const sliceStart = startChunk === chunk ? start - chunk.start : 0; + const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; + + result += chunk.content.slice(sliceStart, sliceEnd); + + if (chunk.outro && (!containsEnd || chunk.end === end)) { + result += chunk.outro; + } + + if (containsEnd) { + break; + } + + chunk = chunk.next; + } + + return result; + } + + // TODO deprecate this? not really very useful + snip(start, end) { + const clone = this.clone(); + clone.remove(0, start); + clone.remove(end, clone.original.length); + + return clone; + } + + _split(index) { + if (this.byStart[index] || this.byEnd[index]) return; + + let chunk = this.lastSearchedChunk; + const searchForward = index > chunk.end; + + while (chunk) { + if (chunk.contains(index)) return this._splitChunk(chunk, index); + + chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; + } + } + + _splitChunk(chunk, index) { + if (chunk.edited && chunk.content.length) { + // zero-length edited chunks are a special case (overlapping replacements) + const loc = getLocator(this.original)(index); + throw new Error( + `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`, + ); + } + + const newChunk = chunk.split(index); + + this.byEnd[index] = chunk; + this.byStart[index] = newChunk; + this.byEnd[newChunk.end] = newChunk; + + if (chunk === this.lastChunk) this.lastChunk = newChunk; + + this.lastSearchedChunk = chunk; + return true; + } + + toString() { + let str = this.intro; + + let chunk = this.firstChunk; + while (chunk) { + str += chunk.toString(); + chunk = chunk.next; + } + + return str + this.outro; + } + + isEmpty() { + let chunk = this.firstChunk; + do { + if ( + (chunk.intro.length && chunk.intro.trim()) || + (chunk.content.length && chunk.content.trim()) || + (chunk.outro.length && chunk.outro.trim()) + ) + return false; + } while ((chunk = chunk.next)); + return true; + } + + length() { + let chunk = this.firstChunk; + let length = 0; + do { + length += chunk.intro.length + chunk.content.length + chunk.outro.length; + } while ((chunk = chunk.next)); + return length; + } + + trimLines() { + return this.trim('[\\r\\n]'); + } + + trim(charType) { + return this.trimStart(charType).trimEnd(charType); + } + + trimEndAborted(charType) { + const rx = new RegExp((charType || '\\s') + '+$'); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + + let chunk = this.lastChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimEnd(rx); + + // if chunk was trimmed, we have a new lastChunk + if (chunk.end !== end) { + if (this.lastChunk === chunk) { + this.lastChunk = chunk.next; + } + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.previous; + } while (chunk); + + return false; + } + + trimEnd(charType) { + this.trimEndAborted(charType); + return this; + } + trimStartAborted(charType) { + const rx = new RegExp('^' + (charType || '\\s') + '+'); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + let chunk = this.firstChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimStart(rx); + + if (chunk.end !== end) { + // special case... + if (chunk === this.lastChunk) this.lastChunk = chunk.next; + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.next; + } while (chunk); + + return false; + } + + trimStart(charType) { + this.trimStartAborted(charType); + return this; + } + + hasChanged() { + return this.original !== this.toString(); + } + + _replaceRegexp(searchValue, replacement) { + function getReplacement(match, str) { + if (typeof replacement === 'string') { + return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => { + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter + if (i === '$') return '$'; + if (i === '&') return match[0]; + const num = +i; + if (num < match.length) return match[+i]; + return `$${i}`; + }); + } else { + return replacement(...match, match.index, str, match.groups); + } + } + function matchAll(re, str) { + let match; + const matches = []; + while ((match = re.exec(str))) { + matches.push(match); + } + return matches; + } + if (searchValue.global) { + const matches = matchAll(searchValue, this.original); + matches.forEach((match) => { + if (match.index != null) { + const replacement = getReplacement(match, this.original); + if (replacement !== match[0]) { + this.overwrite(match.index, match.index + match[0].length, replacement); + } + } + }); + } else { + const match = this.original.match(searchValue); + if (match && match.index != null) { + const replacement = getReplacement(match, this.original); + if (replacement !== match[0]) { + this.overwrite(match.index, match.index + match[0].length, replacement); + } + } + } + return this; + } + + _replaceString(string, replacement) { + const { original } = this; + const index = original.indexOf(string); + + if (index !== -1) { + this.overwrite(index, index + string.length, replacement); + } + + return this; + } + + replace(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceString(searchValue, replacement); + } + + return this._replaceRegexp(searchValue, replacement); + } + + _replaceAllString(string, replacement) { + const { original } = this; + const stringLength = string.length; + for ( + let index = original.indexOf(string); + index !== -1; + index = original.indexOf(string, index + stringLength) + ) { + const previous = original.slice(index, index + stringLength); + if (previous !== replacement) this.overwrite(index, index + stringLength, replacement); + } + + return this; + } + + replaceAll(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceAllString(searchValue, replacement); + } + + if (!searchValue.global) { + throw new TypeError( + 'MagicString.prototype.replaceAll called with a non-global RegExp argument', + ); + } + + return this._replaceRegexp(searchValue, replacement); + } +} + +const hasOwnProp = Object.prototype.hasOwnProperty; + +class Bundle { + constructor(options = {}) { + this.intro = options.intro || ''; + this.separator = options.separator !== undefined ? options.separator : '\n'; + this.sources = []; + this.uniqueSources = []; + this.uniqueSourceIndexByFilename = {}; + } + + addSource(source) { + if (source instanceof MagicString) { + return this.addSource({ + content: source, + filename: source.filename, + separator: this.separator, + }); + } + + if (!isObject(source) || !source.content) { + throw new Error( + 'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`', + ); + } + + ['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => { + if (!hasOwnProp.call(source, option)) source[option] = source.content[option]; + }); + + if (source.separator === undefined) { + // TODO there's a bunch of this sort of thing, needs cleaning up + source.separator = this.separator; + } + + if (source.filename) { + if (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) { + this.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length; + this.uniqueSources.push({ filename: source.filename, content: source.content.original }); + } else { + const uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]]; + if (source.content.original !== uniqueSource.content) { + throw new Error(`Illegal source: same filename (${source.filename}), different contents`); + } + } + } + + this.sources.push(source); + return this; + } + + append(str, options) { + this.addSource({ + content: new MagicString(str), + separator: (options && options.separator) || '', + }); + + return this; + } + + clone() { + const bundle = new Bundle({ + intro: this.intro, + separator: this.separator, + }); + + this.sources.forEach((source) => { + bundle.addSource({ + filename: source.filename, + content: source.content.clone(), + separator: source.separator, + }); + }); + + return bundle; + } + + generateDecodedMap(options = {}) { + const names = []; + let x_google_ignoreList = undefined; + this.sources.forEach((source) => { + Object.keys(source.content.storedNames).forEach((name) => { + if (!~names.indexOf(name)) names.push(name); + }); + }); + + const mappings = new Mappings(options.hires); + + if (this.intro) { + mappings.advance(this.intro); + } + + this.sources.forEach((source, i) => { + if (i > 0) { + mappings.advance(this.separator); + } + + const sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1; + const magicString = source.content; + const locate = getLocator(magicString.original); + + if (magicString.intro) { + mappings.advance(magicString.intro); + } + + magicString.firstChunk.eachNext((chunk) => { + const loc = locate(chunk.start); + + if (chunk.intro.length) mappings.advance(chunk.intro); + + if (source.filename) { + if (chunk.edited) { + mappings.addEdit( + sourceIndex, + chunk.content, + loc, + chunk.storeName ? names.indexOf(chunk.original) : -1, + ); + } else { + mappings.addUneditedChunk( + sourceIndex, + chunk, + magicString.original, + loc, + magicString.sourcemapLocations, + ); + } + } else { + mappings.advance(chunk.content); + } + + if (chunk.outro.length) mappings.advance(chunk.outro); + }); + + if (magicString.outro) { + mappings.advance(magicString.outro); + } + + if (source.ignoreList && sourceIndex !== -1) { + if (x_google_ignoreList === undefined) { + x_google_ignoreList = []; + } + x_google_ignoreList.push(sourceIndex); + } + }); + + return { + file: options.file ? options.file.split(/[/\\]/).pop() : undefined, + sources: this.uniqueSources.map((source) => { + return options.file ? getRelativePath(options.file, source.filename) : source.filename; + }), + sourcesContent: this.uniqueSources.map((source) => { + return options.includeContent ? source.content : null; + }), + names, + mappings: mappings.raw, + x_google_ignoreList, + }; + } + + generateMap(options) { + return new SourceMap(this.generateDecodedMap(options)); + } + + getIndentString() { + const indentStringCounts = {}; + + this.sources.forEach((source) => { + const indentStr = source.content._getRawIndentString(); + + if (indentStr === null) return; + + if (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0; + indentStringCounts[indentStr] += 1; + }); + + return ( + Object.keys(indentStringCounts).sort((a, b) => { + return indentStringCounts[a] - indentStringCounts[b]; + })[0] || '\t' + ); + } + + indent(indentStr) { + if (!arguments.length) { + indentStr = this.getIndentString(); + } + + if (indentStr === '') return this; // noop + + let trailingNewline = !this.intro || this.intro.slice(-1) === '\n'; + + this.sources.forEach((source, i) => { + const separator = source.separator !== undefined ? source.separator : this.separator; + const indentStart = trailingNewline || (i > 0 && /\r?\n$/.test(separator)); + + source.content.indent(indentStr, { + exclude: source.indentExclusionRanges, + indentStart, //: trailingNewline || /\r?\n$/.test( separator ) //true///\r?\n/.test( separator ) + }); + + trailingNewline = source.content.lastChar() === '\n'; + }); + + if (this.intro) { + this.intro = + indentStr + + this.intro.replace(/^[^\n]/gm, (match, index) => { + return index > 0 ? indentStr + match : match; + }); + } + + return this; + } + + prepend(str) { + this.intro = str + this.intro; + return this; + } + + toString() { + const body = this.sources + .map((source, i) => { + const separator = source.separator !== undefined ? source.separator : this.separator; + const str = (i > 0 ? separator : '') + source.content.toString(); + + return str; + }) + .join(''); + + return this.intro + body; + } + + isEmpty() { + if (this.intro.length && this.intro.trim()) return false; + if (this.sources.some((source) => !source.content.isEmpty())) return false; + return true; + } + + length() { + return this.sources.reduce( + (length, source) => length + source.content.length(), + this.intro.length, + ); + } + + trimLines() { + return this.trim('[\\r\\n]'); + } + + trim(charType) { + return this.trimStart(charType).trimEnd(charType); + } + + trimStart(charType) { + const rx = new RegExp('^' + (charType || '\\s') + '+'); + this.intro = this.intro.replace(rx, ''); + + if (!this.intro) { + let source; + let i = 0; + + do { + source = this.sources[i++]; + if (!source) { + break; + } + } while (!source.content.trimStartAborted(charType)); + } + + return this; + } + + trimEnd(charType) { + const rx = new RegExp((charType || '\\s') + '+$'); + + let source; + let i = this.sources.length - 1; + + do { + source = this.sources[i--]; + if (!source) { + this.intro = this.intro.replace(rx, ''); + break; + } + } while (!source.content.trimEndAborted(charType)); + + return this; + } +} + +MagicString.Bundle = Bundle; +MagicString.SourceMap = SourceMap; +MagicString.default = MagicString; // work around TypeScript bug https://github.com/Rich-Harris/magic-string/pull/121 + +module.exports = MagicString; +//# sourceMappingURL=magic-string.cjs.js.map diff --git a/vuetest/node_modules/magic-string/dist/magic-string.cjs.js.map b/vuetest/node_modules/magic-string/dist/magic-string.cjs.js.map new file mode 100644 index 0000000..e8df93f --- /dev/null +++ b/vuetest/node_modules/magic-string/dist/magic-string.cjs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"magic-string.cjs.js","sources":["../src/BitSet.js","../src/Chunk.js","../src/SourceMap.js","../src/utils/guessIndent.js","../src/utils/getRelativePath.js","../src/utils/isObject.js","../src/utils/getLocator.js","../src/utils/Mappings.js","../src/MagicString.js","../src/Bundle.js","../src/index-legacy.js"],"sourcesContent":["export default class BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}\n","export default class Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\tif (DEBUG) {\n\t\t\t// we make these non-enumerable, for sanity while debugging\n\t\t\tObject.defineProperties(this, {\n\t\t\t\tprevious: { writable: true, value: null },\n\t\t\t\tnext: { writable: true, value: null },\n\t\t\t});\n\t\t} else {\n\t\t\tthis.previous = null;\n\t\t\tthis.next = null;\n\t\t}\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\treset() {\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\t\tif (this.edited) {\n\t\t\tthis.content = this.original;\n\t\t\tthis.storeName = false;\n\t\t\tthis.edited = false;\n\t\t}\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// after split we should save the edit content record into the correct chunk\n\t\t\t// to make sure sourcemap correct\n\t\t\t// For example:\n\t\t\t// ' test'.trim()\n\t\t\t// split -> ' ' + 'test'\n\t\t\t// ✔️ edit -> '' + 'test'\n\t\t\t// ✖️ edit -> 'test' + ''\n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tthis.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tconst newChunk = this.split(this.end - trimmed.length);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tnewChunk.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n","import { encode } from '@jridgewell/sourcemap-codec';\n\nfunction getBtoa() {\n\tif (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') {\n\t\treturn (str) => globalThis.btoa(unescape(encodeURIComponent(str)));\n\t} else if (typeof Buffer === 'function') {\n\t\treturn (str) => Buffer.from(str, 'utf-8').toString('base64');\n\t} else {\n\t\treturn () => {\n\t\t\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n\t\t};\n\t}\n}\n\nconst btoa = /*#__PURE__*/ getBtoa();\n\nexport default class SourceMap {\n\tconstructor(properties) {\n\t\tthis.version = 3;\n\t\tthis.file = properties.file;\n\t\tthis.sources = properties.sources;\n\t\tthis.sourcesContent = properties.sourcesContent;\n\t\tthis.names = properties.names;\n\t\tthis.mappings = encode(properties.mappings);\n\t\tif (typeof properties.x_google_ignoreList !== 'undefined') {\n\t\t\tthis.x_google_ignoreList = properties.x_google_ignoreList;\n\t\t}\n\t\tif (typeof properties.debugId !== 'undefined') {\n\t\t\tthis.debugId = properties.debugId;\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this);\n\t}\n\n\ttoUrl() {\n\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t}\n}\n","export default function guessIndent(code) {\n\tconst lines = code.split('\\n');\n\n\tconst tabbed = lines.filter((line) => /^\\t+/.test(line));\n\tconst spaced = lines.filter((line) => /^ {2,}/.test(line));\n\n\tif (tabbed.length === 0 && spaced.length === 0) {\n\t\treturn null;\n\t}\n\n\t// More lines tabbed than spaced? Assume tabs, and\n\t// default to tabs in the case of a tie (or nothing\n\t// to go on)\n\tif (tabbed.length >= spaced.length) {\n\t\treturn '\\t';\n\t}\n\n\t// Otherwise, we need to guess the multiple\n\tconst min = spaced.reduce((previous, current) => {\n\t\tconst numSpaces = /^ +/.exec(current)[0].length;\n\t\treturn Math.min(numSpaces, previous);\n\t}, Infinity);\n\n\treturn new Array(min + 1).join(' ');\n}\n","export default function getRelativePath(from, to) {\n\tconst fromParts = from.split(/[/\\\\]/);\n\tconst toParts = to.split(/[/\\\\]/);\n\n\tfromParts.pop(); // get dirname\n\n\twhile (fromParts[0] === toParts[0]) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif (fromParts.length) {\n\t\tlet i = fromParts.length;\n\t\twhile (i--) fromParts[i] = '..';\n\t}\n\n\treturn fromParts.concat(toParts).join('/');\n}\n","const toString = Object.prototype.toString;\n\nexport default function isObject(thing) {\n\treturn toString.call(thing) === '[object Object]';\n}\n","export default function getLocator(source) {\n\tconst originalLines = source.split('\\n');\n\tconst lineOffsets = [];\n\n\tfor (let i = 0, pos = 0; i < originalLines.length; i++) {\n\t\tlineOffsets.push(pos);\n\t\tpos += originalLines[i].length + 1;\n\t}\n\n\treturn function locate(index) {\n\t\tlet i = 0;\n\t\tlet j = lineOffsets.length;\n\t\twhile (i < j) {\n\t\t\tconst m = (i + j) >> 1;\n\t\t\tif (index < lineOffsets[m]) {\n\t\t\t\tj = m;\n\t\t\t} else {\n\t\t\t\ti = m + 1;\n\t\t\t}\n\t\t}\n\t\tconst line = i - 1;\n\t\tconst column = index - lineOffsets[line];\n\t\treturn { line, column };\n\t};\n}\n","const wordRegex = /\\w/;\n\nexport default class Mappings {\n\tconstructor(hires) {\n\t\tthis.hires = hires;\n\t\tthis.generatedCodeLine = 0;\n\t\tthis.generatedCodeColumn = 0;\n\t\tthis.raw = [];\n\t\tthis.rawSegments = this.raw[this.generatedCodeLine] = [];\n\t\tthis.pending = null;\n\t}\n\n\taddEdit(sourceIndex, content, loc, nameIndex) {\n\t\tif (content.length) {\n\t\t\tconst contentLengthMinusOne = content.length - 1;\n\t\t\tlet contentLineEnd = content.indexOf('\\n', 0);\n\t\t\tlet previousContentLineEnd = -1;\n\t\t\t// Loop through each line in the content and add a segment, but stop if the last line is empty,\n\t\t\t// else code afterwards would fill one line too many\n\t\t\twhile (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) {\n\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\t\tif (nameIndex >= 0) {\n\t\t\t\t\tsegment.push(nameIndex);\n\t\t\t\t}\n\t\t\t\tthis.rawSegments.push(segment);\n\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\n\t\t\t\tpreviousContentLineEnd = contentLineEnd;\n\t\t\t\tcontentLineEnd = content.indexOf('\\n', contentLineEnd + 1);\n\t\t\t}\n\n\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\tif (nameIndex >= 0) {\n\t\t\t\tsegment.push(nameIndex);\n\t\t\t}\n\t\t\tthis.rawSegments.push(segment);\n\n\t\t\tthis.advance(content.slice(previousContentLineEnd + 1));\n\t\t} else if (this.pending) {\n\t\t\tthis.rawSegments.push(this.pending);\n\t\t\tthis.advance(content);\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\taddUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {\n\t\tlet originalCharIndex = chunk.start;\n\t\tlet first = true;\n\t\t// when iterating each char, check if it's in a word boundary\n\t\tlet charInHiresBoundary = false;\n\n\t\twhile (originalCharIndex < chunk.end) {\n\t\t\tif (original[originalCharIndex] === '\\n') {\n\t\t\t\tloc.line += 1;\n\t\t\t\tloc.column = 0;\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\t\t\t\tfirst = true;\n\t\t\t\tcharInHiresBoundary = false;\n\t\t\t} else {\n\t\t\t\tif (this.hires || first || sourcemapLocations.has(originalCharIndex)) {\n\t\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\n\t\t\t\t\tif (this.hires === 'boundary') {\n\t\t\t\t\t\t// in hires \"boundary\", group segments per word boundary than per char\n\t\t\t\t\t\tif (wordRegex.test(original[originalCharIndex])) {\n\t\t\t\t\t\t\t// for first char in the boundary found, start the boundary by pushing a segment\n\t\t\t\t\t\t\tif (!charInHiresBoundary) {\n\t\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\t\tcharInHiresBoundary = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// for non-word char, end the boundary by pushing a segment\n\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\tcharInHiresBoundary = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tloc.column += 1;\n\t\t\t\tthis.generatedCodeColumn += 1;\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t\toriginalCharIndex += 1;\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\tadvance(str) {\n\t\tif (!str) return;\n\n\t\tconst lines = str.split('\\n');\n\n\t\tif (lines.length > 1) {\n\t\t\tfor (let i = 0; i < lines.length - 1; i++) {\n\t\t\t\tthis.generatedCodeLine++;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t}\n\t\t\tthis.generatedCodeColumn = 0;\n\t\t}\n\n\t\tthis.generatedCodeColumn += lines[lines.length - 1].length;\n\t}\n}\n","import BitSet from './BitSet.js';\nimport Chunk from './Chunk.js';\nimport SourceMap from './SourceMap.js';\nimport guessIndent from './utils/guessIndent.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\nimport Stats from './utils/Stats.js';\n\nconst n = '\\n';\n\nconst warned = {\n\tinsertLeft: false,\n\tinsertRight: false,\n\tstoreName: false,\n};\n\nexport default class MagicString {\n\tconstructor(string, options = {}) {\n\t\tconst chunk = new Chunk(0, string.length, string);\n\n\t\tObject.defineProperties(this, {\n\t\t\toriginal: { writable: true, value: string },\n\t\t\toutro: { writable: true, value: '' },\n\t\t\tintro: { writable: true, value: '' },\n\t\t\tfirstChunk: { writable: true, value: chunk },\n\t\t\tlastChunk: { writable: true, value: chunk },\n\t\t\tlastSearchedChunk: { writable: true, value: chunk },\n\t\t\tbyStart: { writable: true, value: {} },\n\t\t\tbyEnd: { writable: true, value: {} },\n\t\t\tfilename: { writable: true, value: options.filename },\n\t\t\tindentExclusionRanges: { writable: true, value: options.indentExclusionRanges },\n\t\t\tsourcemapLocations: { writable: true, value: new BitSet() },\n\t\t\tstoredNames: { writable: true, value: {} },\n\t\t\tindentStr: { writable: true, value: undefined },\n\t\t\tignoreList: { writable: true, value: options.ignoreList },\n\t\t\toffset: { writable: true, value: options.offset || 0 },\n\t\t});\n\n\t\tif (DEBUG) {\n\t\t\tObject.defineProperty(this, 'stats', { value: new Stats() });\n\t\t}\n\n\t\tthis.byStart[0] = chunk;\n\t\tthis.byEnd[string.length] = chunk;\n\t}\n\n\taddSourcemapLocation(char) {\n\t\tthis.sourcemapLocations.add(char);\n\t}\n\n\tappend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.outro += content;\n\t\treturn this;\n\t}\n\n\tappendLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendLeft');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendLeft(content);\n\t\t} else {\n\t\t\tthis.intro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendLeft');\n\t\treturn this;\n\t}\n\n\tappendRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendRight(content);\n\t\t} else {\n\t\t\tthis.outro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendRight');\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst cloned = new MagicString(this.original, { filename: this.filename, offset: this.offset });\n\n\t\tlet originalChunk = this.firstChunk;\n\t\tlet clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());\n\n\t\twhile (originalChunk) {\n\t\t\tcloned.byStart[clonedChunk.start] = clonedChunk;\n\t\t\tcloned.byEnd[clonedChunk.end] = clonedChunk;\n\n\t\t\tconst nextOriginalChunk = originalChunk.next;\n\t\t\tconst nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();\n\n\t\t\tif (nextClonedChunk) {\n\t\t\t\tclonedChunk.next = nextClonedChunk;\n\t\t\t\tnextClonedChunk.previous = clonedChunk;\n\n\t\t\t\tclonedChunk = nextClonedChunk;\n\t\t\t}\n\n\t\t\toriginalChunk = nextOriginalChunk;\n\t\t}\n\n\t\tcloned.lastChunk = clonedChunk;\n\n\t\tif (this.indentExclusionRanges) {\n\t\t\tcloned.indentExclusionRanges = this.indentExclusionRanges.slice();\n\t\t}\n\n\t\tcloned.sourcemapLocations = new BitSet(this.sourcemapLocations);\n\n\t\tcloned.intro = this.intro;\n\t\tcloned.outro = this.outro;\n\n\t\treturn cloned;\n\t}\n\n\tgenerateDecodedMap(options) {\n\t\toptions = options || {};\n\n\t\tconst sourceIndex = 0;\n\t\tconst names = Object.keys(this.storedNames);\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tconst locate = getLocator(this.original);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.firstChunk.eachNext((chunk) => {\n\t\t\tconst loc = locate(chunk.start);\n\n\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tmappings.addEdit(\n\t\t\t\t\tsourceIndex,\n\t\t\t\t\tchunk.content,\n\t\t\t\t\tloc,\n\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tmappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);\n\t\t\t}\n\n\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: [\n\t\t\t\toptions.source ? getRelativePath(options.file || '', options.source) : options.file || '',\n\t\t\t],\n\t\t\tsourcesContent: options.includeContent ? [this.original] : undefined,\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\t_ensureindentStr() {\n\t\tif (this.indentStr === undefined) {\n\t\t\tthis.indentStr = guessIndent(this.original);\n\t\t}\n\t}\n\n\t_getRawIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr;\n\t}\n\n\tgetIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr === null ? '\\t' : this.indentStr;\n\t}\n\n\tindent(indentStr, options) {\n\t\tconst pattern = /^[^\\r\\n]/gm;\n\n\t\tif (isObject(indentStr)) {\n\t\t\toptions = indentStr;\n\t\t\tindentStr = undefined;\n\t\t}\n\n\t\tif (indentStr === undefined) {\n\t\t\tthis._ensureindentStr();\n\t\t\tindentStr = this.indentStr || '\\t';\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\toptions = options || {};\n\n\t\t// Process exclusion ranges\n\t\tconst isExcluded = {};\n\n\t\tif (options.exclude) {\n\t\t\tconst exclusions =\n\t\t\t\ttypeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;\n\t\t\texclusions.forEach((exclusion) => {\n\t\t\t\tfor (let i = exclusion[0]; i < exclusion[1]; i += 1) {\n\t\t\t\t\tisExcluded[i] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet shouldIndentNextCharacter = options.indentStart !== false;\n\t\tconst replacer = (match) => {\n\t\t\tif (shouldIndentNextCharacter) return `${indentStr}${match}`;\n\t\t\tshouldIndentNextCharacter = true;\n\t\t\treturn match;\n\t\t};\n\n\t\tthis.intro = this.intro.replace(pattern, replacer);\n\n\t\tlet charIndex = 0;\n\t\tlet chunk = this.firstChunk;\n\n\t\twhile (chunk) {\n\t\t\tconst end = chunk.end;\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\tchunk.content = chunk.content.replace(pattern, replacer);\n\n\t\t\t\t\tif (chunk.content.length) {\n\t\t\t\t\t\tshouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\\n';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcharIndex = chunk.start;\n\n\t\t\t\twhile (charIndex < end) {\n\t\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\t\tconst char = this.original[charIndex];\n\n\t\t\t\t\t\tif (char === '\\n') {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = true;\n\t\t\t\t\t\t} else if (char !== '\\r' && shouldIndentNextCharacter) {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = false;\n\n\t\t\t\t\t\t\tif (charIndex === chunk.start) {\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._splitChunk(chunk, charIndex);\n\t\t\t\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcharIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcharIndex = chunk.end;\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tthis.outro = this.outro.replace(pattern, replacer);\n\n\t\treturn this;\n\t}\n\n\tinsert() {\n\t\tthrow new Error(\n\t\t\t'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)',\n\t\t);\n\t}\n\n\tinsertLeft(index, content) {\n\t\tif (!warned.insertLeft) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',\n\t\t\t);\n\t\t\twarned.insertLeft = true;\n\t\t}\n\n\t\treturn this.appendLeft(index, content);\n\t}\n\n\tinsertRight(index, content) {\n\t\tif (!warned.insertRight) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',\n\t\t\t);\n\t\t\twarned.insertRight = true;\n\t\t}\n\n\t\treturn this.prependRight(index, content);\n\t}\n\n\tmove(start, end, index) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\t\tindex = index + this.offset;\n\n\t\tif (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');\n\n\t\tif (DEBUG) this.stats.time('move');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\t\tthis._split(index);\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tconst oldLeft = first.previous;\n\t\tconst oldRight = last.next;\n\n\t\tconst newRight = this.byStart[index];\n\t\tif (!newRight && last === this.lastChunk) return this;\n\t\tconst newLeft = newRight ? newRight.previous : this.lastChunk;\n\n\t\tif (oldLeft) oldLeft.next = oldRight;\n\t\tif (oldRight) oldRight.previous = oldLeft;\n\n\t\tif (newLeft) newLeft.next = first;\n\t\tif (newRight) newRight.previous = last;\n\n\t\tif (!first.previous) this.firstChunk = last.next;\n\t\tif (!last.next) {\n\t\t\tthis.lastChunk = first.previous;\n\t\t\tthis.lastChunk.next = null;\n\t\t}\n\n\t\tfirst.previous = newLeft;\n\t\tlast.next = newRight || null;\n\n\t\tif (!newLeft) this.firstChunk = first;\n\t\tif (!newRight) this.lastChunk = last;\n\n\t\tif (DEBUG) this.stats.timeEnd('move');\n\t\treturn this;\n\t}\n\n\toverwrite(start, end, content, options) {\n\t\toptions = options || {};\n\t\treturn this.update(start, end, content, { ...options, overwrite: !options.contentOnly });\n\t}\n\n\tupdate(start, end, content, options) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('replacement content must be a string');\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (end > this.original.length) throw new Error('end is out of bounds');\n\t\tif (start === end)\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot overwrite a zero-length range – use appendLeft or prependRight instead',\n\t\t\t);\n\n\t\tif (DEBUG) this.stats.time('overwrite');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tif (options === true) {\n\t\t\tif (!warned.storeName) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string',\n\t\t\t\t);\n\t\t\t\twarned.storeName = true;\n\t\t\t}\n\n\t\t\toptions = { storeName: true };\n\t\t}\n\t\tconst storeName = options !== undefined ? options.storeName : false;\n\t\tconst overwrite = options !== undefined ? options.overwrite : false;\n\n\t\tif (storeName) {\n\t\t\tconst original = this.original.slice(start, end);\n\t\t\tObject.defineProperty(this.storedNames, original, {\n\t\t\t\twritable: true,\n\t\t\t\tvalue: true,\n\t\t\t\tenumerable: true,\n\t\t\t});\n\t\t}\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tif (first) {\n\t\t\tlet chunk = first;\n\t\t\twhile (chunk !== last) {\n\t\t\t\tif (chunk.next !== this.byStart[chunk.end]) {\n\t\t\t\t\tthrow new Error('Cannot overwrite across a split point');\n\t\t\t\t}\n\t\t\t\tchunk = chunk.next;\n\t\t\t\tchunk.edit('', false);\n\t\t\t}\n\n\t\t\tfirst.edit(content, storeName, !overwrite);\n\t\t} else {\n\t\t\t// must be inserting at the end\n\t\t\tconst newChunk = new Chunk(start, end, '').edit(content, storeName);\n\n\t\t\t// TODO last chunk in the array may not be the last chunk, if it's moved...\n\t\t\tlast.next = newChunk;\n\t\t\tnewChunk.previous = last;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('overwrite');\n\t\treturn this;\n\t}\n\n\tprepend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.intro = content + this.intro;\n\t\treturn this;\n\t}\n\n\tprependLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependLeft(content);\n\t\t} else {\n\t\t\tthis.intro = content + this.intro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tprependRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependRight(content);\n\t\t} else {\n\t\t\tthis.outro = content + this.outro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tremove(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('remove');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.intro = '';\n\t\t\tchunk.outro = '';\n\t\t\tchunk.edit('');\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('remove');\n\t\treturn this;\n\t}\n\n\treset(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('reset');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.reset();\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('reset');\n\t\treturn this;\n\t}\n\n\tlastChar() {\n\t\tif (this.outro.length) return this.outro[this.outro.length - 1];\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];\n\t\t\tif (chunk.content.length) return chunk.content[chunk.content.length - 1];\n\t\t\tif (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];\n\t\t} while ((chunk = chunk.previous));\n\t\tif (this.intro.length) return this.intro[this.intro.length - 1];\n\t\treturn '';\n\t}\n\n\tlastLine() {\n\t\tlet lineIndex = this.outro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.outro.substr(lineIndex + 1);\n\t\tlet lineStr = this.outro;\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length > 0) {\n\t\t\t\tlineIndex = chunk.outro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.outro + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.content.length > 0) {\n\t\t\t\tlineIndex = chunk.content.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.content + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.intro.length > 0) {\n\t\t\t\tlineIndex = chunk.intro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.intro + lineStr;\n\t\t\t}\n\t\t} while ((chunk = chunk.previous));\n\t\tlineIndex = this.intro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;\n\t\treturn this.intro + lineStr;\n\t}\n\n\tslice(start = 0, end = this.original.length - this.offset) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tlet result = '';\n\n\t\t// find start chunk\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk && (chunk.start > start || chunk.end <= start)) {\n\t\t\t// found end chunk before start\n\t\t\tif (chunk.start < end && chunk.end >= end) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tif (chunk && chunk.edited && chunk.start !== start)\n\t\t\tthrow new Error(`Cannot use replaced character ${start} as slice start anchor.`);\n\n\t\tconst startChunk = chunk;\n\t\twhile (chunk) {\n\t\t\tif (chunk.intro && (startChunk !== chunk || chunk.start === start)) {\n\t\t\t\tresult += chunk.intro;\n\t\t\t}\n\n\t\t\tconst containsEnd = chunk.start < end && chunk.end >= end;\n\t\t\tif (containsEnd && chunk.edited && chunk.end !== end)\n\t\t\t\tthrow new Error(`Cannot use replaced character ${end} as slice end anchor.`);\n\n\t\t\tconst sliceStart = startChunk === chunk ? start - chunk.start : 0;\n\t\t\tconst sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;\n\n\t\t\tresult += chunk.content.slice(sliceStart, sliceEnd);\n\n\t\t\tif (chunk.outro && (!containsEnd || chunk.end === end)) {\n\t\t\t\tresult += chunk.outro;\n\t\t\t}\n\n\t\t\tif (containsEnd) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// TODO deprecate this? not really very useful\n\tsnip(start, end) {\n\t\tconst clone = this.clone();\n\t\tclone.remove(0, start);\n\t\tclone.remove(end, clone.original.length);\n\n\t\treturn clone;\n\t}\n\n\t_split(index) {\n\t\tif (this.byStart[index] || this.byEnd[index]) return;\n\n\t\tif (DEBUG) this.stats.time('_split');\n\n\t\tlet chunk = this.lastSearchedChunk;\n\t\tconst searchForward = index > chunk.end;\n\n\t\twhile (chunk) {\n\t\t\tif (chunk.contains(index)) return this._splitChunk(chunk, index);\n\n\t\t\tchunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];\n\t\t}\n\t}\n\n\t_splitChunk(chunk, index) {\n\t\tif (chunk.edited && chunk.content.length) {\n\t\t\t// zero-length edited chunks are a special case (overlapping replacements)\n\t\t\tconst loc = getLocator(this.original)(index);\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – \"${chunk.original}\")`,\n\t\t\t);\n\t\t}\n\n\t\tconst newChunk = chunk.split(index);\n\n\t\tthis.byEnd[index] = chunk;\n\t\tthis.byStart[index] = newChunk;\n\t\tthis.byEnd[newChunk.end] = newChunk;\n\n\t\tif (chunk === this.lastChunk) this.lastChunk = newChunk;\n\n\t\tthis.lastSearchedChunk = chunk;\n\t\tif (DEBUG) this.stats.timeEnd('_split');\n\t\treturn true;\n\t}\n\n\ttoString() {\n\t\tlet str = this.intro;\n\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk) {\n\t\t\tstr += chunk.toString();\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn str + this.outro;\n\t}\n\n\tisEmpty() {\n\t\tlet chunk = this.firstChunk;\n\t\tdo {\n\t\t\tif (\n\t\t\t\t(chunk.intro.length && chunk.intro.trim()) ||\n\t\t\t\t(chunk.content.length && chunk.content.trim()) ||\n\t\t\t\t(chunk.outro.length && chunk.outro.trim())\n\t\t\t)\n\t\t\t\treturn false;\n\t\t} while ((chunk = chunk.next));\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\tlet chunk = this.firstChunk;\n\t\tlet length = 0;\n\t\tdo {\n\t\t\tlength += chunk.intro.length + chunk.content.length + chunk.outro.length;\n\t\t} while ((chunk = chunk.next));\n\t\treturn length;\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimEndAborted(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tlet chunk = this.lastChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimEnd(rx);\n\n\t\t\t// if chunk was trimmed, we have a new lastChunk\n\t\t\tif (chunk.end !== end) {\n\t\t\t\tif (this.lastChunk === chunk) {\n\t\t\t\t\tthis.lastChunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.previous;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimEnd(charType) {\n\t\tthis.trimEndAborted(charType);\n\t\treturn this;\n\t}\n\ttrimStartAborted(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tlet chunk = this.firstChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimStart(rx);\n\n\t\t\tif (chunk.end !== end) {\n\t\t\t\t// special case...\n\t\t\t\tif (chunk === this.lastChunk) this.lastChunk = chunk.next;\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.next;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimStart(charType) {\n\t\tthis.trimStartAborted(charType);\n\t\treturn this;\n\t}\n\n\thasChanged() {\n\t\treturn this.original !== this.toString();\n\t}\n\n\t_replaceRegexp(searchValue, replacement) {\n\t\tfunction getReplacement(match, str) {\n\t\t\tif (typeof replacement === 'string') {\n\t\t\t\treturn replacement.replace(/\\$(\\$|&|\\d+)/g, (_, i) => {\n\t\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter\n\t\t\t\t\tif (i === '$') return '$';\n\t\t\t\t\tif (i === '&') return match[0];\n\t\t\t\t\tconst num = +i;\n\t\t\t\t\tif (num < match.length) return match[+i];\n\t\t\t\t\treturn `$${i}`;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn replacement(...match, match.index, str, match.groups);\n\t\t\t}\n\t\t}\n\t\tfunction matchAll(re, str) {\n\t\t\tlet match;\n\t\t\tconst matches = [];\n\t\t\twhile ((match = re.exec(str))) {\n\t\t\t\tmatches.push(match);\n\t\t\t}\n\t\t\treturn matches;\n\t\t}\n\t\tif (searchValue.global) {\n\t\t\tconst matches = matchAll(searchValue, this.original);\n\t\t\tmatches.forEach((match) => {\n\t\t\t\tif (match.index != null) {\n\t\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tconst match = this.original.match(searchValue);\n\t\t\tif (match && match.index != null) {\n\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t_replaceString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst index = original.indexOf(string);\n\n\t\tif (index !== -1) {\n\t\t\tthis.overwrite(index, index + string.length, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplace(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceString(searchValue, replacement);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n\n\t_replaceAllString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst stringLength = string.length;\n\t\tfor (\n\t\t\tlet index = original.indexOf(string);\n\t\t\tindex !== -1;\n\t\t\tindex = original.indexOf(string, index + stringLength)\n\t\t) {\n\t\t\tconst previous = original.slice(index, index + stringLength);\n\t\t\tif (previous !== replacement) this.overwrite(index, index + stringLength, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplaceAll(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceAllString(searchValue, replacement);\n\t\t}\n\n\t\tif (!searchValue.global) {\n\t\t\tthrow new TypeError(\n\t\t\t\t'MagicString.prototype.replaceAll called with a non-global RegExp argument',\n\t\t\t);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n}\n","import MagicString from './MagicString.js';\nimport SourceMap from './SourceMap.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\n\nconst hasOwnProp = Object.prototype.hasOwnProperty;\n\nexport default class Bundle {\n\tconstructor(options = {}) {\n\t\tthis.intro = options.intro || '';\n\t\tthis.separator = options.separator !== undefined ? options.separator : '\\n';\n\t\tthis.sources = [];\n\t\tthis.uniqueSources = [];\n\t\tthis.uniqueSourceIndexByFilename = {};\n\t}\n\n\taddSource(source) {\n\t\tif (source instanceof MagicString) {\n\t\t\treturn this.addSource({\n\t\t\t\tcontent: source,\n\t\t\t\tfilename: source.filename,\n\t\t\t\tseparator: this.separator,\n\t\t\t});\n\t\t}\n\n\t\tif (!isObject(source) || !source.content) {\n\t\t\tthrow new Error(\n\t\t\t\t'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`',\n\t\t\t);\n\t\t}\n\n\t\t['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => {\n\t\t\tif (!hasOwnProp.call(source, option)) source[option] = source.content[option];\n\t\t});\n\n\t\tif (source.separator === undefined) {\n\t\t\t// TODO there's a bunch of this sort of thing, needs cleaning up\n\t\t\tsource.separator = this.separator;\n\t\t}\n\n\t\tif (source.filename) {\n\t\t\tif (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {\n\t\t\t\tthis.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;\n\t\t\t\tthis.uniqueSources.push({ filename: source.filename, content: source.content.original });\n\t\t\t} else {\n\t\t\t\tconst uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];\n\t\t\t\tif (source.content.original !== uniqueSource.content) {\n\t\t\t\t\tthrow new Error(`Illegal source: same filename (${source.filename}), different contents`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sources.push(source);\n\t\treturn this;\n\t}\n\n\tappend(str, options) {\n\t\tthis.addSource({\n\t\t\tcontent: new MagicString(str),\n\t\t\tseparator: (options && options.separator) || '',\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst bundle = new Bundle({\n\t\t\tintro: this.intro,\n\t\t\tseparator: this.separator,\n\t\t});\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tbundle.addSource({\n\t\t\t\tfilename: source.filename,\n\t\t\t\tcontent: source.content.clone(),\n\t\t\t\tseparator: source.separator,\n\t\t\t});\n\t\t});\n\n\t\treturn bundle;\n\t}\n\n\tgenerateDecodedMap(options = {}) {\n\t\tconst names = [];\n\t\tlet x_google_ignoreList = undefined;\n\t\tthis.sources.forEach((source) => {\n\t\t\tObject.keys(source.content.storedNames).forEach((name) => {\n\t\t\t\tif (!~names.indexOf(name)) names.push(name);\n\t\t\t});\n\t\t});\n\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\tmappings.advance(this.separator);\n\t\t\t}\n\n\t\t\tconst sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;\n\t\t\tconst magicString = source.content;\n\t\t\tconst locate = getLocator(magicString.original);\n\n\t\t\tif (magicString.intro) {\n\t\t\t\tmappings.advance(magicString.intro);\n\t\t\t}\n\n\t\t\tmagicString.firstChunk.eachNext((chunk) => {\n\t\t\t\tconst loc = locate(chunk.start);\n\n\t\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\t\tif (source.filename) {\n\t\t\t\t\tif (chunk.edited) {\n\t\t\t\t\t\tmappings.addEdit(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk.content,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmappings.addUneditedChunk(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk,\n\t\t\t\t\t\t\tmagicString.original,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tmagicString.sourcemapLocations,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmappings.advance(chunk.content);\n\t\t\t\t}\n\n\t\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t\t});\n\n\t\t\tif (magicString.outro) {\n\t\t\t\tmappings.advance(magicString.outro);\n\t\t\t}\n\n\t\t\tif (source.ignoreList && sourceIndex !== -1) {\n\t\t\t\tif (x_google_ignoreList === undefined) {\n\t\t\t\t\tx_google_ignoreList = [];\n\t\t\t\t}\n\t\t\t\tx_google_ignoreList.push(sourceIndex);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.file ? getRelativePath(options.file, source.filename) : source.filename;\n\t\t\t}),\n\t\t\tsourcesContent: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.includeContent ? source.content : null;\n\t\t\t}),\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\tconst indentStringCounts = {};\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tconst indentStr = source.content._getRawIndentString();\n\n\t\t\tif (indentStr === null) return;\n\n\t\t\tif (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;\n\t\t\tindentStringCounts[indentStr] += 1;\n\t\t});\n\n\t\treturn (\n\t\t\tObject.keys(indentStringCounts).sort((a, b) => {\n\t\t\t\treturn indentStringCounts[a] - indentStringCounts[b];\n\t\t\t})[0] || '\\t'\n\t\t);\n\t}\n\n\tindent(indentStr) {\n\t\tif (!arguments.length) {\n\t\t\tindentStr = this.getIndentString();\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\tlet trailingNewline = !this.intro || this.intro.slice(-1) === '\\n';\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\tconst indentStart = trailingNewline || (i > 0 && /\\r?\\n$/.test(separator));\n\n\t\t\tsource.content.indent(indentStr, {\n\t\t\t\texclude: source.indentExclusionRanges,\n\t\t\t\tindentStart, //: trailingNewline || /\\r?\\n$/.test( separator ) //true///\\r?\\n/.test( separator )\n\t\t\t});\n\n\t\t\ttrailingNewline = source.content.lastChar() === '\\n';\n\t\t});\n\n\t\tif (this.intro) {\n\t\t\tthis.intro =\n\t\t\t\tindentStr +\n\t\t\t\tthis.intro.replace(/^[^\\n]/gm, (match, index) => {\n\t\t\t\t\treturn index > 0 ? indentStr + match : match;\n\t\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tprepend(str) {\n\t\tthis.intro = str + this.intro;\n\t\treturn this;\n\t}\n\n\ttoString() {\n\t\tconst body = this.sources\n\t\t\t.map((source, i) => {\n\t\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\t\tconst str = (i > 0 ? separator : '') + source.content.toString();\n\n\t\t\t\treturn str;\n\t\t\t})\n\t\t\t.join('');\n\n\t\treturn this.intro + body;\n\t}\n\n\tisEmpty() {\n\t\tif (this.intro.length && this.intro.trim()) return false;\n\t\tif (this.sources.some((source) => !source.content.isEmpty())) return false;\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\treturn this.sources.reduce(\n\t\t\t(length, source) => length + source.content.length(),\n\t\t\tthis.intro.length,\n\t\t);\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimStart(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\t\tthis.intro = this.intro.replace(rx, '');\n\n\t\tif (!this.intro) {\n\t\t\tlet source;\n\t\t\tlet i = 0;\n\n\t\t\tdo {\n\t\t\t\tsource = this.sources[i++];\n\t\t\t\tif (!source) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (!source.content.trimStartAborted(charType));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\ttrimEnd(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tlet source;\n\t\tlet i = this.sources.length - 1;\n\n\t\tdo {\n\t\t\tsource = this.sources[i--];\n\t\t\tif (!source) {\n\t\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!source.content.trimEndAborted(charType));\n\n\t\treturn this;\n\t}\n}\n","import MagicString from './MagicString.js';\nimport Bundle from './Bundle.js';\nimport SourceMap from './SourceMap.js';\n\nMagicString.Bundle = Bundle;\nMagicString.SourceMap = SourceMap;\nMagicString.default = MagicString; // work around TypeScript bug https://github.com/Rich-Harris/magic-string/pull/121\n\nexport default MagicString;\n"],"names":["encode"],"mappings":";;;;AAAe,MAAM,MAAM,CAAC;AAC5B,CAAC,WAAW,CAAC,GAAG,EAAE;AAClB,EAAE,IAAI,CAAC,IAAI,GAAG,GAAG,YAAY,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;AAC5D,EAAE;AACF;AACA,CAAC,GAAG,CAAC,CAAC,EAAE;AACR,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;AACrC,EAAE;AACF;AACA,CAAC,GAAG,CAAC,CAAC,EAAE;AACR,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AACjD,EAAE;AACF;;ACZe,MAAM,KAAK,CAAC;AAC3B,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;AAClC,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;AACpB,EAAE,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;AAChB,EAAE,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;;AAEzB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AACjB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;;AAEjB,EAAE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;AACxB,EAAE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;AACxB,EAAE,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;;AAErB,EAMS;AACT,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;AACvB,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;AACnB,GAAE;AACF,EAAC;;AAED,CAAC,UAAU,CAAC,OAAO,EAAE;AACrB,EAAE,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;AACvB,EAAC;;AAED,CAAC,WAAW,CAAC,OAAO,EAAE;AACtB,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,OAAO,CAAA;AACnC,EAAC;;AAED,CAAC,KAAK,GAAG;AACT,EAAE,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;;AAE9D,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;AAC1B,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;AAC1B,EAAE,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;AAC9B,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAA;AAClC,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE5B,EAAE,OAAO,KAAK,CAAA;AACd,EAAC;;AAED,CAAC,QAAQ,CAAC,KAAK,EAAE;AACjB,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,KAAK,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAA;AAC/C,EAAC;;AAED,CAAC,QAAQ,CAAC,EAAE,EAAE;AACd,EAAE,IAAI,KAAK,GAAG,IAAI,CAAA;AAClB,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,EAAE,CAAC,KAAK,CAAC,CAAA;AACZ,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;AACF,EAAC;;AAED,CAAC,YAAY,CAAC,EAAE,EAAE;AAClB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAA;AAClB,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,EAAE,CAAC,KAAK,CAAC,CAAA;AACZ,GAAG,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAA;AACzB,GAAE;AACF,EAAC;;AAED,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE;AACvC,EAAE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;AACxB,EAAE,IAAI,CAAC,WAAW,EAAE;AACpB,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AAClB,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AAClB,GAAE;AACF,EAAE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;;AAE5B,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA;;AAEpB,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,WAAW,CAAC,OAAO,EAAE;AACtB,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACnC,EAAC;;AAED,CAAC,YAAY,CAAC,OAAO,EAAE;AACvB,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACnC,EAAC;;AAED,CAAC,KAAK,GAAG;AACT,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AACjB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AACjB,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE;AACnB,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAA;AAC/B,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;AACzB,GAAG,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;AACtB,GAAE;AACF,EAAC;;AAED,CAAC,KAAK,CAAC,KAAK,EAAE;AACd,EAAE,MAAM,UAAU,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;;AAEvC,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAA;AAC3D,EAAE,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;;AAEvD,EAAE,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAA;;AAEhC,EAAE,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,CAAA;AAC5D,EAAE,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;AAC7B,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;;AAEjB,EAAE,IAAI,CAAC,GAAG,GAAG,KAAK,CAAA;;AAElB,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;AAC3B,GAAG,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;AACpB,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,OAAO,GAAG,cAAc,CAAA;AAChC,GAAE;;AAEF,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;AAC3B,EAAE,IAAI,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;AACtD,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAA;AAC1B,EAAE,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;;AAEtB,EAAE,OAAO,QAAQ,CAAA;AACjB,EAAC;;AAED,CAAC,QAAQ,GAAG;AACZ,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AAC/C,EAAC;;AAED,CAAC,OAAO,CAAC,EAAE,EAAE;AACb,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;AAEpC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;;AAE9C,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE;AACtB,GAAG,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE;AACjC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;AACrE,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;AACrB;AACA,KAAK,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;AAC7C,KAAI;AACJ,IAAG;AACH,GAAG,OAAO,IAAI,CAAA;AACd,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;;AAEjC,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AAC1C,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;AACrC,GAAE;AACF,EAAC;;AAED,CAAC,SAAS,CAAC,EAAE,EAAE;AACf,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;AAEpC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;;AAE9C,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE;AACtB,GAAG,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE;AACjC,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC1D,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;AACrB;AACA,KAAK,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;AACjD,KAAI;AACJ,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;AAClC,IAAG;AACH,GAAG,OAAO,IAAI,CAAA;AACd,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;;AAEjC,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AAC1C,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;AACrC,GAAE;AACF,EAAC;AACD;;ACrLA,SAAS,OAAO,GAAG;AACnB,CAAC,IAAI,OAAO,UAAU,KAAK,WAAW,IAAI,OAAO,UAAU,CAAC,IAAI,KAAK,UAAU,EAAE;AACjF,EAAE,OAAO,CAAC,GAAG,KAAK,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACrE,EAAE,MAAM,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;AAC1C,EAAE,OAAO,CAAC,GAAG,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC/D,EAAE,MAAM;AACR,EAAE,OAAO,MAAM;AACf,GAAG,MAAM,IAAI,KAAK,CAAC,yEAAyE,CAAC,CAAC;AAC9F,GAAG,CAAC;AACJ,EAAE;AACF,CAAC;AACD;AACA,MAAM,IAAI,iBAAiB,OAAO,EAAE,CAAC;AACrC;AACe,MAAM,SAAS,CAAC;AAC/B,CAAC,WAAW,CAAC,UAAU,EAAE;AACzB,EAAE,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;AACnB,EAAE,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;AAC9B,EAAE,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;AACpC,EAAE,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;AAClD,EAAE,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;AAChC,EAAE,IAAI,CAAC,QAAQ,GAAGA,qBAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC9C,EAAE,IAAI,OAAO,UAAU,CAAC,mBAAmB,KAAK,WAAW,EAAE;AAC7D,GAAG,IAAI,CAAC,mBAAmB,GAAG,UAAU,CAAC,mBAAmB,CAAC;AAC7D,GAAG;AACH,EAAE,IAAI,OAAO,UAAU,CAAC,OAAO,KAAK,WAAW,EAAE;AACjD,GAAG,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;AACrC,GAAG;AACH,EAAE;AACF;AACA,CAAC,QAAQ,GAAG;AACZ,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAC9B,EAAE;AACF;AACA,CAAC,KAAK,GAAG;AACT,EAAE,OAAO,6CAA6C,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC/E,EAAE;AACF;;ACvCe,SAAS,WAAW,CAAC,IAAI,EAAE;AAC1C,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAChC;AACA,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1D,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5D;AACA,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;AACjD,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA;AACA;AACA;AACA,CAAC,IAAI,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE;AACrC,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA;AACA,CAAC,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,OAAO,KAAK;AAClD,EAAE,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAClD,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AACvC,EAAE,EAAE,QAAQ,CAAC,CAAC;AACd;AACA,CAAC,OAAO,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACrC;;ACxBe,SAAS,eAAe,CAAC,IAAI,EAAE,EAAE,EAAE;AAClD,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACnC;AACA,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;AACjB;AACA,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE;AACrC,EAAE,SAAS,CAAC,KAAK,EAAE,CAAC;AACpB,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;AAClB,EAAE;AACF;AACA,CAAC,IAAI,SAAS,CAAC,MAAM,EAAE;AACvB,EAAE,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC;AAC3B,EAAE,OAAO,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;AAClC,EAAE;AACF;AACA,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC5C;;ACjBA,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAC3C;AACe,SAAS,QAAQ,CAAC,KAAK,EAAE;AACxC,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,iBAAiB,CAAC;AACnD;;ACJe,SAAS,UAAU,CAAC,MAAM,EAAE;AAC3C,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC1C,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AACxB;AACA,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACzD,EAAE,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxB,EAAE,GAAG,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AACrC,EAAE;AACF;AACA,CAAC,OAAO,SAAS,MAAM,CAAC,KAAK,EAAE;AAC/B,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;AACZ,EAAE,IAAI,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC;AAC7B,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE;AAChB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC1B,GAAG,IAAI,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE;AAC/B,IAAI,CAAC,GAAG,CAAC,CAAC;AACV,IAAI,MAAM;AACV,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,IAAI;AACJ,GAAG;AACH,EAAE,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;AACrB,EAAE,MAAM,MAAM,GAAG,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;AAC3C,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1B,EAAE,CAAC;AACH;;ACxBA,MAAM,SAAS,GAAG,IAAI,CAAC;AACvB;AACe,MAAM,QAAQ,CAAC;AAC9B,CAAC,WAAW,CAAC,KAAK,EAAE;AACpB,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AACrB,EAAE,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;AAC7B,EAAE,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;AAC/B,EAAE,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;AAChB,EAAE,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAC;AAC3D,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AACtB,EAAE;AACF;AACA,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE;AAC/C,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE;AACtB,GAAG,MAAM,qBAAqB,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;AACpD,GAAG,IAAI,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AACjD,GAAG,IAAI,sBAAsB,GAAG,CAAC,CAAC,CAAC;AACnC;AACA;AACA,GAAG,OAAO,cAAc,IAAI,CAAC,IAAI,qBAAqB,GAAG,cAAc,EAAE;AACzE,IAAI,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;AAClF,IAAI,IAAI,SAAS,IAAI,CAAC,EAAE;AACxB,KAAK,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC7B,KAAK;AACL,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACnC;AACA,IAAI,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;AAChC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;AAC7D,IAAI,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;AACjC;AACA,IAAI,sBAAsB,GAAG,cAAc,CAAC;AAC5C,IAAI,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,CAAC,CAAC,CAAC;AAC/D,IAAI;AACJ;AACA,GAAG,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;AACjF,GAAG,IAAI,SAAS,IAAI,CAAC,EAAE;AACvB,IAAI,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC5B,IAAI;AACJ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAClC;AACA,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,sBAAsB,GAAG,CAAC,CAAC,CAAC,CAAC;AAC3D,GAAG,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE;AAC3B,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACvC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACzB,GAAG;AACH;AACA,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AACtB,EAAE;AACF;AACA,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,kBAAkB,EAAE;AACzE,EAAE,IAAI,iBAAiB,GAAG,KAAK,CAAC,KAAK,CAAC;AACtC,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC;AACnB;AACA,EAAE,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAClC;AACA,EAAE,OAAO,iBAAiB,GAAG,KAAK,CAAC,GAAG,EAAE;AACxC,GAAG,IAAI,QAAQ,CAAC,iBAAiB,CAAC,KAAK,IAAI,EAAE;AAC7C,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC;AAClB,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;AACnB,IAAI,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;AAChC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;AAC7D,IAAI,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;AACjC,IAAI,KAAK,GAAG,IAAI,CAAC;AACjB,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAChC,IAAI,MAAM;AACV,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,KAAK,IAAI,kBAAkB,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE;AAC1E,KAAK,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;AACnF;AACA,KAAK,IAAI,IAAI,CAAC,KAAK,KAAK,UAAU,EAAE;AACpC;AACA,MAAM,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,EAAE;AACvD;AACA,OAAO,IAAI,CAAC,mBAAmB,EAAE;AACjC,QAAQ,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACvC,QAAQ,mBAAmB,GAAG,IAAI,CAAC;AACnC,QAAQ;AACR,OAAO,MAAM;AACb;AACA,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACtC,OAAO,mBAAmB,GAAG,KAAK,CAAC;AACnC,OAAO;AACP,MAAM,MAAM;AACZ,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACrC,MAAM;AACN,KAAK;AACL;AACA,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;AACpB,IAAI,IAAI,CAAC,mBAAmB,IAAI,CAAC,CAAC;AAClC,IAAI,KAAK,GAAG,KAAK,CAAC;AAClB,IAAI;AACJ;AACA,GAAG,iBAAiB,IAAI,CAAC,CAAC;AAC1B,GAAG;AACH;AACA,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AACtB,EAAE;AACF;AACA,CAAC,OAAO,CAAC,GAAG,EAAE;AACd,EAAE,IAAI,CAAC,GAAG,EAAE,OAAO;AACnB;AACA,EAAE,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAChC;AACA,EAAE,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AACxB,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;AAC9C,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;AAC7B,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;AAC7D,IAAI;AACJ,GAAG,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;AAChC,GAAG;AACH;AACA,EAAE,IAAI,CAAC,mBAAmB,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;AAC7D,EAAE;AACF;;ACtGA,MAAM,CAAC,GAAG,IAAI,CAAA;;AAEd,MAAM,MAAM,GAAG;AACf,CAAC,UAAU,EAAE,KAAK;AAClB,CAAC,WAAW,EAAE,KAAK;AACnB,CAAC,SAAS,EAAE,KAAK;AACjB,CAAC,CAAA;;AAEc,MAAM,WAAW,CAAC;AACjC,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE;AACnC,EAAE,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;;AAEnD,EAAE,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE;AAChC,GAAG,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE;AAC9C,GAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AACvC,GAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AACvC,GAAG,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;AAC/C,GAAG,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;AAC9C,GAAG,iBAAiB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;AACtD,GAAG,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AACzC,GAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AACvC,GAAG,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,QAAQ,EAAE;AACxD,GAAG,qBAAqB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,qBAAqB,EAAE;AAClF,GAAG,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,MAAM,EAAE,EAAE;AAC9D,GAAG,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AAC7C,GAAG,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;AAClD,GAAG,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,UAAU,EAAE;AAC5D,GAAG,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,IAAI,CAAC,EAAE;AACzD,GAAG,CAAC,CAAA;;AAMJ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAA;AACzB,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAA;AACnC,EAAC;;AAED,CAAC,oBAAoB,CAAC,IAAI,EAAE;AAC5B,EAAE,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AACnC,EAAC;;AAED,CAAC,MAAM,CAAC,OAAO,EAAE;AACjB,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAA;;AAExF,EAAE,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;AACvB,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE;AAC5B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;AAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAEjC,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;AAC5B,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;AACxB,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE;AAC7B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;AAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAEnC,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;AAC7B,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;AACxB,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,KAAK,GAAG;AACT,EAAE,MAAM,MAAM,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;;AAEjG,EAAE,IAAI,aAAa,GAAG,IAAI,CAAC,UAAU,CAAA;AACrC,EAAE,IAAI,WAAW,IAAI,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,iBAAiB,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC,CAAA;;AAE1F,EAAE,OAAO,aAAa,EAAE;AACxB,GAAG,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,WAAW,CAAA;AAClD,GAAG,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,WAAW,CAAA;;AAE9C,GAAG,MAAM,iBAAiB,GAAG,aAAa,CAAC,IAAI,CAAA;AAC/C,GAAG,MAAM,eAAe,GAAG,iBAAiB,IAAI,iBAAiB,CAAC,KAAK,EAAE,CAAA;;AAEzE,GAAG,IAAI,eAAe,EAAE;AACxB,IAAI,WAAW,CAAC,IAAI,GAAG,eAAe,CAAA;AACtC,IAAI,eAAe,CAAC,QAAQ,GAAG,WAAW,CAAA;;AAE1C,IAAI,WAAW,GAAG,eAAe,CAAA;AACjC,IAAG;;AAEH,GAAG,aAAa,GAAG,iBAAiB,CAAA;AACpC,GAAE;;AAEF,EAAE,MAAM,CAAC,SAAS,GAAG,WAAW,CAAA;;AAEhC,EAAE,IAAI,IAAI,CAAC,qBAAqB,EAAE;AAClC,GAAG,MAAM,CAAC,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,EAAE,CAAA;AACpE,GAAE;;AAEF,EAAE,MAAM,CAAC,kBAAkB,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;;AAEjE,EAAE,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;AAC3B,EAAE,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;;AAE3B,EAAE,OAAO,MAAM,CAAA;AACf,EAAC;;AAED,CAAC,kBAAkB,CAAC,OAAO,EAAE;AAC7B,EAAE,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;;AAEzB,EAAE,MAAM,WAAW,GAAG,CAAC,CAAA;AACvB,EAAE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;AAC7C,EAAE,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAE9C,EAAE,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;;AAE1C,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;AAClB,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC/B,GAAE;;AAEF,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,KAAK,KAAK;AACtC,GAAG,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAElC,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAExD,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE;AACrB,IAAI,QAAQ,CAAC,OAAO;AACpB,KAAK,WAAW;AAChB,KAAK,KAAK,CAAC,OAAO;AAClB,KAAK,GAAG;AACR,KAAK,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACzD,KAAK,CAAA;AACL,IAAI,MAAM;AACV,IAAI,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAA;AAC9F,IAAG;;AAEH,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;AACxD,GAAG,CAAC,CAAA;;AAEJ,EAAE,OAAO;AACT,GAAG,IAAI,EAAE,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,SAAS;AACrE,GAAG,OAAO,EAAE;AACZ,IAAI,OAAO,CAAC,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,IAAI,EAAE;AAC7F,IAAI;AACJ,GAAG,cAAc,EAAE,OAAO,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,SAAS;AACvE,GAAG,KAAK;AACR,GAAG,QAAQ,EAAE,QAAQ,CAAC,GAAG;AACzB,GAAG,mBAAmB,EAAE,IAAI,CAAC,UAAU,GAAG,CAAC,WAAW,CAAC,GAAG,SAAS;AACnE,GAAG,CAAA;AACH,EAAC;;AAED,CAAC,WAAW,CAAC,OAAO,EAAE;AACtB,EAAE,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAA;AACxD,EAAC;;AAED,CAAC,gBAAgB,GAAG;AACpB,EAAE,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE;AACpC,GAAG,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;AAC9C,GAAE;AACF,EAAC;;AAED,CAAC,mBAAmB,GAAG;AACvB,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAA;AACzB,EAAE,OAAO,IAAI,CAAC,SAAS,CAAA;AACvB,EAAC;;AAED,CAAC,eAAe,GAAG;AACnB,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAA;AACzB,EAAE,OAAO,IAAI,CAAC,SAAS,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,SAAS,CAAA;AACxD,EAAC;;AAED,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE;AAC5B,EAAE,MAAM,OAAO,GAAG,YAAY,CAAA;;AAE9B,EAAE,IAAI,QAAQ,CAAC,SAAS,CAAC,EAAE;AAC3B,GAAG,OAAO,GAAG,SAAS,CAAA;AACtB,GAAG,SAAS,GAAG,SAAS,CAAA;AACxB,GAAE;;AAEF,EAAE,IAAI,SAAS,KAAK,SAAS,EAAE;AAC/B,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAA;AAC1B,GAAG,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAA;AACrC,GAAE;;AAEF,EAAE,IAAI,SAAS,KAAK,EAAE,EAAE,OAAO,IAAI,CAAC;;AAEpC,EAAE,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;;AAEzB;AACA,EAAE,MAAM,UAAU,GAAG,EAAE,CAAA;;AAEvB,EAAE,IAAI,OAAO,CAAC,OAAO,EAAE;AACvB,GAAG,MAAM,UAAU;AACnB,IAAI,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,QAAQ,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAA;AAChF,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,KAAK;AACrC,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;AACzD,KAAK,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;AACzB,KAAI;AACJ,IAAI,CAAC,CAAA;AACL,GAAE;;AAEF,EAAE,IAAI,yBAAyB,GAAG,OAAO,CAAC,WAAW,KAAK,KAAK,CAAA;AAC/D,EAAE,MAAM,QAAQ,GAAG,CAAC,KAAK,KAAK;AAC9B,GAAG,IAAI,yBAAyB,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,CAAC,CAAA;AAC/D,GAAG,yBAAyB,GAAG,IAAI,CAAA;AACnC,GAAG,OAAO,KAAK,CAAA;AACf,GAAG,CAAA;;AAEH,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;AAEpD,EAAE,IAAI,SAAS,GAAG,CAAC,CAAA;AACnB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;;AAE7B,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;;AAExB,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE;AACrB,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;AAChC,KAAK,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;AAE7D,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;AAC/B,MAAM,yBAAyB,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,CAAA;AAClF,MAAK;AACL,KAAI;AACJ,IAAI,MAAM;AACV,IAAI,SAAS,GAAG,KAAK,CAAC,KAAK,CAAA;;AAE3B,IAAI,OAAO,SAAS,GAAG,GAAG,EAAE;AAC5B,KAAK,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;AACjC,MAAM,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;;AAE3C,MAAM,IAAI,IAAI,KAAK,IAAI,EAAE;AACzB,OAAO,yBAAyB,GAAG,IAAI,CAAA;AACvC,OAAO,MAAM,IAAI,IAAI,KAAK,IAAI,IAAI,yBAAyB,EAAE;AAC7D,OAAO,yBAAyB,GAAG,KAAK,CAAA;;AAExC,OAAO,IAAI,SAAS,KAAK,KAAK,CAAC,KAAK,EAAE;AACtC,QAAQ,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;AACrC,QAAQ,MAAM;AACd,QAAQ,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;AAC1C,QAAQ,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AAC1B,QAAQ,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;AACrC,QAAO;AACP,OAAM;AACN,MAAK;;AAEL,KAAK,SAAS,IAAI,CAAC,CAAA;AACnB,KAAI;AACJ,IAAG;;AAEH,GAAG,SAAS,GAAG,KAAK,CAAC,GAAG,CAAA;AACxB,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;;AAEF,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;AAEpD,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,MAAM,GAAG;AACV,EAAE,MAAM,IAAI,KAAK;AACjB,GAAG,iFAAiF;AACpF,GAAG,CAAA;AACH,EAAC;;AAED,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE;AAC5B,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;AAC1B,GAAG,OAAO,CAAC,IAAI;AACf,IAAI,oFAAoF;AACxF,IAAI,CAAA;AACJ,GAAG,MAAM,CAAC,UAAU,GAAG,IAAI,CAAA;AAC3B,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;AACxC,EAAC;;AAED,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE;AAC7B,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE;AAC3B,GAAG,OAAO,CAAC,IAAI;AACf,IAAI,uFAAuF;AAC3F,IAAI,CAAA;AACJ,GAAG,MAAM,CAAC,WAAW,GAAG,IAAI,CAAA;AAC5B,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;AAC1C,EAAC;;AAED,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE;AACzB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;AACzB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;;AAI9F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;AAClB,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AACnC,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;;AAE9B,EAAE,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAA;AAChC,EAAE,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAA;;AAE5B,EAAE,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AACtC,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,KAAK,IAAI,CAAC,SAAS,EAAE,OAAO,IAAI,CAAA;AACvD,EAAE,MAAM,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAA;;AAE/D,EAAE,IAAI,OAAO,EAAE,OAAO,CAAC,IAAI,GAAG,QAAQ,CAAA;AACtC,EAAE,IAAI,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAA;;AAE3C,EAAE,IAAI,OAAO,EAAE,OAAO,CAAC,IAAI,GAAG,KAAK,CAAA;AACnC,EAAE,IAAI,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAA;;AAExC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAA;AAClD,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;AAClB,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAA;AAClC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI,CAAA;AAC7B,GAAE;;AAEF,EAAE,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAA;AAC1B,EAAE,IAAI,CAAC,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAA;;AAE9B,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,GAAG,KAAK,CAAA;AACvC,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;AAGtC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE;AACzC,EAAE,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;AACzB,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAA;AAC1F,EAAC;;AAED,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE;AACtC,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;AAEzB,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAA;;AAE9F,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAC9C,GAAE;;AAEF,EAAE,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAA;AACzE,EAAE,IAAI,KAAK,KAAK,GAAG;AACnB,GAAG,MAAM,IAAI,KAAK;AAClB,IAAI,+EAA+E;AACnF,IAAI,CAAA;;AAIJ,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;AAElB,EAAE,IAAI,OAAO,KAAK,IAAI,EAAE;AACxB,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;AAC1B,IAAI,OAAO,CAAC,IAAI;AAChB,KAAK,+HAA+H;AACpI,KAAK,CAAA;AACL,IAAI,MAAM,CAAC,SAAS,GAAG,IAAI,CAAA;AAC3B,IAAG;;AAEH,GAAG,OAAO,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAA;AAChC,GAAE;AACF,EAAE,MAAM,SAAS,GAAG,OAAO,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,KAAK,CAAA;AACrE,EAAE,MAAM,SAAS,GAAG,OAAO,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,KAAK,CAAA;;AAErE,EAAE,IAAI,SAAS,EAAE;AACjB,GAAG,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;AACnD,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE;AACrD,IAAI,QAAQ,EAAE,IAAI;AAClB,IAAI,KAAK,EAAE,IAAI;AACf,IAAI,UAAU,EAAE,IAAI;AACpB,IAAI,CAAC,CAAA;AACL,GAAE;;AAEF,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AACnC,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;;AAE9B,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,IAAI,KAAK,GAAG,KAAK,CAAA;AACpB,GAAG,OAAO,KAAK,KAAK,IAAI,EAAE;AAC1B,IAAI,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;AAChD,KAAK,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;AAC7D,KAAI;AACJ,IAAI,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACtB,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;AACzB,IAAG;;AAEH,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,CAAA;AAC7C,GAAG,MAAM;AACT;AACA,GAAG,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;;AAEtE;AACA,GAAG,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;AACvB,GAAG,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAA;AAC3B,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,OAAO,CAAC,OAAO,EAAE;AAClB,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAA;;AAExF,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACnC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE;AAC7B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;AAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAEjC,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;AAC7B,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACpC,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE;AAC9B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;AAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAEnC,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;AAC9B,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACpC,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE;AACpB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;AAEzB,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAC9C,GAAE;;AAEF,EAAE,IAAI,KAAK,KAAK,GAAG,EAAE,OAAO,IAAI,CAAA;;AAEhC,EAAE,IAAI,KAAK,GAAG,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;AAC5F,EAAE,IAAI,KAAK,GAAG,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;;AAIpE,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;AAElB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAEjC,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,KAAK,CAAC,KAAK,GAAG,EAAE,CAAA;AACnB,GAAG,KAAK,CAAC,KAAK,GAAG,EAAE,CAAA;AACnB,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;;AAEjB,GAAG,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;AAC3D,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE;AACnB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;AAEzB,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAC9C,GAAE;;AAEF,EAAE,IAAI,KAAK,KAAK,GAAG,EAAE,OAAO,IAAI,CAAA;;AAEhC,EAAE,IAAI,KAAK,GAAG,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;AAC5F,EAAE,IAAI,KAAK,GAAG,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;;AAIpE,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;AAElB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAEjC,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,KAAK,CAAC,KAAK,EAAE,CAAA;;AAEhB,GAAG,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;AAC3D,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,QAAQ,GAAG;AACZ,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AACjE,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAA;AAC5B,EAAE,GAAG;AACL,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AACrE,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AAC3E,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AACrE,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,QAAQ,GAAE;AACpC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AACjE,EAAE,OAAO,EAAE,CAAA;AACX,EAAC;;AAED,CAAC,QAAQ,GAAG;AACZ,EAAE,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAC3C,EAAE,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,CAAA;AAC/D,EAAE,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AAC1B,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAA;AAC5B,EAAE,GAAG;AACL,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AAC/B,IAAI,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAC1C,IAAI,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;AAC5E,IAAI,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,OAAO,CAAA;AACnC,IAAG;;AAEH,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;AACjC,IAAI,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAC5C,IAAI,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;AAC9E,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,GAAG,OAAO,CAAA;AACrC,IAAG;;AAEH,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AAC/B,IAAI,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAC1C,IAAI,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;AAC5E,IAAI,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,OAAO,CAAA;AACnC,IAAG;AACH,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,QAAQ,GAAE;AACpC,EAAE,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AACvC,EAAE,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;AACzE,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,OAAO,CAAA;AAC7B,EAAC;;AAED,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;AAC5D,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;AAEzB,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAC9C,GAAE;;AAEF,EAAE,IAAI,MAAM,GAAG,EAAE,CAAA;;AAEjB;AACA,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;AAC7B,EAAE,OAAO,KAAK,KAAK,KAAK,CAAC,KAAK,GAAG,KAAK,IAAI,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE;AAC/D;AACA,GAAG,IAAI,KAAK,CAAC,KAAK,GAAG,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,GAAG,EAAE;AAC9C,IAAI,OAAO,MAAM,CAAA;AACjB,IAAG;;AAEH,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;;AAEF,EAAE,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK;AACpD,GAAG,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAA;;AAEnF,EAAE,MAAM,UAAU,GAAG,KAAK,CAAA;AAC1B,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,IAAI,KAAK,CAAC,KAAK,KAAK,UAAU,KAAK,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,EAAE;AACvE,IAAI,MAAM,IAAI,KAAK,CAAC,KAAK,CAAA;AACzB,IAAG;;AAEH,GAAG,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,GAAG,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,GAAG,CAAA;AAC5D,GAAG,IAAI,WAAW,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG;AACvD,IAAI,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAA;;AAEhF,GAAG,MAAM,UAAU,GAAG,UAAU,KAAK,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAA;AACpE,GAAG,MAAM,QAAQ,GAAG,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAA;;AAE/F,GAAG,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;;AAEtD,GAAG,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE;AAC3D,IAAI,MAAM,IAAI,KAAK,CAAC,KAAK,CAAA;AACzB,IAAG;;AAEH,GAAG,IAAI,WAAW,EAAE;AACpB,IAAI,MAAK;AACT,IAAG;;AAEH,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;;AAEF,EAAE,OAAO,MAAM,CAAA;AACf,EAAC;;AAED;AACA,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE;AAClB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,CAAA;AAC5B,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;AACxB,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;;AAE1C,EAAE,OAAO,KAAK,CAAA;AACd,EAAC;;AAED,CAAC,MAAM,CAAC,KAAK,EAAE;AACf,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAM;;AAItD,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAA;AACpC,EAAE,MAAM,aAAa,GAAG,KAAK,GAAG,KAAK,CAAC,GAAG,CAAA;;AAEzC,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;;AAEnE,GAAG,KAAK,GAAG,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;AAC5E,GAAE;AACF,EAAC;;AAED,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE;AAC3B,EAAE,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;AAC5C;AACA,GAAG,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAA;AAC/C,GAAG,MAAM,IAAI,KAAK;AAClB,IAAI,CAAC,mDAAmD,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;AACzG,IAAI,CAAA;AACJ,GAAE;;AAEF,EAAE,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAErC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAA;AAC3B,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAA;AAChC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAA;;AAErC,EAAE,IAAI,KAAK,KAAK,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;;AAEzD,EAAE,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAA;AAEhC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,QAAQ,GAAG;AACZ,EAAE,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAA;;AAEtB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;AAC7B,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,GAAG,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAA;AAC1B,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;;AAEF,EAAE,OAAO,GAAG,GAAG,IAAI,CAAC,KAAK,CAAA;AACzB,EAAC;;AAED,CAAC,OAAO,GAAG;AACX,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;AAC7B,EAAE,GAAG;AACL,GAAG;AACH,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE;AAC7C,KAAK,KAAK,CAAC,OAAO,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;AAClD,KAAK,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;AAC7C;AACA,IAAI,OAAO,KAAK,CAAA;AAChB,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,IAAI,GAAE;AAChC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,MAAM,GAAG;AACV,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;AAC7B,EAAE,IAAI,MAAM,GAAG,CAAC,CAAA;AAChB,EAAE,GAAG;AACL,GAAG,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAA;AAC3E,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,IAAI,GAAE;AAChC,EAAE,OAAO,MAAM,CAAA;AACf,EAAC;;AAED,CAAC,SAAS,GAAG;AACb,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;AAC9B,EAAC;;AAED,CAAC,IAAI,CAAC,QAAQ,EAAE;AAChB,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;AACnD,EAAC;;AAED,CAAC,cAAc,CAAC,QAAQ,EAAE;AAC1B,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,QAAQ,IAAI,KAAK,IAAI,IAAI,CAAC,CAAA;;AAEnD,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;AAEpC,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAA;;AAE5B,EAAE,GAAG;AACL,GAAG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;AACxB,GAAG,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;;AAEpC;AACA,GAAG,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,SAAS,KAAK,KAAK,EAAE;AAClC,KAAK,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAA;AAChC,KAAI;;AAEJ,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AACjC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;AAC/C,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;AAC3C,IAAG;;AAEH,GAAG,IAAI,OAAO,EAAE,OAAO,IAAI,CAAA;AAC3B,GAAG,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAA;AACzB,GAAG,QAAQ,KAAK,EAAC;;AAEjB,EAAE,OAAO,KAAK,CAAA;AACd,EAAC;;AAED,CAAC,OAAO,CAAC,QAAQ,EAAE;AACnB,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;AAC/B,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;AACD,CAAC,gBAAgB,CAAC,QAAQ,EAAE;AAC5B,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,IAAI,QAAQ,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAA;;AAExD,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;AAEpC,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;;AAE7B,EAAE,GAAG;AACL,GAAG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;AACxB,GAAG,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;;AAEtC,GAAG,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE;AAC1B;AACA,IAAI,IAAI,KAAK,KAAK,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAA;;AAE7D,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AACjC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;AAC/C,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;AAC3C,IAAG;;AAEH,GAAG,IAAI,OAAO,EAAE,OAAO,IAAI,CAAA;AAC3B,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAG,QAAQ,KAAK,EAAC;;AAEjB,EAAE,OAAO,KAAK,CAAA;AACd,EAAC;;AAED,CAAC,SAAS,CAAC,QAAQ,EAAE;AACrB,EAAE,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAA;AACjC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,UAAU,GAAG;AACd,EAAE,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAA;AAC1C,EAAC;;AAED,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE;AAC1C,EAAE,SAAS,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE;AACtC,GAAG,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;AACxC,IAAI,OAAO,WAAW,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK;AAC1D;AACA,KAAK,IAAI,CAAC,KAAK,GAAG,EAAE,OAAO,GAAG,CAAA;AAC9B,KAAK,IAAI,CAAC,KAAK,GAAG,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAA;AACnC,KAAK,MAAM,GAAG,GAAG,CAAC,CAAC,CAAA;AACnB,KAAK,IAAI,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;AAC7C,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AACnB,KAAK,CAAC,CAAA;AACN,IAAI,MAAM;AACV,IAAI,OAAO,WAAW,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;AAChE,IAAG;AACH,GAAE;AACF,EAAE,SAAS,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE;AAC7B,GAAG,IAAI,KAAK,CAAA;AACZ,GAAG,MAAM,OAAO,GAAG,EAAE,CAAA;AACrB,GAAG,QAAQ,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG;AAClC,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AACvB,IAAG;AACH,GAAG,OAAO,OAAO,CAAA;AACjB,GAAE;AACF,EAAE,IAAI,WAAW,CAAC,MAAM,EAAE;AAC1B,GAAG,MAAM,OAAO,GAAG,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;AACvD,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,KAAK;AAC9B,IAAI,IAAI,KAAK,CAAC,KAAK,IAAI,IAAI,EAAE;AAC7B,KAAK,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;AAC7D,KAAK,IAAI,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;AACnC,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;AAC7E,MAAK;AACL,KAAI;AACJ,IAAI,CAAC,CAAA;AACL,GAAG,MAAM;AACT,GAAG,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;AACjD,GAAG,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,IAAI,IAAI,EAAE;AACrC,IAAI,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;AAC5D,IAAI,IAAI,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;AAClC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;AAC5E,KAAI;AACJ,IAAG;AACH,GAAE;AACF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;AACrC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;AAC3B,EAAE,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;;AAExC,EAAE,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;AACpB,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;AAC5D,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,EAAE;AACnC,EAAE,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;AACvC,GAAG,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AACvD,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AACtD,EAAC;;AAED,CAAC,iBAAiB,CAAC,MAAM,EAAE,WAAW,EAAE;AACxC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;AAC3B,EAAE,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAA;AACpC,EAAE;AACF,GAAG,IAAI,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;AACvC,GAAG,KAAK,KAAK,CAAC,CAAC;AACf,GAAG,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,GAAG,YAAY,CAAA;AACxD,IAAI;AACJ,GAAG,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,CAAC,CAAA;AAC/D,GAAG,IAAI,QAAQ,KAAK,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,EAAE,WAAW,CAAC,CAAA;AACzF,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE;AACtC,EAAE,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;AACvC,GAAG,OAAO,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AAC1D,GAAE;;AAEF,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE;AAC3B,GAAG,MAAM,IAAI,SAAS;AACtB,IAAI,2EAA2E;AAC/E,IAAI,CAAA;AACJ,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AACtD,EAAC;AACD;;AC33BA,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD;AACe,MAAM,MAAM,CAAC;AAC5B,CAAC,WAAW,CAAC,OAAO,GAAG,EAAE,EAAE;AAC3B,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;AACnC,EAAE,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;AAC9E,EAAE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;AACpB,EAAE,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;AAC1B,EAAE,IAAI,CAAC,2BAA2B,GAAG,EAAE,CAAC;AACxC,EAAE;AACF;AACA,CAAC,SAAS,CAAC,MAAM,EAAE;AACnB,EAAE,IAAI,MAAM,YAAY,WAAW,EAAE;AACrC,GAAG,OAAO,IAAI,CAAC,SAAS,CAAC;AACzB,IAAI,OAAO,EAAE,MAAM;AACnB,IAAI,QAAQ,EAAE,MAAM,CAAC,QAAQ;AAC7B,IAAI,SAAS,EAAE,IAAI,CAAC,SAAS;AAC7B,IAAI,CAAC,CAAC;AACN,GAAG;AACH;AACA,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;AAC5C,GAAG,MAAM,IAAI,KAAK;AAClB,IAAI,sIAAsI;AAC1I,IAAI,CAAC;AACL,GAAG;AACH;AACA,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,uBAAuB,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACvF,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AACjF,GAAG,CAAC,CAAC;AACL;AACA,EAAE,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,EAAE;AACtC;AACA,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;AACrC,GAAG;AACH;AACA,EAAE,IAAI,MAAM,CAAC,QAAQ,EAAE;AACvB,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,2BAA2B,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE;AAC5E,IAAI,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;AAClF,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC7F,IAAI,MAAM;AACV,IAAI,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC/F,IAAI,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,KAAK,YAAY,CAAC,OAAO,EAAE;AAC1D,KAAK,MAAM,IAAI,KAAK,CAAC,CAAC,+BAA+B,EAAE,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC,CAAC;AAC/F,KAAK;AACL,IAAI;AACJ,GAAG;AACH;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5B,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE;AACtB,EAAE,IAAI,CAAC,SAAS,CAAC;AACjB,GAAG,OAAO,EAAE,IAAI,WAAW,CAAC,GAAG,CAAC;AAChC,GAAG,SAAS,EAAE,CAAC,OAAO,IAAI,OAAO,CAAC,SAAS,KAAK,EAAE;AAClD,GAAG,CAAC,CAAC;AACL;AACA,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,KAAK,GAAG;AACT,EAAE,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC;AAC5B,GAAG,KAAK,EAAE,IAAI,CAAC,KAAK;AACpB,GAAG,SAAS,EAAE,IAAI,CAAC,SAAS;AAC5B,GAAG,CAAC,CAAC;AACL;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACnC,GAAG,MAAM,CAAC,SAAS,CAAC;AACpB,IAAI,QAAQ,EAAE,MAAM,CAAC,QAAQ;AAC7B,IAAI,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE;AACnC,IAAI,SAAS,EAAE,MAAM,CAAC,SAAS;AAC/B,IAAI,CAAC,CAAC;AACN,GAAG,CAAC,CAAC;AACL;AACA,EAAE,OAAO,MAAM,CAAC;AAChB,EAAE;AACF;AACA,CAAC,kBAAkB,CAAC,OAAO,GAAG,EAAE,EAAE;AAClC,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;AACnB,EAAE,IAAI,mBAAmB,GAAG,SAAS,CAAC;AACtC,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACnC,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK;AAC7D,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChD,IAAI,CAAC,CAAC;AACN,GAAG,CAAC,CAAC;AACL;AACA,EAAE,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC/C;AACA,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;AAClB,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAChC,GAAG;AACH;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK;AACtC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE;AACd,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACrC,IAAI;AACJ;AACA,GAAG,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AAChG,GAAG,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC;AACtC,GAAG,MAAM,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;AACnD;AACA,GAAG,IAAI,WAAW,CAAC,KAAK,EAAE;AAC1B,IAAI,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACxC,IAAI;AACJ;AACA,GAAG,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,KAAK,KAAK;AAC9C,IAAI,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACpC;AACA,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC1D;AACA,IAAI,IAAI,MAAM,CAAC,QAAQ,EAAE;AACzB,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE;AACvB,MAAM,QAAQ,CAAC,OAAO;AACtB,OAAO,WAAW;AAClB,OAAO,KAAK,CAAC,OAAO;AACpB,OAAO,GAAG;AACV,OAAO,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC3D,OAAO,CAAC;AACR,MAAM,MAAM;AACZ,MAAM,QAAQ,CAAC,gBAAgB;AAC/B,OAAO,WAAW;AAClB,OAAO,KAAK;AACZ,OAAO,WAAW,CAAC,QAAQ;AAC3B,OAAO,GAAG;AACV,OAAO,WAAW,CAAC,kBAAkB;AACrC,OAAO,CAAC;AACR,MAAM;AACN,KAAK,MAAM;AACX,KAAK,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACrC,KAAK;AACL;AACA,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC1D,IAAI,CAAC,CAAC;AACN;AACA,GAAG,IAAI,WAAW,CAAC,KAAK,EAAE;AAC1B,IAAI,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACxC,IAAI;AACJ;AACA,GAAG,IAAI,MAAM,CAAC,UAAU,IAAI,WAAW,KAAK,CAAC,CAAC,EAAE;AAChD,IAAI,IAAI,mBAAmB,KAAK,SAAS,EAAE;AAC3C,KAAK,mBAAmB,GAAG,EAAE,CAAC;AAC9B,KAAK;AACL,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAC1C,IAAI;AACJ,GAAG,CAAC,CAAC;AACL;AACA,EAAE,OAAO;AACT,GAAG,IAAI,EAAE,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,SAAS;AACrE,GAAG,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK;AAC/C,IAAI,OAAO,OAAO,CAAC,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3F,IAAI,CAAC;AACL,GAAG,cAAc,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK;AACtD,IAAI,OAAO,OAAO,CAAC,cAAc,GAAG,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;AAC1D,IAAI,CAAC;AACL,GAAG,KAAK;AACR,GAAG,QAAQ,EAAE,QAAQ,CAAC,GAAG;AACzB,GAAG,mBAAmB;AACtB,GAAG,CAAC;AACJ,EAAE;AACF;AACA,CAAC,WAAW,CAAC,OAAO,EAAE;AACtB,EAAE,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;AACzD,EAAE;AACF;AACA,CAAC,eAAe,GAAG;AACnB,EAAE,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAChC;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACnC,GAAG,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC;AAC1D;AACA,GAAG,IAAI,SAAS,KAAK,IAAI,EAAE,OAAO;AAClC;AACA,GAAG,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AACzE,GAAG,kBAAkB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACtC,GAAG,CAAC,CAAC;AACL;AACA,EAAE;AACF,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;AAClD,IAAI,OAAO,kBAAkB,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;AACzD,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI;AAChB,IAAI;AACJ,EAAE;AACF;AACA,CAAC,MAAM,CAAC,SAAS,EAAE;AACnB,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;AACzB,GAAG,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;AACtC,GAAG;AACH;AACA,EAAE,IAAI,SAAS,KAAK,EAAE,EAAE,OAAO,IAAI,CAAC;AACpC;AACA,EAAE,IAAI,eAAe,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AACrE;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK;AACtC,GAAG,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,KAAK,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;AACxF,GAAG,MAAM,WAAW,GAAG,eAAe,KAAK,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;AAC9E;AACA,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE;AACpC,IAAI,OAAO,EAAE,MAAM,CAAC,qBAAqB;AACzC,IAAI,WAAW;AACf,IAAI,CAAC,CAAC;AACN;AACA,GAAG,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC;AACxD,GAAG,CAAC,CAAC;AACL;AACA,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;AAClB,GAAG,IAAI,CAAC,KAAK;AACb,IAAI,SAAS;AACb,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK;AACrD,KAAK,OAAO,KAAK,GAAG,CAAC,GAAG,SAAS,GAAG,KAAK,GAAG,KAAK,CAAC;AAClD,KAAK,CAAC,CAAC;AACP,GAAG;AACH;AACA,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,OAAO,CAAC,GAAG,EAAE;AACd,EAAE,IAAI,CAAC,KAAK,GAAG,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC;AAChC,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,QAAQ,GAAG;AACZ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO;AAC3B,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK;AACvB,IAAI,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,KAAK,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;AACzF,IAAI,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,GAAG,EAAE,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;AACrE;AACA,IAAI,OAAO,GAAG,CAAC;AACf,IAAI,CAAC;AACL,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC;AACb;AACA,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;AAC3B,EAAE;AACF;AACA,CAAC,OAAO,GAAG;AACX,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,OAAO,KAAK,CAAC;AAC3D,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,KAAK,CAAC;AAC7E,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,MAAM,GAAG;AACV,EAAE,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM;AAC5B,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE;AACvD,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM;AACpB,GAAG,CAAC;AACJ,EAAE;AACF;AACA,CAAC,SAAS,GAAG;AACb,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC/B,EAAE;AACF;AACA,CAAC,IAAI,CAAC,QAAQ,EAAE;AAChB,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACpD,EAAE;AACF;AACA,CAAC,SAAS,CAAC,QAAQ,EAAE;AACrB,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,IAAI,QAAQ,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC;AACzD,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1C;AACA,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;AACnB,GAAG,IAAI,MAAM,CAAC;AACd,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;AACb;AACA,GAAG,GAAG;AACN,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,IAAI,CAAC,MAAM,EAAE;AACjB,KAAK,MAAM;AACX,KAAK;AACL,IAAI,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE;AACxD,GAAG;AACH;AACA,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,OAAO,CAAC,QAAQ,EAAE;AACnB,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,QAAQ,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC;AACpD;AACA,EAAE,IAAI,MAAM,CAAC;AACb,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;AAClC;AACA,EAAE,GAAG;AACL,GAAG,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;AAC9B,GAAG,IAAI,CAAC,MAAM,EAAE;AAChB,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC5C,IAAI,MAAM;AACV,IAAI;AACJ,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;AACrD;AACA,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;;ACpSA,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC;AAC5B,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC;AAClC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC;;;;"} \ No newline at end of file diff --git a/vuetest/node_modules/magic-string/dist/magic-string.es.d.mts b/vuetest/node_modules/magic-string/dist/magic-string.es.d.mts new file mode 100644 index 0000000..76cc537 --- /dev/null +++ b/vuetest/node_modules/magic-string/dist/magic-string.es.d.mts @@ -0,0 +1,289 @@ +export interface BundleOptions { + intro?: string; + separator?: string; +} + +export interface SourceMapOptions { + /** + * Whether the mapping should be high-resolution. + * Hi-res mappings map every single character, meaning (for example) your devtools will always + * be able to pinpoint the exact location of function calls and so on. + * With lo-res mappings, devtools may only be able to identify the correct + * line - but they're quicker to generate and less bulky. + * You can also set `"boundary"` to generate a semi-hi-res mappings segmented per word boundary + * instead of per character, suitable for string semantics that are separated by words. + * If sourcemap locations have been specified with s.addSourceMapLocation(), they will be used here. + */ + hires?: boolean | 'boundary'; + /** + * The filename where you plan to write the sourcemap. + */ + file?: string; + /** + * The filename of the file containing the original source. + */ + source?: string; + /** + * Whether to include the original content in the map's sourcesContent array. + */ + includeContent?: boolean; +} + +export type SourceMapSegment = + | [number] + | [number, number, number, number] + | [number, number, number, number, number]; + +export interface DecodedSourceMap { + file: string; + sources: string[]; + sourcesContent?: string[]; + names: string[]; + mappings: SourceMapSegment[][]; + x_google_ignoreList?: number[]; +} + +export class SourceMap { + constructor(properties: DecodedSourceMap); + + version: number; + file: string; + sources: string[]; + sourcesContent?: string[]; + names: string[]; + mappings: string; + x_google_ignoreList?: number[]; + debugId?: string; + + /** + * Returns the equivalent of `JSON.stringify(map)` + */ + toString(): string; + /** + * Returns a DataURI containing the sourcemap. Useful for doing this sort of thing: + * `generateMap(options?: SourceMapOptions): SourceMap;` + */ + toUrl(): string; +} + +export class Bundle { + constructor(options?: BundleOptions); + /** + * Adds the specified source to the bundle, which can either be a `MagicString` object directly, + * or an options object that holds a magic string `content` property and optionally provides + * a `filename` for the source within the bundle, as well as an optional `ignoreList` hint + * (which defaults to `false`). The `filename` is used when constructing the source map for the + * bundle, to identify this `source` in the source map's `sources` field. The `ignoreList` hint + * is used to populate the `x_google_ignoreList` extension field in the source map, which is a + * mechanism for tools to signal to debuggers that certain sources should be ignored by default + * (depending on user preferences). + */ + addSource( + source: MagicString | { filename?: string; content: MagicString; ignoreList?: boolean }, + ): this; + append(str: string, options?: BundleOptions): this; + clone(): this; + generateMap( + options?: SourceMapOptions, + ): Omit<SourceMap, 'sourcesContent'> & { sourcesContent: Array<string | null> }; + generateDecodedMap( + options?: SourceMapOptions, + ): Omit<DecodedSourceMap, 'sourcesContent'> & { sourcesContent: Array<string | null> }; + getIndentString(): string; + indent(indentStr?: string): this; + indentExclusionRanges: ExclusionRange | Array<ExclusionRange>; + prepend(str: string): this; + toString(): string; + trimLines(): this; + trim(charType?: string): this; + trimStart(charType?: string): this; + trimEnd(charType?: string): this; + isEmpty(): boolean; + length(): number; +} + +export type ExclusionRange = [number, number]; + +export interface MagicStringOptions { + filename?: string; + indentExclusionRanges?: ExclusionRange | Array<ExclusionRange>; + offset?: number; +} + +export interface IndentOptions { + exclude?: ExclusionRange | Array<ExclusionRange>; + indentStart?: boolean; +} + +export interface OverwriteOptions { + storeName?: boolean; + contentOnly?: boolean; +} + +export interface UpdateOptions { + storeName?: boolean; + overwrite?: boolean; +} + +export default class MagicString { + constructor(str: string, options?: MagicStringOptions); + /** + * Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false. + */ + addSourcemapLocation(char: number): void; + /** + * Appends the specified content to the end of the string. + */ + append(content: string): this; + /** + * Appends the specified content at the index in the original string. + * If a range *ending* with index is subsequently moved, the insert will be moved with it. + * See also `s.prependLeft(...)`. + */ + appendLeft(index: number, content: string): this; + /** + * Appends the specified content at the index in the original string. + * If a range *starting* with index is subsequently moved, the insert will be moved with it. + * See also `s.prependRight(...)`. + */ + appendRight(index: number, content: string): this; + /** + * Does what you'd expect. + */ + clone(): this; + /** + * Generates a version 3 sourcemap. + */ + generateMap(options?: SourceMapOptions): SourceMap; + /** + * Generates a sourcemap object with raw mappings in array form, rather than encoded as a string. + * Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead. + */ + generateDecodedMap(options?: SourceMapOptions): DecodedSourceMap; + getIndentString(): string; + + /** + * Prefixes each line of the string with prefix. + * If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character. + */ + indent(options?: IndentOptions): this; + /** + * Prefixes each line of the string with prefix. + * If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character. + * + * The options argument can have an exclude property, which is an array of [start, end] character ranges. + * These ranges will be excluded from the indentation - useful for (e.g.) multiline strings. + */ + indent(indentStr?: string, options?: IndentOptions): this; + indentExclusionRanges: ExclusionRange | Array<ExclusionRange>; + + /** + * Moves the characters from `start` and `end` to `index`. + */ + move(start: number, end: number, index: number): this; + /** + * Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in + * that range. The same restrictions as `s.remove()` apply. + * + * The fourth argument is optional. It can have a storeName property — if true, the original name will be stored + * for later inclusion in a sourcemap's names array — and a contentOnly property which determines whether only + * the content is overwritten, or anything that was appended/prepended to the range as well. + * + * It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content. + */ + overwrite( + start: number, + end: number, + content: string, + options?: boolean | OverwriteOptions, + ): this; + /** + * Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply. + * + * The fourth argument is optional. It can have a storeName property — if true, the original name will be stored + * for later inclusion in a sourcemap's names array — and an overwrite property which determines whether only + * the content is overwritten, or anything that was appended/prepended to the range as well. + */ + update(start: number, end: number, content: string, options?: boolean | UpdateOptions): this; + /** + * Prepends the string with the specified content. + */ + prepend(content: string): this; + /** + * Same as `s.appendLeft(...)`, except that the inserted content will go *before* any previous appends or prepends at index + */ + prependLeft(index: number, content: string): this; + /** + * Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index` + */ + prependRight(index: number, content: string): this; + /** + * Removes the characters from `start` to `end` (of the original string, **not** the generated string). + * Removing the same content twice, or making removals that partially overlap, will cause an error. + */ + remove(start: number, end: number): this; + /** + * Reset the modified characters from `start` to `end` (of the original string, **not** the generated string). + */ + reset(start: number, end: number): this; + /** + * Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string. + * Throws error if the indices are for characters that were already removed. + */ + slice(start: number, end: number): string; + /** + * Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed. + */ + snip(start: number, end: number): this; + /** + * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end. + */ + trim(charType?: string): this; + /** + * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start. + */ + trimStart(charType?: string): this; + /** + * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end. + */ + trimEnd(charType?: string): this; + /** + * Removes empty lines from the start and end. + */ + trimLines(): this; + /** + * String replacement with RegExp or string. + */ + replace( + regex: RegExp | string, + replacement: string | ((substring: string, ...args: any[]) => string), + ): this; + /** + * Same as `s.replace`, but replace all matched strings instead of just one. + */ + replaceAll( + regex: RegExp | string, + replacement: string | ((substring: string, ...args: any[]) => string), + ): this; + + lastChar(): string; + lastLine(): string; + /** + * Returns true if the resulting source is empty (disregarding white space). + */ + isEmpty(): boolean; + length(): number; + + /** + * Indicates if the string has been changed. + */ + hasChanged(): boolean; + + original: string; + /** + * Returns the generated string. + */ + toString(): string; + + offset: number; +} diff --git a/vuetest/node_modules/magic-string/dist/magic-string.es.mjs b/vuetest/node_modules/magic-string/dist/magic-string.es.mjs new file mode 100644 index 0000000..76f3642 --- /dev/null +++ b/vuetest/node_modules/magic-string/dist/magic-string.es.mjs @@ -0,0 +1,1569 @@ +import { encode } from '@jridgewell/sourcemap-codec'; + +class BitSet { + constructor(arg) { + this.bits = arg instanceof BitSet ? arg.bits.slice() : []; + } + + add(n) { + this.bits[n >> 5] |= 1 << (n & 31); + } + + has(n) { + return !!(this.bits[n >> 5] & (1 << (n & 31))); + } +} + +class Chunk { + constructor(start, end, content) { + this.start = start; + this.end = end; + this.original = content; + + this.intro = ''; + this.outro = ''; + + this.content = content; + this.storeName = false; + this.edited = false; + + { + this.previous = null; + this.next = null; + } + } + + appendLeft(content) { + this.outro += content; + } + + appendRight(content) { + this.intro = this.intro + content; + } + + clone() { + const chunk = new Chunk(this.start, this.end, this.original); + + chunk.intro = this.intro; + chunk.outro = this.outro; + chunk.content = this.content; + chunk.storeName = this.storeName; + chunk.edited = this.edited; + + return chunk; + } + + contains(index) { + return this.start < index && index < this.end; + } + + eachNext(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.next; + } + } + + eachPrevious(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.previous; + } + } + + edit(content, storeName, contentOnly) { + this.content = content; + if (!contentOnly) { + this.intro = ''; + this.outro = ''; + } + this.storeName = storeName; + + this.edited = true; + + return this; + } + + prependLeft(content) { + this.outro = content + this.outro; + } + + prependRight(content) { + this.intro = content + this.intro; + } + + reset() { + this.intro = ''; + this.outro = ''; + if (this.edited) { + this.content = this.original; + this.storeName = false; + this.edited = false; + } + } + + split(index) { + const sliceIndex = index - this.start; + + const originalBefore = this.original.slice(0, sliceIndex); + const originalAfter = this.original.slice(sliceIndex); + + this.original = originalBefore; + + const newChunk = new Chunk(index, this.end, originalAfter); + newChunk.outro = this.outro; + this.outro = ''; + + this.end = index; + + if (this.edited) { + // after split we should save the edit content record into the correct chunk + // to make sure sourcemap correct + // For example: + // ' test'.trim() + // split -> ' ' + 'test' + // ✔️ edit -> '' + 'test' + // ✖️ edit -> 'test' + '' + // TODO is this block necessary?... + newChunk.edit('', false); + this.content = ''; + } else { + this.content = originalBefore; + } + + newChunk.next = this.next; + if (newChunk.next) newChunk.next.previous = newChunk; + newChunk.previous = this; + this.next = newChunk; + + return newChunk; + } + + toString() { + return this.intro + this.content + this.outro; + } + + trimEnd(rx) { + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + this.split(this.start + trimmed.length).edit('', undefined, true); + if (this.edited) { + // save the change, if it has been edited + this.edit(trimmed, this.storeName, true); + } + } + return true; + } else { + this.edit('', undefined, true); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + } + } + + trimStart(rx) { + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + const newChunk = this.split(this.end - trimmed.length); + if (this.edited) { + // save the change, if it has been edited + newChunk.edit(trimmed, this.storeName, true); + } + this.edit('', undefined, true); + } + return true; + } else { + this.edit('', undefined, true); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + } + } +} + +function getBtoa() { + if (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') { + return (str) => globalThis.btoa(unescape(encodeURIComponent(str))); + } else if (typeof Buffer === 'function') { + return (str) => Buffer.from(str, 'utf-8').toString('base64'); + } else { + return () => { + throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.'); + }; + } +} + +const btoa = /*#__PURE__*/ getBtoa(); + +class SourceMap { + constructor(properties) { + this.version = 3; + this.file = properties.file; + this.sources = properties.sources; + this.sourcesContent = properties.sourcesContent; + this.names = properties.names; + this.mappings = encode(properties.mappings); + if (typeof properties.x_google_ignoreList !== 'undefined') { + this.x_google_ignoreList = properties.x_google_ignoreList; + } + if (typeof properties.debugId !== 'undefined') { + this.debugId = properties.debugId; + } + } + + toString() { + return JSON.stringify(this); + } + + toUrl() { + return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString()); + } +} + +function guessIndent(code) { + const lines = code.split('\n'); + + const tabbed = lines.filter((line) => /^\t+/.test(line)); + const spaced = lines.filter((line) => /^ {2,}/.test(line)); + + if (tabbed.length === 0 && spaced.length === 0) { + return null; + } + + // More lines tabbed than spaced? Assume tabs, and + // default to tabs in the case of a tie (or nothing + // to go on) + if (tabbed.length >= spaced.length) { + return '\t'; + } + + // Otherwise, we need to guess the multiple + const min = spaced.reduce((previous, current) => { + const numSpaces = /^ +/.exec(current)[0].length; + return Math.min(numSpaces, previous); + }, Infinity); + + return new Array(min + 1).join(' '); +} + +function getRelativePath(from, to) { + const fromParts = from.split(/[/\\]/); + const toParts = to.split(/[/\\]/); + + fromParts.pop(); // get dirname + + while (fromParts[0] === toParts[0]) { + fromParts.shift(); + toParts.shift(); + } + + if (fromParts.length) { + let i = fromParts.length; + while (i--) fromParts[i] = '..'; + } + + return fromParts.concat(toParts).join('/'); +} + +const toString = Object.prototype.toString; + +function isObject(thing) { + return toString.call(thing) === '[object Object]'; +} + +function getLocator(source) { + const originalLines = source.split('\n'); + const lineOffsets = []; + + for (let i = 0, pos = 0; i < originalLines.length; i++) { + lineOffsets.push(pos); + pos += originalLines[i].length + 1; + } + + return function locate(index) { + let i = 0; + let j = lineOffsets.length; + while (i < j) { + const m = (i + j) >> 1; + if (index < lineOffsets[m]) { + j = m; + } else { + i = m + 1; + } + } + const line = i - 1; + const column = index - lineOffsets[line]; + return { line, column }; + }; +} + +const wordRegex = /\w/; + +class Mappings { + constructor(hires) { + this.hires = hires; + this.generatedCodeLine = 0; + this.generatedCodeColumn = 0; + this.raw = []; + this.rawSegments = this.raw[this.generatedCodeLine] = []; + this.pending = null; + } + + addEdit(sourceIndex, content, loc, nameIndex) { + if (content.length) { + const contentLengthMinusOne = content.length - 1; + let contentLineEnd = content.indexOf('\n', 0); + let previousContentLineEnd = -1; + // Loop through each line in the content and add a segment, but stop if the last line is empty, + // else code afterwards would fill one line too many + while (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); + + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; + + previousContentLineEnd = contentLineEnd; + contentLineEnd = content.indexOf('\n', contentLineEnd + 1); + } + + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); + + this.advance(content.slice(previousContentLineEnd + 1)); + } else if (this.pending) { + this.rawSegments.push(this.pending); + this.advance(content); + } + + this.pending = null; + } + + addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) { + let originalCharIndex = chunk.start; + let first = true; + // when iterating each char, check if it's in a word boundary + let charInHiresBoundary = false; + + while (originalCharIndex < chunk.end) { + if (original[originalCharIndex] === '\n') { + loc.line += 1; + loc.column = 0; + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; + first = true; + charInHiresBoundary = false; + } else { + if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + + if (this.hires === 'boundary') { + // in hires "boundary", group segments per word boundary than per char + if (wordRegex.test(original[originalCharIndex])) { + // for first char in the boundary found, start the boundary by pushing a segment + if (!charInHiresBoundary) { + this.rawSegments.push(segment); + charInHiresBoundary = true; + } + } else { + // for non-word char, end the boundary by pushing a segment + this.rawSegments.push(segment); + charInHiresBoundary = false; + } + } else { + this.rawSegments.push(segment); + } + } + + loc.column += 1; + this.generatedCodeColumn += 1; + first = false; + } + + originalCharIndex += 1; + } + + this.pending = null; + } + + advance(str) { + if (!str) return; + + const lines = str.split('\n'); + + if (lines.length > 1) { + for (let i = 0; i < lines.length - 1; i++) { + this.generatedCodeLine++; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + } + this.generatedCodeColumn = 0; + } + + this.generatedCodeColumn += lines[lines.length - 1].length; + } +} + +const n = '\n'; + +const warned = { + insertLeft: false, + insertRight: false, + storeName: false, +}; + +class MagicString { + constructor(string, options = {}) { + const chunk = new Chunk(0, string.length, string); + + Object.defineProperties(this, { + original: { writable: true, value: string }, + outro: { writable: true, value: '' }, + intro: { writable: true, value: '' }, + firstChunk: { writable: true, value: chunk }, + lastChunk: { writable: true, value: chunk }, + lastSearchedChunk: { writable: true, value: chunk }, + byStart: { writable: true, value: {} }, + byEnd: { writable: true, value: {} }, + filename: { writable: true, value: options.filename }, + indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, + sourcemapLocations: { writable: true, value: new BitSet() }, + storedNames: { writable: true, value: {} }, + indentStr: { writable: true, value: undefined }, + ignoreList: { writable: true, value: options.ignoreList }, + offset: { writable: true, value: options.offset || 0 }, + }); + + this.byStart[0] = chunk; + this.byEnd[string.length] = chunk; + } + + addSourcemapLocation(char) { + this.sourcemapLocations.add(char); + } + + append(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); + + this.outro += content; + return this; + } + + appendLeft(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byEnd[index]; + + if (chunk) { + chunk.appendLeft(content); + } else { + this.intro += content; + } + return this; + } + + appendRight(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byStart[index]; + + if (chunk) { + chunk.appendRight(content); + } else { + this.outro += content; + } + return this; + } + + clone() { + const cloned = new MagicString(this.original, { filename: this.filename, offset: this.offset }); + + let originalChunk = this.firstChunk; + let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone()); + + while (originalChunk) { + cloned.byStart[clonedChunk.start] = clonedChunk; + cloned.byEnd[clonedChunk.end] = clonedChunk; + + const nextOriginalChunk = originalChunk.next; + const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); + + if (nextClonedChunk) { + clonedChunk.next = nextClonedChunk; + nextClonedChunk.previous = clonedChunk; + + clonedChunk = nextClonedChunk; + } + + originalChunk = nextOriginalChunk; + } + + cloned.lastChunk = clonedChunk; + + if (this.indentExclusionRanges) { + cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); + } + + cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); + + cloned.intro = this.intro; + cloned.outro = this.outro; + + return cloned; + } + + generateDecodedMap(options) { + options = options || {}; + + const sourceIndex = 0; + const names = Object.keys(this.storedNames); + const mappings = new Mappings(options.hires); + + const locate = getLocator(this.original); + + if (this.intro) { + mappings.advance(this.intro); + } + + this.firstChunk.eachNext((chunk) => { + const loc = locate(chunk.start); + + if (chunk.intro.length) mappings.advance(chunk.intro); + + if (chunk.edited) { + mappings.addEdit( + sourceIndex, + chunk.content, + loc, + chunk.storeName ? names.indexOf(chunk.original) : -1, + ); + } else { + mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations); + } + + if (chunk.outro.length) mappings.advance(chunk.outro); + }); + + return { + file: options.file ? options.file.split(/[/\\]/).pop() : undefined, + sources: [ + options.source ? getRelativePath(options.file || '', options.source) : options.file || '', + ], + sourcesContent: options.includeContent ? [this.original] : undefined, + names, + mappings: mappings.raw, + x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined, + }; + } + + generateMap(options) { + return new SourceMap(this.generateDecodedMap(options)); + } + + _ensureindentStr() { + if (this.indentStr === undefined) { + this.indentStr = guessIndent(this.original); + } + } + + _getRawIndentString() { + this._ensureindentStr(); + return this.indentStr; + } + + getIndentString() { + this._ensureindentStr(); + return this.indentStr === null ? '\t' : this.indentStr; + } + + indent(indentStr, options) { + const pattern = /^[^\r\n]/gm; + + if (isObject(indentStr)) { + options = indentStr; + indentStr = undefined; + } + + if (indentStr === undefined) { + this._ensureindentStr(); + indentStr = this.indentStr || '\t'; + } + + if (indentStr === '') return this; // noop + + options = options || {}; + + // Process exclusion ranges + const isExcluded = {}; + + if (options.exclude) { + const exclusions = + typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude; + exclusions.forEach((exclusion) => { + for (let i = exclusion[0]; i < exclusion[1]; i += 1) { + isExcluded[i] = true; + } + }); + } + + let shouldIndentNextCharacter = options.indentStart !== false; + const replacer = (match) => { + if (shouldIndentNextCharacter) return `${indentStr}${match}`; + shouldIndentNextCharacter = true; + return match; + }; + + this.intro = this.intro.replace(pattern, replacer); + + let charIndex = 0; + let chunk = this.firstChunk; + + while (chunk) { + const end = chunk.end; + + if (chunk.edited) { + if (!isExcluded[charIndex]) { + chunk.content = chunk.content.replace(pattern, replacer); + + if (chunk.content.length) { + shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n'; + } + } + } else { + charIndex = chunk.start; + + while (charIndex < end) { + if (!isExcluded[charIndex]) { + const char = this.original[charIndex]; + + if (char === '\n') { + shouldIndentNextCharacter = true; + } else if (char !== '\r' && shouldIndentNextCharacter) { + shouldIndentNextCharacter = false; + + if (charIndex === chunk.start) { + chunk.prependRight(indentStr); + } else { + this._splitChunk(chunk, charIndex); + chunk = chunk.next; + chunk.prependRight(indentStr); + } + } + } + + charIndex += 1; + } + } + + charIndex = chunk.end; + chunk = chunk.next; + } + + this.outro = this.outro.replace(pattern, replacer); + + return this; + } + + insert() { + throw new Error( + 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)', + ); + } + + insertLeft(index, content) { + if (!warned.insertLeft) { + console.warn( + 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead', + ); + warned.insertLeft = true; + } + + return this.appendLeft(index, content); + } + + insertRight(index, content) { + if (!warned.insertRight) { + console.warn( + 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead', + ); + warned.insertRight = true; + } + + return this.prependRight(index, content); + } + + move(start, end, index) { + start = start + this.offset; + end = end + this.offset; + index = index + this.offset; + + if (index >= start && index <= end) throw new Error('Cannot move a selection inside itself'); + + this._split(start); + this._split(end); + this._split(index); + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + const oldLeft = first.previous; + const oldRight = last.next; + + const newRight = this.byStart[index]; + if (!newRight && last === this.lastChunk) return this; + const newLeft = newRight ? newRight.previous : this.lastChunk; + + if (oldLeft) oldLeft.next = oldRight; + if (oldRight) oldRight.previous = oldLeft; + + if (newLeft) newLeft.next = first; + if (newRight) newRight.previous = last; + + if (!first.previous) this.firstChunk = last.next; + if (!last.next) { + this.lastChunk = first.previous; + this.lastChunk.next = null; + } + + first.previous = newLeft; + last.next = newRight || null; + + if (!newLeft) this.firstChunk = first; + if (!newRight) this.lastChunk = last; + return this; + } + + overwrite(start, end, content, options) { + options = options || {}; + return this.update(start, end, content, { ...options, overwrite: !options.contentOnly }); + } + + update(start, end, content, options) { + start = start + this.offset; + end = end + this.offset; + + if (typeof content !== 'string') throw new TypeError('replacement content must be a string'); + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + if (end > this.original.length) throw new Error('end is out of bounds'); + if (start === end) + throw new Error( + 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead', + ); + + this._split(start); + this._split(end); + + if (options === true) { + if (!warned.storeName) { + console.warn( + 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string', + ); + warned.storeName = true; + } + + options = { storeName: true }; + } + const storeName = options !== undefined ? options.storeName : false; + const overwrite = options !== undefined ? options.overwrite : false; + + if (storeName) { + const original = this.original.slice(start, end); + Object.defineProperty(this.storedNames, original, { + writable: true, + value: true, + enumerable: true, + }); + } + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + if (first) { + let chunk = first; + while (chunk !== last) { + if (chunk.next !== this.byStart[chunk.end]) { + throw new Error('Cannot overwrite across a split point'); + } + chunk = chunk.next; + chunk.edit('', false); + } + + first.edit(content, storeName, !overwrite); + } else { + // must be inserting at the end + const newChunk = new Chunk(start, end, '').edit(content, storeName); + + // TODO last chunk in the array may not be the last chunk, if it's moved... + last.next = newChunk; + newChunk.previous = last; + } + return this; + } + + prepend(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); + + this.intro = content + this.intro; + return this; + } + + prependLeft(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byEnd[index]; + + if (chunk) { + chunk.prependLeft(content); + } else { + this.intro = content + this.intro; + } + return this; + } + + prependRight(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byStart[index]; + + if (chunk) { + chunk.prependRight(content); + } else { + this.outro = content + this.outro; + } + return this; + } + + remove(start, end) { + start = start + this.offset; + end = end + this.offset; + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + if (start === end) return this; + + if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); + if (start > end) throw new Error('end must be greater than start'); + + this._split(start); + this._split(end); + + let chunk = this.byStart[start]; + + while (chunk) { + chunk.intro = ''; + chunk.outro = ''; + chunk.edit(''); + + chunk = end > chunk.end ? this.byStart[chunk.end] : null; + } + return this; + } + + reset(start, end) { + start = start + this.offset; + end = end + this.offset; + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + if (start === end) return this; + + if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); + if (start > end) throw new Error('end must be greater than start'); + + this._split(start); + this._split(end); + + let chunk = this.byStart[start]; + + while (chunk) { + chunk.reset(); + + chunk = end > chunk.end ? this.byStart[chunk.end] : null; + } + return this; + } + + lastChar() { + if (this.outro.length) return this.outro[this.outro.length - 1]; + let chunk = this.lastChunk; + do { + if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1]; + if (chunk.content.length) return chunk.content[chunk.content.length - 1]; + if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1]; + } while ((chunk = chunk.previous)); + if (this.intro.length) return this.intro[this.intro.length - 1]; + return ''; + } + + lastLine() { + let lineIndex = this.outro.lastIndexOf(n); + if (lineIndex !== -1) return this.outro.substr(lineIndex + 1); + let lineStr = this.outro; + let chunk = this.lastChunk; + do { + if (chunk.outro.length > 0) { + lineIndex = chunk.outro.lastIndexOf(n); + if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.outro + lineStr; + } + + if (chunk.content.length > 0) { + lineIndex = chunk.content.lastIndexOf(n); + if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr; + lineStr = chunk.content + lineStr; + } + + if (chunk.intro.length > 0) { + lineIndex = chunk.intro.lastIndexOf(n); + if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.intro + lineStr; + } + } while ((chunk = chunk.previous)); + lineIndex = this.intro.lastIndexOf(n); + if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr; + return this.intro + lineStr; + } + + slice(start = 0, end = this.original.length - this.offset) { + start = start + this.offset; + end = end + this.offset; + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + let result = ''; + + // find start chunk + let chunk = this.firstChunk; + while (chunk && (chunk.start > start || chunk.end <= start)) { + // found end chunk before start + if (chunk.start < end && chunk.end >= end) { + return result; + } + + chunk = chunk.next; + } + + if (chunk && chunk.edited && chunk.start !== start) + throw new Error(`Cannot use replaced character ${start} as slice start anchor.`); + + const startChunk = chunk; + while (chunk) { + if (chunk.intro && (startChunk !== chunk || chunk.start === start)) { + result += chunk.intro; + } + + const containsEnd = chunk.start < end && chunk.end >= end; + if (containsEnd && chunk.edited && chunk.end !== end) + throw new Error(`Cannot use replaced character ${end} as slice end anchor.`); + + const sliceStart = startChunk === chunk ? start - chunk.start : 0; + const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; + + result += chunk.content.slice(sliceStart, sliceEnd); + + if (chunk.outro && (!containsEnd || chunk.end === end)) { + result += chunk.outro; + } + + if (containsEnd) { + break; + } + + chunk = chunk.next; + } + + return result; + } + + // TODO deprecate this? not really very useful + snip(start, end) { + const clone = this.clone(); + clone.remove(0, start); + clone.remove(end, clone.original.length); + + return clone; + } + + _split(index) { + if (this.byStart[index] || this.byEnd[index]) return; + + let chunk = this.lastSearchedChunk; + const searchForward = index > chunk.end; + + while (chunk) { + if (chunk.contains(index)) return this._splitChunk(chunk, index); + + chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; + } + } + + _splitChunk(chunk, index) { + if (chunk.edited && chunk.content.length) { + // zero-length edited chunks are a special case (overlapping replacements) + const loc = getLocator(this.original)(index); + throw new Error( + `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`, + ); + } + + const newChunk = chunk.split(index); + + this.byEnd[index] = chunk; + this.byStart[index] = newChunk; + this.byEnd[newChunk.end] = newChunk; + + if (chunk === this.lastChunk) this.lastChunk = newChunk; + + this.lastSearchedChunk = chunk; + return true; + } + + toString() { + let str = this.intro; + + let chunk = this.firstChunk; + while (chunk) { + str += chunk.toString(); + chunk = chunk.next; + } + + return str + this.outro; + } + + isEmpty() { + let chunk = this.firstChunk; + do { + if ( + (chunk.intro.length && chunk.intro.trim()) || + (chunk.content.length && chunk.content.trim()) || + (chunk.outro.length && chunk.outro.trim()) + ) + return false; + } while ((chunk = chunk.next)); + return true; + } + + length() { + let chunk = this.firstChunk; + let length = 0; + do { + length += chunk.intro.length + chunk.content.length + chunk.outro.length; + } while ((chunk = chunk.next)); + return length; + } + + trimLines() { + return this.trim('[\\r\\n]'); + } + + trim(charType) { + return this.trimStart(charType).trimEnd(charType); + } + + trimEndAborted(charType) { + const rx = new RegExp((charType || '\\s') + '+$'); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + + let chunk = this.lastChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimEnd(rx); + + // if chunk was trimmed, we have a new lastChunk + if (chunk.end !== end) { + if (this.lastChunk === chunk) { + this.lastChunk = chunk.next; + } + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.previous; + } while (chunk); + + return false; + } + + trimEnd(charType) { + this.trimEndAborted(charType); + return this; + } + trimStartAborted(charType) { + const rx = new RegExp('^' + (charType || '\\s') + '+'); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + let chunk = this.firstChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimStart(rx); + + if (chunk.end !== end) { + // special case... + if (chunk === this.lastChunk) this.lastChunk = chunk.next; + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.next; + } while (chunk); + + return false; + } + + trimStart(charType) { + this.trimStartAborted(charType); + return this; + } + + hasChanged() { + return this.original !== this.toString(); + } + + _replaceRegexp(searchValue, replacement) { + function getReplacement(match, str) { + if (typeof replacement === 'string') { + return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => { + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter + if (i === '$') return '$'; + if (i === '&') return match[0]; + const num = +i; + if (num < match.length) return match[+i]; + return `$${i}`; + }); + } else { + return replacement(...match, match.index, str, match.groups); + } + } + function matchAll(re, str) { + let match; + const matches = []; + while ((match = re.exec(str))) { + matches.push(match); + } + return matches; + } + if (searchValue.global) { + const matches = matchAll(searchValue, this.original); + matches.forEach((match) => { + if (match.index != null) { + const replacement = getReplacement(match, this.original); + if (replacement !== match[0]) { + this.overwrite(match.index, match.index + match[0].length, replacement); + } + } + }); + } else { + const match = this.original.match(searchValue); + if (match && match.index != null) { + const replacement = getReplacement(match, this.original); + if (replacement !== match[0]) { + this.overwrite(match.index, match.index + match[0].length, replacement); + } + } + } + return this; + } + + _replaceString(string, replacement) { + const { original } = this; + const index = original.indexOf(string); + + if (index !== -1) { + this.overwrite(index, index + string.length, replacement); + } + + return this; + } + + replace(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceString(searchValue, replacement); + } + + return this._replaceRegexp(searchValue, replacement); + } + + _replaceAllString(string, replacement) { + const { original } = this; + const stringLength = string.length; + for ( + let index = original.indexOf(string); + index !== -1; + index = original.indexOf(string, index + stringLength) + ) { + const previous = original.slice(index, index + stringLength); + if (previous !== replacement) this.overwrite(index, index + stringLength, replacement); + } + + return this; + } + + replaceAll(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceAllString(searchValue, replacement); + } + + if (!searchValue.global) { + throw new TypeError( + 'MagicString.prototype.replaceAll called with a non-global RegExp argument', + ); + } + + return this._replaceRegexp(searchValue, replacement); + } +} + +const hasOwnProp = Object.prototype.hasOwnProperty; + +class Bundle { + constructor(options = {}) { + this.intro = options.intro || ''; + this.separator = options.separator !== undefined ? options.separator : '\n'; + this.sources = []; + this.uniqueSources = []; + this.uniqueSourceIndexByFilename = {}; + } + + addSource(source) { + if (source instanceof MagicString) { + return this.addSource({ + content: source, + filename: source.filename, + separator: this.separator, + }); + } + + if (!isObject(source) || !source.content) { + throw new Error( + 'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`', + ); + } + + ['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => { + if (!hasOwnProp.call(source, option)) source[option] = source.content[option]; + }); + + if (source.separator === undefined) { + // TODO there's a bunch of this sort of thing, needs cleaning up + source.separator = this.separator; + } + + if (source.filename) { + if (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) { + this.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length; + this.uniqueSources.push({ filename: source.filename, content: source.content.original }); + } else { + const uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]]; + if (source.content.original !== uniqueSource.content) { + throw new Error(`Illegal source: same filename (${source.filename}), different contents`); + } + } + } + + this.sources.push(source); + return this; + } + + append(str, options) { + this.addSource({ + content: new MagicString(str), + separator: (options && options.separator) || '', + }); + + return this; + } + + clone() { + const bundle = new Bundle({ + intro: this.intro, + separator: this.separator, + }); + + this.sources.forEach((source) => { + bundle.addSource({ + filename: source.filename, + content: source.content.clone(), + separator: source.separator, + }); + }); + + return bundle; + } + + generateDecodedMap(options = {}) { + const names = []; + let x_google_ignoreList = undefined; + this.sources.forEach((source) => { + Object.keys(source.content.storedNames).forEach((name) => { + if (!~names.indexOf(name)) names.push(name); + }); + }); + + const mappings = new Mappings(options.hires); + + if (this.intro) { + mappings.advance(this.intro); + } + + this.sources.forEach((source, i) => { + if (i > 0) { + mappings.advance(this.separator); + } + + const sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1; + const magicString = source.content; + const locate = getLocator(magicString.original); + + if (magicString.intro) { + mappings.advance(magicString.intro); + } + + magicString.firstChunk.eachNext((chunk) => { + const loc = locate(chunk.start); + + if (chunk.intro.length) mappings.advance(chunk.intro); + + if (source.filename) { + if (chunk.edited) { + mappings.addEdit( + sourceIndex, + chunk.content, + loc, + chunk.storeName ? names.indexOf(chunk.original) : -1, + ); + } else { + mappings.addUneditedChunk( + sourceIndex, + chunk, + magicString.original, + loc, + magicString.sourcemapLocations, + ); + } + } else { + mappings.advance(chunk.content); + } + + if (chunk.outro.length) mappings.advance(chunk.outro); + }); + + if (magicString.outro) { + mappings.advance(magicString.outro); + } + + if (source.ignoreList && sourceIndex !== -1) { + if (x_google_ignoreList === undefined) { + x_google_ignoreList = []; + } + x_google_ignoreList.push(sourceIndex); + } + }); + + return { + file: options.file ? options.file.split(/[/\\]/).pop() : undefined, + sources: this.uniqueSources.map((source) => { + return options.file ? getRelativePath(options.file, source.filename) : source.filename; + }), + sourcesContent: this.uniqueSources.map((source) => { + return options.includeContent ? source.content : null; + }), + names, + mappings: mappings.raw, + x_google_ignoreList, + }; + } + + generateMap(options) { + return new SourceMap(this.generateDecodedMap(options)); + } + + getIndentString() { + const indentStringCounts = {}; + + this.sources.forEach((source) => { + const indentStr = source.content._getRawIndentString(); + + if (indentStr === null) return; + + if (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0; + indentStringCounts[indentStr] += 1; + }); + + return ( + Object.keys(indentStringCounts).sort((a, b) => { + return indentStringCounts[a] - indentStringCounts[b]; + })[0] || '\t' + ); + } + + indent(indentStr) { + if (!arguments.length) { + indentStr = this.getIndentString(); + } + + if (indentStr === '') return this; // noop + + let trailingNewline = !this.intro || this.intro.slice(-1) === '\n'; + + this.sources.forEach((source, i) => { + const separator = source.separator !== undefined ? source.separator : this.separator; + const indentStart = trailingNewline || (i > 0 && /\r?\n$/.test(separator)); + + source.content.indent(indentStr, { + exclude: source.indentExclusionRanges, + indentStart, //: trailingNewline || /\r?\n$/.test( separator ) //true///\r?\n/.test( separator ) + }); + + trailingNewline = source.content.lastChar() === '\n'; + }); + + if (this.intro) { + this.intro = + indentStr + + this.intro.replace(/^[^\n]/gm, (match, index) => { + return index > 0 ? indentStr + match : match; + }); + } + + return this; + } + + prepend(str) { + this.intro = str + this.intro; + return this; + } + + toString() { + const body = this.sources + .map((source, i) => { + const separator = source.separator !== undefined ? source.separator : this.separator; + const str = (i > 0 ? separator : '') + source.content.toString(); + + return str; + }) + .join(''); + + return this.intro + body; + } + + isEmpty() { + if (this.intro.length && this.intro.trim()) return false; + if (this.sources.some((source) => !source.content.isEmpty())) return false; + return true; + } + + length() { + return this.sources.reduce( + (length, source) => length + source.content.length(), + this.intro.length, + ); + } + + trimLines() { + return this.trim('[\\r\\n]'); + } + + trim(charType) { + return this.trimStart(charType).trimEnd(charType); + } + + trimStart(charType) { + const rx = new RegExp('^' + (charType || '\\s') + '+'); + this.intro = this.intro.replace(rx, ''); + + if (!this.intro) { + let source; + let i = 0; + + do { + source = this.sources[i++]; + if (!source) { + break; + } + } while (!source.content.trimStartAborted(charType)); + } + + return this; + } + + trimEnd(charType) { + const rx = new RegExp((charType || '\\s') + '+$'); + + let source; + let i = this.sources.length - 1; + + do { + source = this.sources[i--]; + if (!source) { + this.intro = this.intro.replace(rx, ''); + break; + } + } while (!source.content.trimEndAborted(charType)); + + return this; + } +} + +export { Bundle, SourceMap, MagicString as default }; +//# sourceMappingURL=magic-string.es.mjs.map diff --git a/vuetest/node_modules/magic-string/dist/magic-string.es.mjs.map b/vuetest/node_modules/magic-string/dist/magic-string.es.mjs.map new file mode 100644 index 0000000..0d69915 --- /dev/null +++ b/vuetest/node_modules/magic-string/dist/magic-string.es.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"magic-string.es.mjs","sources":["../src/BitSet.js","../src/Chunk.js","../src/SourceMap.js","../src/utils/guessIndent.js","../src/utils/getRelativePath.js","../src/utils/isObject.js","../src/utils/getLocator.js","../src/utils/Mappings.js","../src/MagicString.js","../src/Bundle.js"],"sourcesContent":["export default class BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}\n","export default class Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\tif (DEBUG) {\n\t\t\t// we make these non-enumerable, for sanity while debugging\n\t\t\tObject.defineProperties(this, {\n\t\t\t\tprevious: { writable: true, value: null },\n\t\t\t\tnext: { writable: true, value: null },\n\t\t\t});\n\t\t} else {\n\t\t\tthis.previous = null;\n\t\t\tthis.next = null;\n\t\t}\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\treset() {\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\t\tif (this.edited) {\n\t\t\tthis.content = this.original;\n\t\t\tthis.storeName = false;\n\t\t\tthis.edited = false;\n\t\t}\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// after split we should save the edit content record into the correct chunk\n\t\t\t// to make sure sourcemap correct\n\t\t\t// For example:\n\t\t\t// ' test'.trim()\n\t\t\t// split -> ' ' + 'test'\n\t\t\t// ✔️ edit -> '' + 'test'\n\t\t\t// ✖️ edit -> 'test' + ''\n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tthis.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tconst newChunk = this.split(this.end - trimmed.length);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tnewChunk.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n","import { encode } from '@jridgewell/sourcemap-codec';\n\nfunction getBtoa() {\n\tif (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') {\n\t\treturn (str) => globalThis.btoa(unescape(encodeURIComponent(str)));\n\t} else if (typeof Buffer === 'function') {\n\t\treturn (str) => Buffer.from(str, 'utf-8').toString('base64');\n\t} else {\n\t\treturn () => {\n\t\t\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n\t\t};\n\t}\n}\n\nconst btoa = /*#__PURE__*/ getBtoa();\n\nexport default class SourceMap {\n\tconstructor(properties) {\n\t\tthis.version = 3;\n\t\tthis.file = properties.file;\n\t\tthis.sources = properties.sources;\n\t\tthis.sourcesContent = properties.sourcesContent;\n\t\tthis.names = properties.names;\n\t\tthis.mappings = encode(properties.mappings);\n\t\tif (typeof properties.x_google_ignoreList !== 'undefined') {\n\t\t\tthis.x_google_ignoreList = properties.x_google_ignoreList;\n\t\t}\n\t\tif (typeof properties.debugId !== 'undefined') {\n\t\t\tthis.debugId = properties.debugId;\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this);\n\t}\n\n\ttoUrl() {\n\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t}\n}\n","export default function guessIndent(code) {\n\tconst lines = code.split('\\n');\n\n\tconst tabbed = lines.filter((line) => /^\\t+/.test(line));\n\tconst spaced = lines.filter((line) => /^ {2,}/.test(line));\n\n\tif (tabbed.length === 0 && spaced.length === 0) {\n\t\treturn null;\n\t}\n\n\t// More lines tabbed than spaced? Assume tabs, and\n\t// default to tabs in the case of a tie (or nothing\n\t// to go on)\n\tif (tabbed.length >= spaced.length) {\n\t\treturn '\\t';\n\t}\n\n\t// Otherwise, we need to guess the multiple\n\tconst min = spaced.reduce((previous, current) => {\n\t\tconst numSpaces = /^ +/.exec(current)[0].length;\n\t\treturn Math.min(numSpaces, previous);\n\t}, Infinity);\n\n\treturn new Array(min + 1).join(' ');\n}\n","export default function getRelativePath(from, to) {\n\tconst fromParts = from.split(/[/\\\\]/);\n\tconst toParts = to.split(/[/\\\\]/);\n\n\tfromParts.pop(); // get dirname\n\n\twhile (fromParts[0] === toParts[0]) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif (fromParts.length) {\n\t\tlet i = fromParts.length;\n\t\twhile (i--) fromParts[i] = '..';\n\t}\n\n\treturn fromParts.concat(toParts).join('/');\n}\n","const toString = Object.prototype.toString;\n\nexport default function isObject(thing) {\n\treturn toString.call(thing) === '[object Object]';\n}\n","export default function getLocator(source) {\n\tconst originalLines = source.split('\\n');\n\tconst lineOffsets = [];\n\n\tfor (let i = 0, pos = 0; i < originalLines.length; i++) {\n\t\tlineOffsets.push(pos);\n\t\tpos += originalLines[i].length + 1;\n\t}\n\n\treturn function locate(index) {\n\t\tlet i = 0;\n\t\tlet j = lineOffsets.length;\n\t\twhile (i < j) {\n\t\t\tconst m = (i + j) >> 1;\n\t\t\tif (index < lineOffsets[m]) {\n\t\t\t\tj = m;\n\t\t\t} else {\n\t\t\t\ti = m + 1;\n\t\t\t}\n\t\t}\n\t\tconst line = i - 1;\n\t\tconst column = index - lineOffsets[line];\n\t\treturn { line, column };\n\t};\n}\n","const wordRegex = /\\w/;\n\nexport default class Mappings {\n\tconstructor(hires) {\n\t\tthis.hires = hires;\n\t\tthis.generatedCodeLine = 0;\n\t\tthis.generatedCodeColumn = 0;\n\t\tthis.raw = [];\n\t\tthis.rawSegments = this.raw[this.generatedCodeLine] = [];\n\t\tthis.pending = null;\n\t}\n\n\taddEdit(sourceIndex, content, loc, nameIndex) {\n\t\tif (content.length) {\n\t\t\tconst contentLengthMinusOne = content.length - 1;\n\t\t\tlet contentLineEnd = content.indexOf('\\n', 0);\n\t\t\tlet previousContentLineEnd = -1;\n\t\t\t// Loop through each line in the content and add a segment, but stop if the last line is empty,\n\t\t\t// else code afterwards would fill one line too many\n\t\t\twhile (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) {\n\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\t\tif (nameIndex >= 0) {\n\t\t\t\t\tsegment.push(nameIndex);\n\t\t\t\t}\n\t\t\t\tthis.rawSegments.push(segment);\n\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\n\t\t\t\tpreviousContentLineEnd = contentLineEnd;\n\t\t\t\tcontentLineEnd = content.indexOf('\\n', contentLineEnd + 1);\n\t\t\t}\n\n\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\tif (nameIndex >= 0) {\n\t\t\t\tsegment.push(nameIndex);\n\t\t\t}\n\t\t\tthis.rawSegments.push(segment);\n\n\t\t\tthis.advance(content.slice(previousContentLineEnd + 1));\n\t\t} else if (this.pending) {\n\t\t\tthis.rawSegments.push(this.pending);\n\t\t\tthis.advance(content);\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\taddUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {\n\t\tlet originalCharIndex = chunk.start;\n\t\tlet first = true;\n\t\t// when iterating each char, check if it's in a word boundary\n\t\tlet charInHiresBoundary = false;\n\n\t\twhile (originalCharIndex < chunk.end) {\n\t\t\tif (original[originalCharIndex] === '\\n') {\n\t\t\t\tloc.line += 1;\n\t\t\t\tloc.column = 0;\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\t\t\t\tfirst = true;\n\t\t\t\tcharInHiresBoundary = false;\n\t\t\t} else {\n\t\t\t\tif (this.hires || first || sourcemapLocations.has(originalCharIndex)) {\n\t\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\n\t\t\t\t\tif (this.hires === 'boundary') {\n\t\t\t\t\t\t// in hires \"boundary\", group segments per word boundary than per char\n\t\t\t\t\t\tif (wordRegex.test(original[originalCharIndex])) {\n\t\t\t\t\t\t\t// for first char in the boundary found, start the boundary by pushing a segment\n\t\t\t\t\t\t\tif (!charInHiresBoundary) {\n\t\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\t\tcharInHiresBoundary = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// for non-word char, end the boundary by pushing a segment\n\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\tcharInHiresBoundary = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tloc.column += 1;\n\t\t\t\tthis.generatedCodeColumn += 1;\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t\toriginalCharIndex += 1;\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\tadvance(str) {\n\t\tif (!str) return;\n\n\t\tconst lines = str.split('\\n');\n\n\t\tif (lines.length > 1) {\n\t\t\tfor (let i = 0; i < lines.length - 1; i++) {\n\t\t\t\tthis.generatedCodeLine++;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t}\n\t\t\tthis.generatedCodeColumn = 0;\n\t\t}\n\n\t\tthis.generatedCodeColumn += lines[lines.length - 1].length;\n\t}\n}\n","import BitSet from './BitSet.js';\nimport Chunk from './Chunk.js';\nimport SourceMap from './SourceMap.js';\nimport guessIndent from './utils/guessIndent.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\nimport Stats from './utils/Stats.js';\n\nconst n = '\\n';\n\nconst warned = {\n\tinsertLeft: false,\n\tinsertRight: false,\n\tstoreName: false,\n};\n\nexport default class MagicString {\n\tconstructor(string, options = {}) {\n\t\tconst chunk = new Chunk(0, string.length, string);\n\n\t\tObject.defineProperties(this, {\n\t\t\toriginal: { writable: true, value: string },\n\t\t\toutro: { writable: true, value: '' },\n\t\t\tintro: { writable: true, value: '' },\n\t\t\tfirstChunk: { writable: true, value: chunk },\n\t\t\tlastChunk: { writable: true, value: chunk },\n\t\t\tlastSearchedChunk: { writable: true, value: chunk },\n\t\t\tbyStart: { writable: true, value: {} },\n\t\t\tbyEnd: { writable: true, value: {} },\n\t\t\tfilename: { writable: true, value: options.filename },\n\t\t\tindentExclusionRanges: { writable: true, value: options.indentExclusionRanges },\n\t\t\tsourcemapLocations: { writable: true, value: new BitSet() },\n\t\t\tstoredNames: { writable: true, value: {} },\n\t\t\tindentStr: { writable: true, value: undefined },\n\t\t\tignoreList: { writable: true, value: options.ignoreList },\n\t\t\toffset: { writable: true, value: options.offset || 0 },\n\t\t});\n\n\t\tif (DEBUG) {\n\t\t\tObject.defineProperty(this, 'stats', { value: new Stats() });\n\t\t}\n\n\t\tthis.byStart[0] = chunk;\n\t\tthis.byEnd[string.length] = chunk;\n\t}\n\n\taddSourcemapLocation(char) {\n\t\tthis.sourcemapLocations.add(char);\n\t}\n\n\tappend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.outro += content;\n\t\treturn this;\n\t}\n\n\tappendLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendLeft');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendLeft(content);\n\t\t} else {\n\t\t\tthis.intro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendLeft');\n\t\treturn this;\n\t}\n\n\tappendRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendRight(content);\n\t\t} else {\n\t\t\tthis.outro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendRight');\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst cloned = new MagicString(this.original, { filename: this.filename, offset: this.offset });\n\n\t\tlet originalChunk = this.firstChunk;\n\t\tlet clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());\n\n\t\twhile (originalChunk) {\n\t\t\tcloned.byStart[clonedChunk.start] = clonedChunk;\n\t\t\tcloned.byEnd[clonedChunk.end] = clonedChunk;\n\n\t\t\tconst nextOriginalChunk = originalChunk.next;\n\t\t\tconst nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();\n\n\t\t\tif (nextClonedChunk) {\n\t\t\t\tclonedChunk.next = nextClonedChunk;\n\t\t\t\tnextClonedChunk.previous = clonedChunk;\n\n\t\t\t\tclonedChunk = nextClonedChunk;\n\t\t\t}\n\n\t\t\toriginalChunk = nextOriginalChunk;\n\t\t}\n\n\t\tcloned.lastChunk = clonedChunk;\n\n\t\tif (this.indentExclusionRanges) {\n\t\t\tcloned.indentExclusionRanges = this.indentExclusionRanges.slice();\n\t\t}\n\n\t\tcloned.sourcemapLocations = new BitSet(this.sourcemapLocations);\n\n\t\tcloned.intro = this.intro;\n\t\tcloned.outro = this.outro;\n\n\t\treturn cloned;\n\t}\n\n\tgenerateDecodedMap(options) {\n\t\toptions = options || {};\n\n\t\tconst sourceIndex = 0;\n\t\tconst names = Object.keys(this.storedNames);\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tconst locate = getLocator(this.original);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.firstChunk.eachNext((chunk) => {\n\t\t\tconst loc = locate(chunk.start);\n\n\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tmappings.addEdit(\n\t\t\t\t\tsourceIndex,\n\t\t\t\t\tchunk.content,\n\t\t\t\t\tloc,\n\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tmappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);\n\t\t\t}\n\n\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: [\n\t\t\t\toptions.source ? getRelativePath(options.file || '', options.source) : options.file || '',\n\t\t\t],\n\t\t\tsourcesContent: options.includeContent ? [this.original] : undefined,\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\t_ensureindentStr() {\n\t\tif (this.indentStr === undefined) {\n\t\t\tthis.indentStr = guessIndent(this.original);\n\t\t}\n\t}\n\n\t_getRawIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr;\n\t}\n\n\tgetIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr === null ? '\\t' : this.indentStr;\n\t}\n\n\tindent(indentStr, options) {\n\t\tconst pattern = /^[^\\r\\n]/gm;\n\n\t\tif (isObject(indentStr)) {\n\t\t\toptions = indentStr;\n\t\t\tindentStr = undefined;\n\t\t}\n\n\t\tif (indentStr === undefined) {\n\t\t\tthis._ensureindentStr();\n\t\t\tindentStr = this.indentStr || '\\t';\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\toptions = options || {};\n\n\t\t// Process exclusion ranges\n\t\tconst isExcluded = {};\n\n\t\tif (options.exclude) {\n\t\t\tconst exclusions =\n\t\t\t\ttypeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;\n\t\t\texclusions.forEach((exclusion) => {\n\t\t\t\tfor (let i = exclusion[0]; i < exclusion[1]; i += 1) {\n\t\t\t\t\tisExcluded[i] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet shouldIndentNextCharacter = options.indentStart !== false;\n\t\tconst replacer = (match) => {\n\t\t\tif (shouldIndentNextCharacter) return `${indentStr}${match}`;\n\t\t\tshouldIndentNextCharacter = true;\n\t\t\treturn match;\n\t\t};\n\n\t\tthis.intro = this.intro.replace(pattern, replacer);\n\n\t\tlet charIndex = 0;\n\t\tlet chunk = this.firstChunk;\n\n\t\twhile (chunk) {\n\t\t\tconst end = chunk.end;\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\tchunk.content = chunk.content.replace(pattern, replacer);\n\n\t\t\t\t\tif (chunk.content.length) {\n\t\t\t\t\t\tshouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\\n';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcharIndex = chunk.start;\n\n\t\t\t\twhile (charIndex < end) {\n\t\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\t\tconst char = this.original[charIndex];\n\n\t\t\t\t\t\tif (char === '\\n') {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = true;\n\t\t\t\t\t\t} else if (char !== '\\r' && shouldIndentNextCharacter) {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = false;\n\n\t\t\t\t\t\t\tif (charIndex === chunk.start) {\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._splitChunk(chunk, charIndex);\n\t\t\t\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcharIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcharIndex = chunk.end;\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tthis.outro = this.outro.replace(pattern, replacer);\n\n\t\treturn this;\n\t}\n\n\tinsert() {\n\t\tthrow new Error(\n\t\t\t'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)',\n\t\t);\n\t}\n\n\tinsertLeft(index, content) {\n\t\tif (!warned.insertLeft) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',\n\t\t\t);\n\t\t\twarned.insertLeft = true;\n\t\t}\n\n\t\treturn this.appendLeft(index, content);\n\t}\n\n\tinsertRight(index, content) {\n\t\tif (!warned.insertRight) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',\n\t\t\t);\n\t\t\twarned.insertRight = true;\n\t\t}\n\n\t\treturn this.prependRight(index, content);\n\t}\n\n\tmove(start, end, index) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\t\tindex = index + this.offset;\n\n\t\tif (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');\n\n\t\tif (DEBUG) this.stats.time('move');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\t\tthis._split(index);\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tconst oldLeft = first.previous;\n\t\tconst oldRight = last.next;\n\n\t\tconst newRight = this.byStart[index];\n\t\tif (!newRight && last === this.lastChunk) return this;\n\t\tconst newLeft = newRight ? newRight.previous : this.lastChunk;\n\n\t\tif (oldLeft) oldLeft.next = oldRight;\n\t\tif (oldRight) oldRight.previous = oldLeft;\n\n\t\tif (newLeft) newLeft.next = first;\n\t\tif (newRight) newRight.previous = last;\n\n\t\tif (!first.previous) this.firstChunk = last.next;\n\t\tif (!last.next) {\n\t\t\tthis.lastChunk = first.previous;\n\t\t\tthis.lastChunk.next = null;\n\t\t}\n\n\t\tfirst.previous = newLeft;\n\t\tlast.next = newRight || null;\n\n\t\tif (!newLeft) this.firstChunk = first;\n\t\tif (!newRight) this.lastChunk = last;\n\n\t\tif (DEBUG) this.stats.timeEnd('move');\n\t\treturn this;\n\t}\n\n\toverwrite(start, end, content, options) {\n\t\toptions = options || {};\n\t\treturn this.update(start, end, content, { ...options, overwrite: !options.contentOnly });\n\t}\n\n\tupdate(start, end, content, options) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('replacement content must be a string');\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (end > this.original.length) throw new Error('end is out of bounds');\n\t\tif (start === end)\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot overwrite a zero-length range – use appendLeft or prependRight instead',\n\t\t\t);\n\n\t\tif (DEBUG) this.stats.time('overwrite');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tif (options === true) {\n\t\t\tif (!warned.storeName) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string',\n\t\t\t\t);\n\t\t\t\twarned.storeName = true;\n\t\t\t}\n\n\t\t\toptions = { storeName: true };\n\t\t}\n\t\tconst storeName = options !== undefined ? options.storeName : false;\n\t\tconst overwrite = options !== undefined ? options.overwrite : false;\n\n\t\tif (storeName) {\n\t\t\tconst original = this.original.slice(start, end);\n\t\t\tObject.defineProperty(this.storedNames, original, {\n\t\t\t\twritable: true,\n\t\t\t\tvalue: true,\n\t\t\t\tenumerable: true,\n\t\t\t});\n\t\t}\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tif (first) {\n\t\t\tlet chunk = first;\n\t\t\twhile (chunk !== last) {\n\t\t\t\tif (chunk.next !== this.byStart[chunk.end]) {\n\t\t\t\t\tthrow new Error('Cannot overwrite across a split point');\n\t\t\t\t}\n\t\t\t\tchunk = chunk.next;\n\t\t\t\tchunk.edit('', false);\n\t\t\t}\n\n\t\t\tfirst.edit(content, storeName, !overwrite);\n\t\t} else {\n\t\t\t// must be inserting at the end\n\t\t\tconst newChunk = new Chunk(start, end, '').edit(content, storeName);\n\n\t\t\t// TODO last chunk in the array may not be the last chunk, if it's moved...\n\t\t\tlast.next = newChunk;\n\t\t\tnewChunk.previous = last;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('overwrite');\n\t\treturn this;\n\t}\n\n\tprepend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.intro = content + this.intro;\n\t\treturn this;\n\t}\n\n\tprependLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependLeft(content);\n\t\t} else {\n\t\t\tthis.intro = content + this.intro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tprependRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependRight(content);\n\t\t} else {\n\t\t\tthis.outro = content + this.outro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tremove(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('remove');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.intro = '';\n\t\t\tchunk.outro = '';\n\t\t\tchunk.edit('');\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('remove');\n\t\treturn this;\n\t}\n\n\treset(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('reset');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.reset();\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('reset');\n\t\treturn this;\n\t}\n\n\tlastChar() {\n\t\tif (this.outro.length) return this.outro[this.outro.length - 1];\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];\n\t\t\tif (chunk.content.length) return chunk.content[chunk.content.length - 1];\n\t\t\tif (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];\n\t\t} while ((chunk = chunk.previous));\n\t\tif (this.intro.length) return this.intro[this.intro.length - 1];\n\t\treturn '';\n\t}\n\n\tlastLine() {\n\t\tlet lineIndex = this.outro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.outro.substr(lineIndex + 1);\n\t\tlet lineStr = this.outro;\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length > 0) {\n\t\t\t\tlineIndex = chunk.outro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.outro + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.content.length > 0) {\n\t\t\t\tlineIndex = chunk.content.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.content + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.intro.length > 0) {\n\t\t\t\tlineIndex = chunk.intro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.intro + lineStr;\n\t\t\t}\n\t\t} while ((chunk = chunk.previous));\n\t\tlineIndex = this.intro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;\n\t\treturn this.intro + lineStr;\n\t}\n\n\tslice(start = 0, end = this.original.length - this.offset) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tlet result = '';\n\n\t\t// find start chunk\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk && (chunk.start > start || chunk.end <= start)) {\n\t\t\t// found end chunk before start\n\t\t\tif (chunk.start < end && chunk.end >= end) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tif (chunk && chunk.edited && chunk.start !== start)\n\t\t\tthrow new Error(`Cannot use replaced character ${start} as slice start anchor.`);\n\n\t\tconst startChunk = chunk;\n\t\twhile (chunk) {\n\t\t\tif (chunk.intro && (startChunk !== chunk || chunk.start === start)) {\n\t\t\t\tresult += chunk.intro;\n\t\t\t}\n\n\t\t\tconst containsEnd = chunk.start < end && chunk.end >= end;\n\t\t\tif (containsEnd && chunk.edited && chunk.end !== end)\n\t\t\t\tthrow new Error(`Cannot use replaced character ${end} as slice end anchor.`);\n\n\t\t\tconst sliceStart = startChunk === chunk ? start - chunk.start : 0;\n\t\t\tconst sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;\n\n\t\t\tresult += chunk.content.slice(sliceStart, sliceEnd);\n\n\t\t\tif (chunk.outro && (!containsEnd || chunk.end === end)) {\n\t\t\t\tresult += chunk.outro;\n\t\t\t}\n\n\t\t\tif (containsEnd) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// TODO deprecate this? not really very useful\n\tsnip(start, end) {\n\t\tconst clone = this.clone();\n\t\tclone.remove(0, start);\n\t\tclone.remove(end, clone.original.length);\n\n\t\treturn clone;\n\t}\n\n\t_split(index) {\n\t\tif (this.byStart[index] || this.byEnd[index]) return;\n\n\t\tif (DEBUG) this.stats.time('_split');\n\n\t\tlet chunk = this.lastSearchedChunk;\n\t\tconst searchForward = index > chunk.end;\n\n\t\twhile (chunk) {\n\t\t\tif (chunk.contains(index)) return this._splitChunk(chunk, index);\n\n\t\t\tchunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];\n\t\t}\n\t}\n\n\t_splitChunk(chunk, index) {\n\t\tif (chunk.edited && chunk.content.length) {\n\t\t\t// zero-length edited chunks are a special case (overlapping replacements)\n\t\t\tconst loc = getLocator(this.original)(index);\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – \"${chunk.original}\")`,\n\t\t\t);\n\t\t}\n\n\t\tconst newChunk = chunk.split(index);\n\n\t\tthis.byEnd[index] = chunk;\n\t\tthis.byStart[index] = newChunk;\n\t\tthis.byEnd[newChunk.end] = newChunk;\n\n\t\tif (chunk === this.lastChunk) this.lastChunk = newChunk;\n\n\t\tthis.lastSearchedChunk = chunk;\n\t\tif (DEBUG) this.stats.timeEnd('_split');\n\t\treturn true;\n\t}\n\n\ttoString() {\n\t\tlet str = this.intro;\n\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk) {\n\t\t\tstr += chunk.toString();\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn str + this.outro;\n\t}\n\n\tisEmpty() {\n\t\tlet chunk = this.firstChunk;\n\t\tdo {\n\t\t\tif (\n\t\t\t\t(chunk.intro.length && chunk.intro.trim()) ||\n\t\t\t\t(chunk.content.length && chunk.content.trim()) ||\n\t\t\t\t(chunk.outro.length && chunk.outro.trim())\n\t\t\t)\n\t\t\t\treturn false;\n\t\t} while ((chunk = chunk.next));\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\tlet chunk = this.firstChunk;\n\t\tlet length = 0;\n\t\tdo {\n\t\t\tlength += chunk.intro.length + chunk.content.length + chunk.outro.length;\n\t\t} while ((chunk = chunk.next));\n\t\treturn length;\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimEndAborted(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tlet chunk = this.lastChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimEnd(rx);\n\n\t\t\t// if chunk was trimmed, we have a new lastChunk\n\t\t\tif (chunk.end !== end) {\n\t\t\t\tif (this.lastChunk === chunk) {\n\t\t\t\t\tthis.lastChunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.previous;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimEnd(charType) {\n\t\tthis.trimEndAborted(charType);\n\t\treturn this;\n\t}\n\ttrimStartAborted(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tlet chunk = this.firstChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimStart(rx);\n\n\t\t\tif (chunk.end !== end) {\n\t\t\t\t// special case...\n\t\t\t\tif (chunk === this.lastChunk) this.lastChunk = chunk.next;\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.next;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimStart(charType) {\n\t\tthis.trimStartAborted(charType);\n\t\treturn this;\n\t}\n\n\thasChanged() {\n\t\treturn this.original !== this.toString();\n\t}\n\n\t_replaceRegexp(searchValue, replacement) {\n\t\tfunction getReplacement(match, str) {\n\t\t\tif (typeof replacement === 'string') {\n\t\t\t\treturn replacement.replace(/\\$(\\$|&|\\d+)/g, (_, i) => {\n\t\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter\n\t\t\t\t\tif (i === '$') return '$';\n\t\t\t\t\tif (i === '&') return match[0];\n\t\t\t\t\tconst num = +i;\n\t\t\t\t\tif (num < match.length) return match[+i];\n\t\t\t\t\treturn `$${i}`;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn replacement(...match, match.index, str, match.groups);\n\t\t\t}\n\t\t}\n\t\tfunction matchAll(re, str) {\n\t\t\tlet match;\n\t\t\tconst matches = [];\n\t\t\twhile ((match = re.exec(str))) {\n\t\t\t\tmatches.push(match);\n\t\t\t}\n\t\t\treturn matches;\n\t\t}\n\t\tif (searchValue.global) {\n\t\t\tconst matches = matchAll(searchValue, this.original);\n\t\t\tmatches.forEach((match) => {\n\t\t\t\tif (match.index != null) {\n\t\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tconst match = this.original.match(searchValue);\n\t\t\tif (match && match.index != null) {\n\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t_replaceString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst index = original.indexOf(string);\n\n\t\tif (index !== -1) {\n\t\t\tthis.overwrite(index, index + string.length, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplace(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceString(searchValue, replacement);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n\n\t_replaceAllString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst stringLength = string.length;\n\t\tfor (\n\t\t\tlet index = original.indexOf(string);\n\t\t\tindex !== -1;\n\t\t\tindex = original.indexOf(string, index + stringLength)\n\t\t) {\n\t\t\tconst previous = original.slice(index, index + stringLength);\n\t\t\tif (previous !== replacement) this.overwrite(index, index + stringLength, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplaceAll(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceAllString(searchValue, replacement);\n\t\t}\n\n\t\tif (!searchValue.global) {\n\t\t\tthrow new TypeError(\n\t\t\t\t'MagicString.prototype.replaceAll called with a non-global RegExp argument',\n\t\t\t);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n}\n","import MagicString from './MagicString.js';\nimport SourceMap from './SourceMap.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\n\nconst hasOwnProp = Object.prototype.hasOwnProperty;\n\nexport default class Bundle {\n\tconstructor(options = {}) {\n\t\tthis.intro = options.intro || '';\n\t\tthis.separator = options.separator !== undefined ? options.separator : '\\n';\n\t\tthis.sources = [];\n\t\tthis.uniqueSources = [];\n\t\tthis.uniqueSourceIndexByFilename = {};\n\t}\n\n\taddSource(source) {\n\t\tif (source instanceof MagicString) {\n\t\t\treturn this.addSource({\n\t\t\t\tcontent: source,\n\t\t\t\tfilename: source.filename,\n\t\t\t\tseparator: this.separator,\n\t\t\t});\n\t\t}\n\n\t\tif (!isObject(source) || !source.content) {\n\t\t\tthrow new Error(\n\t\t\t\t'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`',\n\t\t\t);\n\t\t}\n\n\t\t['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => {\n\t\t\tif (!hasOwnProp.call(source, option)) source[option] = source.content[option];\n\t\t});\n\n\t\tif (source.separator === undefined) {\n\t\t\t// TODO there's a bunch of this sort of thing, needs cleaning up\n\t\t\tsource.separator = this.separator;\n\t\t}\n\n\t\tif (source.filename) {\n\t\t\tif (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {\n\t\t\t\tthis.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;\n\t\t\t\tthis.uniqueSources.push({ filename: source.filename, content: source.content.original });\n\t\t\t} else {\n\t\t\t\tconst uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];\n\t\t\t\tif (source.content.original !== uniqueSource.content) {\n\t\t\t\t\tthrow new Error(`Illegal source: same filename (${source.filename}), different contents`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sources.push(source);\n\t\treturn this;\n\t}\n\n\tappend(str, options) {\n\t\tthis.addSource({\n\t\t\tcontent: new MagicString(str),\n\t\t\tseparator: (options && options.separator) || '',\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst bundle = new Bundle({\n\t\t\tintro: this.intro,\n\t\t\tseparator: this.separator,\n\t\t});\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tbundle.addSource({\n\t\t\t\tfilename: source.filename,\n\t\t\t\tcontent: source.content.clone(),\n\t\t\t\tseparator: source.separator,\n\t\t\t});\n\t\t});\n\n\t\treturn bundle;\n\t}\n\n\tgenerateDecodedMap(options = {}) {\n\t\tconst names = [];\n\t\tlet x_google_ignoreList = undefined;\n\t\tthis.sources.forEach((source) => {\n\t\t\tObject.keys(source.content.storedNames).forEach((name) => {\n\t\t\t\tif (!~names.indexOf(name)) names.push(name);\n\t\t\t});\n\t\t});\n\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\tmappings.advance(this.separator);\n\t\t\t}\n\n\t\t\tconst sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;\n\t\t\tconst magicString = source.content;\n\t\t\tconst locate = getLocator(magicString.original);\n\n\t\t\tif (magicString.intro) {\n\t\t\t\tmappings.advance(magicString.intro);\n\t\t\t}\n\n\t\t\tmagicString.firstChunk.eachNext((chunk) => {\n\t\t\t\tconst loc = locate(chunk.start);\n\n\t\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\t\tif (source.filename) {\n\t\t\t\t\tif (chunk.edited) {\n\t\t\t\t\t\tmappings.addEdit(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk.content,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmappings.addUneditedChunk(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk,\n\t\t\t\t\t\t\tmagicString.original,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tmagicString.sourcemapLocations,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmappings.advance(chunk.content);\n\t\t\t\t}\n\n\t\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t\t});\n\n\t\t\tif (magicString.outro) {\n\t\t\t\tmappings.advance(magicString.outro);\n\t\t\t}\n\n\t\t\tif (source.ignoreList && sourceIndex !== -1) {\n\t\t\t\tif (x_google_ignoreList === undefined) {\n\t\t\t\t\tx_google_ignoreList = [];\n\t\t\t\t}\n\t\t\t\tx_google_ignoreList.push(sourceIndex);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.file ? getRelativePath(options.file, source.filename) : source.filename;\n\t\t\t}),\n\t\t\tsourcesContent: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.includeContent ? source.content : null;\n\t\t\t}),\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\tconst indentStringCounts = {};\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tconst indentStr = source.content._getRawIndentString();\n\n\t\t\tif (indentStr === null) return;\n\n\t\t\tif (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;\n\t\t\tindentStringCounts[indentStr] += 1;\n\t\t});\n\n\t\treturn (\n\t\t\tObject.keys(indentStringCounts).sort((a, b) => {\n\t\t\t\treturn indentStringCounts[a] - indentStringCounts[b];\n\t\t\t})[0] || '\\t'\n\t\t);\n\t}\n\n\tindent(indentStr) {\n\t\tif (!arguments.length) {\n\t\t\tindentStr = this.getIndentString();\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\tlet trailingNewline = !this.intro || this.intro.slice(-1) === '\\n';\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\tconst indentStart = trailingNewline || (i > 0 && /\\r?\\n$/.test(separator));\n\n\t\t\tsource.content.indent(indentStr, {\n\t\t\t\texclude: source.indentExclusionRanges,\n\t\t\t\tindentStart, //: trailingNewline || /\\r?\\n$/.test( separator ) //true///\\r?\\n/.test( separator )\n\t\t\t});\n\n\t\t\ttrailingNewline = source.content.lastChar() === '\\n';\n\t\t});\n\n\t\tif (this.intro) {\n\t\t\tthis.intro =\n\t\t\t\tindentStr +\n\t\t\t\tthis.intro.replace(/^[^\\n]/gm, (match, index) => {\n\t\t\t\t\treturn index > 0 ? indentStr + match : match;\n\t\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tprepend(str) {\n\t\tthis.intro = str + this.intro;\n\t\treturn this;\n\t}\n\n\ttoString() {\n\t\tconst body = this.sources\n\t\t\t.map((source, i) => {\n\t\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\t\tconst str = (i > 0 ? separator : '') + source.content.toString();\n\n\t\t\t\treturn str;\n\t\t\t})\n\t\t\t.join('');\n\n\t\treturn this.intro + body;\n\t}\n\n\tisEmpty() {\n\t\tif (this.intro.length && this.intro.trim()) return false;\n\t\tif (this.sources.some((source) => !source.content.isEmpty())) return false;\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\treturn this.sources.reduce(\n\t\t\t(length, source) => length + source.content.length(),\n\t\t\tthis.intro.length,\n\t\t);\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimStart(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\t\tthis.intro = this.intro.replace(rx, '');\n\n\t\tif (!this.intro) {\n\t\t\tlet source;\n\t\t\tlet i = 0;\n\n\t\t\tdo {\n\t\t\t\tsource = this.sources[i++];\n\t\t\t\tif (!source) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (!source.content.trimStartAborted(charType));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\ttrimEnd(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tlet source;\n\t\tlet i = this.sources.length - 1;\n\n\t\tdo {\n\t\t\tsource = this.sources[i--];\n\t\t\tif (!source) {\n\t\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!source.content.trimEndAborted(charType));\n\n\t\treturn this;\n\t}\n}\n"],"names":[],"mappings":";;AAAe,MAAM,MAAM,CAAC;AAC5B,CAAC,WAAW,CAAC,GAAG,EAAE;AAClB,EAAE,IAAI,CAAC,IAAI,GAAG,GAAG,YAAY,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;AAC5D,EAAE;AACF;AACA,CAAC,GAAG,CAAC,CAAC,EAAE;AACR,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;AACrC,EAAE;AACF;AACA,CAAC,GAAG,CAAC,CAAC,EAAE;AACR,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AACjD,EAAE;AACF;;ACZe,MAAM,KAAK,CAAC;AAC3B,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;AAClC,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;AACpB,EAAE,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;AAChB,EAAE,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;;AAEzB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AACjB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;;AAEjB,EAAE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;AACxB,EAAE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;AACxB,EAAE,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;;AAErB,EAMS;AACT,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;AACvB,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;AACnB,GAAE;AACF,EAAC;;AAED,CAAC,UAAU,CAAC,OAAO,EAAE;AACrB,EAAE,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;AACvB,EAAC;;AAED,CAAC,WAAW,CAAC,OAAO,EAAE;AACtB,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,OAAO,CAAA;AACnC,EAAC;;AAED,CAAC,KAAK,GAAG;AACT,EAAE,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;;AAE9D,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;AAC1B,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;AAC1B,EAAE,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;AAC9B,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAA;AAClC,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE5B,EAAE,OAAO,KAAK,CAAA;AACd,EAAC;;AAED,CAAC,QAAQ,CAAC,KAAK,EAAE;AACjB,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,KAAK,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAA;AAC/C,EAAC;;AAED,CAAC,QAAQ,CAAC,EAAE,EAAE;AACd,EAAE,IAAI,KAAK,GAAG,IAAI,CAAA;AAClB,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,EAAE,CAAC,KAAK,CAAC,CAAA;AACZ,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;AACF,EAAC;;AAED,CAAC,YAAY,CAAC,EAAE,EAAE;AAClB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAA;AAClB,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,EAAE,CAAC,KAAK,CAAC,CAAA;AACZ,GAAG,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAA;AACzB,GAAE;AACF,EAAC;;AAED,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE;AACvC,EAAE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;AACxB,EAAE,IAAI,CAAC,WAAW,EAAE;AACpB,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AAClB,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AAClB,GAAE;AACF,EAAE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;;AAE5B,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA;;AAEpB,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,WAAW,CAAC,OAAO,EAAE;AACtB,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACnC,EAAC;;AAED,CAAC,YAAY,CAAC,OAAO,EAAE;AACvB,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACnC,EAAC;;AAED,CAAC,KAAK,GAAG;AACT,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AACjB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;AACjB,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE;AACnB,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAA;AAC/B,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;AACzB,GAAG,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;AACtB,GAAE;AACF,EAAC;;AAED,CAAC,KAAK,CAAC,KAAK,EAAE;AACd,EAAE,MAAM,UAAU,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;;AAEvC,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAA;AAC3D,EAAE,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;;AAEvD,EAAE,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAA;;AAEhC,EAAE,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,CAAA;AAC5D,EAAE,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;AAC7B,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;;AAEjB,EAAE,IAAI,CAAC,GAAG,GAAG,KAAK,CAAA;;AAElB,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;AAC3B,GAAG,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;AACpB,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,OAAO,GAAG,cAAc,CAAA;AAChC,GAAE;;AAEF,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;AAC3B,EAAE,IAAI,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;AACtD,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAA;AAC1B,EAAE,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;;AAEtB,EAAE,OAAO,QAAQ,CAAA;AACjB,EAAC;;AAED,CAAC,QAAQ,GAAG;AACZ,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AAC/C,EAAC;;AAED,CAAC,OAAO,CAAC,EAAE,EAAE;AACb,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;AAEpC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;;AAE9C,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE;AACtB,GAAG,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE;AACjC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;AACrE,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;AACrB;AACA,KAAK,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;AAC7C,KAAI;AACJ,IAAG;AACH,GAAG,OAAO,IAAI,CAAA;AACd,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;;AAEjC,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AAC1C,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;AACrC,GAAE;AACF,EAAC;;AAED,CAAC,SAAS,CAAC,EAAE,EAAE;AACf,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;AAEpC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;;AAE9C,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE;AACtB,GAAG,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE;AACjC,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC1D,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;AACrB;AACA,KAAK,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;AACjD,KAAI;AACJ,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;AAClC,IAAG;AACH,GAAG,OAAO,IAAI,CAAA;AACd,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;;AAEjC,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AAC1C,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;AACrC,GAAE;AACF,EAAC;AACD;;ACrLA,SAAS,OAAO,GAAG;AACnB,CAAC,IAAI,OAAO,UAAU,KAAK,WAAW,IAAI,OAAO,UAAU,CAAC,IAAI,KAAK,UAAU,EAAE;AACjF,EAAE,OAAO,CAAC,GAAG,KAAK,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACrE,EAAE,MAAM,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;AAC1C,EAAE,OAAO,CAAC,GAAG,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC/D,EAAE,MAAM;AACR,EAAE,OAAO,MAAM;AACf,GAAG,MAAM,IAAI,KAAK,CAAC,yEAAyE,CAAC,CAAC;AAC9F,GAAG,CAAC;AACJ,EAAE;AACF,CAAC;AACD;AACA,MAAM,IAAI,iBAAiB,OAAO,EAAE,CAAC;AACrC;AACe,MAAM,SAAS,CAAC;AAC/B,CAAC,WAAW,CAAC,UAAU,EAAE;AACzB,EAAE,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;AACnB,EAAE,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;AAC9B,EAAE,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;AACpC,EAAE,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;AAClD,EAAE,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;AAChC,EAAE,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC9C,EAAE,IAAI,OAAO,UAAU,CAAC,mBAAmB,KAAK,WAAW,EAAE;AAC7D,GAAG,IAAI,CAAC,mBAAmB,GAAG,UAAU,CAAC,mBAAmB,CAAC;AAC7D,GAAG;AACH,EAAE,IAAI,OAAO,UAAU,CAAC,OAAO,KAAK,WAAW,EAAE;AACjD,GAAG,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;AACrC,GAAG;AACH,EAAE;AACF;AACA,CAAC,QAAQ,GAAG;AACZ,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAC9B,EAAE;AACF;AACA,CAAC,KAAK,GAAG;AACT,EAAE,OAAO,6CAA6C,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC/E,EAAE;AACF;;ACvCe,SAAS,WAAW,CAAC,IAAI,EAAE;AAC1C,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAChC;AACA,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1D,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5D;AACA,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;AACjD,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA;AACA;AACA;AACA,CAAC,IAAI,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE;AACrC,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA;AACA,CAAC,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,OAAO,KAAK;AAClD,EAAE,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAClD,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AACvC,EAAE,EAAE,QAAQ,CAAC,CAAC;AACd;AACA,CAAC,OAAO,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACrC;;ACxBe,SAAS,eAAe,CAAC,IAAI,EAAE,EAAE,EAAE;AAClD,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACnC;AACA,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;AACjB;AACA,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE;AACrC,EAAE,SAAS,CAAC,KAAK,EAAE,CAAC;AACpB,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;AAClB,EAAE;AACF;AACA,CAAC,IAAI,SAAS,CAAC,MAAM,EAAE;AACvB,EAAE,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC;AAC3B,EAAE,OAAO,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;AAClC,EAAE;AACF;AACA,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC5C;;ACjBA,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAC3C;AACe,SAAS,QAAQ,CAAC,KAAK,EAAE;AACxC,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,iBAAiB,CAAC;AACnD;;ACJe,SAAS,UAAU,CAAC,MAAM,EAAE;AAC3C,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC1C,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AACxB;AACA,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACzD,EAAE,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxB,EAAE,GAAG,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AACrC,EAAE;AACF;AACA,CAAC,OAAO,SAAS,MAAM,CAAC,KAAK,EAAE;AAC/B,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;AACZ,EAAE,IAAI,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC;AAC7B,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE;AAChB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC1B,GAAG,IAAI,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE;AAC/B,IAAI,CAAC,GAAG,CAAC,CAAC;AACV,IAAI,MAAM;AACV,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,IAAI;AACJ,GAAG;AACH,EAAE,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;AACrB,EAAE,MAAM,MAAM,GAAG,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;AAC3C,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1B,EAAE,CAAC;AACH;;ACxBA,MAAM,SAAS,GAAG,IAAI,CAAC;AACvB;AACe,MAAM,QAAQ,CAAC;AAC9B,CAAC,WAAW,CAAC,KAAK,EAAE;AACpB,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AACrB,EAAE,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;AAC7B,EAAE,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;AAC/B,EAAE,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;AAChB,EAAE,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAC;AAC3D,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AACtB,EAAE;AACF;AACA,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE;AAC/C,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE;AACtB,GAAG,MAAM,qBAAqB,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;AACpD,GAAG,IAAI,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AACjD,GAAG,IAAI,sBAAsB,GAAG,CAAC,CAAC,CAAC;AACnC;AACA;AACA,GAAG,OAAO,cAAc,IAAI,CAAC,IAAI,qBAAqB,GAAG,cAAc,EAAE;AACzE,IAAI,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;AAClF,IAAI,IAAI,SAAS,IAAI,CAAC,EAAE;AACxB,KAAK,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC7B,KAAK;AACL,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACnC;AACA,IAAI,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;AAChC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;AAC7D,IAAI,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;AACjC;AACA,IAAI,sBAAsB,GAAG,cAAc,CAAC;AAC5C,IAAI,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,CAAC,CAAC,CAAC;AAC/D,IAAI;AACJ;AACA,GAAG,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;AACjF,GAAG,IAAI,SAAS,IAAI,CAAC,EAAE;AACvB,IAAI,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC5B,IAAI;AACJ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAClC;AACA,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,sBAAsB,GAAG,CAAC,CAAC,CAAC,CAAC;AAC3D,GAAG,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE;AAC3B,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACvC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACzB,GAAG;AACH;AACA,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AACtB,EAAE;AACF;AACA,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,kBAAkB,EAAE;AACzE,EAAE,IAAI,iBAAiB,GAAG,KAAK,CAAC,KAAK,CAAC;AACtC,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC;AACnB;AACA,EAAE,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAClC;AACA,EAAE,OAAO,iBAAiB,GAAG,KAAK,CAAC,GAAG,EAAE;AACxC,GAAG,IAAI,QAAQ,CAAC,iBAAiB,CAAC,KAAK,IAAI,EAAE;AAC7C,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC;AAClB,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;AACnB,IAAI,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;AAChC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;AAC7D,IAAI,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;AACjC,IAAI,KAAK,GAAG,IAAI,CAAC;AACjB,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAChC,IAAI,MAAM;AACV,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,KAAK,IAAI,kBAAkB,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE;AAC1E,KAAK,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;AACnF;AACA,KAAK,IAAI,IAAI,CAAC,KAAK,KAAK,UAAU,EAAE;AACpC;AACA,MAAM,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,EAAE;AACvD;AACA,OAAO,IAAI,CAAC,mBAAmB,EAAE;AACjC,QAAQ,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACvC,QAAQ,mBAAmB,GAAG,IAAI,CAAC;AACnC,QAAQ;AACR,OAAO,MAAM;AACb;AACA,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACtC,OAAO,mBAAmB,GAAG,KAAK,CAAC;AACnC,OAAO;AACP,MAAM,MAAM;AACZ,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACrC,MAAM;AACN,KAAK;AACL;AACA,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;AACpB,IAAI,IAAI,CAAC,mBAAmB,IAAI,CAAC,CAAC;AAClC,IAAI,KAAK,GAAG,KAAK,CAAC;AAClB,IAAI;AACJ;AACA,GAAG,iBAAiB,IAAI,CAAC,CAAC;AAC1B,GAAG;AACH;AACA,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AACtB,EAAE;AACF;AACA,CAAC,OAAO,CAAC,GAAG,EAAE;AACd,EAAE,IAAI,CAAC,GAAG,EAAE,OAAO;AACnB;AACA,EAAE,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAChC;AACA,EAAE,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AACxB,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;AAC9C,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;AAC7B,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;AAC7D,IAAI;AACJ,GAAG,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;AAChC,GAAG;AACH;AACA,EAAE,IAAI,CAAC,mBAAmB,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;AAC7D,EAAE;AACF;;ACtGA,MAAM,CAAC,GAAG,IAAI,CAAA;;AAEd,MAAM,MAAM,GAAG;AACf,CAAC,UAAU,EAAE,KAAK;AAClB,CAAC,WAAW,EAAE,KAAK;AACnB,CAAC,SAAS,EAAE,KAAK;AACjB,CAAC,CAAA;;AAEc,MAAM,WAAW,CAAC;AACjC,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE;AACnC,EAAE,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;;AAEnD,EAAE,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE;AAChC,GAAG,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE;AAC9C,GAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AACvC,GAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AACvC,GAAG,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;AAC/C,GAAG,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;AAC9C,GAAG,iBAAiB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;AACtD,GAAG,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AACzC,GAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AACvC,GAAG,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,QAAQ,EAAE;AACxD,GAAG,qBAAqB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,qBAAqB,EAAE;AAClF,GAAG,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,MAAM,EAAE,EAAE;AAC9D,GAAG,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AAC7C,GAAG,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;AAClD,GAAG,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,UAAU,EAAE;AAC5D,GAAG,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,IAAI,CAAC,EAAE;AACzD,GAAG,CAAC,CAAA;;AAMJ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAA;AACzB,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAA;AACnC,EAAC;;AAED,CAAC,oBAAoB,CAAC,IAAI,EAAE;AAC5B,EAAE,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AACnC,EAAC;;AAED,CAAC,MAAM,CAAC,OAAO,EAAE;AACjB,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAA;;AAExF,EAAE,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;AACvB,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE;AAC5B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;AAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAEjC,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;AAC5B,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;AACxB,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE;AAC7B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;AAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAEnC,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;AAC7B,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;AACxB,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,KAAK,GAAG;AACT,EAAE,MAAM,MAAM,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;;AAEjG,EAAE,IAAI,aAAa,GAAG,IAAI,CAAC,UAAU,CAAA;AACrC,EAAE,IAAI,WAAW,IAAI,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,iBAAiB,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC,CAAA;;AAE1F,EAAE,OAAO,aAAa,EAAE;AACxB,GAAG,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,WAAW,CAAA;AAClD,GAAG,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,WAAW,CAAA;;AAE9C,GAAG,MAAM,iBAAiB,GAAG,aAAa,CAAC,IAAI,CAAA;AAC/C,GAAG,MAAM,eAAe,GAAG,iBAAiB,IAAI,iBAAiB,CAAC,KAAK,EAAE,CAAA;;AAEzE,GAAG,IAAI,eAAe,EAAE;AACxB,IAAI,WAAW,CAAC,IAAI,GAAG,eAAe,CAAA;AACtC,IAAI,eAAe,CAAC,QAAQ,GAAG,WAAW,CAAA;;AAE1C,IAAI,WAAW,GAAG,eAAe,CAAA;AACjC,IAAG;;AAEH,GAAG,aAAa,GAAG,iBAAiB,CAAA;AACpC,GAAE;;AAEF,EAAE,MAAM,CAAC,SAAS,GAAG,WAAW,CAAA;;AAEhC,EAAE,IAAI,IAAI,CAAC,qBAAqB,EAAE;AAClC,GAAG,MAAM,CAAC,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,EAAE,CAAA;AACpE,GAAE;;AAEF,EAAE,MAAM,CAAC,kBAAkB,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;;AAEjE,EAAE,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;AAC3B,EAAE,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;;AAE3B,EAAE,OAAO,MAAM,CAAA;AACf,EAAC;;AAED,CAAC,kBAAkB,CAAC,OAAO,EAAE;AAC7B,EAAE,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;;AAEzB,EAAE,MAAM,WAAW,GAAG,CAAC,CAAA;AACvB,EAAE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;AAC7C,EAAE,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAE9C,EAAE,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;;AAE1C,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;AAClB,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC/B,GAAE;;AAEF,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,KAAK,KAAK;AACtC,GAAG,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAElC,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAExD,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE;AACrB,IAAI,QAAQ,CAAC,OAAO;AACpB,KAAK,WAAW;AAChB,KAAK,KAAK,CAAC,OAAO;AAClB,KAAK,GAAG;AACR,KAAK,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACzD,KAAK,CAAA;AACL,IAAI,MAAM;AACV,IAAI,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAA;AAC9F,IAAG;;AAEH,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;AACxD,GAAG,CAAC,CAAA;;AAEJ,EAAE,OAAO;AACT,GAAG,IAAI,EAAE,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,SAAS;AACrE,GAAG,OAAO,EAAE;AACZ,IAAI,OAAO,CAAC,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,IAAI,EAAE;AAC7F,IAAI;AACJ,GAAG,cAAc,EAAE,OAAO,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,SAAS;AACvE,GAAG,KAAK;AACR,GAAG,QAAQ,EAAE,QAAQ,CAAC,GAAG;AACzB,GAAG,mBAAmB,EAAE,IAAI,CAAC,UAAU,GAAG,CAAC,WAAW,CAAC,GAAG,SAAS;AACnE,GAAG,CAAA;AACH,EAAC;;AAED,CAAC,WAAW,CAAC,OAAO,EAAE;AACtB,EAAE,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAA;AACxD,EAAC;;AAED,CAAC,gBAAgB,GAAG;AACpB,EAAE,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE;AACpC,GAAG,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;AAC9C,GAAE;AACF,EAAC;;AAED,CAAC,mBAAmB,GAAG;AACvB,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAA;AACzB,EAAE,OAAO,IAAI,CAAC,SAAS,CAAA;AACvB,EAAC;;AAED,CAAC,eAAe,GAAG;AACnB,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAA;AACzB,EAAE,OAAO,IAAI,CAAC,SAAS,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,SAAS,CAAA;AACxD,EAAC;;AAED,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE;AAC5B,EAAE,MAAM,OAAO,GAAG,YAAY,CAAA;;AAE9B,EAAE,IAAI,QAAQ,CAAC,SAAS,CAAC,EAAE;AAC3B,GAAG,OAAO,GAAG,SAAS,CAAA;AACtB,GAAG,SAAS,GAAG,SAAS,CAAA;AACxB,GAAE;;AAEF,EAAE,IAAI,SAAS,KAAK,SAAS,EAAE;AAC/B,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAA;AAC1B,GAAG,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAA;AACrC,GAAE;;AAEF,EAAE,IAAI,SAAS,KAAK,EAAE,EAAE,OAAO,IAAI,CAAC;;AAEpC,EAAE,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;;AAEzB;AACA,EAAE,MAAM,UAAU,GAAG,EAAE,CAAA;;AAEvB,EAAE,IAAI,OAAO,CAAC,OAAO,EAAE;AACvB,GAAG,MAAM,UAAU;AACnB,IAAI,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,QAAQ,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAA;AAChF,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,KAAK;AACrC,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;AACzD,KAAK,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;AACzB,KAAI;AACJ,IAAI,CAAC,CAAA;AACL,GAAE;;AAEF,EAAE,IAAI,yBAAyB,GAAG,OAAO,CAAC,WAAW,KAAK,KAAK,CAAA;AAC/D,EAAE,MAAM,QAAQ,GAAG,CAAC,KAAK,KAAK;AAC9B,GAAG,IAAI,yBAAyB,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,CAAC,CAAA;AAC/D,GAAG,yBAAyB,GAAG,IAAI,CAAA;AACnC,GAAG,OAAO,KAAK,CAAA;AACf,GAAG,CAAA;;AAEH,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;AAEpD,EAAE,IAAI,SAAS,GAAG,CAAC,CAAA;AACnB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;;AAE7B,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;;AAExB,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE;AACrB,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;AAChC,KAAK,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;AAE7D,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;AAC/B,MAAM,yBAAyB,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,CAAA;AAClF,MAAK;AACL,KAAI;AACJ,IAAI,MAAM;AACV,IAAI,SAAS,GAAG,KAAK,CAAC,KAAK,CAAA;;AAE3B,IAAI,OAAO,SAAS,GAAG,GAAG,EAAE;AAC5B,KAAK,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;AACjC,MAAM,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;;AAE3C,MAAM,IAAI,IAAI,KAAK,IAAI,EAAE;AACzB,OAAO,yBAAyB,GAAG,IAAI,CAAA;AACvC,OAAO,MAAM,IAAI,IAAI,KAAK,IAAI,IAAI,yBAAyB,EAAE;AAC7D,OAAO,yBAAyB,GAAG,KAAK,CAAA;;AAExC,OAAO,IAAI,SAAS,KAAK,KAAK,CAAC,KAAK,EAAE;AACtC,QAAQ,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;AACrC,QAAQ,MAAM;AACd,QAAQ,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;AAC1C,QAAQ,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AAC1B,QAAQ,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;AACrC,QAAO;AACP,OAAM;AACN,MAAK;;AAEL,KAAK,SAAS,IAAI,CAAC,CAAA;AACnB,KAAI;AACJ,IAAG;;AAEH,GAAG,SAAS,GAAG,KAAK,CAAC,GAAG,CAAA;AACxB,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;;AAEF,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;AAEpD,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,MAAM,GAAG;AACV,EAAE,MAAM,IAAI,KAAK;AACjB,GAAG,iFAAiF;AACpF,GAAG,CAAA;AACH,EAAC;;AAED,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE;AAC5B,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;AAC1B,GAAG,OAAO,CAAC,IAAI;AACf,IAAI,oFAAoF;AACxF,IAAI,CAAA;AACJ,GAAG,MAAM,CAAC,UAAU,GAAG,IAAI,CAAA;AAC3B,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;AACxC,EAAC;;AAED,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE;AAC7B,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE;AAC3B,GAAG,OAAO,CAAC,IAAI;AACf,IAAI,uFAAuF;AAC3F,IAAI,CAAA;AACJ,GAAG,MAAM,CAAC,WAAW,GAAG,IAAI,CAAA;AAC5B,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;AAC1C,EAAC;;AAED,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE;AACzB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;AACzB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;;AAI9F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;AAClB,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AACnC,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;;AAE9B,EAAE,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAA;AAChC,EAAE,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAA;;AAE5B,EAAE,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AACtC,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,KAAK,IAAI,CAAC,SAAS,EAAE,OAAO,IAAI,CAAA;AACvD,EAAE,MAAM,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAA;;AAE/D,EAAE,IAAI,OAAO,EAAE,OAAO,CAAC,IAAI,GAAG,QAAQ,CAAA;AACtC,EAAE,IAAI,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAA;;AAE3C,EAAE,IAAI,OAAO,EAAE,OAAO,CAAC,IAAI,GAAG,KAAK,CAAA;AACnC,EAAE,IAAI,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAA;;AAExC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAA;AAClD,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;AAClB,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAA;AAClC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI,CAAA;AAC7B,GAAE;;AAEF,EAAE,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAA;AAC1B,EAAE,IAAI,CAAC,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAA;;AAE9B,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,GAAG,KAAK,CAAA;AACvC,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;AAGtC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE;AACzC,EAAE,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;AACzB,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAA;AAC1F,EAAC;;AAED,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE;AACtC,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;AAEzB,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAA;;AAE9F,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAC9C,GAAE;;AAEF,EAAE,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAA;AACzE,EAAE,IAAI,KAAK,KAAK,GAAG;AACnB,GAAG,MAAM,IAAI,KAAK;AAClB,IAAI,+EAA+E;AACnF,IAAI,CAAA;;AAIJ,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;AAElB,EAAE,IAAI,OAAO,KAAK,IAAI,EAAE;AACxB,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;AAC1B,IAAI,OAAO,CAAC,IAAI;AAChB,KAAK,+HAA+H;AACpI,KAAK,CAAA;AACL,IAAI,MAAM,CAAC,SAAS,GAAG,IAAI,CAAA;AAC3B,IAAG;;AAEH,GAAG,OAAO,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAA;AAChC,GAAE;AACF,EAAE,MAAM,SAAS,GAAG,OAAO,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,KAAK,CAAA;AACrE,EAAE,MAAM,SAAS,GAAG,OAAO,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,KAAK,CAAA;;AAErE,EAAE,IAAI,SAAS,EAAE;AACjB,GAAG,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;AACnD,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE;AACrD,IAAI,QAAQ,EAAE,IAAI;AAClB,IAAI,KAAK,EAAE,IAAI;AACf,IAAI,UAAU,EAAE,IAAI;AACpB,IAAI,CAAC,CAAA;AACL,GAAE;;AAEF,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AACnC,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;;AAE9B,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,IAAI,KAAK,GAAG,KAAK,CAAA;AACpB,GAAG,OAAO,KAAK,KAAK,IAAI,EAAE;AAC1B,IAAI,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;AAChD,KAAK,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;AAC7D,KAAI;AACJ,IAAI,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACtB,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;AACzB,IAAG;;AAEH,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,CAAA;AAC7C,GAAG,MAAM;AACT;AACA,GAAG,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;;AAEtE;AACA,GAAG,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;AACvB,GAAG,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAA;AAC3B,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,OAAO,CAAC,OAAO,EAAE;AAClB,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAA;;AAExF,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACnC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE;AAC7B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;AAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAEjC,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;AAC7B,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACpC,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE;AAC9B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;AAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;AAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;AAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAEnC,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;AAC9B,GAAG,MAAM;AACT,GAAG,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AACpC,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE;AACpB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;AAEzB,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAC9C,GAAE;;AAEF,EAAE,IAAI,KAAK,KAAK,GAAG,EAAE,OAAO,IAAI,CAAA;;AAEhC,EAAE,IAAI,KAAK,GAAG,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;AAC5F,EAAE,IAAI,KAAK,GAAG,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;;AAIpE,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;AAElB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAEjC,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,KAAK,CAAC,KAAK,GAAG,EAAE,CAAA;AACnB,GAAG,KAAK,CAAC,KAAK,GAAG,EAAE,CAAA;AACnB,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;;AAEjB,GAAG,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;AAC3D,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE;AACnB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;AAEzB,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAC9C,GAAE;;AAEF,EAAE,IAAI,KAAK,KAAK,GAAG,EAAE,OAAO,IAAI,CAAA;;AAEhC,EAAE,IAAI,KAAK,GAAG,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;AAC5F,EAAE,IAAI,KAAK,GAAG,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;;AAIpE,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;AAElB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;AAEjC,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,KAAK,CAAC,KAAK,EAAE,CAAA;;AAEhB,GAAG,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;AAC3D,GAAE;AAGF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,QAAQ,GAAG;AACZ,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AACjE,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAA;AAC5B,EAAE,GAAG;AACL,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AACrE,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AAC3E,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AACrE,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,QAAQ,GAAE;AACpC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AACjE,EAAE,OAAO,EAAE,CAAA;AACX,EAAC;;AAED,CAAC,QAAQ,GAAG;AACZ,EAAE,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAC3C,EAAE,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,CAAA;AAC/D,EAAE,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;AAC1B,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAA;AAC5B,EAAE,GAAG;AACL,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AAC/B,IAAI,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAC1C,IAAI,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;AAC5E,IAAI,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,OAAO,CAAA;AACnC,IAAG;;AAEH,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;AACjC,IAAI,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAC5C,IAAI,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;AAC9E,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,GAAG,OAAO,CAAA;AACrC,IAAG;;AAEH,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AAC/B,IAAI,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAC1C,IAAI,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;AAC5E,IAAI,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,OAAO,CAAA;AACnC,IAAG;AACH,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,QAAQ,GAAE;AACpC,EAAE,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AACvC,EAAE,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;AACzE,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,OAAO,CAAA;AAC7B,EAAC;;AAED,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;AAC5D,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;AAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;AAEzB,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;AAC9C,GAAE;;AAEF,EAAE,IAAI,MAAM,GAAG,EAAE,CAAA;;AAEjB;AACA,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;AAC7B,EAAE,OAAO,KAAK,KAAK,KAAK,CAAC,KAAK,GAAG,KAAK,IAAI,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE;AAC/D;AACA,GAAG,IAAI,KAAK,CAAC,KAAK,GAAG,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,GAAG,EAAE;AAC9C,IAAI,OAAO,MAAM,CAAA;AACjB,IAAG;;AAEH,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;;AAEF,EAAE,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK;AACpD,GAAG,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAA;;AAEnF,EAAE,MAAM,UAAU,GAAG,KAAK,CAAA;AAC1B,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,IAAI,KAAK,CAAC,KAAK,KAAK,UAAU,KAAK,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,EAAE;AACvE,IAAI,MAAM,IAAI,KAAK,CAAC,KAAK,CAAA;AACzB,IAAG;;AAEH,GAAG,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,GAAG,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,GAAG,CAAA;AAC5D,GAAG,IAAI,WAAW,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG;AACvD,IAAI,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAA;;AAEhF,GAAG,MAAM,UAAU,GAAG,UAAU,KAAK,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAA;AACpE,GAAG,MAAM,QAAQ,GAAG,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAA;;AAE/F,GAAG,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;;AAEtD,GAAG,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE;AAC3D,IAAI,MAAM,IAAI,KAAK,CAAC,KAAK,CAAA;AACzB,IAAG;;AAEH,GAAG,IAAI,WAAW,EAAE;AACpB,IAAI,MAAK;AACT,IAAG;;AAEH,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;;AAEF,EAAE,OAAO,MAAM,CAAA;AACf,EAAC;;AAED;AACA,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE;AAClB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,CAAA;AAC5B,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;AACxB,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;;AAE1C,EAAE,OAAO,KAAK,CAAA;AACd,EAAC;;AAED,CAAC,MAAM,CAAC,KAAK,EAAE;AACf,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAM;;AAItD,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAA;AACpC,EAAE,MAAM,aAAa,GAAG,KAAK,GAAG,KAAK,CAAC,GAAG,CAAA;;AAEzC,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;;AAEnE,GAAG,KAAK,GAAG,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;AAC5E,GAAE;AACF,EAAC;;AAED,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE;AAC3B,EAAE,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;AAC5C;AACA,GAAG,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAA;AAC/C,GAAG,MAAM,IAAI,KAAK;AAClB,IAAI,CAAC,mDAAmD,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;AACzG,IAAI,CAAA;AACJ,GAAE;;AAEF,EAAE,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;AAErC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAA;AAC3B,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAA;AAChC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAA;;AAErC,EAAE,IAAI,KAAK,KAAK,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;;AAEzD,EAAE,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAA;AAEhC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,QAAQ,GAAG;AACZ,EAAE,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAA;;AAEtB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;AAC7B,EAAE,OAAO,KAAK,EAAE;AAChB,GAAG,GAAG,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAA;AAC1B,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAE;;AAEF,EAAE,OAAO,GAAG,GAAG,IAAI,CAAC,KAAK,CAAA;AACzB,EAAC;;AAED,CAAC,OAAO,GAAG;AACX,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;AAC7B,EAAE,GAAG;AACL,GAAG;AACH,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE;AAC7C,KAAK,KAAK,CAAC,OAAO,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;AAClD,KAAK,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;AAC7C;AACA,IAAI,OAAO,KAAK,CAAA;AAChB,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,IAAI,GAAE;AAChC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,MAAM,GAAG;AACV,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;AAC7B,EAAE,IAAI,MAAM,GAAG,CAAC,CAAA;AAChB,EAAE,GAAG;AACL,GAAG,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAA;AAC3E,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,IAAI,GAAE;AAChC,EAAE,OAAO,MAAM,CAAA;AACf,EAAC;;AAED,CAAC,SAAS,GAAG;AACb,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;AAC9B,EAAC;;AAED,CAAC,IAAI,CAAC,QAAQ,EAAE;AAChB,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;AACnD,EAAC;;AAED,CAAC,cAAc,CAAC,QAAQ,EAAE;AAC1B,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,QAAQ,IAAI,KAAK,IAAI,IAAI,CAAC,CAAA;;AAEnD,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;AAEpC,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAA;;AAE5B,EAAE,GAAG;AACL,GAAG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;AACxB,GAAG,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;;AAEpC;AACA,GAAG,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,SAAS,KAAK,KAAK,EAAE;AAClC,KAAK,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAA;AAChC,KAAI;;AAEJ,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AACjC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;AAC/C,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;AAC3C,IAAG;;AAEH,GAAG,IAAI,OAAO,EAAE,OAAO,IAAI,CAAA;AAC3B,GAAG,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAA;AACzB,GAAG,QAAQ,KAAK,EAAC;;AAEjB,EAAE,OAAO,KAAK,CAAA;AACd,EAAC;;AAED,CAAC,OAAO,CAAC,QAAQ,EAAE;AACnB,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;AAC/B,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;AACD,CAAC,gBAAgB,CAAC,QAAQ,EAAE;AAC5B,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,IAAI,QAAQ,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAA;;AAExD,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;AAEpC,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;;AAE7B,EAAE,GAAG;AACL,GAAG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;AACxB,GAAG,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;;AAEtC,GAAG,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE;AAC1B;AACA,IAAI,IAAI,KAAK,KAAK,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAA;;AAE7D,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AACjC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;AAC/C,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;AAC3C,IAAG;;AAEH,GAAG,IAAI,OAAO,EAAE,OAAO,IAAI,CAAA;AAC3B,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;AACrB,GAAG,QAAQ,KAAK,EAAC;;AAEjB,EAAE,OAAO,KAAK,CAAA;AACd,EAAC;;AAED,CAAC,SAAS,CAAC,QAAQ,EAAE;AACrB,EAAE,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAA;AACjC,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,UAAU,GAAG;AACd,EAAE,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAA;AAC1C,EAAC;;AAED,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE;AAC1C,EAAE,SAAS,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE;AACtC,GAAG,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;AACxC,IAAI,OAAO,WAAW,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK;AAC1D;AACA,KAAK,IAAI,CAAC,KAAK,GAAG,EAAE,OAAO,GAAG,CAAA;AAC9B,KAAK,IAAI,CAAC,KAAK,GAAG,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAA;AACnC,KAAK,MAAM,GAAG,GAAG,CAAC,CAAC,CAAA;AACnB,KAAK,IAAI,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;AAC7C,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AACnB,KAAK,CAAC,CAAA;AACN,IAAI,MAAM;AACV,IAAI,OAAO,WAAW,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;AAChE,IAAG;AACH,GAAE;AACF,EAAE,SAAS,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE;AAC7B,GAAG,IAAI,KAAK,CAAA;AACZ,GAAG,MAAM,OAAO,GAAG,EAAE,CAAA;AACrB,GAAG,QAAQ,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG;AAClC,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AACvB,IAAG;AACH,GAAG,OAAO,OAAO,CAAA;AACjB,GAAE;AACF,EAAE,IAAI,WAAW,CAAC,MAAM,EAAE;AAC1B,GAAG,MAAM,OAAO,GAAG,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;AACvD,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,KAAK;AAC9B,IAAI,IAAI,KAAK,CAAC,KAAK,IAAI,IAAI,EAAE;AAC7B,KAAK,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;AAC7D,KAAK,IAAI,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;AACnC,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;AAC7E,MAAK;AACL,KAAI;AACJ,IAAI,CAAC,CAAA;AACL,GAAG,MAAM;AACT,GAAG,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;AACjD,GAAG,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,IAAI,IAAI,EAAE;AACrC,IAAI,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;AAC5D,IAAI,IAAI,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;AAClC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;AAC5E,KAAI;AACJ,IAAG;AACH,GAAE;AACF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;AACrC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;AAC3B,EAAE,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;;AAExC,EAAE,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;AACpB,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;AAC5D,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,EAAE;AACnC,EAAE,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;AACvC,GAAG,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AACvD,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AACtD,EAAC;;AAED,CAAC,iBAAiB,CAAC,MAAM,EAAE,WAAW,EAAE;AACxC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;AAC3B,EAAE,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAA;AACpC,EAAE;AACF,GAAG,IAAI,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;AACvC,GAAG,KAAK,KAAK,CAAC,CAAC;AACf,GAAG,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,GAAG,YAAY,CAAA;AACxD,IAAI;AACJ,GAAG,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,CAAC,CAAA;AAC/D,GAAG,IAAI,QAAQ,KAAK,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,EAAE,WAAW,CAAC,CAAA;AACzF,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAA;AACb,EAAC;;AAED,CAAC,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE;AACtC,EAAE,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;AACvC,GAAG,OAAO,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AAC1D,GAAE;;AAEF,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE;AAC3B,GAAG,MAAM,IAAI,SAAS;AACtB,IAAI,2EAA2E;AAC/E,IAAI,CAAA;AACJ,GAAE;;AAEF,EAAE,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AACtD,EAAC;AACD;;AC33BA,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD;AACe,MAAM,MAAM,CAAC;AAC5B,CAAC,WAAW,CAAC,OAAO,GAAG,EAAE,EAAE;AAC3B,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;AACnC,EAAE,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;AAC9E,EAAE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;AACpB,EAAE,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;AAC1B,EAAE,IAAI,CAAC,2BAA2B,GAAG,EAAE,CAAC;AACxC,EAAE;AACF;AACA,CAAC,SAAS,CAAC,MAAM,EAAE;AACnB,EAAE,IAAI,MAAM,YAAY,WAAW,EAAE;AACrC,GAAG,OAAO,IAAI,CAAC,SAAS,CAAC;AACzB,IAAI,OAAO,EAAE,MAAM;AACnB,IAAI,QAAQ,EAAE,MAAM,CAAC,QAAQ;AAC7B,IAAI,SAAS,EAAE,IAAI,CAAC,SAAS;AAC7B,IAAI,CAAC,CAAC;AACN,GAAG;AACH;AACA,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;AAC5C,GAAG,MAAM,IAAI,KAAK;AAClB,IAAI,sIAAsI;AAC1I,IAAI,CAAC;AACL,GAAG;AACH;AACA,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,uBAAuB,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACvF,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AACjF,GAAG,CAAC,CAAC;AACL;AACA,EAAE,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,EAAE;AACtC;AACA,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;AACrC,GAAG;AACH;AACA,EAAE,IAAI,MAAM,CAAC,QAAQ,EAAE;AACvB,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,2BAA2B,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE;AAC5E,IAAI,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;AAClF,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC7F,IAAI,MAAM;AACV,IAAI,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC/F,IAAI,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,KAAK,YAAY,CAAC,OAAO,EAAE;AAC1D,KAAK,MAAM,IAAI,KAAK,CAAC,CAAC,+BAA+B,EAAE,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC,CAAC;AAC/F,KAAK;AACL,IAAI;AACJ,GAAG;AACH;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5B,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE;AACtB,EAAE,IAAI,CAAC,SAAS,CAAC;AACjB,GAAG,OAAO,EAAE,IAAI,WAAW,CAAC,GAAG,CAAC;AAChC,GAAG,SAAS,EAAE,CAAC,OAAO,IAAI,OAAO,CAAC,SAAS,KAAK,EAAE;AAClD,GAAG,CAAC,CAAC;AACL;AACA,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,KAAK,GAAG;AACT,EAAE,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC;AAC5B,GAAG,KAAK,EAAE,IAAI,CAAC,KAAK;AACpB,GAAG,SAAS,EAAE,IAAI,CAAC,SAAS;AAC5B,GAAG,CAAC,CAAC;AACL;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACnC,GAAG,MAAM,CAAC,SAAS,CAAC;AACpB,IAAI,QAAQ,EAAE,MAAM,CAAC,QAAQ;AAC7B,IAAI,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE;AACnC,IAAI,SAAS,EAAE,MAAM,CAAC,SAAS;AAC/B,IAAI,CAAC,CAAC;AACN,GAAG,CAAC,CAAC;AACL;AACA,EAAE,OAAO,MAAM,CAAC;AAChB,EAAE;AACF;AACA,CAAC,kBAAkB,CAAC,OAAO,GAAG,EAAE,EAAE;AAClC,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;AACnB,EAAE,IAAI,mBAAmB,GAAG,SAAS,CAAC;AACtC,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACnC,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK;AAC7D,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChD,IAAI,CAAC,CAAC;AACN,GAAG,CAAC,CAAC;AACL;AACA,EAAE,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC/C;AACA,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;AAClB,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAChC,GAAG;AACH;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK;AACtC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE;AACd,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACrC,IAAI;AACJ;AACA,GAAG,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AAChG,GAAG,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC;AACtC,GAAG,MAAM,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;AACnD;AACA,GAAG,IAAI,WAAW,CAAC,KAAK,EAAE;AAC1B,IAAI,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACxC,IAAI;AACJ;AACA,GAAG,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,KAAK,KAAK;AAC9C,IAAI,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACpC;AACA,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC1D;AACA,IAAI,IAAI,MAAM,CAAC,QAAQ,EAAE;AACzB,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE;AACvB,MAAM,QAAQ,CAAC,OAAO;AACtB,OAAO,WAAW;AAClB,OAAO,KAAK,CAAC,OAAO;AACpB,OAAO,GAAG;AACV,OAAO,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC3D,OAAO,CAAC;AACR,MAAM,MAAM;AACZ,MAAM,QAAQ,CAAC,gBAAgB;AAC/B,OAAO,WAAW;AAClB,OAAO,KAAK;AACZ,OAAO,WAAW,CAAC,QAAQ;AAC3B,OAAO,GAAG;AACV,OAAO,WAAW,CAAC,kBAAkB;AACrC,OAAO,CAAC;AACR,MAAM;AACN,KAAK,MAAM;AACX,KAAK,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACrC,KAAK;AACL;AACA,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC1D,IAAI,CAAC,CAAC;AACN;AACA,GAAG,IAAI,WAAW,CAAC,KAAK,EAAE;AAC1B,IAAI,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACxC,IAAI;AACJ;AACA,GAAG,IAAI,MAAM,CAAC,UAAU,IAAI,WAAW,KAAK,CAAC,CAAC,EAAE;AAChD,IAAI,IAAI,mBAAmB,KAAK,SAAS,EAAE;AAC3C,KAAK,mBAAmB,GAAG,EAAE,CAAC;AAC9B,KAAK;AACL,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAC1C,IAAI;AACJ,GAAG,CAAC,CAAC;AACL;AACA,EAAE,OAAO;AACT,GAAG,IAAI,EAAE,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,SAAS;AACrE,GAAG,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK;AAC/C,IAAI,OAAO,OAAO,CAAC,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3F,IAAI,CAAC;AACL,GAAG,cAAc,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK;AACtD,IAAI,OAAO,OAAO,CAAC,cAAc,GAAG,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;AAC1D,IAAI,CAAC;AACL,GAAG,KAAK;AACR,GAAG,QAAQ,EAAE,QAAQ,CAAC,GAAG;AACzB,GAAG,mBAAmB;AACtB,GAAG,CAAC;AACJ,EAAE;AACF;AACA,CAAC,WAAW,CAAC,OAAO,EAAE;AACtB,EAAE,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;AACzD,EAAE;AACF;AACA,CAAC,eAAe,GAAG;AACnB,EAAE,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAChC;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACnC,GAAG,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC;AAC1D;AACA,GAAG,IAAI,SAAS,KAAK,IAAI,EAAE,OAAO;AAClC;AACA,GAAG,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AACzE,GAAG,kBAAkB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACtC,GAAG,CAAC,CAAC;AACL;AACA,EAAE;AACF,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;AAClD,IAAI,OAAO,kBAAkB,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;AACzD,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI;AAChB,IAAI;AACJ,EAAE;AACF;AACA,CAAC,MAAM,CAAC,SAAS,EAAE;AACnB,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;AACzB,GAAG,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;AACtC,GAAG;AACH;AACA,EAAE,IAAI,SAAS,KAAK,EAAE,EAAE,OAAO,IAAI,CAAC;AACpC;AACA,EAAE,IAAI,eAAe,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AACrE;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK;AACtC,GAAG,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,KAAK,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;AACxF,GAAG,MAAM,WAAW,GAAG,eAAe,KAAK,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;AAC9E;AACA,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE;AACpC,IAAI,OAAO,EAAE,MAAM,CAAC,qBAAqB;AACzC,IAAI,WAAW;AACf,IAAI,CAAC,CAAC;AACN;AACA,GAAG,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC;AACxD,GAAG,CAAC,CAAC;AACL;AACA,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;AAClB,GAAG,IAAI,CAAC,KAAK;AACb,IAAI,SAAS;AACb,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK;AACrD,KAAK,OAAO,KAAK,GAAG,CAAC,GAAG,SAAS,GAAG,KAAK,GAAG,KAAK,CAAC;AAClD,KAAK,CAAC,CAAC;AACP,GAAG;AACH;AACA,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,OAAO,CAAC,GAAG,EAAE;AACd,EAAE,IAAI,CAAC,KAAK,GAAG,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC;AAChC,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,QAAQ,GAAG;AACZ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO;AAC3B,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK;AACvB,IAAI,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,KAAK,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;AACzF,IAAI,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,GAAG,EAAE,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;AACrE;AACA,IAAI,OAAO,GAAG,CAAC;AACf,IAAI,CAAC;AACL,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC;AACb;AACA,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;AAC3B,EAAE;AACF;AACA,CAAC,OAAO,GAAG;AACX,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,OAAO,KAAK,CAAC;AAC3D,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,KAAK,CAAC;AAC7E,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,MAAM,GAAG;AACV,EAAE,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM;AAC5B,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE;AACvD,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM;AACpB,GAAG,CAAC;AACJ,EAAE;AACF;AACA,CAAC,SAAS,GAAG;AACb,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC/B,EAAE;AACF;AACA,CAAC,IAAI,CAAC,QAAQ,EAAE;AAChB,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACpD,EAAE;AACF;AACA,CAAC,SAAS,CAAC,QAAQ,EAAE;AACrB,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,IAAI,QAAQ,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC;AACzD,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1C;AACA,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;AACnB,GAAG,IAAI,MAAM,CAAC;AACd,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;AACb;AACA,GAAG,GAAG;AACN,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,IAAI,CAAC,MAAM,EAAE;AACjB,KAAK,MAAM;AACX,KAAK;AACL,IAAI,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE;AACxD,GAAG;AACH;AACA,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,OAAO,CAAC,QAAQ,EAAE;AACnB,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,QAAQ,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC;AACpD;AACA,EAAE,IAAI,MAAM,CAAC;AACb,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;AAClC;AACA,EAAE,GAAG;AACL,GAAG,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;AAC9B,GAAG,IAAI,CAAC,MAAM,EAAE;AAChB,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC5C,IAAI,MAAM;AACV,IAAI;AACJ,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;AACrD;AACA,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;;;;"} \ No newline at end of file diff --git a/vuetest/node_modules/magic-string/dist/magic-string.umd.js b/vuetest/node_modules/magic-string/dist/magic-string.umd.js new file mode 100644 index 0000000..bb2be85 --- /dev/null +++ b/vuetest/node_modules/magic-string/dist/magic-string.umd.js @@ -0,0 +1,1672 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.MagicString = factory()); +})(this, (function () { 'use strict'; + + class BitSet { + constructor(arg) { + this.bits = arg instanceof BitSet ? arg.bits.slice() : []; + } + + add(n) { + this.bits[n >> 5] |= 1 << (n & 31); + } + + has(n) { + return !!(this.bits[n >> 5] & (1 << (n & 31))); + } + } + + class Chunk { + constructor(start, end, content) { + this.start = start; + this.end = end; + this.original = content; + + this.intro = ''; + this.outro = ''; + + this.content = content; + this.storeName = false; + this.edited = false; + + { + this.previous = null; + this.next = null; + } + } + + appendLeft(content) { + this.outro += content; + } + + appendRight(content) { + this.intro = this.intro + content; + } + + clone() { + const chunk = new Chunk(this.start, this.end, this.original); + + chunk.intro = this.intro; + chunk.outro = this.outro; + chunk.content = this.content; + chunk.storeName = this.storeName; + chunk.edited = this.edited; + + return chunk; + } + + contains(index) { + return this.start < index && index < this.end; + } + + eachNext(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.next; + } + } + + eachPrevious(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.previous; + } + } + + edit(content, storeName, contentOnly) { + this.content = content; + if (!contentOnly) { + this.intro = ''; + this.outro = ''; + } + this.storeName = storeName; + + this.edited = true; + + return this; + } + + prependLeft(content) { + this.outro = content + this.outro; + } + + prependRight(content) { + this.intro = content + this.intro; + } + + reset() { + this.intro = ''; + this.outro = ''; + if (this.edited) { + this.content = this.original; + this.storeName = false; + this.edited = false; + } + } + + split(index) { + const sliceIndex = index - this.start; + + const originalBefore = this.original.slice(0, sliceIndex); + const originalAfter = this.original.slice(sliceIndex); + + this.original = originalBefore; + + const newChunk = new Chunk(index, this.end, originalAfter); + newChunk.outro = this.outro; + this.outro = ''; + + this.end = index; + + if (this.edited) { + // after split we should save the edit content record into the correct chunk + // to make sure sourcemap correct + // For example: + // ' test'.trim() + // split -> ' ' + 'test' + // ✔️ edit -> '' + 'test' + // ✖️ edit -> 'test' + '' + // TODO is this block necessary?... + newChunk.edit('', false); + this.content = ''; + } else { + this.content = originalBefore; + } + + newChunk.next = this.next; + if (newChunk.next) newChunk.next.previous = newChunk; + newChunk.previous = this; + this.next = newChunk; + + return newChunk; + } + + toString() { + return this.intro + this.content + this.outro; + } + + trimEnd(rx) { + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + this.split(this.start + trimmed.length).edit('', undefined, true); + if (this.edited) { + // save the change, if it has been edited + this.edit(trimmed, this.storeName, true); + } + } + return true; + } else { + this.edit('', undefined, true); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + } + } + + trimStart(rx) { + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + const newChunk = this.split(this.end - trimmed.length); + if (this.edited) { + // save the change, if it has been edited + newChunk.edit(trimmed, this.storeName, true); + } + this.edit('', undefined, true); + } + return true; + } else { + this.edit('', undefined, true); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + } + } + } + + const comma = ','.charCodeAt(0); + const semicolon = ';'.charCodeAt(0); + const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + const intToChar = new Uint8Array(64); // 64 possible chars. + const charToInt = new Uint8Array(128); // z is 122 in ASCII + for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; + } + function encodeInteger(builder, num, relative) { + let delta = num - relative; + delta = delta < 0 ? (-delta << 1) | 1 : delta << 1; + do { + let clamped = delta & 0b011111; + delta >>>= 5; + if (delta > 0) + clamped |= 0b100000; + builder.write(intToChar[clamped]); + } while (delta > 0); + return num; + } + + const bufLength = 1024 * 16; + // Provide a fallback for older environments. + const td = typeof TextDecoder !== 'undefined' + ? /* #__PURE__ */ new TextDecoder() + : typeof Buffer !== 'undefined' + ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + }, + } + : { + decode(buf) { + let out = ''; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + }, + }; + class StringWriter { + constructor() { + this.pos = 0; + this.out = ''; + this.buffer = new Uint8Array(bufLength); + } + write(v) { + const { buffer } = this; + buffer[this.pos++] = v; + if (this.pos === bufLength) { + this.out += td.decode(buffer); + this.pos = 0; + } + } + flush() { + const { buffer, out, pos } = this; + return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; + } + } + function encode(decoded) { + const writer = new StringWriter(); + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) + writer.write(semicolon); + if (line.length === 0) + continue; + let genColumn = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + if (j > 0) + writer.write(comma); + genColumn = encodeInteger(writer, segment[0], genColumn); + if (segment.length === 1) + continue; + sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); + sourceLine = encodeInteger(writer, segment[2], sourceLine); + sourceColumn = encodeInteger(writer, segment[3], sourceColumn); + if (segment.length === 4) + continue; + namesIndex = encodeInteger(writer, segment[4], namesIndex); + } + } + return writer.flush(); + } + + function getBtoa() { + if (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') { + return (str) => globalThis.btoa(unescape(encodeURIComponent(str))); + } else if (typeof Buffer === 'function') { + return (str) => Buffer.from(str, 'utf-8').toString('base64'); + } else { + return () => { + throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.'); + }; + } + } + + const btoa = /*#__PURE__*/ getBtoa(); + + class SourceMap { + constructor(properties) { + this.version = 3; + this.file = properties.file; + this.sources = properties.sources; + this.sourcesContent = properties.sourcesContent; + this.names = properties.names; + this.mappings = encode(properties.mappings); + if (typeof properties.x_google_ignoreList !== 'undefined') { + this.x_google_ignoreList = properties.x_google_ignoreList; + } + if (typeof properties.debugId !== 'undefined') { + this.debugId = properties.debugId; + } + } + + toString() { + return JSON.stringify(this); + } + + toUrl() { + return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString()); + } + } + + function guessIndent(code) { + const lines = code.split('\n'); + + const tabbed = lines.filter((line) => /^\t+/.test(line)); + const spaced = lines.filter((line) => /^ {2,}/.test(line)); + + if (tabbed.length === 0 && spaced.length === 0) { + return null; + } + + // More lines tabbed than spaced? Assume tabs, and + // default to tabs in the case of a tie (or nothing + // to go on) + if (tabbed.length >= spaced.length) { + return '\t'; + } + + // Otherwise, we need to guess the multiple + const min = spaced.reduce((previous, current) => { + const numSpaces = /^ +/.exec(current)[0].length; + return Math.min(numSpaces, previous); + }, Infinity); + + return new Array(min + 1).join(' '); + } + + function getRelativePath(from, to) { + const fromParts = from.split(/[/\\]/); + const toParts = to.split(/[/\\]/); + + fromParts.pop(); // get dirname + + while (fromParts[0] === toParts[0]) { + fromParts.shift(); + toParts.shift(); + } + + if (fromParts.length) { + let i = fromParts.length; + while (i--) fromParts[i] = '..'; + } + + return fromParts.concat(toParts).join('/'); + } + + const toString = Object.prototype.toString; + + function isObject(thing) { + return toString.call(thing) === '[object Object]'; + } + + function getLocator(source) { + const originalLines = source.split('\n'); + const lineOffsets = []; + + for (let i = 0, pos = 0; i < originalLines.length; i++) { + lineOffsets.push(pos); + pos += originalLines[i].length + 1; + } + + return function locate(index) { + let i = 0; + let j = lineOffsets.length; + while (i < j) { + const m = (i + j) >> 1; + if (index < lineOffsets[m]) { + j = m; + } else { + i = m + 1; + } + } + const line = i - 1; + const column = index - lineOffsets[line]; + return { line, column }; + }; + } + + const wordRegex = /\w/; + + class Mappings { + constructor(hires) { + this.hires = hires; + this.generatedCodeLine = 0; + this.generatedCodeColumn = 0; + this.raw = []; + this.rawSegments = this.raw[this.generatedCodeLine] = []; + this.pending = null; + } + + addEdit(sourceIndex, content, loc, nameIndex) { + if (content.length) { + const contentLengthMinusOne = content.length - 1; + let contentLineEnd = content.indexOf('\n', 0); + let previousContentLineEnd = -1; + // Loop through each line in the content and add a segment, but stop if the last line is empty, + // else code afterwards would fill one line too many + while (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); + + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; + + previousContentLineEnd = contentLineEnd; + contentLineEnd = content.indexOf('\n', contentLineEnd + 1); + } + + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); + + this.advance(content.slice(previousContentLineEnd + 1)); + } else if (this.pending) { + this.rawSegments.push(this.pending); + this.advance(content); + } + + this.pending = null; + } + + addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) { + let originalCharIndex = chunk.start; + let first = true; + // when iterating each char, check if it's in a word boundary + let charInHiresBoundary = false; + + while (originalCharIndex < chunk.end) { + if (original[originalCharIndex] === '\n') { + loc.line += 1; + loc.column = 0; + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; + first = true; + charInHiresBoundary = false; + } else { + if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + + if (this.hires === 'boundary') { + // in hires "boundary", group segments per word boundary than per char + if (wordRegex.test(original[originalCharIndex])) { + // for first char in the boundary found, start the boundary by pushing a segment + if (!charInHiresBoundary) { + this.rawSegments.push(segment); + charInHiresBoundary = true; + } + } else { + // for non-word char, end the boundary by pushing a segment + this.rawSegments.push(segment); + charInHiresBoundary = false; + } + } else { + this.rawSegments.push(segment); + } + } + + loc.column += 1; + this.generatedCodeColumn += 1; + first = false; + } + + originalCharIndex += 1; + } + + this.pending = null; + } + + advance(str) { + if (!str) return; + + const lines = str.split('\n'); + + if (lines.length > 1) { + for (let i = 0; i < lines.length - 1; i++) { + this.generatedCodeLine++; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + } + this.generatedCodeColumn = 0; + } + + this.generatedCodeColumn += lines[lines.length - 1].length; + } + } + + const n = '\n'; + + const warned = { + insertLeft: false, + insertRight: false, + storeName: false, + }; + + class MagicString { + constructor(string, options = {}) { + const chunk = new Chunk(0, string.length, string); + + Object.defineProperties(this, { + original: { writable: true, value: string }, + outro: { writable: true, value: '' }, + intro: { writable: true, value: '' }, + firstChunk: { writable: true, value: chunk }, + lastChunk: { writable: true, value: chunk }, + lastSearchedChunk: { writable: true, value: chunk }, + byStart: { writable: true, value: {} }, + byEnd: { writable: true, value: {} }, + filename: { writable: true, value: options.filename }, + indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, + sourcemapLocations: { writable: true, value: new BitSet() }, + storedNames: { writable: true, value: {} }, + indentStr: { writable: true, value: undefined }, + ignoreList: { writable: true, value: options.ignoreList }, + offset: { writable: true, value: options.offset || 0 }, + }); + + this.byStart[0] = chunk; + this.byEnd[string.length] = chunk; + } + + addSourcemapLocation(char) { + this.sourcemapLocations.add(char); + } + + append(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); + + this.outro += content; + return this; + } + + appendLeft(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byEnd[index]; + + if (chunk) { + chunk.appendLeft(content); + } else { + this.intro += content; + } + return this; + } + + appendRight(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byStart[index]; + + if (chunk) { + chunk.appendRight(content); + } else { + this.outro += content; + } + return this; + } + + clone() { + const cloned = new MagicString(this.original, { filename: this.filename, offset: this.offset }); + + let originalChunk = this.firstChunk; + let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone()); + + while (originalChunk) { + cloned.byStart[clonedChunk.start] = clonedChunk; + cloned.byEnd[clonedChunk.end] = clonedChunk; + + const nextOriginalChunk = originalChunk.next; + const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); + + if (nextClonedChunk) { + clonedChunk.next = nextClonedChunk; + nextClonedChunk.previous = clonedChunk; + + clonedChunk = nextClonedChunk; + } + + originalChunk = nextOriginalChunk; + } + + cloned.lastChunk = clonedChunk; + + if (this.indentExclusionRanges) { + cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); + } + + cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); + + cloned.intro = this.intro; + cloned.outro = this.outro; + + return cloned; + } + + generateDecodedMap(options) { + options = options || {}; + + const sourceIndex = 0; + const names = Object.keys(this.storedNames); + const mappings = new Mappings(options.hires); + + const locate = getLocator(this.original); + + if (this.intro) { + mappings.advance(this.intro); + } + + this.firstChunk.eachNext((chunk) => { + const loc = locate(chunk.start); + + if (chunk.intro.length) mappings.advance(chunk.intro); + + if (chunk.edited) { + mappings.addEdit( + sourceIndex, + chunk.content, + loc, + chunk.storeName ? names.indexOf(chunk.original) : -1, + ); + } else { + mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations); + } + + if (chunk.outro.length) mappings.advance(chunk.outro); + }); + + return { + file: options.file ? options.file.split(/[/\\]/).pop() : undefined, + sources: [ + options.source ? getRelativePath(options.file || '', options.source) : options.file || '', + ], + sourcesContent: options.includeContent ? [this.original] : undefined, + names, + mappings: mappings.raw, + x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined, + }; + } + + generateMap(options) { + return new SourceMap(this.generateDecodedMap(options)); + } + + _ensureindentStr() { + if (this.indentStr === undefined) { + this.indentStr = guessIndent(this.original); + } + } + + _getRawIndentString() { + this._ensureindentStr(); + return this.indentStr; + } + + getIndentString() { + this._ensureindentStr(); + return this.indentStr === null ? '\t' : this.indentStr; + } + + indent(indentStr, options) { + const pattern = /^[^\r\n]/gm; + + if (isObject(indentStr)) { + options = indentStr; + indentStr = undefined; + } + + if (indentStr === undefined) { + this._ensureindentStr(); + indentStr = this.indentStr || '\t'; + } + + if (indentStr === '') return this; // noop + + options = options || {}; + + // Process exclusion ranges + const isExcluded = {}; + + if (options.exclude) { + const exclusions = + typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude; + exclusions.forEach((exclusion) => { + for (let i = exclusion[0]; i < exclusion[1]; i += 1) { + isExcluded[i] = true; + } + }); + } + + let shouldIndentNextCharacter = options.indentStart !== false; + const replacer = (match) => { + if (shouldIndentNextCharacter) return `${indentStr}${match}`; + shouldIndentNextCharacter = true; + return match; + }; + + this.intro = this.intro.replace(pattern, replacer); + + let charIndex = 0; + let chunk = this.firstChunk; + + while (chunk) { + const end = chunk.end; + + if (chunk.edited) { + if (!isExcluded[charIndex]) { + chunk.content = chunk.content.replace(pattern, replacer); + + if (chunk.content.length) { + shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n'; + } + } + } else { + charIndex = chunk.start; + + while (charIndex < end) { + if (!isExcluded[charIndex]) { + const char = this.original[charIndex]; + + if (char === '\n') { + shouldIndentNextCharacter = true; + } else if (char !== '\r' && shouldIndentNextCharacter) { + shouldIndentNextCharacter = false; + + if (charIndex === chunk.start) { + chunk.prependRight(indentStr); + } else { + this._splitChunk(chunk, charIndex); + chunk = chunk.next; + chunk.prependRight(indentStr); + } + } + } + + charIndex += 1; + } + } + + charIndex = chunk.end; + chunk = chunk.next; + } + + this.outro = this.outro.replace(pattern, replacer); + + return this; + } + + insert() { + throw new Error( + 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)', + ); + } + + insertLeft(index, content) { + if (!warned.insertLeft) { + console.warn( + 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead', + ); + warned.insertLeft = true; + } + + return this.appendLeft(index, content); + } + + insertRight(index, content) { + if (!warned.insertRight) { + console.warn( + 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead', + ); + warned.insertRight = true; + } + + return this.prependRight(index, content); + } + + move(start, end, index) { + start = start + this.offset; + end = end + this.offset; + index = index + this.offset; + + if (index >= start && index <= end) throw new Error('Cannot move a selection inside itself'); + + this._split(start); + this._split(end); + this._split(index); + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + const oldLeft = first.previous; + const oldRight = last.next; + + const newRight = this.byStart[index]; + if (!newRight && last === this.lastChunk) return this; + const newLeft = newRight ? newRight.previous : this.lastChunk; + + if (oldLeft) oldLeft.next = oldRight; + if (oldRight) oldRight.previous = oldLeft; + + if (newLeft) newLeft.next = first; + if (newRight) newRight.previous = last; + + if (!first.previous) this.firstChunk = last.next; + if (!last.next) { + this.lastChunk = first.previous; + this.lastChunk.next = null; + } + + first.previous = newLeft; + last.next = newRight || null; + + if (!newLeft) this.firstChunk = first; + if (!newRight) this.lastChunk = last; + return this; + } + + overwrite(start, end, content, options) { + options = options || {}; + return this.update(start, end, content, { ...options, overwrite: !options.contentOnly }); + } + + update(start, end, content, options) { + start = start + this.offset; + end = end + this.offset; + + if (typeof content !== 'string') throw new TypeError('replacement content must be a string'); + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + if (end > this.original.length) throw new Error('end is out of bounds'); + if (start === end) + throw new Error( + 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead', + ); + + this._split(start); + this._split(end); + + if (options === true) { + if (!warned.storeName) { + console.warn( + 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string', + ); + warned.storeName = true; + } + + options = { storeName: true }; + } + const storeName = options !== undefined ? options.storeName : false; + const overwrite = options !== undefined ? options.overwrite : false; + + if (storeName) { + const original = this.original.slice(start, end); + Object.defineProperty(this.storedNames, original, { + writable: true, + value: true, + enumerable: true, + }); + } + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + if (first) { + let chunk = first; + while (chunk !== last) { + if (chunk.next !== this.byStart[chunk.end]) { + throw new Error('Cannot overwrite across a split point'); + } + chunk = chunk.next; + chunk.edit('', false); + } + + first.edit(content, storeName, !overwrite); + } else { + // must be inserting at the end + const newChunk = new Chunk(start, end, '').edit(content, storeName); + + // TODO last chunk in the array may not be the last chunk, if it's moved... + last.next = newChunk; + newChunk.previous = last; + } + return this; + } + + prepend(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); + + this.intro = content + this.intro; + return this; + } + + prependLeft(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byEnd[index]; + + if (chunk) { + chunk.prependLeft(content); + } else { + this.intro = content + this.intro; + } + return this; + } + + prependRight(index, content) { + index = index + this.offset; + + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byStart[index]; + + if (chunk) { + chunk.prependRight(content); + } else { + this.outro = content + this.outro; + } + return this; + } + + remove(start, end) { + start = start + this.offset; + end = end + this.offset; + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + if (start === end) return this; + + if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); + if (start > end) throw new Error('end must be greater than start'); + + this._split(start); + this._split(end); + + let chunk = this.byStart[start]; + + while (chunk) { + chunk.intro = ''; + chunk.outro = ''; + chunk.edit(''); + + chunk = end > chunk.end ? this.byStart[chunk.end] : null; + } + return this; + } + + reset(start, end) { + start = start + this.offset; + end = end + this.offset; + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + if (start === end) return this; + + if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); + if (start > end) throw new Error('end must be greater than start'); + + this._split(start); + this._split(end); + + let chunk = this.byStart[start]; + + while (chunk) { + chunk.reset(); + + chunk = end > chunk.end ? this.byStart[chunk.end] : null; + } + return this; + } + + lastChar() { + if (this.outro.length) return this.outro[this.outro.length - 1]; + let chunk = this.lastChunk; + do { + if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1]; + if (chunk.content.length) return chunk.content[chunk.content.length - 1]; + if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1]; + } while ((chunk = chunk.previous)); + if (this.intro.length) return this.intro[this.intro.length - 1]; + return ''; + } + + lastLine() { + let lineIndex = this.outro.lastIndexOf(n); + if (lineIndex !== -1) return this.outro.substr(lineIndex + 1); + let lineStr = this.outro; + let chunk = this.lastChunk; + do { + if (chunk.outro.length > 0) { + lineIndex = chunk.outro.lastIndexOf(n); + if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.outro + lineStr; + } + + if (chunk.content.length > 0) { + lineIndex = chunk.content.lastIndexOf(n); + if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr; + lineStr = chunk.content + lineStr; + } + + if (chunk.intro.length > 0) { + lineIndex = chunk.intro.lastIndexOf(n); + if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.intro + lineStr; + } + } while ((chunk = chunk.previous)); + lineIndex = this.intro.lastIndexOf(n); + if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr; + return this.intro + lineStr; + } + + slice(start = 0, end = this.original.length - this.offset) { + start = start + this.offset; + end = end + this.offset; + + if (this.original.length !== 0) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + } + + let result = ''; + + // find start chunk + let chunk = this.firstChunk; + while (chunk && (chunk.start > start || chunk.end <= start)) { + // found end chunk before start + if (chunk.start < end && chunk.end >= end) { + return result; + } + + chunk = chunk.next; + } + + if (chunk && chunk.edited && chunk.start !== start) + throw new Error(`Cannot use replaced character ${start} as slice start anchor.`); + + const startChunk = chunk; + while (chunk) { + if (chunk.intro && (startChunk !== chunk || chunk.start === start)) { + result += chunk.intro; + } + + const containsEnd = chunk.start < end && chunk.end >= end; + if (containsEnd && chunk.edited && chunk.end !== end) + throw new Error(`Cannot use replaced character ${end} as slice end anchor.`); + + const sliceStart = startChunk === chunk ? start - chunk.start : 0; + const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; + + result += chunk.content.slice(sliceStart, sliceEnd); + + if (chunk.outro && (!containsEnd || chunk.end === end)) { + result += chunk.outro; + } + + if (containsEnd) { + break; + } + + chunk = chunk.next; + } + + return result; + } + + // TODO deprecate this? not really very useful + snip(start, end) { + const clone = this.clone(); + clone.remove(0, start); + clone.remove(end, clone.original.length); + + return clone; + } + + _split(index) { + if (this.byStart[index] || this.byEnd[index]) return; + + let chunk = this.lastSearchedChunk; + const searchForward = index > chunk.end; + + while (chunk) { + if (chunk.contains(index)) return this._splitChunk(chunk, index); + + chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; + } + } + + _splitChunk(chunk, index) { + if (chunk.edited && chunk.content.length) { + // zero-length edited chunks are a special case (overlapping replacements) + const loc = getLocator(this.original)(index); + throw new Error( + `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`, + ); + } + + const newChunk = chunk.split(index); + + this.byEnd[index] = chunk; + this.byStart[index] = newChunk; + this.byEnd[newChunk.end] = newChunk; + + if (chunk === this.lastChunk) this.lastChunk = newChunk; + + this.lastSearchedChunk = chunk; + return true; + } + + toString() { + let str = this.intro; + + let chunk = this.firstChunk; + while (chunk) { + str += chunk.toString(); + chunk = chunk.next; + } + + return str + this.outro; + } + + isEmpty() { + let chunk = this.firstChunk; + do { + if ( + (chunk.intro.length && chunk.intro.trim()) || + (chunk.content.length && chunk.content.trim()) || + (chunk.outro.length && chunk.outro.trim()) + ) + return false; + } while ((chunk = chunk.next)); + return true; + } + + length() { + let chunk = this.firstChunk; + let length = 0; + do { + length += chunk.intro.length + chunk.content.length + chunk.outro.length; + } while ((chunk = chunk.next)); + return length; + } + + trimLines() { + return this.trim('[\\r\\n]'); + } + + trim(charType) { + return this.trimStart(charType).trimEnd(charType); + } + + trimEndAborted(charType) { + const rx = new RegExp((charType || '\\s') + '+$'); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + + let chunk = this.lastChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimEnd(rx); + + // if chunk was trimmed, we have a new lastChunk + if (chunk.end !== end) { + if (this.lastChunk === chunk) { + this.lastChunk = chunk.next; + } + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.previous; + } while (chunk); + + return false; + } + + trimEnd(charType) { + this.trimEndAborted(charType); + return this; + } + trimStartAborted(charType) { + const rx = new RegExp('^' + (charType || '\\s') + '+'); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + let chunk = this.firstChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimStart(rx); + + if (chunk.end !== end) { + // special case... + if (chunk === this.lastChunk) this.lastChunk = chunk.next; + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.next; + } while (chunk); + + return false; + } + + trimStart(charType) { + this.trimStartAborted(charType); + return this; + } + + hasChanged() { + return this.original !== this.toString(); + } + + _replaceRegexp(searchValue, replacement) { + function getReplacement(match, str) { + if (typeof replacement === 'string') { + return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => { + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter + if (i === '$') return '$'; + if (i === '&') return match[0]; + const num = +i; + if (num < match.length) return match[+i]; + return `$${i}`; + }); + } else { + return replacement(...match, match.index, str, match.groups); + } + } + function matchAll(re, str) { + let match; + const matches = []; + while ((match = re.exec(str))) { + matches.push(match); + } + return matches; + } + if (searchValue.global) { + const matches = matchAll(searchValue, this.original); + matches.forEach((match) => { + if (match.index != null) { + const replacement = getReplacement(match, this.original); + if (replacement !== match[0]) { + this.overwrite(match.index, match.index + match[0].length, replacement); + } + } + }); + } else { + const match = this.original.match(searchValue); + if (match && match.index != null) { + const replacement = getReplacement(match, this.original); + if (replacement !== match[0]) { + this.overwrite(match.index, match.index + match[0].length, replacement); + } + } + } + return this; + } + + _replaceString(string, replacement) { + const { original } = this; + const index = original.indexOf(string); + + if (index !== -1) { + this.overwrite(index, index + string.length, replacement); + } + + return this; + } + + replace(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceString(searchValue, replacement); + } + + return this._replaceRegexp(searchValue, replacement); + } + + _replaceAllString(string, replacement) { + const { original } = this; + const stringLength = string.length; + for ( + let index = original.indexOf(string); + index !== -1; + index = original.indexOf(string, index + stringLength) + ) { + const previous = original.slice(index, index + stringLength); + if (previous !== replacement) this.overwrite(index, index + stringLength, replacement); + } + + return this; + } + + replaceAll(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceAllString(searchValue, replacement); + } + + if (!searchValue.global) { + throw new TypeError( + 'MagicString.prototype.replaceAll called with a non-global RegExp argument', + ); + } + + return this._replaceRegexp(searchValue, replacement); + } + } + + const hasOwnProp = Object.prototype.hasOwnProperty; + + class Bundle { + constructor(options = {}) { + this.intro = options.intro || ''; + this.separator = options.separator !== undefined ? options.separator : '\n'; + this.sources = []; + this.uniqueSources = []; + this.uniqueSourceIndexByFilename = {}; + } + + addSource(source) { + if (source instanceof MagicString) { + return this.addSource({ + content: source, + filename: source.filename, + separator: this.separator, + }); + } + + if (!isObject(source) || !source.content) { + throw new Error( + 'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`', + ); + } + + ['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => { + if (!hasOwnProp.call(source, option)) source[option] = source.content[option]; + }); + + if (source.separator === undefined) { + // TODO there's a bunch of this sort of thing, needs cleaning up + source.separator = this.separator; + } + + if (source.filename) { + if (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) { + this.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length; + this.uniqueSources.push({ filename: source.filename, content: source.content.original }); + } else { + const uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]]; + if (source.content.original !== uniqueSource.content) { + throw new Error(`Illegal source: same filename (${source.filename}), different contents`); + } + } + } + + this.sources.push(source); + return this; + } + + append(str, options) { + this.addSource({ + content: new MagicString(str), + separator: (options && options.separator) || '', + }); + + return this; + } + + clone() { + const bundle = new Bundle({ + intro: this.intro, + separator: this.separator, + }); + + this.sources.forEach((source) => { + bundle.addSource({ + filename: source.filename, + content: source.content.clone(), + separator: source.separator, + }); + }); + + return bundle; + } + + generateDecodedMap(options = {}) { + const names = []; + let x_google_ignoreList = undefined; + this.sources.forEach((source) => { + Object.keys(source.content.storedNames).forEach((name) => { + if (!~names.indexOf(name)) names.push(name); + }); + }); + + const mappings = new Mappings(options.hires); + + if (this.intro) { + mappings.advance(this.intro); + } + + this.sources.forEach((source, i) => { + if (i > 0) { + mappings.advance(this.separator); + } + + const sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1; + const magicString = source.content; + const locate = getLocator(magicString.original); + + if (magicString.intro) { + mappings.advance(magicString.intro); + } + + magicString.firstChunk.eachNext((chunk) => { + const loc = locate(chunk.start); + + if (chunk.intro.length) mappings.advance(chunk.intro); + + if (source.filename) { + if (chunk.edited) { + mappings.addEdit( + sourceIndex, + chunk.content, + loc, + chunk.storeName ? names.indexOf(chunk.original) : -1, + ); + } else { + mappings.addUneditedChunk( + sourceIndex, + chunk, + magicString.original, + loc, + magicString.sourcemapLocations, + ); + } + } else { + mappings.advance(chunk.content); + } + + if (chunk.outro.length) mappings.advance(chunk.outro); + }); + + if (magicString.outro) { + mappings.advance(magicString.outro); + } + + if (source.ignoreList && sourceIndex !== -1) { + if (x_google_ignoreList === undefined) { + x_google_ignoreList = []; + } + x_google_ignoreList.push(sourceIndex); + } + }); + + return { + file: options.file ? options.file.split(/[/\\]/).pop() : undefined, + sources: this.uniqueSources.map((source) => { + return options.file ? getRelativePath(options.file, source.filename) : source.filename; + }), + sourcesContent: this.uniqueSources.map((source) => { + return options.includeContent ? source.content : null; + }), + names, + mappings: mappings.raw, + x_google_ignoreList, + }; + } + + generateMap(options) { + return new SourceMap(this.generateDecodedMap(options)); + } + + getIndentString() { + const indentStringCounts = {}; + + this.sources.forEach((source) => { + const indentStr = source.content._getRawIndentString(); + + if (indentStr === null) return; + + if (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0; + indentStringCounts[indentStr] += 1; + }); + + return ( + Object.keys(indentStringCounts).sort((a, b) => { + return indentStringCounts[a] - indentStringCounts[b]; + })[0] || '\t' + ); + } + + indent(indentStr) { + if (!arguments.length) { + indentStr = this.getIndentString(); + } + + if (indentStr === '') return this; // noop + + let trailingNewline = !this.intro || this.intro.slice(-1) === '\n'; + + this.sources.forEach((source, i) => { + const separator = source.separator !== undefined ? source.separator : this.separator; + const indentStart = trailingNewline || (i > 0 && /\r?\n$/.test(separator)); + + source.content.indent(indentStr, { + exclude: source.indentExclusionRanges, + indentStart, //: trailingNewline || /\r?\n$/.test( separator ) //true///\r?\n/.test( separator ) + }); + + trailingNewline = source.content.lastChar() === '\n'; + }); + + if (this.intro) { + this.intro = + indentStr + + this.intro.replace(/^[^\n]/gm, (match, index) => { + return index > 0 ? indentStr + match : match; + }); + } + + return this; + } + + prepend(str) { + this.intro = str + this.intro; + return this; + } + + toString() { + const body = this.sources + .map((source, i) => { + const separator = source.separator !== undefined ? source.separator : this.separator; + const str = (i > 0 ? separator : '') + source.content.toString(); + + return str; + }) + .join(''); + + return this.intro + body; + } + + isEmpty() { + if (this.intro.length && this.intro.trim()) return false; + if (this.sources.some((source) => !source.content.isEmpty())) return false; + return true; + } + + length() { + return this.sources.reduce( + (length, source) => length + source.content.length(), + this.intro.length, + ); + } + + trimLines() { + return this.trim('[\\r\\n]'); + } + + trim(charType) { + return this.trimStart(charType).trimEnd(charType); + } + + trimStart(charType) { + const rx = new RegExp('^' + (charType || '\\s') + '+'); + this.intro = this.intro.replace(rx, ''); + + if (!this.intro) { + let source; + let i = 0; + + do { + source = this.sources[i++]; + if (!source) { + break; + } + } while (!source.content.trimStartAborted(charType)); + } + + return this; + } + + trimEnd(charType) { + const rx = new RegExp((charType || '\\s') + '+$'); + + let source; + let i = this.sources.length - 1; + + do { + source = this.sources[i--]; + if (!source) { + this.intro = this.intro.replace(rx, ''); + break; + } + } while (!source.content.trimEndAborted(charType)); + + return this; + } + } + + MagicString.Bundle = Bundle; + MagicString.SourceMap = SourceMap; + MagicString.default = MagicString; // work around TypeScript bug https://github.com/Rich-Harris/magic-string/pull/121 + + return MagicString; + +})); +//# sourceMappingURL=magic-string.umd.js.map diff --git a/vuetest/node_modules/magic-string/dist/magic-string.umd.js.map b/vuetest/node_modules/magic-string/dist/magic-string.umd.js.map new file mode 100644 index 0000000..5d36fdf --- /dev/null +++ b/vuetest/node_modules/magic-string/dist/magic-string.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"magic-string.umd.js","sources":["../src/BitSet.js","../src/Chunk.js","../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs","../src/SourceMap.js","../src/utils/guessIndent.js","../src/utils/getRelativePath.js","../src/utils/isObject.js","../src/utils/getLocator.js","../src/utils/Mappings.js","../src/MagicString.js","../src/Bundle.js","../src/index-legacy.js"],"sourcesContent":["export default class BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}\n","export default class Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\tif (DEBUG) {\n\t\t\t// we make these non-enumerable, for sanity while debugging\n\t\t\tObject.defineProperties(this, {\n\t\t\t\tprevious: { writable: true, value: null },\n\t\t\t\tnext: { writable: true, value: null },\n\t\t\t});\n\t\t} else {\n\t\t\tthis.previous = null;\n\t\t\tthis.next = null;\n\t\t}\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\treset() {\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\t\tif (this.edited) {\n\t\t\tthis.content = this.original;\n\t\t\tthis.storeName = false;\n\t\t\tthis.edited = false;\n\t\t}\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// after split we should save the edit content record into the correct chunk\n\t\t\t// to make sure sourcemap correct\n\t\t\t// For example:\n\t\t\t// ' test'.trim()\n\t\t\t// split -> ' ' + 'test'\n\t\t\t// ✔️ edit -> '' + 'test'\n\t\t\t// ✖️ edit -> 'test' + ''\n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tthis.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tconst newChunk = this.split(this.end - trimmed.length);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tnewChunk.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n","const comma = ','.charCodeAt(0);\nconst semicolon = ';'.charCodeAt(0);\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst intToChar = new Uint8Array(64); // 64 possible chars.\nconst charToInt = new Uint8Array(128); // z is 122 in ASCII\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\nfunction decodeInteger(reader, relative) {\n let value = 0;\n let shift = 0;\n let integer = 0;\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n const shouldNegate = value & 1;\n value >>>= 1;\n if (shouldNegate) {\n value = -0x80000000 | -value;\n }\n return relative + value;\n}\nfunction encodeInteger(builder, num, relative) {\n let delta = num - relative;\n delta = delta < 0 ? (-delta << 1) | 1 : delta << 1;\n do {\n let clamped = delta & 0b011111;\n delta >>>= 5;\n if (delta > 0)\n clamped |= 0b100000;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n return num;\n}\nfunction hasMoreVlq(reader, max) {\n if (reader.pos >= max)\n return false;\n return reader.peek() !== comma;\n}\n\nconst bufLength = 1024 * 16;\n// Provide a fallback for older environments.\nconst td = typeof TextDecoder !== 'undefined'\n ? /* #__PURE__ */ new TextDecoder()\n : typeof Buffer !== 'undefined'\n ? {\n decode(buf) {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n },\n }\n : {\n decode(buf) {\n let out = '';\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n },\n };\nclass StringWriter {\n constructor() {\n this.pos = 0;\n this.out = '';\n this.buffer = new Uint8Array(bufLength);\n }\n write(v) {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n flush() {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n}\nclass StringReader {\n constructor(buffer) {\n this.pos = 0;\n this.buffer = buffer;\n }\n next() {\n return this.buffer.charCodeAt(this.pos++);\n }\n peek() {\n return this.buffer.charCodeAt(this.pos);\n }\n indexOf(char) {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n}\n\nconst EMPTY = [];\nfunction decodeOriginalScopes(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes = [];\n const stack = [];\n let line = 0;\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop();\n last[2] = line;\n last[3] = column;\n continue;\n }\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 0b0001;\n const scope = (hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]);\n let vars = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n scopes.push(scope);\n stack.push(scope);\n }\n return scopes;\n}\nfunction encodeOriginalScopes(scopes) {\n const writer = new StringWriter();\n for (let i = 0; i < scopes.length;) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n return writer.flush();\n}\nfunction _encodeOriginalScopes(scopes, index, writer, state) {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n if (index > 0)\n writer.write(comma);\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n const fields = scope.length === 6 ? 0b0001 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6)\n encodeInteger(writer, scope[5], 0);\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n for (index++; index < scopes.length;) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n return index;\n}\nfunction decodeGeneratedRanges(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges = [];\n const stack = [];\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n do {\n const semi = reader.indexOf(';');\n let genColumn = 0;\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop();\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 0b0001;\n const hasCallsite = fields & 0b0010;\n const hasScope = fields & 0b0100;\n let callsite = null;\n let bindings = EMPTY;\n let range;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(reader, definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0);\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex];\n }\n else {\n range = [genLine, genColumn, 0, 0];\n }\n range.isScope = !!hasScope;\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(reader, sameSource && prevLine === callsiteLine ? callsiteColumn : 0);\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges;\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n }\n else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n ranges.push(range);\n stack.push(range);\n }\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n return ranges;\n}\nfunction encodeGeneratedRanges(ranges) {\n if (ranges.length === 0)\n return '';\n const writer = new StringWriter();\n for (let i = 0; i < ranges.length;) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n return writer.flush();\n}\nfunction _encodeGeneratedRanges(ranges, index, writer, state) {\n const range = ranges[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, isScope, callsite, bindings, } = range;\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n }\n else if (index > 0) {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, range[1], state[1]);\n const fields = (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0);\n encodeInteger(writer, fields, 0);\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n }\n else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1)\n encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn);\n encodeInteger(writer, expRange[0], 0);\n }\n }\n }\n for (index++; index < ranges.length;) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n }\n else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n return index;\n}\nfunction catchupLine(writer, lastLine, line) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n\nfunction decode(mappings) {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n do {\n const semi = reader.indexOf(';');\n const line = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n while (reader.pos < semi) {\n let seg;\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol)\n sorted = false;\n lastCol = genColumn;\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n }\n else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n }\n else {\n seg = [genColumn];\n }\n line.push(seg);\n reader.pos++;\n }\n if (!sorted)\n sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n return decoded;\n}\nfunction sort(line) {\n line.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n return a[0] - b[0];\n}\nfunction encode(decoded) {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0)\n writer.write(semicolon);\n if (line.length === 0)\n continue;\n let genColumn = 0;\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0)\n writer.write(comma);\n genColumn = encodeInteger(writer, segment[0], genColumn);\n if (segment.length === 1)\n continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n if (segment.length === 4)\n continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n return writer.flush();\n}\n\nexport { decode, decodeGeneratedRanges, decodeOriginalScopes, encode, encodeGeneratedRanges, encodeOriginalScopes };\n//# sourceMappingURL=sourcemap-codec.mjs.map\n","import { encode } from '@jridgewell/sourcemap-codec';\n\nfunction getBtoa() {\n\tif (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') {\n\t\treturn (str) => globalThis.btoa(unescape(encodeURIComponent(str)));\n\t} else if (typeof Buffer === 'function') {\n\t\treturn (str) => Buffer.from(str, 'utf-8').toString('base64');\n\t} else {\n\t\treturn () => {\n\t\t\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n\t\t};\n\t}\n}\n\nconst btoa = /*#__PURE__*/ getBtoa();\n\nexport default class SourceMap {\n\tconstructor(properties) {\n\t\tthis.version = 3;\n\t\tthis.file = properties.file;\n\t\tthis.sources = properties.sources;\n\t\tthis.sourcesContent = properties.sourcesContent;\n\t\tthis.names = properties.names;\n\t\tthis.mappings = encode(properties.mappings);\n\t\tif (typeof properties.x_google_ignoreList !== 'undefined') {\n\t\t\tthis.x_google_ignoreList = properties.x_google_ignoreList;\n\t\t}\n\t\tif (typeof properties.debugId !== 'undefined') {\n\t\t\tthis.debugId = properties.debugId;\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this);\n\t}\n\n\ttoUrl() {\n\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t}\n}\n","export default function guessIndent(code) {\n\tconst lines = code.split('\\n');\n\n\tconst tabbed = lines.filter((line) => /^\\t+/.test(line));\n\tconst spaced = lines.filter((line) => /^ {2,}/.test(line));\n\n\tif (tabbed.length === 0 && spaced.length === 0) {\n\t\treturn null;\n\t}\n\n\t// More lines tabbed than spaced? Assume tabs, and\n\t// default to tabs in the case of a tie (or nothing\n\t// to go on)\n\tif (tabbed.length >= spaced.length) {\n\t\treturn '\\t';\n\t}\n\n\t// Otherwise, we need to guess the multiple\n\tconst min = spaced.reduce((previous, current) => {\n\t\tconst numSpaces = /^ +/.exec(current)[0].length;\n\t\treturn Math.min(numSpaces, previous);\n\t}, Infinity);\n\n\treturn new Array(min + 1).join(' ');\n}\n","export default function getRelativePath(from, to) {\n\tconst fromParts = from.split(/[/\\\\]/);\n\tconst toParts = to.split(/[/\\\\]/);\n\n\tfromParts.pop(); // get dirname\n\n\twhile (fromParts[0] === toParts[0]) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif (fromParts.length) {\n\t\tlet i = fromParts.length;\n\t\twhile (i--) fromParts[i] = '..';\n\t}\n\n\treturn fromParts.concat(toParts).join('/');\n}\n","const toString = Object.prototype.toString;\n\nexport default function isObject(thing) {\n\treturn toString.call(thing) === '[object Object]';\n}\n","export default function getLocator(source) {\n\tconst originalLines = source.split('\\n');\n\tconst lineOffsets = [];\n\n\tfor (let i = 0, pos = 0; i < originalLines.length; i++) {\n\t\tlineOffsets.push(pos);\n\t\tpos += originalLines[i].length + 1;\n\t}\n\n\treturn function locate(index) {\n\t\tlet i = 0;\n\t\tlet j = lineOffsets.length;\n\t\twhile (i < j) {\n\t\t\tconst m = (i + j) >> 1;\n\t\t\tif (index < lineOffsets[m]) {\n\t\t\t\tj = m;\n\t\t\t} else {\n\t\t\t\ti = m + 1;\n\t\t\t}\n\t\t}\n\t\tconst line = i - 1;\n\t\tconst column = index - lineOffsets[line];\n\t\treturn { line, column };\n\t};\n}\n","const wordRegex = /\\w/;\n\nexport default class Mappings {\n\tconstructor(hires) {\n\t\tthis.hires = hires;\n\t\tthis.generatedCodeLine = 0;\n\t\tthis.generatedCodeColumn = 0;\n\t\tthis.raw = [];\n\t\tthis.rawSegments = this.raw[this.generatedCodeLine] = [];\n\t\tthis.pending = null;\n\t}\n\n\taddEdit(sourceIndex, content, loc, nameIndex) {\n\t\tif (content.length) {\n\t\t\tconst contentLengthMinusOne = content.length - 1;\n\t\t\tlet contentLineEnd = content.indexOf('\\n', 0);\n\t\t\tlet previousContentLineEnd = -1;\n\t\t\t// Loop through each line in the content and add a segment, but stop if the last line is empty,\n\t\t\t// else code afterwards would fill one line too many\n\t\t\twhile (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) {\n\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\t\tif (nameIndex >= 0) {\n\t\t\t\t\tsegment.push(nameIndex);\n\t\t\t\t}\n\t\t\t\tthis.rawSegments.push(segment);\n\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\n\t\t\t\tpreviousContentLineEnd = contentLineEnd;\n\t\t\t\tcontentLineEnd = content.indexOf('\\n', contentLineEnd + 1);\n\t\t\t}\n\n\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\tif (nameIndex >= 0) {\n\t\t\t\tsegment.push(nameIndex);\n\t\t\t}\n\t\t\tthis.rawSegments.push(segment);\n\n\t\t\tthis.advance(content.slice(previousContentLineEnd + 1));\n\t\t} else if (this.pending) {\n\t\t\tthis.rawSegments.push(this.pending);\n\t\t\tthis.advance(content);\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\taddUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {\n\t\tlet originalCharIndex = chunk.start;\n\t\tlet first = true;\n\t\t// when iterating each char, check if it's in a word boundary\n\t\tlet charInHiresBoundary = false;\n\n\t\twhile (originalCharIndex < chunk.end) {\n\t\t\tif (original[originalCharIndex] === '\\n') {\n\t\t\t\tloc.line += 1;\n\t\t\t\tloc.column = 0;\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\t\t\t\tfirst = true;\n\t\t\t\tcharInHiresBoundary = false;\n\t\t\t} else {\n\t\t\t\tif (this.hires || first || sourcemapLocations.has(originalCharIndex)) {\n\t\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\n\t\t\t\t\tif (this.hires === 'boundary') {\n\t\t\t\t\t\t// in hires \"boundary\", group segments per word boundary than per char\n\t\t\t\t\t\tif (wordRegex.test(original[originalCharIndex])) {\n\t\t\t\t\t\t\t// for first char in the boundary found, start the boundary by pushing a segment\n\t\t\t\t\t\t\tif (!charInHiresBoundary) {\n\t\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\t\tcharInHiresBoundary = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// for non-word char, end the boundary by pushing a segment\n\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\tcharInHiresBoundary = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tloc.column += 1;\n\t\t\t\tthis.generatedCodeColumn += 1;\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t\toriginalCharIndex += 1;\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\tadvance(str) {\n\t\tif (!str) return;\n\n\t\tconst lines = str.split('\\n');\n\n\t\tif (lines.length > 1) {\n\t\t\tfor (let i = 0; i < lines.length - 1; i++) {\n\t\t\t\tthis.generatedCodeLine++;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t}\n\t\t\tthis.generatedCodeColumn = 0;\n\t\t}\n\n\t\tthis.generatedCodeColumn += lines[lines.length - 1].length;\n\t}\n}\n","import BitSet from './BitSet.js';\nimport Chunk from './Chunk.js';\nimport SourceMap from './SourceMap.js';\nimport guessIndent from './utils/guessIndent.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\nimport Stats from './utils/Stats.js';\n\nconst n = '\\n';\n\nconst warned = {\n\tinsertLeft: false,\n\tinsertRight: false,\n\tstoreName: false,\n};\n\nexport default class MagicString {\n\tconstructor(string, options = {}) {\n\t\tconst chunk = new Chunk(0, string.length, string);\n\n\t\tObject.defineProperties(this, {\n\t\t\toriginal: { writable: true, value: string },\n\t\t\toutro: { writable: true, value: '' },\n\t\t\tintro: { writable: true, value: '' },\n\t\t\tfirstChunk: { writable: true, value: chunk },\n\t\t\tlastChunk: { writable: true, value: chunk },\n\t\t\tlastSearchedChunk: { writable: true, value: chunk },\n\t\t\tbyStart: { writable: true, value: {} },\n\t\t\tbyEnd: { writable: true, value: {} },\n\t\t\tfilename: { writable: true, value: options.filename },\n\t\t\tindentExclusionRanges: { writable: true, value: options.indentExclusionRanges },\n\t\t\tsourcemapLocations: { writable: true, value: new BitSet() },\n\t\t\tstoredNames: { writable: true, value: {} },\n\t\t\tindentStr: { writable: true, value: undefined },\n\t\t\tignoreList: { writable: true, value: options.ignoreList },\n\t\t\toffset: { writable: true, value: options.offset || 0 },\n\t\t});\n\n\t\tif (DEBUG) {\n\t\t\tObject.defineProperty(this, 'stats', { value: new Stats() });\n\t\t}\n\n\t\tthis.byStart[0] = chunk;\n\t\tthis.byEnd[string.length] = chunk;\n\t}\n\n\taddSourcemapLocation(char) {\n\t\tthis.sourcemapLocations.add(char);\n\t}\n\n\tappend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.outro += content;\n\t\treturn this;\n\t}\n\n\tappendLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendLeft');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendLeft(content);\n\t\t} else {\n\t\t\tthis.intro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendLeft');\n\t\treturn this;\n\t}\n\n\tappendRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendRight(content);\n\t\t} else {\n\t\t\tthis.outro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendRight');\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst cloned = new MagicString(this.original, { filename: this.filename, offset: this.offset });\n\n\t\tlet originalChunk = this.firstChunk;\n\t\tlet clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());\n\n\t\twhile (originalChunk) {\n\t\t\tcloned.byStart[clonedChunk.start] = clonedChunk;\n\t\t\tcloned.byEnd[clonedChunk.end] = clonedChunk;\n\n\t\t\tconst nextOriginalChunk = originalChunk.next;\n\t\t\tconst nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();\n\n\t\t\tif (nextClonedChunk) {\n\t\t\t\tclonedChunk.next = nextClonedChunk;\n\t\t\t\tnextClonedChunk.previous = clonedChunk;\n\n\t\t\t\tclonedChunk = nextClonedChunk;\n\t\t\t}\n\n\t\t\toriginalChunk = nextOriginalChunk;\n\t\t}\n\n\t\tcloned.lastChunk = clonedChunk;\n\n\t\tif (this.indentExclusionRanges) {\n\t\t\tcloned.indentExclusionRanges = this.indentExclusionRanges.slice();\n\t\t}\n\n\t\tcloned.sourcemapLocations = new BitSet(this.sourcemapLocations);\n\n\t\tcloned.intro = this.intro;\n\t\tcloned.outro = this.outro;\n\n\t\treturn cloned;\n\t}\n\n\tgenerateDecodedMap(options) {\n\t\toptions = options || {};\n\n\t\tconst sourceIndex = 0;\n\t\tconst names = Object.keys(this.storedNames);\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tconst locate = getLocator(this.original);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.firstChunk.eachNext((chunk) => {\n\t\t\tconst loc = locate(chunk.start);\n\n\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tmappings.addEdit(\n\t\t\t\t\tsourceIndex,\n\t\t\t\t\tchunk.content,\n\t\t\t\t\tloc,\n\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tmappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);\n\t\t\t}\n\n\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: [\n\t\t\t\toptions.source ? getRelativePath(options.file || '', options.source) : options.file || '',\n\t\t\t],\n\t\t\tsourcesContent: options.includeContent ? [this.original] : undefined,\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\t_ensureindentStr() {\n\t\tif (this.indentStr === undefined) {\n\t\t\tthis.indentStr = guessIndent(this.original);\n\t\t}\n\t}\n\n\t_getRawIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr;\n\t}\n\n\tgetIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr === null ? '\\t' : this.indentStr;\n\t}\n\n\tindent(indentStr, options) {\n\t\tconst pattern = /^[^\\r\\n]/gm;\n\n\t\tif (isObject(indentStr)) {\n\t\t\toptions = indentStr;\n\t\t\tindentStr = undefined;\n\t\t}\n\n\t\tif (indentStr === undefined) {\n\t\t\tthis._ensureindentStr();\n\t\t\tindentStr = this.indentStr || '\\t';\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\toptions = options || {};\n\n\t\t// Process exclusion ranges\n\t\tconst isExcluded = {};\n\n\t\tif (options.exclude) {\n\t\t\tconst exclusions =\n\t\t\t\ttypeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;\n\t\t\texclusions.forEach((exclusion) => {\n\t\t\t\tfor (let i = exclusion[0]; i < exclusion[1]; i += 1) {\n\t\t\t\t\tisExcluded[i] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet shouldIndentNextCharacter = options.indentStart !== false;\n\t\tconst replacer = (match) => {\n\t\t\tif (shouldIndentNextCharacter) return `${indentStr}${match}`;\n\t\t\tshouldIndentNextCharacter = true;\n\t\t\treturn match;\n\t\t};\n\n\t\tthis.intro = this.intro.replace(pattern, replacer);\n\n\t\tlet charIndex = 0;\n\t\tlet chunk = this.firstChunk;\n\n\t\twhile (chunk) {\n\t\t\tconst end = chunk.end;\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\tchunk.content = chunk.content.replace(pattern, replacer);\n\n\t\t\t\t\tif (chunk.content.length) {\n\t\t\t\t\t\tshouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\\n';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcharIndex = chunk.start;\n\n\t\t\t\twhile (charIndex < end) {\n\t\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\t\tconst char = this.original[charIndex];\n\n\t\t\t\t\t\tif (char === '\\n') {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = true;\n\t\t\t\t\t\t} else if (char !== '\\r' && shouldIndentNextCharacter) {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = false;\n\n\t\t\t\t\t\t\tif (charIndex === chunk.start) {\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._splitChunk(chunk, charIndex);\n\t\t\t\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcharIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcharIndex = chunk.end;\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tthis.outro = this.outro.replace(pattern, replacer);\n\n\t\treturn this;\n\t}\n\n\tinsert() {\n\t\tthrow new Error(\n\t\t\t'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)',\n\t\t);\n\t}\n\n\tinsertLeft(index, content) {\n\t\tif (!warned.insertLeft) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',\n\t\t\t);\n\t\t\twarned.insertLeft = true;\n\t\t}\n\n\t\treturn this.appendLeft(index, content);\n\t}\n\n\tinsertRight(index, content) {\n\t\tif (!warned.insertRight) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',\n\t\t\t);\n\t\t\twarned.insertRight = true;\n\t\t}\n\n\t\treturn this.prependRight(index, content);\n\t}\n\n\tmove(start, end, index) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\t\tindex = index + this.offset;\n\n\t\tif (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');\n\n\t\tif (DEBUG) this.stats.time('move');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\t\tthis._split(index);\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tconst oldLeft = first.previous;\n\t\tconst oldRight = last.next;\n\n\t\tconst newRight = this.byStart[index];\n\t\tif (!newRight && last === this.lastChunk) return this;\n\t\tconst newLeft = newRight ? newRight.previous : this.lastChunk;\n\n\t\tif (oldLeft) oldLeft.next = oldRight;\n\t\tif (oldRight) oldRight.previous = oldLeft;\n\n\t\tif (newLeft) newLeft.next = first;\n\t\tif (newRight) newRight.previous = last;\n\n\t\tif (!first.previous) this.firstChunk = last.next;\n\t\tif (!last.next) {\n\t\t\tthis.lastChunk = first.previous;\n\t\t\tthis.lastChunk.next = null;\n\t\t}\n\n\t\tfirst.previous = newLeft;\n\t\tlast.next = newRight || null;\n\n\t\tif (!newLeft) this.firstChunk = first;\n\t\tif (!newRight) this.lastChunk = last;\n\n\t\tif (DEBUG) this.stats.timeEnd('move');\n\t\treturn this;\n\t}\n\n\toverwrite(start, end, content, options) {\n\t\toptions = options || {};\n\t\treturn this.update(start, end, content, { ...options, overwrite: !options.contentOnly });\n\t}\n\n\tupdate(start, end, content, options) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('replacement content must be a string');\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (end > this.original.length) throw new Error('end is out of bounds');\n\t\tif (start === end)\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot overwrite a zero-length range – use appendLeft or prependRight instead',\n\t\t\t);\n\n\t\tif (DEBUG) this.stats.time('overwrite');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tif (options === true) {\n\t\t\tif (!warned.storeName) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string',\n\t\t\t\t);\n\t\t\t\twarned.storeName = true;\n\t\t\t}\n\n\t\t\toptions = { storeName: true };\n\t\t}\n\t\tconst storeName = options !== undefined ? options.storeName : false;\n\t\tconst overwrite = options !== undefined ? options.overwrite : false;\n\n\t\tif (storeName) {\n\t\t\tconst original = this.original.slice(start, end);\n\t\t\tObject.defineProperty(this.storedNames, original, {\n\t\t\t\twritable: true,\n\t\t\t\tvalue: true,\n\t\t\t\tenumerable: true,\n\t\t\t});\n\t\t}\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tif (first) {\n\t\t\tlet chunk = first;\n\t\t\twhile (chunk !== last) {\n\t\t\t\tif (chunk.next !== this.byStart[chunk.end]) {\n\t\t\t\t\tthrow new Error('Cannot overwrite across a split point');\n\t\t\t\t}\n\t\t\t\tchunk = chunk.next;\n\t\t\t\tchunk.edit('', false);\n\t\t\t}\n\n\t\t\tfirst.edit(content, storeName, !overwrite);\n\t\t} else {\n\t\t\t// must be inserting at the end\n\t\t\tconst newChunk = new Chunk(start, end, '').edit(content, storeName);\n\n\t\t\t// TODO last chunk in the array may not be the last chunk, if it's moved...\n\t\t\tlast.next = newChunk;\n\t\t\tnewChunk.previous = last;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('overwrite');\n\t\treturn this;\n\t}\n\n\tprepend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.intro = content + this.intro;\n\t\treturn this;\n\t}\n\n\tprependLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependLeft(content);\n\t\t} else {\n\t\t\tthis.intro = content + this.intro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tprependRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependRight(content);\n\t\t} else {\n\t\t\tthis.outro = content + this.outro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tremove(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('remove');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.intro = '';\n\t\t\tchunk.outro = '';\n\t\t\tchunk.edit('');\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('remove');\n\t\treturn this;\n\t}\n\n\treset(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('reset');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.reset();\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('reset');\n\t\treturn this;\n\t}\n\n\tlastChar() {\n\t\tif (this.outro.length) return this.outro[this.outro.length - 1];\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];\n\t\t\tif (chunk.content.length) return chunk.content[chunk.content.length - 1];\n\t\t\tif (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];\n\t\t} while ((chunk = chunk.previous));\n\t\tif (this.intro.length) return this.intro[this.intro.length - 1];\n\t\treturn '';\n\t}\n\n\tlastLine() {\n\t\tlet lineIndex = this.outro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.outro.substr(lineIndex + 1);\n\t\tlet lineStr = this.outro;\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length > 0) {\n\t\t\t\tlineIndex = chunk.outro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.outro + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.content.length > 0) {\n\t\t\t\tlineIndex = chunk.content.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.content + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.intro.length > 0) {\n\t\t\t\tlineIndex = chunk.intro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.intro + lineStr;\n\t\t\t}\n\t\t} while ((chunk = chunk.previous));\n\t\tlineIndex = this.intro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;\n\t\treturn this.intro + lineStr;\n\t}\n\n\tslice(start = 0, end = this.original.length - this.offset) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tlet result = '';\n\n\t\t// find start chunk\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk && (chunk.start > start || chunk.end <= start)) {\n\t\t\t// found end chunk before start\n\t\t\tif (chunk.start < end && chunk.end >= end) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tif (chunk && chunk.edited && chunk.start !== start)\n\t\t\tthrow new Error(`Cannot use replaced character ${start} as slice start anchor.`);\n\n\t\tconst startChunk = chunk;\n\t\twhile (chunk) {\n\t\t\tif (chunk.intro && (startChunk !== chunk || chunk.start === start)) {\n\t\t\t\tresult += chunk.intro;\n\t\t\t}\n\n\t\t\tconst containsEnd = chunk.start < end && chunk.end >= end;\n\t\t\tif (containsEnd && chunk.edited && chunk.end !== end)\n\t\t\t\tthrow new Error(`Cannot use replaced character ${end} as slice end anchor.`);\n\n\t\t\tconst sliceStart = startChunk === chunk ? start - chunk.start : 0;\n\t\t\tconst sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;\n\n\t\t\tresult += chunk.content.slice(sliceStart, sliceEnd);\n\n\t\t\tif (chunk.outro && (!containsEnd || chunk.end === end)) {\n\t\t\t\tresult += chunk.outro;\n\t\t\t}\n\n\t\t\tif (containsEnd) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// TODO deprecate this? not really very useful\n\tsnip(start, end) {\n\t\tconst clone = this.clone();\n\t\tclone.remove(0, start);\n\t\tclone.remove(end, clone.original.length);\n\n\t\treturn clone;\n\t}\n\n\t_split(index) {\n\t\tif (this.byStart[index] || this.byEnd[index]) return;\n\n\t\tif (DEBUG) this.stats.time('_split');\n\n\t\tlet chunk = this.lastSearchedChunk;\n\t\tconst searchForward = index > chunk.end;\n\n\t\twhile (chunk) {\n\t\t\tif (chunk.contains(index)) return this._splitChunk(chunk, index);\n\n\t\t\tchunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];\n\t\t}\n\t}\n\n\t_splitChunk(chunk, index) {\n\t\tif (chunk.edited && chunk.content.length) {\n\t\t\t// zero-length edited chunks are a special case (overlapping replacements)\n\t\t\tconst loc = getLocator(this.original)(index);\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – \"${chunk.original}\")`,\n\t\t\t);\n\t\t}\n\n\t\tconst newChunk = chunk.split(index);\n\n\t\tthis.byEnd[index] = chunk;\n\t\tthis.byStart[index] = newChunk;\n\t\tthis.byEnd[newChunk.end] = newChunk;\n\n\t\tif (chunk === this.lastChunk) this.lastChunk = newChunk;\n\n\t\tthis.lastSearchedChunk = chunk;\n\t\tif (DEBUG) this.stats.timeEnd('_split');\n\t\treturn true;\n\t}\n\n\ttoString() {\n\t\tlet str = this.intro;\n\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk) {\n\t\t\tstr += chunk.toString();\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn str + this.outro;\n\t}\n\n\tisEmpty() {\n\t\tlet chunk = this.firstChunk;\n\t\tdo {\n\t\t\tif (\n\t\t\t\t(chunk.intro.length && chunk.intro.trim()) ||\n\t\t\t\t(chunk.content.length && chunk.content.trim()) ||\n\t\t\t\t(chunk.outro.length && chunk.outro.trim())\n\t\t\t)\n\t\t\t\treturn false;\n\t\t} while ((chunk = chunk.next));\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\tlet chunk = this.firstChunk;\n\t\tlet length = 0;\n\t\tdo {\n\t\t\tlength += chunk.intro.length + chunk.content.length + chunk.outro.length;\n\t\t} while ((chunk = chunk.next));\n\t\treturn length;\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimEndAborted(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tlet chunk = this.lastChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimEnd(rx);\n\n\t\t\t// if chunk was trimmed, we have a new lastChunk\n\t\t\tif (chunk.end !== end) {\n\t\t\t\tif (this.lastChunk === chunk) {\n\t\t\t\t\tthis.lastChunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.previous;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimEnd(charType) {\n\t\tthis.trimEndAborted(charType);\n\t\treturn this;\n\t}\n\ttrimStartAborted(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tlet chunk = this.firstChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimStart(rx);\n\n\t\t\tif (chunk.end !== end) {\n\t\t\t\t// special case...\n\t\t\t\tif (chunk === this.lastChunk) this.lastChunk = chunk.next;\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.next;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimStart(charType) {\n\t\tthis.trimStartAborted(charType);\n\t\treturn this;\n\t}\n\n\thasChanged() {\n\t\treturn this.original !== this.toString();\n\t}\n\n\t_replaceRegexp(searchValue, replacement) {\n\t\tfunction getReplacement(match, str) {\n\t\t\tif (typeof replacement === 'string') {\n\t\t\t\treturn replacement.replace(/\\$(\\$|&|\\d+)/g, (_, i) => {\n\t\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter\n\t\t\t\t\tif (i === '$') return '$';\n\t\t\t\t\tif (i === '&') return match[0];\n\t\t\t\t\tconst num = +i;\n\t\t\t\t\tif (num < match.length) return match[+i];\n\t\t\t\t\treturn `$${i}`;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn replacement(...match, match.index, str, match.groups);\n\t\t\t}\n\t\t}\n\t\tfunction matchAll(re, str) {\n\t\t\tlet match;\n\t\t\tconst matches = [];\n\t\t\twhile ((match = re.exec(str))) {\n\t\t\t\tmatches.push(match);\n\t\t\t}\n\t\t\treturn matches;\n\t\t}\n\t\tif (searchValue.global) {\n\t\t\tconst matches = matchAll(searchValue, this.original);\n\t\t\tmatches.forEach((match) => {\n\t\t\t\tif (match.index != null) {\n\t\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tconst match = this.original.match(searchValue);\n\t\t\tif (match && match.index != null) {\n\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t_replaceString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst index = original.indexOf(string);\n\n\t\tif (index !== -1) {\n\t\t\tthis.overwrite(index, index + string.length, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplace(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceString(searchValue, replacement);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n\n\t_replaceAllString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst stringLength = string.length;\n\t\tfor (\n\t\t\tlet index = original.indexOf(string);\n\t\t\tindex !== -1;\n\t\t\tindex = original.indexOf(string, index + stringLength)\n\t\t) {\n\t\t\tconst previous = original.slice(index, index + stringLength);\n\t\t\tif (previous !== replacement) this.overwrite(index, index + stringLength, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplaceAll(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceAllString(searchValue, replacement);\n\t\t}\n\n\t\tif (!searchValue.global) {\n\t\t\tthrow new TypeError(\n\t\t\t\t'MagicString.prototype.replaceAll called with a non-global RegExp argument',\n\t\t\t);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n}\n","import MagicString from './MagicString.js';\nimport SourceMap from './SourceMap.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\n\nconst hasOwnProp = Object.prototype.hasOwnProperty;\n\nexport default class Bundle {\n\tconstructor(options = {}) {\n\t\tthis.intro = options.intro || '';\n\t\tthis.separator = options.separator !== undefined ? options.separator : '\\n';\n\t\tthis.sources = [];\n\t\tthis.uniqueSources = [];\n\t\tthis.uniqueSourceIndexByFilename = {};\n\t}\n\n\taddSource(source) {\n\t\tif (source instanceof MagicString) {\n\t\t\treturn this.addSource({\n\t\t\t\tcontent: source,\n\t\t\t\tfilename: source.filename,\n\t\t\t\tseparator: this.separator,\n\t\t\t});\n\t\t}\n\n\t\tif (!isObject(source) || !source.content) {\n\t\t\tthrow new Error(\n\t\t\t\t'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`',\n\t\t\t);\n\t\t}\n\n\t\t['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => {\n\t\t\tif (!hasOwnProp.call(source, option)) source[option] = source.content[option];\n\t\t});\n\n\t\tif (source.separator === undefined) {\n\t\t\t// TODO there's a bunch of this sort of thing, needs cleaning up\n\t\t\tsource.separator = this.separator;\n\t\t}\n\n\t\tif (source.filename) {\n\t\t\tif (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {\n\t\t\t\tthis.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;\n\t\t\t\tthis.uniqueSources.push({ filename: source.filename, content: source.content.original });\n\t\t\t} else {\n\t\t\t\tconst uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];\n\t\t\t\tif (source.content.original !== uniqueSource.content) {\n\t\t\t\t\tthrow new Error(`Illegal source: same filename (${source.filename}), different contents`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sources.push(source);\n\t\treturn this;\n\t}\n\n\tappend(str, options) {\n\t\tthis.addSource({\n\t\t\tcontent: new MagicString(str),\n\t\t\tseparator: (options && options.separator) || '',\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst bundle = new Bundle({\n\t\t\tintro: this.intro,\n\t\t\tseparator: this.separator,\n\t\t});\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tbundle.addSource({\n\t\t\t\tfilename: source.filename,\n\t\t\t\tcontent: source.content.clone(),\n\t\t\t\tseparator: source.separator,\n\t\t\t});\n\t\t});\n\n\t\treturn bundle;\n\t}\n\n\tgenerateDecodedMap(options = {}) {\n\t\tconst names = [];\n\t\tlet x_google_ignoreList = undefined;\n\t\tthis.sources.forEach((source) => {\n\t\t\tObject.keys(source.content.storedNames).forEach((name) => {\n\t\t\t\tif (!~names.indexOf(name)) names.push(name);\n\t\t\t});\n\t\t});\n\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\tmappings.advance(this.separator);\n\t\t\t}\n\n\t\t\tconst sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;\n\t\t\tconst magicString = source.content;\n\t\t\tconst locate = getLocator(magicString.original);\n\n\t\t\tif (magicString.intro) {\n\t\t\t\tmappings.advance(magicString.intro);\n\t\t\t}\n\n\t\t\tmagicString.firstChunk.eachNext((chunk) => {\n\t\t\t\tconst loc = locate(chunk.start);\n\n\t\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\t\tif (source.filename) {\n\t\t\t\t\tif (chunk.edited) {\n\t\t\t\t\t\tmappings.addEdit(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk.content,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmappings.addUneditedChunk(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk,\n\t\t\t\t\t\t\tmagicString.original,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tmagicString.sourcemapLocations,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmappings.advance(chunk.content);\n\t\t\t\t}\n\n\t\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t\t});\n\n\t\t\tif (magicString.outro) {\n\t\t\t\tmappings.advance(magicString.outro);\n\t\t\t}\n\n\t\t\tif (source.ignoreList && sourceIndex !== -1) {\n\t\t\t\tif (x_google_ignoreList === undefined) {\n\t\t\t\t\tx_google_ignoreList = [];\n\t\t\t\t}\n\t\t\t\tx_google_ignoreList.push(sourceIndex);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.file ? getRelativePath(options.file, source.filename) : source.filename;\n\t\t\t}),\n\t\t\tsourcesContent: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.includeContent ? source.content : null;\n\t\t\t}),\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\tconst indentStringCounts = {};\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tconst indentStr = source.content._getRawIndentString();\n\n\t\t\tif (indentStr === null) return;\n\n\t\t\tif (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;\n\t\t\tindentStringCounts[indentStr] += 1;\n\t\t});\n\n\t\treturn (\n\t\t\tObject.keys(indentStringCounts).sort((a, b) => {\n\t\t\t\treturn indentStringCounts[a] - indentStringCounts[b];\n\t\t\t})[0] || '\\t'\n\t\t);\n\t}\n\n\tindent(indentStr) {\n\t\tif (!arguments.length) {\n\t\t\tindentStr = this.getIndentString();\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\tlet trailingNewline = !this.intro || this.intro.slice(-1) === '\\n';\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\tconst indentStart = trailingNewline || (i > 0 && /\\r?\\n$/.test(separator));\n\n\t\t\tsource.content.indent(indentStr, {\n\t\t\t\texclude: source.indentExclusionRanges,\n\t\t\t\tindentStart, //: trailingNewline || /\\r?\\n$/.test( separator ) //true///\\r?\\n/.test( separator )\n\t\t\t});\n\n\t\t\ttrailingNewline = source.content.lastChar() === '\\n';\n\t\t});\n\n\t\tif (this.intro) {\n\t\t\tthis.intro =\n\t\t\t\tindentStr +\n\t\t\t\tthis.intro.replace(/^[^\\n]/gm, (match, index) => {\n\t\t\t\t\treturn index > 0 ? indentStr + match : match;\n\t\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tprepend(str) {\n\t\tthis.intro = str + this.intro;\n\t\treturn this;\n\t}\n\n\ttoString() {\n\t\tconst body = this.sources\n\t\t\t.map((source, i) => {\n\t\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\t\tconst str = (i > 0 ? separator : '') + source.content.toString();\n\n\t\t\t\treturn str;\n\t\t\t})\n\t\t\t.join('');\n\n\t\treturn this.intro + body;\n\t}\n\n\tisEmpty() {\n\t\tif (this.intro.length && this.intro.trim()) return false;\n\t\tif (this.sources.some((source) => !source.content.isEmpty())) return false;\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\treturn this.sources.reduce(\n\t\t\t(length, source) => length + source.content.length(),\n\t\t\tthis.intro.length,\n\t\t);\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimStart(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\t\tthis.intro = this.intro.replace(rx, '');\n\n\t\tif (!this.intro) {\n\t\t\tlet source;\n\t\t\tlet i = 0;\n\n\t\t\tdo {\n\t\t\t\tsource = this.sources[i++];\n\t\t\t\tif (!source) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (!source.content.trimStartAborted(charType));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\ttrimEnd(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tlet source;\n\t\tlet i = this.sources.length - 1;\n\n\t\tdo {\n\t\t\tsource = this.sources[i--];\n\t\t\tif (!source) {\n\t\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!source.content.trimEndAborted(charType));\n\n\t\treturn this;\n\t}\n}\n","import MagicString from './MagicString.js';\nimport Bundle from './Bundle.js';\nimport SourceMap from './SourceMap.js';\n\nMagicString.Bundle = Bundle;\nMagicString.SourceMap = SourceMap;\nMagicString.default = MagicString; // work around TypeScript bug https://github.com/Rich-Harris/magic-string/pull/121\n\nexport default MagicString;\n"],"names":[],"mappings":";;;;;;CAAe,MAAM,MAAM,CAAC;CAC5B,CAAC,WAAW,CAAC,GAAG,EAAE;CAClB,EAAE,IAAI,CAAC,IAAI,GAAG,GAAG,YAAY,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;CAC5D,EAAE;AACF;CACA,CAAC,GAAG,CAAC,CAAC,EAAE;CACR,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;CACrC,EAAE;AACF;CACA,CAAC,GAAG,CAAC,CAAC,EAAE;CACR,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;CACjD,EAAE;CACF;;CCZe,MAAM,KAAK,CAAC;CAC3B,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;CAClC,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;CACpB,EAAE,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;CAChB,EAAE,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;;CAEzB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;CACjB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;;CAEjB,EAAE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;CACxB,EAAE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;CACxB,EAAE,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;;CAErB,EAMS;CACT,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;CACvB,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;CACnB,GAAE;CACF,EAAC;;CAED,CAAC,UAAU,CAAC,OAAO,EAAE;CACrB,EAAE,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;CACvB,EAAC;;CAED,CAAC,WAAW,CAAC,OAAO,EAAE;CACtB,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,OAAO,CAAA;CACnC,EAAC;;CAED,CAAC,KAAK,GAAG;CACT,EAAE,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;;CAE9D,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;CAC1B,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;CAC1B,EAAE,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;CAC9B,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAA;CAClC,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;;CAE5B,EAAE,OAAO,KAAK,CAAA;CACd,EAAC;;CAED,CAAC,QAAQ,CAAC,KAAK,EAAE;CACjB,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,KAAK,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAA;CAC/C,EAAC;;CAED,CAAC,QAAQ,CAAC,EAAE,EAAE;CACd,EAAE,IAAI,KAAK,GAAG,IAAI,CAAA;CAClB,EAAE,OAAO,KAAK,EAAE;CAChB,GAAG,EAAE,CAAC,KAAK,CAAC,CAAA;CACZ,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;CACrB,GAAE;CACF,EAAC;;CAED,CAAC,YAAY,CAAC,EAAE,EAAE;CAClB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAA;CAClB,EAAE,OAAO,KAAK,EAAE;CAChB,GAAG,EAAE,CAAC,KAAK,CAAC,CAAA;CACZ,GAAG,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAA;CACzB,GAAE;CACF,EAAC;;CAED,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE;CACvC,EAAE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;CACxB,EAAE,IAAI,CAAC,WAAW,EAAE;CACpB,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;CAClB,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;CAClB,GAAE;CACF,EAAE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;;CAE5B,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA;;CAEpB,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,WAAW,CAAC,OAAO,EAAE;CACtB,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;CACnC,EAAC;;CAED,CAAC,YAAY,CAAC,OAAO,EAAE;CACvB,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;CACnC,EAAC;;CAED,CAAC,KAAK,GAAG;CACT,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;CACjB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;CACjB,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE;CACnB,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAA;CAC/B,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;CACzB,GAAG,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;CACtB,GAAE;CACF,EAAC;;CAED,CAAC,KAAK,CAAC,KAAK,EAAE;CACd,EAAE,MAAM,UAAU,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;;CAEvC,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAA;CAC3D,EAAE,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;;CAEvD,EAAE,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAA;;CAEhC,EAAE,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,CAAA;CAC5D,EAAE,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;CAC7B,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;;CAEjB,EAAE,IAAI,CAAC,GAAG,GAAG,KAAK,CAAA;;CAElB,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE;CACnB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;CAC3B,GAAG,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;CACpB,GAAG,MAAM;CACT,GAAG,IAAI,CAAC,OAAO,GAAG,cAAc,CAAA;CAChC,GAAE;;CAEF,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;CAC3B,EAAE,IAAI,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;CACtD,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAA;CAC1B,EAAE,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;;CAEtB,EAAE,OAAO,QAAQ,CAAA;CACjB,EAAC;;CAED,CAAC,QAAQ,GAAG;CACZ,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;CAC/C,EAAC;;CAED,CAAC,OAAO,CAAC,EAAE,EAAE;CACb,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;CACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;CAEpC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;;CAE9C,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE;CACtB,GAAG,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE;CACjC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;CACrE,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;CACrB;CACA,KAAK,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;CAC7C,KAAI;CACJ,IAAG;CACH,GAAG,OAAO,IAAI,CAAA;CACd,GAAG,MAAM;CACT,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;;CAEjC,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;CAC1C,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;CACrC,GAAE;CACF,EAAC;;CAED,CAAC,SAAS,CAAC,EAAE,EAAE;CACf,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;CACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;CAEpC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;;CAE9C,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE;CACtB,GAAG,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE;CACjC,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;CAC1D,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;CACrB;CACA,KAAK,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;CACjD,KAAI;CACJ,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;CAClC,IAAG;CACH,GAAG,OAAO,IAAI,CAAA;CACd,GAAG,MAAM;CACT,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;;CAEjC,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;CAC1C,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;CACrC,GAAE;CACF,EAAC;CACD;;CCvLA,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;CAChC,MAAM,SAAS,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;CACpC,MAAM,KAAK,GAAG,kEAAkE,CAAC;CACjF,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;CACrC,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;CACtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACvC,IAAI,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;CAClC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACrB,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACrB,CAAC;CAkBD,SAAS,aAAa,CAAC,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE;CAC/C,IAAI,IAAI,KAAK,GAAG,GAAG,GAAG,QAAQ,CAAC;CAC/B,IAAI,KAAK,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC;CACvD,IAAI,GAAG;CACP,QAAQ,IAAI,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;CACvC,QAAQ,KAAK,MAAM,CAAC,CAAC;CACrB,QAAQ,IAAI,KAAK,GAAG,CAAC;CACrB,YAAY,OAAO,IAAI,QAAQ,CAAC;CAChC,QAAQ,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;CAC1C,KAAK,QAAQ,KAAK,GAAG,CAAC,EAAE;CACxB,IAAI,OAAO,GAAG,CAAC;CACf,CAAC;AAMD;CACA,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;CAC5B;CACA,MAAM,EAAE,GAAG,OAAO,WAAW,KAAK,WAAW;CAC7C,sBAAsB,IAAI,WAAW,EAAE;CACvC,MAAM,OAAO,MAAM,KAAK,WAAW;CACnC,UAAU;CACV,YAAY,MAAM,CAAC,GAAG,EAAE;CACxB,gBAAgB,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;CACpF,gBAAgB,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;CACtC,aAAa;CACb,SAAS;CACT,UAAU;CACV,YAAY,MAAM,CAAC,GAAG,EAAE;CACxB,gBAAgB,IAAI,GAAG,GAAG,EAAE,CAAC;CAC7B,gBAAgB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACrD,oBAAoB,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;CACvD,iBAAiB;CACjB,gBAAgB,OAAO,GAAG,CAAC;CAC3B,aAAa;CACb,SAAS,CAAC;CACV,MAAM,YAAY,CAAC;CACnB,IAAI,WAAW,GAAG;CAClB,QAAQ,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;CACrB,QAAQ,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;CACtB,QAAQ,IAAI,CAAC,MAAM,GAAG,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC;CAChD,KAAK;CACL,IAAI,KAAK,CAAC,CAAC,EAAE;CACb,QAAQ,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAChC,QAAQ,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;CAC/B,QAAQ,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,EAAE;CACpC,YAAY,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;CAC1C,YAAY,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;CACzB,SAAS;CACT,KAAK;CACL,IAAI,KAAK,GAAG;CACZ,QAAQ,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;CAC1C,QAAQ,OAAO,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;CACxE,KAAK;CACL,CAAC;CAoTD,SAAS,MAAM,CAAC,OAAO,EAAE;CACzB,IAAI,MAAM,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC;CACtC,IAAI,IAAI,YAAY,GAAG,CAAC,CAAC;CACzB,IAAI,IAAI,UAAU,GAAG,CAAC,CAAC;CACvB,IAAI,IAAI,YAAY,GAAG,CAAC,CAAC;CACzB,IAAI,IAAI,UAAU,GAAG,CAAC,CAAC;CACvB,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CAC7C,QAAQ,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CAChC,QAAQ,IAAI,CAAC,GAAG,CAAC;CACjB,YAAY,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;CACpC,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;CAC7B,YAAY,SAAS;CACrB,QAAQ,IAAI,SAAS,GAAG,CAAC,CAAC;CAC1B,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CAC9C,YAAY,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;CACpC,YAAY,IAAI,CAAC,GAAG,CAAC;CACrB,gBAAgB,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;CACpC,YAAY,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;CACrE,YAAY,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;CACpC,gBAAgB,SAAS;CACzB,YAAY,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;CAC3E,YAAY,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;CACvE,YAAY,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;CAC3E,YAAY,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;CACpC,gBAAgB,SAAS;CACzB,YAAY,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;CACvE,SAAS;CACT,KAAK;CACL,IAAI,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;CAC1B;;CClaA,SAAS,OAAO,GAAG;CACnB,CAAC,IAAI,OAAO,UAAU,KAAK,WAAW,IAAI,OAAO,UAAU,CAAC,IAAI,KAAK,UAAU,EAAE;CACjF,EAAE,OAAO,CAAC,GAAG,KAAK,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrE,EAAE,MAAM,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;CAC1C,EAAE,OAAO,CAAC,GAAG,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;CAC/D,EAAE,MAAM;CACR,EAAE,OAAO,MAAM;CACf,GAAG,MAAM,IAAI,KAAK,CAAC,yEAAyE,CAAC,CAAC;CAC9F,GAAG,CAAC;CACJ,EAAE;CACF,CAAC;AACD;CACA,MAAM,IAAI,iBAAiB,OAAO,EAAE,CAAC;AACrC;CACe,MAAM,SAAS,CAAC;CAC/B,CAAC,WAAW,CAAC,UAAU,EAAE;CACzB,EAAE,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;CACnB,EAAE,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;CAC9B,EAAE,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;CACpC,EAAE,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;CAClD,EAAE,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;CAChC,EAAE,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;CAC9C,EAAE,IAAI,OAAO,UAAU,CAAC,mBAAmB,KAAK,WAAW,EAAE;CAC7D,GAAG,IAAI,CAAC,mBAAmB,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAC7D,GAAG;CACH,EAAE,IAAI,OAAO,UAAU,CAAC,OAAO,KAAK,WAAW,EAAE;CACjD,GAAG,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;CACrC,GAAG;CACH,EAAE;AACF;CACA,CAAC,QAAQ,GAAG;CACZ,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;CAC9B,EAAE;AACF;CACA,CAAC,KAAK,GAAG;CACT,EAAE,OAAO,6CAA6C,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;CAC/E,EAAE;CACF;;CCvCe,SAAS,WAAW,CAAC,IAAI,EAAE;CAC1C,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAChC;CACA,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;CAC1D,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5D;CACA,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;CACjD,EAAE,OAAO,IAAI,CAAC;CACd,EAAE;AACF;CACA;CACA;CACA;CACA,CAAC,IAAI,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE;CACrC,EAAE,OAAO,IAAI,CAAC;CACd,EAAE;AACF;CACA;CACA,CAAC,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,OAAO,KAAK;CAClD,EAAE,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;CAClD,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;CACvC,EAAE,EAAE,QAAQ,CAAC,CAAC;AACd;CACA,CAAC,OAAO,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;CACrC;;CCxBe,SAAS,eAAe,CAAC,IAAI,EAAE,EAAE,EAAE;CAClD,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;CACvC,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACnC;CACA,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;AACjB;CACA,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE;CACrC,EAAE,SAAS,CAAC,KAAK,EAAE,CAAC;CACpB,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;CAClB,EAAE;AACF;CACA,CAAC,IAAI,SAAS,CAAC,MAAM,EAAE;CACvB,EAAE,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC;CAC3B,EAAE,OAAO,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAClC,EAAE;AACF;CACA,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;CAC5C;;CCjBA,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAC3C;CACe,SAAS,QAAQ,CAAC,KAAK,EAAE;CACxC,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,iBAAiB,CAAC;CACnD;;CCJe,SAAS,UAAU,CAAC,MAAM,EAAE;CAC3C,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;CAC1C,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AACxB;CACA,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACzD,EAAE,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;CACxB,EAAE,GAAG,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;CACrC,EAAE;AACF;CACA,CAAC,OAAO,SAAS,MAAM,CAAC,KAAK,EAAE;CAC/B,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;CACZ,EAAE,IAAI,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC;CAC7B,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE;CAChB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CAC1B,GAAG,IAAI,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE;CAC/B,IAAI,CAAC,GAAG,CAAC,CAAC;CACV,IAAI,MAAM;CACV,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACd,IAAI;CACJ,GAAG;CACH,EAAE,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;CACrB,EAAE,MAAM,MAAM,GAAG,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;CAC3C,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;CAC1B,EAAE,CAAC;CACH;;CCxBA,MAAM,SAAS,GAAG,IAAI,CAAC;AACvB;CACe,MAAM,QAAQ,CAAC;CAC9B,CAAC,WAAW,CAAC,KAAK,EAAE;CACpB,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;CACrB,EAAE,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;CAC7B,EAAE,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;CAC/B,EAAE,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;CAChB,EAAE,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAC;CAC3D,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;CACtB,EAAE;AACF;CACA,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE;CAC/C,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE;CACtB,GAAG,MAAM,qBAAqB,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;CACpD,GAAG,IAAI,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;CACjD,GAAG,IAAI,sBAAsB,GAAG,CAAC,CAAC,CAAC;CACnC;CACA;CACA,GAAG,OAAO,cAAc,IAAI,CAAC,IAAI,qBAAqB,GAAG,cAAc,EAAE;CACzE,IAAI,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAClF,IAAI,IAAI,SAAS,IAAI,CAAC,EAAE;CACxB,KAAK,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;CAC7B,KAAK;CACL,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACnC;CACA,IAAI,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;CAChC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;CAC7D,IAAI,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;AACjC;CACA,IAAI,sBAAsB,GAAG,cAAc,CAAC;CAC5C,IAAI,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,CAAC,CAAC,CAAC;CAC/D,IAAI;AACJ;CACA,GAAG,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACjF,GAAG,IAAI,SAAS,IAAI,CAAC,EAAE;CACvB,IAAI,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;CAC5B,IAAI;CACJ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAClC;CACA,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,sBAAsB,GAAG,CAAC,CAAC,CAAC,CAAC;CAC3D,GAAG,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE;CAC3B,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;CACvC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;CACzB,GAAG;AACH;CACA,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;CACtB,EAAE;AACF;CACA,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,kBAAkB,EAAE;CACzE,EAAE,IAAI,iBAAiB,GAAG,KAAK,CAAC,KAAK,CAAC;CACtC,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC;CACnB;CACA,EAAE,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAClC;CACA,EAAE,OAAO,iBAAiB,GAAG,KAAK,CAAC,GAAG,EAAE;CACxC,GAAG,IAAI,QAAQ,CAAC,iBAAiB,CAAC,KAAK,IAAI,EAAE;CAC7C,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC;CAClB,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;CACnB,IAAI,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;CAChC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;CAC7D,IAAI,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;CACjC,IAAI,KAAK,GAAG,IAAI,CAAC;CACjB,IAAI,mBAAmB,GAAG,KAAK,CAAC;CAChC,IAAI,MAAM;CACV,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,KAAK,IAAI,kBAAkB,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE;CAC1E,KAAK,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;AACnF;CACA,KAAK,IAAI,IAAI,CAAC,KAAK,KAAK,UAAU,EAAE;CACpC;CACA,MAAM,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,EAAE;CACvD;CACA,OAAO,IAAI,CAAC,mBAAmB,EAAE;CACjC,QAAQ,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;CACvC,QAAQ,mBAAmB,GAAG,IAAI,CAAC;CACnC,QAAQ;CACR,OAAO,MAAM;CACb;CACA,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;CACtC,OAAO,mBAAmB,GAAG,KAAK,CAAC;CACnC,OAAO;CACP,MAAM,MAAM;CACZ,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;CACrC,MAAM;CACN,KAAK;AACL;CACA,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;CACpB,IAAI,IAAI,CAAC,mBAAmB,IAAI,CAAC,CAAC;CAClC,IAAI,KAAK,GAAG,KAAK,CAAC;CAClB,IAAI;AACJ;CACA,GAAG,iBAAiB,IAAI,CAAC,CAAC;CAC1B,GAAG;AACH;CACA,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;CACtB,EAAE;AACF;CACA,CAAC,OAAO,CAAC,GAAG,EAAE;CACd,EAAE,IAAI,CAAC,GAAG,EAAE,OAAO;AACnB;CACA,EAAE,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAChC;CACA,EAAE,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;CACxB,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;CAC9C,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;CAC7B,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;CAC7D,IAAI;CACJ,GAAG,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;CAChC,GAAG;AACH;CACA,EAAE,IAAI,CAAC,mBAAmB,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;CAC7D,EAAE;CACF;;CCtGA,MAAM,CAAC,GAAG,IAAI,CAAA;;CAEd,MAAM,MAAM,GAAG;CACf,CAAC,UAAU,EAAE,KAAK;CAClB,CAAC,WAAW,EAAE,KAAK;CACnB,CAAC,SAAS,EAAE,KAAK;CACjB,CAAC,CAAA;;CAEc,MAAM,WAAW,CAAC;CACjC,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE;CACnC,EAAE,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;;CAEnD,EAAE,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE;CAChC,GAAG,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE;CAC9C,GAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;CACvC,GAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;CACvC,GAAG,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;CAC/C,GAAG,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;CAC9C,GAAG,iBAAiB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;CACtD,GAAG,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;CACzC,GAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;CACvC,GAAG,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,QAAQ,EAAE;CACxD,GAAG,qBAAqB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,qBAAqB,EAAE;CAClF,GAAG,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,MAAM,EAAE,EAAE;CAC9D,GAAG,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;CAC7C,GAAG,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;CAClD,GAAG,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,UAAU,EAAE;CAC5D,GAAG,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,IAAI,CAAC,EAAE;CACzD,GAAG,CAAC,CAAA;;CAMJ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAA;CACzB,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAA;CACnC,EAAC;;CAED,CAAC,oBAAoB,CAAC,IAAI,EAAE;CAC5B,EAAE,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;CACnC,EAAC;;CAED,CAAC,MAAM,CAAC,OAAO,EAAE;CACjB,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAA;;CAExF,EAAE,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;CACvB,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE;CAC5B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;CAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;CAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;CAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;CAEjC,EAAE,IAAI,KAAK,EAAE;CACb,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;CAC5B,GAAG,MAAM;CACT,GAAG,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;CACxB,GAAE;CAGF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE;CAC7B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;CAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;CAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;CAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;CAEnC,EAAE,IAAI,KAAK,EAAE;CACb,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;CAC7B,GAAG,MAAM;CACT,GAAG,IAAI,CAAC,KAAK,IAAI,OAAO,CAAA;CACxB,GAAE;CAGF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,KAAK,GAAG;CACT,EAAE,MAAM,MAAM,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;;CAEjG,EAAE,IAAI,aAAa,GAAG,IAAI,CAAC,UAAU,CAAA;CACrC,EAAE,IAAI,WAAW,IAAI,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,iBAAiB,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC,CAAA;;CAE1F,EAAE,OAAO,aAAa,EAAE;CACxB,GAAG,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,WAAW,CAAA;CAClD,GAAG,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,WAAW,CAAA;;CAE9C,GAAG,MAAM,iBAAiB,GAAG,aAAa,CAAC,IAAI,CAAA;CAC/C,GAAG,MAAM,eAAe,GAAG,iBAAiB,IAAI,iBAAiB,CAAC,KAAK,EAAE,CAAA;;CAEzE,GAAG,IAAI,eAAe,EAAE;CACxB,IAAI,WAAW,CAAC,IAAI,GAAG,eAAe,CAAA;CACtC,IAAI,eAAe,CAAC,QAAQ,GAAG,WAAW,CAAA;;CAE1C,IAAI,WAAW,GAAG,eAAe,CAAA;CACjC,IAAG;;CAEH,GAAG,aAAa,GAAG,iBAAiB,CAAA;CACpC,GAAE;;CAEF,EAAE,MAAM,CAAC,SAAS,GAAG,WAAW,CAAA;;CAEhC,EAAE,IAAI,IAAI,CAAC,qBAAqB,EAAE;CAClC,GAAG,MAAM,CAAC,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,EAAE,CAAA;CACpE,GAAE;;CAEF,EAAE,MAAM,CAAC,kBAAkB,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;;CAEjE,EAAE,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;CAC3B,EAAE,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;;CAE3B,EAAE,OAAO,MAAM,CAAA;CACf,EAAC;;CAED,CAAC,kBAAkB,CAAC,OAAO,EAAE;CAC7B,EAAE,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;;CAEzB,EAAE,MAAM,WAAW,GAAG,CAAC,CAAA;CACvB,EAAE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;CAC7C,EAAE,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;CAE9C,EAAE,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;;CAE1C,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;CAClB,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;CAC/B,GAAE;;CAEF,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,KAAK,KAAK;CACtC,GAAG,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;CAElC,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;CAExD,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE;CACrB,IAAI,QAAQ,CAAC,OAAO;CACpB,KAAK,WAAW;CAChB,KAAK,KAAK,CAAC,OAAO;CAClB,KAAK,GAAG;CACR,KAAK,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;CACzD,KAAK,CAAA;CACL,IAAI,MAAM;CACV,IAAI,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAA;CAC9F,IAAG;;CAEH,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;CACxD,GAAG,CAAC,CAAA;;CAEJ,EAAE,OAAO;CACT,GAAG,IAAI,EAAE,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,SAAS;CACrE,GAAG,OAAO,EAAE;CACZ,IAAI,OAAO,CAAC,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,IAAI,EAAE;CAC7F,IAAI;CACJ,GAAG,cAAc,EAAE,OAAO,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,SAAS;CACvE,GAAG,KAAK;CACR,GAAG,QAAQ,EAAE,QAAQ,CAAC,GAAG;CACzB,GAAG,mBAAmB,EAAE,IAAI,CAAC,UAAU,GAAG,CAAC,WAAW,CAAC,GAAG,SAAS;CACnE,GAAG,CAAA;CACH,EAAC;;CAED,CAAC,WAAW,CAAC,OAAO,EAAE;CACtB,EAAE,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAA;CACxD,EAAC;;CAED,CAAC,gBAAgB,GAAG;CACpB,EAAE,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE;CACpC,GAAG,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;CAC9C,GAAE;CACF,EAAC;;CAED,CAAC,mBAAmB,GAAG;CACvB,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAA;CACzB,EAAE,OAAO,IAAI,CAAC,SAAS,CAAA;CACvB,EAAC;;CAED,CAAC,eAAe,GAAG;CACnB,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAA;CACzB,EAAE,OAAO,IAAI,CAAC,SAAS,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,SAAS,CAAA;CACxD,EAAC;;CAED,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE;CAC5B,EAAE,MAAM,OAAO,GAAG,YAAY,CAAA;;CAE9B,EAAE,IAAI,QAAQ,CAAC,SAAS,CAAC,EAAE;CAC3B,GAAG,OAAO,GAAG,SAAS,CAAA;CACtB,GAAG,SAAS,GAAG,SAAS,CAAA;CACxB,GAAE;;CAEF,EAAE,IAAI,SAAS,KAAK,SAAS,EAAE;CAC/B,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAA;CAC1B,GAAG,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAA;CACrC,GAAE;;CAEF,EAAE,IAAI,SAAS,KAAK,EAAE,EAAE,OAAO,IAAI,CAAC;;CAEpC,EAAE,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;;CAEzB;CACA,EAAE,MAAM,UAAU,GAAG,EAAE,CAAA;;CAEvB,EAAE,IAAI,OAAO,CAAC,OAAO,EAAE;CACvB,GAAG,MAAM,UAAU;CACnB,IAAI,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,QAAQ,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAA;CAChF,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,KAAK;CACrC,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;CACzD,KAAK,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;CACzB,KAAI;CACJ,IAAI,CAAC,CAAA;CACL,GAAE;;CAEF,EAAE,IAAI,yBAAyB,GAAG,OAAO,CAAC,WAAW,KAAK,KAAK,CAAA;CAC/D,EAAE,MAAM,QAAQ,GAAG,CAAC,KAAK,KAAK;CAC9B,GAAG,IAAI,yBAAyB,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,CAAC,CAAA;CAC/D,GAAG,yBAAyB,GAAG,IAAI,CAAA;CACnC,GAAG,OAAO,KAAK,CAAA;CACf,GAAG,CAAA;;CAEH,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;CAEpD,EAAE,IAAI,SAAS,GAAG,CAAC,CAAA;CACnB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;;CAE7B,EAAE,OAAO,KAAK,EAAE;CAChB,GAAG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;;CAExB,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE;CACrB,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;CAChC,KAAK,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;CAE7D,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;CAC/B,MAAM,yBAAyB,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,CAAA;CAClF,MAAK;CACL,KAAI;CACJ,IAAI,MAAM;CACV,IAAI,SAAS,GAAG,KAAK,CAAC,KAAK,CAAA;;CAE3B,IAAI,OAAO,SAAS,GAAG,GAAG,EAAE;CAC5B,KAAK,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;CACjC,MAAM,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;;CAE3C,MAAM,IAAI,IAAI,KAAK,IAAI,EAAE;CACzB,OAAO,yBAAyB,GAAG,IAAI,CAAA;CACvC,OAAO,MAAM,IAAI,IAAI,KAAK,IAAI,IAAI,yBAAyB,EAAE;CAC7D,OAAO,yBAAyB,GAAG,KAAK,CAAA;;CAExC,OAAO,IAAI,SAAS,KAAK,KAAK,CAAC,KAAK,EAAE;CACtC,QAAQ,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;CACrC,QAAQ,MAAM;CACd,QAAQ,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;CAC1C,QAAQ,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;CAC1B,QAAQ,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;CACrC,QAAO;CACP,OAAM;CACN,MAAK;;CAEL,KAAK,SAAS,IAAI,CAAC,CAAA;CACnB,KAAI;CACJ,IAAG;;CAEH,GAAG,SAAS,GAAG,KAAK,CAAC,GAAG,CAAA;CACxB,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;CACrB,GAAE;;CAEF,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;CAEpD,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,MAAM,GAAG;CACV,EAAE,MAAM,IAAI,KAAK;CACjB,GAAG,iFAAiF;CACpF,GAAG,CAAA;CACH,EAAC;;CAED,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE;CAC5B,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;CAC1B,GAAG,OAAO,CAAC,IAAI;CACf,IAAI,oFAAoF;CACxF,IAAI,CAAA;CACJ,GAAG,MAAM,CAAC,UAAU,GAAG,IAAI,CAAA;CAC3B,GAAE;;CAEF,EAAE,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;CACxC,EAAC;;CAED,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE;CAC7B,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE;CAC3B,GAAG,OAAO,CAAC,IAAI;CACf,IAAI,uFAAuF;CAC3F,IAAI,CAAA;CACJ,GAAG,MAAM,CAAC,WAAW,GAAG,IAAI,CAAA;CAC5B,GAAE;;CAEF,EAAE,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;CAC1C,EAAC;;CAED,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE;CACzB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;CAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;CACzB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;CAE7B,EAAE,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;;CAI9F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;CACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;CAClB,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;CAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;CACnC,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;;CAE9B,EAAE,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAA;CAChC,EAAE,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAA;;CAE5B,EAAE,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;CACtC,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,KAAK,IAAI,CAAC,SAAS,EAAE,OAAO,IAAI,CAAA;CACvD,EAAE,MAAM,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAA;;CAE/D,EAAE,IAAI,OAAO,EAAE,OAAO,CAAC,IAAI,GAAG,QAAQ,CAAA;CACtC,EAAE,IAAI,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAA;;CAE3C,EAAE,IAAI,OAAO,EAAE,OAAO,CAAC,IAAI,GAAG,KAAK,CAAA;CACnC,EAAE,IAAI,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAA;;CAExC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAA;CAClD,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;CAClB,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAA;CAClC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI,CAAA;CAC7B,GAAE;;CAEF,EAAE,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAA;CAC1B,EAAE,IAAI,CAAC,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAA;;CAE9B,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,GAAG,KAAK,CAAA;CACvC,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;CAGtC,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE;CACzC,EAAE,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;CACzB,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAA;CAC1F,EAAC;;CAED,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE;CACtC,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;CAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;CAEzB,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAA;;CAE9F,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;CAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;CAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;CAC9C,GAAE;;CAEF,EAAE,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAA;CACzE,EAAE,IAAI,KAAK,KAAK,GAAG;CACnB,GAAG,MAAM,IAAI,KAAK;CAClB,IAAI,+EAA+E;CACnF,IAAI,CAAA;;CAIJ,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;CACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;CAElB,EAAE,IAAI,OAAO,KAAK,IAAI,EAAE;CACxB,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;CAC1B,IAAI,OAAO,CAAC,IAAI;CAChB,KAAK,+HAA+H;CACpI,KAAK,CAAA;CACL,IAAI,MAAM,CAAC,SAAS,GAAG,IAAI,CAAA;CAC3B,IAAG;;CAEH,GAAG,OAAO,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAA;CAChC,GAAE;CACF,EAAE,MAAM,SAAS,GAAG,OAAO,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,KAAK,CAAA;CACrE,EAAE,MAAM,SAAS,GAAG,OAAO,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,KAAK,CAAA;;CAErE,EAAE,IAAI,SAAS,EAAE;CACjB,GAAG,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;CACnD,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE;CACrD,IAAI,QAAQ,EAAE,IAAI;CAClB,IAAI,KAAK,EAAE,IAAI;CACf,IAAI,UAAU,EAAE,IAAI;CACpB,IAAI,CAAC,CAAA;CACL,GAAE;;CAEF,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;CACnC,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;;CAE9B,EAAE,IAAI,KAAK,EAAE;CACb,GAAG,IAAI,KAAK,GAAG,KAAK,CAAA;CACpB,GAAG,OAAO,KAAK,KAAK,IAAI,EAAE;CAC1B,IAAI,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;CAChD,KAAK,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;CAC7D,KAAI;CACJ,IAAI,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;CACtB,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;CACzB,IAAG;;CAEH,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,CAAA;CAC7C,GAAG,MAAM;CACT;CACA,GAAG,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;;CAEtE;CACA,GAAG,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;CACvB,GAAG,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAA;CAC3B,GAAE;CAGF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,OAAO,CAAC,OAAO,EAAE;CAClB,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAA;;CAExF,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;CACnC,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE;CAC7B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;CAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;CAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;CAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;CAEjC,EAAE,IAAI,KAAK,EAAE;CACb,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;CAC7B,GAAG,MAAM;CACT,GAAG,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;CACpC,GAAE;CAGF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE;CAC9B,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;;CAE7B,EAAE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;;CAI3F,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;;CAEpB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;CAEnC,EAAE,IAAI,KAAK,EAAE;CACb,GAAG,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;CAC9B,GAAG,MAAM;CACT,GAAG,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;CACpC,GAAE;CAGF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE;CACpB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;CAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;CAEzB,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;CAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;CAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;CAC9C,GAAE;;CAEF,EAAE,IAAI,KAAK,KAAK,GAAG,EAAE,OAAO,IAAI,CAAA;;CAEhC,EAAE,IAAI,KAAK,GAAG,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;CAC5F,EAAE,IAAI,KAAK,GAAG,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;;CAIpE,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;CACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;CAElB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;CAEjC,EAAE,OAAO,KAAK,EAAE;CAChB,GAAG,KAAK,CAAC,KAAK,GAAG,EAAE,CAAA;CACnB,GAAG,KAAK,CAAC,KAAK,GAAG,EAAE,CAAA;CACnB,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;;CAEjB,GAAG,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;CAC3D,GAAE;CAGF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE;CACnB,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;CAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;CAEzB,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;CAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;CAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;CAC9C,GAAE;;CAEF,EAAE,IAAI,KAAK,KAAK,GAAG,EAAE,OAAO,IAAI,CAAA;;CAEhC,EAAE,IAAI,KAAK,GAAG,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;CAC5F,EAAE,IAAI,KAAK,GAAG,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;;CAIpE,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;CACpB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;CAElB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;;CAEjC,EAAE,OAAO,KAAK,EAAE;CAChB,GAAG,KAAK,CAAC,KAAK,EAAE,CAAA;;CAEhB,GAAG,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;CAC3D,GAAE;CAGF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,QAAQ,GAAG;CACZ,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;CACjE,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAA;CAC5B,EAAE,GAAG;CACL,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;CACrE,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;CAC3E,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;CACrE,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,QAAQ,GAAE;CACpC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;CACjE,EAAE,OAAO,EAAE,CAAA;CACX,EAAC;;CAED,CAAC,QAAQ,GAAG;CACZ,EAAE,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;CAC3C,EAAE,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,CAAA;CAC/D,EAAE,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAA;CAC1B,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAA;CAC5B,EAAE,GAAG;CACL,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;CAC/B,IAAI,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;CAC1C,IAAI,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;CAC5E,IAAI,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,OAAO,CAAA;CACnC,IAAG;;CAEH,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;CACjC,IAAI,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;CAC5C,IAAI,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;CAC9E,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,GAAG,OAAO,CAAA;CACrC,IAAG;;CAEH,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;CAC/B,IAAI,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;CAC1C,IAAI,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;CAC5E,IAAI,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,OAAO,CAAA;CACnC,IAAG;CACH,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,QAAQ,GAAE;CACpC,EAAE,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;CACvC,EAAE,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,CAAA;CACzE,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,OAAO,CAAA;CAC7B,EAAC;;CAED,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;CAC5D,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;CAC7B,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;;CAEzB,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;CAClC,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;CAClD,GAAG,OAAO,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA;CAC9C,GAAE;;CAEF,EAAE,IAAI,MAAM,GAAG,EAAE,CAAA;;CAEjB;CACA,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;CAC7B,EAAE,OAAO,KAAK,KAAK,KAAK,CAAC,KAAK,GAAG,KAAK,IAAI,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE;CAC/D;CACA,GAAG,IAAI,KAAK,CAAC,KAAK,GAAG,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,GAAG,EAAE;CAC9C,IAAI,OAAO,MAAM,CAAA;CACjB,IAAG;;CAEH,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;CACrB,GAAE;;CAEF,EAAE,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK;CACpD,GAAG,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAA;;CAEnF,EAAE,MAAM,UAAU,GAAG,KAAK,CAAA;CAC1B,EAAE,OAAO,KAAK,EAAE;CAChB,GAAG,IAAI,KAAK,CAAC,KAAK,KAAK,UAAU,KAAK,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,EAAE;CACvE,IAAI,MAAM,IAAI,KAAK,CAAC,KAAK,CAAA;CACzB,IAAG;;CAEH,GAAG,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,GAAG,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,GAAG,CAAA;CAC5D,GAAG,IAAI,WAAW,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG;CACvD,IAAI,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAA;;CAEhF,GAAG,MAAM,UAAU,GAAG,UAAU,KAAK,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAA;CACpE,GAAG,MAAM,QAAQ,GAAG,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAA;;CAE/F,GAAG,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;;CAEtD,GAAG,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE;CAC3D,IAAI,MAAM,IAAI,KAAK,CAAC,KAAK,CAAA;CACzB,IAAG;;CAEH,GAAG,IAAI,WAAW,EAAE;CACpB,IAAI,MAAK;CACT,IAAG;;CAEH,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;CACrB,GAAE;;CAEF,EAAE,OAAO,MAAM,CAAA;CACf,EAAC;;CAED;CACA,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE;CAClB,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,CAAA;CAC5B,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;CACxB,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;;CAE1C,EAAE,OAAO,KAAK,CAAA;CACd,EAAC;;CAED,CAAC,MAAM,CAAC,KAAK,EAAE;CACf,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAM;;CAItD,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAA;CACpC,EAAE,MAAM,aAAa,GAAG,KAAK,GAAG,KAAK,CAAC,GAAG,CAAA;;CAEzC,EAAE,OAAO,KAAK,EAAE;CAChB,GAAG,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;;CAEnE,GAAG,KAAK,GAAG,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;CAC5E,GAAE;CACF,EAAC;;CAED,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE;CAC3B,EAAE,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;CAC5C;CACA,GAAG,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAA;CAC/C,GAAG,MAAM,IAAI,KAAK;CAClB,IAAI,CAAC,mDAAmD,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;CACzG,IAAI,CAAA;CACJ,GAAE;;CAEF,EAAE,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;;CAErC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAA;CAC3B,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAA;CAChC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAA;;CAErC,EAAE,IAAI,KAAK,KAAK,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;;CAEzD,EAAE,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAA;CAEhC,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,QAAQ,GAAG;CACZ,EAAE,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAA;;CAEtB,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;CAC7B,EAAE,OAAO,KAAK,EAAE;CAChB,GAAG,GAAG,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAA;CAC1B,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;CACrB,GAAE;;CAEF,EAAE,OAAO,GAAG,GAAG,IAAI,CAAC,KAAK,CAAA;CACzB,EAAC;;CAED,CAAC,OAAO,GAAG;CACX,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;CAC7B,EAAE,GAAG;CACL,GAAG;CACH,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE;CAC7C,KAAK,KAAK,CAAC,OAAO,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;CAClD,KAAK,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;CAC7C;CACA,IAAI,OAAO,KAAK,CAAA;CAChB,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,IAAI,GAAE;CAChC,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,MAAM,GAAG;CACV,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;CAC7B,EAAE,IAAI,MAAM,GAAG,CAAC,CAAA;CAChB,EAAE,GAAG;CACL,GAAG,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAA;CAC3E,GAAG,SAAS,KAAK,GAAG,KAAK,CAAC,IAAI,GAAE;CAChC,EAAE,OAAO,MAAM,CAAA;CACf,EAAC;;CAED,CAAC,SAAS,GAAG;CACb,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;CAC9B,EAAC;;CAED,CAAC,IAAI,CAAC,QAAQ,EAAE;CAChB,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;CACnD,EAAC;;CAED,CAAC,cAAc,CAAC,QAAQ,EAAE;CAC1B,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,QAAQ,IAAI,KAAK,IAAI,IAAI,CAAC,CAAA;;CAEnD,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;CACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;CAEpC,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAA;;CAE5B,EAAE,GAAG;CACL,GAAG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;CACxB,GAAG,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;;CAEpC;CACA,GAAG,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE;CAC1B,IAAI,IAAI,IAAI,CAAC,SAAS,KAAK,KAAK,EAAE;CAClC,KAAK,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAA;CAChC,KAAI;;CAEJ,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;CACjC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;CAC/C,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;CAC3C,IAAG;;CAEH,GAAG,IAAI,OAAO,EAAE,OAAO,IAAI,CAAA;CAC3B,GAAG,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAA;CACzB,GAAG,QAAQ,KAAK,EAAC;;CAEjB,EAAE,OAAO,KAAK,CAAA;CACd,EAAC;;CAED,CAAC,OAAO,CAAC,QAAQ,EAAE;CACnB,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;CAC/B,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;CACD,CAAC,gBAAgB,CAAC,QAAQ,EAAE;CAC5B,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,IAAI,QAAQ,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAA;;CAExD,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;CACzC,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,CAAA;;CAEpC,EAAE,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAA;;CAE7B,EAAE,GAAG;CACL,GAAG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;CACxB,GAAG,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;;CAEtC,GAAG,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE;CAC1B;CACA,IAAI,IAAI,KAAK,KAAK,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAA;;CAE7D,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;CACjC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;CAC/C,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;CAC3C,IAAG;;CAEH,GAAG,IAAI,OAAO,EAAE,OAAO,IAAI,CAAA;CAC3B,GAAG,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;CACrB,GAAG,QAAQ,KAAK,EAAC;;CAEjB,EAAE,OAAO,KAAK,CAAA;CACd,EAAC;;CAED,CAAC,SAAS,CAAC,QAAQ,EAAE;CACrB,EAAE,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAA;CACjC,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,UAAU,GAAG;CACd,EAAE,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAA;CAC1C,EAAC;;CAED,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE;CAC1C,EAAE,SAAS,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE;CACtC,GAAG,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;CACxC,IAAI,OAAO,WAAW,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK;CAC1D;CACA,KAAK,IAAI,CAAC,KAAK,GAAG,EAAE,OAAO,GAAG,CAAA;CAC9B,KAAK,IAAI,CAAC,KAAK,GAAG,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAA;CACnC,KAAK,MAAM,GAAG,GAAG,CAAC,CAAC,CAAA;CACnB,KAAK,IAAI,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;CAC7C,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;CACnB,KAAK,CAAC,CAAA;CACN,IAAI,MAAM;CACV,IAAI,OAAO,WAAW,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CAChE,IAAG;CACH,GAAE;CACF,EAAE,SAAS,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE;CAC7B,GAAG,IAAI,KAAK,CAAA;CACZ,GAAG,MAAM,OAAO,GAAG,EAAE,CAAA;CACrB,GAAG,QAAQ,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG;CAClC,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;CACvB,IAAG;CACH,GAAG,OAAO,OAAO,CAAA;CACjB,GAAE;CACF,EAAE,IAAI,WAAW,CAAC,MAAM,EAAE;CAC1B,GAAG,MAAM,OAAO,GAAG,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;CACvD,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,KAAK;CAC9B,IAAI,IAAI,KAAK,CAAC,KAAK,IAAI,IAAI,EAAE;CAC7B,KAAK,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;CAC7D,KAAK,IAAI,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;CACnC,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;CAC7E,MAAK;CACL,KAAI;CACJ,IAAI,CAAC,CAAA;CACL,GAAG,MAAM;CACT,GAAG,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;CACjD,GAAG,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,IAAI,IAAI,EAAE;CACrC,IAAI,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;CAC5D,IAAI,IAAI,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;CAClC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;CAC5E,KAAI;CACJ,IAAG;CACH,GAAE;CACF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;CACrC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;CAC3B,EAAE,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;;CAExC,EAAE,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;CACpB,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;CAC5D,GAAE;;CAEF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,EAAE;CACnC,EAAE,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;CACvC,GAAG,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;CACvD,GAAE;;CAEF,EAAE,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;CACtD,EAAC;;CAED,CAAC,iBAAiB,CAAC,MAAM,EAAE,WAAW,EAAE;CACxC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;CAC3B,EAAE,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAA;CACpC,EAAE;CACF,GAAG,IAAI,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;CACvC,GAAG,KAAK,KAAK,CAAC,CAAC;CACf,GAAG,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,GAAG,YAAY,CAAA;CACxD,IAAI;CACJ,GAAG,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,CAAC,CAAA;CAC/D,GAAG,IAAI,QAAQ,KAAK,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,EAAE,WAAW,CAAC,CAAA;CACzF,GAAE;;CAEF,EAAE,OAAO,IAAI,CAAA;CACb,EAAC;;CAED,CAAC,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE;CACtC,EAAE,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;CACvC,GAAG,OAAO,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;CAC1D,GAAE;;CAEF,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE;CAC3B,GAAG,MAAM,IAAI,SAAS;CACtB,IAAI,2EAA2E;CAC/E,IAAI,CAAA;CACJ,GAAE;;CAEF,EAAE,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;CACtD,EAAC;CACD;;CC33BA,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD;CACe,MAAM,MAAM,CAAC;CAC5B,CAAC,WAAW,CAAC,OAAO,GAAG,EAAE,EAAE;CAC3B,EAAE,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;CACnC,EAAE,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;CAC9E,EAAE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;CACpB,EAAE,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;CAC1B,EAAE,IAAI,CAAC,2BAA2B,GAAG,EAAE,CAAC;CACxC,EAAE;AACF;CACA,CAAC,SAAS,CAAC,MAAM,EAAE;CACnB,EAAE,IAAI,MAAM,YAAY,WAAW,EAAE;CACrC,GAAG,OAAO,IAAI,CAAC,SAAS,CAAC;CACzB,IAAI,OAAO,EAAE,MAAM;CACnB,IAAI,QAAQ,EAAE,MAAM,CAAC,QAAQ;CAC7B,IAAI,SAAS,EAAE,IAAI,CAAC,SAAS;CAC7B,IAAI,CAAC,CAAC;CACN,GAAG;AACH;CACA,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;CAC5C,GAAG,MAAM,IAAI,KAAK;CAClB,IAAI,sIAAsI;CAC1I,IAAI,CAAC;CACL,GAAG;AACH;CACA,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,uBAAuB,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;CACvF,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;CACjF,GAAG,CAAC,CAAC;AACL;CACA,EAAE,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,EAAE;CACtC;CACA,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;CACrC,GAAG;AACH;CACA,EAAE,IAAI,MAAM,CAAC,QAAQ,EAAE;CACvB,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,2BAA2B,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE;CAC5E,IAAI,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;CAClF,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;CAC7F,IAAI,MAAM;CACV,IAAI,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;CAC/F,IAAI,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,KAAK,YAAY,CAAC,OAAO,EAAE;CAC1D,KAAK,MAAM,IAAI,KAAK,CAAC,CAAC,+BAA+B,EAAE,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC,CAAC;CAC/F,KAAK;CACL,IAAI;CACJ,GAAG;AACH;CACA,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;CAC5B,EAAE,OAAO,IAAI,CAAC;CACd,EAAE;AACF;CACA,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE;CACtB,EAAE,IAAI,CAAC,SAAS,CAAC;CACjB,GAAG,OAAO,EAAE,IAAI,WAAW,CAAC,GAAG,CAAC;CAChC,GAAG,SAAS,EAAE,CAAC,OAAO,IAAI,OAAO,CAAC,SAAS,KAAK,EAAE;CAClD,GAAG,CAAC,CAAC;AACL;CACA,EAAE,OAAO,IAAI,CAAC;CACd,EAAE;AACF;CACA,CAAC,KAAK,GAAG;CACT,EAAE,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC;CAC5B,GAAG,KAAK,EAAE,IAAI,CAAC,KAAK;CACpB,GAAG,SAAS,EAAE,IAAI,CAAC,SAAS;CAC5B,GAAG,CAAC,CAAC;AACL;CACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;CACnC,GAAG,MAAM,CAAC,SAAS,CAAC;CACpB,IAAI,QAAQ,EAAE,MAAM,CAAC,QAAQ;CAC7B,IAAI,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE;CACnC,IAAI,SAAS,EAAE,MAAM,CAAC,SAAS;CAC/B,IAAI,CAAC,CAAC;CACN,GAAG,CAAC,CAAC;AACL;CACA,EAAE,OAAO,MAAM,CAAC;CAChB,EAAE;AACF;CACA,CAAC,kBAAkB,CAAC,OAAO,GAAG,EAAE,EAAE;CAClC,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;CACnB,EAAE,IAAI,mBAAmB,GAAG,SAAS,CAAC;CACtC,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;CACnC,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK;CAC7D,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;CAChD,IAAI,CAAC,CAAC;CACN,GAAG,CAAC,CAAC;AACL;CACA,EAAE,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC/C;CACA,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;CAClB,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;CAChC,GAAG;AACH;CACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK;CACtC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE;CACd,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;CACrC,IAAI;AACJ;CACA,GAAG,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;CAChG,GAAG,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC;CACtC,GAAG,MAAM,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;AACnD;CACA,GAAG,IAAI,WAAW,CAAC,KAAK,EAAE;CAC1B,IAAI,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;CACxC,IAAI;AACJ;CACA,GAAG,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,KAAK,KAAK;CAC9C,IAAI,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACpC;CACA,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC1D;CACA,IAAI,IAAI,MAAM,CAAC,QAAQ,EAAE;CACzB,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE;CACvB,MAAM,QAAQ,CAAC,OAAO;CACtB,OAAO,WAAW;CAClB,OAAO,KAAK,CAAC,OAAO;CACpB,OAAO,GAAG;CACV,OAAO,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;CAC3D,OAAO,CAAC;CACR,MAAM,MAAM;CACZ,MAAM,QAAQ,CAAC,gBAAgB;CAC/B,OAAO,WAAW;CAClB,OAAO,KAAK;CACZ,OAAO,WAAW,CAAC,QAAQ;CAC3B,OAAO,GAAG;CACV,OAAO,WAAW,CAAC,kBAAkB;CACrC,OAAO,CAAC;CACR,MAAM;CACN,KAAK,MAAM;CACX,KAAK,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;CACrC,KAAK;AACL;CACA,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;CAC1D,IAAI,CAAC,CAAC;AACN;CACA,GAAG,IAAI,WAAW,CAAC,KAAK,EAAE;CAC1B,IAAI,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;CACxC,IAAI;AACJ;CACA,GAAG,IAAI,MAAM,CAAC,UAAU,IAAI,WAAW,KAAK,CAAC,CAAC,EAAE;CAChD,IAAI,IAAI,mBAAmB,KAAK,SAAS,EAAE;CAC3C,KAAK,mBAAmB,GAAG,EAAE,CAAC;CAC9B,KAAK;CACL,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;CAC1C,IAAI;CACJ,GAAG,CAAC,CAAC;AACL;CACA,EAAE,OAAO;CACT,GAAG,IAAI,EAAE,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,SAAS;CACrE,GAAG,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK;CAC/C,IAAI,OAAO,OAAO,CAAC,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;CAC3F,IAAI,CAAC;CACL,GAAG,cAAc,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK;CACtD,IAAI,OAAO,OAAO,CAAC,cAAc,GAAG,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;CAC1D,IAAI,CAAC;CACL,GAAG,KAAK;CACR,GAAG,QAAQ,EAAE,QAAQ,CAAC,GAAG;CACzB,GAAG,mBAAmB;CACtB,GAAG,CAAC;CACJ,EAAE;AACF;CACA,CAAC,WAAW,CAAC,OAAO,EAAE;CACtB,EAAE,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;CACzD,EAAE;AACF;CACA,CAAC,eAAe,GAAG;CACnB,EAAE,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAChC;CACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;CACnC,GAAG,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC;AAC1D;CACA,GAAG,IAAI,SAAS,KAAK,IAAI,EAAE,OAAO;AAClC;CACA,GAAG,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;CACzE,GAAG,kBAAkB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;CACtC,GAAG,CAAC,CAAC;AACL;CACA,EAAE;CACF,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;CAClD,IAAI,OAAO,kBAAkB,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;CACzD,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI;CAChB,IAAI;CACJ,EAAE;AACF;CACA,CAAC,MAAM,CAAC,SAAS,EAAE;CACnB,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;CACzB,GAAG,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;CACtC,GAAG;AACH;CACA,EAAE,IAAI,SAAS,KAAK,EAAE,EAAE,OAAO,IAAI,CAAC;AACpC;CACA,EAAE,IAAI,eAAe,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AACrE;CACA,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK;CACtC,GAAG,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,KAAK,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;CACxF,GAAG,MAAM,WAAW,GAAG,eAAe,KAAK,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;AAC9E;CACA,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE;CACpC,IAAI,OAAO,EAAE,MAAM,CAAC,qBAAqB;CACzC,IAAI,WAAW;CACf,IAAI,CAAC,CAAC;AACN;CACA,GAAG,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC;CACxD,GAAG,CAAC,CAAC;AACL;CACA,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;CAClB,GAAG,IAAI,CAAC,KAAK;CACb,IAAI,SAAS;CACb,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK;CACrD,KAAK,OAAO,KAAK,GAAG,CAAC,GAAG,SAAS,GAAG,KAAK,GAAG,KAAK,CAAC;CAClD,KAAK,CAAC,CAAC;CACP,GAAG;AACH;CACA,EAAE,OAAO,IAAI,CAAC;CACd,EAAE;AACF;CACA,CAAC,OAAO,CAAC,GAAG,EAAE;CACd,EAAE,IAAI,CAAC,KAAK,GAAG,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC;CAChC,EAAE,OAAO,IAAI,CAAC;CACd,EAAE;AACF;CACA,CAAC,QAAQ,GAAG;CACZ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO;CAC3B,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK;CACvB,IAAI,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,KAAK,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;CACzF,IAAI,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,GAAG,EAAE,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;AACrE;CACA,IAAI,OAAO,GAAG,CAAC;CACf,IAAI,CAAC;CACL,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC;AACb;CACA,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;CAC3B,EAAE;AACF;CACA,CAAC,OAAO,GAAG;CACX,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,OAAO,KAAK,CAAC;CAC3D,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,KAAK,CAAC;CAC7E,EAAE,OAAO,IAAI,CAAC;CACd,EAAE;AACF;CACA,CAAC,MAAM,GAAG;CACV,EAAE,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM;CAC5B,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE;CACvD,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM;CACpB,GAAG,CAAC;CACJ,EAAE;AACF;CACA,CAAC,SAAS,GAAG;CACb,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;CAC/B,EAAE;AACF;CACA,CAAC,IAAI,CAAC,QAAQ,EAAE;CAChB,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;CACpD,EAAE;AACF;CACA,CAAC,SAAS,CAAC,QAAQ,EAAE;CACrB,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,IAAI,QAAQ,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC;CACzD,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1C;CACA,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;CACnB,GAAG,IAAI,MAAM,CAAC;CACd,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;AACb;CACA,GAAG,GAAG;CACN,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;CAC/B,IAAI,IAAI,CAAC,MAAM,EAAE;CACjB,KAAK,MAAM;CACX,KAAK;CACL,IAAI,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE;CACxD,GAAG;AACH;CACA,EAAE,OAAO,IAAI,CAAC;CACd,EAAE;AACF;CACA,CAAC,OAAO,CAAC,QAAQ,EAAE;CACnB,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,QAAQ,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC;AACpD;CACA,EAAE,IAAI,MAAM,CAAC;CACb,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;AAClC;CACA,EAAE,GAAG;CACL,GAAG,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;CAC9B,GAAG,IAAI,CAAC,MAAM,EAAE;CAChB,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;CAC5C,IAAI,MAAM;CACV,IAAI;CACJ,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;AACrD;CACA,EAAE,OAAO,IAAI,CAAC;CACd,EAAE;CACF;;CCpSA,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC;CAC5B,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC;CAClC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC;;;;;;;;","x_google_ignoreList":[2]} \ No newline at end of file diff --git a/vuetest/node_modules/magic-string/package.json b/vuetest/node_modules/magic-string/package.json new file mode 100644 index 0000000..3296eb3 --- /dev/null +++ b/vuetest/node_modules/magic-string/package.json @@ -0,0 +1,63 @@ +{ + "name": "magic-string", + "version": "0.30.17", + "description": "Modify strings, generate sourcemaps", + "keywords": [ + "string", + "string manipulation", + "sourcemap", + "templating", + "transpilation" + ], + "repository": "https://github.com/rich-harris/magic-string", + "license": "MIT", + "author": "Rich Harris", + "main": "./dist/magic-string.cjs.js", + "module": "./dist/magic-string.es.mjs", + "sideEffects": false, + "jsnext:main": "./dist/magic-string.es.mjs", + "types": "./dist/magic-string.cjs.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": "./dist/magic-string.es.mjs", + "require": "./dist/magic-string.cjs.js" + } + }, + "files": [ + "dist/*", + "index.d.ts", + "README.md" + ], + "devDependencies": { + "@eslint/js": "^9.16.0", + "@rollup/plugin-node-resolve": "^15.3.0", + "@rollup/plugin-replace": "^5.0.7", + "benchmark": "^2.1.4", + "bumpp": "^9.9.1", + "conventional-changelog-cli": "^3.0.0", + "eslint": "^9.16.0", + "prettier": "^3.4.2", + "publint": "^0.2.12", + "rollup": "^3.29.5", + "source-map-js": "^1.2.1", + "source-map-support": "^0.5.21", + "vitest": "^2.1.8" + }, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + }, + "scripts": { + "build": "rollup -c", + "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", + "format": "prettier --single-quote --print-width 100 --use-tabs --write .", + "lint": "eslint src test && publint", + "lint:fix": "eslint src test --fix", + "release": "bumpp -x \"npm run changelog\" --all --commit --tag --push && npm publish", + "pretest": "npm run build", + "test": "vitest run", + "test:dev": "vitest", + "bench": "npm run build && node benchmark/index.mjs", + "watch": "rollup -cw" + } +} \ No newline at end of file diff --git a/vuetest/node_modules/nanoid/.devcontainer.json b/vuetest/node_modules/nanoid/.devcontainer.json new file mode 100644 index 0000000..7fd5ba1 --- /dev/null +++ b/vuetest/node_modules/nanoid/.devcontainer.json @@ -0,0 +1,23 @@ +{ + "image": "localhost/ai-opensource:latest", + "forwardPorts": [], + "mounts": [ + { + "source": "pnpm-store", + "target": "/home/ai/.local/share/pnpm/store", + "type": "volume" + }, + { + "source": "shell-history", + "target": "/home/ai/.local/share/history/", + "type": "volume" + } + ], + "workspaceMount": "", + "runArgs": [ + "--userns=keep-id:uid=1000,gid=1000", + "--volume=${localWorkspaceFolder}:/workspaces/${localWorkspaceFolderBasename}:Z", + "--network=host", + "--ulimit=host" + ] +} diff --git a/vuetest/node_modules/nanoid/LICENSE b/vuetest/node_modules/nanoid/LICENSE new file mode 100644 index 0000000..37f56aa --- /dev/null +++ b/vuetest/node_modules/nanoid/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright 2017 Andrey Sitnik <andrey@sitnik.ru> + +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. diff --git a/vuetest/node_modules/nanoid/README.md b/vuetest/node_modules/nanoid/README.md new file mode 100644 index 0000000..f4c8c13 --- /dev/null +++ b/vuetest/node_modules/nanoid/README.md @@ -0,0 +1,554 @@ +# Nano ID + +<img src="https://ai.github.io/nanoid/logo.svg" align="right" + alt="Nano ID logo by Anton Lovchikov" width="180" height="94"> + +**English** | [Русский](./README.ru.md) | [简体中文](./README.zh-CN.md) | [Bahasa Indonesia](./README.id-ID.md) + +A tiny, secure, URL-friendly, unique string ID generator for JavaScript. + +> “An amazing level of senseless perfectionism, +> which is simply impossible not to respect.” + +* **Small.** 130 bytes (minified and gzipped). No dependencies. + [Size Limit] controls the size. +* **Fast.** It is 2 times faster than UUID. +* **Safe.** It uses hardware random generator. Can be used in clusters. +* **Short IDs.** It uses a larger alphabet than UUID (`A-Za-z0-9_-`). + So ID size was reduced from 36 to 21 symbols. +* **Portable.** Nano ID was ported + to [20 programming languages](#other-programming-languages). + +```js +import { nanoid } from 'nanoid' +model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT" +``` + +Supports modern browsers, IE [with Babel], Node.js and React Native. + +[online tool]: https://gitpod.io/#https://github.com/ai/nanoid/ +[with Babel]: https://developer.epages.com/blog/coding/how-to-transpile-node-modules-with-babel-and-webpack-in-a-monorepo/ +[Size Limit]: https://github.com/ai/size-limit + +<a href="https://evilmartians.com/?utm_source=nanoid"> + <img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" + alt="Sponsored by Evil Martians" width="236" height="54"> +</a> + +## Table of Contents + +* [Comparison with UUID](#comparison-with-uuid) +* [Benchmark](#benchmark) +* [Security](#security) +* [API](#api) + * [Blocking](#blocking) + * [Async](#async) + * [Non-Secure](#non-secure) + * [Custom Alphabet or Size](#custom-alphabet-or-size) + * [Custom Random Bytes Generator](#custom-random-bytes-generator) +* [Usage](#usage) + * [IE](#ie) + * [React](#react) + * [React Native](#react-native) + * [Rollup](#rollup) + * [PouchDB and CouchDB](#pouchdb-and-couchdb) + * [Mongoose](#mongoose) + * [Web Workers](#web-workers) + * [CLI](#cli) + * [Other Programming Languages](#other-programming-languages) +* [Tools](#tools) + + +## Comparison with UUID + +Nano ID is quite comparable to UUID v4 (random-based). +It has a similar number of random bits in the ID +(126 in Nano ID and 122 in UUID), so it has a similar collision probability: + +> For there to be a one in a billion chance of duplication, +> 103 trillion version 4 IDs must be generated. + +There are three main differences between Nano ID and UUID v4: + +1. Nano ID uses a bigger alphabet, so a similar number of random bits + are packed in just 21 symbols instead of 36. +2. Nano ID code is **4 times less** than `uuid/v4` package: + 130 bytes instead of 483. +3. Because of memory allocation tricks, Nano ID is **2 times** faster than UUID. + + +## Benchmark + +```rust +$ node ./test/benchmark.js +crypto.randomUUID 25,603,857 ops/sec +@napi-rs/uuid 9,973,819 ops/sec +uid/secure 8,234,798 ops/sec +@lukeed/uuid 7,464,706 ops/sec +nanoid 5,616,592 ops/sec +customAlphabet 3,115,207 ops/sec +uuid v4 1,535,753 ops/sec +secure-random-string 388,226 ops/sec +uid-safe.sync 363,489 ops/sec +cuid 187,343 ops/sec +shortid 45,758 ops/sec + +Async: +nanoid/async 96,094 ops/sec +async customAlphabet 97,184 ops/sec +async secure-random-string 92,794 ops/sec +uid-safe 90,684 ops/sec + +Non-secure: +uid 67,376,692 ops/sec +nanoid/non-secure 2,849,639 ops/sec +rndm 2,674,806 ops/sec +``` + +Test configuration: ThinkPad X1 Carbon Gen 9, Fedora 34, Node.js 16.10. + + +## Security + +*See a good article about random generators theory: +[Secure random values (in Node.js)]* + +* **Unpredictability.** Instead of using the unsafe `Math.random()`, Nano ID + uses the `crypto` module in Node.js and the Web Crypto API in browsers. + These modules use unpredictable hardware random generator. +* **Uniformity.** `random % alphabet` is a popular mistake to make when coding + an ID generator. The distribution will not be even; there will be a lower + chance for some symbols to appear compared to others. So, it will reduce + the number of tries when brute-forcing. Nano ID uses a [better algorithm] + and is tested for uniformity. + + <img src="img/distribution.png" alt="Nano ID uniformity" + width="340" height="135"> + +* **Well-documented:** all Nano ID hacks are documented. See comments + in [the source]. +* **Vulnerabilities:** to report a security vulnerability, please use + the [Tidelift security contact](https://tidelift.com/security). + Tidelift will coordinate the fix and disclosure. + +[Secure random values (in Node.js)]: https://gist.github.com/joepie91/7105003c3b26e65efcea63f3db82dfba +[better algorithm]: https://github.com/ai/nanoid/blob/main/index.js +[the source]: https://github.com/ai/nanoid/blob/main/index.js + + +## Install + +```bash +npm install --save nanoid +``` + +For quick hacks, you can load Nano ID from CDN. Though, it is not recommended +to be used in production because of the lower loading performance. + +```js +import { nanoid } from 'https://cdn.jsdelivr.net/npm/nanoid/nanoid.js' +``` + +Nano ID provides ES modules. You do not need to do anything to use Nano ID +as ESM in webpack, Rollup, Parcel, or Node.js. + +```js +import { nanoid } from 'nanoid' +``` + +In Node.js you can use CommonJS import: + +```js +const { nanoid } = require('nanoid') +``` + + +## API + +Nano ID has 3 APIs: normal (blocking), asynchronous, and non-secure. + +By default, Nano ID uses URL-friendly symbols (`A-Za-z0-9_-`) and returns an ID +with 21 characters (to have a collision probability similar to UUID v4). + + +### Blocking + +The safe and easiest way to use Nano ID. + +In rare cases could block CPU from other work while noise collection +for hardware random generator. + +```js +import { nanoid } from 'nanoid' +model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT" +``` + +If you want to reduce the ID size (and increase collisions probability), +you can pass the size as an argument. + +```js +nanoid(10) //=> "IRFa-VaY2b" +``` + +Don’t forget to check the safety of your ID size +in our [ID collision probability] calculator. + +You can also use a [custom alphabet](#custom-alphabet-or-size) +or a [random generator](#custom-random-bytes-generator). + +[ID collision probability]: https://zelark.github.io/nano-id-cc/ + + +### Async + +To generate hardware random bytes, CPU collects electromagnetic noise. +For most cases, entropy will be already collected. + +In the synchronous API during the noise collection, the CPU is busy and +cannot do anything useful (for instance, process another HTTP request). + +Using the asynchronous API of Nano ID, another code can run during +the entropy collection. + +```js +import { nanoid } from 'nanoid/async' + +async function createUser () { + user.id = await nanoid() +} +``` + +Read more about entropy collection in [`crypto.randomBytes`] docs. + +Unfortunately, you will lose Web Crypto API advantages in a browser +if you use the asynchronous API. So, currently, in the browser, you are limited +with either security (`nanoid`), asynchronous behavior (`nanoid/async`), +or non-secure behavior (`nanoid/non-secure`) that will be explained +in the next part of the documentation. + +[`crypto.randomBytes`]: https://nodejs.org/api/crypto.html#crypto_crypto_randombytes_size_callback + + +### Non-Secure + +By default, Nano ID uses hardware random bytes generation for security +and low collision probability. If you are not so concerned with security, +you can use the faster non-secure generator. + +```js +import { nanoid } from 'nanoid/non-secure' +const id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqLJ" +``` + + +### Custom Alphabet or Size + +`customAlphabet` allows you to create `nanoid` with your own alphabet +and ID size. + +```js +import { customAlphabet } from 'nanoid' +const nanoid = customAlphabet('1234567890abcdef', 10) +model.id = nanoid() //=> "4f90d13a42" +``` + +```js +import { customAlphabet } from 'nanoid/async' +const nanoid = customAlphabet('1234567890abcdef', 10) +async function createUser () { + user.id = await nanoid() +} +``` + +```js +import { customAlphabet } from 'nanoid/non-secure' +const nanoid = customAlphabet('1234567890abcdef', 10) +user.id = nanoid() +``` + +Check the safety of your custom alphabet and ID size in our +[ID collision probability] calculator. For more alphabets, check out the options +in [`nanoid-dictionary`]. + +Alphabet must contain 256 symbols or less. +Otherwise, the security of the internal generator algorithm is not guaranteed. + +In addition to setting a default size, you can change the ID size when calling +the function: + +```js +import { customAlphabet } from 'nanoid' +const nanoid = customAlphabet('1234567890abcdef', 10) +model.id = nanoid(5) //=> "f01a2" +``` + +[ID collision probability]: https://alex7kom.github.io/nano-nanoid-cc/ +[`nanoid-dictionary`]: https://github.com/CyberAP/nanoid-dictionary + + +### Custom Random Bytes Generator + +`customRandom` allows you to create a `nanoid` and replace alphabet +and the default random bytes generator. + +In this example, a seed-based generator is used: + +```js +import { customRandom } from 'nanoid' + +const rng = seedrandom(seed) +const nanoid = customRandom('abcdef', 10, size => { + return (new Uint8Array(size)).map(() => 256 * rng()) +}) + +nanoid() //=> "fbaefaadeb" +``` + +`random` callback must accept the array size and return an array +with random numbers. + +If you want to use the same URL-friendly symbols with `customRandom`, +you can get the default alphabet using the `urlAlphabet`. + +```js +const { customRandom, urlAlphabet } = require('nanoid') +const nanoid = customRandom(urlAlphabet, 10, random) +``` + +Asynchronous and non-secure APIs are not available for `customRandom`. + +Note, that between Nano ID versions we may change random generator +call sequence. If you are using seed-based generators, we do not guarantee +the same result. + + +## Usage + +### IE + +If you support IE, you need to [transpile `node_modules`] by Babel +and add `crypto` alias. Moreover, `UInt8Array` in IE actually +is not an array and to cope with it, you have to convert it to an array +manually: + +```js +// polyfills.js +if (!window.crypto && window.msCrypto) { + window.crypto = window.msCrypto + + const getRandomValuesDef = window.crypto.getRandomValues + + window.crypto.getRandomValues = function (array) { + const values = getRandomValuesDef.call(window.crypto, array) + const result = [] + + for (let i = 0; i < array.length; i++) { + result[i] = values[i]; + } + + return result + }; +} +``` + +```js +import './polyfills.js' +import { nanoid } from 'nanoid' +``` + +[transpile `node_modules`]: https://developer.epages.com/blog/coding/how-to-transpile-node-modules-with-babel-and-webpack-in-a-monorepo/ + + +### React + +There’s no correct way to use Nano ID for React `key` prop +since it should be consistent among renders. + +```jsx +function Todos({todos}) { + return ( + <ul> + {todos.map(todo => ( + <li key={nanoid()}> /* DON’T DO IT */ + {todo.text} + </li> + ))} + </ul> + ) +} +``` + +You should rather try to reach for stable ID inside your list item. + +```jsx +const todoItems = todos.map((todo) => + <li key={todo.id}> + {todo.text} + </li> +) +``` + +In case you don’t have stable IDs you'd rather use index as `key` +instead of `nanoid()`: + +```jsx +const todoItems = todos.map((text, index) => + <li key={index}> /* Still not recommended but preferred over nanoid(). + Only do this if items have no stable IDs. */ + {text} + </li> +) +``` + + +### React Native + +React Native does not have built-in random generator. The following polyfill +works for plain React Native and Expo starting with `39.x`. + +1. Check [`react-native-get-random-values`] docs and install it. +2. Import it before Nano ID. + +```js +import 'react-native-get-random-values' +import { nanoid } from 'nanoid' +``` + +[`react-native-get-random-values`]: https://github.com/LinusU/react-native-get-random-values + + +### Rollup + +For Rollup you will need [`@rollup/plugin-node-resolve`] to bundle browser version +of this library.: + +```js + plugins: [ + nodeResolve({ + browser: true + }) + ] +``` + +[`@rollup/plugin-node-resolve`]: https://github.com/rollup/plugins/tree/master/packages/node-resolve + + +### PouchDB and CouchDB + +In PouchDB and CouchDB, IDs can’t start with an underscore `_`. +A prefix is required to prevent this issue, as Nano ID might use a `_` +at the start of the ID by default. + +Override the default ID with the following option: + +```js +db.put({ + _id: 'id' + nanoid(), + … +}) +``` + + +### Mongoose + +```js +const mySchema = new Schema({ + _id: { + type: String, + default: () => nanoid() + } +}) +``` + + +### Web Workers + +Web Workers do not have access to a secure random generator. + +Security is important in IDs when IDs should be unpredictable. +For instance, in "access by URL" link generation. +If you do not need unpredictable IDs, but you need to use Web Workers, +you can use the non‑secure ID generator. + +```js +import { nanoid } from 'nanoid/non-secure' +nanoid() //=> "Uakgb_J5m9g-0JDMbcJqLJ" +``` + +Note: non-secure IDs are more prone to collision attacks. + + +### CLI + +You can get unique ID in terminal by calling `npx nanoid`. You need only +Node.js in the system. You do not need Nano ID to be installed anywhere. + +```sh +$ npx nanoid +npx: installed 1 in 0.63s +LZfXLFzPPR4NNrgjlWDxn +``` + +Size of generated ID can be specified with `--size` (or `-s`) option: + +```sh +$ npx nanoid --size 10 +L3til0JS4z +``` + +Custom alphabet can be specified with `--alphabet` (or `-a`) option +(note that in this case `--size` is required): + +```sh +$ npx nanoid --alphabet abc --size 15 +bccbcabaabaccab +``` + +### Other Programming Languages + +Nano ID was ported to many languages. You can use these ports to have +the same ID generator on the client and server side. + +* [C#](https://github.com/codeyu/nanoid-net) +* [C++](https://github.com/mcmikecreations/nanoid_cpp) +* [Clojure and ClojureScript](https://github.com/zelark/nano-id) +* [ColdFusion/CFML](https://github.com/JamoCA/cfml-nanoid) +* [Crystal](https://github.com/mamantoha/nanoid.cr) +* [Dart & Flutter](https://github.com/pd4d10/nanoid-dart) +* [Deno](https://github.com/ianfabs/nanoid) +* [Go](https://github.com/matoous/go-nanoid) +* [Elixir](https://github.com/railsmechanic/nanoid) +* [Haskell](https://github.com/MichelBoucey/NanoID) +* [Janet](https://sr.ht/~statianzo/janet-nanoid/) +* [Java](https://github.com/aventrix/jnanoid) +* [Nim](https://github.com/icyphox/nanoid.nim) +* [OCaml](https://github.com/routineco/ocaml-nanoid) +* [Perl](https://github.com/tkzwtks/Nanoid-perl) +* [PHP](https://github.com/hidehalo/nanoid-php) +* [Python](https://github.com/puyuan/py-nanoid) + with [dictionaries](https://pypi.org/project/nanoid-dictionary) +* [Postgres Extension](https://github.com/spa5k/uids-postgres) +* [R](https://github.com/hrbrmstr/nanoid) (with dictionaries) +* [Ruby](https://github.com/radeno/nanoid.rb) +* [Rust](https://github.com/nikolay-govorov/nanoid) +* [Swift](https://github.com/antiflasher/NanoID) +* [Unison](https://share.unison-lang.org/latest/namespaces/hojberg/nanoid) +* [V](https://github.com/invipal/nanoid) +* [Zig](https://github.com/SasLuca/zig-nanoid) + +For other environments, [CLI] is available to generate IDs from a command line. + +[CLI]: #cli + + +## Tools + +* [ID size calculator] shows collision probability when adjusting + the ID alphabet or size. +* [`nanoid-dictionary`] with popular alphabets to use with [`customAlphabet`]. +* [`nanoid-good`] to be sure that your ID doesn’t contain any obscene words. + +[`nanoid-dictionary`]: https://github.com/CyberAP/nanoid-dictionary +[ID size calculator]: https://zelark.github.io/nano-id-cc/ +[`customAlphabet`]: #custom-alphabet-or-size +[`nanoid-good`]: https://github.com/y-gagar1n/nanoid-good diff --git a/vuetest/node_modules/nanoid/async/index.browser.cjs b/vuetest/node_modules/nanoid/async/index.browser.cjs new file mode 100644 index 0000000..80d1871 --- /dev/null +++ b/vuetest/node_modules/nanoid/async/index.browser.cjs @@ -0,0 +1,69 @@ +let random = async bytes => crypto.getRandomValues(new Uint8Array(bytes)) + +let customAlphabet = (alphabet, defaultSize = 21) => { + // First, a bitmask is necessary to generate the ID. The bitmask makes bytes + // values closer to the alphabet size. The bitmask calculates the closest + // `2^31 - 1` number, which exceeds the alphabet size. + // For example, the bitmask for the alphabet size 30 is 31 (00011111). + // `Math.clz32` is not used, because it is not available in browsers. + let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 + // Though, the bitmask solution is not perfect since the bytes exceeding + // the alphabet size are refused. Therefore, to reliably generate the ID, + // the random bytes redundancy has to be satisfied. + + // Note: every hardware random generator call is performance expensive, + // because the system call for entropy collection takes a lot of time. + // So, to avoid additional system calls, extra bytes are requested in advance. + + // Next, a step determines how many random bytes to generate. + // The number of random bytes gets decided upon the ID size, mask, + // alphabet size, and magic number 1.6 (using 1.6 peaks at performance + // according to benchmarks). + + // `-~f => Math.ceil(f)` if f is a float + // `-~i => i + 1` if i is an integer + let step = -~((1.6 * mask * defaultSize) / alphabet.length) + + return async (size = defaultSize) => { + let id = '' + while (true) { + let bytes = crypto.getRandomValues(new Uint8Array(step)) + // A compact alternative for `for (var i = 0; i < step; i++)`. + let i = step | 0 + while (i--) { + // Adding `|| ''` refuses a random byte that exceeds the alphabet size. + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + } + } +} + +let nanoid = async (size = 21) => { + let id = '' + let bytes = crypto.getRandomValues(new Uint8Array((size |= 0))) + + // A compact alternative for `for (var i = 0; i < step; i++)`. + while (size--) { + // It is incorrect to use bytes exceeding the alphabet size. + // The following mask reduces the random byte in the 0-255 value + // range to the 0-63 value range. Therefore, adding hacks, such + // as empty string fallback or magic numbers, is unneccessary because + // the bitmask trims bytes down to the alphabet size. + let byte = bytes[size] & 63 + if (byte < 36) { + // `0-9a-z` + id += byte.toString(36) + } else if (byte < 62) { + // `A-Z` + id += (byte - 26).toString(36).toUpperCase() + } else if (byte < 63) { + id += '_' + } else { + id += '-' + } + } + return id +} + +module.exports = { nanoid, customAlphabet, random } diff --git a/vuetest/node_modules/nanoid/async/index.browser.js b/vuetest/node_modules/nanoid/async/index.browser.js new file mode 100644 index 0000000..aeffb3f --- /dev/null +++ b/vuetest/node_modules/nanoid/async/index.browser.js @@ -0,0 +1,69 @@ +let random = async bytes => crypto.getRandomValues(new Uint8Array(bytes)) + +let customAlphabet = (alphabet, defaultSize = 21) => { + // First, a bitmask is necessary to generate the ID. The bitmask makes bytes + // values closer to the alphabet size. The bitmask calculates the closest + // `2^31 - 1` number, which exceeds the alphabet size. + // For example, the bitmask for the alphabet size 30 is 31 (00011111). + // `Math.clz32` is not used, because it is not available in browsers. + let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 + // Though, the bitmask solution is not perfect since the bytes exceeding + // the alphabet size are refused. Therefore, to reliably generate the ID, + // the random bytes redundancy has to be satisfied. + + // Note: every hardware random generator call is performance expensive, + // because the system call for entropy collection takes a lot of time. + // So, to avoid additional system calls, extra bytes are requested in advance. + + // Next, a step determines how many random bytes to generate. + // The number of random bytes gets decided upon the ID size, mask, + // alphabet size, and magic number 1.6 (using 1.6 peaks at performance + // according to benchmarks). + + // `-~f => Math.ceil(f)` if f is a float + // `-~i => i + 1` if i is an integer + let step = -~((1.6 * mask * defaultSize) / alphabet.length) + + return async (size = defaultSize) => { + let id = '' + while (true) { + let bytes = crypto.getRandomValues(new Uint8Array(step)) + // A compact alternative for `for (var i = 0; i < step; i++)`. + let i = step | 0 + while (i--) { + // Adding `|| ''` refuses a random byte that exceeds the alphabet size. + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + } + } +} + +let nanoid = async (size = 21) => { + let id = '' + let bytes = crypto.getRandomValues(new Uint8Array((size |= 0))) + + // A compact alternative for `for (var i = 0; i < step; i++)`. + while (size--) { + // It is incorrect to use bytes exceeding the alphabet size. + // The following mask reduces the random byte in the 0-255 value + // range to the 0-63 value range. Therefore, adding hacks, such + // as empty string fallback or magic numbers, is unneccessary because + // the bitmask trims bytes down to the alphabet size. + let byte = bytes[size] & 63 + if (byte < 36) { + // `0-9a-z` + id += byte.toString(36) + } else if (byte < 62) { + // `A-Z` + id += (byte - 26).toString(36).toUpperCase() + } else if (byte < 63) { + id += '_' + } else { + id += '-' + } + } + return id +} + +export { nanoid, customAlphabet, random } diff --git a/vuetest/node_modules/nanoid/async/index.cjs b/vuetest/node_modules/nanoid/async/index.cjs new file mode 100644 index 0000000..f1b0ad0 --- /dev/null +++ b/vuetest/node_modules/nanoid/async/index.cjs @@ -0,0 +1,71 @@ +let crypto = require('crypto') + +let { urlAlphabet } = require('../url-alphabet/index.cjs') + +// `crypto.randomFill()` is a little faster than `crypto.randomBytes()`, +// because it is possible to use in combination with `Buffer.allocUnsafe()`. +let random = bytes => + new Promise((resolve, reject) => { + // `Buffer.allocUnsafe()` is faster because it doesn’t flush the memory. + // Memory flushing is unnecessary since the buffer allocation itself resets + // the memory with the new bytes. + crypto.randomFill(Buffer.allocUnsafe(bytes), (err, buf) => { + if (err) { + reject(err) + } else { + resolve(buf) + } + }) + }) + +let customAlphabet = (alphabet, defaultSize = 21) => { + // First, a bitmask is necessary to generate the ID. The bitmask makes bytes + // values closer to the alphabet size. The bitmask calculates the closest + // `2^31 - 1` number, which exceeds the alphabet size. + // For example, the bitmask for the alphabet size 30 is 31 (00011111). + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + // Though, the bitmask solution is not perfect since the bytes exceeding + // the alphabet size are refused. Therefore, to reliably generate the ID, + // the random bytes redundancy has to be satisfied. + + // Note: every hardware random generator call is performance expensive, + // because the system call for entropy collection takes a lot of time. + // So, to avoid additional system calls, extra bytes are requested in advance. + + // Next, a step determines how many random bytes to generate. + // The number of random bytes gets decided upon the ID size, mask, + // alphabet size, and magic number 1.6 (using 1.6 peaks at performance + // according to benchmarks). + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + + let tick = (id, size = defaultSize) => + random(step).then(bytes => { + // A compact alternative for `for (var i = 0; i < step; i++)`. + let i = step + while (i--) { + // Adding `|| ''` refuses a random byte that exceeds the alphabet size. + id += alphabet[bytes[i] & mask] || '' + if (id.length >= size) return id + } + return tick(id, size) + }) + + return size => tick('', size) +} + +let nanoid = (size = 21) => + random((size |= 0)).then(bytes => { + let id = '' + // A compact alternative for `for (var i = 0; i < step; i++)`. + while (size--) { + // It is incorrect to use bytes exceeding the alphabet size. + // The following mask reduces the random byte in the 0-255 value + // range to the 0-63 value range. Therefore, adding hacks, such + // as empty string fallback or magic numbers, is unneccessary because + // the bitmask trims bytes down to the alphabet size. + id += urlAlphabet[bytes[size] & 63] + } + return id + }) + +module.exports = { nanoid, customAlphabet, random } diff --git a/vuetest/node_modules/nanoid/async/index.d.ts b/vuetest/node_modules/nanoid/async/index.d.ts new file mode 100644 index 0000000..9e91965 --- /dev/null +++ b/vuetest/node_modules/nanoid/async/index.d.ts @@ -0,0 +1,56 @@ +/** + * Generate secure URL-friendly unique ID. The non-blocking version. + * + * By default, the ID will have 21 symbols to have a collision probability + * similar to UUID v4. + * + * ```js + * import { nanoid } from 'nanoid/async' + * nanoid().then(id => { + * model.id = id + * }) + * ``` + * + * @param size Size of the ID. The default size is 21. + * @returns A promise with a random string. + */ +export function nanoid(size?: number): Promise<string> + +/** + * A low-level function. + * Generate secure unique ID with custom alphabet. The non-blocking version. + * + * Alphabet must contain 256 symbols or less. Otherwise, the generator + * will not be secure. + * + * @param alphabet Alphabet used to generate the ID. + * @param defaultSize Size of the ID. The default size is 21. + * @returns A function that returns a promise with a random string. + * + * ```js + * import { customAlphabet } from 'nanoid/async' + * const nanoid = customAlphabet('0123456789абвгдеё', 5) + * nanoid().then(id => { + * model.id = id //=> "8ё56а" + * }) + * ``` + */ +export function customAlphabet( + alphabet: string, + defaultSize?: number +): (size?: number) => Promise<string> + +/** + * Generate an array of random bytes collected from hardware noise. + * + * ```js + * import { random } from 'nanoid/async' + * random(5).then(bytes => { + * bytes //=> [10, 67, 212, 67, 89] + * }) + * ``` + * + * @param bytes Size of the array. + * @returns A promise with a random bytes array. + */ +export function random(bytes: number): Promise<Uint8Array> diff --git a/vuetest/node_modules/nanoid/async/index.js b/vuetest/node_modules/nanoid/async/index.js new file mode 100644 index 0000000..7f2eae9 --- /dev/null +++ b/vuetest/node_modules/nanoid/async/index.js @@ -0,0 +1,71 @@ +import crypto from 'crypto' + +import { urlAlphabet } from '../url-alphabet/index.js' + +// `crypto.randomFill()` is a little faster than `crypto.randomBytes()`, +// because it is possible to use in combination with `Buffer.allocUnsafe()`. +let random = bytes => + new Promise((resolve, reject) => { + // `Buffer.allocUnsafe()` is faster because it doesn’t flush the memory. + // Memory flushing is unnecessary since the buffer allocation itself resets + // the memory with the new bytes. + crypto.randomFill(Buffer.allocUnsafe(bytes), (err, buf) => { + if (err) { + reject(err) + } else { + resolve(buf) + } + }) + }) + +let customAlphabet = (alphabet, defaultSize = 21) => { + // First, a bitmask is necessary to generate the ID. The bitmask makes bytes + // values closer to the alphabet size. The bitmask calculates the closest + // `2^31 - 1` number, which exceeds the alphabet size. + // For example, the bitmask for the alphabet size 30 is 31 (00011111). + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + // Though, the bitmask solution is not perfect since the bytes exceeding + // the alphabet size are refused. Therefore, to reliably generate the ID, + // the random bytes redundancy has to be satisfied. + + // Note: every hardware random generator call is performance expensive, + // because the system call for entropy collection takes a lot of time. + // So, to avoid additional system calls, extra bytes are requested in advance. + + // Next, a step determines how many random bytes to generate. + // The number of random bytes gets decided upon the ID size, mask, + // alphabet size, and magic number 1.6 (using 1.6 peaks at performance + // according to benchmarks). + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + + let tick = (id, size = defaultSize) => + random(step).then(bytes => { + // A compact alternative for `for (var i = 0; i < step; i++)`. + let i = step + while (i--) { + // Adding `|| ''` refuses a random byte that exceeds the alphabet size. + id += alphabet[bytes[i] & mask] || '' + if (id.length >= size) return id + } + return tick(id, size) + }) + + return size => tick('', size) +} + +let nanoid = (size = 21) => + random((size |= 0)).then(bytes => { + let id = '' + // A compact alternative for `for (var i = 0; i < step; i++)`. + while (size--) { + // It is incorrect to use bytes exceeding the alphabet size. + // The following mask reduces the random byte in the 0-255 value + // range to the 0-63 value range. Therefore, adding hacks, such + // as empty string fallback or magic numbers, is unneccessary because + // the bitmask trims bytes down to the alphabet size. + id += urlAlphabet[bytes[size] & 63] + } + return id + }) + +export { nanoid, customAlphabet, random } diff --git a/vuetest/node_modules/nanoid/async/index.native.js b/vuetest/node_modules/nanoid/async/index.native.js new file mode 100644 index 0000000..a765de9 --- /dev/null +++ b/vuetest/node_modules/nanoid/async/index.native.js @@ -0,0 +1,57 @@ +import { getRandomBytesAsync } from 'expo-random' + +import { urlAlphabet } from '../url-alphabet/index.js' + +let random = getRandomBytesAsync + +let customAlphabet = (alphabet, defaultSize = 21) => { + // First, a bitmask is necessary to generate the ID. The bitmask makes bytes + // values closer to the alphabet size. The bitmask calculates the closest + // `2^31 - 1` number, which exceeds the alphabet size. + // For example, the bitmask for the alphabet size 30 is 31 (00011111). + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + // Though, the bitmask solution is not perfect since the bytes exceeding + // the alphabet size are refused. Therefore, to reliably generate the ID, + // the random bytes redundancy has to be satisfied. + + // Note: every hardware random generator call is performance expensive, + // because the system call for entropy collection takes a lot of time. + // So, to avoid additional system calls, extra bytes are requested in advance. + + // Next, a step determines how many random bytes to generate. + // The number of random bytes gets decided upon the ID size, mask, + // alphabet size, and magic number 1.6 (using 1.6 peaks at performance + // according to benchmarks). + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + + let tick = (id, size = defaultSize) => + random(step).then(bytes => { + // A compact alternative for `for (var i = 0; i < step; i++)`. + let i = step + while (i--) { + // Adding `|| ''` refuses a random byte that exceeds the alphabet size. + id += alphabet[bytes[i] & mask] || '' + if (id.length >= size) return id + } + return tick(id, size) + }) + + return size => tick('', size) +} + +let nanoid = (size = 21) => + random((size |= 0)).then(bytes => { + let id = '' + // A compact alternative for `for (var i = 0; i < step; i++)`. + while (size--) { + // It is incorrect to use bytes exceeding the alphabet size. + // The following mask reduces the random byte in the 0-255 value + // range to the 0-63 value range. Therefore, adding hacks, such + // as empty string fallback or magic numbers, is unneccessary because + // the bitmask trims bytes down to the alphabet size. + id += urlAlphabet[bytes[size] & 63] + } + return id + }) + +export { nanoid, customAlphabet, random } diff --git a/vuetest/node_modules/nanoid/async/package.json b/vuetest/node_modules/nanoid/async/package.json new file mode 100644 index 0000000..578cdb4 --- /dev/null +++ b/vuetest/node_modules/nanoid/async/package.json @@ -0,0 +1,12 @@ +{ + "type": "module", + "main": "index.cjs", + "module": "index.js", + "react-native": { + "./index.js": "./index.native.js" + }, + "browser": { + "./index.js": "./index.browser.js", + "./index.cjs": "./index.browser.cjs" + } +} \ No newline at end of file diff --git a/vuetest/node_modules/nanoid/bin/nanoid.cjs b/vuetest/node_modules/nanoid/bin/nanoid.cjs new file mode 100644 index 0000000..c76db0f --- /dev/null +++ b/vuetest/node_modules/nanoid/bin/nanoid.cjs @@ -0,0 +1,55 @@ +#!/usr/bin/env node + +let { nanoid, customAlphabet } = require('..') + +function print(msg) { + process.stdout.write(msg + '\n') +} + +function error(msg) { + process.stderr.write(msg + '\n') + process.exit(1) +} + +if (process.argv.includes('--help') || process.argv.includes('-h')) { + print(` + Usage + $ nanoid [options] + + Options + -s, --size Generated ID size + -a, --alphabet Alphabet to use + -h, --help Show this help + + Examples + $ nanoid --s 15 + S9sBF77U6sDB8Yg + + $ nanoid --size 10 --alphabet abc + bcabababca`) + process.exit() +} + +let alphabet, size +for (let i = 2; i < process.argv.length; i++) { + let arg = process.argv[i] + if (arg === '--size' || arg === '-s') { + size = Number(process.argv[i + 1]) + i += 1 + if (Number.isNaN(size) || size <= 0) { + error('Size must be positive integer') + } + } else if (arg === '--alphabet' || arg === '-a') { + alphabet = process.argv[i + 1] + i += 1 + } else { + error('Unknown argument ' + arg) + } +} + +if (alphabet) { + let customNanoid = customAlphabet(alphabet, size) + print(customNanoid()) +} else { + print(nanoid(size)) +} diff --git a/vuetest/node_modules/nanoid/index.browser.cjs b/vuetest/node_modules/nanoid/index.browser.cjs new file mode 100644 index 0000000..d21a91f --- /dev/null +++ b/vuetest/node_modules/nanoid/index.browser.cjs @@ -0,0 +1,72 @@ +// This file replaces `index.js` in bundlers like webpack or Rollup, +// according to `browser` config in `package.json`. + +let { urlAlphabet } = require('./url-alphabet/index.cjs') + +let random = bytes => crypto.getRandomValues(new Uint8Array(bytes)) + +let customRandom = (alphabet, defaultSize, getRandom) => { + // First, a bitmask is necessary to generate the ID. The bitmask makes bytes + // values closer to the alphabet size. The bitmask calculates the closest + // `2^31 - 1` number, which exceeds the alphabet size. + // For example, the bitmask for the alphabet size 30 is 31 (00011111). + // `Math.clz32` is not used, because it is not available in browsers. + let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 + // Though, the bitmask solution is not perfect since the bytes exceeding + // the alphabet size are refused. Therefore, to reliably generate the ID, + // the random bytes redundancy has to be satisfied. + + // Note: every hardware random generator call is performance expensive, + // because the system call for entropy collection takes a lot of time. + // So, to avoid additional system calls, extra bytes are requested in advance. + + // Next, a step determines how many random bytes to generate. + // The number of random bytes gets decided upon the ID size, mask, + // alphabet size, and magic number 1.6 (using 1.6 peaks at performance + // according to benchmarks). + + // `-~f => Math.ceil(f)` if f is a float + // `-~i => i + 1` if i is an integer + let step = -~((1.6 * mask * defaultSize) / alphabet.length) + + return (size = defaultSize) => { + let id = '' + while (true) { + let bytes = getRandom(step) + // A compact alternative for `for (var i = 0; i < step; i++)`. + let j = step | 0 + while (j--) { + // Adding `|| ''` refuses a random byte that exceeds the alphabet size. + id += alphabet[bytes[j] & mask] || '' + if (id.length === size) return id + } + } + } +} + +let customAlphabet = (alphabet, size = 21) => + customRandom(alphabet, size, random) + +let nanoid = (size = 21) => + crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => { + // It is incorrect to use bytes exceeding the alphabet size. + // The following mask reduces the random byte in the 0-255 value + // range to the 0-63 value range. Therefore, adding hacks, such + // as empty string fallback or magic numbers, is unneccessary because + // the bitmask trims bytes down to the alphabet size. + byte &= 63 + if (byte < 36) { + // `0-9a-z` + id += byte.toString(36) + } else if (byte < 62) { + // `A-Z` + id += (byte - 26).toString(36).toUpperCase() + } else if (byte > 62) { + id += '-' + } else { + id += '_' + } + return id + }, '') + +module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/vuetest/node_modules/nanoid/index.browser.js b/vuetest/node_modules/nanoid/index.browser.js new file mode 100644 index 0000000..732e504 --- /dev/null +++ b/vuetest/node_modules/nanoid/index.browser.js @@ -0,0 +1,72 @@ +// This file replaces `index.js` in bundlers like webpack or Rollup, +// according to `browser` config in `package.json`. + +import { urlAlphabet } from './url-alphabet/index.js' + +let random = bytes => crypto.getRandomValues(new Uint8Array(bytes)) + +let customRandom = (alphabet, defaultSize, getRandom) => { + // First, a bitmask is necessary to generate the ID. The bitmask makes bytes + // values closer to the alphabet size. The bitmask calculates the closest + // `2^31 - 1` number, which exceeds the alphabet size. + // For example, the bitmask for the alphabet size 30 is 31 (00011111). + // `Math.clz32` is not used, because it is not available in browsers. + let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 + // Though, the bitmask solution is not perfect since the bytes exceeding + // the alphabet size are refused. Therefore, to reliably generate the ID, + // the random bytes redundancy has to be satisfied. + + // Note: every hardware random generator call is performance expensive, + // because the system call for entropy collection takes a lot of time. + // So, to avoid additional system calls, extra bytes are requested in advance. + + // Next, a step determines how many random bytes to generate. + // The number of random bytes gets decided upon the ID size, mask, + // alphabet size, and magic number 1.6 (using 1.6 peaks at performance + // according to benchmarks). + + // `-~f => Math.ceil(f)` if f is a float + // `-~i => i + 1` if i is an integer + let step = -~((1.6 * mask * defaultSize) / alphabet.length) + + return (size = defaultSize) => { + let id = '' + while (true) { + let bytes = getRandom(step) + // A compact alternative for `for (var i = 0; i < step; i++)`. + let j = step | 0 + while (j--) { + // Adding `|| ''` refuses a random byte that exceeds the alphabet size. + id += alphabet[bytes[j] & mask] || '' + if (id.length === size) return id + } + } + } +} + +let customAlphabet = (alphabet, size = 21) => + customRandom(alphabet, size, random) + +let nanoid = (size = 21) => + crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => { + // It is incorrect to use bytes exceeding the alphabet size. + // The following mask reduces the random byte in the 0-255 value + // range to the 0-63 value range. Therefore, adding hacks, such + // as empty string fallback or magic numbers, is unneccessary because + // the bitmask trims bytes down to the alphabet size. + byte &= 63 + if (byte < 36) { + // `0-9a-z` + id += byte.toString(36) + } else if (byte < 62) { + // `A-Z` + id += (byte - 26).toString(36).toUpperCase() + } else if (byte > 62) { + id += '-' + } else { + id += '_' + } + return id + }, '') + +export { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/vuetest/node_modules/nanoid/index.cjs b/vuetest/node_modules/nanoid/index.cjs new file mode 100644 index 0000000..c20e374 --- /dev/null +++ b/vuetest/node_modules/nanoid/index.cjs @@ -0,0 +1,85 @@ +let crypto = require('crypto') + +let { urlAlphabet } = require('./url-alphabet/index.cjs') + +// It is best to make fewer, larger requests to the crypto module to +// avoid system call overhead. So, random numbers are generated in a +// pool. The pool is a Buffer that is larger than the initial random +// request size by this multiplier. The pool is enlarged if subsequent +// requests exceed the maximum buffer size. +const POOL_SIZE_MULTIPLIER = 128 +let pool, poolOffset + +let fillPool = bytes => { + if (!pool || pool.length < bytes) { + pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER) + crypto.randomFillSync(pool) + poolOffset = 0 + } else if (poolOffset + bytes > pool.length) { + crypto.randomFillSync(pool) + poolOffset = 0 + } + poolOffset += bytes +} + +let random = bytes => { + // `|=` convert `bytes` to number to prevent `valueOf` abusing and pool pollution + fillPool((bytes |= 0)) + return pool.subarray(poolOffset - bytes, poolOffset) +} + +let customRandom = (alphabet, defaultSize, getRandom) => { + // First, a bitmask is necessary to generate the ID. The bitmask makes bytes + // values closer to the alphabet size. The bitmask calculates the closest + // `2^31 - 1` number, which exceeds the alphabet size. + // For example, the bitmask for the alphabet size 30 is 31 (00011111). + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + // Though, the bitmask solution is not perfect since the bytes exceeding + // the alphabet size are refused. Therefore, to reliably generate the ID, + // the random bytes redundancy has to be satisfied. + + // Note: every hardware random generator call is performance expensive, + // because the system call for entropy collection takes a lot of time. + // So, to avoid additional system calls, extra bytes are requested in advance. + + // Next, a step determines how many random bytes to generate. + // The number of random bytes gets decided upon the ID size, mask, + // alphabet size, and magic number 1.6 (using 1.6 peaks at performance + // according to benchmarks). + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + + return (size = defaultSize) => { + let id = '' + while (true) { + let bytes = getRandom(step) + // A compact alternative for `for (let i = 0; i < step; i++)`. + let i = step + while (i--) { + // Adding `|| ''` refuses a random byte that exceeds the alphabet size. + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + } + } +} + +let customAlphabet = (alphabet, size = 21) => + customRandom(alphabet, size, random) + +let nanoid = (size = 21) => { + // `|=` convert `size` to number to prevent `valueOf` abusing and pool pollution + fillPool((size |= 0)) + let id = '' + // We are reading directly from the random pool to avoid creating new array + for (let i = poolOffset - size; i < poolOffset; i++) { + // It is incorrect to use bytes exceeding the alphabet size. + // The following mask reduces the random byte in the 0-255 value + // range to the 0-63 value range. Therefore, adding hacks, such + // as empty string fallback or magic numbers, is unneccessary because + // the bitmask trims bytes down to the alphabet size. + id += urlAlphabet[pool[i] & 63] + } + return id +} + +module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/vuetest/node_modules/nanoid/index.d.cts b/vuetest/node_modules/nanoid/index.d.cts new file mode 100644 index 0000000..3e111a3 --- /dev/null +++ b/vuetest/node_modules/nanoid/index.d.cts @@ -0,0 +1,91 @@ +/** + * Generate secure URL-friendly unique ID. + * + * By default, the ID will have 21 symbols to have a collision probability + * similar to UUID v4. + * + * ```js + * import { nanoid } from 'nanoid' + * model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL" + * ``` + * + * @param size Size of the ID. The default size is 21. + * @returns A random string. + */ +export function nanoid(size?: number): string + +/** + * Generate secure unique ID with custom alphabet. + * + * Alphabet must contain 256 symbols or less. Otherwise, the generator + * will not be secure. + * + * @param alphabet Alphabet used to generate the ID. + * @param defaultSize Size of the ID. The default size is 21. + * @returns A random string generator. + * + * ```js + * const { customAlphabet } = require('nanoid') + * const nanoid = customAlphabet('0123456789абвгдеё', 5) + * nanoid() //=> "8ё56а" + * ``` + */ +export function customAlphabet( + alphabet: string, + defaultSize?: number +): (size?: number) => string + +/** + * Generate unique ID with custom random generator and alphabet. + * + * Alphabet must contain 256 symbols or less. Otherwise, the generator + * will not be secure. + * + * ```js + * import { customRandom } from 'nanoid/format' + * + * const nanoid = customRandom('abcdef', 5, size => { + * const random = [] + * for (let i = 0; i < size; i++) { + * random.push(randomByte()) + * } + * return random + * }) + * + * nanoid() //=> "fbaef" + * ``` + * + * @param alphabet Alphabet used to generate a random string. + * @param size Size of the random string. + * @param random A random bytes generator. + * @returns A random string generator. + */ +export function customRandom( + alphabet: string, + size: number, + random: (bytes: number) => Uint8Array +): () => string + +/** + * URL safe symbols. + * + * ```js + * import { urlAlphabet } from 'nanoid' + * const nanoid = customAlphabet(urlAlphabet, 10) + * nanoid() //=> "Uakgb_J5m9" + * ``` + */ +export const urlAlphabet: string + +/** + * Generate an array of random bytes collected from hardware noise. + * + * ```js + * import { customRandom, random } from 'nanoid' + * const nanoid = customRandom("abcdef", 5, random) + * ``` + * + * @param bytes Size of the array. + * @returns An array of random bytes. + */ +export function random(bytes: number): Uint8Array diff --git a/vuetest/node_modules/nanoid/index.d.ts b/vuetest/node_modules/nanoid/index.d.ts new file mode 100644 index 0000000..3e111a3 --- /dev/null +++ b/vuetest/node_modules/nanoid/index.d.ts @@ -0,0 +1,91 @@ +/** + * Generate secure URL-friendly unique ID. + * + * By default, the ID will have 21 symbols to have a collision probability + * similar to UUID v4. + * + * ```js + * import { nanoid } from 'nanoid' + * model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL" + * ``` + * + * @param size Size of the ID. The default size is 21. + * @returns A random string. + */ +export function nanoid(size?: number): string + +/** + * Generate secure unique ID with custom alphabet. + * + * Alphabet must contain 256 symbols or less. Otherwise, the generator + * will not be secure. + * + * @param alphabet Alphabet used to generate the ID. + * @param defaultSize Size of the ID. The default size is 21. + * @returns A random string generator. + * + * ```js + * const { customAlphabet } = require('nanoid') + * const nanoid = customAlphabet('0123456789абвгдеё', 5) + * nanoid() //=> "8ё56а" + * ``` + */ +export function customAlphabet( + alphabet: string, + defaultSize?: number +): (size?: number) => string + +/** + * Generate unique ID with custom random generator and alphabet. + * + * Alphabet must contain 256 symbols or less. Otherwise, the generator + * will not be secure. + * + * ```js + * import { customRandom } from 'nanoid/format' + * + * const nanoid = customRandom('abcdef', 5, size => { + * const random = [] + * for (let i = 0; i < size; i++) { + * random.push(randomByte()) + * } + * return random + * }) + * + * nanoid() //=> "fbaef" + * ``` + * + * @param alphabet Alphabet used to generate a random string. + * @param size Size of the random string. + * @param random A random bytes generator. + * @returns A random string generator. + */ +export function customRandom( + alphabet: string, + size: number, + random: (bytes: number) => Uint8Array +): () => string + +/** + * URL safe symbols. + * + * ```js + * import { urlAlphabet } from 'nanoid' + * const nanoid = customAlphabet(urlAlphabet, 10) + * nanoid() //=> "Uakgb_J5m9" + * ``` + */ +export const urlAlphabet: string + +/** + * Generate an array of random bytes collected from hardware noise. + * + * ```js + * import { customRandom, random } from 'nanoid' + * const nanoid = customRandom("abcdef", 5, random) + * ``` + * + * @param bytes Size of the array. + * @returns An array of random bytes. + */ +export function random(bytes: number): Uint8Array diff --git a/vuetest/node_modules/nanoid/index.js b/vuetest/node_modules/nanoid/index.js new file mode 100644 index 0000000..5203a4c --- /dev/null +++ b/vuetest/node_modules/nanoid/index.js @@ -0,0 +1,85 @@ +import crypto from 'crypto' + +import { urlAlphabet } from './url-alphabet/index.js' + +// It is best to make fewer, larger requests to the crypto module to +// avoid system call overhead. So, random numbers are generated in a +// pool. The pool is a Buffer that is larger than the initial random +// request size by this multiplier. The pool is enlarged if subsequent +// requests exceed the maximum buffer size. +const POOL_SIZE_MULTIPLIER = 128 +let pool, poolOffset + +let fillPool = bytes => { + if (!pool || pool.length < bytes) { + pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER) + crypto.randomFillSync(pool) + poolOffset = 0 + } else if (poolOffset + bytes > pool.length) { + crypto.randomFillSync(pool) + poolOffset = 0 + } + poolOffset += bytes +} + +let random = bytes => { + // `|=` convert `bytes` to number to prevent `valueOf` abusing and pool pollution + fillPool((bytes |= 0)) + return pool.subarray(poolOffset - bytes, poolOffset) +} + +let customRandom = (alphabet, defaultSize, getRandom) => { + // First, a bitmask is necessary to generate the ID. The bitmask makes bytes + // values closer to the alphabet size. The bitmask calculates the closest + // `2^31 - 1` number, which exceeds the alphabet size. + // For example, the bitmask for the alphabet size 30 is 31 (00011111). + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + // Though, the bitmask solution is not perfect since the bytes exceeding + // the alphabet size are refused. Therefore, to reliably generate the ID, + // the random bytes redundancy has to be satisfied. + + // Note: every hardware random generator call is performance expensive, + // because the system call for entropy collection takes a lot of time. + // So, to avoid additional system calls, extra bytes are requested in advance. + + // Next, a step determines how many random bytes to generate. + // The number of random bytes gets decided upon the ID size, mask, + // alphabet size, and magic number 1.6 (using 1.6 peaks at performance + // according to benchmarks). + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + + return (size = defaultSize) => { + let id = '' + while (true) { + let bytes = getRandom(step) + // A compact alternative for `for (let i = 0; i < step; i++)`. + let i = step + while (i--) { + // Adding `|| ''` refuses a random byte that exceeds the alphabet size. + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + } + } +} + +let customAlphabet = (alphabet, size = 21) => + customRandom(alphabet, size, random) + +let nanoid = (size = 21) => { + // `|=` convert `size` to number to prevent `valueOf` abusing and pool pollution + fillPool((size |= 0)) + let id = '' + // We are reading directly from the random pool to avoid creating new array + for (let i = poolOffset - size; i < poolOffset; i++) { + // It is incorrect to use bytes exceeding the alphabet size. + // The following mask reduces the random byte in the 0-255 value + // range to the 0-63 value range. Therefore, adding hacks, such + // as empty string fallback or magic numbers, is unneccessary because + // the bitmask trims bytes down to the alphabet size. + id += urlAlphabet[pool[i] & 63] + } + return id +} + +export { nanoid, customAlphabet, customRandom, urlAlphabet, random } diff --git a/vuetest/node_modules/nanoid/nanoid.js b/vuetest/node_modules/nanoid/nanoid.js new file mode 100644 index 0000000..ec242ea --- /dev/null +++ b/vuetest/node_modules/nanoid/nanoid.js @@ -0,0 +1 @@ +export let nanoid=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce(((t,e)=>t+=(e&=63)<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():e<63?"_":"-"),""); \ No newline at end of file diff --git a/vuetest/node_modules/nanoid/non-secure/index.cjs b/vuetest/node_modules/nanoid/non-secure/index.cjs new file mode 100644 index 0000000..d51fcb6 --- /dev/null +++ b/vuetest/node_modules/nanoid/non-secure/index.cjs @@ -0,0 +1,34 @@ +// This alphabet uses `A-Za-z0-9_-` symbols. +// The order of characters is optimized for better gzip and brotli compression. +// References to the same file (works both for gzip and brotli): +// `'use`, `andom`, and `rict'` +// References to the brotli default dictionary: +// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf` +let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' + +let customAlphabet = (alphabet, defaultSize = 21) => { + return (size = defaultSize) => { + let id = '' + // A compact alternative for `for (var i = 0; i < step; i++)`. + let i = size | 0 + while (i--) { + // `| 0` is more compact and faster than `Math.floor()`. + id += alphabet[(Math.random() * alphabet.length) | 0] + } + return id + } +} + +let nanoid = (size = 21) => { + let id = '' + // A compact alternative for `for (var i = 0; i < step; i++)`. + let i = size | 0 + while (i--) { + // `| 0` is more compact and faster than `Math.floor()`. + id += urlAlphabet[(Math.random() * 64) | 0] + } + return id +} + +module.exports = { nanoid, customAlphabet } diff --git a/vuetest/node_modules/nanoid/non-secure/index.d.ts b/vuetest/node_modules/nanoid/non-secure/index.d.ts new file mode 100644 index 0000000..4965322 --- /dev/null +++ b/vuetest/node_modules/nanoid/non-secure/index.d.ts @@ -0,0 +1,33 @@ +/** + * Generate URL-friendly unique ID. This method uses the non-secure + * predictable random generator with bigger collision probability. + * + * ```js + * import { nanoid } from 'nanoid/non-secure' + * model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL" + * ``` + * + * @param size Size of the ID. The default size is 21. + * @returns A random string. + */ +export function nanoid(size?: number): string + +/** + * Generate a unique ID based on a custom alphabet. + * This method uses the non-secure predictable random generator + * with bigger collision probability. + * + * @param alphabet Alphabet used to generate the ID. + * @param defaultSize Size of the ID. The default size is 21. + * @returns A random string generator. + * + * ```js + * import { customAlphabet } from 'nanoid/non-secure' + * const nanoid = customAlphabet('0123456789абвгдеё', 5) + * model.id = //=> "8ё56а" + * ``` + */ +export function customAlphabet( + alphabet: string, + defaultSize?: number +): (size?: number) => string diff --git a/vuetest/node_modules/nanoid/non-secure/index.js b/vuetest/node_modules/nanoid/non-secure/index.js new file mode 100644 index 0000000..fcb3e25 --- /dev/null +++ b/vuetest/node_modules/nanoid/non-secure/index.js @@ -0,0 +1,34 @@ +// This alphabet uses `A-Za-z0-9_-` symbols. +// The order of characters is optimized for better gzip and brotli compression. +// References to the same file (works both for gzip and brotli): +// `'use`, `andom`, and `rict'` +// References to the brotli default dictionary: +// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf` +let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' + +let customAlphabet = (alphabet, defaultSize = 21) => { + return (size = defaultSize) => { + let id = '' + // A compact alternative for `for (var i = 0; i < step; i++)`. + let i = size | 0 + while (i--) { + // `| 0` is more compact and faster than `Math.floor()`. + id += alphabet[(Math.random() * alphabet.length) | 0] + } + return id + } +} + +let nanoid = (size = 21) => { + let id = '' + // A compact alternative for `for (var i = 0; i < step; i++)`. + let i = size | 0 + while (i--) { + // `| 0` is more compact and faster than `Math.floor()`. + id += urlAlphabet[(Math.random() * 64) | 0] + } + return id +} + +export { nanoid, customAlphabet } diff --git a/vuetest/node_modules/nanoid/non-secure/package.json b/vuetest/node_modules/nanoid/non-secure/package.json new file mode 100644 index 0000000..9930d6a --- /dev/null +++ b/vuetest/node_modules/nanoid/non-secure/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "main": "index.cjs", + "module": "index.js", + "react-native": "index.js" +} \ No newline at end of file diff --git a/vuetest/node_modules/nanoid/package.json b/vuetest/node_modules/nanoid/package.json new file mode 100644 index 0000000..b238dca --- /dev/null +++ b/vuetest/node_modules/nanoid/package.json @@ -0,0 +1,88 @@ +{ + "name": "nanoid", + "version": "3.3.8", + "description": "A tiny (116 bytes), secure URL-friendly unique string ID generator", + "keywords": [ + "uuid", + "random", + "id", + "url" + ], + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "author": "Andrey Sitnik <andrey@sitnik.ru>", + "license": "MIT", + "repository": "ai/nanoid", + "browser": { + "./index.js": "./index.browser.js", + "./async/index.js": "./async/index.browser.js", + "./async/index.cjs": "./async/index.browser.cjs", + "./index.cjs": "./index.browser.cjs" + }, + "react-native": "index.js", + "bin": "./bin/nanoid.cjs", + "sideEffects": false, + "types": "./index.d.ts", + "type": "module", + "main": "index.cjs", + "module": "index.js", + "exports": { + ".": { + "browser": "./index.browser.js", + "require": { + "types": "./index.d.cts", + "default": "./index.cjs" + }, + "import": { + "types": "./index.d.ts", + "default": "./index.js" + }, + "default": "./index.js" + }, + "./package.json": "./package.json", + "./async/package.json": "./async/package.json", + "./async": { + "browser": "./async/index.browser.js", + "require": { + "types": "./index.d.cts", + "default": "./async/index.cjs" + }, + "import": { + "types": "./index.d.ts", + "default": "./async/index.js" + }, + "default": "./async/index.js" + }, + "./non-secure/package.json": "./non-secure/package.json", + "./non-secure": { + "require": { + "types": "./index.d.cts", + "default": "./non-secure/index.cjs" + }, + "import": { + "types": "./index.d.ts", + "default": "./non-secure/index.js" + }, + "default": "./non-secure/index.js" + }, + "./url-alphabet/package.json": "./url-alphabet/package.json", + "./url-alphabet": { + "require": { + "types": "./index.d.cts", + "default": "./url-alphabet/index.cjs" + }, + "import": { + "types": "./index.d.ts", + "default": "./url-alphabet/index.js" + }, + "default": "./url-alphabet/index.js" + } + } +} \ No newline at end of file diff --git a/vuetest/node_modules/nanoid/url-alphabet/index.cjs b/vuetest/node_modules/nanoid/url-alphabet/index.cjs new file mode 100644 index 0000000..a332f0b --- /dev/null +++ b/vuetest/node_modules/nanoid/url-alphabet/index.cjs @@ -0,0 +1,7 @@ +// This alphabet uses `A-Za-z0-9_-` symbols. +// The order of characters is optimized for better gzip and brotli compression. +// Same as in non-secure/index.js +let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' + +module.exports = { urlAlphabet } diff --git a/vuetest/node_modules/nanoid/url-alphabet/index.js b/vuetest/node_modules/nanoid/url-alphabet/index.js new file mode 100644 index 0000000..27efec8 --- /dev/null +++ b/vuetest/node_modules/nanoid/url-alphabet/index.js @@ -0,0 +1,7 @@ +// This alphabet uses `A-Za-z0-9_-` symbols. +// The order of characters is optimized for better gzip and brotli compression. +// Same as in non-secure/index.js +let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' + +export { urlAlphabet } diff --git a/vuetest/node_modules/nanoid/url-alphabet/package.json b/vuetest/node_modules/nanoid/url-alphabet/package.json new file mode 100644 index 0000000..9930d6a --- /dev/null +++ b/vuetest/node_modules/nanoid/url-alphabet/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "main": "index.cjs", + "module": "index.js", + "react-native": "index.js" +} \ No newline at end of file diff --git a/vuetest/node_modules/picocolors/LICENSE b/vuetest/node_modules/picocolors/LICENSE new file mode 100644 index 0000000..46c9b95 --- /dev/null +++ b/vuetest/node_modules/picocolors/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2021-2024 Oleksii Raspopov, Kostiantyn Denysov, Anton Verinov + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/vuetest/node_modules/picocolors/README.md b/vuetest/node_modules/picocolors/README.md new file mode 100644 index 0000000..8e47aa8 --- /dev/null +++ b/vuetest/node_modules/picocolors/README.md @@ -0,0 +1,21 @@ +# picocolors + +The tiniest and the fastest library for terminal output formatting with ANSI colors. + +```javascript +import pc from "picocolors" + +console.log( + pc.green(`How are ${pc.italic(`you`)} doing?`) +) +``` + +- **No dependencies.** +- **14 times** smaller and **2 times** faster than chalk. +- Used by popular tools like PostCSS, SVGO, Stylelint, and Browserslist. +- Node.js v6+ & browsers support. Support for both CJS and ESM projects. +- TypeScript type declarations included. +- [`NO_COLOR`](https://no-color.org/) friendly. + +## Docs +Read **[full docs](https://github.com/alexeyraspopov/picocolors#readme)** on GitHub. diff --git a/vuetest/node_modules/picocolors/package.json b/vuetest/node_modules/picocolors/package.json new file mode 100644 index 0000000..372d4b6 --- /dev/null +++ b/vuetest/node_modules/picocolors/package.json @@ -0,0 +1,25 @@ +{ + "name": "picocolors", + "version": "1.1.1", + "main": "./picocolors.js", + "types": "./picocolors.d.ts", + "browser": { + "./picocolors.js": "./picocolors.browser.js" + }, + "sideEffects": false, + "description": "The tiniest and the fastest library for terminal output formatting with ANSI colors", + "files": [ + "picocolors.*", + "types.d.ts" + ], + "keywords": [ + "terminal", + "colors", + "formatting", + "cli", + "console" + ], + "author": "Alexey Raspopov", + "repository": "alexeyraspopov/picocolors", + "license": "ISC" +} diff --git a/vuetest/node_modules/picocolors/picocolors.browser.js b/vuetest/node_modules/picocolors/picocolors.browser.js new file mode 100644 index 0000000..9dcf637 --- /dev/null +++ b/vuetest/node_modules/picocolors/picocolors.browser.js @@ -0,0 +1,4 @@ +var x=String; +var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}}; +module.exports=create(); +module.exports.createColors = create; diff --git a/vuetest/node_modules/picocolors/picocolors.d.ts b/vuetest/node_modules/picocolors/picocolors.d.ts new file mode 100644 index 0000000..94e146a --- /dev/null +++ b/vuetest/node_modules/picocolors/picocolors.d.ts @@ -0,0 +1,5 @@ +import { Colors } from "./types" + +declare const picocolors: Colors & { createColors: (enabled?: boolean) => Colors } + +export = picocolors diff --git a/vuetest/node_modules/picocolors/picocolors.js b/vuetest/node_modules/picocolors/picocolors.js new file mode 100644 index 0000000..e32df85 --- /dev/null +++ b/vuetest/node_modules/picocolors/picocolors.js @@ -0,0 +1,75 @@ +let p = process || {}, argv = p.argv || [], env = p.env || {} +let isColorSupported = + !(!!env.NO_COLOR || argv.includes("--no-color")) && + (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || ((p.stdout || {}).isTTY && env.TERM !== "dumb") || !!env.CI) + +let formatter = (open, close, replace = open) => + input => { + let string = "" + input, index = string.indexOf(close, open.length) + return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close + } + +let replaceClose = (string, close, replace, index) => { + let result = "", cursor = 0 + do { + result += string.substring(cursor, index) + replace + cursor = index + close.length + index = string.indexOf(close, cursor) + } while (~index) + return result + string.substring(cursor) +} + +let createColors = (enabled = isColorSupported) => { + let f = enabled ? formatter : () => String + return { + isColorSupported: enabled, + reset: f("\x1b[0m", "\x1b[0m"), + bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"), + dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"), + italic: f("\x1b[3m", "\x1b[23m"), + underline: f("\x1b[4m", "\x1b[24m"), + inverse: f("\x1b[7m", "\x1b[27m"), + hidden: f("\x1b[8m", "\x1b[28m"), + strikethrough: f("\x1b[9m", "\x1b[29m"), + + black: f("\x1b[30m", "\x1b[39m"), + red: f("\x1b[31m", "\x1b[39m"), + green: f("\x1b[32m", "\x1b[39m"), + yellow: f("\x1b[33m", "\x1b[39m"), + blue: f("\x1b[34m", "\x1b[39m"), + magenta: f("\x1b[35m", "\x1b[39m"), + cyan: f("\x1b[36m", "\x1b[39m"), + white: f("\x1b[37m", "\x1b[39m"), + gray: f("\x1b[90m", "\x1b[39m"), + + bgBlack: f("\x1b[40m", "\x1b[49m"), + bgRed: f("\x1b[41m", "\x1b[49m"), + bgGreen: f("\x1b[42m", "\x1b[49m"), + bgYellow: f("\x1b[43m", "\x1b[49m"), + bgBlue: f("\x1b[44m", "\x1b[49m"), + bgMagenta: f("\x1b[45m", "\x1b[49m"), + bgCyan: f("\x1b[46m", "\x1b[49m"), + bgWhite: f("\x1b[47m", "\x1b[49m"), + + blackBright: f("\x1b[90m", "\x1b[39m"), + redBright: f("\x1b[91m", "\x1b[39m"), + greenBright: f("\x1b[92m", "\x1b[39m"), + yellowBright: f("\x1b[93m", "\x1b[39m"), + blueBright: f("\x1b[94m", "\x1b[39m"), + magentaBright: f("\x1b[95m", "\x1b[39m"), + cyanBright: f("\x1b[96m", "\x1b[39m"), + whiteBright: f("\x1b[97m", "\x1b[39m"), + + bgBlackBright: f("\x1b[100m", "\x1b[49m"), + bgRedBright: f("\x1b[101m", "\x1b[49m"), + bgGreenBright: f("\x1b[102m", "\x1b[49m"), + bgYellowBright: f("\x1b[103m", "\x1b[49m"), + bgBlueBright: f("\x1b[104m", "\x1b[49m"), + bgMagentaBright: f("\x1b[105m", "\x1b[49m"), + bgCyanBright: f("\x1b[106m", "\x1b[49m"), + bgWhiteBright: f("\x1b[107m", "\x1b[49m"), + } +} + +module.exports = createColors() +module.exports.createColors = createColors diff --git a/vuetest/node_modules/picocolors/types.d.ts b/vuetest/node_modules/picocolors/types.d.ts new file mode 100644 index 0000000..cd1aec4 --- /dev/null +++ b/vuetest/node_modules/picocolors/types.d.ts @@ -0,0 +1,51 @@ +export type Formatter = (input: string | number | null | undefined) => string + +export interface Colors { + isColorSupported: boolean + + reset: Formatter + bold: Formatter + dim: Formatter + italic: Formatter + underline: Formatter + inverse: Formatter + hidden: Formatter + strikethrough: Formatter + + black: Formatter + red: Formatter + green: Formatter + yellow: Formatter + blue: Formatter + magenta: Formatter + cyan: Formatter + white: Formatter + gray: Formatter + + bgBlack: Formatter + bgRed: Formatter + bgGreen: Formatter + bgYellow: Formatter + bgBlue: Formatter + bgMagenta: Formatter + bgCyan: Formatter + bgWhite: Formatter + + blackBright: Formatter + redBright: Formatter + greenBright: Formatter + yellowBright: Formatter + blueBright: Formatter + magentaBright: Formatter + cyanBright: Formatter + whiteBright: Formatter + + bgBlackBright: Formatter + bgRedBright: Formatter + bgGreenBright: Formatter + bgYellowBright: Formatter + bgBlueBright: Formatter + bgMagentaBright: Formatter + bgCyanBright: Formatter + bgWhiteBright: Formatter +} diff --git a/vuetest/node_modules/postcss/LICENSE b/vuetest/node_modules/postcss/LICENSE new file mode 100644 index 0000000..da057b4 --- /dev/null +++ b/vuetest/node_modules/postcss/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright 2013 Andrey Sitnik <andrey@sitnik.ru> + +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. diff --git a/vuetest/node_modules/postcss/README.md b/vuetest/node_modules/postcss/README.md new file mode 100644 index 0000000..939a802 --- /dev/null +++ b/vuetest/node_modules/postcss/README.md @@ -0,0 +1,28 @@ +# PostCSS + +<img align="right" width="95" height="95" + alt="Philosopher’s stone, logo of PostCSS" + src="https://postcss.org/logo.svg"> + +PostCSS is a tool for transforming styles with JS plugins. +These plugins can lint your CSS, support variables and mixins, +transpile future CSS syntax, inline images, and more. + +PostCSS is used by industry leaders including Wikipedia, Twitter, Alibaba, +and JetBrains. The [Autoprefixer] and [Stylelint] PostCSS plugins is one of the most popular CSS tools. + +--- + +<img src="https://cdn.evilmartians.com/badges/logo-no-label.svg" alt="" width="22" height="16" />  Made at <b><a href="https://evilmartians.com/devtools?utm_source=postcss&utm_campaign=devtools-button&utm_medium=github">Evil Martians</a></b>, product consulting for <b>developer tools</b>. + +--- + +[Abstract Syntax Tree]: https://en.wikipedia.org/wiki/Abstract_syntax_tree +[Evil Martians]: https://evilmartians.com/?utm_source=postcss +[Autoprefixer]: https://github.com/postcss/autoprefixer +[Stylelint]: https://stylelint.io/ +[plugins]: https://github.com/postcss/postcss#plugins + + +## Docs +Read full docs **[here](https://postcss.org/)**. diff --git a/vuetest/node_modules/postcss/lib/at-rule.d.ts b/vuetest/node_modules/postcss/lib/at-rule.d.ts new file mode 100644 index 0000000..b2a0e0f --- /dev/null +++ b/vuetest/node_modules/postcss/lib/at-rule.d.ts @@ -0,0 +1,140 @@ +import Container, { + ContainerProps, + ContainerWithChildren +} from './container.js' + +declare namespace AtRule { + export interface AtRuleRaws extends Record<string, unknown> { + /** + * The space symbols after the last child of the node to the end of the node. + */ + after?: string + + /** + * The space between the at-rule name and its parameters. + */ + afterName?: string + + /** + * The space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + */ + before?: string + + /** + * The symbols between the last parameter and `{` for rules. + */ + between?: string + + /** + * The rule’s selector with comments. + */ + params?: { + raw: string + value: string + } + + /** + * Contains `true` if the last child has an (optional) semicolon. + */ + semicolon?: boolean + } + + export interface AtRuleProps extends ContainerProps { + /** Name of the at-rule. */ + name: string + /** Parameters following the name of the at-rule. */ + params?: number | string + /** Information used to generate byte-to-byte equal node string as it was in the origin input. */ + raws?: AtRuleRaws + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { AtRule_ as default } +} + +/** + * Represents an at-rule. + * + * ```js + * Once (root, { AtRule }) { + * let media = new AtRule({ name: 'media', params: 'print' }) + * media.append(…) + * root.append(media) + * } + * ``` + * + * If it’s followed in the CSS by a `{}` block, this node will have + * a nodes property representing its children. + * + * ```js + * const root = postcss.parse('@charset "UTF-8"; @media print {}') + * + * const charset = root.first + * charset.type //=> 'atrule' + * charset.nodes //=> undefined + * + * const media = root.last + * media.nodes //=> [] + * ``` + */ +declare class AtRule_ extends Container { + /** + * An array containing the layer’s children. + * + * ```js + * const root = postcss.parse('@layer example { a { color: black } }') + * const layer = root.first + * layer.nodes.length //=> 1 + * layer.nodes[0].selector //=> 'a' + * ``` + * + * Can be `undefinded` if the at-rule has no body. + * + * ```js + * const root = postcss.parse('@layer a, b, c;') + * const layer = root.first + * layer.nodes //=> undefined + * ``` + */ + nodes: Container['nodes'] + parent: ContainerWithChildren | undefined + + raws: AtRule.AtRuleRaws + type: 'atrule' + constructor(defaults?: AtRule.AtRuleProps) + assign(overrides: AtRule.AtRuleProps | object): this + + clone(overrides?: Partial<AtRule.AtRuleProps>): this + + cloneAfter(overrides?: Partial<AtRule.AtRuleProps>): this + + cloneBefore(overrides?: Partial<AtRule.AtRuleProps>): this + /** + * The at-rule’s name immediately follows the `@`. + * + * ```js + * const root = postcss.parse('@media print {}') + * const media = root.first + * media.name //=> 'media' + * ``` + */ + get name(): string + set name(value: string) + /** + * The at-rule’s parameters, the values that follow the at-rule’s name + * but precede any `{}` block. + * + * ```js + * const root = postcss.parse('@media print, screen {}') + * const media = root.first + * media.params //=> 'print, screen' + * ``` + */ + get params(): string + set params(value: string) +} + +declare class AtRule extends AtRule_ {} + +export = AtRule diff --git a/vuetest/node_modules/postcss/lib/at-rule.js b/vuetest/node_modules/postcss/lib/at-rule.js new file mode 100644 index 0000000..9486447 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/at-rule.js @@ -0,0 +1,25 @@ +'use strict' + +let Container = require('./container') + +class AtRule extends Container { + constructor(defaults) { + super(defaults) + this.type = 'atrule' + } + + append(...children) { + if (!this.proxyOf.nodes) this.nodes = [] + return super.append(...children) + } + + prepend(...children) { + if (!this.proxyOf.nodes) this.nodes = [] + return super.prepend(...children) + } +} + +module.exports = AtRule +AtRule.default = AtRule + +Container.registerAtRule(AtRule) diff --git a/vuetest/node_modules/postcss/lib/comment.d.ts b/vuetest/node_modules/postcss/lib/comment.d.ts new file mode 100644 index 0000000..2b1a156 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/comment.d.ts @@ -0,0 +1,68 @@ +import Container from './container.js' +import Node, { NodeProps } from './node.js' + +declare namespace Comment { + export interface CommentRaws extends Record<string, unknown> { + /** + * The space symbols before the node. + */ + before?: string + + /** + * The space symbols between `/*` and the comment’s text. + */ + left?: string + + /** + * The space symbols between the comment’s text. + */ + right?: string + } + + export interface CommentProps extends NodeProps { + /** Information used to generate byte-to-byte equal node string as it was in the origin input. */ + raws?: CommentRaws + /** Content of the comment. */ + text: string + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Comment_ as default } +} + +/** + * It represents a class that handles + * [CSS comments](https://developer.mozilla.org/en-US/docs/Web/CSS/Comments) + * + * ```js + * Once (root, { Comment }) { + * const note = new Comment({ text: 'Note: …' }) + * root.append(note) + * } + * ``` + * + * Remember that CSS comments inside selectors, at-rule parameters, + * or declaration values will be stored in the `raws` properties + * explained above. + */ +declare class Comment_ extends Node { + parent: Container | undefined + raws: Comment.CommentRaws + type: 'comment' + constructor(defaults?: Comment.CommentProps) + + assign(overrides: Comment.CommentProps | object): this + + clone(overrides?: Partial<Comment.CommentProps>): this + cloneAfter(overrides?: Partial<Comment.CommentProps>): this + cloneBefore(overrides?: Partial<Comment.CommentProps>): this + /** + * The comment's text. + */ + get text(): string + set text(value: string) +} + +declare class Comment extends Comment_ {} + +export = Comment diff --git a/vuetest/node_modules/postcss/lib/comment.js b/vuetest/node_modules/postcss/lib/comment.js new file mode 100644 index 0000000..c566506 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/comment.js @@ -0,0 +1,13 @@ +'use strict' + +let Node = require('./node') + +class Comment extends Node { + constructor(defaults) { + super(defaults) + this.type = 'comment' + } +} + +module.exports = Comment +Comment.default = Comment diff --git a/vuetest/node_modules/postcss/lib/container.d.ts b/vuetest/node_modules/postcss/lib/container.d.ts new file mode 100644 index 0000000..692bd69 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/container.d.ts @@ -0,0 +1,483 @@ +import AtRule from './at-rule.js' +import Comment from './comment.js' +import Declaration from './declaration.js' +import Node, { ChildNode, ChildProps, NodeProps } from './node.js' +import Rule from './rule.js' + +declare namespace Container { + export class ContainerWithChildren< + Child extends Node = ChildNode + > extends Container_<Child> { + nodes: Child[] + } + + export interface ValueOptions { + /** + * String that’s used to narrow down values and speed up the regexp search. + */ + fast?: string + + /** + * An array of property names. + */ + props?: readonly string[] + } + + export interface ContainerProps extends NodeProps { + nodes?: readonly (ChildProps | Node)[] + } + + /** + * All types that can be passed into container methods to create or add a new + * child node. + */ + export type NewChild = + | ChildProps + | Node + | readonly ChildProps[] + | readonly Node[] + | readonly string[] + | string + | undefined + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Container_ as default } +} + +/** + * The `Root`, `AtRule`, and `Rule` container nodes + * inherit some common methods to help work with their children. + * + * Note that all containers can store any content. If you write a rule inside + * a rule, PostCSS will parse it. + */ +declare abstract class Container_<Child extends Node = ChildNode> extends Node { + /** + * An array containing the container’s children. + * + * ```js + * const root = postcss.parse('a { color: black }') + * root.nodes.length //=> 1 + * root.nodes[0].selector //=> 'a' + * root.nodes[0].nodes[0].prop //=> 'color' + * ``` + */ + nodes: Child[] | undefined + + /** + * An internal method that converts a {@link NewChild} into a list of actual + * child nodes that can then be added to this container. + * + * This ensures that the nodes' parent is set to this container, that they use + * the correct prototype chain, and that they're marked as dirty. + * + * @param mnodes The new node or nodes to add. + * @param sample A node from whose raws the new node's `before` raw should be + * taken. + * @param type This should be set to `'prepend'` if the new nodes will be + * inserted at the beginning of the container. + * @hidden + */ + protected normalize( + nodes: Container.NewChild, + sample: Node | undefined, + type?: 'prepend' | false + ): Child[] + + /** + * Inserts new nodes to the end of the container. + * + * ```js + * const decl1 = new Declaration({ prop: 'color', value: 'black' }) + * const decl2 = new Declaration({ prop: 'background-color', value: 'white' }) + * rule.append(decl1, decl2) + * + * root.append({ name: 'charset', params: '"UTF-8"' }) // at-rule + * root.append({ selector: 'a' }) // rule + * rule.append({ prop: 'color', value: 'black' }) // declaration + * rule.append({ text: 'Comment' }) // comment + * + * root.append('a {}') + * root.first.append('color: black; z-index: 1') + * ``` + * + * @param nodes New nodes. + * @return This node for methods chain. + */ + append(...nodes: Container.NewChild[]): this + assign(overrides: Container.ContainerProps | object): this + clone(overrides?: Partial<Container.ContainerProps>): this + cloneAfter(overrides?: Partial<Container.ContainerProps>): this + + cloneBefore(overrides?: Partial<Container.ContainerProps>): this + + /** + * Iterates through the container’s immediate children, + * calling `callback` for each child. + * + * Returning `false` in the callback will break iteration. + * + * This method only iterates through the container’s immediate children. + * If you need to recursively iterate through all the container’s descendant + * nodes, use `Container#walk`. + * + * Unlike the for `{}`-cycle or `Array#forEach` this iterator is safe + * if you are mutating the array of child nodes during iteration. + * PostCSS will adjust the current index to match the mutations. + * + * ```js + * const root = postcss.parse('a { color: black; z-index: 1 }') + * const rule = root.first + * + * for (const decl of rule.nodes) { + * decl.cloneBefore({ prop: '-webkit-' + decl.prop }) + * // Cycle will be infinite, because cloneBefore moves the current node + * // to the next index + * } + * + * rule.each(decl => { + * decl.cloneBefore({ prop: '-webkit-' + decl.prop }) + * // Will be executed only for color and z-index + * }) + * ``` + * + * @param callback Iterator receives each node and index. + * @return Returns `false` if iteration was broke. + */ + each( + callback: (node: Child, index: number) => false | void + ): false | undefined + /** + * Returns `true` if callback returns `true` + * for all of the container’s children. + * + * ```js + * const noPrefixes = rule.every(i => i.prop[0] !== '-') + * ``` + * + * @param condition Iterator returns true or false. + * @return Is every child pass condition. + */ + every( + condition: (node: Child, index: number, nodes: Child[]) => boolean + ): boolean + + /** + * Returns a `child`’s index within the `Container#nodes` array. + * + * ```js + * rule.index( rule.nodes[2] ) //=> 2 + * ``` + * + * @param child Child of the current container. + * @return Child index. + */ + index(child: Child | number): number + /** + * Insert new node after old node within the container. + * + * @param oldNode Child or child’s index. + * @param newNode New node. + * @return This node for methods chain. + */ + insertAfter(oldNode: Child | number, newNode: Container.NewChild): this + + /** + * Insert new node before old node within the container. + * + * ```js + * rule.insertBefore(decl, decl.clone({ prop: '-webkit-' + decl.prop })) + * ``` + * + * @param oldNode Child or child’s index. + * @param newNode New node. + * @return This node for methods chain. + */ + insertBefore(oldNode: Child | number, newNode: Container.NewChild): this + + /** + * Traverses the container’s descendant nodes, calling callback + * for each comment node. + * + * Like `Container#each`, this method is safe + * to use if you are mutating arrays during iteration. + * + * ```js + * root.walkComments(comment => { + * comment.remove() + * }) + * ``` + * + * @param callback Iterator receives each node and index. + * @return Returns `false` if iteration was broke. + */ + + /** + * Inserts new nodes to the start of the container. + * + * ```js + * const decl1 = new Declaration({ prop: 'color', value: 'black' }) + * const decl2 = new Declaration({ prop: 'background-color', value: 'white' }) + * rule.prepend(decl1, decl2) + * + * root.append({ name: 'charset', params: '"UTF-8"' }) // at-rule + * root.append({ selector: 'a' }) // rule + * rule.append({ prop: 'color', value: 'black' }) // declaration + * rule.append({ text: 'Comment' }) // comment + * + * root.append('a {}') + * root.first.append('color: black; z-index: 1') + * ``` + * + * @param nodes New nodes. + * @return This node for methods chain. + */ + prepend(...nodes: Container.NewChild[]): this + /** + * Add child to the end of the node. + * + * ```js + * rule.push(new Declaration({ prop: 'color', value: 'black' })) + * ``` + * + * @param child New node. + * @return This node for methods chain. + */ + push(child: Child): this + + /** + * Removes all children from the container + * and cleans their parent properties. + * + * ```js + * rule.removeAll() + * rule.nodes.length //=> 0 + * ``` + * + * @return This node for methods chain. + */ + removeAll(): this + + /** + * Removes node from the container and cleans the parent properties + * from the node and its children. + * + * ```js + * rule.nodes.length //=> 5 + * rule.removeChild(decl) + * rule.nodes.length //=> 4 + * decl.parent //=> undefined + * ``` + * + * @param child Child or child’s index. + * @return This node for methods chain. + */ + removeChild(child: Child | number): this + + replaceValues( + pattern: RegExp | string, + replaced: { (substring: string, ...args: any[]): string } | string + ): this + + /** + * Passes all declaration values within the container that match pattern + * through callback, replacing those values with the returned result + * of callback. + * + * This method is useful if you are using a custom unit or function + * and need to iterate through all values. + * + * ```js + * root.replaceValues(/\d+rem/, { fast: 'rem' }, string => { + * return 15 * parseInt(string) + 'px' + * }) + * ``` + * + * @param pattern Replace pattern. + * @param {object} options Options to speed up the search. + * @param replaced String to replace pattern or callback + * that returns a new value. The callback + * will receive the same arguments + * as those passed to a function parameter + * of `String#replace`. + * @return This node for methods chain. + */ + replaceValues( + pattern: RegExp | string, + options: Container.ValueOptions, + replaced: { (substring: string, ...args: any[]): string } | string + ): this + + /** + * Returns `true` if callback returns `true` for (at least) one + * of the container’s children. + * + * ```js + * const hasPrefix = rule.some(i => i.prop[0] === '-') + * ``` + * + * @param condition Iterator returns true or false. + * @return Is some child pass condition. + */ + some( + condition: (node: Child, index: number, nodes: Child[]) => boolean + ): boolean + + /** + * Traverses the container’s descendant nodes, calling callback + * for each node. + * + * Like container.each(), this method is safe to use + * if you are mutating arrays during iteration. + * + * If you only need to iterate through the container’s immediate children, + * use `Container#each`. + * + * ```js + * root.walk(node => { + * // Traverses all descendant nodes. + * }) + * ``` + * + * @param callback Iterator receives each node and index. + * @return Returns `false` if iteration was broke. + */ + walk( + callback: (node: ChildNode, index: number) => false | void + ): false | undefined + + /** + * Traverses the container’s descendant nodes, calling callback + * for each at-rule node. + * + * If you pass a filter, iteration will only happen over at-rules + * that have matching names. + * + * Like `Container#each`, this method is safe + * to use if you are mutating arrays during iteration. + * + * ```js + * root.walkAtRules(rule => { + * if (isOld(rule.name)) rule.remove() + * }) + * + * let first = false + * root.walkAtRules('charset', rule => { + * if (!first) { + * first = true + * } else { + * rule.remove() + * } + * }) + * ``` + * + * @param name String or regular expression to filter at-rules by name. + * @param callback Iterator receives each node and index. + * @return Returns `false` if iteration was broke. + */ + walkAtRules( + nameFilter: RegExp | string, + callback: (atRule: AtRule, index: number) => false | void + ): false | undefined + + walkAtRules( + callback: (atRule: AtRule, index: number) => false | void + ): false | undefined + walkComments( + callback: (comment: Comment, indexed: number) => false | void + ): false | undefined + + walkComments( + callback: (comment: Comment, indexed: number) => false | void + ): false | undefined + + /** + * Traverses the container’s descendant nodes, calling callback + * for each declaration node. + * + * If you pass a filter, iteration will only happen over declarations + * with matching properties. + * + * ```js + * root.walkDecls(decl => { + * checkPropertySupport(decl.prop) + * }) + * + * root.walkDecls('border-radius', decl => { + * decl.remove() + * }) + * + * root.walkDecls(/^background/, decl => { + * decl.value = takeFirstColorFromGradient(decl.value) + * }) + * ``` + * + * Like `Container#each`, this method is safe + * to use if you are mutating arrays during iteration. + * + * @param prop String or regular expression to filter declarations + * by property name. + * @param callback Iterator receives each node and index. + * @return Returns `false` if iteration was broke. + */ + walkDecls( + propFilter: RegExp | string, + callback: (decl: Declaration, index: number) => false | void + ): false | undefined + + walkDecls( + callback: (decl: Declaration, index: number) => false | void + ): false | undefined + + /** + * Traverses the container’s descendant nodes, calling callback + * for each rule node. + * + * If you pass a filter, iteration will only happen over rules + * with matching selectors. + * + * Like `Container#each`, this method is safe + * to use if you are mutating arrays during iteration. + * + * ```js + * const selectors = [] + * root.walkRules(rule => { + * selectors.push(rule.selector) + * }) + * console.log(`Your CSS uses ${ selectors.length } selectors`) + * ``` + * + * @param selector String or regular expression to filter rules by selector. + * @param callback Iterator receives each node and index. + * @return Returns `false` if iteration was broke. + */ + walkRules( + selectorFilter: RegExp | string, + callback: (rule: Rule, index: number) => false | void + ): false | undefined + walkRules( + callback: (rule: Rule, index: number) => false | void + ): false | undefined + /** + * The container’s first child. + * + * ```js + * rule.first === rules.nodes[0] + * ``` + */ + get first(): Child | undefined + /** + * The container’s last child. + * + * ```js + * rule.last === rule.nodes[rule.nodes.length - 1] + * ``` + */ + get last(): Child | undefined +} + +declare class Container< + Child extends Node = ChildNode +> extends Container_<Child> {} + +export = Container diff --git a/vuetest/node_modules/postcss/lib/container.js b/vuetest/node_modules/postcss/lib/container.js new file mode 100644 index 0000000..8b9e1ef --- /dev/null +++ b/vuetest/node_modules/postcss/lib/container.js @@ -0,0 +1,447 @@ +'use strict' + +let Comment = require('./comment') +let Declaration = require('./declaration') +let Node = require('./node') +let { isClean, my } = require('./symbols') + +let AtRule, parse, Root, Rule + +function cleanSource(nodes) { + return nodes.map(i => { + if (i.nodes) i.nodes = cleanSource(i.nodes) + delete i.source + return i + }) +} + +function markTreeDirty(node) { + node[isClean] = false + if (node.proxyOf.nodes) { + for (let i of node.proxyOf.nodes) { + markTreeDirty(i) + } + } +} + +class Container extends Node { + append(...children) { + for (let child of children) { + let nodes = this.normalize(child, this.last) + for (let node of nodes) this.proxyOf.nodes.push(node) + } + + this.markDirty() + + return this + } + + cleanRaws(keepBetween) { + super.cleanRaws(keepBetween) + if (this.nodes) { + for (let node of this.nodes) node.cleanRaws(keepBetween) + } + } + + each(callback) { + if (!this.proxyOf.nodes) return undefined + let iterator = this.getIterator() + + let index, result + while (this.indexes[iterator] < this.proxyOf.nodes.length) { + index = this.indexes[iterator] + result = callback(this.proxyOf.nodes[index], index) + if (result === false) break + + this.indexes[iterator] += 1 + } + + delete this.indexes[iterator] + return result + } + + every(condition) { + return this.nodes.every(condition) + } + + getIterator() { + if (!this.lastEach) this.lastEach = 0 + if (!this.indexes) this.indexes = {} + + this.lastEach += 1 + let iterator = this.lastEach + this.indexes[iterator] = 0 + + return iterator + } + + getProxyProcessor() { + return { + get(node, prop) { + if (prop === 'proxyOf') { + return node + } else if (!node[prop]) { + return node[prop] + } else if ( + prop === 'each' || + (typeof prop === 'string' && prop.startsWith('walk')) + ) { + return (...args) => { + return node[prop]( + ...args.map(i => { + if (typeof i === 'function') { + return (child, index) => i(child.toProxy(), index) + } else { + return i + } + }) + ) + } + } else if (prop === 'every' || prop === 'some') { + return cb => { + return node[prop]((child, ...other) => + cb(child.toProxy(), ...other) + ) + } + } else if (prop === 'root') { + return () => node.root().toProxy() + } else if (prop === 'nodes') { + return node.nodes.map(i => i.toProxy()) + } else if (prop === 'first' || prop === 'last') { + return node[prop].toProxy() + } else { + return node[prop] + } + }, + + set(node, prop, value) { + if (node[prop] === value) return true + node[prop] = value + if (prop === 'name' || prop === 'params' || prop === 'selector') { + node.markDirty() + } + return true + } + } + } + + index(child) { + if (typeof child === 'number') return child + if (child.proxyOf) child = child.proxyOf + return this.proxyOf.nodes.indexOf(child) + } + + insertAfter(exist, add) { + let existIndex = this.index(exist) + let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse() + existIndex = this.index(exist) + for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node) + + let index + for (let id in this.indexes) { + index = this.indexes[id] + if (existIndex < index) { + this.indexes[id] = index + nodes.length + } + } + + this.markDirty() + + return this + } + + insertBefore(exist, add) { + let existIndex = this.index(exist) + let type = existIndex === 0 ? 'prepend' : false + let nodes = this.normalize( + add, + this.proxyOf.nodes[existIndex], + type + ).reverse() + existIndex = this.index(exist) + for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node) + + let index + for (let id in this.indexes) { + index = this.indexes[id] + if (existIndex <= index) { + this.indexes[id] = index + nodes.length + } + } + + this.markDirty() + + return this + } + + normalize(nodes, sample) { + if (typeof nodes === 'string') { + nodes = cleanSource(parse(nodes).nodes) + } else if (typeof nodes === 'undefined') { + nodes = [] + } else if (Array.isArray(nodes)) { + nodes = nodes.slice(0) + for (let i of nodes) { + if (i.parent) i.parent.removeChild(i, 'ignore') + } + } else if (nodes.type === 'root' && this.type !== 'document') { + nodes = nodes.nodes.slice(0) + for (let i of nodes) { + if (i.parent) i.parent.removeChild(i, 'ignore') + } + } else if (nodes.type) { + nodes = [nodes] + } else if (nodes.prop) { + if (typeof nodes.value === 'undefined') { + throw new Error('Value field is missed in node creation') + } else if (typeof nodes.value !== 'string') { + nodes.value = String(nodes.value) + } + nodes = [new Declaration(nodes)] + } else if (nodes.selector || nodes.selectors) { + nodes = [new Rule(nodes)] + } else if (nodes.name) { + nodes = [new AtRule(nodes)] + } else if (nodes.text) { + nodes = [new Comment(nodes)] + } else { + throw new Error('Unknown node type in node creation') + } + + let processed = nodes.map(i => { + /* c8 ignore next */ + if (!i[my]) Container.rebuild(i) + i = i.proxyOf + if (i.parent) i.parent.removeChild(i) + if (i[isClean]) markTreeDirty(i) + + if (!i.raws) i.raws = {} + if (typeof i.raws.before === 'undefined') { + if (sample && typeof sample.raws.before !== 'undefined') { + i.raws.before = sample.raws.before.replace(/\S/g, '') + } + } + i.parent = this.proxyOf + return i + }) + + return processed + } + + prepend(...children) { + children = children.reverse() + for (let child of children) { + let nodes = this.normalize(child, this.first, 'prepend').reverse() + for (let node of nodes) this.proxyOf.nodes.unshift(node) + for (let id in this.indexes) { + this.indexes[id] = this.indexes[id] + nodes.length + } + } + + this.markDirty() + + return this + } + + push(child) { + child.parent = this + this.proxyOf.nodes.push(child) + return this + } + + removeAll() { + for (let node of this.proxyOf.nodes) node.parent = undefined + this.proxyOf.nodes = [] + + this.markDirty() + + return this + } + + removeChild(child) { + child = this.index(child) + this.proxyOf.nodes[child].parent = undefined + this.proxyOf.nodes.splice(child, 1) + + let index + for (let id in this.indexes) { + index = this.indexes[id] + if (index >= child) { + this.indexes[id] = index - 1 + } + } + + this.markDirty() + + return this + } + + replaceValues(pattern, opts, callback) { + if (!callback) { + callback = opts + opts = {} + } + + this.walkDecls(decl => { + if (opts.props && !opts.props.includes(decl.prop)) return + if (opts.fast && !decl.value.includes(opts.fast)) return + + decl.value = decl.value.replace(pattern, callback) + }) + + this.markDirty() + + return this + } + + some(condition) { + return this.nodes.some(condition) + } + + walk(callback) { + return this.each((child, i) => { + let result + try { + result = callback(child, i) + } catch (e) { + throw child.addToError(e) + } + if (result !== false && child.walk) { + result = child.walk(callback) + } + + return result + }) + } + + walkAtRules(name, callback) { + if (!callback) { + callback = name + return this.walk((child, i) => { + if (child.type === 'atrule') { + return callback(child, i) + } + }) + } + if (name instanceof RegExp) { + return this.walk((child, i) => { + if (child.type === 'atrule' && name.test(child.name)) { + return callback(child, i) + } + }) + } + return this.walk((child, i) => { + if (child.type === 'atrule' && child.name === name) { + return callback(child, i) + } + }) + } + + walkComments(callback) { + return this.walk((child, i) => { + if (child.type === 'comment') { + return callback(child, i) + } + }) + } + + walkDecls(prop, callback) { + if (!callback) { + callback = prop + return this.walk((child, i) => { + if (child.type === 'decl') { + return callback(child, i) + } + }) + } + if (prop instanceof RegExp) { + return this.walk((child, i) => { + if (child.type === 'decl' && prop.test(child.prop)) { + return callback(child, i) + } + }) + } + return this.walk((child, i) => { + if (child.type === 'decl' && child.prop === prop) { + return callback(child, i) + } + }) + } + + walkRules(selector, callback) { + if (!callback) { + callback = selector + + return this.walk((child, i) => { + if (child.type === 'rule') { + return callback(child, i) + } + }) + } + if (selector instanceof RegExp) { + return this.walk((child, i) => { + if (child.type === 'rule' && selector.test(child.selector)) { + return callback(child, i) + } + }) + } + return this.walk((child, i) => { + if (child.type === 'rule' && child.selector === selector) { + return callback(child, i) + } + }) + } + + get first() { + if (!this.proxyOf.nodes) return undefined + return this.proxyOf.nodes[0] + } + + get last() { + if (!this.proxyOf.nodes) return undefined + return this.proxyOf.nodes[this.proxyOf.nodes.length - 1] + } +} + +Container.registerParse = dependant => { + parse = dependant +} + +Container.registerRule = dependant => { + Rule = dependant +} + +Container.registerAtRule = dependant => { + AtRule = dependant +} + +Container.registerRoot = dependant => { + Root = dependant +} + +module.exports = Container +Container.default = Container + +/* c8 ignore start */ +Container.rebuild = node => { + if (node.type === 'atrule') { + Object.setPrototypeOf(node, AtRule.prototype) + } else if (node.type === 'rule') { + Object.setPrototypeOf(node, Rule.prototype) + } else if (node.type === 'decl') { + Object.setPrototypeOf(node, Declaration.prototype) + } else if (node.type === 'comment') { + Object.setPrototypeOf(node, Comment.prototype) + } else if (node.type === 'root') { + Object.setPrototypeOf(node, Root.prototype) + } + + node[my] = true + + if (node.nodes) { + node.nodes.forEach(child => { + Container.rebuild(child) + }) + } +} +/* c8 ignore stop */ diff --git a/vuetest/node_modules/postcss/lib/css-syntax-error.d.ts b/vuetest/node_modules/postcss/lib/css-syntax-error.d.ts new file mode 100644 index 0000000..e540d84 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/css-syntax-error.d.ts @@ -0,0 +1,248 @@ +import { FilePosition } from './input.js' + +declare namespace CssSyntaxError { + /** + * A position that is part of a range. + */ + export interface RangePosition { + /** + * The column number in the input. + */ + column: number + + /** + * The line number in the input. + */ + line: number + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { CssSyntaxError_ as default } +} + +/** + * The CSS parser throws this error for broken CSS. + * + * Custom parsers can throw this error for broken custom syntax using + * the `Node#error` method. + * + * PostCSS will use the input source map to detect the original error location. + * If you wrote a Sass file, compiled it to CSS and then parsed it with PostCSS, + * PostCSS will show the original position in the Sass file. + * + * If you need the position in the PostCSS input + * (e.g., to debug the previous compiler), use `error.input.file`. + * + * ```js + * // Raising error from plugin + * throw node.error('Unknown variable', { plugin: 'postcss-vars' }) + * ``` + * + * ```js + * // Catching and checking syntax error + * try { + * postcss.parse('a{') + * } catch (error) { + * if (error.name === 'CssSyntaxError') { + * error //=> CssSyntaxError + * } + * } + * ``` + */ +declare class CssSyntaxError_ extends Error { + /** + * Source column of the error. + * + * ```js + * error.column //=> 1 + * error.input.column //=> 4 + * ``` + * + * PostCSS will use the input source map to detect the original location. + * If you need the position in the PostCSS input, use `error.input.column`. + */ + column?: number + + /** + * Source column of the error's end, exclusive. Provided if the error pertains + * to a range. + * + * ```js + * error.endColumn //=> 1 + * error.input.endColumn //=> 4 + * ``` + * + * PostCSS will use the input source map to detect the original location. + * If you need the position in the PostCSS input, use `error.input.endColumn`. + */ + endColumn?: number + + /** + * Source line of the error's end, exclusive. Provided if the error pertains + * to a range. + * + * ```js + * error.endLine //=> 3 + * error.input.endLine //=> 4 + * ``` + * + * PostCSS will use the input source map to detect the original location. + * If you need the position in the PostCSS input, use `error.input.endLine`. + */ + endLine?: number + + /** + * Absolute path to the broken file. + * + * ```js + * error.file //=> 'a.sass' + * error.input.file //=> 'a.css' + * ``` + * + * PostCSS will use the input source map to detect the original location. + * If you need the position in the PostCSS input, use `error.input.file`. + */ + file?: string + + /** + * Input object with PostCSS internal information + * about input file. If input has source map + * from previous tool, PostCSS will use origin + * (for example, Sass) source. You can use this + * object to get PostCSS input source. + * + * ```js + * error.input.file //=> 'a.css' + * error.file //=> 'a.sass' + * ``` + */ + input?: FilePosition + + /** + * Source line of the error. + * + * ```js + * error.line //=> 2 + * error.input.line //=> 4 + * ``` + * + * PostCSS will use the input source map to detect the original location. + * If you need the position in the PostCSS input, use `error.input.line`. + */ + line?: number + + /** + * Full error text in the GNU error format + * with plugin, file, line and column. + * + * ```js + * error.message //=> 'a.css:1:1: Unclosed block' + * ``` + */ + message: string + + /** + * Always equal to `'CssSyntaxError'`. You should always check error type + * by `error.name === 'CssSyntaxError'` + * instead of `error instanceof CssSyntaxError`, + * because npm could have several PostCSS versions. + * + * ```js + * if (error.name === 'CssSyntaxError') { + * error //=> CssSyntaxError + * } + * ``` + */ + name: 'CssSyntaxError' + + /** + * Plugin name, if error came from plugin. + * + * ```js + * error.plugin //=> 'postcss-vars' + * ``` + */ + plugin?: string + + /** + * Error message. + * + * ```js + * error.message //=> 'Unclosed block' + * ``` + */ + reason: string + + /** + * Source code of the broken file. + * + * ```js + * error.source //=> 'a { b {} }' + * error.input.source //=> 'a b { }' + * ``` + */ + source?: string + + stack: string + + /** + * Instantiates a CSS syntax error. Can be instantiated for a single position + * or for a range. + * @param message Error message. + * @param lineOrStartPos If for a single position, the line number, or if for + * a range, the inclusive start position of the error. + * @param columnOrEndPos If for a single position, the column number, or if for + * a range, the exclusive end position of the error. + * @param source Source code of the broken file. + * @param file Absolute path to the broken file. + * @param plugin PostCSS plugin name, if error came from plugin. + */ + constructor( + message: string, + lineOrStartPos?: CssSyntaxError.RangePosition | number, + columnOrEndPos?: CssSyntaxError.RangePosition | number, + source?: string, + file?: string, + plugin?: string + ) + + /** + * Returns a few lines of CSS source that caused the error. + * + * If the CSS has an input source map without `sourceContent`, + * this method will return an empty string. + * + * ```js + * error.showSourceCode() //=> " 4 | } + * // 5 | a { + * // > 6 | bad + * // | ^ + * // 7 | } + * // 8 | b {" + * ``` + * + * @param color Whether arrow will be colored red by terminal + * color codes. By default, PostCSS will detect + * color support by `process.stdout.isTTY` + * and `process.env.NODE_DISABLE_COLORS`. + * @return Few lines of CSS source that caused the error. + */ + showSourceCode(color?: boolean): string + + /** + * Returns error position, message and source code of the broken part. + * + * ```js + * error.toString() //=> "CssSyntaxError: app.css:1:1: Unclosed block + * // > 1 | a { + * // | ^" + * ``` + * + * @return Error position, message and source code. + */ + toString(): string +} + +declare class CssSyntaxError extends CssSyntaxError_ {} + +export = CssSyntaxError diff --git a/vuetest/node_modules/postcss/lib/css-syntax-error.js b/vuetest/node_modules/postcss/lib/css-syntax-error.js new file mode 100644 index 0000000..275a4f6 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/css-syntax-error.js @@ -0,0 +1,133 @@ +'use strict' + +let pico = require('picocolors') + +let terminalHighlight = require('./terminal-highlight') + +class CssSyntaxError extends Error { + constructor(message, line, column, source, file, plugin) { + super(message) + this.name = 'CssSyntaxError' + this.reason = message + + if (file) { + this.file = file + } + if (source) { + this.source = source + } + if (plugin) { + this.plugin = plugin + } + if (typeof line !== 'undefined' && typeof column !== 'undefined') { + if (typeof line === 'number') { + this.line = line + this.column = column + } else { + this.line = line.line + this.column = line.column + this.endLine = column.line + this.endColumn = column.column + } + } + + this.setMessage() + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, CssSyntaxError) + } + } + + setMessage() { + this.message = this.plugin ? this.plugin + ': ' : '' + this.message += this.file ? this.file : '<css input>' + if (typeof this.line !== 'undefined') { + this.message += ':' + this.line + ':' + this.column + } + this.message += ': ' + this.reason + } + + showSourceCode(color) { + if (!this.source) return '' + + let css = this.source + if (color == null) color = pico.isColorSupported + + let aside = text => text + let mark = text => text + let highlight = text => text + if (color) { + let { bold, gray, red } = pico.createColors(true) + mark = text => bold(red(text)) + aside = text => gray(text) + if (terminalHighlight) { + highlight = text => terminalHighlight(text) + } + } + + let lines = css.split(/\r?\n/) + let start = Math.max(this.line - 3, 0) + let end = Math.min(this.line + 2, lines.length) + let maxWidth = String(end).length + + return lines + .slice(start, end) + .map((line, index) => { + let number = start + 1 + index + let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | ' + if (number === this.line) { + if (line.length > 160) { + let padding = 20 + let subLineStart = Math.max(0, this.column - padding) + let subLineEnd = Math.max( + this.column + padding, + this.endColumn + padding + ) + let subLine = line.slice(subLineStart, subLineEnd) + + let spacing = + aside(gutter.replace(/\d/g, ' ')) + + line + .slice(0, Math.min(this.column - 1, padding - 1)) + .replace(/[^\t]/g, ' ') + + return ( + mark('>') + + aside(gutter) + + highlight(subLine) + + '\n ' + + spacing + + mark('^') + ) + } + + let spacing = + aside(gutter.replace(/\d/g, ' ')) + + line.slice(0, this.column - 1).replace(/[^\t]/g, ' ') + + return ( + mark('>') + + aside(gutter) + + highlight(line) + + '\n ' + + spacing + + mark('^') + ) + } + + return ' ' + aside(gutter) + highlight(line) + }) + .join('\n') + } + + toString() { + let code = this.showSourceCode() + if (code) { + code = '\n\n' + code + '\n' + } + return this.name + ': ' + this.message + code + } +} + +module.exports = CssSyntaxError +CssSyntaxError.default = CssSyntaxError diff --git a/vuetest/node_modules/postcss/lib/declaration.d.ts b/vuetest/node_modules/postcss/lib/declaration.d.ts new file mode 100644 index 0000000..e707ad6 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/declaration.d.ts @@ -0,0 +1,151 @@ +import { ContainerWithChildren } from './container.js' +import Node from './node.js' + +declare namespace Declaration { + export interface DeclarationRaws extends Record<string, unknown> { + /** + * The space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + */ + before?: string + + /** + * The symbols between the property and value for declarations. + */ + between?: string + + /** + * The content of the important statement, if it is not just `!important`. + */ + important?: string + + /** + * Declaration value with comments. + */ + value?: { + raw: string + value: string + } + } + + export interface DeclarationProps { + /** Whether the declaration has an `!important` annotation. */ + important?: boolean + /** Name of the declaration. */ + prop: string + /** Information used to generate byte-to-byte equal node string as it was in the origin input. */ + raws?: DeclarationRaws + /** Value of the declaration. */ + value: string + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Declaration_ as default } +} + +/** + * It represents a class that handles + * [CSS declarations](https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax#css_declarations) + * + * ```js + * Once (root, { Declaration }) { + * const color = new Declaration({ prop: 'color', value: 'black' }) + * root.append(color) + * } + * ``` + * + * ```js + * const root = postcss.parse('a { color: black }') + * const decl = root.first?.first + * + * decl.type //=> 'decl' + * decl.toString() //=> ' color: black' + * ``` + */ +declare class Declaration_ extends Node { + parent: ContainerWithChildren | undefined + raws: Declaration.DeclarationRaws + + type: 'decl' + + constructor(defaults?: Declaration.DeclarationProps) + assign(overrides: Declaration.DeclarationProps | object): this + + clone(overrides?: Partial<Declaration.DeclarationProps>): this + + cloneAfter(overrides?: Partial<Declaration.DeclarationProps>): this + + cloneBefore(overrides?: Partial<Declaration.DeclarationProps>): this + /** + * It represents a specificity of the declaration. + * + * If true, the CSS declaration will have an + * [important](https://developer.mozilla.org/en-US/docs/Web/CSS/important) + * specifier. + * + * ```js + * const root = postcss.parse('a { color: black !important; color: red }') + * + * root.first.first.important //=> true + * root.first.last.important //=> undefined + * ``` + */ + get important(): boolean + + set important(value: boolean) + /** + * The property name for a CSS declaration. + * + * ```js + * const root = postcss.parse('a { color: black }') + * const decl = root.first.first + * + * decl.prop //=> 'color' + * ``` + */ + get prop(): string + + set prop(value: string) + /** + * The property value for a CSS declaration. + * + * Any CSS comments inside the value string will be filtered out. + * CSS comments present in the source value will be available in + * the `raws` property. + * + * Assigning new `value` would ignore the comments in `raws` + * property while compiling node to string. + * + * ```js + * const root = postcss.parse('a { color: black }') + * const decl = root.first.first + * + * decl.value //=> 'black' + * ``` + */ + get value(): string + set value(value: string) + /** + * It represents a getter that returns `true` if a declaration starts with + * `--` or `$`, which are used to declare variables in CSS and SASS/SCSS. + * + * ```js + * const root = postcss.parse(':root { --one: 1 }') + * const one = root.first.first + * + * one.variable //=> true + * ``` + * + * ```js + * const root = postcss.parse('$one: 1') + * const one = root.first + * + * one.variable //=> true + * ``` + */ + get variable(): boolean +} + +declare class Declaration extends Declaration_ {} + +export = Declaration diff --git a/vuetest/node_modules/postcss/lib/declaration.js b/vuetest/node_modules/postcss/lib/declaration.js new file mode 100644 index 0000000..a04bdec --- /dev/null +++ b/vuetest/node_modules/postcss/lib/declaration.js @@ -0,0 +1,24 @@ +'use strict' + +let Node = require('./node') + +class Declaration extends Node { + constructor(defaults) { + if ( + defaults && + typeof defaults.value !== 'undefined' && + typeof defaults.value !== 'string' + ) { + defaults = { ...defaults, value: String(defaults.value) } + } + super(defaults) + this.type = 'decl' + } + + get variable() { + return this.prop.startsWith('--') || this.prop[0] === '$' + } +} + +module.exports = Declaration +Declaration.default = Declaration diff --git a/vuetest/node_modules/postcss/lib/document.d.ts b/vuetest/node_modules/postcss/lib/document.d.ts new file mode 100644 index 0000000..f9e8063 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/document.d.ts @@ -0,0 +1,69 @@ +import Container, { ContainerProps } from './container.js' +import { ProcessOptions } from './postcss.js' +import Result from './result.js' +import Root from './root.js' + +declare namespace Document { + export interface DocumentProps extends ContainerProps { + nodes?: readonly Root[] + + /** + * Information to generate byte-to-byte equal node string as it was + * in the origin input. + * + * Every parser saves its own properties. + */ + raws?: Record<string, any> + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Document_ as default } +} + +/** + * Represents a file and contains all its parsed nodes. + * + * **Experimental:** some aspects of this node could change within minor + * or patch version releases. + * + * ```js + * const document = htmlParser( + * '<html><style>a{color:black}</style><style>b{z-index:2}</style>' + * ) + * document.type //=> 'document' + * document.nodes.length //=> 2 + * ``` + */ +declare class Document_ extends Container<Root> { + nodes: Root[] + parent: undefined + type: 'document' + + constructor(defaults?: Document.DocumentProps) + + assign(overrides: Document.DocumentProps | object): this + clone(overrides?: Partial<Document.DocumentProps>): this + cloneAfter(overrides?: Partial<Document.DocumentProps>): this + cloneBefore(overrides?: Partial<Document.DocumentProps>): this + + /** + * Returns a `Result` instance representing the document’s CSS roots. + * + * ```js + * const root1 = postcss.parse(css1, { from: 'a.css' }) + * const root2 = postcss.parse(css2, { from: 'b.css' }) + * const document = postcss.document() + * document.append(root1) + * document.append(root2) + * const result = document.toResult({ to: 'all.css', map: true }) + * ``` + * + * @param opts Options. + * @return Result with current document’s CSS. + */ + toResult(options?: ProcessOptions): Result +} + +declare class Document extends Document_ {} + +export = Document diff --git a/vuetest/node_modules/postcss/lib/document.js b/vuetest/node_modules/postcss/lib/document.js new file mode 100644 index 0000000..4468991 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/document.js @@ -0,0 +1,33 @@ +'use strict' + +let Container = require('./container') + +let LazyResult, Processor + +class Document extends Container { + constructor(defaults) { + // type needs to be passed to super, otherwise child roots won't be normalized correctly + super({ type: 'document', ...defaults }) + + if (!this.nodes) { + this.nodes = [] + } + } + + toResult(opts = {}) { + let lazy = new LazyResult(new Processor(), this, opts) + + return lazy.stringify() + } +} + +Document.registerLazyResult = dependant => { + LazyResult = dependant +} + +Document.registerProcessor = dependant => { + Processor = dependant +} + +module.exports = Document +Document.default = Document diff --git a/vuetest/node_modules/postcss/lib/fromJSON.d.ts b/vuetest/node_modules/postcss/lib/fromJSON.d.ts new file mode 100644 index 0000000..e1deedb --- /dev/null +++ b/vuetest/node_modules/postcss/lib/fromJSON.d.ts @@ -0,0 +1,9 @@ +import { JSONHydrator } from './postcss.js' + +interface FromJSON extends JSONHydrator { + default: FromJSON +} + +declare const fromJSON: FromJSON + +export = fromJSON diff --git a/vuetest/node_modules/postcss/lib/fromJSON.js b/vuetest/node_modules/postcss/lib/fromJSON.js new file mode 100644 index 0000000..c9ac1a8 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/fromJSON.js @@ -0,0 +1,54 @@ +'use strict' + +let AtRule = require('./at-rule') +let Comment = require('./comment') +let Declaration = require('./declaration') +let Input = require('./input') +let PreviousMap = require('./previous-map') +let Root = require('./root') +let Rule = require('./rule') + +function fromJSON(json, inputs) { + if (Array.isArray(json)) return json.map(n => fromJSON(n)) + + let { inputs: ownInputs, ...defaults } = json + if (ownInputs) { + inputs = [] + for (let input of ownInputs) { + let inputHydrated = { ...input, __proto__: Input.prototype } + if (inputHydrated.map) { + inputHydrated.map = { + ...inputHydrated.map, + __proto__: PreviousMap.prototype + } + } + inputs.push(inputHydrated) + } + } + if (defaults.nodes) { + defaults.nodes = json.nodes.map(n => fromJSON(n, inputs)) + } + if (defaults.source) { + let { inputId, ...source } = defaults.source + defaults.source = source + if (inputId != null) { + defaults.source.input = inputs[inputId] + } + } + if (defaults.type === 'root') { + return new Root(defaults) + } else if (defaults.type === 'decl') { + return new Declaration(defaults) + } else if (defaults.type === 'rule') { + return new Rule(defaults) + } else if (defaults.type === 'comment') { + return new Comment(defaults) + } else if (defaults.type === 'atrule') { + return new AtRule(defaults) + } else { + throw new Error('Unknown node type: ' + json.type) + } +} + +module.exports = fromJSON +fromJSON.default = fromJSON diff --git a/vuetest/node_modules/postcss/lib/input.d.ts b/vuetest/node_modules/postcss/lib/input.d.ts new file mode 100644 index 0000000..e45f7e9 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/input.d.ts @@ -0,0 +1,208 @@ +import { CssSyntaxError, ProcessOptions } from './postcss.js' +import PreviousMap from './previous-map.js' + +declare namespace Input { + export interface FilePosition { + /** + * Column of inclusive start position in source file. + */ + column: number + + /** + * Column of exclusive end position in source file. + */ + endColumn?: number + + /** + * Line of exclusive end position in source file. + */ + endLine?: number + + /** + * Absolute path to the source file. + */ + file?: string + + /** + * Line of inclusive start position in source file. + */ + line: number + + /** + * Source code. + */ + source?: string + + /** + * URL for the source file. + */ + url: string + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Input_ as default } +} + +/** + * Represents the source CSS. + * + * ```js + * const root = postcss.parse(css, { from: file }) + * const input = root.source.input + * ``` + */ +declare class Input_ { + /** + * Input CSS source. + * + * ```js + * const input = postcss.parse('a{}', { from: file }).input + * input.css //=> "a{}" + * ``` + */ + css: string + + /** + * Input source with support for non-CSS documents. + * + * ```js + * const input = postcss.parse('a{}', { from: file, document: '<style>a {}</style>' }).input + * input.document //=> "<style>a {}</style>" + * input.css //=> "a{}" + * ``` + */ + document: string + + /** + * The absolute path to the CSS source file defined + * with the `from` option. + * + * ```js + * const root = postcss.parse(css, { from: 'a.css' }) + * root.source.input.file //=> '/home/ai/a.css' + * ``` + */ + file?: string + + /** + * The flag to indicate whether or not the source code has Unicode BOM. + */ + hasBOM: boolean + + /** + * The unique ID of the CSS source. It will be created if `from` option + * is not provided (because PostCSS does not know the file path). + * + * ```js + * const root = postcss.parse(css) + * root.source.input.file //=> undefined + * root.source.input.id //=> "<input css 8LZeVF>" + * ``` + */ + id?: string + + /** + * The input source map passed from a compilation step before PostCSS + * (for example, from Sass compiler). + * + * ```js + * root.source.input.map.consumer().sources //=> ['a.sass'] + * ``` + */ + map: PreviousMap + + /** + * @param css Input CSS source. + * @param opts Process options. + */ + constructor(css: string, opts?: ProcessOptions) + + error( + message: string, + start: + | { + column: number + line: number + } + | { + offset: number + }, + end: + | { + column: number + line: number + } + | { + offset: number + }, + opts?: { plugin?: CssSyntaxError['plugin'] } + ): CssSyntaxError + + /** + * Returns `CssSyntaxError` with information about the error and its position. + */ + error( + message: string, + line: number, + column: number, + opts?: { plugin?: CssSyntaxError['plugin'] } + ): CssSyntaxError + + error( + message: string, + offset: number, + opts?: { plugin?: CssSyntaxError['plugin'] } + ): CssSyntaxError + + /** + * Converts source offset to line and column. + * + * @param offset Source offset. + */ + fromOffset(offset: number): { col: number; line: number } | null + /** + * Reads the input source map and returns a symbol position + * in the input source (e.g., in a Sass file that was compiled + * to CSS before being passed to PostCSS). Optionally takes an + * end position, exclusive. + * + * ```js + * root.source.input.origin(1, 1) //=> { file: 'a.css', line: 3, column: 1 } + * root.source.input.origin(1, 1, 1, 4) + * //=> { file: 'a.css', line: 3, column: 1, endLine: 3, endColumn: 4 } + * ``` + * + * @param line Line for inclusive start position in input CSS. + * @param column Column for inclusive start position in input CSS. + * @param endLine Line for exclusive end position in input CSS. + * @param endColumn Column for exclusive end position in input CSS. + * + * @return Position in input source. + */ + origin( + line: number, + column: number, + endLine?: number, + endColumn?: number + ): false | Input.FilePosition + /** Converts this to a JSON-friendly object representation. */ + toJSON(): object + + /** + * The CSS source identifier. Contains `Input#file` if the user + * set the `from` option, or `Input#id` if they did not. + * + * ```js + * const root = postcss.parse(css, { from: 'a.css' }) + * root.source.input.from //=> "/home/ai/a.css" + * + * const root = postcss.parse(css) + * root.source.input.from //=> "<input css 1>" + * ``` + */ + get from(): string +} + +declare class Input extends Input_ {} + +export = Input diff --git a/vuetest/node_modules/postcss/lib/input.js b/vuetest/node_modules/postcss/lib/input.js new file mode 100644 index 0000000..0306efc --- /dev/null +++ b/vuetest/node_modules/postcss/lib/input.js @@ -0,0 +1,251 @@ +'use strict' + +let { nanoid } = require('nanoid/non-secure') +let { isAbsolute, resolve } = require('path') +let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js') +let { fileURLToPath, pathToFileURL } = require('url') + +let CssSyntaxError = require('./css-syntax-error') +let PreviousMap = require('./previous-map') +let terminalHighlight = require('./terminal-highlight') + +let fromOffsetCache = Symbol('fromOffsetCache') + +let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator) +let pathAvailable = Boolean(resolve && isAbsolute) + +class Input { + constructor(css, opts = {}) { + if ( + css === null || + typeof css === 'undefined' || + (typeof css === 'object' && !css.toString) + ) { + throw new Error(`PostCSS received ${css} instead of CSS string`) + } + + this.css = css.toString() + + if (this.css[0] === '\uFEFF' || this.css[0] === '\uFFFE') { + this.hasBOM = true + this.css = this.css.slice(1) + } else { + this.hasBOM = false + } + + this.document = this.css + if (opts.document) this.document = opts.document.toString() + + if (opts.from) { + if ( + !pathAvailable || + /^\w+:\/\//.test(opts.from) || + isAbsolute(opts.from) + ) { + this.file = opts.from + } else { + this.file = resolve(opts.from) + } + } + + if (pathAvailable && sourceMapAvailable) { + let map = new PreviousMap(this.css, opts) + if (map.text) { + this.map = map + let file = map.consumer().file + if (!this.file && file) this.file = this.mapResolve(file) + } + } + + if (!this.file) { + this.id = '<input css ' + nanoid(6) + '>' + } + if (this.map) this.map.file = this.from + } + + error(message, line, column, opts = {}) { + let endColumn, endLine, result + + if (line && typeof line === 'object') { + let start = line + let end = column + if (typeof start.offset === 'number') { + let pos = this.fromOffset(start.offset) + line = pos.line + column = pos.col + } else { + line = start.line + column = start.column + } + if (typeof end.offset === 'number') { + let pos = this.fromOffset(end.offset) + endLine = pos.line + endColumn = pos.col + } else { + endLine = end.line + endColumn = end.column + } + } else if (!column) { + let pos = this.fromOffset(line) + line = pos.line + column = pos.col + } + + let origin = this.origin(line, column, endLine, endColumn) + if (origin) { + result = new CssSyntaxError( + message, + origin.endLine === undefined + ? origin.line + : { column: origin.column, line: origin.line }, + origin.endLine === undefined + ? origin.column + : { column: origin.endColumn, line: origin.endLine }, + origin.source, + origin.file, + opts.plugin + ) + } else { + result = new CssSyntaxError( + message, + endLine === undefined ? line : { column, line }, + endLine === undefined ? column : { column: endColumn, line: endLine }, + this.css, + this.file, + opts.plugin + ) + } + + result.input = { column, endColumn, endLine, line, source: this.css } + if (this.file) { + if (pathToFileURL) { + result.input.url = pathToFileURL(this.file).toString() + } + result.input.file = this.file + } + + return result + } + + fromOffset(offset) { + let lastLine, lineToIndex + if (!this[fromOffsetCache]) { + let lines = this.css.split('\n') + lineToIndex = new Array(lines.length) + let prevIndex = 0 + + for (let i = 0, l = lines.length; i < l; i++) { + lineToIndex[i] = prevIndex + prevIndex += lines[i].length + 1 + } + + this[fromOffsetCache] = lineToIndex + } else { + lineToIndex = this[fromOffsetCache] + } + lastLine = lineToIndex[lineToIndex.length - 1] + + let min = 0 + if (offset >= lastLine) { + min = lineToIndex.length - 1 + } else { + let max = lineToIndex.length - 2 + let mid + while (min < max) { + mid = min + ((max - min) >> 1) + if (offset < lineToIndex[mid]) { + max = mid - 1 + } else if (offset >= lineToIndex[mid + 1]) { + min = mid + 1 + } else { + min = mid + break + } + } + } + return { + col: offset - lineToIndex[min] + 1, + line: min + 1 + } + } + + mapResolve(file) { + if (/^\w+:\/\//.test(file)) { + return file + } + return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file) + } + + origin(line, column, endLine, endColumn) { + if (!this.map) return false + let consumer = this.map.consumer() + + let from = consumer.originalPositionFor({ column, line }) + if (!from.source) return false + + let to + if (typeof endLine === 'number') { + to = consumer.originalPositionFor({ column: endColumn, line: endLine }) + } + + let fromUrl + + if (isAbsolute(from.source)) { + fromUrl = pathToFileURL(from.source) + } else { + fromUrl = new URL( + from.source, + this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile) + ) + } + + let result = { + column: from.column, + endColumn: to && to.column, + endLine: to && to.line, + line: from.line, + url: fromUrl.toString() + } + + if (fromUrl.protocol === 'file:') { + if (fileURLToPath) { + result.file = fileURLToPath(fromUrl) + } else { + /* c8 ignore next 2 */ + throw new Error(`file: protocol is not available in this PostCSS build`) + } + } + + let source = consumer.sourceContentFor(from.source) + if (source) result.source = source + + return result + } + + toJSON() { + let json = {} + for (let name of ['hasBOM', 'css', 'file', 'id']) { + if (this[name] != null) { + json[name] = this[name] + } + } + if (this.map) { + json.map = { ...this.map } + if (json.map.consumerCache) { + json.map.consumerCache = undefined + } + } + return json + } + + get from() { + return this.file || this.id + } +} + +module.exports = Input +Input.default = Input + +if (terminalHighlight && terminalHighlight.registerInput) { + terminalHighlight.registerInput(Input) +} diff --git a/vuetest/node_modules/postcss/lib/lazy-result.d.ts b/vuetest/node_modules/postcss/lib/lazy-result.d.ts new file mode 100644 index 0000000..dd291aa --- /dev/null +++ b/vuetest/node_modules/postcss/lib/lazy-result.d.ts @@ -0,0 +1,190 @@ +import Document from './document.js' +import { SourceMap } from './postcss.js' +import Processor from './processor.js' +import Result, { Message, ResultOptions } from './result.js' +import Root from './root.js' +import Warning from './warning.js' + +declare namespace LazyResult { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { LazyResult_ as default } +} + +/** + * A Promise proxy for the result of PostCSS transformations. + * + * A `LazyResult` instance is returned by `Processor#process`. + * + * ```js + * const lazy = postcss([autoprefixer]).process(css) + * ``` + */ +declare class LazyResult_<RootNode = Document | Root> + implements PromiseLike<Result<RootNode>> +{ + /** + * Processes input CSS through synchronous and asynchronous plugins + * and calls onRejected for each error thrown in any plugin. + * + * It implements standard Promise API. + * + * ```js + * postcss([autoprefixer]).process(css).then(result => { + * console.log(result.css) + * }).catch(error => { + * console.error(error) + * }) + * ``` + */ + catch: Promise<Result<RootNode>>['catch'] + + /** + * Processes input CSS through synchronous and asynchronous plugins + * and calls onFinally on any error or when all plugins will finish work. + * + * It implements standard Promise API. + * + * ```js + * postcss([autoprefixer]).process(css).finally(() => { + * console.log('processing ended') + * }) + * ``` + */ + finally: Promise<Result<RootNode>>['finally'] + + /** + * Processes input CSS through synchronous and asynchronous plugins + * and calls `onFulfilled` with a Result instance. If a plugin throws + * an error, the `onRejected` callback will be executed. + * + * It implements standard Promise API. + * + * ```js + * postcss([autoprefixer]).process(css, { from: cssPath }).then(result => { + * console.log(result.css) + * }) + * ``` + */ + then: Promise<Result<RootNode>>['then'] + + /** + * @param processor Processor used for this transformation. + * @param css CSS to parse and transform. + * @param opts Options from the `Processor#process` or `Root#toResult`. + */ + constructor(processor: Processor, css: string, opts: ResultOptions) + + /** + * Run plugin in async way and return `Result`. + * + * @return Result with output content. + */ + async(): Promise<Result<RootNode>> + + /** + * Run plugin in sync way and return `Result`. + * + * @return Result with output content. + */ + sync(): Result<RootNode> + + /** + * Alias for the `LazyResult#css` property. + * + * ```js + * lazy + '' === lazy.css + * ``` + * + * @return Output CSS. + */ + toString(): string + + /** + * Processes input CSS through synchronous plugins + * and calls `Result#warnings`. + * + * @return Warnings from plugins. + */ + warnings(): Warning[] + + /** + * An alias for the `css` property. Use it with syntaxes + * that generate non-CSS output. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get content(): string + + /** + * Processes input CSS through synchronous plugins, converts `Root` + * to a CSS string and returns `Result#css`. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get css(): string + + /** + * Processes input CSS through synchronous plugins + * and returns `Result#map`. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get map(): SourceMap + + /** + * Processes input CSS through synchronous plugins + * and returns `Result#messages`. + * + * This property will only work with synchronous plugins. If the processor + * contains any asynchronous plugins it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get messages(): Message[] + + /** + * Options from the `Processor#process` call. + */ + get opts(): ResultOptions + + /** + * Returns a `Processor` instance, which will be used + * for CSS transformations. + */ + get processor(): Processor + + /** + * Processes input CSS through synchronous plugins + * and returns `Result#root`. + * + * This property will only work with synchronous plugins. If the processor + * contains any asynchronous plugins it will throw an error. + * + * PostCSS runners should always use `LazyResult#then`. + */ + get root(): RootNode + + /** + * Returns the default string description of an object. + * Required to implement the Promise interface. + */ + get [Symbol.toStringTag](): string +} + +declare class LazyResult< + RootNode = Document | Root +> extends LazyResult_<RootNode> {} + +export = LazyResult diff --git a/vuetest/node_modules/postcss/lib/lazy-result.js b/vuetest/node_modules/postcss/lib/lazy-result.js new file mode 100644 index 0000000..e27701d --- /dev/null +++ b/vuetest/node_modules/postcss/lib/lazy-result.js @@ -0,0 +1,550 @@ +'use strict' + +let Container = require('./container') +let Document = require('./document') +let MapGenerator = require('./map-generator') +let parse = require('./parse') +let Result = require('./result') +let Root = require('./root') +let stringify = require('./stringify') +let { isClean, my } = require('./symbols') +let warnOnce = require('./warn-once') + +const TYPE_TO_CLASS_NAME = { + atrule: 'AtRule', + comment: 'Comment', + decl: 'Declaration', + document: 'Document', + root: 'Root', + rule: 'Rule' +} + +const PLUGIN_PROPS = { + AtRule: true, + AtRuleExit: true, + Comment: true, + CommentExit: true, + Declaration: true, + DeclarationExit: true, + Document: true, + DocumentExit: true, + Once: true, + OnceExit: true, + postcssPlugin: true, + prepare: true, + Root: true, + RootExit: true, + Rule: true, + RuleExit: true +} + +const NOT_VISITORS = { + Once: true, + postcssPlugin: true, + prepare: true +} + +const CHILDREN = 0 + +function isPromise(obj) { + return typeof obj === 'object' && typeof obj.then === 'function' +} + +function getEvents(node) { + let key = false + let type = TYPE_TO_CLASS_NAME[node.type] + if (node.type === 'decl') { + key = node.prop.toLowerCase() + } else if (node.type === 'atrule') { + key = node.name.toLowerCase() + } + + if (key && node.append) { + return [ + type, + type + '-' + key, + CHILDREN, + type + 'Exit', + type + 'Exit-' + key + ] + } else if (key) { + return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key] + } else if (node.append) { + return [type, CHILDREN, type + 'Exit'] + } else { + return [type, type + 'Exit'] + } +} + +function toStack(node) { + let events + if (node.type === 'document') { + events = ['Document', CHILDREN, 'DocumentExit'] + } else if (node.type === 'root') { + events = ['Root', CHILDREN, 'RootExit'] + } else { + events = getEvents(node) + } + + return { + eventIndex: 0, + events, + iterator: 0, + node, + visitorIndex: 0, + visitors: [] + } +} + +function cleanMarks(node) { + node[isClean] = false + if (node.nodes) node.nodes.forEach(i => cleanMarks(i)) + return node +} + +let postcss = {} + +class LazyResult { + constructor(processor, css, opts) { + this.stringified = false + this.processed = false + + let root + if ( + typeof css === 'object' && + css !== null && + (css.type === 'root' || css.type === 'document') + ) { + root = cleanMarks(css) + } else if (css instanceof LazyResult || css instanceof Result) { + root = cleanMarks(css.root) + if (css.map) { + if (typeof opts.map === 'undefined') opts.map = {} + if (!opts.map.inline) opts.map.inline = false + opts.map.prev = css.map + } + } else { + let parser = parse + if (opts.syntax) parser = opts.syntax.parse + if (opts.parser) parser = opts.parser + if (parser.parse) parser = parser.parse + + try { + root = parser(css, opts) + } catch (error) { + this.processed = true + this.error = error + } + + if (root && !root[my]) { + /* c8 ignore next 2 */ + Container.rebuild(root) + } + } + + this.result = new Result(processor, root, opts) + this.helpers = { ...postcss, postcss, result: this.result } + this.plugins = this.processor.plugins.map(plugin => { + if (typeof plugin === 'object' && plugin.prepare) { + return { ...plugin, ...plugin.prepare(this.result) } + } else { + return plugin + } + }) + } + + async() { + if (this.error) return Promise.reject(this.error) + if (this.processed) return Promise.resolve(this.result) + if (!this.processing) { + this.processing = this.runAsync() + } + return this.processing + } + + catch(onRejected) { + return this.async().catch(onRejected) + } + + finally(onFinally) { + return this.async().then(onFinally, onFinally) + } + + getAsyncError() { + throw new Error('Use process(css).then(cb) to work with async plugins') + } + + handleError(error, node) { + let plugin = this.result.lastPlugin + try { + if (node) node.addToError(error) + this.error = error + if (error.name === 'CssSyntaxError' && !error.plugin) { + error.plugin = plugin.postcssPlugin + error.setMessage() + } else if (plugin.postcssVersion) { + if (process.env.NODE_ENV !== 'production') { + let pluginName = plugin.postcssPlugin + let pluginVer = plugin.postcssVersion + let runtimeVer = this.result.processor.version + let a = pluginVer.split('.') + let b = runtimeVer.split('.') + + if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) { + // eslint-disable-next-line no-console + console.error( + 'Unknown error from PostCSS plugin. Your current PostCSS ' + + 'version is ' + + runtimeVer + + ', but ' + + pluginName + + ' uses ' + + pluginVer + + '. Perhaps this is the source of the error below.' + ) + } + } + } + } catch (err) { + /* c8 ignore next 3 */ + // eslint-disable-next-line no-console + if (console && console.error) console.error(err) + } + return error + } + + prepareVisitors() { + this.listeners = {} + let add = (plugin, type, cb) => { + if (!this.listeners[type]) this.listeners[type] = [] + this.listeners[type].push([plugin, cb]) + } + for (let plugin of this.plugins) { + if (typeof plugin === 'object') { + for (let event in plugin) { + if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) { + throw new Error( + `Unknown event ${event} in ${plugin.postcssPlugin}. ` + + `Try to update PostCSS (${this.processor.version} now).` + ) + } + if (!NOT_VISITORS[event]) { + if (typeof plugin[event] === 'object') { + for (let filter in plugin[event]) { + if (filter === '*') { + add(plugin, event, plugin[event][filter]) + } else { + add( + plugin, + event + '-' + filter.toLowerCase(), + plugin[event][filter] + ) + } + } + } else if (typeof plugin[event] === 'function') { + add(plugin, event, plugin[event]) + } + } + } + } + } + this.hasListener = Object.keys(this.listeners).length > 0 + } + + async runAsync() { + this.plugin = 0 + for (let i = 0; i < this.plugins.length; i++) { + let plugin = this.plugins[i] + let promise = this.runOnRoot(plugin) + if (isPromise(promise)) { + try { + await promise + } catch (error) { + throw this.handleError(error) + } + } + } + + this.prepareVisitors() + if (this.hasListener) { + let root = this.result.root + while (!root[isClean]) { + root[isClean] = true + let stack = [toStack(root)] + while (stack.length > 0) { + let promise = this.visitTick(stack) + if (isPromise(promise)) { + try { + await promise + } catch (e) { + let node = stack[stack.length - 1].node + throw this.handleError(e, node) + } + } + } + } + + if (this.listeners.OnceExit) { + for (let [plugin, visitor] of this.listeners.OnceExit) { + this.result.lastPlugin = plugin + try { + if (root.type === 'document') { + let roots = root.nodes.map(subRoot => + visitor(subRoot, this.helpers) + ) + + await Promise.all(roots) + } else { + await visitor(root, this.helpers) + } + } catch (e) { + throw this.handleError(e) + } + } + } + } + + this.processed = true + return this.stringify() + } + + runOnRoot(plugin) { + this.result.lastPlugin = plugin + try { + if (typeof plugin === 'object' && plugin.Once) { + if (this.result.root.type === 'document') { + let roots = this.result.root.nodes.map(root => + plugin.Once(root, this.helpers) + ) + + if (isPromise(roots[0])) { + return Promise.all(roots) + } + + return roots + } + + return plugin.Once(this.result.root, this.helpers) + } else if (typeof plugin === 'function') { + return plugin(this.result.root, this.result) + } + } catch (error) { + throw this.handleError(error) + } + } + + stringify() { + if (this.error) throw this.error + if (this.stringified) return this.result + this.stringified = true + + this.sync() + + let opts = this.result.opts + let str = stringify + if (opts.syntax) str = opts.syntax.stringify + if (opts.stringifier) str = opts.stringifier + if (str.stringify) str = str.stringify + + let map = new MapGenerator(str, this.result.root, this.result.opts) + let data = map.generate() + this.result.css = data[0] + this.result.map = data[1] + + return this.result + } + + sync() { + if (this.error) throw this.error + if (this.processed) return this.result + this.processed = true + + if (this.processing) { + throw this.getAsyncError() + } + + for (let plugin of this.plugins) { + let promise = this.runOnRoot(plugin) + if (isPromise(promise)) { + throw this.getAsyncError() + } + } + + this.prepareVisitors() + if (this.hasListener) { + let root = this.result.root + while (!root[isClean]) { + root[isClean] = true + this.walkSync(root) + } + if (this.listeners.OnceExit) { + if (root.type === 'document') { + for (let subRoot of root.nodes) { + this.visitSync(this.listeners.OnceExit, subRoot) + } + } else { + this.visitSync(this.listeners.OnceExit, root) + } + } + } + + return this.result + } + + then(onFulfilled, onRejected) { + if (process.env.NODE_ENV !== 'production') { + if (!('from' in this.opts)) { + warnOnce( + 'Without `from` option PostCSS could generate wrong source map ' + + 'and will not find Browserslist config. Set it to CSS file path ' + + 'or to `undefined` to prevent this warning.' + ) + } + } + return this.async().then(onFulfilled, onRejected) + } + + toString() { + return this.css + } + + visitSync(visitors, node) { + for (let [plugin, visitor] of visitors) { + this.result.lastPlugin = plugin + let promise + try { + promise = visitor(node, this.helpers) + } catch (e) { + throw this.handleError(e, node.proxyOf) + } + if (node.type !== 'root' && node.type !== 'document' && !node.parent) { + return true + } + if (isPromise(promise)) { + throw this.getAsyncError() + } + } + } + + visitTick(stack) { + let visit = stack[stack.length - 1] + let { node, visitors } = visit + + if (node.type !== 'root' && node.type !== 'document' && !node.parent) { + stack.pop() + return + } + + if (visitors.length > 0 && visit.visitorIndex < visitors.length) { + let [plugin, visitor] = visitors[visit.visitorIndex] + visit.visitorIndex += 1 + if (visit.visitorIndex === visitors.length) { + visit.visitors = [] + visit.visitorIndex = 0 + } + this.result.lastPlugin = plugin + try { + return visitor(node.toProxy(), this.helpers) + } catch (e) { + throw this.handleError(e, node) + } + } + + if (visit.iterator !== 0) { + let iterator = visit.iterator + let child + while ((child = node.nodes[node.indexes[iterator]])) { + node.indexes[iterator] += 1 + if (!child[isClean]) { + child[isClean] = true + stack.push(toStack(child)) + return + } + } + visit.iterator = 0 + delete node.indexes[iterator] + } + + let events = visit.events + while (visit.eventIndex < events.length) { + let event = events[visit.eventIndex] + visit.eventIndex += 1 + if (event === CHILDREN) { + if (node.nodes && node.nodes.length) { + node[isClean] = true + visit.iterator = node.getIterator() + } + return + } else if (this.listeners[event]) { + visit.visitors = this.listeners[event] + return + } + } + stack.pop() + } + + walkSync(node) { + node[isClean] = true + let events = getEvents(node) + for (let event of events) { + if (event === CHILDREN) { + if (node.nodes) { + node.each(child => { + if (!child[isClean]) this.walkSync(child) + }) + } + } else { + let visitors = this.listeners[event] + if (visitors) { + if (this.visitSync(visitors, node.toProxy())) return + } + } + } + } + + warnings() { + return this.sync().warnings() + } + + get content() { + return this.stringify().content + } + + get css() { + return this.stringify().css + } + + get map() { + return this.stringify().map + } + + get messages() { + return this.sync().messages + } + + get opts() { + return this.result.opts + } + + get processor() { + return this.result.processor + } + + get root() { + return this.sync().root + } + + get [Symbol.toStringTag]() { + return 'LazyResult' + } +} + +LazyResult.registerPostcss = dependant => { + postcss = dependant +} + +module.exports = LazyResult +LazyResult.default = LazyResult + +Root.registerLazyResult(LazyResult) +Document.registerLazyResult(LazyResult) diff --git a/vuetest/node_modules/postcss/lib/list.d.ts b/vuetest/node_modules/postcss/lib/list.d.ts new file mode 100644 index 0000000..e262ad3 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/list.d.ts @@ -0,0 +1,60 @@ +declare namespace list { + type List = { + /** + * Safely splits comma-separated values (such as those for `transition-*` + * and `background` properties). + * + * ```js + * Once (root, { list }) { + * list.comma('black, linear-gradient(white, black)') + * //=> ['black', 'linear-gradient(white, black)'] + * } + * ``` + * + * @param str Comma-separated values. + * @return Split values. + */ + comma(str: string): string[] + + default: List + + /** + * Safely splits space-separated values (such as those for `background`, + * `border-radius`, and other shorthand properties). + * + * ```js + * Once (root, { list }) { + * list.space('1px calc(10% + 1px)') //=> ['1px', 'calc(10% + 1px)'] + * } + * ``` + * + * @param str Space-separated values. + * @return Split values. + */ + space(str: string): string[] + + /** + * Safely splits values. + * + * ```js + * Once (root, { list }) { + * list.split('1px calc(10% + 1px)', [' ', '\n', '\t']) //=> ['1px', 'calc(10% + 1px)'] + * } + * ``` + * + * @param string separated values. + * @param separators array of separators. + * @param last boolean indicator. + * @return Split values. + */ + split( + string: string, + separators: readonly string[], + last: boolean + ): string[] + } +} + +declare const list: list.List + +export = list diff --git a/vuetest/node_modules/postcss/lib/list.js b/vuetest/node_modules/postcss/lib/list.js new file mode 100644 index 0000000..1b31f98 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/list.js @@ -0,0 +1,58 @@ +'use strict' + +let list = { + comma(string) { + return list.split(string, [','], true) + }, + + space(string) { + let spaces = [' ', '\n', '\t'] + return list.split(string, spaces) + }, + + split(string, separators, last) { + let array = [] + let current = '' + let split = false + + let func = 0 + let inQuote = false + let prevQuote = '' + let escape = false + + for (let letter of string) { + if (escape) { + escape = false + } else if (letter === '\\') { + escape = true + } else if (inQuote) { + if (letter === prevQuote) { + inQuote = false + } + } else if (letter === '"' || letter === "'") { + inQuote = true + prevQuote = letter + } else if (letter === '(') { + func += 1 + } else if (letter === ')') { + if (func > 0) func -= 1 + } else if (func === 0) { + if (separators.includes(letter)) split = true + } + + if (split) { + if (current !== '') array.push(current.trim()) + current = '' + split = false + } else { + current += letter + } + } + + if (last || current !== '') array.push(current.trim()) + return array + } +} + +module.exports = list +list.default = list diff --git a/vuetest/node_modules/postcss/lib/map-generator.js b/vuetest/node_modules/postcss/lib/map-generator.js new file mode 100644 index 0000000..89069d3 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/map-generator.js @@ -0,0 +1,368 @@ +'use strict' + +let { dirname, relative, resolve, sep } = require('path') +let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js') +let { pathToFileURL } = require('url') + +let Input = require('./input') + +let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator) +let pathAvailable = Boolean(dirname && resolve && relative && sep) + +class MapGenerator { + constructor(stringify, root, opts, cssString) { + this.stringify = stringify + this.mapOpts = opts.map || {} + this.root = root + this.opts = opts + this.css = cssString + this.originalCSS = cssString + this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute + + this.memoizedFileURLs = new Map() + this.memoizedPaths = new Map() + this.memoizedURLs = new Map() + } + + addAnnotation() { + let content + + if (this.isInline()) { + content = + 'data:application/json;base64,' + this.toBase64(this.map.toString()) + } else if (typeof this.mapOpts.annotation === 'string') { + content = this.mapOpts.annotation + } else if (typeof this.mapOpts.annotation === 'function') { + content = this.mapOpts.annotation(this.opts.to, this.root) + } else { + content = this.outputFile() + '.map' + } + let eol = '\n' + if (this.css.includes('\r\n')) eol = '\r\n' + + this.css += eol + '/*# sourceMappingURL=' + content + ' */' + } + + applyPrevMaps() { + for (let prev of this.previous()) { + let from = this.toUrl(this.path(prev.file)) + let root = prev.root || dirname(prev.file) + let map + + if (this.mapOpts.sourcesContent === false) { + map = new SourceMapConsumer(prev.text) + if (map.sourcesContent) { + map.sourcesContent = null + } + } else { + map = prev.consumer() + } + + this.map.applySourceMap(map, from, this.toUrl(this.path(root))) + } + } + + clearAnnotation() { + if (this.mapOpts.annotation === false) return + + if (this.root) { + let node + for (let i = this.root.nodes.length - 1; i >= 0; i--) { + node = this.root.nodes[i] + if (node.type !== 'comment') continue + if (node.text.startsWith('# sourceMappingURL=')) { + this.root.removeChild(i) + } + } + } else if (this.css) { + this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, '') + } + } + + generate() { + this.clearAnnotation() + if (pathAvailable && sourceMapAvailable && this.isMap()) { + return this.generateMap() + } else { + let result = '' + this.stringify(this.root, i => { + result += i + }) + return [result] + } + } + + generateMap() { + if (this.root) { + this.generateString() + } else if (this.previous().length === 1) { + let prev = this.previous()[0].consumer() + prev.file = this.outputFile() + this.map = SourceMapGenerator.fromSourceMap(prev, { + ignoreInvalidMapping: true + }) + } else { + this.map = new SourceMapGenerator({ + file: this.outputFile(), + ignoreInvalidMapping: true + }) + this.map.addMapping({ + generated: { column: 0, line: 1 }, + original: { column: 0, line: 1 }, + source: this.opts.from + ? this.toUrl(this.path(this.opts.from)) + : '<no source>' + }) + } + + if (this.isSourcesContent()) this.setSourcesContent() + if (this.root && this.previous().length > 0) this.applyPrevMaps() + if (this.isAnnotation()) this.addAnnotation() + + if (this.isInline()) { + return [this.css] + } else { + return [this.css, this.map] + } + } + + generateString() { + this.css = '' + this.map = new SourceMapGenerator({ + file: this.outputFile(), + ignoreInvalidMapping: true + }) + + let line = 1 + let column = 1 + + let noSource = '<no source>' + let mapping = { + generated: { column: 0, line: 0 }, + original: { column: 0, line: 0 }, + source: '' + } + + let last, lines + this.stringify(this.root, (str, node, type) => { + this.css += str + + if (node && type !== 'end') { + mapping.generated.line = line + mapping.generated.column = column - 1 + if (node.source && node.source.start) { + mapping.source = this.sourcePath(node) + mapping.original.line = node.source.start.line + mapping.original.column = node.source.start.column - 1 + this.map.addMapping(mapping) + } else { + mapping.source = noSource + mapping.original.line = 1 + mapping.original.column = 0 + this.map.addMapping(mapping) + } + } + + lines = str.match(/\n/g) + if (lines) { + line += lines.length + last = str.lastIndexOf('\n') + column = str.length - last + } else { + column += str.length + } + + if (node && type !== 'start') { + let p = node.parent || { raws: {} } + let childless = + node.type === 'decl' || (node.type === 'atrule' && !node.nodes) + if (!childless || node !== p.last || p.raws.semicolon) { + if (node.source && node.source.end) { + mapping.source = this.sourcePath(node) + mapping.original.line = node.source.end.line + mapping.original.column = node.source.end.column - 1 + mapping.generated.line = line + mapping.generated.column = column - 2 + this.map.addMapping(mapping) + } else { + mapping.source = noSource + mapping.original.line = 1 + mapping.original.column = 0 + mapping.generated.line = line + mapping.generated.column = column - 1 + this.map.addMapping(mapping) + } + } + } + }) + } + + isAnnotation() { + if (this.isInline()) { + return true + } + if (typeof this.mapOpts.annotation !== 'undefined') { + return this.mapOpts.annotation + } + if (this.previous().length) { + return this.previous().some(i => i.annotation) + } + return true + } + + isInline() { + if (typeof this.mapOpts.inline !== 'undefined') { + return this.mapOpts.inline + } + + let annotation = this.mapOpts.annotation + if (typeof annotation !== 'undefined' && annotation !== true) { + return false + } + + if (this.previous().length) { + return this.previous().some(i => i.inline) + } + return true + } + + isMap() { + if (typeof this.opts.map !== 'undefined') { + return !!this.opts.map + } + return this.previous().length > 0 + } + + isSourcesContent() { + if (typeof this.mapOpts.sourcesContent !== 'undefined') { + return this.mapOpts.sourcesContent + } + if (this.previous().length) { + return this.previous().some(i => i.withContent()) + } + return true + } + + outputFile() { + if (this.opts.to) { + return this.path(this.opts.to) + } else if (this.opts.from) { + return this.path(this.opts.from) + } else { + return 'to.css' + } + } + + path(file) { + if (this.mapOpts.absolute) return file + if (file.charCodeAt(0) === 60 /* `<` */) return file + if (/^\w+:\/\//.test(file)) return file + let cached = this.memoizedPaths.get(file) + if (cached) return cached + + let from = this.opts.to ? dirname(this.opts.to) : '.' + + if (typeof this.mapOpts.annotation === 'string') { + from = dirname(resolve(from, this.mapOpts.annotation)) + } + + let path = relative(from, file) + this.memoizedPaths.set(file, path) + + return path + } + + previous() { + if (!this.previousMaps) { + this.previousMaps = [] + if (this.root) { + this.root.walk(node => { + if (node.source && node.source.input.map) { + let map = node.source.input.map + if (!this.previousMaps.includes(map)) { + this.previousMaps.push(map) + } + } + }) + } else { + let input = new Input(this.originalCSS, this.opts) + if (input.map) this.previousMaps.push(input.map) + } + } + + return this.previousMaps + } + + setSourcesContent() { + let already = {} + if (this.root) { + this.root.walk(node => { + if (node.source) { + let from = node.source.input.from + if (from && !already[from]) { + already[from] = true + let fromUrl = this.usesFileUrls + ? this.toFileUrl(from) + : this.toUrl(this.path(from)) + this.map.setSourceContent(fromUrl, node.source.input.css) + } + } + }) + } else if (this.css) { + let from = this.opts.from + ? this.toUrl(this.path(this.opts.from)) + : '<no source>' + this.map.setSourceContent(from, this.css) + } + } + + sourcePath(node) { + if (this.mapOpts.from) { + return this.toUrl(this.mapOpts.from) + } else if (this.usesFileUrls) { + return this.toFileUrl(node.source.input.from) + } else { + return this.toUrl(this.path(node.source.input.from)) + } + } + + toBase64(str) { + if (Buffer) { + return Buffer.from(str).toString('base64') + } else { + return window.btoa(unescape(encodeURIComponent(str))) + } + } + + toFileUrl(path) { + let cached = this.memoizedFileURLs.get(path) + if (cached) return cached + + if (pathToFileURL) { + let fileURL = pathToFileURL(path).toString() + this.memoizedFileURLs.set(path, fileURL) + + return fileURL + } else { + throw new Error( + '`map.absolute` option is not available in this PostCSS build' + ) + } + } + + toUrl(path) { + let cached = this.memoizedURLs.get(path) + if (cached) return cached + + if (sep === '\\') { + path = path.replace(/\\/g, '/') + } + + let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent) + this.memoizedURLs.set(path, url) + + return url + } +} + +module.exports = MapGenerator diff --git a/vuetest/node_modules/postcss/lib/no-work-result.d.ts b/vuetest/node_modules/postcss/lib/no-work-result.d.ts new file mode 100644 index 0000000..8039076 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/no-work-result.d.ts @@ -0,0 +1,46 @@ +import LazyResult from './lazy-result.js' +import { SourceMap } from './postcss.js' +import Processor from './processor.js' +import Result, { Message, ResultOptions } from './result.js' +import Root from './root.js' +import Warning from './warning.js' + +declare namespace NoWorkResult { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { NoWorkResult_ as default } +} + +/** + * A Promise proxy for the result of PostCSS transformations. + * This lazy result instance doesn't parse css unless `NoWorkResult#root` or `Result#root` + * are accessed. See the example below for details. + * A `NoWork` instance is returned by `Processor#process` ONLY when no plugins defined. + * + * ```js + * const noWorkResult = postcss().process(css) // No plugins are defined. + * // CSS is not parsed + * let root = noWorkResult.root // now css is parsed because we accessed the root + * ``` + */ +declare class NoWorkResult_ implements LazyResult<Root> { + catch: Promise<Result<Root>>['catch'] + finally: Promise<Result<Root>>['finally'] + then: Promise<Result<Root>>['then'] + constructor(processor: Processor, css: string, opts: ResultOptions) + async(): Promise<Result<Root>> + sync(): Result<Root> + toString(): string + warnings(): Warning[] + get content(): string + get css(): string + get map(): SourceMap + get messages(): Message[] + get opts(): ResultOptions + get processor(): Processor + get root(): Root + get [Symbol.toStringTag](): string +} + +declare class NoWorkResult extends NoWorkResult_ {} + +export = NoWorkResult diff --git a/vuetest/node_modules/postcss/lib/no-work-result.js b/vuetest/node_modules/postcss/lib/no-work-result.js new file mode 100644 index 0000000..a84d843 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/no-work-result.js @@ -0,0 +1,138 @@ +'use strict' + +let MapGenerator = require('./map-generator') +let parse = require('./parse') +const Result = require('./result') +let stringify = require('./stringify') +let warnOnce = require('./warn-once') + +class NoWorkResult { + constructor(processor, css, opts) { + css = css.toString() + this.stringified = false + + this._processor = processor + this._css = css + this._opts = opts + this._map = undefined + let root + + let str = stringify + this.result = new Result(this._processor, root, this._opts) + this.result.css = css + + let self = this + Object.defineProperty(this.result, 'root', { + get() { + return self.root + } + }) + + let map = new MapGenerator(str, root, this._opts, css) + if (map.isMap()) { + let [generatedCSS, generatedMap] = map.generate() + if (generatedCSS) { + this.result.css = generatedCSS + } + if (generatedMap) { + this.result.map = generatedMap + } + } else { + map.clearAnnotation() + this.result.css = map.css + } + } + + async() { + if (this.error) return Promise.reject(this.error) + return Promise.resolve(this.result) + } + + catch(onRejected) { + return this.async().catch(onRejected) + } + + finally(onFinally) { + return this.async().then(onFinally, onFinally) + } + + sync() { + if (this.error) throw this.error + return this.result + } + + then(onFulfilled, onRejected) { + if (process.env.NODE_ENV !== 'production') { + if (!('from' in this._opts)) { + warnOnce( + 'Without `from` option PostCSS could generate wrong source map ' + + 'and will not find Browserslist config. Set it to CSS file path ' + + 'or to `undefined` to prevent this warning.' + ) + } + } + + return this.async().then(onFulfilled, onRejected) + } + + toString() { + return this._css + } + + warnings() { + return [] + } + + get content() { + return this.result.css + } + + get css() { + return this.result.css + } + + get map() { + return this.result.map + } + + get messages() { + return [] + } + + get opts() { + return this.result.opts + } + + get processor() { + return this.result.processor + } + + get root() { + if (this._root) { + return this._root + } + + let root + let parser = parse + + try { + root = parser(this._css, this._opts) + } catch (error) { + this.error = error + } + + if (this.error) { + throw this.error + } else { + this._root = root + return root + } + } + + get [Symbol.toStringTag]() { + return 'NoWorkResult' + } +} + +module.exports = NoWorkResult +NoWorkResult.default = NoWorkResult diff --git a/vuetest/node_modules/postcss/lib/node.d.ts b/vuetest/node_modules/postcss/lib/node.d.ts new file mode 100644 index 0000000..3597670 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/node.d.ts @@ -0,0 +1,541 @@ +import AtRule = require('./at-rule.js') + +import { AtRuleProps } from './at-rule.js' +import Comment, { CommentProps } from './comment.js' +import Container, { NewChild } from './container.js' +import CssSyntaxError from './css-syntax-error.js' +import Declaration, { DeclarationProps } from './declaration.js' +import Document from './document.js' +import Input from './input.js' +import { Stringifier, Syntax } from './postcss.js' +import Result from './result.js' +import Root from './root.js' +import Rule, { RuleProps } from './rule.js' +import Warning, { WarningOptions } from './warning.js' + +declare namespace Node { + export type ChildNode = AtRule.default | Comment | Declaration | Rule + + export type AnyNode = + | AtRule.default + | Comment + | Declaration + | Document + | Root + | Rule + + export type ChildProps = + | AtRuleProps + | CommentProps + | DeclarationProps + | RuleProps + + export interface Position { + /** + * Source line in file. In contrast to `offset` it starts from 1. + */ + column: number + + /** + * Source column in file. + */ + line: number + + /** + * Source offset in file. It starts from 0. + */ + offset: number + } + + export interface Range { + /** + * End position, exclusive. + */ + end: Position + + /** + * Start position, inclusive. + */ + start: Position + } + + /** + * Source represents an interface for the {@link Node.source} property. + */ + export interface Source { + /** + * The inclusive ending position for the source + * code of a node. + */ + end?: Position + + /** + * The source file from where a node has originated. + */ + input: Input + + /** + * The inclusive starting position for the source + * code of a node. + */ + start?: Position + } + + /** + * Interface represents an interface for an object received + * as parameter by Node class constructor. + */ + export interface NodeProps { + source?: Source + } + + export interface NodeErrorOptions { + /** + * An ending index inside a node's string that should be highlighted as + * source of error. + */ + endIndex?: number + /** + * An index inside a node's string that should be highlighted as source + * of error. + */ + index?: number + /** + * Plugin name that created this error. PostCSS will set it automatically. + */ + plugin?: string + /** + * A word inside a node's string, that should be highlighted as source + * of error. + */ + word?: string + } + + // eslint-disable-next-line @typescript-eslint/no-shadow + class Node extends Node_ {} + export { Node as default } +} + +/** + * It represents an abstract class that handles common + * methods for other CSS abstract syntax tree nodes. + * + * Any node that represents CSS selector or value should + * not extend the `Node` class. + */ +declare abstract class Node_ { + /** + * It represents parent of the current node. + * + * ```js + * root.nodes[0].parent === root //=> true + * ``` + */ + parent: Container | Document | undefined + + /** + * It represents unnecessary whitespace and characters present + * in the css source code. + * + * Information to generate byte-to-byte equal node string as it was + * in the origin input. + * + * The properties of the raws object are decided by parser, + * the default parser uses the following properties: + * + * * `before`: the space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + * * `after`: the space symbols after the last child of the node + * to the end of the node. + * * `between`: the symbols between the property and value + * for declarations, selector and `{` for rules, or last parameter + * and `{` for at-rules. + * * `semicolon`: contains true if the last child has + * an (optional) semicolon. + * * `afterName`: the space between the at-rule name and its parameters. + * * `left`: the space symbols between `/*` and the comment’s text. + * * `right`: the space symbols between the comment’s text + * and <code>*/</code>. + * - `important`: the content of the important statement, + * if it is not just `!important`. + * + * PostCSS filters out the comments inside selectors, declaration values + * and at-rule parameters but it stores the origin content in raws. + * + * ```js + * const root = postcss.parse('a {\n color:black\n}') + * root.first.first.raws //=> { before: '\n ', between: ':' } + * ``` + */ + raws: any + + /** + * It represents information related to origin of a node and is required + * for generating source maps. + * + * The nodes that are created manually using the public APIs + * provided by PostCSS will have `source` undefined and + * will be absent in the source map. + * + * For this reason, the plugin developer should consider + * duplicating nodes as the duplicate node will have the + * same source as the original node by default or assign + * source to a node created manually. + * + * ```js + * decl.source.input.from //=> '/home/ai/source.css' + * decl.source.start //=> { line: 10, column: 2 } + * decl.source.end //=> { line: 10, column: 12 } + * ``` + * + * ```js + * // Incorrect method, source not specified! + * const prefixed = postcss.decl({ + * prop: '-moz-' + decl.prop, + * value: decl.value + * }) + * + * // Correct method, source is inherited when duplicating. + * const prefixed = decl.clone({ + * prop: '-moz-' + decl.prop + * }) + * ``` + * + * ```js + * if (atrule.name === 'add-link') { + * const rule = postcss.rule({ + * selector: 'a', + * source: atrule.source + * }) + * + * atrule.parent.insertBefore(atrule, rule) + * } + * ``` + */ + source?: Node.Source + + /** + * It represents type of a node in + * an abstract syntax tree. + * + * A type of node helps in identification of a node + * and perform operation based on it's type. + * + * ```js + * const declaration = new Declaration({ + * prop: 'color', + * value: 'black' + * }) + * + * declaration.type //=> 'decl' + * ``` + */ + type: string + + constructor(defaults?: object) + + /** + * If this node isn't already dirty, marks it and its ancestors as such. This + * indicates to the LazyResult processor that the {@link Root} has been + * modified by the current plugin and may need to be processed again by other + * plugins. + */ + protected markDirty(): void + + /** + * Insert new node after current node to current node’s parent. + * + * Just alias for `node.parent.insertAfter(node, add)`. + * + * ```js + * decl.after('color: black') + * ``` + * + * @param newNode New node. + * @return This node for methods chain. + */ + after( + newNode: Node | Node.ChildProps | readonly Node[] | string | undefined + ): this + + /** + * It assigns properties to an existing node instance. + * + * ```js + * decl.assign({ prop: 'word-wrap', value: 'break-word' }) + * ``` + * + * @param overrides New properties to override the node. + * + * @return `this` for method chaining. + */ + assign(overrides: object): this + + /** + * Insert new node before current node to current node’s parent. + * + * Just alias for `node.parent.insertBefore(node, add)`. + * + * ```js + * decl.before('content: ""') + * ``` + * + * @param newNode New node. + * @return This node for methods chain. + */ + before( + newNode: Node | Node.ChildProps | readonly Node[] | string | undefined + ): this + + /** + * Clear the code style properties for the node and its children. + * + * ```js + * node.raws.before //=> ' ' + * node.cleanRaws() + * node.raws.before //=> undefined + * ``` + * + * @param keepBetween Keep the `raws.between` symbols. + */ + cleanRaws(keepBetween?: boolean): void + + /** + * It creates clone of an existing node, which includes all the properties + * and their values, that includes `raws` but not `type`. + * + * ```js + * decl.raws.before //=> "\n " + * const cloned = decl.clone({ prop: '-moz-' + decl.prop }) + * cloned.raws.before //=> "\n " + * cloned.toString() //=> -moz-transform: scale(0) + * ``` + * + * @param overrides New properties to override in the clone. + * + * @return Duplicate of the node instance. + */ + clone(overrides?: object): this + + /** + * Shortcut to clone the node and insert the resulting cloned node + * after the current node. + * + * @param overrides New properties to override in the clone. + * @return New node. + */ + cloneAfter(overrides?: object): this + + /** + * Shortcut to clone the node and insert the resulting cloned node + * before the current node. + * + * ```js + * decl.cloneBefore({ prop: '-moz-' + decl.prop }) + * ``` + * + * @param overrides Mew properties to override in the clone. + * + * @return New node + */ + cloneBefore(overrides?: object): this + + /** + * It creates an instance of the class `CssSyntaxError` and parameters passed + * to this method are assigned to the error instance. + * + * The error instance will have description for the + * error, original position of the node in the + * source, showing line and column number. + * + * If any previous map is present, it would be used + * to get original position of the source. + * + * The Previous Map here is referred to the source map + * generated by previous compilation, example: Less, + * Stylus and Sass. + * + * This method returns the error instance instead of + * throwing it. + * + * ```js + * if (!variables[name]) { + * throw decl.error(`Unknown variable ${name}`, { word: name }) + * // CssSyntaxError: postcss-vars:a.sass:4:3: Unknown variable $black + * // color: $black + * // a + * // ^ + * // background: white + * } + * ``` + * + * @param message Description for the error instance. + * @param options Options for the error instance. + * + * @return Error instance is returned. + */ + error(message: string, options?: Node.NodeErrorOptions): CssSyntaxError + + /** + * Returns the next child of the node’s parent. + * Returns `undefined` if the current node is the last child. + * + * ```js + * if (comment.text === 'delete next') { + * const next = comment.next() + * if (next) { + * next.remove() + * } + * } + * ``` + * + * @return Next node. + */ + next(): Node.ChildNode | undefined + + /** + * Get the position for a word or an index inside the node. + * + * @param opts Options. + * @return Position. + */ + positionBy(opts?: Pick<WarningOptions, 'index' | 'word'>): Node.Position + + /** + * Convert string index to line/column. + * + * @param index The symbol number in the node’s string. + * @return Symbol position in file. + */ + positionInside(index: number): Node.Position + + /** + * Returns the previous child of the node’s parent. + * Returns `undefined` if the current node is the first child. + * + * ```js + * const annotation = decl.prev() + * if (annotation.type === 'comment') { + * readAnnotation(annotation.text) + * } + * ``` + * + * @return Previous node. + */ + prev(): Node.ChildNode | undefined + + /** + * Get the range for a word or start and end index inside the node. + * The start index is inclusive; the end index is exclusive. + * + * @param opts Options. + * @return Range. + */ + rangeBy( + opts?: Pick<WarningOptions, 'endIndex' | 'index' | 'word'> + ): Node.Range + + /** + * Returns a `raws` value. If the node is missing + * the code style property (because the node was manually built or cloned), + * PostCSS will try to autodetect the code style property by looking + * at other nodes in the tree. + * + * ```js + * const root = postcss.parse('a { background: white }') + * root.nodes[0].append({ prop: 'color', value: 'black' }) + * root.nodes[0].nodes[1].raws.before //=> undefined + * root.nodes[0].nodes[1].raw('before') //=> ' ' + * ``` + * + * @param prop Name of code style property. + * @param defaultType Name of default value, it can be missed + * if the value is the same as prop. + * @return {string} Code style value. + */ + raw(prop: string, defaultType?: string): string + + /** + * It removes the node from its parent and deletes its parent property. + * + * ```js + * if (decl.prop.match(/^-webkit-/)) { + * decl.remove() + * } + * ``` + * + * @return `this` for method chaining. + */ + remove(): this + + /** + * Inserts node(s) before the current node and removes the current node. + * + * ```js + * AtRule: { + * mixin: atrule => { + * atrule.replaceWith(mixinRules[atrule.params]) + * } + * } + * ``` + * + * @param nodes Mode(s) to replace current one. + * @return Current node to methods chain. + */ + replaceWith(...nodes: NewChild[]): this + + /** + * Finds the Root instance of the node’s tree. + * + * ```js + * root.nodes[0].nodes[0].root() === root + * ``` + * + * @return Root parent. + */ + root(): Root + + /** + * Fix circular links on `JSON.stringify()`. + * + * @return Cleaned object. + */ + toJSON(): object + + /** + * It compiles the node to browser readable cascading style sheets string + * depending on it's type. + * + * ```js + * new Rule({ selector: 'a' }).toString() //=> "a {}" + * ``` + * + * @param stringifier A syntax to use in string generation. + * @return CSS string of this node. + */ + toString(stringifier?: Stringifier | Syntax): string + + /** + * It is a wrapper for {@link Result#warn}, providing convenient + * way of generating warnings. + * + * ```js + * Declaration: { + * bad: (decl, { result }) => { + * decl.warn(result, 'Deprecated property: bad') + * } + * } + * ``` + * + * @param result The `Result` instance that will receive the warning. + * @param message Description for the warning. + * @param options Options for the warning. + * + * @return `Warning` instance is returned + */ + warn(result: Result, message: string, options?: WarningOptions): Warning +} + +declare class Node extends Node_ {} + +export = Node diff --git a/vuetest/node_modules/postcss/lib/node.js b/vuetest/node_modules/postcss/lib/node.js new file mode 100644 index 0000000..f6d28a3 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/node.js @@ -0,0 +1,434 @@ +'use strict' + +let CssSyntaxError = require('./css-syntax-error') +let Stringifier = require('./stringifier') +let stringify = require('./stringify') +let { isClean, my } = require('./symbols') + +function cloneNode(obj, parent) { + let cloned = new obj.constructor() + + for (let i in obj) { + if (!Object.prototype.hasOwnProperty.call(obj, i)) { + /* c8 ignore next 2 */ + continue + } + if (i === 'proxyCache') continue + let value = obj[i] + let type = typeof value + + if (i === 'parent' && type === 'object') { + if (parent) cloned[i] = parent + } else if (i === 'source') { + cloned[i] = value + } else if (Array.isArray(value)) { + cloned[i] = value.map(j => cloneNode(j, cloned)) + } else { + if (type === 'object' && value !== null) value = cloneNode(value) + cloned[i] = value + } + } + + return cloned +} + +function sourceOffset(inputCSS, position) { + // Not all custom syntaxes support `offset` in `source.start` and `source.end` + if ( + position && + typeof position.offset !== 'undefined' + ) { + return position.offset; + } + + let column = 1 + let line = 1 + let offset = 0 + + for (let i = 0; i < inputCSS.length; i++) { + if (line === position.line && column === position.column) { + offset = i + break + } + + if (inputCSS[i] === '\n') { + column = 1 + line += 1 + } else { + column += 1 + } + } + + return offset +} + +class Node { + constructor(defaults = {}) { + this.raws = {} + this[isClean] = false + this[my] = true + + for (let name in defaults) { + if (name === 'nodes') { + this.nodes = [] + for (let node of defaults[name]) { + if (typeof node.clone === 'function') { + this.append(node.clone()) + } else { + this.append(node) + } + } + } else { + this[name] = defaults[name] + } + } + } + + addToError(error) { + error.postcssNode = this + if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) { + let s = this.source + error.stack = error.stack.replace( + /\n\s{4}at /, + `$&${s.input.from}:${s.start.line}:${s.start.column}$&` + ) + } + return error + } + + after(add) { + this.parent.insertAfter(this, add) + return this + } + + assign(overrides = {}) { + for (let name in overrides) { + this[name] = overrides[name] + } + return this + } + + before(add) { + this.parent.insertBefore(this, add) + return this + } + + cleanRaws(keepBetween) { + delete this.raws.before + delete this.raws.after + if (!keepBetween) delete this.raws.between + } + + clone(overrides = {}) { + let cloned = cloneNode(this) + for (let name in overrides) { + cloned[name] = overrides[name] + } + return cloned + } + + cloneAfter(overrides = {}) { + let cloned = this.clone(overrides) + this.parent.insertAfter(this, cloned) + return cloned + } + + cloneBefore(overrides = {}) { + let cloned = this.clone(overrides) + this.parent.insertBefore(this, cloned) + return cloned + } + + error(message, opts = {}) { + if (this.source) { + let { end, start } = this.rangeBy(opts) + return this.source.input.error( + message, + { column: start.column, line: start.line }, + { column: end.column, line: end.line }, + opts + ) + } + return new CssSyntaxError(message) + } + + getProxyProcessor() { + return { + get(node, prop) { + if (prop === 'proxyOf') { + return node + } else if (prop === 'root') { + return () => node.root().toProxy() + } else { + return node[prop] + } + }, + + set(node, prop, value) { + if (node[prop] === value) return true + node[prop] = value + if ( + prop === 'prop' || + prop === 'value' || + prop === 'name' || + prop === 'params' || + prop === 'important' || + /* c8 ignore next */ + prop === 'text' + ) { + node.markDirty() + } + return true + } + } + } + + /* c8 ignore next 3 */ + markClean() { + this[isClean] = true + } + + markDirty() { + if (this[isClean]) { + this[isClean] = false + let next = this + while ((next = next.parent)) { + next[isClean] = false + } + } + } + + next() { + if (!this.parent) return undefined + let index = this.parent.index(this) + return this.parent.nodes[index + 1] + } + + positionBy(opts) { + let pos = this.source.start + if (opts.index) { + pos = this.positionInside(opts.index) + } else if (opts.word) { + let inputString = ('document' in this.source.input) + ? this.source.input.document + : this.source.input.css + let stringRepresentation = inputString.slice( + sourceOffset(inputString, this.source.start), + sourceOffset(inputString, this.source.end) + ) + let index = stringRepresentation.indexOf(opts.word) + if (index !== -1) pos = this.positionInside(index) + } + return pos + } + + positionInside(index) { + let column = this.source.start.column + let line = this.source.start.line + let inputString = ('document' in this.source.input) + ? this.source.input.document + : this.source.input.css + let offset = sourceOffset(inputString, this.source.start) + let end = offset + index + + for (let i = offset; i < end; i++) { + if (inputString[i] === '\n') { + column = 1 + line += 1 + } else { + column += 1 + } + } + + return { column, line } + } + + prev() { + if (!this.parent) return undefined + let index = this.parent.index(this) + return this.parent.nodes[index - 1] + } + + rangeBy(opts) { + let start = { + column: this.source.start.column, + line: this.source.start.line + } + let end = this.source.end + ? { + column: this.source.end.column + 1, + line: this.source.end.line + } + : { + column: start.column + 1, + line: start.line + } + + if (opts.word) { + let inputString = ('document' in this.source.input) + ? this.source.input.document + : this.source.input.css + let stringRepresentation = inputString.slice( + sourceOffset(inputString, this.source.start), + sourceOffset(inputString, this.source.end) + ) + let index = stringRepresentation.indexOf(opts.word) + if (index !== -1) { + start = this.positionInside(index) + end = this.positionInside( + index + opts.word.length, + ) + } + } else { + if (opts.start) { + start = { + column: opts.start.column, + line: opts.start.line + } + } else if (opts.index) { + start = this.positionInside(opts.index) + } + + if (opts.end) { + end = { + column: opts.end.column, + line: opts.end.line + } + } else if (typeof opts.endIndex === 'number') { + end = this.positionInside(opts.endIndex) + } else if (opts.index) { + end = this.positionInside(opts.index + 1) + } + } + + if ( + end.line < start.line || + (end.line === start.line && end.column <= start.column) + ) { + end = { column: start.column + 1, line: start.line } + } + + return { end, start } + } + + raw(prop, defaultType) { + let str = new Stringifier() + return str.raw(this, prop, defaultType) + } + + remove() { + if (this.parent) { + this.parent.removeChild(this) + } + this.parent = undefined + return this + } + + replaceWith(...nodes) { + if (this.parent) { + let bookmark = this + let foundSelf = false + for (let node of nodes) { + if (node === this) { + foundSelf = true + } else if (foundSelf) { + this.parent.insertAfter(bookmark, node) + bookmark = node + } else { + this.parent.insertBefore(bookmark, node) + } + } + + if (!foundSelf) { + this.remove() + } + } + + return this + } + + root() { + let result = this + while (result.parent && result.parent.type !== 'document') { + result = result.parent + } + return result + } + + toJSON(_, inputs) { + let fixed = {} + let emitInputs = inputs == null + inputs = inputs || new Map() + let inputsNextIndex = 0 + + for (let name in this) { + if (!Object.prototype.hasOwnProperty.call(this, name)) { + /* c8 ignore next 2 */ + continue + } + if (name === 'parent' || name === 'proxyCache') continue + let value = this[name] + + if (Array.isArray(value)) { + fixed[name] = value.map(i => { + if (typeof i === 'object' && i.toJSON) { + return i.toJSON(null, inputs) + } else { + return i + } + }) + } else if (typeof value === 'object' && value.toJSON) { + fixed[name] = value.toJSON(null, inputs) + } else if (name === 'source') { + let inputId = inputs.get(value.input) + if (inputId == null) { + inputId = inputsNextIndex + inputs.set(value.input, inputsNextIndex) + inputsNextIndex++ + } + fixed[name] = { + end: value.end, + inputId, + start: value.start + } + } else { + fixed[name] = value + } + } + + if (emitInputs) { + fixed.inputs = [...inputs.keys()].map(input => input.toJSON()) + } + + return fixed + } + + toProxy() { + if (!this.proxyCache) { + this.proxyCache = new Proxy(this, this.getProxyProcessor()) + } + return this.proxyCache + } + + toString(stringifier = stringify) { + if (stringifier.stringify) stringifier = stringifier.stringify + let result = '' + stringifier(this, i => { + result += i + }) + return result + } + + warn(result, text, opts) { + let data = { node: this } + for (let i in opts) data[i] = opts[i] + return result.warn(text, data) + } + + get proxyOf() { + return this + } +} + +module.exports = Node +Node.default = Node diff --git a/vuetest/node_modules/postcss/lib/parse.d.ts b/vuetest/node_modules/postcss/lib/parse.d.ts new file mode 100644 index 0000000..4c943a4 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/parse.d.ts @@ -0,0 +1,9 @@ +import { Parser } from './postcss.js' + +interface Parse extends Parser { + default: Parse +} + +declare const parse: Parse + +export = parse diff --git a/vuetest/node_modules/postcss/lib/parse.js b/vuetest/node_modules/postcss/lib/parse.js new file mode 100644 index 0000000..00a1037 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/parse.js @@ -0,0 +1,42 @@ +'use strict' + +let Container = require('./container') +let Input = require('./input') +let Parser = require('./parser') + +function parse(css, opts) { + let input = new Input(css, opts) + let parser = new Parser(input) + try { + parser.parse() + } catch (e) { + if (process.env.NODE_ENV !== 'production') { + if (e.name === 'CssSyntaxError' && opts && opts.from) { + if (/\.scss$/i.test(opts.from)) { + e.message += + '\nYou tried to parse SCSS with ' + + 'the standard CSS parser; ' + + 'try again with the postcss-scss parser' + } else if (/\.sass/i.test(opts.from)) { + e.message += + '\nYou tried to parse Sass with ' + + 'the standard CSS parser; ' + + 'try again with the postcss-sass parser' + } else if (/\.less$/i.test(opts.from)) { + e.message += + '\nYou tried to parse Less with ' + + 'the standard CSS parser; ' + + 'try again with the postcss-less parser' + } + } + } + throw e + } + + return parser.root +} + +module.exports = parse +parse.default = parse + +Container.registerParse(parse) diff --git a/vuetest/node_modules/postcss/lib/parser.js b/vuetest/node_modules/postcss/lib/parser.js new file mode 100644 index 0000000..8a04411 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/parser.js @@ -0,0 +1,609 @@ +'use strict' + +let AtRule = require('./at-rule') +let Comment = require('./comment') +let Declaration = require('./declaration') +let Root = require('./root') +let Rule = require('./rule') +let tokenizer = require('./tokenize') + +const SAFE_COMMENT_NEIGHBOR = { + empty: true, + space: true +} + +function findLastWithPosition(tokens) { + for (let i = tokens.length - 1; i >= 0; i--) { + let token = tokens[i] + let pos = token[3] || token[2] + if (pos) return pos + } +} + +class Parser { + constructor(input) { + this.input = input + + this.root = new Root() + this.current = this.root + this.spaces = '' + this.semicolon = false + + this.createTokenizer() + this.root.source = { input, start: { column: 1, line: 1, offset: 0 } } + } + + atrule(token) { + let node = new AtRule() + node.name = token[1].slice(1) + if (node.name === '') { + this.unnamedAtrule(node, token) + } + this.init(node, token[2]) + + let type + let prev + let shift + let last = false + let open = false + let params = [] + let brackets = [] + + while (!this.tokenizer.endOfFile()) { + token = this.tokenizer.nextToken() + type = token[0] + + if (type === '(' || type === '[') { + brackets.push(type === '(' ? ')' : ']') + } else if (type === '{' && brackets.length > 0) { + brackets.push('}') + } else if (type === brackets[brackets.length - 1]) { + brackets.pop() + } + + if (brackets.length === 0) { + if (type === ';') { + node.source.end = this.getPosition(token[2]) + node.source.end.offset++ + this.semicolon = true + break + } else if (type === '{') { + open = true + break + } else if (type === '}') { + if (params.length > 0) { + shift = params.length - 1 + prev = params[shift] + while (prev && prev[0] === 'space') { + prev = params[--shift] + } + if (prev) { + node.source.end = this.getPosition(prev[3] || prev[2]) + node.source.end.offset++ + } + } + this.end(token) + break + } else { + params.push(token) + } + } else { + params.push(token) + } + + if (this.tokenizer.endOfFile()) { + last = true + break + } + } + + node.raws.between = this.spacesAndCommentsFromEnd(params) + if (params.length) { + node.raws.afterName = this.spacesAndCommentsFromStart(params) + this.raw(node, 'params', params) + if (last) { + token = params[params.length - 1] + node.source.end = this.getPosition(token[3] || token[2]) + node.source.end.offset++ + this.spaces = node.raws.between + node.raws.between = '' + } + } else { + node.raws.afterName = '' + node.params = '' + } + + if (open) { + node.nodes = [] + this.current = node + } + } + + checkMissedSemicolon(tokens) { + let colon = this.colon(tokens) + if (colon === false) return + + let founded = 0 + let token + for (let j = colon - 1; j >= 0; j--) { + token = tokens[j] + if (token[0] !== 'space') { + founded += 1 + if (founded === 2) break + } + } + // If the token is a word, e.g. `!important`, `red` or any other valid property's value. + // Then we need to return the colon after that word token. [3] is the "end" colon of that word. + // And because we need it after that one we do +1 to get the next one. + throw this.input.error( + 'Missed semicolon', + token[0] === 'word' ? token[3] + 1 : token[2] + ) + } + + colon(tokens) { + let brackets = 0 + let prev, token, type + for (let [i, element] of tokens.entries()) { + token = element + type = token[0] + + if (type === '(') { + brackets += 1 + } + if (type === ')') { + brackets -= 1 + } + if (brackets === 0 && type === ':') { + if (!prev) { + this.doubleColon(token) + } else if (prev[0] === 'word' && prev[1] === 'progid') { + continue + } else { + return i + } + } + + prev = token + } + return false + } + + comment(token) { + let node = new Comment() + this.init(node, token[2]) + node.source.end = this.getPosition(token[3] || token[2]) + node.source.end.offset++ + + let text = token[1].slice(2, -2) + if (/^\s*$/.test(text)) { + node.text = '' + node.raws.left = text + node.raws.right = '' + } else { + let match = text.match(/^(\s*)([^]*\S)(\s*)$/) + node.text = match[2] + node.raws.left = match[1] + node.raws.right = match[3] + } + } + + createTokenizer() { + this.tokenizer = tokenizer(this.input) + } + + decl(tokens, customProperty) { + let node = new Declaration() + this.init(node, tokens[0][2]) + + let last = tokens[tokens.length - 1] + if (last[0] === ';') { + this.semicolon = true + tokens.pop() + } + + node.source.end = this.getPosition( + last[3] || last[2] || findLastWithPosition(tokens) + ) + node.source.end.offset++ + + while (tokens[0][0] !== 'word') { + if (tokens.length === 1) this.unknownWord(tokens) + node.raws.before += tokens.shift()[1] + } + node.source.start = this.getPosition(tokens[0][2]) + + node.prop = '' + while (tokens.length) { + let type = tokens[0][0] + if (type === ':' || type === 'space' || type === 'comment') { + break + } + node.prop += tokens.shift()[1] + } + + node.raws.between = '' + + let token + while (tokens.length) { + token = tokens.shift() + + if (token[0] === ':') { + node.raws.between += token[1] + break + } else { + if (token[0] === 'word' && /\w/.test(token[1])) { + this.unknownWord([token]) + } + node.raws.between += token[1] + } + } + + if (node.prop[0] === '_' || node.prop[0] === '*') { + node.raws.before += node.prop[0] + node.prop = node.prop.slice(1) + } + + let firstSpaces = [] + let next + while (tokens.length) { + next = tokens[0][0] + if (next !== 'space' && next !== 'comment') break + firstSpaces.push(tokens.shift()) + } + + this.precheckMissedSemicolon(tokens) + + for (let i = tokens.length - 1; i >= 0; i--) { + token = tokens[i] + if (token[1].toLowerCase() === '!important') { + node.important = true + let string = this.stringFrom(tokens, i) + string = this.spacesFromEnd(tokens) + string + if (string !== ' !important') node.raws.important = string + break + } else if (token[1].toLowerCase() === 'important') { + let cache = tokens.slice(0) + let str = '' + for (let j = i; j > 0; j--) { + let type = cache[j][0] + if (str.trim().startsWith('!') && type !== 'space') { + break + } + str = cache.pop()[1] + str + } + if (str.trim().startsWith('!')) { + node.important = true + node.raws.important = str + tokens = cache + } + } + + if (token[0] !== 'space' && token[0] !== 'comment') { + break + } + } + + let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment') + + if (hasWord) { + node.raws.between += firstSpaces.map(i => i[1]).join('') + firstSpaces = [] + } + this.raw(node, 'value', firstSpaces.concat(tokens), customProperty) + + if (node.value.includes(':') && !customProperty) { + this.checkMissedSemicolon(tokens) + } + } + + doubleColon(token) { + throw this.input.error( + 'Double colon', + { offset: token[2] }, + { offset: token[2] + token[1].length } + ) + } + + emptyRule(token) { + let node = new Rule() + this.init(node, token[2]) + node.selector = '' + node.raws.between = '' + this.current = node + } + + end(token) { + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon + } + this.semicolon = false + + this.current.raws.after = (this.current.raws.after || '') + this.spaces + this.spaces = '' + + if (this.current.parent) { + this.current.source.end = this.getPosition(token[2]) + this.current.source.end.offset++ + this.current = this.current.parent + } else { + this.unexpectedClose(token) + } + } + + endFile() { + if (this.current.parent) this.unclosedBlock() + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon + } + this.current.raws.after = (this.current.raws.after || '') + this.spaces + this.root.source.end = this.getPosition(this.tokenizer.position()) + } + + freeSemicolon(token) { + this.spaces += token[1] + if (this.current.nodes) { + let prev = this.current.nodes[this.current.nodes.length - 1] + if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) { + prev.raws.ownSemicolon = this.spaces + this.spaces = '' + } + } + } + + // Helpers + + getPosition(offset) { + let pos = this.input.fromOffset(offset) + return { + column: pos.col, + line: pos.line, + offset + } + } + + init(node, offset) { + this.current.push(node) + node.source = { + input: this.input, + start: this.getPosition(offset) + } + node.raws.before = this.spaces + this.spaces = '' + if (node.type !== 'comment') this.semicolon = false + } + + other(start) { + let end = false + let type = null + let colon = false + let bracket = null + let brackets = [] + let customProperty = start[1].startsWith('--') + + let tokens = [] + let token = start + while (token) { + type = token[0] + tokens.push(token) + + if (type === '(' || type === '[') { + if (!bracket) bracket = token + brackets.push(type === '(' ? ')' : ']') + } else if (customProperty && colon && type === '{') { + if (!bracket) bracket = token + brackets.push('}') + } else if (brackets.length === 0) { + if (type === ';') { + if (colon) { + this.decl(tokens, customProperty) + return + } else { + break + } + } else if (type === '{') { + this.rule(tokens) + return + } else if (type === '}') { + this.tokenizer.back(tokens.pop()) + end = true + break + } else if (type === ':') { + colon = true + } + } else if (type === brackets[brackets.length - 1]) { + brackets.pop() + if (brackets.length === 0) bracket = null + } + + token = this.tokenizer.nextToken() + } + + if (this.tokenizer.endOfFile()) end = true + if (brackets.length > 0) this.unclosedBracket(bracket) + + if (end && colon) { + if (!customProperty) { + while (tokens.length) { + token = tokens[tokens.length - 1][0] + if (token !== 'space' && token !== 'comment') break + this.tokenizer.back(tokens.pop()) + } + } + this.decl(tokens, customProperty) + } else { + this.unknownWord(tokens) + } + } + + parse() { + let token + while (!this.tokenizer.endOfFile()) { + token = this.tokenizer.nextToken() + + switch (token[0]) { + case 'space': + this.spaces += token[1] + break + + case ';': + this.freeSemicolon(token) + break + + case '}': + this.end(token) + break + + case 'comment': + this.comment(token) + break + + case 'at-word': + this.atrule(token) + break + + case '{': + this.emptyRule(token) + break + + default: + this.other(token) + break + } + } + this.endFile() + } + + precheckMissedSemicolon(/* tokens */) { + // Hook for Safe Parser + } + + raw(node, prop, tokens, customProperty) { + let token, type + let length = tokens.length + let value = '' + let clean = true + let next, prev + + for (let i = 0; i < length; i += 1) { + token = tokens[i] + type = token[0] + if (type === 'space' && i === length - 1 && !customProperty) { + clean = false + } else if (type === 'comment') { + prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty' + next = tokens[i + 1] ? tokens[i + 1][0] : 'empty' + if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) { + if (value.slice(-1) === ',') { + clean = false + } else { + value += token[1] + } + } else { + clean = false + } + } else { + value += token[1] + } + } + if (!clean) { + let raw = tokens.reduce((all, i) => all + i[1], '') + node.raws[prop] = { raw, value } + } + node[prop] = value + } + + rule(tokens) { + tokens.pop() + + let node = new Rule() + this.init(node, tokens[0][2]) + + node.raws.between = this.spacesAndCommentsFromEnd(tokens) + this.raw(node, 'selector', tokens) + this.current = node + } + + spacesAndCommentsFromEnd(tokens) { + let lastTokenType + let spaces = '' + while (tokens.length) { + lastTokenType = tokens[tokens.length - 1][0] + if (lastTokenType !== 'space' && lastTokenType !== 'comment') break + spaces = tokens.pop()[1] + spaces + } + return spaces + } + + // Errors + + spacesAndCommentsFromStart(tokens) { + let next + let spaces = '' + while (tokens.length) { + next = tokens[0][0] + if (next !== 'space' && next !== 'comment') break + spaces += tokens.shift()[1] + } + return spaces + } + + spacesFromEnd(tokens) { + let lastTokenType + let spaces = '' + while (tokens.length) { + lastTokenType = tokens[tokens.length - 1][0] + if (lastTokenType !== 'space') break + spaces = tokens.pop()[1] + spaces + } + return spaces + } + + stringFrom(tokens, from) { + let result = '' + for (let i = from; i < tokens.length; i++) { + result += tokens[i][1] + } + tokens.splice(from, tokens.length - from) + return result + } + + unclosedBlock() { + let pos = this.current.source.start + throw this.input.error('Unclosed block', pos.line, pos.column) + } + + unclosedBracket(bracket) { + throw this.input.error( + 'Unclosed bracket', + { offset: bracket[2] }, + { offset: bracket[2] + 1 } + ) + } + + unexpectedClose(token) { + throw this.input.error( + 'Unexpected }', + { offset: token[2] }, + { offset: token[2] + 1 } + ) + } + + unknownWord(tokens) { + throw this.input.error( + 'Unknown word', + { offset: tokens[0][2] }, + { offset: tokens[0][2] + tokens[0][1].length } + ) + } + + unnamedAtrule(node, token) { + throw this.input.error( + 'At-rule without name', + { offset: token[2] }, + { offset: token[2] + token[1].length } + ) + } +} + +module.exports = Parser diff --git a/vuetest/node_modules/postcss/lib/postcss.d.mts b/vuetest/node_modules/postcss/lib/postcss.d.mts new file mode 100644 index 0000000..4cf5b49 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/postcss.d.mts @@ -0,0 +1,69 @@ +export { + // postcss function / namespace + default, + + // Value exports from postcss.mjs + stringify, + fromJSON, + // @ts-expect-error This value exists, but it’s untyped. + plugin, + parse, + list, + document, + comment, + atRule, + rule, + decl, + root, + CssSyntaxError, + Declaration, + Container, + Processor, + Document, + Comment, + Warning, + AtRule, + Result, + Input, + Rule, + Root, + Node, + + // Type-only exports + AcceptedPlugin, + AnyNode, + AtRuleProps, + Builder, + ChildNode, + ChildProps, + CommentProps, + ContainerProps, + DeclarationProps, + DocumentProps, + FilePosition, + Helpers, + JSONHydrator, + Message, + NodeErrorOptions, + NodeProps, + OldPlugin, + Parser, + Plugin, + PluginCreator, + Position, + Postcss, + ProcessOptions, + RootProps, + RuleProps, + Source, + SourceMap, + SourceMapOptions, + Stringifier, + Syntax, + TransformCallback, + Transformer, + WarningOptions, + + // This is a class, but it’s not re-exported. That’s why it’s exported as type-only here. + type LazyResult +} from './postcss.js' diff --git a/vuetest/node_modules/postcss/lib/postcss.d.ts b/vuetest/node_modules/postcss/lib/postcss.d.ts new file mode 100644 index 0000000..c5e3605 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/postcss.d.ts @@ -0,0 +1,458 @@ +import { RawSourceMap, SourceMapGenerator } from 'source-map-js' + +import AtRule, { AtRuleProps } from './at-rule.js' +import Comment, { CommentProps } from './comment.js' +import Container, { ContainerProps, NewChild } from './container.js' +import CssSyntaxError from './css-syntax-error.js' +import Declaration, { DeclarationProps } from './declaration.js' +import Document, { DocumentProps } from './document.js' +import Input, { FilePosition } from './input.js' +import LazyResult from './lazy-result.js' +import list from './list.js' +import Node, { + AnyNode, + ChildNode, + ChildProps, + NodeErrorOptions, + NodeProps, + Position, + Source +} from './node.js' +import Processor from './processor.js' +import Result, { Message } from './result.js' +import Root, { RootProps } from './root.js' +import Rule, { RuleProps } from './rule.js' +import Warning, { WarningOptions } from './warning.js' + +type DocumentProcessor = ( + document: Document, + helper: postcss.Helpers +) => Promise<void> | void +type RootProcessor = ( + root: Root, + helper: postcss.Helpers +) => Promise<void> | void +type DeclarationProcessor = ( + decl: Declaration, + helper: postcss.Helpers +) => Promise<void> | void +type RuleProcessor = ( + rule: Rule, + helper: postcss.Helpers +) => Promise<void> | void +type AtRuleProcessor = ( + atRule: AtRule, + helper: postcss.Helpers +) => Promise<void> | void +type CommentProcessor = ( + comment: Comment, + helper: postcss.Helpers +) => Promise<void> | void + +interface Processors { + /** + * Will be called on all`AtRule` nodes. + * + * Will be called again on node or children changes. + */ + AtRule?: { [name: string]: AtRuleProcessor } | AtRuleProcessor + + /** + * Will be called on all `AtRule` nodes, when all children will be processed. + * + * Will be called again on node or children changes. + */ + AtRuleExit?: { [name: string]: AtRuleProcessor } | AtRuleProcessor + + /** + * Will be called on all `Comment` nodes. + * + * Will be called again on node or children changes. + */ + Comment?: CommentProcessor + + /** + * Will be called on all `Comment` nodes after listeners + * for `Comment` event. + * + * Will be called again on node or children changes. + */ + CommentExit?: CommentProcessor + + /** + * Will be called on all `Declaration` nodes after listeners + * for `Declaration` event. + * + * Will be called again on node or children changes. + */ + Declaration?: { [prop: string]: DeclarationProcessor } | DeclarationProcessor + + /** + * Will be called on all `Declaration` nodes. + * + * Will be called again on node or children changes. + */ + DeclarationExit?: + | { [prop: string]: DeclarationProcessor } + | DeclarationProcessor + + /** + * Will be called on `Document` node. + * + * Will be called again on children changes. + */ + Document?: DocumentProcessor + + /** + * Will be called on `Document` node, when all children will be processed. + * + * Will be called again on children changes. + */ + DocumentExit?: DocumentProcessor + + /** + * Will be called on `Root` node once. + */ + Once?: RootProcessor + + /** + * Will be called on `Root` node once, when all children will be processed. + */ + OnceExit?: RootProcessor + + /** + * Will be called on `Root` node. + * + * Will be called again on children changes. + */ + Root?: RootProcessor + + /** + * Will be called on `Root` node, when all children will be processed. + * + * Will be called again on children changes. + */ + RootExit?: RootProcessor + + /** + * Will be called on all `Rule` nodes. + * + * Will be called again on node or children changes. + */ + Rule?: RuleProcessor + + /** + * Will be called on all `Rule` nodes, when all children will be processed. + * + * Will be called again on node or children changes. + */ + RuleExit?: RuleProcessor +} + +declare namespace postcss { + export { + AnyNode, + AtRule, + AtRuleProps, + ChildNode, + ChildProps, + Comment, + CommentProps, + Container, + ContainerProps, + CssSyntaxError, + Declaration, + DeclarationProps, + Document, + DocumentProps, + FilePosition, + Input, + LazyResult, + list, + Message, + NewChild, + Node, + NodeErrorOptions, + NodeProps, + Position, + Processor, + Result, + Root, + RootProps, + Rule, + RuleProps, + Source, + Warning, + WarningOptions + } + + export type SourceMap = { + toJSON(): RawSourceMap + } & SourceMapGenerator + + export type Helpers = { postcss: Postcss; result: Result } & Postcss + + export interface Plugin extends Processors { + postcssPlugin: string + prepare?: (result: Result) => Processors + } + + export interface PluginCreator<PluginOptions> { + (opts?: PluginOptions): Plugin | Processor + postcss: true + } + + export interface Transformer extends TransformCallback { + postcssPlugin: string + postcssVersion: string + } + + export interface TransformCallback { + (root: Root, result: Result): Promise<void> | void + } + + export interface OldPlugin<T> extends Transformer { + (opts?: T): Transformer + postcss: Transformer + } + + export type AcceptedPlugin = + | { + postcss: Processor | TransformCallback + } + | OldPlugin<any> + | Plugin + | PluginCreator<any> + | Processor + | TransformCallback + + export interface Parser<RootNode = Document | Root> { + ( + css: { toString(): string } | string, + opts?: Pick<ProcessOptions, 'document' | 'from' | 'map'> + ): RootNode + } + + export interface Builder { + (part: string, node?: AnyNode, type?: 'end' | 'start'): void + } + + export interface Stringifier { + (node: AnyNode, builder: Builder): void + } + + export interface JSONHydrator { + (data: object): Node + (data: object[]): Node[] + } + + export interface Syntax<RootNode = Document | Root> { + /** + * Function to generate AST by string. + */ + parse?: Parser<RootNode> + + /** + * Class to generate string by AST. + */ + stringify?: Stringifier + } + + export interface SourceMapOptions { + /** + * Use absolute path in generated source map. + */ + absolute?: boolean + + /** + * Indicates that PostCSS should add annotation comments to the CSS. + * By default, PostCSS will always add a comment with a path + * to the source map. PostCSS will not add annotations to CSS files + * that do not contain any comments. + * + * By default, PostCSS presumes that you want to save the source map as + * `opts.to + '.map'` and will use this path in the annotation comment. + * A different path can be set by providing a string value for annotation. + * + * If you have set `inline: true`, annotation cannot be disabled. + */ + annotation?: ((file: string, root: Root) => string) | boolean | string + + /** + * Override `from` in map’s sources. + */ + from?: string + + /** + * Indicates that the source map should be embedded in the output CSS + * as a Base64-encoded comment. By default, it is `true`. + * But if all previous maps are external, not inline, PostCSS will not embed + * the map even if you do not set this option. + * + * If you have an inline source map, the result.map property will be empty, + * as the source map will be contained within the text of `result.css`. + */ + inline?: boolean + + /** + * Source map content from a previous processing step (e.g., Sass). + * + * PostCSS will try to read the previous source map + * automatically (based on comments within the source CSS), but you can use + * this option to identify it manually. + * + * If desired, you can omit the previous map with prev: `false`. + */ + prev?: ((file: string) => string) | boolean | object | string + + /** + * Indicates that PostCSS should set the origin content (e.g., Sass source) + * of the source map. By default, it is true. But if all previous maps do not + * contain sources content, PostCSS will also leave it out even if you + * do not set this option. + */ + sourcesContent?: boolean + } + + export interface ProcessOptions<RootNode = Document | Root> { + /** + * Input file if it is not simple CSS file, but HTML with <style> or JS with CSS-in-JS blocks. + */ + document?: string + + /** + * The path of the CSS source file. You should always set `from`, + * because it is used in source map generation and syntax error messages. + */ + from?: string | undefined + + /** + * Source map options + */ + map?: boolean | SourceMapOptions + + /** + * Function to generate AST by string. + */ + parser?: Parser<RootNode> | Syntax<RootNode> + + /** + * Class to generate string by AST. + */ + stringifier?: Stringifier | Syntax<RootNode> + + /** + * Object with parse and stringify. + */ + syntax?: Syntax<RootNode> + + /** + * The path where you'll put the output CSS file. You should always set `to` + * to generate correct source maps. + */ + to?: string + } + + export type Postcss = typeof postcss + + /** + * Default function to convert a node tree into a CSS string. + */ + export let stringify: Stringifier + + /** + * Parses source css and returns a new `Root` or `Document` node, + * which contains the source CSS nodes. + * + * ```js + * // Simple CSS concatenation with source map support + * const root1 = postcss.parse(css1, { from: file1 }) + * const root2 = postcss.parse(css2, { from: file2 }) + * root1.append(root2).toResult().css + * ``` + */ + export let parse: Parser<Root> + + /** + * Rehydrate a JSON AST (from `Node#toJSON`) back into the AST classes. + * + * ```js + * const json = root.toJSON() + * // save to file, send by network, etc + * const root2 = postcss.fromJSON(json) + * ``` + */ + export let fromJSON: JSONHydrator + + /** + * Creates a new `Comment` node. + * + * @param defaults Properties for the new node. + * @return New comment node + */ + export function comment(defaults?: CommentProps): Comment + + /** + * Creates a new `AtRule` node. + * + * @param defaults Properties for the new node. + * @return New at-rule node. + */ + export function atRule(defaults?: AtRuleProps): AtRule + + /** + * Creates a new `Declaration` node. + * + * @param defaults Properties for the new node. + * @return New declaration node. + */ + export function decl(defaults?: DeclarationProps): Declaration + + /** + * Creates a new `Rule` node. + * + * @param default Properties for the new node. + * @return New rule node. + */ + export function rule(defaults?: RuleProps): Rule + + /** + * Creates a new `Root` node. + * + * @param defaults Properties for the new node. + * @return New root node. + */ + export function root(defaults?: RootProps): Root + + /** + * Creates a new `Document` node. + * + * @param defaults Properties for the new node. + * @return New document node. + */ + export function document(defaults?: DocumentProps): Document + + export { postcss as default } +} + +/** + * Create a new `Processor` instance that will apply `plugins` + * as CSS processors. + * + * ```js + * let postcss = require('postcss') + * + * postcss(plugins).process(css, { from, to }).then(result => { + * console.log(result.css) + * }) + * ``` + * + * @param plugins PostCSS plugins. + * @return Processor to process multiple CSS. + */ +declare function postcss( + plugins?: readonly postcss.AcceptedPlugin[] +): Processor +declare function postcss(...plugins: postcss.AcceptedPlugin[]): Processor + +export = postcss diff --git a/vuetest/node_modules/postcss/lib/postcss.js b/vuetest/node_modules/postcss/lib/postcss.js new file mode 100644 index 0000000..8f0773b --- /dev/null +++ b/vuetest/node_modules/postcss/lib/postcss.js @@ -0,0 +1,101 @@ +'use strict' + +let AtRule = require('./at-rule') +let Comment = require('./comment') +let Container = require('./container') +let CssSyntaxError = require('./css-syntax-error') +let Declaration = require('./declaration') +let Document = require('./document') +let fromJSON = require('./fromJSON') +let Input = require('./input') +let LazyResult = require('./lazy-result') +let list = require('./list') +let Node = require('./node') +let parse = require('./parse') +let Processor = require('./processor') +let Result = require('./result.js') +let Root = require('./root') +let Rule = require('./rule') +let stringify = require('./stringify') +let Warning = require('./warning') + +function postcss(...plugins) { + if (plugins.length === 1 && Array.isArray(plugins[0])) { + plugins = plugins[0] + } + return new Processor(plugins) +} + +postcss.plugin = function plugin(name, initializer) { + let warningPrinted = false + function creator(...args) { + // eslint-disable-next-line no-console + if (console && console.warn && !warningPrinted) { + warningPrinted = true + // eslint-disable-next-line no-console + console.warn( + name + + ': postcss.plugin was deprecated. Migration guide:\n' + + 'https://evilmartians.com/chronicles/postcss-8-plugin-migration' + ) + if (process.env.LANG && process.env.LANG.startsWith('cn')) { + /* c8 ignore next 7 */ + // eslint-disable-next-line no-console + console.warn( + name + + ': 里面 postcss.plugin 被弃用. 迁移指南:\n' + + 'https://www.w3ctech.com/topic/2226' + ) + } + } + let transformer = initializer(...args) + transformer.postcssPlugin = name + transformer.postcssVersion = new Processor().version + return transformer + } + + let cache + Object.defineProperty(creator, 'postcss', { + get() { + if (!cache) cache = creator() + return cache + } + }) + + creator.process = function (css, processOpts, pluginOpts) { + return postcss([creator(pluginOpts)]).process(css, processOpts) + } + + return creator +} + +postcss.stringify = stringify +postcss.parse = parse +postcss.fromJSON = fromJSON +postcss.list = list + +postcss.comment = defaults => new Comment(defaults) +postcss.atRule = defaults => new AtRule(defaults) +postcss.decl = defaults => new Declaration(defaults) +postcss.rule = defaults => new Rule(defaults) +postcss.root = defaults => new Root(defaults) +postcss.document = defaults => new Document(defaults) + +postcss.CssSyntaxError = CssSyntaxError +postcss.Declaration = Declaration +postcss.Container = Container +postcss.Processor = Processor +postcss.Document = Document +postcss.Comment = Comment +postcss.Warning = Warning +postcss.AtRule = AtRule +postcss.Result = Result +postcss.Input = Input +postcss.Rule = Rule +postcss.Root = Root +postcss.Node = Node + +LazyResult.registerPostcss(postcss) + +module.exports = postcss +postcss.default = postcss diff --git a/vuetest/node_modules/postcss/lib/postcss.mjs b/vuetest/node_modules/postcss/lib/postcss.mjs new file mode 100644 index 0000000..3507598 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/postcss.mjs @@ -0,0 +1,30 @@ +import postcss from './postcss.js' + +export default postcss + +export const stringify = postcss.stringify +export const fromJSON = postcss.fromJSON +export const plugin = postcss.plugin +export const parse = postcss.parse +export const list = postcss.list + +export const document = postcss.document +export const comment = postcss.comment +export const atRule = postcss.atRule +export const rule = postcss.rule +export const decl = postcss.decl +export const root = postcss.root + +export const CssSyntaxError = postcss.CssSyntaxError +export const Declaration = postcss.Declaration +export const Container = postcss.Container +export const Processor = postcss.Processor +export const Document = postcss.Document +export const Comment = postcss.Comment +export const Warning = postcss.Warning +export const AtRule = postcss.AtRule +export const Result = postcss.Result +export const Input = postcss.Input +export const Rule = postcss.Rule +export const Root = postcss.Root +export const Node = postcss.Node diff --git a/vuetest/node_modules/postcss/lib/previous-map.d.ts b/vuetest/node_modules/postcss/lib/previous-map.d.ts new file mode 100644 index 0000000..23edeb5 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/previous-map.d.ts @@ -0,0 +1,81 @@ +import { SourceMapConsumer } from 'source-map-js' + +import { ProcessOptions } from './postcss.js' + +declare namespace PreviousMap { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { PreviousMap_ as default } +} + +/** + * Source map information from input CSS. + * For example, source map after Sass compiler. + * + * This class will automatically find source map in input CSS or in file system + * near input file (according `from` option). + * + * ```js + * const root = parse(css, { from: 'a.sass.css' }) + * root.input.map //=> PreviousMap + * ``` + */ +declare class PreviousMap_ { + /** + * `sourceMappingURL` content. + */ + annotation?: string + + /** + * The CSS source identifier. Contains `Input#file` if the user + * set the `from` option, or `Input#id` if they did not. + */ + file?: string + + /** + * Was source map inlined by data-uri to input CSS. + */ + inline: boolean + + /** + * Path to source map file. + */ + mapFile?: string + + /** + * The directory with source map file, if source map is in separated file. + */ + root?: string + + /** + * Source map file content. + */ + text?: string + + /** + * @param css Input CSS source. + * @param opts Process options. + */ + constructor(css: string, opts?: ProcessOptions) + + /** + * Create a instance of `SourceMapGenerator` class + * from the `source-map` library to work with source map information. + * + * It is lazy method, so it will create object only on first call + * and then it will use cache. + * + * @return Object with source map information. + */ + consumer(): SourceMapConsumer + + /** + * Does source map contains `sourcesContent` with input source text. + * + * @return Is `sourcesContent` present. + */ + withContent(): boolean +} + +declare class PreviousMap extends PreviousMap_ {} + +export = PreviousMap diff --git a/vuetest/node_modules/postcss/lib/previous-map.js b/vuetest/node_modules/postcss/lib/previous-map.js new file mode 100644 index 0000000..b123dcd --- /dev/null +++ b/vuetest/node_modules/postcss/lib/previous-map.js @@ -0,0 +1,144 @@ +'use strict' + +let { existsSync, readFileSync } = require('fs') +let { dirname, join } = require('path') +let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js') + +function fromBase64(str) { + if (Buffer) { + return Buffer.from(str, 'base64').toString() + } else { + /* c8 ignore next 2 */ + return window.atob(str) + } +} + +class PreviousMap { + constructor(css, opts) { + if (opts.map === false) return + this.loadAnnotation(css) + this.inline = this.startWith(this.annotation, 'data:') + + let prev = opts.map ? opts.map.prev : undefined + let text = this.loadMap(opts.from, prev) + if (!this.mapFile && opts.from) { + this.mapFile = opts.from + } + if (this.mapFile) this.root = dirname(this.mapFile) + if (text) this.text = text + } + + consumer() { + if (!this.consumerCache) { + this.consumerCache = new SourceMapConsumer(this.text) + } + return this.consumerCache + } + + decodeInline(text) { + let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/ + let baseUri = /^data:application\/json;base64,/ + let charsetUri = /^data:application\/json;charset=utf-?8,/ + let uri = /^data:application\/json,/ + + let uriMatch = text.match(charsetUri) || text.match(uri) + if (uriMatch) { + return decodeURIComponent(text.substr(uriMatch[0].length)) + } + + let baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri) + if (baseUriMatch) { + return fromBase64(text.substr(baseUriMatch[0].length)) + } + + let encoding = text.match(/data:application\/json;([^,]+),/)[1] + throw new Error('Unsupported source map encoding ' + encoding) + } + + getAnnotationURL(sourceMapString) { + return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, '').trim() + } + + isMap(map) { + if (typeof map !== 'object') return false + return ( + typeof map.mappings === 'string' || + typeof map._mappings === 'string' || + Array.isArray(map.sections) + ) + } + + loadAnnotation(css) { + let comments = css.match(/\/\*\s*# sourceMappingURL=/g) + if (!comments) return + + // sourceMappingURLs from comments, strings, etc. + let start = css.lastIndexOf(comments.pop()) + let end = css.indexOf('*/', start) + + if (start > -1 && end > -1) { + // Locate the last sourceMappingURL to avoid pickin + this.annotation = this.getAnnotationURL(css.substring(start, end)) + } + } + + loadFile(path) { + this.root = dirname(path) + if (existsSync(path)) { + this.mapFile = path + return readFileSync(path, 'utf-8').toString().trim() + } + } + + loadMap(file, prev) { + if (prev === false) return false + + if (prev) { + if (typeof prev === 'string') { + return prev + } else if (typeof prev === 'function') { + let prevPath = prev(file) + if (prevPath) { + let map = this.loadFile(prevPath) + if (!map) { + throw new Error( + 'Unable to load previous source map: ' + prevPath.toString() + ) + } + return map + } + } else if (prev instanceof SourceMapConsumer) { + return SourceMapGenerator.fromSourceMap(prev).toString() + } else if (prev instanceof SourceMapGenerator) { + return prev.toString() + } else if (this.isMap(prev)) { + return JSON.stringify(prev) + } else { + throw new Error( + 'Unsupported previous source map format: ' + prev.toString() + ) + } + } else if (this.inline) { + return this.decodeInline(this.annotation) + } else if (this.annotation) { + let map = this.annotation + if (file) map = join(dirname(file), map) + return this.loadFile(map) + } + } + + startWith(string, start) { + if (!string) return false + return string.substr(0, start.length) === start + } + + withContent() { + return !!( + this.consumer().sourcesContent && + this.consumer().sourcesContent.length > 0 + ) + } +} + +module.exports = PreviousMap +PreviousMap.default = PreviousMap diff --git a/vuetest/node_modules/postcss/lib/processor.d.ts b/vuetest/node_modules/postcss/lib/processor.d.ts new file mode 100644 index 0000000..aa2942c --- /dev/null +++ b/vuetest/node_modules/postcss/lib/processor.d.ts @@ -0,0 +1,115 @@ +import Document from './document.js' +import LazyResult from './lazy-result.js' +import NoWorkResult from './no-work-result.js' +import { + AcceptedPlugin, + Plugin, + ProcessOptions, + TransformCallback, + Transformer +} from './postcss.js' +import Result from './result.js' +import Root from './root.js' + +declare namespace Processor { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Processor_ as default } +} + +/** + * Contains plugins to process CSS. Create one `Processor` instance, + * initialize its plugins, and then use that instance on numerous CSS files. + * + * ```js + * const processor = postcss([autoprefixer, postcssNested]) + * processor.process(css1).then(result => console.log(result.css)) + * processor.process(css2).then(result => console.log(result.css)) + * ``` + */ +declare class Processor_ { + /** + * Plugins added to this processor. + * + * ```js + * const processor = postcss([autoprefixer, postcssNested]) + * processor.plugins.length //=> 2 + * ``` + */ + plugins: (Plugin | TransformCallback | Transformer)[] + + /** + * Current PostCSS version. + * + * ```js + * if (result.processor.version.split('.')[0] !== '6') { + * throw new Error('This plugin works only with PostCSS 6') + * } + * ``` + */ + version: string + + /** + * @param plugins PostCSS plugins + */ + constructor(plugins?: readonly AcceptedPlugin[]) + + /** + * Parses source CSS and returns a `LazyResult` Promise proxy. + * Because some plugins can be asynchronous it doesn’t make + * any transformations. Transformations will be applied + * in the `LazyResult` methods. + * + * ```js + * processor.process(css, { from: 'a.css', to: 'a.out.css' }) + * .then(result => { + * console.log(result.css) + * }) + * ``` + * + * @param css String with input CSS or any object with a `toString()` method, + * like a Buffer. Optionally, send a `Result` instance + * and the processor will take the `Root` from it. + * @param opts Options. + * @return Promise proxy. + */ + process( + css: { toString(): string } | LazyResult | Result | Root | string + ): LazyResult | NoWorkResult + process<RootNode extends Document | Root = Root>( + css: { toString(): string } | LazyResult | Result | Root | string, + options: ProcessOptions<RootNode> + ): LazyResult<RootNode> + + /** + * Adds a plugin to be used as a CSS processor. + * + * PostCSS plugin can be in 4 formats: + * * A plugin in `Plugin` format. + * * A plugin creator function with `pluginCreator.postcss = true`. + * PostCSS will call this function without argument to get plugin. + * * A function. PostCSS will pass the function a {@link Root} + * as the first argument and current `Result` instance + * as the second. + * * Another `Processor` instance. PostCSS will copy plugins + * from that instance into this one. + * + * Plugins can also be added by passing them as arguments when creating + * a `postcss` instance (see [`postcss(plugins)`]). + * + * Asynchronous plugins should return a `Promise` instance. + * + * ```js + * const processor = postcss() + * .use(autoprefixer) + * .use(postcssNested) + * ``` + * + * @param plugin PostCSS plugin or `Processor` with plugins. + * @return Current processor to make methods chain. + */ + use(plugin: AcceptedPlugin): this +} + +declare class Processor extends Processor_ {} + +export = Processor diff --git a/vuetest/node_modules/postcss/lib/processor.js b/vuetest/node_modules/postcss/lib/processor.js new file mode 100644 index 0000000..6bbb2c6 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/processor.js @@ -0,0 +1,67 @@ +'use strict' + +let Document = require('./document') +let LazyResult = require('./lazy-result') +let NoWorkResult = require('./no-work-result') +let Root = require('./root') + +class Processor { + constructor(plugins = []) { + this.version = '8.5.1' + this.plugins = this.normalize(plugins) + } + + normalize(plugins) { + let normalized = [] + for (let i of plugins) { + if (i.postcss === true) { + i = i() + } else if (i.postcss) { + i = i.postcss + } + + if (typeof i === 'object' && Array.isArray(i.plugins)) { + normalized = normalized.concat(i.plugins) + } else if (typeof i === 'object' && i.postcssPlugin) { + normalized.push(i) + } else if (typeof i === 'function') { + normalized.push(i) + } else if (typeof i === 'object' && (i.parse || i.stringify)) { + if (process.env.NODE_ENV !== 'production') { + throw new Error( + 'PostCSS syntaxes cannot be used as plugins. Instead, please use ' + + 'one of the syntax/parser/stringifier options as outlined ' + + 'in your PostCSS runner documentation.' + ) + } + } else { + throw new Error(i + ' is not a PostCSS plugin') + } + } + return normalized + } + + process(css, opts = {}) { + if ( + !this.plugins.length && + !opts.parser && + !opts.stringifier && + !opts.syntax + ) { + return new NoWorkResult(this, css, opts) + } else { + return new LazyResult(this, css, opts) + } + } + + use(plugin) { + this.plugins = this.plugins.concat(this.normalize([plugin])) + return this + } +} + +module.exports = Processor +Processor.default = Processor + +Root.registerProcessor(Processor) +Document.registerProcessor(Processor) diff --git a/vuetest/node_modules/postcss/lib/result.d.ts b/vuetest/node_modules/postcss/lib/result.d.ts new file mode 100644 index 0000000..40e086f --- /dev/null +++ b/vuetest/node_modules/postcss/lib/result.d.ts @@ -0,0 +1,205 @@ +import { + Document, + Node, + Plugin, + ProcessOptions, + Root, + SourceMap, + TransformCallback, + Warning, + WarningOptions +} from './postcss.js' +import Processor from './processor.js' + +declare namespace Result { + export interface Message { + [others: string]: any + + /** + * Source PostCSS plugin name. + */ + plugin?: string + + /** + * Message type. + */ + type: string + } + + export interface ResultOptions extends ProcessOptions { + /** + * The CSS node that was the source of the warning. + */ + node?: Node + + /** + * Name of plugin that created this warning. `Result#warn` will fill it + * automatically with `Plugin#postcssPlugin` value. + */ + plugin?: string + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Result_ as default } +} + +/** + * Provides the result of the PostCSS transformations. + * + * A Result instance is returned by `LazyResult#then` + * or `Root#toResult` methods. + * + * ```js + * postcss([autoprefixer]).process(css).then(result => { + * console.log(result.css) + * }) + * ``` + * + * ```js + * const result2 = postcss.parse(css).toResult() + * ``` + */ +declare class Result_<RootNode = Document | Root> { + /** + * A CSS string representing of `Result#root`. + * + * ```js + * postcss.parse('a{}').toResult().css //=> "a{}" + * ``` + */ + css: string + + /** + * Last runned PostCSS plugin. + */ + lastPlugin: Plugin | TransformCallback + + /** + * An instance of `SourceMapGenerator` class from the `source-map` library, + * representing changes to the `Result#root` instance. + * + * ```js + * result.map.toJSON() //=> { version: 3, file: 'a.css', … } + * ``` + * + * ```js + * if (result.map) { + * fs.writeFileSync(result.opts.to + '.map', result.map.toString()) + * } + * ``` + */ + map: SourceMap + + /** + * Contains messages from plugins (e.g., warnings or custom messages). + * Each message should have type and plugin properties. + * + * ```js + * AtRule: { + * import: (atRule, { result }) { + * const importedFile = parseImport(atRule) + * result.messages.push({ + * type: 'dependency', + * plugin: 'postcss-import', + * file: importedFile, + * parent: result.opts.from + * }) + * } + * } + * ``` + */ + messages: Result.Message[] + + /** + * Options from the `Processor#process` or `Root#toResult` call + * that produced this Result instance.] + * + * ```js + * root.toResult(opts).opts === opts + * ``` + */ + opts: Result.ResultOptions + + /** + * The Processor instance used for this transformation. + * + * ```js + * for (const plugin of result.processor.plugins) { + * if (plugin.postcssPlugin === 'postcss-bad') { + * throw 'postcss-good is incompatible with postcss-bad' + * } + * }) + * ``` + */ + processor: Processor + + /** + * Root node after all transformations. + * + * ```js + * root.toResult().root === root + * ``` + */ + root: RootNode + + /** + * @param processor Processor used for this transformation. + * @param root Root node after all transformations. + * @param opts Options from the `Processor#process` or `Root#toResult`. + */ + constructor(processor: Processor, root: RootNode, opts: Result.ResultOptions) + + /** + * Returns for `Result#css` content. + * + * ```js + * result + '' === result.css + * ``` + * + * @return String representing of `Result#root`. + */ + toString(): string + + /** + * Creates an instance of `Warning` and adds it to `Result#messages`. + * + * ```js + * if (decl.important) { + * result.warn('Avoid !important', { node: decl, word: '!important' }) + * } + * ``` + * + * @param text Warning message. + * @param opts Warning options. + * @return Created warning. + */ + warn(message: string, options?: WarningOptions): Warning + + /** + * Returns warnings from plugins. Filters `Warning` instances + * from `Result#messages`. + * + * ```js + * result.warnings().forEach(warn => { + * console.warn(warn.toString()) + * }) + * ``` + * + * @return Warnings from plugins. + */ + warnings(): Warning[] + + /** + * An alias for the `Result#css` property. + * Use it with syntaxes that generate non-CSS output. + * + * ```js + * result.css === result.content + * ``` + */ + get content(): string +} + +declare class Result<RootNode = Document | Root> extends Result_<RootNode> {} + +export = Result diff --git a/vuetest/node_modules/postcss/lib/result.js b/vuetest/node_modules/postcss/lib/result.js new file mode 100644 index 0000000..a39751d --- /dev/null +++ b/vuetest/node_modules/postcss/lib/result.js @@ -0,0 +1,42 @@ +'use strict' + +let Warning = require('./warning') + +class Result { + constructor(processor, root, opts) { + this.processor = processor + this.messages = [] + this.root = root + this.opts = opts + this.css = undefined + this.map = undefined + } + + toString() { + return this.css + } + + warn(text, opts = {}) { + if (!opts.plugin) { + if (this.lastPlugin && this.lastPlugin.postcssPlugin) { + opts.plugin = this.lastPlugin.postcssPlugin + } + } + + let warning = new Warning(text, opts) + this.messages.push(warning) + + return warning + } + + warnings() { + return this.messages.filter(i => i.type === 'warning') + } + + get content() { + return this.css + } +} + +module.exports = Result +Result.default = Result diff --git a/vuetest/node_modules/postcss/lib/root.d.ts b/vuetest/node_modules/postcss/lib/root.d.ts new file mode 100644 index 0000000..5c91139 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/root.d.ts @@ -0,0 +1,87 @@ +import Container, { ContainerProps } from './container.js' +import Document from './document.js' +import { ProcessOptions } from './postcss.js' +import Result from './result.js' + +declare namespace Root { + export interface RootRaws extends Record<string, any> { + /** + * The space symbols after the last child to the end of file. + */ + after?: string + + /** + * Non-CSS code after `Root`, when `Root` is inside `Document`. + * + * **Experimental:** some aspects of this node could change within minor + * or patch version releases. + */ + codeAfter?: string + + /** + * Non-CSS code before `Root`, when `Root` is inside `Document`. + * + * **Experimental:** some aspects of this node could change within minor + * or patch version releases. + */ + codeBefore?: string + + /** + * Is the last child has an (optional) semicolon. + */ + semicolon?: boolean + } + + export interface RootProps extends ContainerProps { + /** + * Information used to generate byte-to-byte equal node string + * as it was in the origin input. + * */ + raws?: RootRaws + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Root_ as default } +} + +/** + * Represents a CSS file and contains all its parsed nodes. + * + * ```js + * const root = postcss.parse('a{color:black} b{z-index:2}') + * root.type //=> 'root' + * root.nodes.length //=> 2 + * ``` + */ +declare class Root_ extends Container { + nodes: NonNullable<Container['nodes']> + parent: Document | undefined + raws: Root.RootRaws + type: 'root' + + constructor(defaults?: Root.RootProps) + + assign(overrides: object | Root.RootProps): this + clone(overrides?: Partial<Root.RootProps>): this + cloneAfter(overrides?: Partial<Root.RootProps>): this + cloneBefore(overrides?: Partial<Root.RootProps>): this + + /** + * Returns a `Result` instance representing the root’s CSS. + * + * ```js + * const root1 = postcss.parse(css1, { from: 'a.css' }) + * const root2 = postcss.parse(css2, { from: 'b.css' }) + * root1.append(root2) + * const result = root1.toResult({ to: 'all.css', map: true }) + * ``` + * + * @param options Options. + * @return Result with current root’s CSS. + */ + toResult(options?: ProcessOptions): Result +} + +declare class Root extends Root_ {} + +export = Root diff --git a/vuetest/node_modules/postcss/lib/root.js b/vuetest/node_modules/postcss/lib/root.js new file mode 100644 index 0000000..ea574ed --- /dev/null +++ b/vuetest/node_modules/postcss/lib/root.js @@ -0,0 +1,61 @@ +'use strict' + +let Container = require('./container') + +let LazyResult, Processor + +class Root extends Container { + constructor(defaults) { + super(defaults) + this.type = 'root' + if (!this.nodes) this.nodes = [] + } + + normalize(child, sample, type) { + let nodes = super.normalize(child) + + if (sample) { + if (type === 'prepend') { + if (this.nodes.length > 1) { + sample.raws.before = this.nodes[1].raws.before + } else { + delete sample.raws.before + } + } else if (this.first !== sample) { + for (let node of nodes) { + node.raws.before = sample.raws.before + } + } + } + + return nodes + } + + removeChild(child, ignore) { + let index = this.index(child) + + if (!ignore && index === 0 && this.nodes.length > 1) { + this.nodes[1].raws.before = this.nodes[index].raws.before + } + + return super.removeChild(child) + } + + toResult(opts = {}) { + let lazy = new LazyResult(new Processor(), this, opts) + return lazy.stringify() + } +} + +Root.registerLazyResult = dependant => { + LazyResult = dependant +} + +Root.registerProcessor = dependant => { + Processor = dependant +} + +module.exports = Root +Root.default = Root + +Container.registerRoot(Root) diff --git a/vuetest/node_modules/postcss/lib/rule.d.ts b/vuetest/node_modules/postcss/lib/rule.d.ts new file mode 100644 index 0000000..ff61769 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/rule.d.ts @@ -0,0 +1,126 @@ +import Container, { + ContainerProps, + ContainerWithChildren +} from './container.js' + +declare namespace Rule { + export interface RuleRaws extends Record<string, unknown> { + /** + * The space symbols after the last child of the node to the end of the node. + */ + after?: string + + /** + * The space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + */ + before?: string + + /** + * The symbols between the selector and `{` for rules. + */ + between?: string + + /** + * Contains the text of the semicolon after this rule. + */ + ownSemicolon?: string + + /** + * The rule’s selector with comments. + */ + selector?: { + raw: string + value: string + } + + /** + * Contains `true` if the last child has an (optional) semicolon. + */ + semicolon?: boolean + } + + export type RuleProps = { + /** Information used to generate byte-to-byte equal node string as it was in the origin input. */ + raws?: RuleRaws + } & ( + | { + /** Selector or selectors of the rule. */ + selector: string + selectors?: never + } + | { + selector?: never + /** Selectors of the rule represented as an array of strings. */ + selectors: readonly string[] + } + ) & ContainerProps + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Rule_ as default } +} + +/** + * Represents a CSS rule: a selector followed by a declaration block. + * + * ```js + * Once (root, { Rule }) { + * let a = new Rule({ selector: 'a' }) + * a.append(…) + * root.append(a) + * } + * ``` + * + * ```js + * const root = postcss.parse('a{}') + * const rule = root.first + * rule.type //=> 'rule' + * rule.toString() //=> 'a{}' + * ``` + */ +declare class Rule_ extends Container { + nodes: NonNullable<Container['nodes']> + parent: ContainerWithChildren | undefined + raws: Rule.RuleRaws + type: 'rule' + constructor(defaults?: Rule.RuleProps) + + assign(overrides: object | Rule.RuleProps): this + clone(overrides?: Partial<Rule.RuleProps>): this + + cloneAfter(overrides?: Partial<Rule.RuleProps>): this + + cloneBefore(overrides?: Partial<Rule.RuleProps>): this + /** + * The rule’s full selector represented as a string. + * + * ```js + * const root = postcss.parse('a, b { }') + * const rule = root.first + * rule.selector //=> 'a, b' + * ``` + */ + get selector(): string + set selector(value: string) + /** + * An array containing the rule’s individual selectors. + * Groups of selectors are split at commas. + * + * ```js + * const root = postcss.parse('a, b { }') + * const rule = root.first + * + * rule.selector //=> 'a, b' + * rule.selectors //=> ['a', 'b'] + * + * rule.selectors = ['a', 'strong'] + * rule.selector //=> 'a, strong' + * ``` + */ + get selectors(): string[] + set selectors(values: string[]) +} + +declare class Rule extends Rule_ {} + +export = Rule diff --git a/vuetest/node_modules/postcss/lib/rule.js b/vuetest/node_modules/postcss/lib/rule.js new file mode 100644 index 0000000..a93ab25 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/rule.js @@ -0,0 +1,27 @@ +'use strict' + +let Container = require('./container') +let list = require('./list') + +class Rule extends Container { + constructor(defaults) { + super(defaults) + this.type = 'rule' + if (!this.nodes) this.nodes = [] + } + + get selectors() { + return list.comma(this.selector) + } + + set selectors(values) { + let match = this.selector ? this.selector.match(/,\s*/) : null + let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen') + this.selector = values.join(sep) + } +} + +module.exports = Rule +Rule.default = Rule + +Container.registerRule(Rule) diff --git a/vuetest/node_modules/postcss/lib/stringifier.d.ts b/vuetest/node_modules/postcss/lib/stringifier.d.ts new file mode 100644 index 0000000..f707a6a --- /dev/null +++ b/vuetest/node_modules/postcss/lib/stringifier.d.ts @@ -0,0 +1,46 @@ +import { + AnyNode, + AtRule, + Builder, + Comment, + Container, + Declaration, + Document, + Root, + Rule +} from './postcss.js' + +declare namespace Stringifier { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Stringifier_ as default } +} + +declare class Stringifier_ { + builder: Builder + constructor(builder: Builder) + atrule(node: AtRule, semicolon?: boolean): void + beforeAfter(node: AnyNode, detect: 'after' | 'before'): string + block(node: AnyNode, start: string): void + body(node: Container): void + comment(node: Comment): void + decl(node: Declaration, semicolon?: boolean): void + document(node: Document): void + raw(node: AnyNode, own: null | string, detect?: string): string + rawBeforeClose(root: Root): string | undefined + rawBeforeComment(root: Root, node: Comment): string | undefined + rawBeforeDecl(root: Root, node: Declaration): string | undefined + rawBeforeOpen(root: Root): string | undefined + rawBeforeRule(root: Root): string | undefined + rawColon(root: Root): string | undefined + rawEmptyBody(root: Root): string | undefined + rawIndent(root: Root): string | undefined + rawSemicolon(root: Root): boolean | undefined + rawValue(node: AnyNode, prop: string): string + root(node: Root): void + rule(node: Rule): void + stringify(node: AnyNode, semicolon?: boolean): void +} + +declare class Stringifier extends Stringifier_ {} + +export = Stringifier diff --git a/vuetest/node_modules/postcss/lib/stringifier.js b/vuetest/node_modules/postcss/lib/stringifier.js new file mode 100644 index 0000000..e07ad12 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/stringifier.js @@ -0,0 +1,353 @@ +'use strict' + +const DEFAULT_RAW = { + after: '\n', + beforeClose: '\n', + beforeComment: '\n', + beforeDecl: '\n', + beforeOpen: ' ', + beforeRule: '\n', + colon: ': ', + commentLeft: ' ', + commentRight: ' ', + emptyBody: '', + indent: ' ', + semicolon: false +} + +function capitalize(str) { + return str[0].toUpperCase() + str.slice(1) +} + +class Stringifier { + constructor(builder) { + this.builder = builder + } + + atrule(node, semicolon) { + let name = '@' + node.name + let params = node.params ? this.rawValue(node, 'params') : '' + + if (typeof node.raws.afterName !== 'undefined') { + name += node.raws.afterName + } else if (params) { + name += ' ' + } + + if (node.nodes) { + this.block(node, name + params) + } else { + let end = (node.raws.between || '') + (semicolon ? ';' : '') + this.builder(name + params + end, node) + } + } + + beforeAfter(node, detect) { + let value + if (node.type === 'decl') { + value = this.raw(node, null, 'beforeDecl') + } else if (node.type === 'comment') { + value = this.raw(node, null, 'beforeComment') + } else if (detect === 'before') { + value = this.raw(node, null, 'beforeRule') + } else { + value = this.raw(node, null, 'beforeClose') + } + + let buf = node.parent + let depth = 0 + while (buf && buf.type !== 'root') { + depth += 1 + buf = buf.parent + } + + if (value.includes('\n')) { + let indent = this.raw(node, null, 'indent') + if (indent.length) { + for (let step = 0; step < depth; step++) value += indent + } + } + + return value + } + + block(node, start) { + let between = this.raw(node, 'between', 'beforeOpen') + this.builder(start + between + '{', node, 'start') + + let after + if (node.nodes && node.nodes.length) { + this.body(node) + after = this.raw(node, 'after') + } else { + after = this.raw(node, 'after', 'emptyBody') + } + + if (after) this.builder(after) + this.builder('}', node, 'end') + } + + body(node) { + let last = node.nodes.length - 1 + while (last > 0) { + if (node.nodes[last].type !== 'comment') break + last -= 1 + } + + let semicolon = this.raw(node, 'semicolon') + for (let i = 0; i < node.nodes.length; i++) { + let child = node.nodes[i] + let before = this.raw(child, 'before') + if (before) this.builder(before) + this.stringify(child, last !== i || semicolon) + } + } + + comment(node) { + let left = this.raw(node, 'left', 'commentLeft') + let right = this.raw(node, 'right', 'commentRight') + this.builder('/*' + left + node.text + right + '*/', node) + } + + decl(node, semicolon) { + let between = this.raw(node, 'between', 'colon') + let string = node.prop + between + this.rawValue(node, 'value') + + if (node.important) { + string += node.raws.important || ' !important' + } + + if (semicolon) string += ';' + this.builder(string, node) + } + + document(node) { + this.body(node) + } + + raw(node, own, detect) { + let value + if (!detect) detect = own + + // Already had + if (own) { + value = node.raws[own] + if (typeof value !== 'undefined') return value + } + + let parent = node.parent + + if (detect === 'before') { + // Hack for first rule in CSS + if (!parent || (parent.type === 'root' && parent.first === node)) { + return '' + } + + // `root` nodes in `document` should use only their own raws + if (parent && parent.type === 'document') { + return '' + } + } + + // Floating child without parent + if (!parent) return DEFAULT_RAW[detect] + + // Detect style by other nodes + let root = node.root() + if (!root.rawCache) root.rawCache = {} + if (typeof root.rawCache[detect] !== 'undefined') { + return root.rawCache[detect] + } + + if (detect === 'before' || detect === 'after') { + return this.beforeAfter(node, detect) + } else { + let method = 'raw' + capitalize(detect) + if (this[method]) { + value = this[method](root, node) + } else { + root.walk(i => { + value = i.raws[own] + if (typeof value !== 'undefined') return false + }) + } + } + + if (typeof value === 'undefined') value = DEFAULT_RAW[detect] + + root.rawCache[detect] = value + return value + } + + rawBeforeClose(root) { + let value + root.walk(i => { + if (i.nodes && i.nodes.length > 0) { + if (typeof i.raws.after !== 'undefined') { + value = i.raws.after + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, '') + } + return false + } + } + }) + if (value) value = value.replace(/\S/g, '') + return value + } + + rawBeforeComment(root, node) { + let value + root.walkComments(i => { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, '') + } + return false + } + }) + if (typeof value === 'undefined') { + value = this.raw(node, null, 'beforeDecl') + } else if (value) { + value = value.replace(/\S/g, '') + } + return value + } + + rawBeforeDecl(root, node) { + let value + root.walkDecls(i => { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, '') + } + return false + } + }) + if (typeof value === 'undefined') { + value = this.raw(node, null, 'beforeRule') + } else if (value) { + value = value.replace(/\S/g, '') + } + return value + } + + rawBeforeOpen(root) { + let value + root.walk(i => { + if (i.type !== 'decl') { + value = i.raws.between + if (typeof value !== 'undefined') return false + } + }) + return value + } + + rawBeforeRule(root) { + let value + root.walk(i => { + if (i.nodes && (i.parent !== root || root.first !== i)) { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, '') + } + return false + } + } + }) + if (value) value = value.replace(/\S/g, '') + return value + } + + rawColon(root) { + let value + root.walkDecls(i => { + if (typeof i.raws.between !== 'undefined') { + value = i.raws.between.replace(/[^\s:]/g, '') + return false + } + }) + return value + } + + rawEmptyBody(root) { + let value + root.walk(i => { + if (i.nodes && i.nodes.length === 0) { + value = i.raws.after + if (typeof value !== 'undefined') return false + } + }) + return value + } + + rawIndent(root) { + if (root.raws.indent) return root.raws.indent + let value + root.walk(i => { + let p = i.parent + if (p && p !== root && p.parent && p.parent === root) { + if (typeof i.raws.before !== 'undefined') { + let parts = i.raws.before.split('\n') + value = parts[parts.length - 1] + value = value.replace(/\S/g, '') + return false + } + } + }) + return value + } + + rawSemicolon(root) { + let value + root.walk(i => { + if (i.nodes && i.nodes.length && i.last.type === 'decl') { + value = i.raws.semicolon + if (typeof value !== 'undefined') return false + } + }) + return value + } + + rawValue(node, prop) { + let value = node[prop] + let raw = node.raws[prop] + if (raw && raw.value === value) { + return raw.raw + } + + return value + } + + root(node) { + this.body(node) + if (node.raws.after) this.builder(node.raws.after) + } + + rule(node) { + this.block(node, this.rawValue(node, 'selector')) + if (node.raws.ownSemicolon) { + this.builder(node.raws.ownSemicolon, node, 'end') + } + } + + stringify(node, semicolon) { + /* c8 ignore start */ + if (!this[node.type]) { + throw new Error( + 'Unknown AST node type ' + + node.type + + '. ' + + 'Maybe you need to change PostCSS stringifier.' + ) + } + /* c8 ignore stop */ + this[node.type](node, semicolon) + } +} + +module.exports = Stringifier +Stringifier.default = Stringifier diff --git a/vuetest/node_modules/postcss/lib/stringify.d.ts b/vuetest/node_modules/postcss/lib/stringify.d.ts new file mode 100644 index 0000000..06ad0b4 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/stringify.d.ts @@ -0,0 +1,9 @@ +import { Stringifier } from './postcss.js' + +interface Stringify extends Stringifier { + default: Stringify +} + +declare const stringify: Stringify + +export = stringify diff --git a/vuetest/node_modules/postcss/lib/stringify.js b/vuetest/node_modules/postcss/lib/stringify.js new file mode 100644 index 0000000..77bd017 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/stringify.js @@ -0,0 +1,11 @@ +'use strict' + +let Stringifier = require('./stringifier') + +function stringify(node, builder) { + let str = new Stringifier(builder) + str.stringify(node) +} + +module.exports = stringify +stringify.default = stringify diff --git a/vuetest/node_modules/postcss/lib/symbols.js b/vuetest/node_modules/postcss/lib/symbols.js new file mode 100644 index 0000000..a142c26 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/symbols.js @@ -0,0 +1,5 @@ +'use strict' + +module.exports.isClean = Symbol('isClean') + +module.exports.my = Symbol('my') diff --git a/vuetest/node_modules/postcss/lib/terminal-highlight.js b/vuetest/node_modules/postcss/lib/terminal-highlight.js new file mode 100644 index 0000000..6196c9d --- /dev/null +++ b/vuetest/node_modules/postcss/lib/terminal-highlight.js @@ -0,0 +1,70 @@ +'use strict' + +let pico = require('picocolors') + +let tokenizer = require('./tokenize') + +let Input + +function registerInput(dependant) { + Input = dependant +} + +const HIGHLIGHT_THEME = { + ';': pico.yellow, + ':': pico.yellow, + '(': pico.cyan, + ')': pico.cyan, + '[': pico.yellow, + ']': pico.yellow, + '{': pico.yellow, + '}': pico.yellow, + 'at-word': pico.cyan, + 'brackets': pico.cyan, + 'call': pico.cyan, + 'class': pico.yellow, + 'comment': pico.gray, + 'hash': pico.magenta, + 'string': pico.green +} + +function getTokenType([type, value], processor) { + if (type === 'word') { + if (value[0] === '.') { + return 'class' + } + if (value[0] === '#') { + return 'hash' + } + } + + if (!processor.endOfFile()) { + let next = processor.nextToken() + processor.back(next) + if (next[0] === 'brackets' || next[0] === '(') return 'call' + } + + return type +} + +function terminalHighlight(css) { + let processor = tokenizer(new Input(css), { ignoreErrors: true }) + let result = '' + while (!processor.endOfFile()) { + let token = processor.nextToken() + let color = HIGHLIGHT_THEME[getTokenType(token, processor)] + if (color) { + result += token[1] + .split(/\r?\n/) + .map(i => color(i)) + .join('\n') + } else { + result += token[1] + } + } + return result +} + +terminalHighlight.registerInput = registerInput + +module.exports = terminalHighlight diff --git a/vuetest/node_modules/postcss/lib/tokenize.js b/vuetest/node_modules/postcss/lib/tokenize.js new file mode 100644 index 0000000..1d41284 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/tokenize.js @@ -0,0 +1,266 @@ +'use strict' + +const SINGLE_QUOTE = "'".charCodeAt(0) +const DOUBLE_QUOTE = '"'.charCodeAt(0) +const BACKSLASH = '\\'.charCodeAt(0) +const SLASH = '/'.charCodeAt(0) +const NEWLINE = '\n'.charCodeAt(0) +const SPACE = ' '.charCodeAt(0) +const FEED = '\f'.charCodeAt(0) +const TAB = '\t'.charCodeAt(0) +const CR = '\r'.charCodeAt(0) +const OPEN_SQUARE = '['.charCodeAt(0) +const CLOSE_SQUARE = ']'.charCodeAt(0) +const OPEN_PARENTHESES = '('.charCodeAt(0) +const CLOSE_PARENTHESES = ')'.charCodeAt(0) +const OPEN_CURLY = '{'.charCodeAt(0) +const CLOSE_CURLY = '}'.charCodeAt(0) +const SEMICOLON = ';'.charCodeAt(0) +const ASTERISK = '*'.charCodeAt(0) +const COLON = ':'.charCodeAt(0) +const AT = '@'.charCodeAt(0) + +const RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g +const RE_WORD_END = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g +const RE_BAD_BRACKET = /.[\r\n"'(/\\]/ +const RE_HEX_ESCAPE = /[\da-f]/i + +module.exports = function tokenizer(input, options = {}) { + let css = input.css.valueOf() + let ignore = options.ignoreErrors + + let code, content, escape, next, quote + let currentToken, escaped, escapePos, n, prev + + let length = css.length + let pos = 0 + let buffer = [] + let returned = [] + + function position() { + return pos + } + + function unclosed(what) { + throw input.error('Unclosed ' + what, pos) + } + + function endOfFile() { + return returned.length === 0 && pos >= length + } + + function nextToken(opts) { + if (returned.length) return returned.pop() + if (pos >= length) return + + let ignoreUnclosed = opts ? opts.ignoreUnclosed : false + + code = css.charCodeAt(pos) + + switch (code) { + case NEWLINE: + case SPACE: + case TAB: + case CR: + case FEED: { + next = pos + do { + next += 1 + code = css.charCodeAt(next) + } while ( + code === SPACE || + code === NEWLINE || + code === TAB || + code === CR || + code === FEED + ) + + currentToken = ['space', css.slice(pos, next)] + pos = next - 1 + break + } + + case OPEN_SQUARE: + case CLOSE_SQUARE: + case OPEN_CURLY: + case CLOSE_CURLY: + case COLON: + case SEMICOLON: + case CLOSE_PARENTHESES: { + let controlChar = String.fromCharCode(code) + currentToken = [controlChar, controlChar, pos] + break + } + + case OPEN_PARENTHESES: { + prev = buffer.length ? buffer.pop()[1] : '' + n = css.charCodeAt(pos + 1) + if ( + prev === 'url' && + n !== SINGLE_QUOTE && + n !== DOUBLE_QUOTE && + n !== SPACE && + n !== NEWLINE && + n !== TAB && + n !== FEED && + n !== CR + ) { + next = pos + do { + escaped = false + next = css.indexOf(')', next + 1) + if (next === -1) { + if (ignore || ignoreUnclosed) { + next = pos + break + } else { + unclosed('bracket') + } + } + escapePos = next + while (css.charCodeAt(escapePos - 1) === BACKSLASH) { + escapePos -= 1 + escaped = !escaped + } + } while (escaped) + + currentToken = ['brackets', css.slice(pos, next + 1), pos, next] + + pos = next + } else { + next = css.indexOf(')', pos + 1) + content = css.slice(pos, next + 1) + + if (next === -1 || RE_BAD_BRACKET.test(content)) { + currentToken = ['(', '(', pos] + } else { + currentToken = ['brackets', content, pos, next] + pos = next + } + } + + break + } + + case SINGLE_QUOTE: + case DOUBLE_QUOTE: { + quote = code === SINGLE_QUOTE ? "'" : '"' + next = pos + do { + escaped = false + next = css.indexOf(quote, next + 1) + if (next === -1) { + if (ignore || ignoreUnclosed) { + next = pos + 1 + break + } else { + unclosed('string') + } + } + escapePos = next + while (css.charCodeAt(escapePos - 1) === BACKSLASH) { + escapePos -= 1 + escaped = !escaped + } + } while (escaped) + + currentToken = ['string', css.slice(pos, next + 1), pos, next] + pos = next + break + } + + case AT: { + RE_AT_END.lastIndex = pos + 1 + RE_AT_END.test(css) + if (RE_AT_END.lastIndex === 0) { + next = css.length - 1 + } else { + next = RE_AT_END.lastIndex - 2 + } + + currentToken = ['at-word', css.slice(pos, next + 1), pos, next] + + pos = next + break + } + + case BACKSLASH: { + next = pos + escape = true + while (css.charCodeAt(next + 1) === BACKSLASH) { + next += 1 + escape = !escape + } + code = css.charCodeAt(next + 1) + if ( + escape && + code !== SLASH && + code !== SPACE && + code !== NEWLINE && + code !== TAB && + code !== CR && + code !== FEED + ) { + next += 1 + if (RE_HEX_ESCAPE.test(css.charAt(next))) { + while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) { + next += 1 + } + if (css.charCodeAt(next + 1) === SPACE) { + next += 1 + } + } + } + + currentToken = ['word', css.slice(pos, next + 1), pos, next] + + pos = next + break + } + + default: { + if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) { + next = css.indexOf('*/', pos + 2) + 1 + if (next === 0) { + if (ignore || ignoreUnclosed) { + next = css.length + } else { + unclosed('comment') + } + } + + currentToken = ['comment', css.slice(pos, next + 1), pos, next] + pos = next + } else { + RE_WORD_END.lastIndex = pos + 1 + RE_WORD_END.test(css) + if (RE_WORD_END.lastIndex === 0) { + next = css.length - 1 + } else { + next = RE_WORD_END.lastIndex - 2 + } + + currentToken = ['word', css.slice(pos, next + 1), pos, next] + buffer.push(currentToken) + pos = next + } + + break + } + } + + pos++ + return currentToken + } + + function back(token) { + returned.push(token) + } + + return { + back, + endOfFile, + nextToken, + position + } +} diff --git a/vuetest/node_modules/postcss/lib/warn-once.js b/vuetest/node_modules/postcss/lib/warn-once.js new file mode 100644 index 0000000..316e1cf --- /dev/null +++ b/vuetest/node_modules/postcss/lib/warn-once.js @@ -0,0 +1,13 @@ +/* eslint-disable no-console */ +'use strict' + +let printed = {} + +module.exports = function warnOnce(message) { + if (printed[message]) return + printed[message] = true + + if (typeof console !== 'undefined' && console.warn) { + console.warn(message) + } +} diff --git a/vuetest/node_modules/postcss/lib/warning.d.ts b/vuetest/node_modules/postcss/lib/warning.d.ts new file mode 100644 index 0000000..b25bba8 --- /dev/null +++ b/vuetest/node_modules/postcss/lib/warning.d.ts @@ -0,0 +1,147 @@ +import { RangePosition } from './css-syntax-error.js' +import Node from './node.js' + +declare namespace Warning { + export interface WarningOptions { + /** + * End position, exclusive, in CSS node string that caused the warning. + */ + end?: RangePosition + + /** + * End index, exclusive, in CSS node string that caused the warning. + */ + endIndex?: number + + /** + * Start index, inclusive, in CSS node string that caused the warning. + */ + index?: number + + /** + * CSS node that caused the warning. + */ + node?: Node + + /** + * Name of the plugin that created this warning. `Result#warn` fills + * this property automatically. + */ + plugin?: string + + /** + * Start position, inclusive, in CSS node string that caused the warning. + */ + start?: RangePosition + + /** + * Word in CSS source that caused the warning. + */ + word?: string + } + + // eslint-disable-next-line @typescript-eslint/no-use-before-define + export { Warning_ as default } +} + +/** + * Represents a plugin’s warning. It can be created using `Node#warn`. + * + * ```js + * if (decl.important) { + * decl.warn(result, 'Avoid !important', { word: '!important' }) + * } + * ``` + */ +declare class Warning_ { + /** + * Column for inclusive start position in the input file with this warning’s source. + * + * ```js + * warning.column //=> 6 + * ``` + */ + column: number + + /** + * Column for exclusive end position in the input file with this warning’s source. + * + * ```js + * warning.endColumn //=> 4 + * ``` + */ + endColumn?: number + + /** + * Line for exclusive end position in the input file with this warning’s source. + * + * ```js + * warning.endLine //=> 6 + * ``` + */ + endLine?: number + + /** + * Line for inclusive start position in the input file with this warning’s source. + * + * ```js + * warning.line //=> 5 + * ``` + */ + line: number + + /** + * Contains the CSS node that caused the warning. + * + * ```js + * warning.node.toString() //=> 'color: white !important' + * ``` + */ + node: Node + + /** + * The name of the plugin that created this warning. + * When you call `Node#warn` it will fill this property automatically. + * + * ```js + * warning.plugin //=> 'postcss-important' + * ``` + */ + plugin: string + + /** + * The warning message. + * + * ```js + * warning.text //=> 'Try to avoid !important' + * ``` + */ + text: string + + /** + * Type to filter warnings from `Result#messages`. + * Always equal to `"warning"`. + */ + type: 'warning' + + /** + * @param text Warning message. + * @param opts Warning options. + */ + constructor(text: string, opts?: Warning.WarningOptions) + + /** + * Returns a warning position and message. + * + * ```js + * warning.toString() //=> 'postcss-lint:a.css:10:14: Avoid !important' + * ``` + * + * @return Warning position and message. + */ + toString(): string +} + +declare class Warning extends Warning_ {} + +export = Warning diff --git a/vuetest/node_modules/postcss/lib/warning.js b/vuetest/node_modules/postcss/lib/warning.js new file mode 100644 index 0000000..3a3d79c --- /dev/null +++ b/vuetest/node_modules/postcss/lib/warning.js @@ -0,0 +1,37 @@ +'use strict' + +class Warning { + constructor(text, opts = {}) { + this.type = 'warning' + this.text = text + + if (opts.node && opts.node.source) { + let range = opts.node.rangeBy(opts) + this.line = range.start.line + this.column = range.start.column + this.endLine = range.end.line + this.endColumn = range.end.column + } + + for (let opt in opts) this[opt] = opts[opt] + } + + toString() { + if (this.node) { + return this.node.error(this.text, { + index: this.index, + plugin: this.plugin, + word: this.word + }).message + } + + if (this.plugin) { + return this.plugin + ': ' + this.text + } + + return this.text + } +} + +module.exports = Warning +Warning.default = Warning diff --git a/vuetest/node_modules/postcss/package.json b/vuetest/node_modules/postcss/package.json new file mode 100644 index 0000000..442dfac --- /dev/null +++ b/vuetest/node_modules/postcss/package.json @@ -0,0 +1,88 @@ +{ + "name": "postcss", + "version": "8.5.1", + "description": "Tool for transforming styles with JS plugins", + "engines": { + "node": "^10 || ^12 || >=14" + }, + "exports": { + ".": { + "require": "./lib/postcss.js", + "import": "./lib/postcss.mjs" + }, + "./lib/at-rule": "./lib/at-rule.js", + "./lib/comment": "./lib/comment.js", + "./lib/container": "./lib/container.js", + "./lib/css-syntax-error": "./lib/css-syntax-error.js", + "./lib/declaration": "./lib/declaration.js", + "./lib/fromJSON": "./lib/fromJSON.js", + "./lib/input": "./lib/input.js", + "./lib/lazy-result": "./lib/lazy-result.js", + "./lib/no-work-result": "./lib/no-work-result.js", + "./lib/list": "./lib/list.js", + "./lib/map-generator": "./lib/map-generator.js", + "./lib/node": "./lib/node.js", + "./lib/parse": "./lib/parse.js", + "./lib/parser": "./lib/parser.js", + "./lib/postcss": "./lib/postcss.js", + "./lib/previous-map": "./lib/previous-map.js", + "./lib/processor": "./lib/processor.js", + "./lib/result": "./lib/result.js", + "./lib/root": "./lib/root.js", + "./lib/rule": "./lib/rule.js", + "./lib/stringifier": "./lib/stringifier.js", + "./lib/stringify": "./lib/stringify.js", + "./lib/symbols": "./lib/symbols.js", + "./lib/terminal-highlight": "./lib/terminal-highlight.js", + "./lib/tokenize": "./lib/tokenize.js", + "./lib/warn-once": "./lib/warn-once.js", + "./lib/warning": "./lib/warning.js", + "./package.json": "./package.json" + }, + "main": "./lib/postcss.js", + "types": "./lib/postcss.d.ts", + "keywords": [ + "css", + "postcss", + "rework", + "preprocessor", + "parser", + "source map", + "transform", + "manipulation", + "transpiler" + ], + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "author": "Andrey Sitnik <andrey@sitnik.ru>", + "license": "MIT", + "homepage": "https://postcss.org/", + "repository": "postcss/postcss", + "bugs": { + "url": "https://github.com/postcss/postcss/issues" + }, + "dependencies": { + "nanoid": "^3.3.8", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "browser": { + "./lib/terminal-highlight": false, + "source-map-js": false, + "path": false, + "url": false, + "fs": false + } +} diff --git a/vuetest/node_modules/source-map-js/LICENSE b/vuetest/node_modules/source-map-js/LICENSE new file mode 100644 index 0000000..ed1b7cf --- /dev/null +++ b/vuetest/node_modules/source-map-js/LICENSE @@ -0,0 +1,28 @@ + +Copyright (c) 2009-2011, Mozilla Foundation and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the names of the Mozilla Foundation nor the names of project + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vuetest/node_modules/source-map-js/README.md b/vuetest/node_modules/source-map-js/README.md new file mode 100644 index 0000000..614962d --- /dev/null +++ b/vuetest/node_modules/source-map-js/README.md @@ -0,0 +1,765 @@ +# Source Map JS + +[![NPM](https://nodei.co/npm/source-map-js.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map-js) + +Difference between original [source-map](https://github.com/mozilla/source-map): + +> TL,DR: it's fork of original source-map@0.6, but with perfomance optimizations. + +This journey starts from [source-map@0.7.0](https://github.com/mozilla/source-map/blob/master/CHANGELOG.md#070). Some part of it was rewritten to Rust and WASM and API became async. + +It's still a major block for many libraries like PostCSS or Sass for example because they need to migrate the whole API to the async way. This is the reason why 0.6.1 has 2x more downloads than 0.7.3 while it's faster several times. + +![Downloads count](media/downloads.png) + +More important that WASM version has some optimizations in JS code too. This is why [community asked to create branch for 0.6 version](https://github.com/mozilla/source-map/issues/324) and port these optimizations but, sadly, the answer was «no». A bit later I discovered [the issue](https://github.com/mozilla/source-map/issues/370) created by [Ben Rothman (@benthemonkey)](https://github.com/benthemonkey) with no response at all. + +[Roman Dvornov (@lahmatiy)](https://github.com/lahmatiy) wrote a [serveral posts](https://t.me/gorshochekvarit/76) (russian, only, sorry) about source-map library in his own Telegram channel. He mentioned the article [«Maybe you don't need Rust and WASM to speed up your JS»](https://mrale.ph/blog/2018/02/03/maybe-you-dont-need-rust-to-speed-up-your-js.html) written by [Vyacheslav Egorov (@mraleph)](https://github.com/mraleph). This article contains optimizations and hacks that lead to almost the same performance compare to WASM implementation. + +I decided to fork the original source-map and port these optimizations from the article and several others PR from the original source-map. + +--------- + +This is a library to generate and consume the source map format +[described here][format]. + +[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit + +## Use with Node + + $ npm install source-map-js + +<!-- ## Use on the Web + + <script src="https://raw.githubusercontent.com/mozilla/source-map/master/dist/source-map.min.js" defer></script> --> + +-------------------------------------------------------------------------------- + +<!-- `npm run toc` to regenerate the Table of Contents --> + +<!-- START doctoc generated TOC please keep comment here to allow auto update --> +<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> +## Table of Contents + +- [Examples](#examples) + - [Consuming a source map](#consuming-a-source-map) + - [Generating a source map](#generating-a-source-map) + - [With SourceNode (high level API)](#with-sourcenode-high-level-api) + - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) +- [API](#api) + - [SourceMapConsumer](#sourcemapconsumer) + - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) + - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) + - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) + - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) + - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) + - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) + - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) + - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) + - [SourceMapGenerator](#sourcemapgenerator) + - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) + - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) + - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) + - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) + - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) + - [SourceNode](#sourcenode) + - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) + - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) + - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) + - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) + - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) + - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) + - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) + - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) + - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) + - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) + +<!-- END doctoc generated TOC please keep comment here to allow auto update --> + +## Examples + +### Consuming a source map + +```js +var rawSourceMap = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourceRoot: 'http://example.com/www/js/', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' +}; + +var smc = new SourceMapConsumer(rawSourceMap); + +console.log(smc.sources); +// [ 'http://example.com/www/js/one.js', +// 'http://example.com/www/js/two.js' ] + +console.log(smc.originalPositionFor({ + line: 2, + column: 28 +})); +// { source: 'http://example.com/www/js/two.js', +// line: 2, +// column: 10, +// name: 'n' } + +console.log(smc.generatedPositionFor({ + source: 'http://example.com/www/js/two.js', + line: 2, + column: 10 +})); +// { line: 2, column: 28 } + +smc.eachMapping(function (m) { + // ... +}); +``` + +### Generating a source map + +In depth guide: +[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) + +#### With SourceNode (high level API) + +```js +function compile(ast) { + switch (ast.type) { + case 'BinaryExpression': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + [compile(ast.left), " + ", compile(ast.right)] + ); + case 'Literal': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + String(ast.value) + ); + // ... + default: + throw new Error("Bad AST"); + } +} + +var ast = parse("40 + 2", "add.js"); +console.log(compile(ast).toStringWithSourceMap({ + file: 'add.js' +})); +// { code: '40 + 2', +// map: [object SourceMapGenerator] } +``` + +#### With SourceMapGenerator (low level API) + +```js +var map = new SourceMapGenerator({ + file: "source-mapped.js" +}); + +map.addMapping({ + generated: { + line: 10, + column: 35 + }, + source: "foo.js", + original: { + line: 33, + column: 2 + }, + name: "christopher" +}); + +console.log(map.toString()); +// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' +``` + +## API + +Get a reference to the module: + +```js +// Node.js +var sourceMap = require('source-map'); + +// Browser builds +var sourceMap = window.sourceMap; + +// Inside Firefox +const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); +``` + +### SourceMapConsumer + +A SourceMapConsumer instance represents a parsed source map which we can query +for information about the original file positions by giving it a file position +in the generated source. + +#### new SourceMapConsumer(rawSourceMap) + +The only parameter is the raw source map (either as a string which can be +`JSON.parse`'d, or an object). According to the spec, source maps have the +following attributes: + +* `version`: Which version of the source map spec this map is following. + +* `sources`: An array of URLs to the original source files. + +* `names`: An array of identifiers which can be referenced by individual + mappings. + +* `sourceRoot`: Optional. The URL root from which all sources are relative. + +* `sourcesContent`: Optional. An array of contents of the original source files. + +* `mappings`: A string of base64 VLQs which contain the actual mappings. + +* `file`: Optional. The generated filename this source map is associated with. + +```js +var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); +``` + +#### SourceMapConsumer.prototype.computeColumnSpans() + +Compute the last column for each generated mapping. The last column is +inclusive. + +```js +// Before: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] + +consumer.computeColumnSpans(); + +// After: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1, +// lastColumn: 9 }, +// { line: 2, +// column: 10, +// lastColumn: 19 }, +// { line: 2, +// column: 20, +// lastColumn: Infinity } ] + +``` + +#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) + +Returns the original source, line, and column information for the generated +source's line and column positions provided. The only argument is an object with +the following properties: + +* `line`: The line number in the generated source. Line numbers in + this library are 1-based (note that the underlying source map + specification uses 0-based line numbers -- this library handles the + translation). + +* `column`: The column number in the generated source. Column numbers + in this library are 0-based. + +* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or + `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest + element that is smaller than or greater than the one we are searching for, + respectively, if the exact element cannot be found. Defaults to + `SourceMapConsumer.GREATEST_LOWER_BOUND`. + +and an object is returned with the following properties: + +* `source`: The original source file, or null if this information is not + available. + +* `line`: The line number in the original source, or null if this information is + not available. The line number is 1-based. + +* `column`: The column number in the original source, or null if this + information is not available. The column number is 0-based. + +* `name`: The original identifier, or null if this information is not available. + +```js +consumer.originalPositionFor({ line: 2, column: 10 }) +// { source: 'foo.coffee', +// line: 2, +// column: 2, +// name: null } + +consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) +// { source: null, +// line: null, +// column: null, +// name: null } +``` + +#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) + +Returns the generated line and column information for the original source, +line, and column positions provided. The only argument is an object with +the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. The line number is + 1-based. + +* `column`: The column number in the original source. The column + number is 0-based. + +and an object is returned with the following properties: + +* `line`: The line number in the generated source, or null. The line + number is 1-based. + +* `column`: The column number in the generated source, or null. The + column number is 0-based. + +```js +consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) +// { line: 1, +// column: 56 } +``` + +#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) + +Returns all generated line and column information for the original source, line, +and column provided. If no column is provided, returns all mappings +corresponding to a either the line we are searching for or the next closest line +that has any mappings. Otherwise, returns all mappings corresponding to the +given line and either the column we are searching for or the next closest column +that has any offsets. + +The only argument is an object with the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. The line number is + 1-based. + +* `column`: Optional. The column number in the original source. The + column number is 0-based. + +and an array of objects is returned, each with the following properties: + +* `line`: The line number in the generated source, or null. The line + number is 1-based. + +* `column`: The column number in the generated source, or null. The + column number is 0-based. + +```js +consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] +``` + +#### SourceMapConsumer.prototype.hasContentsOfAllSources() + +Return true if we have the embedded source content for every source listed in +the source map, false otherwise. + +In other words, if this method returns `true`, then +`consumer.sourceContentFor(s)` will succeed for every source `s` in +`consumer.sources`. + +```js +// ... +if (consumer.hasContentsOfAllSources()) { + consumerReadyCallback(consumer); +} else { + fetchSources(consumer, consumerReadyCallback); +} +// ... +``` + +#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) + +Returns the original source content for the source provided. The only +argument is the URL of the original source file. + +If the source content for the given source is not found, then an error is +thrown. Optionally, pass `true` as the second param to have `null` returned +instead. + +```js +consumer.sources +// [ "my-cool-lib.clj" ] + +consumer.sourceContentFor("my-cool-lib.clj") +// "..." + +consumer.sourceContentFor("this is not in the source map"); +// Error: "this is not in the source map" is not in the source map + +consumer.sourceContentFor("this is not in the source map", true); +// null +``` + +#### SourceMapConsumer.prototype.eachMapping(callback, context, order) + +Iterate over each mapping between an original source/line/column and a +generated line/column in this source map. + +* `callback`: The function that is called with each mapping. Mappings have the + form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, + name }` + +* `context`: Optional. If specified, this object will be the value of `this` + every time that `callback` is called. + +* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or + `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over + the mappings sorted by the generated file's line/column order or the + original's source/line/column order, respectively. Defaults to + `SourceMapConsumer.GENERATED_ORDER`. + +```js +consumer.eachMapping(function (m) { console.log(m); }) +// ... +// { source: 'illmatic.js', +// generatedLine: 1, +// generatedColumn: 0, +// originalLine: 1, +// originalColumn: 0, +// name: null } +// { source: 'illmatic.js', +// generatedLine: 2, +// generatedColumn: 0, +// originalLine: 2, +// originalColumn: 0, +// name: null } +// ... +``` +### SourceMapGenerator + +An instance of the SourceMapGenerator represents a source map which is being +built incrementally. + +#### new SourceMapGenerator([startOfSourceMap]) + +You may pass an object with the following properties: + +* `file`: The filename of the generated source that this source map is + associated with. + +* `sourceRoot`: A root for all relative URLs in this source map. + +* `skipValidation`: Optional. When `true`, disables validation of mappings as + they are added. This can improve performance but should be used with + discretion, as a last resort. Even then, one should avoid using this flag when + running tests, if possible. + +* `ignoreInvalidMapping`: Optional. When `true`, instead of throwing error on + invalid mapping, it will be ignored. + +```js +var generator = new sourceMap.SourceMapGenerator({ + file: "my-generated-javascript-file.js", + sourceRoot: "http://example.com/app/js/" +}); +``` + +#### SourceMapGenerator.fromSourceMap(sourceMapConsumer, sourceMapGeneratorOptions) + +Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. + +* `sourceMapConsumer` The SourceMap. + +* `sourceMapGeneratorOptions` options that will be passed to the SourceMapGenerator constructor which used under the hood. + +```js +var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer, { + ignoreInvalidMapping: true, +}); +``` + +#### SourceMapGenerator.prototype.addMapping(mapping) + +Add a single mapping from original source line and column to the generated +source's line and column for this source map being created. The mapping object +should have the following properties: + +* `generated`: An object with the generated line and column positions. + +* `original`: An object with the original line and column positions. + +* `source`: The original source file (relative to the sourceRoot). + +* `name`: An optional original token name for this mapping. + +```js +generator.addMapping({ + source: "module-one.scm", + original: { line: 128, column: 0 }, + generated: { line: 3, column: 456 } +}) +``` + +#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for an original source file. + +* `sourceFile` the URL of the original source file. + +* `sourceContent` the content of the source file. + +```js +generator.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) + +Applies a SourceMap for a source file to the SourceMap. +Each mapping to the supplied source file is rewritten using the +supplied SourceMap. Note: The resolution for the resulting mappings +is the minimum of this map and the supplied map. + +* `sourceMapConsumer`: The SourceMap to be applied. + +* `sourceFile`: Optional. The filename of the source file. + If omitted, sourceMapConsumer.file will be used, if it exists. + Otherwise an error will be thrown. + +* `sourceMapPath`: Optional. The dirname of the path to the SourceMap + to be applied. If relative, it is relative to the SourceMap. + + This parameter is needed when the two SourceMaps aren't in the same + directory, and the SourceMap to be applied contains relative source + paths. If so, those relative source paths need to be rewritten + relative to the SourceMap. + + If omitted, it is assumed that both SourceMaps are in the same directory, + thus not needing any rewriting. (Supplying `'.'` has the same effect.) + +#### SourceMapGenerator.prototype.toString() + +Renders the source map being generated to a string. + +```js +generator.toString() +// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' +``` + +### SourceNode + +SourceNodes provide a way to abstract over interpolating and/or concatenating +snippets of generated JavaScript source code, while maintaining the line and +column information associated between those snippets and the original source +code. This is useful as the final intermediate representation a compiler might +use before outputting the generated JS and source map. + +#### new SourceNode([line, column, source[, chunk[, name]]]) + +* `line`: The original line number associated with this source node, or null if + it isn't associated with an original line. The line number is 1-based. + +* `column`: The original column number associated with this source node, or null + if it isn't associated with an original column. The column number + is 0-based. + +* `source`: The original source's filename; null if no filename is provided. + +* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see + below. + +* `name`: Optional. The original identifier. + +```js +var node = new SourceNode(1, 2, "a.cpp", [ + new SourceNode(3, 4, "b.cpp", "extern int status;\n"), + new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), + new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), +]); +``` + +#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) + +Creates a SourceNode from generated code and a SourceMapConsumer. + +* `code`: The generated code + +* `sourceMapConsumer` The SourceMap for the generated code + +* `relativePath` The optional path that relative sources in `sourceMapConsumer` + should be relative to. + +```js +var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8")); +var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), + consumer); +``` + +#### SourceNode.prototype.add(chunk) + +Add a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.add(" + "); +node.add(otherNode); +node.add([leftHandOperandNode, " + ", rightHandOperandNode]); +``` + +#### SourceNode.prototype.prepend(chunk) + +Prepend a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.prepend("/** Build Id: f783haef86324gf **/\n\n"); +``` + +#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for a source file. This will be added to the +`SourceMap` in the `sourcesContent` field. + +* `sourceFile`: The filename of the source file + +* `sourceContent`: The content of the source file + +```js +node.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceNode.prototype.walk(fn) + +Walk over the tree of JS snippets in this node and its children. The walking +function is called once for each snippet of JS and is passed that snippet and +the its original associated source's line/column location. + +* `fn`: The traversal function. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.walk(function (code, loc) { console.log("WALK:", code, loc); }) +// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } +// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } +// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } +// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } +``` + +#### SourceNode.prototype.walkSourceContents(fn) + +Walk over the tree of SourceNodes. The walking function is called for each +source file content and is passed the filename and source content. + +* `fn`: The traversal function. + +```js +var a = new SourceNode(1, 2, "a.js", "generated from a"); +a.setSourceContent("a.js", "original a"); +var b = new SourceNode(1, 2, "b.js", "generated from b"); +b.setSourceContent("b.js", "original b"); +var c = new SourceNode(1, 2, "c.js", "generated from c"); +c.setSourceContent("c.js", "original c"); + +var node = new SourceNode(null, null, null, [a, b, c]); +node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) +// WALK: a.js : original a +// WALK: b.js : original b +// WALK: c.js : original c +``` + +#### SourceNode.prototype.join(sep) + +Like `Array.prototype.join` except for SourceNodes. Inserts the separator +between each of this source node's children. + +* `sep`: The separator. + +```js +var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); +var operand = new SourceNode(3, 4, "a.rs", "="); +var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); + +var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); +var joinedNode = node.join(" "); +``` + +#### SourceNode.prototype.replaceRight(pattern, replacement) + +Call `String.prototype.replace` on the very right-most source snippet. Useful +for trimming white space from the end of a source node, etc. + +* `pattern`: The pattern to replace. + +* `replacement`: The thing to replace the pattern with. + +```js +// Trim trailing white space. +node.replaceRight(/\s*$/, ""); +``` + +#### SourceNode.prototype.toString() + +Return the string representation of this source node. Walks over the tree and +concatenates all the various snippets together to one string. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toString() +// 'unodostresquatro' +``` + +#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) + +Returns the string representation of this tree of source nodes, plus a +SourceMapGenerator which contains all the mappings between the generated and +original sources. + +The arguments are the same as those to `new SourceMapGenerator`. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toStringWithSourceMap({ file: "my-output-file.js" }) +// { code: 'unodostresquatro', +// map: [object SourceMapGenerator] } +``` diff --git a/vuetest/node_modules/source-map-js/lib/array-set.js b/vuetest/node_modules/source-map-js/lib/array-set.js new file mode 100644 index 0000000..fbd5c81 --- /dev/null +++ b/vuetest/node_modules/source-map-js/lib/array-set.js @@ -0,0 +1,121 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var has = Object.prototype.hasOwnProperty; +var hasNativeMap = typeof Map !== "undefined"; + +/** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ +function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); +} + +/** + * Static method for creating ArraySet instances from an existing array. + */ +ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; +}; + +/** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ +ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; +}; + +/** + * Add the given string to this set. + * + * @param String aStr + */ +ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } +}; + +/** + * Is the given string a member of this set? + * + * @param String aStr + */ +ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } +}; + +/** + * What is the index of the given string in the array? + * + * @param String aStr + */ +ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); +}; + +/** + * What is the element at the given index? + * + * @param Number aIdx + */ +ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); +}; + +/** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ +ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); +}; + +exports.ArraySet = ArraySet; diff --git a/vuetest/node_modules/source-map-js/lib/base64-vlq.js b/vuetest/node_modules/source-map-js/lib/base64-vlq.js new file mode 100644 index 0000000..612b404 --- /dev/null +++ b/vuetest/node_modules/source-map-js/lib/base64-vlq.js @@ -0,0 +1,140 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +var base64 = require('./base64'); + +// A single base 64 digit can contain 6 bits of data. For the base 64 variable +// length quantities we use in the source map spec, the first bit is the sign, +// the next four bits are the actual value, and the 6th bit is the +// continuation bit. The continuation bit tells us whether there are more +// digits in this value following this digit. +// +// Continuation +// | Sign +// | | +// V V +// 101011 + +var VLQ_BASE_SHIFT = 5; + +// binary: 100000 +var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + +// binary: 011111 +var VLQ_BASE_MASK = VLQ_BASE - 1; + +// binary: 100000 +var VLQ_CONTINUATION_BIT = VLQ_BASE; + +/** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ +function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; +} + +/** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ +function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; +} + +/** + * Returns the base 64 VLQ encoded value. + */ +exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; +}; + +/** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ +exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; +}; diff --git a/vuetest/node_modules/source-map-js/lib/base64.js b/vuetest/node_modules/source-map-js/lib/base64.js new file mode 100644 index 0000000..8aa86b3 --- /dev/null +++ b/vuetest/node_modules/source-map-js/lib/base64.js @@ -0,0 +1,67 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + +/** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ +exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); +}; + +/** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ +exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; +}; diff --git a/vuetest/node_modules/source-map-js/lib/binary-search.js b/vuetest/node_modules/source-map-js/lib/binary-search.js new file mode 100644 index 0000000..010ac94 --- /dev/null +++ b/vuetest/node_modules/source-map-js/lib/binary-search.js @@ -0,0 +1,111 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +exports.GREATEST_LOWER_BOUND = 1; +exports.LEAST_UPPER_BOUND = 2; + +/** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ +function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } +} + +/** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ +exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; +}; diff --git a/vuetest/node_modules/source-map-js/lib/mapping-list.js b/vuetest/node_modules/source-map-js/lib/mapping-list.js new file mode 100644 index 0000000..06d1274 --- /dev/null +++ b/vuetest/node_modules/source-map-js/lib/mapping-list.js @@ -0,0 +1,79 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); + +/** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ +function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; +} + +/** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ +function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; +} + +/** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ +MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + +/** + * Add the given source mapping. + * + * @param Object aMapping + */ +MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } +}; + +/** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ +MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; +}; + +exports.MappingList = MappingList; diff --git a/vuetest/node_modules/source-map-js/lib/quick-sort.js b/vuetest/node_modules/source-map-js/lib/quick-sort.js new file mode 100644 index 0000000..23f9eda --- /dev/null +++ b/vuetest/node_modules/source-map-js/lib/quick-sort.js @@ -0,0 +1,132 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +// It turns out that some (most?) JavaScript engines don't self-host +// `Array.prototype.sort`. This makes sense because C++ will likely remain +// faster than JS when doing raw CPU-intensive sorting. However, when using a +// custom comparator function, calling back and forth between the VM's C++ and +// JIT'd JS is rather slow *and* loses JIT type information, resulting in +// worse generated code for the comparator function than would be optimal. In +// fact, when sorting with a comparator, these costs outweigh the benefits of +// sorting in C++. By using our own JS-implemented Quick Sort (below), we get +// a ~3500ms mean speed-up in `bench/bench.html`. + +function SortTemplate(comparator) { + +/** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ +function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; +} + +/** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ +function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); +} + +/** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ +function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot, false) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } +} + + return doQuickSort; +} + +function cloneSort(comparator) { + let template = SortTemplate.toString(); + let templateFn = new Function(`return ${template}`)(); + return templateFn(comparator); +} + +/** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + +let sortCache = new WeakMap(); +exports.quickSort = function (ary, comparator, start = 0) { + let doQuickSort = sortCache.get(comparator); + if (doQuickSort === void 0) { + doQuickSort = cloneSort(comparator); + sortCache.set(comparator, doQuickSort); + } + doQuickSort(ary, comparator, start, ary.length - 1); +}; diff --git a/vuetest/node_modules/source-map-js/lib/source-map-consumer.d.ts b/vuetest/node_modules/source-map-js/lib/source-map-consumer.d.ts new file mode 100644 index 0000000..744bda7 --- /dev/null +++ b/vuetest/node_modules/source-map-js/lib/source-map-consumer.d.ts @@ -0,0 +1 @@ +export { SourceMapConsumer } from '..'; diff --git a/vuetest/node_modules/source-map-js/lib/source-map-consumer.js b/vuetest/node_modules/source-map-js/lib/source-map-consumer.js new file mode 100644 index 0000000..ee66114 --- /dev/null +++ b/vuetest/node_modules/source-map-js/lib/source-map-consumer.js @@ -0,0 +1,1188 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var binarySearch = require('./binary-search'); +var ArraySet = require('./array-set').ArraySet; +var base64VLQ = require('./base64-vlq'); +var quickSort = require('./quick-sort').quickSort; + +function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) + : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); +} + +SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); +} + +/** + * The version of the source mapping spec that we are consuming. + */ +SourceMapConsumer.prototype._version = 3; + +// `__generatedMappings` and `__originalMappings` are arrays that hold the +// parsed mapping coordinates from the source map's "mappings" attribute. They +// are lazily instantiated, accessed via the `_generatedMappings` and +// `_originalMappings` getters respectively, and we only parse the mappings +// and create these arrays once queried for a source location. We jump through +// these hoops because there can be many thousands of mappings, and parsing +// them is expensive, so we only want to do it if we must. +// +// Each object in the arrays is of the form: +// +// { +// generatedLine: The line number in the generated code, +// generatedColumn: The column number in the generated code, +// source: The path to the original source file that generated this +// chunk of code, +// originalLine: The line number in the original source that +// corresponds to this chunk of generated code, +// originalColumn: The column number in the original source that +// corresponds to this chunk of generated code, +// name: The name of the original symbol which generated this chunk of +// code. +// } +// +// All properties except for `generatedLine` and `generatedColumn` can be +// `null`. +// +// `_generatedMappings` is ordered by the generated positions. +// +// `_originalMappings` is ordered by the original positions. + +SourceMapConsumer.prototype.__generatedMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } +}); + +SourceMapConsumer.prototype.__originalMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } +}); + +SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + +SourceMapConsumer.GENERATED_ORDER = 1; +SourceMapConsumer.ORIGINAL_ORDER = 2; + +SourceMapConsumer.GREATEST_LOWER_BOUND = 1; +SourceMapConsumer.LEAST_UPPER_BOUND = 2; + +/** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ +SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + var boundCallback = aCallback.bind(context); + var names = this._names; + var sources = this._sources; + var sourceMapURL = this._sourceMapURL; + + for (var i = 0, n = mappings.length; i < n; i++) { + var mapping = mappings[i]; + var source = mapping.source === null ? null : sources.at(mapping.source); + if(source !== null) { + source = util.computeSourceURL(sourceRoot, source, sourceMapURL); + } + boundCallback({ + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : names.at(mapping.name) + }); + } + }; + +/** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + +exports.SourceMapConsumer = SourceMapConsumer; + +/** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ +function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this._absoluteSources = this._sources.toArray().map(function (s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; +} + +BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + +/** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ +BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + + // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + + return -1; +}; + +/** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ +BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function (s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + +/** + * The version of the source mapping spec that we are consuming. + */ +BasicSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._absoluteSources.slice(); + } +}); + +/** + * Provide the JIT with a nice shape / hidden class. + */ +function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; +} + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + +const compareGenerated = util.compareByGeneratedPositionsDeflatedNoLine; +function sortGenerated(array, start) { + let l = array.length; + let n = array.length - start; + if (n <= 1) { + return; + } else if (n == 2) { + let a = array[start]; + let b = array[start + 1]; + if (compareGenerated(a, b) > 0) { + array[start] = b; + array[start + 1] = a; + } + } else if (n < 20) { + for (let i = start; i < l; i++) { + for (let j = i; j > start; j--) { + let a = array[j - 1]; + let b = array[j]; + if (compareGenerated(a, b) <= 0) { + break; + } + array[j - 1] = b; + array[j] = a; + } + } + } else { + quickSort(array, compareGenerated, start); + } +} +BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + let subarrayStart = 0; + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + + sortGenerated(generatedMappings, subarrayStart); + subarrayStart = generatedMappings.length; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + let currentSource = mapping.source; + while (originalMappings.length <= currentSource) { + originalMappings.push(null); + } + if (originalMappings[currentSource] === null) { + originalMappings[currentSource] = []; + } + originalMappings[currentSource].push(mapping); + } + } + } + + sortGenerated(generatedMappings, subarrayStart); + this.__generatedMappings = generatedMappings; + + for (var i = 0; i < originalMappings.length; i++) { + if (originalMappings[i] != null) { + quickSort(originalMappings[i], util.compareByOriginalPositionsNoSource); + } + } + this.__originalMappings = [].concat(...originalMappings); + }; + +/** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ +BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + +/** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ +BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + +exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + +/** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ +function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) + } + }); +} + +IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + +/** + * The version of the source mapping spec that we are consuming. + */ +IndexedSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } +}); + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content || content === '') { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if(source !== null) { + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + +exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/vuetest/node_modules/source-map-js/lib/source-map-generator.d.ts b/vuetest/node_modules/source-map-js/lib/source-map-generator.d.ts new file mode 100644 index 0000000..f59d70a --- /dev/null +++ b/vuetest/node_modules/source-map-js/lib/source-map-generator.d.ts @@ -0,0 +1 @@ +export { SourceMapGenerator } from '..'; diff --git a/vuetest/node_modules/source-map-js/lib/source-map-generator.js b/vuetest/node_modules/source-map-js/lib/source-map-generator.js new file mode 100644 index 0000000..bab04ff --- /dev/null +++ b/vuetest/node_modules/source-map-js/lib/source-map-generator.js @@ -0,0 +1,444 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var base64VLQ = require('./base64-vlq'); +var util = require('./util'); +var ArraySet = require('./array-set').ArraySet; +var MappingList = require('./mapping-list').MappingList; + +/** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ +function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._ignoreInvalidMapping = util.getArg(aArgs, 'ignoreInvalidMapping', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; +} + +SourceMapGenerator.prototype._version = 3; + +/** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ +SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator(Object.assign(generatorOps || {}, { + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + })); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + +/** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ +SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + if (this._validateMapping(generated, original, source, name) === false) { + return; + } + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + +/** + * Set the source content for a source file. + */ +SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + +/** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ +SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + +/** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ +SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + var message = 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + + if (this._ignoreInvalidMapping) { + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + return false; + } else { + throw new Error(message); + } + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + var message = 'Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + }); + + if (this._ignoreInvalidMapping) { + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + return false; + } else { + throw new Error(message) + } + } + }; + +/** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ +SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + +SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + +/** + * Externalize the source map. + */ +SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + +/** + * Render the source map being generated to a string. + */ +SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + +exports.SourceMapGenerator = SourceMapGenerator; diff --git a/vuetest/node_modules/source-map-js/lib/source-node.d.ts b/vuetest/node_modules/source-map-js/lib/source-node.d.ts new file mode 100644 index 0000000..4df6a1a --- /dev/null +++ b/vuetest/node_modules/source-map-js/lib/source-node.d.ts @@ -0,0 +1 @@ +export { SourceNode } from '..'; diff --git a/vuetest/node_modules/source-map-js/lib/source-node.js b/vuetest/node_modules/source-map-js/lib/source-node.js new file mode 100644 index 0000000..8bcdbe3 --- /dev/null +++ b/vuetest/node_modules/source-map-js/lib/source-node.js @@ -0,0 +1,413 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; +var util = require('./util'); + +// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other +// operating systems these days (capturing the result). +var REGEX_NEWLINE = /(\r?\n)/; + +// Newline character code for charCodeAt() comparisons +var NEWLINE_CODE = 10; + +// Private symbol for identifying `SourceNode`s when multiple versions of +// the source-map library are loaded. This MUST NOT CHANGE across +// versions! +var isSourceNode = "$$$isSourceNode$$$"; + +/** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ +function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); +} + +/** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ +SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + +/** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } +}; + +/** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ +SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; +}; + +/** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ +SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; +}; + +/** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ +SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + +/** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + +/** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ +SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; +}; + +/** + * Returns the string representation of this source node along with a source + * map. + */ +SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; +}; + +exports.SourceNode = SourceNode; diff --git a/vuetest/node_modules/source-map-js/lib/util.js b/vuetest/node_modules/source-map-js/lib/util.js new file mode 100644 index 0000000..430e2d0 --- /dev/null +++ b/vuetest/node_modules/source-map-js/lib/util.js @@ -0,0 +1,594 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ +function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } +} +exports.getArg = getArg; + +var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; +var dataUrlRegexp = /^data:.+\,.+$/; + +function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; +} +exports.urlParse = urlParse; + +function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; +} +exports.urlGenerate = urlGenerate; + +var MAX_CACHED_INPUTS = 32; + +/** + * Takes some function `f(input) -> result` and returns a memoized version of + * `f`. + * + * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The + * memoization is a dumb-simple, linear least-recently-used cache. + */ +function lruMemoize(f) { + var cache = []; + + return function(input) { + for (var i = 0; i < cache.length; i++) { + if (cache[i].input === input) { + var temp = cache[0]; + cache[0] = cache[i]; + cache[i] = temp; + return cache[0].result; + } + } + + var result = f(input); + + cache.unshift({ + input, + result, + }); + + if (cache.length > MAX_CACHED_INPUTS) { + cache.pop(); + } + + return result; + }; +} + +/** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '<dir>/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ +var normalize = lruMemoize(function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + // Split the path into parts between `/` characters. This is much faster than + // using `.split(/\/+/g)`. + var parts = []; + var start = 0; + var i = 0; + while (true) { + start = i; + i = path.indexOf("/", start); + if (i === -1) { + parts.push(path.slice(start)); + break; + } else { + parts.push(path.slice(start, i)); + while (i < path.length && path[i] === "/") { + i++; + } + } + } + + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; +}); +exports.normalize = normalize; + +/** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ +function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; +} +exports.join = join; + +exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); +}; + +/** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ +function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); +} +exports.relative = relative; + +var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); +}()); + +function identity (s) { + return s; +} + +/** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ +function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; +} +exports.toSetString = supportsNullProto ? identity : toSetString; + +function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; +} +exports.fromSetString = supportsNullProto ? identity : fromSetString; + +function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; +} + +/** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ +function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByOriginalPositions = compareByOriginalPositions; + +function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) { + var cmp + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource; + +/** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ +function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + +function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine; + +function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 === null) { + return 1; // aStr2 !== null + } + + if (aStr2 === null) { + return -1; // aStr1 !== null + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; +} + +/** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ +function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + +/** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ +function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); +} +exports.parseSourceMapInput = parseSourceMapInput; + +/** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ +function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } + + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + + return normalize(sourceURL); +} +exports.computeSourceURL = computeSourceURL; diff --git a/vuetest/node_modules/source-map-js/package.json b/vuetest/node_modules/source-map-js/package.json new file mode 100644 index 0000000..f58dbeb --- /dev/null +++ b/vuetest/node_modules/source-map-js/package.json @@ -0,0 +1,71 @@ +{ + "name": "source-map-js", + "description": "Generates and consumes source maps", + "version": "1.2.1", + "homepage": "https://github.com/7rulnik/source-map-js", + "author": "Valentin 7rulnik Semirulnik <v7rulnik@gmail.com>", + "contributors": [ + "Nick Fitzgerald <nfitzgerald@mozilla.com>", + "Tobias Koppers <tobias.koppers@googlemail.com>", + "Duncan Beevers <duncan@dweebd.com>", + "Stephen Crane <scrane@mozilla.com>", + "Ryan Seddon <seddon.ryan@gmail.com>", + "Miles Elam <miles.elam@deem.com>", + "Mihai Bazon <mihai.bazon@gmail.com>", + "Michael Ficarra <github.public.email@michael.ficarra.me>", + "Todd Wolfson <todd@twolfson.com>", + "Alexander Solovyov <alexander@solovyov.net>", + "Felix Gnass <fgnass@gmail.com>", + "Conrad Irwin <conrad.irwin@gmail.com>", + "usrbincc <usrbincc@yahoo.com>", + "David Glasser <glasser@davidglasser.net>", + "Chase Douglas <chase@newrelic.com>", + "Evan Wallace <evan.exe@gmail.com>", + "Heather Arthur <fayearthur@gmail.com>", + "Hugh Kennedy <hughskennedy@gmail.com>", + "David Glasser <glasser@davidglasser.net>", + "Simon Lydell <simon.lydell@gmail.com>", + "Jmeas Smith <jellyes2@gmail.com>", + "Michael Z Goddard <mzgoddard@gmail.com>", + "azu <azu@users.noreply.github.com>", + "John Gozde <john@gozde.ca>", + "Adam Kirkton <akirkton@truefitinnovation.com>", + "Chris Montgomery <christopher.montgomery@dowjones.com>", + "J. Ryan Stinnett <jryans@gmail.com>", + "Jack Herrington <jherrington@walmartlabs.com>", + "Chris Truter <jeffpalentine@gmail.com>", + "Daniel Espeset <daniel@danielespeset.com>", + "Jamie Wong <jamie.lf.wong@gmail.com>", + "Eddy Bruël <ejpbruel@mozilla.com>", + "Hawken Rives <hawkrives@gmail.com>", + "Gilad Peleg <giladp007@gmail.com>", + "djchie <djchie.dev@gmail.com>", + "Gary Ye <garysye@gmail.com>", + "Nicolas Lalevée <nicolas.lalevee@hibnet.org>" + ], + "repository": "7rulnik/source-map-js", + "main": "./source-map.js", + "files": [ + "source-map.js", + "source-map.d.ts", + "lib/" + ], + "engines": { + "node": ">=0.10.0" + }, + "license": "BSD-3-Clause", + "scripts": { + "test": "npm run build && node test/run-tests.js", + "build": "webpack --color", + "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" + }, + "devDependencies": { + "clean-publish": "^3.1.0", + "doctoc": "^0.15.0", + "webpack": "^1.12.0" + }, + "clean-publish": { + "cleanDocs": true + }, + "typings": "source-map.d.ts" +} diff --git a/vuetest/node_modules/source-map-js/source-map.d.ts b/vuetest/node_modules/source-map-js/source-map.d.ts new file mode 100644 index 0000000..ec8892f --- /dev/null +++ b/vuetest/node_modules/source-map-js/source-map.d.ts @@ -0,0 +1,104 @@ +export interface StartOfSourceMap { + file?: string; + sourceRoot?: string; +} + +export interface RawSourceMap extends StartOfSourceMap { + version: string; + sources: string[]; + names: string[]; + sourcesContent?: string[]; + mappings: string; +} + +export interface Position { + line: number; + column: number; +} + +export interface LineRange extends Position { + lastColumn: number; +} + +export interface FindPosition extends Position { + // SourceMapConsumer.GREATEST_LOWER_BOUND or SourceMapConsumer.LEAST_UPPER_BOUND + bias?: number; +} + +export interface SourceFindPosition extends FindPosition { + source: string; +} + +export interface MappedPosition extends Position { + source: string; + name?: string; +} + +export interface MappingItem { + source: string | null; + generatedLine: number; + generatedColumn: number; + originalLine: number | null; + originalColumn: number | null; + name: string | null; +} + +export class SourceMapConsumer { + static GENERATED_ORDER: number; + static ORIGINAL_ORDER: number; + + static GREATEST_LOWER_BOUND: number; + static LEAST_UPPER_BOUND: number; + + constructor(rawSourceMap: RawSourceMap); + readonly file: string | undefined | null; + readonly sourceRoot: string | undefined | null; + readonly sourcesContent: readonly string[] | null | undefined; + readonly sources: readonly string[] + + computeColumnSpans(): void; + originalPositionFor(generatedPosition: FindPosition): MappedPosition; + generatedPositionFor(originalPosition: SourceFindPosition): LineRange; + allGeneratedPositionsFor(originalPosition: MappedPosition): Position[]; + hasContentsOfAllSources(): boolean; + sourceContentFor(source: string, returnNullOnMissing?: boolean): string | null; + eachMapping(callback: (mapping: MappingItem) => void, context?: any, order?: number): void; +} + +export interface Mapping { + generated: Position; + original?: Position | null; + source?: string | null; + name?: string | null; +} + +export class SourceMapGenerator { + constructor(startOfSourceMap?: StartOfSourceMap); + static fromSourceMap(sourceMapConsumer: SourceMapConsumer, startOfSourceMap?: StartOfSourceMap): SourceMapGenerator; + addMapping(mapping: Mapping): void; + setSourceContent(sourceFile: string, sourceContent: string | null | undefined): void; + applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile?: string, sourceMapPath?: string): void; + toString(): string; + toJSON(): RawSourceMap; +} + +export interface CodeWithSourceMap { + code: string; + map: SourceMapGenerator; +} + +export class SourceNode { + constructor(); + constructor(line: number, column: number, source: string); + constructor(line: number, column: number, source: string, chunk?: string, name?: string); + static fromStringWithSourceMap(code: string, sourceMapConsumer: SourceMapConsumer, relativePath?: string): SourceNode; + add(chunk: string): void; + prepend(chunk: string): void; + setSourceContent(sourceFile: string, sourceContent: string): void; + walk(fn: (chunk: string, mapping: MappedPosition) => void): void; + walkSourceContents(fn: (file: string, content: string) => void): void; + join(sep: string): SourceNode; + replaceRight(pattern: string, replacement: string): SourceNode; + toString(): string; + toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap; +} diff --git a/vuetest/node_modules/source-map-js/source-map.js b/vuetest/node_modules/source-map-js/source-map.js new file mode 100644 index 0000000..bc88fe8 --- /dev/null +++ b/vuetest/node_modules/source-map-js/source-map.js @@ -0,0 +1,8 @@ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; +exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/vuetest/node_modules/vue/LICENSE b/vuetest/node_modules/vue/LICENSE new file mode 100644 index 0000000..15f1f7e --- /dev/null +++ b/vuetest/node_modules/vue/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018-present, Yuxi (Evan) You + +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. diff --git a/vuetest/node_modules/vue/README.md b/vuetest/node_modules/vue/README.md new file mode 100644 index 0000000..757ea82 --- /dev/null +++ b/vuetest/node_modules/vue/README.md @@ -0,0 +1,62 @@ +# vue + +## Which dist file to use? + +### From CDN or without a Bundler + +- **`vue(.runtime).global(.prod).js`**: + + - For direct use via `<script src="...">` in the browser. Exposes the `Vue` global. + - Note that global builds are not [UMD](https://github.com/umdjs/umd) builds. They are built as [IIFEs](https://developer.mozilla.org/en-US/docs/Glossary/IIFE) and is only meant for direct use via `<script src="...">`. + - In-browser template compilation: + - **`vue.global.js`** is the "full" build that includes both the compiler and the runtime so it supports compiling templates on the fly. + - **`vue.runtime.global.js`** contains only the runtime and requires templates to be pre-compiled during a build step. + - Inlines all Vue core internal packages - i.e. it's a single file with no dependencies on other files. This means you **must** import everything from this file and this file only to ensure you are getting the same instance of code. + - Contains hard-coded prod/dev branches, and the prod build is pre-minified. Use the `*.prod.js` files for production. + +- **`vue(.runtime).esm-browser(.prod).js`**: + - For usage via native ES modules imports (in browser via `<script type="module">`). + - Shares the same runtime compilation, dependency inlining and hard-coded prod/dev behavior with the global build. + +### With a Bundler + +- **`vue(.runtime).esm-bundler.js`**: + + - For use with bundlers like `webpack`, `rollup` and `parcel`. + - Leaves prod/dev branches with `process.env.NODE_ENV` guards (must be replaced by bundler) + - Does not ship minified builds (to be done together with the rest of the code after bundling) + - Imports dependencies (e.g. `@vue/runtime-core`, `@vue/compiler-core`) + - Imported dependencies are also `esm-bundler` builds and will in turn import their dependencies (e.g. `@vue/runtime-core` imports `@vue/reactivity`) + - This means you **can** install/import these deps individually without ending up with different instances of these dependencies, but you must make sure they all resolve to the same version. + - In-browser template compilation: + - **`vue.runtime.esm-bundler.js` (default)** is runtime only, and requires all templates to be pre-compiled. This is the default entry for bundlers (via `module` field in `package.json`) because when using a bundler templates are typically pre-compiled (e.g. in `*.vue` files). + - **`vue.esm-bundler.js`**: includes the runtime compiler. Use this if you are using a bundler but still want runtime template compilation (e.g. in-DOM templates or templates via inline JavaScript strings). You will need to configure your bundler to alias `vue` to this file. + +#### Bundler Build Feature Flags + +[Detailed Reference on vuejs.org](https://vuejs.org/api/compile-time-flags.html) + +`esm-bundler` builds of Vue expose global feature flags that can be overwritten at compile time: + +- `__VUE_OPTIONS_API__` + + - Default: `true` + - Enable / disable Options API support + +- `__VUE_PROD_DEVTOOLS__` + + - Default: `false` + - Enable / disable devtools support in production + +- `__VUE_PROD_HYDRATION_MISMATCH_DETAILS__` + - Default: `false` + - Enable / disable detailed warnings for hydration mismatches in production + +The build will work without configuring these flags, however it is **strongly recommended** to properly configure them in order to get proper tree-shaking in the final bundle. + +### For Server-Side Rendering + +- **`vue.cjs(.prod).js`**: + - For use in Node.js server-side rendering via `require()`. + - If you bundle your app with webpack with `target: 'node'` and properly externalize `vue`, this is the build that will be loaded. + - The dev/prod files are pre-built, but the appropriate file is automatically required based on `process.env.NODE_ENV`. diff --git a/vuetest/node_modules/vue/compiler-sfc/index.browser.js b/vuetest/node_modules/vue/compiler-sfc/index.browser.js new file mode 100644 index 0000000..774f9da --- /dev/null +++ b/vuetest/node_modules/vue/compiler-sfc/index.browser.js @@ -0,0 +1 @@ +module.exports = require('@vue/compiler-sfc') diff --git a/vuetest/node_modules/vue/compiler-sfc/index.browser.mjs b/vuetest/node_modules/vue/compiler-sfc/index.browser.mjs new file mode 100644 index 0000000..3c30abc --- /dev/null +++ b/vuetest/node_modules/vue/compiler-sfc/index.browser.mjs @@ -0,0 +1 @@ +export * from '@vue/compiler-sfc' diff --git a/vuetest/node_modules/vue/compiler-sfc/index.d.mts b/vuetest/node_modules/vue/compiler-sfc/index.d.mts new file mode 100644 index 0000000..3c30abc --- /dev/null +++ b/vuetest/node_modules/vue/compiler-sfc/index.d.mts @@ -0,0 +1 @@ +export * from '@vue/compiler-sfc' diff --git a/vuetest/node_modules/vue/compiler-sfc/index.d.ts b/vuetest/node_modules/vue/compiler-sfc/index.d.ts new file mode 100644 index 0000000..3c30abc --- /dev/null +++ b/vuetest/node_modules/vue/compiler-sfc/index.d.ts @@ -0,0 +1 @@ +export * from '@vue/compiler-sfc' diff --git a/vuetest/node_modules/vue/compiler-sfc/index.js b/vuetest/node_modules/vue/compiler-sfc/index.js new file mode 100644 index 0000000..2b85ad1 --- /dev/null +++ b/vuetest/node_modules/vue/compiler-sfc/index.js @@ -0,0 +1,3 @@ +module.exports = require('@vue/compiler-sfc') + +require('./register-ts.js') diff --git a/vuetest/node_modules/vue/compiler-sfc/index.mjs b/vuetest/node_modules/vue/compiler-sfc/index.mjs new file mode 100644 index 0000000..ae5d6e8 --- /dev/null +++ b/vuetest/node_modules/vue/compiler-sfc/index.mjs @@ -0,0 +1,3 @@ +export * from '@vue/compiler-sfc' + +import './register-ts.js' diff --git a/vuetest/node_modules/vue/compiler-sfc/package.json b/vuetest/node_modules/vue/compiler-sfc/package.json new file mode 100644 index 0000000..4cf44a4 --- /dev/null +++ b/vuetest/node_modules/vue/compiler-sfc/package.json @@ -0,0 +1,4 @@ +{ + "main": "index.js", + "module": "index.mjs" +} diff --git a/vuetest/node_modules/vue/compiler-sfc/register-ts.js b/vuetest/node_modules/vue/compiler-sfc/register-ts.js new file mode 100644 index 0000000..36de2a3 --- /dev/null +++ b/vuetest/node_modules/vue/compiler-sfc/register-ts.js @@ -0,0 +1,3 @@ +if (typeof require !== 'undefined') { + require('@vue/compiler-sfc').registerTS(() => require('typescript')) +} diff --git a/vuetest/node_modules/vue/dist/vue.cjs.js b/vuetest/node_modules/vue/dist/vue.cjs.js new file mode 100644 index 0000000..ef543fa --- /dev/null +++ b/vuetest/node_modules/vue/dist/vue.cjs.js @@ -0,0 +1,80 @@ +/** +* vue v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var compilerDom = require('@vue/compiler-dom'); +var runtimeDom = require('@vue/runtime-dom'); +var shared = require('@vue/shared'); + +function _interopNamespaceDefault(e) { + var n = Object.create(null); + if (e) { + for (var k in e) { + n[k] = e[k]; + } + } + n.default = e; + return Object.freeze(n); +} + +var runtimeDom__namespace = /*#__PURE__*/_interopNamespaceDefault(runtimeDom); + +const compileCache = /* @__PURE__ */ Object.create(null); +function compileToFunction(template, options) { + if (!shared.isString(template)) { + if (template.nodeType) { + template = template.innerHTML; + } else { + runtimeDom.warn(`invalid template option: `, template); + return shared.NOOP; + } + } + const key = shared.genCacheKey(template, options); + const cached = compileCache[key]; + if (cached) { + return cached; + } + if (template[0] === "#") { + const el = document.querySelector(template); + if (!el) { + runtimeDom.warn(`Template element not found or is empty: ${template}`); + } + template = el ? el.innerHTML : ``; + } + const opts = shared.extend( + { + hoistStatic: true, + onError: onError , + onWarn: (e) => onError(e, true) + }, + options + ); + if (!opts.isCustomElement && typeof customElements !== "undefined") { + opts.isCustomElement = (tag) => !!customElements.get(tag); + } + const { code } = compilerDom.compile(template, opts); + function onError(err, asWarning = false) { + const message = asWarning ? err.message : `Template compilation error: ${err.message}`; + const codeFrame = err.loc && shared.generateCodeFrame( + template, + err.loc.start.offset, + err.loc.end.offset + ); + runtimeDom.warn(codeFrame ? `${message} +${codeFrame}` : message); + } + const render = new Function("Vue", code)(runtimeDom__namespace); + render._rc = true; + return compileCache[key] = render; +} +runtimeDom.registerRuntimeCompiler(compileToFunction); + +exports.compile = compileToFunction; +Object.keys(runtimeDom).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeDom[k]; +}); diff --git a/vuetest/node_modules/vue/dist/vue.cjs.prod.js b/vuetest/node_modules/vue/dist/vue.cjs.prod.js new file mode 100644 index 0000000..82c078c --- /dev/null +++ b/vuetest/node_modules/vue/dist/vue.cjs.prod.js @@ -0,0 +1,66 @@ +/** +* vue v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var compilerDom = require('@vue/compiler-dom'); +var runtimeDom = require('@vue/runtime-dom'); +var shared = require('@vue/shared'); + +function _interopNamespaceDefault(e) { + var n = Object.create(null); + if (e) { + for (var k in e) { + n[k] = e[k]; + } + } + n.default = e; + return Object.freeze(n); +} + +var runtimeDom__namespace = /*#__PURE__*/_interopNamespaceDefault(runtimeDom); + +const compileCache = /* @__PURE__ */ Object.create(null); +function compileToFunction(template, options) { + if (!shared.isString(template)) { + if (template.nodeType) { + template = template.innerHTML; + } else { + return shared.NOOP; + } + } + const key = shared.genCacheKey(template, options); + const cached = compileCache[key]; + if (cached) { + return cached; + } + if (template[0] === "#") { + const el = document.querySelector(template); + template = el ? el.innerHTML : ``; + } + const opts = shared.extend( + { + hoistStatic: true, + onError: void 0, + onWarn: shared.NOOP + }, + options + ); + if (!opts.isCustomElement && typeof customElements !== "undefined") { + opts.isCustomElement = (tag) => !!customElements.get(tag); + } + const { code } = compilerDom.compile(template, opts); + const render = new Function("Vue", code)(runtimeDom__namespace); + render._rc = true; + return compileCache[key] = render; +} +runtimeDom.registerRuntimeCompiler(compileToFunction); + +exports.compile = compileToFunction; +Object.keys(runtimeDom).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeDom[k]; +}); diff --git a/vuetest/node_modules/vue/dist/vue.d.mts b/vuetest/node_modules/vue/dist/vue.d.mts new file mode 100644 index 0000000..991d0a3 --- /dev/null +++ b/vuetest/node_modules/vue/dist/vue.d.mts @@ -0,0 +1,7 @@ +import { CompilerOptions } from '@vue/compiler-dom'; +import { RenderFunction } from '@vue/runtime-dom'; +export * from '@vue/runtime-dom'; + +export declare function compileToFunction(template: string | HTMLElement, options?: CompilerOptions): RenderFunction; + +export { compileToFunction as compile }; diff --git a/vuetest/node_modules/vue/dist/vue.d.ts b/vuetest/node_modules/vue/dist/vue.d.ts new file mode 100644 index 0000000..991d0a3 --- /dev/null +++ b/vuetest/node_modules/vue/dist/vue.d.ts @@ -0,0 +1,7 @@ +import { CompilerOptions } from '@vue/compiler-dom'; +import { RenderFunction } from '@vue/runtime-dom'; +export * from '@vue/runtime-dom'; + +export declare function compileToFunction(template: string | HTMLElement, options?: CompilerOptions): RenderFunction; + +export { compileToFunction as compile }; diff --git a/vuetest/node_modules/vue/dist/vue.esm-browser.js b/vuetest/node_modules/vue/dist/vue.esm-browser.js new file mode 100644 index 0000000..f93761d --- /dev/null +++ b/vuetest/node_modules/vue/dist/vue.esm-browser.js @@ -0,0 +1,18216 @@ +/** +* vue v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function makeMap(str) { + const map = /* @__PURE__ */ Object.create(null); + for (const key of str.split(",")) map[key] = 1; + return (val) => val in map; +} + +const EMPTY_OBJ = Object.freeze({}) ; +const EMPTY_ARR = Object.freeze([]) ; +const NOOP = () => { +}; +const NO = () => false; +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +const isModelListener = (key) => key.startsWith("onUpdate:"); +const extend = Object.assign; +const remove = (arr, el) => { + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } +}; +const hasOwnProperty$1 = Object.prototype.hasOwnProperty; +const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); +const isArray = Array.isArray; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isDate = (val) => toTypeString(val) === "[object Date]"; +const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; +const isFunction = (val) => typeof val === "function"; +const isString = (val) => typeof val === "string"; +const isSymbol = (val) => typeof val === "symbol"; +const isObject = (val) => val !== null && typeof val === "object"; +const isPromise = (val) => { + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); +}; +const objectToString = Object.prototype.toString; +const toTypeString = (value) => objectToString.call(value); +const toRawType = (value) => { + return toTypeString(value).slice(8, -1); +}; +const isPlainObject = (val) => toTypeString(val) === "[object Object]"; +const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); +const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +}; +const camelizeRE = /-(\w)/g; +const camelize = cacheStringFunction( + (str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); + } +); +const hyphenateRE = /\B([A-Z])/g; +const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() +); +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const toHandlerKey = cacheStringFunction( + (str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + } +); +const hasChanged = (value, oldValue) => !Object.is(value, oldValue); +const invokeArrayFns = (fns, ...arg) => { + for (let i = 0; i < fns.length; i++) { + fns[i](...arg); + } +}; +const def = (obj, key, value, writable = false) => { + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + writable, + value + }); +}; +const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; +}; +const toNumber = (val) => { + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; +}; +let _globalThis; +const getGlobalThis = () => { + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); +}; +function genCacheKey(source, options) { + return source + JSON.stringify( + options, + (_, val) => typeof val === "function" ? val.toString() : val + ); +} + +const PatchFlagNames = { + [1]: `TEXT`, + [2]: `CLASS`, + [4]: `STYLE`, + [8]: `PROPS`, + [16]: `FULL_PROPS`, + [32]: `NEED_HYDRATION`, + [64]: `STABLE_FRAGMENT`, + [128]: `KEYED_FRAGMENT`, + [256]: `UNKEYED_FRAGMENT`, + [512]: `NEED_PATCH`, + [1024]: `DYNAMIC_SLOTS`, + [2048]: `DEV_ROOT_FRAGMENT`, + [-1]: `HOISTED`, + [-2]: `BAIL` +}; + +const slotFlagsText = { + [1]: "STABLE", + [2]: "DYNAMIC", + [3]: "FORWARDED" +}; + +const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; +const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); + +const range = 2; +function generateCodeFrame(source, start = 0, end = source.length) { + start = Math.max(0, Math.min(start, source.length)); + end = Math.max(0, Math.min(end, source.length)); + if (start > end) return ""; + let lines = source.split(/(\r?\n)/); + const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); + lines = lines.filter((_, idx) => idx % 2 === 0); + let count = 0; + const res = []; + for (let i = 0; i < lines.length; i++) { + count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); + if (count >= start) { + for (let j = i - range; j <= i + range || end > count; j++) { + if (j < 0 || j >= lines.length) continue; + const line = j + 1; + res.push( + `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` + ); + const lineLength = lines[j].length; + const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; + if (j === i) { + const pad = start - (count - (lineLength + newLineSeqLength)); + const length = Math.max( + 1, + end > count ? lineLength - pad : end - start + ); + res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); + } else if (j > i) { + if (end > count) { + const length = Math.max(Math.min(end - count, lineLength), 1); + res.push(` | ` + "^".repeat(length)); + } + count += lineLength + newLineSeqLength; + } + } + break; + } + } + return res.join("\n"); +} + +function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } +} +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:([^]+)/; +const styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function stringifyStyle(styles) { + if (!styles) return ""; + if (isString(styles)) return styles; + let ret = ""; + for (const key in styles) { + const value = styles[key]; + if (isString(value) || typeof value === "number") { + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + ret += `${normalizedKey}:${value};`; + } + } + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} +function normalizeProps(props) { + if (!props) return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; +} + +const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; +const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); +const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); +const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); +const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); + +const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); +const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` +); +function includeBooleanAttr(value) { + return !!value || value === ""; +} +const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` +); +const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` +); +function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; +} + +const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; +function getEscapedCssVarName(key, doubleEscape) { + return key.replace( + cssVarNameEscapeSymbolsRE, + (s) => `\\${s}` + ); +} + +function looseCompareArrays(a, b) { + if (a.length !== b.length) return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; +} +function looseEqual(a, b) { + if (a === b) return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); +} +function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); +} + +const isRef$1 = (val) => { + return !!(val && val["__v_isRef"] === true); +}; +const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); +}; +const replacer = (_key, val) => { + if (isRef$1(val)) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; +}; +const stringifySymbol = (v, i = "") => { + var _a; + return ( + // Symbol.description in es2019+ so we need to cast here to pass + // the lib: es2016 check + isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v + ); +}; + +function warn$2(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); +} + +let activeEffectScope; +class EffectScope { + constructor(detached = false) { + this.detached = detached; + /** + * @internal + */ + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this._isPaused = false; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + pause() { + if (this._active) { + this._isPaused = true; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].pause(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].pause(); + } + } + } + /** + * Resumes the effect scope, including all child scopes and effects. + */ + resume() { + if (this._active) { + if (this._isPaused) { + this._isPaused = false; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].resume(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].resume(); + } + } + } + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { + activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn$2(`cannot run an inactive effect scope.`); + } + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + this._active = false; + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + this.effects.length = 0; + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + this.cleanups.length = 0; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); + } + this.scopes.length = 0; + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + } + } +} +function effectScope(detached) { + return new EffectScope(detached); +} +function getCurrentScope() { + return activeEffectScope; +} +function onScopeDispose(fn, failSilently = false) { + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else if (!failSilently) { + warn$2( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } +} + +let activeSub; +const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); +class ReactiveEffect { + constructor(fn) { + this.fn = fn; + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 1 | 4; + /** + * @internal + */ + this.next = void 0; + /** + * @internal + */ + this.cleanup = void 0; + this.scheduler = void 0; + if (activeEffectScope && activeEffectScope.active) { + activeEffectScope.effects.push(this); + } + } + pause() { + this.flags |= 64; + } + resume() { + if (this.flags & 64) { + this.flags &= ~64; + if (pausedQueueEffects.has(this)) { + pausedQueueEffects.delete(this); + this.trigger(); + } + } + } + /** + * @internal + */ + notify() { + if (this.flags & 2 && !(this.flags & 32)) { + return; + } + if (!(this.flags & 8)) { + batch(this); + } + } + run() { + if (!(this.flags & 1)) { + return this.fn(); + } + this.flags |= 2; + cleanupEffect(this); + prepareDeps(this); + const prevEffect = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = this; + shouldTrack = true; + try { + return this.fn(); + } finally { + if (activeSub !== this) { + warn$2( + "Active effect was not restored correctly - this is likely a Vue internal bug." + ); + } + cleanupDeps(this); + activeSub = prevEffect; + shouldTrack = prevShouldTrack; + this.flags &= ~2; + } + } + stop() { + if (this.flags & 1) { + for (let link = this.deps; link; link = link.nextDep) { + removeSub(link); + } + this.deps = this.depsTail = void 0; + cleanupEffect(this); + this.onStop && this.onStop(); + this.flags &= ~1; + } + } + trigger() { + if (this.flags & 64) { + pausedQueueEffects.add(this); + } else if (this.scheduler) { + this.scheduler(); + } else { + this.runIfDirty(); + } + } + /** + * @internal + */ + runIfDirty() { + if (isDirty(this)) { + this.run(); + } + } + get dirty() { + return isDirty(this); + } +} +let batchDepth = 0; +let batchedSub; +let batchedComputed; +function batch(sub, isComputed = false) { + sub.flags |= 8; + if (isComputed) { + sub.next = batchedComputed; + batchedComputed = sub; + return; + } + sub.next = batchedSub; + batchedSub = sub; +} +function startBatch() { + batchDepth++; +} +function endBatch() { + if (--batchDepth > 0) { + return; + } + if (batchedComputed) { + let e = batchedComputed; + batchedComputed = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + e = next; + } + } + let error; + while (batchedSub) { + let e = batchedSub; + batchedSub = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + if (e.flags & 1) { + try { + ; + e.trigger(); + } catch (err) { + if (!error) error = err; + } + } + e = next; + } + } + if (error) throw error; +} +function prepareDeps(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + link.version = -1; + link.prevActiveLink = link.dep.activeLink; + link.dep.activeLink = link; + } +} +function cleanupDeps(sub) { + let head; + let tail = sub.depsTail; + let link = tail; + while (link) { + const prev = link.prevDep; + if (link.version === -1) { + if (link === tail) tail = prev; + removeSub(link); + removeDep(link); + } else { + head = link; + } + link.dep.activeLink = link.prevActiveLink; + link.prevActiveLink = void 0; + link = prev; + } + sub.deps = head; + sub.depsTail = tail; +} +function isDirty(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { + return true; + } + } + if (sub._dirty) { + return true; + } + return false; +} +function refreshComputed(computed) { + if (computed.flags & 4 && !(computed.flags & 16)) { + return; + } + computed.flags &= ~16; + if (computed.globalVersion === globalVersion) { + return; + } + computed.globalVersion = globalVersion; + const dep = computed.dep; + computed.flags |= 2; + if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { + computed.flags &= ~2; + return; + } + const prevSub = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = computed; + shouldTrack = true; + try { + prepareDeps(computed); + const value = computed.fn(computed._value); + if (dep.version === 0 || hasChanged(value, computed._value)) { + computed._value = value; + dep.version++; + } + } catch (err) { + dep.version++; + throw err; + } finally { + activeSub = prevSub; + shouldTrack = prevShouldTrack; + cleanupDeps(computed); + computed.flags &= ~2; + } +} +function removeSub(link, soft = false) { + const { dep, prevSub, nextSub } = link; + if (prevSub) { + prevSub.nextSub = nextSub; + link.prevSub = void 0; + } + if (nextSub) { + nextSub.prevSub = prevSub; + link.nextSub = void 0; + } + if (dep.subsHead === link) { + dep.subsHead = nextSub; + } + if (dep.subs === link) { + dep.subs = prevSub; + if (!prevSub && dep.computed) { + dep.computed.flags &= ~4; + for (let l = dep.computed.deps; l; l = l.nextDep) { + removeSub(l, true); + } + } + } + if (!soft && !--dep.sc && dep.map) { + dep.map.delete(dep.key); + } +} +function removeDep(link) { + const { prevDep, nextDep } = link; + if (prevDep) { + prevDep.nextDep = nextDep; + link.prevDep = void 0; + } + if (nextDep) { + nextDep.prevDep = prevDep; + link.nextDep = void 0; + } +} +function effect(fn, options) { + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const e = new ReactiveEffect(fn); + if (options) { + extend(e, options); + } + try { + e.run(); + } catch (err) { + e.stop(); + throw err; + } + const runner = e.run.bind(e); + runner.effect = e; + return runner; +} +function stop(runner) { + runner.effect.stop(); +} +let shouldTrack = true; +const trackStack = []; +function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; +} +function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; +} +function cleanupEffect(e) { + const { cleanup } = e; + e.cleanup = void 0; + if (cleanup) { + const prevSub = activeSub; + activeSub = void 0; + try { + cleanup(); + } finally { + activeSub = prevSub; + } + } +} + +let globalVersion = 0; +class Link { + constructor(sub, dep) { + this.sub = sub; + this.dep = dep; + this.version = dep.version; + this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; + } +} +class Dep { + constructor(computed) { + this.computed = computed; + this.version = 0; + /** + * Link between this dep and the current active effect + */ + this.activeLink = void 0; + /** + * Doubly linked list representing the subscribing effects (tail) + */ + this.subs = void 0; + /** + * For object property deps cleanup + */ + this.map = void 0; + this.key = void 0; + /** + * Subscriber counter + */ + this.sc = 0; + { + this.subsHead = void 0; + } + } + track(debugInfo) { + if (!activeSub || !shouldTrack || activeSub === this.computed) { + return; + } + let link = this.activeLink; + if (link === void 0 || link.sub !== activeSub) { + link = this.activeLink = new Link(activeSub, this); + if (!activeSub.deps) { + activeSub.deps = activeSub.depsTail = link; + } else { + link.prevDep = activeSub.depsTail; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + } + addSub(link); + } else if (link.version === -1) { + link.version = this.version; + if (link.nextDep) { + const next = link.nextDep; + next.prevDep = link.prevDep; + if (link.prevDep) { + link.prevDep.nextDep = next; + } + link.prevDep = activeSub.depsTail; + link.nextDep = void 0; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + if (activeSub.deps === link) { + activeSub.deps = next; + } + } + } + if (activeSub.onTrack) { + activeSub.onTrack( + extend( + { + effect: activeSub + }, + debugInfo + ) + ); + } + return link; + } + trigger(debugInfo) { + this.version++; + globalVersion++; + this.notify(debugInfo); + } + notify(debugInfo) { + startBatch(); + try { + if (true) { + for (let head = this.subsHead; head; head = head.nextSub) { + if (head.sub.onTrigger && !(head.sub.flags & 8)) { + head.sub.onTrigger( + extend( + { + effect: head.sub + }, + debugInfo + ) + ); + } + } + } + for (let link = this.subs; link; link = link.prevSub) { + if (link.sub.notify()) { + ; + link.sub.dep.notify(); + } + } + } finally { + endBatch(); + } + } +} +function addSub(link) { + link.dep.sc++; + if (link.sub.flags & 4) { + const computed = link.dep.computed; + if (computed && !link.dep.subs) { + computed.flags |= 4 | 16; + for (let l = computed.deps; l; l = l.nextDep) { + addSub(l); + } + } + const currentTail = link.dep.subs; + if (currentTail !== link) { + link.prevSub = currentTail; + if (currentTail) currentTail.nextSub = link; + } + if (link.dep.subsHead === void 0) { + link.dep.subsHead = link; + } + link.dep.subs = link; + } +} +const targetMap = /* @__PURE__ */ new WeakMap(); +const ITERATE_KEY = Symbol( + "Object iterate" +); +const MAP_KEY_ITERATE_KEY = Symbol( + "Map keys iterate" +); +const ARRAY_ITERATE_KEY = Symbol( + "Array iterate" +); +function track(target, type, key) { + if (shouldTrack && activeSub) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = new Dep()); + dep.map = depsMap; + dep.key = key; + } + { + dep.track({ + target, + type, + key + }); + } + } +} +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + globalVersion++; + return; + } + const run = (dep) => { + if (dep) { + { + dep.trigger({ + target, + type, + key, + newValue, + oldValue, + oldTarget + }); + } + } + }; + startBatch(); + if (type === "clear") { + depsMap.forEach(run); + } else { + const targetIsArray = isArray(target); + const isArrayIndex = targetIsArray && isIntegerKey(key); + if (targetIsArray && key === "length") { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { + run(dep); + } + }); + } else { + if (key !== void 0 || depsMap.has(void 0)) { + run(depsMap.get(key)); + } + if (isArrayIndex) { + run(depsMap.get(ARRAY_ITERATE_KEY)); + } + switch (type) { + case "add": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isArrayIndex) { + run(depsMap.get("length")); + } + break; + case "delete": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + run(depsMap.get(ITERATE_KEY)); + } + break; + } + } + } + endBatch(); +} +function getDepFromReactive(object, key) { + const depMap = targetMap.get(object); + return depMap && depMap.get(key); +} + +function reactiveReadArray(array) { + const raw = toRaw(array); + if (raw === array) return raw; + track(raw, "iterate", ARRAY_ITERATE_KEY); + return isShallow(array) ? raw : raw.map(toReactive); +} +function shallowReadArray(arr) { + track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); + return arr; +} +const arrayInstrumentations = { + __proto__: null, + [Symbol.iterator]() { + return iterator(this, Symbol.iterator, toReactive); + }, + concat(...args) { + return reactiveReadArray(this).concat( + ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) + ); + }, + entries() { + return iterator(this, "entries", (value) => { + value[1] = toReactive(value[1]); + return value; + }); + }, + every(fn, thisArg) { + return apply(this, "every", fn, thisArg, void 0, arguments); + }, + filter(fn, thisArg) { + return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); + }, + find(fn, thisArg) { + return apply(this, "find", fn, thisArg, toReactive, arguments); + }, + findIndex(fn, thisArg) { + return apply(this, "findIndex", fn, thisArg, void 0, arguments); + }, + findLast(fn, thisArg) { + return apply(this, "findLast", fn, thisArg, toReactive, arguments); + }, + findLastIndex(fn, thisArg) { + return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); + }, + // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement + forEach(fn, thisArg) { + return apply(this, "forEach", fn, thisArg, void 0, arguments); + }, + includes(...args) { + return searchProxy(this, "includes", args); + }, + indexOf(...args) { + return searchProxy(this, "indexOf", args); + }, + join(separator) { + return reactiveReadArray(this).join(separator); + }, + // keys() iterator only reads `length`, no optimisation required + lastIndexOf(...args) { + return searchProxy(this, "lastIndexOf", args); + }, + map(fn, thisArg) { + return apply(this, "map", fn, thisArg, void 0, arguments); + }, + pop() { + return noTracking(this, "pop"); + }, + push(...args) { + return noTracking(this, "push", args); + }, + reduce(fn, ...args) { + return reduce(this, "reduce", fn, args); + }, + reduceRight(fn, ...args) { + return reduce(this, "reduceRight", fn, args); + }, + shift() { + return noTracking(this, "shift"); + }, + // slice could use ARRAY_ITERATE but also seems to beg for range tracking + some(fn, thisArg) { + return apply(this, "some", fn, thisArg, void 0, arguments); + }, + splice(...args) { + return noTracking(this, "splice", args); + }, + toReversed() { + return reactiveReadArray(this).toReversed(); + }, + toSorted(comparer) { + return reactiveReadArray(this).toSorted(comparer); + }, + toSpliced(...args) { + return reactiveReadArray(this).toSpliced(...args); + }, + unshift(...args) { + return noTracking(this, "unshift", args); + }, + values() { + return iterator(this, "values", toReactive); + } +}; +function iterator(self, method, wrapValue) { + const arr = shallowReadArray(self); + const iter = arr[method](); + if (arr !== self && !isShallow(self)) { + iter._next = iter.next; + iter.next = () => { + const result = iter._next(); + if (result.value) { + result.value = wrapValue(result.value); + } + return result; + }; + } + return iter; +} +const arrayProto = Array.prototype; +function apply(self, method, fn, thisArg, wrappedRetFn, args) { + const arr = shallowReadArray(self); + const needsWrap = arr !== self && !isShallow(self); + const methodFn = arr[method]; + if (methodFn !== arrayProto[method]) { + const result2 = methodFn.apply(self, args); + return needsWrap ? toReactive(result2) : result2; + } + let wrappedFn = fn; + if (arr !== self) { + if (needsWrap) { + wrappedFn = function(item, index) { + return fn.call(this, toReactive(item), index, self); + }; + } else if (fn.length > 2) { + wrappedFn = function(item, index) { + return fn.call(this, item, index, self); + }; + } + } + const result = methodFn.call(arr, wrappedFn, thisArg); + return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; +} +function reduce(self, method, fn, args) { + const arr = shallowReadArray(self); + let wrappedFn = fn; + if (arr !== self) { + if (!isShallow(self)) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, toReactive(item), index, self); + }; + } else if (fn.length > 3) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, item, index, self); + }; + } + } + return arr[method](wrappedFn, ...args); +} +function searchProxy(self, method, args) { + const arr = toRaw(self); + track(arr, "iterate", ARRAY_ITERATE_KEY); + const res = arr[method](...args); + if ((res === -1 || res === false) && isProxy(args[0])) { + args[0] = toRaw(args[0]); + return arr[method](...args); + } + return res; +} +function noTracking(self, method, args = []) { + pauseTracking(); + startBatch(); + const res = toRaw(self)[method].apply(self, args); + endBatch(); + resetTracking(); + return res; +} + +const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); +const builtInSymbols = new Set( + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) +); +function hasOwnProperty(key) { + if (!isSymbol(key)) key = String(key); + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} +class BaseReactiveHandler { + constructor(_isReadonly = false, _isShallow = false) { + this._isReadonly = _isReadonly; + this._isShallow = _isShallow; + } + get(target, key, receiver) { + if (key === "__v_skip") return target["__v_skip"]; + const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return isShallow2; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the receiver is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + let fn; + if (targetIsArray && (fn = arrayInstrumentations[key])) { + return fn; + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get( + target, + key, + // if this is a proxy wrapping a ref, return methods using the raw ref + // as receiver so that we don't have to call `toRaw` on the ref in all + // its class methods + isRef(target) ? target : receiver + ); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (isShallow2) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } +} +class MutableReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(false, isShallow2); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._isShallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set( + target, + key, + value, + isRef(target) ? target : receiver + ); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { + const hadKey = hasOwn(target, key); + const oldValue = target[key]; + const result = Reflect.deleteProperty(target, key); + if (result && hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + } + has(target, key) { + const result = Reflect.has(target, key); + if (!isSymbol(key) || !builtInSymbols.has(key)) { + track(target, "has", key); + } + return result; + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); + return Reflect.ownKeys(target); + } +} +class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(true, isShallow2); + } + set(target, key) { + { + warn$2( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + deleteProperty(target, key) { + { + warn$2( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } +} +const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); +const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); +const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); +const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); + +const toShallow = (value) => value; +const getProto = (v) => Reflect.getPrototypeOf(v); +function createIterableMethod(method, isReadonly2, isShallow2) { + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done + }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } + }; + }; +} +function createReadonlyMethod(type) { + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + warn$2( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; +} +function createInstrumentations(readonly, shallow) { + const instrumentations = { + get(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); + } + track(rawTarget, "get", rawKey); + } + const { has } = getProto(rawTarget); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + if (has.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } + }, + get size() { + const target = this["__v_raw"]; + !readonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); + }, + has(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); + } + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); + }, + forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + !readonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + } + }; + extend( + instrumentations, + readonly ? { + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear") + } : { + add(value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; + }, + set(key, value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; + }, + delete(key) { + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get ? get.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + }, + clear() { + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger( + target, + "clear", + void 0, + void 0, + oldTarget + ); + } + return result; + } + } + ); + const iteratorMethods = [ + "keys", + "values", + "entries", + Symbol.iterator + ]; + iteratorMethods.forEach((method) => { + instrumentations[method] = createIterableMethod(method, readonly, shallow); + }); + return instrumentations; +} +function createInstrumentationGetter(isReadonly2, shallow) { + const instrumentations = createInstrumentations(isReadonly2, shallow); + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; +} +const mutableCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, false) +}; +const shallowCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, true) +}; +const readonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, false) +}; +const shallowReadonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, true) +}; +function checkIdentityKeys(target, has, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has.call(target, rawKey)) { + const type = toRawType(target); + warn$2( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } +} + +const reactiveMap = /* @__PURE__ */ new WeakMap(); +const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); +const readonlyMap = /* @__PURE__ */ new WeakMap(); +const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); +function targetTypeMap(rawType) { + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } +} +function getTargetType(value) { + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); +} +function reactive(target) { + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); +} +function shallowReactive(target) { + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); +} +function readonly(target) { + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); +} +function shallowReadonly(target) { + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); +} +function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + { + warn$2( + `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( + target + )}` + ); + } + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; +} +function isReactive(value) { + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); +} +function isReadonly(value) { + return !!(value && value["__v_isReadonly"]); +} +function isShallow(value) { + return !!(value && value["__v_isShallow"]); +} +function isProxy(value) { + return value ? !!value["__v_raw"] : false; +} +function toRaw(observed) { + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; +} +function markRaw(value) { + if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { + def(value, "__v_skip", true); + } + return value; +} +const toReactive = (value) => isObject(value) ? reactive(value) : value; +const toReadonly = (value) => isObject(value) ? readonly(value) : value; + +function isRef(r) { + return r ? r["__v_isRef"] === true : false; +} +function ref(value) { + return createRef(value, false); +} +function shallowRef(value) { + return createRef(value, true); +} +function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); +} +class RefImpl { + constructor(value, isShallow2) { + this.dep = new Dep(); + this["__v_isRef"] = true; + this["__v_isShallow"] = false; + this._rawValue = isShallow2 ? value : toRaw(value); + this._value = isShallow2 ? value : toReactive(value); + this["__v_isShallow"] = isShallow2; + } + get value() { + { + this.dep.track({ + target: this, + type: "get", + key: "value" + }); + } + return this._value; + } + set value(newValue) { + const oldValue = this._rawValue; + const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); + newValue = useDirectValue ? newValue : toRaw(newValue); + if (hasChanged(newValue, oldValue)) { + this._rawValue = newValue; + this._value = useDirectValue ? newValue : toReactive(newValue); + { + this.dep.trigger({ + target: this, + type: "set", + key: "value", + newValue, + oldValue + }); + } + } + } +} +function triggerRef(ref2) { + if (ref2.dep) { + { + ref2.dep.trigger({ + target: ref2, + type: "set", + key: "value", + newValue: ref2._value + }); + } + } +} +function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +} +function toValue(source) { + return isFunction(source) ? source() : unref(source); +} +const shallowUnwrapHandlers = { + get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } +}; +function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); +} +class CustomRefImpl { + constructor(factory) { + this["__v_isRef"] = true; + this._value = void 0; + const dep = this.dep = new Dep(); + const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); + this._get = get; + this._set = set; + } + get value() { + return this._value = this._get(); + } + set value(newVal) { + this._set(newVal); + } +} +function customRef(factory) { + return new CustomRefImpl(factory); +} +function toRefs(object) { + if (!isProxy(object)) { + warn$2(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; +} +class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this["__v_isRef"] = true; + this._value = void 0; + } + get value() { + const val = this._object[this._key]; + return this._value = val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } +} +class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this["__v_isRef"] = true; + this["__v_isReadonly"] = true; + this._value = void 0; + } + get value() { + return this._value = this._getter(); + } +} +function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } +} +function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); +} + +class ComputedRefImpl { + constructor(fn, setter, isSSR) { + this.fn = fn; + this.setter = setter; + /** + * @internal + */ + this._value = void 0; + /** + * @internal + */ + this.dep = new Dep(this); + /** + * @internal + */ + this.__v_isRef = true; + // TODO isolatedDeclarations "__v_isReadonly" + // A computed is also a subscriber that tracks other deps + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 16; + /** + * @internal + */ + this.globalVersion = globalVersion - 1; + /** + * @internal + */ + this.next = void 0; + // for backwards compat + this.effect = this; + this["__v_isReadonly"] = !setter; + this.isSSR = isSSR; + } + /** + * @internal + */ + notify() { + this.flags |= 16; + if (!(this.flags & 8) && // avoid infinite self recursion + activeSub !== this) { + batch(this, true); + return true; + } + } + get value() { + const link = this.dep.track({ + target: this, + type: "get", + key: "value" + }) ; + refreshComputed(this); + if (link) { + link.version = this.dep.version; + } + return this._value; + } + set value(newValue) { + if (this.setter) { + this.setter(newValue); + } else { + warn$2("Write operation failed: computed value is readonly"); + } + } +} +function computed$1(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + if (isFunction(getterOrOptions)) { + getter = getterOrOptions; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, isSSR); + if (debugOptions && !isSSR) { + cRef.onTrack = debugOptions.onTrack; + cRef.onTrigger = debugOptions.onTrigger; + } + return cRef; +} + +const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" +}; +const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" +}; + +const INITIAL_WATCHER_VALUE = {}; +const cleanupMap = /* @__PURE__ */ new WeakMap(); +let activeWatcher = void 0; +function getCurrentWatcher() { + return activeWatcher; +} +function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { + if (owner) { + let cleanups = cleanupMap.get(owner); + if (!cleanups) cleanupMap.set(owner, cleanups = []); + cleanups.push(cleanupFn); + } else if (!failSilently) { + warn$2( + `onWatcherCleanup() was called when there was no active watcher to associate with.` + ); + } +} +function watch$1(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, once, scheduler, augmentJob, call } = options; + const warnInvalidSource = (s) => { + (options.onWarn || warn$2)( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const reactiveGetter = (source2) => { + if (deep) return source2; + if (isShallow(source2) || deep === false || deep === 0) + return traverse(source2, 1); + return traverse(source2); + }; + let effect; + let getter; + let cleanup; + let boundCleanup; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return call ? call(s, 2) : s(); + } else { + warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { + if (cb) { + getter = call ? () => call(source, 2) : source; + } else { + getter = () => { + if (cleanup) { + pauseTracking(); + try { + cleanup(); + } finally { + resetTracking(); + } + } + const currentEffect = activeWatcher; + activeWatcher = effect; + try { + return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); + } finally { + activeWatcher = currentEffect; + } + }; + } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + const depth = deep === true ? Infinity : deep; + getter = () => traverse(baseGetter(), depth); + } + const scope = getCurrentScope(); + const watchHandle = () => { + effect.stop(); + if (scope && scope.active) { + remove(scope.effects, effect); + } + }; + if (once && cb) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + watchHandle(); + }; + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = (immediateFirstRun) => { + if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { + if (cleanup) { + cleanup(); + } + const currentWatcher = activeWatcher; + activeWatcher = effect; + try { + const args = [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + boundCleanup + ]; + call ? call(cb, 3, args) : ( + // @ts-expect-error + cb(...args) + ); + oldValue = newValue; + } finally { + activeWatcher = currentWatcher; + } + } + } else { + effect.run(); + } + }; + if (augmentJob) { + augmentJob(job); + } + effect = new ReactiveEffect(getter); + effect.scheduler = scheduler ? () => scheduler(job, false) : job; + boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); + cleanup = effect.onStop = () => { + const cleanups = cleanupMap.get(effect); + if (cleanups) { + if (call) { + call(cleanups, 4); + } else { + for (const cleanup2 of cleanups) cleanup2(); + } + cleanupMap.delete(effect); + } + }; + { + effect.onTrack = options.onTrack; + effect.onTrigger = options.onTrigger; + } + if (cb) { + if (immediate) { + job(true); + } else { + oldValue = effect.run(); + } + } else if (scheduler) { + scheduler(job.bind(null, true), true); + } else { + effect.run(); + } + watchHandle.pause = effect.pause.bind(effect); + watchHandle.resume = effect.resume.bind(effect); + watchHandle.stop = watchHandle; + return watchHandle; +} +function traverse(value, depth = Infinity, seen) { + if (depth <= 0 || !isObject(value) || value["__v_skip"]) { + return value; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + depth--; + if (isRef(value)) { + traverse(value.value, depth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, seen); + } + for (const key of Object.getOwnPropertySymbols(value)) { + if (Object.prototype.propertyIsEnumerable.call(value, key)) { + traverse(value[key], depth, seen); + } + } + } + return value; +} + +const stack$1 = []; +function pushWarningContext(vnode) { + stack$1.push(vnode); +} +function popWarningContext() { + stack$1.pop(); +} +let isWarning = false; +function warn$1(msg, ...args) { + if (isWarning) return; + isWarning = true; + pauseTracking(); + const instance = stack$1.length ? stack$1[stack$1.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + // eslint-disable-next-line no-restricted-syntax + msg + args.map((a) => { + var _a, _b; + return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); + }).join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); + } + console.warn(...warnArgs); + } + resetTracking(); + isWarning = false; +} +function getComponentTrace() { + let currentVNode = stack$1[stack$1.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); + } + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; +} +function formatTrace(trace) { + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; +} +function formatTraceEntry({ vnode, recurseCount }) { + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; +} +function formatProps(props) { + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; +} +function formatProp(key, value, raw) { + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } +} +function assertNumber(val, type) { + if (val === void 0) { + return; + } else if (typeof val !== "number") { + warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + } else if (isNaN(val)) { + warn$1(`${type} is NaN - the duration expression might be incorrect.`); + } +} + +const ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER", + "COMPONENT_UPDATE": 15, + "15": "COMPONENT_UPDATE", + "APP_UNMOUNT_CLEANUP": 16, + "16": "APP_UNMOUNT_CLEANUP" +}; +const ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush", + [15]: "component update", + [16]: "app unmount cleanup function" +}; +function callWithErrorHandling(fn, instance, type, args) { + try { + return args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } +} +function callWithAsyncErrorHandling(fn, instance, type, args) { + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); + } + return res; + } + if (isArray(fn)) { + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; + } else { + warn$1( + `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` + ); + } +} +function handleError(err, instance, type, throwInDev = true) { + const contextVNode = instance ? instance.vnode : null; + const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = ErrorTypeStrings$1[type] ; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + return; + } + } + } + cur = cur.parent; + } + if (errorHandler) { + pauseTracking(); + callWithErrorHandling(errorHandler, null, 10, [ + err, + exposedInstance, + errorInfo + ]); + resetTracking(); + return; + } + } + logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); +} +function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { + { + const info = ErrorTypeStrings$1[type]; + if (contextVNode) { + pushWarningContext(contextVNode); + } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } +} + +const queue = []; +let flushIndex = -1; +const pendingPostFlushCbs = []; +let activePostFlushCbs = null; +let postFlushIndex = 0; +const resolvedPromise = /* @__PURE__ */ Promise.resolve(); +let currentFlushPromise = null; +const RECURSION_LIMIT = 100; +function nextTick(fn) { + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; +} +function findInsertionIndex(id) { + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { + start = middle + 1; + } else { + end = middle; + } + } + return start; +} +function queueJob(job) { + if (!(job.flags & 1)) { + const jobId = getId(job); + const lastJob = queue[queue.length - 1]; + if (!lastJob || // fast path when the job id is larger than the tail + !(job.flags & 2) && jobId >= getId(lastJob)) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(jobId), 0, job); + } + job.flags |= 1; + queueFlush(); + } +} +function queueFlush() { + if (!currentFlushPromise) { + currentFlushPromise = resolvedPromise.then(flushJobs); + } +} +function queuePostFlushCb(cb) { + if (!isArray(cb)) { + if (activePostFlushCbs && cb.id === -1) { + activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); + } else if (!(cb.flags & 1)) { + pendingPostFlushCbs.push(cb); + cb.flags |= 1; + } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); +} +function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.flags & 2) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + if (cb.flags & 4) { + cb.flags &= ~1; + } + cb(); + if (!(cb.flags & 4)) { + cb.flags &= ~1; + } + } + } +} +function flushPostFlushCbs(seen) { + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; + } + activePostFlushCbs = deduped; + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + const cb = activePostFlushCbs[postFlushIndex]; + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + if (cb.flags & 4) { + cb.flags &= ~1; + } + if (!(cb.flags & 8)) cb(); + cb.flags &= ~1; + } + activePostFlushCbs = null; + postFlushIndex = 0; + } +} +const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; +function flushJobs(seen) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + const check = (job) => checkRecursiveUpdates(seen, job) ; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && !(job.flags & 8)) { + if (check(job)) { + continue; + } + if (job.flags & 4) { + job.flags &= ~1; + } + callWithErrorHandling( + job, + job.i, + job.i ? 15 : 14 + ); + if (!(job.flags & 4)) { + job.flags &= ~1; + } + } + } + } finally { + for (; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job) { + job.flags &= ~1; + } + } + flushIndex = -1; + queue.length = 0; + flushPostFlushCbs(seen); + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); + } + } +} +function checkRecursiveUpdates(seen, fn) { + const count = seen.get(fn) || 0; + if (count > RECURSION_LIMIT) { + const instance = fn.i; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } + seen.set(fn, count + 1); + return false; +} + +let isHmrUpdating = false; +const hmrDirtyComponents = /* @__PURE__ */ new Map(); +{ + getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; +} +const map = /* @__PURE__ */ new Map(); +function registerHMR(instance) { + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); +} +function unregisterHMR(instance) { + map.get(instance.type.__hmrId).instances.delete(instance); +} +function createRecord(id, initialDef) { + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; +} +function normalizeClassComponent(component) { + return isClassComponent(component) ? component.__vccOpts : component; +} +function rerender(id, newRender) { + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; + } + instance.renderCache = []; + isHmrUpdating = true; + instance.update(); + isHmrUpdating = false; + }); +} +function reload(id, newComp) { + const record = map.get(id); + if (!record) return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (let i = 0; i < instances.length; i++) { + const instance = instances[i]; + const oldComp = normalizeClassComponent(instance.type); + let dirtyInstances = hmrDirtyComponents.get(oldComp); + if (!dirtyInstances) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set()); + } + dirtyInstances.add(instance); + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + dirtyInstances.add(instance); + instance.ceReload(newComp.styles); + dirtyInstances.delete(instance); + } else if (instance.parent) { + queueJob(() => { + isHmrUpdating = true; + instance.parent.update(); + isHmrUpdating = false; + dirtyInstances.delete(instance); + }); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + if (instance.root.ce && instance !== instance.root) { + instance.root.ce._removeChildStyle(oldComp); + } + } + queuePostFlushCb(() => { + hmrDirtyComponents.clear(); + }); +} +function updateComponentDef(oldComp, newComp) { + extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; + } + } +} +function tryWrap(fn) { + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; +} + +let devtools$1; +let buffer = []; +let devtoolsNotInstalled = false; +function emit$1(event, ...args) { + if (devtools$1) { + devtools$1.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } +} +function setDevtoolsHook$1(hook, target) { + var _a, _b; + devtools$1 = hook; + if (devtools$1) { + devtools$1.enabled = true; + buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); + buffer = []; + } else if ( + // handle late devtools injection - only do this if we are in an actual + // browser environment to avoid the timer handle stalling test runner exit + // (#4815) + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + // eslint-disable-next-line no-restricted-syntax + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook$1(newHook, target); + }); + setTimeout(() => { + if (!devtools$1) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; + devtoolsNotInstalled = true; + buffer = []; + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } +} +function devtoolsInitApp(app, version) { + emit$1("app:init" /* APP_INIT */, app, version, { + Fragment, + Text, + Comment, + Static + }); +} +function devtoolsUnmountApp(app) { + emit$1("app:unmount" /* APP_UNMOUNT */, app); +} +const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); +const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); +const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( + "component:removed" /* COMPONENT_REMOVED */ +); +const devtoolsComponentRemoved = (component) => { + if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools$1.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } +}; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function createDevtoolsComponentHook(hook) { + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; +} +const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); +const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); +function createDevtoolsPerformanceHook(hook) { + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; +} +function devtoolsComponentEmit(component, event, params) { + emit$1( + "component:emit" /* COMPONENT_EMIT */, + component.appContext.app, + component, + event, + params + ); +} + +let currentRenderingInstance = null; +let currentScopeId = null; +function setCurrentRenderingInstance(instance) { + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; +} +function pushScopeId(id) { + currentScopeId = id; +} +function popScopeId() { + currentScopeId = null; +} +const withScopeId = (_id) => withCtx; +function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); + } + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; +} + +function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } +} +function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + warn$1(`withDirectives can only be used inside render functions.`); + return vnode; + } + const instance = getComponentPublicInstance(currentRenderingInstance); + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; + if (dir) { + if (isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; +} +function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); + } + } +} + +const TeleportEndKey = Symbol("_vte"); +const isTeleport = (type) => type.__isTeleport; +const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); +const isTeleportDeferred = (props) => props && (props.defer || props.defer === ""); +const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; +const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; +const resolveTarget = (props, select) => { + const targetSelector = props && props.to; + if (isString(targetSelector)) { + if (!select) { + warn$1( + `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` + ); + return null; + } else { + const target = select(targetSelector); + if (!target && !isTeleportDisabled(props)) { + warn$1( + `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` + ); + } + return target; + } + } else { + if (!targetSelector && !isTeleportDisabled(props)) { + warn$1(`Invalid Teleport target: ${targetSelector}`); + } + return targetSelector; + } +}; +const TeleportImpl = { + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (isHmrUpdating) { + optimized = false; + dynamicChildren = null; + } + if (n1 == null) { + const placeholder = n2.el = createComment("teleport start") ; + const mainAnchor = n2.anchor = createComment("teleport end") ; + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + if (parentComponent && parentComponent.isCE) { + parentComponent.ce._teleportTarget = container2; + } + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountToTarget = () => { + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = prepareAnchor(target, n2, createText, insert); + if (target) { + if (namespace !== "svg" && isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace !== "mathml" && isTargetMathML(target)) { + namespace = "mathml"; + } + if (!disabled) { + mount(target, targetAnchor); + updateCssVars(n2, false); + } + } else if (!disabled) { + warn$1( + "Invalid Teleport target on mount:", + target, + `(${typeof target})` + ); + } + }; + if (disabled) { + mount(container, mainAnchor); + updateCssVars(n2, true); + } + if (isTeleportDeferred(n2.props)) { + queuePostRenderEffect(() => { + mountToTarget(); + n2.el.__isMounted = true; + }, parentSuspense); + } else { + mountToTarget(); + } + } else { + if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) { + queuePostRenderEffect(() => { + TeleportImpl.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + delete n1.el.__isMounted; + }, parentSuspense); + return; + } + n2.el = n1.el; + n2.targetStart = n1.targetStart; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } else { + warn$1( + "Invalid Teleport target on update:", + target, + `(${typeof target})` + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); + } + } + updateCssVars(n2, disabled); + } + }, + remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { + shapeFlag, + children, + anchor, + targetStart, + targetAnchor, + target, + props + } = vnode; + if (target) { + hostRemove(targetStart); + hostRemove(targetAnchor); + } + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport +}; +function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } +} +function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector, insert, createText } +}, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const disabled = isTeleportDisabled(vnode.props); + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (disabled) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetStart = targetNode; + vnode.targetAnchor = targetNode && nextSibling(targetNode); + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + if (targetAnchor && targetAnchor.nodeType === 8) { + if (targetAnchor.data === "teleport start anchor") { + vnode.targetStart = targetAnchor; + } else if (targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + targetAnchor = nextSibling(targetAnchor); + } + if (!vnode.targetAnchor) { + prepareAnchor(target, vnode, createText, insert); + } + hydrateChildren( + targetNode && nextSibling(targetNode), + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode, disabled); + } + return vnode.anchor && nextSibling(vnode.anchor); +} +const Teleport = TeleportImpl; +function updateCssVars(vnode, isDisabled) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node, anchor; + if (isDisabled) { + node = vnode.el; + anchor = vnode.anchor; + } else { + node = vnode.targetStart; + anchor = vnode.targetAnchor; + } + while (node && node !== anchor) { + if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } +} +function prepareAnchor(target, vnode, createText, insert) { + const targetStart = vnode.targetStart = createText(""); + const targetAnchor = vnode.targetAnchor = createText(""); + targetStart[TeleportEndKey] = targetAnchor; + if (target) { + insert(targetStart, target); + insert(targetAnchor, target); + } + return targetAnchor; +} + +const leaveCbKey = Symbol("_leaveCb"); +const enterCbKey$1 = Symbol("_enterCb"); +function useTransitionState() { + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; +} +const TransitionHookValidator = [Function, Array]; +const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator +}; +const recursiveGetSubtree = (instance) => { + const subTree = instance.subTree; + return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; +}; +const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + const child = findNonCommentChild(children); + const rawProps = toRaw(props); + const { mode } = rawProps; + if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { + warn$1(`invalid <transition> mode: ${mode}`); + } + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getInnerChild$1(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + let enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance, + // #11061, ensure enterHooks is fresh after clone + (hooks) => enterHooks = hooks + ); + if (innerChild.type !== Comment) { + setTransitionHooks(innerChild, enterHooks); + } + let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree); + if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { + let leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in" && innerChild.type !== Comment) { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (!(instance.job.flags & 8)) { + instance.update(); + } + delete leavingHooks.afterLeave; + oldInnerChild = void 0; + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + enterHooks.delayedLeave = () => { + delayedLeave(); + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + }; + } else { + oldInnerChild = void 0; + } + } else if (oldInnerChild) { + oldInnerChild = void 0; + } + return child; + }; + } +}; +function findNonCommentChild(children) { + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c of children) { + if (c.type !== Comment) { + if (hasFound) { + warn$1( + "<transition> can only be used on a single element or component. Use <transition-group> for lists." + ); + break; + } + child = c; + hasFound = true; + } + } + } + return child; +} +const BaseTransition = BaseTransitionImpl; +function getLeavingNodesForType(state, vnode) { + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; +} +function resolveTransitionHooks(vnode, props, state, instance, postClone) { + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook(hook, args); + if (isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) done(); + } else if (hook.length <= 1) { + done(); + } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey$1] = (cancelled) => { + if (called) return; + called = true; + if (cancelled) { + callHook(cancelHook, [el]); + } else { + callHook(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey$1] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove) { + const key2 = String(vnode.key); + if (el[enterCbKey$1]) { + el[enterCbKey$1]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove(); + } + callHook(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) return; + called = true; + remove(); + if (cancelled) { + callHook(onLeaveCancelled, [el]); + } else { + callHook(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + const hooks2 = resolveTransitionHooks( + vnode2, + props, + state, + instance, + postClone + ); + if (postClone) postClone(hooks2); + return hooks2; + } + }; + return hooks; +} +function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } +} +function getInnerChild$1(vnode) { + if (!isKeepAlive(vnode)) { + if (isTeleport(vnode.type) && vnode.children) { + return findNonCommentChild(vnode.children); + } + return vnode; + } + if (vnode.component) { + return vnode.component.subTree; + } + const { shapeFlag, children } = vnode; + if (children) { + if (shapeFlag & 16) { + return children[0]; + } + if (shapeFlag & 32 && isFunction(children.default)) { + return children.default(); + } + } +} +function setTransitionHooks(vnode, hooks) { + if (vnode.shapeFlag & 6 && vnode.component) { + vnode.transition = hooks; + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } +} +function getTransitionRawChildren(children, keepComment = false, parentKey) { + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); + } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; + } + } + return ret; +} + +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineComponent(options, extraOptions) { + return isFunction(options) ? ( + // #8236: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; +} + +function useId() { + const i = getCurrentInstance(); + if (i) { + return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++; + } else { + warn$1( + `useId() is called when there is no active component instance to be associated with.` + ); + } + return ""; +} +function markAsyncBoundary(instance) { + instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; +} + +const knownTemplateRefs = /* @__PURE__ */ new WeakSet(); +function useTemplateRef(key) { + const i = getCurrentInstance(); + const r = shallowRef(null); + if (i) { + const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs; + let desc; + if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) { + warn$1(`useTemplateRef('${key}') already exists.`); + } else { + Object.defineProperty(refs, key, { + enumerable: true, + get: () => r.value, + set: (val) => r.value = val + }); + } + } else { + warn$1( + `useTemplateRef() is called when there is no active component instance to be associated with.` + ); + } + const ret = readonly(r) ; + { + knownTemplateRefs.add(ret); + } + return ret; +} + +function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { + if (isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) { + setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree); + } + return; + } + const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + const rawSetupState = toRaw(setupState); + const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => { + { + if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) { + warn$1( + `Template ref "${key}" used on a non-ref value. It will not work in the production build.` + ); + } + if (knownTemplateRefs.has(rawSetupState[key])) { + return false; + } + } + return hasOwn(rawSetupState, key); + }; + if (oldRef != null && oldRef !== ref) { + if (isString(oldRef)) { + refs[oldRef] = null; + if (canSetSetupRef(oldRef)) { + setupState[oldRef] = null; + } + } else if (isRef(oldRef)) { + oldRef.value = null; + } + } + if (isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = isString(ref); + const _isRef = isRef(ref); + if (_isString || _isRef) { + const doSet = () => { + if (rawRef.f) { + const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + isArray(existing) && remove(existing, refValue); + } else { + if (!isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (canSetSetupRef(ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); + } + } + } else if (_isString) { + refs[ref] = value; + if (canSetSetupRef(ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) refs[rawRef.k] = value; + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + }; + if (value) { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } else { + doSet(); + } + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + } +} + +let hasLoggedMismatchError = false; +const logMismatchError = () => { + if (hasLoggedMismatchError) { + return; + } + console.error("Hydration completed but contains mismatches."); + hasLoggedMismatchError = true; +}; +const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; +const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); +const getContainerType = (container) => { + if (container.nodeType !== 1) return void 0; + if (isSVGContainer(container)) return "svg"; + if (isMathMLContainer(container)) return "mathml"; + return void 0; +}; +const isComment = (node) => node.nodeType === 8; +function createHydrationFunctions(rendererInternals) { + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment + } + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + warn$1( + `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` + ); + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; + } + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; + }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + optimized = optimized || !!vnode.dynamicChildren; + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + { + def(node, "__vnode", vnode, true); + def(node, "__vueParentComponent", parentComponent, true); + } + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { + warn$1( + `Hydration text mismatch in`, + node.parentNode, + ` + - rendered on server: ${JSON.stringify( + node.data + )} + - expected on client: ${JSON.stringify(vnode.children)}` + ); + logMismatchError(); + node.data = vnode.children; + } + nextNode = nextSibling(node); + } + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 || domType === 3) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else { + warn$1("Invalid HostVNode type:", type, `(${typeof type})`); + } + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; + }; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition( + null, + // no need check parentSuspense in hydration + transition + ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + let hasWarned = false; + while (next) { + if (!isMismatchAllowed(el, 1 /* CHILDREN */)) { + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + el, + ` +Server rendered element contains more child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + let clientText = vnode.children; + if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) { + clientText = clientText.slice(1); + } + if (el.textContent !== clientText) { + if (!isMismatchAllowed(el, 0 /* TEXT */)) { + warn$1( + `Hydration text content mismatch on`, + el, + ` + - rendered on server: ${el.textContent} + - expected on client: ${vnode.children}` + ); + logMismatchError(); + } + el.textContent = vnode.children; + } + } + if (props) { + { + const isCustomElement = el.tagName.includes("-"); + for (const key in props) { + if (// #11189 skip if this node has directives that have created hooks + // as it could have mutated the DOM in any possible way + !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) { + logMismatchError(); + } + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === "." || isCustomElement) { + patchProp(el, key, null, props[key], void 0, parentComponent); + } + } + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + } + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + let hasWarned = false; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + const isText = vnode.type === Text; + if (node) { + if (isText && !optimized) { + if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) { + insert( + createText( + node.data.slice(vnode.children.length) + ), + container, + nextSibling(node) + ); + node.data = vnode.children; + } + } + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (isText && !vnode.children) { + insert(vnode.el = createText(""), container); + } else { + if (!isMismatchAllowed(container, 1 /* CHILDREN */)) { + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + container, + ` +Server rendered element contains fewer child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + } + } + return node; + }; + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); + } else { + logMismatchError(); + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) { + warn$1( + `Hydration node mismatch: +- rendered on server:`, + node, + node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, + ` +- expected on client:`, + vnode.type + ); + logMismatchError(); + } + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; + } + } + } + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + if (parentComponent) { + parentComponent.vnode.el = vnode.el; + updateHOCHostEl(parentComponent, vnode.el); + } + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } + } + } + } + return node; + }; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 && node.tagName === "TEMPLATE"; + }; + return [hydrate, hydrateNode]; +} +function propHasMismatch(el, key, clientValue, vnode, instance) { + let mismatchType; + let mismatchKey; + let actual; + let expected; + if (key === "class") { + actual = el.getAttribute("class"); + expected = normalizeClass(clientValue); + if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { + mismatchType = 2 /* CLASS */; + mismatchKey = `class`; + } + } else if (key === "style") { + actual = el.getAttribute("style") || ""; + expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); + const actualMap = toStyleMap(actual); + const expectedMap = toStyleMap(expected); + if (vnode.dirs) { + for (const { dir, value } of vnode.dirs) { + if (dir.name === "show" && !value) { + expectedMap.set("display", "none"); + } + } + } + if (instance) { + resolveCssVars(instance, vnode, expectedMap); + } + if (!isMapEqual(actualMap, expectedMap)) { + mismatchType = 3 /* STYLE */; + mismatchKey = "style"; + } + } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { + if (isBooleanAttr(key)) { + actual = el.hasAttribute(key); + expected = includeBooleanAttr(clientValue); + } else if (clientValue == null) { + actual = el.hasAttribute(key); + expected = false; + } else { + if (el.hasAttribute(key)) { + actual = el.getAttribute(key); + } else if (key === "value" && el.tagName === "TEXTAREA") { + actual = el.value; + } else { + actual = false; + } + expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; + } + if (actual !== expected) { + mismatchType = 4 /* ATTRIBUTE */; + mismatchKey = key; + } + } + if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) { + const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; + const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`; + const postSegment = ` + - rendered on server: ${format(actual)} + - expected on client: ${format(expected)} + Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. + You should fix the source of the mismatch.`; + { + warn$1(preSegment, el, postSegment); + } + return true; + } + return false; +} +function toClassSet(str) { + return new Set(str.trim().split(/\s+/)); +} +function isSetEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const s of a) { + if (!b.has(s)) { + return false; + } + } + return true; +} +function toStyleMap(str) { + const styleMap = /* @__PURE__ */ new Map(); + for (const item of str.split(";")) { + let [key, value] = item.split(":"); + key = key.trim(); + value = value && value.trim(); + if (key && value) { + styleMap.set(key, value); + } + } + return styleMap; +} +function isMapEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const [key, value] of a) { + if (value !== b.get(key)) { + return false; + } + } + return true; +} +function resolveCssVars(instance, vnode, expectedMap) { + const root = instance.subTree; + if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) { + const cssVars = instance.getCssVars(); + for (const key in cssVars) { + expectedMap.set( + `--${getEscapedCssVarName(key)}`, + String(cssVars[key]) + ); + } + } + if (vnode === root && instance.parent) { + resolveCssVars(instance.parent, instance.vnode, expectedMap); + } +} +const allowMismatchAttr = "data-allow-mismatch"; +const MismatchTypeString = { + [0 /* TEXT */]: "text", + [1 /* CHILDREN */]: "children", + [2 /* CLASS */]: "class", + [3 /* STYLE */]: "style", + [4 /* ATTRIBUTE */]: "attribute" +}; +function isMismatchAllowed(el, allowedType) { + if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) { + while (el && !el.hasAttribute(allowMismatchAttr)) { + el = el.parentElement; + } + } + const allowedAttr = el && el.getAttribute(allowMismatchAttr); + if (allowedAttr == null) { + return false; + } else if (allowedAttr === "") { + return true; + } else { + const list = allowedAttr.split(","); + if (allowedType === 0 /* TEXT */ && list.includes("children")) { + return true; + } + return allowedAttr.split(",").includes(MismatchTypeString[allowedType]); + } +} + +const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1)); +const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id)); +const hydrateOnIdle = (timeout = 1e4) => (hydrate) => { + const id = requestIdleCallback(hydrate, { timeout }); + return () => cancelIdleCallback(id); +}; +function elementIsVisibleInViewport(el) { + const { top, left, bottom, right } = el.getBoundingClientRect(); + const { innerHeight, innerWidth } = window; + return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth); +} +const hydrateOnVisible = (opts) => (hydrate, forEach) => { + const ob = new IntersectionObserver((entries) => { + for (const e of entries) { + if (!e.isIntersecting) continue; + ob.disconnect(); + hydrate(); + break; + } + }, opts); + forEach((el) => { + if (!(el instanceof Element)) return; + if (elementIsVisibleInViewport(el)) { + hydrate(); + ob.disconnect(); + return false; + } + ob.observe(el); + }); + return () => ob.disconnect(); +}; +const hydrateOnMediaQuery = (query) => (hydrate) => { + if (query) { + const mql = matchMedia(query); + if (mql.matches) { + hydrate(); + } else { + mql.addEventListener("change", hydrate, { once: true }); + return () => mql.removeEventListener("change", hydrate); + } + } +}; +const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => { + if (isString(interactions)) interactions = [interactions]; + let hasHydrated = false; + const doHydrate = (e) => { + if (!hasHydrated) { + hasHydrated = true; + teardown(); + hydrate(); + e.target.dispatchEvent(new e.constructor(e.type, e)); + } + }; + const teardown = () => { + forEach((el) => { + for (const i of interactions) { + el.removeEventListener(i, doHydrate); + } + }); + }; + forEach((el) => { + for (const i of interactions) { + el.addEventListener(i, doHydrate, { once: true }); + } + }); + return teardown; +}; +function forEachElement(node, cb) { + if (isComment(node) && node.data === "[") { + let depth = 1; + let next = node.nextSibling; + while (next) { + if (next.nodeType === 1) { + const result = cb(next); + if (result === false) { + break; + } + } else if (isComment(next)) { + if (next.data === "]") { + if (--depth === 0) break; + } else if (next.data === "[") { + depth++; + } + } + next = next.nextSibling; + } + } else { + cb(node); + } +} + +const isAsyncWrapper = (i) => !!i.type.__asyncLoader; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineAsyncComponent(source) { + if (isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + hydrate: hydrateStrategy, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve, reject) => { + const userRetry = () => resolve(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (!comp) { + warn$1( + `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` + ); + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + if (comp && !isObject(comp) && !isFunction(comp)) { + throw new Error(`Invalid async component load result: ${comp}`); + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + __asyncHydrate(el, instance, hydrate) { + const doHydrate = hydrateStrategy ? () => { + const teardown = hydrateStrategy( + hydrate, + (cb) => forEachElement(el, cb) + ); + if (teardown) { + (instance.bum || (instance.bum = [])).push(teardown); + } + } : hydrate; + if (resolvedComp) { + doHydrate(); + } else { + load().then(() => !instance.isUnmounted && doHydrate()); + } + }, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + markAsyncBoundary(instance); + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { + pendingRequest = null; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || isInSSRComponentSetup) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = ref(false); + const error = ref(); + const delayed = ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.update(); + } + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); +} +function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; +} + +const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; +const KeepAliveImpl = { + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + if (!sharedContext.renderer) { + return () => { + const children = slots.default && slots.default(); + return children && children.length === 1 ? children[0] : children; + }; + } + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + { + instance.__v_cache = cache; + } + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + invalidateMount(instance2.m); + invalidateMount(instance2.a); + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && !filter(name)) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (cached && (!current || !isSameVNodeType(cached, current))) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + if (isSuspense(instance.subTree.type)) { + queuePostRenderEffect(() => { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + }, instance.subTree.suspense); + } else { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return current = null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + { + warn$1(`KeepAlive should contain exactly one component child.`); + } + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + if (vnode.type === Comment) { + current = null; + return vnode; + } + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + vnode.shapeFlag &= ~256; + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } +}; +const KeepAlive = KeepAliveImpl; +function matches(pattern, name) { + if (isArray(pattern)) { + return pattern.some((p) => matches(p, name)); + } else if (isString(pattern)) { + return pattern.split(",").includes(name); + } else if (isRegExp(pattern)) { + pattern.lastIndex = 0; + return pattern.test(name); + } + return false; +} +function onActivated(hook, target) { + registerKeepAliveHook(hook, "a", target); +} +function onDeactivated(hook, target) { + registerKeepAliveHook(hook, "da", target); +} +function registerKeepAliveHook(hook, type, target = currentInstance) { + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; + } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } +} +function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + remove(keepAliveRoot[type], injected); + }, target); +} +function resetShapeFlag(vnode) { + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; +} +function getInnerChild(vnode) { + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; +} + +function injectHook(type, hook, target = currentInstance, prepend = false) { + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); + } + return wrappedHook; + } else { + const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) + ); + } +} +const createHook = (lifecycle) => (hook, target = currentInstance) => { + if (!isInSSRComponentSetup || lifecycle === "sp") { + injectHook(lifecycle, (...args) => hook(...args), target); + } +}; +const onBeforeMount = createHook("bm"); +const onMounted = createHook("m"); +const onBeforeUpdate = createHook( + "bu" +); +const onUpdated = createHook("u"); +const onBeforeUnmount = createHook( + "bum" +); +const onUnmounted = createHook("um"); +const onServerPrefetch = createHook( + "sp" +); +const onRenderTriggered = createHook("rtg"); +const onRenderTracked = createHook("rtc"); +function onErrorCaptured(hook, target = currentInstance) { + injectHook("ec", hook, target); +} + +const COMPONENTS = "components"; +const DIRECTIVES = "directives"; +function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; +} +const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); +function resolveDynamicComponent(component) { + if (isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } +} +function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); +} +function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else { + warn$1( + `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } +} +function resolve(registry, name) { + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); +} + +function renderList(source, renderItem, cache, index) { + let ret; + const cached = cache && cache[index]; + const sourceIsArray = isArray(source); + if (sourceIsArray || isString(source)) { + const sourceIsReactiveArray = sourceIsArray && isReactive(source); + let needsWrap = false; + if (sourceIsReactiveArray) { + needsWrap = !isShallow(source); + source = shallowReadArray(source); + } + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem( + needsWrap ? toReactive(source[i]) : source[i], + i, + void 0, + cached && cached[i] + ); + } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn$1(`The v-for range expect an integer value but got ${source}.`); + } + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); + } + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } + } + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; +} + +function createSlots(slots, dynamicSlots) { + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) res.key = slot.key; + return res; + } : slot.fn; + } + } + return slots; +} + +function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) { + if (name !== "default") props.name = name; + return openBlock(), createBlock( + Fragment, + null, + [createVNode("slot", props, fallback && fallback())], + 64 + ); + } + let slot = slots[name]; + if (slot && slot.length > 1) { + warn$1( + `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` + ); + slot = () => []; + } + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key; + const rendered = createBlock( + Fragment, + { + key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content + (!validSlotContent && fallback ? "_fb" : "") + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; +} +function ensureValidVNode(vnodes) { + return vnodes.some((child) => { + if (!isVNode(child)) return true; + if (child.type === Comment) return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; +} + +function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + if (!isObject(obj)) { + warn$1(`v-on with no argument expects an object value.`); + return ret; + } + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; + } + return ret; +} + +const getPublicInstance = (i) => { + if (!i) return null; + if (isStatefulComponent(i)) return getComponentPublicInstance(i); + return getPublicInstance(i.parent); +}; +const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => shallowReadonly(i.props) , + $attrs: (i) => shallowReadonly(i.attrs) , + $slots: (i) => shallowReadonly(i.slots) , + $refs: (i) => shallowReadonly(i.refs) , + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $host: (i) => i.ce, + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i) , + $forceUpdate: (i) => i.f || (i.f = () => { + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) +); +const isReservedPrefix = (key) => key === "_" || key === "$"; +const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); +const PublicInstanceProxyHandlers = { + get({ _: instance }, key) { + if (key === "__v_skip") { + return true; + } + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (key === "__isVue") { + return true; + } + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance.attrs, "get", ""); + markAttrsAccessed(); + } else if (key === "$slots") { + track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); + return false; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + data[key] = value; + return true; + } else if (hasOwn(instance.props, key)) { + warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + warn$1( + `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` + ); + return false; + } else { + if (key in instance.appContext.config.globalProperties) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + value + }); + } else { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } +}; +{ + PublicInstanceProxyHandlers.ownKeys = (target) => { + warn$1( + `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` + ); + return Reflect.ownKeys(target); + }; +} +const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, { + get(target, key) { + if (key === Symbol.unscopables) { + return; + } + return PublicInstanceProxyHandlers.get(target, key, target); + }, + has(_, key) { + const has = key[0] !== "_" && !isGloballyAllowed(key); + if (!has && PublicInstanceProxyHandlers.has(_, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} should not start with _ which is a reserved prefix for Vue internals.` + ); + } + return has; + } +}); +function createDevRenderContext(instance) { + const target = {}; + Object.defineProperty(target, `_`, { + configurable: true, + enumerable: false, + get: () => instance + }); + Object.keys(publicPropertiesMap).forEach((key) => { + Object.defineProperty(target, key, { + configurable: true, + enumerable: false, + get: () => publicPropertiesMap[key](instance), + // intercepted by the proxy so no need for implementation, + // but needed to prevent set errors + set: NOOP + }); + }); + return target; +} +function exposePropsOnRenderContext(instance) { + const { + ctx, + propsOptions: [propsOptions] + } = instance; + if (propsOptions) { + Object.keys(propsOptions).forEach((key) => { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => instance.props[key], + set: NOOP + }); + }); + } +} +function exposeSetupStateOnRenderContext(instance) { + const { ctx, setupState } = instance; + Object.keys(toRaw(setupState)).forEach((key) => { + if (!setupState.__isScriptSetup) { + if (isReservedPrefix(key[0])) { + warn$1( + `setup() return property ${JSON.stringify( + key + )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` + ); + return; + } + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => setupState[key], + set: NOOP + }); + } + }); +} + +const warnRuntimeUsage = (method) => warn$1( + `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` +); +function defineProps() { + { + warnRuntimeUsage(`defineProps`); + } + return null; +} +function defineEmits() { + { + warnRuntimeUsage(`defineEmits`); + } + return null; +} +function defineExpose(exposed) { + { + warnRuntimeUsage(`defineExpose`); + } +} +function defineOptions(options) { + { + warnRuntimeUsage(`defineOptions`); + } +} +function defineSlots() { + { + warnRuntimeUsage(`defineSlots`); + } + return null; +} +function defineModel() { + { + warnRuntimeUsage("defineModel"); + } +} +function withDefaults(props, defaults) { + { + warnRuntimeUsage(`withDefaults`); + } + return null; +} +function useSlots() { + return getContext().slots; +} +function useAttrs() { + return getContext().attrs; +} +function getContext() { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useContext() called without active instance.`); + } + return i.setupContext || (i.setupContext = createSetupContext(i)); +} +function normalizePropsOrEmits(props) { + return isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; +} +function mergeDefaults(raw, defaults) { + const props = normalizePropsOrEmits(raw); + for (const key in defaults) { + if (key.startsWith("__skip")) continue; + let opt = props[key]; + if (opt) { + if (isArray(opt) || isFunction(opt)) { + opt = props[key] = { type: opt, default: defaults[key] }; + } else { + opt.default = defaults[key]; + } + } else if (opt === null) { + opt = props[key] = { default: defaults[key] }; + } else { + warn$1(`props default key "${key}" has no corresponding declaration.`); + } + if (opt && defaults[`__skip_${key}`]) { + opt.skipFactory = true; + } + } + return props; +} +function mergeModels(a, b) { + if (!a || !b) return a || b; + if (isArray(a) && isArray(b)) return a.concat(b); + return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); +} +function createPropsRestProxy(props, excludedKeys) { + const ret = {}; + for (const key in props) { + if (!excludedKeys.includes(key)) { + Object.defineProperty(ret, key, { + enumerable: true, + get: () => props[key] + }); + } + } + return ret; +} +function withAsyncContext(getAwaitable) { + const ctx = getCurrentInstance(); + if (!ctx) { + warn$1( + `withAsyncContext called without active current instance. This is likely a bug.` + ); + } + let awaitable = getAwaitable(); + unsetCurrentInstance(); + if (isPromise(awaitable)) { + awaitable = awaitable.catch((e) => { + setCurrentInstance(ctx); + throw e; + }); + } + return [awaitable, () => setCurrentInstance(ctx)]; +} + +function createDuplicateChecker() { + const cache = /* @__PURE__ */ Object.create(null); + return (type, key) => { + if (cache[key]) { + warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); + } else { + cache[key] = type; + } + }; +} +let shouldCacheAccess = true; +function applyOptions(instance) { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook$1(options.beforeCreate, instance, "bc"); + } + const { + // state + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, + // lifecycle + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, + // public API + expose, + inheritAttrs, + // assets + components, + directives, + filters + } = options; + const checkDuplicateProperties = createDuplicateChecker() ; + { + const [propsOptions] = instance.propsOptions; + if (propsOptions) { + for (const key in propsOptions) { + checkDuplicateProperties("Props" /* PROPS */, key); + } + } + } + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (isFunction(methodHandler)) { + { + Object.defineProperty(ctx, key, { + value: methodHandler.bind(publicThis), + configurable: true, + enumerable: true, + writable: true + }); + } + { + checkDuplicateProperties("Methods" /* METHODS */, key); + } + } else { + warn$1( + `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` + ); + } + } + } + if (dataOptions) { + if (!isFunction(dataOptions)) { + warn$1( + `The data option must be a function. Plain object usage is no longer supported.` + ); + } + const data = dataOptions.call(publicThis, publicThis); + if (isPromise(data)) { + warn$1( + `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` + ); + } + if (!isObject(data)) { + warn$1(`data() should return an object.`); + } else { + instance.data = reactive(data); + { + for (const key in data) { + checkDuplicateProperties("Data" /* DATA */, key); + if (!isReservedPrefix(key[0])) { + Object.defineProperty(ctx, key, { + configurable: true, + enumerable: true, + get: () => data[key], + set: NOOP + }); + } + } + } + } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + if (get === NOOP) { + warn$1(`Computed property "${key}" has no getter.`); + } + const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => { + warn$1( + `Write operation failed: computed property "${key}" is readonly.` + ); + } ; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + { + checkDuplicateProperties("Computed" /* COMPUTED */, key); + } + } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook$1(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val + }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; + } + } + if (render && instance.render === NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) instance.components = components; + if (directives) instance.directives = directives; + if (serverPrefetch) { + markAsyncBoundary(instance); + } +} +function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { + if (isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); + } + if (isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; + } + { + checkDuplicateProperties("Inject" /* INJECT */, key); + } + } +} +function callHook$1(hook, instance, type) { + callWithAsyncErrorHandling( + isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); +} +function createWatcher(raw, ctx, publicThis, key) { + let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (isString(raw)) { + const handler = ctx[raw]; + if (isFunction(handler)) { + { + watch(getter, handler); + } + } else { + warn$1(`Invalid watch handler specified by key "${raw}"`, handler); + } + } else if (isFunction(raw)) { + { + watch(getter, raw.bind(publicThis)); + } + } else if (isObject(raw)) { + if (isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (isFunction(handler)) { + watch(getter, handler, raw); + } else { + warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); + } + } + } else { + warn$1(`Invalid watch option: "${key}"`, raw); + } +} +function resolveMergedOptions(instance) { + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; + } + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); + } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (isObject(base)) { + cache.set(base, resolved); + } + return resolved; +} +function mergeOptions(to, from, strats, asMixin = false) { + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") { + warn$1( + `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` + ); + } else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; + } + } + return to; +} +const internalOptionMergeStrats = { + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray$1, + created: mergeAsArray$1, + beforeMount: mergeAsArray$1, + mounted: mergeAsArray$1, + beforeUpdate: mergeAsArray$1, + updated: mergeAsArray$1, + beforeDestroy: mergeAsArray$1, + beforeUnmount: mergeAsArray$1, + destroyed: mergeAsArray$1, + unmounted: mergeAsArray$1, + activated: mergeAsArray$1, + deactivated: mergeAsArray$1, + errorCaptured: mergeAsArray$1, + serverPrefetch: mergeAsArray$1, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject +}; +function mergeDataFn(to, from) { + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (extend)( + isFunction(to) ? to.call(this, this) : to, + isFunction(from) ? from.call(this, this) : from + ); + }; +} +function mergeInject(to, from) { + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); +} +function normalizeInject(raw) { + if (isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; + } + return res; + } + return raw; +} +function mergeAsArray$1(to, from) { + return to ? [...new Set([].concat(to, from))] : from; +} +function mergeObjectOptions(to, from) { + return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; +} +function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (isArray(to) && isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } +} +function mergeWatchOptions(to, from) { + if (!to) return from; + if (!from) return to; + const merged = extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray$1(to[key], from[key]); + } + return merged; +} + +function createAppContext() { + return { + app: null, + config: { + isNativeTag: NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; +} +let uid$1 = 0; +function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!isFunction(rootComponent)) { + rootComponent = extend({}, rootComponent); + } + if (rootProps != null && !isObject(rootProps)) { + warn$1(`root props passed to app.mount() must be an object.`); + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + const pluginCleanupFns = []; + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + { + warn$1( + `app.config cannot be replaced. Modify individual options instead.` + ); + } + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) { + warn$1(`Plugin has already been applied to target app.`); + } else if (plugin && isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else { + warn$1( + `A plugin must either be a function or an object with an "install" function.` + ); + } + return app; + }, + mixin(mixin) { + { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } else { + warn$1( + "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") + ); + } + } + return app; + }, + component(name, component) { + { + validateComponentName(name, context.config); + } + if (!component) { + return context.components[name]; + } + if (context.components[name]) { + warn$1(`Component "${name}" has already been registered in target app.`); + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + { + validateDirectiveName(name); + } + if (!directive) { + return context.directives[name]; + } + if (context.directives[name]) { + warn$1(`Directive "${name}" has already been registered in target app.`); + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + if (rootContainer.__vue_app__) { + warn$1( + `There is already an app instance mounted on the host container. + If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` + ); + } + const vnode = app._ceVNode || createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + { + context.reload = () => { + render( + cloneVNode(vnode), + rootContainer, + namespace + ); + }; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + { + app._instance = vnode.component; + devtoolsInitApp(app, version); + } + return getComponentPublicInstance(vnode.component); + } else { + warn$1( + `App has already been mounted. +If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` + ); + } + }, + onUnmount(cleanupFn) { + if (typeof cleanupFn !== "function") { + warn$1( + `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}` + ); + } + pluginCleanupFns.push(cleanupFn); + }, + unmount() { + if (isMounted) { + callWithAsyncErrorHandling( + pluginCleanupFns, + app._instance, + 16 + ); + render(null, app._container); + { + app._instance = null; + devtoolsUnmountApp(app); + } + delete app._container.__vue_app__; + } else { + warn$1(`Cannot unmount an app that is not mounted.`); + } + }, + provide(key, value) { + if (key in context.provides) { + warn$1( + `App already provides property with key "${String(key)}". It will be overwritten with the new value.` + ); + } + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + const lastApp = currentApp; + currentApp = app; + try { + return fn(); + } finally { + currentApp = lastApp; + } + } + }; + return app; + }; +} +let currentApp = null; + +function provide(key, value) { + if (!currentInstance) { + { + warn$1(`provide() can only be used inside setup().`); + } + } else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); + } + provides[key] = value; + } +} +function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else { + warn$1(`injection "${String(key)}" not found.`); + } + } else { + warn$1(`inject() can only be used inside setup() or functional components.`); + } +} +function hasInjectionContext() { + return !!(currentInstance || currentRenderingInstance || currentApp); +} + +const internalObjectProto = {}; +const createInternalObject = () => Object.create(internalObjectProto); +const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; + +function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = createInternalObject(); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + { + validateProps(rawProps || {}, props, instance); + } + if (isStateful) { + instance.props = isSSR ? props : shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; +} +function isInHmrContext(instance) { + while (instance) { + if (instance.type.__hmrId) return true; + instance = instance.parent; + } +} +function updateProps(instance, rawProps, rawPrevProps, optimized) { + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( + // always force full diff in dev + // - #1942 if hmr is enabled with sfc component + // - vite#872 non-sfc component used by sfc component + !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; + } + const value = rawProps[key]; + if (options) { + if (hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; + } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; + } + } + } + } + if (hasAttrsChanged) { + trigger(instance.attrs, "set", ""); + } + { + validateProps(rawProps || {}, props, instance); + } +} +function setFullProps(instance, rawProps, props, attrs) { + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && hasOwn(options, camelKey = camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; + } + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + if (needCastKeys) { + const rawCurrentProps = toRaw(props); + const castValues = rawCastValues || EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; +} +function resolvePropValue(options, props, key, value, instance, isAbsent) { + const opt = options[key]; + if (opt != null) { + const hasDefault = hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); + } + } else { + value = defaultValue; + } + if (instance.ce) { + instance.ce._setProp(key, value); + } + } + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { + value = true; + } + } + } + return value; +} +const mixinPropsCache = /* @__PURE__ */ new WeakMap(); +function normalizePropsOptions(comp, appContext, asMixin = false) { + const cache = asMixin ? mixinPropsCache : appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (!isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + extend(normalized, props); + if (keys) needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); + } + if (comp.extends) { + extendProps(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendProps); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, EMPTY_ARR); + } + return EMPTY_ARR; + } + if (isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + if (!isString(raw[i])) { + warn$1(`props must be strings when using array syntax.`, raw[i]); + } + const normalizedKey = camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = EMPTY_OBJ; + } + } + } else if (raw) { + if (!isObject(raw)) { + warn$1(`invalid props options`, raw); + } + for (const key in raw) { + const normalizedKey = camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); + const propType = prop.type; + let shouldCast = false; + let shouldCastTrue = true; + if (isArray(propType)) { + for (let index = 0; index < propType.length; ++index) { + const type = propType[index]; + const typeName = isFunction(type) && type.name; + if (typeName === "Boolean") { + shouldCast = true; + break; + } else if (typeName === "String") { + shouldCastTrue = false; + } + } + } else { + shouldCast = isFunction(propType) && propType.name === "Boolean"; + } + prop[0 /* shouldCast */] = shouldCast; + prop[1 /* shouldCastTrue */] = shouldCastTrue; + if (shouldCast || hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + const res = [normalized, needCastKeys]; + if (isObject(comp)) { + cache.set(comp, res); + } + return res; +} +function validatePropName(key) { + if (key[0] !== "$" && !isReservedProp(key)) { + return true; + } else { + warn$1(`Invalid prop name: "${key}" is a reserved property.`); + } + return false; +} +function getType(ctor) { + if (ctor === null) { + return "null"; + } + if (typeof ctor === "function") { + return ctor.name || ""; + } else if (typeof ctor === "object") { + const name = ctor.constructor && ctor.constructor.name; + return name || ""; + } + return ""; +} +function validateProps(rawProps, props, instance) { + const resolvedValues = toRaw(props); + const options = instance.propsOptions[0]; + const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key)); + for (const key in options) { + let opt = options[key]; + if (opt == null) continue; + validateProp( + key, + resolvedValues[key], + opt, + shallowReadonly(resolvedValues) , + !camelizePropsKey.includes(key) + ); + } +} +function validateProp(name, value, prop, props, isAbsent) { + const { type, required, validator, skipCheck } = prop; + if (required && isAbsent) { + warn$1('Missing required prop: "' + name + '"'); + return; + } + if (value == null && !required) { + return; + } + if (type != null && type !== true && !skipCheck) { + let isValid = false; + const types = isArray(type) ? type : [type]; + const expectedTypes = []; + for (let i = 0; i < types.length && !isValid; i++) { + const { valid, expectedType } = assertType(value, types[i]); + expectedTypes.push(expectedType || ""); + isValid = valid; + } + if (!isValid) { + warn$1(getInvalidTypeMessage(name, value, expectedTypes)); + return; + } + } + if (validator && !validator(value, props)) { + warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + } +} +const isSimpleType = /* @__PURE__ */ makeMap( + "String,Number,Boolean,Function,Symbol,BigInt" +); +function assertType(value, type) { + let valid; + const expectedType = getType(type); + if (expectedType === "null") { + valid = value === null; + } else if (isSimpleType(expectedType)) { + const t = typeof value; + valid = t === expectedType.toLowerCase(); + if (!valid && t === "object") { + valid = value instanceof type; + } + } else if (expectedType === "Object") { + valid = isObject(value); + } else if (expectedType === "Array") { + valid = isArray(value); + } else { + valid = value instanceof type; + } + return { + valid, + expectedType + }; +} +function getInvalidTypeMessage(name, value, expectedTypes) { + if (expectedTypes.length === 0) { + return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; + } + let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; + const expectedType = expectedTypes[0]; + const receivedType = toRawType(value); + const expectedValue = styleValue(value, expectedType); + const receivedValue = styleValue(value, receivedType); + if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { + message += ` with value ${expectedValue}`; + } + message += `, got ${receivedType} `; + if (isExplicable(receivedType)) { + message += `with value ${receivedValue}.`; + } + return message; +} +function styleValue(value, type) { + if (type === "String") { + return `"${value}"`; + } else if (type === "Number") { + return `${Number(value)}`; + } else { + return `${value}`; + } +} +function isExplicable(type) { + const explicitTypes = ["string", "number", "boolean"]; + return explicitTypes.some((elem) => type.toLowerCase() === elem); +} +function isBoolean(...args) { + return args.some((elem) => elem.toLowerCase() === "boolean"); +} + +const isInternalKey = (key) => key[0] === "_" || key === "$stable"; +const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; +const normalizeSlot = (key, rawSlot, ctx) => { + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { + warn$1( + `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` + ); + } + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; +}; +const normalizeObjectSlots = (rawSlots, slots, instance) => { + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) continue; + const value = rawSlots[key]; + if (isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + { + warn$1( + `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; + } + } +}; +const normalizeVNodeSlots = (instance, children) => { + if (!isKeepAlive(instance.vnode) && true) { + warn$1( + `Non-function value encountered for default slot. Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; +}; +const assignSlots = (slots, children, optimized) => { + for (const key in children) { + if (optimized || key !== "_") { + slots[key] = children[key]; + } + } +}; +const initSlots = (instance, children, optimized) => { + const slots = instance.slots = createInternalObject(); + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + assignSlots(slots, children, optimized); + if (optimized) { + def(slots, "_", type, true); + } + } else { + normalizeObjectSlots(children, slots); + } + } else if (children) { + normalizeVNodeSlots(instance, children); + } +}; +const updateSlots = (instance, children, optimized) => { + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (isHmrUpdating) { + assignSlots(slots, children, optimized); + trigger(instance, "set", "$slots"); + } else if (optimized && type === 1) { + needDeletionCheck = false; + } else { + assignSlots(slots, children, optimized); + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); + } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } + } + } +}; + +let supported; +let perf; +function startMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + perf.mark(`vue-${type}-${instance.uid}`); + } + { + devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); + } +} +function endMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + const startTag = `vue-${type}-${instance.uid}`; + const endTag = startTag + `:end`; + perf.mark(endTag); + perf.measure( + `<${formatComponentName(instance, instance.type)}> ${type}`, + startTag, + endTag + ); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + } + { + devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); + } +} +function isSupported() { + if (supported !== void 0) { + return supported; + } + if (typeof window !== "undefined" && window.performance) { + supported = true; + perf = window.performance; + } else { + supported = false; + } + return supported; +} + +const queuePostRenderEffect = queueEffectWithSuspense ; +function createRenderer(options) { + return baseCreateRenderer(options); +} +function createHydrationRenderer(options) { + return baseCreateRenderer(options, createHydrationFunctions); +} +function baseCreateRenderer(options, createHydrationFns) { + const target = getGlobalThis(); + target.__VUE__ = true; + { + setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + } + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { + if (n1 === n2) { + return; + } + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: + if (n1 == null) { + mountStaticNode(n2, container, anchor, namespace); + } else { + patchStaticNode(n1, n2, container, namespace); + } + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else { + warn$1("Invalid VNode type:", type, `(${typeof type})`); + } + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const patchStaticNode = (n1, n2, container, namespace) => { + if (n2.children !== n1.children) { + const anchor = hostNextSibling(n1.anchor); + removeStaticNode(n1); + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace + ); + } else { + n2.el = n1.el; + n2.anchor = n1.anchor; + } + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !isReservedProp(key)) { + hostPatchProp(el, key, null, props[key], namespace, parentComponent); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + { + def(el, "__vnode", vnode, true); + def(el, "__vueParentComponent", parentComponent, true); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { + subTree = filterSingleRoot(subTree.children) || subTree; + } + if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + { + el.__vnode = n2; + } + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || EMPTY_OBJ; + const newProps = n2.props || EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (isHmrUpdating) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { + hostSetElementText(el, ""); + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + } + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); + } + } + } else if (!optimized && dynamicChildren == null) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== EMPTY_OBJ) { + for (const key in oldProps) { + if (!isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + parentComponent + ); + } + } + } + for (const key in newProps) { + if (isReservedProp(key)) continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if ( + // #5523 dev root fragment may inherit directives + isHmrUpdating || patchFlag & 2048 + ) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance( + initialVNode, + parentComponent, + parentSuspense + )); + if (instance.type.__hmrId) { + registerHMR(instance); + } + { + pushWarningContext(initialVNode); + startMeasure(instance, `mount`); + } + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } + { + { + startMeasure(instance, `init`); + } + setupComponent(instance, false, optimized); + { + endMeasure(instance, `init`); + } + } + if (instance.asyncDep) { + if (isHmrUpdating) initialVNode.el = null; + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); + } + { + popWarningContext(); + endMeasure(instance, `mount`); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + { + pushWarningContext(n2); + } + updateComponentPreRender(instance, n2, optimized); + { + popWarningContext(); + } + return; + } else { + instance.next = n2; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { + let vnodeHook; + const { el, props } = initialVNode; + const { bm, m, parent, root, type } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + invokeArrayFns(bm); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); + } + toggleRecurse(instance, true); + if (el && hydrateNode) { + const hydrateSubTree = () => { + { + startMeasure(instance, `render`); + } + instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `hydrate`); + } + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + { + endMeasure(instance, `hydrate`); + } + }; + if (isAsyncWrapperVNode && type.__asyncHydrate) { + type.__asyncHydrate( + el, + instance, + hydrateSubTree + ); + } else { + hydrateSubTree(); + } + } else { + if (root.ce) { + root.ce._injectChildStyle(type); + } + { + startMeasure(instance, `render`); + } + const subTree = instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `patch`); + } + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + initialVNode.el = subTree.el; + } + if (m) { + queuePostRenderEffect(m, parentSuspense); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); + } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); + } + instance.isMounted = true; + { + devtoolsComponentAdded(instance); + } + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); + return; + } + } + let originNext = next; + let vnodeHook; + { + pushWarningContext(next || instance.vnode); + } + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; + } + if (bu) { + invokeArrayFns(bu); + } + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); + } + toggleRecurse(instance, true); + { + startMeasure(instance, `render`); + } + const nextTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + const prevTree = instance.subTree; + instance.subTree = nextTree; + { + startMeasure(instance, `patch`); + } + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); + } + if (u) { + queuePostRenderEffect(u, parentSuspense); + } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); + } + { + devtoolsComponentUpdated(instance); + } + { + popWarningContext(); + } + } + }; + instance.scope.on(); + const effect = instance.effect = new ReactiveEffect(componentUpdateFn); + instance.scope.off(); + const update = instance.update = effect.run.bind(effect); + const job = instance.job = effect.runIfDirty.bind(effect); + job.i = instance; + job.id = instance.uid; + effect.scheduler = () => queueJob(job); + toggleRecurse(instance, true); + { + effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; + effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; + } + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + pauseTracking(); + flushPreFlushCbs(instance); + resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || EMPTY_ARR; + c2 = c2 || EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (nextChild.key != null) { + if (keyToNewIndexMap.has(nextChild.key)) { + warn$1( + `Duplicate keys found during update:`, + JSON.stringify(nextChild.key), + `Make sure keys are unique.` + ); + } + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs, + cacheIndex + } = vnode; + if (patchFlag === -2) { + optimized = false; + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (cacheIndex != null) { + parentComponent.renderCache[cacheIndex] = void 0; + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + internals, + doRemove + ); + } else if (dynamicChildren && // #5154 + // when v-once is used inside a block, setBlockTracking(-1) marks the + // parent block with hasOnce: true + // so that it doesn't take the fast path during unmount - otherwise + // components nested in v-once are never unmounted. + !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { + vnode.children.forEach((child) => { + if (child.type === Comment) { + hostRemove(child.el); + } else { + remove(child); + } + }); + } else { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } + }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + if (instance.type.__hmrId) { + unregisterHMR(instance); + } + const { bum, scope, job, subTree, um, m, a } = instance; + invalidateMount(m); + invalidateMount(a); + if (bum) { + invokeArrayFns(bum); + } + scope.stop(); + if (job) { + job.flags |= 8; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + { + devtoolsComponentRemoved(instance); + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + const el = hostNextSibling(vnode.anchor || vnode.el); + const teleportEnd = el && el[TeleportEndKey]; + return teleportEnd ? hostNextSibling(teleportEnd) : el; + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + container._vnode = vnode; + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + if (createHydrationFns) { + [hydrate, hydrateNode] = createHydrationFns( + internals + ); + } + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; +} +function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; +} +function toggleRecurse({ effect, job }, allowed) { + if (allowed) { + effect.flags |= 32; + job.flags |= 4; + } else { + effect.flags &= ~32; + job.flags &= ~4; + } +} +function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; +} +function traverseStaticChildren(n1, n2, shallow = false) { + const ch1 = n1.children; + const ch2 = n2.children; + if (isArray(ch1) && isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; + } + if (!shallow && c2.patchFlag !== -2) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } + if (c2.type === Comment && !c2.el) { + c2.el = c1.el; + } + } + } +} +function getSequence(arr) { + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; + } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } + } + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; +} +function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); + } + } +} +function invalidateMount(hooks) { + if (hooks) { + for (let i = 0; i < hooks.length; i++) + hooks[i].flags |= 8; + } +} + +const ssrContextKey = Symbol.for("v-scx"); +const useSSRContext = () => { + { + const ctx = inject(ssrContextKey); + if (!ctx) { + warn$1( + `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` + ); + } + return ctx; + } +}; + +function watchEffect(effect, options) { + return doWatch(effect, null, options); +} +function watchPostEffect(effect, options) { + return doWatch( + effect, + null, + extend({}, options, { flush: "post" }) + ); +} +function watchSyncEffect(effect, options) { + return doWatch( + effect, + null, + extend({}, options, { flush: "sync" }) + ); +} +function watch(source, cb, options) { + if (!isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); +} +function doWatch(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, flush, once } = options; + if (!cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + } + const baseWatchOptions = extend({}, options); + baseWatchOptions.onWarn = warn$1; + const runsImmediately = cb && immediate || !cb && flush !== "post"; + let ssrCleanup; + if (isInSSRComponentSetup) { + if (flush === "sync") { + const ctx = useSSRContext(); + ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); + } else if (!runsImmediately) { + const watchStopHandle = () => { + }; + watchStopHandle.stop = NOOP; + watchStopHandle.resume = NOOP; + watchStopHandle.pause = NOOP; + return watchStopHandle; + } + } + const instance = currentInstance; + baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args); + let isPre = false; + if (flush === "post") { + baseWatchOptions.scheduler = (job) => { + queuePostRenderEffect(job, instance && instance.suspense); + }; + } else if (flush !== "sync") { + isPre = true; + baseWatchOptions.scheduler = (job, isFirstRun) => { + if (isFirstRun) { + job(); + } else { + queueJob(job); + } + }; + } + baseWatchOptions.augmentJob = (job) => { + if (cb) { + job.flags |= 4; + } + if (isPre) { + job.flags |= 2; + if (instance) { + job.id = instance.uid; + job.i = instance; + } + } + }; + const watchHandle = watch$1(source, cb, baseWatchOptions); + if (isInSSRComponentSetup) { + if (ssrCleanup) { + ssrCleanup.push(watchHandle); + } else if (runsImmediately) { + watchHandle(); + } + } + return watchHandle; +} +function instanceWatch(source, value, options) { + const publicThis = this.proxy; + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; +} +function createPathGetter(ctx, path) { + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; +} + +function useModel(props, name, options = EMPTY_OBJ) { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useModel() called without active instance.`); + return ref(); + } + const camelizedName = camelize(name); + if (!i.propsOptions[0][camelizedName]) { + warn$1(`useModel() called with prop "${name}" which is not declared.`); + return ref(); + } + const hyphenatedName = hyphenate(name); + const modifiers = getModelModifiers(props, camelizedName); + const res = customRef((track, trigger) => { + let localValue; + let prevSetValue = EMPTY_OBJ; + let prevEmittedValue; + watchSyncEffect(() => { + const propValue = props[camelizedName]; + if (hasChanged(localValue, propValue)) { + localValue = propValue; + trigger(); + } + }); + return { + get() { + track(); + return options.get ? options.get(localValue) : localValue; + }, + set(value) { + const emittedValue = options.set ? options.set(value) : value; + if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) { + return; + } + const rawProps = i.vnode.props; + if (!(rawProps && // check if parent has passed v-model + (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) { + localValue = value; + trigger(); + } + i.emit(`update:${name}`, emittedValue); + if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) { + trigger(); + } + prevSetValue = value; + prevEmittedValue = emittedValue; + } + }; + }); + res[Symbol.iterator] = () => { + let i2 = 0; + return { + next() { + if (i2 < 2) { + return { value: i2++ ? modifiers || EMPTY_OBJ : res, done: false }; + } else { + return { done: true }; + } + } + }; + }; + return res; +} +const getModelModifiers = (props, modelName) => { + return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`]; +}; + +function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) return; + const props = instance.vnode.props || EMPTY_OBJ; + { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.` + ); + } + } else { + const validator = emitsOptions[event]; + if (isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } + } + } + } + } + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modifiers = isModelListener && getModelModifiers(props, event.slice(7)); + if (modifiers) { + if (modifiers.trim) { + args = rawArgs.map((a) => isString(a) ? a.trim() : a); + } + if (modifiers.number) { + args = rawArgs.map(looseToNumber); + } + } + { + devtoolsComponentEmit(instance, event, args); + } + { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( + event + )}" instead of "${event}".` + ); + } + } + let handlerName; + let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; + } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } +} +function normalizeEmitsOptions(comp, appContext, asMixin = false) { + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (!isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); + } + if (comp.extends) { + extendEmits(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendEmits); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); + } + return null; + } + if (isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { + cache.set(comp, normalized); + } + return normalized; +} +function isEmitListener(options, key) { + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); +} + +let accessedAttrs = false; +function markAttrsAccessed() { + accessedAttrs = true; +} +function renderComponentRoot(instance) { + const { + type: Component, + vnode, + proxy, + withProxy, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + props, + data, + setupState, + ctx, + inheritAttrs + } = instance; + const prev = setCurrentRenderingInstance(instance); + let result; + let fallthroughAttrs; + { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); + } + }) : proxyToUse; + result = normalizeVNode( + render.call( + thisProxy, + proxyToUse, + renderCache, + true ? shallowReadonly(props) : props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode( + render2.length > 1 ? render2( + true ? shallowReadonly(props) : props, + true ? { + get attrs() { + markAttrsAccessed(); + return shallowReadonly(attrs); + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + true ? shallowReadonly(props) : props, + null + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs, false, true); + } else if (!accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (isOn(key)) { + if (!isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); + } + } else { + extraAttrs.push(key); + } + } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.` + ); + } + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); + } + } + } + } + if (vnode.dirs) { + if (!isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); + } + root = cloneVNode(root, null, false, true); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!isElementRoot(root)) { + warn$1( + `Component inside <Transition> renders non-element root node that cannot be animated.` + ); + } + setTransitionHooks(root, vnode.transition); + } + if (setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance(prev); + return result; +} +const getChildRoot = (vnode) => { + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } + } + }; + return [normalizeVNode(childRoot), setRoot]; +}; +function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } + } + } + } else { + return; + } + } + return singleRoot; +} +const getFunctionalFallthrough = (attrs) => { + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || isOn(key)) { + (res || (res = {}))[key] = attrs[key]; + } + } + return res; +}; +const filterModelListeners = (attrs, props) => { + const res = {}; + for (const key in attrs) { + if (!isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; + } + } + return res; +}; +const isElementRoot = (vnode) => { + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; +}; +function shouldUpdateComponent(prevVNode, nextVNode, optimized) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if ((prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { + return true; + } + } + if (prevProps === nextProps) { + return false; + } + if (!prevProps) { + return !!nextProps; + } + if (!nextProps) { + return true; + } + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; +} +function hasPropsChanged(prevProps, nextProps, emitsOptions) { + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; + } + } + return false; +} +function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; + } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } +} + +const isSuspense = (type) => type.__isSuspense; +let suspenseId = 0; +const SuspenseImpl = { + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { + n2.suspense = n1.suspense; + n2.suspense.vnode = n2; + n2.el = n1.el; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + normalize: normalizeSuspenseChildren +}; +const Suspense = SuspenseImpl ; +function triggerEvent(vnode, name) { + const eventListener = vnode.props && vnode.props[name]; + if (isFunction(eventListener)) { + eventListener(); + } +} +function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } +} +function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } + } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); + } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); + } + } + } + } +} +let hasWarned = false; +function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + if (!hasWarned) { + hasWarned = true; + console[console.info ? "info" : "log"]( + `<Suspense> is an experimental feature and its API will likely change.` + ); + } + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; + } + } + const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; + { + assertNumber(timeout, `Suspense timeout`); + } + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + { + if (!resume && !suspense.pendingBranch) { + throw new Error( + `suspense.resolve() is called without a pending branch.` + ); + } + if (suspense.isUnmounted) { + throw new Error( + `suspense.resolve() is called on an already unmounted suspense boundary.` + ); + } + } + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) === container2) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect, optimized2) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + { + pushWarningContext(vnode2); + } + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized2 + ); + if (placeholder) { + remove(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + { + popWarningContext(); + } + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + } + }; + return suspense; +} +function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; +} +function normalizeSuspenseChildren(vnode) { + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); +} +function normalizeSuspenseSlot(s) { + let block; + if (isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); + } + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); + } + } + if (isArray(s)) { + const singleChild = filterSingleRoot(s); + if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { + warn$1(`<Suspense> slots expect a single root node.`); + } + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; +} +function queueEffectWithSuspense(fn, suspense) { + if (suspense && suspense.pendingBranch) { + if (isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); + } + } else { + queuePostFlushCb(fn); + } +} +function setActiveBranch(suspense, branch) { + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } +} +function isVNodeSuspensible(vnode) { + const suspensible = vnode.props && vnode.props.suspensible; + return suspensible != null && suspensible !== false; +} + +const Fragment = Symbol.for("v-fgt"); +const Text = Symbol.for("v-txt"); +const Comment = Symbol.for("v-cmt"); +const Static = Symbol.for("v-stc"); +const blockStack = []; +let currentBlock = null; +function openBlock(disableTracking = false) { + blockStack.push(currentBlock = disableTracking ? null : []); +} +function closeBlock() { + blockStack.pop(); + currentBlock = blockStack[blockStack.length - 1] || null; +} +let isBlockTreeEnabled = 1; +function setBlockTracking(value, inVOnce = false) { + isBlockTreeEnabled += value; + if (value < 0 && currentBlock && inVOnce) { + currentBlock.hasOnce = true; + } +} +function setupBlock(vnode) { + vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; + closeBlock(); + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(vnode); + } + return vnode; +} +function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { + return setupBlock( + createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + true + ) + ); +} +function createBlock(type, props, children, patchFlag, dynamicProps) { + return setupBlock( + createVNode( + type, + props, + children, + patchFlag, + dynamicProps, + true + ) + ); +} +function isVNode(value) { + return value ? value.__v_isVNode === true : false; +} +function isSameVNodeType(n1, n2) { + if (n2.shapeFlag & 6 && n1.component) { + const dirtyInstances = hmrDirtyComponents.get(n2.type); + if (dirtyInstances && dirtyInstances.has(n1.component)) { + n1.shapeFlag &= ~256; + n2.shapeFlag &= ~512; + return false; + } + } + return n1.type === n2.type && n1.key === n2.key; +} +let vnodeArgsTransformer; +function transformVNodeArgs(transformer) { + vnodeArgsTransformer = transformer; +} +const createVNodeWithArgsTransform = (...args) => { + return _createVNode( + ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args + ); +}; +const normalizeKey = ({ key }) => key != null ? key : null; +const normalizeRef = ({ + ref, + ref_key, + ref_for +}) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; +}; +function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetStart: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); + } + } else if (children) { + vnode.shapeFlag |= isString(children) ? 8 : 16; + } + if (vnode.key !== vnode.key) { + warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; +} +const createVNode = createVNodeWithArgsTransform ; +function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { + if (!type || type === NULL_DYNAMIC_COMPONENT) { + if (!type) { + warn$1(`Invalid vnode type when creating vnode: ${type}.`); + } + type = Comment; + } + if (isVNode(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); + } + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } + } + cloned.patchFlag = -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (isObject(style)) { + if (isProxy(style) && !isArray(style)) { + style = extend({}, style); + } + props.style = normalizeStyle(style); + } + } + const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; + if (shapeFlag & 4 && isProxy(type)) { + type = toRaw(type); + warn$1( + `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, + ` +Component that was made reactive: `, + type + ); + } + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); +} +function guardReactiveProps(props) { + if (!props) return null; + return isProxy(props) || isInternalObject(props) ? extend({}, props) : props; +} +function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) { + const { props, ref, patchFlag, children, transition } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, + target: vnode.target, + targetStart: vnode.targetStart, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + if (transition && cloneTransition) { + setTransitionHooks( + cloned, + transition.clone(cloned) + ); + } + return cloned; +} +function deepCloneVNode(vnode) { + const cloned = cloneVNode(vnode); + if (isArray(vnode.children)) { + cloned.children = vnode.children.map(deepCloneVNode); + } + return cloned; +} +function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); +} +function createStaticVNode(content, numberOfNodes) { + const vnode = createVNode(Static, null, content); + vnode.staticCount = numberOfNodes; + return vnode; +} +function createCommentVNode(text = "", asBlock = false) { + return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); +} +function normalizeVNode(child) { + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (isVNode(child)) { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } +} +function cloneIfMounted(child) { + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); +} +function normalizeChildren(vnode, children) { + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !isInternalObject(children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; + } + } + } + } else if (isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; + } + } + vnode.children = children; + vnode.shapeFlag |= type; +} +function mergeProps(...args) { + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = normalizeClass([ret.class, toMerge.class]); + } + } else if (key === "style") { + ret.style = normalizeStyle([ret.style, toMerge.style]); + } else if (isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } + } + } + return ret; +} +function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); +} + +const emptyAppContext = createAppContext(); +let uid = 0; +function createComponentInstance(vnode, parent, suspense) { + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + job: null, + scope: new EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + ids: parent ? parent.ids : ["", 0, 0], + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: EMPTY_OBJ, + data: EMPTY_OBJ, + props: EMPTY_OBJ, + attrs: EMPTY_OBJ, + slots: EMPTY_OBJ, + refs: EMPTY_OBJ, + setupState: EMPTY_OBJ, + setupContext: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + { + instance.ctx = createDevRenderContext(instance); + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; +} +let currentInstance = null; +const getCurrentInstance = () => currentInstance || currentRenderingInstance; +let internalSetCurrentInstance; +let setInSSRSetupState; +{ + const g = getGlobalThis(); + const registerGlobalSetter = (key, setter) => { + let setters; + if (!(setters = g[key])) setters = g[key] = []; + setters.push(setter); + return (v) => { + if (setters.length > 1) setters.forEach((set) => set(v)); + else setters[0](v); + }; + }; + internalSetCurrentInstance = registerGlobalSetter( + `__VUE_INSTANCE_SETTERS__`, + (v) => currentInstance = v + ); + setInSSRSetupState = registerGlobalSetter( + `__VUE_SSR_SETTERS__`, + (v) => isInSSRComponentSetup = v + ); +} +const setCurrentInstance = (instance) => { + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; +}; +const unsetCurrentInstance = () => { + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); +}; +const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); +function validateComponentName(name, { isNativeTag }) { + if (isBuiltInTag(name) || isNativeTag(name)) { + warn$1( + "Do not use built-in or reserved HTML elements as component id: " + name + ); + } +} +function isStatefulComponent(instance) { + return instance.vnode.shapeFlag & 4; +} +let isInSSRComponentSetup = false; +function setupComponent(instance, isSSR = false, optimized = false) { + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children, optimized); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; +} +function setupStatefulComponent(instance, isSSR) { + var _a; + const Component = instance.type; + { + if (Component.name) { + validateComponentName(Component.name, instance.appContext.config); + } + if (Component.components) { + const names = Object.keys(Component.components); + for (let i = 0; i < names.length; i++) { + validateComponentName(names[i], instance.appContext.config); + } + } + if (Component.directives) { + const names = Object.keys(Component.directives); + for (let i = 0; i < names.length; i++) { + validateDirectiveName(names[i]); + } + } + if (Component.compilerOptions && isRuntimeOnly()) { + warn$1( + `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` + ); + } + } + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers); + { + exposePropsOnRenderContext(instance); + } + const { setup } = Component; + if (setup) { + pauseTracking(); + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + shallowReadonly(instance.props) , + setupContext + ] + ); + const isAsyncSetup = isPromise(setupResult); + resetTracking(); + reset(); + if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) { + markAsyncBoundary(instance); + } + if (isAsyncSetup) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + if (!instance.suspense) { + const name = (_a = Component.name) != null ? _a : "Anonymous"; + warn$1( + `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` + ); + } + } + } else { + handleSetupResult(instance, setupResult, isSSR); + } + } else { + finishComponentSetup(instance, isSSR); + } +} +function handleSetupResult(instance, setupResult, isSSR) { + if (isFunction(setupResult)) { + if (instance.type.__ssrInlineRender) { + instance.ssrRender = setupResult; + } else { + instance.render = setupResult; + } + } else if (isObject(setupResult)) { + if (isVNode(setupResult)) { + warn$1( + `setup() should not return VNodes directly - return a render function instead.` + ); + } + { + instance.devtoolsRawSetupState = setupResult; + } + instance.setupState = proxyRefs(setupResult); + { + exposeSetupStateOnRenderContext(instance); + } + } else if (setupResult !== void 0) { + warn$1( + `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` + ); + } + finishComponentSetup(instance, isSSR); +} +let compile$1; +let installWithProxy; +function registerRuntimeCompiler(_compile) { + compile$1 = _compile; + installWithProxy = (i) => { + if (i.render._rc) { + i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); + } + }; +} +const isRuntimeOnly = () => !compile$1; +function finishComponentSetup(instance, isSSR, skipOptions) { + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile$1 && !Component.render) { + const template = Component.template || resolveMergedOptions(instance).template; + if (template) { + { + startMeasure(instance, `compile`); + } + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = extend( + extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions + ); + Component.render = compile$1(template, finalCompilerOptions); + { + endMeasure(instance, `compile`); + } + } + } + instance.render = Component.render || NOOP; + if (installWithProxy) { + installWithProxy(instance); + } + } + { + const reset = setCurrentInstance(instance); + pauseTracking(); + try { + applyOptions(instance); + } finally { + resetTracking(); + reset(); + } + } + if (!Component.render && instance.render === NOOP && !isSSR) { + if (!compile$1 && Component.template) { + warn$1( + `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.esm-browser.js" instead.` ) + ); + } else { + warn$1(`Component is missing template or render function: `, Component); + } + } +} +const attrsProxyHandlers = { + get(target, key) { + markAttrsAccessed(); + track(target, "get", ""); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } +} ; +function getSlotsProxy(instance) { + return new Proxy(instance.slots, { + get(target, key) { + track(instance, "get", "$slots"); + return target[key]; + } + }); +} +function createSetupContext(instance) { + const expose = (exposed) => { + { + if (instance.exposed) { + warn$1(`expose() should be called only once per setup().`); + } + if (exposed != null) { + let exposedType = typeof exposed; + if (exposedType === "object") { + if (isArray(exposed)) { + exposedType = "array"; + } else if (isRef(exposed)) { + exposedType = "ref"; + } + } + if (exposedType !== "object") { + warn$1( + `expose() should be passed a plain object, received ${exposedType}.` + ); + } + } + } + instance.exposed = exposed || {}; + }; + { + let attrsProxy; + let slotsProxy; + return Object.freeze({ + get attrs() { + return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers)); + }, + get slots() { + return slotsProxy || (slotsProxy = getSlotsProxy(instance)); + }, + get emit() { + return (event, ...args) => instance.emit(event, ...args); + }, + expose + }); + } +} +function getComponentPublicInstance(instance) { + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); + } + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } else { + return instance.proxy; + } +} +const classifyRE = /(?:^|[-_])(\w)/g; +const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); +function getComponentName(Component, includeInferred = true) { + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; +} +function formatComponentName(instance, Component, isRoot = false) { + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; + } + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; +} +function isClassComponent(value) { + return isFunction(value) && "__vccOpts" in value; +} + +const computed = (getterOrOptions, debugOptions) => { + const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); + { + const i = getCurrentInstance(); + if (i && i.appContext.config.warnRecursiveComputed) { + c._warnRecursive = true; + } + } + return c; +}; + +function h(type, propsOrChildren, children) { + const l = arguments.length; + if (l === 2) { + if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { + if (isVNode(propsOrChildren)) { + return createVNode(type, null, [propsOrChildren]); + } + return createVNode(type, propsOrChildren); + } else { + return createVNode(type, null, propsOrChildren); + } + } else { + if (l > 3) { + children = Array.prototype.slice.call(arguments, 2); + } else if (l === 3 && isVNode(children)) { + children = [children]; + } + return createVNode(type, propsOrChildren, children); + } +} + +function initCustomFormatter() { + if (typeof window === "undefined") { + return; + } + const vueStyle = { style: "color:#3ba776" }; + const numberStyle = { style: "color:#1677ff" }; + const stringStyle = { style: "color:#f5222d" }; + const keywordStyle = { style: "color:#eb2f96" }; + const formatter = { + __vue_custom_formatter: true, + header(obj) { + if (!isObject(obj)) { + return null; + } + if (obj.__isVue) { + return ["div", vueStyle, `VueInstance`]; + } else if (isRef(obj)) { + return [ + "div", + {}, + ["span", vueStyle, genRefFlag(obj)], + "<", + // avoid debugger accessing value affecting behavior + formatValue("_value" in obj ? obj._value : obj), + `>` + ]; + } else if (isReactive(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"], + "<", + formatValue(obj), + `>${isReadonly(obj) ? ` (readonly)` : ``}` + ]; + } else if (isReadonly(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"], + "<", + formatValue(obj), + ">" + ]; + } + return null; + }, + hasBody(obj) { + return obj && obj.__isVue; + }, + body(obj) { + if (obj && obj.__isVue) { + return [ + "div", + {}, + ...formatInstance(obj.$) + ]; + } + } + }; + function formatInstance(instance) { + const blocks = []; + if (instance.type.props && instance.props) { + blocks.push(createInstanceBlock("props", toRaw(instance.props))); + } + if (instance.setupState !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("setup", instance.setupState)); + } + if (instance.data !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("data", toRaw(instance.data))); + } + const computed = extractKeys(instance, "computed"); + if (computed) { + blocks.push(createInstanceBlock("computed", computed)); + } + const injected = extractKeys(instance, "inject"); + if (injected) { + blocks.push(createInstanceBlock("injected", injected)); + } + blocks.push([ + "div", + {}, + [ + "span", + { + style: keywordStyle.style + ";opacity:0.66" + }, + "$ (internal): " + ], + ["object", { object: instance }] + ]); + return blocks; + } + function createInstanceBlock(type, target) { + target = extend({}, target); + if (!Object.keys(target).length) { + return ["span", {}]; + } + return [ + "div", + { style: "line-height:1.25em;margin-bottom:0.6em" }, + [ + "div", + { + style: "color:#476582" + }, + type + ], + [ + "div", + { + style: "padding-left:1.25em" + }, + ...Object.keys(target).map((key) => { + return [ + "div", + {}, + ["span", keywordStyle, key + ": "], + formatValue(target[key], false) + ]; + }) + ] + ]; + } + function formatValue(v, asRaw = true) { + if (typeof v === "number") { + return ["span", numberStyle, v]; + } else if (typeof v === "string") { + return ["span", stringStyle, JSON.stringify(v)]; + } else if (typeof v === "boolean") { + return ["span", keywordStyle, v]; + } else if (isObject(v)) { + return ["object", { object: asRaw ? toRaw(v) : v }]; + } else { + return ["span", stringStyle, String(v)]; + } + } + function extractKeys(instance, type) { + const Comp = instance.type; + if (isFunction(Comp)) { + return; + } + const extracted = {}; + for (const key in instance.ctx) { + if (isKeyOfType(Comp, key, type)) { + extracted[key] = instance.ctx[key]; + } + } + return extracted; + } + function isKeyOfType(Comp, key, type) { + const opts = Comp[type]; + if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) { + return true; + } + if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { + return true; + } + if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { + return true; + } + } + function genRefFlag(v) { + if (isShallow(v)) { + return `ShallowRef`; + } + if (v.effect) { + return `ComputedRef`; + } + return `Ref`; + } + if (window.devtoolsFormatters) { + window.devtoolsFormatters.push(formatter); + } else { + window.devtoolsFormatters = [formatter]; + } +} + +function withMemo(memo, render, cache, index) { + const cached = cache[index]; + if (cached && isMemoSame(cached, memo)) { + return cached; + } + const ret = render(); + ret.memo = memo.slice(); + ret.cacheIndex = index; + return cache[index] = ret; +} +function isMemoSame(cached, memo) { + const prev = cached.memo; + if (prev.length != memo.length) { + return false; + } + for (let i = 0; i < prev.length; i++) { + if (hasChanged(prev[i], memo[i])) { + return false; + } + } + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(cached); + } + return true; +} + +const version = "3.5.13"; +const warn = warn$1 ; +const ErrorTypeStrings = ErrorTypeStrings$1 ; +const devtools = devtools$1 ; +const setDevtoolsHook = setDevtoolsHook$1 ; +const _ssrUtils = { + createComponentInstance, + setupComponent, + renderComponentRoot, + setCurrentRenderingInstance, + isVNode: isVNode, + normalizeVNode, + getComponentPublicInstance, + ensureValidVNode, + pushWarningContext, + popWarningContext +}; +const ssrUtils = _ssrUtils ; +const resolveFilter = null; +const compatUtils = null; +const DeprecationTypes = null; + +let policy = void 0; +const tt = typeof window !== "undefined" && window.trustedTypes; +if (tt) { + try { + policy = /* @__PURE__ */ tt.createPolicy("vue", { + createHTML: (val) => val + }); + } catch (e) { + warn(`Error creating trusted types policy: ${e}`); + } +} +const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val; +const svgNS = "http://www.w3.org/2000/svg"; +const mathmlNS = "http://www.w3.org/1998/Math/MathML"; +const doc = typeof document !== "undefined" ? document : null; +const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); +const nodeOps = { + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); + } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) break; + } + } else { + templateContainer.innerHTML = unsafeToTrustedHTML( + namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content + ); + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } +}; + +const TRANSITION$1 = "transition"; +const ANIMATION = "animation"; +const vtcKey = Symbol("_vtc"); +const DOMTransitionPropsValidators = { + name: String, + type: String, + css: { + type: Boolean, + default: true + }, + duration: [String, Number, Object], + enterFromClass: String, + enterActiveClass: String, + enterToClass: String, + appearFromClass: String, + appearActiveClass: String, + appearToClass: String, + leaveFromClass: String, + leaveActiveClass: String, + leaveToClass: String +}; +const TransitionPropsValidators = /* @__PURE__ */ extend( + {}, + BaseTransitionPropsValidators, + DOMTransitionPropsValidators +); +const decorate$1 = (t) => { + t.displayName = "Transition"; + t.props = TransitionPropsValidators; + return t; +}; +const Transition = /* @__PURE__ */ decorate$1( + (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots) +); +const callHook = (hook, args = []) => { + if (isArray(hook)) { + hook.forEach((h2) => h2(...args)); + } else if (hook) { + hook(...args); + } +}; +const hasExplicitCallback = (hook) => { + return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; +}; +function resolveTransitionProps(rawProps) { + const baseProps = {}; + for (const key in rawProps) { + if (!(key in DOMTransitionPropsValidators)) { + baseProps[key] = rawProps[key]; + } + } + if (rawProps.css === false) { + return baseProps; + } + const { + name = "v", + type, + duration, + enterFromClass = `${name}-enter-from`, + enterActiveClass = `${name}-enter-active`, + enterToClass = `${name}-enter-to`, + appearFromClass = enterFromClass, + appearActiveClass = enterActiveClass, + appearToClass = enterToClass, + leaveFromClass = `${name}-leave-from`, + leaveActiveClass = `${name}-leave-active`, + leaveToClass = `${name}-leave-to` + } = rawProps; + const durations = normalizeDuration(duration); + const enterDuration = durations && durations[0]; + const leaveDuration = durations && durations[1]; + const { + onBeforeEnter, + onEnter, + onEnterCancelled, + onLeave, + onLeaveCancelled, + onBeforeAppear = onBeforeEnter, + onAppear = onEnter, + onAppearCancelled = onEnterCancelled + } = baseProps; + const finishEnter = (el, isAppear, done, isCancelled) => { + el._enterCancelled = isCancelled; + removeTransitionClass(el, isAppear ? appearToClass : enterToClass); + removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); + done && done(); + }; + const finishLeave = (el, done) => { + el._isLeaving = false; + removeTransitionClass(el, leaveFromClass); + removeTransitionClass(el, leaveToClass); + removeTransitionClass(el, leaveActiveClass); + done && done(); + }; + const makeEnterHook = (isAppear) => { + return (el, done) => { + const hook = isAppear ? onAppear : onEnter; + const resolve = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve]); + nextFrame(() => { + removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); + addTransitionClass(el, isAppear ? appearToClass : enterToClass); + if (!hasExplicitCallback(hook)) { + whenTransitionEnds(el, type, enterDuration, resolve); + } + }); + }; + }; + return extend(baseProps, { + onBeforeEnter(el) { + callHook(onBeforeEnter, [el]); + addTransitionClass(el, enterFromClass); + addTransitionClass(el, enterActiveClass); + }, + onBeforeAppear(el) { + callHook(onBeforeAppear, [el]); + addTransitionClass(el, appearFromClass); + addTransitionClass(el, appearActiveClass); + }, + onEnter: makeEnterHook(false), + onAppear: makeEnterHook(true), + onLeave(el, done) { + el._isLeaving = true; + const resolve = () => finishLeave(el, done); + addTransitionClass(el, leaveFromClass); + if (!el._enterCancelled) { + forceReflow(); + addTransitionClass(el, leaveActiveClass); + } else { + addTransitionClass(el, leaveActiveClass); + forceReflow(); + } + nextFrame(() => { + if (!el._isLeaving) { + return; + } + removeTransitionClass(el, leaveFromClass); + addTransitionClass(el, leaveToClass); + if (!hasExplicitCallback(onLeave)) { + whenTransitionEnds(el, type, leaveDuration, resolve); + } + }); + callHook(onLeave, [el, resolve]); + }, + onEnterCancelled(el) { + finishEnter(el, false, void 0, true); + callHook(onEnterCancelled, [el]); + }, + onAppearCancelled(el) { + finishEnter(el, true, void 0, true); + callHook(onAppearCancelled, [el]); + }, + onLeaveCancelled(el) { + finishLeave(el); + callHook(onLeaveCancelled, [el]); + } + }); +} +function normalizeDuration(duration) { + if (duration == null) { + return null; + } else if (isObject(duration)) { + return [NumberOf(duration.enter), NumberOf(duration.leave)]; + } else { + const n = NumberOf(duration); + return [n, n]; + } +} +function NumberOf(val) { + const res = toNumber(val); + { + assertNumber(res, "<transition> explicit duration"); + } + return res; +} +function addTransitionClass(el, cls) { + cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); + (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); +} +function removeTransitionClass(el, cls) { + cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.delete(cls); + if (!_vtc.size) { + el[vtcKey] = void 0; + } + } +} +function nextFrame(cb) { + requestAnimationFrame(() => { + requestAnimationFrame(cb); + }); +} +let endId = 0; +function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { + const id = el._endId = ++endId; + const resolveIfNotStale = () => { + if (id === el._endId) { + resolve(); + } + }; + if (explicitTimeout != null) { + return setTimeout(resolveIfNotStale, explicitTimeout); + } + const { type, timeout, propCount } = getTransitionInfo(el, expectedType); + if (!type) { + return resolve(); + } + const endEvent = type + "end"; + let ended = 0; + const end = () => { + el.removeEventListener(endEvent, onEnd); + resolveIfNotStale(); + }; + const onEnd = (e) => { + if (e.target === el && ++ended >= propCount) { + end(); + } + }; + setTimeout(() => { + if (ended < propCount) { + end(); + } + }, timeout + 1); + el.addEventListener(endEvent, onEnd); +} +function getTransitionInfo(el, expectedType) { + const styles = window.getComputedStyle(el); + const getStyleProperties = (key) => (styles[key] || "").split(", "); + const transitionDelays = getStyleProperties(`${TRANSITION$1}Delay`); + const transitionDurations = getStyleProperties(`${TRANSITION$1}Duration`); + const transitionTimeout = getTimeout(transitionDelays, transitionDurations); + const animationDelays = getStyleProperties(`${ANIMATION}Delay`); + const animationDurations = getStyleProperties(`${ANIMATION}Duration`); + const animationTimeout = getTimeout(animationDelays, animationDurations); + let type = null; + let timeout = 0; + let propCount = 0; + if (expectedType === TRANSITION$1) { + if (transitionTimeout > 0) { + type = TRANSITION$1; + timeout = transitionTimeout; + propCount = transitionDurations.length; + } + } else if (expectedType === ANIMATION) { + if (animationTimeout > 0) { + type = ANIMATION; + timeout = animationTimeout; + propCount = animationDurations.length; + } + } else { + timeout = Math.max(transitionTimeout, animationTimeout); + type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION$1 : ANIMATION : null; + propCount = type ? type === TRANSITION$1 ? transitionDurations.length : animationDurations.length : 0; + } + const hasTransform = type === TRANSITION$1 && /\b(transform|all)(,|$)/.test( + getStyleProperties(`${TRANSITION$1}Property`).toString() + ); + return { + type, + timeout, + propCount, + hasTransform + }; +} +function getTimeout(delays, durations) { + while (delays.length < durations.length) { + delays = delays.concat(delays); + } + return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); +} +function toMs(s) { + if (s === "auto") return 0; + return Number(s.slice(0, -1).replace(",", ".")) * 1e3; +} +function forceReflow() { + return document.body.offsetHeight; +} + +function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } +} + +const vShowOriginalDisplay = Symbol("_vod"); +const vShowHidden = Symbol("_vsh"); +const vShow = { + beforeMount(el, { value }, { transition }) { + el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display; + if (transition && value) { + transition.beforeEnter(el); + } else { + setDisplay(el, value); + } + }, + mounted(el, { value }, { transition }) { + if (transition && value) { + transition.enter(el); + } + }, + updated(el, { value, oldValue }, { transition }) { + if (!value === !oldValue) return; + if (transition) { + if (value) { + transition.beforeEnter(el); + setDisplay(el, true); + transition.enter(el); + } else { + transition.leave(el, () => { + setDisplay(el, false); + }); + } + } else { + setDisplay(el, value); + } + }, + beforeUnmount(el, { value }) { + setDisplay(el, value); + } +}; +{ + vShow.name = "show"; +} +function setDisplay(el, value) { + el.style.display = value ? el[vShowOriginalDisplay] : "none"; + el[vShowHidden] = !value; +} +function initVShowForSSR() { + vShow.getSSRProps = ({ value }) => { + if (!value) { + return { style: { display: "none" } }; + } + }; +} + +const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); +function useCssVars(getter) { + const instance = getCurrentInstance(); + if (!instance) { + warn(`useCssVars is called without current active component instance.`); + return; + } + const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { + Array.from( + document.querySelectorAll(`[data-v-owner="${instance.uid}"]`) + ).forEach((node) => setVarsOnNode(node, vars)); + }; + { + instance.getCssVars = () => getter(instance.proxy); + } + const setVars = () => { + const vars = getter(instance.proxy); + if (instance.ce) { + setVarsOnNode(instance.ce, vars); + } else { + setVarsOnVNode(instance.subTree, vars); + } + updateTeleports(vars); + }; + onBeforeUpdate(() => { + queuePostFlushCb(setVars); + }); + onMounted(() => { + watch(setVars, NOOP, { flush: "post" }); + const ob = new MutationObserver(setVars); + ob.observe(instance.subTree.el.parentNode, { childList: true }); + onUnmounted(() => ob.disconnect()); + }); +} +function setVarsOnVNode(vnode, vars) { + if (vnode.shapeFlag & 128) { + const suspense = vnode.suspense; + vnode = suspense.activeBranch; + if (suspense.pendingBranch && !suspense.isHydrating) { + suspense.effects.push(() => { + setVarsOnVNode(suspense.activeBranch, vars); + }); + } + } + while (vnode.component) { + vnode = vnode.component.subTree; + } + if (vnode.shapeFlag & 1 && vnode.el) { + setVarsOnNode(vnode.el, vars); + } else if (vnode.type === Fragment) { + vnode.children.forEach((c) => setVarsOnVNode(c, vars)); + } else if (vnode.type === Static) { + let { el, anchor } = vnode; + while (el) { + setVarsOnNode(el, vars); + if (el === anchor) break; + el = el.nextSibling; + } + } +} +function setVarsOnNode(el, vars) { + if (el.nodeType === 1) { + const style = el.style; + let cssText = ""; + for (const key in vars) { + style.setProperty(`--${key}`, vars[key]); + cssText += `--${key}: ${vars[key]};`; + } + style[CSS_VAR_TEXT] = cssText; + } +} + +const displayRE = /(^|;)\s*display\s*:/; +function patchStyle(el, prev, next) { + const style = el.style; + const isCssString = isString(next); + let hasControlledDisplay = false; + if (next && !isCssString) { + if (prev) { + if (!isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } else { + for (const prevStyle of prev.split(";")) { + const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim(); + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + } + for (const key in next) { + if (key === "display") { + hasControlledDisplay = true; + } + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + hasControlledDisplay = displayRE.test(next); + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOriginalDisplay in el) { + el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : ""; + if (el[vShowHidden]) { + style.display = "none"; + } + } +} +const semicolonRE = /[^\\];\s*$/; +const importantRE = /\s*!important$/; +function setStyle(style, name, val) { + if (isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) val = ""; + { + if (semicolonRE.test(val)) { + warn( + `Unexpected semicolon at the end of '${name}' style value: '${val}'` + ); + } + } + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } +} +const prefixes = ["Webkit", "Moz", "ms"]; +const prefixCache = {}; +function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; +} + +const xlinkNS = "http://www.w3.org/1999/xlink"; +function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + if (value == null || isBoolean && !includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute( + key, + isBoolean ? "" : isSymbol(value) ? String(value) : value + ); + } + } +} + +function patchDOMProp(el, key, value, parentComponent, attrName) { + if (key === "innerHTML" || key === "textContent") { + if (value != null) { + el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value; + } + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; + const newValue = value == null ? ( + // #11647: value should be set as empty string for null and undefined, + // but <input type="checkbox"> should be set as 'on'. + el.type === "checkbox" ? "on" : "" + ) : String(value); + if (oldValue !== newValue || !("_value" in el)) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + el._value = value; + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + if (!needRemove) { + warn( + `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, + e + ); + } + } + needRemove && el.removeAttribute(attrName || key); +} + +function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); +} +function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); +} +const veiKey = Symbol("_vei"); +function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = sanitizeEventValue(nextValue, rawName) ; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker( + sanitizeEventValue(nextValue, rawName) , + instance + ); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } +} +const optionsModifierRE = /(?:Once|Passive|Capture)$/; +function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); + return [event, options]; +} +let cachedNow = 0; +const p = /* @__PURE__ */ Promise.resolve(); +const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); +function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; +} +function sanitizeEventValue(value, propName) { + if (isFunction(value) || isArray(value)) { + return value; + } + warn( + `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop? +Expected function or array of functions, received type ${typeof value}.` + ); + return NOOP; +} +function patchStopImmediatePropagation(e, value) { + if (isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map( + (fn) => (e2) => !e2._stopped && fn && fn(e2) + ); + } else { + return value; + } +} + +const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter +key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; +const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (isOn(key)) { + if (!isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp(el, key, nextValue); + if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { + patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); + } + } else if ( + // #11081 force set props for possible async custom element + el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue)) + ) { + patchDOMProp(el, camelize(key), nextValue, parentComponent, key); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } +}; +function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && isString(value)) { + return false; + } + return key in el; +} + +const REMOVAL = {}; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineCustomElement(options, extraOptions, _createApp) { + const Comp = defineComponent(options, extraOptions); + if (isPlainObject(Comp)) extend(Comp, extraOptions); + class VueCustomElement extends VueElement { + constructor(initialProps) { + super(Comp, initialProps, _createApp); + } + } + VueCustomElement.def = Comp; + return VueCustomElement; +} +/*! #__NO_SIDE_EFFECTS__ */ +const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => { + return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp); +}; +const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { +}; +class VueElement extends BaseClass { + constructor(_def, _props = {}, _createApp = createApp) { + super(); + this._def = _def; + this._props = _props; + this._createApp = _createApp; + this._isVueCE = true; + /** + * @internal + */ + this._instance = null; + /** + * @internal + */ + this._app = null; + /** + * @internal + */ + this._nonce = this._def.nonce; + this._connected = false; + this._resolved = false; + this._numberProps = null; + this._styleChildren = /* @__PURE__ */ new WeakSet(); + this._ob = null; + if (this.shadowRoot && _createApp !== createApp) { + this._root = this.shadowRoot; + } else { + if (this.shadowRoot) { + warn( + `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` + ); + } + if (_def.shadowRoot !== false) { + this.attachShadow({ mode: "open" }); + this._root = this.shadowRoot; + } else { + this._root = this; + } + } + if (!this._def.__asyncLoader) { + this._resolveProps(this._def); + } + } + connectedCallback() { + if (!this.isConnected) return; + if (!this.shadowRoot) { + this._parseSlots(); + } + this._connected = true; + let parent = this; + while (parent = parent && (parent.parentNode || parent.host)) { + if (parent instanceof VueElement) { + this._parent = parent; + break; + } + } + if (!this._instance) { + if (this._resolved) { + this._setParent(); + this._update(); + } else { + if (parent && parent._pendingResolve) { + this._pendingResolve = parent._pendingResolve.then(() => { + this._pendingResolve = void 0; + this._resolveDef(); + }); + } else { + this._resolveDef(); + } + } + } + } + _setParent(parent = this._parent) { + if (parent) { + this._instance.parent = parent._instance; + this._instance.provides = parent._instance.provides; + } + } + disconnectedCallback() { + this._connected = false; + nextTick(() => { + if (!this._connected) { + if (this._ob) { + this._ob.disconnect(); + this._ob = null; + } + this._app && this._app.unmount(); + if (this._instance) this._instance.ce = void 0; + this._app = this._instance = null; + } + }); + } + /** + * resolve inner component definition (handle possible async component) + */ + _resolveDef() { + if (this._pendingResolve) { + return; + } + for (let i = 0; i < this.attributes.length; i++) { + this._setAttr(this.attributes[i].name); + } + this._ob = new MutationObserver((mutations) => { + for (const m of mutations) { + this._setAttr(m.attributeName); + } + }); + this._ob.observe(this, { attributes: true }); + const resolve = (def, isAsync = false) => { + this._resolved = true; + this._pendingResolve = void 0; + const { props, styles } = def; + let numberProps; + if (props && !isArray(props)) { + for (const key in props) { + const opt = props[key]; + if (opt === Number || opt && opt.type === Number) { + if (key in this._props) { + this._props[key] = toNumber(this._props[key]); + } + (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true; + } + } + } + this._numberProps = numberProps; + if (isAsync) { + this._resolveProps(def); + } + if (this.shadowRoot) { + this._applyStyles(styles); + } else if (styles) { + warn( + "Custom element style injection is not supported when using shadowRoot: false" + ); + } + this._mount(def); + }; + const asyncDef = this._def.__asyncLoader; + if (asyncDef) { + this._pendingResolve = asyncDef().then( + (def) => resolve(this._def = def, true) + ); + } else { + resolve(this._def); + } + } + _mount(def) { + if (!def.name) { + def.name = "VueElement"; + } + this._app = this._createApp(def); + if (def.configureApp) { + def.configureApp(this._app); + } + this._app._ceVNode = this._createVNode(); + this._app.mount(this._root); + const exposed = this._instance && this._instance.exposed; + if (!exposed) return; + for (const key in exposed) { + if (!hasOwn(this, key)) { + Object.defineProperty(this, key, { + // unwrap ref to be consistent with public instance behavior + get: () => unref(exposed[key]) + }); + } else { + warn(`Exposed property "${key}" already exists on custom element.`); + } + } + } + _resolveProps(def) { + const { props } = def; + const declaredPropKeys = isArray(props) ? props : Object.keys(props || {}); + for (const key of Object.keys(this)) { + if (key[0] !== "_" && declaredPropKeys.includes(key)) { + this._setProp(key, this[key]); + } + } + for (const key of declaredPropKeys.map(camelize)) { + Object.defineProperty(this, key, { + get() { + return this._getProp(key); + }, + set(val) { + this._setProp(key, val, true, true); + } + }); + } + } + _setAttr(key) { + if (key.startsWith("data-v-")) return; + const has = this.hasAttribute(key); + let value = has ? this.getAttribute(key) : REMOVAL; + const camelKey = camelize(key); + if (has && this._numberProps && this._numberProps[camelKey]) { + value = toNumber(value); + } + this._setProp(camelKey, value, false, true); + } + /** + * @internal + */ + _getProp(key) { + return this._props[key]; + } + /** + * @internal + */ + _setProp(key, val, shouldReflect = true, shouldUpdate = false) { + if (val !== this._props[key]) { + if (val === REMOVAL) { + delete this._props[key]; + } else { + this._props[key] = val; + if (key === "key" && this._app) { + this._app._ceVNode.key = val; + } + } + if (shouldUpdate && this._instance) { + this._update(); + } + if (shouldReflect) { + const ob = this._ob; + ob && ob.disconnect(); + if (val === true) { + this.setAttribute(hyphenate(key), ""); + } else if (typeof val === "string" || typeof val === "number") { + this.setAttribute(hyphenate(key), val + ""); + } else if (!val) { + this.removeAttribute(hyphenate(key)); + } + ob && ob.observe(this, { attributes: true }); + } + } + } + _update() { + render(this._createVNode(), this._root); + } + _createVNode() { + const baseProps = {}; + if (!this.shadowRoot) { + baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this); + } + const vnode = createVNode(this._def, extend(baseProps, this._props)); + if (!this._instance) { + vnode.ce = (instance) => { + this._instance = instance; + instance.ce = this; + instance.isCE = true; + { + instance.ceReload = (newStyles) => { + if (this._styles) { + this._styles.forEach((s) => this._root.removeChild(s)); + this._styles.length = 0; + } + this._applyStyles(newStyles); + this._instance = null; + this._update(); + }; + } + const dispatch = (event, args) => { + this.dispatchEvent( + new CustomEvent( + event, + isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args } + ) + ); + }; + instance.emit = (event, ...args) => { + dispatch(event, args); + if (hyphenate(event) !== event) { + dispatch(hyphenate(event), args); + } + }; + this._setParent(); + }; + } + return vnode; + } + _applyStyles(styles, owner) { + if (!styles) return; + if (owner) { + if (owner === this._def || this._styleChildren.has(owner)) { + return; + } + this._styleChildren.add(owner); + } + const nonce = this._nonce; + for (let i = styles.length - 1; i >= 0; i--) { + const s = document.createElement("style"); + if (nonce) s.setAttribute("nonce", nonce); + s.textContent = styles[i]; + this.shadowRoot.prepend(s); + { + if (owner) { + if (owner.__hmrId) { + if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map(); + let entry = this._childStyles.get(owner.__hmrId); + if (!entry) { + this._childStyles.set(owner.__hmrId, entry = []); + } + entry.push(s); + } + } else { + (this._styles || (this._styles = [])).push(s); + } + } + } + } + /** + * Only called when shadowRoot is false + */ + _parseSlots() { + const slots = this._slots = {}; + let n; + while (n = this.firstChild) { + const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default"; + (slots[slotName] || (slots[slotName] = [])).push(n); + this.removeChild(n); + } + } + /** + * Only called when shadowRoot is false + */ + _renderSlots() { + const outlets = (this._teleportTarget || this).querySelectorAll("slot"); + const scopeId = this._instance.type.__scopeId; + for (let i = 0; i < outlets.length; i++) { + const o = outlets[i]; + const slotName = o.getAttribute("name") || "default"; + const content = this._slots[slotName]; + const parent = o.parentNode; + if (content) { + for (const n of content) { + if (scopeId && n.nodeType === 1) { + const id = scopeId + "-s"; + const walker = document.createTreeWalker(n, 1); + n.setAttribute(id, ""); + let child; + while (child = walker.nextNode()) { + child.setAttribute(id, ""); + } + } + parent.insertBefore(n, o); + } + } else { + while (o.firstChild) parent.insertBefore(o.firstChild, o); + } + parent.removeChild(o); + } + } + /** + * @internal + */ + _injectChildStyle(comp) { + this._applyStyles(comp.styles, comp); + } + /** + * @internal + */ + _removeChildStyle(comp) { + { + this._styleChildren.delete(comp); + if (this._childStyles && comp.__hmrId) { + const oldStyles = this._childStyles.get(comp.__hmrId); + if (oldStyles) { + oldStyles.forEach((s) => this._root.removeChild(s)); + oldStyles.length = 0; + } + } + } + } +} +function useHost(caller) { + const instance = getCurrentInstance(); + const el = instance && instance.ce; + if (el) { + return el; + } else { + if (!instance) { + warn( + `${caller || "useHost"} called without an active component instance.` + ); + } else { + warn( + `${caller || "useHost"} can only be used in components defined via defineCustomElement.` + ); + } + } + return null; +} +function useShadowRoot() { + const el = useHost("useShadowRoot") ; + return el && el.shadowRoot; +} + +function useCssModule(name = "$style") { + { + const instance = getCurrentInstance(); + if (!instance) { + warn(`useCssModule must be called inside setup()`); + return EMPTY_OBJ; + } + const modules = instance.type.__cssModules; + if (!modules) { + warn(`Current instance does not have CSS modules injected.`); + return EMPTY_OBJ; + } + const mod = modules[name]; + if (!mod) { + warn(`Current instance does not have CSS module named "${name}".`); + return EMPTY_OBJ; + } + return mod; + } +} + +const positionMap = /* @__PURE__ */ new WeakMap(); +const newPositionMap = /* @__PURE__ */ new WeakMap(); +const moveCbKey = Symbol("_moveCb"); +const enterCbKey = Symbol("_enterCb"); +const decorate = (t) => { + delete t.props.mode; + return t; +}; +const TransitionGroupImpl = /* @__PURE__ */ decorate({ + name: "TransitionGroup", + props: /* @__PURE__ */ extend({}, TransitionPropsValidators, { + tag: String, + moveClass: String + }), + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevChildren; + let children; + onUpdated(() => { + if (!prevChildren.length) { + return; + } + const moveClass = props.moveClass || `${props.name || "v"}-move`; + if (!hasCSSTransform( + prevChildren[0].el, + instance.vnode.el, + moveClass + )) { + return; + } + prevChildren.forEach(callPendingCbs); + prevChildren.forEach(recordPosition); + const movedChildren = prevChildren.filter(applyTranslation); + forceReflow(); + movedChildren.forEach((c) => { + const el = c.el; + const style = el.style; + addTransitionClass(el, moveClass); + style.transform = style.webkitTransform = style.transitionDuration = ""; + const cb = el[moveCbKey] = (e) => { + if (e && e.target !== el) { + return; + } + if (!e || /transform$/.test(e.propertyName)) { + el.removeEventListener("transitionend", cb); + el[moveCbKey] = null; + removeTransitionClass(el, moveClass); + } + }; + el.addEventListener("transitionend", cb); + }); + }); + return () => { + const rawProps = toRaw(props); + const cssTransitionProps = resolveTransitionProps(rawProps); + let tag = rawProps.tag || Fragment; + prevChildren = []; + if (children) { + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.el && child.el instanceof Element) { + prevChildren.push(child); + setTransitionHooks( + child, + resolveTransitionHooks( + child, + cssTransitionProps, + state, + instance + ) + ); + positionMap.set( + child, + child.el.getBoundingClientRect() + ); + } + } + } + children = slots.default ? getTransitionRawChildren(slots.default()) : []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.key != null) { + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + } else if (child.type !== Text) { + warn(`<TransitionGroup> children must be keyed.`); + } + } + return createVNode(tag, null, children); + }; + } +}); +const TransitionGroup = TransitionGroupImpl; +function callPendingCbs(c) { + const el = c.el; + if (el[moveCbKey]) { + el[moveCbKey](); + } + if (el[enterCbKey]) { + el[enterCbKey](); + } +} +function recordPosition(c) { + newPositionMap.set(c, c.el.getBoundingClientRect()); +} +function applyTranslation(c) { + const oldPos = positionMap.get(c); + const newPos = newPositionMap.get(c); + const dx = oldPos.left - newPos.left; + const dy = oldPos.top - newPos.top; + if (dx || dy) { + const s = c.el.style; + s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; + s.transitionDuration = "0s"; + return c; + } +} +function hasCSSTransform(el, root, moveClass) { + const clone = el.cloneNode(); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.forEach((cls) => { + cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); + }); + } + moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); + clone.style.display = "none"; + const container = root.nodeType === 1 ? root : root.parentNode; + container.appendChild(clone); + const { hasTransform } = getTransitionInfo(clone); + container.removeChild(clone); + return hasTransform; +} + +const getModelAssigner = (vnode) => { + const fn = vnode.props["onUpdate:modelValue"] || false; + return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; +}; +function onCompositionStart(e) { + e.target.composing = true; +} +function onCompositionEnd(e) { + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } +} +const assignKey = Symbol("_assign"); +const vModelText = { + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); + } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) return; + const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy && value === oldValue) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } +}; +const vModelCheckbox = { + // #4096 array checkboxes need to be deep traversed + deep: true, + created(el, _, vnode) { + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + const modelValue = el._modelValue; + const elementValue = getValue(el); + const checked = el.checked; + const assign = el[assignKey]; + if (isArray(modelValue)) { + const index = looseIndexOf(modelValue, elementValue); + const found = index !== -1; + if (checked && !found) { + assign(modelValue.concat(elementValue)); + } else if (!checked && found) { + const filtered = [...modelValue]; + filtered.splice(index, 1); + assign(filtered); + } + } else if (isSet(modelValue)) { + const cloned = new Set(modelValue); + if (checked) { + cloned.add(elementValue); + } else { + cloned.delete(elementValue); + } + assign(cloned); + } else { + assign(getCheckboxValue(el, checked)); + } + }); + }, + // set initial checked on mount to wait for true-value/false-value + mounted: setChecked, + beforeUpdate(el, binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + setChecked(el, binding, vnode); + } +}; +function setChecked(el, { value, oldValue }, vnode) { + el._modelValue = value; + let checked; + if (isArray(value)) { + checked = looseIndexOf(value, vnode.props.value) > -1; + } else if (isSet(value)) { + checked = value.has(vnode.props.value); + } else { + if (value === oldValue) return; + checked = looseEqual(value, getCheckboxValue(el, true)); + } + if (el.checked !== checked) { + el.checked = checked; + } +} +const vModelRadio = { + created(el, { value }, vnode) { + el.checked = looseEqual(value, vnode.props.value); + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + el[assignKey](getValue(el)); + }); + }, + beforeUpdate(el, { value, oldValue }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (value !== oldValue) { + el.checked = looseEqual(value, vnode.props.value); + } + } +}; +const vModelSelect = { + // <select multiple> value need to be deep traversed + deep: true, + created(el, { value, modifiers: { number } }, vnode) { + const isSetModel = isSet(value); + addEventListener(el, "change", () => { + const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( + (o) => number ? looseToNumber(getValue(o)) : getValue(o) + ); + el[assignKey]( + el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] + ); + el._assigning = true; + nextTick(() => { + el._assigning = false; + }); + }); + el[assignKey] = getModelAssigner(vnode); + }, + // set value in mounted & updated because <select> relies on its children + // <option>s. + mounted(el, { value }) { + setSelected(el, value); + }, + beforeUpdate(el, _binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + }, + updated(el, { value }) { + if (!el._assigning) { + setSelected(el, value); + } + } +}; +function setSelected(el, value) { + const isMultiple = el.multiple; + const isArrayValue = isArray(value); + if (isMultiple && !isArrayValue && !isSet(value)) { + warn( + `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` + ); + return; + } + for (let i = 0, l = el.options.length; i < l; i++) { + const option = el.options[i]; + const optionValue = getValue(option); + if (isMultiple) { + if (isArrayValue) { + const optionType = typeof optionValue; + if (optionType === "string" || optionType === "number") { + option.selected = value.some((v) => String(v) === String(optionValue)); + } else { + option.selected = looseIndexOf(value, optionValue) > -1; + } + } else { + option.selected = value.has(optionValue); + } + } else if (looseEqual(getValue(option), value)) { + if (el.selectedIndex !== i) el.selectedIndex = i; + return; + } + } + if (!isMultiple && el.selectedIndex !== -1) { + el.selectedIndex = -1; + } +} +function getValue(el) { + return "_value" in el ? el._value : el.value; +} +function getCheckboxValue(el, checked) { + const key = checked ? "_trueValue" : "_falseValue"; + return key in el ? el[key] : checked; +} +const vModelDynamic = { + created(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "created"); + }, + mounted(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "mounted"); + }, + beforeUpdate(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); + }, + updated(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "updated"); + } +}; +function resolveDynamicModel(tagName, type) { + switch (tagName) { + case "SELECT": + return vModelSelect; + case "TEXTAREA": + return vModelText; + default: + switch (type) { + case "checkbox": + return vModelCheckbox; + case "radio": + return vModelRadio; + default: + return vModelText; + } + } +} +function callModelHook(el, binding, vnode, prevVNode, hook) { + const modelToUse = resolveDynamicModel( + el.tagName, + vnode.props && vnode.props.type + ); + const fn = modelToUse[hook]; + fn && fn(el, binding, vnode, prevVNode); +} +function initVModelForSSR() { + vModelText.getSSRProps = ({ value }) => ({ value }); + vModelRadio.getSSRProps = ({ value }, vnode) => { + if (vnode.props && looseEqual(vnode.props.value, value)) { + return { checked: true }; + } + }; + vModelCheckbox.getSSRProps = ({ value }, vnode) => { + if (isArray(value)) { + if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) { + return { checked: true }; + } + } else if (isSet(value)) { + if (vnode.props && value.has(vnode.props.value)) { + return { checked: true }; + } + } else if (value) { + return { checked: true }; + } + }; + vModelDynamic.getSSRProps = (binding, vnode) => { + if (typeof vnode.type !== "string") { + return; + } + const modelToUse = resolveDynamicModel( + // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase + vnode.type.toUpperCase(), + vnode.props && vnode.props.type + ); + if (modelToUse.getSSRProps) { + return modelToUse.getSSRProps(binding, vnode); + } + }; +} + +const systemModifiers = ["ctrl", "shift", "alt", "meta"]; +const modifierGuards = { + stop: (e) => e.stopPropagation(), + prevent: (e) => e.preventDefault(), + self: (e) => e.target !== e.currentTarget, + ctrl: (e) => !e.ctrlKey, + shift: (e) => !e.shiftKey, + alt: (e) => !e.altKey, + meta: (e) => !e.metaKey, + left: (e) => "button" in e && e.button !== 0, + middle: (e) => "button" in e && e.button !== 1, + right: (e) => "button" in e && e.button !== 2, + exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) +}; +const withModifiers = (fn, modifiers) => { + const cache = fn._withMods || (fn._withMods = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { + for (let i = 0; i < modifiers.length; i++) { + const guard = modifierGuards[modifiers[i]]; + if (guard && guard(event, modifiers)) return; + } + return fn(event, ...args); + }); +}; +const keyNames = { + esc: "escape", + space: " ", + up: "arrow-up", + left: "arrow-left", + right: "arrow-right", + down: "arrow-down", + delete: "backspace" +}; +const withKeys = (fn, modifiers) => { + const cache = fn._withKeys || (fn._withKeys = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event) => { + if (!("key" in event)) { + return; + } + const eventKey = hyphenate(event.key); + if (modifiers.some( + (k) => k === eventKey || keyNames[k] === eventKey + )) { + return fn(event); + } + }); +}; + +const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); +let renderer; +let enabledHydration = false; +function ensureRenderer() { + return renderer || (renderer = createRenderer(rendererOptions)); +} +function ensureHydrationRenderer() { + renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions); + enabledHydration = true; + return renderer; +} +const render = (...args) => { + ensureRenderer().render(...args); +}; +const hydrate = (...args) => { + ensureHydrationRenderer().hydrate(...args); +}; +const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) return; + const component = app._component; + if (!isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; + } + if (container.nodeType === 1) { + container.textContent = ""; + } + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); + } + return proxy; + }; + return app; +}; +const createSSRApp = (...args) => { + const app = ensureHydrationRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (container) { + return mount(container, true, resolveRootNamespace(container)); + } + }; + return app; +}; +function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } +} +function injectNativeTagCheck(app) { + Object.defineProperty(app.config, "isNativeTag", { + value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + writable: false + }); +} +function injectCompilerOptionsCheck(app) { + if (isRuntimeOnly()) { + const isCustomElement = app.config.isCustomElement; + Object.defineProperty(app.config, "isCustomElement", { + get() { + return isCustomElement; + }, + set() { + warn( + `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` + ); + } + }); + const compilerOptions = app.config.compilerOptions; + const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. +- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. +- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader +- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; + Object.defineProperty(app.config, "compilerOptions", { + get() { + warn(msg); + return compilerOptions; + }, + set() { + warn(msg); + } + }); + } +} +function normalizeContainer(container) { + if (isString(container)) { + const res = document.querySelector(container); + if (!res) { + warn( + `Failed to mount app: mount target selector "${container}" returned null.` + ); + } + return res; + } + if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { + warn( + `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` + ); + } + return container; +} +let ssrDirectiveInitialized = false; +const initDirectivesForSSR = () => { + if (!ssrDirectiveInitialized) { + ssrDirectiveInitialized = true; + initVModelForSSR(); + initVShowForSSR(); + } +} ; + +var runtimeDom = /*#__PURE__*/Object.freeze({ + __proto__: null, + BaseTransition: BaseTransition, + BaseTransitionPropsValidators: BaseTransitionPropsValidators, + Comment: Comment, + DeprecationTypes: DeprecationTypes, + EffectScope: EffectScope, + ErrorCodes: ErrorCodes, + ErrorTypeStrings: ErrorTypeStrings, + Fragment: Fragment, + KeepAlive: KeepAlive, + ReactiveEffect: ReactiveEffect, + Static: Static, + Suspense: Suspense, + Teleport: Teleport, + Text: Text, + TrackOpTypes: TrackOpTypes, + Transition: Transition, + TransitionGroup: TransitionGroup, + TriggerOpTypes: TriggerOpTypes, + VueElement: VueElement, + assertNumber: assertNumber, + callWithAsyncErrorHandling: callWithAsyncErrorHandling, + callWithErrorHandling: callWithErrorHandling, + camelize: camelize, + capitalize: capitalize, + cloneVNode: cloneVNode, + compatUtils: compatUtils, + computed: computed, + createApp: createApp, + createBlock: createBlock, + createCommentVNode: createCommentVNode, + createElementBlock: createElementBlock, + createElementVNode: createBaseVNode, + createHydrationRenderer: createHydrationRenderer, + createPropsRestProxy: createPropsRestProxy, + createRenderer: createRenderer, + createSSRApp: createSSRApp, + createSlots: createSlots, + createStaticVNode: createStaticVNode, + createTextVNode: createTextVNode, + createVNode: createVNode, + customRef: customRef, + defineAsyncComponent: defineAsyncComponent, + defineComponent: defineComponent, + defineCustomElement: defineCustomElement, + defineEmits: defineEmits, + defineExpose: defineExpose, + defineModel: defineModel, + defineOptions: defineOptions, + defineProps: defineProps, + defineSSRCustomElement: defineSSRCustomElement, + defineSlots: defineSlots, + devtools: devtools, + effect: effect, + effectScope: effectScope, + getCurrentInstance: getCurrentInstance, + getCurrentScope: getCurrentScope, + getCurrentWatcher: getCurrentWatcher, + getTransitionRawChildren: getTransitionRawChildren, + guardReactiveProps: guardReactiveProps, + h: h, + handleError: handleError, + hasInjectionContext: hasInjectionContext, + hydrate: hydrate, + hydrateOnIdle: hydrateOnIdle, + hydrateOnInteraction: hydrateOnInteraction, + hydrateOnMediaQuery: hydrateOnMediaQuery, + hydrateOnVisible: hydrateOnVisible, + initCustomFormatter: initCustomFormatter, + initDirectivesForSSR: initDirectivesForSSR, + inject: inject, + isMemoSame: isMemoSame, + isProxy: isProxy, + isReactive: isReactive, + isReadonly: isReadonly, + isRef: isRef, + isRuntimeOnly: isRuntimeOnly, + isShallow: isShallow, + isVNode: isVNode, + markRaw: markRaw, + mergeDefaults: mergeDefaults, + mergeModels: mergeModels, + mergeProps: mergeProps, + nextTick: nextTick, + normalizeClass: normalizeClass, + normalizeProps: normalizeProps, + normalizeStyle: normalizeStyle, + onActivated: onActivated, + onBeforeMount: onBeforeMount, + onBeforeUnmount: onBeforeUnmount, + onBeforeUpdate: onBeforeUpdate, + onDeactivated: onDeactivated, + onErrorCaptured: onErrorCaptured, + onMounted: onMounted, + onRenderTracked: onRenderTracked, + onRenderTriggered: onRenderTriggered, + onScopeDispose: onScopeDispose, + onServerPrefetch: onServerPrefetch, + onUnmounted: onUnmounted, + onUpdated: onUpdated, + onWatcherCleanup: onWatcherCleanup, + openBlock: openBlock, + popScopeId: popScopeId, + provide: provide, + proxyRefs: proxyRefs, + pushScopeId: pushScopeId, + queuePostFlushCb: queuePostFlushCb, + reactive: reactive, + readonly: readonly, + ref: ref, + registerRuntimeCompiler: registerRuntimeCompiler, + render: render, + renderList: renderList, + renderSlot: renderSlot, + resolveComponent: resolveComponent, + resolveDirective: resolveDirective, + resolveDynamicComponent: resolveDynamicComponent, + resolveFilter: resolveFilter, + resolveTransitionHooks: resolveTransitionHooks, + setBlockTracking: setBlockTracking, + setDevtoolsHook: setDevtoolsHook, + setTransitionHooks: setTransitionHooks, + shallowReactive: shallowReactive, + shallowReadonly: shallowReadonly, + shallowRef: shallowRef, + ssrContextKey: ssrContextKey, + ssrUtils: ssrUtils, + stop: stop, + toDisplayString: toDisplayString, + toHandlerKey: toHandlerKey, + toHandlers: toHandlers, + toRaw: toRaw, + toRef: toRef, + toRefs: toRefs, + toValue: toValue, + transformVNodeArgs: transformVNodeArgs, + triggerRef: triggerRef, + unref: unref, + useAttrs: useAttrs, + useCssModule: useCssModule, + useCssVars: useCssVars, + useHost: useHost, + useId: useId, + useModel: useModel, + useSSRContext: useSSRContext, + useShadowRoot: useShadowRoot, + useSlots: useSlots, + useTemplateRef: useTemplateRef, + useTransitionState: useTransitionState, + vModelCheckbox: vModelCheckbox, + vModelDynamic: vModelDynamic, + vModelRadio: vModelRadio, + vModelSelect: vModelSelect, + vModelText: vModelText, + vShow: vShow, + version: version, + warn: warn, + watch: watch, + watchEffect: watchEffect, + watchPostEffect: watchPostEffect, + watchSyncEffect: watchSyncEffect, + withAsyncContext: withAsyncContext, + withCtx: withCtx, + withDefaults: withDefaults, + withDirectives: withDirectives, + withKeys: withKeys, + withMemo: withMemo, + withModifiers: withModifiers, + withScopeId: withScopeId +}); + +function initDev() { + { + { + console.info( + `You are running a development build of Vue. +Make sure to use the production build (*.prod.js) when deploying for production.` + ); + } + initCustomFormatter(); + } +} + +const FRAGMENT = Symbol(`Fragment` ); +const TELEPORT = Symbol(`Teleport` ); +const SUSPENSE = Symbol(`Suspense` ); +const KEEP_ALIVE = Symbol(`KeepAlive` ); +const BASE_TRANSITION = Symbol( + `BaseTransition` +); +const OPEN_BLOCK = Symbol(`openBlock` ); +const CREATE_BLOCK = Symbol(`createBlock` ); +const CREATE_ELEMENT_BLOCK = Symbol( + `createElementBlock` +); +const CREATE_VNODE = Symbol(`createVNode` ); +const CREATE_ELEMENT_VNODE = Symbol( + `createElementVNode` +); +const CREATE_COMMENT = Symbol( + `createCommentVNode` +); +const CREATE_TEXT = Symbol( + `createTextVNode` +); +const CREATE_STATIC = Symbol( + `createStaticVNode` +); +const RESOLVE_COMPONENT = Symbol( + `resolveComponent` +); +const RESOLVE_DYNAMIC_COMPONENT = Symbol( + `resolveDynamicComponent` +); +const RESOLVE_DIRECTIVE = Symbol( + `resolveDirective` +); +const RESOLVE_FILTER = Symbol( + `resolveFilter` +); +const WITH_DIRECTIVES = Symbol( + `withDirectives` +); +const RENDER_LIST = Symbol(`renderList` ); +const RENDER_SLOT = Symbol(`renderSlot` ); +const CREATE_SLOTS = Symbol(`createSlots` ); +const TO_DISPLAY_STRING = Symbol( + `toDisplayString` +); +const MERGE_PROPS = Symbol(`mergeProps` ); +const NORMALIZE_CLASS = Symbol( + `normalizeClass` +); +const NORMALIZE_STYLE = Symbol( + `normalizeStyle` +); +const NORMALIZE_PROPS = Symbol( + `normalizeProps` +); +const GUARD_REACTIVE_PROPS = Symbol( + `guardReactiveProps` +); +const TO_HANDLERS = Symbol(`toHandlers` ); +const CAMELIZE = Symbol(`camelize` ); +const CAPITALIZE = Symbol(`capitalize` ); +const TO_HANDLER_KEY = Symbol( + `toHandlerKey` +); +const SET_BLOCK_TRACKING = Symbol( + `setBlockTracking` +); +const PUSH_SCOPE_ID = Symbol(`pushScopeId` ); +const POP_SCOPE_ID = Symbol(`popScopeId` ); +const WITH_CTX = Symbol(`withCtx` ); +const UNREF = Symbol(`unref` ); +const IS_REF = Symbol(`isRef` ); +const WITH_MEMO = Symbol(`withMemo` ); +const IS_MEMO_SAME = Symbol(`isMemoSame` ); +const helperNameMap = { + [FRAGMENT]: `Fragment`, + [TELEPORT]: `Teleport`, + [SUSPENSE]: `Suspense`, + [KEEP_ALIVE]: `KeepAlive`, + [BASE_TRANSITION]: `BaseTransition`, + [OPEN_BLOCK]: `openBlock`, + [CREATE_BLOCK]: `createBlock`, + [CREATE_ELEMENT_BLOCK]: `createElementBlock`, + [CREATE_VNODE]: `createVNode`, + [CREATE_ELEMENT_VNODE]: `createElementVNode`, + [CREATE_COMMENT]: `createCommentVNode`, + [CREATE_TEXT]: `createTextVNode`, + [CREATE_STATIC]: `createStaticVNode`, + [RESOLVE_COMPONENT]: `resolveComponent`, + [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, + [RESOLVE_DIRECTIVE]: `resolveDirective`, + [RESOLVE_FILTER]: `resolveFilter`, + [WITH_DIRECTIVES]: `withDirectives`, + [RENDER_LIST]: `renderList`, + [RENDER_SLOT]: `renderSlot`, + [CREATE_SLOTS]: `createSlots`, + [TO_DISPLAY_STRING]: `toDisplayString`, + [MERGE_PROPS]: `mergeProps`, + [NORMALIZE_CLASS]: `normalizeClass`, + [NORMALIZE_STYLE]: `normalizeStyle`, + [NORMALIZE_PROPS]: `normalizeProps`, + [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, + [TO_HANDLERS]: `toHandlers`, + [CAMELIZE]: `camelize`, + [CAPITALIZE]: `capitalize`, + [TO_HANDLER_KEY]: `toHandlerKey`, + [SET_BLOCK_TRACKING]: `setBlockTracking`, + [PUSH_SCOPE_ID]: `pushScopeId`, + [POP_SCOPE_ID]: `popScopeId`, + [WITH_CTX]: `withCtx`, + [UNREF]: `unref`, + [IS_REF]: `isRef`, + [WITH_MEMO]: `withMemo`, + [IS_MEMO_SAME]: `isMemoSame` +}; +function registerRuntimeHelpers(helpers) { + Object.getOwnPropertySymbols(helpers).forEach((s) => { + helperNameMap[s] = helpers[s]; + }); +} + +const locStub = { + start: { line: 1, column: 1, offset: 0 }, + end: { line: 1, column: 1, offset: 0 }, + source: "" +}; +function createRoot(children, source = "") { + return { + type: 0, + source, + children, + helpers: /* @__PURE__ */ new Set(), + components: [], + directives: [], + hoists: [], + imports: [], + cached: [], + temps: 0, + codegenNode: void 0, + loc: locStub + }; +} +function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) { + if (context) { + if (isBlock) { + context.helper(OPEN_BLOCK); + context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); + } else { + context.helper(getVNodeHelper(context.inSSR, isComponent)); + } + if (directives) { + context.helper(WITH_DIRECTIVES); + } + } + return { + type: 13, + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent, + loc + }; +} +function createArrayExpression(elements, loc = locStub) { + return { + type: 17, + loc, + elements + }; +} +function createObjectExpression(properties, loc = locStub) { + return { + type: 15, + loc, + properties + }; +} +function createObjectProperty(key, value) { + return { + type: 16, + loc: locStub, + key: isString(key) ? createSimpleExpression(key, true) : key, + value + }; +} +function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { + return { + type: 4, + loc, + content, + isStatic, + constType: isStatic ? 3 : constType + }; +} +function createCompoundExpression(children, loc = locStub) { + return { + type: 8, + loc, + children + }; +} +function createCallExpression(callee, args = [], loc = locStub) { + return { + type: 14, + loc, + callee, + arguments: args + }; +} +function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { + return { + type: 18, + params, + returns, + newline, + isSlot, + loc + }; +} +function createConditionalExpression(test, consequent, alternate, newline = true) { + return { + type: 19, + test, + consequent, + alternate, + newline, + loc: locStub + }; +} +function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) { + return { + type: 20, + index, + value, + needPauseTracking, + inVOnce, + needArraySpread: false, + loc: locStub + }; +} +function createBlockStatement(body) { + return { + type: 21, + body, + loc: locStub + }; +} +function getVNodeHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; +} +function getVNodeBlockHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; +} +function convertToBlock(node, { helper, removeHelper, inSSR }) { + if (!node.isBlock) { + node.isBlock = true; + removeHelper(getVNodeHelper(inSSR, node.isComponent)); + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(inSSR, node.isComponent)); + } +} + +const defaultDelimitersOpen = new Uint8Array([123, 123]); +const defaultDelimitersClose = new Uint8Array([125, 125]); +function isTagStartChar(c) { + return c >= 97 && c <= 122 || c >= 65 && c <= 90; +} +function isWhitespace(c) { + return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; +} +function isEndOfTagSection(c) { + return c === 47 || c === 62 || isWhitespace(c); +} +function toCharCodes(str) { + const ret = new Uint8Array(str.length); + for (let i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret; +} +const Sequences = { + Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), + // CDATA[ + CdataEnd: new Uint8Array([93, 93, 62]), + // ]]> + CommentEnd: new Uint8Array([45, 45, 62]), + // `-->` + ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), + // `<\/script` + StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), + // `</style` + TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), + // `</title` + TextareaEnd: new Uint8Array([ + 60, + 47, + 116, + 101, + 120, + 116, + 97, + 114, + 101, + 97 + ]) + // `</textarea +}; +class Tokenizer { + constructor(stack, cbs) { + this.stack = stack; + this.cbs = cbs; + /** The current state the tokenizer is in. */ + this.state = 1; + /** The read buffer. */ + this.buffer = ""; + /** The beginning of the section that is currently being read. */ + this.sectionStart = 0; + /** The index within the buffer that we are currently looking at. */ + this.index = 0; + /** The start of the last entity. */ + this.entityStart = 0; + /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ + this.baseState = 1; + /** For special parsing behavior inside of script and style tags. */ + this.inRCDATA = false; + /** For disabling RCDATA tags handling */ + this.inXML = false; + /** For disabling interpolation parsing in v-pre */ + this.inVPre = false; + /** Record newline positions for fast line / column calculation */ + this.newlines = []; + this.mode = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + this.delimiterIndex = -1; + this.currentSequence = void 0; + this.sequenceIndex = 0; + } + get inSFCRoot() { + return this.mode === 2 && this.stack.length === 0; + } + reset() { + this.state = 1; + this.mode = 0; + this.buffer = ""; + this.sectionStart = 0; + this.index = 0; + this.baseState = 1; + this.inRCDATA = false; + this.currentSequence = void 0; + this.newlines.length = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + } + /** + * Generate Position object with line / column information using recorded + * newline positions. We know the index is always going to be an already + * processed index, so all the newlines up to this index should have been + * recorded. + */ + getPos(index) { + let line = 1; + let column = index + 1; + for (let i = this.newlines.length - 1; i >= 0; i--) { + const newlineIndex = this.newlines[i]; + if (index > newlineIndex) { + line = i + 2; + column = index - newlineIndex; + break; + } + } + return { + column, + line, + offset: index + }; + } + peek() { + return this.buffer.charCodeAt(this.index + 1); + } + stateText(c) { + if (c === 60) { + if (this.index > this.sectionStart) { + this.cbs.ontext(this.sectionStart, this.index); + } + this.state = 5; + this.sectionStart = this.index; + } else if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } + stateInterpolationOpen(c) { + if (c === this.delimiterOpen[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterOpen.length - 1) { + const start = this.index + 1 - this.delimiterOpen.length; + if (start > this.sectionStart) { + this.cbs.ontext(this.sectionStart, start); + } + this.state = 3; + this.sectionStart = start; + } else { + this.delimiterIndex++; + } + } else if (this.inRCDATA) { + this.state = 32; + this.stateInRCDATA(c); + } else { + this.state = 1; + this.stateText(c); + } + } + stateInterpolation(c) { + if (c === this.delimiterClose[0]) { + this.state = 4; + this.delimiterIndex = 0; + this.stateInterpolationClose(c); + } + } + stateInterpolationClose(c) { + if (c === this.delimiterClose[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterClose.length - 1) { + this.cbs.oninterpolation(this.sectionStart, this.index + 1); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else { + this.delimiterIndex++; + } + } else { + this.state = 3; + this.stateInterpolation(c); + } + } + stateSpecialStartSequence(c) { + const isEnd = this.sequenceIndex === this.currentSequence.length; + const isMatch = isEnd ? ( + // If we are at the end of the sequence, make sure the tag name has ended + isEndOfTagSection(c) + ) : ( + // Otherwise, do a case-insensitive comparison + (c | 32) === this.currentSequence[this.sequenceIndex] + ); + if (!isMatch) { + this.inRCDATA = false; + } else if (!isEnd) { + this.sequenceIndex++; + return; + } + this.sequenceIndex = 0; + this.state = 6; + this.stateInTagName(c); + } + /** Look for an end tag. For <title> and <textarea>, also decode entities. */ + stateInRCDATA(c) { + if (this.sequenceIndex === this.currentSequence.length) { + if (c === 62 || isWhitespace(c)) { + const endOfText = this.index - this.currentSequence.length; + if (this.sectionStart < endOfText) { + const actualIndex = this.index; + this.index = endOfText; + this.cbs.ontext(this.sectionStart, endOfText); + this.index = actualIndex; + } + this.sectionStart = endOfText + 2; + this.stateInClosingTagName(c); + this.inRCDATA = false; + return; + } + this.sequenceIndex = 0; + } + if ((c | 32) === this.currentSequence[this.sequenceIndex]) { + this.sequenceIndex += 1; + } else if (this.sequenceIndex === 0) { + if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { + if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } else if (this.fastForwardTo(60)) { + this.sequenceIndex = 1; + } + } else { + this.sequenceIndex = Number(c === 60); + } + } + stateCDATASequence(c) { + if (c === Sequences.Cdata[this.sequenceIndex]) { + if (++this.sequenceIndex === Sequences.Cdata.length) { + this.state = 28; + this.currentSequence = Sequences.CdataEnd; + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + } + } else { + this.sequenceIndex = 0; + this.state = 23; + this.stateInDeclaration(c); + } + } + /** + * When we wait for one specific character, we can speed things up + * by skipping through the buffer until we find it. + * + * @returns Whether the character was found. + */ + fastForwardTo(c) { + while (++this.index < this.buffer.length) { + const cc = this.buffer.charCodeAt(this.index); + if (cc === 10) { + this.newlines.push(this.index); + } + if (cc === c) { + return true; + } + } + this.index = this.buffer.length - 1; + return false; + } + /** + * Comments and CDATA end with `-->` and `]]>`. + * + * Their common qualities are: + * - Their end sequences have a distinct character they start with. + * - That character is then repeated, so we have to check multiple repeats. + * - All characters but the start character of the sequence can be skipped. + */ + stateInCommentLike(c) { + if (c === this.currentSequence[this.sequenceIndex]) { + if (++this.sequenceIndex === this.currentSequence.length) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, this.index - 2); + } else { + this.cbs.oncomment(this.sectionStart, this.index - 2); + } + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + this.state = 1; + } + } else if (this.sequenceIndex === 0) { + if (this.fastForwardTo(this.currentSequence[0])) { + this.sequenceIndex = 1; + } + } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { + this.sequenceIndex = 0; + } + } + startSpecial(sequence, offset) { + this.enterRCDATA(sequence, offset); + this.state = 31; + } + enterRCDATA(sequence, offset) { + this.inRCDATA = true; + this.currentSequence = sequence; + this.sequenceIndex = offset; + } + stateBeforeTagName(c) { + if (c === 33) { + this.state = 22; + this.sectionStart = this.index + 1; + } else if (c === 63) { + this.state = 24; + this.sectionStart = this.index + 1; + } else if (isTagStartChar(c)) { + this.sectionStart = this.index; + if (this.mode === 0) { + this.state = 6; + } else if (this.inSFCRoot) { + this.state = 34; + } else if (!this.inXML) { + if (c === 116) { + this.state = 30; + } else { + this.state = c === 115 ? 29 : 6; + } + } else { + this.state = 6; + } + } else if (c === 47) { + this.state = 8; + } else { + this.state = 1; + this.stateText(c); + } + } + stateInTagName(c) { + if (isEndOfTagSection(c)) { + this.handleTagName(c); + } + } + stateInSFCRootTagName(c) { + if (isEndOfTagSection(c)) { + const tag = this.buffer.slice(this.sectionStart, this.index); + if (tag !== "template") { + this.enterRCDATA(toCharCodes(`</` + tag), 0); + } + this.handleTagName(c); + } + } + handleTagName(c) { + this.cbs.onopentagname(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } + stateBeforeClosingTagName(c) { + if (isWhitespace(c)) ; else if (c === 62) { + { + this.cbs.onerr(14, this.index); + } + this.state = 1; + this.sectionStart = this.index + 1; + } else { + this.state = isTagStartChar(c) ? 9 : 27; + this.sectionStart = this.index; + } + } + stateInClosingTagName(c) { + if (c === 62 || isWhitespace(c)) { + this.cbs.onclosetag(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 10; + this.stateAfterClosingTagName(c); + } + } + stateAfterClosingTagName(c) { + if (c === 62) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeAttrName(c) { + if (c === 62) { + this.cbs.onopentagend(this.index); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else if (c === 47) { + this.state = 7; + if (this.peek() !== 62) { + this.cbs.onerr(22, this.index); + } + } else if (c === 60 && this.peek() === 47) { + this.cbs.onopentagend(this.index); + this.state = 5; + this.sectionStart = this.index; + } else if (!isWhitespace(c)) { + if (c === 61) { + this.cbs.onerr( + 19, + this.index + ); + } + this.handleAttrStart(c); + } + } + handleAttrStart(c) { + if (c === 118 && this.peek() === 45) { + this.state = 13; + this.sectionStart = this.index; + } else if (c === 46 || c === 58 || c === 64 || c === 35) { + this.cbs.ondirname(this.index, this.index + 1); + this.state = 14; + this.sectionStart = this.index + 1; + } else { + this.state = 12; + this.sectionStart = this.index; + } + } + stateInSelfClosingTag(c) { + if (c === 62) { + this.cbs.onselfclosingtag(this.index); + this.state = 1; + this.sectionStart = this.index + 1; + this.inRCDATA = false; + } else if (!isWhitespace(c)) { + this.state = 11; + this.stateBeforeAttrName(c); + } + } + stateInAttrName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.onattribname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 34 || c === 39 || c === 60) { + this.cbs.onerr( + 17, + this.index + ); + } + } + stateInDirName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 58) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 14; + this.sectionStart = this.index + 1; + } else if (c === 46) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDirArg(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 91) { + this.state = 15; + } else if (c === 46) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDynamicDirArg(c) { + if (c === 93) { + this.state = 14; + } else if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index + 1); + this.handleAttrNameEnd(c); + { + this.cbs.onerr( + 27, + this.index + ); + } + } + } + stateInDirModifier(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 46) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.sectionStart = this.index + 1; + } + } + handleAttrNameEnd(c) { + this.sectionStart = this.index; + this.state = 17; + this.cbs.onattribnameend(this.index); + this.stateAfterAttrName(c); + } + stateAfterAttrName(c) { + if (c === 61) { + this.state = 18; + } else if (c === 47 || c === 62) { + this.cbs.onattribend(0, this.sectionStart); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } else if (!isWhitespace(c)) { + this.cbs.onattribend(0, this.sectionStart); + this.handleAttrStart(c); + } + } + stateBeforeAttrValue(c) { + if (c === 34) { + this.state = 19; + this.sectionStart = this.index + 1; + } else if (c === 39) { + this.state = 20; + this.sectionStart = this.index + 1; + } else if (!isWhitespace(c)) { + this.sectionStart = this.index; + this.state = 21; + this.stateInAttrValueNoQuotes(c); + } + } + handleInAttrValue(c, quote) { + if (c === quote || this.fastForwardTo(quote)) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend( + quote === 34 ? 3 : 2, + this.index + 1 + ); + this.state = 11; + } + } + stateInAttrValueDoubleQuotes(c) { + this.handleInAttrValue(c, 34); + } + stateInAttrValueSingleQuotes(c) { + this.handleInAttrValue(c, 39); + } + stateInAttrValueNoQuotes(c) { + if (isWhitespace(c) || c === 62) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend(1, this.index); + this.state = 11; + this.stateBeforeAttrName(c); + } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { + this.cbs.onerr( + 18, + this.index + ); + } else ; + } + stateBeforeDeclaration(c) { + if (c === 91) { + this.state = 26; + this.sequenceIndex = 0; + } else { + this.state = c === 45 ? 25 : 23; + } + } + stateInDeclaration(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateInProcessingInstruction(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.onprocessinginstruction(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeComment(c) { + if (c === 45) { + this.state = 28; + this.currentSequence = Sequences.CommentEnd; + this.sequenceIndex = 2; + this.sectionStart = this.index + 1; + } else { + this.state = 23; + } + } + stateInSpecialComment(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.oncomment(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeSpecialS(c) { + if (c === Sequences.ScriptEnd[3]) { + this.startSpecial(Sequences.ScriptEnd, 4); + } else if (c === Sequences.StyleEnd[3]) { + this.startSpecial(Sequences.StyleEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + stateBeforeSpecialT(c) { + if (c === Sequences.TitleEnd[3]) { + this.startSpecial(Sequences.TitleEnd, 4); + } else if (c === Sequences.TextareaEnd[3]) { + this.startSpecial(Sequences.TextareaEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + startEntity() { + } + stateInEntity() { + } + /** + * Iterates through the buffer, calling the function corresponding to the current state. + * + * States that are more likely to be hit are higher up, as a performance improvement. + */ + parse(input) { + this.buffer = input; + while (this.index < this.buffer.length) { + const c = this.buffer.charCodeAt(this.index); + if (c === 10) { + this.newlines.push(this.index); + } + switch (this.state) { + case 1: { + this.stateText(c); + break; + } + case 2: { + this.stateInterpolationOpen(c); + break; + } + case 3: { + this.stateInterpolation(c); + break; + } + case 4: { + this.stateInterpolationClose(c); + break; + } + case 31: { + this.stateSpecialStartSequence(c); + break; + } + case 32: { + this.stateInRCDATA(c); + break; + } + case 26: { + this.stateCDATASequence(c); + break; + } + case 19: { + this.stateInAttrValueDoubleQuotes(c); + break; + } + case 12: { + this.stateInAttrName(c); + break; + } + case 13: { + this.stateInDirName(c); + break; + } + case 14: { + this.stateInDirArg(c); + break; + } + case 15: { + this.stateInDynamicDirArg(c); + break; + } + case 16: { + this.stateInDirModifier(c); + break; + } + case 28: { + this.stateInCommentLike(c); + break; + } + case 27: { + this.stateInSpecialComment(c); + break; + } + case 11: { + this.stateBeforeAttrName(c); + break; + } + case 6: { + this.stateInTagName(c); + break; + } + case 34: { + this.stateInSFCRootTagName(c); + break; + } + case 9: { + this.stateInClosingTagName(c); + break; + } + case 5: { + this.stateBeforeTagName(c); + break; + } + case 17: { + this.stateAfterAttrName(c); + break; + } + case 20: { + this.stateInAttrValueSingleQuotes(c); + break; + } + case 18: { + this.stateBeforeAttrValue(c); + break; + } + case 8: { + this.stateBeforeClosingTagName(c); + break; + } + case 10: { + this.stateAfterClosingTagName(c); + break; + } + case 29: { + this.stateBeforeSpecialS(c); + break; + } + case 30: { + this.stateBeforeSpecialT(c); + break; + } + case 21: { + this.stateInAttrValueNoQuotes(c); + break; + } + case 7: { + this.stateInSelfClosingTag(c); + break; + } + case 23: { + this.stateInDeclaration(c); + break; + } + case 22: { + this.stateBeforeDeclaration(c); + break; + } + case 25: { + this.stateBeforeComment(c); + break; + } + case 24: { + this.stateInProcessingInstruction(c); + break; + } + case 33: { + this.stateInEntity(); + break; + } + } + this.index++; + } + this.cleanup(); + this.finish(); + } + /** + * Remove data that has already been consumed from the buffer. + */ + cleanup() { + if (this.sectionStart !== this.index) { + if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { + this.cbs.ontext(this.sectionStart, this.index); + this.sectionStart = this.index; + } else if (this.state === 19 || this.state === 20 || this.state === 21) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = this.index; + } + } + } + finish() { + this.handleTrailingData(); + this.cbs.onend(); + } + /** Handle any trailing data. */ + handleTrailingData() { + const endIndex = this.buffer.length; + if (this.sectionStart >= endIndex) { + return; + } + if (this.state === 28) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, endIndex); + } else { + this.cbs.oncomment(this.sectionStart, endIndex); + } + } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { + this.cbs.ontext(this.sectionStart, endIndex); + } + } + emitCodePoint(cp, consumed) { + } +} + +function defaultOnError(error) { + throw error; +} +function defaultOnWarn(msg) { + console.warn(`[Vue warn] ${msg.message}`); +} +function createCompilerError(code, loc, messages, additionalMessage) { + const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ; + const error = new SyntaxError(String(msg)); + error.code = code; + error.loc = loc; + return error; +} +const errorMessages = { + // parse errors + [0]: "Illegal comment.", + [1]: "CDATA section is allowed only in XML context.", + [2]: "Duplicate attribute.", + [3]: "End tag cannot have attributes.", + [4]: "Illegal '/' in tags.", + [5]: "Unexpected EOF in tag.", + [6]: "Unexpected EOF in CDATA section.", + [7]: "Unexpected EOF in comment.", + [8]: "Unexpected EOF in script.", + [9]: "Unexpected EOF in tag.", + [10]: "Incorrectly closed comment.", + [11]: "Incorrectly opened comment.", + [12]: "Illegal tag name. Use '<' to print '<'.", + [13]: "Attribute value was expected.", + [14]: "End tag name was expected.", + [15]: "Whitespace was expected.", + [16]: "Unexpected '<!--' in comment.", + [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, + [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", + [19]: "Attribute name cannot start with '='.", + [21]: "'<?' is allowed only in XML context.", + [20]: `Unexpected null character.`, + [22]: "Illegal '/' in tags.", + // Vue-specific parse errors + [23]: "Invalid end tag.", + [24]: "Element is missing end tag.", + [25]: "Interpolation end sign was not found.", + [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", + [26]: "Legal directive name was expected.", + // transform errors + [28]: `v-if/v-else-if is missing expression.`, + [29]: `v-if/else branches must use unique keys.`, + [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, + [31]: `v-for is missing expression.`, + [32]: `v-for has invalid expression.`, + [33]: `<template v-for> key should be placed on the <template> tag.`, + [34]: `v-bind is missing expression.`, + [52]: `v-bind with same-name shorthand only allows static argument.`, + [35]: `v-on is missing expression.`, + [36]: `Unexpected custom directive on <slot> outlet.`, + [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, + [38]: `Duplicate slot names found. `, + [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, + [40]: `v-slot can only be used on components or <template> tags.`, + [41]: `v-model is missing expression.`, + [42]: `v-model value must be a valid JavaScript member expression.`, + [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, + [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. +Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, + [45]: `Error parsing JavaScript expression: `, + [46]: `<KeepAlive> expects exactly one child component.`, + [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, + // generic errors + [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, + [48]: `ES module mode is not supported in this build of compiler.`, + [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, + [50]: `"scopeId" option is only supported in module mode.`, + // just to fulfill types + [53]: `` +}; + +const isStaticExp = (p) => p.type === 4 && p.isStatic; +function isCoreComponent(tag) { + switch (tag) { + case "Teleport": + case "teleport": + return TELEPORT; + case "Suspense": + case "suspense": + return SUSPENSE; + case "KeepAlive": + case "keep-alive": + return KEEP_ALIVE; + case "BaseTransition": + case "base-transition": + return BASE_TRANSITION; + } +} +const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/; +const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); +const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; +const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; +const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; +const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source; +const isMemberExpressionBrowser = (exp) => { + const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim()); + let state = 0 /* inMemberExp */; + let stateStack = []; + let currentOpenBracketCount = 0; + let currentOpenParensCount = 0; + let currentStringType = null; + for (let i = 0; i < path.length; i++) { + const char = path.charAt(i); + switch (state) { + case 0 /* inMemberExp */: + if (char === "[") { + stateStack.push(state); + state = 1 /* inBrackets */; + currentOpenBracketCount++; + } else if (char === "(") { + stateStack.push(state); + state = 2 /* inParens */; + currentOpenParensCount++; + } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { + return false; + } + break; + case 1 /* inBrackets */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `[`) { + currentOpenBracketCount++; + } else if (char === `]`) { + if (!--currentOpenBracketCount) { + state = stateStack.pop(); + } + } + break; + case 2 /* inParens */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `(`) { + currentOpenParensCount++; + } else if (char === `)`) { + if (i === path.length - 1) { + return false; + } + if (!--currentOpenParensCount) { + state = stateStack.pop(); + } + } + break; + case 3 /* inString */: + if (char === currentStringType) { + state = stateStack.pop(); + currentStringType = null; + } + break; + } + } + return !currentOpenBracketCount && !currentOpenParensCount; +}; +const isMemberExpression = isMemberExpressionBrowser ; +const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; +const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp)); +const isFnExpression = isFnExpressionBrowser ; +function assert(condition, msg) { + if (!condition) { + throw new Error(msg || `unexpected compiler condition`); + } +} +function findDir(node, name, allowEmpty = false) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) { + return p; + } + } +} +function findProp(node, name, dynamicOnly = false, allowEmpty = false) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (dynamicOnly) continue; + if (p.name === name && (p.value || allowEmpty)) { + return p; + } + } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { + return p; + } + } +} +function isStaticArgOf(arg, name) { + return !!(arg && isStaticExp(arg) && arg.content === name); +} +function hasDynamicKeyVBind(node) { + return node.props.some( + (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" + p.arg.type !== 4 || // v-bind:[_ctx.foo] + !p.arg.isStatic) + // v-bind:[foo] + ); +} +function isText$1(node) { + return node.type === 5 || node.type === 2; +} +function isVSlot(p) { + return p.type === 7 && p.name === "slot"; +} +function isTemplateNode(node) { + return node.type === 1 && node.tagType === 3; +} +function isSlotOutlet(node) { + return node.type === 1 && node.tagType === 2; +} +const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); +function getUnnormalizedProps(props, callPath = []) { + if (props && !isString(props) && props.type === 14) { + const callee = props.callee; + if (!isString(callee) && propsHelperSet.has(callee)) { + return getUnnormalizedProps( + props.arguments[0], + callPath.concat(props) + ); + } + } + return [props, callPath]; +} +function injectProp(node, prop, context) { + let propsWithInjection; + let props = node.type === 13 ? node.props : node.arguments[2]; + let callPath = []; + let parentCall; + if (props && !isString(props) && props.type === 14) { + const ret = getUnnormalizedProps(props); + props = ret[0]; + callPath = ret[1]; + parentCall = callPath[callPath.length - 1]; + } + if (props == null || isString(props)) { + propsWithInjection = createObjectExpression([prop]); + } else if (props.type === 14) { + const first = props.arguments[0]; + if (!isString(first) && first.type === 15) { + if (!hasProp(prop, first)) { + first.properties.unshift(prop); + } + } else { + if (props.callee === TO_HANDLERS) { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + } else { + props.arguments.unshift(createObjectExpression([prop])); + } + } + !propsWithInjection && (propsWithInjection = props); + } else if (props.type === 15) { + if (!hasProp(prop, props)) { + props.properties.unshift(prop); + } + propsWithInjection = props; + } else { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { + parentCall = callPath[callPath.length - 2]; + } + } + if (node.type === 13) { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.props = propsWithInjection; + } + } else { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.arguments[2] = propsWithInjection; + } + } +} +function hasProp(prop, props) { + let result = false; + if (prop.key.type === 4) { + const propKeyName = prop.key.content; + result = props.properties.some( + (p) => p.key.type === 4 && p.key.content === propKeyName + ); + } + return result; +} +function toValidAssetId(name, type) { + return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { + return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); + })}`; +} +function getMemoedVNodeCall(node) { + if (node.type === 14 && node.callee === WITH_MEMO) { + return node.arguments[1].returns; + } else { + return node; + } +} +const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/; + +const defaultParserOptions = { + parseMode: "base", + ns: 0, + delimiters: [`{{`, `}}`], + getNamespace: () => 0, + isVoidTag: NO, + isPreTag: NO, + isIgnoreNewlineTag: NO, + isCustomElement: NO, + onError: defaultOnError, + onWarn: defaultOnWarn, + comments: true, + prefixIdentifiers: false +}; +let currentOptions = defaultParserOptions; +let currentRoot = null; +let currentInput = ""; +let currentOpenTag = null; +let currentProp = null; +let currentAttrValue = ""; +let currentAttrStartIndex = -1; +let currentAttrEndIndex = -1; +let inPre = 0; +let inVPre = false; +let currentVPreBoundary = null; +const stack = []; +const tokenizer = new Tokenizer(stack, { + onerr: emitError, + ontext(start, end) { + onText(getSlice(start, end), start, end); + }, + ontextentity(char, start, end) { + onText(char, start, end); + }, + oninterpolation(start, end) { + if (inVPre) { + return onText(getSlice(start, end), start, end); + } + let innerStart = start + tokenizer.delimiterOpen.length; + let innerEnd = end - tokenizer.delimiterClose.length; + while (isWhitespace(currentInput.charCodeAt(innerStart))) { + innerStart++; + } + while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { + innerEnd--; + } + let exp = getSlice(innerStart, innerEnd); + if (exp.includes("&")) { + { + exp = currentOptions.decodeEntities(exp, false); + } + } + addNode({ + type: 5, + content: createExp(exp, false, getLoc(innerStart, innerEnd)), + loc: getLoc(start, end) + }); + }, + onopentagname(start, end) { + const name = getSlice(start, end); + currentOpenTag = { + type: 1, + tag: name, + ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), + tagType: 0, + // will be refined on tag close + props: [], + children: [], + loc: getLoc(start - 1, end), + codegenNode: void 0 + }; + }, + onopentagend(end) { + endOpenTag(end); + }, + onclosetag(start, end) { + const name = getSlice(start, end); + if (!currentOptions.isVoidTag(name)) { + let found = false; + for (let i = 0; i < stack.length; i++) { + const e = stack[i]; + if (e.tag.toLowerCase() === name.toLowerCase()) { + found = true; + if (i > 0) { + emitError(24, stack[0].loc.start.offset); + } + for (let j = 0; j <= i; j++) { + const el = stack.shift(); + onCloseTag(el, end, j < i); + } + break; + } + } + if (!found) { + emitError(23, backTrack(start, 60)); + } + } + }, + onselfclosingtag(end) { + const name = currentOpenTag.tag; + currentOpenTag.isSelfClosing = true; + endOpenTag(end); + if (stack[0] && stack[0].tag === name) { + onCloseTag(stack.shift(), end); + } + }, + onattribname(start, end) { + currentProp = { + type: 6, + name: getSlice(start, end), + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + }, + ondirname(start, end) { + const raw = getSlice(start, end); + const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); + if (!inVPre && name === "") { + emitError(26, start); + } + if (inVPre || name === "") { + currentProp = { + type: 6, + name: raw, + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + } else { + currentProp = { + type: 7, + name, + rawName: raw, + exp: void 0, + arg: void 0, + modifiers: raw === "." ? [createSimpleExpression("prop")] : [], + loc: getLoc(start) + }; + if (name === "pre") { + inVPre = tokenizer.inVPre = true; + currentVPreBoundary = currentOpenTag; + const props = currentOpenTag.props; + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7) { + props[i] = dirToAttr(props[i]); + } + } + } + } + }, + ondirarg(start, end) { + if (start === end) return; + const arg = getSlice(start, end); + if (inVPre) { + currentProp.name += arg; + setLocEnd(currentProp.nameLoc, end); + } else { + const isStatic = arg[0] !== `[`; + currentProp.arg = createExp( + isStatic ? arg : arg.slice(1, -1), + isStatic, + getLoc(start, end), + isStatic ? 3 : 0 + ); + } + }, + ondirmodifier(start, end) { + const mod = getSlice(start, end); + if (inVPre) { + currentProp.name += "." + mod; + setLocEnd(currentProp.nameLoc, end); + } else if (currentProp.name === "slot") { + const arg = currentProp.arg; + if (arg) { + arg.content += "." + mod; + setLocEnd(arg.loc, end); + } + } else { + const exp = createSimpleExpression(mod, true, getLoc(start, end)); + currentProp.modifiers.push(exp); + } + }, + onattribdata(start, end) { + currentAttrValue += getSlice(start, end); + if (currentAttrStartIndex < 0) currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribentity(char, start, end) { + currentAttrValue += char; + if (currentAttrStartIndex < 0) currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribnameend(end) { + const start = currentProp.loc.start.offset; + const name = getSlice(start, end); + if (currentProp.type === 7) { + currentProp.rawName = name; + } + if (currentOpenTag.props.some( + (p) => (p.type === 7 ? p.rawName : p.name) === name + )) { + emitError(2, start); + } + }, + onattribend(quote, end) { + if (currentOpenTag && currentProp) { + setLocEnd(currentProp.loc, end); + if (quote !== 0) { + if (currentAttrValue.includes("&")) { + currentAttrValue = currentOptions.decodeEntities( + currentAttrValue, + true + ); + } + if (currentProp.type === 6) { + if (currentProp.name === "class") { + currentAttrValue = condense(currentAttrValue).trim(); + } + if (quote === 1 && !currentAttrValue) { + emitError(13, end); + } + currentProp.value = { + type: 2, + content: currentAttrValue, + loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) + }; + if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { + tokenizer.enterRCDATA(toCharCodes(`</template`), 0); + } + } else { + let expParseMode = 0 /* Normal */; + currentProp.exp = createExp( + currentAttrValue, + false, + getLoc(currentAttrStartIndex, currentAttrEndIndex), + 0, + expParseMode + ); + if (currentProp.name === "for") { + currentProp.forParseResult = parseForExpression(currentProp.exp); + } + } + } + if (currentProp.type !== 7 || currentProp.name !== "pre") { + currentOpenTag.props.push(currentProp); + } + } + currentAttrValue = ""; + currentAttrStartIndex = currentAttrEndIndex = -1; + }, + oncomment(start, end) { + if (currentOptions.comments) { + addNode({ + type: 3, + content: getSlice(start, end), + loc: getLoc(start - 4, end + 3) + }); + } + }, + onend() { + const end = currentInput.length; + if (tokenizer.state !== 1) { + switch (tokenizer.state) { + case 5: + case 8: + emitError(5, end); + break; + case 3: + case 4: + emitError( + 25, + tokenizer.sectionStart + ); + break; + case 28: + if (tokenizer.currentSequence === Sequences.CdataEnd) { + emitError(6, end); + } else { + emitError(7, end); + } + break; + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + // " + case 20: + // ' + case 21: + emitError(9, end); + break; + } + } + for (let index = 0; index < stack.length; index++) { + onCloseTag(stack[index], end - 1); + emitError(24, stack[index].loc.start.offset); + } + }, + oncdata(start, end) { + if (stack[0].ns !== 0) { + onText(getSlice(start, end), start, end); + } else { + emitError(1, start - 9); + } + }, + onprocessinginstruction(start) { + if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + emitError( + 21, + start - 1 + ); + } + } +}); +const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; +const stripParensRE = /^\(|\)$/g; +function parseForExpression(input) { + const loc = input.loc; + const exp = input.content; + const inMatch = exp.match(forAliasRE); + if (!inMatch) return; + const [, LHS, RHS] = inMatch; + const createAliasExpression = (content, offset, asParam = false) => { + const start = loc.start.offset + offset; + const end = start + content.length; + return createExp( + content, + false, + getLoc(start, end), + 0, + asParam ? 1 /* Params */ : 0 /* Normal */ + ); + }; + const result = { + source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), + value: void 0, + key: void 0, + index: void 0, + finalized: false + }; + let valueContent = LHS.trim().replace(stripParensRE, "").trim(); + const trimmedOffset = LHS.indexOf(valueContent); + const iteratorMatch = valueContent.match(forIteratorRE); + if (iteratorMatch) { + valueContent = valueContent.replace(forIteratorRE, "").trim(); + const keyContent = iteratorMatch[1].trim(); + let keyOffset; + if (keyContent) { + keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); + result.key = createAliasExpression(keyContent, keyOffset, true); + } + if (iteratorMatch[2]) { + const indexContent = iteratorMatch[2].trim(); + if (indexContent) { + result.index = createAliasExpression( + indexContent, + exp.indexOf( + indexContent, + result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length + ), + true + ); + } + } + } + if (valueContent) { + result.value = createAliasExpression(valueContent, trimmedOffset, true); + } + return result; +} +function getSlice(start, end) { + return currentInput.slice(start, end); +} +function endOpenTag(end) { + if (tokenizer.inSFCRoot) { + currentOpenTag.innerLoc = getLoc(end + 1, end + 1); + } + addNode(currentOpenTag); + const { tag, ns } = currentOpenTag; + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre++; + } + if (currentOptions.isVoidTag(tag)) { + onCloseTag(currentOpenTag, end); + } else { + stack.unshift(currentOpenTag); + if (ns === 1 || ns === 2) { + tokenizer.inXML = true; + } + } + currentOpenTag = null; +} +function onText(content, start, end) { + { + const tag = stack[0] && stack[0].tag; + if (tag !== "script" && tag !== "style" && content.includes("&")) { + content = currentOptions.decodeEntities(content, false); + } + } + const parent = stack[0] || currentRoot; + const lastNode = parent.children[parent.children.length - 1]; + if (lastNode && lastNode.type === 2) { + lastNode.content += content; + setLocEnd(lastNode.loc, end); + } else { + parent.children.push({ + type: 2, + content, + loc: getLoc(start, end) + }); + } +} +function onCloseTag(el, end, isImplied = false) { + if (isImplied) { + setLocEnd(el.loc, backTrack(end, 60)); + } else { + setLocEnd(el.loc, lookAhead(end, 62) + 1); + } + if (tokenizer.inSFCRoot) { + if (el.children.length) { + el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end); + } else { + el.innerLoc.end = extend({}, el.innerLoc.start); + } + el.innerLoc.source = getSlice( + el.innerLoc.start.offset, + el.innerLoc.end.offset + ); + } + const { tag, ns, children } = el; + if (!inVPre) { + if (tag === "slot") { + el.tagType = 2; + } else if (isFragmentTemplate(el)) { + el.tagType = 3; + } else if (isComponent(el)) { + el.tagType = 1; + } + } + if (!tokenizer.inRCDATA) { + el.children = condenseWhitespace(children); + } + if (ns === 0 && currentOptions.isIgnoreNewlineTag(tag)) { + const first = children[0]; + if (first && first.type === 2) { + first.content = first.content.replace(/^\r?\n/, ""); + } + } + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre--; + } + if (currentVPreBoundary === el) { + inVPre = tokenizer.inVPre = false; + currentVPreBoundary = null; + } + if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + tokenizer.inXML = false; + } +} +function lookAhead(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1) i++; + return i; +} +function backTrack(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i >= 0) i--; + return i; +} +const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); +function isFragmentTemplate({ tag, props }) { + if (tag === "template") { + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { + return true; + } + } + } + return false; +} +function isComponent({ tag, props }) { + if (currentOptions.isCustomElement(tag)) { + return false; + } + if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { + return true; + } + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 6) { + if (p.name === "is" && p.value) { + if (p.value.content.startsWith("vue:")) { + return true; + } + } + } + } + return false; +} +function isUpperCase(c) { + return c > 64 && c < 91; +} +const windowsNewlineRE = /\r\n/g; +function condenseWhitespace(nodes, tag) { + const shouldCondense = currentOptions.whitespace !== "preserve"; + let removedWhitespace = false; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (node.type === 2) { + if (!inPre) { + if (isAllWhitespace(node.content)) { + const prev = nodes[i - 1] && nodes[i - 1].type; + const next = nodes[i + 1] && nodes[i + 1].type; + if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { + removedWhitespace = true; + nodes[i] = null; + } else { + node.content = " "; + } + } else if (shouldCondense) { + node.content = condense(node.content); + } + } else { + node.content = node.content.replace(windowsNewlineRE, "\n"); + } + } + } + return removedWhitespace ? nodes.filter(Boolean) : nodes; +} +function isAllWhitespace(str) { + for (let i = 0; i < str.length; i++) { + if (!isWhitespace(str.charCodeAt(i))) { + return false; + } + } + return true; +} +function hasNewlineChar(str) { + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + if (c === 10 || c === 13) { + return true; + } + } + return false; +} +function condense(str) { + let ret = ""; + let prevCharIsWhitespace = false; + for (let i = 0; i < str.length; i++) { + if (isWhitespace(str.charCodeAt(i))) { + if (!prevCharIsWhitespace) { + ret += " "; + prevCharIsWhitespace = true; + } + } else { + ret += str[i]; + prevCharIsWhitespace = false; + } + } + return ret; +} +function addNode(node) { + (stack[0] || currentRoot).children.push(node); +} +function getLoc(start, end) { + return { + start: tokenizer.getPos(start), + // @ts-expect-error allow late attachment + end: end == null ? end : tokenizer.getPos(end), + // @ts-expect-error allow late attachment + source: end == null ? end : getSlice(start, end) + }; +} +function cloneLoc(loc) { + return getLoc(loc.start.offset, loc.end.offset); +} +function setLocEnd(loc, end) { + loc.end = tokenizer.getPos(end); + loc.source = getSlice(loc.start.offset, end); +} +function dirToAttr(dir) { + const attr = { + type: 6, + name: dir.rawName, + nameLoc: getLoc( + dir.loc.start.offset, + dir.loc.start.offset + dir.rawName.length + ), + value: void 0, + loc: dir.loc + }; + if (dir.exp) { + const loc = dir.exp.loc; + if (loc.end.offset < dir.loc.end.offset) { + loc.start.offset--; + loc.start.column--; + loc.end.offset++; + loc.end.column++; + } + attr.value = { + type: 2, + content: dir.exp.content, + loc + }; + } + return attr; +} +function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { + const exp = createSimpleExpression(content, isStatic, loc, constType); + return exp; +} +function emitError(code, index, message) { + currentOptions.onError( + createCompilerError(code, getLoc(index, index), void 0, message) + ); +} +function reset() { + tokenizer.reset(); + currentOpenTag = null; + currentProp = null; + currentAttrValue = ""; + currentAttrStartIndex = -1; + currentAttrEndIndex = -1; + stack.length = 0; +} +function baseParse(input, options) { + reset(); + currentInput = input; + currentOptions = extend({}, defaultParserOptions); + if (options) { + let key; + for (key in options) { + if (options[key] != null) { + currentOptions[key] = options[key]; + } + } + } + { + if (!currentOptions.decodeEntities) { + throw new Error( + `[@vue/compiler-core] decodeEntities option is required in browser builds.` + ); + } + } + tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; + tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; + const delimiters = options && options.delimiters; + if (delimiters) { + tokenizer.delimiterOpen = toCharCodes(delimiters[0]); + tokenizer.delimiterClose = toCharCodes(delimiters[1]); + } + const root = currentRoot = createRoot([], input); + tokenizer.parse(currentInput); + root.loc = getLoc(0, input.length); + root.children = condenseWhitespace(root.children); + currentRoot = null; + return root; +} + +function cacheStatic(root, context) { + walk( + root, + void 0, + context, + // Root node is unfortunately non-hoistable due to potential parent + // fallthrough attributes. + isSingleElementRoot(root, root.children[0]) + ); +} +function isSingleElementRoot(root, child) { + const { children } = root; + return children.length === 1 && child.type === 1 && !isSlotOutlet(child); +} +function walk(node, parent, context, doNotHoistNode = false, inFor = false) { + const { children } = node; + const toCache = []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.type === 1 && child.tagType === 0) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType > 0) { + if (constantType >= 2) { + child.codegenNode.patchFlag = -1; + toCache.push(child); + continue; + } + } else { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + const flag = codegenNode.patchFlag; + if ((flag === void 0 || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { + const props = getNodeProps(child); + if (props) { + codegenNode.props = context.hoist(props); + } + } + if (codegenNode.dynamicProps) { + codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); + } + } + } + } else if (child.type === 12) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType >= 2) { + toCache.push(child); + continue; + } + } + if (child.type === 1) { + const isComponent = child.tagType === 1; + if (isComponent) { + context.scopes.vSlot++; + } + walk(child, node, context, false, inFor); + if (isComponent) { + context.scopes.vSlot--; + } + } else if (child.type === 11) { + walk(child, node, context, child.children.length === 1, true); + } else if (child.type === 9) { + for (let i2 = 0; i2 < child.branches.length; i2++) { + walk( + child.branches[i2], + node, + context, + child.branches[i2].children.length === 1, + inFor + ); + } + } + } + let cachedAsArray = false; + if (toCache.length === children.length && node.type === 1) { + if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) { + node.codegenNode.children = getCacheExpression( + createArrayExpression(node.codegenNode.children) + ); + cachedAsArray = true; + } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) { + const slot = getSlotNode(node.codegenNode, "default"); + if (slot) { + slot.returns = getCacheExpression( + createArrayExpression(slot.returns) + ); + cachedAsArray = true; + } + } else if (node.tagType === 3 && parent && parent.type === 1 && parent.tagType === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 15) { + const slotName = findDir(node, "slot", true); + const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg); + if (slot) { + slot.returns = getCacheExpression( + createArrayExpression(slot.returns) + ); + cachedAsArray = true; + } + } + } + if (!cachedAsArray) { + for (const child of toCache) { + child.codegenNode = context.cache(child.codegenNode); + } + } + function getCacheExpression(value) { + const exp = context.cache(value); + if (inFor && context.hmr) { + exp.needArraySpread = true; + } + return exp; + } + function getSlotNode(node2, name) { + if (node2.children && !isArray(node2.children) && node2.children.type === 15) { + const slot = node2.children.properties.find( + (p) => p.key === name || p.key.content === name + ); + return slot && slot.value; + } + } + if (toCache.length && context.transformHoist) { + context.transformHoist(children, context, node); + } +} +function getConstantType(node, context) { + const { constantCache } = context; + switch (node.type) { + case 1: + if (node.tagType !== 0) { + return 0; + } + const cached = constantCache.get(node); + if (cached !== void 0) { + return cached; + } + const codegenNode = node.codegenNode; + if (codegenNode.type !== 13) { + return 0; + } + if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject" && node.tag !== "math") { + return 0; + } + if (codegenNode.patchFlag === void 0) { + let returnType2 = 3; + const generatedPropsType = getGeneratedPropsConstantType(node, context); + if (generatedPropsType === 0) { + constantCache.set(node, 0); + return 0; + } + if (generatedPropsType < returnType2) { + returnType2 = generatedPropsType; + } + for (let i = 0; i < node.children.length; i++) { + const childType = getConstantType(node.children[i], context); + if (childType === 0) { + constantCache.set(node, 0); + return 0; + } + if (childType < returnType2) { + returnType2 = childType; + } + } + if (returnType2 > 1) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && p.name === "bind" && p.exp) { + const expType = getConstantType(p.exp, context); + if (expType === 0) { + constantCache.set(node, 0); + return 0; + } + if (expType < returnType2) { + returnType2 = expType; + } + } + } + } + if (codegenNode.isBlock) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7) { + constantCache.set(node, 0); + return 0; + } + } + context.removeHelper(OPEN_BLOCK); + context.removeHelper( + getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) + ); + codegenNode.isBlock = false; + context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); + } + constantCache.set(node, returnType2); + return returnType2; + } else { + constantCache.set(node, 0); + return 0; + } + case 2: + case 3: + return 3; + case 9: + case 11: + case 10: + return 0; + case 5: + case 12: + return getConstantType(node.content, context); + case 4: + return node.constType; + case 8: + let returnType = 3; + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child) || isSymbol(child)) { + continue; + } + const childType = getConstantType(child, context); + if (childType === 0) { + return 0; + } else if (childType < returnType) { + returnType = childType; + } + } + return returnType; + case 20: + return 2; + default: + return 0; + } +} +const allowHoistedHelperSet = /* @__PURE__ */ new Set([ + NORMALIZE_CLASS, + NORMALIZE_STYLE, + NORMALIZE_PROPS, + GUARD_REACTIVE_PROPS +]); +function getConstantTypeOfHelperCall(value, context) { + if (value.type === 14 && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { + const arg = value.arguments[0]; + if (arg.type === 4) { + return getConstantType(arg, context); + } else if (arg.type === 14) { + return getConstantTypeOfHelperCall(arg, context); + } + } + return 0; +} +function getGeneratedPropsConstantType(node, context) { + let returnType = 3; + const props = getNodeProps(node); + if (props && props.type === 15) { + const { properties } = props; + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + const keyType = getConstantType(key, context); + if (keyType === 0) { + return keyType; + } + if (keyType < returnType) { + returnType = keyType; + } + let valueType; + if (value.type === 4) { + valueType = getConstantType(value, context); + } else if (value.type === 14) { + valueType = getConstantTypeOfHelperCall(value, context); + } else { + valueType = 0; + } + if (valueType === 0) { + return valueType; + } + if (valueType < returnType) { + returnType = valueType; + } + } + } + return returnType; +} +function getNodeProps(node) { + const codegenNode = node.codegenNode; + if (codegenNode.type === 13) { + return codegenNode.props; + } +} + +function createTransformContext(root, { + filename = "", + prefixIdentifiers = false, + hoistStatic = false, + hmr = false, + cacheHandlers = false, + nodeTransforms = [], + directiveTransforms = {}, + transformHoist = null, + isBuiltInComponent = NOOP, + isCustomElement = NOOP, + expressionPlugins = [], + scopeId = null, + slotted = true, + ssr = false, + inSSR = false, + ssrCssVars = ``, + bindingMetadata = EMPTY_OBJ, + inline = false, + isTS = false, + onError = defaultOnError, + onWarn = defaultOnWarn, + compatConfig +}) { + const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); + const context = { + // options + filename, + selfName: nameMatch && capitalize(camelize(nameMatch[1])), + prefixIdentifiers, + hoistStatic, + hmr, + cacheHandlers, + nodeTransforms, + directiveTransforms, + transformHoist, + isBuiltInComponent, + isCustomElement, + expressionPlugins, + scopeId, + slotted, + ssr, + inSSR, + ssrCssVars, + bindingMetadata, + inline, + isTS, + onError, + onWarn, + compatConfig, + // state + root, + helpers: /* @__PURE__ */ new Map(), + components: /* @__PURE__ */ new Set(), + directives: /* @__PURE__ */ new Set(), + hoists: [], + imports: [], + cached: [], + constantCache: /* @__PURE__ */ new WeakMap(), + temps: 0, + identifiers: /* @__PURE__ */ Object.create(null), + scopes: { + vFor: 0, + vSlot: 0, + vPre: 0, + vOnce: 0 + }, + parent: null, + grandParent: null, + currentNode: root, + childIndex: 0, + inVOnce: false, + // methods + helper(name) { + const count = context.helpers.get(name) || 0; + context.helpers.set(name, count + 1); + return name; + }, + removeHelper(name) { + const count = context.helpers.get(name); + if (count) { + const currentCount = count - 1; + if (!currentCount) { + context.helpers.delete(name); + } else { + context.helpers.set(name, currentCount); + } + } + }, + helperString(name) { + return `_${helperNameMap[context.helper(name)]}`; + }, + replaceNode(node) { + { + if (!context.currentNode) { + throw new Error(`Node being replaced is already removed.`); + } + if (!context.parent) { + throw new Error(`Cannot replace root node.`); + } + } + context.parent.children[context.childIndex] = context.currentNode = node; + }, + removeNode(node) { + if (!context.parent) { + throw new Error(`Cannot remove root node.`); + } + const list = context.parent.children; + const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; + if (removalIndex < 0) { + throw new Error(`node being removed is not a child of current parent`); + } + if (!node || node === context.currentNode) { + context.currentNode = null; + context.onNodeRemoved(); + } else { + if (context.childIndex > removalIndex) { + context.childIndex--; + context.onNodeRemoved(); + } + } + context.parent.children.splice(removalIndex, 1); + }, + onNodeRemoved: NOOP, + addIdentifiers(exp) { + }, + removeIdentifiers(exp) { + }, + hoist(exp) { + if (isString(exp)) exp = createSimpleExpression(exp); + context.hoists.push(exp); + const identifier = createSimpleExpression( + `_hoisted_${context.hoists.length}`, + false, + exp.loc, + 2 + ); + identifier.hoisted = exp; + return identifier; + }, + cache(exp, isVNode = false, inVOnce = false) { + const cacheExp = createCacheExpression( + context.cached.length, + exp, + isVNode, + inVOnce + ); + context.cached.push(cacheExp); + return cacheExp; + } + }; + return context; +} +function transform(root, options) { + const context = createTransformContext(root, options); + traverseNode(root, context); + if (options.hoistStatic) { + cacheStatic(root, context); + } + if (!options.ssr) { + createRootCodegen(root, context); + } + root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); + root.components = [...context.components]; + root.directives = [...context.directives]; + root.imports = context.imports; + root.hoists = context.hoists; + root.temps = context.temps; + root.cached = context.cached; + root.transformed = true; +} +function createRootCodegen(root, context) { + const { helper } = context; + const { children } = root; + if (children.length === 1) { + const child = children[0]; + if (isSingleElementRoot(root, child) && child.codegenNode) { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + convertToBlock(codegenNode, context); + } + root.codegenNode = codegenNode; + } else { + root.codegenNode = child; + } + } else if (children.length > 1) { + let patchFlag = 64; + if (children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + } + root.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + root.children, + patchFlag, + void 0, + void 0, + true, + void 0, + false + ); + } else ; +} +function traverseChildren(parent, context) { + let i = 0; + const nodeRemoved = () => { + i--; + }; + for (; i < parent.children.length; i++) { + const child = parent.children[i]; + if (isString(child)) continue; + context.grandParent = context.parent; + context.parent = parent; + context.childIndex = i; + context.onNodeRemoved = nodeRemoved; + traverseNode(child, context); + } +} +function traverseNode(node, context) { + context.currentNode = node; + const { nodeTransforms } = context; + const exitFns = []; + for (let i2 = 0; i2 < nodeTransforms.length; i2++) { + const onExit = nodeTransforms[i2](node, context); + if (onExit) { + if (isArray(onExit)) { + exitFns.push(...onExit); + } else { + exitFns.push(onExit); + } + } + if (!context.currentNode) { + return; + } else { + node = context.currentNode; + } + } + switch (node.type) { + case 3: + if (!context.ssr) { + context.helper(CREATE_COMMENT); + } + break; + case 5: + if (!context.ssr) { + context.helper(TO_DISPLAY_STRING); + } + break; + // for container types, further traverse downwards + case 9: + for (let i2 = 0; i2 < node.branches.length; i2++) { + traverseNode(node.branches[i2], context); + } + break; + case 10: + case 11: + case 1: + case 0: + traverseChildren(node, context); + break; + } + context.currentNode = node; + let i = exitFns.length; + while (i--) { + exitFns[i](); + } +} +function createStructuralDirectiveTransform(name, fn) { + const matches = isString(name) ? (n) => n === name : (n) => name.test(n); + return (node, context) => { + if (node.type === 1) { + const { props } = node; + if (node.tagType === 3 && props.some(isVSlot)) { + return; + } + const exitFns = []; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 7 && matches(prop.name)) { + props.splice(i, 1); + i--; + const onExit = fn(node, prop, context); + if (onExit) exitFns.push(onExit); + } + } + return exitFns; + } + }; +} + +const PURE_ANNOTATION = `/*@__PURE__*/`; +const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; +function createCodegenContext(ast, { + mode = "function", + prefixIdentifiers = mode === "module", + sourceMap = false, + filename = `template.vue.html`, + scopeId = null, + optimizeImports = false, + runtimeGlobalName = `Vue`, + runtimeModuleName = `vue`, + ssrRuntimeModuleName = "vue/server-renderer", + ssr = false, + isTS = false, + inSSR = false +}) { + const context = { + mode, + prefixIdentifiers, + sourceMap, + filename, + scopeId, + optimizeImports, + runtimeGlobalName, + runtimeModuleName, + ssrRuntimeModuleName, + ssr, + isTS, + inSSR, + source: ast.source, + code: ``, + column: 1, + line: 1, + offset: 0, + indentLevel: 0, + pure: false, + map: void 0, + helper(key) { + return `_${helperNameMap[key]}`; + }, + push(code, newlineIndex = -2 /* None */, node) { + context.code += code; + }, + indent() { + newline(++context.indentLevel); + }, + deindent(withoutNewLine = false) { + if (withoutNewLine) { + --context.indentLevel; + } else { + newline(--context.indentLevel); + } + }, + newline() { + newline(context.indentLevel); + } + }; + function newline(n) { + context.push("\n" + ` `.repeat(n), 0 /* Start */); + } + return context; +} +function generate(ast, options = {}) { + const context = createCodegenContext(ast, options); + if (options.onContextCreated) options.onContextCreated(context); + const { + mode, + push, + prefixIdentifiers, + indent, + deindent, + newline, + scopeId, + ssr + } = context; + const helpers = Array.from(ast.helpers); + const hasHelpers = helpers.length > 0; + const useWithBlock = !prefixIdentifiers && mode !== "module"; + const preambleContext = context; + { + genFunctionPreamble(ast, preambleContext); + } + const functionName = ssr ? `ssrRender` : `render`; + const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; + const signature = args.join(", "); + { + push(`function ${functionName}(${signature}) {`); + } + indent(); + if (useWithBlock) { + push(`with (_ctx) {`); + indent(); + if (hasHelpers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue +`, + -1 /* End */ + ); + newline(); + } + } + if (ast.components.length) { + genAssets(ast.components, "component", context); + if (ast.directives.length || ast.temps > 0) { + newline(); + } + } + if (ast.directives.length) { + genAssets(ast.directives, "directive", context); + if (ast.temps > 0) { + newline(); + } + } + if (ast.temps > 0) { + push(`let `); + for (let i = 0; i < ast.temps; i++) { + push(`${i > 0 ? `, ` : ``}_temp${i}`); + } + } + if (ast.components.length || ast.directives.length || ast.temps) { + push(` +`, 0 /* Start */); + newline(); + } + if (!ssr) { + push(`return `); + } + if (ast.codegenNode) { + genNode(ast.codegenNode, context); + } else { + push(`null`); + } + if (useWithBlock) { + deindent(); + push(`}`); + } + deindent(); + push(`}`); + return { + ast, + code: context.code, + preamble: ``, + map: context.map ? context.map.toJSON() : void 0 + }; +} +function genFunctionPreamble(ast, context) { + const { + ssr, + prefixIdentifiers, + push, + newline, + runtimeModuleName, + runtimeGlobalName, + ssrRuntimeModuleName + } = context; + const VueBinding = runtimeGlobalName; + const helpers = Array.from(ast.helpers); + if (helpers.length > 0) { + { + push(`const _Vue = ${VueBinding} +`, -1 /* End */); + if (ast.hoists.length) { + const staticHelpers = [ + CREATE_VNODE, + CREATE_ELEMENT_VNODE, + CREATE_COMMENT, + CREATE_TEXT, + CREATE_STATIC + ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); + push(`const { ${staticHelpers} } = _Vue +`, -1 /* End */); + } + } + } + genHoists(ast.hoists, context); + newline(); + push(`return `); +} +function genAssets(assets, type, { helper, push, newline, isTS }) { + const resolver = helper( + type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE + ); + for (let i = 0; i < assets.length; i++) { + let id = assets[i]; + const maybeSelfReference = id.endsWith("__self"); + if (maybeSelfReference) { + id = id.slice(0, -6); + } + push( + `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` + ); + if (i < assets.length - 1) { + newline(); + } + } +} +function genHoists(hoists, context) { + if (!hoists.length) { + return; + } + context.pure = true; + const { push, newline } = context; + newline(); + for (let i = 0; i < hoists.length; i++) { + const exp = hoists[i]; + if (exp) { + push(`const _hoisted_${i + 1} = `); + genNode(exp, context); + newline(); + } + } + context.pure = false; +} +function isText(n) { + return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; +} +function genNodeListAsArray(nodes, context) { + const multilines = nodes.length > 3 || nodes.some((n) => isArray(n) || !isText(n)); + context.push(`[`); + multilines && context.indent(); + genNodeList(nodes, context, multilines); + multilines && context.deindent(); + context.push(`]`); +} +function genNodeList(nodes, context, multilines = false, comma = true) { + const { push, newline } = context; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (isString(node)) { + push(node, -3 /* Unknown */); + } else if (isArray(node)) { + genNodeListAsArray(node, context); + } else { + genNode(node, context); + } + if (i < nodes.length - 1) { + if (multilines) { + comma && push(","); + newline(); + } else { + comma && push(", "); + } + } + } +} +function genNode(node, context) { + if (isString(node)) { + context.push(node, -3 /* Unknown */); + return; + } + if (isSymbol(node)) { + context.push(context.helper(node)); + return; + } + switch (node.type) { + case 1: + case 9: + case 11: + assert( + node.codegenNode != null, + `Codegen node is missing for element/if/for node. Apply appropriate transforms first.` + ); + genNode(node.codegenNode, context); + break; + case 2: + genText(node, context); + break; + case 4: + genExpression(node, context); + break; + case 5: + genInterpolation(node, context); + break; + case 12: + genNode(node.codegenNode, context); + break; + case 8: + genCompoundExpression(node, context); + break; + case 3: + genComment(node, context); + break; + case 13: + genVNodeCall(node, context); + break; + case 14: + genCallExpression(node, context); + break; + case 15: + genObjectExpression(node, context); + break; + case 17: + genArrayExpression(node, context); + break; + case 18: + genFunctionExpression(node, context); + break; + case 19: + genConditionalExpression(node, context); + break; + case 20: + genCacheExpression(node, context); + break; + case 21: + genNodeList(node.body, context, true, false); + break; + // SSR only types + case 22: + break; + case 23: + break; + case 24: + break; + case 25: + break; + case 26: + break; + /* v8 ignore start */ + case 10: + break; + default: + { + assert(false, `unhandled codegen node type: ${node.type}`); + const exhaustiveCheck = node; + return exhaustiveCheck; + } + } +} +function genText(node, context) { + context.push(JSON.stringify(node.content), -3 /* Unknown */, node); +} +function genExpression(node, context) { + const { content, isStatic } = node; + context.push( + isStatic ? JSON.stringify(content) : content, + -3 /* Unknown */, + node + ); +} +function genInterpolation(node, context) { + const { push, helper, pure } = context; + if (pure) push(PURE_ANNOTATION); + push(`${helper(TO_DISPLAY_STRING)}(`); + genNode(node.content, context); + push(`)`); +} +function genCompoundExpression(node, context) { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child)) { + context.push(child, -3 /* Unknown */); + } else { + genNode(child, context); + } + } +} +function genExpressionAsPropertyKey(node, context) { + const { push } = context; + if (node.type === 8) { + push(`[`); + genCompoundExpression(node, context); + push(`]`); + } else if (node.isStatic) { + const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); + push(text, -2 /* None */, node); + } else { + push(`[${node.content}]`, -3 /* Unknown */, node); + } +} +function genComment(node, context) { + const { push, helper, pure } = context; + if (pure) { + push(PURE_ANNOTATION); + } + push( + `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, + -3 /* Unknown */, + node + ); +} +function genVNodeCall(node, context) { + const { push, helper, pure } = context; + const { + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent + } = node; + let patchFlagString; + if (patchFlag) { + { + if (patchFlag < 0) { + patchFlagString = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; + } else { + const flagNames = Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `); + patchFlagString = patchFlag + ` /* ${flagNames} */`; + } + } + } + if (directives) { + push(helper(WITH_DIRECTIVES) + `(`); + } + if (isBlock) { + push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); + } + if (pure) { + push(PURE_ANNOTATION); + } + const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); + push(helper(callHelper) + `(`, -2 /* None */, node); + genNodeList( + genNullableArgs([tag, props, children, patchFlagString, dynamicProps]), + context + ); + push(`)`); + if (isBlock) { + push(`)`); + } + if (directives) { + push(`, `); + genNode(directives, context); + push(`)`); + } +} +function genNullableArgs(args) { + let i = args.length; + while (i--) { + if (args[i] != null) break; + } + return args.slice(0, i + 1).map((arg) => arg || `null`); +} +function genCallExpression(node, context) { + const { push, helper, pure } = context; + const callee = isString(node.callee) ? node.callee : helper(node.callee); + if (pure) { + push(PURE_ANNOTATION); + } + push(callee + `(`, -2 /* None */, node); + genNodeList(node.arguments, context); + push(`)`); +} +function genObjectExpression(node, context) { + const { push, indent, deindent, newline } = context; + const { properties } = node; + if (!properties.length) { + push(`{}`, -2 /* None */, node); + return; + } + const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4); + push(multilines ? `{` : `{ `); + multilines && indent(); + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + genExpressionAsPropertyKey(key, context); + push(`: `); + genNode(value, context); + if (i < properties.length - 1) { + push(`,`); + newline(); + } + } + multilines && deindent(); + push(multilines ? `}` : ` }`); +} +function genArrayExpression(node, context) { + genNodeListAsArray(node.elements, context); +} +function genFunctionExpression(node, context) { + const { push, indent, deindent } = context; + const { params, returns, body, newline, isSlot } = node; + if (isSlot) { + push(`_${helperNameMap[WITH_CTX]}(`); + } + push(`(`, -2 /* None */, node); + if (isArray(params)) { + genNodeList(params, context); + } else if (params) { + genNode(params, context); + } + push(`) => `); + if (newline || body) { + push(`{`); + indent(); + } + if (returns) { + if (newline) { + push(`return `); + } + if (isArray(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); + } + } else if (body) { + genNode(body, context); + } + if (newline || body) { + deindent(); + push(`}`); + } + if (isSlot) { + push(`)`); + } +} +function genConditionalExpression(node, context) { + const { test, consequent, alternate, newline: needNewline } = node; + const { push, indent, deindent, newline } = context; + if (test.type === 4) { + const needsParens = !isSimpleIdentifier(test.content); + needsParens && push(`(`); + genExpression(test, context); + needsParens && push(`)`); + } else { + push(`(`); + genNode(test, context); + push(`)`); + } + needNewline && indent(); + context.indentLevel++; + needNewline || push(` `); + push(`? `); + genNode(consequent, context); + context.indentLevel--; + needNewline && newline(); + needNewline || push(` `); + push(`: `); + const isNested = alternate.type === 19; + if (!isNested) { + context.indentLevel++; + } + genNode(alternate, context); + if (!isNested) { + context.indentLevel--; + } + needNewline && deindent( + true + /* without newline */ + ); +} +function genCacheExpression(node, context) { + const { push, helper, indent, deindent, newline } = context; + const { needPauseTracking, needArraySpread } = node; + if (needArraySpread) { + push(`[...(`); + } + push(`_cache[${node.index}] || (`); + if (needPauseTracking) { + indent(); + push(`${helper(SET_BLOCK_TRACKING)}(-1`); + if (node.inVOnce) push(`, true`); + push(`),`); + newline(); + push(`(`); + } + push(`_cache[${node.index}] = `); + genNode(node.value, context); + if (needPauseTracking) { + push(`).cacheIndex = ${node.index},`); + newline(); + push(`${helper(SET_BLOCK_TRACKING)}(1),`); + newline(); + push(`_cache[${node.index}]`); + deindent(); + } + push(`)`); + if (needArraySpread) { + push(`)]`); + } +} + +const prohibitedKeywordRE = new RegExp( + "\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b" +); +const stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g; +function validateBrowserExpression(node, context, asParams = false, asRawStatements = false) { + const exp = node.content; + if (!exp.trim()) { + return; + } + try { + new Function( + asRawStatements ? ` ${exp} ` : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}` + ); + } catch (e) { + let message = e.message; + const keywordMatch = exp.replace(stripStringRE, "").match(prohibitedKeywordRE); + if (keywordMatch) { + message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`; + } + context.onError( + createCompilerError( + 45, + node.loc, + void 0, + message + ) + ); + } +} + +const transformExpression = (node, context) => { + if (node.type === 5) { + node.content = processExpression( + node.content, + context + ); + } else if (node.type === 1) { + const memo = findDir(node, "memo"); + for (let i = 0; i < node.props.length; i++) { + const dir = node.props[i]; + if (dir.type === 7 && dir.name !== "for") { + const exp = dir.exp; + const arg = dir.arg; + if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor) + !(memo && arg && arg.type === 4 && arg.content === "key")) { + dir.exp = processExpression( + exp, + context, + // slot args must be processed as function params + dir.name === "slot" + ); + } + if (arg && arg.type === 4 && !arg.isStatic) { + dir.arg = processExpression(arg, context); + } + } + } + } +}; +function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { + { + { + validateBrowserExpression(node, context, asParams, asRawStatements); + } + return node; + } +} + +const transformIf = createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + (node, dir, context) => { + return processIf(node, dir, context, (ifNode, branch, isRoot) => { + const siblings = context.parent.children; + let i = siblings.indexOf(ifNode); + let key = 0; + while (i-- >= 0) { + const sibling = siblings[i]; + if (sibling && sibling.type === 9) { + key += sibling.branches.length; + } + } + return () => { + if (isRoot) { + ifNode.codegenNode = createCodegenNodeForBranch( + branch, + key, + context + ); + } else { + const parentCondition = getParentCondition(ifNode.codegenNode); + parentCondition.alternate = createCodegenNodeForBranch( + branch, + key + ifNode.branches.length - 1, + context + ); + } + }; + }); + } +); +function processIf(node, dir, context, processCodegen) { + if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { + const loc = dir.exp ? dir.exp.loc : node.loc; + context.onError( + createCompilerError(28, dir.loc) + ); + dir.exp = createSimpleExpression(`true`, false, loc); + } + if (dir.exp) { + validateBrowserExpression(dir.exp, context); + } + if (dir.name === "if") { + const branch = createIfBranch(node, dir); + const ifNode = { + type: 9, + loc: cloneLoc(node.loc), + branches: [branch] + }; + context.replaceNode(ifNode); + if (processCodegen) { + return processCodegen(ifNode, branch, true); + } + } else { + const siblings = context.parent.children; + const comments = []; + let i = siblings.indexOf(node); + while (i-- >= -1) { + const sibling = siblings[i]; + if (sibling && sibling.type === 3) { + context.removeNode(sibling); + comments.unshift(sibling); + continue; + } + if (sibling && sibling.type === 2 && !sibling.content.trim().length) { + context.removeNode(sibling); + continue; + } + if (sibling && sibling.type === 9) { + if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { + context.onError( + createCompilerError(30, node.loc) + ); + } + context.removeNode(); + const branch = createIfBranch(node, dir); + if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition> + !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) { + branch.children = [...comments, ...branch.children]; + } + { + const key = branch.userKey; + if (key) { + sibling.branches.forEach(({ userKey }) => { + if (isSameKey(userKey, key)) { + context.onError( + createCompilerError( + 29, + branch.userKey.loc + ) + ); + } + }); + } + } + sibling.branches.push(branch); + const onExit = processCodegen && processCodegen(sibling, branch, false); + traverseNode(branch, context); + if (onExit) onExit(); + context.currentNode = null; + } else { + context.onError( + createCompilerError(30, node.loc) + ); + } + break; + } + } +} +function createIfBranch(node, dir) { + const isTemplateIf = node.tagType === 3; + return { + type: 10, + loc: node.loc, + condition: dir.name === "else" ? void 0 : dir.exp, + children: isTemplateIf && !findDir(node, "for") ? node.children : [node], + userKey: findProp(node, `key`), + isTemplateIf + }; +} +function createCodegenNodeForBranch(branch, keyIndex, context) { + if (branch.condition) { + return createConditionalExpression( + branch.condition, + createChildrenCodegenNode(branch, keyIndex, context), + // make sure to pass in asBlock: true so that the comment node call + // closes the current block. + createCallExpression(context.helper(CREATE_COMMENT), [ + '"v-if"' , + "true" + ]) + ); + } else { + return createChildrenCodegenNode(branch, keyIndex, context); + } +} +function createChildrenCodegenNode(branch, keyIndex, context) { + const { helper } = context; + const keyProperty = createObjectProperty( + `key`, + createSimpleExpression( + `${keyIndex}`, + false, + locStub, + 2 + ) + ); + const { children } = branch; + const firstChild = children[0]; + const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; + if (needFragmentWrapper) { + if (children.length === 1 && firstChild.type === 11) { + const vnodeCall = firstChild.codegenNode; + injectProp(vnodeCall, keyProperty, context); + return vnodeCall; + } else { + let patchFlag = 64; + if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + } + return createVNodeCall( + context, + helper(FRAGMENT), + createObjectExpression([keyProperty]), + children, + patchFlag, + void 0, + void 0, + true, + false, + false, + branch.loc + ); + } + } else { + const ret = firstChild.codegenNode; + const vnodeCall = getMemoedVNodeCall(ret); + if (vnodeCall.type === 13) { + convertToBlock(vnodeCall, context); + } + injectProp(vnodeCall, keyProperty, context); + return ret; + } +} +function isSameKey(a, b) { + if (!a || a.type !== b.type) { + return false; + } + if (a.type === 6) { + if (a.value.content !== b.value.content) { + return false; + } + } else { + const exp = a.exp; + const branchExp = b.exp; + if (exp.type !== branchExp.type) { + return false; + } + if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { + return false; + } + } + return true; +} +function getParentCondition(node) { + while (true) { + if (node.type === 19) { + if (node.alternate.type === 19) { + node = node.alternate; + } else { + return node; + } + } else if (node.type === 20) { + node = node.value; + } + } +} + +const transformBind = (dir, _node, context) => { + const { modifiers, loc } = dir; + const arg = dir.arg; + let { exp } = dir; + if (exp && exp.type === 4 && !exp.content.trim()) { + { + exp = void 0; + } + } + if (!exp) { + if (arg.type !== 4 || !arg.isStatic) { + context.onError( + createCompilerError( + 52, + arg.loc + ) + ); + return { + props: [ + createObjectProperty(arg, createSimpleExpression("", true, loc)) + ] + }; + } + transformBindShorthand(dir); + exp = dir.exp; + } + if (arg.type !== 4) { + arg.children.unshift(`(`); + arg.children.push(`) || ""`); + } else if (!arg.isStatic) { + arg.content = `${arg.content} || ""`; + } + if (modifiers.some((mod) => mod.content === "camel")) { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = camelize(arg.content); + } else { + arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; + } + } else { + arg.children.unshift(`${context.helperString(CAMELIZE)}(`); + arg.children.push(`)`); + } + } + if (!context.inSSR) { + if (modifiers.some((mod) => mod.content === "prop")) { + injectPrefix(arg, "."); + } + if (modifiers.some((mod) => mod.content === "attr")) { + injectPrefix(arg, "^"); + } + } + return { + props: [createObjectProperty(arg, exp)] + }; +}; +const transformBindShorthand = (dir, context) => { + const arg = dir.arg; + const propName = camelize(arg.content); + dir.exp = createSimpleExpression(propName, false, arg.loc); +}; +const injectPrefix = (arg, prefix) => { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = prefix + arg.content; + } else { + arg.content = `\`${prefix}\${${arg.content}}\``; + } + } else { + arg.children.unshift(`'${prefix}' + (`); + arg.children.push(`)`); + } +}; + +const transformFor = createStructuralDirectiveTransform( + "for", + (node, dir, context) => { + const { helper, removeHelper } = context; + return processFor(node, dir, context, (forNode) => { + const renderExp = createCallExpression(helper(RENDER_LIST), [ + forNode.source + ]); + const isTemplate = isTemplateNode(node); + const memo = findDir(node, "memo"); + const keyProp = findProp(node, `key`, false, true); + const isDirKey = keyProp && keyProp.type === 7; + if (isDirKey && !keyProp.exp) { + transformBindShorthand(keyProp); + } + let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp); + const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null; + const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; + const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; + forNode.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + renderExp, + fragmentFlag, + void 0, + void 0, + true, + !isStableFragment, + false, + node.loc + ); + return () => { + let childBlock; + const { children } = forNode; + if (isTemplate) { + node.children.some((c) => { + if (c.type === 1) { + const key = findProp(c, "key"); + if (key) { + context.onError( + createCompilerError( + 33, + key.loc + ) + ); + return true; + } + } + }); + } + const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; + const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; + if (slotOutlet) { + childBlock = slotOutlet.codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + } else if (needFragmentWrapper) { + childBlock = createVNodeCall( + context, + helper(FRAGMENT), + keyProperty ? createObjectExpression([keyProperty]) : void 0, + node.children, + 64, + void 0, + void 0, + true, + void 0, + false + ); + } else { + childBlock = children[0].codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + if (childBlock.isBlock !== !isStableFragment) { + if (childBlock.isBlock) { + removeHelper(OPEN_BLOCK); + removeHelper( + getVNodeBlockHelper(context.inSSR, childBlock.isComponent) + ); + } else { + removeHelper( + getVNodeHelper(context.inSSR, childBlock.isComponent) + ); + } + } + childBlock.isBlock = !isStableFragment; + if (childBlock.isBlock) { + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); + } else { + helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); + } + } + if (memo) { + const loop = createFunctionExpression( + createForLoopParams(forNode.parseResult, [ + createSimpleExpression(`_cached`) + ]) + ); + loop.body = createBlockStatement([ + createCompoundExpression([`const _memo = (`, memo.exp, `)`]), + createCompoundExpression([ + `if (_cached`, + ...keyExp ? [` && _cached.key === `, keyExp] : [], + ` && ${context.helperString( + IS_MEMO_SAME + )}(_cached, _memo)) return _cached` + ]), + createCompoundExpression([`const _item = `, childBlock]), + createSimpleExpression(`_item.memo = _memo`), + createSimpleExpression(`return _item`) + ]); + renderExp.arguments.push( + loop, + createSimpleExpression(`_cache`), + createSimpleExpression(String(context.cached.length)) + ); + context.cached.push(null); + } else { + renderExp.arguments.push( + createFunctionExpression( + createForLoopParams(forNode.parseResult), + childBlock, + true + ) + ); + } + }; + }); + } +); +function processFor(node, dir, context, processCodegen) { + if (!dir.exp) { + context.onError( + createCompilerError(31, dir.loc) + ); + return; + } + const parseResult = dir.forParseResult; + if (!parseResult) { + context.onError( + createCompilerError(32, dir.loc) + ); + return; + } + finalizeForParseResult(parseResult, context); + const { addIdentifiers, removeIdentifiers, scopes } = context; + const { source, value, key, index } = parseResult; + const forNode = { + type: 11, + loc: dir.loc, + source, + valueAlias: value, + keyAlias: key, + objectIndexAlias: index, + parseResult, + children: isTemplateNode(node) ? node.children : [node] + }; + context.replaceNode(forNode); + scopes.vFor++; + const onExit = processCodegen && processCodegen(forNode); + return () => { + scopes.vFor--; + if (onExit) onExit(); + }; +} +function finalizeForParseResult(result, context) { + if (result.finalized) return; + { + validateBrowserExpression(result.source, context); + if (result.key) { + validateBrowserExpression( + result.key, + context, + true + ); + } + if (result.index) { + validateBrowserExpression( + result.index, + context, + true + ); + } + if (result.value) { + validateBrowserExpression( + result.value, + context, + true + ); + } + } + result.finalized = true; +} +function createForLoopParams({ value, key, index }, memoArgs = []) { + return createParamsList([value, key, index, ...memoArgs]); +} +function createParamsList(args) { + let i = args.length; + while (i--) { + if (args[i]) break; + } + return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); +} + +const defaultFallback = createSimpleExpression(`undefined`, false); +const trackSlotScopes = (node, context) => { + if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { + const vSlot = findDir(node, "slot"); + if (vSlot) { + vSlot.exp; + context.scopes.vSlot++; + return () => { + context.scopes.vSlot--; + }; + } + } +}; +const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( + props, + children, + false, + true, + children.length ? children[0].loc : loc +); +function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { + context.helper(WITH_CTX); + const { children, loc } = node; + const slotsProperties = []; + const dynamicSlots = []; + let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; + const onComponentSlot = findDir(node, "slot", true); + if (onComponentSlot) { + const { arg, exp } = onComponentSlot; + if (arg && !isStaticExp(arg)) { + hasDynamicSlots = true; + } + slotsProperties.push( + createObjectProperty( + arg || createSimpleExpression("default", true), + buildSlotFn(exp, void 0, children, loc) + ) + ); + } + let hasTemplateSlots = false; + let hasNamedDefaultSlot = false; + const implicitDefaultChildren = []; + const seenSlotNames = /* @__PURE__ */ new Set(); + let conditionalBranchIndex = 0; + for (let i = 0; i < children.length; i++) { + const slotElement = children[i]; + let slotDir; + if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { + if (slotElement.type !== 3) { + implicitDefaultChildren.push(slotElement); + } + continue; + } + if (onComponentSlot) { + context.onError( + createCompilerError(37, slotDir.loc) + ); + break; + } + hasTemplateSlots = true; + const { children: slotChildren, loc: slotLoc } = slotElement; + const { + arg: slotName = createSimpleExpression(`default`, true), + exp: slotProps, + loc: dirLoc + } = slotDir; + let staticSlotName; + if (isStaticExp(slotName)) { + staticSlotName = slotName ? slotName.content : `default`; + } else { + hasDynamicSlots = true; + } + const vFor = findDir(slotElement, "for"); + const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); + let vIf; + let vElse; + if (vIf = findDir(slotElement, "if")) { + hasDynamicSlots = true; + dynamicSlots.push( + createConditionalExpression( + vIf.exp, + buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), + defaultFallback + ) + ); + } else if (vElse = findDir( + slotElement, + /^else(-if)?$/, + true + /* allowEmpty */ + )) { + let j = i; + let prev; + while (j--) { + prev = children[j]; + if (prev.type !== 3) { + break; + } + } + if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) { + let conditional = dynamicSlots[dynamicSlots.length - 1]; + while (conditional.alternate.type === 19) { + conditional = conditional.alternate; + } + conditional.alternate = vElse.exp ? createConditionalExpression( + vElse.exp, + buildDynamicSlot( + slotName, + slotFunction, + conditionalBranchIndex++ + ), + defaultFallback + ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); + } else { + context.onError( + createCompilerError(30, vElse.loc) + ); + } + } else if (vFor) { + hasDynamicSlots = true; + const parseResult = vFor.forParseResult; + if (parseResult) { + finalizeForParseResult(parseResult, context); + dynamicSlots.push( + createCallExpression(context.helper(RENDER_LIST), [ + parseResult.source, + createFunctionExpression( + createForLoopParams(parseResult), + buildDynamicSlot(slotName, slotFunction), + true + ) + ]) + ); + } else { + context.onError( + createCompilerError( + 32, + vFor.loc + ) + ); + } + } else { + if (staticSlotName) { + if (seenSlotNames.has(staticSlotName)) { + context.onError( + createCompilerError( + 38, + dirLoc + ) + ); + continue; + } + seenSlotNames.add(staticSlotName); + if (staticSlotName === "default") { + hasNamedDefaultSlot = true; + } + } + slotsProperties.push(createObjectProperty(slotName, slotFunction)); + } + } + if (!onComponentSlot) { + const buildDefaultSlotProperty = (props, children2) => { + const fn = buildSlotFn(props, void 0, children2, loc); + return createObjectProperty(`default`, fn); + }; + if (!hasTemplateSlots) { + slotsProperties.push(buildDefaultSlotProperty(void 0, children)); + } else if (implicitDefaultChildren.length && // #3766 + // with whitespace: 'preserve', whitespaces between slots will end up in + // implicitDefaultChildren. Ignore if all implicit children are whitespaces. + implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { + if (hasNamedDefaultSlot) { + context.onError( + createCompilerError( + 39, + implicitDefaultChildren[0].loc + ) + ); + } else { + slotsProperties.push( + buildDefaultSlotProperty(void 0, implicitDefaultChildren) + ); + } + } + } + const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; + let slots = createObjectExpression( + slotsProperties.concat( + createObjectProperty( + `_`, + // 2 = compiled but dynamic = can skip normalization, but must run diff + // 1 = compiled and static = can skip normalization AND diff as optimized + createSimpleExpression( + slotFlag + (` /* ${slotFlagsText[slotFlag]} */` ), + false + ) + ) + ), + loc + ); + if (dynamicSlots.length) { + slots = createCallExpression(context.helper(CREATE_SLOTS), [ + slots, + createArrayExpression(dynamicSlots) + ]); + } + return { + slots, + hasDynamicSlots + }; +} +function buildDynamicSlot(name, fn, index) { + const props = [ + createObjectProperty(`name`, name), + createObjectProperty(`fn`, fn) + ]; + if (index != null) { + props.push( + createObjectProperty(`key`, createSimpleExpression(String(index), true)) + ); + } + return createObjectExpression(props); +} +function hasForwardedSlots(children) { + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + if (child.tagType === 2 || hasForwardedSlots(child.children)) { + return true; + } + break; + case 9: + if (hasForwardedSlots(child.branches)) return true; + break; + case 10: + case 11: + if (hasForwardedSlots(child.children)) return true; + break; + } + } + return false; +} +function isNonWhitespaceContent(node) { + if (node.type !== 2 && node.type !== 12) + return true; + return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); +} + +const directiveImportMap = /* @__PURE__ */ new WeakMap(); +const transformElement = (node, context) => { + return function postTransformElement() { + node = context.currentNode; + if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { + return; + } + const { tag, props } = node; + const isComponent = node.tagType === 1; + let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; + const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; + let vnodeProps; + let vnodeChildren; + let patchFlag = 0; + let vnodeDynamicProps; + let dynamicPropNames; + let vnodeDirectives; + let shouldUseBlock = ( + // dynamic component may resolve to plain elements + isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block + // updates inside get proper isSVG flag at runtime. (#639, #643) + // This is technically web-specific, but splitting the logic out of core + // leads to too much unnecessary complexity. + (tag === "svg" || tag === "foreignObject" || tag === "math") + ); + if (props.length > 0) { + const propsBuildResult = buildProps( + node, + context, + void 0, + isComponent, + isDynamicComponent + ); + vnodeProps = propsBuildResult.props; + patchFlag = propsBuildResult.patchFlag; + dynamicPropNames = propsBuildResult.dynamicPropNames; + const directives = propsBuildResult.directives; + vnodeDirectives = directives && directives.length ? createArrayExpression( + directives.map((dir) => buildDirectiveArgs(dir, context)) + ) : void 0; + if (propsBuildResult.shouldUseBlock) { + shouldUseBlock = true; + } + } + if (node.children.length > 0) { + if (vnodeTag === KEEP_ALIVE) { + shouldUseBlock = true; + patchFlag |= 1024; + if (node.children.length > 1) { + context.onError( + createCompilerError(46, { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + }) + ); + } + } + const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling + vnodeTag !== TELEPORT && // explained above. + vnodeTag !== KEEP_ALIVE; + if (shouldBuildAsSlots) { + const { slots, hasDynamicSlots } = buildSlots(node, context); + vnodeChildren = slots; + if (hasDynamicSlots) { + patchFlag |= 1024; + } + } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { + const child = node.children[0]; + const type = child.type; + const hasDynamicTextChild = type === 5 || type === 8; + if (hasDynamicTextChild && getConstantType(child, context) === 0) { + patchFlag |= 1; + } + if (hasDynamicTextChild || type === 2) { + vnodeChildren = child; + } else { + vnodeChildren = node.children; + } + } else { + vnodeChildren = node.children; + } + } + if (dynamicPropNames && dynamicPropNames.length) { + vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); + } + node.codegenNode = createVNodeCall( + context, + vnodeTag, + vnodeProps, + vnodeChildren, + patchFlag === 0 ? void 0 : patchFlag, + vnodeDynamicProps, + vnodeDirectives, + !!shouldUseBlock, + false, + isComponent, + node.loc + ); + }; +}; +function resolveComponentType(node, context, ssr = false) { + let { tag } = node; + const isExplicitDynamic = isComponentTag(tag); + const isProp = findProp( + node, + "is", + false, + true + /* allow empty */ + ); + if (isProp) { + if (isExplicitDynamic || false) { + let exp; + if (isProp.type === 6) { + exp = isProp.value && createSimpleExpression(isProp.value.content, true); + } else { + exp = isProp.exp; + if (!exp) { + exp = createSimpleExpression(`is`, false, isProp.arg.loc); + } + } + if (exp) { + return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ + exp + ]); + } + } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { + tag = isProp.value.content.slice(4); + } + } + const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); + if (builtIn) { + if (!ssr) context.helper(builtIn); + return builtIn; + } + context.helper(RESOLVE_COMPONENT); + context.components.add(tag); + return toValidAssetId(tag, `component`); +} +function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { + const { tag, loc: elementLoc, children } = node; + let properties = []; + const mergeArgs = []; + const runtimeDirectives = []; + const hasChildren = children.length > 0; + let shouldUseBlock = false; + let patchFlag = 0; + let hasRef = false; + let hasClassBinding = false; + let hasStyleBinding = false; + let hasHydrationEventBinding = false; + let hasDynamicKeys = false; + let hasVnodeHook = false; + const dynamicPropNames = []; + const pushMergeArg = (arg) => { + if (properties.length) { + mergeArgs.push( + createObjectExpression(dedupeProperties(properties), elementLoc) + ); + properties = []; + } + if (arg) mergeArgs.push(arg); + }; + const pushRefVForMarker = () => { + if (context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); + } + }; + const analyzePatchFlag = ({ key, value }) => { + if (isStaticExp(key)) { + const name = key.content; + const isEventHandler = isOn(name); + if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click + // dedicated fast path. + name.toLowerCase() !== "onclick" && // omit v-model handlers + name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks + !isReservedProp(name)) { + hasHydrationEventBinding = true; + } + if (isEventHandler && isReservedProp(name)) { + hasVnodeHook = true; + } + if (isEventHandler && value.type === 14) { + value = value.arguments[0]; + } + if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { + return; + } + if (name === "ref") { + hasRef = true; + } else if (name === "class") { + hasClassBinding = true; + } else if (name === "style") { + hasStyleBinding = true; + } else if (name !== "key" && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + } else { + hasDynamicKeys = true; + } + }; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 6) { + const { loc, name, nameLoc, value } = prop; + let isStatic = true; + if (name === "ref") { + hasRef = true; + pushRefVForMarker(); + } + if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || false)) { + continue; + } + properties.push( + createObjectProperty( + createSimpleExpression(name, true, nameLoc), + createSimpleExpression( + value ? value.content : "", + isStatic, + value ? value.loc : loc + ) + ) + ); + } else { + const { name, arg, exp, loc, modifiers } = prop; + const isVBind = name === "bind"; + const isVOn = name === "on"; + if (name === "slot") { + if (!isComponent) { + context.onError( + createCompilerError(40, loc) + ); + } + continue; + } + if (name === "once" || name === "memo") { + continue; + } + if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || false)) { + continue; + } + if (isVOn && ssr) { + continue; + } + if ( + // #938: elements with dynamic keys should be forced into blocks + isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked + // before children + isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") + ) { + shouldUseBlock = true; + } + if (isVBind && isStaticArgOf(arg, "ref")) { + pushRefVForMarker(); + } + if (!arg && (isVBind || isVOn)) { + hasDynamicKeys = true; + if (exp) { + if (isVBind) { + pushRefVForMarker(); + pushMergeArg(); + mergeArgs.push(exp); + } else { + pushMergeArg({ + type: 14, + loc, + callee: context.helper(TO_HANDLERS), + arguments: isComponent ? [exp] : [exp, `true`] + }); + } + } else { + context.onError( + createCompilerError( + isVBind ? 34 : 35, + loc + ) + ); + } + continue; + } + if (isVBind && modifiers.some((mod) => mod.content === "prop")) { + patchFlag |= 32; + } + const directiveTransform = context.directiveTransforms[name]; + if (directiveTransform) { + const { props: props2, needRuntime } = directiveTransform(prop, node, context); + !ssr && props2.forEach(analyzePatchFlag); + if (isVOn && arg && !isStaticExp(arg)) { + pushMergeArg(createObjectExpression(props2, elementLoc)); + } else { + properties.push(...props2); + } + if (needRuntime) { + runtimeDirectives.push(prop); + if (isSymbol(needRuntime)) { + directiveImportMap.set(prop, needRuntime); + } + } + } else if (!isBuiltInDirective(name)) { + runtimeDirectives.push(prop); + if (hasChildren) { + shouldUseBlock = true; + } + } + } + } + let propsExpression = void 0; + if (mergeArgs.length) { + pushMergeArg(); + if (mergeArgs.length > 1) { + propsExpression = createCallExpression( + context.helper(MERGE_PROPS), + mergeArgs, + elementLoc + ); + } else { + propsExpression = mergeArgs[0]; + } + } else if (properties.length) { + propsExpression = createObjectExpression( + dedupeProperties(properties), + elementLoc + ); + } + if (hasDynamicKeys) { + patchFlag |= 16; + } else { + if (hasClassBinding && !isComponent) { + patchFlag |= 2; + } + if (hasStyleBinding && !isComponent) { + patchFlag |= 4; + } + if (dynamicPropNames.length) { + patchFlag |= 8; + } + if (hasHydrationEventBinding) { + patchFlag |= 32; + } + } + if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { + patchFlag |= 512; + } + if (!context.inSSR && propsExpression) { + switch (propsExpression.type) { + case 15: + let classKeyIndex = -1; + let styleKeyIndex = -1; + let hasDynamicKey = false; + for (let i = 0; i < propsExpression.properties.length; i++) { + const key = propsExpression.properties[i].key; + if (isStaticExp(key)) { + if (key.content === "class") { + classKeyIndex = i; + } else if (key.content === "style") { + styleKeyIndex = i; + } + } else if (!key.isHandlerKey) { + hasDynamicKey = true; + } + } + const classProp = propsExpression.properties[classKeyIndex]; + const styleProp = propsExpression.properties[styleKeyIndex]; + if (!hasDynamicKey) { + if (classProp && !isStaticExp(classProp.value)) { + classProp.value = createCallExpression( + context.helper(NORMALIZE_CLASS), + [classProp.value] + ); + } + if (styleProp && // the static style is compiled into an object, + // so use `hasStyleBinding` to ensure that it is a dynamic style binding + (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, + // v-bind:style with static literal object + styleProp.value.type === 17)) { + styleProp.value = createCallExpression( + context.helper(NORMALIZE_STYLE), + [styleProp.value] + ); + } + } else { + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [propsExpression] + ); + } + break; + case 14: + break; + default: + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [ + createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ + propsExpression + ]) + ] + ); + break; + } + } + return { + props: propsExpression, + directives: runtimeDirectives, + patchFlag, + dynamicPropNames, + shouldUseBlock + }; +} +function dedupeProperties(properties) { + const knownProps = /* @__PURE__ */ new Map(); + const deduped = []; + for (let i = 0; i < properties.length; i++) { + const prop = properties[i]; + if (prop.key.type === 8 || !prop.key.isStatic) { + deduped.push(prop); + continue; + } + const name = prop.key.content; + const existing = knownProps.get(name); + if (existing) { + if (name === "style" || name === "class" || isOn(name)) { + mergeAsArray(existing, prop); + } + } else { + knownProps.set(name, prop); + deduped.push(prop); + } + } + return deduped; +} +function mergeAsArray(existing, incoming) { + if (existing.value.type === 17) { + existing.value.elements.push(incoming.value); + } else { + existing.value = createArrayExpression( + [existing.value, incoming.value], + existing.loc + ); + } +} +function buildDirectiveArgs(dir, context) { + const dirArgs = []; + const runtime = directiveImportMap.get(dir); + if (runtime) { + dirArgs.push(context.helperString(runtime)); + } else { + { + context.helper(RESOLVE_DIRECTIVE); + context.directives.add(dir.name); + dirArgs.push(toValidAssetId(dir.name, `directive`)); + } + } + const { loc } = dir; + if (dir.exp) dirArgs.push(dir.exp); + if (dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(dir.arg); + } + if (Object.keys(dir.modifiers).length) { + if (!dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(`void 0`); + } + const trueExpression = createSimpleExpression(`true`, false, loc); + dirArgs.push( + createObjectExpression( + dir.modifiers.map( + (modifier) => createObjectProperty(modifier, trueExpression) + ), + loc + ) + ); + } + return createArrayExpression(dirArgs, dir.loc); +} +function stringifyDynamicPropNames(props) { + let propsNamesString = `[`; + for (let i = 0, l = props.length; i < l; i++) { + propsNamesString += JSON.stringify(props[i]); + if (i < l - 1) propsNamesString += ", "; + } + return propsNamesString + `]`; +} +function isComponentTag(tag) { + return tag === "component" || tag === "Component"; +} + +const transformSlotOutlet = (node, context) => { + if (isSlotOutlet(node)) { + const { children, loc } = node; + const { slotName, slotProps } = processSlotOutlet(node, context); + const slotArgs = [ + context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, + slotName, + "{}", + "undefined", + "true" + ]; + let expectedLen = 2; + if (slotProps) { + slotArgs[2] = slotProps; + expectedLen = 3; + } + if (children.length) { + slotArgs[3] = createFunctionExpression([], children, false, false, loc); + expectedLen = 4; + } + if (context.scopeId && !context.slotted) { + expectedLen = 5; + } + slotArgs.splice(expectedLen); + node.codegenNode = createCallExpression( + context.helper(RENDER_SLOT), + slotArgs, + loc + ); + } +}; +function processSlotOutlet(node, context) { + let slotName = `"default"`; + let slotProps = void 0; + const nonNameProps = []; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (p.value) { + if (p.name === "name") { + slotName = JSON.stringify(p.value.content); + } else { + p.name = camelize(p.name); + nonNameProps.push(p); + } + } + } else { + if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { + if (p.exp) { + slotName = p.exp; + } else if (p.arg && p.arg.type === 4) { + const name = camelize(p.arg.content); + slotName = p.exp = createSimpleExpression(name, false, p.arg.loc); + } + } else { + if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { + p.arg.content = camelize(p.arg.content); + } + nonNameProps.push(p); + } + } + } + if (nonNameProps.length > 0) { + const { props, directives } = buildProps( + node, + context, + nonNameProps, + false, + false + ); + slotProps = props; + if (directives.length) { + context.onError( + createCompilerError( + 36, + directives[0].loc + ) + ); + } + } + return { + slotName, + slotProps + }; +} + +const transformOn$1 = (dir, node, context, augmentor) => { + const { loc, modifiers, arg } = dir; + if (!dir.exp && !modifiers.length) { + context.onError(createCompilerError(35, loc)); + } + let eventName; + if (arg.type === 4) { + if (arg.isStatic) { + let rawName = arg.content; + if (rawName.startsWith("vnode")) { + context.onError(createCompilerError(51, arg.loc)); + } + if (rawName.startsWith("vue:")) { + rawName = `vnode-${rawName.slice(4)}`; + } + const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( + // for non-element and vnode lifecycle event listeners, auto convert + // it to camelCase. See issue #2249 + toHandlerKey(camelize(rawName)) + ) : ( + // preserve case for plain element listeners that have uppercase + // letters, as these may be custom elements' custom events + `on:${rawName}` + ); + eventName = createSimpleExpression(eventString, true, arg.loc); + } else { + eventName = createCompoundExpression([ + `${context.helperString(TO_HANDLER_KEY)}(`, + arg, + `)` + ]); + } + } else { + eventName = arg; + eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); + eventName.children.push(`)`); + } + let exp = dir.exp; + if (exp && !exp.content.trim()) { + exp = void 0; + } + let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; + if (exp) { + const isMemberExp = isMemberExpression(exp); + const isInlineStatement = !(isMemberExp || isFnExpression(exp)); + const hasMultipleStatements = exp.content.includes(`;`); + { + validateBrowserExpression( + exp, + context, + false, + hasMultipleStatements + ); + } + if (isInlineStatement || shouldCache && isMemberExp) { + exp = createCompoundExpression([ + `${isInlineStatement ? `$event` : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, + exp, + hasMultipleStatements ? `}` : `)` + ]); + } + } + let ret = { + props: [ + createObjectProperty( + eventName, + exp || createSimpleExpression(`() => {}`, false, loc) + ) + ] + }; + if (augmentor) { + ret = augmentor(ret); + } + if (shouldCache) { + ret.props[0].value = context.cache(ret.props[0].value); + } + ret.props.forEach((p) => p.key.isHandlerKey = true); + return ret; +}; + +const transformText = (node, context) => { + if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { + return () => { + const children = node.children; + let currentContainer = void 0; + let hasText = false; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child)) { + hasText = true; + for (let j = i + 1; j < children.length; j++) { + const next = children[j]; + if (isText$1(next)) { + if (!currentContainer) { + currentContainer = children[i] = createCompoundExpression( + [child], + child.loc + ); + } + currentContainer.children.push(` + `, next); + children.splice(j, 1); + j--; + } else { + currentContainer = void 0; + break; + } + } + } + } + if (!hasText || // if this is a plain element with a single text child, leave it + // as-is since the runtime has dedicated fast path for this by directly + // setting textContent of the element. + // for component root it's always normalized anyway. + children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 + // custom directives can potentially add DOM elements arbitrarily, + // we need to avoid setting textContent of the element at runtime + // to avoid accidentally overwriting the DOM elements added + // by the user through custom directives. + !node.props.find( + (p) => p.type === 7 && !context.directiveTransforms[p.name] + ) && // in compat mode, <template> tags with no special directives + // will be rendered as a fragment so its children must be + // converted into vnodes. + true)) { + return; + } + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child) || child.type === 8) { + const callArgs = []; + if (child.type !== 2 || child.content !== " ") { + callArgs.push(child); + } + if (!context.ssr && getConstantType(child, context) === 0) { + callArgs.push( + 1 + (` /* ${PatchFlagNames[1]} */` ) + ); + } + children[i] = { + type: 12, + content: child, + loc: child.loc, + codegenNode: createCallExpression( + context.helper(CREATE_TEXT), + callArgs + ) + }; + } + } + }; + } +}; + +const seen$1 = /* @__PURE__ */ new WeakSet(); +const transformOnce = (node, context) => { + if (node.type === 1 && findDir(node, "once", true)) { + if (seen$1.has(node) || context.inVOnce || context.inSSR) { + return; + } + seen$1.add(node); + context.inVOnce = true; + context.helper(SET_BLOCK_TRACKING); + return () => { + context.inVOnce = false; + const cur = context.currentNode; + if (cur.codegenNode) { + cur.codegenNode = context.cache( + cur.codegenNode, + true, + true + ); + } + }; + } +}; + +const transformModel$1 = (dir, node, context) => { + const { exp, arg } = dir; + if (!exp) { + context.onError( + createCompilerError(41, dir.loc) + ); + return createTransformProps(); + } + const rawExp = exp.loc.source.trim(); + const expString = exp.type === 4 ? exp.content : rawExp; + const bindingType = context.bindingMetadata[rawExp]; + if (bindingType === "props" || bindingType === "props-aliased") { + context.onError(createCompilerError(44, exp.loc)); + return createTransformProps(); + } + const maybeRef = false; + if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) { + context.onError( + createCompilerError(42, exp.loc) + ); + return createTransformProps(); + } + const propName = arg ? arg : createSimpleExpression("modelValue", true); + const eventName = arg ? isStaticExp(arg) ? `onUpdate:${camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; + let assignmentExp; + const eventArg = context.isTS ? `($event: any)` : `$event`; + { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + exp, + `) = $event)` + ]); + } + const props = [ + // modelValue: foo + createObjectProperty(propName, dir.exp), + // "onUpdate:modelValue": $event => (foo = $event) + createObjectProperty(eventName, assignmentExp) + ]; + if (dir.modifiers.length && node.tagType === 1) { + const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); + const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; + props.push( + createObjectProperty( + modifiersKey, + createSimpleExpression( + `{ ${modifiers} }`, + false, + dir.loc, + 2 + ) + ) + ); + } + return createTransformProps(props); +}; +function createTransformProps(props = []) { + return { props }; +} + +const seen = /* @__PURE__ */ new WeakSet(); +const transformMemo = (node, context) => { + if (node.type === 1) { + const dir = findDir(node, "memo"); + if (!dir || seen.has(node)) { + return; + } + seen.add(node); + return () => { + const codegenNode = node.codegenNode || context.currentNode.codegenNode; + if (codegenNode && codegenNode.type === 13) { + if (node.tagType !== 1) { + convertToBlock(codegenNode, context); + } + node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ + dir.exp, + createFunctionExpression(void 0, codegenNode), + `_cache`, + String(context.cached.length) + ]); + context.cached.push(null); + } + }; + } +}; + +function getBaseTransformPreset(prefixIdentifiers) { + return [ + [ + transformOnce, + transformIf, + transformMemo, + transformFor, + ...[], + ...[transformExpression] , + transformSlotOutlet, + transformElement, + trackSlotScopes, + transformText + ], + { + on: transformOn$1, + bind: transformBind, + model: transformModel$1 + } + ]; +} +function baseCompile(source, options = {}) { + const onError = options.onError || defaultOnError; + const isModuleMode = options.mode === "module"; + { + if (options.prefixIdentifiers === true) { + onError(createCompilerError(47)); + } else if (isModuleMode) { + onError(createCompilerError(48)); + } + } + const prefixIdentifiers = false; + if (options.cacheHandlers) { + onError(createCompilerError(49)); + } + if (options.scopeId && !isModuleMode) { + onError(createCompilerError(50)); + } + const resolvedOptions = extend({}, options, { + prefixIdentifiers + }); + const ast = isString(source) ? baseParse(source, resolvedOptions) : source; + const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(); + transform( + ast, + extend({}, resolvedOptions, { + nodeTransforms: [ + ...nodeTransforms, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: extend( + {}, + directiveTransforms, + options.directiveTransforms || {} + // user transforms + ) + }) + ); + return generate(ast, resolvedOptions); +} + +const noopDirectiveTransform = () => ({ props: [] }); + +const V_MODEL_RADIO = Symbol(`vModelRadio` ); +const V_MODEL_CHECKBOX = Symbol( + `vModelCheckbox` +); +const V_MODEL_TEXT = Symbol(`vModelText` ); +const V_MODEL_SELECT = Symbol( + `vModelSelect` +); +const V_MODEL_DYNAMIC = Symbol( + `vModelDynamic` +); +const V_ON_WITH_MODIFIERS = Symbol( + `vOnModifiersGuard` +); +const V_ON_WITH_KEYS = Symbol( + `vOnKeysGuard` +); +const V_SHOW = Symbol(`vShow` ); +const TRANSITION = Symbol(`Transition` ); +const TRANSITION_GROUP = Symbol( + `TransitionGroup` +); +registerRuntimeHelpers({ + [V_MODEL_RADIO]: `vModelRadio`, + [V_MODEL_CHECKBOX]: `vModelCheckbox`, + [V_MODEL_TEXT]: `vModelText`, + [V_MODEL_SELECT]: `vModelSelect`, + [V_MODEL_DYNAMIC]: `vModelDynamic`, + [V_ON_WITH_MODIFIERS]: `withModifiers`, + [V_ON_WITH_KEYS]: `withKeys`, + [V_SHOW]: `vShow`, + [TRANSITION]: `Transition`, + [TRANSITION_GROUP]: `TransitionGroup` +}); + +let decoder; +function decodeHtmlBrowser(raw, asAttr = false) { + if (!decoder) { + decoder = document.createElement("div"); + } + if (asAttr) { + decoder.innerHTML = `<div foo="${raw.replace(/"/g, """)}">`; + return decoder.children[0].getAttribute("foo"); + } else { + decoder.innerHTML = raw; + return decoder.textContent; + } +} + +const parserOptions = { + parseMode: "html", + isVoidTag, + isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + isPreTag: (tag) => tag === "pre", + isIgnoreNewlineTag: (tag) => tag === "pre" || tag === "textarea", + decodeEntities: decodeHtmlBrowser , + isBuiltInComponent: (tag) => { + if (tag === "Transition" || tag === "transition") { + return TRANSITION; + } else if (tag === "TransitionGroup" || tag === "transition-group") { + return TRANSITION_GROUP; + } + }, + // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher + getNamespace(tag, parent, rootNamespace) { + let ns = parent ? parent.ns : rootNamespace; + if (parent && ns === 2) { + if (parent.tag === "annotation-xml") { + if (tag === "svg") { + return 1; + } + if (parent.props.some( + (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") + )) { + ns = 0; + } + } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { + ns = 0; + } + } else if (parent && ns === 1) { + if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { + ns = 0; + } + } + if (ns === 0) { + if (tag === "svg") { + return 1; + } + if (tag === "math") { + return 2; + } + } + return ns; + } +}; + +const transformStyle = (node) => { + if (node.type === 1) { + node.props.forEach((p, i) => { + if (p.type === 6 && p.name === "style" && p.value) { + node.props[i] = { + type: 7, + name: `bind`, + arg: createSimpleExpression(`style`, true, p.loc), + exp: parseInlineCSS(p.value.content, p.loc), + modifiers: [], + loc: p.loc + }; + } + }); + } +}; +const parseInlineCSS = (cssText, loc) => { + const normalized = parseStringStyle(cssText); + return createSimpleExpression( + JSON.stringify(normalized), + false, + loc, + 3 + ); +}; + +function createDOMCompilerError(code, loc) { + return createCompilerError( + code, + loc, + DOMErrorMessages + ); +} +const DOMErrorMessages = { + [53]: `v-html is missing expression.`, + [54]: `v-html will override element children.`, + [55]: `v-text is missing expression.`, + [56]: `v-text will override element children.`, + [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, + [58]: `v-model argument is not supported on plain elements.`, + [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, + [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, + [61]: `v-show is missing expression.`, + [62]: `<Transition> expects exactly one child element or component.`, + [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` +}; + +const transformVHtml = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(53, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(54, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`innerHTML`, true, loc), + exp || createSimpleExpression("", true) + ) + ] + }; +}; + +const transformVText = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(55, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(56, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`textContent`, true), + exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression( + context.helperString(TO_DISPLAY_STRING), + [exp], + loc + ) : createSimpleExpression("", true) + ) + ] + }; +}; + +const transformModel = (dir, node, context) => { + const baseResult = transformModel$1(dir, node, context); + if (!baseResult.props.length || node.tagType === 1) { + return baseResult; + } + if (dir.arg) { + context.onError( + createDOMCompilerError( + 58, + dir.arg.loc + ) + ); + } + function checkDuplicatedValue() { + const value = findDir(node, "bind"); + if (value && isStaticArgOf(value.arg, "value")) { + context.onError( + createDOMCompilerError( + 60, + value.loc + ) + ); + } + } + const { tag } = node; + const isCustomElement = context.isCustomElement(tag); + if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { + let directiveToUse = V_MODEL_TEXT; + let isInvalidType = false; + if (tag === "input" || isCustomElement) { + const type = findProp(node, `type`); + if (type) { + if (type.type === 7) { + directiveToUse = V_MODEL_DYNAMIC; + } else if (type.value) { + switch (type.value.content) { + case "radio": + directiveToUse = V_MODEL_RADIO; + break; + case "checkbox": + directiveToUse = V_MODEL_CHECKBOX; + break; + case "file": + isInvalidType = true; + context.onError( + createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + default: + checkDuplicatedValue(); + break; + } + } + } else if (hasDynamicKeyVBind(node)) { + directiveToUse = V_MODEL_DYNAMIC; + } else { + checkDuplicatedValue(); + } + } else if (tag === "select") { + directiveToUse = V_MODEL_SELECT; + } else { + checkDuplicatedValue(); + } + if (!isInvalidType) { + baseResult.needRuntime = context.helper(directiveToUse); + } + } else { + context.onError( + createDOMCompilerError( + 57, + dir.loc + ) + ); + } + baseResult.props = baseResult.props.filter( + (p) => !(p.key.type === 4 && p.key.content === "modelValue") + ); + return baseResult; +}; + +const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`); +const isNonKeyModifier = /* @__PURE__ */ makeMap( + // event propagation management + `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` +); +const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right"); +const isKeyboardEvent = /* @__PURE__ */ makeMap(`onkeyup,onkeydown,onkeypress`); +const resolveModifiers = (key, modifiers, context, loc) => { + const keyModifiers = []; + const nonKeyModifiers = []; + const eventOptionModifiers = []; + for (let i = 0; i < modifiers.length; i++) { + const modifier = modifiers[i].content; + if (isEventOptionModifier(modifier)) { + eventOptionModifiers.push(modifier); + } else { + if (maybeKeyModifier(modifier)) { + if (isStaticExp(key)) { + if (isKeyboardEvent(key.content.toLowerCase())) { + keyModifiers.push(modifier); + } else { + nonKeyModifiers.push(modifier); + } + } else { + keyModifiers.push(modifier); + nonKeyModifiers.push(modifier); + } + } else { + if (isNonKeyModifier(modifier)) { + nonKeyModifiers.push(modifier); + } else { + keyModifiers.push(modifier); + } + } + } + } + return { + keyModifiers, + nonKeyModifiers, + eventOptionModifiers + }; +}; +const transformClick = (key, event) => { + const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick"; + return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([ + `(`, + key, + `) === "onClick" ? "${event}" : (`, + key, + `)` + ]) : key; +}; +const transformOn = (dir, node, context) => { + return transformOn$1(dir, node, context, (baseResult) => { + const { modifiers } = dir; + if (!modifiers.length) return baseResult; + let { key, value: handlerExp } = baseResult.props[0]; + const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); + if (nonKeyModifiers.includes("right")) { + key = transformClick(key, `onContextmenu`); + } + if (nonKeyModifiers.includes("middle")) { + key = transformClick(key, `onMouseup`); + } + if (nonKeyModifiers.length) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ + handlerExp, + JSON.stringify(nonKeyModifiers) + ]); + } + if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard + (!isStaticExp(key) || isKeyboardEvent(key.content.toLowerCase()))) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ + handlerExp, + JSON.stringify(keyModifiers) + ]); + } + if (eventOptionModifiers.length) { + const modifierPostfix = eventOptionModifiers.map(capitalize).join(""); + key = isStaticExp(key) ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); + } + return { + props: [createObjectProperty(key, handlerExp)] + }; + }); +}; + +const transformShow = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(61, loc) + ); + } + return { + props: [], + needRuntime: context.helper(V_SHOW) + }; +}; + +const transformTransition = (node, context) => { + if (node.type === 1 && node.tagType === 1) { + const component = context.isBuiltInComponent(node.tag); + if (component === TRANSITION) { + return () => { + if (!node.children.length) { + return; + } + if (hasMultipleChildren(node)) { + context.onError( + createDOMCompilerError( + 62, + { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + } + ) + ); + } + const child = node.children[0]; + if (child.type === 1) { + for (const p of child.props) { + if (p.type === 7 && p.name === "show") { + node.props.push({ + type: 6, + name: "persisted", + nameLoc: node.loc, + value: void 0, + loc: node.loc + }); + } + } + } + }; + } + } +}; +function hasMultipleChildren(node) { + const children = node.children = node.children.filter( + (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()) + ); + const child = children[0]; + return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren); +} + +const ignoreSideEffectTags = (node, context) => { + if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { + context.onError( + createDOMCompilerError( + 63, + node.loc + ) + ); + context.removeNode(); + } +}; + +function isValidHTMLNesting(parent, child) { + if (parent in onlyValidChildren) { + return onlyValidChildren[parent].has(child); + } + if (child in onlyValidParents) { + return onlyValidParents[child].has(parent); + } + if (parent in knownInvalidChildren) { + if (knownInvalidChildren[parent].has(child)) return false; + } + if (child in knownInvalidParents) { + if (knownInvalidParents[child].has(parent)) return false; + } + return true; +} +const headings = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]); +const emptySet = /* @__PURE__ */ new Set([]); +const onlyValidChildren = { + head: /* @__PURE__ */ new Set([ + "base", + "basefront", + "bgsound", + "link", + "meta", + "title", + "noscript", + "noframes", + "style", + "script", + "template" + ]), + optgroup: /* @__PURE__ */ new Set(["option"]), + select: /* @__PURE__ */ new Set(["optgroup", "option", "hr"]), + // table + table: /* @__PURE__ */ new Set(["caption", "colgroup", "tbody", "tfoot", "thead"]), + tr: /* @__PURE__ */ new Set(["td", "th"]), + colgroup: /* @__PURE__ */ new Set(["col"]), + tbody: /* @__PURE__ */ new Set(["tr"]), + thead: /* @__PURE__ */ new Set(["tr"]), + tfoot: /* @__PURE__ */ new Set(["tr"]), + // these elements can not have any children elements + script: emptySet, + iframe: emptySet, + option: emptySet, + textarea: emptySet, + style: emptySet, + title: emptySet +}; +const onlyValidParents = { + // sections + html: emptySet, + body: /* @__PURE__ */ new Set(["html"]), + head: /* @__PURE__ */ new Set(["html"]), + // table + td: /* @__PURE__ */ new Set(["tr"]), + colgroup: /* @__PURE__ */ new Set(["table"]), + caption: /* @__PURE__ */ new Set(["table"]), + tbody: /* @__PURE__ */ new Set(["table"]), + tfoot: /* @__PURE__ */ new Set(["table"]), + col: /* @__PURE__ */ new Set(["colgroup"]), + th: /* @__PURE__ */ new Set(["tr"]), + thead: /* @__PURE__ */ new Set(["table"]), + tr: /* @__PURE__ */ new Set(["tbody", "thead", "tfoot"]), + // data list + dd: /* @__PURE__ */ new Set(["dl", "div"]), + dt: /* @__PURE__ */ new Set(["dl", "div"]), + // other + figcaption: /* @__PURE__ */ new Set(["figure"]), + // li: new Set(["ul", "ol"]), + summary: /* @__PURE__ */ new Set(["details"]), + area: /* @__PURE__ */ new Set(["map"]) +}; +const knownInvalidChildren = { + p: /* @__PURE__ */ new Set([ + "address", + "article", + "aside", + "blockquote", + "center", + "details", + "dialog", + "dir", + "div", + "dl", + "fieldset", + "figure", + "footer", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "header", + "hgroup", + "hr", + "li", + "main", + "nav", + "menu", + "ol", + "p", + "pre", + "section", + "table", + "ul" + ]), + svg: /* @__PURE__ */ new Set([ + "b", + "blockquote", + "br", + "code", + "dd", + "div", + "dl", + "dt", + "em", + "embed", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "hr", + "i", + "img", + "li", + "menu", + "meta", + "ol", + "p", + "pre", + "ruby", + "s", + "small", + "span", + "strong", + "sub", + "sup", + "table", + "u", + "ul", + "var" + ]) +}; +const knownInvalidParents = { + a: /* @__PURE__ */ new Set(["a"]), + button: /* @__PURE__ */ new Set(["button"]), + dd: /* @__PURE__ */ new Set(["dd", "dt"]), + dt: /* @__PURE__ */ new Set(["dd", "dt"]), + form: /* @__PURE__ */ new Set(["form"]), + li: /* @__PURE__ */ new Set(["li"]), + h1: headings, + h2: headings, + h3: headings, + h4: headings, + h5: headings, + h6: headings +}; + +const validateHtmlNesting = (node, context) => { + if (node.type === 1 && node.tagType === 0 && context.parent && context.parent.type === 1 && context.parent.tagType === 0 && !isValidHTMLNesting(context.parent.tag, node.tag)) { + const error = new SyntaxError( + `<${node.tag}> cannot be child of <${context.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.` + ); + error.loc = node.loc; + context.onWarn(error); + } +}; + +const DOMNodeTransforms = [ + transformStyle, + ...[transformTransition, validateHtmlNesting] +]; +const DOMDirectiveTransforms = { + cloak: noopDirectiveTransform, + html: transformVHtml, + text: transformVText, + model: transformModel, + // override compiler-core + on: transformOn, + // override compiler-core + show: transformShow +}; +function compile(src, options = {}) { + return baseCompile( + src, + extend({}, parserOptions, options, { + nodeTransforms: [ + // ignore <script> and <tag> + // this is not put inside DOMNodeTransforms because that list is used + // by compiler-ssr to generate vnode fallback branches + ignoreSideEffectTags, + ...DOMNodeTransforms, + ...options.nodeTransforms || [] + ], + directiveTransforms: extend( + {}, + DOMDirectiveTransforms, + options.directiveTransforms || {} + ), + transformHoist: null + }) + ); +} + +{ + initDev(); +} +const compileCache = /* @__PURE__ */ Object.create(null); +function compileToFunction(template, options) { + if (!isString(template)) { + if (template.nodeType) { + template = template.innerHTML; + } else { + warn(`invalid template option: `, template); + return NOOP; + } + } + const key = genCacheKey(template, options); + const cached = compileCache[key]; + if (cached) { + return cached; + } + if (template[0] === "#") { + const el = document.querySelector(template); + if (!el) { + warn(`Template element not found or is empty: ${template}`); + } + template = el ? el.innerHTML : ``; + } + const opts = extend( + { + hoistStatic: true, + onError: onError , + onWarn: (e) => onError(e, true) + }, + options + ); + if (!opts.isCustomElement && typeof customElements !== "undefined") { + opts.isCustomElement = (tag) => !!customElements.get(tag); + } + const { code } = compile(template, opts); + function onError(err, asWarning = false) { + const message = asWarning ? err.message : `Template compilation error: ${err.message}`; + const codeFrame = err.loc && generateCodeFrame( + template, + err.loc.start.offset, + err.loc.end.offset + ); + warn(codeFrame ? `${message} +${codeFrame}` : message); + } + const render = new Function("Vue", code)(runtimeDom); + render._rc = true; + return compileCache[key] = render; +} +registerRuntimeCompiler(compileToFunction); + +export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, compileToFunction as compile, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId }; diff --git a/vuetest/node_modules/vue/dist/vue.esm-browser.prod.js b/vuetest/node_modules/vue/dist/vue.esm-browser.prod.js new file mode 100644 index 0000000..19179c3 --- /dev/null +++ b/vuetest/node_modules/vue/dist/vue.esm-browser.prod.js @@ -0,0 +1,9 @@ +/** +* vue v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let e,t,n,r,i,l,s,o,a,c,u,d,p;function f(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return e=>e in t}let h={},m=[],g=()=>{},y=()=>!1,b=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||97>e.charCodeAt(2)),_=e=>e.startsWith("onUpdate:"),S=Object.assign,x=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},C=Object.prototype.hasOwnProperty,T=(e,t)=>C.call(e,t),k=Array.isArray,w=e=>"[object Map]"===L(e),N=e=>"[object Set]"===L(e),E=e=>"[object Date]"===L(e),A=e=>"[object RegExp]"===L(e),R=e=>"function"==typeof e,I=e=>"string"==typeof e,O=e=>"symbol"==typeof e,P=e=>null!==e&&"object"==typeof e,M=e=>(P(e)||R(e))&&R(e.then)&&R(e.catch),D=Object.prototype.toString,L=e=>D.call(e),$=e=>L(e).slice(8,-1),F=e=>"[object Object]"===L(e),V=e=>I(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,B=f(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),U=f("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),j=e=>{let t=Object.create(null);return n=>t[n]||(t[n]=e(n))},H=/-(\w)/g,q=j(e=>e.replace(H,(e,t)=>t?t.toUpperCase():"")),W=/\B([A-Z])/g,K=j(e=>e.replace(W,"-$1").toLowerCase()),z=j(e=>e.charAt(0).toUpperCase()+e.slice(1)),J=j(e=>e?`on${z(e)}`:""),G=(e,t)=>!Object.is(e,t),Q=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},X=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Z=e=>{let t=parseFloat(e);return isNaN(t)?e:t},Y=e=>{let t=I(e)?Number(e):NaN;return isNaN(t)?e:t},ee=()=>e||(e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),et=f("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function en(e){if(k(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=I(r)?es(r):en(r);if(i)for(let e in i)t[e]=i[e]}return t}if(I(e)||P(e))return e}let er=/;(?![^(]*\))/g,ei=/:([^]+)/,el=/\/\*[^]*?\*\//g;function es(e){let t={};return e.replace(el,"").split(er).forEach(e=>{if(e){let n=e.split(ei);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function eo(e){let t="";if(I(e))t=e;else if(k(e))for(let n=0;n<e.length;n++){let r=eo(e[n]);r&&(t+=r+" ")}else if(P(e))for(let n in e)e[n]&&(t+=n+" ");return t.trim()}function ea(e){if(!e)return null;let{class:t,style:n}=e;return t&&!I(t)&&(e.class=eo(t)),n&&(e.style=en(n)),e}let ec=f("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),eu=f("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),ed=f("annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"),ep=f("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),ef=f("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function eh(e,t){if(e===t)return!0;let n=E(e),r=E(t);if(n||r)return!!n&&!!r&&e.getTime()===t.getTime();if(n=O(e),r=O(t),n||r)return e===t;if(n=k(e),r=k(t),n||r)return!!n&&!!r&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=eh(e[r],t[r]);return n}(e,t);if(n=P(e),r=P(t),n||r){if(!n||!r||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){let r=e.hasOwnProperty(n),i=t.hasOwnProperty(n);if(r&&!i||!r&&i||!eh(e[n],t[n]))return!1}}return String(e)===String(t)}function em(e,t){return e.findIndex(e=>eh(e,t))}let eg=e=>!!(e&&!0===e.__v_isRef),ey=e=>I(e)?e:null==e?"":k(e)||P(e)&&(e.toString===D||!R(e.toString))?eg(e)?ey(e.value):JSON.stringify(e,ev,2):String(e),ev=(e,t)=>eg(t)?ev(e,t.value):w(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[eb(t,r)+" =>"]=n,e),{})}:N(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>eb(e))}:O(t)?eb(t):!P(t)||k(t)||F(t)?t:String(t),eb=(e,t="")=>{var n;return O(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};class e_{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=t,!e&&t&&(this.index=(t.scopes||(t.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let n=t;try{return t=this,e()}finally{t=n}}}on(){t=this}off(){t=this.parent}stop(e){if(this._active){let t,n;for(t=0,this._active=!1,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,this.effects.length=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}function eS(e){return new e_(e)}function ex(){return t}function eC(e,n=!1){t&&t.cleanups.push(e)}let eT=new WeakSet;class ek{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,t&&t.active&&t.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,eT.has(this)&&(eT.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||eN(this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,eB(this),eA(this);let e=n,t=eL;n=this,eL=!0;try{return this.fn()}finally{eR(this),n=e,eL=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)eP(e);this.deps=this.depsTail=void 0,eB(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?eT.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){eI(this)&&this.run()}get dirty(){return eI(this)}}let ew=0;function eN(e,t=!1){if(e.flags|=8,t){e.next=i,i=e;return}e.next=r,r=e}function eE(){let e;if(!(--ew>0)){if(i){let e=i;for(i=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}for(;r;){let t=r;for(r=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}}function eA(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function eR(e){let t;let n=e.depsTail,r=n;for(;r;){let e=r.prevDep;-1===r.version?(r===n&&(n=e),eP(r),function(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function eI(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(eO(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function eO(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===eU))return;e.globalVersion=eU;let t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!eI(e)){e.flags&=-3;return}let r=n,i=eL;n=e,eL=!0;try{eA(e);let n=e.fn(e._value);(0===t.version||G(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{n=r,eL=i,eR(e),e.flags&=-3}}function eP(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)eP(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}function eM(e,t){e.effect instanceof ek&&(e=e.effect.fn);let n=new ek(e);t&&S(n,t);try{n.run()}catch(e){throw n.stop(),e}let r=n.run.bind(n);return r.effect=n,r}function eD(e){e.effect.stop()}let eL=!0,e$=[];function eF(){e$.push(eL),eL=!1}function eV(){let e=e$.pop();eL=void 0===e||e}function eB(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=n;n=void 0;try{t()}finally{n=e}}}let eU=0;class ej{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class eH{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!n||!eL||n===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==n)t=this.activeLink=new ej(n,this),n.deps?(t.prevDep=n.depsTail,n.depsTail.nextDep=t,n.depsTail=t):n.deps=n.depsTail=t,function e(t){if(t.dep.sc++,4&t.sub.flags){let n=t.dep.computed;if(n&&!t.dep.subs){n.flags|=20;for(let t=n.deps;t;t=t.nextDep)e(t)}let r=t.dep.subs;r!==t&&(t.prevSub=r,r&&(r.nextSub=t)),t.dep.subs=t}}(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=n.depsTail,t.nextDep=void 0,n.depsTail.nextDep=t,n.depsTail=t,n.deps===t&&(n.deps=e)}return t}trigger(e){this.version++,eU++,this.notify(e)}notify(e){ew++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{eE()}}}let eq=new WeakMap,eW=Symbol(""),eK=Symbol(""),ez=Symbol("");function eJ(e,t,r){if(eL&&n){let t=eq.get(e);t||eq.set(e,t=new Map);let n=t.get(r);n||(t.set(r,n=new eH),n.map=t,n.key=r),n.track()}}function eG(e,t,n,r,i,l){let s=eq.get(e);if(!s){eU++;return}let o=e=>{e&&e.trigger()};if(ew++,"clear"===t)s.forEach(o);else{let i=k(e),l=i&&V(n);if(i&&"length"===n){let e=Number(r);s.forEach((t,n)=>{("length"===n||n===ez||!O(n)&&n>=e)&&o(t)})}else switch((void 0!==n||s.has(void 0))&&o(s.get(n)),l&&o(s.get(ez)),t){case"add":i?l&&o(s.get("length")):(o(s.get(eW)),w(e)&&o(s.get(eK)));break;case"delete":!i&&(o(s.get(eW)),w(e)&&o(s.get(eK)));break;case"set":w(e)&&o(s.get(eW))}}eE()}function eQ(e){let t=tw(e);return t===e?t:(eJ(t,"iterate",ez),tT(e)?t:t.map(tE))}function eX(e){return eJ(e=tw(e),"iterate",ez),e}let eZ={__proto__:null,[Symbol.iterator](){return eY(this,Symbol.iterator,tE)},concat(...e){return eQ(this).concat(...e.map(e=>k(e)?eQ(e):e))},entries(){return eY(this,"entries",e=>(e[1]=tE(e[1]),e))},every(e,t){return e1(this,"every",e,t,void 0,arguments)},filter(e,t){return e1(this,"filter",e,t,e=>e.map(tE),arguments)},find(e,t){return e1(this,"find",e,t,tE,arguments)},findIndex(e,t){return e1(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return e1(this,"findLast",e,t,tE,arguments)},findLastIndex(e,t){return e1(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return e1(this,"forEach",e,t,void 0,arguments)},includes(...e){return e3(this,"includes",e)},indexOf(...e){return e3(this,"indexOf",e)},join(e){return eQ(this).join(e)},lastIndexOf(...e){return e3(this,"lastIndexOf",e)},map(e,t){return e1(this,"map",e,t,void 0,arguments)},pop(){return e6(this,"pop")},push(...e){return e6(this,"push",e)},reduce(e,...t){return e2(this,"reduce",e,t)},reduceRight(e,...t){return e2(this,"reduceRight",e,t)},shift(){return e6(this,"shift")},some(e,t){return e1(this,"some",e,t,void 0,arguments)},splice(...e){return e6(this,"splice",e)},toReversed(){return eQ(this).toReversed()},toSorted(e){return eQ(this).toSorted(e)},toSpliced(...e){return eQ(this).toSpliced(...e)},unshift(...e){return e6(this,"unshift",e)},values(){return eY(this,"values",tE)}};function eY(e,t,n){let r=eX(e),i=r[t]();return r===e||tT(e)||(i._next=i.next,i.next=()=>{let e=i._next();return e.value&&(e.value=n(e.value)),e}),i}let e0=Array.prototype;function e1(e,t,n,r,i,l){let s=eX(e),o=s!==e&&!tT(e),a=s[t];if(a!==e0[t]){let t=a.apply(e,l);return o?tE(t):t}let c=n;s!==e&&(o?c=function(t,r){return n.call(this,tE(t),r,e)}:n.length>2&&(c=function(t,r){return n.call(this,t,r,e)}));let u=a.call(s,c,r);return o&&i?i(u):u}function e2(e,t,n,r){let i=eX(e),l=n;return i!==e&&(tT(e)?n.length>3&&(l=function(t,r,i){return n.call(this,t,r,i,e)}):l=function(t,r,i){return n.call(this,t,tE(r),i,e)}),i[t](l,...r)}function e3(e,t,n){let r=tw(e);eJ(r,"iterate",ez);let i=r[t](...n);return(-1===i||!1===i)&&tk(n[0])?(n[0]=tw(n[0]),r[t](...n)):i}function e6(e,t,n=[]){eF(),ew++;let r=tw(e)[t].apply(e,n);return eE(),eV(),r}let e4=f("__proto__,__v_isRef,__isVue"),e8=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(O));function e5(e){O(e)||(e=String(e));let t=tw(this);return eJ(t,"has",e),t.hasOwnProperty(e)}class e9{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if("__v_skip"===t)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if("__v_isReactive"===t)return!r;if("__v_isReadonly"===t)return r;if("__v_isShallow"===t)return i;if("__v_raw"===t)return n===(r?i?tg:tm:i?th:tf).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let l=k(e);if(!r){let e;if(l&&(e=eZ[t]))return e;if("hasOwnProperty"===t)return e5}let s=Reflect.get(e,t,tR(e)?e:n);return(O(t)?e8.has(t):e4(t))?s:(r||eJ(e,"get",t),i)?s:tR(s)?l&&V(t)?s:s.value:P(s)?r?tb(s):ty(s):s}}class e7 extends e9{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t];if(!this._isShallow){let t=tC(i);if(tT(n)||tC(n)||(i=tw(i),n=tw(n)),!k(e)&&tR(i)&&!tR(n))return!t&&(i.value=n,!0)}let l=k(e)&&V(t)?Number(t)<e.length:T(e,t),s=Reflect.set(e,t,n,tR(e)?e:r);return e===tw(r)&&(l?G(n,i)&&eG(e,"set",t,n):eG(e,"add",t,n)),s}deleteProperty(e,t){let n=T(e,t);e[t];let r=Reflect.deleteProperty(e,t);return r&&n&&eG(e,"delete",t,void 0),r}has(e,t){let n=Reflect.has(e,t);return O(t)&&e8.has(t)||eJ(e,"has",t),n}ownKeys(e){return eJ(e,"iterate",k(e)?"length":eW),Reflect.ownKeys(e)}}class te extends e9{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}let tt=new e7,tn=new te,tr=new e7(!0),ti=new te(!0),tl=e=>e,ts=e=>Reflect.getPrototypeOf(e);function to(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function ta(e,t){let n=function(e,t){let n={get(n){let r=this.__v_raw,i=tw(r),l=tw(n);e||(G(n,l)&&eJ(i,"get",n),eJ(i,"get",l));let{has:s}=ts(i),o=t?tl:e?tA:tE;return s.call(i,n)?o(r.get(n)):s.call(i,l)?o(r.get(l)):void(r!==i&&r.get(n))},get size(){let t=this.__v_raw;return e||eJ(tw(t),"iterate",eW),Reflect.get(t,"size",t)},has(t){let n=this.__v_raw,r=tw(n),i=tw(t);return e||(G(t,i)&&eJ(r,"has",t),eJ(r,"has",i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,l=i.__v_raw,s=tw(l),o=t?tl:e?tA:tE;return e||eJ(s,"iterate",eW),l.forEach((e,t)=>n.call(r,o(e),o(t),i))}};return S(n,e?{add:to("add"),set:to("set"),delete:to("delete"),clear:to("clear")}:{add(e){t||tT(e)||tC(e)||(e=tw(e));let n=tw(this);return ts(n).has.call(n,e)||(n.add(e),eG(n,"add",e,e)),this},set(e,n){t||tT(n)||tC(n)||(n=tw(n));let r=tw(this),{has:i,get:l}=ts(r),s=i.call(r,e);s||(e=tw(e),s=i.call(r,e));let o=l.call(r,e);return r.set(e,n),s?G(n,o)&&eG(r,"set",e,n):eG(r,"add",e,n),this},delete(e){let t=tw(this),{has:n,get:r}=ts(t),i=n.call(t,e);i||(e=tw(e),i=n.call(t,e)),r&&r.call(t,e);let l=t.delete(e);return i&&eG(t,"delete",e,void 0),l},clear(){let e=tw(this),t=0!==e.size,n=e.clear();return t&&eG(e,"clear",void 0,void 0),n}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=function(...n){let i=this.__v_raw,l=tw(i),s=w(l),o="entries"===r||r===Symbol.iterator&&s,a=i[r](...n),c=t?tl:e?tA:tE;return e||eJ(l,"iterate","keys"===r&&s?eK:eW),{next(){let{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:o?[c(e[0]),c(e[1])]:c(e),done:t}},[Symbol.iterator](){return this}}}}),n}(e,t);return(t,r,i)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(T(n,r)&&r in t?n:t,r,i)}let tc={get:ta(!1,!1)},tu={get:ta(!1,!0)},td={get:ta(!0,!1)},tp={get:ta(!0,!0)},tf=new WeakMap,th=new WeakMap,tm=new WeakMap,tg=new WeakMap;function ty(e){return tC(e)?e:tS(e,!1,tt,tc,tf)}function tv(e){return tS(e,!1,tr,tu,th)}function tb(e){return tS(e,!0,tn,td,tm)}function t_(e){return tS(e,!0,ti,tp,tg)}function tS(e,t,n,r,i){if(!P(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let l=i.get(e);if(l)return l;let s=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}($(e));if(0===s)return e;let o=new Proxy(e,2===s?r:n);return i.set(e,o),o}function tx(e){return tC(e)?tx(e.__v_raw):!!(e&&e.__v_isReactive)}function tC(e){return!!(e&&e.__v_isReadonly)}function tT(e){return!!(e&&e.__v_isShallow)}function tk(e){return!!e&&!!e.__v_raw}function tw(e){let t=e&&e.__v_raw;return t?tw(t):e}function tN(e){return!T(e,"__v_skip")&&Object.isExtensible(e)&&X(e,"__v_skip",!0),e}let tE=e=>P(e)?ty(e):e,tA=e=>P(e)?tb(e):e;function tR(e){return!!e&&!0===e.__v_isRef}function tI(e){return tP(e,!1)}function tO(e){return tP(e,!0)}function tP(e,t){return tR(e)?e:new tM(e,t)}class tM{constructor(e,t){this.dep=new eH,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:tw(e),this._value=t?e:tE(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||tT(e)||tC(e);G(e=n?e:tw(e),t)&&(this._rawValue=e,this._value=n?e:tE(e),this.dep.trigger())}}function tD(e){e.dep&&e.dep.trigger()}function tL(e){return tR(e)?e.value:e}function t$(e){return R(e)?e():tL(e)}let tF={get:(e,t,n)=>"__v_raw"===t?e:tL(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return tR(i)&&!tR(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function tV(e){return tx(e)?e:new Proxy(e,tF)}class tB{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new eH,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}}function tU(e){return new tB(e)}function tj(e){let t=k(e)?Array(e.length):{};for(let n in e)t[n]=tK(e,n);return t}class tH{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){let n=eq.get(e);return n&&n.get(t)}(tw(this._object),this._key)}}class tq{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function tW(e,t,n){return tR(e)?e:R(e)?new tq(e):P(e)&&arguments.length>1?tK(e,t,n):tI(e)}function tK(e,t,n){let r=e[t];return tR(r)?r:new tH(e,t,n)}class tz{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new eH(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=eU-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags)&&n!==this)return eN(this,!0),!0}get value(){let e=this.dep.track();return eO(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}let tJ={GET:"get",HAS:"has",ITERATE:"iterate"},tG={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},tQ={},tX=new WeakMap;function tZ(){return d}function tY(e,t=!1,n=d){if(n){let t=tX.get(n);t||tX.set(n,t=[]),t.push(e)}}function t0(e,t=1/0,n){if(t<=0||!P(e)||e.__v_skip||(n=n||new Set).has(e))return e;if(n.add(e),t--,tR(e))t0(e.value,t,n);else if(k(e))for(let r=0;r<e.length;r++)t0(e[r],t,n);else if(N(e)||w(e))e.forEach(e=>{t0(e,t,n)});else if(F(e)){for(let r in e)t0(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&t0(e[r],t,n)}return e}function t1(e,t){}let t2={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"};function t3(e,t,n,r){try{return r?e(...r):e()}catch(e){t4(e,t,n)}}function t6(e,t,n,r){if(R(e)){let i=t3(e,t,n,r);return i&&M(i)&&i.catch(e=>{t4(e,t,n)}),i}if(k(e)){let i=[];for(let l=0;l<e.length;l++)i.push(t6(e[l],t,n,r));return i}}function t4(e,t,n,r=!0){t&&t.vnode;let{errorHandler:i,throwUnhandledErrorInProduction:l}=t&&t.appContext.config||h;if(t){let r=t.parent,l=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){let t=r.ec;if(t){for(let n=0;n<t.length;n++)if(!1===t[n](e,l,s))return}r=r.parent}if(i){eF(),t3(i,null,10,[e,l,s]),eV();return}}!function(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}(e,0,0,r,l)}let t8=[],t5=-1,t9=[],t7=null,ne=0,nt=Promise.resolve(),nn=null;function nr(e){let t=nn||nt;return e?t.then(this?e.bind(this):e):t}function ni(e){if(!(1&e.flags)){let t=nc(e),n=t8[t8.length-1];!n||!(2&e.flags)&&t>=nc(n)?t8.push(e):t8.splice(function(e){let t=t5+1,n=t8.length;for(;t<n;){let r=t+n>>>1,i=t8[r],l=nc(i);l<e||l===e&&2&i.flags?t=r+1:n=r}return t}(t),0,e),e.flags|=1,nl()}}function nl(){nn||(nn=nt.then(function e(t){try{for(t5=0;t5<t8.length;t5++){let e=t8[t5];!e||8&e.flags||(4&e.flags&&(e.flags&=-2),t3(e,e.i,e.i?15:14),4&e.flags||(e.flags&=-2))}}finally{for(;t5<t8.length;t5++){let e=t8[t5];e&&(e.flags&=-2)}t5=-1,t8.length=0,na(),nn=null,(t8.length||t9.length)&&e()}}))}function ns(e){k(e)?t9.push(...e):t7&&-1===e.id?t7.splice(ne+1,0,e):1&e.flags||(t9.push(e),e.flags|=1),nl()}function no(e,t,n=t5+1){for(;n<t8.length;n++){let t=t8[n];if(t&&2&t.flags){if(e&&t.id!==e.uid)continue;t8.splice(n,1),n--,4&t.flags&&(t.flags&=-2),t(),4&t.flags||(t.flags&=-2)}}}function na(e){if(t9.length){let e=[...new Set(t9)].sort((e,t)=>nc(e)-nc(t));if(t9.length=0,t7){t7.push(...e);return}for(ne=0,t7=e;ne<t7.length;ne++){let e=t7[ne];4&e.flags&&(e.flags&=-2),8&e.flags||e(),e.flags&=-2}t7=null,ne=0}}let nc=e=>null==e.id?2&e.flags?-1:1/0:e.id,nu=null,nd=null;function np(e){let t=nu;return nu=e,nd=e&&e.type.__scopeId||null,t}function nf(e){nd=e}function nh(){nd=null}let nm=e=>ng;function ng(e,t=nu,n){if(!t||e._n)return e;let r=(...n)=>{let i;r._d&&ls(-1);let l=np(t);try{i=e(...n)}finally{np(l),r._d&&ls(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function ny(e,t){if(null===nu)return e;let n=lH(nu),r=e.dirs||(e.dirs=[]);for(let e=0;e<t.length;e++){let[i,l,s,o=h]=t[e];i&&(R(i)&&(i={mounted:i,updated:i}),i.deep&&t0(l),r.push({dir:i,instance:n,value:l,oldValue:void 0,arg:s,modifiers:o}))}return e}function nv(e,t,n,r){let i=e.dirs,l=t&&t.dirs;for(let s=0;s<i.length;s++){let o=i[s];l&&(o.oldValue=l[s].value);let a=o.dir[r];a&&(eF(),t6(a,n,8,[e.el,o,e,t]),eV())}}let nb=Symbol("_vte"),n_=e=>e.__isTeleport,nS=e=>e&&(e.disabled||""===e.disabled),nx=e=>e&&(e.defer||""===e.defer),nC=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,nT=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,nk=(e,t)=>{let n=e&&e.to;return I(n)?t?t(n):null:n},nw={name:"Teleport",__isTeleport:!0,process(e,t,n,r,i,l,s,o,a,c){let{mc:u,pc:d,pbc:p,o:{insert:f,querySelector:h,createText:m,createComment:g}}=c,y=nS(t.props),{shapeFlag:b,children:_,dynamicChildren:S}=t;if(null==e){let e=t.el=m(""),c=t.anchor=m("");f(e,n,r),f(c,n,r);let d=(e,t)=>{16&b&&(i&&i.isCE&&(i.ce._teleportTarget=e),u(_,e,t,i,l,s,o,a))},p=()=>{let e=t.target=nk(t.props,h),n=nR(e,t,m,f);e&&("svg"!==s&&nC(e)?s="svg":"mathml"!==s&&nT(e)&&(s="mathml"),y||(d(e,n),nA(t,!1)))};y&&(d(n,c),nA(t,!0)),nx(t.props)?iw(()=>{p(),t.el.__isMounted=!0},l):p()}else{if(nx(t.props)&&!e.el.__isMounted){iw(()=>{nw.process(e,t,n,r,i,l,s,o,a,c),delete e.el.__isMounted},l);return}t.el=e.el,t.targetStart=e.targetStart;let u=t.anchor=e.anchor,f=t.target=e.target,m=t.targetAnchor=e.targetAnchor,g=nS(e.props),b=g?n:f;if("svg"===s||nC(f)?s="svg":("mathml"===s||nT(f))&&(s="mathml"),S?(p(e.dynamicChildren,S,b,i,l,s,o),iP(e,t,!0)):a||d(e,t,b,g?u:m,i,l,s,o,!1),y)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):nN(t,n,u,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=nk(t.props,h);e&&nN(t,e,null,c,0)}else g&&nN(t,f,m,c,1);nA(t,y)}},remove(e,t,n,{um:r,o:{remove:i}},l){let{shapeFlag:s,children:o,anchor:a,targetStart:c,targetAnchor:u,target:d,props:p}=e;if(d&&(i(c),i(u)),l&&i(a),16&s){let e=l||!nS(p);for(let i=0;i<o.length;i++){let l=o[i];r(l,t,n,e,!!l.dynamicChildren)}}},move:nN,hydrate:function(e,t,n,r,i,l,{o:{nextSibling:s,parentNode:o,querySelector:a,insert:c,createText:u}},d){let p=t.target=nk(t.props,a);if(p){let a=nS(t.props),f=p._lpa||p.firstChild;if(16&t.shapeFlag){if(a)t.anchor=d(s(e),t,o(e),n,r,i,l),t.targetStart=f,t.targetAnchor=f&&s(f);else{t.anchor=s(e);let o=f;for(;o;){if(o&&8===o.nodeType){if("teleport start anchor"===o.data)t.targetStart=o;else if("teleport anchor"===o.data){t.targetAnchor=o,p._lpa=t.targetAnchor&&s(t.targetAnchor);break}}o=s(o)}t.targetAnchor||nR(p,t,u,c),d(f&&s(f),t,p,n,r,i,l)}}nA(t,a)}return t.anchor&&s(t.anchor)}};function nN(e,t,n,{o:{insert:r},m:i},l=2){0===l&&r(e.targetAnchor,t,n);let{el:s,anchor:o,shapeFlag:a,children:c,props:u}=e,d=2===l;if(d&&r(s,t,n),(!d||nS(u))&&16&a)for(let e=0;e<c.length;e++)i(c[e],t,n,2);d&&r(o,t,n)}let nE=nw;function nA(e,t){let n=e.ctx;if(n&&n.ut){let r,i;for(t?(r=e.el,i=e.anchor):(r=e.targetStart,i=e.targetAnchor);r&&r!==i;)1===r.nodeType&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function nR(e,t,n,r){let i=t.targetStart=n(""),l=t.targetAnchor=n("");return i[nb]=l,e&&(r(i,e),r(l,e)),l}let nI=Symbol("_leaveCb"),nO=Symbol("_enterCb");function nP(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return rg(()=>{e.isMounted=!0}),rb(()=>{e.isUnmounting=!0}),e}let nM=[Function,Array],nD={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:nM,onEnter:nM,onAfterEnter:nM,onEnterCancelled:nM,onBeforeLeave:nM,onLeave:nM,onAfterLeave:nM,onLeaveCancelled:nM,onBeforeAppear:nM,onAppear:nM,onAfterAppear:nM,onAppearCancelled:nM},nL=e=>{let t=e.subTree;return t.component?nL(t.component):t};function n$(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==i7){t=n;break}}return t}let nF={name:"BaseTransition",props:nD,setup(e,{slots:t}){let n=lI(),r=nP();return()=>{let i=t.default&&nq(t.default(),!0);if(!i||!i.length)return;let l=n$(i),s=tw(e),{mode:o}=s;if(r.isLeaving)return nU(l);let a=nj(l);if(!a)return nU(l);let c=nB(a,s,r,n,e=>c=e);a.type!==i7&&nH(a,c);let u=n.subTree&&nj(n.subTree);if(u&&u.type!==i7&&!ld(a,u)&&nL(n).type!==i7){let e=nB(u,s,r,n);if(nH(u,e),"out-in"===o&&a.type!==i7)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,8&n.job.flags||n.update(),delete e.afterLeave,u=void 0},nU(l);"in-out"===o&&a.type!==i7?e.delayLeave=(e,t,n)=>{nV(r,u)[String(u.key)]=u,e[nI]=()=>{t(),e[nI]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{n(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return l}}};function nV(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function nB(e,t,n,r,i){let{appear:l,mode:s,persisted:o=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:p,onLeave:f,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:g,onAppear:y,onAfterAppear:b,onAppearCancelled:_}=t,S=String(e.key),x=nV(n,e),C=(e,t)=>{e&&t6(e,r,9,t)},T=(e,t)=>{let n=t[1];C(e,t),k(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},w={mode:s,persisted:o,beforeEnter(t){let r=a;if(!n.isMounted){if(!l)return;r=g||a}t[nI]&&t[nI](!0);let i=x[S];i&&ld(e,i)&&i.el[nI]&&i.el[nI](),C(r,[t])},enter(e){let t=c,r=u,i=d;if(!n.isMounted){if(!l)return;t=y||c,r=b||u,i=_||d}let s=!1,o=e[nO]=t=>{s||(s=!0,t?C(i,[e]):C(r,[e]),w.delayedLeave&&w.delayedLeave(),e[nO]=void 0)};t?T(t,[e,o]):o()},leave(t,r){let i=String(e.key);if(t[nO]&&t[nO](!0),n.isUnmounting)return r();C(p,[t]);let l=!1,s=t[nI]=n=>{l||(l=!0,r(),n?C(m,[t]):C(h,[t]),t[nI]=void 0,x[i]!==e||delete x[i])};x[i]=e,f?T(f,[t,s]):s()},clone(e){let l=nB(e,t,n,r,i);return i&&i(l),l}};return w}function nU(e){if(rl(e))return(e=lv(e)).children=null,e}function nj(e){if(!rl(e))return n_(e.type)&&e.children?n$(e.children):e;let{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&R(n.default))return n.default()}}function nH(e,t){6&e.shapeFlag&&e.component?(e.transition=t,nH(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function nq(e,t=!1,n){let r=[],i=0;for(let l=0;l<e.length;l++){let s=e[l],o=null==n?s.key:String(n)+String(null!=s.key?s.key:l);s.type===i5?(128&s.patchFlag&&i++,r=r.concat(nq(s.children,t,o))):(t||s.type!==i7)&&r.push(null!=o?lv(s,{key:o}):s)}if(i>1)for(let e=0;e<r.length;e++)r[e].patchFlag=-2;return r}function nW(e,t){return R(e)?S({name:e.name},t,{setup:e}):e}function nK(){let e=lI();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function nz(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function nJ(e){let t=lI(),n=tO(null);return t&&Object.defineProperty(t.refs===h?t.refs={}:t.refs,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e}),n}function nG(e,t,n,r,i=!1){if(k(e)){e.forEach((e,l)=>nG(e,t&&(k(t)?t[l]:t),n,r,i));return}if(rn(r)&&!i){512&r.shapeFlag&&r.type.__asyncResolved&&r.component.subTree.component&&nG(e,t,n,r.component.subTree);return}let l=4&r.shapeFlag?lH(r.component):r.el,s=i?null:l,{i:o,r:a}=e,c=t&&t.r,u=o.refs===h?o.refs={}:o.refs,d=o.setupState,p=tw(d),f=d===h?()=>!1:e=>T(p,e);if(null!=c&&c!==a&&(I(c)?(u[c]=null,f(c)&&(d[c]=null)):tR(c)&&(c.value=null)),R(a))t3(a,o,12,[s,u]);else{let t=I(a),r=tR(a);if(t||r){let o=()=>{if(e.f){let n=t?f(a)?d[a]:u[a]:a.value;i?k(n)&&x(n,l):k(n)?n.includes(l)||n.push(l):t?(u[a]=[l],f(a)&&(d[a]=u[a])):(a.value=[l],e.k&&(u[e.k]=a.value))}else t?(u[a]=s,f(a)&&(d[a]=s)):r&&(a.value=s,e.k&&(u[e.k]=s))};s?(o.id=-1,iw(o,n)):o()}}}let nQ=!1,nX=()=>{nQ||(console.error("Hydration completed but contains mismatches."),nQ=!0)},nZ=e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName,nY=e=>e.namespaceURI.includes("MathML"),n0=e=>{if(1===e.nodeType){if(nZ(e))return"svg";if(nY(e))return"mathml"}},n1=e=>8===e.nodeType;function n2(e){let{mt:t,p:n,o:{patchProp:r,createText:i,nextSibling:l,parentNode:s,remove:o,insert:a,createComment:c}}=e,u=(n,r,o,c,b,_=!1)=>{_=_||!!r.dynamicChildren;let S=n1(n)&&"["===n.data,x=()=>h(n,r,o,c,b,S),{type:C,ref:T,shapeFlag:k,patchFlag:w}=r,N=n.nodeType;r.el=n,-2===w&&(_=!1,r.dynamicChildren=null);let E=null;switch(C){case i9:3!==N?""===r.children?(a(r.el=i(""),s(n),n),E=n):E=x():(n.data!==r.children&&(nX(),n.data=r.children),E=l(n));break;case i7:y(n)?(E=l(n),g(r.el=n.content.firstChild,n,o)):E=8!==N||S?x():l(n);break;case le:if(S&&(N=(n=l(n)).nodeType),1===N||3===N){E=n;let e=!r.children.length;for(let t=0;t<r.staticCount;t++)e&&(r.children+=1===E.nodeType?E.outerHTML:E.data),t===r.staticCount-1&&(r.anchor=E),E=l(E);return S?l(E):E}x();break;case i5:E=S?f(n,r,o,c,b,_):x();break;default:if(1&k)E=1===N&&r.type.toLowerCase()===n.tagName.toLowerCase()||y(n)?d(n,r,o,c,b,_):x();else if(6&k){r.slotScopeIds=b;let e=s(n);if(E=S?m(n):n1(n)&&"teleport start"===n.data?m(n,n.data,"teleport end"):l(n),t(r,e,null,o,c,n0(e),_),rn(r)&&!r.type.__asyncResolved){let t;S?(t=lg(i5)).anchor=E?E.previousSibling:e.lastChild:t=3===n.nodeType?lb(""):lg("div"),t.el=n,r.component.subTree=t}}else 64&k?E=8!==N?x():r.type.hydrate(n,r,o,c,b,_,e,p):128&k&&(E=r.type.hydrate(n,r,o,c,n0(s(n)),b,_,e,u))}return null!=T&&nG(T,null,c,r),E},d=(e,t,n,i,l,s)=>{s=s||!!t.dynamicChildren;let{type:a,props:c,patchFlag:u,shapeFlag:d,dirs:f,transition:h}=t,m="input"===a||"option"===a;if(m||-1!==u){let a;f&&nv(t,null,n,"created");let _=!1;if(y(e)){_=iO(null,h)&&n&&n.vnode.props&&n.vnode.props.appear;let r=e.content.firstChild;_&&h.beforeEnter(r),g(r,e,n),t.el=e=r}if(16&d&&!(c&&(c.innerHTML||c.textContent))){let r=p(e.firstChild,t,e,n,i,l,s);for(;r;){n4(e,1)||nX();let t=r;r=r.nextSibling,o(t)}}else if(8&d){let n=t.children;"\n"===n[0]&&("PRE"===e.tagName||"TEXTAREA"===e.tagName)&&(n=n.slice(1)),e.textContent!==n&&(n4(e,0)||nX(),e.textContent=t.children)}if(c){if(m||!s||48&u){let t=e.tagName.includes("-");for(let i in c)(m&&(i.endsWith("value")||"indeterminate"===i)||b(i)&&!B(i)||"."===i[0]||t)&&r(e,i,null,c[i],void 0,n)}else if(c.onClick)r(e,"onClick",null,c.onClick,void 0,n);else if(4&u&&tx(c.style))for(let e in c.style)c.style[e]}(a=c&&c.onVnodeBeforeMount)&&lw(a,n,t),f&&nv(t,null,n,"beforeMount"),((a=c&&c.onVnodeMounted)||f||_)&&i4(()=>{a&&lw(a,n,t),_&&h.enter(e),f&&nv(t,null,n,"mounted")},i)}return e.nextSibling},p=(e,t,r,s,o,c,d)=>{d=d||!!t.dynamicChildren;let p=t.children,f=p.length;for(let t=0;t<f;t++){let h=d?p[t]:p[t]=lx(p[t]),m=h.type===i9;e?(m&&!d&&t+1<f&&lx(p[t+1]).type===i9&&(a(i(e.data.slice(h.children.length)),r,l(e)),e.data=h.children),e=u(e,h,s,o,c,d)):m&&!h.children?a(h.el=i(""),r):(n4(r,1)||nX(),n(null,h,r,null,s,o,n0(r),c))}return e},f=(e,t,n,r,i,o)=>{let{slotScopeIds:u}=t;u&&(i=i?i.concat(u):u);let d=s(e),f=p(l(e),t,d,n,r,i,o);return f&&n1(f)&&"]"===f.data?l(t.anchor=f):(nX(),a(t.anchor=c("]"),d,f),f)},h=(e,t,r,i,a,c)=>{if(n4(e.parentElement,1)||nX(),t.el=null,c){let t=m(e);for(;;){let n=l(e);if(n&&n!==t)o(n);else break}}let u=l(e),d=s(e);return o(e),n(null,t,d,u,r,i,n0(d),a),r&&(r.vnode.el=t.el,iZ(r,t.el)),u},m=(e,t="[",n="]")=>{let r=0;for(;e;)if((e=l(e))&&n1(e)&&(e.data===t&&r++,e.data===n)){if(0===r)return l(e);r--}return e},g=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},y=e=>1===e.nodeType&&"TEMPLATE"===e.tagName;return[(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),na(),t._vnode=e;return}u(t.firstChild,e,null,null,null),na(),t._vnode=e},u]}let n3="data-allow-mismatch",n6={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function n4(e,t){if(0===t||1===t)for(;e&&!e.hasAttribute(n3);)e=e.parentElement;let n=e&&e.getAttribute(n3);if(null==n)return!1;if(""===n)return!0;{let e=n.split(",");return!!(0===t&&e.includes("children"))||n.split(",").includes(n6[t])}}let n8=ee().requestIdleCallback||(e=>setTimeout(e,1)),n5=ee().cancelIdleCallback||(e=>clearTimeout(e)),n9=(e=1e4)=>t=>{let n=n8(t,{timeout:e});return()=>n5(n)},n7=e=>(t,n)=>{let r=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(function(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:l,innerWidth:s}=window;return(t>0&&t<l||r>0&&r<l)&&(n>0&&n<s||i>0&&i<s)}(e))return t(),r.disconnect(),!1;r.observe(e)}}),()=>r.disconnect()},re=e=>t=>{if(e){let n=matchMedia(e);if(!n.matches)return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t);t()}},rt=(e=[])=>(t,n)=>{I(e)&&(e=[e]);let r=!1,i=e=>{r||(r=!0,l(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},l=()=>{n(t=>{for(let n of e)t.removeEventListener(n,i)})};return n(t=>{for(let n of e)t.addEventListener(n,i,{once:!0})}),l},rn=e=>!!e.type.__asyncLoader;function rr(e){let t;R(e)&&(e={loader:e});let{loader:n,loadingComponent:r,errorComponent:i,delay:l=200,hydrate:s,timeout:o,suspensible:a=!0,onError:c}=e,u=null,d=0,p=()=>(d++,u=null,f()),f=()=>{let e;return u||(e=u=n().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(p()),()=>n(e),d+1)});throw e}).then(n=>e!==u&&u?u:(n&&(n.__esModule||"Module"===n[Symbol.toStringTag])&&(n=n.default),t=n,n)))};return nW({name:"AsyncComponentWrapper",__asyncLoader:f,__asyncHydrate(e,n,r){let i=s?()=>{let t=s(r,t=>(function(e,t){if(n1(e)&&"["===e.data){let n=1,r=e.nextSibling;for(;r;){if(1===r.nodeType){if(!1===t(r))break}else if(n1(r)){if("]"===r.data){if(0==--n)break}else"["===r.data&&n++}r=r.nextSibling}}else t(e)})(e,t));t&&(n.bum||(n.bum=[])).push(t)}:r;t?i():f().then(()=>!n.isUnmounted&&i())},get __asyncResolved(){return t},setup(){let e=lR;if(nz(e),t)return()=>ri(t,e);let n=t=>{u=null,t4(t,e,13,!i)};if(a&&e.suspense||lD)return f().then(t=>()=>ri(t,e)).catch(e=>(n(e),()=>i?lg(i,{error:e}):null));let s=tI(!1),c=tI(),d=tI(!!l);return l&&setTimeout(()=>{d.value=!1},l),null!=o&&setTimeout(()=>{if(!s.value&&!c.value){let e=Error(`Async component timed out after ${o}ms.`);n(e),c.value=e}},o),f().then(()=>{s.value=!0,e.parent&&rl(e.parent.vnode)&&e.parent.update()}).catch(e=>{n(e),c.value=e}),()=>s.value&&t?ri(t,e):c.value&&i?lg(i,{error:c.value}):r&&!d.value?lg(r):void 0}})}function ri(e,t){let{ref:n,props:r,children:i,ce:l}=t.vnode,s=lg(e,r,i);return s.ref=n,s.ce=l,delete t.vnode.ce,s}let rl=e=>e.type.__isKeepAlive,rs={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=lI(),r=n.ctx;if(!r.renderer)return()=>{let e=t.default&&t.default();return e&&1===e.length?e[0]:e};let i=new Map,l=new Set,s=null,o=n.suspense,{renderer:{p:a,m:c,um:u,o:{createElement:d}}}=r,p=d("div");function f(e){rd(e),u(e,n,o,!0)}function h(e){i.forEach((t,n)=>{let r=lq(t.type);r&&!e(r)&&m(n)})}function m(e){let t=i.get(e);!t||s&&ld(t,s)?s&&rd(s):f(t),i.delete(e),l.delete(e)}r.activate=(e,t,n,r,i)=>{let l=e.component;c(e,t,n,0,o),a(l.vnode,e,t,n,l,o,r,e.slotScopeIds,i),iw(()=>{l.isDeactivated=!1,l.a&&Q(l.a);let t=e.props&&e.props.onVnodeMounted;t&&lw(t,l.parent,e)},o)},r.deactivate=e=>{let t=e.component;iM(t.m),iM(t.a),c(e,p,null,1,o),iw(()=>{t.da&&Q(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&lw(n,t.parent,e),t.isDeactivated=!0},o)},iB(()=>[e.include,e.exclude],([e,t])=>{e&&h(t=>ro(e,t)),t&&h(e=>!ro(t,e))},{flush:"post",deep:!0});let g=null,y=()=>{null!=g&&(iY(n.subTree.type)?iw(()=>{i.set(g,rp(n.subTree))},n.subTree.suspense):i.set(g,rp(n.subTree)))};return rg(y),rv(y),rb(()=>{i.forEach(e=>{let{subTree:t,suspense:r}=n,i=rp(t);if(e.type===i.type&&e.key===i.key){rd(i);let e=i.component.da;e&&iw(e,r);return}f(e)})}),()=>{if(g=null,!t.default)return s=null;let n=t.default(),r=n[0];if(n.length>1)return s=null,n;if(!lu(r)||!(4&r.shapeFlag)&&!(128&r.shapeFlag))return s=null,r;let o=rp(r);if(o.type===i7)return s=null,o;let a=o.type,c=lq(rn(o)?o.type.__asyncResolved||{}:a),{include:u,exclude:d,max:p}=e;if(u&&(!c||!ro(u,c))||d&&c&&ro(d,c))return o.shapeFlag&=-257,s=o,r;let f=null==o.key?a:o.key,h=i.get(f);return o.el&&(o=lv(o),128&r.shapeFlag&&(r.ssContent=o)),g=f,h?(o.el=h.el,o.component=h.component,o.transition&&nH(o,o.transition),o.shapeFlag|=512,l.delete(f),l.add(f)):(l.add(f),p&&l.size>parseInt(p,10)&&m(l.values().next().value)),o.shapeFlag|=256,s=o,iY(r.type)?r:o}}};function ro(e,t){return k(e)?e.some(e=>ro(e,t)):I(e)?e.split(",").includes(t):!!A(e)&&(e.lastIndex=0,e.test(t))}function ra(e,t){ru(e,"a",t)}function rc(e,t){ru(e,"da",t)}function ru(e,t,n=lR){let r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(rf(t,r,n),n){let e=n.parent;for(;e&&e.parent;)rl(e.parent.vnode)&&function(e,t,n,r){let i=rf(t,e,r,!0);r_(()=>{x(r[t],i)},n)}(r,t,n,e),e=e.parent}}function rd(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function rp(e){return 128&e.shapeFlag?e.ssContent:e}function rf(e,t,n=lR,r=!1){if(n){let i=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...r)=>{eF();let i=lO(n),l=t6(t,n,e,r);return i(),eV(),l});return r?i.unshift(l):i.push(l),l}}let rh=e=>(t,n=lR)=>{lD&&"sp"!==e||rf(e,(...e)=>t(...e),n)},rm=rh("bm"),rg=rh("m"),ry=rh("bu"),rv=rh("u"),rb=rh("bum"),r_=rh("um"),rS=rh("sp"),rx=rh("rtg"),rC=rh("rtc");function rT(e,t=lR){rf("ec",e,t)}let rk="components";function rw(e,t){return rR(rk,e,!0,t)||e}let rN=Symbol.for("v-ndc");function rE(e){return I(e)?rR(rk,e,!1)||e:e||rN}function rA(e){return rR("directives",e)}function rR(e,t,n=!0,r=!1){let i=nu||lR;if(i){let n=i.type;if(e===rk){let e=lq(n,!1);if(e&&(e===t||e===q(t)||e===z(q(t))))return n}let l=rI(i[e]||n[e],t)||rI(i.appContext[e],t);return!l&&r?n:l}}function rI(e,t){return e&&(e[t]||e[q(t)]||e[z(q(t))])}function rO(e,t,n,r){let i;let l=n&&n[r],s=k(e);if(s||I(e)){let n=s&&tx(e),r=!1;n&&(r=!tT(e),e=eX(e)),i=Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=t(r?tE(e[n]):e[n],n,void 0,l&&l[n])}else if("number"==typeof e){i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,l&&l[n])}else if(P(e)){if(e[Symbol.iterator])i=Array.from(e,(e,n)=>t(e,n,void 0,l&&l[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,s=n.length;r<s;r++){let s=n[r];i[r]=t(e[s],s,r,l&&l[r])}}}else i=[];return n&&(n[r]=i),i}function rP(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(k(r))for(let t=0;t<r.length;t++)e[r[t].name]=r[t].fn;else r&&(e[r.name]=r.key?(...e)=>{let t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e}function rM(e,t,n={},r,i){if(nu.ce||nu.parent&&rn(nu.parent)&&nu.parent.ce)return"default"!==t&&(n.name=t),lr(),lc(i5,null,[lg("slot",n,r&&r())],64);let l=e[t];l&&l._c&&(l._d=!1),lr();let s=l&&rD(l(n)),o=n.key||s&&s.key,a=lc(i5,{key:(o&&!O(o)?o:`_${t}`)+(!s&&r?"_fb":"")},s||(r?r():[]),s&&1===e._?64:-2);return!i&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),l&&l._c&&(l._d=!0),a}function rD(e){return e.some(e=>!lu(e)||!!(e.type!==i7&&(e.type!==i5||rD(e.children))))?e:null}function rL(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:J(r)]=e[r];return n}let r$=e=>e?lM(e)?lH(e):r$(e.parent):null,rF=S(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>r$(e.parent),$root:e=>r$(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>r4(e),$forceUpdate:e=>e.f||(e.f=()=>{ni(e.update)}),$nextTick:e=>e.n||(e.n=nr.bind(e.proxy)),$watch:e=>ij.bind(e)}),rV=(e,t)=>e!==h&&!e.__isScriptSetup&&T(e,t),rB={get({_:e},t){let n,r,i;if("__v_skip"===t)return!0;let{ctx:l,setupState:s,data:o,props:a,accessCache:c,type:u,appContext:d}=e;if("$"!==t[0]){let r=c[t];if(void 0!==r)switch(r){case 1:return s[t];case 2:return o[t];case 4:return l[t];case 3:return a[t]}else{if(rV(s,t))return c[t]=1,s[t];if(o!==h&&T(o,t))return c[t]=2,o[t];if((n=e.propsOptions[0])&&T(n,t))return c[t]=3,a[t];if(l!==h&&T(l,t))return c[t]=4,l[t];r3&&(c[t]=0)}}let p=rF[t];return p?("$attrs"===t&&eJ(e.attrs,"get",""),p(e)):(r=u.__cssModules)&&(r=r[t])?r:l!==h&&T(l,t)?(c[t]=4,l[t]):T(i=d.config.globalProperties,t)?i[t]:void 0},set({_:e},t,n){let{data:r,setupState:i,ctx:l}=e;return rV(i,t)?(i[t]=n,!0):r!==h&&T(r,t)?(r[t]=n,!0):!T(e.props,t)&&!("$"===t[0]&&t.slice(1)in e)&&(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:l}},s){let o;return!!n[s]||e!==h&&T(e,s)||rV(t,s)||(o=l[0])&&T(o,s)||T(r,s)||T(rF,s)||T(i.config.globalProperties,s)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:T(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},rU=S({},rB,{get(e,t){if(t!==Symbol.unscopables)return rB.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!et(t)});function rj(){return null}function rH(){return null}function rq(e){}function rW(e){}function rK(){return null}function rz(){}function rJ(e,t){return null}function rG(){return rX().slots}function rQ(){return rX().attrs}function rX(){let e=lI();return e.setupContext||(e.setupContext=lj(e))}function rZ(e){return k(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function rY(e,t){let n=rZ(e);for(let e in t){if(e.startsWith("__skip"))continue;let r=n[e];r?k(r)||R(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:null===r&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n}function r0(e,t){return e&&t?k(e)&&k(t)?e.concat(t):S({},rZ(e),rZ(t)):e||t}function r1(e,t){let n={};for(let r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function r2(e){let t=lI(),n=e();return lP(),M(n)&&(n=n.catch(e=>{throw lO(t),e})),[n,()=>lO(t)]}let r3=!0;function r6(e,t,n){t6(k(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function r4(e){let t;let n=e.type,{mixins:r,extends:i}=n,{mixins:l,optionsCache:s,config:{optionMergeStrategies:o}}=e.appContext,a=s.get(n);return a?t=a:l.length||r||i?(t={},l.length&&l.forEach(e=>r8(t,e,o,!0)),r8(t,n,o)):t=n,P(n)&&s.set(n,t),t}function r8(e,t,n,r=!1){let{mixins:i,extends:l}=t;for(let s in l&&r8(e,l,n,!0),i&&i.forEach(t=>r8(e,t,n,!0)),t)if(r&&"expose"===s);else{let r=r5[s]||n&&n[s];e[s]=r?r(e[s],t[s]):t[s]}return e}let r5={data:r9,props:ir,emits:ir,methods:it,computed:it,beforeCreate:ie,created:ie,beforeMount:ie,mounted:ie,beforeUpdate:ie,updated:ie,beforeDestroy:ie,beforeUnmount:ie,destroyed:ie,unmounted:ie,activated:ie,deactivated:ie,errorCaptured:ie,serverPrefetch:ie,components:it,directives:it,watch:function(e,t){if(!e)return t;if(!t)return e;let n=S(Object.create(null),e);for(let r in t)n[r]=ie(e[r],t[r]);return n},provide:r9,inject:function(e,t){return it(r7(e),r7(t))}};function r9(e,t){return t?e?function(){return S(R(e)?e.call(this,this):e,R(t)?t.call(this,this):t)}:t:e}function r7(e){if(k(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ie(e,t){return e?[...new Set([].concat(e,t))]:t}function it(e,t){return e?S(Object.create(null),e,t):t}function ir(e,t){return e?k(e)&&k(t)?[...new Set([...e,...t])]:S(Object.create(null),rZ(e),rZ(null!=t?t:{})):t}function ii(){return{app:null,config:{isNativeTag:y,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let il=0,is=null;function io(e,t){if(lR){let n=lR.provides,r=lR.parent&&lR.parent.provides;r===n&&(n=lR.provides=Object.create(r)),n[e]=t}}function ia(e,t,n=!1){let r=lR||nu;if(r||is){let i=is?is._context.provides:r?null==r.parent?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&R(t)?t.call(r&&r.proxy):t}}function ic(){return!!(lR||nu||is)}let iu={},id=()=>Object.create(iu),ip=e=>Object.getPrototypeOf(e)===iu;function ih(e,t,n,r){let i;let[l,s]=e.propsOptions,o=!1;if(t)for(let a in t){let c;if(B(a))continue;let u=t[a];l&&T(l,c=q(a))?s&&s.includes(c)?(i||(i={}))[c]=u:n[c]=u:iz(e.emitsOptions,a)||a in r&&u===r[a]||(r[a]=u,o=!0)}if(s){let t=tw(n),r=i||h;for(let i=0;i<s.length;i++){let o=s[i];n[o]=im(l,t,o,r[o],e,!T(r,o))}}return o}function im(e,t,n,r,i,l){let s=e[n];if(null!=s){let e=T(s,"default");if(e&&void 0===r){let e=s.default;if(s.type!==Function&&!s.skipFactory&&R(e)){let{propsDefaults:l}=i;if(n in l)r=l[n];else{let s=lO(i);r=l[n]=e.call(null,t),s()}}else r=e;i.ce&&i.ce._setProp(n,r)}s[0]&&(l&&!e?r=!1:s[1]&&(""===r||r===K(n))&&(r=!0))}return r}let ig=new WeakMap;function iy(e){return!("$"===e[0]||B(e))}let iv=e=>"_"===e[0]||"$stable"===e,ib=e=>k(e)?e.map(lx):[lx(e)],i_=(e,t,n)=>{if(t._n)return t;let r=ng((...e)=>ib(t(...e)),n);return r._c=!1,r},iS=(e,t,n)=>{let r=e._ctx;for(let n in e){if(iv(n))continue;let i=e[n];if(R(i))t[n]=i_(n,i,r);else if(null!=i){let e=ib(i);t[n]=()=>e}}},ix=(e,t)=>{let n=ib(t);e.slots.default=()=>n},iC=(e,t,n)=>{for(let r in t)(n||"_"!==r)&&(e[r]=t[r])},iT=(e,t,n)=>{let r=e.slots=id();if(32&e.vnode.shapeFlag){let e=t._;e?(iC(r,t,n),n&&X(r,"_",e,!0)):iS(t,r)}else t&&ix(e,t)},ik=(e,t,n)=>{let{vnode:r,slots:i}=e,l=!0,s=h;if(32&r.shapeFlag){let e=t._;e?n&&1===e?l=!1:iC(i,t,n):(l=!t.$stable,iS(t,i)),s=t}else t&&(ix(e,t),s={default:1});if(l)for(let e in i)iv(e)||null!=s[e]||delete i[e]},iw=i4;function iN(e){return iA(e)}function iE(e){return iA(e,n2)}function iA(e,t){var n;let r,i;ee().__VUE__=!0;let{insert:l,remove:s,patchProp:o,createElement:a,createText:c,createComment:u,setText:d,setElementText:p,parentNode:f,nextSibling:y,setScopeId:b=g,insertStaticContent:_}=e,x=(e,t,n,r=null,i=null,l=null,s,o=null,a=!!t.dynamicChildren)=>{if(e===t)return;e&&!ld(e,t)&&(r=ei(e),Z(e,i,l,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);let{type:c,ref:u,shapeFlag:d}=t;switch(c){case i9:C(e,t,n,r);break;case i7:k(e,t,n,r);break;case le:null==e&&w(t,n,r,s);break;case i5:F(e,t,n,r,i,l,s,o,a);break;default:1&d?A(e,t,n,r,i,l,s,o,a):6&d?V(e,t,n,r,i,l,s,o,a):64&d?c.process(e,t,n,r,i,l,s,o,a,eo):128&d&&c.process(e,t,n,r,i,l,s,o,a,eo)}null!=u&&i&&nG(u,e&&e.ref,l,t||e,!t)},C=(e,t,n,r)=>{if(null==e)l(t.el=c(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&d(n,t.children)}},k=(e,t,n,r)=>{null==e?l(t.el=u(t.children||""),n,r):t.el=e.el},w=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},N=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=y(e),l(e,n,r),e=i;l(t,n,r)},E=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=y(e),s(e),e=n;s(t)},A=(e,t,n,r,i,l,s,o,a)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?I(t,n,r,i,l,s,o,a):D(e,t,i,l,s,o,a)},I=(e,t,n,r,i,s,c,u)=>{let d,f;let{props:h,shapeFlag:m,transition:g,dirs:y}=e;if(d=e.el=a(e.type,s,h&&h.is,h),8&m?p(d,e.children):16&m&&M(e.children,d,null,r,i,iR(e,s),c,u),y&&nv(e,null,r,"created"),O(d,e,e.scopeId,c,r),h){for(let e in h)"value"===e||B(e)||o(d,e,null,h[e],s,r);"value"in h&&o(d,"value",null,h.value,s),(f=h.onVnodeBeforeMount)&&lw(f,r,e)}y&&nv(e,null,r,"beforeMount");let b=iO(i,g);b&&g.beforeEnter(d),l(d,t,n),((f=h&&h.onVnodeMounted)||b||y)&&iw(()=>{f&&lw(f,r,e),b&&g.enter(d),y&&nv(e,null,r,"mounted")},i)},O=(e,t,n,r,i)=>{if(n&&b(e,n),r)for(let t=0;t<r.length;t++)b(e,r[t]);if(i){let n=i.subTree;if(t===n||iY(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;O(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},M=(e,t,n,r,i,l,s,o,a=0)=>{for(let c=a;c<e.length;c++)x(null,e[c]=o?lC(e[c]):lx(e[c]),t,n,r,i,l,s,o)},D=(e,t,n,r,i,l,s)=>{let a;let c=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=t;u|=16&e.patchFlag;let m=e.props||h,g=t.props||h;if(n&&iI(n,!1),(a=g.onVnodeBeforeUpdate)&&lw(a,n,t,e),f&&nv(t,e,n,"beforeUpdate"),n&&iI(n,!0),(m.innerHTML&&null==g.innerHTML||m.textContent&&null==g.textContent)&&p(c,""),d?L(e.dynamicChildren,d,c,n,r,iR(t,i),l):s||z(e,t,c,null,n,r,iR(t,i),l,!1),u>0){if(16&u)$(c,m,g,n,i);else if(2&u&&m.class!==g.class&&o(c,"class",null,g.class,i),4&u&&o(c,"style",m.style,g.style,i),8&u){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let r=e[t],l=m[r],s=g[r];(s!==l||"value"===r)&&o(c,r,l,s,i,n)}}1&u&&e.children!==t.children&&p(c,t.children)}else s||null!=d||$(c,m,g,n,i);((a=g.onVnodeUpdated)||f)&&iw(()=>{a&&lw(a,n,t,e),f&&nv(t,e,n,"updated")},r)},L=(e,t,n,r,i,l,s)=>{for(let o=0;o<t.length;o++){let a=e[o],c=t[o],u=a.el&&(a.type===i5||!ld(a,c)||70&a.shapeFlag)?f(a.el):n;x(a,c,u,null,r,i,l,s,!0)}},$=(e,t,n,r,i)=>{if(t!==n){if(t!==h)for(let l in t)B(l)||l in n||o(e,l,t[l],null,i,r);for(let l in n){if(B(l))continue;let s=n[l],a=t[l];s!==a&&"value"!==l&&o(e,l,a,s,i,r)}"value"in n&&o(e,"value",t.value,n.value,i)}},F=(e,t,n,r,i,s,o,a,u)=>{let d=t.el=e?e.el:c(""),p=t.anchor=e?e.anchor:c(""),{patchFlag:f,dynamicChildren:h,slotScopeIds:m}=t;m&&(a=a?a.concat(m):m),null==e?(l(d,n,r),l(p,n,r),M(t.children||[],n,p,i,s,o,a,u)):f>0&&64&f&&h&&e.dynamicChildren?(L(e.dynamicChildren,h,n,i,s,o,a),(null!=t.key||i&&t===i.subTree)&&iP(e,t,!0)):z(e,t,n,p,i,s,o,a,u)},V=(e,t,n,r,i,l,s,o,a)=>{t.slotScopeIds=o,null==e?512&t.shapeFlag?i.ctx.activate(t,n,r,s,a):U(t,n,r,i,l,s,a):j(e,t,a)},U=(e,t,n,r,i,l,s)=>{let o=e.component=lA(e,r,i);rl(e)&&(o.ctx.renderer=eo),lL(o,!1,s),o.asyncDep?(i&&i.registerDep(o,H,s),e.el||k(null,o.subTree=lg(i7),t,n)):H(o,e,t,n,i,l,s)},j=(e,t,n)=>{let r=t.component=e.component;if(function(e,t,n){let{props:r,children:i,component:l}=e,{props:s,children:o,patchFlag:a}=t,c=l.emitsOptions;if(t.dirs||t.transition)return!0;if(!n||!(a>=0))return(!!i||!!o)&&(!o||!o.$stable)||r!==s&&(r?!s||iX(r,s,c):!!s);if(1024&a)return!0;if(16&a)return r?iX(r,s,c):!!s;if(8&a){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(s[n]!==r[n]&&!iz(c,n))return!0}}return!1}(e,t,n)){if(r.asyncDep&&!r.asyncResolved){W(r,t,n);return}r.next=t,r.update()}else t.el=e.el,r.vnode=t},H=(e,t,n,r,l,s,o)=>{let a=()=>{if(e.isMounted){let t,{next:n,bu:r,u:i,parent:c,vnode:u}=e;{let t=function e(t){let n=t.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:e(n)}(e);if(t){n&&(n.el=u.el,W(e,n,o)),t.asyncDep.then(()=>{e.isUnmounted||a()});return}}let d=n;iI(e,!1),n?(n.el=u.el,W(e,n,o)):n=u,r&&Q(r),(t=n.props&&n.props.onVnodeBeforeUpdate)&&lw(t,c,n,u),iI(e,!0);let p=iJ(e),h=e.subTree;e.subTree=p,x(h,p,f(h.el),ei(h),e,l,s),n.el=p.el,null===d&&iZ(e,p.el),i&&iw(i,l),(t=n.props&&n.props.onVnodeUpdated)&&iw(()=>lw(t,c,n,u),l)}else{let o;let{el:a,props:c}=t,{bm:u,m:d,parent:p,root:f,type:h}=e,m=rn(t);if(iI(e,!1),u&&Q(u),!m&&(o=c&&c.onVnodeBeforeMount)&&lw(o,p,t),iI(e,!0),a&&i){let t=()=>{e.subTree=iJ(e),i(a,e.subTree,e,l,null)};m&&h.__asyncHydrate?h.__asyncHydrate(a,e,t):t()}else{f.ce&&f.ce._injectChildStyle(h);let i=e.subTree=iJ(e);x(null,i,n,r,e,l,s),t.el=i.el}if(d&&iw(d,l),!m&&(o=c&&c.onVnodeMounted)){let e=t;iw(()=>lw(o,p,e),l)}(256&t.shapeFlag||p&&rn(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&iw(e.a,l),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new ek(a);e.scope.off();let u=e.update=c.run.bind(c),d=e.job=c.runIfDirty.bind(c);d.i=e,d.id=e.uid,c.scheduler=()=>ni(d),iI(e,!0),u()},W=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,r){let{props:i,attrs:l,vnode:{patchFlag:s}}=e,o=tw(i),[a]=e.propsOptions,c=!1;if((r||s>0)&&!(16&s)){if(8&s){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let s=n[r];if(iz(e.emitsOptions,s))continue;let u=t[s];if(a){if(T(l,s))u!==l[s]&&(l[s]=u,c=!0);else{let t=q(s);i[t]=im(a,o,t,u,e,!1)}}else u!==l[s]&&(l[s]=u,c=!0)}}}else{let r;for(let s in ih(e,t,i,l)&&(c=!0),o)t&&(T(t,s)||(r=K(s))!==s&&T(t,r))||(a?n&&(void 0!==n[s]||void 0!==n[r])&&(i[s]=im(a,o,s,void 0,e,!0)):delete i[s]);if(l!==o)for(let e in l)t&&T(t,e)||(delete l[e],c=!0)}c&&eG(e.attrs,"set","")}(e,t.props,r,n),ik(e,t.children,n),eF(),no(e),eV()},z=(e,t,n,r,i,l,s,o,a=!1)=>{let c=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:h}=t;if(f>0){if(128&f){G(c,d,n,r,i,l,s,o,a);return}if(256&f){J(c,d,n,r,i,l,s,o,a);return}}8&h?(16&u&&er(c,i,l),d!==c&&p(n,d)):16&u?16&h?G(c,d,n,r,i,l,s,o,a):er(c,i,l,!0):(8&u&&p(n,""),16&h&&M(d,n,r,i,l,s,o,a))},J=(e,t,n,r,i,l,s,o,a)=>{let c;e=e||m,t=t||m;let u=e.length,d=t.length,p=Math.min(u,d);for(c=0;c<p;c++){let r=t[c]=a?lC(t[c]):lx(t[c]);x(e[c],r,n,null,i,l,s,o,a)}u>d?er(e,i,l,!0,!1,p):M(t,n,r,i,l,s,o,a,p)},G=(e,t,n,r,i,l,s,o,a)=>{let c=0,u=t.length,d=e.length-1,p=u-1;for(;c<=d&&c<=p;){let r=e[c],u=t[c]=a?lC(t[c]):lx(t[c]);if(ld(r,u))x(r,u,n,null,i,l,s,o,a);else break;c++}for(;c<=d&&c<=p;){let r=e[d],c=t[p]=a?lC(t[p]):lx(t[p]);if(ld(r,c))x(r,c,n,null,i,l,s,o,a);else break;d--,p--}if(c>d){if(c<=p){let e=p+1,d=e<u?t[e].el:r;for(;c<=p;)x(null,t[c]=a?lC(t[c]):lx(t[c]),n,d,i,l,s,o,a),c++}}else if(c>p)for(;c<=d;)Z(e[c],i,l,!0),c++;else{let f;let h=c,g=c,y=new Map;for(c=g;c<=p;c++){let e=t[c]=a?lC(t[c]):lx(t[c]);null!=e.key&&y.set(e.key,c)}let b=0,_=p-g+1,S=!1,C=0,T=Array(_);for(c=0;c<_;c++)T[c]=0;for(c=h;c<=d;c++){let r;let u=e[c];if(b>=_){Z(u,i,l,!0);continue}if(null!=u.key)r=y.get(u.key);else for(f=g;f<=p;f++)if(0===T[f-g]&&ld(u,t[f])){r=f;break}void 0===r?Z(u,i,l,!0):(T[r-g]=c+1,r>=C?C=r:S=!0,x(u,t[r],n,null,i,l,s,o,a),b++)}let k=S?function(e){let t,n,r,i,l;let s=e.slice(),o=[0],a=e.length;for(t=0;t<a;t++){let a=e[t];if(0!==a){if(e[n=o[o.length-1]]<a){s[t]=n,o.push(t);continue}for(r=0,i=o.length-1;r<i;)e[o[l=r+i>>1]]<a?r=l+1:i=l;a<e[o[r]]&&(r>0&&(s[t]=o[r-1]),o[r]=t)}}for(r=o.length,i=o[r-1];r-- >0;)o[r]=i,i=s[i];return o}(T):m;for(f=k.length-1,c=_-1;c>=0;c--){let e=g+c,d=t[e],p=e+1<u?t[e+1].el:r;0===T[c]?x(null,d,n,p,i,l,s,o,a):S&&(f<0||c!==k[f]?X(d,n,p,2):f--)}}},X=(e,t,n,r,i=null)=>{let{el:s,type:o,transition:a,children:c,shapeFlag:u}=e;if(6&u){X(e.component.subTree,t,n,r);return}if(128&u){e.suspense.move(t,n,r);return}if(64&u){o.move(e,t,n,eo);return}if(o===i5){l(s,t,n);for(let e=0;e<c.length;e++)X(c[e],t,n,r);l(e.anchor,t,n);return}if(o===le){N(e,t,n);return}if(2!==r&&1&u&&a){if(0===r)a.beforeEnter(s),l(s,t,n),iw(()=>a.enter(s),i);else{let{leave:e,delayLeave:r,afterLeave:i}=a,o=()=>l(s,t,n),c=()=>{e(s,()=>{o(),i&&i()})};r?r(s,o,c):c()}}else l(s,t,n)},Z=(e,t,n,r=!1,i=!1)=>{let l;let{type:s,props:o,ref:a,children:c,dynamicChildren:u,shapeFlag:d,patchFlag:p,dirs:f,cacheIndex:h}=e;if(-2===p&&(i=!1),null!=a&&nG(a,null,n,e,!0),null!=h&&(t.renderCache[h]=void 0),256&d){t.ctx.deactivate(e);return}let m=1&d&&f,g=!rn(e);if(g&&(l=o&&o.onVnodeBeforeUnmount)&&lw(l,t,e),6&d)en(e.component,n,r);else{if(128&d){e.suspense.unmount(n,r);return}m&&nv(e,null,t,"beforeUnmount"),64&d?e.type.remove(e,t,n,eo,r):u&&!u.hasOnce&&(s!==i5||p>0&&64&p)?er(u,t,n,!1,!0):(s===i5&&384&p||!i&&16&d)&&er(c,t,n),r&&Y(e)}(g&&(l=o&&o.onVnodeUnmounted)||m)&&iw(()=>{l&&lw(l,t,e),m&&nv(e,null,t,"unmounted")},n)},Y=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===i5){et(n,r);return}if(t===le){E(e);return}let l=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&e.shapeFlag&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,s=()=>t(n,l);r?r(e.el,l,s):s()}else l()},et=(e,t)=>{let n;for(;e!==t;)n=y(e),s(e),e=n;s(t)},en=(e,t,n)=>{let{bum:r,scope:i,job:l,subTree:s,um:o,m:a,a:c}=e;iM(a),iM(c),r&&Q(r),i.stop(),l&&(l.flags|=8,Z(s,e,t,n)),o&&iw(o,t),iw(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},er=(e,t,n,r=!1,i=!1,l=0)=>{for(let s=l;s<e.length;s++)Z(e[s],t,n,r,i)},ei=e=>{if(6&e.shapeFlag)return ei(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();let t=y(e.anchor||e.el),n=t&&t[nb];return n?y(n):t},el=!1,es=(e,t,n)=>{null==e?t._vnode&&Z(t._vnode,null,null,!0):x(t._vnode||null,e,t,null,null,null,n),t._vnode=e,el||(el=!0,no(),na(),el=!1)},eo={p:x,um:Z,m:X,r:Y,mt:U,mc:M,pc:z,pbc:L,n:ei,o:e};return t&&([r,i]=t(eo)),{render:es,hydrate:r,createApp:(n=r,function(e,t=null){R(e)||(e=S({},e)),null==t||P(t)||(t=null);let r=ii(),i=new WeakSet,l=[],s=!1,o=r.app={_uid:il++,_component:e,_props:t,_container:null,_context:r,_instance:null,version:lQ,get config(){return r.config},set config(v){},use:(e,...t)=>(i.has(e)||(e&&R(e.install)?(i.add(e),e.install(o,...t)):R(e)&&(i.add(e),e(o,...t))),o),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),o),component:(e,t)=>t?(r.components[e]=t,o):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,o):r.directives[e],mount(i,l,a){if(!s){let c=o._ceVNode||lg(e,t);return c.appContext=r,!0===a?a="svg":!1===a&&(a=void 0),l&&n?n(c,i):es(c,i,a),s=!0,o._container=i,i.__vue_app__=o,lH(c.component)}},onUnmount(e){l.push(e)},unmount(){s&&(t6(l,o._instance,16),es(null,o._container),delete o._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,o),runWithContext(e){let t=is;is=o;try{return e()}finally{is=t}}};return o})}}function iR({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function iI({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function iO(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function iP(e,t,n=!1){let r=e.children,i=t.children;if(k(r)&&k(i))for(let e=0;e<r.length;e++){let t=r[e],l=i[e];!(1&l.shapeFlag)||l.dynamicChildren||((l.patchFlag<=0||32===l.patchFlag)&&((l=i[e]=lC(i[e])).el=t.el),n||-2===l.patchFlag||iP(t,l)),l.type===i9&&(l.el=t.el)}}function iM(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}let iD=Symbol.for("v-scx"),iL=()=>ia(iD);function i$(e,t){return iU(e,null,t)}function iF(e,t){return iU(e,null,{flush:"post"})}function iV(e,t){return iU(e,null,{flush:"sync"})}function iB(e,t,n){return iU(e,t,n)}function iU(e,t,n=h){let r;let{immediate:i,deep:l,flush:s,once:o}=n,a=S({},n),c=t&&i||!t&&"post"!==s;if(lD){if("sync"===s){let e=iL();r=e.__watcherHandles||(e.__watcherHandles=[])}else if(!c){let e=()=>{};return e.stop=g,e.resume=g,e.pause=g,e}}let u=lR;a.call=(e,t,n)=>t6(e,u,t,n);let p=!1;"post"===s?a.scheduler=e=>{iw(e,u&&u.suspense)}:"sync"!==s&&(p=!0,a.scheduler=(e,t)=>{t?e():ni(e)}),a.augmentJob=e=>{t&&(e.flags|=4),p&&(e.flags|=2,u&&(e.id=u.uid,e.i=u))};let f=function(e,t,n=h){let r,i,l,s;let{immediate:o,deep:a,once:c,scheduler:u,augmentJob:p,call:f}=n,m=e=>a?e:tT(e)||!1===a||0===a?t0(e,1):t0(e),y=!1,b=!1;if(tR(e)?(i=()=>e.value,y=tT(e)):tx(e)?(i=()=>m(e),y=!0):k(e)?(b=!0,y=e.some(e=>tx(e)||tT(e)),i=()=>e.map(e=>tR(e)?e.value:tx(e)?m(e):R(e)?f?f(e,2):e():void 0)):i=R(e)?t?f?()=>f(e,2):e:()=>{if(l){eF();try{l()}finally{eV()}}let t=d;d=r;try{return f?f(e,3,[s]):e(s)}finally{d=t}}:g,t&&a){let e=i,t=!0===a?1/0:a;i=()=>t0(e(),t)}let _=ex(),S=()=>{r.stop(),_&&_.active&&x(_.effects,r)};if(c&&t){let e=t;t=(...t)=>{e(...t),S()}}let C=b?Array(e.length).fill(tQ):tQ,T=e=>{if(1&r.flags&&(r.dirty||e)){if(t){let e=r.run();if(a||y||(b?e.some((e,t)=>G(e,C[t])):G(e,C))){l&&l();let n=d;d=r;try{let n=[e,C===tQ?void 0:b&&C[0]===tQ?[]:C,s];f?f(t,3,n):t(...n),C=e}finally{d=n}}}else r.run()}};return p&&p(T),(r=new ek(i)).scheduler=u?()=>u(T,!1):T,s=e=>tY(e,!1,r),l=r.onStop=()=>{let e=tX.get(r);if(e){if(f)f(e,4);else for(let t of e)t();tX.delete(r)}},t?o?T(!0):C=r.run():u?u(T.bind(null,!0),!0):r.run(),S.pause=r.pause.bind(r),S.resume=r.resume.bind(r),S.stop=S,S}(e,t,a);return lD&&(r?r.push(f):c&&f()),f}function ij(e,t,n){let r;let i=this.proxy,l=I(e)?e.includes(".")?iH(i,e):()=>i[e]:e.bind(i,i);R(t)?r=t:(r=t.handler,n=t);let s=lO(this),o=iU(l,r.bind(i),n);return s(),o}function iH(e,t){let n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function iq(e,t,n=h){let r=lI(),i=q(t),l=K(t),s=iW(e,i),o=tU((s,o)=>{let a,c;let u=h;return iV(()=>{let t=e[i];G(a,t)&&(a=t,o())}),{get:()=>(s(),n.get?n.get(a):a),set(e){let s=n.set?n.set(e):e;if(!G(s,a)&&!(u!==h&&G(e,u)))return;let d=r.vnode.props;d&&(t in d||i in d||l in d)&&(`onUpdate:${t}`in d||`onUpdate:${i}`in d||`onUpdate:${l}`in d)||(a=e,o()),r.emit(`update:${t}`,s),G(e,s)&&G(e,u)&&!G(s,c)&&o(),u=e,c=s}}});return o[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?s||h:o,done:!1}:{done:!0}}},o}let iW=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${q(t)}Modifiers`]||e[`${K(t)}Modifiers`];function iK(e,t,...n){let r;if(e.isUnmounted)return;let i=e.vnode.props||h,l=n,s=t.startsWith("update:"),o=s&&iW(i,t.slice(7));o&&(o.trim&&(l=n.map(e=>I(e)?e.trim():e)),o.number&&(l=n.map(Z)));let a=i[r=J(t)]||i[r=J(q(t))];!a&&s&&(a=i[r=J(K(t))]),a&&t6(a,e,6,l);let c=i[r+"Once"];if(c){if(e.emitted){if(e.emitted[r])return}else e.emitted={};e.emitted[r]=!0,t6(c,e,6,l)}}function iz(e,t){return!!(e&&b(t))&&(T(e,(t=t.slice(2).replace(/Once$/,""))[0].toLowerCase()+t.slice(1))||T(e,K(t))||T(e,t))}function iJ(e){let t,n;let{type:r,vnode:i,proxy:l,withProxy:s,propsOptions:[o],slots:a,attrs:c,emit:u,render:d,renderCache:p,props:f,data:h,setupState:m,ctx:g,inheritAttrs:y}=e,b=np(e);try{if(4&i.shapeFlag){let e=s||l;t=lx(d.call(e,e,p,f,m,h,g)),n=c}else t=lx(r.length>1?r(f,{attrs:c,slots:a,emit:u}):r(f,null)),n=r.props?c:iG(c)}catch(n){lt.length=0,t4(n,e,1),t=lg(i7)}let S=t;if(n&&!1!==y){let e=Object.keys(n),{shapeFlag:t}=S;e.length&&7&t&&(o&&e.some(_)&&(n=iQ(n,o)),S=lv(S,n,!1,!0))}return i.dirs&&((S=lv(S,null,!1,!0)).dirs=S.dirs?S.dirs.concat(i.dirs):i.dirs),i.transition&&nH(S,i.transition),t=S,np(b),t}let iG=e=>{let t;for(let n in e)("class"===n||"style"===n||b(n))&&((t||(t={}))[n]=e[n]);return t},iQ=(e,t)=>{let n={};for(let r in e)_(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function iX(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let l=r[i];if(t[l]!==e[l]&&!iz(n,l))return!0}return!1}function iZ({vnode:e,parent:t},n){for(;t;){let r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}let iY=e=>e.__isSuspense,i0=0,i1={name:"Suspense",__isSuspense:!0,process(e,t,n,r,i,l,s,o,a,c){if(null==e)!function(e,t,n,r,i,l,s,o,a){let{p:c,o:{createElement:u}}=a,d=u("div"),p=e.suspense=i3(e,i,r,t,d,n,l,s,o,a);c(null,p.pendingBranch=e.ssContent,d,null,r,p,l,s),p.deps>0?(i2(e,"onPending"),i2(e,"onFallback"),c(null,e.ssFallback,t,n,r,null,l,s),i8(p,e.ssFallback)):p.resolve(!1,!0)}(t,n,r,i,l,s,o,a,c);else{if(l&&l.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}!function(e,t,n,r,i,l,s,o,{p:a,um:c,o:{createElement:u}}){let d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;let p=t.ssContent,f=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:g,isHydrating:y}=d;if(m)d.pendingBranch=p,ld(p,m)?(a(m,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0?d.resolve():g&&!y&&(a(h,f,n,r,i,null,l,s,o),i8(d,f))):(d.pendingId=i0++,y?(d.isHydrating=!1,d.activeBranch=m):c(m,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),g?(a(null,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0?d.resolve():(a(h,f,n,r,i,null,l,s,o),i8(d,f))):h&&ld(p,h)?(a(h,p,n,r,i,d,l,s,o),d.resolve(!0)):(a(null,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0&&d.resolve()));else if(h&&ld(p,h))a(h,p,n,r,i,d,l,s,o),i8(d,p);else if(i2(t,"onPending"),d.pendingBranch=p,512&p.shapeFlag?d.pendingId=p.component.suspenseId:d.pendingId=i0++,a(null,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0)d.resolve();else{let{timeout:e,pendingId:t}=d;e>0?setTimeout(()=>{d.pendingId===t&&d.fallback(f)},e):0===e&&d.fallback(f)}}(e,t,n,r,i,s,o,a,c)}},hydrate:function(e,t,n,r,i,l,s,o,a){let c=t.suspense=i3(t,r,n,e.parentNode,document.createElement("div"),null,i,l,s,o,!0),u=a(e,c.pendingBranch=t.ssContent,n,c,l,s);return 0===c.deps&&c.resolve(!1,!0),u},normalize:function(e){let{shapeFlag:t,children:n}=e,r=32&t;e.ssContent=i6(r?n.default:n),e.ssFallback=r?i6(n.fallback):lg(i7)}};function i2(e,t){let n=e.props&&e.props[t];R(n)&&n()}function i3(e,t,n,r,i,l,s,o,a,c,u=!1){let d;let{p:p,m:f,um:h,n:m,o:{parentNode:g,remove:y}}=c,b=function(e){let t=e.props&&e.props.suspensible;return null!=t&&!1!==t}(e);b&&t&&t.pendingBranch&&(d=t.pendingId,t.deps++);let _=e.props?Y(e.props.timeout):void 0,S=l,x={vnode:e,parent:t,parentComponent:n,namespace:s,container:r,hiddenContainer:i,deps:0,pendingId:i0++,timeout:"number"==typeof _?_:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:r,activeBranch:i,pendingBranch:s,pendingId:o,effects:a,parentComponent:c,container:u}=x,p=!1;x.isHydrating?x.isHydrating=!1:e||((p=i&&s.transition&&"out-in"===s.transition.mode)&&(i.transition.afterLeave=()=>{o===x.pendingId&&(f(s,u,l===S?m(i):l,0),ns(a))}),i&&(g(i.el)===u&&(l=m(i)),h(i,c,x,!0)),p||f(s,u,l,0)),i8(x,s),x.pendingBranch=null,x.isInFallback=!1;let y=x.parent,_=!1;for(;y;){if(y.pendingBranch){y.effects.push(...a),_=!0;break}y=y.parent}_||p||ns(a),x.effects=[],b&&t&&t.pendingBranch&&d===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),i2(r,"onResolve")},fallback(e){if(!x.pendingBranch)return;let{vnode:t,activeBranch:n,parentComponent:r,container:i,namespace:l}=x;i2(t,"onFallback");let s=m(n),c=()=>{x.isInFallback&&(p(null,e,i,s,r,null,l,o,a),i8(x,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=c),x.isInFallback=!0,h(n,r,null,!0),u||c()},move(e,t,n){x.activeBranch&&f(x.activeBranch,e,t,n),x.container=e},next:()=>x.activeBranch&&m(x.activeBranch),registerDep(e,t,n){let r=!!x.pendingBranch;r&&x.deps++;let i=e.vnode.el;e.asyncDep.catch(t=>{t4(t,e,0)}).then(l=>{if(e.isUnmounted||x.isUnmounted||x.pendingId!==e.suspenseId)return;e.asyncResolved=!0;let{vnode:o}=e;l$(e,l,!1),i&&(o.el=i);let a=!i&&e.subTree.el;t(e,o,g(i||e.subTree.el),i?null:m(e.subTree),x,s,n),a&&y(a),iZ(e,o.el),r&&0==--x.deps&&x.resolve()})},unmount(e,t){x.isUnmounted=!0,x.activeBranch&&h(x.activeBranch,n,e,t),x.pendingBranch&&h(x.pendingBranch,n,e,t)}};return x}function i6(e){let t;if(R(e)){let n=ll&&e._c;n&&(e._d=!1,lr()),e=e(),n&&(e._d=!0,t=ln,li())}return k(e)&&(e=function(e,t=!0){let n;for(let t=0;t<e.length;t++){let r=e[t];if(!lu(r))return;if(r.type!==i7||"v-if"===r.children){if(n)return;n=r}}return n}(e)),e=lx(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(t=>t!==e)),e}function i4(e,t){t&&t.pendingBranch?k(e)?t.effects.push(...e):t.effects.push(e):ns(e)}function i8(e,t){e.activeBranch=t;let{vnode:n,parentComponent:r}=e,i=t.el;for(;!i&&t.component;)i=(t=t.component.subTree).el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,iZ(r,i))}let i5=Symbol.for("v-fgt"),i9=Symbol.for("v-txt"),i7=Symbol.for("v-cmt"),le=Symbol.for("v-stc"),lt=[],ln=null;function lr(e=!1){lt.push(ln=e?null:[])}function li(){lt.pop(),ln=lt[lt.length-1]||null}let ll=1;function ls(e,t=!1){ll+=e,e<0&&ln&&t&&(ln.hasOnce=!0)}function lo(e){return e.dynamicChildren=ll>0?ln||m:null,li(),ll>0&&ln&&ln.push(e),e}function la(e,t,n,r,i,l){return lo(lm(e,t,n,r,i,l,!0))}function lc(e,t,n,r,i){return lo(lg(e,t,n,r,i,!0))}function lu(e){return!!e&&!0===e.__v_isVNode}function ld(e,t){return e.type===t.type&&e.key===t.key}function lp(e){}let lf=({key:e})=>null!=e?e:null,lh=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?I(e)||tR(e)||R(e)?{i:nu,r:e,k:t,f:!!n}:e:null);function lm(e,t=null,n=null,r=0,i=null,l=e===i5?0:1,s=!1,o=!1){let a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&lf(t),ref:t&&lh(t),scopeId:nd,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:nu};return o?(lT(a,n),128&l&&e.normalize(a)):n&&(a.shapeFlag|=I(n)?8:16),ll>0&&!s&&ln&&(a.patchFlag>0||6&l)&&32!==a.patchFlag&&ln.push(a),a}let lg=function(e,t=null,n=null,r=0,i=null,l=!1){var s;if(e&&e!==rN||(e=i7),lu(e)){let r=lv(e,t,!0);return n&&lT(r,n),ll>0&&!l&&ln&&(6&r.shapeFlag?ln[ln.indexOf(e)]=r:ln.push(r)),r.patchFlag=-2,r}if(R(s=e)&&"__vccOpts"in s&&(e=e.__vccOpts),t){let{class:e,style:n}=t=ly(t);e&&!I(e)&&(t.class=eo(e)),P(n)&&(tk(n)&&!k(n)&&(n=S({},n)),t.style=en(n))}let o=I(e)?1:iY(e)?128:n_(e)?64:P(e)?4:R(e)?2:0;return lm(e,t,n,r,i,o,l,!0)};function ly(e){return e?tk(e)||ip(e)?S({},e):e:null}function lv(e,t,n=!1,r=!1){let{props:i,ref:l,patchFlag:s,children:o,transition:a}=e,c=t?lk(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&lf(c),ref:t&&t.ref?n&&l?k(l)?l.concat(lh(t)):[l,lh(t)]:lh(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==i5?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&lv(e.ssContent),ssFallback:e.ssFallback&&lv(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&r&&nH(u,a.clone(u)),u}function lb(e=" ",t=0){return lg(i9,null,e,t)}function l_(e,t){let n=lg(le,null,e);return n.staticCount=t,n}function lS(e="",t=!1){return t?(lr(),lc(i7,null,e)):lg(i7,null,e)}function lx(e){return null==e||"boolean"==typeof e?lg(i7):k(e)?lg(i5,null,e.slice()):lu(e)?lC(e):lg(i9,null,String(e))}function lC(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:lv(e)}function lT(e,t){let n=0,{shapeFlag:r}=e;if(null==t)t=null;else if(k(t))n=16;else if("object"==typeof t){if(65&r){let n=t.default;n&&(n._c&&(n._d=!1),lT(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;r||ip(t)?3===r&&nu&&(1===nu.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=nu}}else R(t)?(t={default:t,_ctx:nu},n=32):(t=String(t),64&r?(n=16,t=[lb(t)]):n=8);e.children=t,e.shapeFlag|=n}function lk(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if("class"===e)t.class!==r.class&&(t.class=eo([t.class,r.class]));else if("style"===e)t.style=en([t.style,r.style]);else if(b(e)){let n=t[e],i=r[e];i&&n!==i&&!(k(n)&&n.includes(i))&&(t[e]=n?[].concat(n,i):i)}else""!==e&&(t[e]=r[e])}return t}function lw(e,t,n,r=null){t6(e,t,7,[n,r])}let lN=ii(),lE=0;function lA(e,t,n){let r=e.type,i=(t?t.appContext:e.appContext)||lN,l={uid:lE++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new e_(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:function e(t,n,r=!1){let i=r?ig:n.propsCache,l=i.get(t);if(l)return l;let s=t.props,o={},a=[],c=!1;if(!R(t)){let i=t=>{c=!0;let[r,i]=e(t,n,!0);S(o,r),i&&a.push(...i)};!r&&n.mixins.length&&n.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}if(!s&&!c)return P(t)&&i.set(t,m),m;if(k(s))for(let e=0;e<s.length;e++){let t=q(s[e]);iy(t)&&(o[t]=h)}else if(s)for(let e in s){let t=q(e);if(iy(t)){let n=s[e],r=o[t]=k(n)||R(n)?{type:n}:S({},n),i=r.type,l=!1,c=!0;if(k(i))for(let e=0;e<i.length;++e){let t=i[e],n=R(t)&&t.name;if("Boolean"===n){l=!0;break}"String"===n&&(c=!1)}else l=R(i)&&"Boolean"===i.name;r[0]=l,r[1]=c,(l||T(r,"default"))&&a.push(t)}}let u=[o,a];return P(t)&&i.set(t,u),u}(r,i),emitsOptions:function e(t,n,r=!1){let i=n.emitsCache,l=i.get(t);if(void 0!==l)return l;let s=t.emits,o={},a=!1;if(!R(t)){let i=t=>{let r=e(t,n,!0);r&&(a=!0,S(o,r))};!r&&n.mixins.length&&n.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}return s||a?(k(s)?s.forEach(e=>o[e]=null):S(o,s),P(t)&&i.set(t,o),o):(P(t)&&i.set(t,null),null)}(r,i),emit:null,emitted:null,propsDefaults:h,inheritAttrs:r.inheritAttrs,ctx:h,data:h,props:h,attrs:h,slots:h,refs:h,setupState:h,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return l.ctx={_:l},l.root=t?t.root:l,l.emit=iK.bind(null,l),e.ce&&e.ce(l),l}let lR=null,lI=()=>lR||nu;{let e=ee(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};l=t("__VUE_INSTANCE_SETTERS__",e=>lR=e),s=t("__VUE_SSR_SETTERS__",e=>lD=e)}let lO=e=>{let t=lR;return l(e),e.scope.on(),()=>{e.scope.off(),l(t)}},lP=()=>{lR&&lR.scope.off(),l(null)};function lM(e){return 4&e.vnode.shapeFlag}let lD=!1;function lL(e,t=!1,n=!1){t&&s(t);let{props:r,children:i}=e.vnode,l=lM(e);!function(e,t,n,r=!1){let i={},l=id();for(let n in e.propsDefaults=Object.create(null),ih(e,t,i,l),e.propsOptions[0])n in i||(i[n]=void 0);n?e.props=r?i:tv(i):e.type.props?e.props=i:e.props=l,e.attrs=l}(e,r,l,t),iT(e,i,n);let o=l?function(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,rB);let{setup:r}=n;if(r){eF();let n=e.setupContext=r.length>1?lj(e):null,i=lO(e),l=t3(r,e,0,[e.props,n]),s=M(l);if(eV(),i(),(s||e.sp)&&!rn(e)&&nz(e),s){if(l.then(lP,lP),t)return l.then(n=>{l$(e,n,t)}).catch(t=>{t4(t,e,0)});e.asyncDep=l}else l$(e,l,t)}else lB(e,t)}(e,t):void 0;return t&&s(!1),o}function l$(e,t,n){R(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:P(t)&&(e.setupState=tV(t)),lB(e,n)}function lF(e){o=e,a=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,rU))}}let lV=()=>!o;function lB(e,t,n){let r=e.type;if(!e.render){if(!t&&o&&!r.render){let t=r.template||r4(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:l,compilerOptions:s}=r,a=S(S({isCustomElement:n,delimiters:l},i),s);r.render=o(t,a)}}e.render=r.render||g,a&&a(e)}{let t=lO(e);eF();try{!function(e){let t=r4(e),n=e.proxy,r=e.ctx;r3=!1,t.beforeCreate&&r6(t.beforeCreate,e,"bc");let{data:i,computed:l,methods:s,watch:o,provide:a,inject:c,created:u,beforeMount:d,mounted:p,beforeUpdate:f,updated:h,activated:m,deactivated:y,beforeDestroy:b,beforeUnmount:_,destroyed:S,unmounted:x,render:C,renderTracked:T,renderTriggered:w,errorCaptured:N,serverPrefetch:E,expose:A,inheritAttrs:O,components:M,directives:D,filters:L}=t;if(c&&function(e,t,n=g){for(let n in k(e)&&(e=r7(e)),e){let r;let i=e[n];tR(r=P(i)?"default"in i?ia(i.from||n,i.default,!0):ia(i.from||n):ia(i))?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[n]=r}}(c,r,null),s)for(let e in s){let t=s[e];R(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);P(t)&&(e.data=ty(t))}if(r3=!0,l)for(let e in l){let t=l[e],i=R(t)?t.bind(n,n):R(t.get)?t.get.bind(n,n):g,s=lW({get:i,set:!R(t)&&R(t.set)?t.set.bind(n):g});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e})}if(o)for(let e in o)!function e(t,n,r,i){let l=i.includes(".")?iH(r,i):()=>r[i];if(I(t)){let e=n[t];R(e)&&iB(l,e)}else if(R(t))iB(l,t.bind(r));else if(P(t)){if(k(t))t.forEach(t=>e(t,n,r,i));else{let e=R(t.handler)?t.handler.bind(r):n[t.handler];R(e)&&iB(l,e,t)}}}(o[e],r,n,e);if(a){let e=R(a)?a.call(n):a;Reflect.ownKeys(e).forEach(t=>{io(t,e[t])})}function $(e,t){k(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(u&&r6(u,e,"c"),$(rm,d),$(rg,p),$(ry,f),$(rv,h),$(ra,m),$(rc,y),$(rT,N),$(rC,T),$(rx,w),$(rb,_),$(r_,x),$(rS,E),k(A)){if(A.length){let t=e.exposed||(e.exposed={});A.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})})}else e.exposed||(e.exposed={})}C&&e.render===g&&(e.render=C),null!=O&&(e.inheritAttrs=O),M&&(e.components=M),D&&(e.directives=D),E&&nz(e)}(e)}finally{eV(),t()}}}let lU={get:(e,t)=>(eJ(e,"get",""),e[t])};function lj(e){return{attrs:new Proxy(e.attrs,lU),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function lH(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tV(tN(e.exposed)),{get:(t,n)=>n in t?t[n]:n in rF?rF[n](e):void 0,has:(e,t)=>t in e||t in rF})):e.proxy}function lq(e,t=!0){return R(e)?e.displayName||e.name:e.name||t&&e.__name}let lW=(e,t)=>(function(e,t,n=!1){let r,i;return R(e)?r=e:(r=e.get,i=e.set),new tz(r,i,n)})(e,0,lD);function lK(e,t,n){let r=arguments.length;return 2!==r?(r>3?n=Array.prototype.slice.call(arguments,2):3===r&&lu(n)&&(n=[n]),lg(e,t,n)):!P(t)||k(t)?lg(e,null,t):lu(t)?lg(e,null,[t]):lg(e,t)}function lz(){}function lJ(e,t,n,r){let i=n[r];if(i&&lG(i,e))return i;let l=t();return l.memo=e.slice(),l.cacheIndex=r,n[r]=l}function lG(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e<n.length;e++)if(G(n[e],t[e]))return!1;return ll>0&&ln&&ln.push(e),!0}let lQ="3.5.13",lX=g,lZ=null,lY=void 0,l0=g,l1={createComponentInstance:lA,setupComponent:lL,renderComponentRoot:iJ,setCurrentRenderingInstance:np,isVNode:lu,normalizeVNode:lx,getComponentPublicInstance:lH,ensureValidVNode:rD,pushWarningContext:function(e){},popWarningContext:function(){}},l2=null,l3=null,l6=null,l4="undefined"!=typeof window&&window.trustedTypes;if(l4)try{p=l4.createPolicy("vue",{createHTML:e=>e})}catch(e){}let l8=p?e=>p.createHTML(e):e=>e,l5="undefined"!=typeof document?document:null,l9=l5&&l5.createElement("template"),l7="transition",se="animation",st=Symbol("_vtc"),sn={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},sr=S({},nD,sn),si=((ox=(e,{slots:t})=>lK(nF,so(e),t)).displayName="Transition",ox.props=sr,ox),sl=(e,t=[])=>{k(e)?e.forEach(e=>e(...t)):e&&e(...t)},ss=e=>!!e&&(k(e)?e.some(e=>e.length>1):e.length>1);function so(e){let t={};for(let n in e)n in sn||(t[n]=e[n]);if(!1===e.css)return t;let{name:n="v",type:r,duration:i,enterFromClass:l=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:o=`${n}-enter-to`,appearFromClass:a=l,appearActiveClass:c=s,appearToClass:u=o,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(P(e))return[Y(e.enter),Y(e.leave)];{let t=Y(e);return[t,t]}}(i),m=h&&h[0],g=h&&h[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:_,onLeave:x,onLeaveCancelled:C,onBeforeAppear:T=y,onAppear:k=b,onAppearCancelled:w=_}=t,N=(e,t,n,r)=>{e._enterCancelled=r,sc(e,t?u:o),sc(e,t?c:s),n&&n()},E=(e,t)=>{e._isLeaving=!1,sc(e,d),sc(e,f),sc(e,p),t&&t()},A=e=>(t,n)=>{let i=e?k:b,s=()=>N(t,e,n);sl(i,[t,s]),su(()=>{sc(t,e?a:l),sa(t,e?u:o),ss(i)||sp(t,r,m,s)})};return S(t,{onBeforeEnter(e){sl(y,[e]),sa(e,l),sa(e,s)},onBeforeAppear(e){sl(T,[e]),sa(e,a),sa(e,c)},onEnter:A(!1),onAppear:A(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>E(e,t);sa(e,d),e._enterCancelled?(sa(e,p),sg()):(sg(),sa(e,p)),su(()=>{e._isLeaving&&(sc(e,d),sa(e,f),ss(x)||sp(e,r,g,n))}),sl(x,[e,n])},onEnterCancelled(e){N(e,!1,void 0,!0),sl(_,[e])},onAppearCancelled(e){N(e,!0,void 0,!0),sl(w,[e])},onLeaveCancelled(e){E(e),sl(C,[e])}})}function sa(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[st]||(e[st]=new Set)).add(t)}function sc(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[st];n&&(n.delete(t),n.size||(e[st]=void 0))}function su(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let sd=0;function sp(e,t,n,r){let i=e._endId=++sd,l=()=>{i===e._endId&&r()};if(null!=n)return setTimeout(l,n);let{type:s,timeout:o,propCount:a}=sf(e,t);if(!s)return r();let c=s+"end",u=0,d=()=>{e.removeEventListener(c,p),l()},p=t=>{t.target===e&&++u>=a&&d()};setTimeout(()=>{u<a&&d()},o+1),e.addEventListener(c,p)}function sf(e,t){let n=window.getComputedStyle(e),r=e=>(n[e]||"").split(", "),i=r(`${l7}Delay`),l=r(`${l7}Duration`),s=sh(i,l),o=r(`${se}Delay`),a=r(`${se}Duration`),c=sh(o,a),u=null,d=0,p=0;t===l7?s>0&&(u=l7,d=s,p=l.length):t===se?c>0&&(u=se,d=c,p=a.length):p=(u=(d=Math.max(s,c))>0?s>c?l7:se:null)?u===l7?l.length:a.length:0;let f=u===l7&&/\b(transform|all)(,|$)/.test(r(`${l7}Property`).toString());return{type:u,timeout:d,propCount:p,hasTransform:f}}function sh(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>sm(t)+sm(e[n])))}function sm(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function sg(){return document.body.offsetHeight}let sy=Symbol("_vod"),sv=Symbol("_vsh"),sb={beforeMount(e,{value:t},{transition:n}){e[sy]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):s_(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),s_(e,!0),r.enter(e)):r.leave(e,()=>{s_(e,!1)}):s_(e,t))},beforeUnmount(e,{value:t}){s_(e,t)}};function s_(e,t){e.style.display=t?e[sy]:"none",e[sv]=!t}let sS=Symbol("");function sx(e){let t=lI();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>sC(e,n))},r=()=>{let r=e(t.proxy);t.ce?sC(t.ce,r):function e(t,n){if(128&t.shapeFlag){let r=t.suspense;t=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{e(r.activeBranch,n)})}for(;t.component;)t=t.component.subTree;if(1&t.shapeFlag&&t.el)sC(t.el,n);else if(t.type===i5)t.children.forEach(t=>e(t,n));else if(t.type===le){let{el:e,anchor:r}=t;for(;e&&(sC(e,n),e!==r);)e=e.nextSibling}}(t.subTree,r),n(r)};ry(()=>{ns(r)}),rg(()=>{iB(r,g,{flush:"post"});let e=new MutationObserver(r);e.observe(t.subTree.el.parentNode,{childList:!0}),r_(()=>e.disconnect())})}function sC(e,t){if(1===e.nodeType){let n=e.style,r="";for(let e in t)n.setProperty(`--${e}`,t[e]),r+=`--${e}: ${t[e]};`;n[sS]=r}}let sT=/(^|;)\s*display\s*:/,sk=/\s*!important$/;function sw(e,t,n){if(k(n))n.forEach(n=>sw(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{let r=function(e,t){let n=sE[t];if(n)return n;let r=q(t);if("filter"!==r&&r in e)return sE[t]=r;r=z(r);for(let n=0;n<sN.length;n++){let i=sN[n]+r;if(i in e)return sE[t]=i}return t}(e,t);sk.test(n)?e.setProperty(K(r),n.replace(sk,""),"important"):e[r]=n}}let sN=["Webkit","Moz","ms"],sE={},sA="http://www.w3.org/1999/xlink";function sR(e,t,n,r,i,l=ef(t)){r&&t.startsWith("xlink:")?null==n?e.removeAttributeNS(sA,t.slice(6,t.length)):e.setAttributeNS(sA,t,n):null==n||l&&!(n||""===n)?e.removeAttribute(t):e.setAttribute(t,l?"":O(n)?String(n):n)}function sI(e,t,n,r,i){if("innerHTML"===t||"textContent"===t){null!=n&&(e[t]="innerHTML"===t?l8(n):n);return}let l=e.tagName;if("value"===t&&"PROGRESS"!==l&&!l.includes("-")){let r="OPTION"===l?e.getAttribute("value")||"":e.value,i=null==n?"checkbox"===e.type?"on":"":String(n);r===i&&"_value"in e||(e.value=i),null==n&&e.removeAttribute(t),e._value=n;return}let s=!1;if(""===n||null==n){let r=typeof e[t];if("boolean"===r){var o;n=!!(o=n)||""===o}else null==n&&"string"===r?(n="",s=!0):"number"===r&&(n=0,s=!0)}try{e[t]=n}catch(e){}s&&e.removeAttribute(i||t)}function sO(e,t,n,r){e.addEventListener(t,n,r)}let sP=Symbol("_vei"),sM=/(?:Once|Passive|Capture)$/,sD=0,sL=Promise.resolve(),s$=()=>sD||(sL.then(()=>sD=0),sD=Date.now()),sF=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&123>e.charCodeAt(2),sV={};function sB(e,t,n){let r=nW(e,t);F(r)&&S(r,t);class i extends sH{constructor(e){super(r,e,n)}}return i.def=r,i}let sU=(e,t)=>sB(e,t,oy),sj="undefined"!=typeof HTMLElement?HTMLElement:class{};class sH extends sj{constructor(e,t={},n=og){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==og?this._root=this.shadowRoot:!1!==e.shadowRoot?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof sH){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,nr(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e<this.attributes.length;e++)this._setAttr(this.attributes[e].name);this._ob=new MutationObserver(e=>{for(let t of e)this._setAttr(t.attributeName)}),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{let n;this._resolved=!0,this._pendingResolve=void 0;let{props:r,styles:i}=e;if(r&&!k(r))for(let e in r){let t=r[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=Y(this._props[e])),(n||(n=Object.create(null)))[q(e)]=!0)}this._numberProps=n,t&&this._resolveProps(e),this.shadowRoot&&this._applyStyles(i),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then(t=>e(this._def=t,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)T(this,e)||Object.defineProperty(this,e,{get:()=>tL(t[e])})}_resolveProps(e){let{props:t}=e,n=k(t)?t:Object.keys(t||{});for(let e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(q))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):sV,r=q(e);t&&this._numberProps&&this._numberProps[r]&&(n=Y(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){if(t!==this._props[e]&&(t===sV?delete this._props[e]:(this._props[e]=t,"key"===e&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n)){let n=this._ob;n&&n.disconnect(),!0===t?this.setAttribute(K(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(K(e),t+""):t||this.removeAttribute(K(e)),n&&n.observe(this,{attributes:!0})}}_update(){oh(this._createVNode(),this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=lg(this._def,S(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,F(t[0])?S({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),K(e)!==e&&t(K(e),n)},this._setParent()}),t}_applyStyles(e,t){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let n=this._nonce;for(let t=e.length-1;t>=0;t--){let r=document.createElement("style");n&&r.setAttribute("nonce",n),r.textContent=e[t],this.shadowRoot.prepend(r)}}_parseSlots(){let e;let t=this._slots={};for(;e=this.firstChild;){let n=1===e.nodeType&&e.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(e),this.removeChild(e)}}_renderSlots(){let e=(this._teleportTarget||this).querySelectorAll("slot"),t=this._instance.type.__scopeId;for(let n=0;n<e.length;n++){let r=e[n],i=r.getAttribute("name")||"default",l=this._slots[i],s=r.parentNode;if(l)for(let e of l){if(t&&1===e.nodeType){let n;let r=t+"-s",i=document.createTreeWalker(e,1);for(e.setAttribute(r,"");n=i.nextNode();)n.setAttribute(r,"")}s.insertBefore(e,r)}else for(;r.firstChild;)s.insertBefore(r.firstChild,r);s.removeChild(r)}}_injectChildStyle(e){this._applyStyles(e.styles,e)}_removeChildStyle(e){}}function sq(e){let t=lI();return t&&t.ce||null}function sW(){let e=sq();return e&&e.shadowRoot}function sK(e="$style"){{let t=lI();if(!t)return h;let n=t.type.__cssModules;return n&&n[e]||h}}let sz=new WeakMap,sJ=new WeakMap,sG=Symbol("_moveCb"),sQ=Symbol("_enterCb"),sX=(oC={name:"TransitionGroup",props:S({},sr,{tag:String,moveClass:String}),setup(e,{slots:t}){let n,r;let i=lI(),l=nP();return rv(()=>{if(!n.length)return;let t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){let r=e.cloneNode(),i=e[st];i&&i.forEach(e=>{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display="none";let l=1===t.nodeType?t:t.parentNode;l.appendChild(r);let{hasTransform:s}=sf(r);return l.removeChild(r),s}(n[0].el,i.vnode.el,t))return;n.forEach(sZ),n.forEach(sY);let r=n.filter(s0);sg(),r.forEach(e=>{let n=e.el,r=n.style;sa(n,t),r.transform=r.webkitTransform=r.transitionDuration="";let i=n[sG]=e=>{(!e||e.target===n)&&(!e||/transform$/.test(e.propertyName))&&(n.removeEventListener("transitionend",i),n[sG]=null,sc(n,t))};n.addEventListener("transitionend",i)})}),()=>{let s=tw(e),o=so(s),a=s.tag||i5;if(n=[],r)for(let e=0;e<r.length;e++){let t=r[e];t.el&&t.el instanceof Element&&(n.push(t),nH(t,nB(t,o,l,i)),sz.set(t,t.el.getBoundingClientRect()))}r=t.default?nq(t.default()):[];for(let e=0;e<r.length;e++){let t=r[e];null!=t.key&&nH(t,nB(t,o,l,i))}return lg(a,null,r)}}},delete oC.props.mode,oC);function sZ(e){let t=e.el;t[sG]&&t[sG](),t[sQ]&&t[sQ]()}function sY(e){sJ.set(e,e.el.getBoundingClientRect())}function s0(e){let t=sz.get(e),n=sJ.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){let t=e.el.style;return t.transform=t.webkitTransform=`translate(${r}px,${i}px)`,t.transitionDuration="0s",e}}let s1=e=>{let t=e.props["onUpdate:modelValue"]||!1;return k(t)?e=>Q(t,e):t};function s2(e){e.target.composing=!0}function s3(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}let s6=Symbol("_assign"),s4={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[s6]=s1(i);let l=r||i.props&&"number"===i.props.type;sO(e,t?"change":"input",t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),l&&(r=Z(r)),e[s6](r)}),n&&sO(e,"change",()=>{e.value=e.value.trim()}),t||(sO(e,"compositionstart",s2),sO(e,"compositionend",s3),sO(e,"change",s3))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:l}},s){if(e[s6]=s1(s),e.composing)return;let o=(l||"number"===e.type)&&!/^0\d/.test(e.value)?Z(e.value):e.value,a=null==t?"":t;o===a||document.activeElement===e&&"range"!==e.type&&(r&&t===n||i&&e.value.trim()===a)||(e.value=a)}},s8={deep:!0,created(e,t,n){e[s6]=s1(n),sO(e,"change",()=>{let t=e._modelValue,n=ot(e),r=e.checked,i=e[s6];if(k(t)){let e=em(t,n),l=-1!==e;if(r&&!l)i(t.concat(n));else if(!r&&l){let n=[...t];n.splice(e,1),i(n)}}else if(N(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(on(e,r))})},mounted:s5,beforeUpdate(e,t,n){e[s6]=s1(n),s5(e,t,n)}};function s5(e,{value:t,oldValue:n},r){let i;if(e._modelValue=t,k(t))i=em(t,r.props.value)>-1;else if(N(t))i=t.has(r.props.value);else{if(t===n)return;i=eh(t,on(e,!0))}e.checked!==i&&(e.checked=i)}let s9={created(e,{value:t},n){e.checked=eh(t,n.props.value),e[s6]=s1(n),sO(e,"change",()=>{e[s6](ot(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[s6]=s1(r),t!==n&&(e.checked=eh(t,r.props.value))}},s7={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=N(t);sO(e,"change",()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?Z(ot(e)):ot(e));e[s6](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,nr(()=>{e._assigning=!1})}),e[s6]=s1(r)},mounted(e,{value:t}){oe(e,t)},beforeUpdate(e,t,n){e[s6]=s1(n)},updated(e,{value:t}){e._assigning||oe(e,t)}};function oe(e,t){let n=e.multiple,r=k(t);if(!n||r||N(t)){for(let i=0,l=e.options.length;i<l;i++){let l=e.options[i],s=ot(l);if(n){if(r){let e=typeof s;"string"===e||"number"===e?l.selected=t.some(e=>String(e)===String(s)):l.selected=em(t,s)>-1}else l.selected=t.has(s)}else if(eh(ot(l),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function ot(e){return"_value"in e?e._value:e.value}function on(e,t){let n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}let or={created(e,t,n){ol(e,t,n,null,"created")},mounted(e,t,n){ol(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){ol(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){ol(e,t,n,r,"updated")}};function oi(e,t){switch(e){case"SELECT":return s7;case"TEXTAREA":return s4;default:switch(t){case"checkbox":return s8;case"radio":return s9;default:return s4}}}function ol(e,t,n,r,i){let l=oi(e.tagName,n.props&&n.props.type)[i];l&&l(e,t,n,r)}let os=["ctrl","shift","alt","meta"],oo={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>os.some(n=>e[`${n}Key`]&&!t.includes(n))},oa=(e,t)=>{let n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(n,...r)=>{for(let e=0;e<t.length;e++){let r=oo[t[e]];if(r&&r(n,t))return}return e(n,...r)})},oc={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ou=(e,t)=>{let n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=n=>{if(!("key"in n))return;let r=K(n.key);if(t.some(e=>e===r||oc[e]===r))return e(n)})},od=S({patchProp:(e,t,n,r,i,l)=>{let s="svg"===i;"class"===t?function(e,t,n){let r=e[st];r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,s):"style"===t?function(e,t,n){let r=e.style,i=I(n),l=!1;if(n&&!i){if(t){if(I(t))for(let e of t.split(";")){let t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&sw(r,t,"")}else for(let e in t)null==n[e]&&sw(r,e,"")}for(let e in n)"display"===e&&(l=!0),sw(r,e,n[e])}else if(i){if(t!==n){let e=r[sS];e&&(n+=";"+e),r.cssText=n,l=sT.test(n)}}else t&&e.removeAttribute("style");sy in e&&(e[sy]=l?r.display:"",e[sv]&&(r.display="none"))}(e,n,r):b(t)?_(t)||function(e,t,n,r,i=null){let l=e[sP]||(e[sP]={}),s=l[t];if(r&&s)s.value=r;else{let[n,o]=function(e){let t;if(sM.test(e)){let n;for(t={};n=e.match(sM);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):K(e.slice(2)),t]}(t);r?sO(e,n,l[t]=function(e,t){let n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();t6(function(e,t){if(!k(t))return t;{let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}}(e,n.value),t,5,[e])};return n.value=e,n.attached=s$(),n}(r,i),o):s&&(!function(e,t,n,r){e.removeEventListener(t,n,r)}(e,n,s,o),l[t]=void 0)}}(e,t,0,r,l):("."===t[0]?(t=t.slice(1),0):"^"===t[0]?(t=t.slice(1),1):!function(e,t,n,r){if(r)return!!("innerHTML"===t||"textContent"===t||t in e&&sF(t)&&R(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"form"===t||"list"===t&&"INPUT"===e.tagName||"type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){let t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return!(sF(t)&&I(n))&&t in e}(e,t,r,s))?e._isVueCE&&(/[A-Z]/.test(t)||!I(r))?sI(e,q(t),r,l,t):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),sR(e,t,r,s)):(sI(e,t,r),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||sR(e,t,r,s,l,"value"!==t))}},{insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i="svg"===t?l5.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?l5.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?l5.createElement(e,{is:n}):l5.createElement(e);return"select"===e&&r&&null!=r.multiple&&i.setAttribute("multiple",r.multiple),i},createText:e=>l5.createTextNode(e),createComment:e=>l5.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>l5.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,l){let s=n?n.previousSibling:t.lastChild;if(i&&(i===l||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==l&&(i=i.nextSibling););else{l9.innerHTML=l8("svg"===r?`<svg>${e}</svg>`:"mathml"===r?`<math>${e}</math>`:e);let i=l9.content;if("svg"===r||"mathml"===r){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}}),op=!1;function of(){return c=op?c:iE(od),op=!0,c}let oh=(...e)=>{(c||(c=iN(od))).render(...e)},om=(...e)=>{of().hydrate(...e)},og=(...e)=>{let t=(c||(c=iN(od))).createApp(...e),{mount:n}=t;return t.mount=e=>{let r=ob(e);if(!r)return;let i=t._component;R(i)||i.render||i.template||(i.template=r.innerHTML),1===r.nodeType&&(r.textContent="");let l=n(r,!1,ov(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),l},t},oy=(...e)=>{let t=of().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=ob(e);if(t)return n(t,!0,ov(t))},t};function ov(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function ob(e){return I(e)?document.querySelector(e):e}let o_=!1,oS=()=>{o_||(o_=!0,s4.getSSRProps=({value:e})=>({value:e}),s9.getSSRProps=({value:e},t)=>{if(t.props&&eh(t.props.value,e))return{checked:!0}},s8.getSSRProps=({value:e},t)=>{if(k(e)){if(t.props&&em(e,t.props.value)>-1)return{checked:!0}}else if(N(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},or.getSSRProps=(e,t)=>{if("string"!=typeof t.type)return;let n=oi(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)},sb.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}})};var ox,oC,oT=Object.freeze({__proto__:null,BaseTransition:nF,BaseTransitionPropsValidators:nD,Comment:i7,DeprecationTypes:l6,EffectScope:e_,ErrorCodes:t2,ErrorTypeStrings:lZ,Fragment:i5,KeepAlive:rs,ReactiveEffect:ek,Static:le,Suspense:i1,Teleport:nE,Text:i9,TrackOpTypes:tJ,Transition:si,TransitionGroup:sX,TriggerOpTypes:tG,VueElement:sH,assertNumber:t1,callWithAsyncErrorHandling:t6,callWithErrorHandling:t3,camelize:q,capitalize:z,cloneVNode:lv,compatUtils:l3,computed:lW,createApp:og,createBlock:lc,createCommentVNode:lS,createElementBlock:la,createElementVNode:lm,createHydrationRenderer:iE,createPropsRestProxy:r1,createRenderer:iN,createSSRApp:oy,createSlots:rP,createStaticVNode:l_,createTextVNode:lb,createVNode:lg,customRef:tU,defineAsyncComponent:rr,defineComponent:nW,defineCustomElement:sB,defineEmits:rH,defineExpose:rq,defineModel:rz,defineOptions:rW,defineProps:rj,defineSSRCustomElement:sU,defineSlots:rK,devtools:lY,effect:eM,effectScope:eS,getCurrentInstance:lI,getCurrentScope:ex,getCurrentWatcher:tZ,getTransitionRawChildren:nq,guardReactiveProps:ly,h:lK,handleError:t4,hasInjectionContext:ic,hydrate:om,hydrateOnIdle:n9,hydrateOnInteraction:rt,hydrateOnMediaQuery:re,hydrateOnVisible:n7,initCustomFormatter:lz,initDirectivesForSSR:oS,inject:ia,isMemoSame:lG,isProxy:tk,isReactive:tx,isReadonly:tC,isRef:tR,isRuntimeOnly:lV,isShallow:tT,isVNode:lu,markRaw:tN,mergeDefaults:rY,mergeModels:r0,mergeProps:lk,nextTick:nr,normalizeClass:eo,normalizeProps:ea,normalizeStyle:en,onActivated:ra,onBeforeMount:rm,onBeforeUnmount:rb,onBeforeUpdate:ry,onDeactivated:rc,onErrorCaptured:rT,onMounted:rg,onRenderTracked:rC,onRenderTriggered:rx,onScopeDispose:eC,onServerPrefetch:rS,onUnmounted:r_,onUpdated:rv,onWatcherCleanup:tY,openBlock:lr,popScopeId:nh,provide:io,proxyRefs:tV,pushScopeId:nf,queuePostFlushCb:ns,reactive:ty,readonly:tb,ref:tI,registerRuntimeCompiler:lF,render:oh,renderList:rO,renderSlot:rM,resolveComponent:rw,resolveDirective:rA,resolveDynamicComponent:rE,resolveFilter:l2,resolveTransitionHooks:nB,setBlockTracking:ls,setDevtoolsHook:l0,setTransitionHooks:nH,shallowReactive:tv,shallowReadonly:t_,shallowRef:tO,ssrContextKey:iD,ssrUtils:l1,stop:eD,toDisplayString:ey,toHandlerKey:J,toHandlers:rL,toRaw:tw,toRef:tW,toRefs:tj,toValue:t$,transformVNodeArgs:lp,triggerRef:tD,unref:tL,useAttrs:rQ,useCssModule:sK,useCssVars:sx,useHost:sq,useId:nK,useModel:iq,useSSRContext:iL,useShadowRoot:sW,useSlots:rG,useTemplateRef:nJ,useTransitionState:nP,vModelCheckbox:s8,vModelDynamic:or,vModelRadio:s9,vModelSelect:s7,vModelText:s4,vShow:sb,version:lQ,warn:lX,watch:iB,watchEffect:i$,watchPostEffect:iF,watchSyncEffect:iV,withAsyncContext:r2,withCtx:ng,withDefaults:rJ,withDirectives:ny,withKeys:ou,withMemo:lJ,withModifiers:oa,withScopeId:nm});let ok=Symbol(""),ow=Symbol(""),oN=Symbol(""),oE=Symbol(""),oA=Symbol(""),oR=Symbol(""),oI=Symbol(""),oO=Symbol(""),oP=Symbol(""),oM=Symbol(""),oD=Symbol(""),oL=Symbol(""),o$=Symbol(""),oF=Symbol(""),oV=Symbol(""),oB=Symbol(""),oU=Symbol(""),oj=Symbol(""),oH=Symbol(""),oq=Symbol(""),oW=Symbol(""),oK=Symbol(""),oz=Symbol(""),oJ=Symbol(""),oG=Symbol(""),oQ=Symbol(""),oX=Symbol(""),oZ=Symbol(""),oY=Symbol(""),o0=Symbol(""),o1=Symbol(""),o2=Symbol(""),o3=Symbol(""),o6=Symbol(""),o4=Symbol(""),o8=Symbol(""),o5=Symbol(""),o9=Symbol(""),o7=Symbol(""),ae={[ok]:"Fragment",[ow]:"Teleport",[oN]:"Suspense",[oE]:"KeepAlive",[oA]:"BaseTransition",[oR]:"openBlock",[oI]:"createBlock",[oO]:"createElementBlock",[oP]:"createVNode",[oM]:"createElementVNode",[oD]:"createCommentVNode",[oL]:"createTextVNode",[o$]:"createStaticVNode",[oF]:"resolveComponent",[oV]:"resolveDynamicComponent",[oB]:"resolveDirective",[oU]:"resolveFilter",[oj]:"withDirectives",[oH]:"renderList",[oq]:"renderSlot",[oW]:"createSlots",[oK]:"toDisplayString",[oz]:"mergeProps",[oJ]:"normalizeClass",[oG]:"normalizeStyle",[oQ]:"normalizeProps",[oX]:"guardReactiveProps",[oZ]:"toHandlers",[oY]:"camelize",[o0]:"capitalize",[o1]:"toHandlerKey",[o2]:"setBlockTracking",[o3]:"pushScopeId",[o6]:"popScopeId",[o4]:"withCtx",[o8]:"unref",[o5]:"isRef",[o9]:"withMemo",[o7]:"isMemoSame"},at={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function an(e,t,n,r,i,l,s,o=!1,a=!1,c=!1,u=at){return e&&(o?(e.helper(oR),e.helper(e.inSSR||c?oI:oO)):e.helper(e.inSSR||c?oP:oM),s&&e.helper(oj)),{type:13,tag:t,props:n,children:r,patchFlag:i,dynamicProps:l,directives:s,isBlock:o,disableTracking:a,isComponent:c,loc:u}}function ar(e,t=at){return{type:17,loc:t,elements:e}}function ai(e,t=at){return{type:15,loc:t,properties:e}}function al(e,t){return{type:16,loc:at,key:I(e)?as(e,!0):e,value:t}}function as(e,t=!1,n=at,r=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:r}}function ao(e,t=at){return{type:8,loc:t,children:e}}function aa(e,t=[],n=at){return{type:14,loc:n,callee:e,arguments:t}}function ac(e,t,n=!1,r=!1,i=at){return{type:18,params:e,returns:t,newline:n,isSlot:r,loc:i}}function au(e,t,n,r=!0){return{type:19,test:e,consequent:t,alternate:n,newline:r,loc:at}}function ad(e,{helper:t,removeHelper:n,inSSR:r}){if(!e.isBlock){var i,l;e.isBlock=!0,n((i=e.isComponent,r||i?oP:oM)),t(oR),t((l=e.isComponent,r||l?oI:oO))}}let ap=new Uint8Array([123,123]),af=new Uint8Array([125,125]);function ah(e){return e>=97&&e<=122||e>=65&&e<=90}function am(e){return 32===e||10===e||9===e||12===e||13===e}function ag(e){return 47===e||62===e||am(e)}function ay(e){let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}let av={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};function ab(e){throw e}function a_(e){}function aS(e,t,n,r){let i=SyntaxError(String(`https://vuejs.org/error-reference/#compiler-${e}`));return i.code=e,i.loc=t,i}let ax=e=>4===e.type&&e.isStatic;function aC(e){switch(e){case"Teleport":case"teleport":return ow;case"Suspense":case"suspense":return oN;case"KeepAlive":case"keep-alive":return oE;case"BaseTransition":case"base-transition":return oA}}let aT=/^\d|[^\$\w\xA0-\uFFFF]/,ak=e=>!aT.test(e),aw=/[A-Za-z_$\xA0-\uFFFF]/,aN=/[\.\?\w$\xA0-\uFFFF]/,aE=/\s+[.[]\s*|\s*[.[]\s+/g,aA=e=>4===e.type?e.content:e.loc.source,aR=e=>{let t=aA(e).trim().replace(aE,e=>e.trim()),n=0,r=[],i=0,l=0,s=null;for(let e=0;e<t.length;e++){let o=t.charAt(e);switch(n){case 0:if("["===o)r.push(n),n=1,i++;else if("("===o)r.push(n),n=2,l++;else if(!(0===e?aw:aN).test(o))return!1;break;case 1:"'"===o||'"'===o||"`"===o?(r.push(n),n=3,s=o):"["===o?i++:"]"!==o||--i||(n=r.pop());break;case 2:if("'"===o||'"'===o||"`"===o)r.push(n),n=3,s=o;else if("("===o)l++;else if(")"===o){if(e===t.length-1)return!1;--l||(n=r.pop())}break;case 3:o===s&&(n=r.pop(),s=null)}}return!i&&!l},aI=/^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,aO=e=>aI.test(aA(e));function aP(e,t,n=!1){for(let r=0;r<e.props.length;r++){let i=e.props[r];if(7===i.type&&(n||i.exp)&&(I(t)?i.name===t:t.test(i.name)))return i}}function aM(e,t,n=!1,r=!1){for(let i=0;i<e.props.length;i++){let l=e.props[i];if(6===l.type){if(n)continue;if(l.name===t&&(l.value||r))return l}else if("bind"===l.name&&(l.exp||r)&&aD(l.arg,t))return l}}function aD(e,t){return!!(e&&ax(e)&&e.content===t)}function aL(e){return 5===e.type||2===e.type}function a$(e){return 7===e.type&&"slot"===e.name}function aF(e){return 1===e.type&&3===e.tagType}function aV(e){return 1===e.type&&2===e.tagType}let aB=new Set([oQ,oX]);function aU(e,t,n){let r,i;let l=13===e.type?e.props:e.arguments[2],s=[];if(l&&!I(l)&&14===l.type){let e=function e(t,n=[]){if(t&&!I(t)&&14===t.type){let r=t.callee;if(!I(r)&&aB.has(r))return e(t.arguments[0],n.concat(t))}return[t,n]}(l);l=e[0],i=(s=e[1])[s.length-1]}if(null==l||I(l))r=ai([t]);else if(14===l.type){let e=l.arguments[0];I(e)||15!==e.type?l.callee===oZ?r=aa(n.helper(oz),[ai([t]),l]):l.arguments.unshift(ai([t])):aj(t,e)||e.properties.unshift(t),r||(r=l)}else 15===l.type?(aj(t,l)||l.properties.unshift(t),r=l):(r=aa(n.helper(oz),[ai([t]),l]),i&&i.callee===oX&&(i=s[s.length-2]));13===e.type?i?i.arguments[0]=r:e.props=r:i?i.arguments[0]=r:e.arguments[2]=r}function aj(e,t){let n=!1;if(4===e.key.type){let r=e.key.content;n=t.properties.some(e=>4===e.key.type&&e.key.content===r)}return n}function aH(e,t){return`_${t}_${e.replace(/[^\w]/g,(t,n)=>"-"===t?"_":e.charCodeAt(n).toString())}`}let aq=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,aW={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:y,isPreTag:y,isIgnoreNewlineTag:y,isCustomElement:y,onError:ab,onWarn:a_,comments:!1,prefixIdentifiers:!1},aK=aW,az=null,aJ="",aG=null,aQ=null,aX="",aZ=-1,aY=-1,a0=0,a1=!1,a2=null,a3=[],a6=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=ap,this.delimiterClose=af,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=ap,this.delimiterClose=af}getPos(e){let t=1,n=e+1;for(let r=this.newlines.length-1;r>=0;r--){let i=this.newlines[r];if(e>i){t=r+2,n=e-i;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex]){if(this.delimiterIndex===this.delimiterOpen.length-1){let e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++}else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){let t=this.sequenceIndex===this.currentSequence.length;if(t?ag(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t){this.sequenceIndex++;return}}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||am(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart<t){let e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}this.sectionStart=t+2,this.stateInClosingTagName(e),this.inRCDATA=!1;return}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence!==av.TitleEnd&&(this.currentSequence!==av.TextareaEnd||this.inSFCRoot)?this.fastForwardTo(60)&&(this.sequenceIndex=1):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.sequenceIndex=Number(60===e)}stateCDATASequence(e){e===av.Cdata[this.sequenceIndex]?++this.sequenceIndex===av.Cdata.length&&(this.state=28,this.currentSequence=av.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){let t=this.buffer.charCodeAt(this.index);if(10===t&&this.newlines.push(this.index),t===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===av.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,t){this.enterRCDATA(e,t),this.state=31}enterRCDATA(e,t){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=t}stateBeforeTagName(e){33===e?(this.state=22,this.sectionStart=this.index+1):63===e?(this.state=24,this.sectionStart=this.index+1):ah(e)?(this.sectionStart=this.index,0===this.mode?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:116===e?this.state=30:this.state=115===e?29:6):47===e?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){ag(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(ag(e)){let t=this.buffer.slice(this.sectionStart,this.index);"template"!==t&&this.enterRCDATA(ay("</"+t),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){am(e)||(62===e?(this.state=1,this.sectionStart=this.index+1):(this.state=ah(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(62===e||am(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){62===e&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){62===e?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):47===e?this.state=7:60===e&&47===this.peek()?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):am(e)||this.handleAttrStart(e)}handleAttrStart(e){118===e&&45===this.peek()?(this.state=13,this.sectionStart=this.index):46===e||58===e||64===e||35===e?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){62===e?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):am(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(61===e||ag(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){61===e||ag(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):58===e?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):46===e&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){61===e||ag(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):91===e?this.state=15:46===e&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){93===e?this.state=14:(61===e||ag(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){61===e||ag(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):46===e&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){61===e?this.state=18:47===e||62===e?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):am(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){34===e?(this.state=19,this.sectionStart=this.index+1):39===e?(this.state=20,this.sectionStart=this.index+1):am(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,t){(e===t||this.fastForwardTo(t))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(34===t?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){am(e)||62===e?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):(39===e||60===e||61===e||96===e)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){91===e?(this.state=26,this.sequenceIndex=0):this.state=45===e?25:23}stateInDeclaration(e){(62===e||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(62===e||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){45===e?(this.state=28,this.currentSequence=av.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(62===e||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){e===av.ScriptEnd[3]?this.startSpecial(av.ScriptEnd,4):e===av.StyleEnd[3]?this.startSpecial(av.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===av.TitleEnd[3]?this.startSpecial(av.TitleEnd,4):e===av.TextareaEnd[3]?this.startSpecial(av.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){let e=this.buffer.charCodeAt(this.index);switch(10===e&&this.newlines.push(this.index),this.state){case 1:this.stateText(e);break;case 2:this.stateInterpolationOpen(e);break;case 3:this.stateInterpolation(e);break;case 4:this.stateInterpolationClose(e);break;case 31:this.stateSpecialStartSequence(e);break;case 32:this.stateInRCDATA(e);break;case 26:this.stateCDATASequence(e);break;case 19:this.stateInAttrValueDoubleQuotes(e);break;case 12:this.stateInAttrName(e);break;case 13:this.stateInDirName(e);break;case 14:this.stateInDirArg(e);break;case 15:this.stateInDynamicDirArg(e);break;case 16:this.stateInDirModifier(e);break;case 28:this.stateInCommentLike(e);break;case 27:this.stateInSpecialComment(e);break;case 11:this.stateBeforeAttrName(e);break;case 6:this.stateInTagName(e);break;case 34:this.stateInSFCRootTagName(e);break;case 9:this.stateInClosingTagName(e);break;case 5:this.stateBeforeTagName(e);break;case 17:this.stateAfterAttrName(e);break;case 20:this.stateInAttrValueSingleQuotes(e);break;case 18:this.stateBeforeAttrValue(e);break;case 8:this.stateBeforeClosingTagName(e);break;case 10:this.stateAfterClosingTagName(e);break;case 29:this.stateBeforeSpecialS(e);break;case 30:this.stateBeforeSpecialT(e);break;case 21:this.stateInAttrValueNoQuotes(e);break;case 7:this.stateInSelfClosingTag(e);break;case 23:this.stateInDeclaration(e);break;case 22:this.stateBeforeDeclaration(e);break;case 25:this.stateBeforeComment(e);break;case 24:this.stateInProcessingInstruction(e);break;case 33:this.stateInEntity()}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(1===this.state||32===this.state&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(19===this.state||20===this.state||21===this.state)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){let e=this.buffer.length;this.sectionStart>=e||(28===this.state?this.currentSequence===av.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(a3,{onerr:cu,ontext(e,t){a7(a5(e,t),e,t)},ontextentity(e,t,n){a7(e,t,n)},oninterpolation(e,t){if(a1)return a7(a5(e,t),e,t);let n=e+a6.delimiterOpen.length,r=t-a6.delimiterClose.length;for(;am(aJ.charCodeAt(n));)n++;for(;am(aJ.charCodeAt(r-1));)r--;let i=a5(n,r);i.includes("&")&&(i=aK.decodeEntities(i,!1)),cs({type:5,content:cc(i,!1,co(n,r)),loc:co(e,t)})},onopentagname(e,t){let n=a5(e,t);aG={type:1,tag:n,ns:aK.getNamespace(n,a3[0],aK.ns),tagType:0,props:[],children:[],loc:co(e-1,t),codegenNode:void 0}},onopentagend(e){a9(e)},onclosetag(e,t){let n=a5(e,t);if(!aK.isVoidTag(n)){let r=!1;for(let e=0;e<a3.length;e++)if(a3[e].tag.toLowerCase()===n.toLowerCase()){r=!0,e>0&&a3[0].loc.start.offset;for(let n=0;n<=e;n++)ce(a3.shift(),t,n<e);break}r||ct(e,60)}},onselfclosingtag(e){let t=aG.tag;aG.isSelfClosing=!0,a9(e),a3[0]&&a3[0].tag===t&&ce(a3.shift(),e)},onattribname(e,t){aQ={type:6,name:a5(e,t),nameLoc:co(e,t),value:void 0,loc:co(e)}},ondirname(e,t){let n=a5(e,t),r="."===n||":"===n?"bind":"@"===n?"on":"#"===n?"slot":n.slice(2);if(a1||""===r)aQ={type:6,name:n,nameLoc:co(e,t),value:void 0,loc:co(e)};else if(aQ={type:7,name:r,rawName:n,exp:void 0,arg:void 0,modifiers:"."===n?[as("prop")]:[],loc:co(e)},"pre"===r){a1=a6.inVPre=!0,a2=aG;let e=aG.props;for(let t=0;t<e.length;t++)7===e[t].type&&(e[t]=function(e){let t={type:6,name:e.rawName,nameLoc:co(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){let n=e.exp.loc;n.end.offset<e.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),t.value={type:2,content:e.exp.content,loc:n}}return t}(e[t]))}},ondirarg(e,t){if(e===t)return;let n=a5(e,t);if(a1)aQ.name+=n,ca(aQ.nameLoc,t);else{let r="["!==n[0];aQ.arg=cc(r?n:n.slice(1,-1),r,co(e,t),r?3:0)}},ondirmodifier(e,t){let n=a5(e,t);if(a1)aQ.name+="."+n,ca(aQ.nameLoc,t);else if("slot"===aQ.name){let e=aQ.arg;e&&(e.content+="."+n,ca(e.loc,t))}else{let r=as(n,!0,co(e,t));aQ.modifiers.push(r)}},onattribdata(e,t){aX+=a5(e,t),aZ<0&&(aZ=e),aY=t},onattribentity(e,t,n){aX+=e,aZ<0&&(aZ=t),aY=n},onattribnameend(e){let t=a5(aQ.loc.start.offset,e);7===aQ.type&&(aQ.rawName=t),aG.props.some(e=>(7===e.type?e.rawName:e.name)===t)},onattribend(e,t){aG&&aQ&&(ca(aQ.loc,t),0!==e&&(aX.includes("&")&&(aX=aK.decodeEntities(aX,!0)),6===aQ.type?("class"===aQ.name&&(aX=cl(aX).trim()),aQ.value={type:2,content:aX,loc:1===e?co(aZ,aY):co(aZ-1,aY+1)},a6.inSFCRoot&&"template"===aG.tag&&"lang"===aQ.name&&aX&&"html"!==aX&&a6.enterRCDATA(ay("</template"),0)):(aQ.exp=cc(aX,!1,co(aZ,aY),0,0),"for"===aQ.name&&(aQ.forParseResult=function(e){let t=e.loc,n=e.content,r=n.match(aq);if(!r)return;let[,i,l]=r,s=(e,n,r=!1)=>{let i=t.start.offset+n,l=i+e.length;return cc(e,!1,co(i,l),0,r?1:0)},o={source:s(l.trim(),n.indexOf(l,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1},a=i.trim().replace(a8,"").trim(),c=i.indexOf(a),u=a.match(a4);if(u){let e;a=a.replace(a4,"").trim();let t=u[1].trim();if(t&&(e=n.indexOf(t,c+a.length),o.key=s(t,e,!0)),u[2]){let r=u[2].trim();r&&(o.index=s(r,n.indexOf(r,o.key?e+t.length:c+a.length),!0))}}return a&&(o.value=s(a,c,!0)),o}(aQ.exp)))),(7!==aQ.type||"pre"!==aQ.name)&&aG.props.push(aQ)),aX="",aZ=aY=-1},oncomment(e,t){aK.comments&&cs({type:3,content:a5(e,t),loc:co(e-4,t+3)})},onend(){let e=aJ.length;for(let t=0;t<a3.length;t++)ce(a3[t],e-1),a3[t].loc.start.offset},oncdata(e,t){0!==a3[0].ns&&a7(a5(e,t),e,t)},onprocessinginstruction(e){(a3[0]?a3[0].ns:aK.ns)===0&&cu(21,e-1)}}),a4=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,a8=/^\(|\)$/g;function a5(e,t){return aJ.slice(e,t)}function a9(e){a6.inSFCRoot&&(aG.innerLoc=co(e+1,e+1)),cs(aG);let{tag:t,ns:n}=aG;0===n&&aK.isPreTag(t)&&a0++,aK.isVoidTag(t)?ce(aG,e):(a3.unshift(aG),(1===n||2===n)&&(a6.inXML=!0)),aG=null}function a7(e,t,n){{let t=a3[0]&&a3[0].tag;"script"!==t&&"style"!==t&&e.includes("&")&&(e=aK.decodeEntities(e,!1))}let r=a3[0]||az,i=r.children[r.children.length-1];i&&2===i.type?(i.content+=e,ca(i.loc,n)):r.children.push({type:2,content:e,loc:co(t,n)})}function ce(e,t,n=!1){n?ca(e.loc,ct(t,60)):ca(e.loc,function(e,t){let n=e;for(;62!==aJ.charCodeAt(n)&&n<aJ.length-1;)n++;return n}(t,0)+1),a6.inSFCRoot&&(e.children.length?e.innerLoc.end=S({},e.children[e.children.length-1].loc.end):e.innerLoc.end=S({},e.innerLoc.start),e.innerLoc.source=a5(e.innerLoc.start.offset,e.innerLoc.end.offset));let{tag:r,ns:i,children:l}=e;if(!a1&&("slot"===r?e.tagType=2:function({tag:e,props:t}){if("template"===e){for(let e=0;e<t.length;e++)if(7===t[e].type&&cn.has(t[e].name))return!0}return!1}(e)?e.tagType=3:function({tag:e,props:t}){var n;if(aK.isCustomElement(e))return!1;if("component"===e||(n=e.charCodeAt(0))>64&&n<91||aC(e)||aK.isBuiltInComponent&&aK.isBuiltInComponent(e)||aK.isNativeTag&&!aK.isNativeTag(e))return!0;for(let e=0;e<t.length;e++){let n=t[e];if(6===n.type&&"is"===n.name&&n.value&&n.value.content.startsWith("vue:"))return!0}return!1}(e)&&(e.tagType=1)),a6.inRCDATA||(e.children=ci(l)),0===i&&aK.isIgnoreNewlineTag(r)){let e=l[0];e&&2===e.type&&(e.content=e.content.replace(/^\r?\n/,""))}0===i&&aK.isPreTag(r)&&a0--,a2===e&&(a1=a6.inVPre=!1,a2=null),a6.inXML&&(a3[0]?a3[0].ns:aK.ns)===0&&(a6.inXML=!1)}function ct(e,t){let n=e;for(;aJ.charCodeAt(n)!==t&&n>=0;)n--;return n}let cn=new Set(["if","else","else-if","for","slot"]),cr=/\r\n/g;function ci(e,t){let n="preserve"!==aK.whitespace,r=!1;for(let t=0;t<e.length;t++){let i=e[t];if(2===i.type){if(a0)i.content=i.content.replace(cr,"\n");else if(function(e){for(let t=0;t<e.length;t++)if(!am(e.charCodeAt(t)))return!1;return!0}(i.content)){let l=e[t-1]&&e[t-1].type,s=e[t+1]&&e[t+1].type;!l||!s||n&&(3===l&&(3===s||1===s)||1===l&&(3===s||1===s&&function(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(10===n||13===n)return!0}return!1}(i.content)))?(r=!0,e[t]=null):i.content=" "}else n&&(i.content=cl(i.content))}}return r?e.filter(Boolean):e}function cl(e){let t="",n=!1;for(let r=0;r<e.length;r++)am(e.charCodeAt(r))?n||(t+=" ",n=!0):(t+=e[r],n=!1);return t}function cs(e){(a3[0]||az).children.push(e)}function co(e,t){return{start:a6.getPos(e),end:null==t?t:a6.getPos(t),source:null==t?t:a5(e,t)}}function ca(e,t){e.end=a6.getPos(t),e.source=a5(e.start.offset,t)}function cc(e,t=!1,n,r=0,i=0){return as(e,t,n,r)}function cu(e,t,n){aK.onError(aS(e,co(t,t)))}function cd(e,t){let{children:n}=e;return 1===n.length&&1===t.type&&!aV(t)}function cp(e,t){let{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;let r=n.get(e);if(void 0!==r)return r;let i=e.codegenNode;if(13!==i.type||i.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag&&"math"!==e.tag)return 0;if(void 0!==i.patchFlag)return n.set(e,0),0;{let r=3,c=ch(e,t);if(0===c)return n.set(e,0),0;c<r&&(r=c);for(let i=0;i<e.children.length;i++){let l=cp(e.children[i],t);if(0===l)return n.set(e,0),0;l<r&&(r=l)}if(r>1)for(let i=0;i<e.props.length;i++){let l=e.props[i];if(7===l.type&&"bind"===l.name&&l.exp){let i=cp(l.exp,t);if(0===i)return n.set(e,0),0;i<r&&(r=i)}}if(i.isBlock){var l,s,o,a;for(let t=0;t<e.props.length;t++)if(7===e.props[t].type)return n.set(e,0),0;t.removeHelper(oR),t.removeHelper((l=t.inSSR,s=i.isComponent,l||s?oI:oO)),i.isBlock=!1,t.helper((o=t.inSSR,a=i.isComponent,o||a?oP:oM))}return n.set(e,r),r}case 2:case 3:return 3;case 9:case 11:case 10:default:return 0;case 5:case 12:return cp(e.content,t);case 4:return e.constType;case 8:let c=3;for(let n=0;n<e.children.length;n++){let r=e.children[n];if(I(r)||O(r))continue;let i=cp(r,t);if(0===i)return 0;i<c&&(c=i)}return c;case 20:return 2}}let cf=new Set([oJ,oG,oQ,oX]);function ch(e,t){let n=3,r=cm(e);if(r&&15===r.type){let{properties:e}=r;for(let r=0;r<e.length;r++){let i;let{key:l,value:s}=e[r],o=cp(l,t);if(0===o)return o;if(o<n&&(n=o),0===(i=4===s.type?cp(s,t):14===s.type?function e(t,n){if(14===t.type&&!I(t.callee)&&cf.has(t.callee)){let r=t.arguments[0];if(4===r.type)return cp(r,n);if(14===r.type)return e(r,n)}return 0}(s,t):0))return i;i<n&&(n=i)}}return n}function cm(e){let t=e.codegenNode;if(13===t.type)return t.props}function cg(e,t){t.currentNode=e;let{nodeTransforms:n}=t,r=[];for(let i=0;i<n.length;i++){let l=n[i](e,t);if(l&&(k(l)?r.push(...l):r.push(l)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(oD);break;case 5:t.ssr||t.helper(oK);break;case 9:for(let n=0;n<e.branches.length;n++)cg(e.branches[n],t);break;case 10:case 11:case 1:case 0:!function(e,t){let n=0,r=()=>{n--};for(;n<e.children.length;n++){let i=e.children[n];I(i)||(t.grandParent=t.parent,t.parent=e,t.childIndex=n,t.onNodeRemoved=r,cg(i,t))}}(e,t)}t.currentNode=e;let i=r.length;for(;i--;)r[i]()}function cy(e,t){let n=I(e)?t=>t===e:t=>e.test(t);return(e,r)=>{if(1===e.type){let{props:i}=e;if(3===e.tagType&&i.some(a$))return;let l=[];for(let s=0;s<i.length;s++){let o=i[s];if(7===o.type&&n(o.name)){i.splice(s,1),s--;let n=t(e,o,r);n&&l.push(n)}}return l}}}let cv="/*@__PURE__*/",cb=e=>`${ae[e]}: _${ae[e]}`;function c_(e,t,{helper:n,push:r,newline:i,isTS:l}){let s=n("component"===t?oF:oB);for(let n=0;n<e.length;n++){let o=e[n],a=o.endsWith("__self");a&&(o=o.slice(0,-6)),r(`const ${aH(o,t)} = ${s}(${JSON.stringify(o)}${a?", true":""})${l?"!":""}`),n<e.length-1&&i()}}function cS(e,t){let n=e.length>3;t.push("["),n&&t.indent(),cx(e,t,n),n&&t.deindent(),t.push("]")}function cx(e,t,n=!1,r=!0){let{push:i,newline:l}=t;for(let s=0;s<e.length;s++){let o=e[s];I(o)?i(o,-3):k(o)?cS(o,t):cC(o,t),s<e.length-1&&(n?(r&&i(","),l()):r&&i(", "))}}function cC(e,t){if(I(e)){t.push(e,-3);return}if(O(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:case 12:cC(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),-3,e)}(e,t);break;case 4:cT(e,t);break;case 5:!function(e,t){let{push:n,helper:r,pure:i}=t;i&&n(cv),n(`${r(oK)}(`),cC(e.content,t),n(")")}(e,t);break;case 8:ck(e,t);break;case 3:!function(e,t){let{push:n,helper:r,pure:i}=t;i&&n(cv),n(`${r(oD)}(${JSON.stringify(e.content)})`,-3,e)}(e,t);break;case 13:!function(e,t){let n;let{push:r,helper:i,pure:l}=t,{tag:s,props:o,children:a,patchFlag:c,dynamicProps:u,directives:d,isBlock:p,disableTracking:f,isComponent:h}=e;c&&(n=String(c)),d&&r(i(oj)+"("),p&&r(`(${i(oR)}(${f?"true":""}), `),l&&r(cv),r(i(p?t.inSSR||h?oI:oO:t.inSSR||h?oP:oM)+"(",-2,e),cx(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map(e=>e||"null")}([s,o,a,n,u]),t),r(")"),p&&r(")"),d&&(r(", "),cC(d,t),r(")"))}(e,t);break;case 14:!function(e,t){let{push:n,helper:r,pure:i}=t,l=I(e.callee)?e.callee:r(e.callee);i&&n(cv),n(l+"(",-2,e),cx(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){let{push:n,indent:r,deindent:i,newline:l}=t,{properties:s}=e;if(!s.length){n("{}",-2,e);return}let o=s.length>1;n(o?"{":"{ "),o&&r();for(let e=0;e<s.length;e++){let{key:r,value:i}=s[e];!function(e,t){let{push:n}=t;8===e.type?(n("["),ck(e,t),n("]")):e.isStatic?n(ak(e.content)?e.content:JSON.stringify(e.content),-2,e):n(`[${e.content}]`,-3,e)}(r,t),n(": "),cC(i,t),e<s.length-1&&(n(","),l())}o&&i(),n(o?"}":" }")}(e,t);break;case 17:cS(e.elements,t);break;case 18:!function(e,t){let{push:n,indent:r,deindent:i}=t,{params:l,returns:s,body:o,newline:a,isSlot:c}=e;c&&n(`_${ae[o4]}(`),n("(",-2,e),k(l)?cx(l,t):l&&cC(l,t),n(") => "),(a||o)&&(n("{"),r()),s?(a&&n("return "),k(s)?cS(s,t):cC(s,t)):o&&cC(o,t),(a||o)&&(i(),n("}")),c&&n(")")}(e,t);break;case 19:!function(e,t){let{test:n,consequent:r,alternate:i,newline:l}=e,{push:s,indent:o,deindent:a,newline:c}=t;if(4===n.type){let e=!ak(n.content);e&&s("("),cT(n,t),e&&s(")")}else s("("),cC(n,t),s(")");l&&o(),t.indentLevel++,l||s(" "),s("? "),cC(r,t),t.indentLevel--,l&&c(),l||s(" "),s(": ");let u=19===i.type;!u&&t.indentLevel++,cC(i,t),!u&&t.indentLevel--,l&&a(!0)}(e,t);break;case 20:!function(e,t){let{push:n,helper:r,indent:i,deindent:l,newline:s}=t,{needPauseTracking:o,needArraySpread:a}=e;a&&n("[...("),n(`_cache[${e.index}] || (`),o&&(i(),n(`${r(o2)}(-1`),e.inVOnce&&n(", true"),n("),"),s(),n("(")),n(`_cache[${e.index}] = `),cC(e.value,t),o&&(n(`).cacheIndex = ${e.index},`),s(),n(`${r(o2)}(1),`),s(),n(`_cache[${e.index}]`),l()),n(")"),a&&n(")]")}(e,t);break;case 21:cx(e.body,t,!0,!1)}}function cT(e,t){let{content:n,isStatic:r}=e;t.push(r?JSON.stringify(n):n,-3,e)}function ck(e,t){for(let n=0;n<e.children.length;n++){let r=e.children[n];I(r)?t.push(r,-3):cC(r,t)}}let cw=cy(/^(if|else|else-if)$/,(e,t,n)=>(function(e,t,n,r){if("else"!==t.name&&(!t.exp||!t.exp.content.trim())){let r=t.exp?t.exp.loc:e.loc;n.onError(aS(28,t.loc)),t.exp=as("true",!1,r)}if("if"===t.name){var i;let l=cN(e,t),s={type:9,loc:co((i=e.loc).start.offset,i.end.offset),branches:[l]};if(n.replaceNode(s),r)return r(s,l,!0)}else{let i=n.parent.children,l=i.indexOf(e);for(;l-- >=-1;){let s=i[l];if(s&&3===s.type||s&&2===s.type&&!s.content.trim().length){n.removeNode(s);continue}if(s&&9===s.type){"else-if"===t.name&&void 0===s.branches[s.branches.length-1].condition&&n.onError(aS(30,e.loc)),n.removeNode();let i=cN(e,t);s.branches.push(i);let l=r&&r(s,i,!1);cg(i,n),l&&l(),n.currentNode=null}else n.onError(aS(30,e.loc));break}}})(e,t,n,(e,t,r)=>{let i=n.parent.children,l=i.indexOf(e),s=0;for(;l-- >=0;){let e=i[l];e&&9===e.type&&(s+=e.branches.length)}return()=>{r?e.codegenNode=cE(t,s,n):function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode).alternate=cE(t,s+e.branches.length-1,n)}}));function cN(e,t){let n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!aP(e,"for")?e.children:[e],userKey:aM(e,"key"),isTemplateIf:n}}function cE(e,t,n){return e.condition?au(e.condition,cA(e,t,n),aa(n.helper(oD),['""',"true"])):cA(e,t,n)}function cA(e,t,n){let{helper:r}=n,i=al("key",as(`${t}`,!1,at,2)),{children:l}=e,s=l[0];if(1!==l.length||1!==s.type){if(1!==l.length||11!==s.type)return an(n,r(ok),ai([i]),l,64,void 0,void 0,!0,!1,!1,e.loc);{let e=s.codegenNode;return aU(e,i,n),e}}{let e=s.codegenNode,t=14===e.type&&e.callee===o9?e.arguments[1].returns:e;return 13===t.type&&ad(t,n),aU(t,i,n),e}}let cR=(e,t,n)=>{let{modifiers:r,loc:i}=e,l=e.arg,{exp:s}=e;if(s&&4===s.type&&!s.content.trim()&&(s=void 0),!s){if(4!==l.type||!l.isStatic)return n.onError(aS(52,l.loc)),{props:[al(l,as("",!0,i))]};cI(e),s=e.exp}return 4!==l.type?(l.children.unshift("("),l.children.push(') || ""')):l.isStatic||(l.content=`${l.content} || ""`),r.some(e=>"camel"===e.content)&&(4===l.type?l.isStatic?l.content=q(l.content):l.content=`${n.helperString(oY)}(${l.content})`:(l.children.unshift(`${n.helperString(oY)}(`),l.children.push(")"))),!n.inSSR&&(r.some(e=>"prop"===e.content)&&cO(l,"."),r.some(e=>"attr"===e.content)&&cO(l,"^")),{props:[al(l,s)]}},cI=(e,t)=>{let n=e.arg,r=q(n.content);e.exp=as(r,!1,n.loc)},cO=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},cP=cy("for",(e,t,n)=>{let{helper:r,removeHelper:i}=n;return function(e,t,n,r){if(!t.exp){n.onError(aS(31,t.loc));return}let i=t.forParseResult;if(!i){n.onError(aS(32,t.loc));return}cM(i);let{addIdentifiers:l,removeIdentifiers:s,scopes:o}=n,{source:a,value:c,key:u,index:d}=i,p={type:11,loc:t.loc,source:a,valueAlias:c,keyAlias:u,objectIndexAlias:d,parseResult:i,children:aF(e)?e.children:[e]};n.replaceNode(p),o.vFor++;let f=r&&r(p);return()=>{o.vFor--,f&&f()}}(e,t,n,t=>{let l=aa(r(oH),[t.source]),s=aF(e),o=aP(e,"memo"),a=aM(e,"key",!1,!0);a&&7===a.type&&!a.exp&&cI(a);let c=a&&(6===a.type?a.value?as(a.value.content,!0):void 0:a.exp),u=a&&c?al("key",c):null,d=4===t.source.type&&t.source.constType>0,p=d?64:a?128:256;return t.codegenNode=an(n,r(ok),void 0,l,p,void 0,void 0,!0,!d,!1,e.loc),()=>{let a;let{children:p}=t,f=1!==p.length||1!==p[0].type,h=aV(e)?e:s&&1===e.children.length&&aV(e.children[0])?e.children[0]:null;if(h)a=h.codegenNode,s&&u&&aU(a,u,n);else if(f)a=an(n,r(ok),u?ai([u]):void 0,e.children,64,void 0,void 0,!0,void 0,!1);else{var m,g,y,b,_,S,x,C;a=p[0].codegenNode,s&&u&&aU(a,u,n),!d!==a.isBlock&&(a.isBlock?(i(oR),i((m=n.inSSR,g=a.isComponent,m||g?oI:oO))):i((y=n.inSSR,b=a.isComponent,y||b?oP:oM))),(a.isBlock=!d,a.isBlock)?(r(oR),r((_=n.inSSR,S=a.isComponent,_||S?oI:oO))):r((x=n.inSSR,C=a.isComponent,x||C?oP:oM))}if(o){let e=ac(cD(t.parseResult,[as("_cached")]));e.body={type:21,body:[ao(["const _memo = (",o.exp,")"]),ao(["if (_cached",...c?[" && _cached.key === ",c]:[],` && ${n.helperString(o7)}(_cached, _memo)) return _cached`]),ao(["const _item = ",a]),as("_item.memo = _memo"),as("return _item")],loc:at},l.arguments.push(e,as("_cache"),as(String(n.cached.length))),n.cached.push(null)}else l.arguments.push(ac(cD(t.parseResult),a,!0))}})});function cM(e,t){e.finalized||(e.finalized=!0)}function cD({value:e,key:t,index:n},r=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((e,t)=>e||as("_".repeat(t+1),!1))}([e,t,n,...r])}let cL=as("undefined",!1),c$=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){let n=aP(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},cF=(e,t,n,r)=>ac(e,n,!1,!0,n.length?n[0].loc:r);function cV(e,t,n){let r=[al("name",e),al("fn",t)];return null!=n&&r.push(al("key",as(String(n),!0))),ai(r)}let cB=new WeakMap,cU=(e,t)=>function(){let n,r,i,l,s;if(!(1===(e=t.currentNode).type&&(0===e.tagType||1===e.tagType)))return;let{tag:o,props:a}=e,c=1===e.tagType,u=c?function(e,t,n=!1){let{tag:r}=e,i=cq(r),l=aM(e,"is",!1,!0);if(l){if(i){let e;if(6===l.type?e=l.value&&as(l.value.content,!0):(e=l.exp)||(e=as("is",!1,l.arg.loc)),e)return aa(t.helper(oV),[e])}else 6===l.type&&l.value.content.startsWith("vue:")&&(r=l.value.content.slice(4))}let s=aC(r)||t.isBuiltInComponent(r);return s?(n||t.helper(s),s):(t.helper(oF),t.components.add(r),aH(r,"component"))}(e,t):`"${o}"`,d=P(u)&&u.callee===oV,p=0,f=d||u===ow||u===oN||!c&&("svg"===o||"foreignObject"===o||"math"===o);if(a.length>0){let r=cj(e,t,void 0,c,d);n=r.props,p=r.patchFlag,l=r.dynamicPropNames;let i=r.directives;s=i&&i.length?ar(i.map(e=>(function(e,t){let n=[],r=cB.get(e);r?n.push(t.helperString(r)):(t.helper(oB),t.directives.add(e.name),n.push(aH(e.name,"directive")));let{loc:i}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));let t=as("true",!1,i);n.push(ai(e.modifiers.map(e=>al(e,t)),i))}return ar(n,e.loc)})(e,t))):void 0,r.shouldUseBlock&&(f=!0)}if(e.children.length>0){if(u===oE&&(f=!0,p|=1024),c&&u!==ow&&u!==oE){let{slots:n,hasDynamicSlots:i}=function(e,t,n=cF){t.helper(o4);let{children:r,loc:i}=e,l=[],s=[],o=t.scopes.vSlot>0||t.scopes.vFor>0,a=aP(e,"slot",!0);if(a){let{arg:e,exp:t}=a;e&&!ax(e)&&(o=!0),l.push(al(e||as("default",!0),n(t,void 0,r,i)))}let c=!1,u=!1,d=[],p=new Set,f=0;for(let e=0;e<r.length;e++){let i,h,m,g;let y=r[e];if(!aF(y)||!(i=aP(y,"slot",!0))){3!==y.type&&d.push(y);continue}if(a){t.onError(aS(37,i.loc));break}c=!0;let{children:b,loc:_}=y,{arg:S=as("default",!0),exp:x,loc:C}=i;ax(S)?h=S?S.content:"default":o=!0;let T=aP(y,"for"),k=n(x,T,b,_);if(m=aP(y,"if"))o=!0,s.push(au(m.exp,cV(S,k,f++),cL));else if(g=aP(y,/^else(-if)?$/,!0)){let n,i=e;for(;i--&&3===(n=r[i]).type;);if(n&&aF(n)&&aP(n,/^(else-)?if$/)){let e=s[s.length-1];for(;19===e.alternate.type;)e=e.alternate;e.alternate=g.exp?au(g.exp,cV(S,k,f++),cL):cV(S,k,f++)}else t.onError(aS(30,g.loc))}else if(T){o=!0;let e=T.forParseResult;e?(cM(e),s.push(aa(t.helper(oH),[e.source,ac(cD(e),cV(S,k),!0)]))):t.onError(aS(32,T.loc))}else{if(h){if(p.has(h)){t.onError(aS(38,C));continue}p.add(h),"default"===h&&(u=!0)}l.push(al(S,k))}}if(!a){let e=(e,t)=>al("default",n(e,void 0,t,i));c?d.length&&d.some(e=>(function e(t){return 2!==t.type&&12!==t.type||(2===t.type?!!t.content.trim():e(t.content))})(e))&&(u?t.onError(aS(39,d[0].loc)):l.push(e(void 0,d))):l.push(e(void 0,r))}let h=o?2:!function e(t){for(let n=0;n<t.length;n++){let r=t[n];switch(r.type){case 1:if(2===r.tagType||e(r.children))return!0;break;case 9:if(e(r.branches))return!0;break;case 10:case 11:if(e(r.children))return!0}}return!1}(e.children)?1:3,m=ai(l.concat(al("_",as(h+"",!1))),i);return s.length&&(m=aa(t.helper(oW),[m,ar(s)])),{slots:m,hasDynamicSlots:o}}(e,t);r=n,i&&(p|=1024)}else if(1===e.children.length&&u!==ow){let n=e.children[0],i=n.type,l=5===i||8===i;l&&0===cp(n,t)&&(p|=1),r=l||2===i?n:e.children}else r=e.children}l&&l.length&&(i=function(e){let t="[";for(let n=0,r=e.length;n<r;n++)t+=JSON.stringify(e[n]),n<r-1&&(t+=", ");return t+"]"}(l)),e.codegenNode=an(t,u,n,r,0===p?void 0:p,i,s,!!f,!1,c,e.loc)};function cj(e,t,n=e.props,r,i,l=!1){let s;let{tag:o,loc:a,children:c}=e,u=[],d=[],p=[],f=c.length>0,h=!1,m=0,g=!1,y=!1,_=!1,S=!1,x=!1,C=!1,T=[],k=e=>{u.length&&(d.push(ai(cH(u),a)),u=[]),e&&d.push(e)},w=()=>{t.scopes.vFor>0&&u.push(al(as("ref_for",!0),as("true")))},N=({key:e,value:n})=>{if(ax(e)){let l=e.content,s=b(l);s&&(!r||i)&&"onclick"!==l.toLowerCase()&&"onUpdate:modelValue"!==l&&!B(l)&&(S=!0),s&&B(l)&&(C=!0),s&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&cp(n,t)>0||("ref"===l?g=!0:"class"===l?y=!0:"style"===l?_=!0:"key"===l||T.includes(l)||T.push(l),r&&("class"===l||"style"===l)&&!T.includes(l)&&T.push(l))}else x=!0};for(let i=0;i<n.length;i++){let s=n[i];if(6===s.type){let{loc:e,name:t,nameLoc:n,value:r}=s;if("ref"===t&&(g=!0,w()),"is"===t&&(cq(o)||r&&r.content.startsWith("vue:")))continue;u.push(al(as(t,!0,n),as(r?r.content:"",!0,r?r.loc:e)))}else{let{name:n,arg:i,exp:c,loc:g,modifiers:y}=s,b="bind"===n,_="on"===n;if("slot"===n){r||t.onError(aS(40,g));continue}if("once"===n||"memo"===n||"is"===n||b&&aD(i,"is")&&cq(o)||_&&l)continue;if((b&&aD(i,"key")||_&&f&&aD(i,"vue:before-update"))&&(h=!0),b&&aD(i,"ref")&&w(),!i&&(b||_)){x=!0,c?b?(w(),k(),d.push(c)):k({type:14,loc:g,callee:t.helper(oZ),arguments:r?[c]:[c,"true"]}):t.onError(aS(b?34:35,g));continue}b&&y.some(e=>"prop"===e.content)&&(m|=32);let S=t.directiveTransforms[n];if(S){let{props:n,needRuntime:r}=S(s,e,t);l||n.forEach(N),_&&i&&!ax(i)?k(ai(n,a)):u.push(...n),r&&(p.push(s),O(r)&&cB.set(s,r))}else!U(n)&&(p.push(s),f&&(h=!0))}}if(d.length?(k(),s=d.length>1?aa(t.helper(oz),d,a):d[0]):u.length&&(s=ai(cH(u),a)),x?m|=16:(y&&!r&&(m|=2),_&&!r&&(m|=4),T.length&&(m|=8),S&&(m|=32)),!h&&(0===m||32===m)&&(g||C||p.length>0)&&(m|=512),!t.inSSR&&s)switch(s.type){case 15:let E=-1,A=-1,R=!1;for(let e=0;e<s.properties.length;e++){let t=s.properties[e].key;ax(t)?"class"===t.content?E=e:"style"===t.content&&(A=e):t.isHandlerKey||(R=!0)}let I=s.properties[E],P=s.properties[A];R?s=aa(t.helper(oQ),[s]):(I&&!ax(I.value)&&(I.value=aa(t.helper(oJ),[I.value])),P&&(_||4===P.value.type&&"["===P.value.content.trim()[0]||17===P.value.type)&&(P.value=aa(t.helper(oG),[P.value])));break;case 14:break;default:s=aa(t.helper(oQ),[aa(t.helper(oX),[s])])}return{props:s,directives:p,patchFlag:m,dynamicPropNames:T,shouldUseBlock:h}}function cH(e){let t=new Map,n=[];for(let r=0;r<e.length;r++){let i=e[r];if(8===i.key.type||!i.key.isStatic){n.push(i);continue}let l=i.key.content,s=t.get(l);s?("style"===l||"class"===l||b(l))&&(17===s.value.type?s.value.elements.push(i.value):s.value=ar([s.value,i.value],s.loc)):(t.set(l,i),n.push(i))}return n}function cq(e){return"component"===e||"Component"===e}let cW=(e,t)=>{if(aV(e)){let{children:n,loc:r}=e,{slotName:i,slotProps:l}=function(e,t){let n,r='"default"',i=[];for(let t=0;t<e.props.length;t++){let n=e.props[t];if(6===n.type)n.value&&("name"===n.name?r=JSON.stringify(n.value.content):(n.name=q(n.name),i.push(n)));else if("bind"===n.name&&aD(n.arg,"name")){if(n.exp)r=n.exp;else if(n.arg&&4===n.arg.type){let e=q(n.arg.content);r=n.exp=as(e,!1,n.arg.loc)}}else"bind"===n.name&&n.arg&&ax(n.arg)&&(n.arg.content=q(n.arg.content)),i.push(n)}if(i.length>0){let{props:r,directives:l}=cj(e,t,i,!1,!1);n=r,l.length&&t.onError(aS(36,l[0].loc))}return{slotName:r,slotProps:n}}(e,t),s=[t.prefixIdentifiers?"_ctx.$slots":"$slots",i,"{}","undefined","true"],o=2;l&&(s[2]=l,o=3),n.length&&(s[3]=ac([],n,!1,!1,r),o=4),t.scopeId&&!t.slotted&&(o=5),s.splice(o),e.codegenNode=aa(t.helper(oq),s,r)}},cK=(e,t,n,r)=>{let i;let{loc:l,modifiers:s,arg:o}=e;if(e.exp||s.length,4===o.type){if(o.isStatic){let e=o.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`),i=as(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?J(q(e)):`on:${e}`,!0,o.loc)}else i=ao([`${n.helperString(o1)}(`,o,")"])}else(i=o).children.unshift(`${n.helperString(o1)}(`),i.children.push(")");let a=e.exp;a&&!a.content.trim()&&(a=void 0);let c=n.cacheHandlers&&!a&&!n.inVOnce;if(a){let e=aR(a),t=!(e||aO(a)),n=a.content.includes(";");(t||c&&e)&&(a=ao([`${t?"$event":"(...args)"} => ${n?"{":"("}`,a,n?"}":")"]))}let u={props:[al(i,a||as("() => {}",!1,l))]};return r&&(u=r(u)),c&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach(e=>e.key.isHandlerKey=!0),u},cz=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{let n;let r=e.children,i=!1;for(let e=0;e<r.length;e++){let t=r[e];if(aL(t)){i=!0;for(let i=e+1;i<r.length;i++){let l=r[i];if(aL(l))n||(n=r[e]=ao([t],t.loc)),n.children.push(" + ",l),r.splice(i,1),i--;else{n=void 0;break}}}}if(i&&(1!==r.length||0!==e.type&&(1!==e.type||0!==e.tagType||e.props.find(e=>7===e.type&&!t.directiveTransforms[e.name]))))for(let e=0;e<r.length;e++){let n=r[e];if(aL(n)||8===n.type){let i=[];(2!==n.type||" "!==n.content)&&i.push(n),t.ssr||0!==cp(n,t)||i.push("1"),r[e]={type:12,content:n,loc:n.loc,codegenNode:aa(t.helper(oL),i)}}}}},cJ=new WeakSet,cG=(e,t)=>{if(1===e.type&&aP(e,"once",!0)&&!cJ.has(e)&&!t.inVOnce&&!t.inSSR)return cJ.add(e),t.inVOnce=!0,t.helper(o2),()=>{t.inVOnce=!1;let e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0,!0))}},cQ=(e,t,n)=>{let r;let{exp:i,arg:l}=e;if(!i)return n.onError(aS(41,e.loc)),cX();let s=i.loc.source.trim(),o=4===i.type?i.content:s,a=n.bindingMetadata[s];if("props"===a||"props-aliased"===a)return i.loc,cX();if(!o.trim()||!aR(i))return n.onError(aS(42,i.loc)),cX();let c=l||as("modelValue",!0),u=l?ax(l)?`onUpdate:${q(l.content)}`:ao(['"onUpdate:" + ',l]):"onUpdate:modelValue",d=n.isTS?"($event: any)":"$event";r=ao([`${d} => ((`,i,") = $event)"]);let p=[al(c,e.exp),al(u,r)];if(e.modifiers.length&&1===t.tagType){let t=e.modifiers.map(e=>e.content).map(e=>(ak(e)?e:JSON.stringify(e))+": true").join(", "),n=l?ax(l)?`${l.content}Modifiers`:ao([l,' + "Modifiers"']):"modelModifiers";p.push(al(n,as(`{ ${t} }`,!1,e.loc,2)))}return cX(p)};function cX(e=[]){return{props:e}}let cZ=new WeakSet,cY=(e,t)=>{if(1===e.type){let n=aP(e,"memo");if(!(!n||cZ.has(e)))return cZ.add(e),()=>{let r=e.codegenNode||t.currentNode.codegenNode;r&&13===r.type&&(1!==e.tagType&&ad(r,t),e.codegenNode=aa(t.helper(o9),[n.exp,ac(void 0,r),"_cache",String(t.cached.length)]),t.cached.push(null))}}},c0=Symbol(""),c1=Symbol(""),c2=Symbol(""),c3=Symbol(""),c6=Symbol(""),c4=Symbol(""),c8=Symbol(""),c5=Symbol(""),c9=Symbol(""),c7=Symbol("");!function(e){Object.getOwnPropertySymbols(e).forEach(t=>{ae[t]=e[t]})}({[c0]:"vModelRadio",[c1]:"vModelCheckbox",[c2]:"vModelText",[c3]:"vModelSelect",[c6]:"vModelDynamic",[c4]:"withModifiers",[c8]:"withKeys",[c5]:"vShow",[c9]:"Transition",[c7]:"TransitionGroup"});let ue={parseMode:"html",isVoidTag:ep,isNativeTag:e=>ec(e)||eu(e)||ed(e),isPreTag:e=>"pre"===e,isIgnoreNewlineTag:e=>"pre"===e||"textarea"===e,decodeEntities:function(e,t=!1){return(u||(u=document.createElement("div")),t)?(u.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,u.children[0].getAttribute("foo")):(u.innerHTML=e,u.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?c9:"TransitionGroup"===e||"transition-group"===e?c7:void 0,getNamespace(e,t,n){let r=t?t.ns:n;if(t&&2===r){if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some(e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content))&&(r=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(r=0)}else t&&1===r&&("foreignObject"===t.tag||"desc"===t.tag||"title"===t.tag)&&(r=0);if(0===r){if("svg"===e)return 1;if("math"===e)return 2}return r}},ut=(e,t)=>as(JSON.stringify(es(e)),!1,t,3),un=f("passive,once,capture"),ur=f("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),ui=f("left,right"),ul=f("onkeyup,onkeydown,onkeypress"),us=(e,t,n,r)=>{let i=[],l=[],s=[];for(let n=0;n<t.length;n++){let r=t[n].content;un(r)?s.push(r):ui(r)?ax(e)?ul(e.content.toLowerCase())?i.push(r):l.push(r):(i.push(r),l.push(r)):ur(r)?l.push(r):i.push(r)}return{keyModifiers:i,nonKeyModifiers:l,eventOptionModifiers:s}},uo=(e,t)=>ax(e)&&"onclick"===e.content.toLowerCase()?as(t,!0):4!==e.type?ao(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,ua=(e,t)=>{1===e.type&&0===e.tagType&&("script"===e.tag||"style"===e.tag)&&t.removeNode()},uc=[e=>{1===e.type&&e.props.forEach((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:as("style",!0,t.loc),exp:ut(t.value.content,t.loc),modifiers:[],loc:t.loc})})}],uu={cloak:()=>({props:[]}),html:(e,t,n)=>{let{exp:r,loc:i}=e;return r||n.onError(aS(53,i)),t.children.length&&(n.onError(aS(54,i)),t.children.length=0),{props:[al(as("innerHTML",!0,i),r||as("",!0))]}},text:(e,t,n)=>{let{exp:r,loc:i}=e;return r||n.onError(aS(55,i)),t.children.length&&(n.onError(aS(56,i)),t.children.length=0),{props:[al(as("textContent",!0),r?cp(r,n)>0?r:aa(n.helperString(oK),[r],i):as("",!0))]}},model:(e,t,n)=>{let r=cQ(e,t,n);if(!r.props.length||1===t.tagType)return r;e.arg&&n.onError(aS(58,e.arg.loc));let{tag:i}=t,l=n.isCustomElement(i);if("input"===i||"textarea"===i||"select"===i||l){let s=c2,o=!1;if("input"===i||l){let r=aM(t,"type");if(r){if(7===r.type)s=c6;else if(r.value)switch(r.value.content){case"radio":s=c0;break;case"checkbox":s=c1;break;case"file":o=!0,n.onError(aS(59,e.loc))}}else t.props.some(e=>7===e.type&&"bind"===e.name&&(!e.arg||4!==e.arg.type||!e.arg.isStatic))&&(s=c6)}else"select"===i&&(s=c3);o||(r.needRuntime=n.helper(s))}else n.onError(aS(57,e.loc));return r.props=r.props.filter(e=>!(4===e.key.type&&"modelValue"===e.key.content)),r},on:(e,t,n)=>cK(e,t,n,t=>{let{modifiers:r}=e;if(!r.length)return t;let{key:i,value:l}=t.props[0],{keyModifiers:s,nonKeyModifiers:o,eventOptionModifiers:a}=us(i,r,n,e.loc);if(o.includes("right")&&(i=uo(i,"onContextmenu")),o.includes("middle")&&(i=uo(i,"onMouseup")),o.length&&(l=aa(n.helper(c4),[l,JSON.stringify(o)])),s.length&&(!ax(i)||ul(i.content.toLowerCase()))&&(l=aa(n.helper(c8),[l,JSON.stringify(s)])),a.length){let e=a.map(z).join("");i=ax(i)?as(`${i.content}${e}`,!0):ao(["(",i,`) + "${e}"`])}return{props:[al(i,l)]}}),show:(e,t,n)=>{let{exp:r,loc:i}=e;return!r&&n.onError(aS(61,i)),{props:[],needRuntime:n.helper(c5)}}},ud=Object.create(null);function up(e,t){if(!I(e)){if(!e.nodeType)return g;e=e.innerHTML}let n=e+JSON.stringify(t,(e,t)=>"function"==typeof t?t.toString():t),r=ud[n];if(r)return r;if("#"===e[0]){let t=document.querySelector(e);e=t?t.innerHTML:""}let i=S({hoistStatic:!0,onError:void 0,onWarn:g},t);i.isCustomElement||"undefined"==typeof customElements||(i.isCustomElement=e=>!!customElements.get(e));let{code:l}=function(e,t={}){return function(e,t={}){let n=t.onError||ab,r="module"===t.mode;!0===t.prefixIdentifiers?n(aS(47)):r&&n(aS(48)),t.cacheHandlers&&n(aS(49)),t.scopeId&&!r&&n(aS(50));let i=S({},t,{prefixIdentifiers:!1}),l=I(e)?function(e,t){if(a6.reset(),aG=null,aQ=null,aX="",aZ=-1,aY=-1,a3.length=0,aJ=e,aK=S({},aW),t){let e;for(e in t)null!=t[e]&&(aK[e]=t[e])}a6.mode="html"===aK.parseMode?1:"sfc"===aK.parseMode?2:0,a6.inXML=1===aK.ns||2===aK.ns;let n=t&&t.delimiters;n&&(a6.delimiterOpen=ay(n[0]),a6.delimiterClose=ay(n[1]));let r=az=function(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:at}}([],e);return a6.parse(aJ),r.loc=co(0,e.length),r.children=ci(r.children),az=null,r}(e,i):e,[s,o]=[[cG,cw,cY,cP,cW,cU,c$,cz],{on:cK,bind:cR,model:cQ}];return!function(e,t){let n=function(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:r=!1,hmr:i=!1,cacheHandlers:l=!1,nodeTransforms:s=[],directiveTransforms:o={},transformHoist:a=null,isBuiltInComponent:c=g,isCustomElement:u=g,expressionPlugins:d=[],scopeId:p=null,slotted:f=!0,ssr:m=!1,inSSR:y=!1,ssrCssVars:b="",bindingMetadata:_=h,inline:S=!1,isTS:x=!1,onError:C=ab,onWarn:T=a_,compatConfig:k}){let w=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),N={filename:t,selfName:w&&z(q(w[1])),prefixIdentifiers:n,hoistStatic:r,hmr:i,cacheHandlers:l,nodeTransforms:s,directiveTransforms:o,transformHoist:a,isBuiltInComponent:c,isCustomElement:u,expressionPlugins:d,scopeId:p,slotted:f,ssr:m,inSSR:y,ssrCssVars:b,bindingMetadata:_,inline:S,isTS:x,onError:C,onWarn:T,compatConfig:k,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){let t=N.helpers.get(e)||0;return N.helpers.set(e,t+1),e},removeHelper(e){let t=N.helpers.get(e);if(t){let n=t-1;n?N.helpers.set(e,n):N.helpers.delete(e)}},helperString:e=>`_${ae[N.helper(e)]}`,replaceNode(e){N.parent.children[N.childIndex]=N.currentNode=e},removeNode(e){let t=N.parent.children,n=e?t.indexOf(e):N.currentNode?N.childIndex:-1;e&&e!==N.currentNode?N.childIndex>n&&(N.childIndex--,N.onNodeRemoved()):(N.currentNode=null,N.onNodeRemoved()),N.parent.children.splice(n,1)},onNodeRemoved:g,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){I(e)&&(e=as(e)),N.hoists.push(e);let t=as(`_hoisted_${N.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1,n=!1){let r=function(e,t,n=!1,r=!1){return{type:20,index:e,value:t,needPauseTracking:n,inVOnce:r,needArraySpread:!1,loc:at}}(N.cached.length,e,t,n);return N.cached.push(r),r}};return N}(e,t);cg(e,n),t.hoistStatic&&function e(t,n,r,i=!1,l=!1){let{children:s}=t,o=[];for(let n=0;n<s.length;n++){let a=s[n];if(1===a.type&&0===a.tagType){let e=i?0:cp(a,r);if(e>0){if(e>=2){a.codegenNode.patchFlag=-1,o.push(a);continue}}else{let e=a.codegenNode;if(13===e.type){let t=e.patchFlag;if((void 0===t||512===t||1===t)&&ch(a,r)>=2){let t=cm(a);t&&(e.props=r.hoist(t))}e.dynamicProps&&(e.dynamicProps=r.hoist(e.dynamicProps))}}}else if(12===a.type&&(i?0:cp(a,r))>=2){o.push(a);continue}if(1===a.type){let n=1===a.tagType;n&&r.scopes.vSlot++,e(a,t,r,!1,l),n&&r.scopes.vSlot--}else if(11===a.type)e(a,t,r,1===a.children.length,!0);else if(9===a.type)for(let n=0;n<a.branches.length;n++)e(a.branches[n],t,r,1===a.branches[n].children.length,l)}let a=!1;if(o.length===s.length&&1===t.type){if(0===t.tagType&&t.codegenNode&&13===t.codegenNode.type&&k(t.codegenNode.children))t.codegenNode.children=c(ar(t.codegenNode.children)),a=!0;else if(1===t.tagType&&t.codegenNode&&13===t.codegenNode.type&&t.codegenNode.children&&!k(t.codegenNode.children)&&15===t.codegenNode.children.type){let e=u(t.codegenNode,"default");e&&(e.returns=c(ar(e.returns)),a=!0)}else if(3===t.tagType&&n&&1===n.type&&1===n.tagType&&n.codegenNode&&13===n.codegenNode.type&&n.codegenNode.children&&!k(n.codegenNode.children)&&15===n.codegenNode.children.type){let e=aP(t,"slot",!0),r=e&&e.arg&&u(n.codegenNode,e.arg);r&&(r.returns=c(ar(r.returns)),a=!0)}}if(!a)for(let e of o)e.codegenNode=r.cache(e.codegenNode);function c(e){let t=r.cache(e);return l&&r.hmr&&(t.needArraySpread=!0),t}function u(e,t){if(e.children&&!k(e.children)&&15===e.children.type){let n=e.children.properties.find(e=>e.key===t||e.key.content===t);return n&&n.value}}o.length&&r.transformHoist&&r.transformHoist(s,r,t)}(e,void 0,n,cd(e,e.children[0])),t.ssr||function(e,t){let{helper:n}=t,{children:r}=e;if(1===r.length){let n=r[0];if(cd(e,n)&&n.codegenNode){let r=n.codegenNode;13===r.type&&ad(r,t),e.codegenNode=r}else e.codegenNode=n}else r.length>1&&(e.codegenNode=an(t,n(ok),void 0,e.children,64,void 0,void 0,!0,void 0,!1))}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0}(l,S({},i,{nodeTransforms:[...s,...t.nodeTransforms||[]],directiveTransforms:S({},o,t.directiveTransforms||{})})),function(e,t={}){let n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:r=!1,filename:i="template.vue.html",scopeId:l=null,optimizeImports:s=!1,runtimeGlobalName:o="Vue",runtimeModuleName:a="vue",ssrRuntimeModuleName:c="vue/server-renderer",ssr:u=!1,isTS:d=!1,inSSR:p=!1}){let f={mode:t,prefixIdentifiers:n,sourceMap:r,filename:i,scopeId:l,optimizeImports:s,runtimeGlobalName:o,runtimeModuleName:a,ssrRuntimeModuleName:c,ssr:u,isTS:d,inSSR:p,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${ae[e]}`,push(e,t=-2,n){f.code+=e},indent(){h(++f.indentLevel)},deindent(e=!1){e?--f.indentLevel:h(--f.indentLevel)},newline(){h(f.indentLevel)}};function h(e){f.push("\n"+" ".repeat(e),0)}return f}(e,t);t.onContextCreated&&t.onContextCreated(n);let{mode:r,push:i,prefixIdentifiers:l,indent:s,deindent:o,newline:a,scopeId:c,ssr:u}=n,d=Array.from(e.helpers),p=d.length>0,f=!l&&"module"!==r;(function(e,t){let{ssr:n,prefixIdentifiers:r,push:i,newline:l,runtimeModuleName:s,runtimeGlobalName:o,ssrRuntimeModuleName:a}=t,c=Array.from(e.helpers);if(c.length>0&&(i(`const _Vue = ${o} +`,-1),e.hoists.length)){let e=[oP,oM,oD,oL,o$].filter(e=>c.includes(e)).map(cb).join(", ");i(`const { ${e} } = _Vue +`,-1)}(function(e,t){if(!e.length)return;t.pure=!0;let{push:n,newline:r}=t;r();for(let i=0;i<e.length;i++){let l=e[i];l&&(n(`const _hoisted_${i+1} = `),cC(l,t),r())}t.pure=!1})(e.hoists,t),l(),i("return ")})(e,n);let h=(u?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(i(`function ${u?"ssrRender":"render"}(${h}) {`),s(),f&&(i("with (_ctx) {"),s(),p&&(i(`const { ${d.map(cb).join(", ")} } = _Vue +`,-1),a())),e.components.length&&(c_(e.components,"component",n),(e.directives.length||e.temps>0)&&a()),e.directives.length&&(c_(e.directives,"directive",n),e.temps>0&&a()),e.temps>0){i("let ");for(let t=0;t<e.temps;t++)i(`${t>0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(i(` +`,0),a()),u||i("return "),e.codegenNode?cC(e.codegenNode,n):i("null"),f&&(o(),i("}")),o(),i("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}(l,i)}(e,S({},ue,t,{nodeTransforms:[ua,...uc,...t.nodeTransforms||[]],directiveTransforms:S({},uu,t.directiveTransforms||{}),transformHoist:null}))}(e,i),s=Function("Vue",l)(oT);return s._rc=!0,ud[n]=s}lF(up);export{nF as BaseTransition,nD as BaseTransitionPropsValidators,i7 as Comment,l6 as DeprecationTypes,e_ as EffectScope,t2 as ErrorCodes,lZ as ErrorTypeStrings,i5 as Fragment,rs as KeepAlive,ek as ReactiveEffect,le as Static,i1 as Suspense,nE as Teleport,i9 as Text,tJ as TrackOpTypes,si as Transition,sX as TransitionGroup,tG as TriggerOpTypes,sH as VueElement,t1 as assertNumber,t6 as callWithAsyncErrorHandling,t3 as callWithErrorHandling,q as camelize,z as capitalize,lv as cloneVNode,l3 as compatUtils,up as compile,lW as computed,og as createApp,lc as createBlock,lS as createCommentVNode,la as createElementBlock,lm as createElementVNode,iE as createHydrationRenderer,r1 as createPropsRestProxy,iN as createRenderer,oy as createSSRApp,rP as createSlots,l_ as createStaticVNode,lb as createTextVNode,lg as createVNode,tU as customRef,rr as defineAsyncComponent,nW as defineComponent,sB as defineCustomElement,rH as defineEmits,rq as defineExpose,rz as defineModel,rW as defineOptions,rj as defineProps,sU as defineSSRCustomElement,rK as defineSlots,lY as devtools,eM as effect,eS as effectScope,lI as getCurrentInstance,ex as getCurrentScope,tZ as getCurrentWatcher,nq as getTransitionRawChildren,ly as guardReactiveProps,lK as h,t4 as handleError,ic as hasInjectionContext,om as hydrate,n9 as hydrateOnIdle,rt as hydrateOnInteraction,re as hydrateOnMediaQuery,n7 as hydrateOnVisible,lz as initCustomFormatter,oS as initDirectivesForSSR,ia as inject,lG as isMemoSame,tk as isProxy,tx as isReactive,tC as isReadonly,tR as isRef,lV as isRuntimeOnly,tT as isShallow,lu as isVNode,tN as markRaw,rY as mergeDefaults,r0 as mergeModels,lk as mergeProps,nr as nextTick,eo as normalizeClass,ea as normalizeProps,en as normalizeStyle,ra as onActivated,rm as onBeforeMount,rb as onBeforeUnmount,ry as onBeforeUpdate,rc as onDeactivated,rT as onErrorCaptured,rg as onMounted,rC as onRenderTracked,rx as onRenderTriggered,eC as onScopeDispose,rS as onServerPrefetch,r_ as onUnmounted,rv as onUpdated,tY as onWatcherCleanup,lr as openBlock,nh as popScopeId,io as provide,tV as proxyRefs,nf as pushScopeId,ns as queuePostFlushCb,ty as reactive,tb as readonly,tI as ref,lF as registerRuntimeCompiler,oh as render,rO as renderList,rM as renderSlot,rw as resolveComponent,rA as resolveDirective,rE as resolveDynamicComponent,l2 as resolveFilter,nB as resolveTransitionHooks,ls as setBlockTracking,l0 as setDevtoolsHook,nH as setTransitionHooks,tv as shallowReactive,t_ as shallowReadonly,tO as shallowRef,iD as ssrContextKey,l1 as ssrUtils,eD as stop,ey as toDisplayString,J as toHandlerKey,rL as toHandlers,tw as toRaw,tW as toRef,tj as toRefs,t$ as toValue,lp as transformVNodeArgs,tD as triggerRef,tL as unref,rQ as useAttrs,sK as useCssModule,sx as useCssVars,sq as useHost,nK as useId,iq as useModel,iL as useSSRContext,sW as useShadowRoot,rG as useSlots,nJ as useTemplateRef,nP as useTransitionState,s8 as vModelCheckbox,or as vModelDynamic,s9 as vModelRadio,s7 as vModelSelect,s4 as vModelText,sb as vShow,lQ as version,lX as warn,iB as watch,i$ as watchEffect,iF as watchPostEffect,iV as watchSyncEffect,r2 as withAsyncContext,ng as withCtx,rJ as withDefaults,ny as withDirectives,ou as withKeys,lJ as withMemo,oa as withModifiers,nm as withScopeId}; diff --git a/vuetest/node_modules/vue/dist/vue.esm-bundler.js b/vuetest/node_modules/vue/dist/vue.esm-bundler.js new file mode 100644 index 0000000..a31373d --- /dev/null +++ b/vuetest/node_modules/vue/dist/vue.esm-bundler.js @@ -0,0 +1,71 @@ +/** +* vue v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +import * as runtimeDom from '@vue/runtime-dom'; +import { initCustomFormatter, registerRuntimeCompiler, warn } from '@vue/runtime-dom'; +export * from '@vue/runtime-dom'; +import { compile } from '@vue/compiler-dom'; +import { isString, NOOP, genCacheKey, extend, generateCodeFrame } from '@vue/shared'; + +function initDev() { + { + initCustomFormatter(); + } +} + +if (!!(process.env.NODE_ENV !== "production")) { + initDev(); +} +const compileCache = /* @__PURE__ */ Object.create(null); +function compileToFunction(template, options) { + if (!isString(template)) { + if (template.nodeType) { + template = template.innerHTML; + } else { + !!(process.env.NODE_ENV !== "production") && warn(`invalid template option: `, template); + return NOOP; + } + } + const key = genCacheKey(template, options); + const cached = compileCache[key]; + if (cached) { + return cached; + } + if (template[0] === "#") { + const el = document.querySelector(template); + if (!!(process.env.NODE_ENV !== "production") && !el) { + warn(`Template element not found or is empty: ${template}`); + } + template = el ? el.innerHTML : ``; + } + const opts = extend( + { + hoistStatic: true, + onError: !!(process.env.NODE_ENV !== "production") ? onError : void 0, + onWarn: !!(process.env.NODE_ENV !== "production") ? (e) => onError(e, true) : NOOP + }, + options + ); + if (!opts.isCustomElement && typeof customElements !== "undefined") { + opts.isCustomElement = (tag) => !!customElements.get(tag); + } + const { code } = compile(template, opts); + function onError(err, asWarning = false) { + const message = asWarning ? err.message : `Template compilation error: ${err.message}`; + const codeFrame = err.loc && generateCodeFrame( + template, + err.loc.start.offset, + err.loc.end.offset + ); + warn(codeFrame ? `${message} +${codeFrame}` : message); + } + const render = new Function("Vue", code)(runtimeDom); + render._rc = true; + return compileCache[key] = render; +} +registerRuntimeCompiler(compileToFunction); + +export { compileToFunction as compile }; diff --git a/vuetest/node_modules/vue/dist/vue.global.js b/vuetest/node_modules/vue/dist/vue.global.js new file mode 100644 index 0000000..ba3fbfb --- /dev/null +++ b/vuetest/node_modules/vue/dist/vue.global.js @@ -0,0 +1,18096 @@ +/** +* vue v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +var Vue = (function (exports) { + 'use strict'; + + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function makeMap(str) { + const map = /* @__PURE__ */ Object.create(null); + for (const key of str.split(",")) map[key] = 1; + return (val) => val in map; + } + + const EMPTY_OBJ = Object.freeze({}) ; + const EMPTY_ARR = Object.freeze([]) ; + const NOOP = () => { + }; + const NO = () => false; + const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter + (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); + const isModelListener = (key) => key.startsWith("onUpdate:"); + const extend = Object.assign; + const remove = (arr, el) => { + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } + }; + const hasOwnProperty$1 = Object.prototype.hasOwnProperty; + const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); + const isArray = Array.isArray; + const isMap = (val) => toTypeString(val) === "[object Map]"; + const isSet = (val) => toTypeString(val) === "[object Set]"; + const isDate = (val) => toTypeString(val) === "[object Date]"; + const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; + const isFunction = (val) => typeof val === "function"; + const isString = (val) => typeof val === "string"; + const isSymbol = (val) => typeof val === "symbol"; + const isObject = (val) => val !== null && typeof val === "object"; + const isPromise = (val) => { + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); + }; + const objectToString = Object.prototype.toString; + const toTypeString = (value) => objectToString.call(value); + const toRawType = (value) => { + return toTypeString(value).slice(8, -1); + }; + const isPlainObject = (val) => toTypeString(val) === "[object Object]"; + const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; + const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" + ); + const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" + ); + const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; + }; + const camelizeRE = /-(\w)/g; + const camelize = cacheStringFunction( + (str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); + } + ); + const hyphenateRE = /\B([A-Z])/g; + const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() + ); + const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); + }); + const toHandlerKey = cacheStringFunction( + (str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + } + ); + const hasChanged = (value, oldValue) => !Object.is(value, oldValue); + const invokeArrayFns = (fns, ...arg) => { + for (let i = 0; i < fns.length; i++) { + fns[i](...arg); + } + }; + const def = (obj, key, value, writable = false) => { + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + writable, + value + }); + }; + const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; + }; + const toNumber = (val) => { + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; + }; + let _globalThis; + const getGlobalThis = () => { + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); + }; + function genCacheKey(source, options) { + return source + JSON.stringify( + options, + (_, val) => typeof val === "function" ? val.toString() : val + ); + } + + const PatchFlagNames = { + [1]: `TEXT`, + [2]: `CLASS`, + [4]: `STYLE`, + [8]: `PROPS`, + [16]: `FULL_PROPS`, + [32]: `NEED_HYDRATION`, + [64]: `STABLE_FRAGMENT`, + [128]: `KEYED_FRAGMENT`, + [256]: `UNKEYED_FRAGMENT`, + [512]: `NEED_PATCH`, + [1024]: `DYNAMIC_SLOTS`, + [2048]: `DEV_ROOT_FRAGMENT`, + [-1]: `HOISTED`, + [-2]: `BAIL` + }; + + const slotFlagsText = { + [1]: "STABLE", + [2]: "DYNAMIC", + [3]: "FORWARDED" + }; + + const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; + const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); + + const range = 2; + function generateCodeFrame(source, start = 0, end = source.length) { + start = Math.max(0, Math.min(start, source.length)); + end = Math.max(0, Math.min(end, source.length)); + if (start > end) return ""; + let lines = source.split(/(\r?\n)/); + const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); + lines = lines.filter((_, idx) => idx % 2 === 0); + let count = 0; + const res = []; + for (let i = 0; i < lines.length; i++) { + count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); + if (count >= start) { + for (let j = i - range; j <= i + range || end > count; j++) { + if (j < 0 || j >= lines.length) continue; + const line = j + 1; + res.push( + `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` + ); + const lineLength = lines[j].length; + const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; + if (j === i) { + const pad = start - (count - (lineLength + newLineSeqLength)); + const length = Math.max( + 1, + end > count ? lineLength - pad : end - start + ); + res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); + } else if (j > i) { + if (end > count) { + const length = Math.max(Math.min(end - count, lineLength), 1); + res.push(` | ` + "^".repeat(length)); + } + count += lineLength + newLineSeqLength; + } + } + break; + } + } + return res.join("\n"); + } + + function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } + } + const listDelimiterRE = /;(?![^(]*\))/g; + const propertyDelimiterRE = /:([^]+)/; + const styleCommentRE = /\/\*[^]*?\*\//g; + function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; + } + function stringifyStyle(styles) { + if (!styles) return ""; + if (isString(styles)) return styles; + let ret = ""; + for (const key in styles) { + const value = styles[key]; + if (isString(value) || typeof value === "number") { + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + ret += `${normalizedKey}:${value};`; + } + } + return ret; + } + function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); + } + function normalizeProps(props) { + if (!props) return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; + } + + const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; + const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; + const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; + const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; + const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); + const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); + const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); + const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); + + const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; + const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); + const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` + ); + function includeBooleanAttr(value) { + return !!value || value === ""; + } + const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` + ); + const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` + ); + function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; + } + + const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; + function getEscapedCssVarName(key, doubleEscape) { + return key.replace( + cssVarNameEscapeSymbolsRE, + (s) => `\\${s}` + ); + } + + function looseCompareArrays(a, b) { + if (a.length !== b.length) return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; + } + function looseEqual(a, b) { + if (a === b) return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); + } + function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); + } + + const isRef$1 = (val) => { + return !!(val && val["__v_isRef"] === true); + }; + const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); + }; + const replacer = (_key, val) => { + if (isRef$1(val)) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; + }; + const stringifySymbol = (v, i = "") => { + var _a; + return ( + // Symbol.description in es2019+ so we need to cast here to pass + // the lib: es2016 check + isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v + ); + }; + + function warn$2(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); + } + + let activeEffectScope; + class EffectScope { + constructor(detached = false) { + this.detached = detached; + /** + * @internal + */ + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this._isPaused = false; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + pause() { + if (this._active) { + this._isPaused = true; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].pause(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].pause(); + } + } + } + /** + * Resumes the effect scope, including all child scopes and effects. + */ + resume() { + if (this._active) { + if (this._isPaused) { + this._isPaused = false; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].resume(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].resume(); + } + } + } + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { + activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn$2(`cannot run an inactive effect scope.`); + } + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + this._active = false; + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + this.effects.length = 0; + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + this.cleanups.length = 0; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); + } + this.scopes.length = 0; + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + } + } + } + function effectScope(detached) { + return new EffectScope(detached); + } + function getCurrentScope() { + return activeEffectScope; + } + function onScopeDispose(fn, failSilently = false) { + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else if (!failSilently) { + warn$2( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } + } + + let activeSub; + const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); + class ReactiveEffect { + constructor(fn) { + this.fn = fn; + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 1 | 4; + /** + * @internal + */ + this.next = void 0; + /** + * @internal + */ + this.cleanup = void 0; + this.scheduler = void 0; + if (activeEffectScope && activeEffectScope.active) { + activeEffectScope.effects.push(this); + } + } + pause() { + this.flags |= 64; + } + resume() { + if (this.flags & 64) { + this.flags &= ~64; + if (pausedQueueEffects.has(this)) { + pausedQueueEffects.delete(this); + this.trigger(); + } + } + } + /** + * @internal + */ + notify() { + if (this.flags & 2 && !(this.flags & 32)) { + return; + } + if (!(this.flags & 8)) { + batch(this); + } + } + run() { + if (!(this.flags & 1)) { + return this.fn(); + } + this.flags |= 2; + cleanupEffect(this); + prepareDeps(this); + const prevEffect = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = this; + shouldTrack = true; + try { + return this.fn(); + } finally { + if (activeSub !== this) { + warn$2( + "Active effect was not restored correctly - this is likely a Vue internal bug." + ); + } + cleanupDeps(this); + activeSub = prevEffect; + shouldTrack = prevShouldTrack; + this.flags &= ~2; + } + } + stop() { + if (this.flags & 1) { + for (let link = this.deps; link; link = link.nextDep) { + removeSub(link); + } + this.deps = this.depsTail = void 0; + cleanupEffect(this); + this.onStop && this.onStop(); + this.flags &= ~1; + } + } + trigger() { + if (this.flags & 64) { + pausedQueueEffects.add(this); + } else if (this.scheduler) { + this.scheduler(); + } else { + this.runIfDirty(); + } + } + /** + * @internal + */ + runIfDirty() { + if (isDirty(this)) { + this.run(); + } + } + get dirty() { + return isDirty(this); + } + } + let batchDepth = 0; + let batchedSub; + let batchedComputed; + function batch(sub, isComputed = false) { + sub.flags |= 8; + if (isComputed) { + sub.next = batchedComputed; + batchedComputed = sub; + return; + } + sub.next = batchedSub; + batchedSub = sub; + } + function startBatch() { + batchDepth++; + } + function endBatch() { + if (--batchDepth > 0) { + return; + } + if (batchedComputed) { + let e = batchedComputed; + batchedComputed = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + e = next; + } + } + let error; + while (batchedSub) { + let e = batchedSub; + batchedSub = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + if (e.flags & 1) { + try { + ; + e.trigger(); + } catch (err) { + if (!error) error = err; + } + } + e = next; + } + } + if (error) throw error; + } + function prepareDeps(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + link.version = -1; + link.prevActiveLink = link.dep.activeLink; + link.dep.activeLink = link; + } + } + function cleanupDeps(sub) { + let head; + let tail = sub.depsTail; + let link = tail; + while (link) { + const prev = link.prevDep; + if (link.version === -1) { + if (link === tail) tail = prev; + removeSub(link); + removeDep(link); + } else { + head = link; + } + link.dep.activeLink = link.prevActiveLink; + link.prevActiveLink = void 0; + link = prev; + } + sub.deps = head; + sub.depsTail = tail; + } + function isDirty(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { + return true; + } + } + if (sub._dirty) { + return true; + } + return false; + } + function refreshComputed(computed) { + if (computed.flags & 4 && !(computed.flags & 16)) { + return; + } + computed.flags &= ~16; + if (computed.globalVersion === globalVersion) { + return; + } + computed.globalVersion = globalVersion; + const dep = computed.dep; + computed.flags |= 2; + if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { + computed.flags &= ~2; + return; + } + const prevSub = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = computed; + shouldTrack = true; + try { + prepareDeps(computed); + const value = computed.fn(computed._value); + if (dep.version === 0 || hasChanged(value, computed._value)) { + computed._value = value; + dep.version++; + } + } catch (err) { + dep.version++; + throw err; + } finally { + activeSub = prevSub; + shouldTrack = prevShouldTrack; + cleanupDeps(computed); + computed.flags &= ~2; + } + } + function removeSub(link, soft = false) { + const { dep, prevSub, nextSub } = link; + if (prevSub) { + prevSub.nextSub = nextSub; + link.prevSub = void 0; + } + if (nextSub) { + nextSub.prevSub = prevSub; + link.nextSub = void 0; + } + if (dep.subsHead === link) { + dep.subsHead = nextSub; + } + if (dep.subs === link) { + dep.subs = prevSub; + if (!prevSub && dep.computed) { + dep.computed.flags &= ~4; + for (let l = dep.computed.deps; l; l = l.nextDep) { + removeSub(l, true); + } + } + } + if (!soft && !--dep.sc && dep.map) { + dep.map.delete(dep.key); + } + } + function removeDep(link) { + const { prevDep, nextDep } = link; + if (prevDep) { + prevDep.nextDep = nextDep; + link.prevDep = void 0; + } + if (nextDep) { + nextDep.prevDep = prevDep; + link.nextDep = void 0; + } + } + function effect(fn, options) { + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const e = new ReactiveEffect(fn); + if (options) { + extend(e, options); + } + try { + e.run(); + } catch (err) { + e.stop(); + throw err; + } + const runner = e.run.bind(e); + runner.effect = e; + return runner; + } + function stop(runner) { + runner.effect.stop(); + } + let shouldTrack = true; + const trackStack = []; + function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; + } + function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; + } + function cleanupEffect(e) { + const { cleanup } = e; + e.cleanup = void 0; + if (cleanup) { + const prevSub = activeSub; + activeSub = void 0; + try { + cleanup(); + } finally { + activeSub = prevSub; + } + } + } + + let globalVersion = 0; + class Link { + constructor(sub, dep) { + this.sub = sub; + this.dep = dep; + this.version = dep.version; + this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; + } + } + class Dep { + constructor(computed) { + this.computed = computed; + this.version = 0; + /** + * Link between this dep and the current active effect + */ + this.activeLink = void 0; + /** + * Doubly linked list representing the subscribing effects (tail) + */ + this.subs = void 0; + /** + * For object property deps cleanup + */ + this.map = void 0; + this.key = void 0; + /** + * Subscriber counter + */ + this.sc = 0; + { + this.subsHead = void 0; + } + } + track(debugInfo) { + if (!activeSub || !shouldTrack || activeSub === this.computed) { + return; + } + let link = this.activeLink; + if (link === void 0 || link.sub !== activeSub) { + link = this.activeLink = new Link(activeSub, this); + if (!activeSub.deps) { + activeSub.deps = activeSub.depsTail = link; + } else { + link.prevDep = activeSub.depsTail; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + } + addSub(link); + } else if (link.version === -1) { + link.version = this.version; + if (link.nextDep) { + const next = link.nextDep; + next.prevDep = link.prevDep; + if (link.prevDep) { + link.prevDep.nextDep = next; + } + link.prevDep = activeSub.depsTail; + link.nextDep = void 0; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + if (activeSub.deps === link) { + activeSub.deps = next; + } + } + } + if (activeSub.onTrack) { + activeSub.onTrack( + extend( + { + effect: activeSub + }, + debugInfo + ) + ); + } + return link; + } + trigger(debugInfo) { + this.version++; + globalVersion++; + this.notify(debugInfo); + } + notify(debugInfo) { + startBatch(); + try { + if (true) { + for (let head = this.subsHead; head; head = head.nextSub) { + if (head.sub.onTrigger && !(head.sub.flags & 8)) { + head.sub.onTrigger( + extend( + { + effect: head.sub + }, + debugInfo + ) + ); + } + } + } + for (let link = this.subs; link; link = link.prevSub) { + if (link.sub.notify()) { + ; + link.sub.dep.notify(); + } + } + } finally { + endBatch(); + } + } + } + function addSub(link) { + link.dep.sc++; + if (link.sub.flags & 4) { + const computed = link.dep.computed; + if (computed && !link.dep.subs) { + computed.flags |= 4 | 16; + for (let l = computed.deps; l; l = l.nextDep) { + addSub(l); + } + } + const currentTail = link.dep.subs; + if (currentTail !== link) { + link.prevSub = currentTail; + if (currentTail) currentTail.nextSub = link; + } + if (link.dep.subsHead === void 0) { + link.dep.subsHead = link; + } + link.dep.subs = link; + } + } + const targetMap = /* @__PURE__ */ new WeakMap(); + const ITERATE_KEY = Symbol( + "Object iterate" + ); + const MAP_KEY_ITERATE_KEY = Symbol( + "Map keys iterate" + ); + const ARRAY_ITERATE_KEY = Symbol( + "Array iterate" + ); + function track(target, type, key) { + if (shouldTrack && activeSub) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = new Dep()); + dep.map = depsMap; + dep.key = key; + } + { + dep.track({ + target, + type, + key + }); + } + } + } + function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + globalVersion++; + return; + } + const run = (dep) => { + if (dep) { + { + dep.trigger({ + target, + type, + key, + newValue, + oldValue, + oldTarget + }); + } + } + }; + startBatch(); + if (type === "clear") { + depsMap.forEach(run); + } else { + const targetIsArray = isArray(target); + const isArrayIndex = targetIsArray && isIntegerKey(key); + if (targetIsArray && key === "length") { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { + run(dep); + } + }); + } else { + if (key !== void 0 || depsMap.has(void 0)) { + run(depsMap.get(key)); + } + if (isArrayIndex) { + run(depsMap.get(ARRAY_ITERATE_KEY)); + } + switch (type) { + case "add": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isArrayIndex) { + run(depsMap.get("length")); + } + break; + case "delete": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + run(depsMap.get(ITERATE_KEY)); + } + break; + } + } + } + endBatch(); + } + function getDepFromReactive(object, key) { + const depMap = targetMap.get(object); + return depMap && depMap.get(key); + } + + function reactiveReadArray(array) { + const raw = toRaw(array); + if (raw === array) return raw; + track(raw, "iterate", ARRAY_ITERATE_KEY); + return isShallow(array) ? raw : raw.map(toReactive); + } + function shallowReadArray(arr) { + track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); + return arr; + } + const arrayInstrumentations = { + __proto__: null, + [Symbol.iterator]() { + return iterator(this, Symbol.iterator, toReactive); + }, + concat(...args) { + return reactiveReadArray(this).concat( + ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) + ); + }, + entries() { + return iterator(this, "entries", (value) => { + value[1] = toReactive(value[1]); + return value; + }); + }, + every(fn, thisArg) { + return apply(this, "every", fn, thisArg, void 0, arguments); + }, + filter(fn, thisArg) { + return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); + }, + find(fn, thisArg) { + return apply(this, "find", fn, thisArg, toReactive, arguments); + }, + findIndex(fn, thisArg) { + return apply(this, "findIndex", fn, thisArg, void 0, arguments); + }, + findLast(fn, thisArg) { + return apply(this, "findLast", fn, thisArg, toReactive, arguments); + }, + findLastIndex(fn, thisArg) { + return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); + }, + // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement + forEach(fn, thisArg) { + return apply(this, "forEach", fn, thisArg, void 0, arguments); + }, + includes(...args) { + return searchProxy(this, "includes", args); + }, + indexOf(...args) { + return searchProxy(this, "indexOf", args); + }, + join(separator) { + return reactiveReadArray(this).join(separator); + }, + // keys() iterator only reads `length`, no optimisation required + lastIndexOf(...args) { + return searchProxy(this, "lastIndexOf", args); + }, + map(fn, thisArg) { + return apply(this, "map", fn, thisArg, void 0, arguments); + }, + pop() { + return noTracking(this, "pop"); + }, + push(...args) { + return noTracking(this, "push", args); + }, + reduce(fn, ...args) { + return reduce(this, "reduce", fn, args); + }, + reduceRight(fn, ...args) { + return reduce(this, "reduceRight", fn, args); + }, + shift() { + return noTracking(this, "shift"); + }, + // slice could use ARRAY_ITERATE but also seems to beg for range tracking + some(fn, thisArg) { + return apply(this, "some", fn, thisArg, void 0, arguments); + }, + splice(...args) { + return noTracking(this, "splice", args); + }, + toReversed() { + return reactiveReadArray(this).toReversed(); + }, + toSorted(comparer) { + return reactiveReadArray(this).toSorted(comparer); + }, + toSpliced(...args) { + return reactiveReadArray(this).toSpliced(...args); + }, + unshift(...args) { + return noTracking(this, "unshift", args); + }, + values() { + return iterator(this, "values", toReactive); + } + }; + function iterator(self, method, wrapValue) { + const arr = shallowReadArray(self); + const iter = arr[method](); + if (arr !== self && !isShallow(self)) { + iter._next = iter.next; + iter.next = () => { + const result = iter._next(); + if (result.value) { + result.value = wrapValue(result.value); + } + return result; + }; + } + return iter; + } + const arrayProto = Array.prototype; + function apply(self, method, fn, thisArg, wrappedRetFn, args) { + const arr = shallowReadArray(self); + const needsWrap = arr !== self && !isShallow(self); + const methodFn = arr[method]; + if (methodFn !== arrayProto[method]) { + const result2 = methodFn.apply(self, args); + return needsWrap ? toReactive(result2) : result2; + } + let wrappedFn = fn; + if (arr !== self) { + if (needsWrap) { + wrappedFn = function(item, index) { + return fn.call(this, toReactive(item), index, self); + }; + } else if (fn.length > 2) { + wrappedFn = function(item, index) { + return fn.call(this, item, index, self); + }; + } + } + const result = methodFn.call(arr, wrappedFn, thisArg); + return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; + } + function reduce(self, method, fn, args) { + const arr = shallowReadArray(self); + let wrappedFn = fn; + if (arr !== self) { + if (!isShallow(self)) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, toReactive(item), index, self); + }; + } else if (fn.length > 3) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, item, index, self); + }; + } + } + return arr[method](wrappedFn, ...args); + } + function searchProxy(self, method, args) { + const arr = toRaw(self); + track(arr, "iterate", ARRAY_ITERATE_KEY); + const res = arr[method](...args); + if ((res === -1 || res === false) && isProxy(args[0])) { + args[0] = toRaw(args[0]); + return arr[method](...args); + } + return res; + } + function noTracking(self, method, args = []) { + pauseTracking(); + startBatch(); + const res = toRaw(self)[method].apply(self, args); + endBatch(); + resetTracking(); + return res; + } + + const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); + const builtInSymbols = new Set( + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) + ); + function hasOwnProperty(key) { + if (!isSymbol(key)) key = String(key); + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); + } + class BaseReactiveHandler { + constructor(_isReadonly = false, _isShallow = false) { + this._isReadonly = _isReadonly; + this._isShallow = _isShallow; + } + get(target, key, receiver) { + if (key === "__v_skip") return target["__v_skip"]; + const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return isShallow2; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the receiver is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + let fn; + if (targetIsArray && (fn = arrayInstrumentations[key])) { + return fn; + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get( + target, + key, + // if this is a proxy wrapping a ref, return methods using the raw ref + // as receiver so that we don't have to call `toRaw` on the ref in all + // its class methods + isRef(target) ? target : receiver + ); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (isShallow2) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } + } + class MutableReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(false, isShallow2); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._isShallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set( + target, + key, + value, + isRef(target) ? target : receiver + ); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { + const hadKey = hasOwn(target, key); + const oldValue = target[key]; + const result = Reflect.deleteProperty(target, key); + if (result && hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + } + has(target, key) { + const result = Reflect.has(target, key); + if (!isSymbol(key) || !builtInSymbols.has(key)) { + track(target, "has", key); + } + return result; + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); + return Reflect.ownKeys(target); + } + } + class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(true, isShallow2); + } + set(target, key) { + { + warn$2( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + deleteProperty(target, key) { + { + warn$2( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + } + const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); + const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); + const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); + const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); + + const toShallow = (value) => value; + const getProto = (v) => Reflect.getPrototypeOf(v); + function createIterableMethod(method, isReadonly2, isShallow2) { + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done + }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } + }; + }; + } + function createReadonlyMethod(type) { + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + warn$2( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; + } + function createInstrumentations(readonly, shallow) { + const instrumentations = { + get(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); + } + track(rawTarget, "get", rawKey); + } + const { has } = getProto(rawTarget); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + if (has.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } + }, + get size() { + const target = this["__v_raw"]; + !readonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); + }, + has(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); + } + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); + }, + forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + !readonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + } + }; + extend( + instrumentations, + readonly ? { + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear") + } : { + add(value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; + }, + set(key, value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; + }, + delete(key) { + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get ? get.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + }, + clear() { + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger( + target, + "clear", + void 0, + void 0, + oldTarget + ); + } + return result; + } + } + ); + const iteratorMethods = [ + "keys", + "values", + "entries", + Symbol.iterator + ]; + iteratorMethods.forEach((method) => { + instrumentations[method] = createIterableMethod(method, readonly, shallow); + }); + return instrumentations; + } + function createInstrumentationGetter(isReadonly2, shallow) { + const instrumentations = createInstrumentations(isReadonly2, shallow); + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; + } + const mutableCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, false) + }; + const shallowCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, true) + }; + const readonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, false) + }; + const shallowReadonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, true) + }; + function checkIdentityKeys(target, has, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has.call(target, rawKey)) { + const type = toRawType(target); + warn$2( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } + } + + const reactiveMap = /* @__PURE__ */ new WeakMap(); + const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); + const readonlyMap = /* @__PURE__ */ new WeakMap(); + const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); + function targetTypeMap(rawType) { + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } + } + function getTargetType(value) { + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); + } + function reactive(target) { + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); + } + function shallowReactive(target) { + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); + } + function readonly(target) { + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); + } + function shallowReadonly(target) { + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); + } + function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + { + warn$2( + `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( + target + )}` + ); + } + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; + } + function isReactive(value) { + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); + } + function isReadonly(value) { + return !!(value && value["__v_isReadonly"]); + } + function isShallow(value) { + return !!(value && value["__v_isShallow"]); + } + function isProxy(value) { + return value ? !!value["__v_raw"] : false; + } + function toRaw(observed) { + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; + } + function markRaw(value) { + if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { + def(value, "__v_skip", true); + } + return value; + } + const toReactive = (value) => isObject(value) ? reactive(value) : value; + const toReadonly = (value) => isObject(value) ? readonly(value) : value; + + function isRef(r) { + return r ? r["__v_isRef"] === true : false; + } + function ref(value) { + return createRef(value, false); + } + function shallowRef(value) { + return createRef(value, true); + } + function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); + } + class RefImpl { + constructor(value, isShallow2) { + this.dep = new Dep(); + this["__v_isRef"] = true; + this["__v_isShallow"] = false; + this._rawValue = isShallow2 ? value : toRaw(value); + this._value = isShallow2 ? value : toReactive(value); + this["__v_isShallow"] = isShallow2; + } + get value() { + { + this.dep.track({ + target: this, + type: "get", + key: "value" + }); + } + return this._value; + } + set value(newValue) { + const oldValue = this._rawValue; + const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); + newValue = useDirectValue ? newValue : toRaw(newValue); + if (hasChanged(newValue, oldValue)) { + this._rawValue = newValue; + this._value = useDirectValue ? newValue : toReactive(newValue); + { + this.dep.trigger({ + target: this, + type: "set", + key: "value", + newValue, + oldValue + }); + } + } + } + } + function triggerRef(ref2) { + if (ref2.dep) { + { + ref2.dep.trigger({ + target: ref2, + type: "set", + key: "value", + newValue: ref2._value + }); + } + } + } + function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; + } + function toValue(source) { + return isFunction(source) ? source() : unref(source); + } + const shallowUnwrapHandlers = { + get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } + }; + function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); + } + class CustomRefImpl { + constructor(factory) { + this["__v_isRef"] = true; + this._value = void 0; + const dep = this.dep = new Dep(); + const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); + this._get = get; + this._set = set; + } + get value() { + return this._value = this._get(); + } + set value(newVal) { + this._set(newVal); + } + } + function customRef(factory) { + return new CustomRefImpl(factory); + } + function toRefs(object) { + if (!isProxy(object)) { + warn$2(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; + } + class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this["__v_isRef"] = true; + this._value = void 0; + } + get value() { + const val = this._object[this._key]; + return this._value = val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } + } + class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this["__v_isRef"] = true; + this["__v_isReadonly"] = true; + this._value = void 0; + } + get value() { + return this._value = this._getter(); + } + } + function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } + } + function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); + } + + class ComputedRefImpl { + constructor(fn, setter, isSSR) { + this.fn = fn; + this.setter = setter; + /** + * @internal + */ + this._value = void 0; + /** + * @internal + */ + this.dep = new Dep(this); + /** + * @internal + */ + this.__v_isRef = true; + // TODO isolatedDeclarations "__v_isReadonly" + // A computed is also a subscriber that tracks other deps + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 16; + /** + * @internal + */ + this.globalVersion = globalVersion - 1; + /** + * @internal + */ + this.next = void 0; + // for backwards compat + this.effect = this; + this["__v_isReadonly"] = !setter; + this.isSSR = isSSR; + } + /** + * @internal + */ + notify() { + this.flags |= 16; + if (!(this.flags & 8) && // avoid infinite self recursion + activeSub !== this) { + batch(this, true); + return true; + } + } + get value() { + const link = this.dep.track({ + target: this, + type: "get", + key: "value" + }) ; + refreshComputed(this); + if (link) { + link.version = this.dep.version; + } + return this._value; + } + set value(newValue) { + if (this.setter) { + this.setter(newValue); + } else { + warn$2("Write operation failed: computed value is readonly"); + } + } + } + function computed$1(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + if (isFunction(getterOrOptions)) { + getter = getterOrOptions; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, isSSR); + if (debugOptions && !isSSR) { + cRef.onTrack = debugOptions.onTrack; + cRef.onTrigger = debugOptions.onTrigger; + } + return cRef; + } + + const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" + }; + const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" + }; + + const INITIAL_WATCHER_VALUE = {}; + const cleanupMap = /* @__PURE__ */ new WeakMap(); + let activeWatcher = void 0; + function getCurrentWatcher() { + return activeWatcher; + } + function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { + if (owner) { + let cleanups = cleanupMap.get(owner); + if (!cleanups) cleanupMap.set(owner, cleanups = []); + cleanups.push(cleanupFn); + } else if (!failSilently) { + warn$2( + `onWatcherCleanup() was called when there was no active watcher to associate with.` + ); + } + } + function watch$1(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, once, scheduler, augmentJob, call } = options; + const warnInvalidSource = (s) => { + (options.onWarn || warn$2)( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const reactiveGetter = (source2) => { + if (deep) return source2; + if (isShallow(source2) || deep === false || deep === 0) + return traverse(source2, 1); + return traverse(source2); + }; + let effect; + let getter; + let cleanup; + let boundCleanup; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return call ? call(s, 2) : s(); + } else { + warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { + if (cb) { + getter = call ? () => call(source, 2) : source; + } else { + getter = () => { + if (cleanup) { + pauseTracking(); + try { + cleanup(); + } finally { + resetTracking(); + } + } + const currentEffect = activeWatcher; + activeWatcher = effect; + try { + return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); + } finally { + activeWatcher = currentEffect; + } + }; + } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + const depth = deep === true ? Infinity : deep; + getter = () => traverse(baseGetter(), depth); + } + const scope = getCurrentScope(); + const watchHandle = () => { + effect.stop(); + if (scope && scope.active) { + remove(scope.effects, effect); + } + }; + if (once && cb) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + watchHandle(); + }; + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = (immediateFirstRun) => { + if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { + if (cleanup) { + cleanup(); + } + const currentWatcher = activeWatcher; + activeWatcher = effect; + try { + const args = [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + boundCleanup + ]; + call ? call(cb, 3, args) : ( + // @ts-expect-error + cb(...args) + ); + oldValue = newValue; + } finally { + activeWatcher = currentWatcher; + } + } + } else { + effect.run(); + } + }; + if (augmentJob) { + augmentJob(job); + } + effect = new ReactiveEffect(getter); + effect.scheduler = scheduler ? () => scheduler(job, false) : job; + boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); + cleanup = effect.onStop = () => { + const cleanups = cleanupMap.get(effect); + if (cleanups) { + if (call) { + call(cleanups, 4); + } else { + for (const cleanup2 of cleanups) cleanup2(); + } + cleanupMap.delete(effect); + } + }; + { + effect.onTrack = options.onTrack; + effect.onTrigger = options.onTrigger; + } + if (cb) { + if (immediate) { + job(true); + } else { + oldValue = effect.run(); + } + } else if (scheduler) { + scheduler(job.bind(null, true), true); + } else { + effect.run(); + } + watchHandle.pause = effect.pause.bind(effect); + watchHandle.resume = effect.resume.bind(effect); + watchHandle.stop = watchHandle; + return watchHandle; + } + function traverse(value, depth = Infinity, seen) { + if (depth <= 0 || !isObject(value) || value["__v_skip"]) { + return value; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + depth--; + if (isRef(value)) { + traverse(value.value, depth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, seen); + } + for (const key of Object.getOwnPropertySymbols(value)) { + if (Object.prototype.propertyIsEnumerable.call(value, key)) { + traverse(value[key], depth, seen); + } + } + } + return value; + } + + const stack$1 = []; + function pushWarningContext(vnode) { + stack$1.push(vnode); + } + function popWarningContext() { + stack$1.pop(); + } + let isWarning = false; + function warn$1(msg, ...args) { + if (isWarning) return; + isWarning = true; + pauseTracking(); + const instance = stack$1.length ? stack$1[stack$1.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + // eslint-disable-next-line no-restricted-syntax + msg + args.map((a) => { + var _a, _b; + return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); + }).join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); + } + console.warn(...warnArgs); + } + resetTracking(); + isWarning = false; + } + function getComponentTrace() { + let currentVNode = stack$1[stack$1.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); + } + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; + } + function formatTrace(trace) { + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; + } + function formatTraceEntry({ vnode, recurseCount }) { + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; + } + function formatProps(props) { + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; + } + function formatProp(key, value, raw) { + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } + } + function assertNumber(val, type) { + if (val === void 0) { + return; + } else if (typeof val !== "number") { + warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + } else if (isNaN(val)) { + warn$1(`${type} is NaN - the duration expression might be incorrect.`); + } + } + + const ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER", + "COMPONENT_UPDATE": 15, + "15": "COMPONENT_UPDATE", + "APP_UNMOUNT_CLEANUP": 16, + "16": "APP_UNMOUNT_CLEANUP" + }; + const ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush", + [15]: "component update", + [16]: "app unmount cleanup function" + }; + function callWithErrorHandling(fn, instance, type, args) { + try { + return args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } + } + function callWithAsyncErrorHandling(fn, instance, type, args) { + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); + } + return res; + } + if (isArray(fn)) { + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; + } else { + warn$1( + `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` + ); + } + } + function handleError(err, instance, type, throwInDev = true) { + const contextVNode = instance ? instance.vnode : null; + const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = ErrorTypeStrings$1[type] ; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + return; + } + } + } + cur = cur.parent; + } + if (errorHandler) { + pauseTracking(); + callWithErrorHandling(errorHandler, null, 10, [ + err, + exposedInstance, + errorInfo + ]); + resetTracking(); + return; + } + } + logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); + } + function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { + { + const info = ErrorTypeStrings$1[type]; + if (contextVNode) { + pushWarningContext(contextVNode); + } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } + } + + const queue = []; + let flushIndex = -1; + const pendingPostFlushCbs = []; + let activePostFlushCbs = null; + let postFlushIndex = 0; + const resolvedPromise = /* @__PURE__ */ Promise.resolve(); + let currentFlushPromise = null; + const RECURSION_LIMIT = 100; + function nextTick(fn) { + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; + } + function findInsertionIndex(id) { + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { + start = middle + 1; + } else { + end = middle; + } + } + return start; + } + function queueJob(job) { + if (!(job.flags & 1)) { + const jobId = getId(job); + const lastJob = queue[queue.length - 1]; + if (!lastJob || // fast path when the job id is larger than the tail + !(job.flags & 2) && jobId >= getId(lastJob)) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(jobId), 0, job); + } + job.flags |= 1; + queueFlush(); + } + } + function queueFlush() { + if (!currentFlushPromise) { + currentFlushPromise = resolvedPromise.then(flushJobs); + } + } + function queuePostFlushCb(cb) { + if (!isArray(cb)) { + if (activePostFlushCbs && cb.id === -1) { + activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); + } else if (!(cb.flags & 1)) { + pendingPostFlushCbs.push(cb); + cb.flags |= 1; + } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); + } + function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.flags & 2) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + if (cb.flags & 4) { + cb.flags &= ~1; + } + cb(); + if (!(cb.flags & 4)) { + cb.flags &= ~1; + } + } + } + } + function flushPostFlushCbs(seen) { + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; + } + activePostFlushCbs = deduped; + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + const cb = activePostFlushCbs[postFlushIndex]; + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + if (cb.flags & 4) { + cb.flags &= ~1; + } + if (!(cb.flags & 8)) cb(); + cb.flags &= ~1; + } + activePostFlushCbs = null; + postFlushIndex = 0; + } + } + const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; + function flushJobs(seen) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + const check = (job) => checkRecursiveUpdates(seen, job) ; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && !(job.flags & 8)) { + if (check(job)) { + continue; + } + if (job.flags & 4) { + job.flags &= ~1; + } + callWithErrorHandling( + job, + job.i, + job.i ? 15 : 14 + ); + if (!(job.flags & 4)) { + job.flags &= ~1; + } + } + } + } finally { + for (; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job) { + job.flags &= ~1; + } + } + flushIndex = -1; + queue.length = 0; + flushPostFlushCbs(seen); + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); + } + } + } + function checkRecursiveUpdates(seen, fn) { + const count = seen.get(fn) || 0; + if (count > RECURSION_LIMIT) { + const instance = fn.i; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } + seen.set(fn, count + 1); + return false; + } + + let isHmrUpdating = false; + const hmrDirtyComponents = /* @__PURE__ */ new Map(); + { + getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; + } + const map = /* @__PURE__ */ new Map(); + function registerHMR(instance) { + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); + } + function unregisterHMR(instance) { + map.get(instance.type.__hmrId).instances.delete(instance); + } + function createRecord(id, initialDef) { + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; + } + function normalizeClassComponent(component) { + return isClassComponent(component) ? component.__vccOpts : component; + } + function rerender(id, newRender) { + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; + } + instance.renderCache = []; + isHmrUpdating = true; + instance.update(); + isHmrUpdating = false; + }); + } + function reload(id, newComp) { + const record = map.get(id); + if (!record) return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (let i = 0; i < instances.length; i++) { + const instance = instances[i]; + const oldComp = normalizeClassComponent(instance.type); + let dirtyInstances = hmrDirtyComponents.get(oldComp); + if (!dirtyInstances) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set()); + } + dirtyInstances.add(instance); + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + dirtyInstances.add(instance); + instance.ceReload(newComp.styles); + dirtyInstances.delete(instance); + } else if (instance.parent) { + queueJob(() => { + isHmrUpdating = true; + instance.parent.update(); + isHmrUpdating = false; + dirtyInstances.delete(instance); + }); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + if (instance.root.ce && instance !== instance.root) { + instance.root.ce._removeChildStyle(oldComp); + } + } + queuePostFlushCb(() => { + hmrDirtyComponents.clear(); + }); + } + function updateComponentDef(oldComp, newComp) { + extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; + } + } + } + function tryWrap(fn) { + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; + } + + let devtools$1; + let buffer = []; + let devtoolsNotInstalled = false; + function emit$1(event, ...args) { + if (devtools$1) { + devtools$1.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } + } + function setDevtoolsHook$1(hook, target) { + var _a, _b; + devtools$1 = hook; + if (devtools$1) { + devtools$1.enabled = true; + buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); + buffer = []; + } else if ( + // handle late devtools injection - only do this if we are in an actual + // browser environment to avoid the timer handle stalling test runner exit + // (#4815) + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + // eslint-disable-next-line no-restricted-syntax + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook$1(newHook, target); + }); + setTimeout(() => { + if (!devtools$1) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; + devtoolsNotInstalled = true; + buffer = []; + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } + } + function devtoolsInitApp(app, version) { + emit$1("app:init" /* APP_INIT */, app, version, { + Fragment, + Text, + Comment, + Static + }); + } + function devtoolsUnmountApp(app) { + emit$1("app:unmount" /* APP_UNMOUNT */, app); + } + const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); + const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); + const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( + "component:removed" /* COMPONENT_REMOVED */ + ); + const devtoolsComponentRemoved = (component) => { + if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools$1.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } + }; + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function createDevtoolsComponentHook(hook) { + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; + } + const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); + const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); + function createDevtoolsPerformanceHook(hook) { + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; + } + function devtoolsComponentEmit(component, event, params) { + emit$1( + "component:emit" /* COMPONENT_EMIT */, + component.appContext.app, + component, + event, + params + ); + } + + let currentRenderingInstance = null; + let currentScopeId = null; + function setCurrentRenderingInstance(instance) { + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; + } + function pushScopeId(id) { + currentScopeId = id; + } + function popScopeId() { + currentScopeId = null; + } + const withScopeId = (_id) => withCtx; + function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); + } + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; + } + + function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } + } + function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + warn$1(`withDirectives can only be used inside render functions.`); + return vnode; + } + const instance = getComponentPublicInstance(currentRenderingInstance); + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; + if (dir) { + if (isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; + } + function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); + } + } + } + + const TeleportEndKey = Symbol("_vte"); + const isTeleport = (type) => type.__isTeleport; + const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); + const isTeleportDeferred = (props) => props && (props.defer || props.defer === ""); + const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; + const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; + const resolveTarget = (props, select) => { + const targetSelector = props && props.to; + if (isString(targetSelector)) { + if (!select) { + warn$1( + `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` + ); + return null; + } else { + const target = select(targetSelector); + if (!target && !isTeleportDisabled(props)) { + warn$1( + `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` + ); + } + return target; + } + } else { + if (!targetSelector && !isTeleportDisabled(props)) { + warn$1(`Invalid Teleport target: ${targetSelector}`); + } + return targetSelector; + } + }; + const TeleportImpl = { + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (isHmrUpdating) { + optimized = false; + dynamicChildren = null; + } + if (n1 == null) { + const placeholder = n2.el = createComment("teleport start") ; + const mainAnchor = n2.anchor = createComment("teleport end") ; + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + if (parentComponent && parentComponent.isCE) { + parentComponent.ce._teleportTarget = container2; + } + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountToTarget = () => { + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = prepareAnchor(target, n2, createText, insert); + if (target) { + if (namespace !== "svg" && isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace !== "mathml" && isTargetMathML(target)) { + namespace = "mathml"; + } + if (!disabled) { + mount(target, targetAnchor); + updateCssVars(n2, false); + } + } else if (!disabled) { + warn$1( + "Invalid Teleport target on mount:", + target, + `(${typeof target})` + ); + } + }; + if (disabled) { + mount(container, mainAnchor); + updateCssVars(n2, true); + } + if (isTeleportDeferred(n2.props)) { + queuePostRenderEffect(() => { + mountToTarget(); + n2.el.__isMounted = true; + }, parentSuspense); + } else { + mountToTarget(); + } + } else { + if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) { + queuePostRenderEffect(() => { + TeleportImpl.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + delete n1.el.__isMounted; + }, parentSuspense); + return; + } + n2.el = n1.el; + n2.targetStart = n1.targetStart; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } else { + warn$1( + "Invalid Teleport target on update:", + target, + `(${typeof target})` + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); + } + } + updateCssVars(n2, disabled); + } + }, + remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { + shapeFlag, + children, + anchor, + targetStart, + targetAnchor, + target, + props + } = vnode; + if (target) { + hostRemove(targetStart); + hostRemove(targetAnchor); + } + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport + }; + function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } + } + function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector, insert, createText } + }, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const disabled = isTeleportDisabled(vnode.props); + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (disabled) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetStart = targetNode; + vnode.targetAnchor = targetNode && nextSibling(targetNode); + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + if (targetAnchor && targetAnchor.nodeType === 8) { + if (targetAnchor.data === "teleport start anchor") { + vnode.targetStart = targetAnchor; + } else if (targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + targetAnchor = nextSibling(targetAnchor); + } + if (!vnode.targetAnchor) { + prepareAnchor(target, vnode, createText, insert); + } + hydrateChildren( + targetNode && nextSibling(targetNode), + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode, disabled); + } + return vnode.anchor && nextSibling(vnode.anchor); + } + const Teleport = TeleportImpl; + function updateCssVars(vnode, isDisabled) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node, anchor; + if (isDisabled) { + node = vnode.el; + anchor = vnode.anchor; + } else { + node = vnode.targetStart; + anchor = vnode.targetAnchor; + } + while (node && node !== anchor) { + if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } + } + function prepareAnchor(target, vnode, createText, insert) { + const targetStart = vnode.targetStart = createText(""); + const targetAnchor = vnode.targetAnchor = createText(""); + targetStart[TeleportEndKey] = targetAnchor; + if (target) { + insert(targetStart, target); + insert(targetAnchor, target); + } + return targetAnchor; + } + + const leaveCbKey = Symbol("_leaveCb"); + const enterCbKey$1 = Symbol("_enterCb"); + function useTransitionState() { + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; + } + const TransitionHookValidator = [Function, Array]; + const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator + }; + const recursiveGetSubtree = (instance) => { + const subTree = instance.subTree; + return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; + }; + const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + const child = findNonCommentChild(children); + const rawProps = toRaw(props); + const { mode } = rawProps; + if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { + warn$1(`invalid <transition> mode: ${mode}`); + } + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getInnerChild$1(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + let enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance, + // #11061, ensure enterHooks is fresh after clone + (hooks) => enterHooks = hooks + ); + if (innerChild.type !== Comment) { + setTransitionHooks(innerChild, enterHooks); + } + let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree); + if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { + let leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in" && innerChild.type !== Comment) { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (!(instance.job.flags & 8)) { + instance.update(); + } + delete leavingHooks.afterLeave; + oldInnerChild = void 0; + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + enterHooks.delayedLeave = () => { + delayedLeave(); + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + }; + } else { + oldInnerChild = void 0; + } + } else if (oldInnerChild) { + oldInnerChild = void 0; + } + return child; + }; + } + }; + function findNonCommentChild(children) { + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c of children) { + if (c.type !== Comment) { + if (hasFound) { + warn$1( + "<transition> can only be used on a single element or component. Use <transition-group> for lists." + ); + break; + } + child = c; + hasFound = true; + } + } + } + return child; + } + const BaseTransition = BaseTransitionImpl; + function getLeavingNodesForType(state, vnode) { + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; + } + function resolveTransitionHooks(vnode, props, state, instance, postClone) { + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook(hook, args); + if (isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) done(); + } else if (hook.length <= 1) { + done(); + } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey$1] = (cancelled) => { + if (called) return; + called = true; + if (cancelled) { + callHook(cancelHook, [el]); + } else { + callHook(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey$1] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove) { + const key2 = String(vnode.key); + if (el[enterCbKey$1]) { + el[enterCbKey$1]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove(); + } + callHook(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) return; + called = true; + remove(); + if (cancelled) { + callHook(onLeaveCancelled, [el]); + } else { + callHook(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + const hooks2 = resolveTransitionHooks( + vnode2, + props, + state, + instance, + postClone + ); + if (postClone) postClone(hooks2); + return hooks2; + } + }; + return hooks; + } + function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } + } + function getInnerChild$1(vnode) { + if (!isKeepAlive(vnode)) { + if (isTeleport(vnode.type) && vnode.children) { + return findNonCommentChild(vnode.children); + } + return vnode; + } + if (vnode.component) { + return vnode.component.subTree; + } + const { shapeFlag, children } = vnode; + if (children) { + if (shapeFlag & 16) { + return children[0]; + } + if (shapeFlag & 32 && isFunction(children.default)) { + return children.default(); + } + } + } + function setTransitionHooks(vnode, hooks) { + if (vnode.shapeFlag & 6 && vnode.component) { + vnode.transition = hooks; + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } + } + function getTransitionRawChildren(children, keepComment = false, parentKey) { + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); + } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; + } + } + return ret; + } + + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function defineComponent(options, extraOptions) { + return isFunction(options) ? ( + // #8236: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; + } + + function useId() { + const i = getCurrentInstance(); + if (i) { + return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++; + } else { + warn$1( + `useId() is called when there is no active component instance to be associated with.` + ); + } + return ""; + } + function markAsyncBoundary(instance) { + instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; + } + + const knownTemplateRefs = /* @__PURE__ */ new WeakSet(); + function useTemplateRef(key) { + const i = getCurrentInstance(); + const r = shallowRef(null); + if (i) { + const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs; + let desc; + if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) { + warn$1(`useTemplateRef('${key}') already exists.`); + } else { + Object.defineProperty(refs, key, { + enumerable: true, + get: () => r.value, + set: (val) => r.value = val + }); + } + } else { + warn$1( + `useTemplateRef() is called when there is no active component instance to be associated with.` + ); + } + const ret = readonly(r) ; + { + knownTemplateRefs.add(ret); + } + return ret; + } + + function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { + if (isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) { + setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree); + } + return; + } + const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + const rawSetupState = toRaw(setupState); + const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => { + { + if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) { + warn$1( + `Template ref "${key}" used on a non-ref value. It will not work in the production build.` + ); + } + if (knownTemplateRefs.has(rawSetupState[key])) { + return false; + } + } + return hasOwn(rawSetupState, key); + }; + if (oldRef != null && oldRef !== ref) { + if (isString(oldRef)) { + refs[oldRef] = null; + if (canSetSetupRef(oldRef)) { + setupState[oldRef] = null; + } + } else if (isRef(oldRef)) { + oldRef.value = null; + } + } + if (isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = isString(ref); + const _isRef = isRef(ref); + if (_isString || _isRef) { + const doSet = () => { + if (rawRef.f) { + const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + isArray(existing) && remove(existing, refValue); + } else { + if (!isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (canSetSetupRef(ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); + } + } + } else if (_isString) { + refs[ref] = value; + if (canSetSetupRef(ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) refs[rawRef.k] = value; + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + }; + if (value) { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } else { + doSet(); + } + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + } + } + + let hasLoggedMismatchError = false; + const logMismatchError = () => { + if (hasLoggedMismatchError) { + return; + } + console.error("Hydration completed but contains mismatches."); + hasLoggedMismatchError = true; + }; + const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; + const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); + const getContainerType = (container) => { + if (container.nodeType !== 1) return void 0; + if (isSVGContainer(container)) return "svg"; + if (isMathMLContainer(container)) return "mathml"; + return void 0; + }; + const isComment = (node) => node.nodeType === 8; + function createHydrationFunctions(rendererInternals) { + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment + } + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + warn$1( + `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` + ); + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; + } + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; + }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + optimized = optimized || !!vnode.dynamicChildren; + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + { + def(node, "__vnode", vnode, true); + def(node, "__vueParentComponent", parentComponent, true); + } + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { + warn$1( + `Hydration text mismatch in`, + node.parentNode, + ` + - rendered on server: ${JSON.stringify( + node.data + )} + - expected on client: ${JSON.stringify(vnode.children)}` + ); + logMismatchError(); + node.data = vnode.children; + } + nextNode = nextSibling(node); + } + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 || domType === 3) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else { + warn$1("Invalid HostVNode type:", type, `(${typeof type})`); + } + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; + }; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition( + null, + // no need check parentSuspense in hydration + transition + ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + let hasWarned = false; + while (next) { + if (!isMismatchAllowed(el, 1 /* CHILDREN */)) { + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + el, + ` +Server rendered element contains more child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + let clientText = vnode.children; + if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) { + clientText = clientText.slice(1); + } + if (el.textContent !== clientText) { + if (!isMismatchAllowed(el, 0 /* TEXT */)) { + warn$1( + `Hydration text content mismatch on`, + el, + ` + - rendered on server: ${el.textContent} + - expected on client: ${vnode.children}` + ); + logMismatchError(); + } + el.textContent = vnode.children; + } + } + if (props) { + { + const isCustomElement = el.tagName.includes("-"); + for (const key in props) { + if (// #11189 skip if this node has directives that have created hooks + // as it could have mutated the DOM in any possible way + !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) { + logMismatchError(); + } + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === "." || isCustomElement) { + patchProp(el, key, null, props[key], void 0, parentComponent); + } + } + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + } + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + let hasWarned = false; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + const isText = vnode.type === Text; + if (node) { + if (isText && !optimized) { + if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) { + insert( + createText( + node.data.slice(vnode.children.length) + ), + container, + nextSibling(node) + ); + node.data = vnode.children; + } + } + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (isText && !vnode.children) { + insert(vnode.el = createText(""), container); + } else { + if (!isMismatchAllowed(container, 1 /* CHILDREN */)) { + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + container, + ` +Server rendered element contains fewer child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + } + } + return node; + }; + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); + } else { + logMismatchError(); + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) { + warn$1( + `Hydration node mismatch: +- rendered on server:`, + node, + node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, + ` +- expected on client:`, + vnode.type + ); + logMismatchError(); + } + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; + } + } + } + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + if (parentComponent) { + parentComponent.vnode.el = vnode.el; + updateHOCHostEl(parentComponent, vnode.el); + } + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } + } + } + } + return node; + }; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 && node.tagName === "TEMPLATE"; + }; + return [hydrate, hydrateNode]; + } + function propHasMismatch(el, key, clientValue, vnode, instance) { + let mismatchType; + let mismatchKey; + let actual; + let expected; + if (key === "class") { + actual = el.getAttribute("class"); + expected = normalizeClass(clientValue); + if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { + mismatchType = 2 /* CLASS */; + mismatchKey = `class`; + } + } else if (key === "style") { + actual = el.getAttribute("style") || ""; + expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); + const actualMap = toStyleMap(actual); + const expectedMap = toStyleMap(expected); + if (vnode.dirs) { + for (const { dir, value } of vnode.dirs) { + if (dir.name === "show" && !value) { + expectedMap.set("display", "none"); + } + } + } + if (instance) { + resolveCssVars(instance, vnode, expectedMap); + } + if (!isMapEqual(actualMap, expectedMap)) { + mismatchType = 3 /* STYLE */; + mismatchKey = "style"; + } + } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { + if (isBooleanAttr(key)) { + actual = el.hasAttribute(key); + expected = includeBooleanAttr(clientValue); + } else if (clientValue == null) { + actual = el.hasAttribute(key); + expected = false; + } else { + if (el.hasAttribute(key)) { + actual = el.getAttribute(key); + } else if (key === "value" && el.tagName === "TEXTAREA") { + actual = el.value; + } else { + actual = false; + } + expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; + } + if (actual !== expected) { + mismatchType = 4 /* ATTRIBUTE */; + mismatchKey = key; + } + } + if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) { + const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; + const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`; + const postSegment = ` + - rendered on server: ${format(actual)} + - expected on client: ${format(expected)} + Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. + You should fix the source of the mismatch.`; + { + warn$1(preSegment, el, postSegment); + } + return true; + } + return false; + } + function toClassSet(str) { + return new Set(str.trim().split(/\s+/)); + } + function isSetEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const s of a) { + if (!b.has(s)) { + return false; + } + } + return true; + } + function toStyleMap(str) { + const styleMap = /* @__PURE__ */ new Map(); + for (const item of str.split(";")) { + let [key, value] = item.split(":"); + key = key.trim(); + value = value && value.trim(); + if (key && value) { + styleMap.set(key, value); + } + } + return styleMap; + } + function isMapEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const [key, value] of a) { + if (value !== b.get(key)) { + return false; + } + } + return true; + } + function resolveCssVars(instance, vnode, expectedMap) { + const root = instance.subTree; + if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) { + const cssVars = instance.getCssVars(); + for (const key in cssVars) { + expectedMap.set( + `--${getEscapedCssVarName(key)}`, + String(cssVars[key]) + ); + } + } + if (vnode === root && instance.parent) { + resolveCssVars(instance.parent, instance.vnode, expectedMap); + } + } + const allowMismatchAttr = "data-allow-mismatch"; + const MismatchTypeString = { + [0 /* TEXT */]: "text", + [1 /* CHILDREN */]: "children", + [2 /* CLASS */]: "class", + [3 /* STYLE */]: "style", + [4 /* ATTRIBUTE */]: "attribute" + }; + function isMismatchAllowed(el, allowedType) { + if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) { + while (el && !el.hasAttribute(allowMismatchAttr)) { + el = el.parentElement; + } + } + const allowedAttr = el && el.getAttribute(allowMismatchAttr); + if (allowedAttr == null) { + return false; + } else if (allowedAttr === "") { + return true; + } else { + const list = allowedAttr.split(","); + if (allowedType === 0 /* TEXT */ && list.includes("children")) { + return true; + } + return allowedAttr.split(",").includes(MismatchTypeString[allowedType]); + } + } + + const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1)); + const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id)); + const hydrateOnIdle = (timeout = 1e4) => (hydrate) => { + const id = requestIdleCallback(hydrate, { timeout }); + return () => cancelIdleCallback(id); + }; + function elementIsVisibleInViewport(el) { + const { top, left, bottom, right } = el.getBoundingClientRect(); + const { innerHeight, innerWidth } = window; + return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth); + } + const hydrateOnVisible = (opts) => (hydrate, forEach) => { + const ob = new IntersectionObserver((entries) => { + for (const e of entries) { + if (!e.isIntersecting) continue; + ob.disconnect(); + hydrate(); + break; + } + }, opts); + forEach((el) => { + if (!(el instanceof Element)) return; + if (elementIsVisibleInViewport(el)) { + hydrate(); + ob.disconnect(); + return false; + } + ob.observe(el); + }); + return () => ob.disconnect(); + }; + const hydrateOnMediaQuery = (query) => (hydrate) => { + if (query) { + const mql = matchMedia(query); + if (mql.matches) { + hydrate(); + } else { + mql.addEventListener("change", hydrate, { once: true }); + return () => mql.removeEventListener("change", hydrate); + } + } + }; + const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => { + if (isString(interactions)) interactions = [interactions]; + let hasHydrated = false; + const doHydrate = (e) => { + if (!hasHydrated) { + hasHydrated = true; + teardown(); + hydrate(); + e.target.dispatchEvent(new e.constructor(e.type, e)); + } + }; + const teardown = () => { + forEach((el) => { + for (const i of interactions) { + el.removeEventListener(i, doHydrate); + } + }); + }; + forEach((el) => { + for (const i of interactions) { + el.addEventListener(i, doHydrate, { once: true }); + } + }); + return teardown; + }; + function forEachElement(node, cb) { + if (isComment(node) && node.data === "[") { + let depth = 1; + let next = node.nextSibling; + while (next) { + if (next.nodeType === 1) { + const result = cb(next); + if (result === false) { + break; + } + } else if (isComment(next)) { + if (next.data === "]") { + if (--depth === 0) break; + } else if (next.data === "[") { + depth++; + } + } + next = next.nextSibling; + } + } else { + cb(node); + } + } + + const isAsyncWrapper = (i) => !!i.type.__asyncLoader; + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function defineAsyncComponent(source) { + if (isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + hydrate: hydrateStrategy, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve, reject) => { + const userRetry = () => resolve(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (!comp) { + warn$1( + `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` + ); + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + if (comp && !isObject(comp) && !isFunction(comp)) { + throw new Error(`Invalid async component load result: ${comp}`); + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + __asyncHydrate(el, instance, hydrate) { + const doHydrate = hydrateStrategy ? () => { + const teardown = hydrateStrategy( + hydrate, + (cb) => forEachElement(el, cb) + ); + if (teardown) { + (instance.bum || (instance.bum = [])).push(teardown); + } + } : hydrate; + if (resolvedComp) { + doHydrate(); + } else { + load().then(() => !instance.isUnmounted && doHydrate()); + } + }, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + markAsyncBoundary(instance); + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { + pendingRequest = null; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || false) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = ref(false); + const error = ref(); + const delayed = ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.update(); + } + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); + } + function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; + } + + const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; + const KeepAliveImpl = { + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + { + instance.__v_cache = cache; + } + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + invalidateMount(instance2.m); + invalidateMount(instance2.a); + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && !filter(name)) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (cached && (!current || !isSameVNodeType(cached, current))) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + if (isSuspense(instance.subTree.type)) { + queuePostRenderEffect(() => { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + }, instance.subTree.suspense); + } else { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return current = null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + { + warn$1(`KeepAlive should contain exactly one component child.`); + } + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + if (vnode.type === Comment) { + current = null; + return vnode; + } + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + vnode.shapeFlag &= ~256; + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } + }; + const KeepAlive = KeepAliveImpl; + function matches(pattern, name) { + if (isArray(pattern)) { + return pattern.some((p) => matches(p, name)); + } else if (isString(pattern)) { + return pattern.split(",").includes(name); + } else if (isRegExp(pattern)) { + pattern.lastIndex = 0; + return pattern.test(name); + } + return false; + } + function onActivated(hook, target) { + registerKeepAliveHook(hook, "a", target); + } + function onDeactivated(hook, target) { + registerKeepAliveHook(hook, "da", target); + } + function registerKeepAliveHook(hook, type, target = currentInstance) { + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; + } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } + } + function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + remove(keepAliveRoot[type], injected); + }, target); + } + function resetShapeFlag(vnode) { + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; + } + function getInnerChild(vnode) { + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; + } + + function injectHook(type, hook, target = currentInstance, prepend = false) { + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); + } + return wrappedHook; + } else { + const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) + ); + } + } + const createHook = (lifecycle) => (hook, target = currentInstance) => { + if (!isInSSRComponentSetup || lifecycle === "sp") { + injectHook(lifecycle, (...args) => hook(...args), target); + } + }; + const onBeforeMount = createHook("bm"); + const onMounted = createHook("m"); + const onBeforeUpdate = createHook( + "bu" + ); + const onUpdated = createHook("u"); + const onBeforeUnmount = createHook( + "bum" + ); + const onUnmounted = createHook("um"); + const onServerPrefetch = createHook( + "sp" + ); + const onRenderTriggered = createHook("rtg"); + const onRenderTracked = createHook("rtc"); + function onErrorCaptured(hook, target = currentInstance) { + injectHook("ec", hook, target); + } + + const COMPONENTS = "components"; + const DIRECTIVES = "directives"; + function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; + } + const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); + function resolveDynamicComponent(component) { + if (isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } + } + function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); + } + function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else { + warn$1( + `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } + } + function resolve(registry, name) { + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); + } + + function renderList(source, renderItem, cache, index) { + let ret; + const cached = cache && cache[index]; + const sourceIsArray = isArray(source); + if (sourceIsArray || isString(source)) { + const sourceIsReactiveArray = sourceIsArray && isReactive(source); + let needsWrap = false; + if (sourceIsReactiveArray) { + needsWrap = !isShallow(source); + source = shallowReadArray(source); + } + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem( + needsWrap ? toReactive(source[i]) : source[i], + i, + void 0, + cached && cached[i] + ); + } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn$1(`The v-for range expect an integer value but got ${source}.`); + } + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); + } + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } + } + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; + } + + function createSlots(slots, dynamicSlots) { + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) res.key = slot.key; + return res; + } : slot.fn; + } + } + return slots; + } + + function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) { + if (name !== "default") props.name = name; + return openBlock(), createBlock( + Fragment, + null, + [createVNode("slot", props, fallback && fallback())], + 64 + ); + } + let slot = slots[name]; + if (slot && slot.length > 1) { + warn$1( + `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` + ); + slot = () => []; + } + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key; + const rendered = createBlock( + Fragment, + { + key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content + (!validSlotContent && fallback ? "_fb" : "") + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; + } + function ensureValidVNode(vnodes) { + return vnodes.some((child) => { + if (!isVNode(child)) return true; + if (child.type === Comment) return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; + } + + function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + if (!isObject(obj)) { + warn$1(`v-on with no argument expects an object value.`); + return ret; + } + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; + } + return ret; + } + + const getPublicInstance = (i) => { + if (!i) return null; + if (isStatefulComponent(i)) return getComponentPublicInstance(i); + return getPublicInstance(i.parent); + }; + const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => shallowReadonly(i.props) , + $attrs: (i) => shallowReadonly(i.attrs) , + $slots: (i) => shallowReadonly(i.slots) , + $refs: (i) => shallowReadonly(i.refs) , + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $host: (i) => i.ce, + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i) , + $forceUpdate: (i) => i.f || (i.f = () => { + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) + ); + const isReservedPrefix = (key) => key === "_" || key === "$"; + const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); + const PublicInstanceProxyHandlers = { + get({ _: instance }, key) { + if (key === "__v_skip") { + return true; + } + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (key === "__isVue") { + return true; + } + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance.attrs, "get", ""); + markAttrsAccessed(); + } else if (key === "$slots") { + track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); + return false; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + data[key] = value; + return true; + } else if (hasOwn(instance.props, key)) { + warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + warn$1( + `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` + ); + return false; + } else { + if (key in instance.appContext.config.globalProperties) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + value + }); + } else { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } + }; + { + PublicInstanceProxyHandlers.ownKeys = (target) => { + warn$1( + `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` + ); + return Reflect.ownKeys(target); + }; + } + const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, { + get(target, key) { + if (key === Symbol.unscopables) { + return; + } + return PublicInstanceProxyHandlers.get(target, key, target); + }, + has(_, key) { + const has = key[0] !== "_" && !isGloballyAllowed(key); + if (!has && PublicInstanceProxyHandlers.has(_, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} should not start with _ which is a reserved prefix for Vue internals.` + ); + } + return has; + } + }); + function createDevRenderContext(instance) { + const target = {}; + Object.defineProperty(target, `_`, { + configurable: true, + enumerable: false, + get: () => instance + }); + Object.keys(publicPropertiesMap).forEach((key) => { + Object.defineProperty(target, key, { + configurable: true, + enumerable: false, + get: () => publicPropertiesMap[key](instance), + // intercepted by the proxy so no need for implementation, + // but needed to prevent set errors + set: NOOP + }); + }); + return target; + } + function exposePropsOnRenderContext(instance) { + const { + ctx, + propsOptions: [propsOptions] + } = instance; + if (propsOptions) { + Object.keys(propsOptions).forEach((key) => { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => instance.props[key], + set: NOOP + }); + }); + } + } + function exposeSetupStateOnRenderContext(instance) { + const { ctx, setupState } = instance; + Object.keys(toRaw(setupState)).forEach((key) => { + if (!setupState.__isScriptSetup) { + if (isReservedPrefix(key[0])) { + warn$1( + `setup() return property ${JSON.stringify( + key + )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` + ); + return; + } + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => setupState[key], + set: NOOP + }); + } + }); + } + + const warnRuntimeUsage = (method) => warn$1( + `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` + ); + function defineProps() { + { + warnRuntimeUsage(`defineProps`); + } + return null; + } + function defineEmits() { + { + warnRuntimeUsage(`defineEmits`); + } + return null; + } + function defineExpose(exposed) { + { + warnRuntimeUsage(`defineExpose`); + } + } + function defineOptions(options) { + { + warnRuntimeUsage(`defineOptions`); + } + } + function defineSlots() { + { + warnRuntimeUsage(`defineSlots`); + } + return null; + } + function defineModel() { + { + warnRuntimeUsage("defineModel"); + } + } + function withDefaults(props, defaults) { + { + warnRuntimeUsage(`withDefaults`); + } + return null; + } + function useSlots() { + return getContext().slots; + } + function useAttrs() { + return getContext().attrs; + } + function getContext() { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useContext() called without active instance.`); + } + return i.setupContext || (i.setupContext = createSetupContext(i)); + } + function normalizePropsOrEmits(props) { + return isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; + } + function mergeDefaults(raw, defaults) { + const props = normalizePropsOrEmits(raw); + for (const key in defaults) { + if (key.startsWith("__skip")) continue; + let opt = props[key]; + if (opt) { + if (isArray(opt) || isFunction(opt)) { + opt = props[key] = { type: opt, default: defaults[key] }; + } else { + opt.default = defaults[key]; + } + } else if (opt === null) { + opt = props[key] = { default: defaults[key] }; + } else { + warn$1(`props default key "${key}" has no corresponding declaration.`); + } + if (opt && defaults[`__skip_${key}`]) { + opt.skipFactory = true; + } + } + return props; + } + function mergeModels(a, b) { + if (!a || !b) return a || b; + if (isArray(a) && isArray(b)) return a.concat(b); + return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); + } + function createPropsRestProxy(props, excludedKeys) { + const ret = {}; + for (const key in props) { + if (!excludedKeys.includes(key)) { + Object.defineProperty(ret, key, { + enumerable: true, + get: () => props[key] + }); + } + } + return ret; + } + function withAsyncContext(getAwaitable) { + const ctx = getCurrentInstance(); + if (!ctx) { + warn$1( + `withAsyncContext called without active current instance. This is likely a bug.` + ); + } + let awaitable = getAwaitable(); + unsetCurrentInstance(); + if (isPromise(awaitable)) { + awaitable = awaitable.catch((e) => { + setCurrentInstance(ctx); + throw e; + }); + } + return [awaitable, () => setCurrentInstance(ctx)]; + } + + function createDuplicateChecker() { + const cache = /* @__PURE__ */ Object.create(null); + return (type, key) => { + if (cache[key]) { + warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); + } else { + cache[key] = type; + } + }; + } + let shouldCacheAccess = true; + function applyOptions(instance) { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook$1(options.beforeCreate, instance, "bc"); + } + const { + // state + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, + // lifecycle + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, + // public API + expose, + inheritAttrs, + // assets + components, + directives, + filters + } = options; + const checkDuplicateProperties = createDuplicateChecker() ; + { + const [propsOptions] = instance.propsOptions; + if (propsOptions) { + for (const key in propsOptions) { + checkDuplicateProperties("Props" /* PROPS */, key); + } + } + } + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (isFunction(methodHandler)) { + { + Object.defineProperty(ctx, key, { + value: methodHandler.bind(publicThis), + configurable: true, + enumerable: true, + writable: true + }); + } + { + checkDuplicateProperties("Methods" /* METHODS */, key); + } + } else { + warn$1( + `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` + ); + } + } + } + if (dataOptions) { + if (!isFunction(dataOptions)) { + warn$1( + `The data option must be a function. Plain object usage is no longer supported.` + ); + } + const data = dataOptions.call(publicThis, publicThis); + if (isPromise(data)) { + warn$1( + `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` + ); + } + if (!isObject(data)) { + warn$1(`data() should return an object.`); + } else { + instance.data = reactive(data); + { + for (const key in data) { + checkDuplicateProperties("Data" /* DATA */, key); + if (!isReservedPrefix(key[0])) { + Object.defineProperty(ctx, key, { + configurable: true, + enumerable: true, + get: () => data[key], + set: NOOP + }); + } + } + } + } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + if (get === NOOP) { + warn$1(`Computed property "${key}" has no getter.`); + } + const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => { + warn$1( + `Write operation failed: computed property "${key}" is readonly.` + ); + } ; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + { + checkDuplicateProperties("Computed" /* COMPUTED */, key); + } + } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook$1(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val + }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; + } + } + if (render && instance.render === NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) instance.components = components; + if (directives) instance.directives = directives; + } + function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { + if (isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); + } + if (isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; + } + { + checkDuplicateProperties("Inject" /* INJECT */, key); + } + } + } + function callHook$1(hook, instance, type) { + callWithAsyncErrorHandling( + isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); + } + function createWatcher(raw, ctx, publicThis, key) { + let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (isString(raw)) { + const handler = ctx[raw]; + if (isFunction(handler)) { + { + watch(getter, handler); + } + } else { + warn$1(`Invalid watch handler specified by key "${raw}"`, handler); + } + } else if (isFunction(raw)) { + { + watch(getter, raw.bind(publicThis)); + } + } else if (isObject(raw)) { + if (isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (isFunction(handler)) { + watch(getter, handler, raw); + } else { + warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); + } + } + } else { + warn$1(`Invalid watch option: "${key}"`, raw); + } + } + function resolveMergedOptions(instance) { + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; + } + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); + } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (isObject(base)) { + cache.set(base, resolved); + } + return resolved; + } + function mergeOptions(to, from, strats, asMixin = false) { + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") { + warn$1( + `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` + ); + } else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; + } + } + return to; + } + const internalOptionMergeStrats = { + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray$1, + created: mergeAsArray$1, + beforeMount: mergeAsArray$1, + mounted: mergeAsArray$1, + beforeUpdate: mergeAsArray$1, + updated: mergeAsArray$1, + beforeDestroy: mergeAsArray$1, + beforeUnmount: mergeAsArray$1, + destroyed: mergeAsArray$1, + unmounted: mergeAsArray$1, + activated: mergeAsArray$1, + deactivated: mergeAsArray$1, + errorCaptured: mergeAsArray$1, + serverPrefetch: mergeAsArray$1, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject + }; + function mergeDataFn(to, from) { + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (extend)( + isFunction(to) ? to.call(this, this) : to, + isFunction(from) ? from.call(this, this) : from + ); + }; + } + function mergeInject(to, from) { + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); + } + function normalizeInject(raw) { + if (isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; + } + return res; + } + return raw; + } + function mergeAsArray$1(to, from) { + return to ? [...new Set([].concat(to, from))] : from; + } + function mergeObjectOptions(to, from) { + return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; + } + function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (isArray(to) && isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } + } + function mergeWatchOptions(to, from) { + if (!to) return from; + if (!from) return to; + const merged = extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray$1(to[key], from[key]); + } + return merged; + } + + function createAppContext() { + return { + app: null, + config: { + isNativeTag: NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; + } + let uid$1 = 0; + function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!isFunction(rootComponent)) { + rootComponent = extend({}, rootComponent); + } + if (rootProps != null && !isObject(rootProps)) { + warn$1(`root props passed to app.mount() must be an object.`); + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + const pluginCleanupFns = []; + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + { + warn$1( + `app.config cannot be replaced. Modify individual options instead.` + ); + } + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) { + warn$1(`Plugin has already been applied to target app.`); + } else if (plugin && isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else { + warn$1( + `A plugin must either be a function or an object with an "install" function.` + ); + } + return app; + }, + mixin(mixin) { + { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } else { + warn$1( + "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") + ); + } + } + return app; + }, + component(name, component) { + { + validateComponentName(name, context.config); + } + if (!component) { + return context.components[name]; + } + if (context.components[name]) { + warn$1(`Component "${name}" has already been registered in target app.`); + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + { + validateDirectiveName(name); + } + if (!directive) { + return context.directives[name]; + } + if (context.directives[name]) { + warn$1(`Directive "${name}" has already been registered in target app.`); + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + if (rootContainer.__vue_app__) { + warn$1( + `There is already an app instance mounted on the host container. + If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` + ); + } + const vnode = app._ceVNode || createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + { + context.reload = () => { + render( + cloneVNode(vnode), + rootContainer, + namespace + ); + }; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + { + app._instance = vnode.component; + devtoolsInitApp(app, version); + } + return getComponentPublicInstance(vnode.component); + } else { + warn$1( + `App has already been mounted. +If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` + ); + } + }, + onUnmount(cleanupFn) { + if (typeof cleanupFn !== "function") { + warn$1( + `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}` + ); + } + pluginCleanupFns.push(cleanupFn); + }, + unmount() { + if (isMounted) { + callWithAsyncErrorHandling( + pluginCleanupFns, + app._instance, + 16 + ); + render(null, app._container); + { + app._instance = null; + devtoolsUnmountApp(app); + } + delete app._container.__vue_app__; + } else { + warn$1(`Cannot unmount an app that is not mounted.`); + } + }, + provide(key, value) { + if (key in context.provides) { + warn$1( + `App already provides property with key "${String(key)}". It will be overwritten with the new value.` + ); + } + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + const lastApp = currentApp; + currentApp = app; + try { + return fn(); + } finally { + currentApp = lastApp; + } + } + }; + return app; + }; + } + let currentApp = null; + + function provide(key, value) { + if (!currentInstance) { + { + warn$1(`provide() can only be used inside setup().`); + } + } else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); + } + provides[key] = value; + } + } + function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else { + warn$1(`injection "${String(key)}" not found.`); + } + } else { + warn$1(`inject() can only be used inside setup() or functional components.`); + } + } + function hasInjectionContext() { + return !!(currentInstance || currentRenderingInstance || currentApp); + } + + const internalObjectProto = {}; + const createInternalObject = () => Object.create(internalObjectProto); + const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; + + function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = createInternalObject(); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + { + validateProps(rawProps || {}, props, instance); + } + if (isStateful) { + instance.props = isSSR ? props : shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; + } + function isInHmrContext(instance) { + while (instance) { + if (instance.type.__hmrId) return true; + instance = instance.parent; + } + } + function updateProps(instance, rawProps, rawPrevProps, optimized) { + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( + // always force full diff in dev + // - #1942 if hmr is enabled with sfc component + // - vite#872 non-sfc component used by sfc component + !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; + } + const value = rawProps[key]; + if (options) { + if (hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; + } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; + } + } + } + } + if (hasAttrsChanged) { + trigger(instance.attrs, "set", ""); + } + { + validateProps(rawProps || {}, props, instance); + } + } + function setFullProps(instance, rawProps, props, attrs) { + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && hasOwn(options, camelKey = camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; + } + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + if (needCastKeys) { + const rawCurrentProps = toRaw(props); + const castValues = rawCastValues || EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; + } + function resolvePropValue(options, props, key, value, instance, isAbsent) { + const opt = options[key]; + if (opt != null) { + const hasDefault = hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); + } + } else { + value = defaultValue; + } + if (instance.ce) { + instance.ce._setProp(key, value); + } + } + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { + value = true; + } + } + } + return value; + } + const mixinPropsCache = /* @__PURE__ */ new WeakMap(); + function normalizePropsOptions(comp, appContext, asMixin = false) { + const cache = asMixin ? mixinPropsCache : appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (!isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + extend(normalized, props); + if (keys) needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); + } + if (comp.extends) { + extendProps(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendProps); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, EMPTY_ARR); + } + return EMPTY_ARR; + } + if (isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + if (!isString(raw[i])) { + warn$1(`props must be strings when using array syntax.`, raw[i]); + } + const normalizedKey = camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = EMPTY_OBJ; + } + } + } else if (raw) { + if (!isObject(raw)) { + warn$1(`invalid props options`, raw); + } + for (const key in raw) { + const normalizedKey = camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); + const propType = prop.type; + let shouldCast = false; + let shouldCastTrue = true; + if (isArray(propType)) { + for (let index = 0; index < propType.length; ++index) { + const type = propType[index]; + const typeName = isFunction(type) && type.name; + if (typeName === "Boolean") { + shouldCast = true; + break; + } else if (typeName === "String") { + shouldCastTrue = false; + } + } + } else { + shouldCast = isFunction(propType) && propType.name === "Boolean"; + } + prop[0 /* shouldCast */] = shouldCast; + prop[1 /* shouldCastTrue */] = shouldCastTrue; + if (shouldCast || hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + const res = [normalized, needCastKeys]; + if (isObject(comp)) { + cache.set(comp, res); + } + return res; + } + function validatePropName(key) { + if (key[0] !== "$" && !isReservedProp(key)) { + return true; + } else { + warn$1(`Invalid prop name: "${key}" is a reserved property.`); + } + return false; + } + function getType(ctor) { + if (ctor === null) { + return "null"; + } + if (typeof ctor === "function") { + return ctor.name || ""; + } else if (typeof ctor === "object") { + const name = ctor.constructor && ctor.constructor.name; + return name || ""; + } + return ""; + } + function validateProps(rawProps, props, instance) { + const resolvedValues = toRaw(props); + const options = instance.propsOptions[0]; + const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key)); + for (const key in options) { + let opt = options[key]; + if (opt == null) continue; + validateProp( + key, + resolvedValues[key], + opt, + shallowReadonly(resolvedValues) , + !camelizePropsKey.includes(key) + ); + } + } + function validateProp(name, value, prop, props, isAbsent) { + const { type, required, validator, skipCheck } = prop; + if (required && isAbsent) { + warn$1('Missing required prop: "' + name + '"'); + return; + } + if (value == null && !required) { + return; + } + if (type != null && type !== true && !skipCheck) { + let isValid = false; + const types = isArray(type) ? type : [type]; + const expectedTypes = []; + for (let i = 0; i < types.length && !isValid; i++) { + const { valid, expectedType } = assertType(value, types[i]); + expectedTypes.push(expectedType || ""); + isValid = valid; + } + if (!isValid) { + warn$1(getInvalidTypeMessage(name, value, expectedTypes)); + return; + } + } + if (validator && !validator(value, props)) { + warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + } + } + const isSimpleType = /* @__PURE__ */ makeMap( + "String,Number,Boolean,Function,Symbol,BigInt" + ); + function assertType(value, type) { + let valid; + const expectedType = getType(type); + if (expectedType === "null") { + valid = value === null; + } else if (isSimpleType(expectedType)) { + const t = typeof value; + valid = t === expectedType.toLowerCase(); + if (!valid && t === "object") { + valid = value instanceof type; + } + } else if (expectedType === "Object") { + valid = isObject(value); + } else if (expectedType === "Array") { + valid = isArray(value); + } else { + valid = value instanceof type; + } + return { + valid, + expectedType + }; + } + function getInvalidTypeMessage(name, value, expectedTypes) { + if (expectedTypes.length === 0) { + return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; + } + let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; + const expectedType = expectedTypes[0]; + const receivedType = toRawType(value); + const expectedValue = styleValue(value, expectedType); + const receivedValue = styleValue(value, receivedType); + if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { + message += ` with value ${expectedValue}`; + } + message += `, got ${receivedType} `; + if (isExplicable(receivedType)) { + message += `with value ${receivedValue}.`; + } + return message; + } + function styleValue(value, type) { + if (type === "String") { + return `"${value}"`; + } else if (type === "Number") { + return `${Number(value)}`; + } else { + return `${value}`; + } + } + function isExplicable(type) { + const explicitTypes = ["string", "number", "boolean"]; + return explicitTypes.some((elem) => type.toLowerCase() === elem); + } + function isBoolean(...args) { + return args.some((elem) => elem.toLowerCase() === "boolean"); + } + + const isInternalKey = (key) => key[0] === "_" || key === "$stable"; + const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; + const normalizeSlot = (key, rawSlot, ctx) => { + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { + warn$1( + `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` + ); + } + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; + }; + const normalizeObjectSlots = (rawSlots, slots, instance) => { + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) continue; + const value = rawSlots[key]; + if (isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + { + warn$1( + `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; + } + } + }; + const normalizeVNodeSlots = (instance, children) => { + if (!isKeepAlive(instance.vnode) && true) { + warn$1( + `Non-function value encountered for default slot. Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; + }; + const assignSlots = (slots, children, optimized) => { + for (const key in children) { + if (optimized || key !== "_") { + slots[key] = children[key]; + } + } + }; + const initSlots = (instance, children, optimized) => { + const slots = instance.slots = createInternalObject(); + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + assignSlots(slots, children, optimized); + if (optimized) { + def(slots, "_", type, true); + } + } else { + normalizeObjectSlots(children, slots); + } + } else if (children) { + normalizeVNodeSlots(instance, children); + } + }; + const updateSlots = (instance, children, optimized) => { + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (isHmrUpdating) { + assignSlots(slots, children, optimized); + trigger(instance, "set", "$slots"); + } else if (optimized && type === 1) { + needDeletionCheck = false; + } else { + assignSlots(slots, children, optimized); + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); + } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } + } + } + }; + + let supported; + let perf; + function startMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + perf.mark(`vue-${type}-${instance.uid}`); + } + { + devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); + } + } + function endMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + const startTag = `vue-${type}-${instance.uid}`; + const endTag = startTag + `:end`; + perf.mark(endTag); + perf.measure( + `<${formatComponentName(instance, instance.type)}> ${type}`, + startTag, + endTag + ); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + } + { + devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); + } + } + function isSupported() { + if (supported !== void 0) { + return supported; + } + if (typeof window !== "undefined" && window.performance) { + supported = true; + perf = window.performance; + } else { + supported = false; + } + return supported; + } + + const queuePostRenderEffect = queueEffectWithSuspense ; + function createRenderer(options) { + return baseCreateRenderer(options); + } + function createHydrationRenderer(options) { + return baseCreateRenderer(options, createHydrationFunctions); + } + function baseCreateRenderer(options, createHydrationFns) { + const target = getGlobalThis(); + target.__VUE__ = true; + { + setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + } + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { + if (n1 === n2) { + return; + } + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: + if (n1 == null) { + mountStaticNode(n2, container, anchor, namespace); + } else { + patchStaticNode(n1, n2, container, namespace); + } + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else { + warn$1("Invalid VNode type:", type, `(${typeof type})`); + } + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const patchStaticNode = (n1, n2, container, namespace) => { + if (n2.children !== n1.children) { + const anchor = hostNextSibling(n1.anchor); + removeStaticNode(n1); + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace + ); + } else { + n2.el = n1.el; + n2.anchor = n1.anchor; + } + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !isReservedProp(key)) { + hostPatchProp(el, key, null, props[key], namespace, parentComponent); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + { + def(el, "__vnode", vnode, true); + def(el, "__vueParentComponent", parentComponent, true); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { + subTree = filterSingleRoot(subTree.children) || subTree; + } + if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + { + el.__vnode = n2; + } + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || EMPTY_OBJ; + const newProps = n2.props || EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (isHmrUpdating) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { + hostSetElementText(el, ""); + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + } + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); + } + } + } else if (!optimized && dynamicChildren == null) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== EMPTY_OBJ) { + for (const key in oldProps) { + if (!isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + parentComponent + ); + } + } + } + for (const key in newProps) { + if (isReservedProp(key)) continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if ( + // #5523 dev root fragment may inherit directives + isHmrUpdating || patchFlag & 2048 + ) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance( + initialVNode, + parentComponent, + parentSuspense + )); + if (instance.type.__hmrId) { + registerHMR(instance); + } + { + pushWarningContext(initialVNode); + startMeasure(instance, `mount`); + } + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } + { + { + startMeasure(instance, `init`); + } + setupComponent(instance, false, optimized); + { + endMeasure(instance, `init`); + } + } + if (instance.asyncDep) { + if (isHmrUpdating) initialVNode.el = null; + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); + } + { + popWarningContext(); + endMeasure(instance, `mount`); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + { + pushWarningContext(n2); + } + updateComponentPreRender(instance, n2, optimized); + { + popWarningContext(); + } + return; + } else { + instance.next = n2; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { + let vnodeHook; + const { el, props } = initialVNode; + const { bm, m, parent, root, type } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + invokeArrayFns(bm); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); + } + toggleRecurse(instance, true); + if (el && hydrateNode) { + const hydrateSubTree = () => { + { + startMeasure(instance, `render`); + } + instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `hydrate`); + } + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + { + endMeasure(instance, `hydrate`); + } + }; + if (isAsyncWrapperVNode && type.__asyncHydrate) { + type.__asyncHydrate( + el, + instance, + hydrateSubTree + ); + } else { + hydrateSubTree(); + } + } else { + if (root.ce) { + root.ce._injectChildStyle(type); + } + { + startMeasure(instance, `render`); + } + const subTree = instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `patch`); + } + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + initialVNode.el = subTree.el; + } + if (m) { + queuePostRenderEffect(m, parentSuspense); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); + } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); + } + instance.isMounted = true; + { + devtoolsComponentAdded(instance); + } + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); + return; + } + } + let originNext = next; + let vnodeHook; + { + pushWarningContext(next || instance.vnode); + } + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; + } + if (bu) { + invokeArrayFns(bu); + } + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); + } + toggleRecurse(instance, true); + { + startMeasure(instance, `render`); + } + const nextTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + const prevTree = instance.subTree; + instance.subTree = nextTree; + { + startMeasure(instance, `patch`); + } + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); + } + if (u) { + queuePostRenderEffect(u, parentSuspense); + } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); + } + { + devtoolsComponentUpdated(instance); + } + { + popWarningContext(); + } + } + }; + instance.scope.on(); + const effect = instance.effect = new ReactiveEffect(componentUpdateFn); + instance.scope.off(); + const update = instance.update = effect.run.bind(effect); + const job = instance.job = effect.runIfDirty.bind(effect); + job.i = instance; + job.id = instance.uid; + effect.scheduler = () => queueJob(job); + toggleRecurse(instance, true); + { + effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; + effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; + } + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + pauseTracking(); + flushPreFlushCbs(instance); + resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || EMPTY_ARR; + c2 = c2 || EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (nextChild.key != null) { + if (keyToNewIndexMap.has(nextChild.key)) { + warn$1( + `Duplicate keys found during update:`, + JSON.stringify(nextChild.key), + `Make sure keys are unique.` + ); + } + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs, + cacheIndex + } = vnode; + if (patchFlag === -2) { + optimized = false; + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (cacheIndex != null) { + parentComponent.renderCache[cacheIndex] = void 0; + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + internals, + doRemove + ); + } else if (dynamicChildren && // #5154 + // when v-once is used inside a block, setBlockTracking(-1) marks the + // parent block with hasOnce: true + // so that it doesn't take the fast path during unmount - otherwise + // components nested in v-once are never unmounted. + !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { + vnode.children.forEach((child) => { + if (child.type === Comment) { + hostRemove(child.el); + } else { + remove(child); + } + }); + } else { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } + }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + if (instance.type.__hmrId) { + unregisterHMR(instance); + } + const { bum, scope, job, subTree, um, m, a } = instance; + invalidateMount(m); + invalidateMount(a); + if (bum) { + invokeArrayFns(bum); + } + scope.stop(); + if (job) { + job.flags |= 8; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + { + devtoolsComponentRemoved(instance); + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + const el = hostNextSibling(vnode.anchor || vnode.el); + const teleportEnd = el && el[TeleportEndKey]; + return teleportEnd ? hostNextSibling(teleportEnd) : el; + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + container._vnode = vnode; + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + if (createHydrationFns) { + [hydrate, hydrateNode] = createHydrationFns( + internals + ); + } + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; + } + function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; + } + function toggleRecurse({ effect, job }, allowed) { + if (allowed) { + effect.flags |= 32; + job.flags |= 4; + } else { + effect.flags &= ~32; + job.flags &= ~4; + } + } + function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; + } + function traverseStaticChildren(n1, n2, shallow = false) { + const ch1 = n1.children; + const ch2 = n2.children; + if (isArray(ch1) && isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; + } + if (!shallow && c2.patchFlag !== -2) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } + if (c2.type === Comment && !c2.el) { + c2.el = c1.el; + } + } + } + } + function getSequence(arr) { + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; + } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } + } + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; + } + function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); + } + } + } + function invalidateMount(hooks) { + if (hooks) { + for (let i = 0; i < hooks.length; i++) + hooks[i].flags |= 8; + } + } + + const ssrContextKey = Symbol.for("v-scx"); + const useSSRContext = () => { + { + warn$1(`useSSRContext() is not supported in the global build.`); + } + }; + + function watchEffect(effect, options) { + return doWatch(effect, null, options); + } + function watchPostEffect(effect, options) { + return doWatch( + effect, + null, + extend({}, options, { flush: "post" }) + ); + } + function watchSyncEffect(effect, options) { + return doWatch( + effect, + null, + extend({}, options, { flush: "sync" }) + ); + } + function watch(source, cb, options) { + if (!isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); + } + function doWatch(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, flush, once } = options; + if (!cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + } + const baseWatchOptions = extend({}, options); + baseWatchOptions.onWarn = warn$1; + const instance = currentInstance; + baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args); + let isPre = false; + if (flush === "post") { + baseWatchOptions.scheduler = (job) => { + queuePostRenderEffect(job, instance && instance.suspense); + }; + } else if (flush !== "sync") { + isPre = true; + baseWatchOptions.scheduler = (job, isFirstRun) => { + if (isFirstRun) { + job(); + } else { + queueJob(job); + } + }; + } + baseWatchOptions.augmentJob = (job) => { + if (cb) { + job.flags |= 4; + } + if (isPre) { + job.flags |= 2; + if (instance) { + job.id = instance.uid; + job.i = instance; + } + } + }; + const watchHandle = watch$1(source, cb, baseWatchOptions); + return watchHandle; + } + function instanceWatch(source, value, options) { + const publicThis = this.proxy; + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; + } + function createPathGetter(ctx, path) { + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; + } + + function useModel(props, name, options = EMPTY_OBJ) { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useModel() called without active instance.`); + return ref(); + } + const camelizedName = camelize(name); + if (!i.propsOptions[0][camelizedName]) { + warn$1(`useModel() called with prop "${name}" which is not declared.`); + return ref(); + } + const hyphenatedName = hyphenate(name); + const modifiers = getModelModifiers(props, camelizedName); + const res = customRef((track, trigger) => { + let localValue; + let prevSetValue = EMPTY_OBJ; + let prevEmittedValue; + watchSyncEffect(() => { + const propValue = props[camelizedName]; + if (hasChanged(localValue, propValue)) { + localValue = propValue; + trigger(); + } + }); + return { + get() { + track(); + return options.get ? options.get(localValue) : localValue; + }, + set(value) { + const emittedValue = options.set ? options.set(value) : value; + if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) { + return; + } + const rawProps = i.vnode.props; + if (!(rawProps && // check if parent has passed v-model + (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) { + localValue = value; + trigger(); + } + i.emit(`update:${name}`, emittedValue); + if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) { + trigger(); + } + prevSetValue = value; + prevEmittedValue = emittedValue; + } + }; + }); + res[Symbol.iterator] = () => { + let i2 = 0; + return { + next() { + if (i2 < 2) { + return { value: i2++ ? modifiers || EMPTY_OBJ : res, done: false }; + } else { + return { done: true }; + } + } + }; + }; + return res; + } + const getModelModifiers = (props, modelName) => { + return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`]; + }; + + function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) return; + const props = instance.vnode.props || EMPTY_OBJ; + { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.` + ); + } + } else { + const validator = emitsOptions[event]; + if (isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } + } + } + } + } + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modifiers = isModelListener && getModelModifiers(props, event.slice(7)); + if (modifiers) { + if (modifiers.trim) { + args = rawArgs.map((a) => isString(a) ? a.trim() : a); + } + if (modifiers.number) { + args = rawArgs.map(looseToNumber); + } + } + { + devtoolsComponentEmit(instance, event, args); + } + { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( + event + )}" instead of "${event}".` + ); + } + } + let handlerName; + let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; + } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } + } + function normalizeEmitsOptions(comp, appContext, asMixin = false) { + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (!isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); + } + if (comp.extends) { + extendEmits(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendEmits); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); + } + return null; + } + if (isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { + cache.set(comp, normalized); + } + return normalized; + } + function isEmitListener(options, key) { + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); + } + + let accessedAttrs = false; + function markAttrsAccessed() { + accessedAttrs = true; + } + function renderComponentRoot(instance) { + const { + type: Component, + vnode, + proxy, + withProxy, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + props, + data, + setupState, + ctx, + inheritAttrs + } = instance; + const prev = setCurrentRenderingInstance(instance); + let result; + let fallthroughAttrs; + { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); + } + }) : proxyToUse; + result = normalizeVNode( + render.call( + thisProxy, + proxyToUse, + renderCache, + true ? shallowReadonly(props) : props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode( + render2.length > 1 ? render2( + true ? shallowReadonly(props) : props, + true ? { + get attrs() { + markAttrsAccessed(); + return shallowReadonly(attrs); + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + true ? shallowReadonly(props) : props, + null + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs, false, true); + } else if (!accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (isOn(key)) { + if (!isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); + } + } else { + extraAttrs.push(key); + } + } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.` + ); + } + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); + } + } + } + } + if (vnode.dirs) { + if (!isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); + } + root = cloneVNode(root, null, false, true); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!isElementRoot(root)) { + warn$1( + `Component inside <Transition> renders non-element root node that cannot be animated.` + ); + } + setTransitionHooks(root, vnode.transition); + } + if (setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance(prev); + return result; + } + const getChildRoot = (vnode) => { + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } + } + }; + return [normalizeVNode(childRoot), setRoot]; + }; + function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } + } + } + } else { + return; + } + } + return singleRoot; + } + const getFunctionalFallthrough = (attrs) => { + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || isOn(key)) { + (res || (res = {}))[key] = attrs[key]; + } + } + return res; + }; + const filterModelListeners = (attrs, props) => { + const res = {}; + for (const key in attrs) { + if (!isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; + } + } + return res; + }; + const isElementRoot = (vnode) => { + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; + }; + function shouldUpdateComponent(prevVNode, nextVNode, optimized) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if ((prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { + return true; + } + } + if (prevProps === nextProps) { + return false; + } + if (!prevProps) { + return !!nextProps; + } + if (!nextProps) { + return true; + } + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; + } + function hasPropsChanged(prevProps, nextProps, emitsOptions) { + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; + } + } + return false; + } + function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; + } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } + } + + const isSuspense = (type) => type.__isSuspense; + let suspenseId = 0; + const SuspenseImpl = { + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { + n2.suspense = n1.suspense; + n2.suspense.vnode = n2; + n2.el = n1.el; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + normalize: normalizeSuspenseChildren + }; + const Suspense = SuspenseImpl ; + function triggerEvent(vnode, name) { + const eventListener = vnode.props && vnode.props[name]; + if (isFunction(eventListener)) { + eventListener(); + } + } + function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } + } + function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } + } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); + } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); + } + } + } + } + } + let hasWarned = false; + function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + if (!hasWarned) { + hasWarned = true; + console[console.info ? "info" : "log"]( + `<Suspense> is an experimental feature and its API will likely change.` + ); + } + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; + } + } + const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; + { + assertNumber(timeout, `Suspense timeout`); + } + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + { + if (!resume && !suspense.pendingBranch) { + throw new Error( + `suspense.resolve() is called without a pending branch.` + ); + } + if (suspense.isUnmounted) { + throw new Error( + `suspense.resolve() is called on an already unmounted suspense boundary.` + ); + } + } + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) === container2) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect, optimized2) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + { + pushWarningContext(vnode2); + } + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized2 + ); + if (placeholder) { + remove(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + { + popWarningContext(); + } + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + } + }; + return suspense; + } + function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; + } + function normalizeSuspenseChildren(vnode) { + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); + } + function normalizeSuspenseSlot(s) { + let block; + if (isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); + } + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); + } + } + if (isArray(s)) { + const singleChild = filterSingleRoot(s); + if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { + warn$1(`<Suspense> slots expect a single root node.`); + } + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; + } + function queueEffectWithSuspense(fn, suspense) { + if (suspense && suspense.pendingBranch) { + if (isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); + } + } else { + queuePostFlushCb(fn); + } + } + function setActiveBranch(suspense, branch) { + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } + } + function isVNodeSuspensible(vnode) { + const suspensible = vnode.props && vnode.props.suspensible; + return suspensible != null && suspensible !== false; + } + + const Fragment = Symbol.for("v-fgt"); + const Text = Symbol.for("v-txt"); + const Comment = Symbol.for("v-cmt"); + const Static = Symbol.for("v-stc"); + const blockStack = []; + let currentBlock = null; + function openBlock(disableTracking = false) { + blockStack.push(currentBlock = disableTracking ? null : []); + } + function closeBlock() { + blockStack.pop(); + currentBlock = blockStack[blockStack.length - 1] || null; + } + let isBlockTreeEnabled = 1; + function setBlockTracking(value, inVOnce = false) { + isBlockTreeEnabled += value; + if (value < 0 && currentBlock && inVOnce) { + currentBlock.hasOnce = true; + } + } + function setupBlock(vnode) { + vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; + closeBlock(); + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(vnode); + } + return vnode; + } + function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { + return setupBlock( + createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + true + ) + ); + } + function createBlock(type, props, children, patchFlag, dynamicProps) { + return setupBlock( + createVNode( + type, + props, + children, + patchFlag, + dynamicProps, + true + ) + ); + } + function isVNode(value) { + return value ? value.__v_isVNode === true : false; + } + function isSameVNodeType(n1, n2) { + if (n2.shapeFlag & 6 && n1.component) { + const dirtyInstances = hmrDirtyComponents.get(n2.type); + if (dirtyInstances && dirtyInstances.has(n1.component)) { + n1.shapeFlag &= ~256; + n2.shapeFlag &= ~512; + return false; + } + } + return n1.type === n2.type && n1.key === n2.key; + } + let vnodeArgsTransformer; + function transformVNodeArgs(transformer) { + vnodeArgsTransformer = transformer; + } + const createVNodeWithArgsTransform = (...args) => { + return _createVNode( + ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args + ); + }; + const normalizeKey = ({ key }) => key != null ? key : null; + const normalizeRef = ({ + ref, + ref_key, + ref_for + }) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; + }; + function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetStart: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); + } + } else if (children) { + vnode.shapeFlag |= isString(children) ? 8 : 16; + } + if (vnode.key !== vnode.key) { + warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; + } + const createVNode = createVNodeWithArgsTransform ; + function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { + if (!type || type === NULL_DYNAMIC_COMPONENT) { + if (!type) { + warn$1(`Invalid vnode type when creating vnode: ${type}.`); + } + type = Comment; + } + if (isVNode(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); + } + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } + } + cloned.patchFlag = -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (isObject(style)) { + if (isProxy(style) && !isArray(style)) { + style = extend({}, style); + } + props.style = normalizeStyle(style); + } + } + const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; + if (shapeFlag & 4 && isProxy(type)) { + type = toRaw(type); + warn$1( + `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, + ` +Component that was made reactive: `, + type + ); + } + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); + } + function guardReactiveProps(props) { + if (!props) return null; + return isProxy(props) || isInternalObject(props) ? extend({}, props) : props; + } + function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) { + const { props, ref, patchFlag, children, transition } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, + target: vnode.target, + targetStart: vnode.targetStart, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + if (transition && cloneTransition) { + setTransitionHooks( + cloned, + transition.clone(cloned) + ); + } + return cloned; + } + function deepCloneVNode(vnode) { + const cloned = cloneVNode(vnode); + if (isArray(vnode.children)) { + cloned.children = vnode.children.map(deepCloneVNode); + } + return cloned; + } + function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); + } + function createStaticVNode(content, numberOfNodes) { + const vnode = createVNode(Static, null, content); + vnode.staticCount = numberOfNodes; + return vnode; + } + function createCommentVNode(text = "", asBlock = false) { + return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); + } + function normalizeVNode(child) { + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (isVNode(child)) { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } + } + function cloneIfMounted(child) { + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); + } + function normalizeChildren(vnode, children) { + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !isInternalObject(children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; + } + } + } + } else if (isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; + } + } + vnode.children = children; + vnode.shapeFlag |= type; + } + function mergeProps(...args) { + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = normalizeClass([ret.class, toMerge.class]); + } + } else if (key === "style") { + ret.style = normalizeStyle([ret.style, toMerge.style]); + } else if (isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } + } + } + return ret; + } + function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); + } + + const emptyAppContext = createAppContext(); + let uid = 0; + function createComponentInstance(vnode, parent, suspense) { + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + job: null, + scope: new EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + ids: parent ? parent.ids : ["", 0, 0], + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: EMPTY_OBJ, + data: EMPTY_OBJ, + props: EMPTY_OBJ, + attrs: EMPTY_OBJ, + slots: EMPTY_OBJ, + refs: EMPTY_OBJ, + setupState: EMPTY_OBJ, + setupContext: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + { + instance.ctx = createDevRenderContext(instance); + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; + } + let currentInstance = null; + const getCurrentInstance = () => currentInstance || currentRenderingInstance; + let internalSetCurrentInstance; + let setInSSRSetupState; + { + internalSetCurrentInstance = (i) => { + currentInstance = i; + }; + setInSSRSetupState = (v) => { + isInSSRComponentSetup = v; + }; + } + const setCurrentInstance = (instance) => { + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; + }; + const unsetCurrentInstance = () => { + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); + }; + const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); + function validateComponentName(name, { isNativeTag }) { + if (isBuiltInTag(name) || isNativeTag(name)) { + warn$1( + "Do not use built-in or reserved HTML elements as component id: " + name + ); + } + } + function isStatefulComponent(instance) { + return instance.vnode.shapeFlag & 4; + } + let isInSSRComponentSetup = false; + function setupComponent(instance, isSSR = false, optimized = false) { + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children, optimized); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; + } + function setupStatefulComponent(instance, isSSR) { + var _a; + const Component = instance.type; + { + if (Component.name) { + validateComponentName(Component.name, instance.appContext.config); + } + if (Component.components) { + const names = Object.keys(Component.components); + for (let i = 0; i < names.length; i++) { + validateComponentName(names[i], instance.appContext.config); + } + } + if (Component.directives) { + const names = Object.keys(Component.directives); + for (let i = 0; i < names.length; i++) { + validateDirectiveName(names[i]); + } + } + if (Component.compilerOptions && isRuntimeOnly()) { + warn$1( + `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` + ); + } + } + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers); + { + exposePropsOnRenderContext(instance); + } + const { setup } = Component; + if (setup) { + pauseTracking(); + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + shallowReadonly(instance.props) , + setupContext + ] + ); + const isAsyncSetup = isPromise(setupResult); + resetTracking(); + reset(); + if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) { + markAsyncBoundary(instance); + } + if (isAsyncSetup) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + if (!instance.suspense) { + const name = (_a = Component.name) != null ? _a : "Anonymous"; + warn$1( + `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` + ); + } + } + } else { + handleSetupResult(instance, setupResult, isSSR); + } + } else { + finishComponentSetup(instance, isSSR); + } + } + function handleSetupResult(instance, setupResult, isSSR) { + if (isFunction(setupResult)) { + { + instance.render = setupResult; + } + } else if (isObject(setupResult)) { + if (isVNode(setupResult)) { + warn$1( + `setup() should not return VNodes directly - return a render function instead.` + ); + } + { + instance.devtoolsRawSetupState = setupResult; + } + instance.setupState = proxyRefs(setupResult); + { + exposeSetupStateOnRenderContext(instance); + } + } else if (setupResult !== void 0) { + warn$1( + `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` + ); + } + finishComponentSetup(instance, isSSR); + } + let compile$1; + let installWithProxy; + function registerRuntimeCompiler(_compile) { + compile$1 = _compile; + installWithProxy = (i) => { + if (i.render._rc) { + i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); + } + }; + } + const isRuntimeOnly = () => !compile$1; + function finishComponentSetup(instance, isSSR, skipOptions) { + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile$1 && !Component.render) { + const template = Component.template || resolveMergedOptions(instance).template; + if (template) { + { + startMeasure(instance, `compile`); + } + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = extend( + extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions + ); + Component.render = compile$1(template, finalCompilerOptions); + { + endMeasure(instance, `compile`); + } + } + } + instance.render = Component.render || NOOP; + if (installWithProxy) { + installWithProxy(instance); + } + } + { + const reset = setCurrentInstance(instance); + pauseTracking(); + try { + applyOptions(instance); + } finally { + resetTracking(); + reset(); + } + } + if (!Component.render && instance.render === NOOP && !isSSR) { + if (!compile$1 && Component.template) { + warn$1( + `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.global.js" instead.` ) + ); + } else { + warn$1(`Component is missing template or render function: `, Component); + } + } + } + const attrsProxyHandlers = { + get(target, key) { + markAttrsAccessed(); + track(target, "get", ""); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } + } ; + function getSlotsProxy(instance) { + return new Proxy(instance.slots, { + get(target, key) { + track(instance, "get", "$slots"); + return target[key]; + } + }); + } + function createSetupContext(instance) { + const expose = (exposed) => { + { + if (instance.exposed) { + warn$1(`expose() should be called only once per setup().`); + } + if (exposed != null) { + let exposedType = typeof exposed; + if (exposedType === "object") { + if (isArray(exposed)) { + exposedType = "array"; + } else if (isRef(exposed)) { + exposedType = "ref"; + } + } + if (exposedType !== "object") { + warn$1( + `expose() should be passed a plain object, received ${exposedType}.` + ); + } + } + } + instance.exposed = exposed || {}; + }; + { + let attrsProxy; + let slotsProxy; + return Object.freeze({ + get attrs() { + return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers)); + }, + get slots() { + return slotsProxy || (slotsProxy = getSlotsProxy(instance)); + }, + get emit() { + return (event, ...args) => instance.emit(event, ...args); + }, + expose + }); + } + } + function getComponentPublicInstance(instance) { + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); + } + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } else { + return instance.proxy; + } + } + const classifyRE = /(?:^|[-_])(\w)/g; + const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); + function getComponentName(Component, includeInferred = true) { + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; + } + function formatComponentName(instance, Component, isRoot = false) { + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; + } + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; + } + function isClassComponent(value) { + return isFunction(value) && "__vccOpts" in value; + } + + const computed = (getterOrOptions, debugOptions) => { + const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); + { + const i = getCurrentInstance(); + if (i && i.appContext.config.warnRecursiveComputed) { + c._warnRecursive = true; + } + } + return c; + }; + + function h(type, propsOrChildren, children) { + const l = arguments.length; + if (l === 2) { + if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { + if (isVNode(propsOrChildren)) { + return createVNode(type, null, [propsOrChildren]); + } + return createVNode(type, propsOrChildren); + } else { + return createVNode(type, null, propsOrChildren); + } + } else { + if (l > 3) { + children = Array.prototype.slice.call(arguments, 2); + } else if (l === 3 && isVNode(children)) { + children = [children]; + } + return createVNode(type, propsOrChildren, children); + } + } + + function initCustomFormatter() { + if (typeof window === "undefined") { + return; + } + const vueStyle = { style: "color:#3ba776" }; + const numberStyle = { style: "color:#1677ff" }; + const stringStyle = { style: "color:#f5222d" }; + const keywordStyle = { style: "color:#eb2f96" }; + const formatter = { + __vue_custom_formatter: true, + header(obj) { + if (!isObject(obj)) { + return null; + } + if (obj.__isVue) { + return ["div", vueStyle, `VueInstance`]; + } else if (isRef(obj)) { + return [ + "div", + {}, + ["span", vueStyle, genRefFlag(obj)], + "<", + // avoid debugger accessing value affecting behavior + formatValue("_value" in obj ? obj._value : obj), + `>` + ]; + } else if (isReactive(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"], + "<", + formatValue(obj), + `>${isReadonly(obj) ? ` (readonly)` : ``}` + ]; + } else if (isReadonly(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"], + "<", + formatValue(obj), + ">" + ]; + } + return null; + }, + hasBody(obj) { + return obj && obj.__isVue; + }, + body(obj) { + if (obj && obj.__isVue) { + return [ + "div", + {}, + ...formatInstance(obj.$) + ]; + } + } + }; + function formatInstance(instance) { + const blocks = []; + if (instance.type.props && instance.props) { + blocks.push(createInstanceBlock("props", toRaw(instance.props))); + } + if (instance.setupState !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("setup", instance.setupState)); + } + if (instance.data !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("data", toRaw(instance.data))); + } + const computed = extractKeys(instance, "computed"); + if (computed) { + blocks.push(createInstanceBlock("computed", computed)); + } + const injected = extractKeys(instance, "inject"); + if (injected) { + blocks.push(createInstanceBlock("injected", injected)); + } + blocks.push([ + "div", + {}, + [ + "span", + { + style: keywordStyle.style + ";opacity:0.66" + }, + "$ (internal): " + ], + ["object", { object: instance }] + ]); + return blocks; + } + function createInstanceBlock(type, target) { + target = extend({}, target); + if (!Object.keys(target).length) { + return ["span", {}]; + } + return [ + "div", + { style: "line-height:1.25em;margin-bottom:0.6em" }, + [ + "div", + { + style: "color:#476582" + }, + type + ], + [ + "div", + { + style: "padding-left:1.25em" + }, + ...Object.keys(target).map((key) => { + return [ + "div", + {}, + ["span", keywordStyle, key + ": "], + formatValue(target[key], false) + ]; + }) + ] + ]; + } + function formatValue(v, asRaw = true) { + if (typeof v === "number") { + return ["span", numberStyle, v]; + } else if (typeof v === "string") { + return ["span", stringStyle, JSON.stringify(v)]; + } else if (typeof v === "boolean") { + return ["span", keywordStyle, v]; + } else if (isObject(v)) { + return ["object", { object: asRaw ? toRaw(v) : v }]; + } else { + return ["span", stringStyle, String(v)]; + } + } + function extractKeys(instance, type) { + const Comp = instance.type; + if (isFunction(Comp)) { + return; + } + const extracted = {}; + for (const key in instance.ctx) { + if (isKeyOfType(Comp, key, type)) { + extracted[key] = instance.ctx[key]; + } + } + return extracted; + } + function isKeyOfType(Comp, key, type) { + const opts = Comp[type]; + if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) { + return true; + } + if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { + return true; + } + if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { + return true; + } + } + function genRefFlag(v) { + if (isShallow(v)) { + return `ShallowRef`; + } + if (v.effect) { + return `ComputedRef`; + } + return `Ref`; + } + if (window.devtoolsFormatters) { + window.devtoolsFormatters.push(formatter); + } else { + window.devtoolsFormatters = [formatter]; + } + } + + function withMemo(memo, render, cache, index) { + const cached = cache[index]; + if (cached && isMemoSame(cached, memo)) { + return cached; + } + const ret = render(); + ret.memo = memo.slice(); + ret.cacheIndex = index; + return cache[index] = ret; + } + function isMemoSame(cached, memo) { + const prev = cached.memo; + if (prev.length != memo.length) { + return false; + } + for (let i = 0; i < prev.length; i++) { + if (hasChanged(prev[i], memo[i])) { + return false; + } + } + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(cached); + } + return true; + } + + const version = "3.5.13"; + const warn = warn$1 ; + const ErrorTypeStrings = ErrorTypeStrings$1 ; + const devtools = devtools$1 ; + const setDevtoolsHook = setDevtoolsHook$1 ; + const ssrUtils = null; + const resolveFilter = null; + const compatUtils = null; + const DeprecationTypes = null; + + let policy = void 0; + const tt = typeof window !== "undefined" && window.trustedTypes; + if (tt) { + try { + policy = /* @__PURE__ */ tt.createPolicy("vue", { + createHTML: (val) => val + }); + } catch (e) { + warn(`Error creating trusted types policy: ${e}`); + } + } + const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val; + const svgNS = "http://www.w3.org/2000/svg"; + const mathmlNS = "http://www.w3.org/1998/Math/MathML"; + const doc = typeof document !== "undefined" ? document : null; + const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); + const nodeOps = { + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); + } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) break; + } + } else { + templateContainer.innerHTML = unsafeToTrustedHTML( + namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content + ); + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } + }; + + const TRANSITION$1 = "transition"; + const ANIMATION = "animation"; + const vtcKey = Symbol("_vtc"); + const DOMTransitionPropsValidators = { + name: String, + type: String, + css: { + type: Boolean, + default: true + }, + duration: [String, Number, Object], + enterFromClass: String, + enterActiveClass: String, + enterToClass: String, + appearFromClass: String, + appearActiveClass: String, + appearToClass: String, + leaveFromClass: String, + leaveActiveClass: String, + leaveToClass: String + }; + const TransitionPropsValidators = /* @__PURE__ */ extend( + {}, + BaseTransitionPropsValidators, + DOMTransitionPropsValidators + ); + const decorate$1 = (t) => { + t.displayName = "Transition"; + t.props = TransitionPropsValidators; + return t; + }; + const Transition = /* @__PURE__ */ decorate$1( + (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots) + ); + const callHook = (hook, args = []) => { + if (isArray(hook)) { + hook.forEach((h2) => h2(...args)); + } else if (hook) { + hook(...args); + } + }; + const hasExplicitCallback = (hook) => { + return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; + }; + function resolveTransitionProps(rawProps) { + const baseProps = {}; + for (const key in rawProps) { + if (!(key in DOMTransitionPropsValidators)) { + baseProps[key] = rawProps[key]; + } + } + if (rawProps.css === false) { + return baseProps; + } + const { + name = "v", + type, + duration, + enterFromClass = `${name}-enter-from`, + enterActiveClass = `${name}-enter-active`, + enterToClass = `${name}-enter-to`, + appearFromClass = enterFromClass, + appearActiveClass = enterActiveClass, + appearToClass = enterToClass, + leaveFromClass = `${name}-leave-from`, + leaveActiveClass = `${name}-leave-active`, + leaveToClass = `${name}-leave-to` + } = rawProps; + const durations = normalizeDuration(duration); + const enterDuration = durations && durations[0]; + const leaveDuration = durations && durations[1]; + const { + onBeforeEnter, + onEnter, + onEnterCancelled, + onLeave, + onLeaveCancelled, + onBeforeAppear = onBeforeEnter, + onAppear = onEnter, + onAppearCancelled = onEnterCancelled + } = baseProps; + const finishEnter = (el, isAppear, done, isCancelled) => { + el._enterCancelled = isCancelled; + removeTransitionClass(el, isAppear ? appearToClass : enterToClass); + removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); + done && done(); + }; + const finishLeave = (el, done) => { + el._isLeaving = false; + removeTransitionClass(el, leaveFromClass); + removeTransitionClass(el, leaveToClass); + removeTransitionClass(el, leaveActiveClass); + done && done(); + }; + const makeEnterHook = (isAppear) => { + return (el, done) => { + const hook = isAppear ? onAppear : onEnter; + const resolve = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve]); + nextFrame(() => { + removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); + addTransitionClass(el, isAppear ? appearToClass : enterToClass); + if (!hasExplicitCallback(hook)) { + whenTransitionEnds(el, type, enterDuration, resolve); + } + }); + }; + }; + return extend(baseProps, { + onBeforeEnter(el) { + callHook(onBeforeEnter, [el]); + addTransitionClass(el, enterFromClass); + addTransitionClass(el, enterActiveClass); + }, + onBeforeAppear(el) { + callHook(onBeforeAppear, [el]); + addTransitionClass(el, appearFromClass); + addTransitionClass(el, appearActiveClass); + }, + onEnter: makeEnterHook(false), + onAppear: makeEnterHook(true), + onLeave(el, done) { + el._isLeaving = true; + const resolve = () => finishLeave(el, done); + addTransitionClass(el, leaveFromClass); + if (!el._enterCancelled) { + forceReflow(); + addTransitionClass(el, leaveActiveClass); + } else { + addTransitionClass(el, leaveActiveClass); + forceReflow(); + } + nextFrame(() => { + if (!el._isLeaving) { + return; + } + removeTransitionClass(el, leaveFromClass); + addTransitionClass(el, leaveToClass); + if (!hasExplicitCallback(onLeave)) { + whenTransitionEnds(el, type, leaveDuration, resolve); + } + }); + callHook(onLeave, [el, resolve]); + }, + onEnterCancelled(el) { + finishEnter(el, false, void 0, true); + callHook(onEnterCancelled, [el]); + }, + onAppearCancelled(el) { + finishEnter(el, true, void 0, true); + callHook(onAppearCancelled, [el]); + }, + onLeaveCancelled(el) { + finishLeave(el); + callHook(onLeaveCancelled, [el]); + } + }); + } + function normalizeDuration(duration) { + if (duration == null) { + return null; + } else if (isObject(duration)) { + return [NumberOf(duration.enter), NumberOf(duration.leave)]; + } else { + const n = NumberOf(duration); + return [n, n]; + } + } + function NumberOf(val) { + const res = toNumber(val); + { + assertNumber(res, "<transition> explicit duration"); + } + return res; + } + function addTransitionClass(el, cls) { + cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); + (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); + } + function removeTransitionClass(el, cls) { + cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.delete(cls); + if (!_vtc.size) { + el[vtcKey] = void 0; + } + } + } + function nextFrame(cb) { + requestAnimationFrame(() => { + requestAnimationFrame(cb); + }); + } + let endId = 0; + function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { + const id = el._endId = ++endId; + const resolveIfNotStale = () => { + if (id === el._endId) { + resolve(); + } + }; + if (explicitTimeout != null) { + return setTimeout(resolveIfNotStale, explicitTimeout); + } + const { type, timeout, propCount } = getTransitionInfo(el, expectedType); + if (!type) { + return resolve(); + } + const endEvent = type + "end"; + let ended = 0; + const end = () => { + el.removeEventListener(endEvent, onEnd); + resolveIfNotStale(); + }; + const onEnd = (e) => { + if (e.target === el && ++ended >= propCount) { + end(); + } + }; + setTimeout(() => { + if (ended < propCount) { + end(); + } + }, timeout + 1); + el.addEventListener(endEvent, onEnd); + } + function getTransitionInfo(el, expectedType) { + const styles = window.getComputedStyle(el); + const getStyleProperties = (key) => (styles[key] || "").split(", "); + const transitionDelays = getStyleProperties(`${TRANSITION$1}Delay`); + const transitionDurations = getStyleProperties(`${TRANSITION$1}Duration`); + const transitionTimeout = getTimeout(transitionDelays, transitionDurations); + const animationDelays = getStyleProperties(`${ANIMATION}Delay`); + const animationDurations = getStyleProperties(`${ANIMATION}Duration`); + const animationTimeout = getTimeout(animationDelays, animationDurations); + let type = null; + let timeout = 0; + let propCount = 0; + if (expectedType === TRANSITION$1) { + if (transitionTimeout > 0) { + type = TRANSITION$1; + timeout = transitionTimeout; + propCount = transitionDurations.length; + } + } else if (expectedType === ANIMATION) { + if (animationTimeout > 0) { + type = ANIMATION; + timeout = animationTimeout; + propCount = animationDurations.length; + } + } else { + timeout = Math.max(transitionTimeout, animationTimeout); + type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION$1 : ANIMATION : null; + propCount = type ? type === TRANSITION$1 ? transitionDurations.length : animationDurations.length : 0; + } + const hasTransform = type === TRANSITION$1 && /\b(transform|all)(,|$)/.test( + getStyleProperties(`${TRANSITION$1}Property`).toString() + ); + return { + type, + timeout, + propCount, + hasTransform + }; + } + function getTimeout(delays, durations) { + while (delays.length < durations.length) { + delays = delays.concat(delays); + } + return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); + } + function toMs(s) { + if (s === "auto") return 0; + return Number(s.slice(0, -1).replace(",", ".")) * 1e3; + } + function forceReflow() { + return document.body.offsetHeight; + } + + function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } + } + + const vShowOriginalDisplay = Symbol("_vod"); + const vShowHidden = Symbol("_vsh"); + const vShow = { + beforeMount(el, { value }, { transition }) { + el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display; + if (transition && value) { + transition.beforeEnter(el); + } else { + setDisplay(el, value); + } + }, + mounted(el, { value }, { transition }) { + if (transition && value) { + transition.enter(el); + } + }, + updated(el, { value, oldValue }, { transition }) { + if (!value === !oldValue) return; + if (transition) { + if (value) { + transition.beforeEnter(el); + setDisplay(el, true); + transition.enter(el); + } else { + transition.leave(el, () => { + setDisplay(el, false); + }); + } + } else { + setDisplay(el, value); + } + }, + beforeUnmount(el, { value }) { + setDisplay(el, value); + } + }; + { + vShow.name = "show"; + } + function setDisplay(el, value) { + el.style.display = value ? el[vShowOriginalDisplay] : "none"; + el[vShowHidden] = !value; + } + + const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); + function useCssVars(getter) { + const instance = getCurrentInstance(); + if (!instance) { + warn(`useCssVars is called without current active component instance.`); + return; + } + const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { + Array.from( + document.querySelectorAll(`[data-v-owner="${instance.uid}"]`) + ).forEach((node) => setVarsOnNode(node, vars)); + }; + { + instance.getCssVars = () => getter(instance.proxy); + } + const setVars = () => { + const vars = getter(instance.proxy); + if (instance.ce) { + setVarsOnNode(instance.ce, vars); + } else { + setVarsOnVNode(instance.subTree, vars); + } + updateTeleports(vars); + }; + onBeforeUpdate(() => { + queuePostFlushCb(setVars); + }); + onMounted(() => { + watch(setVars, NOOP, { flush: "post" }); + const ob = new MutationObserver(setVars); + ob.observe(instance.subTree.el.parentNode, { childList: true }); + onUnmounted(() => ob.disconnect()); + }); + } + function setVarsOnVNode(vnode, vars) { + if (vnode.shapeFlag & 128) { + const suspense = vnode.suspense; + vnode = suspense.activeBranch; + if (suspense.pendingBranch && !suspense.isHydrating) { + suspense.effects.push(() => { + setVarsOnVNode(suspense.activeBranch, vars); + }); + } + } + while (vnode.component) { + vnode = vnode.component.subTree; + } + if (vnode.shapeFlag & 1 && vnode.el) { + setVarsOnNode(vnode.el, vars); + } else if (vnode.type === Fragment) { + vnode.children.forEach((c) => setVarsOnVNode(c, vars)); + } else if (vnode.type === Static) { + let { el, anchor } = vnode; + while (el) { + setVarsOnNode(el, vars); + if (el === anchor) break; + el = el.nextSibling; + } + } + } + function setVarsOnNode(el, vars) { + if (el.nodeType === 1) { + const style = el.style; + let cssText = ""; + for (const key in vars) { + style.setProperty(`--${key}`, vars[key]); + cssText += `--${key}: ${vars[key]};`; + } + style[CSS_VAR_TEXT] = cssText; + } + } + + const displayRE = /(^|;)\s*display\s*:/; + function patchStyle(el, prev, next) { + const style = el.style; + const isCssString = isString(next); + let hasControlledDisplay = false; + if (next && !isCssString) { + if (prev) { + if (!isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } else { + for (const prevStyle of prev.split(";")) { + const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim(); + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + } + for (const key in next) { + if (key === "display") { + hasControlledDisplay = true; + } + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + hasControlledDisplay = displayRE.test(next); + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOriginalDisplay in el) { + el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : ""; + if (el[vShowHidden]) { + style.display = "none"; + } + } + } + const semicolonRE = /[^\\];\s*$/; + const importantRE = /\s*!important$/; + function setStyle(style, name, val) { + if (isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) val = ""; + { + if (semicolonRE.test(val)) { + warn( + `Unexpected semicolon at the end of '${name}' style value: '${val}'` + ); + } + } + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } + } + const prefixes = ["Webkit", "Moz", "ms"]; + const prefixCache = {}; + function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; + } + + const xlinkNS = "http://www.w3.org/1999/xlink"; + function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + if (value == null || isBoolean && !includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute( + key, + isBoolean ? "" : isSymbol(value) ? String(value) : value + ); + } + } + } + + function patchDOMProp(el, key, value, parentComponent, attrName) { + if (key === "innerHTML" || key === "textContent") { + if (value != null) { + el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value; + } + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; + const newValue = value == null ? ( + // #11647: value should be set as empty string for null and undefined, + // but <input type="checkbox"> should be set as 'on'. + el.type === "checkbox" ? "on" : "" + ) : String(value); + if (oldValue !== newValue || !("_value" in el)) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + el._value = value; + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + if (!needRemove) { + warn( + `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, + e + ); + } + } + needRemove && el.removeAttribute(attrName || key); + } + + function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); + } + function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); + } + const veiKey = Symbol("_vei"); + function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = sanitizeEventValue(nextValue, rawName) ; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker( + sanitizeEventValue(nextValue, rawName) , + instance + ); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } + } + const optionsModifierRE = /(?:Once|Passive|Capture)$/; + function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); + return [event, options]; + } + let cachedNow = 0; + const p = /* @__PURE__ */ Promise.resolve(); + const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); + function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; + } + function sanitizeEventValue(value, propName) { + if (isFunction(value) || isArray(value)) { + return value; + } + warn( + `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop? +Expected function or array of functions, received type ${typeof value}.` + ); + return NOOP; + } + function patchStopImmediatePropagation(e, value) { + if (isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map( + (fn) => (e2) => !e2._stopped && fn && fn(e2) + ); + } else { + return value; + } + } + + const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter + key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; + const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (isOn(key)) { + if (!isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp(el, key, nextValue); + if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { + patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); + } + } else if ( + // #11081 force set props for possible async custom element + el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue)) + ) { + patchDOMProp(el, camelize(key), nextValue, parentComponent, key); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } + }; + function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && isString(value)) { + return false; + } + return key in el; + } + + const REMOVAL = {}; + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function defineCustomElement(options, extraOptions, _createApp) { + const Comp = defineComponent(options, extraOptions); + if (isPlainObject(Comp)) extend(Comp, extraOptions); + class VueCustomElement extends VueElement { + constructor(initialProps) { + super(Comp, initialProps, _createApp); + } + } + VueCustomElement.def = Comp; + return VueCustomElement; + } + /*! #__NO_SIDE_EFFECTS__ */ + const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => { + return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp); + }; + const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { + }; + class VueElement extends BaseClass { + constructor(_def, _props = {}, _createApp = createApp) { + super(); + this._def = _def; + this._props = _props; + this._createApp = _createApp; + this._isVueCE = true; + /** + * @internal + */ + this._instance = null; + /** + * @internal + */ + this._app = null; + /** + * @internal + */ + this._nonce = this._def.nonce; + this._connected = false; + this._resolved = false; + this._numberProps = null; + this._styleChildren = /* @__PURE__ */ new WeakSet(); + this._ob = null; + if (this.shadowRoot && _createApp !== createApp) { + this._root = this.shadowRoot; + } else { + if (this.shadowRoot) { + warn( + `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` + ); + } + if (_def.shadowRoot !== false) { + this.attachShadow({ mode: "open" }); + this._root = this.shadowRoot; + } else { + this._root = this; + } + } + if (!this._def.__asyncLoader) { + this._resolveProps(this._def); + } + } + connectedCallback() { + if (!this.isConnected) return; + if (!this.shadowRoot) { + this._parseSlots(); + } + this._connected = true; + let parent = this; + while (parent = parent && (parent.parentNode || parent.host)) { + if (parent instanceof VueElement) { + this._parent = parent; + break; + } + } + if (!this._instance) { + if (this._resolved) { + this._setParent(); + this._update(); + } else { + if (parent && parent._pendingResolve) { + this._pendingResolve = parent._pendingResolve.then(() => { + this._pendingResolve = void 0; + this._resolveDef(); + }); + } else { + this._resolveDef(); + } + } + } + } + _setParent(parent = this._parent) { + if (parent) { + this._instance.parent = parent._instance; + this._instance.provides = parent._instance.provides; + } + } + disconnectedCallback() { + this._connected = false; + nextTick(() => { + if (!this._connected) { + if (this._ob) { + this._ob.disconnect(); + this._ob = null; + } + this._app && this._app.unmount(); + if (this._instance) this._instance.ce = void 0; + this._app = this._instance = null; + } + }); + } + /** + * resolve inner component definition (handle possible async component) + */ + _resolveDef() { + if (this._pendingResolve) { + return; + } + for (let i = 0; i < this.attributes.length; i++) { + this._setAttr(this.attributes[i].name); + } + this._ob = new MutationObserver((mutations) => { + for (const m of mutations) { + this._setAttr(m.attributeName); + } + }); + this._ob.observe(this, { attributes: true }); + const resolve = (def, isAsync = false) => { + this._resolved = true; + this._pendingResolve = void 0; + const { props, styles } = def; + let numberProps; + if (props && !isArray(props)) { + for (const key in props) { + const opt = props[key]; + if (opt === Number || opt && opt.type === Number) { + if (key in this._props) { + this._props[key] = toNumber(this._props[key]); + } + (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true; + } + } + } + this._numberProps = numberProps; + if (isAsync) { + this._resolveProps(def); + } + if (this.shadowRoot) { + this._applyStyles(styles); + } else if (styles) { + warn( + "Custom element style injection is not supported when using shadowRoot: false" + ); + } + this._mount(def); + }; + const asyncDef = this._def.__asyncLoader; + if (asyncDef) { + this._pendingResolve = asyncDef().then( + (def) => resolve(this._def = def, true) + ); + } else { + resolve(this._def); + } + } + _mount(def) { + if (!def.name) { + def.name = "VueElement"; + } + this._app = this._createApp(def); + if (def.configureApp) { + def.configureApp(this._app); + } + this._app._ceVNode = this._createVNode(); + this._app.mount(this._root); + const exposed = this._instance && this._instance.exposed; + if (!exposed) return; + for (const key in exposed) { + if (!hasOwn(this, key)) { + Object.defineProperty(this, key, { + // unwrap ref to be consistent with public instance behavior + get: () => unref(exposed[key]) + }); + } else { + warn(`Exposed property "${key}" already exists on custom element.`); + } + } + } + _resolveProps(def) { + const { props } = def; + const declaredPropKeys = isArray(props) ? props : Object.keys(props || {}); + for (const key of Object.keys(this)) { + if (key[0] !== "_" && declaredPropKeys.includes(key)) { + this._setProp(key, this[key]); + } + } + for (const key of declaredPropKeys.map(camelize)) { + Object.defineProperty(this, key, { + get() { + return this._getProp(key); + }, + set(val) { + this._setProp(key, val, true, true); + } + }); + } + } + _setAttr(key) { + if (key.startsWith("data-v-")) return; + const has = this.hasAttribute(key); + let value = has ? this.getAttribute(key) : REMOVAL; + const camelKey = camelize(key); + if (has && this._numberProps && this._numberProps[camelKey]) { + value = toNumber(value); + } + this._setProp(camelKey, value, false, true); + } + /** + * @internal + */ + _getProp(key) { + return this._props[key]; + } + /** + * @internal + */ + _setProp(key, val, shouldReflect = true, shouldUpdate = false) { + if (val !== this._props[key]) { + if (val === REMOVAL) { + delete this._props[key]; + } else { + this._props[key] = val; + if (key === "key" && this._app) { + this._app._ceVNode.key = val; + } + } + if (shouldUpdate && this._instance) { + this._update(); + } + if (shouldReflect) { + const ob = this._ob; + ob && ob.disconnect(); + if (val === true) { + this.setAttribute(hyphenate(key), ""); + } else if (typeof val === "string" || typeof val === "number") { + this.setAttribute(hyphenate(key), val + ""); + } else if (!val) { + this.removeAttribute(hyphenate(key)); + } + ob && ob.observe(this, { attributes: true }); + } + } + } + _update() { + render(this._createVNode(), this._root); + } + _createVNode() { + const baseProps = {}; + if (!this.shadowRoot) { + baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this); + } + const vnode = createVNode(this._def, extend(baseProps, this._props)); + if (!this._instance) { + vnode.ce = (instance) => { + this._instance = instance; + instance.ce = this; + instance.isCE = true; + { + instance.ceReload = (newStyles) => { + if (this._styles) { + this._styles.forEach((s) => this._root.removeChild(s)); + this._styles.length = 0; + } + this._applyStyles(newStyles); + this._instance = null; + this._update(); + }; + } + const dispatch = (event, args) => { + this.dispatchEvent( + new CustomEvent( + event, + isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args } + ) + ); + }; + instance.emit = (event, ...args) => { + dispatch(event, args); + if (hyphenate(event) !== event) { + dispatch(hyphenate(event), args); + } + }; + this._setParent(); + }; + } + return vnode; + } + _applyStyles(styles, owner) { + if (!styles) return; + if (owner) { + if (owner === this._def || this._styleChildren.has(owner)) { + return; + } + this._styleChildren.add(owner); + } + const nonce = this._nonce; + for (let i = styles.length - 1; i >= 0; i--) { + const s = document.createElement("style"); + if (nonce) s.setAttribute("nonce", nonce); + s.textContent = styles[i]; + this.shadowRoot.prepend(s); + { + if (owner) { + if (owner.__hmrId) { + if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map(); + let entry = this._childStyles.get(owner.__hmrId); + if (!entry) { + this._childStyles.set(owner.__hmrId, entry = []); + } + entry.push(s); + } + } else { + (this._styles || (this._styles = [])).push(s); + } + } + } + } + /** + * Only called when shadowRoot is false + */ + _parseSlots() { + const slots = this._slots = {}; + let n; + while (n = this.firstChild) { + const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default"; + (slots[slotName] || (slots[slotName] = [])).push(n); + this.removeChild(n); + } + } + /** + * Only called when shadowRoot is false + */ + _renderSlots() { + const outlets = (this._teleportTarget || this).querySelectorAll("slot"); + const scopeId = this._instance.type.__scopeId; + for (let i = 0; i < outlets.length; i++) { + const o = outlets[i]; + const slotName = o.getAttribute("name") || "default"; + const content = this._slots[slotName]; + const parent = o.parentNode; + if (content) { + for (const n of content) { + if (scopeId && n.nodeType === 1) { + const id = scopeId + "-s"; + const walker = document.createTreeWalker(n, 1); + n.setAttribute(id, ""); + let child; + while (child = walker.nextNode()) { + child.setAttribute(id, ""); + } + } + parent.insertBefore(n, o); + } + } else { + while (o.firstChild) parent.insertBefore(o.firstChild, o); + } + parent.removeChild(o); + } + } + /** + * @internal + */ + _injectChildStyle(comp) { + this._applyStyles(comp.styles, comp); + } + /** + * @internal + */ + _removeChildStyle(comp) { + { + this._styleChildren.delete(comp); + if (this._childStyles && comp.__hmrId) { + const oldStyles = this._childStyles.get(comp.__hmrId); + if (oldStyles) { + oldStyles.forEach((s) => this._root.removeChild(s)); + oldStyles.length = 0; + } + } + } + } + } + function useHost(caller) { + const instance = getCurrentInstance(); + const el = instance && instance.ce; + if (el) { + return el; + } else { + if (!instance) { + warn( + `${caller || "useHost"} called without an active component instance.` + ); + } else { + warn( + `${caller || "useHost"} can only be used in components defined via defineCustomElement.` + ); + } + } + return null; + } + function useShadowRoot() { + const el = useHost("useShadowRoot") ; + return el && el.shadowRoot; + } + + function useCssModule(name = "$style") { + { + { + warn(`useCssModule() is not supported in the global build.`); + } + return EMPTY_OBJ; + } + } + + const positionMap = /* @__PURE__ */ new WeakMap(); + const newPositionMap = /* @__PURE__ */ new WeakMap(); + const moveCbKey = Symbol("_moveCb"); + const enterCbKey = Symbol("_enterCb"); + const decorate = (t) => { + delete t.props.mode; + return t; + }; + const TransitionGroupImpl = /* @__PURE__ */ decorate({ + name: "TransitionGroup", + props: /* @__PURE__ */ extend({}, TransitionPropsValidators, { + tag: String, + moveClass: String + }), + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevChildren; + let children; + onUpdated(() => { + if (!prevChildren.length) { + return; + } + const moveClass = props.moveClass || `${props.name || "v"}-move`; + if (!hasCSSTransform( + prevChildren[0].el, + instance.vnode.el, + moveClass + )) { + return; + } + prevChildren.forEach(callPendingCbs); + prevChildren.forEach(recordPosition); + const movedChildren = prevChildren.filter(applyTranslation); + forceReflow(); + movedChildren.forEach((c) => { + const el = c.el; + const style = el.style; + addTransitionClass(el, moveClass); + style.transform = style.webkitTransform = style.transitionDuration = ""; + const cb = el[moveCbKey] = (e) => { + if (e && e.target !== el) { + return; + } + if (!e || /transform$/.test(e.propertyName)) { + el.removeEventListener("transitionend", cb); + el[moveCbKey] = null; + removeTransitionClass(el, moveClass); + } + }; + el.addEventListener("transitionend", cb); + }); + }); + return () => { + const rawProps = toRaw(props); + const cssTransitionProps = resolveTransitionProps(rawProps); + let tag = rawProps.tag || Fragment; + prevChildren = []; + if (children) { + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.el && child.el instanceof Element) { + prevChildren.push(child); + setTransitionHooks( + child, + resolveTransitionHooks( + child, + cssTransitionProps, + state, + instance + ) + ); + positionMap.set( + child, + child.el.getBoundingClientRect() + ); + } + } + } + children = slots.default ? getTransitionRawChildren(slots.default()) : []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.key != null) { + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + } else if (child.type !== Text) { + warn(`<TransitionGroup> children must be keyed.`); + } + } + return createVNode(tag, null, children); + }; + } + }); + const TransitionGroup = TransitionGroupImpl; + function callPendingCbs(c) { + const el = c.el; + if (el[moveCbKey]) { + el[moveCbKey](); + } + if (el[enterCbKey]) { + el[enterCbKey](); + } + } + function recordPosition(c) { + newPositionMap.set(c, c.el.getBoundingClientRect()); + } + function applyTranslation(c) { + const oldPos = positionMap.get(c); + const newPos = newPositionMap.get(c); + const dx = oldPos.left - newPos.left; + const dy = oldPos.top - newPos.top; + if (dx || dy) { + const s = c.el.style; + s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; + s.transitionDuration = "0s"; + return c; + } + } + function hasCSSTransform(el, root, moveClass) { + const clone = el.cloneNode(); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.forEach((cls) => { + cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); + }); + } + moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); + clone.style.display = "none"; + const container = root.nodeType === 1 ? root : root.parentNode; + container.appendChild(clone); + const { hasTransform } = getTransitionInfo(clone); + container.removeChild(clone); + return hasTransform; + } + + const getModelAssigner = (vnode) => { + const fn = vnode.props["onUpdate:modelValue"] || false; + return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; + }; + function onCompositionStart(e) { + e.target.composing = true; + } + function onCompositionEnd(e) { + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } + } + const assignKey = Symbol("_assign"); + const vModelText = { + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); + } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) return; + const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy && value === oldValue) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } + }; + const vModelCheckbox = { + // #4096 array checkboxes need to be deep traversed + deep: true, + created(el, _, vnode) { + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + const modelValue = el._modelValue; + const elementValue = getValue(el); + const checked = el.checked; + const assign = el[assignKey]; + if (isArray(modelValue)) { + const index = looseIndexOf(modelValue, elementValue); + const found = index !== -1; + if (checked && !found) { + assign(modelValue.concat(elementValue)); + } else if (!checked && found) { + const filtered = [...modelValue]; + filtered.splice(index, 1); + assign(filtered); + } + } else if (isSet(modelValue)) { + const cloned = new Set(modelValue); + if (checked) { + cloned.add(elementValue); + } else { + cloned.delete(elementValue); + } + assign(cloned); + } else { + assign(getCheckboxValue(el, checked)); + } + }); + }, + // set initial checked on mount to wait for true-value/false-value + mounted: setChecked, + beforeUpdate(el, binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + setChecked(el, binding, vnode); + } + }; + function setChecked(el, { value, oldValue }, vnode) { + el._modelValue = value; + let checked; + if (isArray(value)) { + checked = looseIndexOf(value, vnode.props.value) > -1; + } else if (isSet(value)) { + checked = value.has(vnode.props.value); + } else { + if (value === oldValue) return; + checked = looseEqual(value, getCheckboxValue(el, true)); + } + if (el.checked !== checked) { + el.checked = checked; + } + } + const vModelRadio = { + created(el, { value }, vnode) { + el.checked = looseEqual(value, vnode.props.value); + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + el[assignKey](getValue(el)); + }); + }, + beforeUpdate(el, { value, oldValue }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (value !== oldValue) { + el.checked = looseEqual(value, vnode.props.value); + } + } + }; + const vModelSelect = { + // <select multiple> value need to be deep traversed + deep: true, + created(el, { value, modifiers: { number } }, vnode) { + const isSetModel = isSet(value); + addEventListener(el, "change", () => { + const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( + (o) => number ? looseToNumber(getValue(o)) : getValue(o) + ); + el[assignKey]( + el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] + ); + el._assigning = true; + nextTick(() => { + el._assigning = false; + }); + }); + el[assignKey] = getModelAssigner(vnode); + }, + // set value in mounted & updated because <select> relies on its children + // <option>s. + mounted(el, { value }) { + setSelected(el, value); + }, + beforeUpdate(el, _binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + }, + updated(el, { value }) { + if (!el._assigning) { + setSelected(el, value); + } + } + }; + function setSelected(el, value) { + const isMultiple = el.multiple; + const isArrayValue = isArray(value); + if (isMultiple && !isArrayValue && !isSet(value)) { + warn( + `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` + ); + return; + } + for (let i = 0, l = el.options.length; i < l; i++) { + const option = el.options[i]; + const optionValue = getValue(option); + if (isMultiple) { + if (isArrayValue) { + const optionType = typeof optionValue; + if (optionType === "string" || optionType === "number") { + option.selected = value.some((v) => String(v) === String(optionValue)); + } else { + option.selected = looseIndexOf(value, optionValue) > -1; + } + } else { + option.selected = value.has(optionValue); + } + } else if (looseEqual(getValue(option), value)) { + if (el.selectedIndex !== i) el.selectedIndex = i; + return; + } + } + if (!isMultiple && el.selectedIndex !== -1) { + el.selectedIndex = -1; + } + } + function getValue(el) { + return "_value" in el ? el._value : el.value; + } + function getCheckboxValue(el, checked) { + const key = checked ? "_trueValue" : "_falseValue"; + return key in el ? el[key] : checked; + } + const vModelDynamic = { + created(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "created"); + }, + mounted(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "mounted"); + }, + beforeUpdate(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); + }, + updated(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "updated"); + } + }; + function resolveDynamicModel(tagName, type) { + switch (tagName) { + case "SELECT": + return vModelSelect; + case "TEXTAREA": + return vModelText; + default: + switch (type) { + case "checkbox": + return vModelCheckbox; + case "radio": + return vModelRadio; + default: + return vModelText; + } + } + } + function callModelHook(el, binding, vnode, prevVNode, hook) { + const modelToUse = resolveDynamicModel( + el.tagName, + vnode.props && vnode.props.type + ); + const fn = modelToUse[hook]; + fn && fn(el, binding, vnode, prevVNode); + } + + const systemModifiers = ["ctrl", "shift", "alt", "meta"]; + const modifierGuards = { + stop: (e) => e.stopPropagation(), + prevent: (e) => e.preventDefault(), + self: (e) => e.target !== e.currentTarget, + ctrl: (e) => !e.ctrlKey, + shift: (e) => !e.shiftKey, + alt: (e) => !e.altKey, + meta: (e) => !e.metaKey, + left: (e) => "button" in e && e.button !== 0, + middle: (e) => "button" in e && e.button !== 1, + right: (e) => "button" in e && e.button !== 2, + exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) + }; + const withModifiers = (fn, modifiers) => { + const cache = fn._withMods || (fn._withMods = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { + for (let i = 0; i < modifiers.length; i++) { + const guard = modifierGuards[modifiers[i]]; + if (guard && guard(event, modifiers)) return; + } + return fn(event, ...args); + }); + }; + const keyNames = { + esc: "escape", + space: " ", + up: "arrow-up", + left: "arrow-left", + right: "arrow-right", + down: "arrow-down", + delete: "backspace" + }; + const withKeys = (fn, modifiers) => { + const cache = fn._withKeys || (fn._withKeys = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event) => { + if (!("key" in event)) { + return; + } + const eventKey = hyphenate(event.key); + if (modifiers.some( + (k) => k === eventKey || keyNames[k] === eventKey + )) { + return fn(event); + } + }); + }; + + const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); + let renderer; + let enabledHydration = false; + function ensureRenderer() { + return renderer || (renderer = createRenderer(rendererOptions)); + } + function ensureHydrationRenderer() { + renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions); + enabledHydration = true; + return renderer; + } + const render = (...args) => { + ensureRenderer().render(...args); + }; + const hydrate = (...args) => { + ensureHydrationRenderer().hydrate(...args); + }; + const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) return; + const component = app._component; + if (!isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; + } + if (container.nodeType === 1) { + container.textContent = ""; + } + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); + } + return proxy; + }; + return app; + }; + const createSSRApp = (...args) => { + const app = ensureHydrationRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (container) { + return mount(container, true, resolveRootNamespace(container)); + } + }; + return app; + }; + function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } + } + function injectNativeTagCheck(app) { + Object.defineProperty(app.config, "isNativeTag", { + value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + writable: false + }); + } + function injectCompilerOptionsCheck(app) { + if (isRuntimeOnly()) { + const isCustomElement = app.config.isCustomElement; + Object.defineProperty(app.config, "isCustomElement", { + get() { + return isCustomElement; + }, + set() { + warn( + `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` + ); + } + }); + const compilerOptions = app.config.compilerOptions; + const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. +- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. +- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader +- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; + Object.defineProperty(app.config, "compilerOptions", { + get() { + warn(msg); + return compilerOptions; + }, + set() { + warn(msg); + } + }); + } + } + function normalizeContainer(container) { + if (isString(container)) { + const res = document.querySelector(container); + if (!res) { + warn( + `Failed to mount app: mount target selector "${container}" returned null.` + ); + } + return res; + } + if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { + warn( + `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` + ); + } + return container; + } + const initDirectivesForSSR = NOOP; + + function initDev() { + { + { + console.info( + `You are running a development build of Vue. +Make sure to use the production build (*.prod.js) when deploying for production.` + ); + } + initCustomFormatter(); + } + } + + const FRAGMENT = Symbol(`Fragment` ); + const TELEPORT = Symbol(`Teleport` ); + const SUSPENSE = Symbol(`Suspense` ); + const KEEP_ALIVE = Symbol(`KeepAlive` ); + const BASE_TRANSITION = Symbol( + `BaseTransition` + ); + const OPEN_BLOCK = Symbol(`openBlock` ); + const CREATE_BLOCK = Symbol(`createBlock` ); + const CREATE_ELEMENT_BLOCK = Symbol( + `createElementBlock` + ); + const CREATE_VNODE = Symbol(`createVNode` ); + const CREATE_ELEMENT_VNODE = Symbol( + `createElementVNode` + ); + const CREATE_COMMENT = Symbol( + `createCommentVNode` + ); + const CREATE_TEXT = Symbol( + `createTextVNode` + ); + const CREATE_STATIC = Symbol( + `createStaticVNode` + ); + const RESOLVE_COMPONENT = Symbol( + `resolveComponent` + ); + const RESOLVE_DYNAMIC_COMPONENT = Symbol( + `resolveDynamicComponent` + ); + const RESOLVE_DIRECTIVE = Symbol( + `resolveDirective` + ); + const RESOLVE_FILTER = Symbol( + `resolveFilter` + ); + const WITH_DIRECTIVES = Symbol( + `withDirectives` + ); + const RENDER_LIST = Symbol(`renderList` ); + const RENDER_SLOT = Symbol(`renderSlot` ); + const CREATE_SLOTS = Symbol(`createSlots` ); + const TO_DISPLAY_STRING = Symbol( + `toDisplayString` + ); + const MERGE_PROPS = Symbol(`mergeProps` ); + const NORMALIZE_CLASS = Symbol( + `normalizeClass` + ); + const NORMALIZE_STYLE = Symbol( + `normalizeStyle` + ); + const NORMALIZE_PROPS = Symbol( + `normalizeProps` + ); + const GUARD_REACTIVE_PROPS = Symbol( + `guardReactiveProps` + ); + const TO_HANDLERS = Symbol(`toHandlers` ); + const CAMELIZE = Symbol(`camelize` ); + const CAPITALIZE = Symbol(`capitalize` ); + const TO_HANDLER_KEY = Symbol( + `toHandlerKey` + ); + const SET_BLOCK_TRACKING = Symbol( + `setBlockTracking` + ); + const PUSH_SCOPE_ID = Symbol(`pushScopeId` ); + const POP_SCOPE_ID = Symbol(`popScopeId` ); + const WITH_CTX = Symbol(`withCtx` ); + const UNREF = Symbol(`unref` ); + const IS_REF = Symbol(`isRef` ); + const WITH_MEMO = Symbol(`withMemo` ); + const IS_MEMO_SAME = Symbol(`isMemoSame` ); + const helperNameMap = { + [FRAGMENT]: `Fragment`, + [TELEPORT]: `Teleport`, + [SUSPENSE]: `Suspense`, + [KEEP_ALIVE]: `KeepAlive`, + [BASE_TRANSITION]: `BaseTransition`, + [OPEN_BLOCK]: `openBlock`, + [CREATE_BLOCK]: `createBlock`, + [CREATE_ELEMENT_BLOCK]: `createElementBlock`, + [CREATE_VNODE]: `createVNode`, + [CREATE_ELEMENT_VNODE]: `createElementVNode`, + [CREATE_COMMENT]: `createCommentVNode`, + [CREATE_TEXT]: `createTextVNode`, + [CREATE_STATIC]: `createStaticVNode`, + [RESOLVE_COMPONENT]: `resolveComponent`, + [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, + [RESOLVE_DIRECTIVE]: `resolveDirective`, + [RESOLVE_FILTER]: `resolveFilter`, + [WITH_DIRECTIVES]: `withDirectives`, + [RENDER_LIST]: `renderList`, + [RENDER_SLOT]: `renderSlot`, + [CREATE_SLOTS]: `createSlots`, + [TO_DISPLAY_STRING]: `toDisplayString`, + [MERGE_PROPS]: `mergeProps`, + [NORMALIZE_CLASS]: `normalizeClass`, + [NORMALIZE_STYLE]: `normalizeStyle`, + [NORMALIZE_PROPS]: `normalizeProps`, + [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, + [TO_HANDLERS]: `toHandlers`, + [CAMELIZE]: `camelize`, + [CAPITALIZE]: `capitalize`, + [TO_HANDLER_KEY]: `toHandlerKey`, + [SET_BLOCK_TRACKING]: `setBlockTracking`, + [PUSH_SCOPE_ID]: `pushScopeId`, + [POP_SCOPE_ID]: `popScopeId`, + [WITH_CTX]: `withCtx`, + [UNREF]: `unref`, + [IS_REF]: `isRef`, + [WITH_MEMO]: `withMemo`, + [IS_MEMO_SAME]: `isMemoSame` + }; + function registerRuntimeHelpers(helpers) { + Object.getOwnPropertySymbols(helpers).forEach((s) => { + helperNameMap[s] = helpers[s]; + }); + } + + const locStub = { + start: { line: 1, column: 1, offset: 0 }, + end: { line: 1, column: 1, offset: 0 }, + source: "" + }; + function createRoot(children, source = "") { + return { + type: 0, + source, + children, + helpers: /* @__PURE__ */ new Set(), + components: [], + directives: [], + hoists: [], + imports: [], + cached: [], + temps: 0, + codegenNode: void 0, + loc: locStub + }; + } + function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) { + if (context) { + if (isBlock) { + context.helper(OPEN_BLOCK); + context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); + } else { + context.helper(getVNodeHelper(context.inSSR, isComponent)); + } + if (directives) { + context.helper(WITH_DIRECTIVES); + } + } + return { + type: 13, + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent, + loc + }; + } + function createArrayExpression(elements, loc = locStub) { + return { + type: 17, + loc, + elements + }; + } + function createObjectExpression(properties, loc = locStub) { + return { + type: 15, + loc, + properties + }; + } + function createObjectProperty(key, value) { + return { + type: 16, + loc: locStub, + key: isString(key) ? createSimpleExpression(key, true) : key, + value + }; + } + function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { + return { + type: 4, + loc, + content, + isStatic, + constType: isStatic ? 3 : constType + }; + } + function createCompoundExpression(children, loc = locStub) { + return { + type: 8, + loc, + children + }; + } + function createCallExpression(callee, args = [], loc = locStub) { + return { + type: 14, + loc, + callee, + arguments: args + }; + } + function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { + return { + type: 18, + params, + returns, + newline, + isSlot, + loc + }; + } + function createConditionalExpression(test, consequent, alternate, newline = true) { + return { + type: 19, + test, + consequent, + alternate, + newline, + loc: locStub + }; + } + function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) { + return { + type: 20, + index, + value, + needPauseTracking, + inVOnce, + needArraySpread: false, + loc: locStub + }; + } + function createBlockStatement(body) { + return { + type: 21, + body, + loc: locStub + }; + } + function getVNodeHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; + } + function getVNodeBlockHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; + } + function convertToBlock(node, { helper, removeHelper, inSSR }) { + if (!node.isBlock) { + node.isBlock = true; + removeHelper(getVNodeHelper(inSSR, node.isComponent)); + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(inSSR, node.isComponent)); + } + } + + const defaultDelimitersOpen = new Uint8Array([123, 123]); + const defaultDelimitersClose = new Uint8Array([125, 125]); + function isTagStartChar(c) { + return c >= 97 && c <= 122 || c >= 65 && c <= 90; + } + function isWhitespace(c) { + return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; + } + function isEndOfTagSection(c) { + return c === 47 || c === 62 || isWhitespace(c); + } + function toCharCodes(str) { + const ret = new Uint8Array(str.length); + for (let i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret; + } + const Sequences = { + Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), + // CDATA[ + CdataEnd: new Uint8Array([93, 93, 62]), + // ]]> + CommentEnd: new Uint8Array([45, 45, 62]), + // `-->` + ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), + // `<\/script` + StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), + // `</style` + TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), + // `</title` + TextareaEnd: new Uint8Array([ + 60, + 47, + 116, + 101, + 120, + 116, + 97, + 114, + 101, + 97 + ]) + // `</textarea + }; + class Tokenizer { + constructor(stack, cbs) { + this.stack = stack; + this.cbs = cbs; + /** The current state the tokenizer is in. */ + this.state = 1; + /** The read buffer. */ + this.buffer = ""; + /** The beginning of the section that is currently being read. */ + this.sectionStart = 0; + /** The index within the buffer that we are currently looking at. */ + this.index = 0; + /** The start of the last entity. */ + this.entityStart = 0; + /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ + this.baseState = 1; + /** For special parsing behavior inside of script and style tags. */ + this.inRCDATA = false; + /** For disabling RCDATA tags handling */ + this.inXML = false; + /** For disabling interpolation parsing in v-pre */ + this.inVPre = false; + /** Record newline positions for fast line / column calculation */ + this.newlines = []; + this.mode = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + this.delimiterIndex = -1; + this.currentSequence = void 0; + this.sequenceIndex = 0; + } + get inSFCRoot() { + return this.mode === 2 && this.stack.length === 0; + } + reset() { + this.state = 1; + this.mode = 0; + this.buffer = ""; + this.sectionStart = 0; + this.index = 0; + this.baseState = 1; + this.inRCDATA = false; + this.currentSequence = void 0; + this.newlines.length = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + } + /** + * Generate Position object with line / column information using recorded + * newline positions. We know the index is always going to be an already + * processed index, so all the newlines up to this index should have been + * recorded. + */ + getPos(index) { + let line = 1; + let column = index + 1; + for (let i = this.newlines.length - 1; i >= 0; i--) { + const newlineIndex = this.newlines[i]; + if (index > newlineIndex) { + line = i + 2; + column = index - newlineIndex; + break; + } + } + return { + column, + line, + offset: index + }; + } + peek() { + return this.buffer.charCodeAt(this.index + 1); + } + stateText(c) { + if (c === 60) { + if (this.index > this.sectionStart) { + this.cbs.ontext(this.sectionStart, this.index); + } + this.state = 5; + this.sectionStart = this.index; + } else if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } + stateInterpolationOpen(c) { + if (c === this.delimiterOpen[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterOpen.length - 1) { + const start = this.index + 1 - this.delimiterOpen.length; + if (start > this.sectionStart) { + this.cbs.ontext(this.sectionStart, start); + } + this.state = 3; + this.sectionStart = start; + } else { + this.delimiterIndex++; + } + } else if (this.inRCDATA) { + this.state = 32; + this.stateInRCDATA(c); + } else { + this.state = 1; + this.stateText(c); + } + } + stateInterpolation(c) { + if (c === this.delimiterClose[0]) { + this.state = 4; + this.delimiterIndex = 0; + this.stateInterpolationClose(c); + } + } + stateInterpolationClose(c) { + if (c === this.delimiterClose[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterClose.length - 1) { + this.cbs.oninterpolation(this.sectionStart, this.index + 1); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else { + this.delimiterIndex++; + } + } else { + this.state = 3; + this.stateInterpolation(c); + } + } + stateSpecialStartSequence(c) { + const isEnd = this.sequenceIndex === this.currentSequence.length; + const isMatch = isEnd ? ( + // If we are at the end of the sequence, make sure the tag name has ended + isEndOfTagSection(c) + ) : ( + // Otherwise, do a case-insensitive comparison + (c | 32) === this.currentSequence[this.sequenceIndex] + ); + if (!isMatch) { + this.inRCDATA = false; + } else if (!isEnd) { + this.sequenceIndex++; + return; + } + this.sequenceIndex = 0; + this.state = 6; + this.stateInTagName(c); + } + /** Look for an end tag. For <title> and <textarea>, also decode entities. */ + stateInRCDATA(c) { + if (this.sequenceIndex === this.currentSequence.length) { + if (c === 62 || isWhitespace(c)) { + const endOfText = this.index - this.currentSequence.length; + if (this.sectionStart < endOfText) { + const actualIndex = this.index; + this.index = endOfText; + this.cbs.ontext(this.sectionStart, endOfText); + this.index = actualIndex; + } + this.sectionStart = endOfText + 2; + this.stateInClosingTagName(c); + this.inRCDATA = false; + return; + } + this.sequenceIndex = 0; + } + if ((c | 32) === this.currentSequence[this.sequenceIndex]) { + this.sequenceIndex += 1; + } else if (this.sequenceIndex === 0) { + if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { + if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } else if (this.fastForwardTo(60)) { + this.sequenceIndex = 1; + } + } else { + this.sequenceIndex = Number(c === 60); + } + } + stateCDATASequence(c) { + if (c === Sequences.Cdata[this.sequenceIndex]) { + if (++this.sequenceIndex === Sequences.Cdata.length) { + this.state = 28; + this.currentSequence = Sequences.CdataEnd; + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + } + } else { + this.sequenceIndex = 0; + this.state = 23; + this.stateInDeclaration(c); + } + } + /** + * When we wait for one specific character, we can speed things up + * by skipping through the buffer until we find it. + * + * @returns Whether the character was found. + */ + fastForwardTo(c) { + while (++this.index < this.buffer.length) { + const cc = this.buffer.charCodeAt(this.index); + if (cc === 10) { + this.newlines.push(this.index); + } + if (cc === c) { + return true; + } + } + this.index = this.buffer.length - 1; + return false; + } + /** + * Comments and CDATA end with `-->` and `]]>`. + * + * Their common qualities are: + * - Their end sequences have a distinct character they start with. + * - That character is then repeated, so we have to check multiple repeats. + * - All characters but the start character of the sequence can be skipped. + */ + stateInCommentLike(c) { + if (c === this.currentSequence[this.sequenceIndex]) { + if (++this.sequenceIndex === this.currentSequence.length) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, this.index - 2); + } else { + this.cbs.oncomment(this.sectionStart, this.index - 2); + } + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + this.state = 1; + } + } else if (this.sequenceIndex === 0) { + if (this.fastForwardTo(this.currentSequence[0])) { + this.sequenceIndex = 1; + } + } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { + this.sequenceIndex = 0; + } + } + startSpecial(sequence, offset) { + this.enterRCDATA(sequence, offset); + this.state = 31; + } + enterRCDATA(sequence, offset) { + this.inRCDATA = true; + this.currentSequence = sequence; + this.sequenceIndex = offset; + } + stateBeforeTagName(c) { + if (c === 33) { + this.state = 22; + this.sectionStart = this.index + 1; + } else if (c === 63) { + this.state = 24; + this.sectionStart = this.index + 1; + } else if (isTagStartChar(c)) { + this.sectionStart = this.index; + if (this.mode === 0) { + this.state = 6; + } else if (this.inSFCRoot) { + this.state = 34; + } else if (!this.inXML) { + if (c === 116) { + this.state = 30; + } else { + this.state = c === 115 ? 29 : 6; + } + } else { + this.state = 6; + } + } else if (c === 47) { + this.state = 8; + } else { + this.state = 1; + this.stateText(c); + } + } + stateInTagName(c) { + if (isEndOfTagSection(c)) { + this.handleTagName(c); + } + } + stateInSFCRootTagName(c) { + if (isEndOfTagSection(c)) { + const tag = this.buffer.slice(this.sectionStart, this.index); + if (tag !== "template") { + this.enterRCDATA(toCharCodes(`</` + tag), 0); + } + this.handleTagName(c); + } + } + handleTagName(c) { + this.cbs.onopentagname(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } + stateBeforeClosingTagName(c) { + if (isWhitespace(c)) ; else if (c === 62) { + { + this.cbs.onerr(14, this.index); + } + this.state = 1; + this.sectionStart = this.index + 1; + } else { + this.state = isTagStartChar(c) ? 9 : 27; + this.sectionStart = this.index; + } + } + stateInClosingTagName(c) { + if (c === 62 || isWhitespace(c)) { + this.cbs.onclosetag(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 10; + this.stateAfterClosingTagName(c); + } + } + stateAfterClosingTagName(c) { + if (c === 62) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeAttrName(c) { + if (c === 62) { + this.cbs.onopentagend(this.index); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else if (c === 47) { + this.state = 7; + if (this.peek() !== 62) { + this.cbs.onerr(22, this.index); + } + } else if (c === 60 && this.peek() === 47) { + this.cbs.onopentagend(this.index); + this.state = 5; + this.sectionStart = this.index; + } else if (!isWhitespace(c)) { + if (c === 61) { + this.cbs.onerr( + 19, + this.index + ); + } + this.handleAttrStart(c); + } + } + handleAttrStart(c) { + if (c === 118 && this.peek() === 45) { + this.state = 13; + this.sectionStart = this.index; + } else if (c === 46 || c === 58 || c === 64 || c === 35) { + this.cbs.ondirname(this.index, this.index + 1); + this.state = 14; + this.sectionStart = this.index + 1; + } else { + this.state = 12; + this.sectionStart = this.index; + } + } + stateInSelfClosingTag(c) { + if (c === 62) { + this.cbs.onselfclosingtag(this.index); + this.state = 1; + this.sectionStart = this.index + 1; + this.inRCDATA = false; + } else if (!isWhitespace(c)) { + this.state = 11; + this.stateBeforeAttrName(c); + } + } + stateInAttrName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.onattribname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 34 || c === 39 || c === 60) { + this.cbs.onerr( + 17, + this.index + ); + } + } + stateInDirName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 58) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 14; + this.sectionStart = this.index + 1; + } else if (c === 46) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDirArg(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 91) { + this.state = 15; + } else if (c === 46) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDynamicDirArg(c) { + if (c === 93) { + this.state = 14; + } else if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index + 1); + this.handleAttrNameEnd(c); + { + this.cbs.onerr( + 27, + this.index + ); + } + } + } + stateInDirModifier(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 46) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.sectionStart = this.index + 1; + } + } + handleAttrNameEnd(c) { + this.sectionStart = this.index; + this.state = 17; + this.cbs.onattribnameend(this.index); + this.stateAfterAttrName(c); + } + stateAfterAttrName(c) { + if (c === 61) { + this.state = 18; + } else if (c === 47 || c === 62) { + this.cbs.onattribend(0, this.sectionStart); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } else if (!isWhitespace(c)) { + this.cbs.onattribend(0, this.sectionStart); + this.handleAttrStart(c); + } + } + stateBeforeAttrValue(c) { + if (c === 34) { + this.state = 19; + this.sectionStart = this.index + 1; + } else if (c === 39) { + this.state = 20; + this.sectionStart = this.index + 1; + } else if (!isWhitespace(c)) { + this.sectionStart = this.index; + this.state = 21; + this.stateInAttrValueNoQuotes(c); + } + } + handleInAttrValue(c, quote) { + if (c === quote || this.fastForwardTo(quote)) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend( + quote === 34 ? 3 : 2, + this.index + 1 + ); + this.state = 11; + } + } + stateInAttrValueDoubleQuotes(c) { + this.handleInAttrValue(c, 34); + } + stateInAttrValueSingleQuotes(c) { + this.handleInAttrValue(c, 39); + } + stateInAttrValueNoQuotes(c) { + if (isWhitespace(c) || c === 62) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend(1, this.index); + this.state = 11; + this.stateBeforeAttrName(c); + } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { + this.cbs.onerr( + 18, + this.index + ); + } else ; + } + stateBeforeDeclaration(c) { + if (c === 91) { + this.state = 26; + this.sequenceIndex = 0; + } else { + this.state = c === 45 ? 25 : 23; + } + } + stateInDeclaration(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateInProcessingInstruction(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.onprocessinginstruction(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeComment(c) { + if (c === 45) { + this.state = 28; + this.currentSequence = Sequences.CommentEnd; + this.sequenceIndex = 2; + this.sectionStart = this.index + 1; + } else { + this.state = 23; + } + } + stateInSpecialComment(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.oncomment(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeSpecialS(c) { + if (c === Sequences.ScriptEnd[3]) { + this.startSpecial(Sequences.ScriptEnd, 4); + } else if (c === Sequences.StyleEnd[3]) { + this.startSpecial(Sequences.StyleEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + stateBeforeSpecialT(c) { + if (c === Sequences.TitleEnd[3]) { + this.startSpecial(Sequences.TitleEnd, 4); + } else if (c === Sequences.TextareaEnd[3]) { + this.startSpecial(Sequences.TextareaEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + startEntity() { + } + stateInEntity() { + } + /** + * Iterates through the buffer, calling the function corresponding to the current state. + * + * States that are more likely to be hit are higher up, as a performance improvement. + */ + parse(input) { + this.buffer = input; + while (this.index < this.buffer.length) { + const c = this.buffer.charCodeAt(this.index); + if (c === 10) { + this.newlines.push(this.index); + } + switch (this.state) { + case 1: { + this.stateText(c); + break; + } + case 2: { + this.stateInterpolationOpen(c); + break; + } + case 3: { + this.stateInterpolation(c); + break; + } + case 4: { + this.stateInterpolationClose(c); + break; + } + case 31: { + this.stateSpecialStartSequence(c); + break; + } + case 32: { + this.stateInRCDATA(c); + break; + } + case 26: { + this.stateCDATASequence(c); + break; + } + case 19: { + this.stateInAttrValueDoubleQuotes(c); + break; + } + case 12: { + this.stateInAttrName(c); + break; + } + case 13: { + this.stateInDirName(c); + break; + } + case 14: { + this.stateInDirArg(c); + break; + } + case 15: { + this.stateInDynamicDirArg(c); + break; + } + case 16: { + this.stateInDirModifier(c); + break; + } + case 28: { + this.stateInCommentLike(c); + break; + } + case 27: { + this.stateInSpecialComment(c); + break; + } + case 11: { + this.stateBeforeAttrName(c); + break; + } + case 6: { + this.stateInTagName(c); + break; + } + case 34: { + this.stateInSFCRootTagName(c); + break; + } + case 9: { + this.stateInClosingTagName(c); + break; + } + case 5: { + this.stateBeforeTagName(c); + break; + } + case 17: { + this.stateAfterAttrName(c); + break; + } + case 20: { + this.stateInAttrValueSingleQuotes(c); + break; + } + case 18: { + this.stateBeforeAttrValue(c); + break; + } + case 8: { + this.stateBeforeClosingTagName(c); + break; + } + case 10: { + this.stateAfterClosingTagName(c); + break; + } + case 29: { + this.stateBeforeSpecialS(c); + break; + } + case 30: { + this.stateBeforeSpecialT(c); + break; + } + case 21: { + this.stateInAttrValueNoQuotes(c); + break; + } + case 7: { + this.stateInSelfClosingTag(c); + break; + } + case 23: { + this.stateInDeclaration(c); + break; + } + case 22: { + this.stateBeforeDeclaration(c); + break; + } + case 25: { + this.stateBeforeComment(c); + break; + } + case 24: { + this.stateInProcessingInstruction(c); + break; + } + case 33: { + this.stateInEntity(); + break; + } + } + this.index++; + } + this.cleanup(); + this.finish(); + } + /** + * Remove data that has already been consumed from the buffer. + */ + cleanup() { + if (this.sectionStart !== this.index) { + if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { + this.cbs.ontext(this.sectionStart, this.index); + this.sectionStart = this.index; + } else if (this.state === 19 || this.state === 20 || this.state === 21) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = this.index; + } + } + } + finish() { + this.handleTrailingData(); + this.cbs.onend(); + } + /** Handle any trailing data. */ + handleTrailingData() { + const endIndex = this.buffer.length; + if (this.sectionStart >= endIndex) { + return; + } + if (this.state === 28) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, endIndex); + } else { + this.cbs.oncomment(this.sectionStart, endIndex); + } + } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { + this.cbs.ontext(this.sectionStart, endIndex); + } + } + emitCodePoint(cp, consumed) { + } + } + + function defaultOnError(error) { + throw error; + } + function defaultOnWarn(msg) { + console.warn(`[Vue warn] ${msg.message}`); + } + function createCompilerError(code, loc, messages, additionalMessage) { + const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ; + const error = new SyntaxError(String(msg)); + error.code = code; + error.loc = loc; + return error; + } + const errorMessages = { + // parse errors + [0]: "Illegal comment.", + [1]: "CDATA section is allowed only in XML context.", + [2]: "Duplicate attribute.", + [3]: "End tag cannot have attributes.", + [4]: "Illegal '/' in tags.", + [5]: "Unexpected EOF in tag.", + [6]: "Unexpected EOF in CDATA section.", + [7]: "Unexpected EOF in comment.", + [8]: "Unexpected EOF in script.", + [9]: "Unexpected EOF in tag.", + [10]: "Incorrectly closed comment.", + [11]: "Incorrectly opened comment.", + [12]: "Illegal tag name. Use '<' to print '<'.", + [13]: "Attribute value was expected.", + [14]: "End tag name was expected.", + [15]: "Whitespace was expected.", + [16]: "Unexpected '<!--' in comment.", + [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, + [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", + [19]: "Attribute name cannot start with '='.", + [21]: "'<?' is allowed only in XML context.", + [20]: `Unexpected null character.`, + [22]: "Illegal '/' in tags.", + // Vue-specific parse errors + [23]: "Invalid end tag.", + [24]: "Element is missing end tag.", + [25]: "Interpolation end sign was not found.", + [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", + [26]: "Legal directive name was expected.", + // transform errors + [28]: `v-if/v-else-if is missing expression.`, + [29]: `v-if/else branches must use unique keys.`, + [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, + [31]: `v-for is missing expression.`, + [32]: `v-for has invalid expression.`, + [33]: `<template v-for> key should be placed on the <template> tag.`, + [34]: `v-bind is missing expression.`, + [52]: `v-bind with same-name shorthand only allows static argument.`, + [35]: `v-on is missing expression.`, + [36]: `Unexpected custom directive on <slot> outlet.`, + [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, + [38]: `Duplicate slot names found. `, + [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, + [40]: `v-slot can only be used on components or <template> tags.`, + [41]: `v-model is missing expression.`, + [42]: `v-model value must be a valid JavaScript member expression.`, + [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, + [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. +Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, + [45]: `Error parsing JavaScript expression: `, + [46]: `<KeepAlive> expects exactly one child component.`, + [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, + // generic errors + [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, + [48]: `ES module mode is not supported in this build of compiler.`, + [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, + [50]: `"scopeId" option is only supported in module mode.`, + // just to fulfill types + [53]: `` + }; + + const isStaticExp = (p) => p.type === 4 && p.isStatic; + function isCoreComponent(tag) { + switch (tag) { + case "Teleport": + case "teleport": + return TELEPORT; + case "Suspense": + case "suspense": + return SUSPENSE; + case "KeepAlive": + case "keep-alive": + return KEEP_ALIVE; + case "BaseTransition": + case "base-transition": + return BASE_TRANSITION; + } + } + const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/; + const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); + const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; + const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; + const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; + const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source; + const isMemberExpressionBrowser = (exp) => { + const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim()); + let state = 0 /* inMemberExp */; + let stateStack = []; + let currentOpenBracketCount = 0; + let currentOpenParensCount = 0; + let currentStringType = null; + for (let i = 0; i < path.length; i++) { + const char = path.charAt(i); + switch (state) { + case 0 /* inMemberExp */: + if (char === "[") { + stateStack.push(state); + state = 1 /* inBrackets */; + currentOpenBracketCount++; + } else if (char === "(") { + stateStack.push(state); + state = 2 /* inParens */; + currentOpenParensCount++; + } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { + return false; + } + break; + case 1 /* inBrackets */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `[`) { + currentOpenBracketCount++; + } else if (char === `]`) { + if (!--currentOpenBracketCount) { + state = stateStack.pop(); + } + } + break; + case 2 /* inParens */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `(`) { + currentOpenParensCount++; + } else if (char === `)`) { + if (i === path.length - 1) { + return false; + } + if (!--currentOpenParensCount) { + state = stateStack.pop(); + } + } + break; + case 3 /* inString */: + if (char === currentStringType) { + state = stateStack.pop(); + currentStringType = null; + } + break; + } + } + return !currentOpenBracketCount && !currentOpenParensCount; + }; + const isMemberExpression = isMemberExpressionBrowser ; + const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; + const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp)); + const isFnExpression = isFnExpressionBrowser ; + function assert(condition, msg) { + if (!condition) { + throw new Error(msg || `unexpected compiler condition`); + } + } + function findDir(node, name, allowEmpty = false) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) { + return p; + } + } + } + function findProp(node, name, dynamicOnly = false, allowEmpty = false) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (dynamicOnly) continue; + if (p.name === name && (p.value || allowEmpty)) { + return p; + } + } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { + return p; + } + } + } + function isStaticArgOf(arg, name) { + return !!(arg && isStaticExp(arg) && arg.content === name); + } + function hasDynamicKeyVBind(node) { + return node.props.some( + (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" + p.arg.type !== 4 || // v-bind:[_ctx.foo] + !p.arg.isStatic) + // v-bind:[foo] + ); + } + function isText$1(node) { + return node.type === 5 || node.type === 2; + } + function isVSlot(p) { + return p.type === 7 && p.name === "slot"; + } + function isTemplateNode(node) { + return node.type === 1 && node.tagType === 3; + } + function isSlotOutlet(node) { + return node.type === 1 && node.tagType === 2; + } + const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); + function getUnnormalizedProps(props, callPath = []) { + if (props && !isString(props) && props.type === 14) { + const callee = props.callee; + if (!isString(callee) && propsHelperSet.has(callee)) { + return getUnnormalizedProps( + props.arguments[0], + callPath.concat(props) + ); + } + } + return [props, callPath]; + } + function injectProp(node, prop, context) { + let propsWithInjection; + let props = node.type === 13 ? node.props : node.arguments[2]; + let callPath = []; + let parentCall; + if (props && !isString(props) && props.type === 14) { + const ret = getUnnormalizedProps(props); + props = ret[0]; + callPath = ret[1]; + parentCall = callPath[callPath.length - 1]; + } + if (props == null || isString(props)) { + propsWithInjection = createObjectExpression([prop]); + } else if (props.type === 14) { + const first = props.arguments[0]; + if (!isString(first) && first.type === 15) { + if (!hasProp(prop, first)) { + first.properties.unshift(prop); + } + } else { + if (props.callee === TO_HANDLERS) { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + } else { + props.arguments.unshift(createObjectExpression([prop])); + } + } + !propsWithInjection && (propsWithInjection = props); + } else if (props.type === 15) { + if (!hasProp(prop, props)) { + props.properties.unshift(prop); + } + propsWithInjection = props; + } else { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { + parentCall = callPath[callPath.length - 2]; + } + } + if (node.type === 13) { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.props = propsWithInjection; + } + } else { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.arguments[2] = propsWithInjection; + } + } + } + function hasProp(prop, props) { + let result = false; + if (prop.key.type === 4) { + const propKeyName = prop.key.content; + result = props.properties.some( + (p) => p.key.type === 4 && p.key.content === propKeyName + ); + } + return result; + } + function toValidAssetId(name, type) { + return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { + return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); + })}`; + } + function getMemoedVNodeCall(node) { + if (node.type === 14 && node.callee === WITH_MEMO) { + return node.arguments[1].returns; + } else { + return node; + } + } + const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/; + + const defaultParserOptions = { + parseMode: "base", + ns: 0, + delimiters: [`{{`, `}}`], + getNamespace: () => 0, + isVoidTag: NO, + isPreTag: NO, + isIgnoreNewlineTag: NO, + isCustomElement: NO, + onError: defaultOnError, + onWarn: defaultOnWarn, + comments: true, + prefixIdentifiers: false + }; + let currentOptions = defaultParserOptions; + let currentRoot = null; + let currentInput = ""; + let currentOpenTag = null; + let currentProp = null; + let currentAttrValue = ""; + let currentAttrStartIndex = -1; + let currentAttrEndIndex = -1; + let inPre = 0; + let inVPre = false; + let currentVPreBoundary = null; + const stack = []; + const tokenizer = new Tokenizer(stack, { + onerr: emitError, + ontext(start, end) { + onText(getSlice(start, end), start, end); + }, + ontextentity(char, start, end) { + onText(char, start, end); + }, + oninterpolation(start, end) { + if (inVPre) { + return onText(getSlice(start, end), start, end); + } + let innerStart = start + tokenizer.delimiterOpen.length; + let innerEnd = end - tokenizer.delimiterClose.length; + while (isWhitespace(currentInput.charCodeAt(innerStart))) { + innerStart++; + } + while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { + innerEnd--; + } + let exp = getSlice(innerStart, innerEnd); + if (exp.includes("&")) { + { + exp = currentOptions.decodeEntities(exp, false); + } + } + addNode({ + type: 5, + content: createExp(exp, false, getLoc(innerStart, innerEnd)), + loc: getLoc(start, end) + }); + }, + onopentagname(start, end) { + const name = getSlice(start, end); + currentOpenTag = { + type: 1, + tag: name, + ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), + tagType: 0, + // will be refined on tag close + props: [], + children: [], + loc: getLoc(start - 1, end), + codegenNode: void 0 + }; + }, + onopentagend(end) { + endOpenTag(end); + }, + onclosetag(start, end) { + const name = getSlice(start, end); + if (!currentOptions.isVoidTag(name)) { + let found = false; + for (let i = 0; i < stack.length; i++) { + const e = stack[i]; + if (e.tag.toLowerCase() === name.toLowerCase()) { + found = true; + if (i > 0) { + emitError(24, stack[0].loc.start.offset); + } + for (let j = 0; j <= i; j++) { + const el = stack.shift(); + onCloseTag(el, end, j < i); + } + break; + } + } + if (!found) { + emitError(23, backTrack(start, 60)); + } + } + }, + onselfclosingtag(end) { + const name = currentOpenTag.tag; + currentOpenTag.isSelfClosing = true; + endOpenTag(end); + if (stack[0] && stack[0].tag === name) { + onCloseTag(stack.shift(), end); + } + }, + onattribname(start, end) { + currentProp = { + type: 6, + name: getSlice(start, end), + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + }, + ondirname(start, end) { + const raw = getSlice(start, end); + const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); + if (!inVPre && name === "") { + emitError(26, start); + } + if (inVPre || name === "") { + currentProp = { + type: 6, + name: raw, + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + } else { + currentProp = { + type: 7, + name, + rawName: raw, + exp: void 0, + arg: void 0, + modifiers: raw === "." ? [createSimpleExpression("prop")] : [], + loc: getLoc(start) + }; + if (name === "pre") { + inVPre = tokenizer.inVPre = true; + currentVPreBoundary = currentOpenTag; + const props = currentOpenTag.props; + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7) { + props[i] = dirToAttr(props[i]); + } + } + } + } + }, + ondirarg(start, end) { + if (start === end) return; + const arg = getSlice(start, end); + if (inVPre) { + currentProp.name += arg; + setLocEnd(currentProp.nameLoc, end); + } else { + const isStatic = arg[0] !== `[`; + currentProp.arg = createExp( + isStatic ? arg : arg.slice(1, -1), + isStatic, + getLoc(start, end), + isStatic ? 3 : 0 + ); + } + }, + ondirmodifier(start, end) { + const mod = getSlice(start, end); + if (inVPre) { + currentProp.name += "." + mod; + setLocEnd(currentProp.nameLoc, end); + } else if (currentProp.name === "slot") { + const arg = currentProp.arg; + if (arg) { + arg.content += "." + mod; + setLocEnd(arg.loc, end); + } + } else { + const exp = createSimpleExpression(mod, true, getLoc(start, end)); + currentProp.modifiers.push(exp); + } + }, + onattribdata(start, end) { + currentAttrValue += getSlice(start, end); + if (currentAttrStartIndex < 0) currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribentity(char, start, end) { + currentAttrValue += char; + if (currentAttrStartIndex < 0) currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribnameend(end) { + const start = currentProp.loc.start.offset; + const name = getSlice(start, end); + if (currentProp.type === 7) { + currentProp.rawName = name; + } + if (currentOpenTag.props.some( + (p) => (p.type === 7 ? p.rawName : p.name) === name + )) { + emitError(2, start); + } + }, + onattribend(quote, end) { + if (currentOpenTag && currentProp) { + setLocEnd(currentProp.loc, end); + if (quote !== 0) { + if (currentAttrValue.includes("&")) { + currentAttrValue = currentOptions.decodeEntities( + currentAttrValue, + true + ); + } + if (currentProp.type === 6) { + if (currentProp.name === "class") { + currentAttrValue = condense(currentAttrValue).trim(); + } + if (quote === 1 && !currentAttrValue) { + emitError(13, end); + } + currentProp.value = { + type: 2, + content: currentAttrValue, + loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) + }; + if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { + tokenizer.enterRCDATA(toCharCodes(`</template`), 0); + } + } else { + let expParseMode = 0 /* Normal */; + currentProp.exp = createExp( + currentAttrValue, + false, + getLoc(currentAttrStartIndex, currentAttrEndIndex), + 0, + expParseMode + ); + if (currentProp.name === "for") { + currentProp.forParseResult = parseForExpression(currentProp.exp); + } + } + } + if (currentProp.type !== 7 || currentProp.name !== "pre") { + currentOpenTag.props.push(currentProp); + } + } + currentAttrValue = ""; + currentAttrStartIndex = currentAttrEndIndex = -1; + }, + oncomment(start, end) { + if (currentOptions.comments) { + addNode({ + type: 3, + content: getSlice(start, end), + loc: getLoc(start - 4, end + 3) + }); + } + }, + onend() { + const end = currentInput.length; + if (tokenizer.state !== 1) { + switch (tokenizer.state) { + case 5: + case 8: + emitError(5, end); + break; + case 3: + case 4: + emitError( + 25, + tokenizer.sectionStart + ); + break; + case 28: + if (tokenizer.currentSequence === Sequences.CdataEnd) { + emitError(6, end); + } else { + emitError(7, end); + } + break; + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + // " + case 20: + // ' + case 21: + emitError(9, end); + break; + } + } + for (let index = 0; index < stack.length; index++) { + onCloseTag(stack[index], end - 1); + emitError(24, stack[index].loc.start.offset); + } + }, + oncdata(start, end) { + if (stack[0].ns !== 0) { + onText(getSlice(start, end), start, end); + } else { + emitError(1, start - 9); + } + }, + onprocessinginstruction(start) { + if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + emitError( + 21, + start - 1 + ); + } + } + }); + const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; + const stripParensRE = /^\(|\)$/g; + function parseForExpression(input) { + const loc = input.loc; + const exp = input.content; + const inMatch = exp.match(forAliasRE); + if (!inMatch) return; + const [, LHS, RHS] = inMatch; + const createAliasExpression = (content, offset, asParam = false) => { + const start = loc.start.offset + offset; + const end = start + content.length; + return createExp( + content, + false, + getLoc(start, end), + 0, + asParam ? 1 /* Params */ : 0 /* Normal */ + ); + }; + const result = { + source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), + value: void 0, + key: void 0, + index: void 0, + finalized: false + }; + let valueContent = LHS.trim().replace(stripParensRE, "").trim(); + const trimmedOffset = LHS.indexOf(valueContent); + const iteratorMatch = valueContent.match(forIteratorRE); + if (iteratorMatch) { + valueContent = valueContent.replace(forIteratorRE, "").trim(); + const keyContent = iteratorMatch[1].trim(); + let keyOffset; + if (keyContent) { + keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); + result.key = createAliasExpression(keyContent, keyOffset, true); + } + if (iteratorMatch[2]) { + const indexContent = iteratorMatch[2].trim(); + if (indexContent) { + result.index = createAliasExpression( + indexContent, + exp.indexOf( + indexContent, + result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length + ), + true + ); + } + } + } + if (valueContent) { + result.value = createAliasExpression(valueContent, trimmedOffset, true); + } + return result; + } + function getSlice(start, end) { + return currentInput.slice(start, end); + } + function endOpenTag(end) { + if (tokenizer.inSFCRoot) { + currentOpenTag.innerLoc = getLoc(end + 1, end + 1); + } + addNode(currentOpenTag); + const { tag, ns } = currentOpenTag; + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre++; + } + if (currentOptions.isVoidTag(tag)) { + onCloseTag(currentOpenTag, end); + } else { + stack.unshift(currentOpenTag); + if (ns === 1 || ns === 2) { + tokenizer.inXML = true; + } + } + currentOpenTag = null; + } + function onText(content, start, end) { + { + const tag = stack[0] && stack[0].tag; + if (tag !== "script" && tag !== "style" && content.includes("&")) { + content = currentOptions.decodeEntities(content, false); + } + } + const parent = stack[0] || currentRoot; + const lastNode = parent.children[parent.children.length - 1]; + if (lastNode && lastNode.type === 2) { + lastNode.content += content; + setLocEnd(lastNode.loc, end); + } else { + parent.children.push({ + type: 2, + content, + loc: getLoc(start, end) + }); + } + } + function onCloseTag(el, end, isImplied = false) { + if (isImplied) { + setLocEnd(el.loc, backTrack(end, 60)); + } else { + setLocEnd(el.loc, lookAhead(end, 62) + 1); + } + if (tokenizer.inSFCRoot) { + if (el.children.length) { + el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end); + } else { + el.innerLoc.end = extend({}, el.innerLoc.start); + } + el.innerLoc.source = getSlice( + el.innerLoc.start.offset, + el.innerLoc.end.offset + ); + } + const { tag, ns, children } = el; + if (!inVPre) { + if (tag === "slot") { + el.tagType = 2; + } else if (isFragmentTemplate(el)) { + el.tagType = 3; + } else if (isComponent(el)) { + el.tagType = 1; + } + } + if (!tokenizer.inRCDATA) { + el.children = condenseWhitespace(children); + } + if (ns === 0 && currentOptions.isIgnoreNewlineTag(tag)) { + const first = children[0]; + if (first && first.type === 2) { + first.content = first.content.replace(/^\r?\n/, ""); + } + } + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre--; + } + if (currentVPreBoundary === el) { + inVPre = tokenizer.inVPre = false; + currentVPreBoundary = null; + } + if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + tokenizer.inXML = false; + } + } + function lookAhead(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1) i++; + return i; + } + function backTrack(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i >= 0) i--; + return i; + } + const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); + function isFragmentTemplate({ tag, props }) { + if (tag === "template") { + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { + return true; + } + } + } + return false; + } + function isComponent({ tag, props }) { + if (currentOptions.isCustomElement(tag)) { + return false; + } + if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { + return true; + } + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 6) { + if (p.name === "is" && p.value) { + if (p.value.content.startsWith("vue:")) { + return true; + } + } + } + } + return false; + } + function isUpperCase(c) { + return c > 64 && c < 91; + } + const windowsNewlineRE = /\r\n/g; + function condenseWhitespace(nodes, tag) { + const shouldCondense = currentOptions.whitespace !== "preserve"; + let removedWhitespace = false; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (node.type === 2) { + if (!inPre) { + if (isAllWhitespace(node.content)) { + const prev = nodes[i - 1] && nodes[i - 1].type; + const next = nodes[i + 1] && nodes[i + 1].type; + if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { + removedWhitespace = true; + nodes[i] = null; + } else { + node.content = " "; + } + } else if (shouldCondense) { + node.content = condense(node.content); + } + } else { + node.content = node.content.replace(windowsNewlineRE, "\n"); + } + } + } + return removedWhitespace ? nodes.filter(Boolean) : nodes; + } + function isAllWhitespace(str) { + for (let i = 0; i < str.length; i++) { + if (!isWhitespace(str.charCodeAt(i))) { + return false; + } + } + return true; + } + function hasNewlineChar(str) { + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + if (c === 10 || c === 13) { + return true; + } + } + return false; + } + function condense(str) { + let ret = ""; + let prevCharIsWhitespace = false; + for (let i = 0; i < str.length; i++) { + if (isWhitespace(str.charCodeAt(i))) { + if (!prevCharIsWhitespace) { + ret += " "; + prevCharIsWhitespace = true; + } + } else { + ret += str[i]; + prevCharIsWhitespace = false; + } + } + return ret; + } + function addNode(node) { + (stack[0] || currentRoot).children.push(node); + } + function getLoc(start, end) { + return { + start: tokenizer.getPos(start), + // @ts-expect-error allow late attachment + end: end == null ? end : tokenizer.getPos(end), + // @ts-expect-error allow late attachment + source: end == null ? end : getSlice(start, end) + }; + } + function cloneLoc(loc) { + return getLoc(loc.start.offset, loc.end.offset); + } + function setLocEnd(loc, end) { + loc.end = tokenizer.getPos(end); + loc.source = getSlice(loc.start.offset, end); + } + function dirToAttr(dir) { + const attr = { + type: 6, + name: dir.rawName, + nameLoc: getLoc( + dir.loc.start.offset, + dir.loc.start.offset + dir.rawName.length + ), + value: void 0, + loc: dir.loc + }; + if (dir.exp) { + const loc = dir.exp.loc; + if (loc.end.offset < dir.loc.end.offset) { + loc.start.offset--; + loc.start.column--; + loc.end.offset++; + loc.end.column++; + } + attr.value = { + type: 2, + content: dir.exp.content, + loc + }; + } + return attr; + } + function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { + const exp = createSimpleExpression(content, isStatic, loc, constType); + return exp; + } + function emitError(code, index, message) { + currentOptions.onError( + createCompilerError(code, getLoc(index, index), void 0, message) + ); + } + function reset() { + tokenizer.reset(); + currentOpenTag = null; + currentProp = null; + currentAttrValue = ""; + currentAttrStartIndex = -1; + currentAttrEndIndex = -1; + stack.length = 0; + } + function baseParse(input, options) { + reset(); + currentInput = input; + currentOptions = extend({}, defaultParserOptions); + if (options) { + let key; + for (key in options) { + if (options[key] != null) { + currentOptions[key] = options[key]; + } + } + } + { + if (!currentOptions.decodeEntities) { + throw new Error( + `[@vue/compiler-core] decodeEntities option is required in browser builds.` + ); + } + } + tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; + tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; + const delimiters = options && options.delimiters; + if (delimiters) { + tokenizer.delimiterOpen = toCharCodes(delimiters[0]); + tokenizer.delimiterClose = toCharCodes(delimiters[1]); + } + const root = currentRoot = createRoot([], input); + tokenizer.parse(currentInput); + root.loc = getLoc(0, input.length); + root.children = condenseWhitespace(root.children); + currentRoot = null; + return root; + } + + function cacheStatic(root, context) { + walk( + root, + void 0, + context, + // Root node is unfortunately non-hoistable due to potential parent + // fallthrough attributes. + isSingleElementRoot(root, root.children[0]) + ); + } + function isSingleElementRoot(root, child) { + const { children } = root; + return children.length === 1 && child.type === 1 && !isSlotOutlet(child); + } + function walk(node, parent, context, doNotHoistNode = false, inFor = false) { + const { children } = node; + const toCache = []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.type === 1 && child.tagType === 0) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType > 0) { + if (constantType >= 2) { + child.codegenNode.patchFlag = -1; + toCache.push(child); + continue; + } + } else { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + const flag = codegenNode.patchFlag; + if ((flag === void 0 || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { + const props = getNodeProps(child); + if (props) { + codegenNode.props = context.hoist(props); + } + } + if (codegenNode.dynamicProps) { + codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); + } + } + } + } else if (child.type === 12) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType >= 2) { + toCache.push(child); + continue; + } + } + if (child.type === 1) { + const isComponent = child.tagType === 1; + if (isComponent) { + context.scopes.vSlot++; + } + walk(child, node, context, false, inFor); + if (isComponent) { + context.scopes.vSlot--; + } + } else if (child.type === 11) { + walk(child, node, context, child.children.length === 1, true); + } else if (child.type === 9) { + for (let i2 = 0; i2 < child.branches.length; i2++) { + walk( + child.branches[i2], + node, + context, + child.branches[i2].children.length === 1, + inFor + ); + } + } + } + let cachedAsArray = false; + if (toCache.length === children.length && node.type === 1) { + if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) { + node.codegenNode.children = getCacheExpression( + createArrayExpression(node.codegenNode.children) + ); + cachedAsArray = true; + } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) { + const slot = getSlotNode(node.codegenNode, "default"); + if (slot) { + slot.returns = getCacheExpression( + createArrayExpression(slot.returns) + ); + cachedAsArray = true; + } + } else if (node.tagType === 3 && parent && parent.type === 1 && parent.tagType === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 15) { + const slotName = findDir(node, "slot", true); + const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg); + if (slot) { + slot.returns = getCacheExpression( + createArrayExpression(slot.returns) + ); + cachedAsArray = true; + } + } + } + if (!cachedAsArray) { + for (const child of toCache) { + child.codegenNode = context.cache(child.codegenNode); + } + } + function getCacheExpression(value) { + const exp = context.cache(value); + if (inFor && context.hmr) { + exp.needArraySpread = true; + } + return exp; + } + function getSlotNode(node2, name) { + if (node2.children && !isArray(node2.children) && node2.children.type === 15) { + const slot = node2.children.properties.find( + (p) => p.key === name || p.key.content === name + ); + return slot && slot.value; + } + } + if (toCache.length && context.transformHoist) { + context.transformHoist(children, context, node); + } + } + function getConstantType(node, context) { + const { constantCache } = context; + switch (node.type) { + case 1: + if (node.tagType !== 0) { + return 0; + } + const cached = constantCache.get(node); + if (cached !== void 0) { + return cached; + } + const codegenNode = node.codegenNode; + if (codegenNode.type !== 13) { + return 0; + } + if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject" && node.tag !== "math") { + return 0; + } + if (codegenNode.patchFlag === void 0) { + let returnType2 = 3; + const generatedPropsType = getGeneratedPropsConstantType(node, context); + if (generatedPropsType === 0) { + constantCache.set(node, 0); + return 0; + } + if (generatedPropsType < returnType2) { + returnType2 = generatedPropsType; + } + for (let i = 0; i < node.children.length; i++) { + const childType = getConstantType(node.children[i], context); + if (childType === 0) { + constantCache.set(node, 0); + return 0; + } + if (childType < returnType2) { + returnType2 = childType; + } + } + if (returnType2 > 1) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && p.name === "bind" && p.exp) { + const expType = getConstantType(p.exp, context); + if (expType === 0) { + constantCache.set(node, 0); + return 0; + } + if (expType < returnType2) { + returnType2 = expType; + } + } + } + } + if (codegenNode.isBlock) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7) { + constantCache.set(node, 0); + return 0; + } + } + context.removeHelper(OPEN_BLOCK); + context.removeHelper( + getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) + ); + codegenNode.isBlock = false; + context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); + } + constantCache.set(node, returnType2); + return returnType2; + } else { + constantCache.set(node, 0); + return 0; + } + case 2: + case 3: + return 3; + case 9: + case 11: + case 10: + return 0; + case 5: + case 12: + return getConstantType(node.content, context); + case 4: + return node.constType; + case 8: + let returnType = 3; + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child) || isSymbol(child)) { + continue; + } + const childType = getConstantType(child, context); + if (childType === 0) { + return 0; + } else if (childType < returnType) { + returnType = childType; + } + } + return returnType; + case 20: + return 2; + default: + return 0; + } + } + const allowHoistedHelperSet = /* @__PURE__ */ new Set([ + NORMALIZE_CLASS, + NORMALIZE_STYLE, + NORMALIZE_PROPS, + GUARD_REACTIVE_PROPS + ]); + function getConstantTypeOfHelperCall(value, context) { + if (value.type === 14 && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { + const arg = value.arguments[0]; + if (arg.type === 4) { + return getConstantType(arg, context); + } else if (arg.type === 14) { + return getConstantTypeOfHelperCall(arg, context); + } + } + return 0; + } + function getGeneratedPropsConstantType(node, context) { + let returnType = 3; + const props = getNodeProps(node); + if (props && props.type === 15) { + const { properties } = props; + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + const keyType = getConstantType(key, context); + if (keyType === 0) { + return keyType; + } + if (keyType < returnType) { + returnType = keyType; + } + let valueType; + if (value.type === 4) { + valueType = getConstantType(value, context); + } else if (value.type === 14) { + valueType = getConstantTypeOfHelperCall(value, context); + } else { + valueType = 0; + } + if (valueType === 0) { + return valueType; + } + if (valueType < returnType) { + returnType = valueType; + } + } + } + return returnType; + } + function getNodeProps(node) { + const codegenNode = node.codegenNode; + if (codegenNode.type === 13) { + return codegenNode.props; + } + } + + function createTransformContext(root, { + filename = "", + prefixIdentifiers = false, + hoistStatic = false, + hmr = false, + cacheHandlers = false, + nodeTransforms = [], + directiveTransforms = {}, + transformHoist = null, + isBuiltInComponent = NOOP, + isCustomElement = NOOP, + expressionPlugins = [], + scopeId = null, + slotted = true, + ssr = false, + inSSR = false, + ssrCssVars = ``, + bindingMetadata = EMPTY_OBJ, + inline = false, + isTS = false, + onError = defaultOnError, + onWarn = defaultOnWarn, + compatConfig + }) { + const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); + const context = { + // options + filename, + selfName: nameMatch && capitalize(camelize(nameMatch[1])), + prefixIdentifiers, + hoistStatic, + hmr, + cacheHandlers, + nodeTransforms, + directiveTransforms, + transformHoist, + isBuiltInComponent, + isCustomElement, + expressionPlugins, + scopeId, + slotted, + ssr, + inSSR, + ssrCssVars, + bindingMetadata, + inline, + isTS, + onError, + onWarn, + compatConfig, + // state + root, + helpers: /* @__PURE__ */ new Map(), + components: /* @__PURE__ */ new Set(), + directives: /* @__PURE__ */ new Set(), + hoists: [], + imports: [], + cached: [], + constantCache: /* @__PURE__ */ new WeakMap(), + temps: 0, + identifiers: /* @__PURE__ */ Object.create(null), + scopes: { + vFor: 0, + vSlot: 0, + vPre: 0, + vOnce: 0 + }, + parent: null, + grandParent: null, + currentNode: root, + childIndex: 0, + inVOnce: false, + // methods + helper(name) { + const count = context.helpers.get(name) || 0; + context.helpers.set(name, count + 1); + return name; + }, + removeHelper(name) { + const count = context.helpers.get(name); + if (count) { + const currentCount = count - 1; + if (!currentCount) { + context.helpers.delete(name); + } else { + context.helpers.set(name, currentCount); + } + } + }, + helperString(name) { + return `_${helperNameMap[context.helper(name)]}`; + }, + replaceNode(node) { + { + if (!context.currentNode) { + throw new Error(`Node being replaced is already removed.`); + } + if (!context.parent) { + throw new Error(`Cannot replace root node.`); + } + } + context.parent.children[context.childIndex] = context.currentNode = node; + }, + removeNode(node) { + if (!context.parent) { + throw new Error(`Cannot remove root node.`); + } + const list = context.parent.children; + const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; + if (removalIndex < 0) { + throw new Error(`node being removed is not a child of current parent`); + } + if (!node || node === context.currentNode) { + context.currentNode = null; + context.onNodeRemoved(); + } else { + if (context.childIndex > removalIndex) { + context.childIndex--; + context.onNodeRemoved(); + } + } + context.parent.children.splice(removalIndex, 1); + }, + onNodeRemoved: NOOP, + addIdentifiers(exp) { + }, + removeIdentifiers(exp) { + }, + hoist(exp) { + if (isString(exp)) exp = createSimpleExpression(exp); + context.hoists.push(exp); + const identifier = createSimpleExpression( + `_hoisted_${context.hoists.length}`, + false, + exp.loc, + 2 + ); + identifier.hoisted = exp; + return identifier; + }, + cache(exp, isVNode = false, inVOnce = false) { + const cacheExp = createCacheExpression( + context.cached.length, + exp, + isVNode, + inVOnce + ); + context.cached.push(cacheExp); + return cacheExp; + } + }; + return context; + } + function transform(root, options) { + const context = createTransformContext(root, options); + traverseNode(root, context); + if (options.hoistStatic) { + cacheStatic(root, context); + } + if (!options.ssr) { + createRootCodegen(root, context); + } + root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); + root.components = [...context.components]; + root.directives = [...context.directives]; + root.imports = context.imports; + root.hoists = context.hoists; + root.temps = context.temps; + root.cached = context.cached; + root.transformed = true; + } + function createRootCodegen(root, context) { + const { helper } = context; + const { children } = root; + if (children.length === 1) { + const child = children[0]; + if (isSingleElementRoot(root, child) && child.codegenNode) { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + convertToBlock(codegenNode, context); + } + root.codegenNode = codegenNode; + } else { + root.codegenNode = child; + } + } else if (children.length > 1) { + let patchFlag = 64; + if (children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + } + root.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + root.children, + patchFlag, + void 0, + void 0, + true, + void 0, + false + ); + } else ; + } + function traverseChildren(parent, context) { + let i = 0; + const nodeRemoved = () => { + i--; + }; + for (; i < parent.children.length; i++) { + const child = parent.children[i]; + if (isString(child)) continue; + context.grandParent = context.parent; + context.parent = parent; + context.childIndex = i; + context.onNodeRemoved = nodeRemoved; + traverseNode(child, context); + } + } + function traverseNode(node, context) { + context.currentNode = node; + const { nodeTransforms } = context; + const exitFns = []; + for (let i2 = 0; i2 < nodeTransforms.length; i2++) { + const onExit = nodeTransforms[i2](node, context); + if (onExit) { + if (isArray(onExit)) { + exitFns.push(...onExit); + } else { + exitFns.push(onExit); + } + } + if (!context.currentNode) { + return; + } else { + node = context.currentNode; + } + } + switch (node.type) { + case 3: + if (!context.ssr) { + context.helper(CREATE_COMMENT); + } + break; + case 5: + if (!context.ssr) { + context.helper(TO_DISPLAY_STRING); + } + break; + // for container types, further traverse downwards + case 9: + for (let i2 = 0; i2 < node.branches.length; i2++) { + traverseNode(node.branches[i2], context); + } + break; + case 10: + case 11: + case 1: + case 0: + traverseChildren(node, context); + break; + } + context.currentNode = node; + let i = exitFns.length; + while (i--) { + exitFns[i](); + } + } + function createStructuralDirectiveTransform(name, fn) { + const matches = isString(name) ? (n) => n === name : (n) => name.test(n); + return (node, context) => { + if (node.type === 1) { + const { props } = node; + if (node.tagType === 3 && props.some(isVSlot)) { + return; + } + const exitFns = []; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 7 && matches(prop.name)) { + props.splice(i, 1); + i--; + const onExit = fn(node, prop, context); + if (onExit) exitFns.push(onExit); + } + } + return exitFns; + } + }; + } + + const PURE_ANNOTATION = `/*@__PURE__*/`; + const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; + function createCodegenContext(ast, { + mode = "function", + prefixIdentifiers = mode === "module", + sourceMap = false, + filename = `template.vue.html`, + scopeId = null, + optimizeImports = false, + runtimeGlobalName = `Vue`, + runtimeModuleName = `vue`, + ssrRuntimeModuleName = "vue/server-renderer", + ssr = false, + isTS = false, + inSSR = false + }) { + const context = { + mode, + prefixIdentifiers, + sourceMap, + filename, + scopeId, + optimizeImports, + runtimeGlobalName, + runtimeModuleName, + ssrRuntimeModuleName, + ssr, + isTS, + inSSR, + source: ast.source, + code: ``, + column: 1, + line: 1, + offset: 0, + indentLevel: 0, + pure: false, + map: void 0, + helper(key) { + return `_${helperNameMap[key]}`; + }, + push(code, newlineIndex = -2 /* None */, node) { + context.code += code; + }, + indent() { + newline(++context.indentLevel); + }, + deindent(withoutNewLine = false) { + if (withoutNewLine) { + --context.indentLevel; + } else { + newline(--context.indentLevel); + } + }, + newline() { + newline(context.indentLevel); + } + }; + function newline(n) { + context.push("\n" + ` `.repeat(n), 0 /* Start */); + } + return context; + } + function generate(ast, options = {}) { + const context = createCodegenContext(ast, options); + if (options.onContextCreated) options.onContextCreated(context); + const { + mode, + push, + prefixIdentifiers, + indent, + deindent, + newline, + scopeId, + ssr + } = context; + const helpers = Array.from(ast.helpers); + const hasHelpers = helpers.length > 0; + const useWithBlock = !prefixIdentifiers && mode !== "module"; + const preambleContext = context; + { + genFunctionPreamble(ast, preambleContext); + } + const functionName = ssr ? `ssrRender` : `render`; + const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; + const signature = args.join(", "); + { + push(`function ${functionName}(${signature}) {`); + } + indent(); + if (useWithBlock) { + push(`with (_ctx) {`); + indent(); + if (hasHelpers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue +`, + -1 /* End */ + ); + newline(); + } + } + if (ast.components.length) { + genAssets(ast.components, "component", context); + if (ast.directives.length || ast.temps > 0) { + newline(); + } + } + if (ast.directives.length) { + genAssets(ast.directives, "directive", context); + if (ast.temps > 0) { + newline(); + } + } + if (ast.temps > 0) { + push(`let `); + for (let i = 0; i < ast.temps; i++) { + push(`${i > 0 ? `, ` : ``}_temp${i}`); + } + } + if (ast.components.length || ast.directives.length || ast.temps) { + push(` +`, 0 /* Start */); + newline(); + } + if (!ssr) { + push(`return `); + } + if (ast.codegenNode) { + genNode(ast.codegenNode, context); + } else { + push(`null`); + } + if (useWithBlock) { + deindent(); + push(`}`); + } + deindent(); + push(`}`); + return { + ast, + code: context.code, + preamble: ``, + map: context.map ? context.map.toJSON() : void 0 + }; + } + function genFunctionPreamble(ast, context) { + const { + ssr, + prefixIdentifiers, + push, + newline, + runtimeModuleName, + runtimeGlobalName, + ssrRuntimeModuleName + } = context; + const VueBinding = runtimeGlobalName; + const helpers = Array.from(ast.helpers); + if (helpers.length > 0) { + { + push(`const _Vue = ${VueBinding} +`, -1 /* End */); + if (ast.hoists.length) { + const staticHelpers = [ + CREATE_VNODE, + CREATE_ELEMENT_VNODE, + CREATE_COMMENT, + CREATE_TEXT, + CREATE_STATIC + ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); + push(`const { ${staticHelpers} } = _Vue +`, -1 /* End */); + } + } + } + genHoists(ast.hoists, context); + newline(); + push(`return `); + } + function genAssets(assets, type, { helper, push, newline, isTS }) { + const resolver = helper( + type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE + ); + for (let i = 0; i < assets.length; i++) { + let id = assets[i]; + const maybeSelfReference = id.endsWith("__self"); + if (maybeSelfReference) { + id = id.slice(0, -6); + } + push( + `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` + ); + if (i < assets.length - 1) { + newline(); + } + } + } + function genHoists(hoists, context) { + if (!hoists.length) { + return; + } + context.pure = true; + const { push, newline } = context; + newline(); + for (let i = 0; i < hoists.length; i++) { + const exp = hoists[i]; + if (exp) { + push(`const _hoisted_${i + 1} = `); + genNode(exp, context); + newline(); + } + } + context.pure = false; + } + function isText(n) { + return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; + } + function genNodeListAsArray(nodes, context) { + const multilines = nodes.length > 3 || nodes.some((n) => isArray(n) || !isText(n)); + context.push(`[`); + multilines && context.indent(); + genNodeList(nodes, context, multilines); + multilines && context.deindent(); + context.push(`]`); + } + function genNodeList(nodes, context, multilines = false, comma = true) { + const { push, newline } = context; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (isString(node)) { + push(node, -3 /* Unknown */); + } else if (isArray(node)) { + genNodeListAsArray(node, context); + } else { + genNode(node, context); + } + if (i < nodes.length - 1) { + if (multilines) { + comma && push(","); + newline(); + } else { + comma && push(", "); + } + } + } + } + function genNode(node, context) { + if (isString(node)) { + context.push(node, -3 /* Unknown */); + return; + } + if (isSymbol(node)) { + context.push(context.helper(node)); + return; + } + switch (node.type) { + case 1: + case 9: + case 11: + assert( + node.codegenNode != null, + `Codegen node is missing for element/if/for node. Apply appropriate transforms first.` + ); + genNode(node.codegenNode, context); + break; + case 2: + genText(node, context); + break; + case 4: + genExpression(node, context); + break; + case 5: + genInterpolation(node, context); + break; + case 12: + genNode(node.codegenNode, context); + break; + case 8: + genCompoundExpression(node, context); + break; + case 3: + genComment(node, context); + break; + case 13: + genVNodeCall(node, context); + break; + case 14: + genCallExpression(node, context); + break; + case 15: + genObjectExpression(node, context); + break; + case 17: + genArrayExpression(node, context); + break; + case 18: + genFunctionExpression(node, context); + break; + case 19: + genConditionalExpression(node, context); + break; + case 20: + genCacheExpression(node, context); + break; + case 21: + genNodeList(node.body, context, true, false); + break; + // SSR only types + case 22: + break; + case 23: + break; + case 24: + break; + case 25: + break; + case 26: + break; + /* v8 ignore start */ + case 10: + break; + default: + { + assert(false, `unhandled codegen node type: ${node.type}`); + const exhaustiveCheck = node; + return exhaustiveCheck; + } + } + } + function genText(node, context) { + context.push(JSON.stringify(node.content), -3 /* Unknown */, node); + } + function genExpression(node, context) { + const { content, isStatic } = node; + context.push( + isStatic ? JSON.stringify(content) : content, + -3 /* Unknown */, + node + ); + } + function genInterpolation(node, context) { + const { push, helper, pure } = context; + if (pure) push(PURE_ANNOTATION); + push(`${helper(TO_DISPLAY_STRING)}(`); + genNode(node.content, context); + push(`)`); + } + function genCompoundExpression(node, context) { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child)) { + context.push(child, -3 /* Unknown */); + } else { + genNode(child, context); + } + } + } + function genExpressionAsPropertyKey(node, context) { + const { push } = context; + if (node.type === 8) { + push(`[`); + genCompoundExpression(node, context); + push(`]`); + } else if (node.isStatic) { + const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); + push(text, -2 /* None */, node); + } else { + push(`[${node.content}]`, -3 /* Unknown */, node); + } + } + function genComment(node, context) { + const { push, helper, pure } = context; + if (pure) { + push(PURE_ANNOTATION); + } + push( + `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, + -3 /* Unknown */, + node + ); + } + function genVNodeCall(node, context) { + const { push, helper, pure } = context; + const { + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent + } = node; + let patchFlagString; + if (patchFlag) { + { + if (patchFlag < 0) { + patchFlagString = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; + } else { + const flagNames = Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `); + patchFlagString = patchFlag + ` /* ${flagNames} */`; + } + } + } + if (directives) { + push(helper(WITH_DIRECTIVES) + `(`); + } + if (isBlock) { + push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); + } + if (pure) { + push(PURE_ANNOTATION); + } + const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); + push(helper(callHelper) + `(`, -2 /* None */, node); + genNodeList( + genNullableArgs([tag, props, children, patchFlagString, dynamicProps]), + context + ); + push(`)`); + if (isBlock) { + push(`)`); + } + if (directives) { + push(`, `); + genNode(directives, context); + push(`)`); + } + } + function genNullableArgs(args) { + let i = args.length; + while (i--) { + if (args[i] != null) break; + } + return args.slice(0, i + 1).map((arg) => arg || `null`); + } + function genCallExpression(node, context) { + const { push, helper, pure } = context; + const callee = isString(node.callee) ? node.callee : helper(node.callee); + if (pure) { + push(PURE_ANNOTATION); + } + push(callee + `(`, -2 /* None */, node); + genNodeList(node.arguments, context); + push(`)`); + } + function genObjectExpression(node, context) { + const { push, indent, deindent, newline } = context; + const { properties } = node; + if (!properties.length) { + push(`{}`, -2 /* None */, node); + return; + } + const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4); + push(multilines ? `{` : `{ `); + multilines && indent(); + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + genExpressionAsPropertyKey(key, context); + push(`: `); + genNode(value, context); + if (i < properties.length - 1) { + push(`,`); + newline(); + } + } + multilines && deindent(); + push(multilines ? `}` : ` }`); + } + function genArrayExpression(node, context) { + genNodeListAsArray(node.elements, context); + } + function genFunctionExpression(node, context) { + const { push, indent, deindent } = context; + const { params, returns, body, newline, isSlot } = node; + if (isSlot) { + push(`_${helperNameMap[WITH_CTX]}(`); + } + push(`(`, -2 /* None */, node); + if (isArray(params)) { + genNodeList(params, context); + } else if (params) { + genNode(params, context); + } + push(`) => `); + if (newline || body) { + push(`{`); + indent(); + } + if (returns) { + if (newline) { + push(`return `); + } + if (isArray(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); + } + } else if (body) { + genNode(body, context); + } + if (newline || body) { + deindent(); + push(`}`); + } + if (isSlot) { + push(`)`); + } + } + function genConditionalExpression(node, context) { + const { test, consequent, alternate, newline: needNewline } = node; + const { push, indent, deindent, newline } = context; + if (test.type === 4) { + const needsParens = !isSimpleIdentifier(test.content); + needsParens && push(`(`); + genExpression(test, context); + needsParens && push(`)`); + } else { + push(`(`); + genNode(test, context); + push(`)`); + } + needNewline && indent(); + context.indentLevel++; + needNewline || push(` `); + push(`? `); + genNode(consequent, context); + context.indentLevel--; + needNewline && newline(); + needNewline || push(` `); + push(`: `); + const isNested = alternate.type === 19; + if (!isNested) { + context.indentLevel++; + } + genNode(alternate, context); + if (!isNested) { + context.indentLevel--; + } + needNewline && deindent( + true + /* without newline */ + ); + } + function genCacheExpression(node, context) { + const { push, helper, indent, deindent, newline } = context; + const { needPauseTracking, needArraySpread } = node; + if (needArraySpread) { + push(`[...(`); + } + push(`_cache[${node.index}] || (`); + if (needPauseTracking) { + indent(); + push(`${helper(SET_BLOCK_TRACKING)}(-1`); + if (node.inVOnce) push(`, true`); + push(`),`); + newline(); + push(`(`); + } + push(`_cache[${node.index}] = `); + genNode(node.value, context); + if (needPauseTracking) { + push(`).cacheIndex = ${node.index},`); + newline(); + push(`${helper(SET_BLOCK_TRACKING)}(1),`); + newline(); + push(`_cache[${node.index}]`); + deindent(); + } + push(`)`); + if (needArraySpread) { + push(`)]`); + } + } + + const prohibitedKeywordRE = new RegExp( + "\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b" + ); + const stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g; + function validateBrowserExpression(node, context, asParams = false, asRawStatements = false) { + const exp = node.content; + if (!exp.trim()) { + return; + } + try { + new Function( + asRawStatements ? ` ${exp} ` : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}` + ); + } catch (e) { + let message = e.message; + const keywordMatch = exp.replace(stripStringRE, "").match(prohibitedKeywordRE); + if (keywordMatch) { + message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`; + } + context.onError( + createCompilerError( + 45, + node.loc, + void 0, + message + ) + ); + } + } + + const transformExpression = (node, context) => { + if (node.type === 5) { + node.content = processExpression( + node.content, + context + ); + } else if (node.type === 1) { + const memo = findDir(node, "memo"); + for (let i = 0; i < node.props.length; i++) { + const dir = node.props[i]; + if (dir.type === 7 && dir.name !== "for") { + const exp = dir.exp; + const arg = dir.arg; + if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor) + !(memo && arg && arg.type === 4 && arg.content === "key")) { + dir.exp = processExpression( + exp, + context, + // slot args must be processed as function params + dir.name === "slot" + ); + } + if (arg && arg.type === 4 && !arg.isStatic) { + dir.arg = processExpression(arg, context); + } + } + } + } + }; + function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { + { + { + validateBrowserExpression(node, context, asParams, asRawStatements); + } + return node; + } + } + + const transformIf = createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + (node, dir, context) => { + return processIf(node, dir, context, (ifNode, branch, isRoot) => { + const siblings = context.parent.children; + let i = siblings.indexOf(ifNode); + let key = 0; + while (i-- >= 0) { + const sibling = siblings[i]; + if (sibling && sibling.type === 9) { + key += sibling.branches.length; + } + } + return () => { + if (isRoot) { + ifNode.codegenNode = createCodegenNodeForBranch( + branch, + key, + context + ); + } else { + const parentCondition = getParentCondition(ifNode.codegenNode); + parentCondition.alternate = createCodegenNodeForBranch( + branch, + key + ifNode.branches.length - 1, + context + ); + } + }; + }); + } + ); + function processIf(node, dir, context, processCodegen) { + if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { + const loc = dir.exp ? dir.exp.loc : node.loc; + context.onError( + createCompilerError(28, dir.loc) + ); + dir.exp = createSimpleExpression(`true`, false, loc); + } + if (dir.exp) { + validateBrowserExpression(dir.exp, context); + } + if (dir.name === "if") { + const branch = createIfBranch(node, dir); + const ifNode = { + type: 9, + loc: cloneLoc(node.loc), + branches: [branch] + }; + context.replaceNode(ifNode); + if (processCodegen) { + return processCodegen(ifNode, branch, true); + } + } else { + const siblings = context.parent.children; + const comments = []; + let i = siblings.indexOf(node); + while (i-- >= -1) { + const sibling = siblings[i]; + if (sibling && sibling.type === 3) { + context.removeNode(sibling); + comments.unshift(sibling); + continue; + } + if (sibling && sibling.type === 2 && !sibling.content.trim().length) { + context.removeNode(sibling); + continue; + } + if (sibling && sibling.type === 9) { + if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { + context.onError( + createCompilerError(30, node.loc) + ); + } + context.removeNode(); + const branch = createIfBranch(node, dir); + if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition> + !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) { + branch.children = [...comments, ...branch.children]; + } + { + const key = branch.userKey; + if (key) { + sibling.branches.forEach(({ userKey }) => { + if (isSameKey(userKey, key)) { + context.onError( + createCompilerError( + 29, + branch.userKey.loc + ) + ); + } + }); + } + } + sibling.branches.push(branch); + const onExit = processCodegen && processCodegen(sibling, branch, false); + traverseNode(branch, context); + if (onExit) onExit(); + context.currentNode = null; + } else { + context.onError( + createCompilerError(30, node.loc) + ); + } + break; + } + } + } + function createIfBranch(node, dir) { + const isTemplateIf = node.tagType === 3; + return { + type: 10, + loc: node.loc, + condition: dir.name === "else" ? void 0 : dir.exp, + children: isTemplateIf && !findDir(node, "for") ? node.children : [node], + userKey: findProp(node, `key`), + isTemplateIf + }; + } + function createCodegenNodeForBranch(branch, keyIndex, context) { + if (branch.condition) { + return createConditionalExpression( + branch.condition, + createChildrenCodegenNode(branch, keyIndex, context), + // make sure to pass in asBlock: true so that the comment node call + // closes the current block. + createCallExpression(context.helper(CREATE_COMMENT), [ + '"v-if"' , + "true" + ]) + ); + } else { + return createChildrenCodegenNode(branch, keyIndex, context); + } + } + function createChildrenCodegenNode(branch, keyIndex, context) { + const { helper } = context; + const keyProperty = createObjectProperty( + `key`, + createSimpleExpression( + `${keyIndex}`, + false, + locStub, + 2 + ) + ); + const { children } = branch; + const firstChild = children[0]; + const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; + if (needFragmentWrapper) { + if (children.length === 1 && firstChild.type === 11) { + const vnodeCall = firstChild.codegenNode; + injectProp(vnodeCall, keyProperty, context); + return vnodeCall; + } else { + let patchFlag = 64; + if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + } + return createVNodeCall( + context, + helper(FRAGMENT), + createObjectExpression([keyProperty]), + children, + patchFlag, + void 0, + void 0, + true, + false, + false, + branch.loc + ); + } + } else { + const ret = firstChild.codegenNode; + const vnodeCall = getMemoedVNodeCall(ret); + if (vnodeCall.type === 13) { + convertToBlock(vnodeCall, context); + } + injectProp(vnodeCall, keyProperty, context); + return ret; + } + } + function isSameKey(a, b) { + if (!a || a.type !== b.type) { + return false; + } + if (a.type === 6) { + if (a.value.content !== b.value.content) { + return false; + } + } else { + const exp = a.exp; + const branchExp = b.exp; + if (exp.type !== branchExp.type) { + return false; + } + if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { + return false; + } + } + return true; + } + function getParentCondition(node) { + while (true) { + if (node.type === 19) { + if (node.alternate.type === 19) { + node = node.alternate; + } else { + return node; + } + } else if (node.type === 20) { + node = node.value; + } + } + } + + const transformBind = (dir, _node, context) => { + const { modifiers, loc } = dir; + const arg = dir.arg; + let { exp } = dir; + if (exp && exp.type === 4 && !exp.content.trim()) { + { + exp = void 0; + } + } + if (!exp) { + if (arg.type !== 4 || !arg.isStatic) { + context.onError( + createCompilerError( + 52, + arg.loc + ) + ); + return { + props: [ + createObjectProperty(arg, createSimpleExpression("", true, loc)) + ] + }; + } + transformBindShorthand(dir); + exp = dir.exp; + } + if (arg.type !== 4) { + arg.children.unshift(`(`); + arg.children.push(`) || ""`); + } else if (!arg.isStatic) { + arg.content = `${arg.content} || ""`; + } + if (modifiers.some((mod) => mod.content === "camel")) { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = camelize(arg.content); + } else { + arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; + } + } else { + arg.children.unshift(`${context.helperString(CAMELIZE)}(`); + arg.children.push(`)`); + } + } + if (!context.inSSR) { + if (modifiers.some((mod) => mod.content === "prop")) { + injectPrefix(arg, "."); + } + if (modifiers.some((mod) => mod.content === "attr")) { + injectPrefix(arg, "^"); + } + } + return { + props: [createObjectProperty(arg, exp)] + }; + }; + const transformBindShorthand = (dir, context) => { + const arg = dir.arg; + const propName = camelize(arg.content); + dir.exp = createSimpleExpression(propName, false, arg.loc); + }; + const injectPrefix = (arg, prefix) => { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = prefix + arg.content; + } else { + arg.content = `\`${prefix}\${${arg.content}}\``; + } + } else { + arg.children.unshift(`'${prefix}' + (`); + arg.children.push(`)`); + } + }; + + const transformFor = createStructuralDirectiveTransform( + "for", + (node, dir, context) => { + const { helper, removeHelper } = context; + return processFor(node, dir, context, (forNode) => { + const renderExp = createCallExpression(helper(RENDER_LIST), [ + forNode.source + ]); + const isTemplate = isTemplateNode(node); + const memo = findDir(node, "memo"); + const keyProp = findProp(node, `key`, false, true); + const isDirKey = keyProp && keyProp.type === 7; + if (isDirKey && !keyProp.exp) { + transformBindShorthand(keyProp); + } + let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp); + const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null; + const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; + const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; + forNode.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + renderExp, + fragmentFlag, + void 0, + void 0, + true, + !isStableFragment, + false, + node.loc + ); + return () => { + let childBlock; + const { children } = forNode; + if (isTemplate) { + node.children.some((c) => { + if (c.type === 1) { + const key = findProp(c, "key"); + if (key) { + context.onError( + createCompilerError( + 33, + key.loc + ) + ); + return true; + } + } + }); + } + const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; + const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; + if (slotOutlet) { + childBlock = slotOutlet.codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + } else if (needFragmentWrapper) { + childBlock = createVNodeCall( + context, + helper(FRAGMENT), + keyProperty ? createObjectExpression([keyProperty]) : void 0, + node.children, + 64, + void 0, + void 0, + true, + void 0, + false + ); + } else { + childBlock = children[0].codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + if (childBlock.isBlock !== !isStableFragment) { + if (childBlock.isBlock) { + removeHelper(OPEN_BLOCK); + removeHelper( + getVNodeBlockHelper(context.inSSR, childBlock.isComponent) + ); + } else { + removeHelper( + getVNodeHelper(context.inSSR, childBlock.isComponent) + ); + } + } + childBlock.isBlock = !isStableFragment; + if (childBlock.isBlock) { + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); + } else { + helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); + } + } + if (memo) { + const loop = createFunctionExpression( + createForLoopParams(forNode.parseResult, [ + createSimpleExpression(`_cached`) + ]) + ); + loop.body = createBlockStatement([ + createCompoundExpression([`const _memo = (`, memo.exp, `)`]), + createCompoundExpression([ + `if (_cached`, + ...keyExp ? [` && _cached.key === `, keyExp] : [], + ` && ${context.helperString( + IS_MEMO_SAME + )}(_cached, _memo)) return _cached` + ]), + createCompoundExpression([`const _item = `, childBlock]), + createSimpleExpression(`_item.memo = _memo`), + createSimpleExpression(`return _item`) + ]); + renderExp.arguments.push( + loop, + createSimpleExpression(`_cache`), + createSimpleExpression(String(context.cached.length)) + ); + context.cached.push(null); + } else { + renderExp.arguments.push( + createFunctionExpression( + createForLoopParams(forNode.parseResult), + childBlock, + true + ) + ); + } + }; + }); + } + ); + function processFor(node, dir, context, processCodegen) { + if (!dir.exp) { + context.onError( + createCompilerError(31, dir.loc) + ); + return; + } + const parseResult = dir.forParseResult; + if (!parseResult) { + context.onError( + createCompilerError(32, dir.loc) + ); + return; + } + finalizeForParseResult(parseResult, context); + const { addIdentifiers, removeIdentifiers, scopes } = context; + const { source, value, key, index } = parseResult; + const forNode = { + type: 11, + loc: dir.loc, + source, + valueAlias: value, + keyAlias: key, + objectIndexAlias: index, + parseResult, + children: isTemplateNode(node) ? node.children : [node] + }; + context.replaceNode(forNode); + scopes.vFor++; + const onExit = processCodegen && processCodegen(forNode); + return () => { + scopes.vFor--; + if (onExit) onExit(); + }; + } + function finalizeForParseResult(result, context) { + if (result.finalized) return; + { + validateBrowserExpression(result.source, context); + if (result.key) { + validateBrowserExpression( + result.key, + context, + true + ); + } + if (result.index) { + validateBrowserExpression( + result.index, + context, + true + ); + } + if (result.value) { + validateBrowserExpression( + result.value, + context, + true + ); + } + } + result.finalized = true; + } + function createForLoopParams({ value, key, index }, memoArgs = []) { + return createParamsList([value, key, index, ...memoArgs]); + } + function createParamsList(args) { + let i = args.length; + while (i--) { + if (args[i]) break; + } + return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); + } + + const defaultFallback = createSimpleExpression(`undefined`, false); + const trackSlotScopes = (node, context) => { + if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { + const vSlot = findDir(node, "slot"); + if (vSlot) { + vSlot.exp; + context.scopes.vSlot++; + return () => { + context.scopes.vSlot--; + }; + } + } + }; + const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( + props, + children, + false, + true, + children.length ? children[0].loc : loc + ); + function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { + context.helper(WITH_CTX); + const { children, loc } = node; + const slotsProperties = []; + const dynamicSlots = []; + let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; + const onComponentSlot = findDir(node, "slot", true); + if (onComponentSlot) { + const { arg, exp } = onComponentSlot; + if (arg && !isStaticExp(arg)) { + hasDynamicSlots = true; + } + slotsProperties.push( + createObjectProperty( + arg || createSimpleExpression("default", true), + buildSlotFn(exp, void 0, children, loc) + ) + ); + } + let hasTemplateSlots = false; + let hasNamedDefaultSlot = false; + const implicitDefaultChildren = []; + const seenSlotNames = /* @__PURE__ */ new Set(); + let conditionalBranchIndex = 0; + for (let i = 0; i < children.length; i++) { + const slotElement = children[i]; + let slotDir; + if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { + if (slotElement.type !== 3) { + implicitDefaultChildren.push(slotElement); + } + continue; + } + if (onComponentSlot) { + context.onError( + createCompilerError(37, slotDir.loc) + ); + break; + } + hasTemplateSlots = true; + const { children: slotChildren, loc: slotLoc } = slotElement; + const { + arg: slotName = createSimpleExpression(`default`, true), + exp: slotProps, + loc: dirLoc + } = slotDir; + let staticSlotName; + if (isStaticExp(slotName)) { + staticSlotName = slotName ? slotName.content : `default`; + } else { + hasDynamicSlots = true; + } + const vFor = findDir(slotElement, "for"); + const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); + let vIf; + let vElse; + if (vIf = findDir(slotElement, "if")) { + hasDynamicSlots = true; + dynamicSlots.push( + createConditionalExpression( + vIf.exp, + buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), + defaultFallback + ) + ); + } else if (vElse = findDir( + slotElement, + /^else(-if)?$/, + true + /* allowEmpty */ + )) { + let j = i; + let prev; + while (j--) { + prev = children[j]; + if (prev.type !== 3) { + break; + } + } + if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) { + let conditional = dynamicSlots[dynamicSlots.length - 1]; + while (conditional.alternate.type === 19) { + conditional = conditional.alternate; + } + conditional.alternate = vElse.exp ? createConditionalExpression( + vElse.exp, + buildDynamicSlot( + slotName, + slotFunction, + conditionalBranchIndex++ + ), + defaultFallback + ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); + } else { + context.onError( + createCompilerError(30, vElse.loc) + ); + } + } else if (vFor) { + hasDynamicSlots = true; + const parseResult = vFor.forParseResult; + if (parseResult) { + finalizeForParseResult(parseResult, context); + dynamicSlots.push( + createCallExpression(context.helper(RENDER_LIST), [ + parseResult.source, + createFunctionExpression( + createForLoopParams(parseResult), + buildDynamicSlot(slotName, slotFunction), + true + ) + ]) + ); + } else { + context.onError( + createCompilerError( + 32, + vFor.loc + ) + ); + } + } else { + if (staticSlotName) { + if (seenSlotNames.has(staticSlotName)) { + context.onError( + createCompilerError( + 38, + dirLoc + ) + ); + continue; + } + seenSlotNames.add(staticSlotName); + if (staticSlotName === "default") { + hasNamedDefaultSlot = true; + } + } + slotsProperties.push(createObjectProperty(slotName, slotFunction)); + } + } + if (!onComponentSlot) { + const buildDefaultSlotProperty = (props, children2) => { + const fn = buildSlotFn(props, void 0, children2, loc); + return createObjectProperty(`default`, fn); + }; + if (!hasTemplateSlots) { + slotsProperties.push(buildDefaultSlotProperty(void 0, children)); + } else if (implicitDefaultChildren.length && // #3766 + // with whitespace: 'preserve', whitespaces between slots will end up in + // implicitDefaultChildren. Ignore if all implicit children are whitespaces. + implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { + if (hasNamedDefaultSlot) { + context.onError( + createCompilerError( + 39, + implicitDefaultChildren[0].loc + ) + ); + } else { + slotsProperties.push( + buildDefaultSlotProperty(void 0, implicitDefaultChildren) + ); + } + } + } + const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; + let slots = createObjectExpression( + slotsProperties.concat( + createObjectProperty( + `_`, + // 2 = compiled but dynamic = can skip normalization, but must run diff + // 1 = compiled and static = can skip normalization AND diff as optimized + createSimpleExpression( + slotFlag + (` /* ${slotFlagsText[slotFlag]} */` ), + false + ) + ) + ), + loc + ); + if (dynamicSlots.length) { + slots = createCallExpression(context.helper(CREATE_SLOTS), [ + slots, + createArrayExpression(dynamicSlots) + ]); + } + return { + slots, + hasDynamicSlots + }; + } + function buildDynamicSlot(name, fn, index) { + const props = [ + createObjectProperty(`name`, name), + createObjectProperty(`fn`, fn) + ]; + if (index != null) { + props.push( + createObjectProperty(`key`, createSimpleExpression(String(index), true)) + ); + } + return createObjectExpression(props); + } + function hasForwardedSlots(children) { + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + if (child.tagType === 2 || hasForwardedSlots(child.children)) { + return true; + } + break; + case 9: + if (hasForwardedSlots(child.branches)) return true; + break; + case 10: + case 11: + if (hasForwardedSlots(child.children)) return true; + break; + } + } + return false; + } + function isNonWhitespaceContent(node) { + if (node.type !== 2 && node.type !== 12) + return true; + return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); + } + + const directiveImportMap = /* @__PURE__ */ new WeakMap(); + const transformElement = (node, context) => { + return function postTransformElement() { + node = context.currentNode; + if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { + return; + } + const { tag, props } = node; + const isComponent = node.tagType === 1; + let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; + const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; + let vnodeProps; + let vnodeChildren; + let patchFlag = 0; + let vnodeDynamicProps; + let dynamicPropNames; + let vnodeDirectives; + let shouldUseBlock = ( + // dynamic component may resolve to plain elements + isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block + // updates inside get proper isSVG flag at runtime. (#639, #643) + // This is technically web-specific, but splitting the logic out of core + // leads to too much unnecessary complexity. + (tag === "svg" || tag === "foreignObject" || tag === "math") + ); + if (props.length > 0) { + const propsBuildResult = buildProps( + node, + context, + void 0, + isComponent, + isDynamicComponent + ); + vnodeProps = propsBuildResult.props; + patchFlag = propsBuildResult.patchFlag; + dynamicPropNames = propsBuildResult.dynamicPropNames; + const directives = propsBuildResult.directives; + vnodeDirectives = directives && directives.length ? createArrayExpression( + directives.map((dir) => buildDirectiveArgs(dir, context)) + ) : void 0; + if (propsBuildResult.shouldUseBlock) { + shouldUseBlock = true; + } + } + if (node.children.length > 0) { + if (vnodeTag === KEEP_ALIVE) { + shouldUseBlock = true; + patchFlag |= 1024; + if (node.children.length > 1) { + context.onError( + createCompilerError(46, { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + }) + ); + } + } + const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling + vnodeTag !== TELEPORT && // explained above. + vnodeTag !== KEEP_ALIVE; + if (shouldBuildAsSlots) { + const { slots, hasDynamicSlots } = buildSlots(node, context); + vnodeChildren = slots; + if (hasDynamicSlots) { + patchFlag |= 1024; + } + } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { + const child = node.children[0]; + const type = child.type; + const hasDynamicTextChild = type === 5 || type === 8; + if (hasDynamicTextChild && getConstantType(child, context) === 0) { + patchFlag |= 1; + } + if (hasDynamicTextChild || type === 2) { + vnodeChildren = child; + } else { + vnodeChildren = node.children; + } + } else { + vnodeChildren = node.children; + } + } + if (dynamicPropNames && dynamicPropNames.length) { + vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); + } + node.codegenNode = createVNodeCall( + context, + vnodeTag, + vnodeProps, + vnodeChildren, + patchFlag === 0 ? void 0 : patchFlag, + vnodeDynamicProps, + vnodeDirectives, + !!shouldUseBlock, + false, + isComponent, + node.loc + ); + }; + }; + function resolveComponentType(node, context, ssr = false) { + let { tag } = node; + const isExplicitDynamic = isComponentTag(tag); + const isProp = findProp( + node, + "is", + false, + true + /* allow empty */ + ); + if (isProp) { + if (isExplicitDynamic || false) { + let exp; + if (isProp.type === 6) { + exp = isProp.value && createSimpleExpression(isProp.value.content, true); + } else { + exp = isProp.exp; + if (!exp) { + exp = createSimpleExpression(`is`, false, isProp.arg.loc); + } + } + if (exp) { + return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ + exp + ]); + } + } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { + tag = isProp.value.content.slice(4); + } + } + const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); + if (builtIn) { + if (!ssr) context.helper(builtIn); + return builtIn; + } + context.helper(RESOLVE_COMPONENT); + context.components.add(tag); + return toValidAssetId(tag, `component`); + } + function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { + const { tag, loc: elementLoc, children } = node; + let properties = []; + const mergeArgs = []; + const runtimeDirectives = []; + const hasChildren = children.length > 0; + let shouldUseBlock = false; + let patchFlag = 0; + let hasRef = false; + let hasClassBinding = false; + let hasStyleBinding = false; + let hasHydrationEventBinding = false; + let hasDynamicKeys = false; + let hasVnodeHook = false; + const dynamicPropNames = []; + const pushMergeArg = (arg) => { + if (properties.length) { + mergeArgs.push( + createObjectExpression(dedupeProperties(properties), elementLoc) + ); + properties = []; + } + if (arg) mergeArgs.push(arg); + }; + const pushRefVForMarker = () => { + if (context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); + } + }; + const analyzePatchFlag = ({ key, value }) => { + if (isStaticExp(key)) { + const name = key.content; + const isEventHandler = isOn(name); + if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click + // dedicated fast path. + name.toLowerCase() !== "onclick" && // omit v-model handlers + name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks + !isReservedProp(name)) { + hasHydrationEventBinding = true; + } + if (isEventHandler && isReservedProp(name)) { + hasVnodeHook = true; + } + if (isEventHandler && value.type === 14) { + value = value.arguments[0]; + } + if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { + return; + } + if (name === "ref") { + hasRef = true; + } else if (name === "class") { + hasClassBinding = true; + } else if (name === "style") { + hasStyleBinding = true; + } else if (name !== "key" && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + } else { + hasDynamicKeys = true; + } + }; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 6) { + const { loc, name, nameLoc, value } = prop; + let isStatic = true; + if (name === "ref") { + hasRef = true; + pushRefVForMarker(); + } + if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || false)) { + continue; + } + properties.push( + createObjectProperty( + createSimpleExpression(name, true, nameLoc), + createSimpleExpression( + value ? value.content : "", + isStatic, + value ? value.loc : loc + ) + ) + ); + } else { + const { name, arg, exp, loc, modifiers } = prop; + const isVBind = name === "bind"; + const isVOn = name === "on"; + if (name === "slot") { + if (!isComponent) { + context.onError( + createCompilerError(40, loc) + ); + } + continue; + } + if (name === "once" || name === "memo") { + continue; + } + if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || false)) { + continue; + } + if (isVOn && ssr) { + continue; + } + if ( + // #938: elements with dynamic keys should be forced into blocks + isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked + // before children + isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") + ) { + shouldUseBlock = true; + } + if (isVBind && isStaticArgOf(arg, "ref")) { + pushRefVForMarker(); + } + if (!arg && (isVBind || isVOn)) { + hasDynamicKeys = true; + if (exp) { + if (isVBind) { + pushRefVForMarker(); + pushMergeArg(); + mergeArgs.push(exp); + } else { + pushMergeArg({ + type: 14, + loc, + callee: context.helper(TO_HANDLERS), + arguments: isComponent ? [exp] : [exp, `true`] + }); + } + } else { + context.onError( + createCompilerError( + isVBind ? 34 : 35, + loc + ) + ); + } + continue; + } + if (isVBind && modifiers.some((mod) => mod.content === "prop")) { + patchFlag |= 32; + } + const directiveTransform = context.directiveTransforms[name]; + if (directiveTransform) { + const { props: props2, needRuntime } = directiveTransform(prop, node, context); + !ssr && props2.forEach(analyzePatchFlag); + if (isVOn && arg && !isStaticExp(arg)) { + pushMergeArg(createObjectExpression(props2, elementLoc)); + } else { + properties.push(...props2); + } + if (needRuntime) { + runtimeDirectives.push(prop); + if (isSymbol(needRuntime)) { + directiveImportMap.set(prop, needRuntime); + } + } + } else if (!isBuiltInDirective(name)) { + runtimeDirectives.push(prop); + if (hasChildren) { + shouldUseBlock = true; + } + } + } + } + let propsExpression = void 0; + if (mergeArgs.length) { + pushMergeArg(); + if (mergeArgs.length > 1) { + propsExpression = createCallExpression( + context.helper(MERGE_PROPS), + mergeArgs, + elementLoc + ); + } else { + propsExpression = mergeArgs[0]; + } + } else if (properties.length) { + propsExpression = createObjectExpression( + dedupeProperties(properties), + elementLoc + ); + } + if (hasDynamicKeys) { + patchFlag |= 16; + } else { + if (hasClassBinding && !isComponent) { + patchFlag |= 2; + } + if (hasStyleBinding && !isComponent) { + patchFlag |= 4; + } + if (dynamicPropNames.length) { + patchFlag |= 8; + } + if (hasHydrationEventBinding) { + patchFlag |= 32; + } + } + if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { + patchFlag |= 512; + } + if (!context.inSSR && propsExpression) { + switch (propsExpression.type) { + case 15: + let classKeyIndex = -1; + let styleKeyIndex = -1; + let hasDynamicKey = false; + for (let i = 0; i < propsExpression.properties.length; i++) { + const key = propsExpression.properties[i].key; + if (isStaticExp(key)) { + if (key.content === "class") { + classKeyIndex = i; + } else if (key.content === "style") { + styleKeyIndex = i; + } + } else if (!key.isHandlerKey) { + hasDynamicKey = true; + } + } + const classProp = propsExpression.properties[classKeyIndex]; + const styleProp = propsExpression.properties[styleKeyIndex]; + if (!hasDynamicKey) { + if (classProp && !isStaticExp(classProp.value)) { + classProp.value = createCallExpression( + context.helper(NORMALIZE_CLASS), + [classProp.value] + ); + } + if (styleProp && // the static style is compiled into an object, + // so use `hasStyleBinding` to ensure that it is a dynamic style binding + (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, + // v-bind:style with static literal object + styleProp.value.type === 17)) { + styleProp.value = createCallExpression( + context.helper(NORMALIZE_STYLE), + [styleProp.value] + ); + } + } else { + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [propsExpression] + ); + } + break; + case 14: + break; + default: + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [ + createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ + propsExpression + ]) + ] + ); + break; + } + } + return { + props: propsExpression, + directives: runtimeDirectives, + patchFlag, + dynamicPropNames, + shouldUseBlock + }; + } + function dedupeProperties(properties) { + const knownProps = /* @__PURE__ */ new Map(); + const deduped = []; + for (let i = 0; i < properties.length; i++) { + const prop = properties[i]; + if (prop.key.type === 8 || !prop.key.isStatic) { + deduped.push(prop); + continue; + } + const name = prop.key.content; + const existing = knownProps.get(name); + if (existing) { + if (name === "style" || name === "class" || isOn(name)) { + mergeAsArray(existing, prop); + } + } else { + knownProps.set(name, prop); + deduped.push(prop); + } + } + return deduped; + } + function mergeAsArray(existing, incoming) { + if (existing.value.type === 17) { + existing.value.elements.push(incoming.value); + } else { + existing.value = createArrayExpression( + [existing.value, incoming.value], + existing.loc + ); + } + } + function buildDirectiveArgs(dir, context) { + const dirArgs = []; + const runtime = directiveImportMap.get(dir); + if (runtime) { + dirArgs.push(context.helperString(runtime)); + } else { + { + context.helper(RESOLVE_DIRECTIVE); + context.directives.add(dir.name); + dirArgs.push(toValidAssetId(dir.name, `directive`)); + } + } + const { loc } = dir; + if (dir.exp) dirArgs.push(dir.exp); + if (dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(dir.arg); + } + if (Object.keys(dir.modifiers).length) { + if (!dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(`void 0`); + } + const trueExpression = createSimpleExpression(`true`, false, loc); + dirArgs.push( + createObjectExpression( + dir.modifiers.map( + (modifier) => createObjectProperty(modifier, trueExpression) + ), + loc + ) + ); + } + return createArrayExpression(dirArgs, dir.loc); + } + function stringifyDynamicPropNames(props) { + let propsNamesString = `[`; + for (let i = 0, l = props.length; i < l; i++) { + propsNamesString += JSON.stringify(props[i]); + if (i < l - 1) propsNamesString += ", "; + } + return propsNamesString + `]`; + } + function isComponentTag(tag) { + return tag === "component" || tag === "Component"; + } + + const transformSlotOutlet = (node, context) => { + if (isSlotOutlet(node)) { + const { children, loc } = node; + const { slotName, slotProps } = processSlotOutlet(node, context); + const slotArgs = [ + context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, + slotName, + "{}", + "undefined", + "true" + ]; + let expectedLen = 2; + if (slotProps) { + slotArgs[2] = slotProps; + expectedLen = 3; + } + if (children.length) { + slotArgs[3] = createFunctionExpression([], children, false, false, loc); + expectedLen = 4; + } + if (context.scopeId && !context.slotted) { + expectedLen = 5; + } + slotArgs.splice(expectedLen); + node.codegenNode = createCallExpression( + context.helper(RENDER_SLOT), + slotArgs, + loc + ); + } + }; + function processSlotOutlet(node, context) { + let slotName = `"default"`; + let slotProps = void 0; + const nonNameProps = []; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (p.value) { + if (p.name === "name") { + slotName = JSON.stringify(p.value.content); + } else { + p.name = camelize(p.name); + nonNameProps.push(p); + } + } + } else { + if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { + if (p.exp) { + slotName = p.exp; + } else if (p.arg && p.arg.type === 4) { + const name = camelize(p.arg.content); + slotName = p.exp = createSimpleExpression(name, false, p.arg.loc); + } + } else { + if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { + p.arg.content = camelize(p.arg.content); + } + nonNameProps.push(p); + } + } + } + if (nonNameProps.length > 0) { + const { props, directives } = buildProps( + node, + context, + nonNameProps, + false, + false + ); + slotProps = props; + if (directives.length) { + context.onError( + createCompilerError( + 36, + directives[0].loc + ) + ); + } + } + return { + slotName, + slotProps + }; + } + + const transformOn$1 = (dir, node, context, augmentor) => { + const { loc, modifiers, arg } = dir; + if (!dir.exp && !modifiers.length) { + context.onError(createCompilerError(35, loc)); + } + let eventName; + if (arg.type === 4) { + if (arg.isStatic) { + let rawName = arg.content; + if (rawName.startsWith("vnode")) { + context.onError(createCompilerError(51, arg.loc)); + } + if (rawName.startsWith("vue:")) { + rawName = `vnode-${rawName.slice(4)}`; + } + const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( + // for non-element and vnode lifecycle event listeners, auto convert + // it to camelCase. See issue #2249 + toHandlerKey(camelize(rawName)) + ) : ( + // preserve case for plain element listeners that have uppercase + // letters, as these may be custom elements' custom events + `on:${rawName}` + ); + eventName = createSimpleExpression(eventString, true, arg.loc); + } else { + eventName = createCompoundExpression([ + `${context.helperString(TO_HANDLER_KEY)}(`, + arg, + `)` + ]); + } + } else { + eventName = arg; + eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); + eventName.children.push(`)`); + } + let exp = dir.exp; + if (exp && !exp.content.trim()) { + exp = void 0; + } + let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; + if (exp) { + const isMemberExp = isMemberExpression(exp); + const isInlineStatement = !(isMemberExp || isFnExpression(exp)); + const hasMultipleStatements = exp.content.includes(`;`); + { + validateBrowserExpression( + exp, + context, + false, + hasMultipleStatements + ); + } + if (isInlineStatement || shouldCache && isMemberExp) { + exp = createCompoundExpression([ + `${isInlineStatement ? `$event` : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, + exp, + hasMultipleStatements ? `}` : `)` + ]); + } + } + let ret = { + props: [ + createObjectProperty( + eventName, + exp || createSimpleExpression(`() => {}`, false, loc) + ) + ] + }; + if (augmentor) { + ret = augmentor(ret); + } + if (shouldCache) { + ret.props[0].value = context.cache(ret.props[0].value); + } + ret.props.forEach((p) => p.key.isHandlerKey = true); + return ret; + }; + + const transformText = (node, context) => { + if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { + return () => { + const children = node.children; + let currentContainer = void 0; + let hasText = false; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child)) { + hasText = true; + for (let j = i + 1; j < children.length; j++) { + const next = children[j]; + if (isText$1(next)) { + if (!currentContainer) { + currentContainer = children[i] = createCompoundExpression( + [child], + child.loc + ); + } + currentContainer.children.push(` + `, next); + children.splice(j, 1); + j--; + } else { + currentContainer = void 0; + break; + } + } + } + } + if (!hasText || // if this is a plain element with a single text child, leave it + // as-is since the runtime has dedicated fast path for this by directly + // setting textContent of the element. + // for component root it's always normalized anyway. + children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 + // custom directives can potentially add DOM elements arbitrarily, + // we need to avoid setting textContent of the element at runtime + // to avoid accidentally overwriting the DOM elements added + // by the user through custom directives. + !node.props.find( + (p) => p.type === 7 && !context.directiveTransforms[p.name] + ) && // in compat mode, <template> tags with no special directives + // will be rendered as a fragment so its children must be + // converted into vnodes. + true)) { + return; + } + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child) || child.type === 8) { + const callArgs = []; + if (child.type !== 2 || child.content !== " ") { + callArgs.push(child); + } + if (!context.ssr && getConstantType(child, context) === 0) { + callArgs.push( + 1 + (` /* ${PatchFlagNames[1]} */` ) + ); + } + children[i] = { + type: 12, + content: child, + loc: child.loc, + codegenNode: createCallExpression( + context.helper(CREATE_TEXT), + callArgs + ) + }; + } + } + }; + } + }; + + const seen$1 = /* @__PURE__ */ new WeakSet(); + const transformOnce = (node, context) => { + if (node.type === 1 && findDir(node, "once", true)) { + if (seen$1.has(node) || context.inVOnce || context.inSSR) { + return; + } + seen$1.add(node); + context.inVOnce = true; + context.helper(SET_BLOCK_TRACKING); + return () => { + context.inVOnce = false; + const cur = context.currentNode; + if (cur.codegenNode) { + cur.codegenNode = context.cache( + cur.codegenNode, + true, + true + ); + } + }; + } + }; + + const transformModel$1 = (dir, node, context) => { + const { exp, arg } = dir; + if (!exp) { + context.onError( + createCompilerError(41, dir.loc) + ); + return createTransformProps(); + } + const rawExp = exp.loc.source.trim(); + const expString = exp.type === 4 ? exp.content : rawExp; + const bindingType = context.bindingMetadata[rawExp]; + if (bindingType === "props" || bindingType === "props-aliased") { + context.onError(createCompilerError(44, exp.loc)); + return createTransformProps(); + } + const maybeRef = false; + if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) { + context.onError( + createCompilerError(42, exp.loc) + ); + return createTransformProps(); + } + const propName = arg ? arg : createSimpleExpression("modelValue", true); + const eventName = arg ? isStaticExp(arg) ? `onUpdate:${camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; + let assignmentExp; + const eventArg = context.isTS ? `($event: any)` : `$event`; + { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + exp, + `) = $event)` + ]); + } + const props = [ + // modelValue: foo + createObjectProperty(propName, dir.exp), + // "onUpdate:modelValue": $event => (foo = $event) + createObjectProperty(eventName, assignmentExp) + ]; + if (dir.modifiers.length && node.tagType === 1) { + const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); + const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; + props.push( + createObjectProperty( + modifiersKey, + createSimpleExpression( + `{ ${modifiers} }`, + false, + dir.loc, + 2 + ) + ) + ); + } + return createTransformProps(props); + }; + function createTransformProps(props = []) { + return { props }; + } + + const seen = /* @__PURE__ */ new WeakSet(); + const transformMemo = (node, context) => { + if (node.type === 1) { + const dir = findDir(node, "memo"); + if (!dir || seen.has(node)) { + return; + } + seen.add(node); + return () => { + const codegenNode = node.codegenNode || context.currentNode.codegenNode; + if (codegenNode && codegenNode.type === 13) { + if (node.tagType !== 1) { + convertToBlock(codegenNode, context); + } + node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ + dir.exp, + createFunctionExpression(void 0, codegenNode), + `_cache`, + String(context.cached.length) + ]); + context.cached.push(null); + } + }; + } + }; + + function getBaseTransformPreset(prefixIdentifiers) { + return [ + [ + transformOnce, + transformIf, + transformMemo, + transformFor, + ...[], + ...[transformExpression] , + transformSlotOutlet, + transformElement, + trackSlotScopes, + transformText + ], + { + on: transformOn$1, + bind: transformBind, + model: transformModel$1 + } + ]; + } + function baseCompile(source, options = {}) { + const onError = options.onError || defaultOnError; + const isModuleMode = options.mode === "module"; + { + if (options.prefixIdentifiers === true) { + onError(createCompilerError(47)); + } else if (isModuleMode) { + onError(createCompilerError(48)); + } + } + const prefixIdentifiers = false; + if (options.cacheHandlers) { + onError(createCompilerError(49)); + } + if (options.scopeId && !isModuleMode) { + onError(createCompilerError(50)); + } + const resolvedOptions = extend({}, options, { + prefixIdentifiers + }); + const ast = isString(source) ? baseParse(source, resolvedOptions) : source; + const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(); + transform( + ast, + extend({}, resolvedOptions, { + nodeTransforms: [ + ...nodeTransforms, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: extend( + {}, + directiveTransforms, + options.directiveTransforms || {} + // user transforms + ) + }) + ); + return generate(ast, resolvedOptions); + } + + const noopDirectiveTransform = () => ({ props: [] }); + + const V_MODEL_RADIO = Symbol(`vModelRadio` ); + const V_MODEL_CHECKBOX = Symbol( + `vModelCheckbox` + ); + const V_MODEL_TEXT = Symbol(`vModelText` ); + const V_MODEL_SELECT = Symbol( + `vModelSelect` + ); + const V_MODEL_DYNAMIC = Symbol( + `vModelDynamic` + ); + const V_ON_WITH_MODIFIERS = Symbol( + `vOnModifiersGuard` + ); + const V_ON_WITH_KEYS = Symbol( + `vOnKeysGuard` + ); + const V_SHOW = Symbol(`vShow` ); + const TRANSITION = Symbol(`Transition` ); + const TRANSITION_GROUP = Symbol( + `TransitionGroup` + ); + registerRuntimeHelpers({ + [V_MODEL_RADIO]: `vModelRadio`, + [V_MODEL_CHECKBOX]: `vModelCheckbox`, + [V_MODEL_TEXT]: `vModelText`, + [V_MODEL_SELECT]: `vModelSelect`, + [V_MODEL_DYNAMIC]: `vModelDynamic`, + [V_ON_WITH_MODIFIERS]: `withModifiers`, + [V_ON_WITH_KEYS]: `withKeys`, + [V_SHOW]: `vShow`, + [TRANSITION]: `Transition`, + [TRANSITION_GROUP]: `TransitionGroup` + }); + + let decoder; + function decodeHtmlBrowser(raw, asAttr = false) { + if (!decoder) { + decoder = document.createElement("div"); + } + if (asAttr) { + decoder.innerHTML = `<div foo="${raw.replace(/"/g, """)}">`; + return decoder.children[0].getAttribute("foo"); + } else { + decoder.innerHTML = raw; + return decoder.textContent; + } + } + + const parserOptions = { + parseMode: "html", + isVoidTag, + isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + isPreTag: (tag) => tag === "pre", + isIgnoreNewlineTag: (tag) => tag === "pre" || tag === "textarea", + decodeEntities: decodeHtmlBrowser , + isBuiltInComponent: (tag) => { + if (tag === "Transition" || tag === "transition") { + return TRANSITION; + } else if (tag === "TransitionGroup" || tag === "transition-group") { + return TRANSITION_GROUP; + } + }, + // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher + getNamespace(tag, parent, rootNamespace) { + let ns = parent ? parent.ns : rootNamespace; + if (parent && ns === 2) { + if (parent.tag === "annotation-xml") { + if (tag === "svg") { + return 1; + } + if (parent.props.some( + (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") + )) { + ns = 0; + } + } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { + ns = 0; + } + } else if (parent && ns === 1) { + if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { + ns = 0; + } + } + if (ns === 0) { + if (tag === "svg") { + return 1; + } + if (tag === "math") { + return 2; + } + } + return ns; + } + }; + + const transformStyle = (node) => { + if (node.type === 1) { + node.props.forEach((p, i) => { + if (p.type === 6 && p.name === "style" && p.value) { + node.props[i] = { + type: 7, + name: `bind`, + arg: createSimpleExpression(`style`, true, p.loc), + exp: parseInlineCSS(p.value.content, p.loc), + modifiers: [], + loc: p.loc + }; + } + }); + } + }; + const parseInlineCSS = (cssText, loc) => { + const normalized = parseStringStyle(cssText); + return createSimpleExpression( + JSON.stringify(normalized), + false, + loc, + 3 + ); + }; + + function createDOMCompilerError(code, loc) { + return createCompilerError( + code, + loc, + DOMErrorMessages + ); + } + const DOMErrorMessages = { + [53]: `v-html is missing expression.`, + [54]: `v-html will override element children.`, + [55]: `v-text is missing expression.`, + [56]: `v-text will override element children.`, + [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, + [58]: `v-model argument is not supported on plain elements.`, + [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, + [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, + [61]: `v-show is missing expression.`, + [62]: `<Transition> expects exactly one child element or component.`, + [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` + }; + + const transformVHtml = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(53, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(54, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`innerHTML`, true, loc), + exp || createSimpleExpression("", true) + ) + ] + }; + }; + + const transformVText = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(55, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(56, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`textContent`, true), + exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression( + context.helperString(TO_DISPLAY_STRING), + [exp], + loc + ) : createSimpleExpression("", true) + ) + ] + }; + }; + + const transformModel = (dir, node, context) => { + const baseResult = transformModel$1(dir, node, context); + if (!baseResult.props.length || node.tagType === 1) { + return baseResult; + } + if (dir.arg) { + context.onError( + createDOMCompilerError( + 58, + dir.arg.loc + ) + ); + } + function checkDuplicatedValue() { + const value = findDir(node, "bind"); + if (value && isStaticArgOf(value.arg, "value")) { + context.onError( + createDOMCompilerError( + 60, + value.loc + ) + ); + } + } + const { tag } = node; + const isCustomElement = context.isCustomElement(tag); + if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { + let directiveToUse = V_MODEL_TEXT; + let isInvalidType = false; + if (tag === "input" || isCustomElement) { + const type = findProp(node, `type`); + if (type) { + if (type.type === 7) { + directiveToUse = V_MODEL_DYNAMIC; + } else if (type.value) { + switch (type.value.content) { + case "radio": + directiveToUse = V_MODEL_RADIO; + break; + case "checkbox": + directiveToUse = V_MODEL_CHECKBOX; + break; + case "file": + isInvalidType = true; + context.onError( + createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + default: + checkDuplicatedValue(); + break; + } + } + } else if (hasDynamicKeyVBind(node)) { + directiveToUse = V_MODEL_DYNAMIC; + } else { + checkDuplicatedValue(); + } + } else if (tag === "select") { + directiveToUse = V_MODEL_SELECT; + } else { + checkDuplicatedValue(); + } + if (!isInvalidType) { + baseResult.needRuntime = context.helper(directiveToUse); + } + } else { + context.onError( + createDOMCompilerError( + 57, + dir.loc + ) + ); + } + baseResult.props = baseResult.props.filter( + (p) => !(p.key.type === 4 && p.key.content === "modelValue") + ); + return baseResult; + }; + + const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`); + const isNonKeyModifier = /* @__PURE__ */ makeMap( + // event propagation management + `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` + ); + const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right"); + const isKeyboardEvent = /* @__PURE__ */ makeMap(`onkeyup,onkeydown,onkeypress`); + const resolveModifiers = (key, modifiers, context, loc) => { + const keyModifiers = []; + const nonKeyModifiers = []; + const eventOptionModifiers = []; + for (let i = 0; i < modifiers.length; i++) { + const modifier = modifiers[i].content; + if (isEventOptionModifier(modifier)) { + eventOptionModifiers.push(modifier); + } else { + if (maybeKeyModifier(modifier)) { + if (isStaticExp(key)) { + if (isKeyboardEvent(key.content.toLowerCase())) { + keyModifiers.push(modifier); + } else { + nonKeyModifiers.push(modifier); + } + } else { + keyModifiers.push(modifier); + nonKeyModifiers.push(modifier); + } + } else { + if (isNonKeyModifier(modifier)) { + nonKeyModifiers.push(modifier); + } else { + keyModifiers.push(modifier); + } + } + } + } + return { + keyModifiers, + nonKeyModifiers, + eventOptionModifiers + }; + }; + const transformClick = (key, event) => { + const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick"; + return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([ + `(`, + key, + `) === "onClick" ? "${event}" : (`, + key, + `)` + ]) : key; + }; + const transformOn = (dir, node, context) => { + return transformOn$1(dir, node, context, (baseResult) => { + const { modifiers } = dir; + if (!modifiers.length) return baseResult; + let { key, value: handlerExp } = baseResult.props[0]; + const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); + if (nonKeyModifiers.includes("right")) { + key = transformClick(key, `onContextmenu`); + } + if (nonKeyModifiers.includes("middle")) { + key = transformClick(key, `onMouseup`); + } + if (nonKeyModifiers.length) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ + handlerExp, + JSON.stringify(nonKeyModifiers) + ]); + } + if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard + (!isStaticExp(key) || isKeyboardEvent(key.content.toLowerCase()))) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ + handlerExp, + JSON.stringify(keyModifiers) + ]); + } + if (eventOptionModifiers.length) { + const modifierPostfix = eventOptionModifiers.map(capitalize).join(""); + key = isStaticExp(key) ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); + } + return { + props: [createObjectProperty(key, handlerExp)] + }; + }); + }; + + const transformShow = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(61, loc) + ); + } + return { + props: [], + needRuntime: context.helper(V_SHOW) + }; + }; + + const transformTransition = (node, context) => { + if (node.type === 1 && node.tagType === 1) { + const component = context.isBuiltInComponent(node.tag); + if (component === TRANSITION) { + return () => { + if (!node.children.length) { + return; + } + if (hasMultipleChildren(node)) { + context.onError( + createDOMCompilerError( + 62, + { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + } + ) + ); + } + const child = node.children[0]; + if (child.type === 1) { + for (const p of child.props) { + if (p.type === 7 && p.name === "show") { + node.props.push({ + type: 6, + name: "persisted", + nameLoc: node.loc, + value: void 0, + loc: node.loc + }); + } + } + } + }; + } + } + }; + function hasMultipleChildren(node) { + const children = node.children = node.children.filter( + (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()) + ); + const child = children[0]; + return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren); + } + + const ignoreSideEffectTags = (node, context) => { + if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { + context.onError( + createDOMCompilerError( + 63, + node.loc + ) + ); + context.removeNode(); + } + }; + + function isValidHTMLNesting(parent, child) { + if (parent in onlyValidChildren) { + return onlyValidChildren[parent].has(child); + } + if (child in onlyValidParents) { + return onlyValidParents[child].has(parent); + } + if (parent in knownInvalidChildren) { + if (knownInvalidChildren[parent].has(child)) return false; + } + if (child in knownInvalidParents) { + if (knownInvalidParents[child].has(parent)) return false; + } + return true; + } + const headings = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]); + const emptySet = /* @__PURE__ */ new Set([]); + const onlyValidChildren = { + head: /* @__PURE__ */ new Set([ + "base", + "basefront", + "bgsound", + "link", + "meta", + "title", + "noscript", + "noframes", + "style", + "script", + "template" + ]), + optgroup: /* @__PURE__ */ new Set(["option"]), + select: /* @__PURE__ */ new Set(["optgroup", "option", "hr"]), + // table + table: /* @__PURE__ */ new Set(["caption", "colgroup", "tbody", "tfoot", "thead"]), + tr: /* @__PURE__ */ new Set(["td", "th"]), + colgroup: /* @__PURE__ */ new Set(["col"]), + tbody: /* @__PURE__ */ new Set(["tr"]), + thead: /* @__PURE__ */ new Set(["tr"]), + tfoot: /* @__PURE__ */ new Set(["tr"]), + // these elements can not have any children elements + script: emptySet, + iframe: emptySet, + option: emptySet, + textarea: emptySet, + style: emptySet, + title: emptySet + }; + const onlyValidParents = { + // sections + html: emptySet, + body: /* @__PURE__ */ new Set(["html"]), + head: /* @__PURE__ */ new Set(["html"]), + // table + td: /* @__PURE__ */ new Set(["tr"]), + colgroup: /* @__PURE__ */ new Set(["table"]), + caption: /* @__PURE__ */ new Set(["table"]), + tbody: /* @__PURE__ */ new Set(["table"]), + tfoot: /* @__PURE__ */ new Set(["table"]), + col: /* @__PURE__ */ new Set(["colgroup"]), + th: /* @__PURE__ */ new Set(["tr"]), + thead: /* @__PURE__ */ new Set(["table"]), + tr: /* @__PURE__ */ new Set(["tbody", "thead", "tfoot"]), + // data list + dd: /* @__PURE__ */ new Set(["dl", "div"]), + dt: /* @__PURE__ */ new Set(["dl", "div"]), + // other + figcaption: /* @__PURE__ */ new Set(["figure"]), + // li: new Set(["ul", "ol"]), + summary: /* @__PURE__ */ new Set(["details"]), + area: /* @__PURE__ */ new Set(["map"]) + }; + const knownInvalidChildren = { + p: /* @__PURE__ */ new Set([ + "address", + "article", + "aside", + "blockquote", + "center", + "details", + "dialog", + "dir", + "div", + "dl", + "fieldset", + "figure", + "footer", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "header", + "hgroup", + "hr", + "li", + "main", + "nav", + "menu", + "ol", + "p", + "pre", + "section", + "table", + "ul" + ]), + svg: /* @__PURE__ */ new Set([ + "b", + "blockquote", + "br", + "code", + "dd", + "div", + "dl", + "dt", + "em", + "embed", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "hr", + "i", + "img", + "li", + "menu", + "meta", + "ol", + "p", + "pre", + "ruby", + "s", + "small", + "span", + "strong", + "sub", + "sup", + "table", + "u", + "ul", + "var" + ]) + }; + const knownInvalidParents = { + a: /* @__PURE__ */ new Set(["a"]), + button: /* @__PURE__ */ new Set(["button"]), + dd: /* @__PURE__ */ new Set(["dd", "dt"]), + dt: /* @__PURE__ */ new Set(["dd", "dt"]), + form: /* @__PURE__ */ new Set(["form"]), + li: /* @__PURE__ */ new Set(["li"]), + h1: headings, + h2: headings, + h3: headings, + h4: headings, + h5: headings, + h6: headings + }; + + const validateHtmlNesting = (node, context) => { + if (node.type === 1 && node.tagType === 0 && context.parent && context.parent.type === 1 && context.parent.tagType === 0 && !isValidHTMLNesting(context.parent.tag, node.tag)) { + const error = new SyntaxError( + `<${node.tag}> cannot be child of <${context.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.` + ); + error.loc = node.loc; + context.onWarn(error); + } + }; + + const DOMNodeTransforms = [ + transformStyle, + ...[transformTransition, validateHtmlNesting] + ]; + const DOMDirectiveTransforms = { + cloak: noopDirectiveTransform, + html: transformVHtml, + text: transformVText, + model: transformModel, + // override compiler-core + on: transformOn, + // override compiler-core + show: transformShow + }; + function compile(src, options = {}) { + return baseCompile( + src, + extend({}, parserOptions, options, { + nodeTransforms: [ + // ignore <script> and <tag> + // this is not put inside DOMNodeTransforms because that list is used + // by compiler-ssr to generate vnode fallback branches + ignoreSideEffectTags, + ...DOMNodeTransforms, + ...options.nodeTransforms || [] + ], + directiveTransforms: extend( + {}, + DOMDirectiveTransforms, + options.directiveTransforms || {} + ), + transformHoist: null + }) + ); + } + + { + initDev(); + } + const compileCache = /* @__PURE__ */ Object.create(null); + function compileToFunction(template, options) { + if (!isString(template)) { + if (template.nodeType) { + template = template.innerHTML; + } else { + warn(`invalid template option: `, template); + return NOOP; + } + } + const key = genCacheKey(template, options); + const cached = compileCache[key]; + if (cached) { + return cached; + } + if (template[0] === "#") { + const el = document.querySelector(template); + if (!el) { + warn(`Template element not found or is empty: ${template}`); + } + template = el ? el.innerHTML : ``; + } + const opts = extend( + { + hoistStatic: true, + onError: onError , + onWarn: (e) => onError(e, true) + }, + options + ); + if (!opts.isCustomElement && typeof customElements !== "undefined") { + opts.isCustomElement = (tag) => !!customElements.get(tag); + } + const { code } = compile(template, opts); + function onError(err, asWarning = false) { + const message = asWarning ? err.message : `Template compilation error: ${err.message}`; + const codeFrame = err.loc && generateCodeFrame( + template, + err.loc.start.offset, + err.loc.end.offset + ); + warn(codeFrame ? `${message} +${codeFrame}` : message); + } + const render = new Function(code)() ; + render._rc = true; + return compileCache[key] = render; + } + registerRuntimeCompiler(compileToFunction); + + exports.BaseTransition = BaseTransition; + exports.BaseTransitionPropsValidators = BaseTransitionPropsValidators; + exports.Comment = Comment; + exports.DeprecationTypes = DeprecationTypes; + exports.EffectScope = EffectScope; + exports.ErrorCodes = ErrorCodes; + exports.ErrorTypeStrings = ErrorTypeStrings; + exports.Fragment = Fragment; + exports.KeepAlive = KeepAlive; + exports.ReactiveEffect = ReactiveEffect; + exports.Static = Static; + exports.Suspense = Suspense; + exports.Teleport = Teleport; + exports.Text = Text; + exports.TrackOpTypes = TrackOpTypes; + exports.Transition = Transition; + exports.TransitionGroup = TransitionGroup; + exports.TriggerOpTypes = TriggerOpTypes; + exports.VueElement = VueElement; + exports.assertNumber = assertNumber; + exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling; + exports.callWithErrorHandling = callWithErrorHandling; + exports.camelize = camelize; + exports.capitalize = capitalize; + exports.cloneVNode = cloneVNode; + exports.compatUtils = compatUtils; + exports.compile = compileToFunction; + exports.computed = computed; + exports.createApp = createApp; + exports.createBlock = createBlock; + exports.createCommentVNode = createCommentVNode; + exports.createElementBlock = createElementBlock; + exports.createElementVNode = createBaseVNode; + exports.createHydrationRenderer = createHydrationRenderer; + exports.createPropsRestProxy = createPropsRestProxy; + exports.createRenderer = createRenderer; + exports.createSSRApp = createSSRApp; + exports.createSlots = createSlots; + exports.createStaticVNode = createStaticVNode; + exports.createTextVNode = createTextVNode; + exports.createVNode = createVNode; + exports.customRef = customRef; + exports.defineAsyncComponent = defineAsyncComponent; + exports.defineComponent = defineComponent; + exports.defineCustomElement = defineCustomElement; + exports.defineEmits = defineEmits; + exports.defineExpose = defineExpose; + exports.defineModel = defineModel; + exports.defineOptions = defineOptions; + exports.defineProps = defineProps; + exports.defineSSRCustomElement = defineSSRCustomElement; + exports.defineSlots = defineSlots; + exports.devtools = devtools; + exports.effect = effect; + exports.effectScope = effectScope; + exports.getCurrentInstance = getCurrentInstance; + exports.getCurrentScope = getCurrentScope; + exports.getCurrentWatcher = getCurrentWatcher; + exports.getTransitionRawChildren = getTransitionRawChildren; + exports.guardReactiveProps = guardReactiveProps; + exports.h = h; + exports.handleError = handleError; + exports.hasInjectionContext = hasInjectionContext; + exports.hydrate = hydrate; + exports.hydrateOnIdle = hydrateOnIdle; + exports.hydrateOnInteraction = hydrateOnInteraction; + exports.hydrateOnMediaQuery = hydrateOnMediaQuery; + exports.hydrateOnVisible = hydrateOnVisible; + exports.initCustomFormatter = initCustomFormatter; + exports.initDirectivesForSSR = initDirectivesForSSR; + exports.inject = inject; + exports.isMemoSame = isMemoSame; + exports.isProxy = isProxy; + exports.isReactive = isReactive; + exports.isReadonly = isReadonly; + exports.isRef = isRef; + exports.isRuntimeOnly = isRuntimeOnly; + exports.isShallow = isShallow; + exports.isVNode = isVNode; + exports.markRaw = markRaw; + exports.mergeDefaults = mergeDefaults; + exports.mergeModels = mergeModels; + exports.mergeProps = mergeProps; + exports.nextTick = nextTick; + exports.normalizeClass = normalizeClass; + exports.normalizeProps = normalizeProps; + exports.normalizeStyle = normalizeStyle; + exports.onActivated = onActivated; + exports.onBeforeMount = onBeforeMount; + exports.onBeforeUnmount = onBeforeUnmount; + exports.onBeforeUpdate = onBeforeUpdate; + exports.onDeactivated = onDeactivated; + exports.onErrorCaptured = onErrorCaptured; + exports.onMounted = onMounted; + exports.onRenderTracked = onRenderTracked; + exports.onRenderTriggered = onRenderTriggered; + exports.onScopeDispose = onScopeDispose; + exports.onServerPrefetch = onServerPrefetch; + exports.onUnmounted = onUnmounted; + exports.onUpdated = onUpdated; + exports.onWatcherCleanup = onWatcherCleanup; + exports.openBlock = openBlock; + exports.popScopeId = popScopeId; + exports.provide = provide; + exports.proxyRefs = proxyRefs; + exports.pushScopeId = pushScopeId; + exports.queuePostFlushCb = queuePostFlushCb; + exports.reactive = reactive; + exports.readonly = readonly; + exports.ref = ref; + exports.registerRuntimeCompiler = registerRuntimeCompiler; + exports.render = render; + exports.renderList = renderList; + exports.renderSlot = renderSlot; + exports.resolveComponent = resolveComponent; + exports.resolveDirective = resolveDirective; + exports.resolveDynamicComponent = resolveDynamicComponent; + exports.resolveFilter = resolveFilter; + exports.resolveTransitionHooks = resolveTransitionHooks; + exports.setBlockTracking = setBlockTracking; + exports.setDevtoolsHook = setDevtoolsHook; + exports.setTransitionHooks = setTransitionHooks; + exports.shallowReactive = shallowReactive; + exports.shallowReadonly = shallowReadonly; + exports.shallowRef = shallowRef; + exports.ssrContextKey = ssrContextKey; + exports.ssrUtils = ssrUtils; + exports.stop = stop; + exports.toDisplayString = toDisplayString; + exports.toHandlerKey = toHandlerKey; + exports.toHandlers = toHandlers; + exports.toRaw = toRaw; + exports.toRef = toRef; + exports.toRefs = toRefs; + exports.toValue = toValue; + exports.transformVNodeArgs = transformVNodeArgs; + exports.triggerRef = triggerRef; + exports.unref = unref; + exports.useAttrs = useAttrs; + exports.useCssModule = useCssModule; + exports.useCssVars = useCssVars; + exports.useHost = useHost; + exports.useId = useId; + exports.useModel = useModel; + exports.useSSRContext = useSSRContext; + exports.useShadowRoot = useShadowRoot; + exports.useSlots = useSlots; + exports.useTemplateRef = useTemplateRef; + exports.useTransitionState = useTransitionState; + exports.vModelCheckbox = vModelCheckbox; + exports.vModelDynamic = vModelDynamic; + exports.vModelRadio = vModelRadio; + exports.vModelSelect = vModelSelect; + exports.vModelText = vModelText; + exports.vShow = vShow; + exports.version = version; + exports.warn = warn; + exports.watch = watch; + exports.watchEffect = watchEffect; + exports.watchPostEffect = watchPostEffect; + exports.watchSyncEffect = watchSyncEffect; + exports.withAsyncContext = withAsyncContext; + exports.withCtx = withCtx; + exports.withDefaults = withDefaults; + exports.withDirectives = withDirectives; + exports.withKeys = withKeys; + exports.withMemo = withMemo; + exports.withModifiers = withModifiers; + exports.withScopeId = withScopeId; + + return exports; + +})({}); diff --git a/vuetest/node_modules/vue/dist/vue.global.prod.js b/vuetest/node_modules/vue/dist/vue.global.prod.js new file mode 100644 index 0000000..b2cd5c3 --- /dev/null +++ b/vuetest/node_modules/vue/dist/vue.global.prod.js @@ -0,0 +1,9 @@ +/** +* vue v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/var Vue=function(e){"use strict";var t,n;let r,i,l,s,o,a,c,u,d,p,f,h,m;function g(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return e=>e in t}let y={},b=[],_=()=>{},S=()=>!1,x=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||97>e.charCodeAt(2)),C=e=>e.startsWith("onUpdate:"),k=Object.assign,T=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},N=Object.prototype.hasOwnProperty,w=(e,t)=>N.call(e,t),A=Array.isArray,E=e=>"[object Map]"===V(e),I=e=>"[object Set]"===V(e),R=e=>"[object Date]"===V(e),O=e=>"[object RegExp]"===V(e),P=e=>"function"==typeof e,M=e=>"string"==typeof e,L=e=>"symbol"==typeof e,$=e=>null!==e&&"object"==typeof e,D=e=>($(e)||P(e))&&P(e.then)&&P(e.catch),F=Object.prototype.toString,V=e=>F.call(e),B=e=>V(e).slice(8,-1),U=e=>"[object Object]"===V(e),j=e=>M(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,H=g(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),q=g("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),W=e=>{let t=Object.create(null);return n=>t[n]||(t[n]=e(n))},K=/-(\w)/g,z=W(e=>e.replace(K,(e,t)=>t?t.toUpperCase():"")),J=/\B([A-Z])/g,G=W(e=>e.replace(J,"-$1").toLowerCase()),X=W(e=>e.charAt(0).toUpperCase()+e.slice(1)),Q=W(e=>e?`on${X(e)}`:""),Z=(e,t)=>!Object.is(e,t),Y=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ee=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},et=e=>{let t=parseFloat(e);return isNaN(t)?e:t},en=e=>{let t=M(e)?Number(e):NaN;return isNaN(t)?e:t},er=()=>r||(r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),ei=g("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function el(e){if(A(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=M(r)?ec(r):el(r);if(i)for(let e in i)t[e]=i[e]}return t}if(M(e)||$(e))return e}let es=/;(?![^(]*\))/g,eo=/:([^]+)/,ea=/\/\*[^]*?\*\//g;function ec(e){let t={};return e.replace(ea,"").split(es).forEach(e=>{if(e){let n=e.split(eo);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function eu(e){let t="";if(M(e))t=e;else if(A(e))for(let n=0;n<e.length;n++){let r=eu(e[n]);r&&(t+=r+" ")}else if($(e))for(let n in e)e[n]&&(t+=n+" ");return t.trim()}let ed=g("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),ep=g("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),ef=g("annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"),eh=g("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),em=g("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function eg(e,t){if(e===t)return!0;let n=R(e),r=R(t);if(n||r)return!!n&&!!r&&e.getTime()===t.getTime();if(n=L(e),r=L(t),n||r)return e===t;if(n=A(e),r=A(t),n||r)return!!n&&!!r&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=eg(e[r],t[r]);return n}(e,t);if(n=$(e),r=$(t),n||r){if(!n||!r||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){let r=e.hasOwnProperty(n),i=t.hasOwnProperty(n);if(r&&!i||!r&&i||!eg(e[n],t[n]))return!1}}return String(e)===String(t)}function ey(e,t){return e.findIndex(e=>eg(e,t))}let ev=e=>!!(e&&!0===e.__v_isRef),eb=e=>M(e)?e:null==e?"":A(e)||$(e)&&(e.toString===F||!P(e.toString))?ev(e)?eb(e.value):JSON.stringify(e,e_,2):String(e),e_=(e,t)=>ev(t)?e_(e,t.value):E(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[eS(t,r)+" =>"]=n,e),{})}:I(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>eS(e))}:L(t)?eS(t):!$(t)||A(t)||U(t)?t:String(t),eS=(e,t="")=>{var n;return L(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};class ex{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=i,!e&&i&&(this.index=(i.scopes||(i.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let t=i;try{return i=this,e()}finally{i=t}}}on(){i=this}off(){i=this.parent}stop(e){if(this._active){let t,n;for(t=0,this._active=!1,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,this.effects.length=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}let eC=new WeakSet;class ek{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,i&&i.active&&i.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,eC.has(this)&&(eC.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||eN(this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,eD(this),eA(this);let e=l,t=eP;l=this,eP=!0;try{return this.fn()}finally{eE(this),l=e,eP=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)eO(e);this.deps=this.depsTail=void 0,eD(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?eC.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){eI(this)&&this.run()}get dirty(){return eI(this)}}let eT=0;function eN(e,t=!1){if(e.flags|=8,t){e.next=o,o=e;return}e.next=s,s=e}function ew(){let e;if(!(--eT>0)){if(o){let e=o;for(o=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}for(;s;){let t=s;for(s=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}}function eA(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function eE(e){let t;let n=e.depsTail,r=n;for(;r;){let e=r.prevDep;-1===r.version?(r===n&&(n=e),eO(r),function(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function eI(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(eR(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function eR(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===eF))return;e.globalVersion=eF;let t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!eI(e)){e.flags&=-3;return}let n=l,r=eP;l=e,eP=!0;try{eA(e);let n=e.fn(e._value);(0===t.version||Z(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{l=n,eP=r,eE(e),e.flags&=-3}}function eO(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)eO(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}let eP=!0,eM=[];function eL(){eM.push(eP),eP=!1}function e$(){let e=eM.pop();eP=void 0===e||e}function eD(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=l;l=void 0;try{t()}finally{l=e}}}let eF=0;class eV{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class eB{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!l||!eP||l===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==l)t=this.activeLink=new eV(l,this),l.deps?(t.prevDep=l.depsTail,l.depsTail.nextDep=t,l.depsTail=t):l.deps=l.depsTail=t,function e(t){if(t.dep.sc++,4&t.sub.flags){let n=t.dep.computed;if(n&&!t.dep.subs){n.flags|=20;for(let t=n.deps;t;t=t.nextDep)e(t)}let r=t.dep.subs;r!==t&&(t.prevSub=r,r&&(r.nextSub=t)),t.dep.subs=t}}(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=l.depsTail,t.nextDep=void 0,l.depsTail.nextDep=t,l.depsTail=t,l.deps===t&&(l.deps=e)}return t}trigger(e){this.version++,eF++,this.notify(e)}notify(e){eT++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{ew()}}}let eU=new WeakMap,ej=Symbol(""),eH=Symbol(""),eq=Symbol("");function eW(e,t,n){if(eP&&l){let t=eU.get(e);t||eU.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new eB),r.map=t,r.key=n),r.track()}}function eK(e,t,n,r,i,l){let s=eU.get(e);if(!s){eF++;return}let o=e=>{e&&e.trigger()};if(eT++,"clear"===t)s.forEach(o);else{let i=A(e),l=i&&j(n);if(i&&"length"===n){let e=Number(r);s.forEach((t,n)=>{("length"===n||n===eq||!L(n)&&n>=e)&&o(t)})}else switch((void 0!==n||s.has(void 0))&&o(s.get(n)),l&&o(s.get(eq)),t){case"add":i?l&&o(s.get("length")):(o(s.get(ej)),E(e)&&o(s.get(eH)));break;case"delete":!i&&(o(s.get(ej)),E(e)&&o(s.get(eH)));break;case"set":E(e)&&o(s.get(ej))}}ew()}function ez(e){let t=tx(e);return t===e?t:(eW(t,"iterate",eq),t_(e)?t:t.map(tk))}function eJ(e){return eW(e=tx(e),"iterate",eq),e}let eG={__proto__:null,[Symbol.iterator](){return eX(this,Symbol.iterator,tk)},concat(...e){return ez(this).concat(...e.map(e=>A(e)?ez(e):e))},entries(){return eX(this,"entries",e=>(e[1]=tk(e[1]),e))},every(e,t){return eZ(this,"every",e,t,void 0,arguments)},filter(e,t){return eZ(this,"filter",e,t,e=>e.map(tk),arguments)},find(e,t){return eZ(this,"find",e,t,tk,arguments)},findIndex(e,t){return eZ(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return eZ(this,"findLast",e,t,tk,arguments)},findLastIndex(e,t){return eZ(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return eZ(this,"forEach",e,t,void 0,arguments)},includes(...e){return e0(this,"includes",e)},indexOf(...e){return e0(this,"indexOf",e)},join(e){return ez(this).join(e)},lastIndexOf(...e){return e0(this,"lastIndexOf",e)},map(e,t){return eZ(this,"map",e,t,void 0,arguments)},pop(){return e1(this,"pop")},push(...e){return e1(this,"push",e)},reduce(e,...t){return eY(this,"reduce",e,t)},reduceRight(e,...t){return eY(this,"reduceRight",e,t)},shift(){return e1(this,"shift")},some(e,t){return eZ(this,"some",e,t,void 0,arguments)},splice(...e){return e1(this,"splice",e)},toReversed(){return ez(this).toReversed()},toSorted(e){return ez(this).toSorted(e)},toSpliced(...e){return ez(this).toSpliced(...e)},unshift(...e){return e1(this,"unshift",e)},values(){return eX(this,"values",tk)}};function eX(e,t,n){let r=eJ(e),i=r[t]();return r===e||t_(e)||(i._next=i.next,i.next=()=>{let e=i._next();return e.value&&(e.value=n(e.value)),e}),i}let eQ=Array.prototype;function eZ(e,t,n,r,i,l){let s=eJ(e),o=s!==e&&!t_(e),a=s[t];if(a!==eQ[t]){let t=a.apply(e,l);return o?tk(t):t}let c=n;s!==e&&(o?c=function(t,r){return n.call(this,tk(t),r,e)}:n.length>2&&(c=function(t,r){return n.call(this,t,r,e)}));let u=a.call(s,c,r);return o&&i?i(u):u}function eY(e,t,n,r){let i=eJ(e),l=n;return i!==e&&(t_(e)?n.length>3&&(l=function(t,r,i){return n.call(this,t,r,i,e)}):l=function(t,r,i){return n.call(this,t,tk(r),i,e)}),i[t](l,...r)}function e0(e,t,n){let r=tx(e);eW(r,"iterate",eq);let i=r[t](...n);return(-1===i||!1===i)&&tS(n[0])?(n[0]=tx(n[0]),r[t](...n)):i}function e1(e,t,n=[]){eL(),eT++;let r=tx(e)[t].apply(e,n);return ew(),e$(),r}let e2=g("__proto__,__v_isRef,__isVue"),e3=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(L));function e6(e){L(e)||(e=String(e));let t=tx(this);return eW(t,"has",e),t.hasOwnProperty(e)}class e4{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if("__v_skip"===t)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if("__v_isReactive"===t)return!r;if("__v_isReadonly"===t)return r;if("__v_isShallow"===t)return i;if("__v_raw"===t)return n===(r?i?tf:tp:i?td:tu).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let l=A(e);if(!r){let e;if(l&&(e=eG[t]))return e;if("hasOwnProperty"===t)return e6}let s=Reflect.get(e,t,tN(e)?e:n);return(L(t)?e3.has(t):e2(t))?s:(r||eW(e,"get",t),i)?s:tN(s)?l&&j(t)?s:s.value:$(s)?r?tg(s):th(s):s}}class e8 extends e4{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t];if(!this._isShallow){let t=tb(i);if(t_(n)||tb(n)||(i=tx(i),n=tx(n)),!A(e)&&tN(i)&&!tN(n))return!t&&(i.value=n,!0)}let l=A(e)&&j(t)?Number(t)<e.length:w(e,t),s=Reflect.set(e,t,n,tN(e)?e:r);return e===tx(r)&&(l?Z(n,i)&&eK(e,"set",t,n):eK(e,"add",t,n)),s}deleteProperty(e,t){let n=w(e,t);e[t];let r=Reflect.deleteProperty(e,t);return r&&n&&eK(e,"delete",t,void 0),r}has(e,t){let n=Reflect.has(e,t);return L(t)&&e3.has(t)||eW(e,"has",t),n}ownKeys(e){return eW(e,"iterate",A(e)?"length":ej),Reflect.ownKeys(e)}}class e5 extends e4{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}let e9=new e8,e7=new e5,te=new e8(!0),tt=new e5(!0),tn=e=>e,tr=e=>Reflect.getPrototypeOf(e);function ti(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function tl(e,t){let n=function(e,t){let n={get(n){let r=this.__v_raw,i=tx(r),l=tx(n);e||(Z(n,l)&&eW(i,"get",n),eW(i,"get",l));let{has:s}=tr(i),o=t?tn:e?tT:tk;return s.call(i,n)?o(r.get(n)):s.call(i,l)?o(r.get(l)):void(r!==i&&r.get(n))},get size(){let t=this.__v_raw;return e||eW(tx(t),"iterate",ej),Reflect.get(t,"size",t)},has(t){let n=this.__v_raw,r=tx(n),i=tx(t);return e||(Z(t,i)&&eW(r,"has",t),eW(r,"has",i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,l=i.__v_raw,s=tx(l),o=t?tn:e?tT:tk;return e||eW(s,"iterate",ej),l.forEach((e,t)=>n.call(r,o(e),o(t),i))}};return k(n,e?{add:ti("add"),set:ti("set"),delete:ti("delete"),clear:ti("clear")}:{add(e){t||t_(e)||tb(e)||(e=tx(e));let n=tx(this);return tr(n).has.call(n,e)||(n.add(e),eK(n,"add",e,e)),this},set(e,n){t||t_(n)||tb(n)||(n=tx(n));let r=tx(this),{has:i,get:l}=tr(r),s=i.call(r,e);s||(e=tx(e),s=i.call(r,e));let o=l.call(r,e);return r.set(e,n),s?Z(n,o)&&eK(r,"set",e,n):eK(r,"add",e,n),this},delete(e){let t=tx(this),{has:n,get:r}=tr(t),i=n.call(t,e);i||(e=tx(e),i=n.call(t,e)),r&&r.call(t,e);let l=t.delete(e);return i&&eK(t,"delete",e,void 0),l},clear(){let e=tx(this),t=0!==e.size,n=e.clear();return t&&eK(e,"clear",void 0,void 0),n}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=function(...n){let i=this.__v_raw,l=tx(i),s=E(l),o="entries"===r||r===Symbol.iterator&&s,a=i[r](...n),c=t?tn:e?tT:tk;return e||eW(l,"iterate","keys"===r&&s?eH:ej),{next(){let{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:o?[c(e[0]),c(e[1])]:c(e),done:t}},[Symbol.iterator](){return this}}}}),n}(e,t);return(t,r,i)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(w(n,r)&&r in t?n:t,r,i)}let ts={get:tl(!1,!1)},to={get:tl(!1,!0)},ta={get:tl(!0,!1)},tc={get:tl(!0,!0)},tu=new WeakMap,td=new WeakMap,tp=new WeakMap,tf=new WeakMap;function th(e){return tb(e)?e:ty(e,!1,e9,ts,tu)}function tm(e){return ty(e,!1,te,to,td)}function tg(e){return ty(e,!0,e7,ta,tp)}function ty(e,t,n,r,i){if(!$(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let l=i.get(e);if(l)return l;let s=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(B(e));if(0===s)return e;let o=new Proxy(e,2===s?r:n);return i.set(e,o),o}function tv(e){return tb(e)?tv(e.__v_raw):!!(e&&e.__v_isReactive)}function tb(e){return!!(e&&e.__v_isReadonly)}function t_(e){return!!(e&&e.__v_isShallow)}function tS(e){return!!e&&!!e.__v_raw}function tx(e){let t=e&&e.__v_raw;return t?tx(t):e}function tC(e){return!w(e,"__v_skip")&&Object.isExtensible(e)&&ee(e,"__v_skip",!0),e}let tk=e=>$(e)?th(e):e,tT=e=>$(e)?tg(e):e;function tN(e){return!!e&&!0===e.__v_isRef}function tw(e){return tE(e,!1)}function tA(e){return tE(e,!0)}function tE(e,t){return tN(e)?e:new tI(e,t)}class tI{constructor(e,t){this.dep=new eB,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:tx(e),this._value=t?e:tk(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||t_(e)||tb(e);Z(e=n?e:tx(e),t)&&(this._rawValue=e,this._value=n?e:tk(e),this.dep.trigger())}}function tR(e){return tN(e)?e.value:e}let tO={get:(e,t,n)=>"__v_raw"===t?e:tR(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return tN(i)&&!tN(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function tP(e){return tv(e)?e:new Proxy(e,tO)}class tM{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new eB,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}}function tL(e){return new tM(e)}class t${constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){let n=eU.get(e);return n&&n.get(t)}(tx(this._object),this._key)}}class tD{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function tF(e,t,n){let r=e[t];return tN(r)?r:new t$(e,t,n)}class tV{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new eB(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=eF-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags)&&l!==this)return eN(this,!0),!0}get value(){let e=this.dep.track();return eR(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}let tB={},tU=new WeakMap;function tj(e,t=!1,n=h){if(n){let t=tU.get(n);t||tU.set(n,t=[]),t.push(e)}}function tH(e,t=1/0,n){if(t<=0||!$(e)||e.__v_skip||(n=n||new Set).has(e))return e;if(n.add(e),t--,tN(e))tH(e.value,t,n);else if(A(e))for(let r=0;r<e.length;r++)tH(e[r],t,n);else if(I(e)||E(e))e.forEach(e=>{tH(e,t,n)});else if(U(e)){for(let r in e)tH(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&tH(e[r],t,n)}return e}function tq(e,t,n,r){try{return r?e(...r):e()}catch(e){tK(e,t,n)}}function tW(e,t,n,r){if(P(e)){let i=tq(e,t,n,r);return i&&D(i)&&i.catch(e=>{tK(e,t,n)}),i}if(A(e)){let i=[];for(let l=0;l<e.length;l++)i.push(tW(e[l],t,n,r));return i}}function tK(e,t,n,r=!0){t&&t.vnode;let{errorHandler:i,throwUnhandledErrorInProduction:l}=t&&t.appContext.config||y;if(t){let r=t.parent,l=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){let t=r.ec;if(t){for(let n=0;n<t.length;n++)if(!1===t[n](e,l,s))return}r=r.parent}if(i){eL(),tq(i,null,10,[e,l,s]),e$();return}}!function(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}(e,0,0,r,l)}let tz=[],tJ=-1,tG=[],tX=null,tQ=0,tZ=Promise.resolve(),tY=null;function t0(e){let t=tY||tZ;return e?t.then(this?e.bind(this):e):t}function t1(e){if(!(1&e.flags)){let t=t8(e),n=tz[tz.length-1];!n||!(2&e.flags)&&t>=t8(n)?tz.push(e):tz.splice(function(e){let t=tJ+1,n=tz.length;for(;t<n;){let r=t+n>>>1,i=tz[r],l=t8(i);l<e||l===e&&2&i.flags?t=r+1:n=r}return t}(t),0,e),e.flags|=1,t2()}}function t2(){tY||(tY=tZ.then(function e(t){try{for(tJ=0;tJ<tz.length;tJ++){let e=tz[tJ];!e||8&e.flags||(4&e.flags&&(e.flags&=-2),tq(e,e.i,e.i?15:14),4&e.flags||(e.flags&=-2))}}finally{for(;tJ<tz.length;tJ++){let e=tz[tJ];e&&(e.flags&=-2)}tJ=-1,tz.length=0,t4(),tY=null,(tz.length||tG.length)&&e()}}))}function t3(e){A(e)?tG.push(...e):tX&&-1===e.id?tX.splice(tQ+1,0,e):1&e.flags||(tG.push(e),e.flags|=1),t2()}function t6(e,t,n=tJ+1){for(;n<tz.length;n++){let t=tz[n];if(t&&2&t.flags){if(e&&t.id!==e.uid)continue;tz.splice(n,1),n--,4&t.flags&&(t.flags&=-2),t(),4&t.flags||(t.flags&=-2)}}}function t4(e){if(tG.length){let e=[...new Set(tG)].sort((e,t)=>t8(e)-t8(t));if(tG.length=0,tX){tX.push(...e);return}for(tQ=0,tX=e;tQ<tX.length;tQ++){let e=tX[tQ];4&e.flags&&(e.flags&=-2),8&e.flags||e(),e.flags&=-2}tX=null,tQ=0}}let t8=e=>null==e.id?2&e.flags?-1:1/0:e.id,t5=null,t9=null;function t7(e){let t=t5;return t5=e,t9=e&&e.type.__scopeId||null,t}function ne(e,t=t5,n){if(!t||e._n)return e;let r=(...n)=>{let i;r._d&&im(-1);let l=t7(t);try{i=e(...n)}finally{t7(l),r._d&&im(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function nt(e,t,n,r){let i=e.dirs,l=t&&t.dirs;for(let s=0;s<i.length;s++){let o=i[s];l&&(o.oldValue=l[s].value);let a=o.dir[r];a&&(eL(),tW(a,n,8,[e.el,o,e,t]),e$())}}let nn=Symbol("_vte"),nr=e=>e.__isTeleport,ni=e=>e&&(e.disabled||""===e.disabled),nl=e=>e&&(e.defer||""===e.defer),ns=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,no=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,na=(e,t)=>{let n=e&&e.to;return M(n)?t?t(n):null:n},nc={name:"Teleport",__isTeleport:!0,process(e,t,n,r,i,l,s,o,a,c){let{mc:u,pc:d,pbc:p,o:{insert:f,querySelector:h,createText:m,createComment:g}}=c,y=ni(t.props),{shapeFlag:b,children:_,dynamicChildren:S}=t;if(null==e){let e=t.el=m(""),c=t.anchor=m("");f(e,n,r),f(c,n,r);let d=(e,t)=>{16&b&&(i&&i.isCE&&(i.ce._teleportTarget=e),u(_,e,t,i,l,s,o,a))},p=()=>{let e=t.target=na(t.props,h),n=np(e,t,m,f);e&&("svg"!==s&&ns(e)?s="svg":"mathml"!==s&&no(e)&&(s="mathml"),y||(d(e,n),nd(t,!1)))};y&&(d(n,c),nd(t,!0)),nl(t.props)?rB(()=>{p(),t.el.__isMounted=!0},l):p()}else{if(nl(t.props)&&!e.el.__isMounted){rB(()=>{nc.process(e,t,n,r,i,l,s,o,a,c),delete e.el.__isMounted},l);return}t.el=e.el,t.targetStart=e.targetStart;let u=t.anchor=e.anchor,f=t.target=e.target,m=t.targetAnchor=e.targetAnchor,g=ni(e.props),b=g?n:f;if("svg"===s||ns(f)?s="svg":("mathml"===s||no(f))&&(s="mathml"),S?(p(e.dynamicChildren,S,b,i,l,s,o),rK(e,t,!0)):a||d(e,t,b,g?u:m,i,l,s,o,!1),y)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):nu(t,n,u,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=na(t.props,h);e&&nu(t,e,null,c,0)}else g&&nu(t,f,m,c,1);nd(t,y)}},remove(e,t,n,{um:r,o:{remove:i}},l){let{shapeFlag:s,children:o,anchor:a,targetStart:c,targetAnchor:u,target:d,props:p}=e;if(d&&(i(c),i(u)),l&&i(a),16&s){let e=l||!ni(p);for(let i=0;i<o.length;i++){let l=o[i];r(l,t,n,e,!!l.dynamicChildren)}}},move:nu,hydrate:function(e,t,n,r,i,l,{o:{nextSibling:s,parentNode:o,querySelector:a,insert:c,createText:u}},d){let p=t.target=na(t.props,a);if(p){let a=ni(t.props),f=p._lpa||p.firstChild;if(16&t.shapeFlag){if(a)t.anchor=d(s(e),t,o(e),n,r,i,l),t.targetStart=f,t.targetAnchor=f&&s(f);else{t.anchor=s(e);let o=f;for(;o;){if(o&&8===o.nodeType){if("teleport start anchor"===o.data)t.targetStart=o;else if("teleport anchor"===o.data){t.targetAnchor=o,p._lpa=t.targetAnchor&&s(t.targetAnchor);break}}o=s(o)}t.targetAnchor||np(p,t,u,c),d(f&&s(f),t,p,n,r,i,l)}}nd(t,a)}return t.anchor&&s(t.anchor)}};function nu(e,t,n,{o:{insert:r},m:i},l=2){0===l&&r(e.targetAnchor,t,n);let{el:s,anchor:o,shapeFlag:a,children:c,props:u}=e,d=2===l;if(d&&r(s,t,n),(!d||ni(u))&&16&a)for(let e=0;e<c.length;e++)i(c[e],t,n,2);d&&r(o,t,n)}function nd(e,t){let n=e.ctx;if(n&&n.ut){let r,i;for(t?(r=e.el,i=e.anchor):(r=e.targetStart,i=e.targetAnchor);r&&r!==i;)1===r.nodeType&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function np(e,t,n,r){let i=t.targetStart=n(""),l=t.targetAnchor=n("");return i[nn]=l,e&&(r(i,e),r(l,e)),l}let nf=Symbol("_leaveCb"),nh=Symbol("_enterCb");function nm(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return n0(()=>{e.isMounted=!0}),n3(()=>{e.isUnmounting=!0}),e}let ng=[Function,Array],ny={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ng,onEnter:ng,onAfterEnter:ng,onEnterCancelled:ng,onBeforeLeave:ng,onLeave:ng,onAfterLeave:ng,onLeaveCancelled:ng,onBeforeAppear:ng,onAppear:ng,onAfterAppear:ng,onAppearCancelled:ng},nv=e=>{let t=e.subTree;return t.component?nv(t.component):t};function nb(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==io){t=n;break}}return t}let n_={name:"BaseTransition",props:ny,setup(e,{slots:t}){let n=iL(),r=nm();return()=>{let i=t.default&&nN(t.default(),!0);if(!i||!i.length)return;let l=nb(i),s=tx(e),{mode:o}=s;if(r.isLeaving)return nC(l);let a=nk(l);if(!a)return nC(l);let c=nx(a,s,r,n,e=>c=e);a.type!==io&&nT(a,c);let u=n.subTree&&nk(n.subTree);if(u&&u.type!==io&&!ib(a,u)&&nv(n).type!==io){let e=nx(u,s,r,n);if(nT(u,e),"out-in"===o&&a.type!==io)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,8&n.job.flags||n.update(),delete e.afterLeave,u=void 0},nC(l);"in-out"===o&&a.type!==io?e.delayLeave=(e,t,n)=>{nS(r,u)[String(u.key)]=u,e[nf]=()=>{t(),e[nf]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{n(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return l}}};function nS(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function nx(e,t,n,r,i){let{appear:l,mode:s,persisted:o=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:p,onLeave:f,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:g,onAppear:y,onAfterAppear:b,onAppearCancelled:_}=t,S=String(e.key),x=nS(n,e),C=(e,t)=>{e&&tW(e,r,9,t)},k=(e,t)=>{let n=t[1];C(e,t),A(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},T={mode:s,persisted:o,beforeEnter(t){let r=a;if(!n.isMounted){if(!l)return;r=g||a}t[nf]&&t[nf](!0);let i=x[S];i&&ib(e,i)&&i.el[nf]&&i.el[nf](),C(r,[t])},enter(e){let t=c,r=u,i=d;if(!n.isMounted){if(!l)return;t=y||c,r=b||u,i=_||d}let s=!1,o=e[nh]=t=>{s||(s=!0,t?C(i,[e]):C(r,[e]),T.delayedLeave&&T.delayedLeave(),e[nh]=void 0)};t?k(t,[e,o]):o()},leave(t,r){let i=String(e.key);if(t[nh]&&t[nh](!0),n.isUnmounting)return r();C(p,[t]);let l=!1,s=t[nf]=n=>{l||(l=!0,r(),n?C(m,[t]):C(h,[t]),t[nf]=void 0,x[i]!==e||delete x[i])};x[i]=e,f?k(f,[t,s]):s()},clone(e){let l=nx(e,t,n,r,i);return i&&i(l),l}};return T}function nC(e){if(nq(e))return(e=iT(e)).children=null,e}function nk(e){if(!nq(e))return nr(e.type)&&e.children?nb(e.children):e;let{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&P(n.default))return n.default()}}function nT(e,t){6&e.shapeFlag&&e.component?(e.transition=t,nT(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function nN(e,t=!1,n){let r=[],i=0;for(let l=0;l<e.length;l++){let s=e[l],o=null==n?s.key:String(n)+String(null!=s.key?s.key:l);s.type===il?(128&s.patchFlag&&i++,r=r.concat(nN(s.children,t,o))):(t||s.type!==io)&&r.push(null!=o?iT(s,{key:o}):s)}if(i>1)for(let e=0;e<r.length;e++)r[e].patchFlag=-2;return r}function nw(e,t){return P(e)?k({name:e.name},t,{setup:e}):e}function nA(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function nE(e,t,n,r,i=!1){if(A(e)){e.forEach((e,l)=>nE(e,t&&(A(t)?t[l]:t),n,r,i));return}if(nj(r)&&!i){512&r.shapeFlag&&r.type.__asyncResolved&&r.component.subTree.component&&nE(e,t,n,r.component.subTree);return}let l=4&r.shapeFlag?iW(r.component):r.el,s=i?null:l,{i:o,r:a}=e,c=t&&t.r,u=o.refs===y?o.refs={}:o.refs,d=o.setupState,p=tx(d),f=d===y?()=>!1:e=>w(p,e);if(null!=c&&c!==a&&(M(c)?(u[c]=null,f(c)&&(d[c]=null)):tN(c)&&(c.value=null)),P(a))tq(a,o,12,[s,u]);else{let t=M(a),r=tN(a);if(t||r){let o=()=>{if(e.f){let n=t?f(a)?d[a]:u[a]:a.value;i?A(n)&&T(n,l):A(n)?n.includes(l)||n.push(l):t?(u[a]=[l],f(a)&&(d[a]=u[a])):(a.value=[l],e.k&&(u[e.k]=a.value))}else t?(u[a]=s,f(a)&&(d[a]=s)):r&&(a.value=s,e.k&&(u[e.k]=s))};s?(o.id=-1,rB(o,n)):o()}}}let nI=!1,nR=()=>{nI||(console.error("Hydration completed but contains mismatches."),nI=!0)},nO=e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName,nP=e=>e.namespaceURI.includes("MathML"),nM=e=>{if(1===e.nodeType){if(nO(e))return"svg";if(nP(e))return"mathml"}},nL=e=>8===e.nodeType;function n$(e){let{mt:t,p:n,o:{patchProp:r,createText:i,nextSibling:l,parentNode:s,remove:o,insert:a,createComment:c}}=e,u=(n,r,o,c,b,_=!1)=>{_=_||!!r.dynamicChildren;let S=nL(n)&&"["===n.data,x=()=>h(n,r,o,c,b,S),{type:C,ref:k,shapeFlag:T,patchFlag:N}=r,w=n.nodeType;r.el=n,-2===N&&(_=!1,r.dynamicChildren=null);let A=null;switch(C){case is:3!==w?""===r.children?(a(r.el=i(""),s(n),n),A=n):A=x():(n.data!==r.children&&(nR(),n.data=r.children),A=l(n));break;case io:y(n)?(A=l(n),g(r.el=n.content.firstChild,n,o)):A=8!==w||S?x():l(n);break;case ia:if(S&&(w=(n=l(n)).nodeType),1===w||3===w){A=n;let e=!r.children.length;for(let t=0;t<r.staticCount;t++)e&&(r.children+=1===A.nodeType?A.outerHTML:A.data),t===r.staticCount-1&&(r.anchor=A),A=l(A);return S?l(A):A}x();break;case il:A=S?f(n,r,o,c,b,_):x();break;default:if(1&T)A=1===w&&r.type.toLowerCase()===n.tagName.toLowerCase()||y(n)?d(n,r,o,c,b,_):x();else if(6&T){r.slotScopeIds=b;let e=s(n);if(A=S?m(n):nL(n)&&"teleport start"===n.data?m(n,n.data,"teleport end"):l(n),t(r,e,null,o,c,nM(e),_),nj(r)&&!r.type.__asyncResolved){let t;S?(t=iC(il)).anchor=A?A.previousSibling:e.lastChild:t=3===n.nodeType?iN(""):iC("div"),t.el=n,r.component.subTree=t}}else 64&T?A=8!==w?x():r.type.hydrate(n,r,o,c,b,_,e,p):128&T&&(A=r.type.hydrate(n,r,o,c,nM(s(n)),b,_,e,u))}return null!=k&&nE(k,null,c,r),A},d=(e,t,n,i,l,s)=>{s=s||!!t.dynamicChildren;let{type:a,props:c,patchFlag:u,shapeFlag:d,dirs:f,transition:h}=t,m="input"===a||"option"===a;if(m||-1!==u){let a;f&&nt(t,null,n,"created");let b=!1;if(y(e)){b=rW(null,h)&&n&&n.vnode.props&&n.vnode.props.appear;let r=e.content.firstChild;b&&h.beforeEnter(r),g(r,e,n),t.el=e=r}if(16&d&&!(c&&(c.innerHTML||c.textContent))){let r=p(e.firstChild,t,e,n,i,l,s);for(;r;){nV(e,1)||nR();let t=r;r=r.nextSibling,o(t)}}else if(8&d){let n=t.children;"\n"===n[0]&&("PRE"===e.tagName||"TEXTAREA"===e.tagName)&&(n=n.slice(1)),e.textContent!==n&&(nV(e,0)||nR(),e.textContent=t.children)}if(c){if(m||!s||48&u){let t=e.tagName.includes("-");for(let i in c)(m&&(i.endsWith("value")||"indeterminate"===i)||x(i)&&!H(i)||"."===i[0]||t)&&r(e,i,null,c[i],void 0,n)}else if(c.onClick)r(e,"onClick",null,c.onClick,void 0,n);else if(4&u&&tv(c.style))for(let e in c.style)c.style[e]}(a=c&&c.onVnodeBeforeMount)&&iR(a,n,t),f&&nt(t,null,n,"beforeMount"),((a=c&&c.onVnodeMounted)||f||b)&&ir(()=>{a&&iR(a,n,t),b&&h.enter(e),f&&nt(t,null,n,"mounted")},i)}return e.nextSibling},p=(e,t,r,s,o,c,d)=>{d=d||!!t.dynamicChildren;let p=t.children,f=p.length;for(let t=0;t<f;t++){let h=d?p[t]:p[t]=iw(p[t]),m=h.type===is;e?(m&&!d&&t+1<f&&iw(p[t+1]).type===is&&(a(i(e.data.slice(h.children.length)),r,l(e)),e.data=h.children),e=u(e,h,s,o,c,d)):m&&!h.children?a(h.el=i(""),r):(nV(r,1)||nR(),n(null,h,r,null,s,o,nM(r),c))}return e},f=(e,t,n,r,i,o)=>{let{slotScopeIds:u}=t;u&&(i=i?i.concat(u):u);let d=s(e),f=p(l(e),t,d,n,r,i,o);return f&&nL(f)&&"]"===f.data?l(t.anchor=f):(nR(),a(t.anchor=c("]"),d,f),f)},h=(e,t,r,i,a,c)=>{if(nV(e.parentElement,1)||nR(),t.el=null,c){let t=m(e);for(;;){let n=l(e);if(n&&n!==t)o(n);else break}}let u=l(e),d=s(e);return o(e),n(null,t,d,u,r,i,nM(d),a),r&&(r.vnode.el=t.el,r8(r,t.el)),u},m=(e,t="[",n="]")=>{let r=0;for(;e;)if((e=l(e))&&nL(e)&&(e.data===t&&r++,e.data===n)){if(0===r)return l(e);r--}return e},g=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},y=e=>1===e.nodeType&&"TEMPLATE"===e.tagName;return[(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),t4(),t._vnode=e;return}u(t.firstChild,e,null,null,null),t4(),t._vnode=e},u]}let nD="data-allow-mismatch",nF={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function nV(e,t){if(0===t||1===t)for(;e&&!e.hasAttribute(nD);)e=e.parentElement;let n=e&&e.getAttribute(nD);if(null==n)return!1;if(""===n)return!0;{let e=n.split(",");return!!(0===t&&e.includes("children"))||n.split(",").includes(nF[t])}}let nB=er().requestIdleCallback||(e=>setTimeout(e,1)),nU=er().cancelIdleCallback||(e=>clearTimeout(e)),nj=e=>!!e.type.__asyncLoader;function nH(e,t){let{ref:n,props:r,children:i,ce:l}=t.vnode,s=iC(e,r,i);return s.ref=n,s.ce=l,delete t.vnode.ce,s}let nq=e=>e.type.__isKeepAlive;function nW(e,t){return A(e)?e.some(e=>nW(e,t)):M(e)?e.split(",").includes(t):!!O(e)&&(e.lastIndex=0,e.test(t))}function nK(e,t){nJ(e,"a",t)}function nz(e,t){nJ(e,"da",t)}function nJ(e,t,n=iM){let r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(nQ(t,r,n),n){let e=n.parent;for(;e&&e.parent;)nq(e.parent.vnode)&&function(e,t,n,r){let i=nQ(t,e,r,!0);n6(()=>{T(r[t],i)},n)}(r,t,n,e),e=e.parent}}function nG(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function nX(e){return 128&e.shapeFlag?e.ssContent:e}function nQ(e,t,n=iM,r=!1){if(n){let i=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...r)=>{eL();let i=i$(n),l=tW(t,n,e,r);return i(),e$(),l});return r?i.unshift(l):i.push(l),l}}let nZ=e=>(t,n=iM)=>{iV&&"sp"!==e||nQ(e,(...e)=>t(...e),n)},nY=nZ("bm"),n0=nZ("m"),n1=nZ("bu"),n2=nZ("u"),n3=nZ("bum"),n6=nZ("um"),n4=nZ("sp"),n8=nZ("rtg"),n5=nZ("rtc");function n9(e,t=iM){nQ("ec",e,t)}let n7="components",re=Symbol.for("v-ndc");function rt(e,t,n=!0,r=!1){let i=t5||iM;if(i){let n=i.type;if(e===n7){let e=iK(n,!1);if(e&&(e===t||e===z(t)||e===X(z(t))))return n}let l=rn(i[e]||n[e],t)||rn(i.appContext[e],t);return!l&&r?n:l}}function rn(e,t){return e&&(e[t]||e[z(t)]||e[X(z(t))])}let rr=e=>e?iF(e)?iW(e):rr(e.parent):null,ri=k(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>rr(e.parent),$root:e=>rr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>rp(e),$forceUpdate:e=>e.f||(e.f=()=>{t1(e.update)}),$nextTick:e=>e.n||(e.n=t0.bind(e.proxy)),$watch:e=>rQ.bind(e)}),rl=(e,t)=>e!==y&&!e.__isScriptSetup&&w(e,t),rs={get({_:e},t){let n,r,i;if("__v_skip"===t)return!0;let{ctx:l,setupState:s,data:o,props:a,accessCache:c,type:u,appContext:d}=e;if("$"!==t[0]){let r=c[t];if(void 0!==r)switch(r){case 1:return s[t];case 2:return o[t];case 4:return l[t];case 3:return a[t]}else{if(rl(s,t))return c[t]=1,s[t];if(o!==y&&w(o,t))return c[t]=2,o[t];if((n=e.propsOptions[0])&&w(n,t))return c[t]=3,a[t];if(l!==y&&w(l,t))return c[t]=4,l[t];ru&&(c[t]=0)}}let p=ri[t];return p?("$attrs"===t&&eW(e.attrs,"get",""),p(e)):(r=u.__cssModules)&&(r=r[t])?r:l!==y&&w(l,t)?(c[t]=4,l[t]):w(i=d.config.globalProperties,t)?i[t]:void 0},set({_:e},t,n){let{data:r,setupState:i,ctx:l}=e;return rl(i,t)?(i[t]=n,!0):r!==y&&w(r,t)?(r[t]=n,!0):!w(e.props,t)&&!("$"===t[0]&&t.slice(1)in e)&&(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:l}},s){let o;return!!n[s]||e!==y&&w(e,s)||rl(t,s)||(o=l[0])&&w(o,s)||w(r,s)||w(ri,s)||w(i.config.globalProperties,s)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:w(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},ro=k({},rs,{get(e,t){if(t!==Symbol.unscopables)return rs.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!ei(t)});function ra(){let e=iL();return e.setupContext||(e.setupContext=iq(e))}function rc(e){return A(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}let ru=!0;function rd(e,t,n){tW(A(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function rp(e){let t;let n=e.type,{mixins:r,extends:i}=n,{mixins:l,optionsCache:s,config:{optionMergeStrategies:o}}=e.appContext,a=s.get(n);return a?t=a:l.length||r||i?(t={},l.length&&l.forEach(e=>rf(t,e,o,!0)),rf(t,n,o)):t=n,$(n)&&s.set(n,t),t}function rf(e,t,n,r=!1){let{mixins:i,extends:l}=t;for(let s in l&&rf(e,l,n,!0),i&&i.forEach(t=>rf(e,t,n,!0)),t)if(r&&"expose"===s);else{let r=rh[s]||n&&n[s];e[s]=r?r(e[s],t[s]):t[s]}return e}let rh={data:rm,props:rb,emits:rb,methods:rv,computed:rv,beforeCreate:ry,created:ry,beforeMount:ry,mounted:ry,beforeUpdate:ry,updated:ry,beforeDestroy:ry,beforeUnmount:ry,destroyed:ry,unmounted:ry,activated:ry,deactivated:ry,errorCaptured:ry,serverPrefetch:ry,components:rv,directives:rv,watch:function(e,t){if(!e)return t;if(!t)return e;let n=k(Object.create(null),e);for(let r in t)n[r]=ry(e[r],t[r]);return n},provide:rm,inject:function(e,t){return rv(rg(e),rg(t))}};function rm(e,t){return t?e?function(){return k(P(e)?e.call(this,this):e,P(t)?t.call(this,this):t)}:t:e}function rg(e){if(A(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ry(e,t){return e?[...new Set([].concat(e,t))]:t}function rv(e,t){return e?k(Object.create(null),e,t):t}function rb(e,t){return e?A(e)&&A(t)?[...new Set([...e,...t])]:k(Object.create(null),rc(e),rc(null!=t?t:{})):t}function r_(){return{app:null,config:{isNativeTag:S,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let rS=0,rx=null;function rC(e,t){if(iM){let n=iM.provides,r=iM.parent&&iM.parent.provides;r===n&&(n=iM.provides=Object.create(r)),n[e]=t}}function rk(e,t,n=!1){let r=iM||t5;if(r||rx){let i=rx?rx._context.provides:r?null==r.parent?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&P(t)?t.call(r&&r.proxy):t}}let rT={},rN=()=>Object.create(rT),rw=e=>Object.getPrototypeOf(e)===rT;function rA(e,t,n,r){let i;let[l,s]=e.propsOptions,o=!1;if(t)for(let a in t){let c;if(H(a))continue;let u=t[a];l&&w(l,c=z(a))?s&&s.includes(c)?(i||(i={}))[c]=u:n[c]=u:r1(e.emitsOptions,a)||a in r&&u===r[a]||(r[a]=u,o=!0)}if(s){let t=tx(n),r=i||y;for(let i=0;i<s.length;i++){let o=s[i];n[o]=rE(l,t,o,r[o],e,!w(r,o))}}return o}function rE(e,t,n,r,i,l){let s=e[n];if(null!=s){let e=w(s,"default");if(e&&void 0===r){let e=s.default;if(s.type!==Function&&!s.skipFactory&&P(e)){let{propsDefaults:l}=i;if(n in l)r=l[n];else{let s=i$(i);r=l[n]=e.call(null,t),s()}}else r=e;i.ce&&i.ce._setProp(n,r)}s[0]&&(l&&!e?r=!1:s[1]&&(""===r||r===G(n))&&(r=!0))}return r}let rI=new WeakMap;function rR(e){return!("$"===e[0]||H(e))}let rO=e=>"_"===e[0]||"$stable"===e,rP=e=>A(e)?e.map(iw):[iw(e)],rM=(e,t,n)=>{if(t._n)return t;let r=ne((...e)=>rP(t(...e)),n);return r._c=!1,r},rL=(e,t,n)=>{let r=e._ctx;for(let n in e){if(rO(n))continue;let i=e[n];if(P(i))t[n]=rM(n,i,r);else if(null!=i){let e=rP(i);t[n]=()=>e}}},r$=(e,t)=>{let n=rP(t);e.slots.default=()=>n},rD=(e,t,n)=>{for(let r in t)(n||"_"!==r)&&(e[r]=t[r])},rF=(e,t,n)=>{let r=e.slots=rN();if(32&e.vnode.shapeFlag){let e=t._;e?(rD(r,t,n),n&&ee(r,"_",e,!0)):rL(t,r)}else t&&r$(e,t)},rV=(e,t,n)=>{let{vnode:r,slots:i}=e,l=!0,s=y;if(32&r.shapeFlag){let e=t._;e?n&&1===e?l=!1:rD(i,t,n):(l=!t.$stable,rL(t,i)),s=t}else t&&(r$(e,t),s={default:1});if(l)for(let e in i)rO(e)||null!=s[e]||delete i[e]},rB=ir;function rU(e){return rj(e,n$)}function rj(e,t){var n;let r,i;er().__VUE__=!0;let{insert:l,remove:s,patchProp:o,createElement:a,createText:u,createComment:d,setText:p,setElementText:f,parentNode:h,nextSibling:m,setScopeId:g=_,insertStaticContent:S}=e,x=(e,t,n,r=null,i=null,l=null,s,o=null,a=!!t.dynamicChildren)=>{if(e===t)return;e&&!ib(e,t)&&(r=eo(e),et(e,i,l,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);let{type:c,ref:u,shapeFlag:d}=t;switch(c){case is:C(e,t,n,r);break;case io:T(e,t,n,r);break;case ia:null==e&&N(t,n,r,s);break;case il:U(e,t,n,r,i,l,s,o,a);break;default:1&d?R(e,t,n,r,i,l,s,o,a):6&d?j(e,t,n,r,i,l,s,o,a):64&d?c.process(e,t,n,r,i,l,s,o,a,eu):128&d&&c.process(e,t,n,r,i,l,s,o,a,eu)}null!=u&&i&&nE(u,e&&e.ref,l,t||e,!t)},C=(e,t,n,r)=>{if(null==e)l(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&p(n,t.children)}},T=(e,t,n,r)=>{null==e?l(t.el=d(t.children||""),n,r):t.el=e.el},N=(e,t,n,r)=>{[e.el,e.anchor]=S(e.children,t,n,r,e.el,e.anchor)},E=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=m(e),l(e,n,r),e=i;l(t,n,r)},I=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=m(e),s(e),e=n;s(t)},R=(e,t,n,r,i,l,s,o,a)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?O(t,n,r,i,l,s,o,a):F(e,t,i,l,s,o,a)},O=(e,t,n,r,i,s,c,u)=>{let d,p;let{props:h,shapeFlag:m,transition:g,dirs:y}=e;if(d=e.el=a(e.type,s,h&&h.is,h),8&m?f(d,e.children):16&m&&L(e.children,d,null,r,i,rH(e,s),c,u),y&&nt(e,null,r,"created"),M(d,e,e.scopeId,c,r),h){for(let e in h)"value"===e||H(e)||o(d,e,null,h[e],s,r);"value"in h&&o(d,"value",null,h.value,s),(p=h.onVnodeBeforeMount)&&iR(p,r,e)}y&&nt(e,null,r,"beforeMount");let b=rW(i,g);b&&g.beforeEnter(d),l(d,t,n),((p=h&&h.onVnodeMounted)||b||y)&&rB(()=>{p&&iR(p,r,e),b&&g.enter(d),y&&nt(e,null,r,"mounted")},i)},M=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t<r.length;t++)g(e,r[t]);if(i){let n=i.subTree;if(t===n||r5(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;M(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},L=(e,t,n,r,i,l,s,o,a=0)=>{for(let c=a;c<e.length;c++)x(null,e[c]=o?iA(e[c]):iw(e[c]),t,n,r,i,l,s,o)},F=(e,t,n,r,i,l,s)=>{let a;let c=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:p}=t;u|=16&e.patchFlag;let h=e.props||y,m=t.props||y;if(n&&rq(n,!1),(a=m.onVnodeBeforeUpdate)&&iR(a,n,t,e),p&&nt(t,e,n,"beforeUpdate"),n&&rq(n,!0),(h.innerHTML&&null==m.innerHTML||h.textContent&&null==m.textContent)&&f(c,""),d?V(e.dynamicChildren,d,c,n,r,rH(t,i),l):s||X(e,t,c,null,n,r,rH(t,i),l,!1),u>0){if(16&u)B(c,h,m,n,i);else if(2&u&&h.class!==m.class&&o(c,"class",null,m.class,i),4&u&&o(c,"style",h.style,m.style,i),8&u){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let r=e[t],l=h[r],s=m[r];(s!==l||"value"===r)&&o(c,r,l,s,i,n)}}1&u&&e.children!==t.children&&f(c,t.children)}else s||null!=d||B(c,h,m,n,i);((a=m.onVnodeUpdated)||p)&&rB(()=>{a&&iR(a,n,t,e),p&&nt(t,e,n,"updated")},r)},V=(e,t,n,r,i,l,s)=>{for(let o=0;o<t.length;o++){let a=e[o],c=t[o],u=a.el&&(a.type===il||!ib(a,c)||70&a.shapeFlag)?h(a.el):n;x(a,c,u,null,r,i,l,s,!0)}},B=(e,t,n,r,i)=>{if(t!==n){if(t!==y)for(let l in t)H(l)||l in n||o(e,l,t[l],null,i,r);for(let l in n){if(H(l))continue;let s=n[l],a=t[l];s!==a&&"value"!==l&&o(e,l,a,s,i,r)}"value"in n&&o(e,"value",t.value,n.value,i)}},U=(e,t,n,r,i,s,o,a,c)=>{let d=t.el=e?e.el:u(""),p=t.anchor=e?e.anchor:u(""),{patchFlag:f,dynamicChildren:h,slotScopeIds:m}=t;m&&(a=a?a.concat(m):m),null==e?(l(d,n,r),l(p,n,r),L(t.children||[],n,p,i,s,o,a,c)):f>0&&64&f&&h&&e.dynamicChildren?(V(e.dynamicChildren,h,n,i,s,o,a),(null!=t.key||i&&t===i.subTree)&&rK(e,t,!0)):X(e,t,n,p,i,s,o,a,c)},j=(e,t,n,r,i,l,s,o,a)=>{t.slotScopeIds=o,null==e?512&t.shapeFlag?i.ctx.activate(t,n,r,s,a):q(t,n,r,i,l,s,a):W(e,t,a)},q=(e,t,n,r,i,l,s)=>{let o=e.component=function(e,t,n){let r=e.type,i=(t?t.appContext:e.appContext)||iO,l={uid:iP++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ex(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:function e(t,n,r=!1){let i=r?rI:n.propsCache,l=i.get(t);if(l)return l;let s=t.props,o={},a=[],c=!1;if(!P(t)){let i=t=>{c=!0;let[r,i]=e(t,n,!0);k(o,r),i&&a.push(...i)};!r&&n.mixins.length&&n.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}if(!s&&!c)return $(t)&&i.set(t,b),b;if(A(s))for(let e=0;e<s.length;e++){let t=z(s[e]);rR(t)&&(o[t]=y)}else if(s)for(let e in s){let t=z(e);if(rR(t)){let n=s[e],r=o[t]=A(n)||P(n)?{type:n}:k({},n),i=r.type,l=!1,c=!0;if(A(i))for(let e=0;e<i.length;++e){let t=i[e],n=P(t)&&t.name;if("Boolean"===n){l=!0;break}"String"===n&&(c=!1)}else l=P(i)&&"Boolean"===i.name;r[0]=l,r[1]=c,(l||w(r,"default"))&&a.push(t)}}let u=[o,a];return $(t)&&i.set(t,u),u}(r,i),emitsOptions:function e(t,n,r=!1){let i=n.emitsCache,l=i.get(t);if(void 0!==l)return l;let s=t.emits,o={},a=!1;if(!P(t)){let i=t=>{let r=e(t,n,!0);r&&(a=!0,k(o,r))};!r&&n.mixins.length&&n.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}return s||a?(A(s)?s.forEach(e=>o[e]=null):k(o,s),$(t)&&i.set(t,o),o):($(t)&&i.set(t,null),null)}(r,i),emit:null,emitted:null,propsDefaults:y,inheritAttrs:r.inheritAttrs,ctx:y,data:y,props:y,attrs:y,slots:y,refs:y,setupState:y,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return l.ctx={_:l},l.root=t?t.root:l,l.emit=r0.bind(null,l),e.ce&&e.ce(l),l}(e,r,i);nq(e)&&(o.ctx.renderer=eu),function(e,t=!1,n=!1){t&&c(t);let{props:r,children:i}=e.vnode,l=iF(e);(function(e,t,n,r=!1){let i={},l=rN();for(let n in e.propsDefaults=Object.create(null),rA(e,t,i,l),e.propsOptions[0])n in i||(i[n]=void 0);n?e.props=r?i:tm(i):e.type.props?e.props=i:e.props=l,e.attrs=l})(e,r,l,t),rF(e,i,n),l&&function(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,rs);let{setup:r}=n;if(r){eL();let n=e.setupContext=r.length>1?iq(e):null,i=i$(e),l=tq(r,e,0,[e.props,n]),s=D(l);if(e$(),i(),(s||e.sp)&&!nj(e)&&nA(e),s){if(l.then(iD,iD),t)return l.then(n=>{iB(e,n,t)}).catch(t=>{tK(t,e,0)});e.asyncDep=l}else iB(e,l,t)}else ij(e,t)}(e,t),t&&c(!1)}(o,!1,s),o.asyncDep?(i&&i.registerDep(o,K,s),e.el||T(null,o.subTree=iC(io),t,n)):K(o,e,t,n,i,l,s)},W=(e,t,n)=>{let r=t.component=e.component;if(function(e,t,n){let{props:r,children:i,component:l}=e,{props:s,children:o,patchFlag:a}=t,c=l.emitsOptions;if(t.dirs||t.transition)return!0;if(!n||!(a>=0))return(!!i||!!o)&&(!o||!o.$stable)||r!==s&&(r?!s||r4(r,s,c):!!s);if(1024&a)return!0;if(16&a)return r?r4(r,s,c):!!s;if(8&a){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(s[n]!==r[n]&&!r1(c,n))return!0}}return!1}(e,t,n)){if(r.asyncDep&&!r.asyncResolved){J(r,t,n);return}r.next=t,r.update()}else t.el=e.el,r.vnode=t},K=(e,t,n,r,l,s,o)=>{let a=()=>{if(e.isMounted){let t,{next:n,bu:r,u:i,parent:c,vnode:u}=e;{let t=function e(t){let n=t.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:e(n)}(e);if(t){n&&(n.el=u.el,J(e,n,o)),t.asyncDep.then(()=>{e.isUnmounted||a()});return}}let d=n;rq(e,!1),n?(n.el=u.el,J(e,n,o)):n=u,r&&Y(r),(t=n.props&&n.props.onVnodeBeforeUpdate)&&iR(t,c,n,u),rq(e,!0);let p=r2(e),f=e.subTree;e.subTree=p,x(f,p,h(f.el),eo(f),e,l,s),n.el=p.el,null===d&&r8(e,p.el),i&&rB(i,l),(t=n.props&&n.props.onVnodeUpdated)&&rB(()=>iR(t,c,n,u),l)}else{let o;let{el:a,props:c}=t,{bm:u,m:d,parent:p,root:f,type:h}=e,m=nj(t);if(rq(e,!1),u&&Y(u),!m&&(o=c&&c.onVnodeBeforeMount)&&iR(o,p,t),rq(e,!0),a&&i){let t=()=>{e.subTree=r2(e),i(a,e.subTree,e,l,null)};m&&h.__asyncHydrate?h.__asyncHydrate(a,e,t):t()}else{f.ce&&f.ce._injectChildStyle(h);let i=e.subTree=r2(e);x(null,i,n,r,e,l,s),t.el=i.el}if(d&&rB(d,l),!m&&(o=c&&c.onVnodeMounted)){let e=t;rB(()=>iR(o,p,e),l)}(256&t.shapeFlag||p&&nj(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&rB(e.a,l),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new ek(a);e.scope.off();let u=e.update=c.run.bind(c),d=e.job=c.runIfDirty.bind(c);d.i=e,d.id=e.uid,c.scheduler=()=>t1(d),rq(e,!0),u()},J=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,r){let{props:i,attrs:l,vnode:{patchFlag:s}}=e,o=tx(i),[a]=e.propsOptions,c=!1;if((r||s>0)&&!(16&s)){if(8&s){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let s=n[r];if(r1(e.emitsOptions,s))continue;let u=t[s];if(a){if(w(l,s))u!==l[s]&&(l[s]=u,c=!0);else{let t=z(s);i[t]=rE(a,o,t,u,e,!1)}}else u!==l[s]&&(l[s]=u,c=!0)}}}else{let r;for(let s in rA(e,t,i,l)&&(c=!0),o)t&&(w(t,s)||(r=G(s))!==s&&w(t,r))||(a?n&&(void 0!==n[s]||void 0!==n[r])&&(i[s]=rE(a,o,s,void 0,e,!0)):delete i[s]);if(l!==o)for(let e in l)t&&w(t,e)||(delete l[e],c=!0)}c&&eK(e.attrs,"set","")}(e,t.props,r,n),rV(e,t.children,n),eL(),t6(e),e$()},X=(e,t,n,r,i,l,s,o,a=!1)=>{let c=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:p,shapeFlag:h}=t;if(p>0){if(128&p){Z(c,d,n,r,i,l,s,o,a);return}if(256&p){Q(c,d,n,r,i,l,s,o,a);return}}8&h?(16&u&&es(c,i,l),d!==c&&f(n,d)):16&u?16&h?Z(c,d,n,r,i,l,s,o,a):es(c,i,l,!0):(8&u&&f(n,""),16&h&&L(d,n,r,i,l,s,o,a))},Q=(e,t,n,r,i,l,s,o,a)=>{let c;e=e||b,t=t||b;let u=e.length,d=t.length,p=Math.min(u,d);for(c=0;c<p;c++){let r=t[c]=a?iA(t[c]):iw(t[c]);x(e[c],r,n,null,i,l,s,o,a)}u>d?es(e,i,l,!0,!1,p):L(t,n,r,i,l,s,o,a,p)},Z=(e,t,n,r,i,l,s,o,a)=>{let c=0,u=t.length,d=e.length-1,p=u-1;for(;c<=d&&c<=p;){let r=e[c],u=t[c]=a?iA(t[c]):iw(t[c]);if(ib(r,u))x(r,u,n,null,i,l,s,o,a);else break;c++}for(;c<=d&&c<=p;){let r=e[d],c=t[p]=a?iA(t[p]):iw(t[p]);if(ib(r,c))x(r,c,n,null,i,l,s,o,a);else break;d--,p--}if(c>d){if(c<=p){let e=p+1,d=e<u?t[e].el:r;for(;c<=p;)x(null,t[c]=a?iA(t[c]):iw(t[c]),n,d,i,l,s,o,a),c++}}else if(c>p)for(;c<=d;)et(e[c],i,l,!0),c++;else{let f;let h=c,m=c,g=new Map;for(c=m;c<=p;c++){let e=t[c]=a?iA(t[c]):iw(t[c]);null!=e.key&&g.set(e.key,c)}let y=0,_=p-m+1,S=!1,C=0,k=Array(_);for(c=0;c<_;c++)k[c]=0;for(c=h;c<=d;c++){let r;let u=e[c];if(y>=_){et(u,i,l,!0);continue}if(null!=u.key)r=g.get(u.key);else for(f=m;f<=p;f++)if(0===k[f-m]&&ib(u,t[f])){r=f;break}void 0===r?et(u,i,l,!0):(k[r-m]=c+1,r>=C?C=r:S=!0,x(u,t[r],n,null,i,l,s,o,a),y++)}let T=S?function(e){let t,n,r,i,l;let s=e.slice(),o=[0],a=e.length;for(t=0;t<a;t++){let a=e[t];if(0!==a){if(e[n=o[o.length-1]]<a){s[t]=n,o.push(t);continue}for(r=0,i=o.length-1;r<i;)e[o[l=r+i>>1]]<a?r=l+1:i=l;a<e[o[r]]&&(r>0&&(s[t]=o[r-1]),o[r]=t)}}for(r=o.length,i=o[r-1];r-- >0;)o[r]=i,i=s[i];return o}(k):b;for(f=T.length-1,c=_-1;c>=0;c--){let e=m+c,d=t[e],p=e+1<u?t[e+1].el:r;0===k[c]?x(null,d,n,p,i,l,s,o,a):S&&(f<0||c!==T[f]?ee(d,n,p,2):f--)}}},ee=(e,t,n,r,i=null)=>{let{el:s,type:o,transition:a,children:c,shapeFlag:u}=e;if(6&u){ee(e.component.subTree,t,n,r);return}if(128&u){e.suspense.move(t,n,r);return}if(64&u){o.move(e,t,n,eu);return}if(o===il){l(s,t,n);for(let e=0;e<c.length;e++)ee(c[e],t,n,r);l(e.anchor,t,n);return}if(o===ia){E(e,t,n);return}if(2!==r&&1&u&&a){if(0===r)a.beforeEnter(s),l(s,t,n),rB(()=>a.enter(s),i);else{let{leave:e,delayLeave:r,afterLeave:i}=a,o=()=>l(s,t,n),c=()=>{e(s,()=>{o(),i&&i()})};r?r(s,o,c):c()}}else l(s,t,n)},et=(e,t,n,r=!1,i=!1)=>{let l;let{type:s,props:o,ref:a,children:c,dynamicChildren:u,shapeFlag:d,patchFlag:p,dirs:f,cacheIndex:h}=e;if(-2===p&&(i=!1),null!=a&&nE(a,null,n,e,!0),null!=h&&(t.renderCache[h]=void 0),256&d){t.ctx.deactivate(e);return}let m=1&d&&f,g=!nj(e);if(g&&(l=o&&o.onVnodeBeforeUnmount)&&iR(l,t,e),6&d)el(e.component,n,r);else{if(128&d){e.suspense.unmount(n,r);return}m&&nt(e,null,t,"beforeUnmount"),64&d?e.type.remove(e,t,n,eu,r):u&&!u.hasOnce&&(s!==il||p>0&&64&p)?es(u,t,n,!1,!0):(s===il&&384&p||!i&&16&d)&&es(c,t,n),r&&en(e)}(g&&(l=o&&o.onVnodeUnmounted)||m)&&rB(()=>{l&&iR(l,t,e),m&&nt(e,null,t,"unmounted")},n)},en=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===il){ei(n,r);return}if(t===ia){I(e);return}let l=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&e.shapeFlag&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,s=()=>t(n,l);r?r(e.el,l,s):s()}else l()},ei=(e,t)=>{let n;for(;e!==t;)n=m(e),s(e),e=n;s(t)},el=(e,t,n)=>{let{bum:r,scope:i,job:l,subTree:s,um:o,m:a,a:c}=e;rz(a),rz(c),r&&Y(r),i.stop(),l&&(l.flags|=8,et(s,e,t,n)),o&&rB(o,t),rB(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},es=(e,t,n,r=!1,i=!1,l=0)=>{for(let s=l;s<e.length;s++)et(e[s],t,n,r,i)},eo=e=>{if(6&e.shapeFlag)return eo(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();let t=m(e.anchor||e.el),n=t&&t[nn];return n?m(n):t},ea=!1,ec=(e,t,n)=>{null==e?t._vnode&&et(t._vnode,null,null,!0):x(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ea||(ea=!0,t6(),t4(),ea=!1)},eu={p:x,um:et,m:ee,r:en,mt:q,mc:L,pc:X,pbc:V,n:eo,o:e};return t&&([r,i]=t(eu)),{render:ec,hydrate:r,createApp:(n=r,function(e,t=null){P(e)||(e=k({},e)),null==t||$(t)||(t=null);let r=r_(),i=new WeakSet,l=[],s=!1,o=r.app={_uid:rS++,_component:e,_props:t,_container:null,_context:r,_instance:null,version:iX,get config(){return r.config},set config(v){},use:(e,...t)=>(i.has(e)||(e&&P(e.install)?(i.add(e),e.install(o,...t)):P(e)&&(i.add(e),e(o,...t))),o),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),o),component:(e,t)=>t?(r.components[e]=t,o):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,o):r.directives[e],mount(i,l,a){if(!s){let c=o._ceVNode||iC(e,t);return c.appContext=r,!0===a?a="svg":!1===a&&(a=void 0),l&&n?n(c,i):ec(c,i,a),s=!0,o._container=i,i.__vue_app__=o,iW(c.component)}},onUnmount(e){l.push(e)},unmount(){s&&(tW(l,o._instance,16),ec(null,o._container),delete o._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,o),runWithContext(e){let t=rx;rx=o;try{return e()}finally{rx=t}}};return o})}}function rH({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function rq({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function rW(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function rK(e,t,n=!1){let r=e.children,i=t.children;if(A(r)&&A(i))for(let e=0;e<r.length;e++){let t=r[e],l=i[e];!(1&l.shapeFlag)||l.dynamicChildren||((l.patchFlag<=0||32===l.patchFlag)&&((l=i[e]=iA(i[e])).el=t.el),n||-2===l.patchFlag||rK(t,l)),l.type===is&&(l.el=t.el)}}function rz(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}let rJ=Symbol.for("v-scx");function rG(e,t){return rX(e,null,{flush:"sync"})}function rX(e,t,n=y){let{immediate:r,deep:l,flush:s,once:o}=n,a=k({},n),c=iM;a.call=(e,t,n)=>tW(e,c,t,n);let u=!1;return"post"===s?a.scheduler=e=>{rB(e,c&&c.suspense)}:"sync"!==s&&(u=!0,a.scheduler=(e,t)=>{t?e():t1(e)}),a.augmentJob=e=>{t&&(e.flags|=4),u&&(e.flags|=2,c&&(e.id=c.uid,e.i=c))},function(e,t,n=y){let r,l,s,o;let{immediate:a,deep:c,once:u,scheduler:d,augmentJob:p,call:f}=n,m=e=>c?e:t_(e)||!1===c||0===c?tH(e,1):tH(e),g=!1,b=!1;if(tN(e)?(l=()=>e.value,g=t_(e)):tv(e)?(l=()=>m(e),g=!0):A(e)?(b=!0,g=e.some(e=>tv(e)||t_(e)),l=()=>e.map(e=>tN(e)?e.value:tv(e)?m(e):P(e)?f?f(e,2):e():void 0)):l=P(e)?t?f?()=>f(e,2):e:()=>{if(s){eL();try{s()}finally{e$()}}let t=h;h=r;try{return f?f(e,3,[o]):e(o)}finally{h=t}}:_,t&&c){let e=l,t=!0===c?1/0:c;l=()=>tH(e(),t)}let S=i,x=()=>{r.stop(),S&&S.active&&T(S.effects,r)};if(u&&t){let e=t;t=(...t)=>{e(...t),x()}}let C=b?Array(e.length).fill(tB):tB,k=e=>{if(1&r.flags&&(r.dirty||e)){if(t){let e=r.run();if(c||g||(b?e.some((e,t)=>Z(e,C[t])):Z(e,C))){s&&s();let n=h;h=r;try{let n=[e,C===tB?void 0:b&&C[0]===tB?[]:C,o];f?f(t,3,n):t(...n),C=e}finally{h=n}}}else r.run()}};return p&&p(k),(r=new ek(l)).scheduler=d?()=>d(k,!1):k,o=e=>tj(e,!1,r),s=r.onStop=()=>{let e=tU.get(r);if(e){if(f)f(e,4);else for(let t of e)t();tU.delete(r)}},t?a?k(!0):C=r.run():d?d(k.bind(null,!0),!0):r.run(),x.pause=r.pause.bind(r),x.resume=r.resume.bind(r),x.stop=x,x}(e,t,a)}function rQ(e,t,n){let r;let i=this.proxy,l=M(e)?e.includes(".")?rZ(i,e):()=>i[e]:e.bind(i,i);P(t)?r=t:(r=t.handler,n=t);let s=i$(this),o=rX(l,r.bind(i),n);return s(),o}function rZ(e,t){let n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}let rY=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${z(t)}Modifiers`]||e[`${G(t)}Modifiers`];function r0(e,t,...n){let r;if(e.isUnmounted)return;let i=e.vnode.props||y,l=n,s=t.startsWith("update:"),o=s&&rY(i,t.slice(7));o&&(o.trim&&(l=n.map(e=>M(e)?e.trim():e)),o.number&&(l=n.map(et)));let a=i[r=Q(t)]||i[r=Q(z(t))];!a&&s&&(a=i[r=Q(G(t))]),a&&tW(a,e,6,l);let c=i[r+"Once"];if(c){if(e.emitted){if(e.emitted[r])return}else e.emitted={};e.emitted[r]=!0,tW(c,e,6,l)}}function r1(e,t){return!!(e&&x(t))&&(w(e,(t=t.slice(2).replace(/Once$/,""))[0].toLowerCase()+t.slice(1))||w(e,G(t))||w(e,t))}function r2(e){let t,n;let{type:r,vnode:i,proxy:l,withProxy:s,propsOptions:[o],slots:a,attrs:c,emit:u,render:d,renderCache:p,props:f,data:h,setupState:m,ctx:g,inheritAttrs:y}=e,b=t7(e);try{if(4&i.shapeFlag){let e=s||l;t=iw(d.call(e,e,p,f,m,h,g)),n=c}else t=iw(r.length>1?r(f,{attrs:c,slots:a,emit:u}):r(f,null)),n=r.props?c:r3(c)}catch(n){ic.length=0,tK(n,e,1),t=iC(io)}let _=t;if(n&&!1!==y){let e=Object.keys(n),{shapeFlag:t}=_;e.length&&7&t&&(o&&e.some(C)&&(n=r6(n,o)),_=iT(_,n,!1,!0))}return i.dirs&&((_=iT(_,null,!1,!0)).dirs=_.dirs?_.dirs.concat(i.dirs):i.dirs),i.transition&&nT(_,i.transition),t=_,t7(b),t}let r3=e=>{let t;for(let n in e)("class"===n||"style"===n||x(n))&&((t||(t={}))[n]=e[n]);return t},r6=(e,t)=>{let n={};for(let r in e)C(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function r4(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let l=r[i];if(t[l]!==e[l]&&!r1(n,l))return!0}return!1}function r8({vnode:e,parent:t},n){for(;t;){let r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}let r5=e=>e.__isSuspense,r9=0;function r7(e,t){let n=e.props&&e.props[t];P(n)&&n()}function ie(e,t,n,r,i,l,s,o,a,c,u=!1){let d;let{p:p,m:f,um:h,n:m,o:{parentNode:g,remove:y}}=c,b=function(e){let t=e.props&&e.props.suspensible;return null!=t&&!1!==t}(e);b&&t&&t.pendingBranch&&(d=t.pendingId,t.deps++);let _=e.props?en(e.props.timeout):void 0,S=l,x={vnode:e,parent:t,parentComponent:n,namespace:s,container:r,hiddenContainer:i,deps:0,pendingId:r9++,timeout:"number"==typeof _?_:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:r,activeBranch:i,pendingBranch:s,pendingId:o,effects:a,parentComponent:c,container:u}=x,p=!1;x.isHydrating?x.isHydrating=!1:e||((p=i&&s.transition&&"out-in"===s.transition.mode)&&(i.transition.afterLeave=()=>{o===x.pendingId&&(f(s,u,l===S?m(i):l,0),t3(a))}),i&&(g(i.el)===u&&(l=m(i)),h(i,c,x,!0)),p||f(s,u,l,0)),ii(x,s),x.pendingBranch=null,x.isInFallback=!1;let y=x.parent,_=!1;for(;y;){if(y.pendingBranch){y.effects.push(...a),_=!0;break}y=y.parent}_||p||t3(a),x.effects=[],b&&t&&t.pendingBranch&&d===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),r7(r,"onResolve")},fallback(e){if(!x.pendingBranch)return;let{vnode:t,activeBranch:n,parentComponent:r,container:i,namespace:l}=x;r7(t,"onFallback");let s=m(n),c=()=>{x.isInFallback&&(p(null,e,i,s,r,null,l,o,a),ii(x,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=c),x.isInFallback=!0,h(n,r,null,!0),u||c()},move(e,t,n){x.activeBranch&&f(x.activeBranch,e,t,n),x.container=e},next:()=>x.activeBranch&&m(x.activeBranch),registerDep(e,t,n){let r=!!x.pendingBranch;r&&x.deps++;let i=e.vnode.el;e.asyncDep.catch(t=>{tK(t,e,0)}).then(l=>{if(e.isUnmounted||x.isUnmounted||x.pendingId!==e.suspenseId)return;e.asyncResolved=!0;let{vnode:o}=e;iB(e,l,!1),i&&(o.el=i);let a=!i&&e.subTree.el;t(e,o,g(i||e.subTree.el),i?null:m(e.subTree),x,s,n),a&&y(a),r8(e,o.el),r&&0==--x.deps&&x.resolve()})},unmount(e,t){x.isUnmounted=!0,x.activeBranch&&h(x.activeBranch,n,e,t),x.pendingBranch&&h(x.pendingBranch,n,e,t)}};return x}function it(e){let t;if(P(e)){let n=ih&&e._c;n&&(e._d=!1,id()),e=e(),n&&(e._d=!0,t=iu,ip())}return A(e)&&(e=function(e,t=!0){let n;for(let t=0;t<e.length;t++){let r=e[t];if(!iv(r))return;if(r.type!==io||"v-if"===r.children){if(n)return;n=r}}return n}(e)),e=iw(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(t=>t!==e)),e}function ir(e,t){t&&t.pendingBranch?A(e)?t.effects.push(...e):t.effects.push(e):t3(e)}function ii(e,t){e.activeBranch=t;let{vnode:n,parentComponent:r}=e,i=t.el;for(;!i&&t.component;)i=(t=t.component.subTree).el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,r8(r,i))}let il=Symbol.for("v-fgt"),is=Symbol.for("v-txt"),io=Symbol.for("v-cmt"),ia=Symbol.for("v-stc"),ic=[],iu=null;function id(e=!1){ic.push(iu=e?null:[])}function ip(){ic.pop(),iu=ic[ic.length-1]||null}let ih=1;function im(e,t=!1){ih+=e,e<0&&iu&&t&&(iu.hasOnce=!0)}function ig(e){return e.dynamicChildren=ih>0?iu||b:null,ip(),ih>0&&iu&&iu.push(e),e}function iy(e,t,n,r,i){return ig(iC(e,t,n,r,i,!0))}function iv(e){return!!e&&!0===e.__v_isVNode}function ib(e,t){return e.type===t.type&&e.key===t.key}let i_=({key:e})=>null!=e?e:null,iS=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?M(e)||tN(e)||P(e)?{i:t5,r:e,k:t,f:!!n}:e:null);function ix(e,t=null,n=null,r=0,i=null,l=e===il?0:1,s=!1,o=!1){let a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&i_(t),ref:t&&iS(t),scopeId:t9,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:t5};return o?(iE(a,n),128&l&&e.normalize(a)):n&&(a.shapeFlag|=M(n)?8:16),ih>0&&!s&&iu&&(a.patchFlag>0||6&l)&&32!==a.patchFlag&&iu.push(a),a}let iC=function(e,t=null,n=null,r=0,i=null,l=!1){var s;if(e&&e!==re||(e=io),iv(e)){let r=iT(e,t,!0);return n&&iE(r,n),ih>0&&!l&&iu&&(6&r.shapeFlag?iu[iu.indexOf(e)]=r:iu.push(r)),r.patchFlag=-2,r}if(P(s=e)&&"__vccOpts"in s&&(e=e.__vccOpts),t){let{class:e,style:n}=t=ik(t);e&&!M(e)&&(t.class=eu(e)),$(n)&&(tS(n)&&!A(n)&&(n=k({},n)),t.style=el(n))}let o=M(e)?1:r5(e)?128:nr(e)?64:$(e)?4:P(e)?2:0;return ix(e,t,n,r,i,o,l,!0)};function ik(e){return e?tS(e)||rw(e)?k({},e):e:null}function iT(e,t,n=!1,r=!1){let{props:i,ref:l,patchFlag:s,children:o,transition:a}=e,c=t?iI(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&i_(c),ref:t&&t.ref?n&&l?A(l)?l.concat(iS(t)):[l,iS(t)]:iS(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==il?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&iT(e.ssContent),ssFallback:e.ssFallback&&iT(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&r&&nT(u,a.clone(u)),u}function iN(e=" ",t=0){return iC(is,null,e,t)}function iw(e){return null==e||"boolean"==typeof e?iC(io):A(e)?iC(il,null,e.slice()):iv(e)?iA(e):iC(is,null,String(e))}function iA(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:iT(e)}function iE(e,t){let n=0,{shapeFlag:r}=e;if(null==t)t=null;else if(A(t))n=16;else if("object"==typeof t){if(65&r){let n=t.default;n&&(n._c&&(n._d=!1),iE(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;r||rw(t)?3===r&&t5&&(1===t5.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=t5}}else P(t)?(t={default:t,_ctx:t5},n=32):(t=String(t),64&r?(n=16,t=[iN(t)]):n=8);e.children=t,e.shapeFlag|=n}function iI(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if("class"===e)t.class!==r.class&&(t.class=eu([t.class,r.class]));else if("style"===e)t.style=el([t.style,r.style]);else if(x(e)){let n=t[e],i=r[e];i&&n!==i&&!(A(n)&&n.includes(i))&&(t[e]=n?[].concat(n,i):i)}else""!==e&&(t[e]=r[e])}return t}function iR(e,t,n,r=null){tW(e,t,7,[n,r])}let iO=r_(),iP=0,iM=null,iL=()=>iM||t5;a=e=>{iM=e},c=e=>{iV=e};let i$=e=>{let t=iM;return a(e),e.scope.on(),()=>{e.scope.off(),a(t)}},iD=()=>{iM&&iM.scope.off(),a(null)};function iF(e){return 4&e.vnode.shapeFlag}let iV=!1;function iB(e,t,n){P(t)?e.render=t:$(t)&&(e.setupState=tP(t)),ij(e,n)}function iU(e){u=e,d=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,ro))}}function ij(e,t,n){let r=e.type;if(!e.render){if(!t&&u&&!r.render){let t=r.template||rp(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:l,compilerOptions:s}=r,o=k(k({isCustomElement:n,delimiters:l},i),s);r.render=u(t,o)}}e.render=r.render||_,d&&d(e)}{let t=i$(e);eL();try{!function(e){let t=rp(e),n=e.proxy,r=e.ctx;ru=!1,t.beforeCreate&&rd(t.beforeCreate,e,"bc");let{data:i,computed:l,methods:s,watch:o,provide:a,inject:c,created:u,beforeMount:d,mounted:p,beforeUpdate:f,updated:h,activated:m,deactivated:g,beforeDestroy:y,beforeUnmount:b,destroyed:S,unmounted:x,render:C,renderTracked:k,renderTriggered:T,errorCaptured:N,serverPrefetch:w,expose:E,inheritAttrs:I,components:R,directives:O,filters:L}=t;if(c&&function(e,t,n=_){for(let n in A(e)&&(e=rg(e)),e){let r;let i=e[n];tN(r=$(i)?"default"in i?rk(i.from||n,i.default,!0):rk(i.from||n):rk(i))?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[n]=r}}(c,r,null),s)for(let e in s){let t=s[e];P(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);$(t)&&(e.data=th(t))}if(ru=!0,l)for(let e in l){let t=l[e],i=P(t)?t.bind(n,n):P(t.get)?t.get.bind(n,n):_,s=iz({get:i,set:!P(t)&&P(t.set)?t.set.bind(n):_});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e})}if(o)for(let e in o)!function e(t,n,r,i){let l=i.includes(".")?rZ(r,i):()=>r[i];if(M(t)){let e=n[t];P(e)&&rX(l,e,void 0)}else if(P(t)){var s;s=t.bind(r),rX(l,s,void 0)}else if($(t)){if(A(t))t.forEach(t=>e(t,n,r,i));else{let e=P(t.handler)?t.handler.bind(r):n[t.handler];P(e)&&rX(l,e,t)}}}(o[e],r,n,e);if(a){let e=P(a)?a.call(n):a;Reflect.ownKeys(e).forEach(t=>{rC(t,e[t])})}function D(e,t){A(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(u&&rd(u,e,"c"),D(nY,d),D(n0,p),D(n1,f),D(n2,h),D(nK,m),D(nz,g),D(n9,N),D(n5,k),D(n8,T),D(n3,b),D(n6,x),D(n4,w),A(E)){if(E.length){let t=e.exposed||(e.exposed={});E.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})})}else e.exposed||(e.exposed={})}C&&e.render===_&&(e.render=C),null!=I&&(e.inheritAttrs=I),R&&(e.components=R),O&&(e.directives=O)}(e)}finally{e$(),t()}}}let iH={get:(e,t)=>(eW(e,"get",""),e[t])};function iq(e){return{attrs:new Proxy(e.attrs,iH),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function iW(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tP(tC(e.exposed)),{get:(t,n)=>n in t?t[n]:n in ri?ri[n](e):void 0,has:(e,t)=>t in e||t in ri})):e.proxy}function iK(e,t=!0){return P(e)?e.displayName||e.name:e.name||t&&e.__name}let iz=(e,t)=>(function(e,t,n=!1){let r,i;return P(e)?r=e:(r=e.get,i=e.set),new tV(r,i,n)})(e,0,iV);function iJ(e,t,n){let r=arguments.length;return 2!==r?(r>3?n=Array.prototype.slice.call(arguments,2):3===r&&iv(n)&&(n=[n]),iC(e,t,n)):!$(t)||A(t)?iC(e,null,t):iv(t)?iC(e,null,[t]):iC(e,t)}function iG(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e<n.length;e++)if(Z(n[e],t[e]))return!1;return ih>0&&iu&&iu.push(e),!0}let iX="3.5.13",iQ="undefined"!=typeof window&&window.trustedTypes;if(iQ)try{m=iQ.createPolicy("vue",{createHTML:e=>e})}catch(e){}let iZ=m?e=>m.createHTML(e):e=>e,iY="undefined"!=typeof document?document:null,i0=iY&&iY.createElement("template"),i1="transition",i2="animation",i3=Symbol("_vtc"),i6={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},i4=k({},ny,i6),i8=((t=(e,{slots:t})=>iJ(n_,i7(e),t)).displayName="Transition",t.props=i4,t),i5=(e,t=[])=>{A(e)?e.forEach(e=>e(...t)):e&&e(...t)},i9=e=>!!e&&(A(e)?e.some(e=>e.length>1):e.length>1);function i7(e){let t={};for(let n in e)n in i6||(t[n]=e[n]);if(!1===e.css)return t;let{name:n="v",type:r,duration:i,enterFromClass:l=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:o=`${n}-enter-to`,appearFromClass:a=l,appearActiveClass:c=s,appearToClass:u=o,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if($(e))return[en(e.enter),en(e.leave)];{let t=en(e);return[t,t]}}(i),m=h&&h[0],g=h&&h[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:_,onLeave:S,onLeaveCancelled:x,onBeforeAppear:C=y,onAppear:T=b,onAppearCancelled:N=_}=t,w=(e,t,n,r)=>{e._enterCancelled=r,lt(e,t?u:o),lt(e,t?c:s),n&&n()},A=(e,t)=>{e._isLeaving=!1,lt(e,d),lt(e,f),lt(e,p),t&&t()},E=e=>(t,n)=>{let i=e?T:b,s=()=>w(t,e,n);i5(i,[t,s]),ln(()=>{lt(t,e?a:l),le(t,e?u:o),i9(i)||li(t,r,m,s)})};return k(t,{onBeforeEnter(e){i5(y,[e]),le(e,l),le(e,s)},onBeforeAppear(e){i5(C,[e]),le(e,a),le(e,c)},onEnter:E(!1),onAppear:E(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>A(e,t);le(e,d),e._enterCancelled?(le(e,p),la()):(la(),le(e,p)),ln(()=>{e._isLeaving&&(lt(e,d),le(e,f),i9(S)||li(e,r,g,n))}),i5(S,[e,n])},onEnterCancelled(e){w(e,!1,void 0,!0),i5(_,[e])},onAppearCancelled(e){w(e,!0,void 0,!0),i5(N,[e])},onLeaveCancelled(e){A(e),i5(x,[e])}})}function le(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[i3]||(e[i3]=new Set)).add(t)}function lt(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[i3];n&&(n.delete(t),n.size||(e[i3]=void 0))}function ln(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let lr=0;function li(e,t,n,r){let i=e._endId=++lr,l=()=>{i===e._endId&&r()};if(null!=n)return setTimeout(l,n);let{type:s,timeout:o,propCount:a}=ll(e,t);if(!s)return r();let c=s+"end",u=0,d=()=>{e.removeEventListener(c,p),l()},p=t=>{t.target===e&&++u>=a&&d()};setTimeout(()=>{u<a&&d()},o+1),e.addEventListener(c,p)}function ll(e,t){let n=window.getComputedStyle(e),r=e=>(n[e]||"").split(", "),i=r(`${i1}Delay`),l=r(`${i1}Duration`),s=ls(i,l),o=r(`${i2}Delay`),a=r(`${i2}Duration`),c=ls(o,a),u=null,d=0,p=0;t===i1?s>0&&(u=i1,d=s,p=l.length):t===i2?c>0&&(u=i2,d=c,p=a.length):p=(u=(d=Math.max(s,c))>0?s>c?i1:i2:null)?u===i1?l.length:a.length:0;let f=u===i1&&/\b(transform|all)(,|$)/.test(r(`${i1}Property`).toString());return{type:u,timeout:d,propCount:p,hasTransform:f}}function ls(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>lo(t)+lo(e[n])))}function lo(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function la(){return document.body.offsetHeight}let lc=Symbol("_vod"),lu=Symbol("_vsh");function ld(e,t){e.style.display=t?e[lc]:"none",e[lu]=!t}let lp=Symbol("");function lf(e,t){if(1===e.nodeType){let n=e.style,r="";for(let e in t)n.setProperty(`--${e}`,t[e]),r+=`--${e}: ${t[e]};`;n[lp]=r}}let lh=/(^|;)\s*display\s*:/,lm=/\s*!important$/;function lg(e,t,n){if(A(n))n.forEach(n=>lg(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{let r=function(e,t){let n=lv[t];if(n)return n;let r=z(t);if("filter"!==r&&r in e)return lv[t]=r;r=X(r);for(let n=0;n<ly.length;n++){let i=ly[n]+r;if(i in e)return lv[t]=i}return t}(e,t);lm.test(n)?e.setProperty(G(r),n.replace(lm,""),"important"):e[r]=n}}let ly=["Webkit","Moz","ms"],lv={},lb="http://www.w3.org/1999/xlink";function l_(e,t,n,r,i,l=em(t)){r&&t.startsWith("xlink:")?null==n?e.removeAttributeNS(lb,t.slice(6,t.length)):e.setAttributeNS(lb,t,n):null==n||l&&!(n||""===n)?e.removeAttribute(t):e.setAttribute(t,l?"":L(n)?String(n):n)}function lS(e,t,n,r,i){if("innerHTML"===t||"textContent"===t){null!=n&&(e[t]="innerHTML"===t?iZ(n):n);return}let l=e.tagName;if("value"===t&&"PROGRESS"!==l&&!l.includes("-")){let r="OPTION"===l?e.getAttribute("value")||"":e.value,i=null==n?"checkbox"===e.type?"on":"":String(n);r===i&&"_value"in e||(e.value=i),null==n&&e.removeAttribute(t),e._value=n;return}let s=!1;if(""===n||null==n){let r=typeof e[t];if("boolean"===r){var o;n=!!(o=n)||""===o}else null==n&&"string"===r?(n="",s=!0):"number"===r&&(n=0,s=!0)}try{e[t]=n}catch(e){}s&&e.removeAttribute(i||t)}function lx(e,t,n,r){e.addEventListener(t,n,r)}let lC=Symbol("_vei"),lk=/(?:Once|Passive|Capture)$/,lT=0,lN=Promise.resolve(),lw=()=>lT||(lN.then(()=>lT=0),lT=Date.now()),lA=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&123>e.charCodeAt(2),lE={};function lI(e,t,n){let r=nw(e,t);U(r)&&k(r,t);class i extends lO{constructor(e){super(r,e,n)}}return i.def=r,i}let lR="undefined"!=typeof HTMLElement?HTMLElement:class{};class lO extends lR{constructor(e,t={},n=l9){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==l9?this._root=this.shadowRoot:!1!==e.shadowRoot?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof lO){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,t0(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e<this.attributes.length;e++)this._setAttr(this.attributes[e].name);this._ob=new MutationObserver(e=>{for(let t of e)this._setAttr(t.attributeName)}),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{let n;this._resolved=!0,this._pendingResolve=void 0;let{props:r,styles:i}=e;if(r&&!A(r))for(let e in r){let t=r[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=en(this._props[e])),(n||(n=Object.create(null)))[z(e)]=!0)}this._numberProps=n,t&&this._resolveProps(e),this.shadowRoot&&this._applyStyles(i),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then(t=>e(this._def=t,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)w(this,e)||Object.defineProperty(this,e,{get:()=>tR(t[e])})}_resolveProps(e){let{props:t}=e,n=A(t)?t:Object.keys(t||{});for(let e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(z))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):lE,r=z(e);t&&this._numberProps&&this._numberProps[r]&&(n=en(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){if(t!==this._props[e]&&(t===lE?delete this._props[e]:(this._props[e]=t,"key"===e&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n)){let n=this._ob;n&&n.disconnect(),!0===t?this.setAttribute(G(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(G(e),t+""):t||this.removeAttribute(G(e)),n&&n.observe(this,{attributes:!0})}}_update(){l5(this._createVNode(),this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=iC(this._def,k(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,U(t[0])?k({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),G(e)!==e&&t(G(e),n)},this._setParent()}),t}_applyStyles(e,t){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let n=this._nonce;for(let t=e.length-1;t>=0;t--){let r=document.createElement("style");n&&r.setAttribute("nonce",n),r.textContent=e[t],this.shadowRoot.prepend(r)}}_parseSlots(){let e;let t=this._slots={};for(;e=this.firstChild;){let n=1===e.nodeType&&e.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(e),this.removeChild(e)}}_renderSlots(){let e=(this._teleportTarget||this).querySelectorAll("slot"),t=this._instance.type.__scopeId;for(let n=0;n<e.length;n++){let r=e[n],i=r.getAttribute("name")||"default",l=this._slots[i],s=r.parentNode;if(l)for(let e of l){if(t&&1===e.nodeType){let n;let r=t+"-s",i=document.createTreeWalker(e,1);for(e.setAttribute(r,"");n=i.nextNode();)n.setAttribute(r,"")}s.insertBefore(e,r)}else for(;r.firstChild;)s.insertBefore(r.firstChild,r);s.removeChild(r)}}_injectChildStyle(e){this._applyStyles(e.styles,e)}_removeChildStyle(e){}}function lP(e){let t=iL();return t&&t.ce||null}let lM=new WeakMap,lL=new WeakMap,l$=Symbol("_moveCb"),lD=Symbol("_enterCb"),lF=(n={name:"TransitionGroup",props:k({},i4,{tag:String,moveClass:String}),setup(e,{slots:t}){let n,r;let i=iL(),l=nm();return n2(()=>{if(!n.length)return;let t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){let r=e.cloneNode(),i=e[i3];i&&i.forEach(e=>{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display="none";let l=1===t.nodeType?t:t.parentNode;l.appendChild(r);let{hasTransform:s}=ll(r);return l.removeChild(r),s}(n[0].el,i.vnode.el,t))return;n.forEach(lV),n.forEach(lB);let r=n.filter(lU);la(),r.forEach(e=>{let n=e.el,r=n.style;le(n,t),r.transform=r.webkitTransform=r.transitionDuration="";let i=n[l$]=e=>{(!e||e.target===n)&&(!e||/transform$/.test(e.propertyName))&&(n.removeEventListener("transitionend",i),n[l$]=null,lt(n,t))};n.addEventListener("transitionend",i)})}),()=>{let s=tx(e),o=i7(s),a=s.tag||il;if(n=[],r)for(let e=0;e<r.length;e++){let t=r[e];t.el&&t.el instanceof Element&&(n.push(t),nT(t,nx(t,o,l,i)),lM.set(t,t.el.getBoundingClientRect()))}r=t.default?nN(t.default()):[];for(let e=0;e<r.length;e++){let t=r[e];null!=t.key&&nT(t,nx(t,o,l,i))}return iC(a,null,r)}}},delete n.props.mode,n);function lV(e){let t=e.el;t[l$]&&t[l$](),t[lD]&&t[lD]()}function lB(e){lL.set(e,e.el.getBoundingClientRect())}function lU(e){let t=lM.get(e),n=lL.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){let t=e.el.style;return t.transform=t.webkitTransform=`translate(${r}px,${i}px)`,t.transitionDuration="0s",e}}let lj=e=>{let t=e.props["onUpdate:modelValue"]||!1;return A(t)?e=>Y(t,e):t};function lH(e){e.target.composing=!0}function lq(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}let lW=Symbol("_assign"),lK={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[lW]=lj(i);let l=r||i.props&&"number"===i.props.type;lx(e,t?"change":"input",t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),l&&(r=et(r)),e[lW](r)}),n&&lx(e,"change",()=>{e.value=e.value.trim()}),t||(lx(e,"compositionstart",lH),lx(e,"compositionend",lq),lx(e,"change",lq))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:l}},s){if(e[lW]=lj(s),e.composing)return;let o=(l||"number"===e.type)&&!/^0\d/.test(e.value)?et(e.value):e.value,a=null==t?"":t;o===a||document.activeElement===e&&"range"!==e.type&&(r&&t===n||i&&e.value.trim()===a)||(e.value=a)}},lz={deep:!0,created(e,t,n){e[lW]=lj(n),lx(e,"change",()=>{let t=e._modelValue,n=lZ(e),r=e.checked,i=e[lW];if(A(t)){let e=ey(t,n),l=-1!==e;if(r&&!l)i(t.concat(n));else if(!r&&l){let n=[...t];n.splice(e,1),i(n)}}else if(I(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(lY(e,r))})},mounted:lJ,beforeUpdate(e,t,n){e[lW]=lj(n),lJ(e,t,n)}};function lJ(e,{value:t,oldValue:n},r){let i;if(e._modelValue=t,A(t))i=ey(t,r.props.value)>-1;else if(I(t))i=t.has(r.props.value);else{if(t===n)return;i=eg(t,lY(e,!0))}e.checked!==i&&(e.checked=i)}let lG={created(e,{value:t},n){e.checked=eg(t,n.props.value),e[lW]=lj(n),lx(e,"change",()=>{e[lW](lZ(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[lW]=lj(r),t!==n&&(e.checked=eg(t,r.props.value))}},lX={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=I(t);lx(e,"change",()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?et(lZ(e)):lZ(e));e[lW](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,t0(()=>{e._assigning=!1})}),e[lW]=lj(r)},mounted(e,{value:t}){lQ(e,t)},beforeUpdate(e,t,n){e[lW]=lj(n)},updated(e,{value:t}){e._assigning||lQ(e,t)}};function lQ(e,t){let n=e.multiple,r=A(t);if(!n||r||I(t)){for(let i=0,l=e.options.length;i<l;i++){let l=e.options[i],s=lZ(l);if(n){if(r){let e=typeof s;"string"===e||"number"===e?l.selected=t.some(e=>String(e)===String(s)):l.selected=ey(t,s)>-1}else l.selected=t.has(s)}else if(eg(lZ(l),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function lZ(e){return"_value"in e?e._value:e.value}function lY(e,t){let n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}function l0(e,t,n,r,i){let l=function(e,t){switch(e){case"SELECT":return lX;case"TEXTAREA":return lK;default:switch(t){case"checkbox":return lz;case"radio":return lG;default:return lK}}}(e.tagName,n.props&&n.props.type)[i];l&&l(e,t,n,r)}let l1=["ctrl","shift","alt","meta"],l2={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>l1.some(n=>e[`${n}Key`]&&!t.includes(n))},l3={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},l6=k({patchProp:(e,t,n,r,i,l)=>{let s="svg"===i;"class"===t?function(e,t,n){let r=e[i3];r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,s):"style"===t?function(e,t,n){let r=e.style,i=M(n),l=!1;if(n&&!i){if(t){if(M(t))for(let e of t.split(";")){let t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&lg(r,t,"")}else for(let e in t)null==n[e]&&lg(r,e,"")}for(let e in n)"display"===e&&(l=!0),lg(r,e,n[e])}else if(i){if(t!==n){let e=r[lp];e&&(n+=";"+e),r.cssText=n,l=lh.test(n)}}else t&&e.removeAttribute("style");lc in e&&(e[lc]=l?r.display:"",e[lu]&&(r.display="none"))}(e,n,r):x(t)?C(t)||function(e,t,n,r,i=null){let l=e[lC]||(e[lC]={}),s=l[t];if(r&&s)s.value=r;else{let[n,o]=function(e){let t;if(lk.test(e)){let n;for(t={};n=e.match(lk);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):G(e.slice(2)),t]}(t);r?lx(e,n,l[t]=function(e,t){let n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();tW(function(e,t){if(!A(t))return t;{let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}}(e,n.value),t,5,[e])};return n.value=e,n.attached=lw(),n}(r,i),o):s&&(!function(e,t,n,r){e.removeEventListener(t,n,r)}(e,n,s,o),l[t]=void 0)}}(e,t,0,r,l):("."===t[0]?(t=t.slice(1),0):"^"===t[0]?(t=t.slice(1),1):!function(e,t,n,r){if(r)return!!("innerHTML"===t||"textContent"===t||t in e&&lA(t)&&P(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"form"===t||"list"===t&&"INPUT"===e.tagName||"type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){let t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return!(lA(t)&&M(n))&&t in e}(e,t,r,s))?e._isVueCE&&(/[A-Z]/.test(t)||!M(r))?lS(e,z(t),r,l,t):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),l_(e,t,r,s)):(lS(e,t,r),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||l_(e,t,r,s,l,"value"!==t))}},{insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i="svg"===t?iY.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?iY.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?iY.createElement(e,{is:n}):iY.createElement(e);return"select"===e&&r&&null!=r.multiple&&i.setAttribute("multiple",r.multiple),i},createText:e=>iY.createTextNode(e),createComment:e=>iY.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>iY.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,l){let s=n?n.previousSibling:t.lastChild;if(i&&(i===l||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==l&&(i=i.nextSibling););else{i0.innerHTML=iZ("svg"===r?`<svg>${e}</svg>`:"mathml"===r?`<math>${e}</math>`:e);let i=i0.content;if("svg"===r||"mathml"===r){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}}),l4=!1;function l8(){return p=l4?p:rU(l6),l4=!0,p}let l5=(...e)=>{(p||(p=rj(l6))).render(...e)},l9=(...e)=>{let t=(p||(p=rj(l6))).createApp(...e),{mount:n}=t;return t.mount=e=>{let r=st(e);if(!r)return;let i=t._component;P(i)||i.render||i.template||(i.template=r.innerHTML),1===r.nodeType&&(r.textContent="");let l=n(r,!1,se(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),l},t},l7=(...e)=>{let t=l8().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=st(e);if(t)return n(t,!0,se(t))},t};function se(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function st(e){return M(e)?document.querySelector(e):e}let sn=Symbol(""),sr=Symbol(""),si=Symbol(""),sl=Symbol(""),ss=Symbol(""),so=Symbol(""),sa=Symbol(""),sc=Symbol(""),su=Symbol(""),sd=Symbol(""),sp=Symbol(""),sf=Symbol(""),sh=Symbol(""),sm=Symbol(""),sg=Symbol(""),sy=Symbol(""),sv=Symbol(""),sb=Symbol(""),s_=Symbol(""),sS=Symbol(""),sx=Symbol(""),sC=Symbol(""),sk=Symbol(""),sT=Symbol(""),sN=Symbol(""),sw=Symbol(""),sA=Symbol(""),sE=Symbol(""),sI=Symbol(""),sR=Symbol(""),sO=Symbol(""),sP=Symbol(""),sM=Symbol(""),sL=Symbol(""),s$=Symbol(""),sD=Symbol(""),sF=Symbol(""),sV=Symbol(""),sB=Symbol(""),sU={[sn]:"Fragment",[sr]:"Teleport",[si]:"Suspense",[sl]:"KeepAlive",[ss]:"BaseTransition",[so]:"openBlock",[sa]:"createBlock",[sc]:"createElementBlock",[su]:"createVNode",[sd]:"createElementVNode",[sp]:"createCommentVNode",[sf]:"createTextVNode",[sh]:"createStaticVNode",[sm]:"resolveComponent",[sg]:"resolveDynamicComponent",[sy]:"resolveDirective",[sv]:"resolveFilter",[sb]:"withDirectives",[s_]:"renderList",[sS]:"renderSlot",[sx]:"createSlots",[sC]:"toDisplayString",[sk]:"mergeProps",[sT]:"normalizeClass",[sN]:"normalizeStyle",[sw]:"normalizeProps",[sA]:"guardReactiveProps",[sE]:"toHandlers",[sI]:"camelize",[sR]:"capitalize",[sO]:"toHandlerKey",[sP]:"setBlockTracking",[sM]:"pushScopeId",[sL]:"popScopeId",[s$]:"withCtx",[sD]:"unref",[sF]:"isRef",[sV]:"withMemo",[sB]:"isMemoSame"},sj={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function sH(e,t,n,r,i,l,s,o=!1,a=!1,c=!1,u=sj){return e&&(o?(e.helper(so),e.helper(e.inSSR||c?sa:sc)):e.helper(e.inSSR||c?su:sd),s&&e.helper(sb)),{type:13,tag:t,props:n,children:r,patchFlag:i,dynamicProps:l,directives:s,isBlock:o,disableTracking:a,isComponent:c,loc:u}}function sq(e,t=sj){return{type:17,loc:t,elements:e}}function sW(e,t=sj){return{type:15,loc:t,properties:e}}function sK(e,t){return{type:16,loc:sj,key:M(e)?sz(e,!0):e,value:t}}function sz(e,t=!1,n=sj,r=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:r}}function sJ(e,t=sj){return{type:8,loc:t,children:e}}function sG(e,t=[],n=sj){return{type:14,loc:n,callee:e,arguments:t}}function sX(e,t,n=!1,r=!1,i=sj){return{type:18,params:e,returns:t,newline:n,isSlot:r,loc:i}}function sQ(e,t,n,r=!0){return{type:19,test:e,consequent:t,alternate:n,newline:r,loc:sj}}function sZ(e,{helper:t,removeHelper:n,inSSR:r}){if(!e.isBlock){var i,l;e.isBlock=!0,n((i=e.isComponent,r||i?su:sd)),t(so),t((l=e.isComponent,r||l?sa:sc))}}let sY=new Uint8Array([123,123]),s0=new Uint8Array([125,125]);function s1(e){return e>=97&&e<=122||e>=65&&e<=90}function s2(e){return 32===e||10===e||9===e||12===e||13===e}function s3(e){return 47===e||62===e||s2(e)}function s6(e){let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}let s4={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};function s8(e){throw e}function s5(e){}function s9(e,t,n,r){let i=SyntaxError(String(`https://vuejs.org/error-reference/#compiler-${e}`));return i.code=e,i.loc=t,i}let s7=e=>4===e.type&&e.isStatic;function oe(e){switch(e){case"Teleport":case"teleport":return sr;case"Suspense":case"suspense":return si;case"KeepAlive":case"keep-alive":return sl;case"BaseTransition":case"base-transition":return ss}}let ot=/^\d|[^\$\w\xA0-\uFFFF]/,on=e=>!ot.test(e),or=/[A-Za-z_$\xA0-\uFFFF]/,oi=/[\.\?\w$\xA0-\uFFFF]/,ol=/\s+[.[]\s*|\s*[.[]\s+/g,os=e=>4===e.type?e.content:e.loc.source,oo=e=>{let t=os(e).trim().replace(ol,e=>e.trim()),n=0,r=[],i=0,l=0,s=null;for(let e=0;e<t.length;e++){let o=t.charAt(e);switch(n){case 0:if("["===o)r.push(n),n=1,i++;else if("("===o)r.push(n),n=2,l++;else if(!(0===e?or:oi).test(o))return!1;break;case 1:"'"===o||'"'===o||"`"===o?(r.push(n),n=3,s=o):"["===o?i++:"]"!==o||--i||(n=r.pop());break;case 2:if("'"===o||'"'===o||"`"===o)r.push(n),n=3,s=o;else if("("===o)l++;else if(")"===o){if(e===t.length-1)return!1;--l||(n=r.pop())}break;case 3:o===s&&(n=r.pop(),s=null)}}return!i&&!l},oa=/^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,oc=e=>oa.test(os(e));function ou(e,t,n=!1){for(let r=0;r<e.props.length;r++){let i=e.props[r];if(7===i.type&&(n||i.exp)&&(M(t)?i.name===t:t.test(i.name)))return i}}function od(e,t,n=!1,r=!1){for(let i=0;i<e.props.length;i++){let l=e.props[i];if(6===l.type){if(n)continue;if(l.name===t&&(l.value||r))return l}else if("bind"===l.name&&(l.exp||r)&&op(l.arg,t))return l}}function op(e,t){return!!(e&&s7(e)&&e.content===t)}function of(e){return 5===e.type||2===e.type}function oh(e){return 7===e.type&&"slot"===e.name}function om(e){return 1===e.type&&3===e.tagType}function og(e){return 1===e.type&&2===e.tagType}let oy=new Set([sw,sA]);function ov(e,t,n){let r,i;let l=13===e.type?e.props:e.arguments[2],s=[];if(l&&!M(l)&&14===l.type){let e=function e(t,n=[]){if(t&&!M(t)&&14===t.type){let r=t.callee;if(!M(r)&&oy.has(r))return e(t.arguments[0],n.concat(t))}return[t,n]}(l);l=e[0],i=(s=e[1])[s.length-1]}if(null==l||M(l))r=sW([t]);else if(14===l.type){let e=l.arguments[0];M(e)||15!==e.type?l.callee===sE?r=sG(n.helper(sk),[sW([t]),l]):l.arguments.unshift(sW([t])):ob(t,e)||e.properties.unshift(t),r||(r=l)}else 15===l.type?(ob(t,l)||l.properties.unshift(t),r=l):(r=sG(n.helper(sk),[sW([t]),l]),i&&i.callee===sA&&(i=s[s.length-2]));13===e.type?i?i.arguments[0]=r:e.props=r:i?i.arguments[0]=r:e.arguments[2]=r}function ob(e,t){let n=!1;if(4===e.key.type){let r=e.key.content;n=t.properties.some(e=>4===e.key.type&&e.key.content===r)}return n}function o_(e,t){return`_${t}_${e.replace(/[^\w]/g,(t,n)=>"-"===t?"_":e.charCodeAt(n).toString())}`}let oS=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,ox={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:S,isPreTag:S,isIgnoreNewlineTag:S,isCustomElement:S,onError:s8,onWarn:s5,comments:!1,prefixIdentifiers:!1},oC=ox,ok=null,oT="",oN=null,ow=null,oA="",oE=-1,oI=-1,oR=0,oO=!1,oP=null,oM=[],oL=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=sY,this.delimiterClose=s0,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=sY,this.delimiterClose=s0}getPos(e){let t=1,n=e+1;for(let r=this.newlines.length-1;r>=0;r--){let i=this.newlines[r];if(e>i){t=r+2,n=e-i;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex]){if(this.delimiterIndex===this.delimiterOpen.length-1){let e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++}else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){let t=this.sequenceIndex===this.currentSequence.length;if(t?s3(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t){this.sequenceIndex++;return}}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||s2(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart<t){let e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}this.sectionStart=t+2,this.stateInClosingTagName(e),this.inRCDATA=!1;return}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence!==s4.TitleEnd&&(this.currentSequence!==s4.TextareaEnd||this.inSFCRoot)?this.fastForwardTo(60)&&(this.sequenceIndex=1):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.sequenceIndex=Number(60===e)}stateCDATASequence(e){e===s4.Cdata[this.sequenceIndex]?++this.sequenceIndex===s4.Cdata.length&&(this.state=28,this.currentSequence=s4.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){let t=this.buffer.charCodeAt(this.index);if(10===t&&this.newlines.push(this.index),t===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===s4.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,t){this.enterRCDATA(e,t),this.state=31}enterRCDATA(e,t){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=t}stateBeforeTagName(e){33===e?(this.state=22,this.sectionStart=this.index+1):63===e?(this.state=24,this.sectionStart=this.index+1):s1(e)?(this.sectionStart=this.index,0===this.mode?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:116===e?this.state=30:this.state=115===e?29:6):47===e?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){s3(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(s3(e)){let t=this.buffer.slice(this.sectionStart,this.index);"template"!==t&&this.enterRCDATA(s6("</"+t),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){s2(e)||(62===e?(this.state=1,this.sectionStart=this.index+1):(this.state=s1(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(62===e||s2(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){62===e&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){62===e?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):47===e?this.state=7:60===e&&47===this.peek()?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):s2(e)||this.handleAttrStart(e)}handleAttrStart(e){118===e&&45===this.peek()?(this.state=13,this.sectionStart=this.index):46===e||58===e||64===e||35===e?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){62===e?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):s2(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(61===e||s3(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){61===e||s3(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):58===e?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):46===e&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){61===e||s3(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):91===e?this.state=15:46===e&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){93===e?this.state=14:(61===e||s3(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){61===e||s3(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):46===e&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){61===e?this.state=18:47===e||62===e?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):s2(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){34===e?(this.state=19,this.sectionStart=this.index+1):39===e?(this.state=20,this.sectionStart=this.index+1):s2(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,t){(e===t||this.fastForwardTo(t))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(34===t?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){s2(e)||62===e?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):(39===e||60===e||61===e||96===e)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){91===e?(this.state=26,this.sequenceIndex=0):this.state=45===e?25:23}stateInDeclaration(e){(62===e||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(62===e||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){45===e?(this.state=28,this.currentSequence=s4.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(62===e||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){e===s4.ScriptEnd[3]?this.startSpecial(s4.ScriptEnd,4):e===s4.StyleEnd[3]?this.startSpecial(s4.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===s4.TitleEnd[3]?this.startSpecial(s4.TitleEnd,4):e===s4.TextareaEnd[3]?this.startSpecial(s4.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){let e=this.buffer.charCodeAt(this.index);switch(10===e&&this.newlines.push(this.index),this.state){case 1:this.stateText(e);break;case 2:this.stateInterpolationOpen(e);break;case 3:this.stateInterpolation(e);break;case 4:this.stateInterpolationClose(e);break;case 31:this.stateSpecialStartSequence(e);break;case 32:this.stateInRCDATA(e);break;case 26:this.stateCDATASequence(e);break;case 19:this.stateInAttrValueDoubleQuotes(e);break;case 12:this.stateInAttrName(e);break;case 13:this.stateInDirName(e);break;case 14:this.stateInDirArg(e);break;case 15:this.stateInDynamicDirArg(e);break;case 16:this.stateInDirModifier(e);break;case 28:this.stateInCommentLike(e);break;case 27:this.stateInSpecialComment(e);break;case 11:this.stateBeforeAttrName(e);break;case 6:this.stateInTagName(e);break;case 34:this.stateInSFCRootTagName(e);break;case 9:this.stateInClosingTagName(e);break;case 5:this.stateBeforeTagName(e);break;case 17:this.stateAfterAttrName(e);break;case 20:this.stateInAttrValueSingleQuotes(e);break;case 18:this.stateBeforeAttrValue(e);break;case 8:this.stateBeforeClosingTagName(e);break;case 10:this.stateAfterClosingTagName(e);break;case 29:this.stateBeforeSpecialS(e);break;case 30:this.stateBeforeSpecialT(e);break;case 21:this.stateInAttrValueNoQuotes(e);break;case 7:this.stateInSelfClosingTag(e);break;case 23:this.stateInDeclaration(e);break;case 22:this.stateBeforeDeclaration(e);break;case 25:this.stateBeforeComment(e);break;case 24:this.stateInProcessingInstruction(e);break;case 33:this.stateInEntity()}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(1===this.state||32===this.state&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(19===this.state||20===this.state||21===this.state)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){let e=this.buffer.length;this.sectionStart>=e||(28===this.state?this.currentSequence===s4.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(oM,{onerr:oQ,ontext(e,t){oB(oF(e,t),e,t)},ontextentity(e,t,n){oB(e,t,n)},oninterpolation(e,t){if(oO)return oB(oF(e,t),e,t);let n=e+oL.delimiterOpen.length,r=t-oL.delimiterClose.length;for(;s2(oT.charCodeAt(n));)n++;for(;s2(oT.charCodeAt(r-1));)r--;let i=oF(n,r);i.includes("&")&&(i=oC.decodeEntities(i,!1)),oz({type:5,content:oX(i,!1,oJ(n,r)),loc:oJ(e,t)})},onopentagname(e,t){let n=oF(e,t);oN={type:1,tag:n,ns:oC.getNamespace(n,oM[0],oC.ns),tagType:0,props:[],children:[],loc:oJ(e-1,t),codegenNode:void 0}},onopentagend(e){oV(e)},onclosetag(e,t){let n=oF(e,t);if(!oC.isVoidTag(n)){let r=!1;for(let e=0;e<oM.length;e++)if(oM[e].tag.toLowerCase()===n.toLowerCase()){r=!0,e>0&&oM[0].loc.start.offset;for(let n=0;n<=e;n++)oU(oM.shift(),t,n<e);break}r||oj(e,60)}},onselfclosingtag(e){let t=oN.tag;oN.isSelfClosing=!0,oV(e),oM[0]&&oM[0].tag===t&&oU(oM.shift(),e)},onattribname(e,t){ow={type:6,name:oF(e,t),nameLoc:oJ(e,t),value:void 0,loc:oJ(e)}},ondirname(e,t){let n=oF(e,t),r="."===n||":"===n?"bind":"@"===n?"on":"#"===n?"slot":n.slice(2);if(oO||""===r)ow={type:6,name:n,nameLoc:oJ(e,t),value:void 0,loc:oJ(e)};else if(ow={type:7,name:r,rawName:n,exp:void 0,arg:void 0,modifiers:"."===n?[sz("prop")]:[],loc:oJ(e)},"pre"===r){oO=oL.inVPre=!0,oP=oN;let e=oN.props;for(let t=0;t<e.length;t++)7===e[t].type&&(e[t]=function(e){let t={type:6,name:e.rawName,nameLoc:oJ(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){let n=e.exp.loc;n.end.offset<e.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),t.value={type:2,content:e.exp.content,loc:n}}return t}(e[t]))}},ondirarg(e,t){if(e===t)return;let n=oF(e,t);if(oO)ow.name+=n,oG(ow.nameLoc,t);else{let r="["!==n[0];ow.arg=oX(r?n:n.slice(1,-1),r,oJ(e,t),r?3:0)}},ondirmodifier(e,t){let n=oF(e,t);if(oO)ow.name+="."+n,oG(ow.nameLoc,t);else if("slot"===ow.name){let e=ow.arg;e&&(e.content+="."+n,oG(e.loc,t))}else{let r=sz(n,!0,oJ(e,t));ow.modifiers.push(r)}},onattribdata(e,t){oA+=oF(e,t),oE<0&&(oE=e),oI=t},onattribentity(e,t,n){oA+=e,oE<0&&(oE=t),oI=n},onattribnameend(e){let t=oF(ow.loc.start.offset,e);7===ow.type&&(ow.rawName=t),oN.props.some(e=>(7===e.type?e.rawName:e.name)===t)},onattribend(e,t){oN&&ow&&(oG(ow.loc,t),0!==e&&(oA.includes("&")&&(oA=oC.decodeEntities(oA,!0)),6===ow.type?("class"===ow.name&&(oA=oK(oA).trim()),ow.value={type:2,content:oA,loc:1===e?oJ(oE,oI):oJ(oE-1,oI+1)},oL.inSFCRoot&&"template"===oN.tag&&"lang"===ow.name&&oA&&"html"!==oA&&oL.enterRCDATA(s6("</template"),0)):(ow.exp=oX(oA,!1,oJ(oE,oI),0,0),"for"===ow.name&&(ow.forParseResult=function(e){let t=e.loc,n=e.content,r=n.match(oS);if(!r)return;let[,i,l]=r,s=(e,n,r=!1)=>{let i=t.start.offset+n,l=i+e.length;return oX(e,!1,oJ(i,l),0,r?1:0)},o={source:s(l.trim(),n.indexOf(l,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1},a=i.trim().replace(oD,"").trim(),c=i.indexOf(a),u=a.match(o$);if(u){let e;a=a.replace(o$,"").trim();let t=u[1].trim();if(t&&(e=n.indexOf(t,c+a.length),o.key=s(t,e,!0)),u[2]){let r=u[2].trim();r&&(o.index=s(r,n.indexOf(r,o.key?e+t.length:c+a.length),!0))}}return a&&(o.value=s(a,c,!0)),o}(ow.exp)))),(7!==ow.type||"pre"!==ow.name)&&oN.props.push(ow)),oA="",oE=oI=-1},oncomment(e,t){oC.comments&&oz({type:3,content:oF(e,t),loc:oJ(e-4,t+3)})},onend(){let e=oT.length;for(let t=0;t<oM.length;t++)oU(oM[t],e-1),oM[t].loc.start.offset},oncdata(e,t){0!==oM[0].ns&&oB(oF(e,t),e,t)},onprocessinginstruction(e){(oM[0]?oM[0].ns:oC.ns)===0&&oQ(21,e-1)}}),o$=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,oD=/^\(|\)$/g;function oF(e,t){return oT.slice(e,t)}function oV(e){oL.inSFCRoot&&(oN.innerLoc=oJ(e+1,e+1)),oz(oN);let{tag:t,ns:n}=oN;0===n&&oC.isPreTag(t)&&oR++,oC.isVoidTag(t)?oU(oN,e):(oM.unshift(oN),(1===n||2===n)&&(oL.inXML=!0)),oN=null}function oB(e,t,n){{let t=oM[0]&&oM[0].tag;"script"!==t&&"style"!==t&&e.includes("&")&&(e=oC.decodeEntities(e,!1))}let r=oM[0]||ok,i=r.children[r.children.length-1];i&&2===i.type?(i.content+=e,oG(i.loc,n)):r.children.push({type:2,content:e,loc:oJ(t,n)})}function oU(e,t,n=!1){n?oG(e.loc,oj(t,60)):oG(e.loc,function(e,t){let n=e;for(;62!==oT.charCodeAt(n)&&n<oT.length-1;)n++;return n}(t,0)+1),oL.inSFCRoot&&(e.children.length?e.innerLoc.end=k({},e.children[e.children.length-1].loc.end):e.innerLoc.end=k({},e.innerLoc.start),e.innerLoc.source=oF(e.innerLoc.start.offset,e.innerLoc.end.offset));let{tag:r,ns:i,children:l}=e;if(!oO&&("slot"===r?e.tagType=2:function({tag:e,props:t}){if("template"===e){for(let e=0;e<t.length;e++)if(7===t[e].type&&oH.has(t[e].name))return!0}return!1}(e)?e.tagType=3:function({tag:e,props:t}){var n;if(oC.isCustomElement(e))return!1;if("component"===e||(n=e.charCodeAt(0))>64&&n<91||oe(e)||oC.isBuiltInComponent&&oC.isBuiltInComponent(e)||oC.isNativeTag&&!oC.isNativeTag(e))return!0;for(let e=0;e<t.length;e++){let n=t[e];if(6===n.type&&"is"===n.name&&n.value&&n.value.content.startsWith("vue:"))return!0}return!1}(e)&&(e.tagType=1)),oL.inRCDATA||(e.children=oW(l)),0===i&&oC.isIgnoreNewlineTag(r)){let e=l[0];e&&2===e.type&&(e.content=e.content.replace(/^\r?\n/,""))}0===i&&oC.isPreTag(r)&&oR--,oP===e&&(oO=oL.inVPre=!1,oP=null),oL.inXML&&(oM[0]?oM[0].ns:oC.ns)===0&&(oL.inXML=!1)}function oj(e,t){let n=e;for(;oT.charCodeAt(n)!==t&&n>=0;)n--;return n}let oH=new Set(["if","else","else-if","for","slot"]),oq=/\r\n/g;function oW(e,t){let n="preserve"!==oC.whitespace,r=!1;for(let t=0;t<e.length;t++){let i=e[t];if(2===i.type){if(oR)i.content=i.content.replace(oq,"\n");else if(function(e){for(let t=0;t<e.length;t++)if(!s2(e.charCodeAt(t)))return!1;return!0}(i.content)){let l=e[t-1]&&e[t-1].type,s=e[t+1]&&e[t+1].type;!l||!s||n&&(3===l&&(3===s||1===s)||1===l&&(3===s||1===s&&function(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(10===n||13===n)return!0}return!1}(i.content)))?(r=!0,e[t]=null):i.content=" "}else n&&(i.content=oK(i.content))}}return r?e.filter(Boolean):e}function oK(e){let t="",n=!1;for(let r=0;r<e.length;r++)s2(e.charCodeAt(r))?n||(t+=" ",n=!0):(t+=e[r],n=!1);return t}function oz(e){(oM[0]||ok).children.push(e)}function oJ(e,t){return{start:oL.getPos(e),end:null==t?t:oL.getPos(t),source:null==t?t:oF(e,t)}}function oG(e,t){e.end=oL.getPos(t),e.source=oF(e.start.offset,t)}function oX(e,t=!1,n,r=0,i=0){return sz(e,t,n,r)}function oQ(e,t,n){oC.onError(s9(e,oJ(t,t)))}function oZ(e,t){let{children:n}=e;return 1===n.length&&1===t.type&&!og(t)}function oY(e,t){let{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;let r=n.get(e);if(void 0!==r)return r;let i=e.codegenNode;if(13!==i.type||i.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag&&"math"!==e.tag)return 0;if(void 0!==i.patchFlag)return n.set(e,0),0;{let r=3,c=o1(e,t);if(0===c)return n.set(e,0),0;c<r&&(r=c);for(let i=0;i<e.children.length;i++){let l=oY(e.children[i],t);if(0===l)return n.set(e,0),0;l<r&&(r=l)}if(r>1)for(let i=0;i<e.props.length;i++){let l=e.props[i];if(7===l.type&&"bind"===l.name&&l.exp){let i=oY(l.exp,t);if(0===i)return n.set(e,0),0;i<r&&(r=i)}}if(i.isBlock){var l,s,o,a;for(let t=0;t<e.props.length;t++)if(7===e.props[t].type)return n.set(e,0),0;t.removeHelper(so),t.removeHelper((l=t.inSSR,s=i.isComponent,l||s?sa:sc)),i.isBlock=!1,t.helper((o=t.inSSR,a=i.isComponent,o||a?su:sd))}return n.set(e,r),r}case 2:case 3:return 3;case 9:case 11:case 10:default:return 0;case 5:case 12:return oY(e.content,t);case 4:return e.constType;case 8:let c=3;for(let n=0;n<e.children.length;n++){let r=e.children[n];if(M(r)||L(r))continue;let i=oY(r,t);if(0===i)return 0;i<c&&(c=i)}return c;case 20:return 2}}let o0=new Set([sT,sN,sw,sA]);function o1(e,t){let n=3,r=o2(e);if(r&&15===r.type){let{properties:e}=r;for(let r=0;r<e.length;r++){let i;let{key:l,value:s}=e[r],o=oY(l,t);if(0===o)return o;if(o<n&&(n=o),0===(i=4===s.type?oY(s,t):14===s.type?function e(t,n){if(14===t.type&&!M(t.callee)&&o0.has(t.callee)){let r=t.arguments[0];if(4===r.type)return oY(r,n);if(14===r.type)return e(r,n)}return 0}(s,t):0))return i;i<n&&(n=i)}}return n}function o2(e){let t=e.codegenNode;if(13===t.type)return t.props}function o3(e,t){t.currentNode=e;let{nodeTransforms:n}=t,r=[];for(let i=0;i<n.length;i++){let l=n[i](e,t);if(l&&(A(l)?r.push(...l):r.push(l)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(sp);break;case 5:t.ssr||t.helper(sC);break;case 9:for(let n=0;n<e.branches.length;n++)o3(e.branches[n],t);break;case 10:case 11:case 1:case 0:!function(e,t){let n=0,r=()=>{n--};for(;n<e.children.length;n++){let i=e.children[n];M(i)||(t.grandParent=t.parent,t.parent=e,t.childIndex=n,t.onNodeRemoved=r,o3(i,t))}}(e,t)}t.currentNode=e;let i=r.length;for(;i--;)r[i]()}function o6(e,t){let n=M(e)?t=>t===e:t=>e.test(t);return(e,r)=>{if(1===e.type){let{props:i}=e;if(3===e.tagType&&i.some(oh))return;let l=[];for(let s=0;s<i.length;s++){let o=i[s];if(7===o.type&&n(o.name)){i.splice(s,1),s--;let n=t(e,o,r);n&&l.push(n)}}return l}}}let o4="/*@__PURE__*/",o8=e=>`${sU[e]}: _${sU[e]}`;function o5(e,t,{helper:n,push:r,newline:i,isTS:l}){let s=n("component"===t?sm:sy);for(let n=0;n<e.length;n++){let o=e[n],a=o.endsWith("__self");a&&(o=o.slice(0,-6)),r(`const ${o_(o,t)} = ${s}(${JSON.stringify(o)}${a?", true":""})${l?"!":""}`),n<e.length-1&&i()}}function o9(e,t){let n=e.length>3;t.push("["),n&&t.indent(),o7(e,t,n),n&&t.deindent(),t.push("]")}function o7(e,t,n=!1,r=!0){let{push:i,newline:l}=t;for(let s=0;s<e.length;s++){let o=e[s];M(o)?i(o,-3):A(o)?o9(o,t):ae(o,t),s<e.length-1&&(n?(r&&i(","),l()):r&&i(", "))}}function ae(e,t){if(M(e)){t.push(e,-3);return}if(L(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:case 12:ae(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),-3,e)}(e,t);break;case 4:at(e,t);break;case 5:!function(e,t){let{push:n,helper:r,pure:i}=t;i&&n(o4),n(`${r(sC)}(`),ae(e.content,t),n(")")}(e,t);break;case 8:an(e,t);break;case 3:!function(e,t){let{push:n,helper:r,pure:i}=t;i&&n(o4),n(`${r(sp)}(${JSON.stringify(e.content)})`,-3,e)}(e,t);break;case 13:!function(e,t){let n;let{push:r,helper:i,pure:l}=t,{tag:s,props:o,children:a,patchFlag:c,dynamicProps:u,directives:d,isBlock:p,disableTracking:f,isComponent:h}=e;c&&(n=String(c)),d&&r(i(sb)+"("),p&&r(`(${i(so)}(${f?"true":""}), `),l&&r(o4),r(i(p?t.inSSR||h?sa:sc:t.inSSR||h?su:sd)+"(",-2,e),o7(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map(e=>e||"null")}([s,o,a,n,u]),t),r(")"),p&&r(")"),d&&(r(", "),ae(d,t),r(")"))}(e,t);break;case 14:!function(e,t){let{push:n,helper:r,pure:i}=t,l=M(e.callee)?e.callee:r(e.callee);i&&n(o4),n(l+"(",-2,e),o7(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){let{push:n,indent:r,deindent:i,newline:l}=t,{properties:s}=e;if(!s.length){n("{}",-2,e);return}let o=s.length>1;n(o?"{":"{ "),o&&r();for(let e=0;e<s.length;e++){let{key:r,value:i}=s[e];!function(e,t){let{push:n}=t;8===e.type?(n("["),an(e,t),n("]")):e.isStatic?n(on(e.content)?e.content:JSON.stringify(e.content),-2,e):n(`[${e.content}]`,-3,e)}(r,t),n(": "),ae(i,t),e<s.length-1&&(n(","),l())}o&&i(),n(o?"}":" }")}(e,t);break;case 17:o9(e.elements,t);break;case 18:!function(e,t){let{push:n,indent:r,deindent:i}=t,{params:l,returns:s,body:o,newline:a,isSlot:c}=e;c&&n(`_${sU[s$]}(`),n("(",-2,e),A(l)?o7(l,t):l&&ae(l,t),n(") => "),(a||o)&&(n("{"),r()),s?(a&&n("return "),A(s)?o9(s,t):ae(s,t)):o&&ae(o,t),(a||o)&&(i(),n("}")),c&&n(")")}(e,t);break;case 19:!function(e,t){let{test:n,consequent:r,alternate:i,newline:l}=e,{push:s,indent:o,deindent:a,newline:c}=t;if(4===n.type){let e=!on(n.content);e&&s("("),at(n,t),e&&s(")")}else s("("),ae(n,t),s(")");l&&o(),t.indentLevel++,l||s(" "),s("? "),ae(r,t),t.indentLevel--,l&&c(),l||s(" "),s(": ");let u=19===i.type;!u&&t.indentLevel++,ae(i,t),!u&&t.indentLevel--,l&&a(!0)}(e,t);break;case 20:!function(e,t){let{push:n,helper:r,indent:i,deindent:l,newline:s}=t,{needPauseTracking:o,needArraySpread:a}=e;a&&n("[...("),n(`_cache[${e.index}] || (`),o&&(i(),n(`${r(sP)}(-1`),e.inVOnce&&n(", true"),n("),"),s(),n("(")),n(`_cache[${e.index}] = `),ae(e.value,t),o&&(n(`).cacheIndex = ${e.index},`),s(),n(`${r(sP)}(1),`),s(),n(`_cache[${e.index}]`),l()),n(")"),a&&n(")]")}(e,t);break;case 21:o7(e.body,t,!0,!1)}}function at(e,t){let{content:n,isStatic:r}=e;t.push(r?JSON.stringify(n):n,-3,e)}function an(e,t){for(let n=0;n<e.children.length;n++){let r=e.children[n];M(r)?t.push(r,-3):ae(r,t)}}let ar=o6(/^(if|else|else-if)$/,(e,t,n)=>(function(e,t,n,r){if("else"!==t.name&&(!t.exp||!t.exp.content.trim())){let r=t.exp?t.exp.loc:e.loc;n.onError(s9(28,t.loc)),t.exp=sz("true",!1,r)}if("if"===t.name){var i;let l=ai(e,t),s={type:9,loc:oJ((i=e.loc).start.offset,i.end.offset),branches:[l]};if(n.replaceNode(s),r)return r(s,l,!0)}else{let i=n.parent.children,l=i.indexOf(e);for(;l-- >=-1;){let s=i[l];if(s&&3===s.type||s&&2===s.type&&!s.content.trim().length){n.removeNode(s);continue}if(s&&9===s.type){"else-if"===t.name&&void 0===s.branches[s.branches.length-1].condition&&n.onError(s9(30,e.loc)),n.removeNode();let i=ai(e,t);s.branches.push(i);let l=r&&r(s,i,!1);o3(i,n),l&&l(),n.currentNode=null}else n.onError(s9(30,e.loc));break}}})(e,t,n,(e,t,r)=>{let i=n.parent.children,l=i.indexOf(e),s=0;for(;l-- >=0;){let e=i[l];e&&9===e.type&&(s+=e.branches.length)}return()=>{r?e.codegenNode=al(t,s,n):function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode).alternate=al(t,s+e.branches.length-1,n)}}));function ai(e,t){let n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!ou(e,"for")?e.children:[e],userKey:od(e,"key"),isTemplateIf:n}}function al(e,t,n){return e.condition?sQ(e.condition,as(e,t,n),sG(n.helper(sp),['""',"true"])):as(e,t,n)}function as(e,t,n){let{helper:r}=n,i=sK("key",sz(`${t}`,!1,sj,2)),{children:l}=e,s=l[0];if(1!==l.length||1!==s.type){if(1!==l.length||11!==s.type)return sH(n,r(sn),sW([i]),l,64,void 0,void 0,!0,!1,!1,e.loc);{let e=s.codegenNode;return ov(e,i,n),e}}{let e=s.codegenNode,t=14===e.type&&e.callee===sV?e.arguments[1].returns:e;return 13===t.type&&sZ(t,n),ov(t,i,n),e}}let ao=(e,t,n)=>{let{modifiers:r,loc:i}=e,l=e.arg,{exp:s}=e;if(s&&4===s.type&&!s.content.trim()&&(s=void 0),!s){if(4!==l.type||!l.isStatic)return n.onError(s9(52,l.loc)),{props:[sK(l,sz("",!0,i))]};aa(e),s=e.exp}return 4!==l.type?(l.children.unshift("("),l.children.push(') || ""')):l.isStatic||(l.content=`${l.content} || ""`),r.some(e=>"camel"===e.content)&&(4===l.type?l.isStatic?l.content=z(l.content):l.content=`${n.helperString(sI)}(${l.content})`:(l.children.unshift(`${n.helperString(sI)}(`),l.children.push(")"))),!n.inSSR&&(r.some(e=>"prop"===e.content)&&ac(l,"."),r.some(e=>"attr"===e.content)&&ac(l,"^")),{props:[sK(l,s)]}},aa=(e,t)=>{let n=e.arg,r=z(n.content);e.exp=sz(r,!1,n.loc)},ac=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},au=o6("for",(e,t,n)=>{let{helper:r,removeHelper:i}=n;return function(e,t,n,r){if(!t.exp){n.onError(s9(31,t.loc));return}let i=t.forParseResult;if(!i){n.onError(s9(32,t.loc));return}ad(i);let{addIdentifiers:l,removeIdentifiers:s,scopes:o}=n,{source:a,value:c,key:u,index:d}=i,p={type:11,loc:t.loc,source:a,valueAlias:c,keyAlias:u,objectIndexAlias:d,parseResult:i,children:om(e)?e.children:[e]};n.replaceNode(p),o.vFor++;let f=r&&r(p);return()=>{o.vFor--,f&&f()}}(e,t,n,t=>{let l=sG(r(s_),[t.source]),s=om(e),o=ou(e,"memo"),a=od(e,"key",!1,!0);a&&7===a.type&&!a.exp&&aa(a);let c=a&&(6===a.type?a.value?sz(a.value.content,!0):void 0:a.exp),u=a&&c?sK("key",c):null,d=4===t.source.type&&t.source.constType>0,p=d?64:a?128:256;return t.codegenNode=sH(n,r(sn),void 0,l,p,void 0,void 0,!0,!d,!1,e.loc),()=>{let a;let{children:p}=t,f=1!==p.length||1!==p[0].type,h=og(e)?e:s&&1===e.children.length&&og(e.children[0])?e.children[0]:null;if(h)a=h.codegenNode,s&&u&&ov(a,u,n);else if(f)a=sH(n,r(sn),u?sW([u]):void 0,e.children,64,void 0,void 0,!0,void 0,!1);else{var m,g,y,b,_,S,x,C;a=p[0].codegenNode,s&&u&&ov(a,u,n),!d!==a.isBlock&&(a.isBlock?(i(so),i((m=n.inSSR,g=a.isComponent,m||g?sa:sc))):i((y=n.inSSR,b=a.isComponent,y||b?su:sd))),(a.isBlock=!d,a.isBlock)?(r(so),r((_=n.inSSR,S=a.isComponent,_||S?sa:sc))):r((x=n.inSSR,C=a.isComponent,x||C?su:sd))}if(o){let e=sX(ap(t.parseResult,[sz("_cached")]));e.body={type:21,body:[sJ(["const _memo = (",o.exp,")"]),sJ(["if (_cached",...c?[" && _cached.key === ",c]:[],` && ${n.helperString(sB)}(_cached, _memo)) return _cached`]),sJ(["const _item = ",a]),sz("_item.memo = _memo"),sz("return _item")],loc:sj},l.arguments.push(e,sz("_cache"),sz(String(n.cached.length))),n.cached.push(null)}else l.arguments.push(sX(ap(t.parseResult),a,!0))}})});function ad(e,t){e.finalized||(e.finalized=!0)}function ap({value:e,key:t,index:n},r=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((e,t)=>e||sz("_".repeat(t+1),!1))}([e,t,n,...r])}let af=sz("undefined",!1),ah=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){let n=ou(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},am=(e,t,n,r)=>sX(e,n,!1,!0,n.length?n[0].loc:r);function ag(e,t,n){let r=[sK("name",e),sK("fn",t)];return null!=n&&r.push(sK("key",sz(String(n),!0))),sW(r)}let ay=new WeakMap,av=(e,t)=>function(){let n,r,i,l,s;if(!(1===(e=t.currentNode).type&&(0===e.tagType||1===e.tagType)))return;let{tag:o,props:a}=e,c=1===e.tagType,u=c?function(e,t,n=!1){let{tag:r}=e,i=aS(r),l=od(e,"is",!1,!0);if(l){if(i){let e;if(6===l.type?e=l.value&&sz(l.value.content,!0):(e=l.exp)||(e=sz("is",!1,l.arg.loc)),e)return sG(t.helper(sg),[e])}else 6===l.type&&l.value.content.startsWith("vue:")&&(r=l.value.content.slice(4))}let s=oe(r)||t.isBuiltInComponent(r);return s?(n||t.helper(s),s):(t.helper(sm),t.components.add(r),o_(r,"component"))}(e,t):`"${o}"`,d=$(u)&&u.callee===sg,p=0,f=d||u===sr||u===si||!c&&("svg"===o||"foreignObject"===o||"math"===o);if(a.length>0){let r=ab(e,t,void 0,c,d);n=r.props,p=r.patchFlag,l=r.dynamicPropNames;let i=r.directives;s=i&&i.length?sq(i.map(e=>(function(e,t){let n=[],r=ay.get(e);r?n.push(t.helperString(r)):(t.helper(sy),t.directives.add(e.name),n.push(o_(e.name,"directive")));let{loc:i}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));let t=sz("true",!1,i);n.push(sW(e.modifiers.map(e=>sK(e,t)),i))}return sq(n,e.loc)})(e,t))):void 0,r.shouldUseBlock&&(f=!0)}if(e.children.length>0){if(u===sl&&(f=!0,p|=1024),c&&u!==sr&&u!==sl){let{slots:n,hasDynamicSlots:i}=function(e,t,n=am){t.helper(s$);let{children:r,loc:i}=e,l=[],s=[],o=t.scopes.vSlot>0||t.scopes.vFor>0,a=ou(e,"slot",!0);if(a){let{arg:e,exp:t}=a;e&&!s7(e)&&(o=!0),l.push(sK(e||sz("default",!0),n(t,void 0,r,i)))}let c=!1,u=!1,d=[],p=new Set,f=0;for(let e=0;e<r.length;e++){let i,h,m,g;let y=r[e];if(!om(y)||!(i=ou(y,"slot",!0))){3!==y.type&&d.push(y);continue}if(a){t.onError(s9(37,i.loc));break}c=!0;let{children:b,loc:_}=y,{arg:S=sz("default",!0),exp:x,loc:C}=i;s7(S)?h=S?S.content:"default":o=!0;let k=ou(y,"for"),T=n(x,k,b,_);if(m=ou(y,"if"))o=!0,s.push(sQ(m.exp,ag(S,T,f++),af));else if(g=ou(y,/^else(-if)?$/,!0)){let n,i=e;for(;i--&&3===(n=r[i]).type;);if(n&&om(n)&&ou(n,/^(else-)?if$/)){let e=s[s.length-1];for(;19===e.alternate.type;)e=e.alternate;e.alternate=g.exp?sQ(g.exp,ag(S,T,f++),af):ag(S,T,f++)}else t.onError(s9(30,g.loc))}else if(k){o=!0;let e=k.forParseResult;e?(ad(e),s.push(sG(t.helper(s_),[e.source,sX(ap(e),ag(S,T),!0)]))):t.onError(s9(32,k.loc))}else{if(h){if(p.has(h)){t.onError(s9(38,C));continue}p.add(h),"default"===h&&(u=!0)}l.push(sK(S,T))}}if(!a){let e=(e,t)=>sK("default",n(e,void 0,t,i));c?d.length&&d.some(e=>(function e(t){return 2!==t.type&&12!==t.type||(2===t.type?!!t.content.trim():e(t.content))})(e))&&(u?t.onError(s9(39,d[0].loc)):l.push(e(void 0,d))):l.push(e(void 0,r))}let h=o?2:!function e(t){for(let n=0;n<t.length;n++){let r=t[n];switch(r.type){case 1:if(2===r.tagType||e(r.children))return!0;break;case 9:if(e(r.branches))return!0;break;case 10:case 11:if(e(r.children))return!0}}return!1}(e.children)?1:3,m=sW(l.concat(sK("_",sz(h+"",!1))),i);return s.length&&(m=sG(t.helper(sx),[m,sq(s)])),{slots:m,hasDynamicSlots:o}}(e,t);r=n,i&&(p|=1024)}else if(1===e.children.length&&u!==sr){let n=e.children[0],i=n.type,l=5===i||8===i;l&&0===oY(n,t)&&(p|=1),r=l||2===i?n:e.children}else r=e.children}l&&l.length&&(i=function(e){let t="[";for(let n=0,r=e.length;n<r;n++)t+=JSON.stringify(e[n]),n<r-1&&(t+=", ");return t+"]"}(l)),e.codegenNode=sH(t,u,n,r,0===p?void 0:p,i,s,!!f,!1,c,e.loc)};function ab(e,t,n=e.props,r,i,l=!1){let s;let{tag:o,loc:a,children:c}=e,u=[],d=[],p=[],f=c.length>0,h=!1,m=0,g=!1,y=!1,b=!1,_=!1,S=!1,C=!1,k=[],T=e=>{u.length&&(d.push(sW(a_(u),a)),u=[]),e&&d.push(e)},N=()=>{t.scopes.vFor>0&&u.push(sK(sz("ref_for",!0),sz("true")))},w=({key:e,value:n})=>{if(s7(e)){let l=e.content,s=x(l);s&&(!r||i)&&"onclick"!==l.toLowerCase()&&"onUpdate:modelValue"!==l&&!H(l)&&(_=!0),s&&H(l)&&(C=!0),s&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&oY(n,t)>0||("ref"===l?g=!0:"class"===l?y=!0:"style"===l?b=!0:"key"===l||k.includes(l)||k.push(l),r&&("class"===l||"style"===l)&&!k.includes(l)&&k.push(l))}else S=!0};for(let i=0;i<n.length;i++){let s=n[i];if(6===s.type){let{loc:e,name:t,nameLoc:n,value:r}=s;if("ref"===t&&(g=!0,N()),"is"===t&&(aS(o)||r&&r.content.startsWith("vue:")))continue;u.push(sK(sz(t,!0,n),sz(r?r.content:"",!0,r?r.loc:e)))}else{let{name:n,arg:i,exp:c,loc:g,modifiers:y}=s,b="bind"===n,_="on"===n;if("slot"===n){r||t.onError(s9(40,g));continue}if("once"===n||"memo"===n||"is"===n||b&&op(i,"is")&&aS(o)||_&&l)continue;if((b&&op(i,"key")||_&&f&&op(i,"vue:before-update"))&&(h=!0),b&&op(i,"ref")&&N(),!i&&(b||_)){S=!0,c?b?(N(),T(),d.push(c)):T({type:14,loc:g,callee:t.helper(sE),arguments:r?[c]:[c,"true"]}):t.onError(s9(b?34:35,g));continue}b&&y.some(e=>"prop"===e.content)&&(m|=32);let x=t.directiveTransforms[n];if(x){let{props:n,needRuntime:r}=x(s,e,t);l||n.forEach(w),_&&i&&!s7(i)?T(sW(n,a)):u.push(...n),r&&(p.push(s),L(r)&&ay.set(s,r))}else!q(n)&&(p.push(s),f&&(h=!0))}}if(d.length?(T(),s=d.length>1?sG(t.helper(sk),d,a):d[0]):u.length&&(s=sW(a_(u),a)),S?m|=16:(y&&!r&&(m|=2),b&&!r&&(m|=4),k.length&&(m|=8),_&&(m|=32)),!h&&(0===m||32===m)&&(g||C||p.length>0)&&(m|=512),!t.inSSR&&s)switch(s.type){case 15:let A=-1,E=-1,I=!1;for(let e=0;e<s.properties.length;e++){let t=s.properties[e].key;s7(t)?"class"===t.content?A=e:"style"===t.content&&(E=e):t.isHandlerKey||(I=!0)}let R=s.properties[A],O=s.properties[E];I?s=sG(t.helper(sw),[s]):(R&&!s7(R.value)&&(R.value=sG(t.helper(sT),[R.value])),O&&(b||4===O.value.type&&"["===O.value.content.trim()[0]||17===O.value.type)&&(O.value=sG(t.helper(sN),[O.value])));break;case 14:break;default:s=sG(t.helper(sw),[sG(t.helper(sA),[s])])}return{props:s,directives:p,patchFlag:m,dynamicPropNames:k,shouldUseBlock:h}}function a_(e){let t=new Map,n=[];for(let r=0;r<e.length;r++){let i=e[r];if(8===i.key.type||!i.key.isStatic){n.push(i);continue}let l=i.key.content,s=t.get(l);s?("style"===l||"class"===l||x(l))&&(17===s.value.type?s.value.elements.push(i.value):s.value=sq([s.value,i.value],s.loc)):(t.set(l,i),n.push(i))}return n}function aS(e){return"component"===e||"Component"===e}let ax=(e,t)=>{if(og(e)){let{children:n,loc:r}=e,{slotName:i,slotProps:l}=function(e,t){let n,r='"default"',i=[];for(let t=0;t<e.props.length;t++){let n=e.props[t];if(6===n.type)n.value&&("name"===n.name?r=JSON.stringify(n.value.content):(n.name=z(n.name),i.push(n)));else if("bind"===n.name&&op(n.arg,"name")){if(n.exp)r=n.exp;else if(n.arg&&4===n.arg.type){let e=z(n.arg.content);r=n.exp=sz(e,!1,n.arg.loc)}}else"bind"===n.name&&n.arg&&s7(n.arg)&&(n.arg.content=z(n.arg.content)),i.push(n)}if(i.length>0){let{props:r,directives:l}=ab(e,t,i,!1,!1);n=r,l.length&&t.onError(s9(36,l[0].loc))}return{slotName:r,slotProps:n}}(e,t),s=[t.prefixIdentifiers?"_ctx.$slots":"$slots",i,"{}","undefined","true"],o=2;l&&(s[2]=l,o=3),n.length&&(s[3]=sX([],n,!1,!1,r),o=4),t.scopeId&&!t.slotted&&(o=5),s.splice(o),e.codegenNode=sG(t.helper(sS),s,r)}},aC=(e,t,n,r)=>{let i;let{loc:l,modifiers:s,arg:o}=e;if(e.exp||s.length,4===o.type){if(o.isStatic){let e=o.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`),i=sz(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?Q(z(e)):`on:${e}`,!0,o.loc)}else i=sJ([`${n.helperString(sO)}(`,o,")"])}else(i=o).children.unshift(`${n.helperString(sO)}(`),i.children.push(")");let a=e.exp;a&&!a.content.trim()&&(a=void 0);let c=n.cacheHandlers&&!a&&!n.inVOnce;if(a){let e=oo(a),t=!(e||oc(a)),n=a.content.includes(";");(t||c&&e)&&(a=sJ([`${t?"$event":"(...args)"} => ${n?"{":"("}`,a,n?"}":")"]))}let u={props:[sK(i,a||sz("() => {}",!1,l))]};return r&&(u=r(u)),c&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach(e=>e.key.isHandlerKey=!0),u},ak=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{let n;let r=e.children,i=!1;for(let e=0;e<r.length;e++){let t=r[e];if(of(t)){i=!0;for(let i=e+1;i<r.length;i++){let l=r[i];if(of(l))n||(n=r[e]=sJ([t],t.loc)),n.children.push(" + ",l),r.splice(i,1),i--;else{n=void 0;break}}}}if(i&&(1!==r.length||0!==e.type&&(1!==e.type||0!==e.tagType||e.props.find(e=>7===e.type&&!t.directiveTransforms[e.name]))))for(let e=0;e<r.length;e++){let n=r[e];if(of(n)||8===n.type){let i=[];(2!==n.type||" "!==n.content)&&i.push(n),t.ssr||0!==oY(n,t)||i.push("1"),r[e]={type:12,content:n,loc:n.loc,codegenNode:sG(t.helper(sf),i)}}}}},aT=new WeakSet,aN=(e,t)=>{if(1===e.type&&ou(e,"once",!0)&&!aT.has(e)&&!t.inVOnce&&!t.inSSR)return aT.add(e),t.inVOnce=!0,t.helper(sP),()=>{t.inVOnce=!1;let e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0,!0))}},aw=(e,t,n)=>{let r;let{exp:i,arg:l}=e;if(!i)return n.onError(s9(41,e.loc)),aA();let s=i.loc.source.trim(),o=4===i.type?i.content:s,a=n.bindingMetadata[s];if("props"===a||"props-aliased"===a)return i.loc,aA();if(!o.trim()||!oo(i))return n.onError(s9(42,i.loc)),aA();let c=l||sz("modelValue",!0),u=l?s7(l)?`onUpdate:${z(l.content)}`:sJ(['"onUpdate:" + ',l]):"onUpdate:modelValue",d=n.isTS?"($event: any)":"$event";r=sJ([`${d} => ((`,i,") = $event)"]);let p=[sK(c,e.exp),sK(u,r)];if(e.modifiers.length&&1===t.tagType){let t=e.modifiers.map(e=>e.content).map(e=>(on(e)?e:JSON.stringify(e))+": true").join(", "),n=l?s7(l)?`${l.content}Modifiers`:sJ([l,' + "Modifiers"']):"modelModifiers";p.push(sK(n,sz(`{ ${t} }`,!1,e.loc,2)))}return aA(p)};function aA(e=[]){return{props:e}}let aE=new WeakSet,aI=(e,t)=>{if(1===e.type){let n=ou(e,"memo");if(!(!n||aE.has(e)))return aE.add(e),()=>{let r=e.codegenNode||t.currentNode.codegenNode;r&&13===r.type&&(1!==e.tagType&&sZ(r,t),e.codegenNode=sG(t.helper(sV),[n.exp,sX(void 0,r),"_cache",String(t.cached.length)]),t.cached.push(null))}}},aR=Symbol(""),aO=Symbol(""),aP=Symbol(""),aM=Symbol(""),aL=Symbol(""),a$=Symbol(""),aD=Symbol(""),aF=Symbol(""),aV=Symbol(""),aB=Symbol("");!function(e){Object.getOwnPropertySymbols(e).forEach(t=>{sU[t]=e[t]})}({[aR]:"vModelRadio",[aO]:"vModelCheckbox",[aP]:"vModelText",[aM]:"vModelSelect",[aL]:"vModelDynamic",[a$]:"withModifiers",[aD]:"withKeys",[aF]:"vShow",[aV]:"Transition",[aB]:"TransitionGroup"});let aU={parseMode:"html",isVoidTag:eh,isNativeTag:e=>ed(e)||ep(e)||ef(e),isPreTag:e=>"pre"===e,isIgnoreNewlineTag:e=>"pre"===e||"textarea"===e,decodeEntities:function(e,t=!1){return(f||(f=document.createElement("div")),t)?(f.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,f.children[0].getAttribute("foo")):(f.innerHTML=e,f.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?aV:"TransitionGroup"===e||"transition-group"===e?aB:void 0,getNamespace(e,t,n){let r=t?t.ns:n;if(t&&2===r){if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some(e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content))&&(r=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(r=0)}else t&&1===r&&("foreignObject"===t.tag||"desc"===t.tag||"title"===t.tag)&&(r=0);if(0===r){if("svg"===e)return 1;if("math"===e)return 2}return r}},aj=(e,t)=>sz(JSON.stringify(ec(e)),!1,t,3),aH=g("passive,once,capture"),aq=g("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),aW=g("left,right"),aK=g("onkeyup,onkeydown,onkeypress"),az=(e,t,n,r)=>{let i=[],l=[],s=[];for(let n=0;n<t.length;n++){let r=t[n].content;aH(r)?s.push(r):aW(r)?s7(e)?aK(e.content.toLowerCase())?i.push(r):l.push(r):(i.push(r),l.push(r)):aq(r)?l.push(r):i.push(r)}return{keyModifiers:i,nonKeyModifiers:l,eventOptionModifiers:s}},aJ=(e,t)=>s7(e)&&"onclick"===e.content.toLowerCase()?sz(t,!0):4!==e.type?sJ(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,aG=(e,t)=>{1===e.type&&0===e.tagType&&("script"===e.tag||"style"===e.tag)&&t.removeNode()},aX=[e=>{1===e.type&&e.props.forEach((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:sz("style",!0,t.loc),exp:aj(t.value.content,t.loc),modifiers:[],loc:t.loc})})}],aQ={cloak:()=>({props:[]}),html:(e,t,n)=>{let{exp:r,loc:i}=e;return r||n.onError(s9(53,i)),t.children.length&&(n.onError(s9(54,i)),t.children.length=0),{props:[sK(sz("innerHTML",!0,i),r||sz("",!0))]}},text:(e,t,n)=>{let{exp:r,loc:i}=e;return r||n.onError(s9(55,i)),t.children.length&&(n.onError(s9(56,i)),t.children.length=0),{props:[sK(sz("textContent",!0),r?oY(r,n)>0?r:sG(n.helperString(sC),[r],i):sz("",!0))]}},model:(e,t,n)=>{let r=aw(e,t,n);if(!r.props.length||1===t.tagType)return r;e.arg&&n.onError(s9(58,e.arg.loc));let{tag:i}=t,l=n.isCustomElement(i);if("input"===i||"textarea"===i||"select"===i||l){let s=aP,o=!1;if("input"===i||l){let r=od(t,"type");if(r){if(7===r.type)s=aL;else if(r.value)switch(r.value.content){case"radio":s=aR;break;case"checkbox":s=aO;break;case"file":o=!0,n.onError(s9(59,e.loc))}}else t.props.some(e=>7===e.type&&"bind"===e.name&&(!e.arg||4!==e.arg.type||!e.arg.isStatic))&&(s=aL)}else"select"===i&&(s=aM);o||(r.needRuntime=n.helper(s))}else n.onError(s9(57,e.loc));return r.props=r.props.filter(e=>!(4===e.key.type&&"modelValue"===e.key.content)),r},on:(e,t,n)=>aC(e,t,n,t=>{let{modifiers:r}=e;if(!r.length)return t;let{key:i,value:l}=t.props[0],{keyModifiers:s,nonKeyModifiers:o,eventOptionModifiers:a}=az(i,r,n,e.loc);if(o.includes("right")&&(i=aJ(i,"onContextmenu")),o.includes("middle")&&(i=aJ(i,"onMouseup")),o.length&&(l=sG(n.helper(a$),[l,JSON.stringify(o)])),s.length&&(!s7(i)||aK(i.content.toLowerCase()))&&(l=sG(n.helper(aD),[l,JSON.stringify(s)])),a.length){let e=a.map(X).join("");i=s7(i)?sz(`${i.content}${e}`,!0):sJ(["(",i,`) + "${e}"`])}return{props:[sK(i,l)]}}),show:(e,t,n)=>{let{exp:r,loc:i}=e;return!r&&n.onError(s9(61,i)),{props:[],needRuntime:n.helper(aF)}}},aZ=Object.create(null);function aY(e,t){if(!M(e)){if(!e.nodeType)return _;e=e.innerHTML}let n=e+JSON.stringify(t,(e,t)=>"function"==typeof t?t.toString():t),r=aZ[n];if(r)return r;if("#"===e[0]){let t=document.querySelector(e);e=t?t.innerHTML:""}let i=k({hoistStatic:!0,onError:void 0,onWarn:_},t);i.isCustomElement||"undefined"==typeof customElements||(i.isCustomElement=e=>!!customElements.get(e));let{code:l}=function(e,t={}){return function(e,t={}){let n=t.onError||s8,r="module"===t.mode;!0===t.prefixIdentifiers?n(s9(47)):r&&n(s9(48)),t.cacheHandlers&&n(s9(49)),t.scopeId&&!r&&n(s9(50));let i=k({},t,{prefixIdentifiers:!1}),l=M(e)?function(e,t){if(oL.reset(),oN=null,ow=null,oA="",oE=-1,oI=-1,oM.length=0,oT=e,oC=k({},ox),t){let e;for(e in t)null!=t[e]&&(oC[e]=t[e])}oL.mode="html"===oC.parseMode?1:"sfc"===oC.parseMode?2:0,oL.inXML=1===oC.ns||2===oC.ns;let n=t&&t.delimiters;n&&(oL.delimiterOpen=s6(n[0]),oL.delimiterClose=s6(n[1]));let r=ok=function(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:sj}}([],e);return oL.parse(oT),r.loc=oJ(0,e.length),r.children=oW(r.children),ok=null,r}(e,i):e,[s,o]=[[aN,ar,aI,au,ax,av,ah,ak],{on:aC,bind:ao,model:aw}];return!function(e,t){let n=function(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:r=!1,hmr:i=!1,cacheHandlers:l=!1,nodeTransforms:s=[],directiveTransforms:o={},transformHoist:a=null,isBuiltInComponent:c=_,isCustomElement:u=_,expressionPlugins:d=[],scopeId:p=null,slotted:f=!0,ssr:h=!1,inSSR:m=!1,ssrCssVars:g="",bindingMetadata:b=y,inline:S=!1,isTS:x=!1,onError:C=s8,onWarn:k=s5,compatConfig:T}){let N=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),w={filename:t,selfName:N&&X(z(N[1])),prefixIdentifiers:n,hoistStatic:r,hmr:i,cacheHandlers:l,nodeTransforms:s,directiveTransforms:o,transformHoist:a,isBuiltInComponent:c,isCustomElement:u,expressionPlugins:d,scopeId:p,slotted:f,ssr:h,inSSR:m,ssrCssVars:g,bindingMetadata:b,inline:S,isTS:x,onError:C,onWarn:k,compatConfig:T,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){let t=w.helpers.get(e)||0;return w.helpers.set(e,t+1),e},removeHelper(e){let t=w.helpers.get(e);if(t){let n=t-1;n?w.helpers.set(e,n):w.helpers.delete(e)}},helperString:e=>`_${sU[w.helper(e)]}`,replaceNode(e){w.parent.children[w.childIndex]=w.currentNode=e},removeNode(e){let t=w.parent.children,n=e?t.indexOf(e):w.currentNode?w.childIndex:-1;e&&e!==w.currentNode?w.childIndex>n&&(w.childIndex--,w.onNodeRemoved()):(w.currentNode=null,w.onNodeRemoved()),w.parent.children.splice(n,1)},onNodeRemoved:_,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){M(e)&&(e=sz(e)),w.hoists.push(e);let t=sz(`_hoisted_${w.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1,n=!1){let r=function(e,t,n=!1,r=!1){return{type:20,index:e,value:t,needPauseTracking:n,inVOnce:r,needArraySpread:!1,loc:sj}}(w.cached.length,e,t,n);return w.cached.push(r),r}};return w}(e,t);o3(e,n),t.hoistStatic&&function e(t,n,r,i=!1,l=!1){let{children:s}=t,o=[];for(let n=0;n<s.length;n++){let a=s[n];if(1===a.type&&0===a.tagType){let e=i?0:oY(a,r);if(e>0){if(e>=2){a.codegenNode.patchFlag=-1,o.push(a);continue}}else{let e=a.codegenNode;if(13===e.type){let t=e.patchFlag;if((void 0===t||512===t||1===t)&&o1(a,r)>=2){let t=o2(a);t&&(e.props=r.hoist(t))}e.dynamicProps&&(e.dynamicProps=r.hoist(e.dynamicProps))}}}else if(12===a.type&&(i?0:oY(a,r))>=2){o.push(a);continue}if(1===a.type){let n=1===a.tagType;n&&r.scopes.vSlot++,e(a,t,r,!1,l),n&&r.scopes.vSlot--}else if(11===a.type)e(a,t,r,1===a.children.length,!0);else if(9===a.type)for(let n=0;n<a.branches.length;n++)e(a.branches[n],t,r,1===a.branches[n].children.length,l)}let a=!1;if(o.length===s.length&&1===t.type){if(0===t.tagType&&t.codegenNode&&13===t.codegenNode.type&&A(t.codegenNode.children))t.codegenNode.children=c(sq(t.codegenNode.children)),a=!0;else if(1===t.tagType&&t.codegenNode&&13===t.codegenNode.type&&t.codegenNode.children&&!A(t.codegenNode.children)&&15===t.codegenNode.children.type){let e=u(t.codegenNode,"default");e&&(e.returns=c(sq(e.returns)),a=!0)}else if(3===t.tagType&&n&&1===n.type&&1===n.tagType&&n.codegenNode&&13===n.codegenNode.type&&n.codegenNode.children&&!A(n.codegenNode.children)&&15===n.codegenNode.children.type){let e=ou(t,"slot",!0),r=e&&e.arg&&u(n.codegenNode,e.arg);r&&(r.returns=c(sq(r.returns)),a=!0)}}if(!a)for(let e of o)e.codegenNode=r.cache(e.codegenNode);function c(e){let t=r.cache(e);return l&&r.hmr&&(t.needArraySpread=!0),t}function u(e,t){if(e.children&&!A(e.children)&&15===e.children.type){let n=e.children.properties.find(e=>e.key===t||e.key.content===t);return n&&n.value}}o.length&&r.transformHoist&&r.transformHoist(s,r,t)}(e,void 0,n,oZ(e,e.children[0])),t.ssr||function(e,t){let{helper:n}=t,{children:r}=e;if(1===r.length){let n=r[0];if(oZ(e,n)&&n.codegenNode){let r=n.codegenNode;13===r.type&&sZ(r,t),e.codegenNode=r}else e.codegenNode=n}else r.length>1&&(e.codegenNode=sH(t,n(sn),void 0,e.children,64,void 0,void 0,!0,void 0,!1))}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0}(l,k({},i,{nodeTransforms:[...s,...t.nodeTransforms||[]],directiveTransforms:k({},o,t.directiveTransforms||{})})),function(e,t={}){let n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:r=!1,filename:i="template.vue.html",scopeId:l=null,optimizeImports:s=!1,runtimeGlobalName:o="Vue",runtimeModuleName:a="vue",ssrRuntimeModuleName:c="vue/server-renderer",ssr:u=!1,isTS:d=!1,inSSR:p=!1}){let f={mode:t,prefixIdentifiers:n,sourceMap:r,filename:i,scopeId:l,optimizeImports:s,runtimeGlobalName:o,runtimeModuleName:a,ssrRuntimeModuleName:c,ssr:u,isTS:d,inSSR:p,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${sU[e]}`,push(e,t=-2,n){f.code+=e},indent(){h(++f.indentLevel)},deindent(e=!1){e?--f.indentLevel:h(--f.indentLevel)},newline(){h(f.indentLevel)}};function h(e){f.push("\n"+" ".repeat(e),0)}return f}(e,t);t.onContextCreated&&t.onContextCreated(n);let{mode:r,push:i,prefixIdentifiers:l,indent:s,deindent:o,newline:a,scopeId:c,ssr:u}=n,d=Array.from(e.helpers),p=d.length>0,f=!l&&"module"!==r;(function(e,t){let{ssr:n,prefixIdentifiers:r,push:i,newline:l,runtimeModuleName:s,runtimeGlobalName:o,ssrRuntimeModuleName:a}=t,c=Array.from(e.helpers);if(c.length>0&&(i(`const _Vue = ${o} +`,-1),e.hoists.length)){let e=[su,sd,sp,sf,sh].filter(e=>c.includes(e)).map(o8).join(", ");i(`const { ${e} } = _Vue +`,-1)}(function(e,t){if(!e.length)return;t.pure=!0;let{push:n,newline:r}=t;r();for(let i=0;i<e.length;i++){let l=e[i];l&&(n(`const _hoisted_${i+1} = `),ae(l,t),r())}t.pure=!1})(e.hoists,t),l(),i("return ")})(e,n);let h=(u?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(i(`function ${u?"ssrRender":"render"}(${h}) {`),s(),f&&(i("with (_ctx) {"),s(),p&&(i(`const { ${d.map(o8).join(", ")} } = _Vue +`,-1),a())),e.components.length&&(o5(e.components,"component",n),(e.directives.length||e.temps>0)&&a()),e.directives.length&&(o5(e.directives,"directive",n),e.temps>0&&a()),e.temps>0){i("let ");for(let t=0;t<e.temps;t++)i(`${t>0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(i(` +`,0),a()),u||i("return "),e.codegenNode?ae(e.codegenNode,n):i("null"),f&&(o(),i("}")),o(),i("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}(l,i)}(e,k({},aU,t,{nodeTransforms:[aG,...aX,...t.nodeTransforms||[]],directiveTransforms:k({},aQ,t.directiveTransforms||{}),transformHoist:null}))}(e,i),s=Function(l)();return s._rc=!0,aZ[n]=s}return iU(aY),e.BaseTransition=n_,e.BaseTransitionPropsValidators=ny,e.Comment=io,e.DeprecationTypes=null,e.EffectScope=ex,e.ErrorCodes={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},e.ErrorTypeStrings=null,e.Fragment=il,e.KeepAlive={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=iL(),r=n.ctx,i=new Map,l=new Set,s=null,o=n.suspense,{renderer:{p:a,m:c,um:u,o:{createElement:d}}}=r,p=d("div");function f(e){nG(e),u(e,n,o,!0)}function h(e){i.forEach((t,n)=>{let r=iK(t.type);r&&!e(r)&&m(n)})}function m(e){let t=i.get(e);!t||s&&ib(t,s)?s&&nG(s):f(t),i.delete(e),l.delete(e)}r.activate=(e,t,n,r,i)=>{let l=e.component;c(e,t,n,0,o),a(l.vnode,e,t,n,l,o,r,e.slotScopeIds,i),rB(()=>{l.isDeactivated=!1,l.a&&Y(l.a);let t=e.props&&e.props.onVnodeMounted;t&&iR(t,l.parent,e)},o)},r.deactivate=e=>{let t=e.component;rz(t.m),rz(t.a),c(e,p,null,1,o),rB(()=>{t.da&&Y(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&iR(n,t.parent,e),t.isDeactivated=!0},o)},rX(()=>[e.include,e.exclude],([e,t])=>{e&&h(t=>nW(e,t)),t&&h(e=>!nW(t,e))},{flush:"post",deep:!0});let g=null,y=()=>{null!=g&&(r5(n.subTree.type)?rB(()=>{i.set(g,nX(n.subTree))},n.subTree.suspense):i.set(g,nX(n.subTree)))};return n0(y),n2(y),n3(()=>{i.forEach(e=>{let{subTree:t,suspense:r}=n,i=nX(t);if(e.type===i.type&&e.key===i.key){nG(i);let e=i.component.da;e&&rB(e,r);return}f(e)})}),()=>{if(g=null,!t.default)return s=null;let n=t.default(),r=n[0];if(n.length>1)return s=null,n;if(!iv(r)||!(4&r.shapeFlag)&&!(128&r.shapeFlag))return s=null,r;let o=nX(r);if(o.type===io)return s=null,o;let a=o.type,c=iK(nj(o)?o.type.__asyncResolved||{}:a),{include:u,exclude:d,max:p}=e;if(u&&(!c||!nW(u,c))||d&&c&&nW(d,c))return o.shapeFlag&=-257,s=o,r;let f=null==o.key?a:o.key,h=i.get(f);return o.el&&(o=iT(o),128&r.shapeFlag&&(r.ssContent=o)),g=f,h?(o.el=h.el,o.component=h.component,o.transition&&nT(o,o.transition),o.shapeFlag|=512,l.delete(f),l.add(f)):(l.add(f),p&&l.size>parseInt(p,10)&&m(l.values().next().value)),o.shapeFlag|=256,s=o,r5(r.type)?r:o}}},e.ReactiveEffect=ek,e.Static=ia,e.Suspense={name:"Suspense",__isSuspense:!0,process(e,t,n,r,i,l,s,o,a,c){if(null==e)(function(e,t,n,r,i,l,s,o,a){let{p:c,o:{createElement:u}}=a,d=u("div"),p=e.suspense=ie(e,i,r,t,d,n,l,s,o,a);c(null,p.pendingBranch=e.ssContent,d,null,r,p,l,s),p.deps>0?(r7(e,"onPending"),r7(e,"onFallback"),c(null,e.ssFallback,t,n,r,null,l,s),ii(p,e.ssFallback)):p.resolve(!1,!0)})(t,n,r,i,l,s,o,a,c);else{if(l&&l.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}(function(e,t,n,r,i,l,s,o,{p:a,um:c,o:{createElement:u}}){let d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;let p=t.ssContent,f=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:g,isHydrating:y}=d;if(m)d.pendingBranch=p,ib(p,m)?(a(m,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0?d.resolve():g&&!y&&(a(h,f,n,r,i,null,l,s,o),ii(d,f))):(d.pendingId=r9++,y?(d.isHydrating=!1,d.activeBranch=m):c(m,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),g?(a(null,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0?d.resolve():(a(h,f,n,r,i,null,l,s,o),ii(d,f))):h&&ib(p,h)?(a(h,p,n,r,i,d,l,s,o),d.resolve(!0)):(a(null,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0&&d.resolve()));else if(h&&ib(p,h))a(h,p,n,r,i,d,l,s,o),ii(d,p);else if(r7(t,"onPending"),d.pendingBranch=p,512&p.shapeFlag?d.pendingId=p.component.suspenseId:d.pendingId=r9++,a(null,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0)d.resolve();else{let{timeout:e,pendingId:t}=d;e>0?setTimeout(()=>{d.pendingId===t&&d.fallback(f)},e):0===e&&d.fallback(f)}})(e,t,n,r,i,s,o,a,c)}},hydrate:function(e,t,n,r,i,l,s,o,a){let c=t.suspense=ie(t,r,n,e.parentNode,document.createElement("div"),null,i,l,s,o,!0),u=a(e,c.pendingBranch=t.ssContent,n,c,l,s);return 0===c.deps&&c.resolve(!1,!0),u},normalize:function(e){let{shapeFlag:t,children:n}=e,r=32&t;e.ssContent=it(r?n.default:n),e.ssFallback=r?it(n.fallback):iC(io)}},e.Teleport=nc,e.Text=is,e.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},e.Transition=i8,e.TransitionGroup=lF,e.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},e.VueElement=lO,e.assertNumber=function(e,t){},e.callWithAsyncErrorHandling=tW,e.callWithErrorHandling=tq,e.camelize=z,e.capitalize=X,e.cloneVNode=iT,e.compatUtils=null,e.compile=aY,e.computed=iz,e.createApp=l9,e.createBlock=iy,e.createCommentVNode=function(e="",t=!1){return t?(id(),iy(io,null,e)):iC(io,null,e)},e.createElementBlock=function(e,t,n,r,i,l){return ig(ix(e,t,n,r,i,l,!0))},e.createElementVNode=ix,e.createHydrationRenderer=rU,e.createPropsRestProxy=function(e,t){let n={};for(let r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n},e.createRenderer=function(e){return rj(e)},e.createSSRApp=l7,e.createSlots=function(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(A(r))for(let t=0;t<r.length;t++)e[r[t].name]=r[t].fn;else r&&(e[r.name]=r.key?(...e)=>{let t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e},e.createStaticVNode=function(e,t){let n=iC(ia,null,e);return n.staticCount=t,n},e.createTextVNode=iN,e.createVNode=iC,e.customRef=tL,e.defineAsyncComponent=function(e){let t;P(e)&&(e={loader:e});let{loader:n,loadingComponent:r,errorComponent:i,delay:l=200,hydrate:s,timeout:o,suspensible:a=!0,onError:c}=e,u=null,d=0,p=()=>(d++,u=null,f()),f=()=>{let e;return u||(e=u=n().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(p()),()=>n(e),d+1)});throw e}).then(n=>e!==u&&u?u:(n&&(n.__esModule||"Module"===n[Symbol.toStringTag])&&(n=n.default),t=n,n)))};return nw({name:"AsyncComponentWrapper",__asyncLoader:f,__asyncHydrate(e,n,r){let i=s?()=>{let t=s(r,t=>(function(e,t){if(nL(e)&&"["===e.data){let n=1,r=e.nextSibling;for(;r;){if(1===r.nodeType){if(!1===t(r))break}else if(nL(r)){if("]"===r.data){if(0==--n)break}else"["===r.data&&n++}r=r.nextSibling}}else t(e)})(e,t));t&&(n.bum||(n.bum=[])).push(t)}:r;t?i():f().then(()=>!n.isUnmounted&&i())},get __asyncResolved(){return t},setup(){let e=iM;if(nA(e),t)return()=>nH(t,e);let n=t=>{u=null,tK(t,e,13,!i)};if(a&&e.suspense)return f().then(t=>()=>nH(t,e)).catch(e=>(n(e),()=>i?iC(i,{error:e}):null));let s=tw(!1),c=tw(),d=tw(!!l);return l&&setTimeout(()=>{d.value=!1},l),null!=o&&setTimeout(()=>{if(!s.value&&!c.value){let e=Error(`Async component timed out after ${o}ms.`);n(e),c.value=e}},o),f().then(()=>{s.value=!0,e.parent&&nq(e.parent.vnode)&&e.parent.update()}).catch(e=>{n(e),c.value=e}),()=>s.value&&t?nH(t,e):c.value&&i?iC(i,{error:c.value}):r&&!d.value?iC(r):void 0}})},e.defineComponent=nw,e.defineCustomElement=lI,e.defineEmits=function(){return null},e.defineExpose=function(e){},e.defineModel=function(){},e.defineOptions=function(e){},e.defineProps=function(){return null},e.defineSSRCustomElement=(e,t)=>lI(e,t,l7),e.defineSlots=function(){return null},e.devtools=void 0,e.effect=function(e,t){e.effect instanceof ek&&(e=e.effect.fn);let n=new ek(e);t&&k(n,t);try{n.run()}catch(e){throw n.stop(),e}let r=n.run.bind(n);return r.effect=n,r},e.effectScope=function(e){return new ex(e)},e.getCurrentInstance=iL,e.getCurrentScope=function(){return i},e.getCurrentWatcher=function(){return h},e.getTransitionRawChildren=nN,e.guardReactiveProps=ik,e.h=iJ,e.handleError=tK,e.hasInjectionContext=function(){return!!(iM||t5||rx)},e.hydrate=(...e)=>{l8().hydrate(...e)},e.hydrateOnIdle=(e=1e4)=>t=>{let n=nB(t,{timeout:e});return()=>nU(n)},e.hydrateOnInteraction=(e=[])=>(t,n)=>{M(e)&&(e=[e]);let r=!1,i=e=>{r||(r=!0,l(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},l=()=>{n(t=>{for(let n of e)t.removeEventListener(n,i)})};return n(t=>{for(let n of e)t.addEventListener(n,i,{once:!0})}),l},e.hydrateOnMediaQuery=e=>t=>{if(e){let n=matchMedia(e);if(!n.matches)return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t);t()}},e.hydrateOnVisible=e=>(t,n)=>{let r=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(function(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:l,innerWidth:s}=window;return(t>0&&t<l||r>0&&r<l)&&(n>0&&n<s||i>0&&i<s)}(e))return t(),r.disconnect(),!1;r.observe(e)}}),()=>r.disconnect()},e.initCustomFormatter=function(){},e.initDirectivesForSSR=_,e.inject=rk,e.isMemoSame=iG,e.isProxy=tS,e.isReactive=tv,e.isReadonly=tb,e.isRef=tN,e.isRuntimeOnly=()=>!u,e.isShallow=t_,e.isVNode=iv,e.markRaw=tC,e.mergeDefaults=function(e,t){let n=rc(e);for(let e in t){if(e.startsWith("__skip"))continue;let r=n[e];r?A(r)||P(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:null===r&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n},e.mergeModels=function(e,t){return e&&t?A(e)&&A(t)?e.concat(t):k({},rc(e),rc(t)):e||t},e.mergeProps=iI,e.nextTick=t0,e.normalizeClass=eu,e.normalizeProps=function(e){if(!e)return null;let{class:t,style:n}=e;return t&&!M(t)&&(e.class=eu(t)),n&&(e.style=el(n)),e},e.normalizeStyle=el,e.onActivated=nK,e.onBeforeMount=nY,e.onBeforeUnmount=n3,e.onBeforeUpdate=n1,e.onDeactivated=nz,e.onErrorCaptured=n9,e.onMounted=n0,e.onRenderTracked=n5,e.onRenderTriggered=n8,e.onScopeDispose=function(e,t=!1){i&&i.cleanups.push(e)},e.onServerPrefetch=n4,e.onUnmounted=n6,e.onUpdated=n2,e.onWatcherCleanup=tj,e.openBlock=id,e.popScopeId=function(){t9=null},e.provide=rC,e.proxyRefs=tP,e.pushScopeId=function(e){t9=e},e.queuePostFlushCb=t3,e.reactive=th,e.readonly=tg,e.ref=tw,e.registerRuntimeCompiler=iU,e.render=l5,e.renderList=function(e,t,n,r){let i;let l=n&&n[r],s=A(e);if(s||M(e)){let n=s&&tv(e),r=!1;n&&(r=!t_(e),e=eJ(e)),i=Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=t(r?tk(e[n]):e[n],n,void 0,l&&l[n])}else if("number"==typeof e){i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,l&&l[n])}else if($(e)){if(e[Symbol.iterator])i=Array.from(e,(e,n)=>t(e,n,void 0,l&&l[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,s=n.length;r<s;r++){let s=n[r];i[r]=t(e[s],s,r,l&&l[r])}}}else i=[];return n&&(n[r]=i),i},e.renderSlot=function(e,t,n={},r,i){if(t5.ce||t5.parent&&nj(t5.parent)&&t5.parent.ce)return"default"!==t&&(n.name=t),id(),iy(il,null,[iC("slot",n,r&&r())],64);let l=e[t];l&&l._c&&(l._d=!1),id();let s=l&&function e(t){return t.some(t=>!iv(t)||!!(t.type!==io&&(t.type!==il||e(t.children))))?t:null}(l(n)),o=n.key||s&&s.key,a=iy(il,{key:(o&&!L(o)?o:`_${t}`)+(!s&&r?"_fb":"")},s||(r?r():[]),s&&1===e._?64:-2);return!i&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),l&&l._c&&(l._d=!0),a},e.resolveComponent=function(e,t){return rt(n7,e,!0,t)||e},e.resolveDirective=function(e){return rt("directives",e)},e.resolveDynamicComponent=function(e){return M(e)?rt(n7,e,!1)||e:e||re},e.resolveFilter=null,e.resolveTransitionHooks=nx,e.setBlockTracking=im,e.setDevtoolsHook=_,e.setTransitionHooks=nT,e.shallowReactive=tm,e.shallowReadonly=function(e){return ty(e,!0,tt,tc,tf)},e.shallowRef=tA,e.ssrContextKey=rJ,e.ssrUtils=null,e.stop=function(e){e.effect.stop()},e.toDisplayString=eb,e.toHandlerKey=Q,e.toHandlers=function(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:Q(r)]=e[r];return n},e.toRaw=tx,e.toRef=function(e,t,n){return tN(e)?e:P(e)?new tD(e):$(e)&&arguments.length>1?tF(e,t,n):tw(e)},e.toRefs=function(e){let t=A(e)?Array(e.length):{};for(let n in e)t[n]=tF(e,n);return t},e.toValue=function(e){return P(e)?e():tR(e)},e.transformVNodeArgs=function(e){},e.triggerRef=function(e){e.dep&&e.dep.trigger()},e.unref=tR,e.useAttrs=function(){return ra().attrs},e.useCssModule=function(e="$style"){return y},e.useCssVars=function(e){let t=iL();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>lf(e,n))},r=()=>{let r=e(t.proxy);t.ce?lf(t.ce,r):function e(t,n){if(128&t.shapeFlag){let r=t.suspense;t=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{e(r.activeBranch,n)})}for(;t.component;)t=t.component.subTree;if(1&t.shapeFlag&&t.el)lf(t.el,n);else if(t.type===il)t.children.forEach(t=>e(t,n));else if(t.type===ia){let{el:e,anchor:r}=t;for(;e&&(lf(e,n),e!==r);)e=e.nextSibling}}(t.subTree,r),n(r)};n1(()=>{t3(r)}),n0(()=>{rX(r,_,{flush:"post"});let e=new MutationObserver(r);e.observe(t.subTree.el.parentNode,{childList:!0}),n6(()=>e.disconnect())})},e.useHost=lP,e.useId=function(){let e=iL();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""},e.useModel=function(e,t,n=y){let r=iL(),i=z(t),l=G(t),s=rY(e,i),o=tL((s,o)=>{let a,c;let u=y;return rG(()=>{let t=e[i];Z(a,t)&&(a=t,o())}),{get:()=>(s(),n.get?n.get(a):a),set(e){let s=n.set?n.set(e):e;if(!Z(s,a)&&!(u!==y&&Z(e,u)))return;let d=r.vnode.props;d&&(t in d||i in d||l in d)&&(`onUpdate:${t}`in d||`onUpdate:${i}`in d||`onUpdate:${l}`in d)||(a=e,o()),r.emit(`update:${t}`,s),Z(e,s)&&Z(e,u)&&!Z(s,c)&&o(),u=e,c=s}}});return o[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?s||y:o,done:!1}:{done:!0}}},o},e.useSSRContext=()=>{},e.useShadowRoot=function(){let e=lP();return e&&e.shadowRoot},e.useSlots=function(){return ra().slots},e.useTemplateRef=function(e){let t=iL(),n=tA(null);return t&&Object.defineProperty(t.refs===y?t.refs={}:t.refs,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e}),n},e.useTransitionState=nm,e.vModelCheckbox=lz,e.vModelDynamic={created(e,t,n){l0(e,t,n,null,"created")},mounted(e,t,n){l0(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){l0(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){l0(e,t,n,r,"updated")}},e.vModelRadio=lG,e.vModelSelect=lX,e.vModelText=lK,e.vShow={beforeMount(e,{value:t},{transition:n}){e[lc]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):ld(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),ld(e,!0),r.enter(e)):r.leave(e,()=>{ld(e,!1)}):ld(e,t))},beforeUnmount(e,{value:t}){ld(e,t)}},e.version=iX,e.warn=_,e.watch=function(e,t,n){return rX(e,t,n)},e.watchEffect=function(e,t){return rX(e,null,t)},e.watchPostEffect=function(e,t){return rX(e,null,{flush:"post"})},e.watchSyncEffect=rG,e.withAsyncContext=function(e){let t=iL(),n=e();return iD(),D(n)&&(n=n.catch(e=>{throw i$(t),e})),[n,()=>i$(t)]},e.withCtx=ne,e.withDefaults=function(e,t){return null},e.withDirectives=function(e,t){if(null===t5)return e;let n=iW(t5),r=e.dirs||(e.dirs=[]);for(let e=0;e<t.length;e++){let[i,l,s,o=y]=t[e];i&&(P(i)&&(i={mounted:i,updated:i}),i.deep&&tH(l),r.push({dir:i,instance:n,value:l,oldValue:void 0,arg:s,modifiers:o}))}return e},e.withKeys=(e,t)=>{let n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=n=>{if(!("key"in n))return;let r=G(n.key);if(t.some(e=>e===r||l3[e]===r))return e(n)})},e.withMemo=function(e,t,n,r){let i=n[r];if(i&&iG(i,e))return i;let l=t();return l.memo=e.slice(),l.cacheIndex=r,n[r]=l},e.withModifiers=(e,t)=>{let n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(n,...r)=>{for(let e=0;e<t.length;e++){let r=l2[t[e]];if(r&&r(n,t))return}return e(n,...r)})},e.withScopeId=e=>ne,e}({}); diff --git a/vuetest/node_modules/vue/dist/vue.runtime.esm-browser.js b/vuetest/node_modules/vue/dist/vue.runtime.esm-browser.js new file mode 100644 index 0000000..3f20d56 --- /dev/null +++ b/vuetest/node_modules/vue/dist/vue.runtime.esm-browser.js @@ -0,0 +1,12355 @@ +/** +* vue v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function makeMap(str) { + const map = /* @__PURE__ */ Object.create(null); + for (const key of str.split(",")) map[key] = 1; + return (val) => val in map; +} + +const EMPTY_OBJ = Object.freeze({}) ; +const EMPTY_ARR = Object.freeze([]) ; +const NOOP = () => { +}; +const NO = () => false; +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +const isModelListener = (key) => key.startsWith("onUpdate:"); +const extend = Object.assign; +const remove = (arr, el) => { + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } +}; +const hasOwnProperty$1 = Object.prototype.hasOwnProperty; +const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); +const isArray = Array.isArray; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isDate = (val) => toTypeString(val) === "[object Date]"; +const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; +const isFunction = (val) => typeof val === "function"; +const isString = (val) => typeof val === "string"; +const isSymbol = (val) => typeof val === "symbol"; +const isObject = (val) => val !== null && typeof val === "object"; +const isPromise = (val) => { + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); +}; +const objectToString = Object.prototype.toString; +const toTypeString = (value) => objectToString.call(value); +const toRawType = (value) => { + return toTypeString(value).slice(8, -1); +}; +const isPlainObject = (val) => toTypeString(val) === "[object Object]"; +const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); +const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +}; +const camelizeRE = /-(\w)/g; +const camelize = cacheStringFunction( + (str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); + } +); +const hyphenateRE = /\B([A-Z])/g; +const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() +); +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const toHandlerKey = cacheStringFunction( + (str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + } +); +const hasChanged = (value, oldValue) => !Object.is(value, oldValue); +const invokeArrayFns = (fns, ...arg) => { + for (let i = 0; i < fns.length; i++) { + fns[i](...arg); + } +}; +const def = (obj, key, value, writable = false) => { + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + writable, + value + }); +}; +const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; +}; +const toNumber = (val) => { + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; +}; +let _globalThis; +const getGlobalThis = () => { + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); +}; + +const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; +const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); + +function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } +} +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:([^]+)/; +const styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function stringifyStyle(styles) { + if (!styles) return ""; + if (isString(styles)) return styles; + let ret = ""; + for (const key in styles) { + const value = styles[key]; + if (isString(value) || typeof value === "number") { + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + ret += `${normalizedKey}:${value};`; + } + } + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} +function normalizeProps(props) { + if (!props) return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; +} + +const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); +const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); +const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); + +const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); +const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` +); +function includeBooleanAttr(value) { + return !!value || value === ""; +} +const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` +); +const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` +); +function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; +} + +const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; +function getEscapedCssVarName(key, doubleEscape) { + return key.replace( + cssVarNameEscapeSymbolsRE, + (s) => `\\${s}` + ); +} + +function looseCompareArrays(a, b) { + if (a.length !== b.length) return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; +} +function looseEqual(a, b) { + if (a === b) return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); +} +function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); +} + +const isRef$1 = (val) => { + return !!(val && val["__v_isRef"] === true); +}; +const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); +}; +const replacer = (_key, val) => { + if (isRef$1(val)) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; +}; +const stringifySymbol = (v, i = "") => { + var _a; + return ( + // Symbol.description in es2019+ so we need to cast here to pass + // the lib: es2016 check + isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v + ); +}; + +function warn$2(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); +} + +let activeEffectScope; +class EffectScope { + constructor(detached = false) { + this.detached = detached; + /** + * @internal + */ + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this._isPaused = false; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + pause() { + if (this._active) { + this._isPaused = true; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].pause(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].pause(); + } + } + } + /** + * Resumes the effect scope, including all child scopes and effects. + */ + resume() { + if (this._active) { + if (this._isPaused) { + this._isPaused = false; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].resume(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].resume(); + } + } + } + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { + activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn$2(`cannot run an inactive effect scope.`); + } + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + this._active = false; + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + this.effects.length = 0; + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + this.cleanups.length = 0; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); + } + this.scopes.length = 0; + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + } + } +} +function effectScope(detached) { + return new EffectScope(detached); +} +function getCurrentScope() { + return activeEffectScope; +} +function onScopeDispose(fn, failSilently = false) { + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else if (!failSilently) { + warn$2( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } +} + +let activeSub; +const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); +class ReactiveEffect { + constructor(fn) { + this.fn = fn; + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 1 | 4; + /** + * @internal + */ + this.next = void 0; + /** + * @internal + */ + this.cleanup = void 0; + this.scheduler = void 0; + if (activeEffectScope && activeEffectScope.active) { + activeEffectScope.effects.push(this); + } + } + pause() { + this.flags |= 64; + } + resume() { + if (this.flags & 64) { + this.flags &= ~64; + if (pausedQueueEffects.has(this)) { + pausedQueueEffects.delete(this); + this.trigger(); + } + } + } + /** + * @internal + */ + notify() { + if (this.flags & 2 && !(this.flags & 32)) { + return; + } + if (!(this.flags & 8)) { + batch(this); + } + } + run() { + if (!(this.flags & 1)) { + return this.fn(); + } + this.flags |= 2; + cleanupEffect(this); + prepareDeps(this); + const prevEffect = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = this; + shouldTrack = true; + try { + return this.fn(); + } finally { + if (activeSub !== this) { + warn$2( + "Active effect was not restored correctly - this is likely a Vue internal bug." + ); + } + cleanupDeps(this); + activeSub = prevEffect; + shouldTrack = prevShouldTrack; + this.flags &= ~2; + } + } + stop() { + if (this.flags & 1) { + for (let link = this.deps; link; link = link.nextDep) { + removeSub(link); + } + this.deps = this.depsTail = void 0; + cleanupEffect(this); + this.onStop && this.onStop(); + this.flags &= ~1; + } + } + trigger() { + if (this.flags & 64) { + pausedQueueEffects.add(this); + } else if (this.scheduler) { + this.scheduler(); + } else { + this.runIfDirty(); + } + } + /** + * @internal + */ + runIfDirty() { + if (isDirty(this)) { + this.run(); + } + } + get dirty() { + return isDirty(this); + } +} +let batchDepth = 0; +let batchedSub; +let batchedComputed; +function batch(sub, isComputed = false) { + sub.flags |= 8; + if (isComputed) { + sub.next = batchedComputed; + batchedComputed = sub; + return; + } + sub.next = batchedSub; + batchedSub = sub; +} +function startBatch() { + batchDepth++; +} +function endBatch() { + if (--batchDepth > 0) { + return; + } + if (batchedComputed) { + let e = batchedComputed; + batchedComputed = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + e = next; + } + } + let error; + while (batchedSub) { + let e = batchedSub; + batchedSub = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + if (e.flags & 1) { + try { + ; + e.trigger(); + } catch (err) { + if (!error) error = err; + } + } + e = next; + } + } + if (error) throw error; +} +function prepareDeps(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + link.version = -1; + link.prevActiveLink = link.dep.activeLink; + link.dep.activeLink = link; + } +} +function cleanupDeps(sub) { + let head; + let tail = sub.depsTail; + let link = tail; + while (link) { + const prev = link.prevDep; + if (link.version === -1) { + if (link === tail) tail = prev; + removeSub(link); + removeDep(link); + } else { + head = link; + } + link.dep.activeLink = link.prevActiveLink; + link.prevActiveLink = void 0; + link = prev; + } + sub.deps = head; + sub.depsTail = tail; +} +function isDirty(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { + return true; + } + } + if (sub._dirty) { + return true; + } + return false; +} +function refreshComputed(computed) { + if (computed.flags & 4 && !(computed.flags & 16)) { + return; + } + computed.flags &= ~16; + if (computed.globalVersion === globalVersion) { + return; + } + computed.globalVersion = globalVersion; + const dep = computed.dep; + computed.flags |= 2; + if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { + computed.flags &= ~2; + return; + } + const prevSub = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = computed; + shouldTrack = true; + try { + prepareDeps(computed); + const value = computed.fn(computed._value); + if (dep.version === 0 || hasChanged(value, computed._value)) { + computed._value = value; + dep.version++; + } + } catch (err) { + dep.version++; + throw err; + } finally { + activeSub = prevSub; + shouldTrack = prevShouldTrack; + cleanupDeps(computed); + computed.flags &= ~2; + } +} +function removeSub(link, soft = false) { + const { dep, prevSub, nextSub } = link; + if (prevSub) { + prevSub.nextSub = nextSub; + link.prevSub = void 0; + } + if (nextSub) { + nextSub.prevSub = prevSub; + link.nextSub = void 0; + } + if (dep.subsHead === link) { + dep.subsHead = nextSub; + } + if (dep.subs === link) { + dep.subs = prevSub; + if (!prevSub && dep.computed) { + dep.computed.flags &= ~4; + for (let l = dep.computed.deps; l; l = l.nextDep) { + removeSub(l, true); + } + } + } + if (!soft && !--dep.sc && dep.map) { + dep.map.delete(dep.key); + } +} +function removeDep(link) { + const { prevDep, nextDep } = link; + if (prevDep) { + prevDep.nextDep = nextDep; + link.prevDep = void 0; + } + if (nextDep) { + nextDep.prevDep = prevDep; + link.nextDep = void 0; + } +} +function effect(fn, options) { + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const e = new ReactiveEffect(fn); + if (options) { + extend(e, options); + } + try { + e.run(); + } catch (err) { + e.stop(); + throw err; + } + const runner = e.run.bind(e); + runner.effect = e; + return runner; +} +function stop(runner) { + runner.effect.stop(); +} +let shouldTrack = true; +const trackStack = []; +function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; +} +function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; +} +function cleanupEffect(e) { + const { cleanup } = e; + e.cleanup = void 0; + if (cleanup) { + const prevSub = activeSub; + activeSub = void 0; + try { + cleanup(); + } finally { + activeSub = prevSub; + } + } +} + +let globalVersion = 0; +class Link { + constructor(sub, dep) { + this.sub = sub; + this.dep = dep; + this.version = dep.version; + this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; + } +} +class Dep { + constructor(computed) { + this.computed = computed; + this.version = 0; + /** + * Link between this dep and the current active effect + */ + this.activeLink = void 0; + /** + * Doubly linked list representing the subscribing effects (tail) + */ + this.subs = void 0; + /** + * For object property deps cleanup + */ + this.map = void 0; + this.key = void 0; + /** + * Subscriber counter + */ + this.sc = 0; + { + this.subsHead = void 0; + } + } + track(debugInfo) { + if (!activeSub || !shouldTrack || activeSub === this.computed) { + return; + } + let link = this.activeLink; + if (link === void 0 || link.sub !== activeSub) { + link = this.activeLink = new Link(activeSub, this); + if (!activeSub.deps) { + activeSub.deps = activeSub.depsTail = link; + } else { + link.prevDep = activeSub.depsTail; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + } + addSub(link); + } else if (link.version === -1) { + link.version = this.version; + if (link.nextDep) { + const next = link.nextDep; + next.prevDep = link.prevDep; + if (link.prevDep) { + link.prevDep.nextDep = next; + } + link.prevDep = activeSub.depsTail; + link.nextDep = void 0; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + if (activeSub.deps === link) { + activeSub.deps = next; + } + } + } + if (activeSub.onTrack) { + activeSub.onTrack( + extend( + { + effect: activeSub + }, + debugInfo + ) + ); + } + return link; + } + trigger(debugInfo) { + this.version++; + globalVersion++; + this.notify(debugInfo); + } + notify(debugInfo) { + startBatch(); + try { + if (true) { + for (let head = this.subsHead; head; head = head.nextSub) { + if (head.sub.onTrigger && !(head.sub.flags & 8)) { + head.sub.onTrigger( + extend( + { + effect: head.sub + }, + debugInfo + ) + ); + } + } + } + for (let link = this.subs; link; link = link.prevSub) { + if (link.sub.notify()) { + ; + link.sub.dep.notify(); + } + } + } finally { + endBatch(); + } + } +} +function addSub(link) { + link.dep.sc++; + if (link.sub.flags & 4) { + const computed = link.dep.computed; + if (computed && !link.dep.subs) { + computed.flags |= 4 | 16; + for (let l = computed.deps; l; l = l.nextDep) { + addSub(l); + } + } + const currentTail = link.dep.subs; + if (currentTail !== link) { + link.prevSub = currentTail; + if (currentTail) currentTail.nextSub = link; + } + if (link.dep.subsHead === void 0) { + link.dep.subsHead = link; + } + link.dep.subs = link; + } +} +const targetMap = /* @__PURE__ */ new WeakMap(); +const ITERATE_KEY = Symbol( + "Object iterate" +); +const MAP_KEY_ITERATE_KEY = Symbol( + "Map keys iterate" +); +const ARRAY_ITERATE_KEY = Symbol( + "Array iterate" +); +function track(target, type, key) { + if (shouldTrack && activeSub) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = new Dep()); + dep.map = depsMap; + dep.key = key; + } + { + dep.track({ + target, + type, + key + }); + } + } +} +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + globalVersion++; + return; + } + const run = (dep) => { + if (dep) { + { + dep.trigger({ + target, + type, + key, + newValue, + oldValue, + oldTarget + }); + } + } + }; + startBatch(); + if (type === "clear") { + depsMap.forEach(run); + } else { + const targetIsArray = isArray(target); + const isArrayIndex = targetIsArray && isIntegerKey(key); + if (targetIsArray && key === "length") { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { + run(dep); + } + }); + } else { + if (key !== void 0 || depsMap.has(void 0)) { + run(depsMap.get(key)); + } + if (isArrayIndex) { + run(depsMap.get(ARRAY_ITERATE_KEY)); + } + switch (type) { + case "add": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isArrayIndex) { + run(depsMap.get("length")); + } + break; + case "delete": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + run(depsMap.get(ITERATE_KEY)); + } + break; + } + } + } + endBatch(); +} +function getDepFromReactive(object, key) { + const depMap = targetMap.get(object); + return depMap && depMap.get(key); +} + +function reactiveReadArray(array) { + const raw = toRaw(array); + if (raw === array) return raw; + track(raw, "iterate", ARRAY_ITERATE_KEY); + return isShallow(array) ? raw : raw.map(toReactive); +} +function shallowReadArray(arr) { + track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); + return arr; +} +const arrayInstrumentations = { + __proto__: null, + [Symbol.iterator]() { + return iterator(this, Symbol.iterator, toReactive); + }, + concat(...args) { + return reactiveReadArray(this).concat( + ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) + ); + }, + entries() { + return iterator(this, "entries", (value) => { + value[1] = toReactive(value[1]); + return value; + }); + }, + every(fn, thisArg) { + return apply(this, "every", fn, thisArg, void 0, arguments); + }, + filter(fn, thisArg) { + return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); + }, + find(fn, thisArg) { + return apply(this, "find", fn, thisArg, toReactive, arguments); + }, + findIndex(fn, thisArg) { + return apply(this, "findIndex", fn, thisArg, void 0, arguments); + }, + findLast(fn, thisArg) { + return apply(this, "findLast", fn, thisArg, toReactive, arguments); + }, + findLastIndex(fn, thisArg) { + return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); + }, + // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement + forEach(fn, thisArg) { + return apply(this, "forEach", fn, thisArg, void 0, arguments); + }, + includes(...args) { + return searchProxy(this, "includes", args); + }, + indexOf(...args) { + return searchProxy(this, "indexOf", args); + }, + join(separator) { + return reactiveReadArray(this).join(separator); + }, + // keys() iterator only reads `length`, no optimisation required + lastIndexOf(...args) { + return searchProxy(this, "lastIndexOf", args); + }, + map(fn, thisArg) { + return apply(this, "map", fn, thisArg, void 0, arguments); + }, + pop() { + return noTracking(this, "pop"); + }, + push(...args) { + return noTracking(this, "push", args); + }, + reduce(fn, ...args) { + return reduce(this, "reduce", fn, args); + }, + reduceRight(fn, ...args) { + return reduce(this, "reduceRight", fn, args); + }, + shift() { + return noTracking(this, "shift"); + }, + // slice could use ARRAY_ITERATE but also seems to beg for range tracking + some(fn, thisArg) { + return apply(this, "some", fn, thisArg, void 0, arguments); + }, + splice(...args) { + return noTracking(this, "splice", args); + }, + toReversed() { + return reactiveReadArray(this).toReversed(); + }, + toSorted(comparer) { + return reactiveReadArray(this).toSorted(comparer); + }, + toSpliced(...args) { + return reactiveReadArray(this).toSpliced(...args); + }, + unshift(...args) { + return noTracking(this, "unshift", args); + }, + values() { + return iterator(this, "values", toReactive); + } +}; +function iterator(self, method, wrapValue) { + const arr = shallowReadArray(self); + const iter = arr[method](); + if (arr !== self && !isShallow(self)) { + iter._next = iter.next; + iter.next = () => { + const result = iter._next(); + if (result.value) { + result.value = wrapValue(result.value); + } + return result; + }; + } + return iter; +} +const arrayProto = Array.prototype; +function apply(self, method, fn, thisArg, wrappedRetFn, args) { + const arr = shallowReadArray(self); + const needsWrap = arr !== self && !isShallow(self); + const methodFn = arr[method]; + if (methodFn !== arrayProto[method]) { + const result2 = methodFn.apply(self, args); + return needsWrap ? toReactive(result2) : result2; + } + let wrappedFn = fn; + if (arr !== self) { + if (needsWrap) { + wrappedFn = function(item, index) { + return fn.call(this, toReactive(item), index, self); + }; + } else if (fn.length > 2) { + wrappedFn = function(item, index) { + return fn.call(this, item, index, self); + }; + } + } + const result = methodFn.call(arr, wrappedFn, thisArg); + return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; +} +function reduce(self, method, fn, args) { + const arr = shallowReadArray(self); + let wrappedFn = fn; + if (arr !== self) { + if (!isShallow(self)) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, toReactive(item), index, self); + }; + } else if (fn.length > 3) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, item, index, self); + }; + } + } + return arr[method](wrappedFn, ...args); +} +function searchProxy(self, method, args) { + const arr = toRaw(self); + track(arr, "iterate", ARRAY_ITERATE_KEY); + const res = arr[method](...args); + if ((res === -1 || res === false) && isProxy(args[0])) { + args[0] = toRaw(args[0]); + return arr[method](...args); + } + return res; +} +function noTracking(self, method, args = []) { + pauseTracking(); + startBatch(); + const res = toRaw(self)[method].apply(self, args); + endBatch(); + resetTracking(); + return res; +} + +const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); +const builtInSymbols = new Set( + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) +); +function hasOwnProperty(key) { + if (!isSymbol(key)) key = String(key); + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} +class BaseReactiveHandler { + constructor(_isReadonly = false, _isShallow = false) { + this._isReadonly = _isReadonly; + this._isShallow = _isShallow; + } + get(target, key, receiver) { + if (key === "__v_skip") return target["__v_skip"]; + const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return isShallow2; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the receiver is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + let fn; + if (targetIsArray && (fn = arrayInstrumentations[key])) { + return fn; + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get( + target, + key, + // if this is a proxy wrapping a ref, return methods using the raw ref + // as receiver so that we don't have to call `toRaw` on the ref in all + // its class methods + isRef(target) ? target : receiver + ); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (isShallow2) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } +} +class MutableReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(false, isShallow2); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._isShallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set( + target, + key, + value, + isRef(target) ? target : receiver + ); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { + const hadKey = hasOwn(target, key); + const oldValue = target[key]; + const result = Reflect.deleteProperty(target, key); + if (result && hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + } + has(target, key) { + const result = Reflect.has(target, key); + if (!isSymbol(key) || !builtInSymbols.has(key)) { + track(target, "has", key); + } + return result; + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); + return Reflect.ownKeys(target); + } +} +class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(true, isShallow2); + } + set(target, key) { + { + warn$2( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + deleteProperty(target, key) { + { + warn$2( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } +} +const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); +const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); +const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); +const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); + +const toShallow = (value) => value; +const getProto = (v) => Reflect.getPrototypeOf(v); +function createIterableMethod(method, isReadonly2, isShallow2) { + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done + }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } + }; + }; +} +function createReadonlyMethod(type) { + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + warn$2( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; +} +function createInstrumentations(readonly, shallow) { + const instrumentations = { + get(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); + } + track(rawTarget, "get", rawKey); + } + const { has } = getProto(rawTarget); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + if (has.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } + }, + get size() { + const target = this["__v_raw"]; + !readonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); + }, + has(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); + } + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); + }, + forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + !readonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + } + }; + extend( + instrumentations, + readonly ? { + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear") + } : { + add(value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; + }, + set(key, value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; + }, + delete(key) { + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get ? get.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + }, + clear() { + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger( + target, + "clear", + void 0, + void 0, + oldTarget + ); + } + return result; + } + } + ); + const iteratorMethods = [ + "keys", + "values", + "entries", + Symbol.iterator + ]; + iteratorMethods.forEach((method) => { + instrumentations[method] = createIterableMethod(method, readonly, shallow); + }); + return instrumentations; +} +function createInstrumentationGetter(isReadonly2, shallow) { + const instrumentations = createInstrumentations(isReadonly2, shallow); + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; +} +const mutableCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, false) +}; +const shallowCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, true) +}; +const readonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, false) +}; +const shallowReadonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, true) +}; +function checkIdentityKeys(target, has, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has.call(target, rawKey)) { + const type = toRawType(target); + warn$2( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } +} + +const reactiveMap = /* @__PURE__ */ new WeakMap(); +const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); +const readonlyMap = /* @__PURE__ */ new WeakMap(); +const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); +function targetTypeMap(rawType) { + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } +} +function getTargetType(value) { + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); +} +function reactive(target) { + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); +} +function shallowReactive(target) { + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); +} +function readonly(target) { + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); +} +function shallowReadonly(target) { + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); +} +function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + { + warn$2( + `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( + target + )}` + ); + } + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; +} +function isReactive(value) { + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); +} +function isReadonly(value) { + return !!(value && value["__v_isReadonly"]); +} +function isShallow(value) { + return !!(value && value["__v_isShallow"]); +} +function isProxy(value) { + return value ? !!value["__v_raw"] : false; +} +function toRaw(observed) { + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; +} +function markRaw(value) { + if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { + def(value, "__v_skip", true); + } + return value; +} +const toReactive = (value) => isObject(value) ? reactive(value) : value; +const toReadonly = (value) => isObject(value) ? readonly(value) : value; + +function isRef(r) { + return r ? r["__v_isRef"] === true : false; +} +function ref(value) { + return createRef(value, false); +} +function shallowRef(value) { + return createRef(value, true); +} +function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); +} +class RefImpl { + constructor(value, isShallow2) { + this.dep = new Dep(); + this["__v_isRef"] = true; + this["__v_isShallow"] = false; + this._rawValue = isShallow2 ? value : toRaw(value); + this._value = isShallow2 ? value : toReactive(value); + this["__v_isShallow"] = isShallow2; + } + get value() { + { + this.dep.track({ + target: this, + type: "get", + key: "value" + }); + } + return this._value; + } + set value(newValue) { + const oldValue = this._rawValue; + const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); + newValue = useDirectValue ? newValue : toRaw(newValue); + if (hasChanged(newValue, oldValue)) { + this._rawValue = newValue; + this._value = useDirectValue ? newValue : toReactive(newValue); + { + this.dep.trigger({ + target: this, + type: "set", + key: "value", + newValue, + oldValue + }); + } + } + } +} +function triggerRef(ref2) { + if (ref2.dep) { + { + ref2.dep.trigger({ + target: ref2, + type: "set", + key: "value", + newValue: ref2._value + }); + } + } +} +function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +} +function toValue(source) { + return isFunction(source) ? source() : unref(source); +} +const shallowUnwrapHandlers = { + get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } +}; +function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); +} +class CustomRefImpl { + constructor(factory) { + this["__v_isRef"] = true; + this._value = void 0; + const dep = this.dep = new Dep(); + const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); + this._get = get; + this._set = set; + } + get value() { + return this._value = this._get(); + } + set value(newVal) { + this._set(newVal); + } +} +function customRef(factory) { + return new CustomRefImpl(factory); +} +function toRefs(object) { + if (!isProxy(object)) { + warn$2(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; +} +class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this["__v_isRef"] = true; + this._value = void 0; + } + get value() { + const val = this._object[this._key]; + return this._value = val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } +} +class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this["__v_isRef"] = true; + this["__v_isReadonly"] = true; + this._value = void 0; + } + get value() { + return this._value = this._getter(); + } +} +function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } +} +function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); +} + +class ComputedRefImpl { + constructor(fn, setter, isSSR) { + this.fn = fn; + this.setter = setter; + /** + * @internal + */ + this._value = void 0; + /** + * @internal + */ + this.dep = new Dep(this); + /** + * @internal + */ + this.__v_isRef = true; + // TODO isolatedDeclarations "__v_isReadonly" + // A computed is also a subscriber that tracks other deps + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 16; + /** + * @internal + */ + this.globalVersion = globalVersion - 1; + /** + * @internal + */ + this.next = void 0; + // for backwards compat + this.effect = this; + this["__v_isReadonly"] = !setter; + this.isSSR = isSSR; + } + /** + * @internal + */ + notify() { + this.flags |= 16; + if (!(this.flags & 8) && // avoid infinite self recursion + activeSub !== this) { + batch(this, true); + return true; + } + } + get value() { + const link = this.dep.track({ + target: this, + type: "get", + key: "value" + }) ; + refreshComputed(this); + if (link) { + link.version = this.dep.version; + } + return this._value; + } + set value(newValue) { + if (this.setter) { + this.setter(newValue); + } else { + warn$2("Write operation failed: computed value is readonly"); + } + } +} +function computed$1(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + if (isFunction(getterOrOptions)) { + getter = getterOrOptions; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, isSSR); + if (debugOptions && !isSSR) { + cRef.onTrack = debugOptions.onTrack; + cRef.onTrigger = debugOptions.onTrigger; + } + return cRef; +} + +const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" +}; +const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" +}; + +const INITIAL_WATCHER_VALUE = {}; +const cleanupMap = /* @__PURE__ */ new WeakMap(); +let activeWatcher = void 0; +function getCurrentWatcher() { + return activeWatcher; +} +function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { + if (owner) { + let cleanups = cleanupMap.get(owner); + if (!cleanups) cleanupMap.set(owner, cleanups = []); + cleanups.push(cleanupFn); + } else if (!failSilently) { + warn$2( + `onWatcherCleanup() was called when there was no active watcher to associate with.` + ); + } +} +function watch$1(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, once, scheduler, augmentJob, call } = options; + const warnInvalidSource = (s) => { + (options.onWarn || warn$2)( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const reactiveGetter = (source2) => { + if (deep) return source2; + if (isShallow(source2) || deep === false || deep === 0) + return traverse(source2, 1); + return traverse(source2); + }; + let effect; + let getter; + let cleanup; + let boundCleanup; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return call ? call(s, 2) : s(); + } else { + warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { + if (cb) { + getter = call ? () => call(source, 2) : source; + } else { + getter = () => { + if (cleanup) { + pauseTracking(); + try { + cleanup(); + } finally { + resetTracking(); + } + } + const currentEffect = activeWatcher; + activeWatcher = effect; + try { + return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); + } finally { + activeWatcher = currentEffect; + } + }; + } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + const depth = deep === true ? Infinity : deep; + getter = () => traverse(baseGetter(), depth); + } + const scope = getCurrentScope(); + const watchHandle = () => { + effect.stop(); + if (scope && scope.active) { + remove(scope.effects, effect); + } + }; + if (once && cb) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + watchHandle(); + }; + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = (immediateFirstRun) => { + if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { + if (cleanup) { + cleanup(); + } + const currentWatcher = activeWatcher; + activeWatcher = effect; + try { + const args = [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + boundCleanup + ]; + call ? call(cb, 3, args) : ( + // @ts-expect-error + cb(...args) + ); + oldValue = newValue; + } finally { + activeWatcher = currentWatcher; + } + } + } else { + effect.run(); + } + }; + if (augmentJob) { + augmentJob(job); + } + effect = new ReactiveEffect(getter); + effect.scheduler = scheduler ? () => scheduler(job, false) : job; + boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); + cleanup = effect.onStop = () => { + const cleanups = cleanupMap.get(effect); + if (cleanups) { + if (call) { + call(cleanups, 4); + } else { + for (const cleanup2 of cleanups) cleanup2(); + } + cleanupMap.delete(effect); + } + }; + { + effect.onTrack = options.onTrack; + effect.onTrigger = options.onTrigger; + } + if (cb) { + if (immediate) { + job(true); + } else { + oldValue = effect.run(); + } + } else if (scheduler) { + scheduler(job.bind(null, true), true); + } else { + effect.run(); + } + watchHandle.pause = effect.pause.bind(effect); + watchHandle.resume = effect.resume.bind(effect); + watchHandle.stop = watchHandle; + return watchHandle; +} +function traverse(value, depth = Infinity, seen) { + if (depth <= 0 || !isObject(value) || value["__v_skip"]) { + return value; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + depth--; + if (isRef(value)) { + traverse(value.value, depth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, seen); + } + for (const key of Object.getOwnPropertySymbols(value)) { + if (Object.prototype.propertyIsEnumerable.call(value, key)) { + traverse(value[key], depth, seen); + } + } + } + return value; +} + +const stack = []; +function pushWarningContext(vnode) { + stack.push(vnode); +} +function popWarningContext() { + stack.pop(); +} +let isWarning = false; +function warn$1(msg, ...args) { + if (isWarning) return; + isWarning = true; + pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + // eslint-disable-next-line no-restricted-syntax + msg + args.map((a) => { + var _a, _b; + return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); + }).join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); + } + console.warn(...warnArgs); + } + resetTracking(); + isWarning = false; +} +function getComponentTrace() { + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); + } + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; +} +function formatTrace(trace) { + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; +} +function formatTraceEntry({ vnode, recurseCount }) { + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; +} +function formatProps(props) { + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; +} +function formatProp(key, value, raw) { + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } +} +function assertNumber(val, type) { + if (val === void 0) { + return; + } else if (typeof val !== "number") { + warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + } else if (isNaN(val)) { + warn$1(`${type} is NaN - the duration expression might be incorrect.`); + } +} + +const ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER", + "COMPONENT_UPDATE": 15, + "15": "COMPONENT_UPDATE", + "APP_UNMOUNT_CLEANUP": 16, + "16": "APP_UNMOUNT_CLEANUP" +}; +const ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush", + [15]: "component update", + [16]: "app unmount cleanup function" +}; +function callWithErrorHandling(fn, instance, type, args) { + try { + return args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } +} +function callWithAsyncErrorHandling(fn, instance, type, args) { + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); + } + return res; + } + if (isArray(fn)) { + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; + } else { + warn$1( + `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` + ); + } +} +function handleError(err, instance, type, throwInDev = true) { + const contextVNode = instance ? instance.vnode : null; + const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = ErrorTypeStrings$1[type] ; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + return; + } + } + } + cur = cur.parent; + } + if (errorHandler) { + pauseTracking(); + callWithErrorHandling(errorHandler, null, 10, [ + err, + exposedInstance, + errorInfo + ]); + resetTracking(); + return; + } + } + logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); +} +function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { + { + const info = ErrorTypeStrings$1[type]; + if (contextVNode) { + pushWarningContext(contextVNode); + } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } +} + +const queue = []; +let flushIndex = -1; +const pendingPostFlushCbs = []; +let activePostFlushCbs = null; +let postFlushIndex = 0; +const resolvedPromise = /* @__PURE__ */ Promise.resolve(); +let currentFlushPromise = null; +const RECURSION_LIMIT = 100; +function nextTick(fn) { + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; +} +function findInsertionIndex(id) { + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { + start = middle + 1; + } else { + end = middle; + } + } + return start; +} +function queueJob(job) { + if (!(job.flags & 1)) { + const jobId = getId(job); + const lastJob = queue[queue.length - 1]; + if (!lastJob || // fast path when the job id is larger than the tail + !(job.flags & 2) && jobId >= getId(lastJob)) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(jobId), 0, job); + } + job.flags |= 1; + queueFlush(); + } +} +function queueFlush() { + if (!currentFlushPromise) { + currentFlushPromise = resolvedPromise.then(flushJobs); + } +} +function queuePostFlushCb(cb) { + if (!isArray(cb)) { + if (activePostFlushCbs && cb.id === -1) { + activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); + } else if (!(cb.flags & 1)) { + pendingPostFlushCbs.push(cb); + cb.flags |= 1; + } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); +} +function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.flags & 2) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + if (cb.flags & 4) { + cb.flags &= ~1; + } + cb(); + if (!(cb.flags & 4)) { + cb.flags &= ~1; + } + } + } +} +function flushPostFlushCbs(seen) { + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; + } + activePostFlushCbs = deduped; + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + const cb = activePostFlushCbs[postFlushIndex]; + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + if (cb.flags & 4) { + cb.flags &= ~1; + } + if (!(cb.flags & 8)) cb(); + cb.flags &= ~1; + } + activePostFlushCbs = null; + postFlushIndex = 0; + } +} +const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; +function flushJobs(seen) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + const check = (job) => checkRecursiveUpdates(seen, job) ; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && !(job.flags & 8)) { + if (check(job)) { + continue; + } + if (job.flags & 4) { + job.flags &= ~1; + } + callWithErrorHandling( + job, + job.i, + job.i ? 15 : 14 + ); + if (!(job.flags & 4)) { + job.flags &= ~1; + } + } + } + } finally { + for (; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job) { + job.flags &= ~1; + } + } + flushIndex = -1; + queue.length = 0; + flushPostFlushCbs(seen); + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); + } + } +} +function checkRecursiveUpdates(seen, fn) { + const count = seen.get(fn) || 0; + if (count > RECURSION_LIMIT) { + const instance = fn.i; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } + seen.set(fn, count + 1); + return false; +} + +let isHmrUpdating = false; +const hmrDirtyComponents = /* @__PURE__ */ new Map(); +{ + getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; +} +const map = /* @__PURE__ */ new Map(); +function registerHMR(instance) { + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); +} +function unregisterHMR(instance) { + map.get(instance.type.__hmrId).instances.delete(instance); +} +function createRecord(id, initialDef) { + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; +} +function normalizeClassComponent(component) { + return isClassComponent(component) ? component.__vccOpts : component; +} +function rerender(id, newRender) { + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; + } + instance.renderCache = []; + isHmrUpdating = true; + instance.update(); + isHmrUpdating = false; + }); +} +function reload(id, newComp) { + const record = map.get(id); + if (!record) return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (let i = 0; i < instances.length; i++) { + const instance = instances[i]; + const oldComp = normalizeClassComponent(instance.type); + let dirtyInstances = hmrDirtyComponents.get(oldComp); + if (!dirtyInstances) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set()); + } + dirtyInstances.add(instance); + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + dirtyInstances.add(instance); + instance.ceReload(newComp.styles); + dirtyInstances.delete(instance); + } else if (instance.parent) { + queueJob(() => { + isHmrUpdating = true; + instance.parent.update(); + isHmrUpdating = false; + dirtyInstances.delete(instance); + }); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + if (instance.root.ce && instance !== instance.root) { + instance.root.ce._removeChildStyle(oldComp); + } + } + queuePostFlushCb(() => { + hmrDirtyComponents.clear(); + }); +} +function updateComponentDef(oldComp, newComp) { + extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; + } + } +} +function tryWrap(fn) { + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; +} + +let devtools$1; +let buffer = []; +let devtoolsNotInstalled = false; +function emit$1(event, ...args) { + if (devtools$1) { + devtools$1.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } +} +function setDevtoolsHook$1(hook, target) { + var _a, _b; + devtools$1 = hook; + if (devtools$1) { + devtools$1.enabled = true; + buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); + buffer = []; + } else if ( + // handle late devtools injection - only do this if we are in an actual + // browser environment to avoid the timer handle stalling test runner exit + // (#4815) + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + // eslint-disable-next-line no-restricted-syntax + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook$1(newHook, target); + }); + setTimeout(() => { + if (!devtools$1) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; + devtoolsNotInstalled = true; + buffer = []; + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } +} +function devtoolsInitApp(app, version) { + emit$1("app:init" /* APP_INIT */, app, version, { + Fragment, + Text, + Comment, + Static + }); +} +function devtoolsUnmountApp(app) { + emit$1("app:unmount" /* APP_UNMOUNT */, app); +} +const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); +const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); +const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( + "component:removed" /* COMPONENT_REMOVED */ +); +const devtoolsComponentRemoved = (component) => { + if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools$1.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } +}; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function createDevtoolsComponentHook(hook) { + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; +} +const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); +const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); +function createDevtoolsPerformanceHook(hook) { + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; +} +function devtoolsComponentEmit(component, event, params) { + emit$1( + "component:emit" /* COMPONENT_EMIT */, + component.appContext.app, + component, + event, + params + ); +} + +let currentRenderingInstance = null; +let currentScopeId = null; +function setCurrentRenderingInstance(instance) { + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; +} +function pushScopeId(id) { + currentScopeId = id; +} +function popScopeId() { + currentScopeId = null; +} +const withScopeId = (_id) => withCtx; +function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); + } + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; +} + +function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } +} +function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + warn$1(`withDirectives can only be used inside render functions.`); + return vnode; + } + const instance = getComponentPublicInstance(currentRenderingInstance); + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; + if (dir) { + if (isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; +} +function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); + } + } +} + +const TeleportEndKey = Symbol("_vte"); +const isTeleport = (type) => type.__isTeleport; +const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); +const isTeleportDeferred = (props) => props && (props.defer || props.defer === ""); +const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; +const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; +const resolveTarget = (props, select) => { + const targetSelector = props && props.to; + if (isString(targetSelector)) { + if (!select) { + warn$1( + `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` + ); + return null; + } else { + const target = select(targetSelector); + if (!target && !isTeleportDisabled(props)) { + warn$1( + `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` + ); + } + return target; + } + } else { + if (!targetSelector && !isTeleportDisabled(props)) { + warn$1(`Invalid Teleport target: ${targetSelector}`); + } + return targetSelector; + } +}; +const TeleportImpl = { + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (isHmrUpdating) { + optimized = false; + dynamicChildren = null; + } + if (n1 == null) { + const placeholder = n2.el = createComment("teleport start") ; + const mainAnchor = n2.anchor = createComment("teleport end") ; + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + if (parentComponent && parentComponent.isCE) { + parentComponent.ce._teleportTarget = container2; + } + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountToTarget = () => { + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = prepareAnchor(target, n2, createText, insert); + if (target) { + if (namespace !== "svg" && isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace !== "mathml" && isTargetMathML(target)) { + namespace = "mathml"; + } + if (!disabled) { + mount(target, targetAnchor); + updateCssVars(n2, false); + } + } else if (!disabled) { + warn$1( + "Invalid Teleport target on mount:", + target, + `(${typeof target})` + ); + } + }; + if (disabled) { + mount(container, mainAnchor); + updateCssVars(n2, true); + } + if (isTeleportDeferred(n2.props)) { + queuePostRenderEffect(() => { + mountToTarget(); + n2.el.__isMounted = true; + }, parentSuspense); + } else { + mountToTarget(); + } + } else { + if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) { + queuePostRenderEffect(() => { + TeleportImpl.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + delete n1.el.__isMounted; + }, parentSuspense); + return; + } + n2.el = n1.el; + n2.targetStart = n1.targetStart; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } else { + warn$1( + "Invalid Teleport target on update:", + target, + `(${typeof target})` + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); + } + } + updateCssVars(n2, disabled); + } + }, + remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { + shapeFlag, + children, + anchor, + targetStart, + targetAnchor, + target, + props + } = vnode; + if (target) { + hostRemove(targetStart); + hostRemove(targetAnchor); + } + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport +}; +function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } +} +function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector, insert, createText } +}, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const disabled = isTeleportDisabled(vnode.props); + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (disabled) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetStart = targetNode; + vnode.targetAnchor = targetNode && nextSibling(targetNode); + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + if (targetAnchor && targetAnchor.nodeType === 8) { + if (targetAnchor.data === "teleport start anchor") { + vnode.targetStart = targetAnchor; + } else if (targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + targetAnchor = nextSibling(targetAnchor); + } + if (!vnode.targetAnchor) { + prepareAnchor(target, vnode, createText, insert); + } + hydrateChildren( + targetNode && nextSibling(targetNode), + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode, disabled); + } + return vnode.anchor && nextSibling(vnode.anchor); +} +const Teleport = TeleportImpl; +function updateCssVars(vnode, isDisabled) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node, anchor; + if (isDisabled) { + node = vnode.el; + anchor = vnode.anchor; + } else { + node = vnode.targetStart; + anchor = vnode.targetAnchor; + } + while (node && node !== anchor) { + if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } +} +function prepareAnchor(target, vnode, createText, insert) { + const targetStart = vnode.targetStart = createText(""); + const targetAnchor = vnode.targetAnchor = createText(""); + targetStart[TeleportEndKey] = targetAnchor; + if (target) { + insert(targetStart, target); + insert(targetAnchor, target); + } + return targetAnchor; +} + +const leaveCbKey = Symbol("_leaveCb"); +const enterCbKey$1 = Symbol("_enterCb"); +function useTransitionState() { + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; +} +const TransitionHookValidator = [Function, Array]; +const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator +}; +const recursiveGetSubtree = (instance) => { + const subTree = instance.subTree; + return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; +}; +const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + const child = findNonCommentChild(children); + const rawProps = toRaw(props); + const { mode } = rawProps; + if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { + warn$1(`invalid <transition> mode: ${mode}`); + } + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getInnerChild$1(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + let enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance, + // #11061, ensure enterHooks is fresh after clone + (hooks) => enterHooks = hooks + ); + if (innerChild.type !== Comment) { + setTransitionHooks(innerChild, enterHooks); + } + let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree); + if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { + let leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in" && innerChild.type !== Comment) { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (!(instance.job.flags & 8)) { + instance.update(); + } + delete leavingHooks.afterLeave; + oldInnerChild = void 0; + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + enterHooks.delayedLeave = () => { + delayedLeave(); + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + }; + } else { + oldInnerChild = void 0; + } + } else if (oldInnerChild) { + oldInnerChild = void 0; + } + return child; + }; + } +}; +function findNonCommentChild(children) { + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c of children) { + if (c.type !== Comment) { + if (hasFound) { + warn$1( + "<transition> can only be used on a single element or component. Use <transition-group> for lists." + ); + break; + } + child = c; + hasFound = true; + } + } + } + return child; +} +const BaseTransition = BaseTransitionImpl; +function getLeavingNodesForType(state, vnode) { + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; +} +function resolveTransitionHooks(vnode, props, state, instance, postClone) { + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook(hook, args); + if (isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) done(); + } else if (hook.length <= 1) { + done(); + } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey$1] = (cancelled) => { + if (called) return; + called = true; + if (cancelled) { + callHook(cancelHook, [el]); + } else { + callHook(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey$1] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove) { + const key2 = String(vnode.key); + if (el[enterCbKey$1]) { + el[enterCbKey$1]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove(); + } + callHook(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) return; + called = true; + remove(); + if (cancelled) { + callHook(onLeaveCancelled, [el]); + } else { + callHook(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + const hooks2 = resolveTransitionHooks( + vnode2, + props, + state, + instance, + postClone + ); + if (postClone) postClone(hooks2); + return hooks2; + } + }; + return hooks; +} +function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } +} +function getInnerChild$1(vnode) { + if (!isKeepAlive(vnode)) { + if (isTeleport(vnode.type) && vnode.children) { + return findNonCommentChild(vnode.children); + } + return vnode; + } + if (vnode.component) { + return vnode.component.subTree; + } + const { shapeFlag, children } = vnode; + if (children) { + if (shapeFlag & 16) { + return children[0]; + } + if (shapeFlag & 32 && isFunction(children.default)) { + return children.default(); + } + } +} +function setTransitionHooks(vnode, hooks) { + if (vnode.shapeFlag & 6 && vnode.component) { + vnode.transition = hooks; + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } +} +function getTransitionRawChildren(children, keepComment = false, parentKey) { + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); + } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; + } + } + return ret; +} + +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineComponent(options, extraOptions) { + return isFunction(options) ? ( + // #8236: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; +} + +function useId() { + const i = getCurrentInstance(); + if (i) { + return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++; + } else { + warn$1( + `useId() is called when there is no active component instance to be associated with.` + ); + } + return ""; +} +function markAsyncBoundary(instance) { + instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; +} + +const knownTemplateRefs = /* @__PURE__ */ new WeakSet(); +function useTemplateRef(key) { + const i = getCurrentInstance(); + const r = shallowRef(null); + if (i) { + const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs; + let desc; + if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) { + warn$1(`useTemplateRef('${key}') already exists.`); + } else { + Object.defineProperty(refs, key, { + enumerable: true, + get: () => r.value, + set: (val) => r.value = val + }); + } + } else { + warn$1( + `useTemplateRef() is called when there is no active component instance to be associated with.` + ); + } + const ret = readonly(r) ; + { + knownTemplateRefs.add(ret); + } + return ret; +} + +function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { + if (isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) { + setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree); + } + return; + } + const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + const rawSetupState = toRaw(setupState); + const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => { + { + if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) { + warn$1( + `Template ref "${key}" used on a non-ref value. It will not work in the production build.` + ); + } + if (knownTemplateRefs.has(rawSetupState[key])) { + return false; + } + } + return hasOwn(rawSetupState, key); + }; + if (oldRef != null && oldRef !== ref) { + if (isString(oldRef)) { + refs[oldRef] = null; + if (canSetSetupRef(oldRef)) { + setupState[oldRef] = null; + } + } else if (isRef(oldRef)) { + oldRef.value = null; + } + } + if (isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = isString(ref); + const _isRef = isRef(ref); + if (_isString || _isRef) { + const doSet = () => { + if (rawRef.f) { + const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + isArray(existing) && remove(existing, refValue); + } else { + if (!isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (canSetSetupRef(ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); + } + } + } else if (_isString) { + refs[ref] = value; + if (canSetSetupRef(ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) refs[rawRef.k] = value; + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + }; + if (value) { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } else { + doSet(); + } + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + } +} + +let hasLoggedMismatchError = false; +const logMismatchError = () => { + if (hasLoggedMismatchError) { + return; + } + console.error("Hydration completed but contains mismatches."); + hasLoggedMismatchError = true; +}; +const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; +const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); +const getContainerType = (container) => { + if (container.nodeType !== 1) return void 0; + if (isSVGContainer(container)) return "svg"; + if (isMathMLContainer(container)) return "mathml"; + return void 0; +}; +const isComment = (node) => node.nodeType === 8; +function createHydrationFunctions(rendererInternals) { + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment + } + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + warn$1( + `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` + ); + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; + } + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; + }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + optimized = optimized || !!vnode.dynamicChildren; + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + { + def(node, "__vnode", vnode, true); + def(node, "__vueParentComponent", parentComponent, true); + } + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { + warn$1( + `Hydration text mismatch in`, + node.parentNode, + ` + - rendered on server: ${JSON.stringify( + node.data + )} + - expected on client: ${JSON.stringify(vnode.children)}` + ); + logMismatchError(); + node.data = vnode.children; + } + nextNode = nextSibling(node); + } + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 || domType === 3) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else { + warn$1("Invalid HostVNode type:", type, `(${typeof type})`); + } + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; + }; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition( + null, + // no need check parentSuspense in hydration + transition + ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + let hasWarned = false; + while (next) { + if (!isMismatchAllowed(el, 1 /* CHILDREN */)) { + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + el, + ` +Server rendered element contains more child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + let clientText = vnode.children; + if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) { + clientText = clientText.slice(1); + } + if (el.textContent !== clientText) { + if (!isMismatchAllowed(el, 0 /* TEXT */)) { + warn$1( + `Hydration text content mismatch on`, + el, + ` + - rendered on server: ${el.textContent} + - expected on client: ${vnode.children}` + ); + logMismatchError(); + } + el.textContent = vnode.children; + } + } + if (props) { + { + const isCustomElement = el.tagName.includes("-"); + for (const key in props) { + if (// #11189 skip if this node has directives that have created hooks + // as it could have mutated the DOM in any possible way + !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) { + logMismatchError(); + } + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === "." || isCustomElement) { + patchProp(el, key, null, props[key], void 0, parentComponent); + } + } + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + } + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + let hasWarned = false; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + const isText = vnode.type === Text; + if (node) { + if (isText && !optimized) { + if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) { + insert( + createText( + node.data.slice(vnode.children.length) + ), + container, + nextSibling(node) + ); + node.data = vnode.children; + } + } + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (isText && !vnode.children) { + insert(vnode.el = createText(""), container); + } else { + if (!isMismatchAllowed(container, 1 /* CHILDREN */)) { + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + container, + ` +Server rendered element contains fewer child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + } + } + return node; + }; + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); + } else { + logMismatchError(); + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) { + warn$1( + `Hydration node mismatch: +- rendered on server:`, + node, + node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, + ` +- expected on client:`, + vnode.type + ); + logMismatchError(); + } + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; + } + } + } + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + if (parentComponent) { + parentComponent.vnode.el = vnode.el; + updateHOCHostEl(parentComponent, vnode.el); + } + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } + } + } + } + return node; + }; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 && node.tagName === "TEMPLATE"; + }; + return [hydrate, hydrateNode]; +} +function propHasMismatch(el, key, clientValue, vnode, instance) { + let mismatchType; + let mismatchKey; + let actual; + let expected; + if (key === "class") { + actual = el.getAttribute("class"); + expected = normalizeClass(clientValue); + if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { + mismatchType = 2 /* CLASS */; + mismatchKey = `class`; + } + } else if (key === "style") { + actual = el.getAttribute("style") || ""; + expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); + const actualMap = toStyleMap(actual); + const expectedMap = toStyleMap(expected); + if (vnode.dirs) { + for (const { dir, value } of vnode.dirs) { + if (dir.name === "show" && !value) { + expectedMap.set("display", "none"); + } + } + } + if (instance) { + resolveCssVars(instance, vnode, expectedMap); + } + if (!isMapEqual(actualMap, expectedMap)) { + mismatchType = 3 /* STYLE */; + mismatchKey = "style"; + } + } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { + if (isBooleanAttr(key)) { + actual = el.hasAttribute(key); + expected = includeBooleanAttr(clientValue); + } else if (clientValue == null) { + actual = el.hasAttribute(key); + expected = false; + } else { + if (el.hasAttribute(key)) { + actual = el.getAttribute(key); + } else if (key === "value" && el.tagName === "TEXTAREA") { + actual = el.value; + } else { + actual = false; + } + expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; + } + if (actual !== expected) { + mismatchType = 4 /* ATTRIBUTE */; + mismatchKey = key; + } + } + if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) { + const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; + const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`; + const postSegment = ` + - rendered on server: ${format(actual)} + - expected on client: ${format(expected)} + Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. + You should fix the source of the mismatch.`; + { + warn$1(preSegment, el, postSegment); + } + return true; + } + return false; +} +function toClassSet(str) { + return new Set(str.trim().split(/\s+/)); +} +function isSetEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const s of a) { + if (!b.has(s)) { + return false; + } + } + return true; +} +function toStyleMap(str) { + const styleMap = /* @__PURE__ */ new Map(); + for (const item of str.split(";")) { + let [key, value] = item.split(":"); + key = key.trim(); + value = value && value.trim(); + if (key && value) { + styleMap.set(key, value); + } + } + return styleMap; +} +function isMapEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const [key, value] of a) { + if (value !== b.get(key)) { + return false; + } + } + return true; +} +function resolveCssVars(instance, vnode, expectedMap) { + const root = instance.subTree; + if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) { + const cssVars = instance.getCssVars(); + for (const key in cssVars) { + expectedMap.set( + `--${getEscapedCssVarName(key)}`, + String(cssVars[key]) + ); + } + } + if (vnode === root && instance.parent) { + resolveCssVars(instance.parent, instance.vnode, expectedMap); + } +} +const allowMismatchAttr = "data-allow-mismatch"; +const MismatchTypeString = { + [0 /* TEXT */]: "text", + [1 /* CHILDREN */]: "children", + [2 /* CLASS */]: "class", + [3 /* STYLE */]: "style", + [4 /* ATTRIBUTE */]: "attribute" +}; +function isMismatchAllowed(el, allowedType) { + if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) { + while (el && !el.hasAttribute(allowMismatchAttr)) { + el = el.parentElement; + } + } + const allowedAttr = el && el.getAttribute(allowMismatchAttr); + if (allowedAttr == null) { + return false; + } else if (allowedAttr === "") { + return true; + } else { + const list = allowedAttr.split(","); + if (allowedType === 0 /* TEXT */ && list.includes("children")) { + return true; + } + return allowedAttr.split(",").includes(MismatchTypeString[allowedType]); + } +} + +const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1)); +const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id)); +const hydrateOnIdle = (timeout = 1e4) => (hydrate) => { + const id = requestIdleCallback(hydrate, { timeout }); + return () => cancelIdleCallback(id); +}; +function elementIsVisibleInViewport(el) { + const { top, left, bottom, right } = el.getBoundingClientRect(); + const { innerHeight, innerWidth } = window; + return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth); +} +const hydrateOnVisible = (opts) => (hydrate, forEach) => { + const ob = new IntersectionObserver((entries) => { + for (const e of entries) { + if (!e.isIntersecting) continue; + ob.disconnect(); + hydrate(); + break; + } + }, opts); + forEach((el) => { + if (!(el instanceof Element)) return; + if (elementIsVisibleInViewport(el)) { + hydrate(); + ob.disconnect(); + return false; + } + ob.observe(el); + }); + return () => ob.disconnect(); +}; +const hydrateOnMediaQuery = (query) => (hydrate) => { + if (query) { + const mql = matchMedia(query); + if (mql.matches) { + hydrate(); + } else { + mql.addEventListener("change", hydrate, { once: true }); + return () => mql.removeEventListener("change", hydrate); + } + } +}; +const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => { + if (isString(interactions)) interactions = [interactions]; + let hasHydrated = false; + const doHydrate = (e) => { + if (!hasHydrated) { + hasHydrated = true; + teardown(); + hydrate(); + e.target.dispatchEvent(new e.constructor(e.type, e)); + } + }; + const teardown = () => { + forEach((el) => { + for (const i of interactions) { + el.removeEventListener(i, doHydrate); + } + }); + }; + forEach((el) => { + for (const i of interactions) { + el.addEventListener(i, doHydrate, { once: true }); + } + }); + return teardown; +}; +function forEachElement(node, cb) { + if (isComment(node) && node.data === "[") { + let depth = 1; + let next = node.nextSibling; + while (next) { + if (next.nodeType === 1) { + const result = cb(next); + if (result === false) { + break; + } + } else if (isComment(next)) { + if (next.data === "]") { + if (--depth === 0) break; + } else if (next.data === "[") { + depth++; + } + } + next = next.nextSibling; + } + } else { + cb(node); + } +} + +const isAsyncWrapper = (i) => !!i.type.__asyncLoader; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineAsyncComponent(source) { + if (isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + hydrate: hydrateStrategy, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve, reject) => { + const userRetry = () => resolve(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (!comp) { + warn$1( + `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` + ); + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + if (comp && !isObject(comp) && !isFunction(comp)) { + throw new Error(`Invalid async component load result: ${comp}`); + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + __asyncHydrate(el, instance, hydrate) { + const doHydrate = hydrateStrategy ? () => { + const teardown = hydrateStrategy( + hydrate, + (cb) => forEachElement(el, cb) + ); + if (teardown) { + (instance.bum || (instance.bum = [])).push(teardown); + } + } : hydrate; + if (resolvedComp) { + doHydrate(); + } else { + load().then(() => !instance.isUnmounted && doHydrate()); + } + }, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + markAsyncBoundary(instance); + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { + pendingRequest = null; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || isInSSRComponentSetup) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = ref(false); + const error = ref(); + const delayed = ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.update(); + } + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); +} +function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; +} + +const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; +const KeepAliveImpl = { + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + if (!sharedContext.renderer) { + return () => { + const children = slots.default && slots.default(); + return children && children.length === 1 ? children[0] : children; + }; + } + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + { + instance.__v_cache = cache; + } + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + invalidateMount(instance2.m); + invalidateMount(instance2.a); + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && !filter(name)) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (cached && (!current || !isSameVNodeType(cached, current))) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + if (isSuspense(instance.subTree.type)) { + queuePostRenderEffect(() => { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + }, instance.subTree.suspense); + } else { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return current = null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + { + warn$1(`KeepAlive should contain exactly one component child.`); + } + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + if (vnode.type === Comment) { + current = null; + return vnode; + } + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + vnode.shapeFlag &= ~256; + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } +}; +const KeepAlive = KeepAliveImpl; +function matches(pattern, name) { + if (isArray(pattern)) { + return pattern.some((p) => matches(p, name)); + } else if (isString(pattern)) { + return pattern.split(",").includes(name); + } else if (isRegExp(pattern)) { + pattern.lastIndex = 0; + return pattern.test(name); + } + return false; +} +function onActivated(hook, target) { + registerKeepAliveHook(hook, "a", target); +} +function onDeactivated(hook, target) { + registerKeepAliveHook(hook, "da", target); +} +function registerKeepAliveHook(hook, type, target = currentInstance) { + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; + } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } +} +function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + remove(keepAliveRoot[type], injected); + }, target); +} +function resetShapeFlag(vnode) { + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; +} +function getInnerChild(vnode) { + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; +} + +function injectHook(type, hook, target = currentInstance, prepend = false) { + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); + } + return wrappedHook; + } else { + const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) + ); + } +} +const createHook = (lifecycle) => (hook, target = currentInstance) => { + if (!isInSSRComponentSetup || lifecycle === "sp") { + injectHook(lifecycle, (...args) => hook(...args), target); + } +}; +const onBeforeMount = createHook("bm"); +const onMounted = createHook("m"); +const onBeforeUpdate = createHook( + "bu" +); +const onUpdated = createHook("u"); +const onBeforeUnmount = createHook( + "bum" +); +const onUnmounted = createHook("um"); +const onServerPrefetch = createHook( + "sp" +); +const onRenderTriggered = createHook("rtg"); +const onRenderTracked = createHook("rtc"); +function onErrorCaptured(hook, target = currentInstance) { + injectHook("ec", hook, target); +} + +const COMPONENTS = "components"; +const DIRECTIVES = "directives"; +function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; +} +const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); +function resolveDynamicComponent(component) { + if (isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } +} +function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); +} +function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else { + warn$1( + `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } +} +function resolve(registry, name) { + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); +} + +function renderList(source, renderItem, cache, index) { + let ret; + const cached = cache && cache[index]; + const sourceIsArray = isArray(source); + if (sourceIsArray || isString(source)) { + const sourceIsReactiveArray = sourceIsArray && isReactive(source); + let needsWrap = false; + if (sourceIsReactiveArray) { + needsWrap = !isShallow(source); + source = shallowReadArray(source); + } + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem( + needsWrap ? toReactive(source[i]) : source[i], + i, + void 0, + cached && cached[i] + ); + } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn$1(`The v-for range expect an integer value but got ${source}.`); + } + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); + } + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } + } + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; +} + +function createSlots(slots, dynamicSlots) { + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) res.key = slot.key; + return res; + } : slot.fn; + } + } + return slots; +} + +function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) { + if (name !== "default") props.name = name; + return openBlock(), createBlock( + Fragment, + null, + [createVNode("slot", props, fallback && fallback())], + 64 + ); + } + let slot = slots[name]; + if (slot && slot.length > 1) { + warn$1( + `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` + ); + slot = () => []; + } + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key; + const rendered = createBlock( + Fragment, + { + key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content + (!validSlotContent && fallback ? "_fb" : "") + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; +} +function ensureValidVNode(vnodes) { + return vnodes.some((child) => { + if (!isVNode(child)) return true; + if (child.type === Comment) return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; +} + +function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + if (!isObject(obj)) { + warn$1(`v-on with no argument expects an object value.`); + return ret; + } + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; + } + return ret; +} + +const getPublicInstance = (i) => { + if (!i) return null; + if (isStatefulComponent(i)) return getComponentPublicInstance(i); + return getPublicInstance(i.parent); +}; +const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => shallowReadonly(i.props) , + $attrs: (i) => shallowReadonly(i.attrs) , + $slots: (i) => shallowReadonly(i.slots) , + $refs: (i) => shallowReadonly(i.refs) , + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $host: (i) => i.ce, + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i) , + $forceUpdate: (i) => i.f || (i.f = () => { + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) +); +const isReservedPrefix = (key) => key === "_" || key === "$"; +const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); +const PublicInstanceProxyHandlers = { + get({ _: instance }, key) { + if (key === "__v_skip") { + return true; + } + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (key === "__isVue") { + return true; + } + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance.attrs, "get", ""); + markAttrsAccessed(); + } else if (key === "$slots") { + track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); + return false; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + data[key] = value; + return true; + } else if (hasOwn(instance.props, key)) { + warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + warn$1( + `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` + ); + return false; + } else { + if (key in instance.appContext.config.globalProperties) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + value + }); + } else { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } +}; +{ + PublicInstanceProxyHandlers.ownKeys = (target) => { + warn$1( + `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` + ); + return Reflect.ownKeys(target); + }; +} +const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, { + get(target, key) { + if (key === Symbol.unscopables) { + return; + } + return PublicInstanceProxyHandlers.get(target, key, target); + }, + has(_, key) { + const has = key[0] !== "_" && !isGloballyAllowed(key); + if (!has && PublicInstanceProxyHandlers.has(_, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} should not start with _ which is a reserved prefix for Vue internals.` + ); + } + return has; + } +}); +function createDevRenderContext(instance) { + const target = {}; + Object.defineProperty(target, `_`, { + configurable: true, + enumerable: false, + get: () => instance + }); + Object.keys(publicPropertiesMap).forEach((key) => { + Object.defineProperty(target, key, { + configurable: true, + enumerable: false, + get: () => publicPropertiesMap[key](instance), + // intercepted by the proxy so no need for implementation, + // but needed to prevent set errors + set: NOOP + }); + }); + return target; +} +function exposePropsOnRenderContext(instance) { + const { + ctx, + propsOptions: [propsOptions] + } = instance; + if (propsOptions) { + Object.keys(propsOptions).forEach((key) => { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => instance.props[key], + set: NOOP + }); + }); + } +} +function exposeSetupStateOnRenderContext(instance) { + const { ctx, setupState } = instance; + Object.keys(toRaw(setupState)).forEach((key) => { + if (!setupState.__isScriptSetup) { + if (isReservedPrefix(key[0])) { + warn$1( + `setup() return property ${JSON.stringify( + key + )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` + ); + return; + } + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => setupState[key], + set: NOOP + }); + } + }); +} + +const warnRuntimeUsage = (method) => warn$1( + `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` +); +function defineProps() { + { + warnRuntimeUsage(`defineProps`); + } + return null; +} +function defineEmits() { + { + warnRuntimeUsage(`defineEmits`); + } + return null; +} +function defineExpose(exposed) { + { + warnRuntimeUsage(`defineExpose`); + } +} +function defineOptions(options) { + { + warnRuntimeUsage(`defineOptions`); + } +} +function defineSlots() { + { + warnRuntimeUsage(`defineSlots`); + } + return null; +} +function defineModel() { + { + warnRuntimeUsage("defineModel"); + } +} +function withDefaults(props, defaults) { + { + warnRuntimeUsage(`withDefaults`); + } + return null; +} +function useSlots() { + return getContext().slots; +} +function useAttrs() { + return getContext().attrs; +} +function getContext() { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useContext() called without active instance.`); + } + return i.setupContext || (i.setupContext = createSetupContext(i)); +} +function normalizePropsOrEmits(props) { + return isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; +} +function mergeDefaults(raw, defaults) { + const props = normalizePropsOrEmits(raw); + for (const key in defaults) { + if (key.startsWith("__skip")) continue; + let opt = props[key]; + if (opt) { + if (isArray(opt) || isFunction(opt)) { + opt = props[key] = { type: opt, default: defaults[key] }; + } else { + opt.default = defaults[key]; + } + } else if (opt === null) { + opt = props[key] = { default: defaults[key] }; + } else { + warn$1(`props default key "${key}" has no corresponding declaration.`); + } + if (opt && defaults[`__skip_${key}`]) { + opt.skipFactory = true; + } + } + return props; +} +function mergeModels(a, b) { + if (!a || !b) return a || b; + if (isArray(a) && isArray(b)) return a.concat(b); + return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); +} +function createPropsRestProxy(props, excludedKeys) { + const ret = {}; + for (const key in props) { + if (!excludedKeys.includes(key)) { + Object.defineProperty(ret, key, { + enumerable: true, + get: () => props[key] + }); + } + } + return ret; +} +function withAsyncContext(getAwaitable) { + const ctx = getCurrentInstance(); + if (!ctx) { + warn$1( + `withAsyncContext called without active current instance. This is likely a bug.` + ); + } + let awaitable = getAwaitable(); + unsetCurrentInstance(); + if (isPromise(awaitable)) { + awaitable = awaitable.catch((e) => { + setCurrentInstance(ctx); + throw e; + }); + } + return [awaitable, () => setCurrentInstance(ctx)]; +} + +function createDuplicateChecker() { + const cache = /* @__PURE__ */ Object.create(null); + return (type, key) => { + if (cache[key]) { + warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); + } else { + cache[key] = type; + } + }; +} +let shouldCacheAccess = true; +function applyOptions(instance) { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook$1(options.beforeCreate, instance, "bc"); + } + const { + // state + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, + // lifecycle + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, + // public API + expose, + inheritAttrs, + // assets + components, + directives, + filters + } = options; + const checkDuplicateProperties = createDuplicateChecker() ; + { + const [propsOptions] = instance.propsOptions; + if (propsOptions) { + for (const key in propsOptions) { + checkDuplicateProperties("Props" /* PROPS */, key); + } + } + } + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (isFunction(methodHandler)) { + { + Object.defineProperty(ctx, key, { + value: methodHandler.bind(publicThis), + configurable: true, + enumerable: true, + writable: true + }); + } + { + checkDuplicateProperties("Methods" /* METHODS */, key); + } + } else { + warn$1( + `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` + ); + } + } + } + if (dataOptions) { + if (!isFunction(dataOptions)) { + warn$1( + `The data option must be a function. Plain object usage is no longer supported.` + ); + } + const data = dataOptions.call(publicThis, publicThis); + if (isPromise(data)) { + warn$1( + `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` + ); + } + if (!isObject(data)) { + warn$1(`data() should return an object.`); + } else { + instance.data = reactive(data); + { + for (const key in data) { + checkDuplicateProperties("Data" /* DATA */, key); + if (!isReservedPrefix(key[0])) { + Object.defineProperty(ctx, key, { + configurable: true, + enumerable: true, + get: () => data[key], + set: NOOP + }); + } + } + } + } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + if (get === NOOP) { + warn$1(`Computed property "${key}" has no getter.`); + } + const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => { + warn$1( + `Write operation failed: computed property "${key}" is readonly.` + ); + } ; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + { + checkDuplicateProperties("Computed" /* COMPUTED */, key); + } + } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook$1(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val + }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; + } + } + if (render && instance.render === NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) instance.components = components; + if (directives) instance.directives = directives; + if (serverPrefetch) { + markAsyncBoundary(instance); + } +} +function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { + if (isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); + } + if (isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; + } + { + checkDuplicateProperties("Inject" /* INJECT */, key); + } + } +} +function callHook$1(hook, instance, type) { + callWithAsyncErrorHandling( + isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); +} +function createWatcher(raw, ctx, publicThis, key) { + let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (isString(raw)) { + const handler = ctx[raw]; + if (isFunction(handler)) { + { + watch(getter, handler); + } + } else { + warn$1(`Invalid watch handler specified by key "${raw}"`, handler); + } + } else if (isFunction(raw)) { + { + watch(getter, raw.bind(publicThis)); + } + } else if (isObject(raw)) { + if (isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (isFunction(handler)) { + watch(getter, handler, raw); + } else { + warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); + } + } + } else { + warn$1(`Invalid watch option: "${key}"`, raw); + } +} +function resolveMergedOptions(instance) { + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; + } + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); + } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (isObject(base)) { + cache.set(base, resolved); + } + return resolved; +} +function mergeOptions(to, from, strats, asMixin = false) { + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") { + warn$1( + `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` + ); + } else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; + } + } + return to; +} +const internalOptionMergeStrats = { + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray, + created: mergeAsArray, + beforeMount: mergeAsArray, + mounted: mergeAsArray, + beforeUpdate: mergeAsArray, + updated: mergeAsArray, + beforeDestroy: mergeAsArray, + beforeUnmount: mergeAsArray, + destroyed: mergeAsArray, + unmounted: mergeAsArray, + activated: mergeAsArray, + deactivated: mergeAsArray, + errorCaptured: mergeAsArray, + serverPrefetch: mergeAsArray, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject +}; +function mergeDataFn(to, from) { + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (extend)( + isFunction(to) ? to.call(this, this) : to, + isFunction(from) ? from.call(this, this) : from + ); + }; +} +function mergeInject(to, from) { + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); +} +function normalizeInject(raw) { + if (isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; + } + return res; + } + return raw; +} +function mergeAsArray(to, from) { + return to ? [...new Set([].concat(to, from))] : from; +} +function mergeObjectOptions(to, from) { + return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; +} +function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (isArray(to) && isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } +} +function mergeWatchOptions(to, from) { + if (!to) return from; + if (!from) return to; + const merged = extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray(to[key], from[key]); + } + return merged; +} + +function createAppContext() { + return { + app: null, + config: { + isNativeTag: NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; +} +let uid$1 = 0; +function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!isFunction(rootComponent)) { + rootComponent = extend({}, rootComponent); + } + if (rootProps != null && !isObject(rootProps)) { + warn$1(`root props passed to app.mount() must be an object.`); + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + const pluginCleanupFns = []; + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + { + warn$1( + `app.config cannot be replaced. Modify individual options instead.` + ); + } + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) { + warn$1(`Plugin has already been applied to target app.`); + } else if (plugin && isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else { + warn$1( + `A plugin must either be a function or an object with an "install" function.` + ); + } + return app; + }, + mixin(mixin) { + { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } else { + warn$1( + "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") + ); + } + } + return app; + }, + component(name, component) { + { + validateComponentName(name, context.config); + } + if (!component) { + return context.components[name]; + } + if (context.components[name]) { + warn$1(`Component "${name}" has already been registered in target app.`); + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + { + validateDirectiveName(name); + } + if (!directive) { + return context.directives[name]; + } + if (context.directives[name]) { + warn$1(`Directive "${name}" has already been registered in target app.`); + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + if (rootContainer.__vue_app__) { + warn$1( + `There is already an app instance mounted on the host container. + If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` + ); + } + const vnode = app._ceVNode || createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + { + context.reload = () => { + render( + cloneVNode(vnode), + rootContainer, + namespace + ); + }; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + { + app._instance = vnode.component; + devtoolsInitApp(app, version); + } + return getComponentPublicInstance(vnode.component); + } else { + warn$1( + `App has already been mounted. +If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` + ); + } + }, + onUnmount(cleanupFn) { + if (typeof cleanupFn !== "function") { + warn$1( + `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}` + ); + } + pluginCleanupFns.push(cleanupFn); + }, + unmount() { + if (isMounted) { + callWithAsyncErrorHandling( + pluginCleanupFns, + app._instance, + 16 + ); + render(null, app._container); + { + app._instance = null; + devtoolsUnmountApp(app); + } + delete app._container.__vue_app__; + } else { + warn$1(`Cannot unmount an app that is not mounted.`); + } + }, + provide(key, value) { + if (key in context.provides) { + warn$1( + `App already provides property with key "${String(key)}". It will be overwritten with the new value.` + ); + } + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + const lastApp = currentApp; + currentApp = app; + try { + return fn(); + } finally { + currentApp = lastApp; + } + } + }; + return app; + }; +} +let currentApp = null; + +function provide(key, value) { + if (!currentInstance) { + { + warn$1(`provide() can only be used inside setup().`); + } + } else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); + } + provides[key] = value; + } +} +function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else { + warn$1(`injection "${String(key)}" not found.`); + } + } else { + warn$1(`inject() can only be used inside setup() or functional components.`); + } +} +function hasInjectionContext() { + return !!(currentInstance || currentRenderingInstance || currentApp); +} + +const internalObjectProto = {}; +const createInternalObject = () => Object.create(internalObjectProto); +const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; + +function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = createInternalObject(); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + { + validateProps(rawProps || {}, props, instance); + } + if (isStateful) { + instance.props = isSSR ? props : shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; +} +function isInHmrContext(instance) { + while (instance) { + if (instance.type.__hmrId) return true; + instance = instance.parent; + } +} +function updateProps(instance, rawProps, rawPrevProps, optimized) { + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( + // always force full diff in dev + // - #1942 if hmr is enabled with sfc component + // - vite#872 non-sfc component used by sfc component + !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; + } + const value = rawProps[key]; + if (options) { + if (hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; + } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; + } + } + } + } + if (hasAttrsChanged) { + trigger(instance.attrs, "set", ""); + } + { + validateProps(rawProps || {}, props, instance); + } +} +function setFullProps(instance, rawProps, props, attrs) { + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && hasOwn(options, camelKey = camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; + } + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + if (needCastKeys) { + const rawCurrentProps = toRaw(props); + const castValues = rawCastValues || EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; +} +function resolvePropValue(options, props, key, value, instance, isAbsent) { + const opt = options[key]; + if (opt != null) { + const hasDefault = hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); + } + } else { + value = defaultValue; + } + if (instance.ce) { + instance.ce._setProp(key, value); + } + } + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { + value = true; + } + } + } + return value; +} +const mixinPropsCache = /* @__PURE__ */ new WeakMap(); +function normalizePropsOptions(comp, appContext, asMixin = false) { + const cache = asMixin ? mixinPropsCache : appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (!isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + extend(normalized, props); + if (keys) needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); + } + if (comp.extends) { + extendProps(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendProps); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, EMPTY_ARR); + } + return EMPTY_ARR; + } + if (isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + if (!isString(raw[i])) { + warn$1(`props must be strings when using array syntax.`, raw[i]); + } + const normalizedKey = camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = EMPTY_OBJ; + } + } + } else if (raw) { + if (!isObject(raw)) { + warn$1(`invalid props options`, raw); + } + for (const key in raw) { + const normalizedKey = camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); + const propType = prop.type; + let shouldCast = false; + let shouldCastTrue = true; + if (isArray(propType)) { + for (let index = 0; index < propType.length; ++index) { + const type = propType[index]; + const typeName = isFunction(type) && type.name; + if (typeName === "Boolean") { + shouldCast = true; + break; + } else if (typeName === "String") { + shouldCastTrue = false; + } + } + } else { + shouldCast = isFunction(propType) && propType.name === "Boolean"; + } + prop[0 /* shouldCast */] = shouldCast; + prop[1 /* shouldCastTrue */] = shouldCastTrue; + if (shouldCast || hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + const res = [normalized, needCastKeys]; + if (isObject(comp)) { + cache.set(comp, res); + } + return res; +} +function validatePropName(key) { + if (key[0] !== "$" && !isReservedProp(key)) { + return true; + } else { + warn$1(`Invalid prop name: "${key}" is a reserved property.`); + } + return false; +} +function getType(ctor) { + if (ctor === null) { + return "null"; + } + if (typeof ctor === "function") { + return ctor.name || ""; + } else if (typeof ctor === "object") { + const name = ctor.constructor && ctor.constructor.name; + return name || ""; + } + return ""; +} +function validateProps(rawProps, props, instance) { + const resolvedValues = toRaw(props); + const options = instance.propsOptions[0]; + const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key)); + for (const key in options) { + let opt = options[key]; + if (opt == null) continue; + validateProp( + key, + resolvedValues[key], + opt, + shallowReadonly(resolvedValues) , + !camelizePropsKey.includes(key) + ); + } +} +function validateProp(name, value, prop, props, isAbsent) { + const { type, required, validator, skipCheck } = prop; + if (required && isAbsent) { + warn$1('Missing required prop: "' + name + '"'); + return; + } + if (value == null && !required) { + return; + } + if (type != null && type !== true && !skipCheck) { + let isValid = false; + const types = isArray(type) ? type : [type]; + const expectedTypes = []; + for (let i = 0; i < types.length && !isValid; i++) { + const { valid, expectedType } = assertType(value, types[i]); + expectedTypes.push(expectedType || ""); + isValid = valid; + } + if (!isValid) { + warn$1(getInvalidTypeMessage(name, value, expectedTypes)); + return; + } + } + if (validator && !validator(value, props)) { + warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + } +} +const isSimpleType = /* @__PURE__ */ makeMap( + "String,Number,Boolean,Function,Symbol,BigInt" +); +function assertType(value, type) { + let valid; + const expectedType = getType(type); + if (expectedType === "null") { + valid = value === null; + } else if (isSimpleType(expectedType)) { + const t = typeof value; + valid = t === expectedType.toLowerCase(); + if (!valid && t === "object") { + valid = value instanceof type; + } + } else if (expectedType === "Object") { + valid = isObject(value); + } else if (expectedType === "Array") { + valid = isArray(value); + } else { + valid = value instanceof type; + } + return { + valid, + expectedType + }; +} +function getInvalidTypeMessage(name, value, expectedTypes) { + if (expectedTypes.length === 0) { + return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; + } + let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; + const expectedType = expectedTypes[0]; + const receivedType = toRawType(value); + const expectedValue = styleValue(value, expectedType); + const receivedValue = styleValue(value, receivedType); + if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { + message += ` with value ${expectedValue}`; + } + message += `, got ${receivedType} `; + if (isExplicable(receivedType)) { + message += `with value ${receivedValue}.`; + } + return message; +} +function styleValue(value, type) { + if (type === "String") { + return `"${value}"`; + } else if (type === "Number") { + return `${Number(value)}`; + } else { + return `${value}`; + } +} +function isExplicable(type) { + const explicitTypes = ["string", "number", "boolean"]; + return explicitTypes.some((elem) => type.toLowerCase() === elem); +} +function isBoolean(...args) { + return args.some((elem) => elem.toLowerCase() === "boolean"); +} + +const isInternalKey = (key) => key[0] === "_" || key === "$stable"; +const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; +const normalizeSlot = (key, rawSlot, ctx) => { + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { + warn$1( + `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` + ); + } + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; +}; +const normalizeObjectSlots = (rawSlots, slots, instance) => { + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) continue; + const value = rawSlots[key]; + if (isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + { + warn$1( + `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; + } + } +}; +const normalizeVNodeSlots = (instance, children) => { + if (!isKeepAlive(instance.vnode) && true) { + warn$1( + `Non-function value encountered for default slot. Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; +}; +const assignSlots = (slots, children, optimized) => { + for (const key in children) { + if (optimized || key !== "_") { + slots[key] = children[key]; + } + } +}; +const initSlots = (instance, children, optimized) => { + const slots = instance.slots = createInternalObject(); + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + assignSlots(slots, children, optimized); + if (optimized) { + def(slots, "_", type, true); + } + } else { + normalizeObjectSlots(children, slots); + } + } else if (children) { + normalizeVNodeSlots(instance, children); + } +}; +const updateSlots = (instance, children, optimized) => { + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (isHmrUpdating) { + assignSlots(slots, children, optimized); + trigger(instance, "set", "$slots"); + } else if (optimized && type === 1) { + needDeletionCheck = false; + } else { + assignSlots(slots, children, optimized); + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); + } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } + } + } +}; + +let supported; +let perf; +function startMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + perf.mark(`vue-${type}-${instance.uid}`); + } + { + devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); + } +} +function endMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + const startTag = `vue-${type}-${instance.uid}`; + const endTag = startTag + `:end`; + perf.mark(endTag); + perf.measure( + `<${formatComponentName(instance, instance.type)}> ${type}`, + startTag, + endTag + ); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + } + { + devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); + } +} +function isSupported() { + if (supported !== void 0) { + return supported; + } + if (typeof window !== "undefined" && window.performance) { + supported = true; + perf = window.performance; + } else { + supported = false; + } + return supported; +} + +const queuePostRenderEffect = queueEffectWithSuspense ; +function createRenderer(options) { + return baseCreateRenderer(options); +} +function createHydrationRenderer(options) { + return baseCreateRenderer(options, createHydrationFunctions); +} +function baseCreateRenderer(options, createHydrationFns) { + const target = getGlobalThis(); + target.__VUE__ = true; + { + setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + } + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { + if (n1 === n2) { + return; + } + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: + if (n1 == null) { + mountStaticNode(n2, container, anchor, namespace); + } else { + patchStaticNode(n1, n2, container, namespace); + } + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else { + warn$1("Invalid VNode type:", type, `(${typeof type})`); + } + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const patchStaticNode = (n1, n2, container, namespace) => { + if (n2.children !== n1.children) { + const anchor = hostNextSibling(n1.anchor); + removeStaticNode(n1); + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace + ); + } else { + n2.el = n1.el; + n2.anchor = n1.anchor; + } + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !isReservedProp(key)) { + hostPatchProp(el, key, null, props[key], namespace, parentComponent); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + { + def(el, "__vnode", vnode, true); + def(el, "__vueParentComponent", parentComponent, true); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { + subTree = filterSingleRoot(subTree.children) || subTree; + } + if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + { + el.__vnode = n2; + } + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || EMPTY_OBJ; + const newProps = n2.props || EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (isHmrUpdating) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { + hostSetElementText(el, ""); + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + } + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); + } + } + } else if (!optimized && dynamicChildren == null) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== EMPTY_OBJ) { + for (const key in oldProps) { + if (!isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + parentComponent + ); + } + } + } + for (const key in newProps) { + if (isReservedProp(key)) continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if ( + // #5523 dev root fragment may inherit directives + isHmrUpdating || patchFlag & 2048 + ) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance( + initialVNode, + parentComponent, + parentSuspense + )); + if (instance.type.__hmrId) { + registerHMR(instance); + } + { + pushWarningContext(initialVNode); + startMeasure(instance, `mount`); + } + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } + { + { + startMeasure(instance, `init`); + } + setupComponent(instance, false, optimized); + { + endMeasure(instance, `init`); + } + } + if (instance.asyncDep) { + if (isHmrUpdating) initialVNode.el = null; + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); + } + { + popWarningContext(); + endMeasure(instance, `mount`); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + { + pushWarningContext(n2); + } + updateComponentPreRender(instance, n2, optimized); + { + popWarningContext(); + } + return; + } else { + instance.next = n2; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { + let vnodeHook; + const { el, props } = initialVNode; + const { bm, m, parent, root, type } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + invokeArrayFns(bm); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); + } + toggleRecurse(instance, true); + if (el && hydrateNode) { + const hydrateSubTree = () => { + { + startMeasure(instance, `render`); + } + instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `hydrate`); + } + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + { + endMeasure(instance, `hydrate`); + } + }; + if (isAsyncWrapperVNode && type.__asyncHydrate) { + type.__asyncHydrate( + el, + instance, + hydrateSubTree + ); + } else { + hydrateSubTree(); + } + } else { + if (root.ce) { + root.ce._injectChildStyle(type); + } + { + startMeasure(instance, `render`); + } + const subTree = instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `patch`); + } + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + initialVNode.el = subTree.el; + } + if (m) { + queuePostRenderEffect(m, parentSuspense); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); + } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); + } + instance.isMounted = true; + { + devtoolsComponentAdded(instance); + } + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); + return; + } + } + let originNext = next; + let vnodeHook; + { + pushWarningContext(next || instance.vnode); + } + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; + } + if (bu) { + invokeArrayFns(bu); + } + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); + } + toggleRecurse(instance, true); + { + startMeasure(instance, `render`); + } + const nextTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + const prevTree = instance.subTree; + instance.subTree = nextTree; + { + startMeasure(instance, `patch`); + } + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); + } + if (u) { + queuePostRenderEffect(u, parentSuspense); + } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); + } + { + devtoolsComponentUpdated(instance); + } + { + popWarningContext(); + } + } + }; + instance.scope.on(); + const effect = instance.effect = new ReactiveEffect(componentUpdateFn); + instance.scope.off(); + const update = instance.update = effect.run.bind(effect); + const job = instance.job = effect.runIfDirty.bind(effect); + job.i = instance; + job.id = instance.uid; + effect.scheduler = () => queueJob(job); + toggleRecurse(instance, true); + { + effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; + effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; + } + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + pauseTracking(); + flushPreFlushCbs(instance); + resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || EMPTY_ARR; + c2 = c2 || EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (nextChild.key != null) { + if (keyToNewIndexMap.has(nextChild.key)) { + warn$1( + `Duplicate keys found during update:`, + JSON.stringify(nextChild.key), + `Make sure keys are unique.` + ); + } + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs, + cacheIndex + } = vnode; + if (patchFlag === -2) { + optimized = false; + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (cacheIndex != null) { + parentComponent.renderCache[cacheIndex] = void 0; + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + internals, + doRemove + ); + } else if (dynamicChildren && // #5154 + // when v-once is used inside a block, setBlockTracking(-1) marks the + // parent block with hasOnce: true + // so that it doesn't take the fast path during unmount - otherwise + // components nested in v-once are never unmounted. + !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { + vnode.children.forEach((child) => { + if (child.type === Comment) { + hostRemove(child.el); + } else { + remove(child); + } + }); + } else { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } + }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + if (instance.type.__hmrId) { + unregisterHMR(instance); + } + const { bum, scope, job, subTree, um, m, a } = instance; + invalidateMount(m); + invalidateMount(a); + if (bum) { + invokeArrayFns(bum); + } + scope.stop(); + if (job) { + job.flags |= 8; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + { + devtoolsComponentRemoved(instance); + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + const el = hostNextSibling(vnode.anchor || vnode.el); + const teleportEnd = el && el[TeleportEndKey]; + return teleportEnd ? hostNextSibling(teleportEnd) : el; + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + container._vnode = vnode; + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + if (createHydrationFns) { + [hydrate, hydrateNode] = createHydrationFns( + internals + ); + } + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; +} +function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; +} +function toggleRecurse({ effect, job }, allowed) { + if (allowed) { + effect.flags |= 32; + job.flags |= 4; + } else { + effect.flags &= ~32; + job.flags &= ~4; + } +} +function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; +} +function traverseStaticChildren(n1, n2, shallow = false) { + const ch1 = n1.children; + const ch2 = n2.children; + if (isArray(ch1) && isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; + } + if (!shallow && c2.patchFlag !== -2) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } + if (c2.type === Comment && !c2.el) { + c2.el = c1.el; + } + } + } +} +function getSequence(arr) { + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; + } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } + } + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; +} +function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); + } + } +} +function invalidateMount(hooks) { + if (hooks) { + for (let i = 0; i < hooks.length; i++) + hooks[i].flags |= 8; + } +} + +const ssrContextKey = Symbol.for("v-scx"); +const useSSRContext = () => { + { + const ctx = inject(ssrContextKey); + if (!ctx) { + warn$1( + `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` + ); + } + return ctx; + } +}; + +function watchEffect(effect, options) { + return doWatch(effect, null, options); +} +function watchPostEffect(effect, options) { + return doWatch( + effect, + null, + extend({}, options, { flush: "post" }) + ); +} +function watchSyncEffect(effect, options) { + return doWatch( + effect, + null, + extend({}, options, { flush: "sync" }) + ); +} +function watch(source, cb, options) { + if (!isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); +} +function doWatch(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, flush, once } = options; + if (!cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + } + const baseWatchOptions = extend({}, options); + baseWatchOptions.onWarn = warn$1; + const runsImmediately = cb && immediate || !cb && flush !== "post"; + let ssrCleanup; + if (isInSSRComponentSetup) { + if (flush === "sync") { + const ctx = useSSRContext(); + ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); + } else if (!runsImmediately) { + const watchStopHandle = () => { + }; + watchStopHandle.stop = NOOP; + watchStopHandle.resume = NOOP; + watchStopHandle.pause = NOOP; + return watchStopHandle; + } + } + const instance = currentInstance; + baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args); + let isPre = false; + if (flush === "post") { + baseWatchOptions.scheduler = (job) => { + queuePostRenderEffect(job, instance && instance.suspense); + }; + } else if (flush !== "sync") { + isPre = true; + baseWatchOptions.scheduler = (job, isFirstRun) => { + if (isFirstRun) { + job(); + } else { + queueJob(job); + } + }; + } + baseWatchOptions.augmentJob = (job) => { + if (cb) { + job.flags |= 4; + } + if (isPre) { + job.flags |= 2; + if (instance) { + job.id = instance.uid; + job.i = instance; + } + } + }; + const watchHandle = watch$1(source, cb, baseWatchOptions); + if (isInSSRComponentSetup) { + if (ssrCleanup) { + ssrCleanup.push(watchHandle); + } else if (runsImmediately) { + watchHandle(); + } + } + return watchHandle; +} +function instanceWatch(source, value, options) { + const publicThis = this.proxy; + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; +} +function createPathGetter(ctx, path) { + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; +} + +function useModel(props, name, options = EMPTY_OBJ) { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useModel() called without active instance.`); + return ref(); + } + const camelizedName = camelize(name); + if (!i.propsOptions[0][camelizedName]) { + warn$1(`useModel() called with prop "${name}" which is not declared.`); + return ref(); + } + const hyphenatedName = hyphenate(name); + const modifiers = getModelModifiers(props, camelizedName); + const res = customRef((track, trigger) => { + let localValue; + let prevSetValue = EMPTY_OBJ; + let prevEmittedValue; + watchSyncEffect(() => { + const propValue = props[camelizedName]; + if (hasChanged(localValue, propValue)) { + localValue = propValue; + trigger(); + } + }); + return { + get() { + track(); + return options.get ? options.get(localValue) : localValue; + }, + set(value) { + const emittedValue = options.set ? options.set(value) : value; + if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) { + return; + } + const rawProps = i.vnode.props; + if (!(rawProps && // check if parent has passed v-model + (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) { + localValue = value; + trigger(); + } + i.emit(`update:${name}`, emittedValue); + if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) { + trigger(); + } + prevSetValue = value; + prevEmittedValue = emittedValue; + } + }; + }); + res[Symbol.iterator] = () => { + let i2 = 0; + return { + next() { + if (i2 < 2) { + return { value: i2++ ? modifiers || EMPTY_OBJ : res, done: false }; + } else { + return { done: true }; + } + } + }; + }; + return res; +} +const getModelModifiers = (props, modelName) => { + return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`]; +}; + +function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) return; + const props = instance.vnode.props || EMPTY_OBJ; + { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.` + ); + } + } else { + const validator = emitsOptions[event]; + if (isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } + } + } + } + } + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modifiers = isModelListener && getModelModifiers(props, event.slice(7)); + if (modifiers) { + if (modifiers.trim) { + args = rawArgs.map((a) => isString(a) ? a.trim() : a); + } + if (modifiers.number) { + args = rawArgs.map(looseToNumber); + } + } + { + devtoolsComponentEmit(instance, event, args); + } + { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( + event + )}" instead of "${event}".` + ); + } + } + let handlerName; + let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; + } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } +} +function normalizeEmitsOptions(comp, appContext, asMixin = false) { + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (!isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); + } + if (comp.extends) { + extendEmits(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendEmits); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); + } + return null; + } + if (isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { + cache.set(comp, normalized); + } + return normalized; +} +function isEmitListener(options, key) { + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); +} + +let accessedAttrs = false; +function markAttrsAccessed() { + accessedAttrs = true; +} +function renderComponentRoot(instance) { + const { + type: Component, + vnode, + proxy, + withProxy, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + props, + data, + setupState, + ctx, + inheritAttrs + } = instance; + const prev = setCurrentRenderingInstance(instance); + let result; + let fallthroughAttrs; + { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); + } + }) : proxyToUse; + result = normalizeVNode( + render.call( + thisProxy, + proxyToUse, + renderCache, + true ? shallowReadonly(props) : props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode( + render2.length > 1 ? render2( + true ? shallowReadonly(props) : props, + true ? { + get attrs() { + markAttrsAccessed(); + return shallowReadonly(attrs); + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + true ? shallowReadonly(props) : props, + null + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs, false, true); + } else if (!accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (isOn(key)) { + if (!isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); + } + } else { + extraAttrs.push(key); + } + } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.` + ); + } + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); + } + } + } + } + if (vnode.dirs) { + if (!isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); + } + root = cloneVNode(root, null, false, true); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!isElementRoot(root)) { + warn$1( + `Component inside <Transition> renders non-element root node that cannot be animated.` + ); + } + setTransitionHooks(root, vnode.transition); + } + if (setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance(prev); + return result; +} +const getChildRoot = (vnode) => { + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } + } + }; + return [normalizeVNode(childRoot), setRoot]; +}; +function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } + } + } + } else { + return; + } + } + return singleRoot; +} +const getFunctionalFallthrough = (attrs) => { + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || isOn(key)) { + (res || (res = {}))[key] = attrs[key]; + } + } + return res; +}; +const filterModelListeners = (attrs, props) => { + const res = {}; + for (const key in attrs) { + if (!isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; + } + } + return res; +}; +const isElementRoot = (vnode) => { + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; +}; +function shouldUpdateComponent(prevVNode, nextVNode, optimized) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if ((prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { + return true; + } + } + if (prevProps === nextProps) { + return false; + } + if (!prevProps) { + return !!nextProps; + } + if (!nextProps) { + return true; + } + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; +} +function hasPropsChanged(prevProps, nextProps, emitsOptions) { + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; + } + } + return false; +} +function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; + } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } +} + +const isSuspense = (type) => type.__isSuspense; +let suspenseId = 0; +const SuspenseImpl = { + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { + n2.suspense = n1.suspense; + n2.suspense.vnode = n2; + n2.el = n1.el; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + normalize: normalizeSuspenseChildren +}; +const Suspense = SuspenseImpl ; +function triggerEvent(vnode, name) { + const eventListener = vnode.props && vnode.props[name]; + if (isFunction(eventListener)) { + eventListener(); + } +} +function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } +} +function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } + } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); + } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); + } + } + } + } +} +let hasWarned = false; +function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + if (!hasWarned) { + hasWarned = true; + console[console.info ? "info" : "log"]( + `<Suspense> is an experimental feature and its API will likely change.` + ); + } + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; + } + } + const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; + { + assertNumber(timeout, `Suspense timeout`); + } + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + { + if (!resume && !suspense.pendingBranch) { + throw new Error( + `suspense.resolve() is called without a pending branch.` + ); + } + if (suspense.isUnmounted) { + throw new Error( + `suspense.resolve() is called on an already unmounted suspense boundary.` + ); + } + } + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) === container2) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect, optimized2) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + { + pushWarningContext(vnode2); + } + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized2 + ); + if (placeholder) { + remove(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + { + popWarningContext(); + } + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + } + }; + return suspense; +} +function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; +} +function normalizeSuspenseChildren(vnode) { + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); +} +function normalizeSuspenseSlot(s) { + let block; + if (isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); + } + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); + } + } + if (isArray(s)) { + const singleChild = filterSingleRoot(s); + if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { + warn$1(`<Suspense> slots expect a single root node.`); + } + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; +} +function queueEffectWithSuspense(fn, suspense) { + if (suspense && suspense.pendingBranch) { + if (isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); + } + } else { + queuePostFlushCb(fn); + } +} +function setActiveBranch(suspense, branch) { + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } +} +function isVNodeSuspensible(vnode) { + const suspensible = vnode.props && vnode.props.suspensible; + return suspensible != null && suspensible !== false; +} + +const Fragment = Symbol.for("v-fgt"); +const Text = Symbol.for("v-txt"); +const Comment = Symbol.for("v-cmt"); +const Static = Symbol.for("v-stc"); +const blockStack = []; +let currentBlock = null; +function openBlock(disableTracking = false) { + blockStack.push(currentBlock = disableTracking ? null : []); +} +function closeBlock() { + blockStack.pop(); + currentBlock = blockStack[blockStack.length - 1] || null; +} +let isBlockTreeEnabled = 1; +function setBlockTracking(value, inVOnce = false) { + isBlockTreeEnabled += value; + if (value < 0 && currentBlock && inVOnce) { + currentBlock.hasOnce = true; + } +} +function setupBlock(vnode) { + vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; + closeBlock(); + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(vnode); + } + return vnode; +} +function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { + return setupBlock( + createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + true + ) + ); +} +function createBlock(type, props, children, patchFlag, dynamicProps) { + return setupBlock( + createVNode( + type, + props, + children, + patchFlag, + dynamicProps, + true + ) + ); +} +function isVNode(value) { + return value ? value.__v_isVNode === true : false; +} +function isSameVNodeType(n1, n2) { + if (n2.shapeFlag & 6 && n1.component) { + const dirtyInstances = hmrDirtyComponents.get(n2.type); + if (dirtyInstances && dirtyInstances.has(n1.component)) { + n1.shapeFlag &= ~256; + n2.shapeFlag &= ~512; + return false; + } + } + return n1.type === n2.type && n1.key === n2.key; +} +let vnodeArgsTransformer; +function transformVNodeArgs(transformer) { + vnodeArgsTransformer = transformer; +} +const createVNodeWithArgsTransform = (...args) => { + return _createVNode( + ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args + ); +}; +const normalizeKey = ({ key }) => key != null ? key : null; +const normalizeRef = ({ + ref, + ref_key, + ref_for +}) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; +}; +function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetStart: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); + } + } else if (children) { + vnode.shapeFlag |= isString(children) ? 8 : 16; + } + if (vnode.key !== vnode.key) { + warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; +} +const createVNode = createVNodeWithArgsTransform ; +function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { + if (!type || type === NULL_DYNAMIC_COMPONENT) { + if (!type) { + warn$1(`Invalid vnode type when creating vnode: ${type}.`); + } + type = Comment; + } + if (isVNode(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); + } + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } + } + cloned.patchFlag = -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (isObject(style)) { + if (isProxy(style) && !isArray(style)) { + style = extend({}, style); + } + props.style = normalizeStyle(style); + } + } + const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; + if (shapeFlag & 4 && isProxy(type)) { + type = toRaw(type); + warn$1( + `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, + ` +Component that was made reactive: `, + type + ); + } + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); +} +function guardReactiveProps(props) { + if (!props) return null; + return isProxy(props) || isInternalObject(props) ? extend({}, props) : props; +} +function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) { + const { props, ref, patchFlag, children, transition } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, + target: vnode.target, + targetStart: vnode.targetStart, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + if (transition && cloneTransition) { + setTransitionHooks( + cloned, + transition.clone(cloned) + ); + } + return cloned; +} +function deepCloneVNode(vnode) { + const cloned = cloneVNode(vnode); + if (isArray(vnode.children)) { + cloned.children = vnode.children.map(deepCloneVNode); + } + return cloned; +} +function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); +} +function createStaticVNode(content, numberOfNodes) { + const vnode = createVNode(Static, null, content); + vnode.staticCount = numberOfNodes; + return vnode; +} +function createCommentVNode(text = "", asBlock = false) { + return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); +} +function normalizeVNode(child) { + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (isVNode(child)) { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } +} +function cloneIfMounted(child) { + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); +} +function normalizeChildren(vnode, children) { + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !isInternalObject(children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; + } + } + } + } else if (isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; + } + } + vnode.children = children; + vnode.shapeFlag |= type; +} +function mergeProps(...args) { + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = normalizeClass([ret.class, toMerge.class]); + } + } else if (key === "style") { + ret.style = normalizeStyle([ret.style, toMerge.style]); + } else if (isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } + } + } + return ret; +} +function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); +} + +const emptyAppContext = createAppContext(); +let uid = 0; +function createComponentInstance(vnode, parent, suspense) { + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + job: null, + scope: new EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + ids: parent ? parent.ids : ["", 0, 0], + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: EMPTY_OBJ, + data: EMPTY_OBJ, + props: EMPTY_OBJ, + attrs: EMPTY_OBJ, + slots: EMPTY_OBJ, + refs: EMPTY_OBJ, + setupState: EMPTY_OBJ, + setupContext: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + { + instance.ctx = createDevRenderContext(instance); + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; +} +let currentInstance = null; +const getCurrentInstance = () => currentInstance || currentRenderingInstance; +let internalSetCurrentInstance; +let setInSSRSetupState; +{ + const g = getGlobalThis(); + const registerGlobalSetter = (key, setter) => { + let setters; + if (!(setters = g[key])) setters = g[key] = []; + setters.push(setter); + return (v) => { + if (setters.length > 1) setters.forEach((set) => set(v)); + else setters[0](v); + }; + }; + internalSetCurrentInstance = registerGlobalSetter( + `__VUE_INSTANCE_SETTERS__`, + (v) => currentInstance = v + ); + setInSSRSetupState = registerGlobalSetter( + `__VUE_SSR_SETTERS__`, + (v) => isInSSRComponentSetup = v + ); +} +const setCurrentInstance = (instance) => { + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; +}; +const unsetCurrentInstance = () => { + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); +}; +const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); +function validateComponentName(name, { isNativeTag }) { + if (isBuiltInTag(name) || isNativeTag(name)) { + warn$1( + "Do not use built-in or reserved HTML elements as component id: " + name + ); + } +} +function isStatefulComponent(instance) { + return instance.vnode.shapeFlag & 4; +} +let isInSSRComponentSetup = false; +function setupComponent(instance, isSSR = false, optimized = false) { + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children, optimized); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; +} +function setupStatefulComponent(instance, isSSR) { + var _a; + const Component = instance.type; + { + if (Component.name) { + validateComponentName(Component.name, instance.appContext.config); + } + if (Component.components) { + const names = Object.keys(Component.components); + for (let i = 0; i < names.length; i++) { + validateComponentName(names[i], instance.appContext.config); + } + } + if (Component.directives) { + const names = Object.keys(Component.directives); + for (let i = 0; i < names.length; i++) { + validateDirectiveName(names[i]); + } + } + if (Component.compilerOptions && isRuntimeOnly()) { + warn$1( + `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` + ); + } + } + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers); + { + exposePropsOnRenderContext(instance); + } + const { setup } = Component; + if (setup) { + pauseTracking(); + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + shallowReadonly(instance.props) , + setupContext + ] + ); + const isAsyncSetup = isPromise(setupResult); + resetTracking(); + reset(); + if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) { + markAsyncBoundary(instance); + } + if (isAsyncSetup) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + if (!instance.suspense) { + const name = (_a = Component.name) != null ? _a : "Anonymous"; + warn$1( + `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` + ); + } + } + } else { + handleSetupResult(instance, setupResult, isSSR); + } + } else { + finishComponentSetup(instance, isSSR); + } +} +function handleSetupResult(instance, setupResult, isSSR) { + if (isFunction(setupResult)) { + if (instance.type.__ssrInlineRender) { + instance.ssrRender = setupResult; + } else { + instance.render = setupResult; + } + } else if (isObject(setupResult)) { + if (isVNode(setupResult)) { + warn$1( + `setup() should not return VNodes directly - return a render function instead.` + ); + } + { + instance.devtoolsRawSetupState = setupResult; + } + instance.setupState = proxyRefs(setupResult); + { + exposeSetupStateOnRenderContext(instance); + } + } else if (setupResult !== void 0) { + warn$1( + `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` + ); + } + finishComponentSetup(instance, isSSR); +} +let compile$1; +let installWithProxy; +function registerRuntimeCompiler(_compile) { + compile$1 = _compile; + installWithProxy = (i) => { + if (i.render._rc) { + i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); + } + }; +} +const isRuntimeOnly = () => !compile$1; +function finishComponentSetup(instance, isSSR, skipOptions) { + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile$1 && !Component.render) { + const template = Component.template || resolveMergedOptions(instance).template; + if (template) { + { + startMeasure(instance, `compile`); + } + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = extend( + extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions + ); + Component.render = compile$1(template, finalCompilerOptions); + { + endMeasure(instance, `compile`); + } + } + } + instance.render = Component.render || NOOP; + if (installWithProxy) { + installWithProxy(instance); + } + } + { + const reset = setCurrentInstance(instance); + pauseTracking(); + try { + applyOptions(instance); + } finally { + resetTracking(); + reset(); + } + } + if (!Component.render && instance.render === NOOP && !isSSR) { + if (!compile$1 && Component.template) { + warn$1( + `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.esm-browser.js" instead.` ) + ); + } else { + warn$1(`Component is missing template or render function: `, Component); + } + } +} +const attrsProxyHandlers = { + get(target, key) { + markAttrsAccessed(); + track(target, "get", ""); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } +} ; +function getSlotsProxy(instance) { + return new Proxy(instance.slots, { + get(target, key) { + track(instance, "get", "$slots"); + return target[key]; + } + }); +} +function createSetupContext(instance) { + const expose = (exposed) => { + { + if (instance.exposed) { + warn$1(`expose() should be called only once per setup().`); + } + if (exposed != null) { + let exposedType = typeof exposed; + if (exposedType === "object") { + if (isArray(exposed)) { + exposedType = "array"; + } else if (isRef(exposed)) { + exposedType = "ref"; + } + } + if (exposedType !== "object") { + warn$1( + `expose() should be passed a plain object, received ${exposedType}.` + ); + } + } + } + instance.exposed = exposed || {}; + }; + { + let attrsProxy; + let slotsProxy; + return Object.freeze({ + get attrs() { + return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers)); + }, + get slots() { + return slotsProxy || (slotsProxy = getSlotsProxy(instance)); + }, + get emit() { + return (event, ...args) => instance.emit(event, ...args); + }, + expose + }); + } +} +function getComponentPublicInstance(instance) { + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); + } + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } else { + return instance.proxy; + } +} +const classifyRE = /(?:^|[-_])(\w)/g; +const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); +function getComponentName(Component, includeInferred = true) { + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; +} +function formatComponentName(instance, Component, isRoot = false) { + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; + } + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; +} +function isClassComponent(value) { + return isFunction(value) && "__vccOpts" in value; +} + +const computed = (getterOrOptions, debugOptions) => { + const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); + { + const i = getCurrentInstance(); + if (i && i.appContext.config.warnRecursiveComputed) { + c._warnRecursive = true; + } + } + return c; +}; + +function h(type, propsOrChildren, children) { + const l = arguments.length; + if (l === 2) { + if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { + if (isVNode(propsOrChildren)) { + return createVNode(type, null, [propsOrChildren]); + } + return createVNode(type, propsOrChildren); + } else { + return createVNode(type, null, propsOrChildren); + } + } else { + if (l > 3) { + children = Array.prototype.slice.call(arguments, 2); + } else if (l === 3 && isVNode(children)) { + children = [children]; + } + return createVNode(type, propsOrChildren, children); + } +} + +function initCustomFormatter() { + if (typeof window === "undefined") { + return; + } + const vueStyle = { style: "color:#3ba776" }; + const numberStyle = { style: "color:#1677ff" }; + const stringStyle = { style: "color:#f5222d" }; + const keywordStyle = { style: "color:#eb2f96" }; + const formatter = { + __vue_custom_formatter: true, + header(obj) { + if (!isObject(obj)) { + return null; + } + if (obj.__isVue) { + return ["div", vueStyle, `VueInstance`]; + } else if (isRef(obj)) { + return [ + "div", + {}, + ["span", vueStyle, genRefFlag(obj)], + "<", + // avoid debugger accessing value affecting behavior + formatValue("_value" in obj ? obj._value : obj), + `>` + ]; + } else if (isReactive(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"], + "<", + formatValue(obj), + `>${isReadonly(obj) ? ` (readonly)` : ``}` + ]; + } else if (isReadonly(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"], + "<", + formatValue(obj), + ">" + ]; + } + return null; + }, + hasBody(obj) { + return obj && obj.__isVue; + }, + body(obj) { + if (obj && obj.__isVue) { + return [ + "div", + {}, + ...formatInstance(obj.$) + ]; + } + } + }; + function formatInstance(instance) { + const blocks = []; + if (instance.type.props && instance.props) { + blocks.push(createInstanceBlock("props", toRaw(instance.props))); + } + if (instance.setupState !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("setup", instance.setupState)); + } + if (instance.data !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("data", toRaw(instance.data))); + } + const computed = extractKeys(instance, "computed"); + if (computed) { + blocks.push(createInstanceBlock("computed", computed)); + } + const injected = extractKeys(instance, "inject"); + if (injected) { + blocks.push(createInstanceBlock("injected", injected)); + } + blocks.push([ + "div", + {}, + [ + "span", + { + style: keywordStyle.style + ";opacity:0.66" + }, + "$ (internal): " + ], + ["object", { object: instance }] + ]); + return blocks; + } + function createInstanceBlock(type, target) { + target = extend({}, target); + if (!Object.keys(target).length) { + return ["span", {}]; + } + return [ + "div", + { style: "line-height:1.25em;margin-bottom:0.6em" }, + [ + "div", + { + style: "color:#476582" + }, + type + ], + [ + "div", + { + style: "padding-left:1.25em" + }, + ...Object.keys(target).map((key) => { + return [ + "div", + {}, + ["span", keywordStyle, key + ": "], + formatValue(target[key], false) + ]; + }) + ] + ]; + } + function formatValue(v, asRaw = true) { + if (typeof v === "number") { + return ["span", numberStyle, v]; + } else if (typeof v === "string") { + return ["span", stringStyle, JSON.stringify(v)]; + } else if (typeof v === "boolean") { + return ["span", keywordStyle, v]; + } else if (isObject(v)) { + return ["object", { object: asRaw ? toRaw(v) : v }]; + } else { + return ["span", stringStyle, String(v)]; + } + } + function extractKeys(instance, type) { + const Comp = instance.type; + if (isFunction(Comp)) { + return; + } + const extracted = {}; + for (const key in instance.ctx) { + if (isKeyOfType(Comp, key, type)) { + extracted[key] = instance.ctx[key]; + } + } + return extracted; + } + function isKeyOfType(Comp, key, type) { + const opts = Comp[type]; + if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) { + return true; + } + if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { + return true; + } + if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { + return true; + } + } + function genRefFlag(v) { + if (isShallow(v)) { + return `ShallowRef`; + } + if (v.effect) { + return `ComputedRef`; + } + return `Ref`; + } + if (window.devtoolsFormatters) { + window.devtoolsFormatters.push(formatter); + } else { + window.devtoolsFormatters = [formatter]; + } +} + +function withMemo(memo, render, cache, index) { + const cached = cache[index]; + if (cached && isMemoSame(cached, memo)) { + return cached; + } + const ret = render(); + ret.memo = memo.slice(); + ret.cacheIndex = index; + return cache[index] = ret; +} +function isMemoSame(cached, memo) { + const prev = cached.memo; + if (prev.length != memo.length) { + return false; + } + for (let i = 0; i < prev.length; i++) { + if (hasChanged(prev[i], memo[i])) { + return false; + } + } + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(cached); + } + return true; +} + +const version = "3.5.13"; +const warn = warn$1 ; +const ErrorTypeStrings = ErrorTypeStrings$1 ; +const devtools = devtools$1 ; +const setDevtoolsHook = setDevtoolsHook$1 ; +const _ssrUtils = { + createComponentInstance, + setupComponent, + renderComponentRoot, + setCurrentRenderingInstance, + isVNode: isVNode, + normalizeVNode, + getComponentPublicInstance, + ensureValidVNode, + pushWarningContext, + popWarningContext +}; +const ssrUtils = _ssrUtils ; +const resolveFilter = null; +const compatUtils = null; +const DeprecationTypes = null; + +let policy = void 0; +const tt = typeof window !== "undefined" && window.trustedTypes; +if (tt) { + try { + policy = /* @__PURE__ */ tt.createPolicy("vue", { + createHTML: (val) => val + }); + } catch (e) { + warn(`Error creating trusted types policy: ${e}`); + } +} +const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val; +const svgNS = "http://www.w3.org/2000/svg"; +const mathmlNS = "http://www.w3.org/1998/Math/MathML"; +const doc = typeof document !== "undefined" ? document : null; +const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); +const nodeOps = { + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); + } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) break; + } + } else { + templateContainer.innerHTML = unsafeToTrustedHTML( + namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content + ); + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } +}; + +const TRANSITION = "transition"; +const ANIMATION = "animation"; +const vtcKey = Symbol("_vtc"); +const DOMTransitionPropsValidators = { + name: String, + type: String, + css: { + type: Boolean, + default: true + }, + duration: [String, Number, Object], + enterFromClass: String, + enterActiveClass: String, + enterToClass: String, + appearFromClass: String, + appearActiveClass: String, + appearToClass: String, + leaveFromClass: String, + leaveActiveClass: String, + leaveToClass: String +}; +const TransitionPropsValidators = /* @__PURE__ */ extend( + {}, + BaseTransitionPropsValidators, + DOMTransitionPropsValidators +); +const decorate$1 = (t) => { + t.displayName = "Transition"; + t.props = TransitionPropsValidators; + return t; +}; +const Transition = /* @__PURE__ */ decorate$1( + (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots) +); +const callHook = (hook, args = []) => { + if (isArray(hook)) { + hook.forEach((h2) => h2(...args)); + } else if (hook) { + hook(...args); + } +}; +const hasExplicitCallback = (hook) => { + return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; +}; +function resolveTransitionProps(rawProps) { + const baseProps = {}; + for (const key in rawProps) { + if (!(key in DOMTransitionPropsValidators)) { + baseProps[key] = rawProps[key]; + } + } + if (rawProps.css === false) { + return baseProps; + } + const { + name = "v", + type, + duration, + enterFromClass = `${name}-enter-from`, + enterActiveClass = `${name}-enter-active`, + enterToClass = `${name}-enter-to`, + appearFromClass = enterFromClass, + appearActiveClass = enterActiveClass, + appearToClass = enterToClass, + leaveFromClass = `${name}-leave-from`, + leaveActiveClass = `${name}-leave-active`, + leaveToClass = `${name}-leave-to` + } = rawProps; + const durations = normalizeDuration(duration); + const enterDuration = durations && durations[0]; + const leaveDuration = durations && durations[1]; + const { + onBeforeEnter, + onEnter, + onEnterCancelled, + onLeave, + onLeaveCancelled, + onBeforeAppear = onBeforeEnter, + onAppear = onEnter, + onAppearCancelled = onEnterCancelled + } = baseProps; + const finishEnter = (el, isAppear, done, isCancelled) => { + el._enterCancelled = isCancelled; + removeTransitionClass(el, isAppear ? appearToClass : enterToClass); + removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); + done && done(); + }; + const finishLeave = (el, done) => { + el._isLeaving = false; + removeTransitionClass(el, leaveFromClass); + removeTransitionClass(el, leaveToClass); + removeTransitionClass(el, leaveActiveClass); + done && done(); + }; + const makeEnterHook = (isAppear) => { + return (el, done) => { + const hook = isAppear ? onAppear : onEnter; + const resolve = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve]); + nextFrame(() => { + removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); + addTransitionClass(el, isAppear ? appearToClass : enterToClass); + if (!hasExplicitCallback(hook)) { + whenTransitionEnds(el, type, enterDuration, resolve); + } + }); + }; + }; + return extend(baseProps, { + onBeforeEnter(el) { + callHook(onBeforeEnter, [el]); + addTransitionClass(el, enterFromClass); + addTransitionClass(el, enterActiveClass); + }, + onBeforeAppear(el) { + callHook(onBeforeAppear, [el]); + addTransitionClass(el, appearFromClass); + addTransitionClass(el, appearActiveClass); + }, + onEnter: makeEnterHook(false), + onAppear: makeEnterHook(true), + onLeave(el, done) { + el._isLeaving = true; + const resolve = () => finishLeave(el, done); + addTransitionClass(el, leaveFromClass); + if (!el._enterCancelled) { + forceReflow(); + addTransitionClass(el, leaveActiveClass); + } else { + addTransitionClass(el, leaveActiveClass); + forceReflow(); + } + nextFrame(() => { + if (!el._isLeaving) { + return; + } + removeTransitionClass(el, leaveFromClass); + addTransitionClass(el, leaveToClass); + if (!hasExplicitCallback(onLeave)) { + whenTransitionEnds(el, type, leaveDuration, resolve); + } + }); + callHook(onLeave, [el, resolve]); + }, + onEnterCancelled(el) { + finishEnter(el, false, void 0, true); + callHook(onEnterCancelled, [el]); + }, + onAppearCancelled(el) { + finishEnter(el, true, void 0, true); + callHook(onAppearCancelled, [el]); + }, + onLeaveCancelled(el) { + finishLeave(el); + callHook(onLeaveCancelled, [el]); + } + }); +} +function normalizeDuration(duration) { + if (duration == null) { + return null; + } else if (isObject(duration)) { + return [NumberOf(duration.enter), NumberOf(duration.leave)]; + } else { + const n = NumberOf(duration); + return [n, n]; + } +} +function NumberOf(val) { + const res = toNumber(val); + { + assertNumber(res, "<transition> explicit duration"); + } + return res; +} +function addTransitionClass(el, cls) { + cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); + (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); +} +function removeTransitionClass(el, cls) { + cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.delete(cls); + if (!_vtc.size) { + el[vtcKey] = void 0; + } + } +} +function nextFrame(cb) { + requestAnimationFrame(() => { + requestAnimationFrame(cb); + }); +} +let endId = 0; +function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { + const id = el._endId = ++endId; + const resolveIfNotStale = () => { + if (id === el._endId) { + resolve(); + } + }; + if (explicitTimeout != null) { + return setTimeout(resolveIfNotStale, explicitTimeout); + } + const { type, timeout, propCount } = getTransitionInfo(el, expectedType); + if (!type) { + return resolve(); + } + const endEvent = type + "end"; + let ended = 0; + const end = () => { + el.removeEventListener(endEvent, onEnd); + resolveIfNotStale(); + }; + const onEnd = (e) => { + if (e.target === el && ++ended >= propCount) { + end(); + } + }; + setTimeout(() => { + if (ended < propCount) { + end(); + } + }, timeout + 1); + el.addEventListener(endEvent, onEnd); +} +function getTransitionInfo(el, expectedType) { + const styles = window.getComputedStyle(el); + const getStyleProperties = (key) => (styles[key] || "").split(", "); + const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); + const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); + const transitionTimeout = getTimeout(transitionDelays, transitionDurations); + const animationDelays = getStyleProperties(`${ANIMATION}Delay`); + const animationDurations = getStyleProperties(`${ANIMATION}Duration`); + const animationTimeout = getTimeout(animationDelays, animationDurations); + let type = null; + let timeout = 0; + let propCount = 0; + if (expectedType === TRANSITION) { + if (transitionTimeout > 0) { + type = TRANSITION; + timeout = transitionTimeout; + propCount = transitionDurations.length; + } + } else if (expectedType === ANIMATION) { + if (animationTimeout > 0) { + type = ANIMATION; + timeout = animationTimeout; + propCount = animationDurations.length; + } + } else { + timeout = Math.max(transitionTimeout, animationTimeout); + type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; + propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; + } + const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( + getStyleProperties(`${TRANSITION}Property`).toString() + ); + return { + type, + timeout, + propCount, + hasTransform + }; +} +function getTimeout(delays, durations) { + while (delays.length < durations.length) { + delays = delays.concat(delays); + } + return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); +} +function toMs(s) { + if (s === "auto") return 0; + return Number(s.slice(0, -1).replace(",", ".")) * 1e3; +} +function forceReflow() { + return document.body.offsetHeight; +} + +function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } +} + +const vShowOriginalDisplay = Symbol("_vod"); +const vShowHidden = Symbol("_vsh"); +const vShow = { + beforeMount(el, { value }, { transition }) { + el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display; + if (transition && value) { + transition.beforeEnter(el); + } else { + setDisplay(el, value); + } + }, + mounted(el, { value }, { transition }) { + if (transition && value) { + transition.enter(el); + } + }, + updated(el, { value, oldValue }, { transition }) { + if (!value === !oldValue) return; + if (transition) { + if (value) { + transition.beforeEnter(el); + setDisplay(el, true); + transition.enter(el); + } else { + transition.leave(el, () => { + setDisplay(el, false); + }); + } + } else { + setDisplay(el, value); + } + }, + beforeUnmount(el, { value }) { + setDisplay(el, value); + } +}; +{ + vShow.name = "show"; +} +function setDisplay(el, value) { + el.style.display = value ? el[vShowOriginalDisplay] : "none"; + el[vShowHidden] = !value; +} +function initVShowForSSR() { + vShow.getSSRProps = ({ value }) => { + if (!value) { + return { style: { display: "none" } }; + } + }; +} + +const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); +function useCssVars(getter) { + const instance = getCurrentInstance(); + if (!instance) { + warn(`useCssVars is called without current active component instance.`); + return; + } + const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { + Array.from( + document.querySelectorAll(`[data-v-owner="${instance.uid}"]`) + ).forEach((node) => setVarsOnNode(node, vars)); + }; + { + instance.getCssVars = () => getter(instance.proxy); + } + const setVars = () => { + const vars = getter(instance.proxy); + if (instance.ce) { + setVarsOnNode(instance.ce, vars); + } else { + setVarsOnVNode(instance.subTree, vars); + } + updateTeleports(vars); + }; + onBeforeUpdate(() => { + queuePostFlushCb(setVars); + }); + onMounted(() => { + watch(setVars, NOOP, { flush: "post" }); + const ob = new MutationObserver(setVars); + ob.observe(instance.subTree.el.parentNode, { childList: true }); + onUnmounted(() => ob.disconnect()); + }); +} +function setVarsOnVNode(vnode, vars) { + if (vnode.shapeFlag & 128) { + const suspense = vnode.suspense; + vnode = suspense.activeBranch; + if (suspense.pendingBranch && !suspense.isHydrating) { + suspense.effects.push(() => { + setVarsOnVNode(suspense.activeBranch, vars); + }); + } + } + while (vnode.component) { + vnode = vnode.component.subTree; + } + if (vnode.shapeFlag & 1 && vnode.el) { + setVarsOnNode(vnode.el, vars); + } else if (vnode.type === Fragment) { + vnode.children.forEach((c) => setVarsOnVNode(c, vars)); + } else if (vnode.type === Static) { + let { el, anchor } = vnode; + while (el) { + setVarsOnNode(el, vars); + if (el === anchor) break; + el = el.nextSibling; + } + } +} +function setVarsOnNode(el, vars) { + if (el.nodeType === 1) { + const style = el.style; + let cssText = ""; + for (const key in vars) { + style.setProperty(`--${key}`, vars[key]); + cssText += `--${key}: ${vars[key]};`; + } + style[CSS_VAR_TEXT] = cssText; + } +} + +const displayRE = /(^|;)\s*display\s*:/; +function patchStyle(el, prev, next) { + const style = el.style; + const isCssString = isString(next); + let hasControlledDisplay = false; + if (next && !isCssString) { + if (prev) { + if (!isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } else { + for (const prevStyle of prev.split(";")) { + const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim(); + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + } + for (const key in next) { + if (key === "display") { + hasControlledDisplay = true; + } + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + hasControlledDisplay = displayRE.test(next); + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOriginalDisplay in el) { + el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : ""; + if (el[vShowHidden]) { + style.display = "none"; + } + } +} +const semicolonRE = /[^\\];\s*$/; +const importantRE = /\s*!important$/; +function setStyle(style, name, val) { + if (isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) val = ""; + { + if (semicolonRE.test(val)) { + warn( + `Unexpected semicolon at the end of '${name}' style value: '${val}'` + ); + } + } + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } +} +const prefixes = ["Webkit", "Moz", "ms"]; +const prefixCache = {}; +function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; +} + +const xlinkNS = "http://www.w3.org/1999/xlink"; +function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + if (value == null || isBoolean && !includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute( + key, + isBoolean ? "" : isSymbol(value) ? String(value) : value + ); + } + } +} + +function patchDOMProp(el, key, value, parentComponent, attrName) { + if (key === "innerHTML" || key === "textContent") { + if (value != null) { + el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value; + } + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; + const newValue = value == null ? ( + // #11647: value should be set as empty string for null and undefined, + // but <input type="checkbox"> should be set as 'on'. + el.type === "checkbox" ? "on" : "" + ) : String(value); + if (oldValue !== newValue || !("_value" in el)) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + el._value = value; + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + if (!needRemove) { + warn( + `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, + e + ); + } + } + needRemove && el.removeAttribute(attrName || key); +} + +function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); +} +function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); +} +const veiKey = Symbol("_vei"); +function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = sanitizeEventValue(nextValue, rawName) ; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker( + sanitizeEventValue(nextValue, rawName) , + instance + ); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } +} +const optionsModifierRE = /(?:Once|Passive|Capture)$/; +function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); + return [event, options]; +} +let cachedNow = 0; +const p = /* @__PURE__ */ Promise.resolve(); +const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); +function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; +} +function sanitizeEventValue(value, propName) { + if (isFunction(value) || isArray(value)) { + return value; + } + warn( + `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop? +Expected function or array of functions, received type ${typeof value}.` + ); + return NOOP; +} +function patchStopImmediatePropagation(e, value) { + if (isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map( + (fn) => (e2) => !e2._stopped && fn && fn(e2) + ); + } else { + return value; + } +} + +const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter +key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; +const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (isOn(key)) { + if (!isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp(el, key, nextValue); + if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { + patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); + } + } else if ( + // #11081 force set props for possible async custom element + el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue)) + ) { + patchDOMProp(el, camelize(key), nextValue, parentComponent, key); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } +}; +function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && isString(value)) { + return false; + } + return key in el; +} + +const REMOVAL = {}; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineCustomElement(options, extraOptions, _createApp) { + const Comp = defineComponent(options, extraOptions); + if (isPlainObject(Comp)) extend(Comp, extraOptions); + class VueCustomElement extends VueElement { + constructor(initialProps) { + super(Comp, initialProps, _createApp); + } + } + VueCustomElement.def = Comp; + return VueCustomElement; +} +/*! #__NO_SIDE_EFFECTS__ */ +const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => { + return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp); +}; +const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { +}; +class VueElement extends BaseClass { + constructor(_def, _props = {}, _createApp = createApp) { + super(); + this._def = _def; + this._props = _props; + this._createApp = _createApp; + this._isVueCE = true; + /** + * @internal + */ + this._instance = null; + /** + * @internal + */ + this._app = null; + /** + * @internal + */ + this._nonce = this._def.nonce; + this._connected = false; + this._resolved = false; + this._numberProps = null; + this._styleChildren = /* @__PURE__ */ new WeakSet(); + this._ob = null; + if (this.shadowRoot && _createApp !== createApp) { + this._root = this.shadowRoot; + } else { + if (this.shadowRoot) { + warn( + `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` + ); + } + if (_def.shadowRoot !== false) { + this.attachShadow({ mode: "open" }); + this._root = this.shadowRoot; + } else { + this._root = this; + } + } + if (!this._def.__asyncLoader) { + this._resolveProps(this._def); + } + } + connectedCallback() { + if (!this.isConnected) return; + if (!this.shadowRoot) { + this._parseSlots(); + } + this._connected = true; + let parent = this; + while (parent = parent && (parent.parentNode || parent.host)) { + if (parent instanceof VueElement) { + this._parent = parent; + break; + } + } + if (!this._instance) { + if (this._resolved) { + this._setParent(); + this._update(); + } else { + if (parent && parent._pendingResolve) { + this._pendingResolve = parent._pendingResolve.then(() => { + this._pendingResolve = void 0; + this._resolveDef(); + }); + } else { + this._resolveDef(); + } + } + } + } + _setParent(parent = this._parent) { + if (parent) { + this._instance.parent = parent._instance; + this._instance.provides = parent._instance.provides; + } + } + disconnectedCallback() { + this._connected = false; + nextTick(() => { + if (!this._connected) { + if (this._ob) { + this._ob.disconnect(); + this._ob = null; + } + this._app && this._app.unmount(); + if (this._instance) this._instance.ce = void 0; + this._app = this._instance = null; + } + }); + } + /** + * resolve inner component definition (handle possible async component) + */ + _resolveDef() { + if (this._pendingResolve) { + return; + } + for (let i = 0; i < this.attributes.length; i++) { + this._setAttr(this.attributes[i].name); + } + this._ob = new MutationObserver((mutations) => { + for (const m of mutations) { + this._setAttr(m.attributeName); + } + }); + this._ob.observe(this, { attributes: true }); + const resolve = (def, isAsync = false) => { + this._resolved = true; + this._pendingResolve = void 0; + const { props, styles } = def; + let numberProps; + if (props && !isArray(props)) { + for (const key in props) { + const opt = props[key]; + if (opt === Number || opt && opt.type === Number) { + if (key in this._props) { + this._props[key] = toNumber(this._props[key]); + } + (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true; + } + } + } + this._numberProps = numberProps; + if (isAsync) { + this._resolveProps(def); + } + if (this.shadowRoot) { + this._applyStyles(styles); + } else if (styles) { + warn( + "Custom element style injection is not supported when using shadowRoot: false" + ); + } + this._mount(def); + }; + const asyncDef = this._def.__asyncLoader; + if (asyncDef) { + this._pendingResolve = asyncDef().then( + (def) => resolve(this._def = def, true) + ); + } else { + resolve(this._def); + } + } + _mount(def) { + if (!def.name) { + def.name = "VueElement"; + } + this._app = this._createApp(def); + if (def.configureApp) { + def.configureApp(this._app); + } + this._app._ceVNode = this._createVNode(); + this._app.mount(this._root); + const exposed = this._instance && this._instance.exposed; + if (!exposed) return; + for (const key in exposed) { + if (!hasOwn(this, key)) { + Object.defineProperty(this, key, { + // unwrap ref to be consistent with public instance behavior + get: () => unref(exposed[key]) + }); + } else { + warn(`Exposed property "${key}" already exists on custom element.`); + } + } + } + _resolveProps(def) { + const { props } = def; + const declaredPropKeys = isArray(props) ? props : Object.keys(props || {}); + for (const key of Object.keys(this)) { + if (key[0] !== "_" && declaredPropKeys.includes(key)) { + this._setProp(key, this[key]); + } + } + for (const key of declaredPropKeys.map(camelize)) { + Object.defineProperty(this, key, { + get() { + return this._getProp(key); + }, + set(val) { + this._setProp(key, val, true, true); + } + }); + } + } + _setAttr(key) { + if (key.startsWith("data-v-")) return; + const has = this.hasAttribute(key); + let value = has ? this.getAttribute(key) : REMOVAL; + const camelKey = camelize(key); + if (has && this._numberProps && this._numberProps[camelKey]) { + value = toNumber(value); + } + this._setProp(camelKey, value, false, true); + } + /** + * @internal + */ + _getProp(key) { + return this._props[key]; + } + /** + * @internal + */ + _setProp(key, val, shouldReflect = true, shouldUpdate = false) { + if (val !== this._props[key]) { + if (val === REMOVAL) { + delete this._props[key]; + } else { + this._props[key] = val; + if (key === "key" && this._app) { + this._app._ceVNode.key = val; + } + } + if (shouldUpdate && this._instance) { + this._update(); + } + if (shouldReflect) { + const ob = this._ob; + ob && ob.disconnect(); + if (val === true) { + this.setAttribute(hyphenate(key), ""); + } else if (typeof val === "string" || typeof val === "number") { + this.setAttribute(hyphenate(key), val + ""); + } else if (!val) { + this.removeAttribute(hyphenate(key)); + } + ob && ob.observe(this, { attributes: true }); + } + } + } + _update() { + render(this._createVNode(), this._root); + } + _createVNode() { + const baseProps = {}; + if (!this.shadowRoot) { + baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this); + } + const vnode = createVNode(this._def, extend(baseProps, this._props)); + if (!this._instance) { + vnode.ce = (instance) => { + this._instance = instance; + instance.ce = this; + instance.isCE = true; + { + instance.ceReload = (newStyles) => { + if (this._styles) { + this._styles.forEach((s) => this._root.removeChild(s)); + this._styles.length = 0; + } + this._applyStyles(newStyles); + this._instance = null; + this._update(); + }; + } + const dispatch = (event, args) => { + this.dispatchEvent( + new CustomEvent( + event, + isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args } + ) + ); + }; + instance.emit = (event, ...args) => { + dispatch(event, args); + if (hyphenate(event) !== event) { + dispatch(hyphenate(event), args); + } + }; + this._setParent(); + }; + } + return vnode; + } + _applyStyles(styles, owner) { + if (!styles) return; + if (owner) { + if (owner === this._def || this._styleChildren.has(owner)) { + return; + } + this._styleChildren.add(owner); + } + const nonce = this._nonce; + for (let i = styles.length - 1; i >= 0; i--) { + const s = document.createElement("style"); + if (nonce) s.setAttribute("nonce", nonce); + s.textContent = styles[i]; + this.shadowRoot.prepend(s); + { + if (owner) { + if (owner.__hmrId) { + if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map(); + let entry = this._childStyles.get(owner.__hmrId); + if (!entry) { + this._childStyles.set(owner.__hmrId, entry = []); + } + entry.push(s); + } + } else { + (this._styles || (this._styles = [])).push(s); + } + } + } + } + /** + * Only called when shadowRoot is false + */ + _parseSlots() { + const slots = this._slots = {}; + let n; + while (n = this.firstChild) { + const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default"; + (slots[slotName] || (slots[slotName] = [])).push(n); + this.removeChild(n); + } + } + /** + * Only called when shadowRoot is false + */ + _renderSlots() { + const outlets = (this._teleportTarget || this).querySelectorAll("slot"); + const scopeId = this._instance.type.__scopeId; + for (let i = 0; i < outlets.length; i++) { + const o = outlets[i]; + const slotName = o.getAttribute("name") || "default"; + const content = this._slots[slotName]; + const parent = o.parentNode; + if (content) { + for (const n of content) { + if (scopeId && n.nodeType === 1) { + const id = scopeId + "-s"; + const walker = document.createTreeWalker(n, 1); + n.setAttribute(id, ""); + let child; + while (child = walker.nextNode()) { + child.setAttribute(id, ""); + } + } + parent.insertBefore(n, o); + } + } else { + while (o.firstChild) parent.insertBefore(o.firstChild, o); + } + parent.removeChild(o); + } + } + /** + * @internal + */ + _injectChildStyle(comp) { + this._applyStyles(comp.styles, comp); + } + /** + * @internal + */ + _removeChildStyle(comp) { + { + this._styleChildren.delete(comp); + if (this._childStyles && comp.__hmrId) { + const oldStyles = this._childStyles.get(comp.__hmrId); + if (oldStyles) { + oldStyles.forEach((s) => this._root.removeChild(s)); + oldStyles.length = 0; + } + } + } + } +} +function useHost(caller) { + const instance = getCurrentInstance(); + const el = instance && instance.ce; + if (el) { + return el; + } else { + if (!instance) { + warn( + `${caller || "useHost"} called without an active component instance.` + ); + } else { + warn( + `${caller || "useHost"} can only be used in components defined via defineCustomElement.` + ); + } + } + return null; +} +function useShadowRoot() { + const el = useHost("useShadowRoot") ; + return el && el.shadowRoot; +} + +function useCssModule(name = "$style") { + { + const instance = getCurrentInstance(); + if (!instance) { + warn(`useCssModule must be called inside setup()`); + return EMPTY_OBJ; + } + const modules = instance.type.__cssModules; + if (!modules) { + warn(`Current instance does not have CSS modules injected.`); + return EMPTY_OBJ; + } + const mod = modules[name]; + if (!mod) { + warn(`Current instance does not have CSS module named "${name}".`); + return EMPTY_OBJ; + } + return mod; + } +} + +const positionMap = /* @__PURE__ */ new WeakMap(); +const newPositionMap = /* @__PURE__ */ new WeakMap(); +const moveCbKey = Symbol("_moveCb"); +const enterCbKey = Symbol("_enterCb"); +const decorate = (t) => { + delete t.props.mode; + return t; +}; +const TransitionGroupImpl = /* @__PURE__ */ decorate({ + name: "TransitionGroup", + props: /* @__PURE__ */ extend({}, TransitionPropsValidators, { + tag: String, + moveClass: String + }), + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevChildren; + let children; + onUpdated(() => { + if (!prevChildren.length) { + return; + } + const moveClass = props.moveClass || `${props.name || "v"}-move`; + if (!hasCSSTransform( + prevChildren[0].el, + instance.vnode.el, + moveClass + )) { + return; + } + prevChildren.forEach(callPendingCbs); + prevChildren.forEach(recordPosition); + const movedChildren = prevChildren.filter(applyTranslation); + forceReflow(); + movedChildren.forEach((c) => { + const el = c.el; + const style = el.style; + addTransitionClass(el, moveClass); + style.transform = style.webkitTransform = style.transitionDuration = ""; + const cb = el[moveCbKey] = (e) => { + if (e && e.target !== el) { + return; + } + if (!e || /transform$/.test(e.propertyName)) { + el.removeEventListener("transitionend", cb); + el[moveCbKey] = null; + removeTransitionClass(el, moveClass); + } + }; + el.addEventListener("transitionend", cb); + }); + }); + return () => { + const rawProps = toRaw(props); + const cssTransitionProps = resolveTransitionProps(rawProps); + let tag = rawProps.tag || Fragment; + prevChildren = []; + if (children) { + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.el && child.el instanceof Element) { + prevChildren.push(child); + setTransitionHooks( + child, + resolveTransitionHooks( + child, + cssTransitionProps, + state, + instance + ) + ); + positionMap.set( + child, + child.el.getBoundingClientRect() + ); + } + } + } + children = slots.default ? getTransitionRawChildren(slots.default()) : []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.key != null) { + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + } else if (child.type !== Text) { + warn(`<TransitionGroup> children must be keyed.`); + } + } + return createVNode(tag, null, children); + }; + } +}); +const TransitionGroup = TransitionGroupImpl; +function callPendingCbs(c) { + const el = c.el; + if (el[moveCbKey]) { + el[moveCbKey](); + } + if (el[enterCbKey]) { + el[enterCbKey](); + } +} +function recordPosition(c) { + newPositionMap.set(c, c.el.getBoundingClientRect()); +} +function applyTranslation(c) { + const oldPos = positionMap.get(c); + const newPos = newPositionMap.get(c); + const dx = oldPos.left - newPos.left; + const dy = oldPos.top - newPos.top; + if (dx || dy) { + const s = c.el.style; + s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; + s.transitionDuration = "0s"; + return c; + } +} +function hasCSSTransform(el, root, moveClass) { + const clone = el.cloneNode(); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.forEach((cls) => { + cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); + }); + } + moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); + clone.style.display = "none"; + const container = root.nodeType === 1 ? root : root.parentNode; + container.appendChild(clone); + const { hasTransform } = getTransitionInfo(clone); + container.removeChild(clone); + return hasTransform; +} + +const getModelAssigner = (vnode) => { + const fn = vnode.props["onUpdate:modelValue"] || false; + return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; +}; +function onCompositionStart(e) { + e.target.composing = true; +} +function onCompositionEnd(e) { + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } +} +const assignKey = Symbol("_assign"); +const vModelText = { + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); + } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) return; + const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy && value === oldValue) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } +}; +const vModelCheckbox = { + // #4096 array checkboxes need to be deep traversed + deep: true, + created(el, _, vnode) { + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + const modelValue = el._modelValue; + const elementValue = getValue(el); + const checked = el.checked; + const assign = el[assignKey]; + if (isArray(modelValue)) { + const index = looseIndexOf(modelValue, elementValue); + const found = index !== -1; + if (checked && !found) { + assign(modelValue.concat(elementValue)); + } else if (!checked && found) { + const filtered = [...modelValue]; + filtered.splice(index, 1); + assign(filtered); + } + } else if (isSet(modelValue)) { + const cloned = new Set(modelValue); + if (checked) { + cloned.add(elementValue); + } else { + cloned.delete(elementValue); + } + assign(cloned); + } else { + assign(getCheckboxValue(el, checked)); + } + }); + }, + // set initial checked on mount to wait for true-value/false-value + mounted: setChecked, + beforeUpdate(el, binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + setChecked(el, binding, vnode); + } +}; +function setChecked(el, { value, oldValue }, vnode) { + el._modelValue = value; + let checked; + if (isArray(value)) { + checked = looseIndexOf(value, vnode.props.value) > -1; + } else if (isSet(value)) { + checked = value.has(vnode.props.value); + } else { + if (value === oldValue) return; + checked = looseEqual(value, getCheckboxValue(el, true)); + } + if (el.checked !== checked) { + el.checked = checked; + } +} +const vModelRadio = { + created(el, { value }, vnode) { + el.checked = looseEqual(value, vnode.props.value); + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + el[assignKey](getValue(el)); + }); + }, + beforeUpdate(el, { value, oldValue }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (value !== oldValue) { + el.checked = looseEqual(value, vnode.props.value); + } + } +}; +const vModelSelect = { + // <select multiple> value need to be deep traversed + deep: true, + created(el, { value, modifiers: { number } }, vnode) { + const isSetModel = isSet(value); + addEventListener(el, "change", () => { + const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( + (o) => number ? looseToNumber(getValue(o)) : getValue(o) + ); + el[assignKey]( + el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] + ); + el._assigning = true; + nextTick(() => { + el._assigning = false; + }); + }); + el[assignKey] = getModelAssigner(vnode); + }, + // set value in mounted & updated because <select> relies on its children + // <option>s. + mounted(el, { value }) { + setSelected(el, value); + }, + beforeUpdate(el, _binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + }, + updated(el, { value }) { + if (!el._assigning) { + setSelected(el, value); + } + } +}; +function setSelected(el, value) { + const isMultiple = el.multiple; + const isArrayValue = isArray(value); + if (isMultiple && !isArrayValue && !isSet(value)) { + warn( + `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` + ); + return; + } + for (let i = 0, l = el.options.length; i < l; i++) { + const option = el.options[i]; + const optionValue = getValue(option); + if (isMultiple) { + if (isArrayValue) { + const optionType = typeof optionValue; + if (optionType === "string" || optionType === "number") { + option.selected = value.some((v) => String(v) === String(optionValue)); + } else { + option.selected = looseIndexOf(value, optionValue) > -1; + } + } else { + option.selected = value.has(optionValue); + } + } else if (looseEqual(getValue(option), value)) { + if (el.selectedIndex !== i) el.selectedIndex = i; + return; + } + } + if (!isMultiple && el.selectedIndex !== -1) { + el.selectedIndex = -1; + } +} +function getValue(el) { + return "_value" in el ? el._value : el.value; +} +function getCheckboxValue(el, checked) { + const key = checked ? "_trueValue" : "_falseValue"; + return key in el ? el[key] : checked; +} +const vModelDynamic = { + created(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "created"); + }, + mounted(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "mounted"); + }, + beforeUpdate(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); + }, + updated(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "updated"); + } +}; +function resolveDynamicModel(tagName, type) { + switch (tagName) { + case "SELECT": + return vModelSelect; + case "TEXTAREA": + return vModelText; + default: + switch (type) { + case "checkbox": + return vModelCheckbox; + case "radio": + return vModelRadio; + default: + return vModelText; + } + } +} +function callModelHook(el, binding, vnode, prevVNode, hook) { + const modelToUse = resolveDynamicModel( + el.tagName, + vnode.props && vnode.props.type + ); + const fn = modelToUse[hook]; + fn && fn(el, binding, vnode, prevVNode); +} +function initVModelForSSR() { + vModelText.getSSRProps = ({ value }) => ({ value }); + vModelRadio.getSSRProps = ({ value }, vnode) => { + if (vnode.props && looseEqual(vnode.props.value, value)) { + return { checked: true }; + } + }; + vModelCheckbox.getSSRProps = ({ value }, vnode) => { + if (isArray(value)) { + if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) { + return { checked: true }; + } + } else if (isSet(value)) { + if (vnode.props && value.has(vnode.props.value)) { + return { checked: true }; + } + } else if (value) { + return { checked: true }; + } + }; + vModelDynamic.getSSRProps = (binding, vnode) => { + if (typeof vnode.type !== "string") { + return; + } + const modelToUse = resolveDynamicModel( + // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase + vnode.type.toUpperCase(), + vnode.props && vnode.props.type + ); + if (modelToUse.getSSRProps) { + return modelToUse.getSSRProps(binding, vnode); + } + }; +} + +const systemModifiers = ["ctrl", "shift", "alt", "meta"]; +const modifierGuards = { + stop: (e) => e.stopPropagation(), + prevent: (e) => e.preventDefault(), + self: (e) => e.target !== e.currentTarget, + ctrl: (e) => !e.ctrlKey, + shift: (e) => !e.shiftKey, + alt: (e) => !e.altKey, + meta: (e) => !e.metaKey, + left: (e) => "button" in e && e.button !== 0, + middle: (e) => "button" in e && e.button !== 1, + right: (e) => "button" in e && e.button !== 2, + exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) +}; +const withModifiers = (fn, modifiers) => { + const cache = fn._withMods || (fn._withMods = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { + for (let i = 0; i < modifiers.length; i++) { + const guard = modifierGuards[modifiers[i]]; + if (guard && guard(event, modifiers)) return; + } + return fn(event, ...args); + }); +}; +const keyNames = { + esc: "escape", + space: " ", + up: "arrow-up", + left: "arrow-left", + right: "arrow-right", + down: "arrow-down", + delete: "backspace" +}; +const withKeys = (fn, modifiers) => { + const cache = fn._withKeys || (fn._withKeys = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event) => { + if (!("key" in event)) { + return; + } + const eventKey = hyphenate(event.key); + if (modifiers.some( + (k) => k === eventKey || keyNames[k] === eventKey + )) { + return fn(event); + } + }); +}; + +const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); +let renderer; +let enabledHydration = false; +function ensureRenderer() { + return renderer || (renderer = createRenderer(rendererOptions)); +} +function ensureHydrationRenderer() { + renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions); + enabledHydration = true; + return renderer; +} +const render = (...args) => { + ensureRenderer().render(...args); +}; +const hydrate = (...args) => { + ensureHydrationRenderer().hydrate(...args); +}; +const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) return; + const component = app._component; + if (!isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; + } + if (container.nodeType === 1) { + container.textContent = ""; + } + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); + } + return proxy; + }; + return app; +}; +const createSSRApp = (...args) => { + const app = ensureHydrationRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (container) { + return mount(container, true, resolveRootNamespace(container)); + } + }; + return app; +}; +function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } +} +function injectNativeTagCheck(app) { + Object.defineProperty(app.config, "isNativeTag", { + value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + writable: false + }); +} +function injectCompilerOptionsCheck(app) { + if (isRuntimeOnly()) { + const isCustomElement = app.config.isCustomElement; + Object.defineProperty(app.config, "isCustomElement", { + get() { + return isCustomElement; + }, + set() { + warn( + `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` + ); + } + }); + const compilerOptions = app.config.compilerOptions; + const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. +- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. +- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader +- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; + Object.defineProperty(app.config, "compilerOptions", { + get() { + warn(msg); + return compilerOptions; + }, + set() { + warn(msg); + } + }); + } +} +function normalizeContainer(container) { + if (isString(container)) { + const res = document.querySelector(container); + if (!res) { + warn( + `Failed to mount app: mount target selector "${container}" returned null.` + ); + } + return res; + } + if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { + warn( + `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` + ); + } + return container; +} +let ssrDirectiveInitialized = false; +const initDirectivesForSSR = () => { + if (!ssrDirectiveInitialized) { + ssrDirectiveInitialized = true; + initVModelForSSR(); + initVShowForSSR(); + } +} ; + +function initDev() { + { + { + console.info( + `You are running a development build of Vue. +Make sure to use the production build (*.prod.js) when deploying for production.` + ); + } + initCustomFormatter(); + } +} + +{ + initDev(); +} +const compile = () => { + { + warn( + `Runtime compilation is not supported in this build of Vue.` + (` Use "vue.esm-browser.js" instead.` ) + ); + } +}; + +export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, compile, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId }; diff --git a/vuetest/node_modules/vue/dist/vue.runtime.esm-browser.prod.js b/vuetest/node_modules/vue/dist/vue.runtime.esm-browser.prod.js new file mode 100644 index 0000000..9d0fddf --- /dev/null +++ b/vuetest/node_modules/vue/dist/vue.runtime.esm-browser.prod.js @@ -0,0 +1,5 @@ +/** +* vue v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/var e,t;let n,l,r,i,s,o,a,u,c,f,p,d;function h(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return e=>e in t}let g={},m=[],_=()=>{},y=()=>!1,b=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||97>e.charCodeAt(2)),S=e=>e.startsWith("onUpdate:"),C=Object.assign,x=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},E=Object.prototype.hasOwnProperty,w=(e,t)=>E.call(e,t),k=Array.isArray,T=e=>"[object Map]"===F(e),A=e=>"[object Set]"===F(e),R=e=>"[object Date]"===F(e),N=e=>"[object RegExp]"===F(e),O=e=>"function"==typeof e,P=e=>"string"==typeof e,M=e=>"symbol"==typeof e,I=e=>null!==e&&"object"==typeof e,L=e=>(I(e)||O(e))&&O(e.then)&&O(e.catch),D=Object.prototype.toString,F=e=>D.call(e),V=e=>F(e).slice(8,-1),U=e=>"[object Object]"===F(e),j=e=>P(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,B=h(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),$=e=>{let t=Object.create(null);return n=>t[n]||(t[n]=e(n))},H=/-(\w)/g,W=$(e=>e.replace(H,(e,t)=>t?t.toUpperCase():"")),K=/\B([A-Z])/g,z=$(e=>e.replace(K,"-$1").toLowerCase()),q=$(e=>e.charAt(0).toUpperCase()+e.slice(1)),G=$(e=>e?`on${q(e)}`:""),J=(e,t)=>!Object.is(e,t),X=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Z=(e,t,n,l=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:l,value:n})},Y=e=>{let t=parseFloat(e);return isNaN(t)?e:t},Q=e=>{let t=P(e)?Number(e):NaN;return isNaN(t)?e:t},ee=()=>n||(n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),et=h("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function en(e){if(k(e)){let t={};for(let n=0;n<e.length;n++){let l=e[n],r=P(l)?function(e){let t={};return e.replace(ei,"").split(el).forEach(e=>{if(e){let n=e.split(er);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}(l):en(l);if(r)for(let e in r)t[e]=r[e]}return t}if(P(e)||I(e))return e}let el=/;(?![^(]*\))/g,er=/:([^]+)/,ei=/\/\*[^]*?\*\//g;function es(e){let t="";if(P(e))t=e;else if(k(e))for(let n=0;n<e.length;n++){let l=es(e[n]);l&&(t+=l+" ")}else if(I(e))for(let n in e)e[n]&&(t+=n+" ");return t.trim()}function eo(e){if(!e)return null;let{class:t,style:n}=e;return t&&!P(t)&&(e.class=es(t)),n&&(e.style=en(n)),e}let ea=h("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function eu(e,t){if(e===t)return!0;let n=R(e),l=R(t);if(n||l)return!!n&&!!l&&e.getTime()===t.getTime();if(n=M(e),l=M(t),n||l)return e===t;if(n=k(e),l=k(t),n||l)return!!n&&!!l&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let l=0;n&&l<e.length;l++)n=eu(e[l],t[l]);return n}(e,t);if(n=I(e),l=I(t),n||l){if(!n||!l||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){let l=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(l&&!r||!l&&r||!eu(e[n],t[n]))return!1}}return String(e)===String(t)}function ec(e,t){return e.findIndex(e=>eu(e,t))}let ef=e=>!!(e&&!0===e.__v_isRef),ep=e=>P(e)?e:null==e?"":k(e)||I(e)&&(e.toString===D||!O(e.toString))?ef(e)?ep(e.value):JSON.stringify(e,ed,2):String(e),ed=(e,t)=>ef(t)?ed(e,t.value):T(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],l)=>(e[eh(t,l)+" =>"]=n,e),{})}:A(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>eh(e))}:M(t)?eh(t):!I(t)||k(t)||U(t)?t:String(t),eh=(e,t="")=>{var n;return M(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};class eg{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=l,!e&&l&&(this.index=(l.scopes||(l.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let t=l;try{return l=this,e()}finally{l=t}}}on(){l=this}off(){l=this.parent}stop(e){if(this._active){let t,n;for(t=0,this._active=!1,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,this.effects.length=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}function ev(e){return new eg(e)}function em(){return l}function e_(e,t=!1){l&&l.cleanups.push(e)}let ey=new WeakSet;class eb{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,l&&l.active&&l.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,ey.has(this)&&(ey.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||eC(this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,eL(this),eE(this);let e=r,t=eO;r=this,eO=!0;try{return this.fn()}finally{ew(this),r=e,eO=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)eA(e);this.deps=this.depsTail=void 0,eL(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?ey.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ek(this)&&this.run()}get dirty(){return ek(this)}}let eS=0;function eC(e,t=!1){if(e.flags|=8,t){e.next=s,s=e;return}e.next=i,i=e}function ex(){let e;if(!(--eS>0)){if(s){let e=s;for(s=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}for(;i;){let t=i;for(i=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}}function eE(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ew(e){let t;let n=e.depsTail,l=n;for(;l;){let e=l.prevDep;-1===l.version?(l===n&&(n=e),eA(l),function(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}(l)):t=l,l.dep.activeLink=l.prevActiveLink,l.prevActiveLink=void 0,l=e}e.deps=t,e.depsTail=n}function ek(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(eT(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function eT(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===eD))return;e.globalVersion=eD;let t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!ek(e)){e.flags&=-3;return}let n=r,l=eO;r=e,eO=!0;try{eE(e);let n=e.fn(e._value);(0===t.version||J(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{r=n,eO=l,ew(e),e.flags&=-3}}function eA(e,t=!1){let{dep:n,prevSub:l,nextSub:r}=e;if(l&&(l.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=l,e.nextSub=void 0),n.subs===e&&(n.subs=l,!l&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)eA(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}function eR(e,t){e.effect instanceof eb&&(e=e.effect.fn);let n=new eb(e);t&&C(n,t);try{n.run()}catch(e){throw n.stop(),e}let l=n.run.bind(n);return l.effect=n,l}function eN(e){e.effect.stop()}let eO=!0,eP=[];function eM(){eP.push(eO),eO=!1}function eI(){let e=eP.pop();eO=void 0===e||e}function eL(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=r;r=void 0;try{t()}finally{r=e}}}let eD=0;class eF{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class eV{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!r||!eO||r===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==r)t=this.activeLink=new eF(r,this),r.deps?(t.prevDep=r.depsTail,r.depsTail.nextDep=t,r.depsTail=t):r.deps=r.depsTail=t,function e(t){if(t.dep.sc++,4&t.sub.flags){let n=t.dep.computed;if(n&&!t.dep.subs){n.flags|=20;for(let t=n.deps;t;t=t.nextDep)e(t)}let l=t.dep.subs;l!==t&&(t.prevSub=l,l&&(l.nextSub=t)),t.dep.subs=t}}(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=r.depsTail,t.nextDep=void 0,r.depsTail.nextDep=t,r.depsTail=t,r.deps===t&&(r.deps=e)}return t}trigger(e){this.version++,eD++,this.notify(e)}notify(e){eS++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{ex()}}}let eU=new WeakMap,ej=Symbol(""),eB=Symbol(""),e$=Symbol("");function eH(e,t,n){if(eO&&r){let t=eU.get(e);t||eU.set(e,t=new Map);let l=t.get(n);l||(t.set(n,l=new eV),l.map=t,l.key=n),l.track()}}function eW(e,t,n,l,r,i){let s=eU.get(e);if(!s){eD++;return}let o=e=>{e&&e.trigger()};if(eS++,"clear"===t)s.forEach(o);else{let r=k(e),i=r&&j(n);if(r&&"length"===n){let e=Number(l);s.forEach((t,n)=>{("length"===n||n===e$||!M(n)&&n>=e)&&o(t)})}else switch((void 0!==n||s.has(void 0))&&o(s.get(n)),i&&o(s.get(e$)),t){case"add":r?i&&o(s.get("length")):(o(s.get(ej)),T(e)&&o(s.get(eB)));break;case"delete":!r&&(o(s.get(ej)),T(e)&&o(s.get(eB)));break;case"set":T(e)&&o(s.get(ej))}}ex()}function eK(e){let t=tS(e);return t===e?t:(eH(t,"iterate",e$),ty(e)?t:t.map(tx))}function ez(e){return eH(e=tS(e),"iterate",e$),e}let eq={__proto__:null,[Symbol.iterator](){return eG(this,Symbol.iterator,tx)},concat(...e){return eK(this).concat(...e.map(e=>k(e)?eK(e):e))},entries(){return eG(this,"entries",e=>(e[1]=tx(e[1]),e))},every(e,t){return eX(this,"every",e,t,void 0,arguments)},filter(e,t){return eX(this,"filter",e,t,e=>e.map(tx),arguments)},find(e,t){return eX(this,"find",e,t,tx,arguments)},findIndex(e,t){return eX(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return eX(this,"findLast",e,t,tx,arguments)},findLastIndex(e,t){return eX(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return eX(this,"forEach",e,t,void 0,arguments)},includes(...e){return eY(this,"includes",e)},indexOf(...e){return eY(this,"indexOf",e)},join(e){return eK(this).join(e)},lastIndexOf(...e){return eY(this,"lastIndexOf",e)},map(e,t){return eX(this,"map",e,t,void 0,arguments)},pop(){return eQ(this,"pop")},push(...e){return eQ(this,"push",e)},reduce(e,...t){return eZ(this,"reduce",e,t)},reduceRight(e,...t){return eZ(this,"reduceRight",e,t)},shift(){return eQ(this,"shift")},some(e,t){return eX(this,"some",e,t,void 0,arguments)},splice(...e){return eQ(this,"splice",e)},toReversed(){return eK(this).toReversed()},toSorted(e){return eK(this).toSorted(e)},toSpliced(...e){return eK(this).toSpliced(...e)},unshift(...e){return eQ(this,"unshift",e)},values(){return eG(this,"values",tx)}};function eG(e,t,n){let l=ez(e),r=l[t]();return l===e||ty(e)||(r._next=r.next,r.next=()=>{let e=r._next();return e.value&&(e.value=n(e.value)),e}),r}let eJ=Array.prototype;function eX(e,t,n,l,r,i){let s=ez(e),o=s!==e&&!ty(e),a=s[t];if(a!==eJ[t]){let t=a.apply(e,i);return o?tx(t):t}let u=n;s!==e&&(o?u=function(t,l){return n.call(this,tx(t),l,e)}:n.length>2&&(u=function(t,l){return n.call(this,t,l,e)}));let c=a.call(s,u,l);return o&&r?r(c):c}function eZ(e,t,n,l){let r=ez(e),i=n;return r!==e&&(ty(e)?n.length>3&&(i=function(t,l,r){return n.call(this,t,l,r,e)}):i=function(t,l,r){return n.call(this,t,tx(l),r,e)}),r[t](i,...l)}function eY(e,t,n){let l=tS(e);eH(l,"iterate",e$);let r=l[t](...n);return(-1===r||!1===r)&&tb(n[0])?(n[0]=tS(n[0]),l[t](...n)):r}function eQ(e,t,n=[]){eM(),eS++;let l=tS(e)[t].apply(e,n);return ex(),eI(),l}let e0=h("__proto__,__v_isRef,__isVue"),e1=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(M));function e2(e){M(e)||(e=String(e));let t=tS(this);return eH(t,"has",e),t.hasOwnProperty(e)}class e6{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if("__v_skip"===t)return e.__v_skip;let l=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!l;if("__v_isReadonly"===t)return l;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(l?r?tf:tc:r?tu:ta).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let i=k(e);if(!l){let e;if(i&&(e=eq[t]))return e;if("hasOwnProperty"===t)return e2}let s=Reflect.get(e,t,tw(e)?e:n);return(M(t)?e1.has(t):e0(t))?s:(l||eH(e,"get",t),r)?s:tw(s)?i&&j(t)?s:s.value:I(s)?l?th(s):tp(s):s}}class e4 extends e6{constructor(e=!1){super(!1,e)}set(e,t,n,l){let r=e[t];if(!this._isShallow){let t=t_(r);if(ty(n)||t_(n)||(r=tS(r),n=tS(n)),!k(e)&&tw(r)&&!tw(n))return!t&&(r.value=n,!0)}let i=k(e)&&j(t)?Number(t)<e.length:w(e,t),s=Reflect.set(e,t,n,tw(e)?e:l);return e===tS(l)&&(i?J(n,r)&&eW(e,"set",t,n):eW(e,"add",t,n)),s}deleteProperty(e,t){let n=w(e,t);e[t];let l=Reflect.deleteProperty(e,t);return l&&n&&eW(e,"delete",t,void 0),l}has(e,t){let n=Reflect.has(e,t);return M(t)&&e1.has(t)||eH(e,"has",t),n}ownKeys(e){return eH(e,"iterate",k(e)?"length":ej),Reflect.ownKeys(e)}}class e8 extends e6{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}let e3=new e4,e5=new e8,e9=new e4(!0),e7=new e8(!0),te=e=>e,tt=e=>Reflect.getPrototypeOf(e);function tn(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function tl(e,t){let n=function(e,t){let n={get(n){let l=this.__v_raw,r=tS(l),i=tS(n);e||(J(n,i)&&eH(r,"get",n),eH(r,"get",i));let{has:s}=tt(r),o=t?te:e?tE:tx;return s.call(r,n)?o(l.get(n)):s.call(r,i)?o(l.get(i)):void(l!==r&&l.get(n))},get size(){let t=this.__v_raw;return e||eH(tS(t),"iterate",ej),Reflect.get(t,"size",t)},has(t){let n=this.__v_raw,l=tS(n),r=tS(t);return e||(J(t,r)&&eH(l,"has",t),eH(l,"has",r)),t===r?n.has(t):n.has(t)||n.has(r)},forEach(n,l){let r=this,i=r.__v_raw,s=tS(i),o=t?te:e?tE:tx;return e||eH(s,"iterate",ej),i.forEach((e,t)=>n.call(l,o(e),o(t),r))}};return C(n,e?{add:tn("add"),set:tn("set"),delete:tn("delete"),clear:tn("clear")}:{add(e){t||ty(e)||t_(e)||(e=tS(e));let n=tS(this);return tt(n).has.call(n,e)||(n.add(e),eW(n,"add",e,e)),this},set(e,n){t||ty(n)||t_(n)||(n=tS(n));let l=tS(this),{has:r,get:i}=tt(l),s=r.call(l,e);s||(e=tS(e),s=r.call(l,e));let o=i.call(l,e);return l.set(e,n),s?J(n,o)&&eW(l,"set",e,n):eW(l,"add",e,n),this},delete(e){let t=tS(this),{has:n,get:l}=tt(t),r=n.call(t,e);r||(e=tS(e),r=n.call(t,e)),l&&l.call(t,e);let i=t.delete(e);return r&&eW(t,"delete",e,void 0),i},clear(){let e=tS(this),t=0!==e.size,n=e.clear();return t&&eW(e,"clear",void 0,void 0),n}}),["keys","values","entries",Symbol.iterator].forEach(l=>{n[l]=function(...n){let r=this.__v_raw,i=tS(r),s=T(i),o="entries"===l||l===Symbol.iterator&&s,a=r[l](...n),u=t?te:e?tE:tx;return e||eH(i,"iterate","keys"===l&&s?eB:ej),{next(){let{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:o?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}),n}(e,t);return(t,l,r)=>"__v_isReactive"===l?!e:"__v_isReadonly"===l?e:"__v_raw"===l?t:Reflect.get(w(n,l)&&l in t?n:t,l,r)}let tr={get:tl(!1,!1)},ti={get:tl(!1,!0)},ts={get:tl(!0,!1)},to={get:tl(!0,!0)},ta=new WeakMap,tu=new WeakMap,tc=new WeakMap,tf=new WeakMap;function tp(e){return t_(e)?e:tv(e,!1,e3,tr,ta)}function td(e){return tv(e,!1,e9,ti,tu)}function th(e){return tv(e,!0,e5,ts,tc)}function tg(e){return tv(e,!0,e7,to,tf)}function tv(e,t,n,l,r){if(!I(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let i=r.get(e);if(i)return i;let s=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(V(e));if(0===s)return e;let o=new Proxy(e,2===s?l:n);return r.set(e,o),o}function tm(e){return t_(e)?tm(e.__v_raw):!!(e&&e.__v_isReactive)}function t_(e){return!!(e&&e.__v_isReadonly)}function ty(e){return!!(e&&e.__v_isShallow)}function tb(e){return!!e&&!!e.__v_raw}function tS(e){let t=e&&e.__v_raw;return t?tS(t):e}function tC(e){return!w(e,"__v_skip")&&Object.isExtensible(e)&&Z(e,"__v_skip",!0),e}let tx=e=>I(e)?tp(e):e,tE=e=>I(e)?th(e):e;function tw(e){return!!e&&!0===e.__v_isRef}function tk(e){return tA(e,!1)}function tT(e){return tA(e,!0)}function tA(e,t){return tw(e)?e:new tR(e,t)}class tR{constructor(e,t){this.dep=new eV,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:tS(e),this._value=t?e:tx(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||ty(e)||t_(e);J(e=n?e:tS(e),t)&&(this._rawValue=e,this._value=n?e:tx(e),this.dep.trigger())}}function tN(e){e.dep&&e.dep.trigger()}function tO(e){return tw(e)?e.value:e}function tP(e){return O(e)?e():tO(e)}let tM={get:(e,t,n)=>"__v_raw"===t?e:tO(Reflect.get(e,t,n)),set:(e,t,n,l)=>{let r=e[t];return tw(r)&&!tw(n)?(r.value=n,!0):Reflect.set(e,t,n,l)}};function tI(e){return tm(e)?e:new Proxy(e,tM)}class tL{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new eV,{get:n,set:l}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=l}get value(){return this._value=this._get()}set value(e){this._set(e)}}function tD(e){return new tL(e)}function tF(e){let t=k(e)?Array(e.length):{};for(let n in e)t[n]=tB(e,n);return t}class tV{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){let n=eU.get(e);return n&&n.get(t)}(tS(this._object),this._key)}}class tU{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function tj(e,t,n){return tw(e)?e:O(e)?new tU(e):I(e)&&arguments.length>1?tB(e,t,n):tk(e)}function tB(e,t,n){let l=e[t];return tw(l)?l:new tV(e,t,n)}class t${constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new eV(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=eD-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags)&&r!==this)return eC(this,!0),!0}get value(){let e=this.dep.track();return eT(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}let tH={GET:"get",HAS:"has",ITERATE:"iterate"},tW={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},tK={},tz=new WeakMap;function tq(){return p}function tG(e,t=!1,n=p){if(n){let t=tz.get(n);t||tz.set(n,t=[]),t.push(e)}}function tJ(e,t=1/0,n){if(t<=0||!I(e)||e.__v_skip||(n=n||new Set).has(e))return e;if(n.add(e),t--,tw(e))tJ(e.value,t,n);else if(k(e))for(let l=0;l<e.length;l++)tJ(e[l],t,n);else if(A(e)||T(e))e.forEach(e=>{tJ(e,t,n)});else if(U(e)){for(let l in e)tJ(e[l],t,n);for(let l of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,l)&&tJ(e[l],t,n)}return e}function tX(e,t){}let tZ={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"};function tY(e,t,n,l){try{return l?e(...l):e()}catch(e){t0(e,t,n)}}function tQ(e,t,n,l){if(O(e)){let r=tY(e,t,n,l);return r&&L(r)&&r.catch(e=>{t0(e,t,n)}),r}if(k(e)){let r=[];for(let i=0;i<e.length;i++)r.push(tQ(e[i],t,n,l));return r}}function t0(e,t,n,l=!0){t&&t.vnode;let{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||g;if(t){let l=t.parent,i=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){let t=l.ec;if(t){for(let n=0;n<t.length;n++)if(!1===t[n](e,i,s))return}l=l.parent}if(r){eM(),tY(r,null,10,[e,i,s]),eI();return}}!function(e,t,n,l=!0,r=!1){if(r)throw e;console.error(e)}(e,0,0,l,i)}let t1=[],t2=-1,t6=[],t4=null,t8=0,t3=Promise.resolve(),t5=null;function t9(e){let t=t5||t3;return e?t.then(this?e.bind(this):e):t}function t7(e){if(!(1&e.flags)){let t=nr(e),n=t1[t1.length-1];!n||!(2&e.flags)&&t>=nr(n)?t1.push(e):t1.splice(function(e){let t=t2+1,n=t1.length;for(;t<n;){let l=t+n>>>1,r=t1[l],i=nr(r);i<e||i===e&&2&r.flags?t=l+1:n=l}return t}(t),0,e),e.flags|=1,ne()}}function ne(){t5||(t5=t3.then(function e(t){try{for(t2=0;t2<t1.length;t2++){let e=t1[t2];!e||8&e.flags||(4&e.flags&&(e.flags&=-2),tY(e,e.i,e.i?15:14),4&e.flags||(e.flags&=-2))}}finally{for(;t2<t1.length;t2++){let e=t1[t2];e&&(e.flags&=-2)}t2=-1,t1.length=0,nl(),t5=null,(t1.length||t6.length)&&e()}}))}function nt(e){k(e)?t6.push(...e):t4&&-1===e.id?t4.splice(t8+1,0,e):1&e.flags||(t6.push(e),e.flags|=1),ne()}function nn(e,t,n=t2+1){for(;n<t1.length;n++){let t=t1[n];if(t&&2&t.flags){if(e&&t.id!==e.uid)continue;t1.splice(n,1),n--,4&t.flags&&(t.flags&=-2),t(),4&t.flags||(t.flags&=-2)}}}function nl(e){if(t6.length){let e=[...new Set(t6)].sort((e,t)=>nr(e)-nr(t));if(t6.length=0,t4){t4.push(...e);return}for(t8=0,t4=e;t8<t4.length;t8++){let e=t4[t8];4&e.flags&&(e.flags&=-2),8&e.flags||e(),e.flags&=-2}t4=null,t8=0}}let nr=e=>null==e.id?2&e.flags?-1:1/0:e.id,ni=null,ns=null;function no(e){let t=ni;return ni=e,ns=e&&e.type.__scopeId||null,t}function na(e){ns=e}function nu(){ns=null}let nc=e=>nf;function nf(e,t=ni,n){if(!t||e._n)return e;let l=(...n)=>{let r;l._d&&r7(-1);let i=no(t);try{r=e(...n)}finally{no(i),l._d&&r7(1)}return r};return l._n=!0,l._c=!0,l._d=!0,l}function np(e,t){if(null===ni)return e;let n=iV(ni),l=e.dirs||(e.dirs=[]);for(let e=0;e<t.length;e++){let[r,i,s,o=g]=t[e];r&&(O(r)&&(r={mounted:r,updated:r}),r.deep&&tJ(i),l.push({dir:r,instance:n,value:i,oldValue:void 0,arg:s,modifiers:o}))}return e}function nd(e,t,n,l){let r=e.dirs,i=t&&t.dirs;for(let s=0;s<r.length;s++){let o=r[s];i&&(o.oldValue=i[s].value);let a=o.dir[l];a&&(eM(),tQ(a,n,8,[e.el,o,e,t]),eI())}}let nh=Symbol("_vte"),ng=e=>e.__isTeleport,nv=e=>e&&(e.disabled||""===e.disabled),nm=e=>e&&(e.defer||""===e.defer),n_=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,ny=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,nb=(e,t)=>{let n=e&&e.to;return P(n)?t?t(n):null:n},nS={name:"Teleport",__isTeleport:!0,process(e,t,n,l,r,i,s,o,a,u){let{mc:c,pc:f,pbc:p,o:{insert:d,querySelector:h,createText:g,createComment:m}}=u,_=nv(t.props),{shapeFlag:y,children:b,dynamicChildren:S}=t;if(null==e){let e=t.el=g(""),u=t.anchor=g("");d(e,n,l),d(u,n,l);let f=(e,t)=>{16&y&&(r&&r.isCE&&(r.ce._teleportTarget=e),c(b,e,t,r,i,s,o,a))},p=()=>{let e=t.target=nb(t.props,h),n=nw(e,t,g,d);e&&("svg"!==s&&n_(e)?s="svg":"mathml"!==s&&ny(e)&&(s="mathml"),_||(f(e,n),nE(t,!1)))};_&&(f(n,u),nE(t,!0)),nm(t.props)?ry(()=>{p(),t.el.__isMounted=!0},i):p()}else{if(nm(t.props)&&!e.el.__isMounted){ry(()=>{nS.process(e,t,n,l,r,i,s,o,a,u),delete e.el.__isMounted},i);return}t.el=e.el,t.targetStart=e.targetStart;let c=t.anchor=e.anchor,d=t.target=e.target,g=t.targetAnchor=e.targetAnchor,m=nv(e.props),y=m?n:d;if("svg"===s||n_(d)?s="svg":("mathml"===s||ny(d))&&(s="mathml"),S?(p(e.dynamicChildren,S,y,r,i,s,o),rk(e,t,!0)):a||f(e,t,y,m?c:g,r,i,s,o,!1),_)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):nC(t,n,c,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=nb(t.props,h);e&&nC(t,e,null,u,0)}else m&&nC(t,d,g,u,1);nE(t,_)}},remove(e,t,n,{um:l,o:{remove:r}},i){let{shapeFlag:s,children:o,anchor:a,targetStart:u,targetAnchor:c,target:f,props:p}=e;if(f&&(r(u),r(c)),i&&r(a),16&s){let e=i||!nv(p);for(let r=0;r<o.length;r++){let i=o[r];l(i,t,n,e,!!i.dynamicChildren)}}},move:nC,hydrate:function(e,t,n,l,r,i,{o:{nextSibling:s,parentNode:o,querySelector:a,insert:u,createText:c}},f){let p=t.target=nb(t.props,a);if(p){let a=nv(t.props),d=p._lpa||p.firstChild;if(16&t.shapeFlag){if(a)t.anchor=f(s(e),t,o(e),n,l,r,i),t.targetStart=d,t.targetAnchor=d&&s(d);else{t.anchor=s(e);let o=d;for(;o;){if(o&&8===o.nodeType){if("teleport start anchor"===o.data)t.targetStart=o;else if("teleport anchor"===o.data){t.targetAnchor=o,p._lpa=t.targetAnchor&&s(t.targetAnchor);break}}o=s(o)}t.targetAnchor||nw(p,t,c,u),f(d&&s(d),t,p,n,l,r,i)}}nE(t,a)}return t.anchor&&s(t.anchor)}};function nC(e,t,n,{o:{insert:l},m:r},i=2){0===i&&l(e.targetAnchor,t,n);let{el:s,anchor:o,shapeFlag:a,children:u,props:c}=e,f=2===i;if(f&&l(s,t,n),(!f||nv(c))&&16&a)for(let e=0;e<u.length;e++)r(u[e],t,n,2);f&&l(o,t,n)}let nx=nS;function nE(e,t){let n=e.ctx;if(n&&n.ut){let l,r;for(t?(l=e.el,r=e.anchor):(l=e.targetStart,r=e.targetAnchor);l&&l!==r;)1===l.nodeType&&l.setAttribute("data-v-owner",n.uid),l=l.nextSibling;n.ut()}}function nw(e,t,n,l){let r=t.targetStart=n(""),i=t.targetAnchor=n("");return r[nh]=i,e&&(l(r,e),l(i,e)),i}let nk=Symbol("_leaveCb"),nT=Symbol("_enterCb");function nA(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return lf(()=>{e.isMounted=!0}),lh(()=>{e.isUnmounting=!0}),e}let nR=[Function,Array],nN={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:nR,onEnter:nR,onAfterEnter:nR,onEnterCancelled:nR,onBeforeLeave:nR,onLeave:nR,onAfterLeave:nR,onLeaveCancelled:nR,onBeforeAppear:nR,onAppear:nR,onAfterAppear:nR,onAppearCancelled:nR},nO=e=>{let t=e.subTree;return t.component?nO(t.component):t};function nP(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==r2){t=n;break}}return t}let nM={name:"BaseTransition",props:nN,setup(e,{slots:t}){let n=ik(),l=nA();return()=>{let r=t.default&&nU(t.default(),!0);if(!r||!r.length)return;let i=nP(r),s=tS(e),{mode:o}=s;if(l.isLeaving)return nD(i);let a=nF(i);if(!a)return nD(i);let u=nL(a,s,l,n,e=>u=e);a.type!==r2&&nV(a,u);let c=n.subTree&&nF(n.subTree);if(c&&c.type!==r2&&!ii(a,c)&&nO(n).type!==r2){let e=nL(c,s,l,n);if(nV(c,e),"out-in"===o&&a.type!==r2)return l.isLeaving=!0,e.afterLeave=()=>{l.isLeaving=!1,8&n.job.flags||n.update(),delete e.afterLeave,c=void 0},nD(i);"in-out"===o&&a.type!==r2?e.delayLeave=(e,t,n)=>{nI(l,c)[String(c.key)]=c,e[nk]=()=>{t(),e[nk]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{n(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function nI(e,t){let{leavingVNodes:n}=e,l=n.get(t.type);return l||(l=Object.create(null),n.set(t.type,l)),l}function nL(e,t,n,l,r){let{appear:i,mode:s,persisted:o=!1,onBeforeEnter:a,onEnter:u,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:p,onLeave:d,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:m,onAppear:_,onAfterAppear:y,onAppearCancelled:b}=t,S=String(e.key),C=nI(n,e),x=(e,t)=>{e&&tQ(e,l,9,t)},E=(e,t)=>{let n=t[1];x(e,t),k(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},w={mode:s,persisted:o,beforeEnter(t){let l=a;if(!n.isMounted){if(!i)return;l=m||a}t[nk]&&t[nk](!0);let r=C[S];r&&ii(e,r)&&r.el[nk]&&r.el[nk](),x(l,[t])},enter(e){let t=u,l=c,r=f;if(!n.isMounted){if(!i)return;t=_||u,l=y||c,r=b||f}let s=!1,o=e[nT]=t=>{s||(s=!0,t?x(r,[e]):x(l,[e]),w.delayedLeave&&w.delayedLeave(),e[nT]=void 0)};t?E(t,[e,o]):o()},leave(t,l){let r=String(e.key);if(t[nT]&&t[nT](!0),n.isUnmounting)return l();x(p,[t]);let i=!1,s=t[nk]=n=>{i||(i=!0,l(),n?x(g,[t]):x(h,[t]),t[nk]=void 0,C[r]!==e||delete C[r])};C[r]=e,d?E(d,[t,s]):s()},clone(e){let i=nL(e,t,n,l,r);return r&&r(i),i}};return w}function nD(e){if(le(e))return(e=id(e)).children=null,e}function nF(e){if(!le(e))return ng(e.type)&&e.children?nP(e.children):e;let{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&O(n.default))return n.default()}}function nV(e,t){6&e.shapeFlag&&e.component?(e.transition=t,nV(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function nU(e,t=!1,n){let l=[],r=0;for(let i=0;i<e.length;i++){let s=e[i],o=null==n?s.key:String(n)+String(null!=s.key?s.key:i);s.type===r0?(128&s.patchFlag&&r++,l=l.concat(nU(s.children,t,o))):(t||s.type!==r2)&&l.push(null!=o?id(s,{key:o}):s)}if(r>1)for(let e=0;e<l.length;e++)l[e].patchFlag=-2;return l}function nj(e,t){return O(e)?C({name:e.name},t,{setup:e}):e}function nB(){let e=ik();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function n$(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function nH(e){let t=ik(),n=tT(null);return t&&Object.defineProperty(t.refs===g?t.refs={}:t.refs,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e}),n}function nW(e,t,n,l,r=!1){if(k(e)){e.forEach((e,i)=>nW(e,t&&(k(t)?t[i]:t),n,l,r));return}if(n5(l)&&!r){512&l.shapeFlag&&l.type.__asyncResolved&&l.component.subTree.component&&nW(e,t,n,l.component.subTree);return}let i=4&l.shapeFlag?iV(l.component):l.el,s=r?null:i,{i:o,r:a}=e,u=t&&t.r,c=o.refs===g?o.refs={}:o.refs,f=o.setupState,p=tS(f),d=f===g?()=>!1:e=>w(p,e);if(null!=u&&u!==a&&(P(u)?(c[u]=null,d(u)&&(f[u]=null)):tw(u)&&(u.value=null)),O(a))tY(a,o,12,[s,c]);else{let t=P(a),l=tw(a);if(t||l){let o=()=>{if(e.f){let n=t?d(a)?f[a]:c[a]:a.value;r?k(n)&&x(n,i):k(n)?n.includes(i)||n.push(i):t?(c[a]=[i],d(a)&&(f[a]=c[a])):(a.value=[i],e.k&&(c[e.k]=a.value))}else t?(c[a]=s,d(a)&&(f[a]=s)):l&&(a.value=s,e.k&&(c[e.k]=s))};s?(o.id=-1,ry(o,n)):o()}}}let nK=!1,nz=()=>{nK||(console.error("Hydration completed but contains mismatches."),nK=!0)},nq=e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName,nG=e=>e.namespaceURI.includes("MathML"),nJ=e=>{if(1===e.nodeType){if(nq(e))return"svg";if(nG(e))return"mathml"}},nX=e=>8===e.nodeType;function nZ(e){let{mt:t,p:n,o:{patchProp:l,createText:r,nextSibling:i,parentNode:s,remove:o,insert:a,createComment:u}}=e,c=(n,l,o,u,y,b=!1)=>{b=b||!!l.dynamicChildren;let S=nX(n)&&"["===n.data,C=()=>h(n,l,o,u,y,S),{type:x,ref:E,shapeFlag:w,patchFlag:k}=l,T=n.nodeType;l.el=n,-2===k&&(b=!1,l.dynamicChildren=null);let A=null;switch(x){case r1:3!==T?""===l.children?(a(l.el=r(""),s(n),n),A=n):A=C():(n.data!==l.children&&(nz(),n.data=l.children),A=i(n));break;case r2:_(n)?(A=i(n),m(l.el=n.content.firstChild,n,o)):A=8!==T||S?C():i(n);break;case r6:if(S&&(T=(n=i(n)).nodeType),1===T||3===T){A=n;let e=!l.children.length;for(let t=0;t<l.staticCount;t++)e&&(l.children+=1===A.nodeType?A.outerHTML:A.data),t===l.staticCount-1&&(l.anchor=A),A=i(A);return S?i(A):A}C();break;case r0:A=S?d(n,l,o,u,y,b):C();break;default:if(1&w)A=1===T&&l.type.toLowerCase()===n.tagName.toLowerCase()||_(n)?f(n,l,o,u,y,b):C();else if(6&w){l.slotScopeIds=y;let e=s(n);if(A=S?g(n):nX(n)&&"teleport start"===n.data?g(n,n.data,"teleport end"):i(n),t(l,e,null,o,u,nJ(e),b),n5(l)&&!l.type.__asyncResolved){let t;S?(t=ic(r0)).anchor=A?A.previousSibling:e.lastChild:t=3===n.nodeType?ih(""):ic("div"),t.el=n,l.component.subTree=t}}else 64&w?A=8!==T?C():l.type.hydrate(n,l,o,u,y,b,e,p):128&w&&(A=l.type.hydrate(n,l,o,u,nJ(s(n)),y,b,e,c))}return null!=E&&nW(E,null,u,l),A},f=(e,t,n,r,i,s)=>{s=s||!!t.dynamicChildren;let{type:a,props:u,patchFlag:c,shapeFlag:f,dirs:d,transition:h}=t,g="input"===a||"option"===a;if(g||-1!==c){let a;d&&nd(t,null,n,"created");let y=!1;if(_(e)){y=rw(null,h)&&n&&n.vnode.props&&n.vnode.props.appear;let l=e.content.firstChild;y&&h.beforeEnter(l),m(l,e,n),t.el=e=l}if(16&f&&!(u&&(u.innerHTML||u.textContent))){let l=p(e.firstChild,t,e,n,r,i,s);for(;l;){n0(e,1)||nz();let t=l;l=l.nextSibling,o(t)}}else if(8&f){let n=t.children;"\n"===n[0]&&("PRE"===e.tagName||"TEXTAREA"===e.tagName)&&(n=n.slice(1)),e.textContent!==n&&(n0(e,0)||nz(),e.textContent=t.children)}if(u){if(g||!s||48&c){let t=e.tagName.includes("-");for(let r in u)(g&&(r.endsWith("value")||"indeterminate"===r)||b(r)&&!B(r)||"."===r[0]||t)&&l(e,r,null,u[r],void 0,n)}else if(u.onClick)l(e,"onClick",null,u.onClick,void 0,n);else if(4&c&&tm(u.style))for(let e in u.style)u.style[e]}(a=u&&u.onVnodeBeforeMount)&&iS(a,n,t),d&&nd(t,null,n,"beforeMount"),((a=u&&u.onVnodeMounted)||d||y)&&rY(()=>{a&&iS(a,n,t),y&&h.enter(e),d&&nd(t,null,n,"mounted")},r)}return e.nextSibling},p=(e,t,l,s,o,u,f)=>{f=f||!!t.dynamicChildren;let p=t.children,d=p.length;for(let t=0;t<d;t++){let h=f?p[t]:p[t]=im(p[t]),g=h.type===r1;e?(g&&!f&&t+1<d&&im(p[t+1]).type===r1&&(a(r(e.data.slice(h.children.length)),l,i(e)),e.data=h.children),e=c(e,h,s,o,u,f)):g&&!h.children?a(h.el=r(""),l):(n0(l,1)||nz(),n(null,h,l,null,s,o,nJ(l),u))}return e},d=(e,t,n,l,r,o)=>{let{slotScopeIds:c}=t;c&&(r=r?r.concat(c):c);let f=s(e),d=p(i(e),t,f,n,l,r,o);return d&&nX(d)&&"]"===d.data?i(t.anchor=d):(nz(),a(t.anchor=u("]"),f,d),d)},h=(e,t,l,r,a,u)=>{if(n0(e.parentElement,1)||nz(),t.el=null,u){let t=g(e);for(;;){let n=i(e);if(n&&n!==t)o(n);else break}}let c=i(e),f=s(e);return o(e),n(null,t,f,c,l,r,nJ(f),a),l&&(l.vnode.el=t.el,rK(l,t.el)),c},g=(e,t="[",n="]")=>{let l=0;for(;e;)if((e=i(e))&&nX(e)&&(e.data===t&&l++,e.data===n)){if(0===l)return i(e);l--}return e},m=(e,t,n)=>{let l=t.parentNode;l&&l.replaceChild(e,t);let r=n;for(;r;)r.vnode.el===t&&(r.vnode.el=r.subTree.el=e),r=r.parent},_=e=>1===e.nodeType&&"TEMPLATE"===e.tagName;return[(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),nl(),t._vnode=e;return}c(t.firstChild,e,null,null,null),nl(),t._vnode=e},c]}let nY="data-allow-mismatch",nQ={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function n0(e,t){if(0===t||1===t)for(;e&&!e.hasAttribute(nY);)e=e.parentElement;let n=e&&e.getAttribute(nY);if(null==n)return!1;if(""===n)return!0;{let e=n.split(",");return!!(0===t&&e.includes("children"))||n.split(",").includes(nQ[t])}}let n1=ee().requestIdleCallback||(e=>setTimeout(e,1)),n2=ee().cancelIdleCallback||(e=>clearTimeout(e)),n6=(e=1e4)=>t=>{let n=n1(t,{timeout:e});return()=>n2(n)},n4=e=>(t,n)=>{let l=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){l.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(function(e){let{top:t,left:n,bottom:l,right:r}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:s}=window;return(t>0&&t<i||l>0&&l<i)&&(n>0&&n<s||r>0&&r<s)}(e))return t(),l.disconnect(),!1;l.observe(e)}}),()=>l.disconnect()},n8=e=>t=>{if(e){let n=matchMedia(e);if(!n.matches)return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t);t()}},n3=(e=[])=>(t,n)=>{P(e)&&(e=[e]);let l=!1,r=e=>{l||(l=!0,i(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},i=()=>{n(t=>{for(let n of e)t.removeEventListener(n,r)})};return n(t=>{for(let n of e)t.addEventListener(n,r,{once:!0})}),i},n5=e=>!!e.type.__asyncLoader;function n9(e){let t;O(e)&&(e={loader:e});let{loader:n,loadingComponent:l,errorComponent:r,delay:i=200,hydrate:s,timeout:o,suspensible:a=!0,onError:u}=e,c=null,f=0,p=()=>(f++,c=null,d()),d=()=>{let e;return c||(e=c=n().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),u)return new Promise((t,n)=>{u(e,()=>t(p()),()=>n(e),f+1)});throw e}).then(n=>e!==c&&c?c:(n&&(n.__esModule||"Module"===n[Symbol.toStringTag])&&(n=n.default),t=n,n)))};return nj({name:"AsyncComponentWrapper",__asyncLoader:d,__asyncHydrate(e,n,l){let r=s?()=>{let t=s(l,t=>(function(e,t){if(nX(e)&&"["===e.data){let n=1,l=e.nextSibling;for(;l;){if(1===l.nodeType){if(!1===t(l))break}else if(nX(l)){if("]"===l.data){if(0==--n)break}else"["===l.data&&n++}l=l.nextSibling}}else t(e)})(e,t));t&&(n.bum||(n.bum=[])).push(t)}:l;t?r():d().then(()=>!n.isUnmounted&&r())},get __asyncResolved(){return t},setup(){let e=iw;if(n$(e),t)return()=>n7(t,e);let n=t=>{c=null,t0(t,e,13,!r)};if(a&&e.suspense||iN)return d().then(t=>()=>n7(t,e)).catch(e=>(n(e),()=>r?ic(r,{error:e}):null));let s=tk(!1),u=tk(),f=tk(!!i);return i&&setTimeout(()=>{f.value=!1},i),null!=o&&setTimeout(()=>{if(!s.value&&!u.value){let e=Error(`Async component timed out after ${o}ms.`);n(e),u.value=e}},o),d().then(()=>{s.value=!0,e.parent&&le(e.parent.vnode)&&e.parent.update()}).catch(e=>{n(e),u.value=e}),()=>s.value&&t?n7(t,e):u.value&&r?ic(r,{error:u.value}):l&&!f.value?ic(l):void 0}})}function n7(e,t){let{ref:n,props:l,children:r,ce:i}=t.vnode,s=ic(e,l,r);return s.ref=n,s.ce=i,delete t.vnode.ce,s}let le=e=>e.type.__isKeepAlive,lt={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=ik(),l=n.ctx;if(!l.renderer)return()=>{let e=t.default&&t.default();return e&&1===e.length?e[0]:e};let r=new Map,i=new Set,s=null,o=n.suspense,{renderer:{p:a,m:u,um:c,o:{createElement:f}}}=l,p=f("div");function d(e){ls(e),c(e,n,o,!0)}function h(e){r.forEach((t,n)=>{let l=iU(t.type);l&&!e(l)&&g(n)})}function g(e){let t=r.get(e);!t||s&&ii(t,s)?s&&ls(s):d(t),r.delete(e),i.delete(e)}l.activate=(e,t,n,l,r)=>{let i=e.component;u(e,t,n,0,o),a(i.vnode,e,t,n,i,o,l,e.slotScopeIds,r),ry(()=>{i.isDeactivated=!1,i.a&&X(i.a);let t=e.props&&e.props.onVnodeMounted;t&&iS(t,i.parent,e)},o)},l.deactivate=e=>{let t=e.component;rT(t.m),rT(t.a),u(e,p,null,1,o),ry(()=>{t.da&&X(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&iS(n,t.parent,e),t.isDeactivated=!0},o)},rM(()=>[e.include,e.exclude],([e,t])=>{e&&h(t=>ln(e,t)),t&&h(e=>!ln(t,e))},{flush:"post",deep:!0});let m=null,_=()=>{null!=m&&(rz(n.subTree.type)?ry(()=>{r.set(m,lo(n.subTree))},n.subTree.suspense):r.set(m,lo(n.subTree)))};return lf(_),ld(_),lh(()=>{r.forEach(e=>{let{subTree:t,suspense:l}=n,r=lo(t);if(e.type===r.type&&e.key===r.key){ls(r);let e=r.component.da;e&&ry(e,l);return}d(e)})}),()=>{if(m=null,!t.default)return s=null;let n=t.default(),l=n[0];if(n.length>1)return s=null,n;if(!ir(l)||!(4&l.shapeFlag)&&!(128&l.shapeFlag))return s=null,l;let o=lo(l);if(o.type===r2)return s=null,o;let a=o.type,u=iU(n5(o)?o.type.__asyncResolved||{}:a),{include:c,exclude:f,max:p}=e;if(c&&(!u||!ln(c,u))||f&&u&&ln(f,u))return o.shapeFlag&=-257,s=o,l;let d=null==o.key?a:o.key,h=r.get(d);return o.el&&(o=id(o),128&l.shapeFlag&&(l.ssContent=o)),m=d,h?(o.el=h.el,o.component=h.component,o.transition&&nV(o,o.transition),o.shapeFlag|=512,i.delete(d),i.add(d)):(i.add(d),p&&i.size>parseInt(p,10)&&g(i.values().next().value)),o.shapeFlag|=256,s=o,rz(l.type)?l:o}}};function ln(e,t){return k(e)?e.some(e=>ln(e,t)):P(e)?e.split(",").includes(t):!!N(e)&&(e.lastIndex=0,e.test(t))}function ll(e,t){li(e,"a",t)}function lr(e,t){li(e,"da",t)}function li(e,t,n=iw){let l=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(la(t,l,n),n){let e=n.parent;for(;e&&e.parent;)le(e.parent.vnode)&&function(e,t,n,l){let r=la(t,e,l,!0);lg(()=>{x(l[t],r)},n)}(l,t,n,e),e=e.parent}}function ls(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function lo(e){return 128&e.shapeFlag?e.ssContent:e}function la(e,t,n=iw,l=!1){if(n){let r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...l)=>{eM();let r=iT(n),i=tQ(t,n,e,l);return r(),eI(),i});return l?r.unshift(i):r.push(i),i}}let lu=e=>(t,n=iw)=>{iN&&"sp"!==e||la(e,(...e)=>t(...e),n)},lc=lu("bm"),lf=lu("m"),lp=lu("bu"),ld=lu("u"),lh=lu("bum"),lg=lu("um"),lv=lu("sp"),lm=lu("rtg"),l_=lu("rtc");function ly(e,t=iw){la("ec",e,t)}let lb="components";function lS(e,t){return lw(lb,e,!0,t)||e}let lC=Symbol.for("v-ndc");function lx(e){return P(e)?lw(lb,e,!1)||e:e||lC}function lE(e){return lw("directives",e)}function lw(e,t,n=!0,l=!1){let r=ni||iw;if(r){let n=r.type;if(e===lb){let e=iU(n,!1);if(e&&(e===t||e===W(t)||e===q(W(t))))return n}let i=lk(r[e]||n[e],t)||lk(r.appContext[e],t);return!i&&l?n:i}}function lk(e,t){return e&&(e[t]||e[W(t)]||e[q(W(t))])}function lT(e,t,n,l){let r;let i=n&&n[l],s=k(e);if(s||P(e)){let n=s&&tm(e),l=!1;n&&(l=!ty(e),e=ez(e)),r=Array(e.length);for(let n=0,s=e.length;n<s;n++)r[n]=t(l?tx(e[n]):e[n],n,void 0,i&&i[n])}else if("number"==typeof e){r=Array(e);for(let n=0;n<e;n++)r[n]=t(n+1,n,void 0,i&&i[n])}else if(I(e)){if(e[Symbol.iterator])r=Array.from(e,(e,n)=>t(e,n,void 0,i&&i[n]));else{let n=Object.keys(e);r=Array(n.length);for(let l=0,s=n.length;l<s;l++){let s=n[l];r[l]=t(e[s],s,l,i&&i[l])}}}else r=[];return n&&(n[l]=r),r}function lA(e,t){for(let n=0;n<t.length;n++){let l=t[n];if(k(l))for(let t=0;t<l.length;t++)e[l[t].name]=l[t].fn;else l&&(e[l.name]=l.key?(...e)=>{let t=l.fn(...e);return t&&(t.key=l.key),t}:l.fn)}return e}function lR(e,t,n={},l,r){if(ni.ce||ni.parent&&n5(ni.parent)&&ni.parent.ce)return"default"!==t&&(n.name=t),r3(),il(r0,null,[ic("slot",n,l&&l())],64);let i=e[t];i&&i._c&&(i._d=!1),r3();let s=i&&lN(i(n)),o=n.key||s&&s.key,a=il(r0,{key:(o&&!M(o)?o:`_${t}`)+(!s&&l?"_fb":"")},s||(l?l():[]),s&&1===e._?64:-2);return!r&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),i&&i._c&&(i._d=!0),a}function lN(e){return e.some(e=>!ir(e)||!!(e.type!==r2&&(e.type!==r0||lN(e.children))))?e:null}function lO(e,t){let n={};for(let l in e)n[t&&/[A-Z]/.test(l)?`on:${l}`:G(l)]=e[l];return n}let lP=e=>e?iR(e)?iV(e):lP(e.parent):null,lM=C(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>lP(e.parent),$root:e=>lP(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>l0(e),$forceUpdate:e=>e.f||(e.f=()=>{t7(e.update)}),$nextTick:e=>e.n||(e.n=t9.bind(e.proxy)),$watch:e=>rL.bind(e)}),lI=(e,t)=>e!==g&&!e.__isScriptSetup&&w(e,t),lL={get({_:e},t){let n,l,r;if("__v_skip"===t)return!0;let{ctx:i,setupState:s,data:o,props:a,accessCache:u,type:c,appContext:f}=e;if("$"!==t[0]){let l=u[t];if(void 0!==l)switch(l){case 1:return s[t];case 2:return o[t];case 4:return i[t];case 3:return a[t]}else{if(lI(s,t))return u[t]=1,s[t];if(o!==g&&w(o,t))return u[t]=2,o[t];if((n=e.propsOptions[0])&&w(n,t))return u[t]=3,a[t];if(i!==g&&w(i,t))return u[t]=4,i[t];lY&&(u[t]=0)}}let p=lM[t];return p?("$attrs"===t&&eH(e.attrs,"get",""),p(e)):(l=c.__cssModules)&&(l=l[t])?l:i!==g&&w(i,t)?(u[t]=4,i[t]):w(r=f.config.globalProperties,t)?r[t]:void 0},set({_:e},t,n){let{data:l,setupState:r,ctx:i}=e;return lI(r,t)?(r[t]=n,!0):l!==g&&w(l,t)?(l[t]=n,!0):!w(e.props,t)&&!("$"===t[0]&&t.slice(1)in e)&&(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:l,appContext:r,propsOptions:i}},s){let o;return!!n[s]||e!==g&&w(e,s)||lI(t,s)||(o=i[0])&&w(o,s)||w(l,s)||w(lM,s)||w(r.config.globalProperties,s)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:w(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},lD=C({},lL,{get(e,t){if(t!==Symbol.unscopables)return lL.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!et(t)});function lF(){return null}function lV(){return null}function lU(e){}function lj(e){}function lB(){return null}function l$(){}function lH(e,t){return null}function lW(){return lz().slots}function lK(){return lz().attrs}function lz(){let e=ik();return e.setupContext||(e.setupContext=iF(e))}function lq(e){return k(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function lG(e,t){let n=lq(e);for(let e in t){if(e.startsWith("__skip"))continue;let l=n[e];l?k(l)||O(l)?l=n[e]={type:l,default:t[e]}:l.default=t[e]:null===l&&(l=n[e]={default:t[e]}),l&&t[`__skip_${e}`]&&(l.skipFactory=!0)}return n}function lJ(e,t){return e&&t?k(e)&&k(t)?e.concat(t):C({},lq(e),lq(t)):e||t}function lX(e,t){let n={};for(let l in e)t.includes(l)||Object.defineProperty(n,l,{enumerable:!0,get:()=>e[l]});return n}function lZ(e){let t=ik(),n=e();return iA(),L(n)&&(n=n.catch(e=>{throw iT(t),e})),[n,()=>iT(t)]}let lY=!0;function lQ(e,t,n){tQ(k(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function l0(e){let t;let n=e.type,{mixins:l,extends:r}=n,{mixins:i,optionsCache:s,config:{optionMergeStrategies:o}}=e.appContext,a=s.get(n);return a?t=a:i.length||l||r?(t={},i.length&&i.forEach(e=>l1(t,e,o,!0)),l1(t,n,o)):t=n,I(n)&&s.set(n,t),t}function l1(e,t,n,l=!1){let{mixins:r,extends:i}=t;for(let s in i&&l1(e,i,n,!0),r&&r.forEach(t=>l1(e,t,n,!0)),t)if(l&&"expose"===s);else{let l=l2[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}let l2={data:l6,props:l5,emits:l5,methods:l3,computed:l3,beforeCreate:l8,created:l8,beforeMount:l8,mounted:l8,beforeUpdate:l8,updated:l8,beforeDestroy:l8,beforeUnmount:l8,destroyed:l8,unmounted:l8,activated:l8,deactivated:l8,errorCaptured:l8,serverPrefetch:l8,components:l3,directives:l3,watch:function(e,t){if(!e)return t;if(!t)return e;let n=C(Object.create(null),e);for(let l in t)n[l]=l8(e[l],t[l]);return n},provide:l6,inject:function(e,t){return l3(l4(e),l4(t))}};function l6(e,t){return t?e?function(){return C(O(e)?e.call(this,this):e,O(t)?t.call(this,this):t)}:t:e}function l4(e){if(k(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function l8(e,t){return e?[...new Set([].concat(e,t))]:t}function l3(e,t){return e?C(Object.create(null),e,t):t}function l5(e,t){return e?k(e)&&k(t)?[...new Set([...e,...t])]:C(Object.create(null),lq(e),lq(null!=t?t:{})):t}function l9(){return{app:null,config:{isNativeTag:y,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let l7=0,re=null;function rt(e,t){if(iw){let n=iw.provides,l=iw.parent&&iw.parent.provides;l===n&&(n=iw.provides=Object.create(l)),n[e]=t}}function rn(e,t,n=!1){let l=iw||ni;if(l||re){let r=re?re._context.provides:l?null==l.parent?l.vnode.appContext&&l.vnode.appContext.provides:l.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&O(t)?t.call(l&&l.proxy):t}}function rl(){return!!(iw||ni||re)}let rr={},ri=()=>Object.create(rr),rs=e=>Object.getPrototypeOf(e)===rr;function ro(e,t,n,l){let r;let[i,s]=e.propsOptions,o=!1;if(t)for(let a in t){let u;if(B(a))continue;let c=t[a];i&&w(i,u=W(a))?s&&s.includes(u)?(r||(r={}))[u]=c:n[u]=c:rj(e.emitsOptions,a)||a in l&&c===l[a]||(l[a]=c,o=!0)}if(s){let t=tS(n),l=r||g;for(let r=0;r<s.length;r++){let o=s[r];n[o]=ra(i,t,o,l[o],e,!w(l,o))}}return o}function ra(e,t,n,l,r,i){let s=e[n];if(null!=s){let e=w(s,"default");if(e&&void 0===l){let e=s.default;if(s.type!==Function&&!s.skipFactory&&O(e)){let{propsDefaults:i}=r;if(n in i)l=i[n];else{let s=iT(r);l=i[n]=e.call(null,t),s()}}else l=e;r.ce&&r.ce._setProp(n,l)}s[0]&&(i&&!e?l=!1:s[1]&&(""===l||l===z(n))&&(l=!0))}return l}let ru=new WeakMap;function rc(e){return!("$"===e[0]||B(e))}let rf=e=>"_"===e[0]||"$stable"===e,rp=e=>k(e)?e.map(im):[im(e)],rd=(e,t,n)=>{if(t._n)return t;let l=nf((...e)=>rp(t(...e)),n);return l._c=!1,l},rh=(e,t,n)=>{let l=e._ctx;for(let n in e){if(rf(n))continue;let r=e[n];if(O(r))t[n]=rd(n,r,l);else if(null!=r){let e=rp(r);t[n]=()=>e}}},rg=(e,t)=>{let n=rp(t);e.slots.default=()=>n},rv=(e,t,n)=>{for(let l in t)(n||"_"!==l)&&(e[l]=t[l])},rm=(e,t,n)=>{let l=e.slots=ri();if(32&e.vnode.shapeFlag){let e=t._;e?(rv(l,t,n),n&&Z(l,"_",e,!0)):rh(t,l)}else t&&rg(e,t)},r_=(e,t,n)=>{let{vnode:l,slots:r}=e,i=!0,s=g;if(32&l.shapeFlag){let e=t._;e?n&&1===e?i=!1:rv(r,t,n):(i=!t.$stable,rh(t,r)),s=t}else t&&(rg(e,t),s={default:1});if(i)for(let e in r)rf(e)||null!=s[e]||delete r[e]},ry=rY;function rb(e){return rC(e)}function rS(e){return rC(e,nZ)}function rC(e,t){var n;let l,r;ee().__VUE__=!0;let{insert:i,remove:s,patchProp:o,createElement:a,createText:u,createComment:c,setText:f,setElementText:p,parentNode:d,nextSibling:h,setScopeId:y=_,insertStaticContent:b}=e,S=(e,t,n,l=null,r=null,i=null,s,o=null,a=!!t.dynamicChildren)=>{if(e===t)return;e&&!ii(e,t)&&(l=er(e),Y(e,r,i,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);let{type:u,ref:c,shapeFlag:f}=t;switch(u){case r1:x(e,t,n,l);break;case r2:E(e,t,n,l);break;case r6:null==e&&k(t,n,l,s);break;case r0:V(e,t,n,l,r,i,s,o,a);break;default:1&f?R(e,t,n,l,r,i,s,o,a):6&f?U(e,t,n,l,r,i,s,o,a):64&f?u.process(e,t,n,l,r,i,s,o,a,eo):128&f&&u.process(e,t,n,l,r,i,s,o,a,eo)}null!=c&&r&&nW(c,e&&e.ref,i,t||e,!t)},x=(e,t,n,l)=>{if(null==e)i(t.el=u(t.children),n,l);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},E=(e,t,n,l)=>{null==e?i(t.el=c(t.children||""),n,l):t.el=e.el},k=(e,t,n,l)=>{[e.el,e.anchor]=b(e.children,t,n,l,e.el,e.anchor)},T=({el:e,anchor:t},n,l)=>{let r;for(;e&&e!==t;)r=h(e),i(e,n,l),e=r;i(t,n,l)},A=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},R=(e,t,n,l,r,i,s,o,a)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?N(t,n,l,r,i,s,o,a):L(e,t,r,i,s,o,a)},N=(e,t,n,l,r,s,u,c)=>{let f,d;let{props:h,shapeFlag:g,transition:m,dirs:_}=e;if(f=e.el=a(e.type,s,h&&h.is,h),8&g?p(f,e.children):16&g&&M(e.children,f,null,l,r,rx(e,s),u,c),_&&nd(e,null,l,"created"),P(f,e,e.scopeId,u,l),h){for(let e in h)"value"===e||B(e)||o(f,e,null,h[e],s,l);"value"in h&&o(f,"value",null,h.value,s),(d=h.onVnodeBeforeMount)&&iS(d,l,e)}_&&nd(e,null,l,"beforeMount");let y=rw(r,m);y&&m.beforeEnter(f),i(f,t,n),((d=h&&h.onVnodeMounted)||y||_)&&ry(()=>{d&&iS(d,l,e),y&&m.enter(f),_&&nd(e,null,l,"mounted")},r)},P=(e,t,n,l,r)=>{if(n&&y(e,n),l)for(let t=0;t<l.length;t++)y(e,l[t]);if(r){let n=r.subTree;if(t===n||rz(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=r.vnode;P(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},M=(e,t,n,l,r,i,s,o,a=0)=>{for(let u=a;u<e.length;u++)S(null,e[u]=o?i_(e[u]):im(e[u]),t,n,l,r,i,s,o)},L=(e,t,n,l,r,i,s)=>{let a;let u=t.el=e.el,{patchFlag:c,dynamicChildren:f,dirs:d}=t;c|=16&e.patchFlag;let h=e.props||g,m=t.props||g;if(n&&rE(n,!1),(a=m.onVnodeBeforeUpdate)&&iS(a,n,t,e),d&&nd(t,e,n,"beforeUpdate"),n&&rE(n,!0),(h.innerHTML&&null==m.innerHTML||h.textContent&&null==m.textContent)&&p(u,""),f?D(e.dynamicChildren,f,u,n,l,rx(t,r),i):s||q(e,t,u,null,n,l,rx(t,r),i,!1),c>0){if(16&c)F(u,h,m,n,r);else if(2&c&&h.class!==m.class&&o(u,"class",null,m.class,r),4&c&&o(u,"style",h.style,m.style,r),8&c){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let l=e[t],i=h[l],s=m[l];(s!==i||"value"===l)&&o(u,l,i,s,r,n)}}1&c&&e.children!==t.children&&p(u,t.children)}else s||null!=f||F(u,h,m,n,r);((a=m.onVnodeUpdated)||d)&&ry(()=>{a&&iS(a,n,t,e),d&&nd(t,e,n,"updated")},l)},D=(e,t,n,l,r,i,s)=>{for(let o=0;o<t.length;o++){let a=e[o],u=t[o],c=a.el&&(a.type===r0||!ii(a,u)||70&a.shapeFlag)?d(a.el):n;S(a,u,c,null,l,r,i,s,!0)}},F=(e,t,n,l,r)=>{if(t!==n){if(t!==g)for(let i in t)B(i)||i in n||o(e,i,t[i],null,r,l);for(let i in n){if(B(i))continue;let s=n[i],a=t[i];s!==a&&"value"!==i&&o(e,i,a,s,r,l)}"value"in n&&o(e,"value",t.value,n.value,r)}},V=(e,t,n,l,r,s,o,a,c)=>{let f=t.el=e?e.el:u(""),p=t.anchor=e?e.anchor:u(""),{patchFlag:d,dynamicChildren:h,slotScopeIds:g}=t;g&&(a=a?a.concat(g):g),null==e?(i(f,n,l),i(p,n,l),M(t.children||[],n,p,r,s,o,a,c)):d>0&&64&d&&h&&e.dynamicChildren?(D(e.dynamicChildren,h,n,r,s,o,a),(null!=t.key||r&&t===r.subTree)&&rk(e,t,!0)):q(e,t,n,p,r,s,o,a,c)},U=(e,t,n,l,r,i,s,o,a)=>{t.slotScopeIds=o,null==e?512&t.shapeFlag?r.ctx.activate(t,n,l,s,a):j(t,n,l,r,i,s,a):$(e,t,a)},j=(e,t,n,l,r,i,s)=>{let o=e.component=iE(e,l,r);le(e)&&(o.ctx.renderer=eo),iO(o,!1,s),o.asyncDep?(r&&r.registerDep(o,H,s),e.el||E(null,o.subTree=ic(r2),t,n)):H(o,e,t,n,r,i,s)},$=(e,t,n)=>{let l=t.component=e.component;if(function(e,t,n){let{props:l,children:r,component:i}=e,{props:s,children:o,patchFlag:a}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(!n||!(a>=0))return(!!r||!!o)&&(!o||!o.$stable)||l!==s&&(l?!s||rW(l,s,u):!!s);if(1024&a)return!0;if(16&a)return l?rW(l,s,u):!!s;if(8&a){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(s[n]!==l[n]&&!rj(u,n))return!0}}return!1}(e,t,n)){if(l.asyncDep&&!l.asyncResolved){K(l,t,n);return}l.next=t,l.update()}else t.el=e.el,l.vnode=t},H=(e,t,n,l,i,s,o)=>{let a=()=>{if(e.isMounted){let t,{next:n,bu:l,u:r,parent:u,vnode:c}=e;{let t=function e(t){let n=t.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:e(n)}(e);if(t){n&&(n.el=c.el,K(e,n,o)),t.asyncDep.then(()=>{e.isUnmounted||a()});return}}let f=n;rE(e,!1),n?(n.el=c.el,K(e,n,o)):n=c,l&&X(l),(t=n.props&&n.props.onVnodeBeforeUpdate)&&iS(t,u,n,c),rE(e,!0);let p=rB(e),h=e.subTree;e.subTree=p,S(h,p,d(h.el),er(h),e,i,s),n.el=p.el,null===f&&rK(e,p.el),r&&ry(r,i),(t=n.props&&n.props.onVnodeUpdated)&&ry(()=>iS(t,u,n,c),i)}else{let o;let{el:a,props:u}=t,{bm:c,m:f,parent:p,root:d,type:h}=e,g=n5(t);if(rE(e,!1),c&&X(c),!g&&(o=u&&u.onVnodeBeforeMount)&&iS(o,p,t),rE(e,!0),a&&r){let t=()=>{e.subTree=rB(e),r(a,e.subTree,e,i,null)};g&&h.__asyncHydrate?h.__asyncHydrate(a,e,t):t()}else{d.ce&&d.ce._injectChildStyle(h);let r=e.subTree=rB(e);S(null,r,n,l,e,i,s),t.el=r.el}if(f&&ry(f,i),!g&&(o=u&&u.onVnodeMounted)){let e=t;ry(()=>iS(o,p,e),i)}(256&t.shapeFlag||p&&n5(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&ry(e.a,i),e.isMounted=!0,t=n=l=null}};e.scope.on();let u=e.effect=new eb(a);e.scope.off();let c=e.update=u.run.bind(u),f=e.job=u.runIfDirty.bind(u);f.i=e,f.id=e.uid,u.scheduler=()=>t7(f),rE(e,!0),c()},K=(e,t,n)=>{t.component=e;let l=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,l){let{props:r,attrs:i,vnode:{patchFlag:s}}=e,o=tS(r),[a]=e.propsOptions,u=!1;if((l||s>0)&&!(16&s)){if(8&s){let n=e.vnode.dynamicProps;for(let l=0;l<n.length;l++){let s=n[l];if(rj(e.emitsOptions,s))continue;let c=t[s];if(a){if(w(i,s))c!==i[s]&&(i[s]=c,u=!0);else{let t=W(s);r[t]=ra(a,o,t,c,e,!1)}}else c!==i[s]&&(i[s]=c,u=!0)}}}else{let l;for(let s in ro(e,t,r,i)&&(u=!0),o)t&&(w(t,s)||(l=z(s))!==s&&w(t,l))||(a?n&&(void 0!==n[s]||void 0!==n[l])&&(r[s]=ra(a,o,s,void 0,e,!0)):delete r[s]);if(i!==o)for(let e in i)t&&w(t,e)||(delete i[e],u=!0)}u&&eW(e.attrs,"set","")}(e,t.props,l,n),r_(e,t.children,n),eM(),nn(e),eI()},q=(e,t,n,l,r,i,s,o,a=!1)=>{let u=e&&e.children,c=e?e.shapeFlag:0,f=t.children,{patchFlag:d,shapeFlag:h}=t;if(d>0){if(128&d){J(u,f,n,l,r,i,s,o,a);return}if(256&d){G(u,f,n,l,r,i,s,o,a);return}}8&h?(16&c&&el(u,r,i),f!==u&&p(n,f)):16&c?16&h?J(u,f,n,l,r,i,s,o,a):el(u,r,i,!0):(8&c&&p(n,""),16&h&&M(f,n,l,r,i,s,o,a))},G=(e,t,n,l,r,i,s,o,a)=>{let u;e=e||m,t=t||m;let c=e.length,f=t.length,p=Math.min(c,f);for(u=0;u<p;u++){let l=t[u]=a?i_(t[u]):im(t[u]);S(e[u],l,n,null,r,i,s,o,a)}c>f?el(e,r,i,!0,!1,p):M(t,n,l,r,i,s,o,a,p)},J=(e,t,n,l,r,i,s,o,a)=>{let u=0,c=t.length,f=e.length-1,p=c-1;for(;u<=f&&u<=p;){let l=e[u],c=t[u]=a?i_(t[u]):im(t[u]);if(ii(l,c))S(l,c,n,null,r,i,s,o,a);else break;u++}for(;u<=f&&u<=p;){let l=e[f],u=t[p]=a?i_(t[p]):im(t[p]);if(ii(l,u))S(l,u,n,null,r,i,s,o,a);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,f=e<c?t[e].el:l;for(;u<=p;)S(null,t[u]=a?i_(t[u]):im(t[u]),n,f,r,i,s,o,a),u++}}else if(u>p)for(;u<=f;)Y(e[u],r,i,!0),u++;else{let d;let h=u,g=u,_=new Map;for(u=g;u<=p;u++){let e=t[u]=a?i_(t[u]):im(t[u]);null!=e.key&&_.set(e.key,u)}let y=0,b=p-g+1,C=!1,x=0,E=Array(b);for(u=0;u<b;u++)E[u]=0;for(u=h;u<=f;u++){let l;let c=e[u];if(y>=b){Y(c,r,i,!0);continue}if(null!=c.key)l=_.get(c.key);else for(d=g;d<=p;d++)if(0===E[d-g]&&ii(c,t[d])){l=d;break}void 0===l?Y(c,r,i,!0):(E[l-g]=u+1,l>=x?x=l:C=!0,S(c,t[l],n,null,r,i,s,o,a),y++)}let w=C?function(e){let t,n,l,r,i;let s=e.slice(),o=[0],a=e.length;for(t=0;t<a;t++){let a=e[t];if(0!==a){if(e[n=o[o.length-1]]<a){s[t]=n,o.push(t);continue}for(l=0,r=o.length-1;l<r;)e[o[i=l+r>>1]]<a?l=i+1:r=i;a<e[o[l]]&&(l>0&&(s[t]=o[l-1]),o[l]=t)}}for(l=o.length,r=o[l-1];l-- >0;)o[l]=r,r=s[r];return o}(E):m;for(d=w.length-1,u=b-1;u>=0;u--){let e=g+u,f=t[e],p=e+1<c?t[e+1].el:l;0===E[u]?S(null,f,n,p,r,i,s,o,a):C&&(d<0||u!==w[d]?Z(f,n,p,2):d--)}}},Z=(e,t,n,l,r=null)=>{let{el:s,type:o,transition:a,children:u,shapeFlag:c}=e;if(6&c){Z(e.component.subTree,t,n,l);return}if(128&c){e.suspense.move(t,n,l);return}if(64&c){o.move(e,t,n,eo);return}if(o===r0){i(s,t,n);for(let e=0;e<u.length;e++)Z(u[e],t,n,l);i(e.anchor,t,n);return}if(o===r6){T(e,t,n);return}if(2!==l&&1&c&&a){if(0===l)a.beforeEnter(s),i(s,t,n),ry(()=>a.enter(s),r);else{let{leave:e,delayLeave:l,afterLeave:r}=a,o=()=>i(s,t,n),u=()=>{e(s,()=>{o(),r&&r()})};l?l(s,o,u):u()}}else i(s,t,n)},Y=(e,t,n,l=!1,r=!1)=>{let i;let{type:s,props:o,ref:a,children:u,dynamicChildren:c,shapeFlag:f,patchFlag:p,dirs:d,cacheIndex:h}=e;if(-2===p&&(r=!1),null!=a&&nW(a,null,n,e,!0),null!=h&&(t.renderCache[h]=void 0),256&f){t.ctx.deactivate(e);return}let g=1&f&&d,m=!n5(e);if(m&&(i=o&&o.onVnodeBeforeUnmount)&&iS(i,t,e),6&f)en(e.component,n,l);else{if(128&f){e.suspense.unmount(n,l);return}g&&nd(e,null,t,"beforeUnmount"),64&f?e.type.remove(e,t,n,eo,l):c&&!c.hasOnce&&(s!==r0||p>0&&64&p)?el(c,t,n,!1,!0):(s===r0&&384&p||!r&&16&f)&&el(u,t,n),l&&Q(e)}(m&&(i=o&&o.onVnodeUnmounted)||g)&&ry(()=>{i&&iS(i,t,e),g&&nd(e,null,t,"unmounted")},n)},Q=e=>{let{type:t,el:n,anchor:l,transition:r}=e;if(t===r0){et(n,l);return}if(t===r6){A(e);return}let i=()=>{s(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){let{leave:t,delayLeave:l}=r,s=()=>t(n,i);l?l(e.el,i,s):s()}else i()},et=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},en=(e,t,n)=>{let{bum:l,scope:r,job:i,subTree:s,um:o,m:a,a:u}=e;rT(a),rT(u),l&&X(l),r.stop(),i&&(i.flags|=8,Y(s,e,t,n)),o&&ry(o,t),ry(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},el=(e,t,n,l=!1,r=!1,i=0)=>{for(let s=i;s<e.length;s++)Y(e[s],t,n,l,r)},er=e=>{if(6&e.shapeFlag)return er(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[nh];return n?h(n):t},ei=!1,es=(e,t,n)=>{null==e?t._vnode&&Y(t._vnode,null,null,!0):S(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ei||(ei=!0,nn(),nl(),ei=!1)},eo={p:S,um:Y,m:Z,r:Q,mt:j,mc:M,pc:q,pbc:D,n:er,o:e};return t&&([l,r]=t(eo)),{render:es,hydrate:l,createApp:(n=l,function(e,t=null){O(e)||(e=C({},e)),null==t||I(t)||(t=null);let l=l9(),r=new WeakSet,i=[],s=!1,o=l.app={_uid:l7++,_component:e,_props:t,_container:null,_context:l,_instance:null,version:iK,get config(){return l.config},set config(v){},use:(e,...t)=>(r.has(e)||(e&&O(e.install)?(r.add(e),e.install(o,...t)):O(e)&&(r.add(e),e(o,...t))),o),mixin:e=>(l.mixins.includes(e)||l.mixins.push(e),o),component:(e,t)=>t?(l.components[e]=t,o):l.components[e],directive:(e,t)=>t?(l.directives[e]=t,o):l.directives[e],mount(r,i,a){if(!s){let u=o._ceVNode||ic(e,t);return u.appContext=l,!0===a?a="svg":!1===a&&(a=void 0),i&&n?n(u,r):es(u,r,a),s=!0,o._container=r,r.__vue_app__=o,iV(u.component)}},onUnmount(e){i.push(e)},unmount(){s&&(tQ(i,o._instance,16),es(null,o._container),delete o._container.__vue_app__)},provide:(e,t)=>(l.provides[e]=t,o),runWithContext(e){let t=re;re=o;try{return e()}finally{re=t}}};return o})}}function rx({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function rE({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function rw(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function rk(e,t,n=!1){let l=e.children,r=t.children;if(k(l)&&k(r))for(let e=0;e<l.length;e++){let t=l[e],i=r[e];!(1&i.shapeFlag)||i.dynamicChildren||((i.patchFlag<=0||32===i.patchFlag)&&((i=r[e]=i_(r[e])).el=t.el),n||-2===i.patchFlag||rk(t,i)),i.type===r1&&(i.el=t.el)}}function rT(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}let rA=Symbol.for("v-scx"),rR=()=>rn(rA);function rN(e,t){return rI(e,null,t)}function rO(e,t){return rI(e,null,{flush:"post"})}function rP(e,t){return rI(e,null,{flush:"sync"})}function rM(e,t,n){return rI(e,t,n)}function rI(e,t,n=g){let l;let{immediate:r,deep:i,flush:s,once:o}=n,a=C({},n),u=t&&r||!t&&"post"!==s;if(iN){if("sync"===s){let e=rR();l=e.__watcherHandles||(e.__watcherHandles=[])}else if(!u){let e=()=>{};return e.stop=_,e.resume=_,e.pause=_,e}}let c=iw;a.call=(e,t,n)=>tQ(e,c,t,n);let f=!1;"post"===s?a.scheduler=e=>{ry(e,c&&c.suspense)}:"sync"!==s&&(f=!0,a.scheduler=(e,t)=>{t?e():t7(e)}),a.augmentJob=e=>{t&&(e.flags|=4),f&&(e.flags|=2,c&&(e.id=c.uid,e.i=c))};let d=function(e,t,n=g){let l,r,i,s;let{immediate:o,deep:a,once:u,scheduler:c,augmentJob:f,call:d}=n,h=e=>a?e:ty(e)||!1===a||0===a?tJ(e,1):tJ(e),m=!1,y=!1;if(tw(e)?(r=()=>e.value,m=ty(e)):tm(e)?(r=()=>h(e),m=!0):k(e)?(y=!0,m=e.some(e=>tm(e)||ty(e)),r=()=>e.map(e=>tw(e)?e.value:tm(e)?h(e):O(e)?d?d(e,2):e():void 0)):r=O(e)?t?d?()=>d(e,2):e:()=>{if(i){eM();try{i()}finally{eI()}}let t=p;p=l;try{return d?d(e,3,[s]):e(s)}finally{p=t}}:_,t&&a){let e=r,t=!0===a?1/0:a;r=()=>tJ(e(),t)}let b=em(),S=()=>{l.stop(),b&&b.active&&x(b.effects,l)};if(u&&t){let e=t;t=(...t)=>{e(...t),S()}}let C=y?Array(e.length).fill(tK):tK,E=e=>{if(1&l.flags&&(l.dirty||e)){if(t){let e=l.run();if(a||m||(y?e.some((e,t)=>J(e,C[t])):J(e,C))){i&&i();let n=p;p=l;try{let n=[e,C===tK?void 0:y&&C[0]===tK?[]:C,s];d?d(t,3,n):t(...n),C=e}finally{p=n}}}else l.run()}};return f&&f(E),(l=new eb(r)).scheduler=c?()=>c(E,!1):E,s=e=>tG(e,!1,l),i=l.onStop=()=>{let e=tz.get(l);if(e){if(d)d(e,4);else for(let t of e)t();tz.delete(l)}},t?o?E(!0):C=l.run():c?c(E.bind(null,!0),!0):l.run(),S.pause=l.pause.bind(l),S.resume=l.resume.bind(l),S.stop=S,S}(e,t,a);return iN&&(l?l.push(d):u&&d()),d}function rL(e,t,n){let l;let r=this.proxy,i=P(e)?e.includes(".")?rD(r,e):()=>r[e]:e.bind(r,r);O(t)?l=t:(l=t.handler,n=t);let s=iT(this),o=rI(i,l.bind(r),n);return s(),o}function rD(e,t){let n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function rF(e,t,n=g){let l=ik(),r=W(t),i=z(t),s=rV(e,r),o=tD((s,o)=>{let a,u;let c=g;return rP(()=>{let t=e[r];J(a,t)&&(a=t,o())}),{get:()=>(s(),n.get?n.get(a):a),set(e){let s=n.set?n.set(e):e;if(!J(s,a)&&!(c!==g&&J(e,c)))return;let f=l.vnode.props;f&&(t in f||r in f||i in f)&&(`onUpdate:${t}`in f||`onUpdate:${r}`in f||`onUpdate:${i}`in f)||(a=e,o()),l.emit(`update:${t}`,s),J(e,s)&&J(e,c)&&!J(s,u)&&o(),c=e,u=s}}});return o[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?s||g:o,done:!1}:{done:!0}}},o}let rV=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${W(t)}Modifiers`]||e[`${z(t)}Modifiers`];function rU(e,t,...n){let l;if(e.isUnmounted)return;let r=e.vnode.props||g,i=n,s=t.startsWith("update:"),o=s&&rV(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>P(e)?e.trim():e)),o.number&&(i=n.map(Y)));let a=r[l=G(t)]||r[l=G(W(t))];!a&&s&&(a=r[l=G(z(t))]),a&&tQ(a,e,6,i);let u=r[l+"Once"];if(u){if(e.emitted){if(e.emitted[l])return}else e.emitted={};e.emitted[l]=!0,tQ(u,e,6,i)}}function rj(e,t){return!!(e&&b(t))&&(w(e,(t=t.slice(2).replace(/Once$/,""))[0].toLowerCase()+t.slice(1))||w(e,z(t))||w(e,t))}function rB(e){let t,n;let{type:l,vnode:r,proxy:i,withProxy:s,propsOptions:[o],slots:a,attrs:u,emit:c,render:f,renderCache:p,props:d,data:h,setupState:g,ctx:m,inheritAttrs:_}=e,y=no(e);try{if(4&r.shapeFlag){let e=s||i;t=im(f.call(e,e,p,d,g,h,m)),n=u}else t=im(l.length>1?l(d,{attrs:u,slots:a,emit:c}):l(d,null)),n=l.props?u:r$(u)}catch(n){r4.length=0,t0(n,e,1),t=ic(r2)}let b=t;if(n&&!1!==_){let e=Object.keys(n),{shapeFlag:t}=b;e.length&&7&t&&(o&&e.some(S)&&(n=rH(n,o)),b=id(b,n,!1,!0))}return r.dirs&&((b=id(b,null,!1,!0)).dirs=b.dirs?b.dirs.concat(r.dirs):r.dirs),r.transition&&nV(b,r.transition),t=b,no(y),t}let r$=e=>{let t;for(let n in e)("class"===n||"style"===n||b(n))&&((t||(t={}))[n]=e[n]);return t},rH=(e,t)=>{let n={};for(let l in e)S(l)&&l.slice(9)in t||(n[l]=e[l]);return n};function rW(e,t,n){let l=Object.keys(t);if(l.length!==Object.keys(e).length)return!0;for(let r=0;r<l.length;r++){let i=l[r];if(t[i]!==e[i]&&!rj(n,i))return!0}return!1}function rK({vnode:e,parent:t},n){for(;t;){let l=t.subTree;if(l.suspense&&l.suspense.activeBranch===e&&(l.el=e.el),l===e)(e=t.vnode).el=n,t=t.parent;else break}}let rz=e=>e.__isSuspense,rq=0,rG={name:"Suspense",__isSuspense:!0,process(e,t,n,l,r,i,s,o,a,u){if(null==e)!function(e,t,n,l,r,i,s,o,a){let{p:u,o:{createElement:c}}=a,f=c("div"),p=e.suspense=rX(e,r,l,t,f,n,i,s,o,a);u(null,p.pendingBranch=e.ssContent,f,null,l,p,i,s),p.deps>0?(rJ(e,"onPending"),rJ(e,"onFallback"),u(null,e.ssFallback,t,n,l,null,i,s),rQ(p,e.ssFallback)):p.resolve(!1,!0)}(t,n,l,r,i,s,o,a,u);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}!function(e,t,n,l,r,i,s,o,{p:a,um:u,o:{createElement:c}}){let f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;let p=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:g,isInFallback:m,isHydrating:_}=f;if(g)f.pendingBranch=p,ii(p,g)?(a(g,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0?f.resolve():m&&!_&&(a(h,d,n,l,r,null,i,s,o),rQ(f,d))):(f.pendingId=rq++,_?(f.isHydrating=!1,f.activeBranch=g):u(g,r,f),f.deps=0,f.effects.length=0,f.hiddenContainer=c("div"),m?(a(null,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0?f.resolve():(a(h,d,n,l,r,null,i,s,o),rQ(f,d))):h&&ii(p,h)?(a(h,p,n,l,r,f,i,s,o),f.resolve(!0)):(a(null,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0&&f.resolve()));else if(h&&ii(p,h))a(h,p,n,l,r,f,i,s,o),rQ(f,p);else if(rJ(t,"onPending"),f.pendingBranch=p,512&p.shapeFlag?f.pendingId=p.component.suspenseId:f.pendingId=rq++,a(null,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0)f.resolve();else{let{timeout:e,pendingId:t}=f;e>0?setTimeout(()=>{f.pendingId===t&&f.fallback(d)},e):0===e&&f.fallback(d)}}(e,t,n,l,r,s,o,a,u)}},hydrate:function(e,t,n,l,r,i,s,o,a){let u=t.suspense=rX(t,l,n,e.parentNode,document.createElement("div"),null,r,i,s,o,!0),c=a(e,u.pendingBranch=t.ssContent,n,u,i,s);return 0===u.deps&&u.resolve(!1,!0),c},normalize:function(e){let{shapeFlag:t,children:n}=e,l=32&t;e.ssContent=rZ(l?n.default:n),e.ssFallback=l?rZ(n.fallback):ic(r2)}};function rJ(e,t){let n=e.props&&e.props[t];O(n)&&n()}function rX(e,t,n,l,r,i,s,o,a,u,c=!1){let f;let{p:p,m:d,um:h,n:g,o:{parentNode:m,remove:_}}=u,y=function(e){let t=e.props&&e.props.suspensible;return null!=t&&!1!==t}(e);y&&t&&t.pendingBranch&&(f=t.pendingId,t.deps++);let b=e.props?Q(e.props.timeout):void 0,S=i,C={vnode:e,parent:t,parentComponent:n,namespace:s,container:l,hiddenContainer:r,deps:0,pendingId:rq++,timeout:"number"==typeof b?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:l,activeBranch:r,pendingBranch:s,pendingId:o,effects:a,parentComponent:u,container:c}=C,p=!1;C.isHydrating?C.isHydrating=!1:e||((p=r&&s.transition&&"out-in"===s.transition.mode)&&(r.transition.afterLeave=()=>{o===C.pendingId&&(d(s,c,i===S?g(r):i,0),nt(a))}),r&&(m(r.el)===c&&(i=g(r)),h(r,u,C,!0)),p||d(s,c,i,0)),rQ(C,s),C.pendingBranch=null,C.isInFallback=!1;let _=C.parent,b=!1;for(;_;){if(_.pendingBranch){_.effects.push(...a),b=!0;break}_=_.parent}b||p||nt(a),C.effects=[],y&&t&&t.pendingBranch&&f===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),rJ(l,"onResolve")},fallback(e){if(!C.pendingBranch)return;let{vnode:t,activeBranch:n,parentComponent:l,container:r,namespace:i}=C;rJ(t,"onFallback");let s=g(n),u=()=>{C.isInFallback&&(p(null,e,r,s,l,null,i,o,a),rQ(C,e))},c=e.transition&&"out-in"===e.transition.mode;c&&(n.transition.afterLeave=u),C.isInFallback=!0,h(n,l,null,!0),c||u()},move(e,t,n){C.activeBranch&&d(C.activeBranch,e,t,n),C.container=e},next:()=>C.activeBranch&&g(C.activeBranch),registerDep(e,t,n){let l=!!C.pendingBranch;l&&C.deps++;let r=e.vnode.el;e.asyncDep.catch(t=>{t0(t,e,0)}).then(i=>{if(e.isUnmounted||C.isUnmounted||C.pendingId!==e.suspenseId)return;e.asyncResolved=!0;let{vnode:o}=e;iP(e,i,!1),r&&(o.el=r);let a=!r&&e.subTree.el;t(e,o,m(r||e.subTree.el),r?null:g(e.subTree),C,s,n),a&&_(a),rK(e,o.el),l&&0==--C.deps&&C.resolve()})},unmount(e,t){C.isUnmounted=!0,C.activeBranch&&h(C.activeBranch,n,e,t),C.pendingBranch&&h(C.pendingBranch,n,e,t)}};return C}function rZ(e){let t;if(O(e)){let n=r9&&e._c;n&&(e._d=!1,r3()),e=e(),n&&(e._d=!0,t=r8,r5())}return k(e)&&(e=function(e,t=!0){let n;for(let t=0;t<e.length;t++){let l=e[t];if(!ir(l))return;if(l.type!==r2||"v-if"===l.children){if(n)return;n=l}}return n}(e)),e=im(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(t=>t!==e)),e}function rY(e,t){t&&t.pendingBranch?k(e)?t.effects.push(...e):t.effects.push(e):nt(e)}function rQ(e,t){e.activeBranch=t;let{vnode:n,parentComponent:l}=e,r=t.el;for(;!r&&t.component;)r=(t=t.component.subTree).el;n.el=r,l&&l.subTree===n&&(l.vnode.el=r,rK(l,r))}let r0=Symbol.for("v-fgt"),r1=Symbol.for("v-txt"),r2=Symbol.for("v-cmt"),r6=Symbol.for("v-stc"),r4=[],r8=null;function r3(e=!1){r4.push(r8=e?null:[])}function r5(){r4.pop(),r8=r4[r4.length-1]||null}let r9=1;function r7(e,t=!1){r9+=e,e<0&&r8&&t&&(r8.hasOnce=!0)}function ie(e){return e.dynamicChildren=r9>0?r8||m:null,r5(),r9>0&&r8&&r8.push(e),e}function it(e,t,n,l,r,i){return ie(iu(e,t,n,l,r,i,!0))}function il(e,t,n,l,r){return ie(ic(e,t,n,l,r,!0))}function ir(e){return!!e&&!0===e.__v_isVNode}function ii(e,t){return e.type===t.type&&e.key===t.key}function is(e){}let io=({key:e})=>null!=e?e:null,ia=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?P(e)||tw(e)||O(e)?{i:ni,r:e,k:t,f:!!n}:e:null);function iu(e,t=null,n=null,l=0,r=null,i=e===r0?0:1,s=!1,o=!1){let a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&io(t),ref:t&&ia(t),scopeId:ns,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:l,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ni};return o?(iy(a,n),128&i&&e.normalize(a)):n&&(a.shapeFlag|=P(n)?8:16),r9>0&&!s&&r8&&(a.patchFlag>0||6&i)&&32!==a.patchFlag&&r8.push(a),a}let ic=function(e,t=null,n=null,l=0,r=null,i=!1){var s;if(e&&e!==lC||(e=r2),ir(e)){let l=id(e,t,!0);return n&&iy(l,n),r9>0&&!i&&r8&&(6&l.shapeFlag?r8[r8.indexOf(e)]=l:r8.push(l)),l.patchFlag=-2,l}if(O(s=e)&&"__vccOpts"in s&&(e=e.__vccOpts),t){let{class:e,style:n}=t=ip(t);e&&!P(e)&&(t.class=es(e)),I(n)&&(tb(n)&&!k(n)&&(n=C({},n)),t.style=en(n))}let o=P(e)?1:rz(e)?128:ng(e)?64:I(e)?4:O(e)?2:0;return iu(e,t,n,l,r,o,i,!0)};function ip(e){return e?tb(e)||rs(e)?C({},e):e:null}function id(e,t,n=!1,l=!1){let{props:r,ref:i,patchFlag:s,children:o,transition:a}=e,u=t?ib(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&io(u),ref:t&&t.ref?n&&i?k(i)?i.concat(ia(t)):[i,ia(t)]:ia(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==r0?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&id(e.ssContent),ssFallback:e.ssFallback&&id(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&l&&nV(c,a.clone(c)),c}function ih(e=" ",t=0){return ic(r1,null,e,t)}function ig(e,t){let n=ic(r6,null,e);return n.staticCount=t,n}function iv(e="",t=!1){return t?(r3(),il(r2,null,e)):ic(r2,null,e)}function im(e){return null==e||"boolean"==typeof e?ic(r2):k(e)?ic(r0,null,e.slice()):ir(e)?i_(e):ic(r1,null,String(e))}function i_(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:id(e)}function iy(e,t){let n=0,{shapeFlag:l}=e;if(null==t)t=null;else if(k(t))n=16;else if("object"==typeof t){if(65&l){let n=t.default;n&&(n._c&&(n._d=!1),iy(e,n()),n._c&&(n._d=!0));return}{n=32;let l=t._;l||rs(t)?3===l&&ni&&(1===ni.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=ni}}else O(t)?(t={default:t,_ctx:ni},n=32):(t=String(t),64&l?(n=16,t=[ih(t)]):n=8);e.children=t,e.shapeFlag|=n}function ib(...e){let t={};for(let n=0;n<e.length;n++){let l=e[n];for(let e in l)if("class"===e)t.class!==l.class&&(t.class=es([t.class,l.class]));else if("style"===e)t.style=en([t.style,l.style]);else if(b(e)){let n=t[e],r=l[e];r&&n!==r&&!(k(n)&&n.includes(r))&&(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=l[e])}return t}function iS(e,t,n,l=null){tQ(e,t,7,[n,l])}let iC=l9(),ix=0;function iE(e,t,n){let l=e.type,r=(t?t.appContext:e.appContext)||iC,i={uid:ix++,vnode:e,type:l,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new eg(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:function e(t,n,l=!1){let r=l?ru:n.propsCache,i=r.get(t);if(i)return i;let s=t.props,o={},a=[],u=!1;if(!O(t)){let r=t=>{u=!0;let[l,r]=e(t,n,!0);C(o,l),r&&a.push(...r)};!l&&n.mixins.length&&n.mixins.forEach(r),t.extends&&r(t.extends),t.mixins&&t.mixins.forEach(r)}if(!s&&!u)return I(t)&&r.set(t,m),m;if(k(s))for(let e=0;e<s.length;e++){let t=W(s[e]);rc(t)&&(o[t]=g)}else if(s)for(let e in s){let t=W(e);if(rc(t)){let n=s[e],l=o[t]=k(n)||O(n)?{type:n}:C({},n),r=l.type,i=!1,u=!0;if(k(r))for(let e=0;e<r.length;++e){let t=r[e],n=O(t)&&t.name;if("Boolean"===n){i=!0;break}"String"===n&&(u=!1)}else i=O(r)&&"Boolean"===r.name;l[0]=i,l[1]=u,(i||w(l,"default"))&&a.push(t)}}let c=[o,a];return I(t)&&r.set(t,c),c}(l,r),emitsOptions:function e(t,n,l=!1){let r=n.emitsCache,i=r.get(t);if(void 0!==i)return i;let s=t.emits,o={},a=!1;if(!O(t)){let r=t=>{let l=e(t,n,!0);l&&(a=!0,C(o,l))};!l&&n.mixins.length&&n.mixins.forEach(r),t.extends&&r(t.extends),t.mixins&&t.mixins.forEach(r)}return s||a?(k(s)?s.forEach(e=>o[e]=null):C(o,s),I(t)&&r.set(t,o),o):(I(t)&&r.set(t,null),null)}(l,r),emit:null,emitted:null,propsDefaults:g,inheritAttrs:l.inheritAttrs,ctx:g,data:g,props:g,attrs:g,slots:g,refs:g,setupState:g,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=rU.bind(null,i),e.ce&&e.ce(i),i}let iw=null,ik=()=>iw||ni;{let e=ee(),t=(t,n)=>{let l;return(l=e[t])||(l=e[t]=[]),l.push(n),e=>{l.length>1?l.forEach(t=>t(e)):l[0](e)}};o=t("__VUE_INSTANCE_SETTERS__",e=>iw=e),a=t("__VUE_SSR_SETTERS__",e=>iN=e)}let iT=e=>{let t=iw;return o(e),e.scope.on(),()=>{e.scope.off(),o(t)}},iA=()=>{iw&&iw.scope.off(),o(null)};function iR(e){return 4&e.vnode.shapeFlag}let iN=!1;function iO(e,t=!1,n=!1){t&&a(t);let{props:l,children:r}=e.vnode,i=iR(e);!function(e,t,n,l=!1){let r={},i=ri();for(let n in e.propsDefaults=Object.create(null),ro(e,t,r,i),e.propsOptions[0])n in r||(r[n]=void 0);n?e.props=l?r:td(r):e.type.props?e.props=r:e.props=i,e.attrs=i}(e,l,i,t),rm(e,r,n);let s=i?function(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,lL);let{setup:l}=n;if(l){eM();let n=e.setupContext=l.length>1?iF(e):null,r=iT(e),i=tY(l,e,0,[e.props,n]),s=L(i);if(eI(),r(),(s||e.sp)&&!n5(e)&&n$(e),s){if(i.then(iA,iA),t)return i.then(n=>{iP(e,n,t)}).catch(t=>{t0(t,e,0)});e.asyncDep=i}else iP(e,i,t)}else iL(e,t)}(e,t):void 0;return t&&a(!1),s}function iP(e,t,n){O(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:I(t)&&(e.setupState=tI(t)),iL(e,n)}function iM(e){u=e,c=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,lD))}}let iI=()=>!u;function iL(e,t,n){let l=e.type;if(!e.render){if(!t&&u&&!l.render){let t=l.template||l0(e).template;if(t){let{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:i,compilerOptions:s}=l,o=C(C({isCustomElement:n,delimiters:i},r),s);l.render=u(t,o)}}e.render=l.render||_,c&&c(e)}{let t=iT(e);eM();try{!function(e){let t=l0(e),n=e.proxy,l=e.ctx;lY=!1,t.beforeCreate&&lQ(t.beforeCreate,e,"bc");let{data:r,computed:i,methods:s,watch:o,provide:a,inject:u,created:c,beforeMount:f,mounted:p,beforeUpdate:d,updated:h,activated:g,deactivated:m,beforeDestroy:y,beforeUnmount:b,destroyed:S,unmounted:C,render:x,renderTracked:E,renderTriggered:w,errorCaptured:T,serverPrefetch:A,expose:R,inheritAttrs:N,components:M,directives:L,filters:D}=t;if(u&&function(e,t,n=_){for(let n in k(e)&&(e=l4(e)),e){let l;let r=e[n];tw(l=I(r)?"default"in r?rn(r.from||n,r.default,!0):rn(r.from||n):rn(r))?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e}):t[n]=l}}(u,l,null),s)for(let e in s){let t=s[e];O(t)&&(l[e]=t.bind(n))}if(r){let t=r.call(n,n);I(t)&&(e.data=tp(t))}if(lY=!0,i)for(let e in i){let t=i[e],r=O(t)?t.bind(n,n):O(t.get)?t.get.bind(n,n):_,s=ij({get:r,set:!O(t)&&O(t.set)?t.set.bind(n):_});Object.defineProperty(l,e,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e})}if(o)for(let e in o)!function e(t,n,l,r){let i=r.includes(".")?rD(l,r):()=>l[r];if(P(t)){let e=n[t];O(e)&&rM(i,e)}else if(O(t))rM(i,t.bind(l));else if(I(t)){if(k(t))t.forEach(t=>e(t,n,l,r));else{let e=O(t.handler)?t.handler.bind(l):n[t.handler];O(e)&&rM(i,e,t)}}}(o[e],l,n,e);if(a){let e=O(a)?a.call(n):a;Reflect.ownKeys(e).forEach(t=>{rt(t,e[t])})}function F(e,t){k(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(c&&lQ(c,e,"c"),F(lc,f),F(lf,p),F(lp,d),F(ld,h),F(ll,g),F(lr,m),F(ly,T),F(l_,E),F(lm,w),F(lh,b),F(lg,C),F(lv,A),k(R)){if(R.length){let t=e.exposed||(e.exposed={});R.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})})}else e.exposed||(e.exposed={})}x&&e.render===_&&(e.render=x),null!=N&&(e.inheritAttrs=N),M&&(e.components=M),L&&(e.directives=L),A&&n$(e)}(e)}finally{eI(),t()}}}let iD={get:(e,t)=>(eH(e,"get",""),e[t])};function iF(e){return{attrs:new Proxy(e.attrs,iD),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function iV(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tI(tC(e.exposed)),{get:(t,n)=>n in t?t[n]:n in lM?lM[n](e):void 0,has:(e,t)=>t in e||t in lM})):e.proxy}function iU(e,t=!0){return O(e)?e.displayName||e.name:e.name||t&&e.__name}let ij=(e,t)=>(function(e,t,n=!1){let l,r;return O(e)?l=e:(l=e.get,r=e.set),new t$(l,r,n)})(e,0,iN);function iB(e,t,n){let l=arguments.length;return 2!==l?(l>3?n=Array.prototype.slice.call(arguments,2):3===l&&ir(n)&&(n=[n]),ic(e,t,n)):!I(t)||k(t)?ic(e,null,t):ir(t)?ic(e,null,[t]):ic(e,t)}function i$(){}function iH(e,t,n,l){let r=n[l];if(r&&iW(r,e))return r;let i=t();return i.memo=e.slice(),i.cacheIndex=l,n[l]=i}function iW(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e<n.length;e++)if(J(n[e],t[e]))return!1;return r9>0&&r8&&r8.push(e),!0}let iK="3.5.13",iz=_,iq=null,iG=void 0,iJ=_,iX={createComponentInstance:iE,setupComponent:iO,renderComponentRoot:rB,setCurrentRenderingInstance:no,isVNode:ir,normalizeVNode:im,getComponentPublicInstance:iV,ensureValidVNode:lN,pushWarningContext:function(e){},popWarningContext:function(){}},iZ=null,iY=null,iQ=null,i0="undefined"!=typeof window&&window.trustedTypes;if(i0)try{d=i0.createPolicy("vue",{createHTML:e=>e})}catch(e){}let i1=d?e=>d.createHTML(e):e=>e,i2="undefined"!=typeof document?document:null,i6=i2&&i2.createElement("template"),i4="transition",i8="animation",i3=Symbol("_vtc"),i5={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},i9=C({},nN,i5),i7=((e=(e,{slots:t})=>iB(nM,sn(e),t)).displayName="Transition",e.props=i9,e),se=(e,t=[])=>{k(e)?e.forEach(e=>e(...t)):e&&e(...t)},st=e=>!!e&&(k(e)?e.some(e=>e.length>1):e.length>1);function sn(e){let t={};for(let n in e)n in i5||(t[n]=e[n]);if(!1===e.css)return t;let{name:n="v",type:l,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:o=`${n}-enter-to`,appearFromClass:a=i,appearActiveClass:u=s,appearToClass:c=o,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(I(e))return[Q(e.enter),Q(e.leave)];{let t=Q(e);return[t,t]}}(r),g=h&&h[0],m=h&&h[1],{onBeforeEnter:_,onEnter:y,onEnterCancelled:b,onLeave:S,onLeaveCancelled:x,onBeforeAppear:E=_,onAppear:w=y,onAppearCancelled:k=b}=t,T=(e,t,n,l)=>{e._enterCancelled=l,sr(e,t?c:o),sr(e,t?u:s),n&&n()},A=(e,t)=>{e._isLeaving=!1,sr(e,f),sr(e,d),sr(e,p),t&&t()},R=e=>(t,n)=>{let r=e?w:y,s=()=>T(t,e,n);se(r,[t,s]),si(()=>{sr(t,e?a:i),sl(t,e?c:o),st(r)||so(t,l,g,s)})};return C(t,{onBeforeEnter(e){se(_,[e]),sl(e,i),sl(e,s)},onBeforeAppear(e){se(E,[e]),sl(e,a),sl(e,u)},onEnter:R(!1),onAppear:R(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>A(e,t);sl(e,f),e._enterCancelled?(sl(e,p),sf()):(sf(),sl(e,p)),si(()=>{e._isLeaving&&(sr(e,f),sl(e,d),st(S)||so(e,l,m,n))}),se(S,[e,n])},onEnterCancelled(e){T(e,!1,void 0,!0),se(b,[e])},onAppearCancelled(e){T(e,!0,void 0,!0),se(k,[e])},onLeaveCancelled(e){A(e),se(x,[e])}})}function sl(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[i3]||(e[i3]=new Set)).add(t)}function sr(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[i3];n&&(n.delete(t),n.size||(e[i3]=void 0))}function si(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ss=0;function so(e,t,n,l){let r=e._endId=++ss,i=()=>{r===e._endId&&l()};if(null!=n)return setTimeout(i,n);let{type:s,timeout:o,propCount:a}=sa(e,t);if(!s)return l();let u=s+"end",c=0,f=()=>{e.removeEventListener(u,p),i()},p=t=>{t.target===e&&++c>=a&&f()};setTimeout(()=>{c<a&&f()},o+1),e.addEventListener(u,p)}function sa(e,t){let n=window.getComputedStyle(e),l=e=>(n[e]||"").split(", "),r=l(`${i4}Delay`),i=l(`${i4}Duration`),s=su(r,i),o=l(`${i8}Delay`),a=l(`${i8}Duration`),u=su(o,a),c=null,f=0,p=0;t===i4?s>0&&(c=i4,f=s,p=i.length):t===i8?u>0&&(c=i8,f=u,p=a.length):p=(c=(f=Math.max(s,u))>0?s>u?i4:i8:null)?c===i4?i.length:a.length:0;let d=c===i4&&/\b(transform|all)(,|$)/.test(l(`${i4}Property`).toString());return{type:c,timeout:f,propCount:p,hasTransform:d}}function su(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>sc(t)+sc(e[n])))}function sc(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function sf(){return document.body.offsetHeight}let sp=Symbol("_vod"),sd=Symbol("_vsh"),sh={beforeMount(e,{value:t},{transition:n}){e[sp]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):sg(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:l}){!t!=!n&&(l?t?(l.beforeEnter(e),sg(e,!0),l.enter(e)):l.leave(e,()=>{sg(e,!1)}):sg(e,t))},beforeUnmount(e,{value:t}){sg(e,t)}};function sg(e,t){e.style.display=t?e[sp]:"none",e[sd]=!t}let sv=Symbol("");function sm(e){let t=ik();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>s_(e,n))},l=()=>{let l=e(t.proxy);t.ce?s_(t.ce,l):function e(t,n){if(128&t.shapeFlag){let l=t.suspense;t=l.activeBranch,l.pendingBranch&&!l.isHydrating&&l.effects.push(()=>{e(l.activeBranch,n)})}for(;t.component;)t=t.component.subTree;if(1&t.shapeFlag&&t.el)s_(t.el,n);else if(t.type===r0)t.children.forEach(t=>e(t,n));else if(t.type===r6){let{el:e,anchor:l}=t;for(;e&&(s_(e,n),e!==l);)e=e.nextSibling}}(t.subTree,l),n(l)};lp(()=>{nt(l)}),lf(()=>{rM(l,_,{flush:"post"});let e=new MutationObserver(l);e.observe(t.subTree.el.parentNode,{childList:!0}),lg(()=>e.disconnect())})}function s_(e,t){if(1===e.nodeType){let n=e.style,l="";for(let e in t)n.setProperty(`--${e}`,t[e]),l+=`--${e}: ${t[e]};`;n[sv]=l}}let sy=/(^|;)\s*display\s*:/,sb=/\s*!important$/;function sS(e,t,n){if(k(n))n.forEach(n=>sS(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{let l=function(e,t){let n=sx[t];if(n)return n;let l=W(t);if("filter"!==l&&l in e)return sx[t]=l;l=q(l);for(let n=0;n<sC.length;n++){let r=sC[n]+l;if(r in e)return sx[t]=r}return t}(e,t);sb.test(n)?e.setProperty(z(l),n.replace(sb,""),"important"):e[l]=n}}let sC=["Webkit","Moz","ms"],sx={},sE="http://www.w3.org/1999/xlink";function sw(e,t,n,l,r,i=ea(t)){l&&t.startsWith("xlink:")?null==n?e.removeAttributeNS(sE,t.slice(6,t.length)):e.setAttributeNS(sE,t,n):null==n||i&&!(n||""===n)?e.removeAttribute(t):e.setAttribute(t,i?"":M(n)?String(n):n)}function sk(e,t,n,l,r){if("innerHTML"===t||"textContent"===t){null!=n&&(e[t]="innerHTML"===t?i1(n):n);return}let i=e.tagName;if("value"===t&&"PROGRESS"!==i&&!i.includes("-")){let l="OPTION"===i?e.getAttribute("value")||"":e.value,r=null==n?"checkbox"===e.type?"on":"":String(n);l===r&&"_value"in e||(e.value=r),null==n&&e.removeAttribute(t),e._value=n;return}let s=!1;if(""===n||null==n){let l=typeof e[t];if("boolean"===l){var o;n=!!(o=n)||""===o}else null==n&&"string"===l?(n="",s=!0):"number"===l&&(n=0,s=!0)}try{e[t]=n}catch(e){}s&&e.removeAttribute(r||t)}function sT(e,t,n,l){e.addEventListener(t,n,l)}let sA=Symbol("_vei"),sR=/(?:Once|Passive|Capture)$/,sN=0,sO=Promise.resolve(),sP=()=>sN||(sO.then(()=>sN=0),sN=Date.now()),sM=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&123>e.charCodeAt(2),sI={};function sL(e,t,n){let l=nj(e,t);U(l)&&C(l,t);class r extends sV{constructor(e){super(l,e,n)}}return r.def=l,r}let sD=(e,t)=>sL(e,t,op),sF="undefined"!=typeof HTMLElement?HTMLElement:class{};class sV extends sF{constructor(e,t={},n=of){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==of?this._root=this.shadowRoot:!1!==e.shadowRoot?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof sV){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,t9(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e<this.attributes.length;e++)this._setAttr(this.attributes[e].name);this._ob=new MutationObserver(e=>{for(let t of e)this._setAttr(t.attributeName)}),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{let n;this._resolved=!0,this._pendingResolve=void 0;let{props:l,styles:r}=e;if(l&&!k(l))for(let e in l){let t=l[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=Q(this._props[e])),(n||(n=Object.create(null)))[W(e)]=!0)}this._numberProps=n,t&&this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then(t=>e(this._def=t,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)w(this,e)||Object.defineProperty(this,e,{get:()=>tO(t[e])})}_resolveProps(e){let{props:t}=e,n=k(t)?t:Object.keys(t||{});for(let e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(W))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):sI,l=W(e);t&&this._numberProps&&this._numberProps[l]&&(n=Q(n)),this._setProp(l,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,l=!1){if(t!==this._props[e]&&(t===sI?delete this._props[e]:(this._props[e]=t,"key"===e&&this._app&&(this._app._ceVNode.key=t)),l&&this._instance&&this._update(),n)){let n=this._ob;n&&n.disconnect(),!0===t?this.setAttribute(z(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(z(e),t+""):t||this.removeAttribute(z(e)),n&&n.observe(this,{attributes:!0})}}_update(){ou(this._createVNode(),this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=ic(this._def,C(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,U(t[0])?C({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),z(e)!==e&&t(z(e),n)},this._setParent()}),t}_applyStyles(e,t){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let n=this._nonce;for(let t=e.length-1;t>=0;t--){let l=document.createElement("style");n&&l.setAttribute("nonce",n),l.textContent=e[t],this.shadowRoot.prepend(l)}}_parseSlots(){let e;let t=this._slots={};for(;e=this.firstChild;){let n=1===e.nodeType&&e.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(e),this.removeChild(e)}}_renderSlots(){let e=(this._teleportTarget||this).querySelectorAll("slot"),t=this._instance.type.__scopeId;for(let n=0;n<e.length;n++){let l=e[n],r=l.getAttribute("name")||"default",i=this._slots[r],s=l.parentNode;if(i)for(let e of i){if(t&&1===e.nodeType){let n;let l=t+"-s",r=document.createTreeWalker(e,1);for(e.setAttribute(l,"");n=r.nextNode();)n.setAttribute(l,"")}s.insertBefore(e,l)}else for(;l.firstChild;)s.insertBefore(l.firstChild,l);s.removeChild(l)}}_injectChildStyle(e){this._applyStyles(e.styles,e)}_removeChildStyle(e){}}function sU(e){let t=ik();return t&&t.ce||null}function sj(){let e=sU();return e&&e.shadowRoot}function sB(e="$style"){{let t=ik();if(!t)return g;let n=t.type.__cssModules;return n&&n[e]||g}}let s$=new WeakMap,sH=new WeakMap,sW=Symbol("_moveCb"),sK=Symbol("_enterCb"),sz=(t={name:"TransitionGroup",props:C({},i9,{tag:String,moveClass:String}),setup(e,{slots:t}){let n,l;let r=ik(),i=nA();return ld(()=>{if(!n.length)return;let t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){let l=e.cloneNode(),r=e[i3];r&&r.forEach(e=>{e.split(/\s+/).forEach(e=>e&&l.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&l.classList.add(e)),l.style.display="none";let i=1===t.nodeType?t:t.parentNode;i.appendChild(l);let{hasTransform:s}=sa(l);return i.removeChild(l),s}(n[0].el,r.vnode.el,t))return;n.forEach(sq),n.forEach(sG);let l=n.filter(sJ);sf(),l.forEach(e=>{let n=e.el,l=n.style;sl(n,t),l.transform=l.webkitTransform=l.transitionDuration="";let r=n[sW]=e=>{(!e||e.target===n)&&(!e||/transform$/.test(e.propertyName))&&(n.removeEventListener("transitionend",r),n[sW]=null,sr(n,t))};n.addEventListener("transitionend",r)})}),()=>{let s=tS(e),o=sn(s),a=s.tag||r0;if(n=[],l)for(let e=0;e<l.length;e++){let t=l[e];t.el&&t.el instanceof Element&&(n.push(t),nV(t,nL(t,o,i,r)),s$.set(t,t.el.getBoundingClientRect()))}l=t.default?nU(t.default()):[];for(let e=0;e<l.length;e++){let t=l[e];null!=t.key&&nV(t,nL(t,o,i,r))}return ic(a,null,l)}}},delete t.props.mode,t);function sq(e){let t=e.el;t[sW]&&t[sW](),t[sK]&&t[sK]()}function sG(e){sH.set(e,e.el.getBoundingClientRect())}function sJ(e){let t=s$.get(e),n=sH.get(e),l=t.left-n.left,r=t.top-n.top;if(l||r){let t=e.el.style;return t.transform=t.webkitTransform=`translate(${l}px,${r}px)`,t.transitionDuration="0s",e}}let sX=e=>{let t=e.props["onUpdate:modelValue"]||!1;return k(t)?e=>X(t,e):t};function sZ(e){e.target.composing=!0}function sY(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}let sQ=Symbol("_assign"),s0={created(e,{modifiers:{lazy:t,trim:n,number:l}},r){e[sQ]=sX(r);let i=l||r.props&&"number"===r.props.type;sT(e,t?"change":"input",t=>{if(t.target.composing)return;let l=e.value;n&&(l=l.trim()),i&&(l=Y(l)),e[sQ](l)}),n&&sT(e,"change",()=>{e.value=e.value.trim()}),t||(sT(e,"compositionstart",sZ),sT(e,"compositionend",sY),sT(e,"change",sY))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:l,trim:r,number:i}},s){if(e[sQ]=sX(s),e.composing)return;let o=(i||"number"===e.type)&&!/^0\d/.test(e.value)?Y(e.value):e.value,a=null==t?"":t;o===a||document.activeElement===e&&"range"!==e.type&&(l&&t===n||r&&e.value.trim()===a)||(e.value=a)}},s1={deep:!0,created(e,t,n){e[sQ]=sX(n),sT(e,"change",()=>{let t=e._modelValue,n=s3(e),l=e.checked,r=e[sQ];if(k(t)){let e=ec(t,n),i=-1!==e;if(l&&!i)r(t.concat(n));else if(!l&&i){let n=[...t];n.splice(e,1),r(n)}}else if(A(t)){let e=new Set(t);l?e.add(n):e.delete(n),r(e)}else r(s5(e,l))})},mounted:s2,beforeUpdate(e,t,n){e[sQ]=sX(n),s2(e,t,n)}};function s2(e,{value:t,oldValue:n},l){let r;if(e._modelValue=t,k(t))r=ec(t,l.props.value)>-1;else if(A(t))r=t.has(l.props.value);else{if(t===n)return;r=eu(t,s5(e,!0))}e.checked!==r&&(e.checked=r)}let s6={created(e,{value:t},n){e.checked=eu(t,n.props.value),e[sQ]=sX(n),sT(e,"change",()=>{e[sQ](s3(e))})},beforeUpdate(e,{value:t,oldValue:n},l){e[sQ]=sX(l),t!==n&&(e.checked=eu(t,l.props.value))}},s4={deep:!0,created(e,{value:t,modifiers:{number:n}},l){let r=A(t);sT(e,"change",()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?Y(s3(e)):s3(e));e[sQ](e.multiple?r?new Set(t):t:t[0]),e._assigning=!0,t9(()=>{e._assigning=!1})}),e[sQ]=sX(l)},mounted(e,{value:t}){s8(e,t)},beforeUpdate(e,t,n){e[sQ]=sX(n)},updated(e,{value:t}){e._assigning||s8(e,t)}};function s8(e,t){let n=e.multiple,l=k(t);if(!n||l||A(t)){for(let r=0,i=e.options.length;r<i;r++){let i=e.options[r],s=s3(i);if(n){if(l){let e=typeof s;"string"===e||"number"===e?i.selected=t.some(e=>String(e)===String(s)):i.selected=ec(t,s)>-1}else i.selected=t.has(s)}else if(eu(s3(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function s3(e){return"_value"in e?e._value:e.value}function s5(e,t){let n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}let s9={created(e,t,n){oe(e,t,n,null,"created")},mounted(e,t,n){oe(e,t,n,null,"mounted")},beforeUpdate(e,t,n,l){oe(e,t,n,l,"beforeUpdate")},updated(e,t,n,l){oe(e,t,n,l,"updated")}};function s7(e,t){switch(e){case"SELECT":return s4;case"TEXTAREA":return s0;default:switch(t){case"checkbox":return s1;case"radio":return s6;default:return s0}}}function oe(e,t,n,l,r){let i=s7(e.tagName,n.props&&n.props.type)[r];i&&i(e,t,n,l)}let ot=["ctrl","shift","alt","meta"],on={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>ot.some(n=>e[`${n}Key`]&&!t.includes(n))},ol=(e,t)=>{let n=e._withMods||(e._withMods={}),l=t.join(".");return n[l]||(n[l]=(n,...l)=>{for(let e=0;e<t.length;e++){let l=on[t[e]];if(l&&l(n,t))return}return e(n,...l)})},or={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},oi=(e,t)=>{let n=e._withKeys||(e._withKeys={}),l=t.join(".");return n[l]||(n[l]=n=>{if(!("key"in n))return;let l=z(n.key);if(t.some(e=>e===l||or[e]===l))return e(n)})},os=C({patchProp:(e,t,n,l,r,i)=>{let s="svg"===r;"class"===t?function(e,t,n){let l=e[i3];l&&(t=(t?[t,...l]:[...l]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,l,s):"style"===t?function(e,t,n){let l=e.style,r=P(n),i=!1;if(n&&!r){if(t){if(P(t))for(let e of t.split(";")){let t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&sS(l,t,"")}else for(let e in t)null==n[e]&&sS(l,e,"")}for(let e in n)"display"===e&&(i=!0),sS(l,e,n[e])}else if(r){if(t!==n){let e=l[sv];e&&(n+=";"+e),l.cssText=n,i=sy.test(n)}}else t&&e.removeAttribute("style");sp in e&&(e[sp]=i?l.display:"",e[sd]&&(l.display="none"))}(e,n,l):b(t)?S(t)||function(e,t,n,l,r=null){let i=e[sA]||(e[sA]={}),s=i[t];if(l&&s)s.value=l;else{let[n,o]=function(e){let t;if(sR.test(e)){let n;for(t={};n=e.match(sR);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):z(e.slice(2)),t]}(t);l?sT(e,n,i[t]=function(e,t){let n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();tQ(function(e,t){if(!k(t))return t;{let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}}(e,n.value),t,5,[e])};return n.value=e,n.attached=sP(),n}(l,r),o):s&&(!function(e,t,n,l){e.removeEventListener(t,n,l)}(e,n,s,o),i[t]=void 0)}}(e,t,0,l,i):("."===t[0]?(t=t.slice(1),0):"^"===t[0]?(t=t.slice(1),1):!function(e,t,n,l){if(l)return!!("innerHTML"===t||"textContent"===t||t in e&&sM(t)&&O(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"form"===t||"list"===t&&"INPUT"===e.tagName||"type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){let t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return!(sM(t)&&P(n))&&t in e}(e,t,l,s))?e._isVueCE&&(/[A-Z]/.test(t)||!P(l))?sk(e,W(t),l,i,t):("true-value"===t?e._trueValue=l:"false-value"===t&&(e._falseValue=l),sw(e,t,l,s)):(sk(e,t,l),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||sw(e,t,l,s,i,"value"!==t))}},{insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,l)=>{let r="svg"===t?i2.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?i2.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?i2.createElement(e,{is:n}):i2.createElement(e);return"select"===e&&l&&null!=l.multiple&&r.setAttribute("multiple",l.multiple),r},createText:e=>i2.createTextNode(e),createComment:e=>i2.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>i2.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,l,r,i){let s=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==i&&(r=r.nextSibling););else{i6.innerHTML=i1("svg"===l?`<svg>${e}</svg>`:"mathml"===l?`<math>${e}</math>`:e);let r=i6.content;if("svg"===l||"mathml"===l){let e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}}),oo=!1;function oa(){return f=oo?f:rS(os),oo=!0,f}let ou=(...e)=>{(f||(f=rb(os))).render(...e)},oc=(...e)=>{oa().hydrate(...e)},of=(...e)=>{let t=(f||(f=rb(os))).createApp(...e),{mount:n}=t;return t.mount=e=>{let l=oh(e);if(!l)return;let r=t._component;O(r)||r.render||r.template||(r.template=l.innerHTML),1===l.nodeType&&(l.textContent="");let i=n(l,!1,od(l));return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),i},t},op=(...e)=>{let t=oa().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=oh(e);if(t)return n(t,!0,od(t))},t};function od(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function oh(e){return P(e)?document.querySelector(e):e}let og=!1,ov=()=>{og||(og=!0,s0.getSSRProps=({value:e})=>({value:e}),s6.getSSRProps=({value:e},t)=>{if(t.props&&eu(t.props.value,e))return{checked:!0}},s1.getSSRProps=({value:e},t)=>{if(k(e)){if(t.props&&ec(e,t.props.value)>-1)return{checked:!0}}else if(A(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},s9.getSSRProps=(e,t)=>{if("string"!=typeof t.type)return;let n=s7(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)},sh.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}})},om=()=>{};export{nM as BaseTransition,nN as BaseTransitionPropsValidators,r2 as Comment,iQ as DeprecationTypes,eg as EffectScope,tZ as ErrorCodes,iq as ErrorTypeStrings,r0 as Fragment,lt as KeepAlive,eb as ReactiveEffect,r6 as Static,rG as Suspense,nx as Teleport,r1 as Text,tH as TrackOpTypes,i7 as Transition,sz as TransitionGroup,tW as TriggerOpTypes,sV as VueElement,tX as assertNumber,tQ as callWithAsyncErrorHandling,tY as callWithErrorHandling,W as camelize,q as capitalize,id as cloneVNode,iY as compatUtils,om as compile,ij as computed,of as createApp,il as createBlock,iv as createCommentVNode,it as createElementBlock,iu as createElementVNode,rS as createHydrationRenderer,lX as createPropsRestProxy,rb as createRenderer,op as createSSRApp,lA as createSlots,ig as createStaticVNode,ih as createTextVNode,ic as createVNode,tD as customRef,n9 as defineAsyncComponent,nj as defineComponent,sL as defineCustomElement,lV as defineEmits,lU as defineExpose,l$ as defineModel,lj as defineOptions,lF as defineProps,sD as defineSSRCustomElement,lB as defineSlots,iG as devtools,eR as effect,ev as effectScope,ik as getCurrentInstance,em as getCurrentScope,tq as getCurrentWatcher,nU as getTransitionRawChildren,ip as guardReactiveProps,iB as h,t0 as handleError,rl as hasInjectionContext,oc as hydrate,n6 as hydrateOnIdle,n3 as hydrateOnInteraction,n8 as hydrateOnMediaQuery,n4 as hydrateOnVisible,i$ as initCustomFormatter,ov as initDirectivesForSSR,rn as inject,iW as isMemoSame,tb as isProxy,tm as isReactive,t_ as isReadonly,tw as isRef,iI as isRuntimeOnly,ty as isShallow,ir as isVNode,tC as markRaw,lG as mergeDefaults,lJ as mergeModels,ib as mergeProps,t9 as nextTick,es as normalizeClass,eo as normalizeProps,en as normalizeStyle,ll as onActivated,lc as onBeforeMount,lh as onBeforeUnmount,lp as onBeforeUpdate,lr as onDeactivated,ly as onErrorCaptured,lf as onMounted,l_ as onRenderTracked,lm as onRenderTriggered,e_ as onScopeDispose,lv as onServerPrefetch,lg as onUnmounted,ld as onUpdated,tG as onWatcherCleanup,r3 as openBlock,nu as popScopeId,rt as provide,tI as proxyRefs,na as pushScopeId,nt as queuePostFlushCb,tp as reactive,th as readonly,tk as ref,iM as registerRuntimeCompiler,ou as render,lT as renderList,lR as renderSlot,lS as resolveComponent,lE as resolveDirective,lx as resolveDynamicComponent,iZ as resolveFilter,nL as resolveTransitionHooks,r7 as setBlockTracking,iJ as setDevtoolsHook,nV as setTransitionHooks,td as shallowReactive,tg as shallowReadonly,tT as shallowRef,rA as ssrContextKey,iX as ssrUtils,eN as stop,ep as toDisplayString,G as toHandlerKey,lO as toHandlers,tS as toRaw,tj as toRef,tF as toRefs,tP as toValue,is as transformVNodeArgs,tN as triggerRef,tO as unref,lK as useAttrs,sB as useCssModule,sm as useCssVars,sU as useHost,nB as useId,rF as useModel,rR as useSSRContext,sj as useShadowRoot,lW as useSlots,nH as useTemplateRef,nA as useTransitionState,s1 as vModelCheckbox,s9 as vModelDynamic,s6 as vModelRadio,s4 as vModelSelect,s0 as vModelText,sh as vShow,iK as version,iz as warn,rM as watch,rN as watchEffect,rO as watchPostEffect,rP as watchSyncEffect,lZ as withAsyncContext,nf as withCtx,lH as withDefaults,np as withDirectives,oi as withKeys,iH as withMemo,ol as withModifiers,nc as withScopeId}; diff --git a/vuetest/node_modules/vue/dist/vue.runtime.esm-bundler.js b/vuetest/node_modules/vue/dist/vue.runtime.esm-bundler.js new file mode 100644 index 0000000..5f119d9 --- /dev/null +++ b/vuetest/node_modules/vue/dist/vue.runtime.esm-bundler.js @@ -0,0 +1,26 @@ +/** +* vue v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +import { initCustomFormatter, warn } from '@vue/runtime-dom'; +export * from '@vue/runtime-dom'; + +function initDev() { + { + initCustomFormatter(); + } +} + +if (!!(process.env.NODE_ENV !== "production")) { + initDev(); +} +const compile = () => { + if (!!(process.env.NODE_ENV !== "production")) { + warn( + `Runtime compilation is not supported in this build of Vue.` + (` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".` ) + ); + } +}; + +export { compile }; diff --git a/vuetest/node_modules/vue/dist/vue.runtime.global.js b/vuetest/node_modules/vue/dist/vue.runtime.global.js new file mode 100644 index 0000000..cb4ce25 --- /dev/null +++ b/vuetest/node_modules/vue/dist/vue.runtime.global.js @@ -0,0 +1,12407 @@ +/** +* vue v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +var Vue = (function (exports) { + 'use strict'; + + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function makeMap(str) { + const map = /* @__PURE__ */ Object.create(null); + for (const key of str.split(",")) map[key] = 1; + return (val) => val in map; + } + + const EMPTY_OBJ = Object.freeze({}) ; + const EMPTY_ARR = Object.freeze([]) ; + const NOOP = () => { + }; + const NO = () => false; + const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter + (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); + const isModelListener = (key) => key.startsWith("onUpdate:"); + const extend = Object.assign; + const remove = (arr, el) => { + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } + }; + const hasOwnProperty$1 = Object.prototype.hasOwnProperty; + const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); + const isArray = Array.isArray; + const isMap = (val) => toTypeString(val) === "[object Map]"; + const isSet = (val) => toTypeString(val) === "[object Set]"; + const isDate = (val) => toTypeString(val) === "[object Date]"; + const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; + const isFunction = (val) => typeof val === "function"; + const isString = (val) => typeof val === "string"; + const isSymbol = (val) => typeof val === "symbol"; + const isObject = (val) => val !== null && typeof val === "object"; + const isPromise = (val) => { + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); + }; + const objectToString = Object.prototype.toString; + const toTypeString = (value) => objectToString.call(value); + const toRawType = (value) => { + return toTypeString(value).slice(8, -1); + }; + const isPlainObject = (val) => toTypeString(val) === "[object Object]"; + const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; + const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" + ); + const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" + ); + const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; + }; + const camelizeRE = /-(\w)/g; + const camelize = cacheStringFunction( + (str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); + } + ); + const hyphenateRE = /\B([A-Z])/g; + const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() + ); + const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); + }); + const toHandlerKey = cacheStringFunction( + (str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + } + ); + const hasChanged = (value, oldValue) => !Object.is(value, oldValue); + const invokeArrayFns = (fns, ...arg) => { + for (let i = 0; i < fns.length; i++) { + fns[i](...arg); + } + }; + const def = (obj, key, value, writable = false) => { + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + writable, + value + }); + }; + const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; + }; + const toNumber = (val) => { + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; + }; + let _globalThis; + const getGlobalThis = () => { + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); + }; + + const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; + const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); + + function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } + } + const listDelimiterRE = /;(?![^(]*\))/g; + const propertyDelimiterRE = /:([^]+)/; + const styleCommentRE = /\/\*[^]*?\*\//g; + function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; + } + function stringifyStyle(styles) { + if (!styles) return ""; + if (isString(styles)) return styles; + let ret = ""; + for (const key in styles) { + const value = styles[key]; + if (isString(value) || typeof value === "number") { + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + ret += `${normalizedKey}:${value};`; + } + } + return ret; + } + function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); + } + function normalizeProps(props) { + if (!props) return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; + } + + const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; + const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; + const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; + const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); + const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); + const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); + + const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; + const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); + const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` + ); + function includeBooleanAttr(value) { + return !!value || value === ""; + } + const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` + ); + const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` + ); + function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; + } + + const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; + function getEscapedCssVarName(key, doubleEscape) { + return key.replace( + cssVarNameEscapeSymbolsRE, + (s) => `\\${s}` + ); + } + + function looseCompareArrays(a, b) { + if (a.length !== b.length) return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; + } + function looseEqual(a, b) { + if (a === b) return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); + } + function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); + } + + const isRef$1 = (val) => { + return !!(val && val["__v_isRef"] === true); + }; + const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); + }; + const replacer = (_key, val) => { + if (isRef$1(val)) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; + }; + const stringifySymbol = (v, i = "") => { + var _a; + return ( + // Symbol.description in es2019+ so we need to cast here to pass + // the lib: es2016 check + isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v + ); + }; + + function warn$2(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); + } + + let activeEffectScope; + class EffectScope { + constructor(detached = false) { + this.detached = detached; + /** + * @internal + */ + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this._isPaused = false; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + pause() { + if (this._active) { + this._isPaused = true; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].pause(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].pause(); + } + } + } + /** + * Resumes the effect scope, including all child scopes and effects. + */ + resume() { + if (this._active) { + if (this._isPaused) { + this._isPaused = false; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].resume(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].resume(); + } + } + } + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { + activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn$2(`cannot run an inactive effect scope.`); + } + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + this._active = false; + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + this.effects.length = 0; + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + this.cleanups.length = 0; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); + } + this.scopes.length = 0; + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + } + } + } + function effectScope(detached) { + return new EffectScope(detached); + } + function getCurrentScope() { + return activeEffectScope; + } + function onScopeDispose(fn, failSilently = false) { + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else if (!failSilently) { + warn$2( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } + } + + let activeSub; + const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); + class ReactiveEffect { + constructor(fn) { + this.fn = fn; + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 1 | 4; + /** + * @internal + */ + this.next = void 0; + /** + * @internal + */ + this.cleanup = void 0; + this.scheduler = void 0; + if (activeEffectScope && activeEffectScope.active) { + activeEffectScope.effects.push(this); + } + } + pause() { + this.flags |= 64; + } + resume() { + if (this.flags & 64) { + this.flags &= ~64; + if (pausedQueueEffects.has(this)) { + pausedQueueEffects.delete(this); + this.trigger(); + } + } + } + /** + * @internal + */ + notify() { + if (this.flags & 2 && !(this.flags & 32)) { + return; + } + if (!(this.flags & 8)) { + batch(this); + } + } + run() { + if (!(this.flags & 1)) { + return this.fn(); + } + this.flags |= 2; + cleanupEffect(this); + prepareDeps(this); + const prevEffect = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = this; + shouldTrack = true; + try { + return this.fn(); + } finally { + if (activeSub !== this) { + warn$2( + "Active effect was not restored correctly - this is likely a Vue internal bug." + ); + } + cleanupDeps(this); + activeSub = prevEffect; + shouldTrack = prevShouldTrack; + this.flags &= ~2; + } + } + stop() { + if (this.flags & 1) { + for (let link = this.deps; link; link = link.nextDep) { + removeSub(link); + } + this.deps = this.depsTail = void 0; + cleanupEffect(this); + this.onStop && this.onStop(); + this.flags &= ~1; + } + } + trigger() { + if (this.flags & 64) { + pausedQueueEffects.add(this); + } else if (this.scheduler) { + this.scheduler(); + } else { + this.runIfDirty(); + } + } + /** + * @internal + */ + runIfDirty() { + if (isDirty(this)) { + this.run(); + } + } + get dirty() { + return isDirty(this); + } + } + let batchDepth = 0; + let batchedSub; + let batchedComputed; + function batch(sub, isComputed = false) { + sub.flags |= 8; + if (isComputed) { + sub.next = batchedComputed; + batchedComputed = sub; + return; + } + sub.next = batchedSub; + batchedSub = sub; + } + function startBatch() { + batchDepth++; + } + function endBatch() { + if (--batchDepth > 0) { + return; + } + if (batchedComputed) { + let e = batchedComputed; + batchedComputed = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + e = next; + } + } + let error; + while (batchedSub) { + let e = batchedSub; + batchedSub = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + if (e.flags & 1) { + try { + ; + e.trigger(); + } catch (err) { + if (!error) error = err; + } + } + e = next; + } + } + if (error) throw error; + } + function prepareDeps(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + link.version = -1; + link.prevActiveLink = link.dep.activeLink; + link.dep.activeLink = link; + } + } + function cleanupDeps(sub) { + let head; + let tail = sub.depsTail; + let link = tail; + while (link) { + const prev = link.prevDep; + if (link.version === -1) { + if (link === tail) tail = prev; + removeSub(link); + removeDep(link); + } else { + head = link; + } + link.dep.activeLink = link.prevActiveLink; + link.prevActiveLink = void 0; + link = prev; + } + sub.deps = head; + sub.depsTail = tail; + } + function isDirty(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { + return true; + } + } + if (sub._dirty) { + return true; + } + return false; + } + function refreshComputed(computed) { + if (computed.flags & 4 && !(computed.flags & 16)) { + return; + } + computed.flags &= ~16; + if (computed.globalVersion === globalVersion) { + return; + } + computed.globalVersion = globalVersion; + const dep = computed.dep; + computed.flags |= 2; + if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { + computed.flags &= ~2; + return; + } + const prevSub = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = computed; + shouldTrack = true; + try { + prepareDeps(computed); + const value = computed.fn(computed._value); + if (dep.version === 0 || hasChanged(value, computed._value)) { + computed._value = value; + dep.version++; + } + } catch (err) { + dep.version++; + throw err; + } finally { + activeSub = prevSub; + shouldTrack = prevShouldTrack; + cleanupDeps(computed); + computed.flags &= ~2; + } + } + function removeSub(link, soft = false) { + const { dep, prevSub, nextSub } = link; + if (prevSub) { + prevSub.nextSub = nextSub; + link.prevSub = void 0; + } + if (nextSub) { + nextSub.prevSub = prevSub; + link.nextSub = void 0; + } + if (dep.subsHead === link) { + dep.subsHead = nextSub; + } + if (dep.subs === link) { + dep.subs = prevSub; + if (!prevSub && dep.computed) { + dep.computed.flags &= ~4; + for (let l = dep.computed.deps; l; l = l.nextDep) { + removeSub(l, true); + } + } + } + if (!soft && !--dep.sc && dep.map) { + dep.map.delete(dep.key); + } + } + function removeDep(link) { + const { prevDep, nextDep } = link; + if (prevDep) { + prevDep.nextDep = nextDep; + link.prevDep = void 0; + } + if (nextDep) { + nextDep.prevDep = prevDep; + link.nextDep = void 0; + } + } + function effect(fn, options) { + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const e = new ReactiveEffect(fn); + if (options) { + extend(e, options); + } + try { + e.run(); + } catch (err) { + e.stop(); + throw err; + } + const runner = e.run.bind(e); + runner.effect = e; + return runner; + } + function stop(runner) { + runner.effect.stop(); + } + let shouldTrack = true; + const trackStack = []; + function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; + } + function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; + } + function cleanupEffect(e) { + const { cleanup } = e; + e.cleanup = void 0; + if (cleanup) { + const prevSub = activeSub; + activeSub = void 0; + try { + cleanup(); + } finally { + activeSub = prevSub; + } + } + } + + let globalVersion = 0; + class Link { + constructor(sub, dep) { + this.sub = sub; + this.dep = dep; + this.version = dep.version; + this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; + } + } + class Dep { + constructor(computed) { + this.computed = computed; + this.version = 0; + /** + * Link between this dep and the current active effect + */ + this.activeLink = void 0; + /** + * Doubly linked list representing the subscribing effects (tail) + */ + this.subs = void 0; + /** + * For object property deps cleanup + */ + this.map = void 0; + this.key = void 0; + /** + * Subscriber counter + */ + this.sc = 0; + { + this.subsHead = void 0; + } + } + track(debugInfo) { + if (!activeSub || !shouldTrack || activeSub === this.computed) { + return; + } + let link = this.activeLink; + if (link === void 0 || link.sub !== activeSub) { + link = this.activeLink = new Link(activeSub, this); + if (!activeSub.deps) { + activeSub.deps = activeSub.depsTail = link; + } else { + link.prevDep = activeSub.depsTail; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + } + addSub(link); + } else if (link.version === -1) { + link.version = this.version; + if (link.nextDep) { + const next = link.nextDep; + next.prevDep = link.prevDep; + if (link.prevDep) { + link.prevDep.nextDep = next; + } + link.prevDep = activeSub.depsTail; + link.nextDep = void 0; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + if (activeSub.deps === link) { + activeSub.deps = next; + } + } + } + if (activeSub.onTrack) { + activeSub.onTrack( + extend( + { + effect: activeSub + }, + debugInfo + ) + ); + } + return link; + } + trigger(debugInfo) { + this.version++; + globalVersion++; + this.notify(debugInfo); + } + notify(debugInfo) { + startBatch(); + try { + if (true) { + for (let head = this.subsHead; head; head = head.nextSub) { + if (head.sub.onTrigger && !(head.sub.flags & 8)) { + head.sub.onTrigger( + extend( + { + effect: head.sub + }, + debugInfo + ) + ); + } + } + } + for (let link = this.subs; link; link = link.prevSub) { + if (link.sub.notify()) { + ; + link.sub.dep.notify(); + } + } + } finally { + endBatch(); + } + } + } + function addSub(link) { + link.dep.sc++; + if (link.sub.flags & 4) { + const computed = link.dep.computed; + if (computed && !link.dep.subs) { + computed.flags |= 4 | 16; + for (let l = computed.deps; l; l = l.nextDep) { + addSub(l); + } + } + const currentTail = link.dep.subs; + if (currentTail !== link) { + link.prevSub = currentTail; + if (currentTail) currentTail.nextSub = link; + } + if (link.dep.subsHead === void 0) { + link.dep.subsHead = link; + } + link.dep.subs = link; + } + } + const targetMap = /* @__PURE__ */ new WeakMap(); + const ITERATE_KEY = Symbol( + "Object iterate" + ); + const MAP_KEY_ITERATE_KEY = Symbol( + "Map keys iterate" + ); + const ARRAY_ITERATE_KEY = Symbol( + "Array iterate" + ); + function track(target, type, key) { + if (shouldTrack && activeSub) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = new Dep()); + dep.map = depsMap; + dep.key = key; + } + { + dep.track({ + target, + type, + key + }); + } + } + } + function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + globalVersion++; + return; + } + const run = (dep) => { + if (dep) { + { + dep.trigger({ + target, + type, + key, + newValue, + oldValue, + oldTarget + }); + } + } + }; + startBatch(); + if (type === "clear") { + depsMap.forEach(run); + } else { + const targetIsArray = isArray(target); + const isArrayIndex = targetIsArray && isIntegerKey(key); + if (targetIsArray && key === "length") { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { + run(dep); + } + }); + } else { + if (key !== void 0 || depsMap.has(void 0)) { + run(depsMap.get(key)); + } + if (isArrayIndex) { + run(depsMap.get(ARRAY_ITERATE_KEY)); + } + switch (type) { + case "add": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isArrayIndex) { + run(depsMap.get("length")); + } + break; + case "delete": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + run(depsMap.get(ITERATE_KEY)); + } + break; + } + } + } + endBatch(); + } + function getDepFromReactive(object, key) { + const depMap = targetMap.get(object); + return depMap && depMap.get(key); + } + + function reactiveReadArray(array) { + const raw = toRaw(array); + if (raw === array) return raw; + track(raw, "iterate", ARRAY_ITERATE_KEY); + return isShallow(array) ? raw : raw.map(toReactive); + } + function shallowReadArray(arr) { + track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); + return arr; + } + const arrayInstrumentations = { + __proto__: null, + [Symbol.iterator]() { + return iterator(this, Symbol.iterator, toReactive); + }, + concat(...args) { + return reactiveReadArray(this).concat( + ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) + ); + }, + entries() { + return iterator(this, "entries", (value) => { + value[1] = toReactive(value[1]); + return value; + }); + }, + every(fn, thisArg) { + return apply(this, "every", fn, thisArg, void 0, arguments); + }, + filter(fn, thisArg) { + return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); + }, + find(fn, thisArg) { + return apply(this, "find", fn, thisArg, toReactive, arguments); + }, + findIndex(fn, thisArg) { + return apply(this, "findIndex", fn, thisArg, void 0, arguments); + }, + findLast(fn, thisArg) { + return apply(this, "findLast", fn, thisArg, toReactive, arguments); + }, + findLastIndex(fn, thisArg) { + return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); + }, + // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement + forEach(fn, thisArg) { + return apply(this, "forEach", fn, thisArg, void 0, arguments); + }, + includes(...args) { + return searchProxy(this, "includes", args); + }, + indexOf(...args) { + return searchProxy(this, "indexOf", args); + }, + join(separator) { + return reactiveReadArray(this).join(separator); + }, + // keys() iterator only reads `length`, no optimisation required + lastIndexOf(...args) { + return searchProxy(this, "lastIndexOf", args); + }, + map(fn, thisArg) { + return apply(this, "map", fn, thisArg, void 0, arguments); + }, + pop() { + return noTracking(this, "pop"); + }, + push(...args) { + return noTracking(this, "push", args); + }, + reduce(fn, ...args) { + return reduce(this, "reduce", fn, args); + }, + reduceRight(fn, ...args) { + return reduce(this, "reduceRight", fn, args); + }, + shift() { + return noTracking(this, "shift"); + }, + // slice could use ARRAY_ITERATE but also seems to beg for range tracking + some(fn, thisArg) { + return apply(this, "some", fn, thisArg, void 0, arguments); + }, + splice(...args) { + return noTracking(this, "splice", args); + }, + toReversed() { + return reactiveReadArray(this).toReversed(); + }, + toSorted(comparer) { + return reactiveReadArray(this).toSorted(comparer); + }, + toSpliced(...args) { + return reactiveReadArray(this).toSpliced(...args); + }, + unshift(...args) { + return noTracking(this, "unshift", args); + }, + values() { + return iterator(this, "values", toReactive); + } + }; + function iterator(self, method, wrapValue) { + const arr = shallowReadArray(self); + const iter = arr[method](); + if (arr !== self && !isShallow(self)) { + iter._next = iter.next; + iter.next = () => { + const result = iter._next(); + if (result.value) { + result.value = wrapValue(result.value); + } + return result; + }; + } + return iter; + } + const arrayProto = Array.prototype; + function apply(self, method, fn, thisArg, wrappedRetFn, args) { + const arr = shallowReadArray(self); + const needsWrap = arr !== self && !isShallow(self); + const methodFn = arr[method]; + if (methodFn !== arrayProto[method]) { + const result2 = methodFn.apply(self, args); + return needsWrap ? toReactive(result2) : result2; + } + let wrappedFn = fn; + if (arr !== self) { + if (needsWrap) { + wrappedFn = function(item, index) { + return fn.call(this, toReactive(item), index, self); + }; + } else if (fn.length > 2) { + wrappedFn = function(item, index) { + return fn.call(this, item, index, self); + }; + } + } + const result = methodFn.call(arr, wrappedFn, thisArg); + return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; + } + function reduce(self, method, fn, args) { + const arr = shallowReadArray(self); + let wrappedFn = fn; + if (arr !== self) { + if (!isShallow(self)) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, toReactive(item), index, self); + }; + } else if (fn.length > 3) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, item, index, self); + }; + } + } + return arr[method](wrappedFn, ...args); + } + function searchProxy(self, method, args) { + const arr = toRaw(self); + track(arr, "iterate", ARRAY_ITERATE_KEY); + const res = arr[method](...args); + if ((res === -1 || res === false) && isProxy(args[0])) { + args[0] = toRaw(args[0]); + return arr[method](...args); + } + return res; + } + function noTracking(self, method, args = []) { + pauseTracking(); + startBatch(); + const res = toRaw(self)[method].apply(self, args); + endBatch(); + resetTracking(); + return res; + } + + const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); + const builtInSymbols = new Set( + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) + ); + function hasOwnProperty(key) { + if (!isSymbol(key)) key = String(key); + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); + } + class BaseReactiveHandler { + constructor(_isReadonly = false, _isShallow = false) { + this._isReadonly = _isReadonly; + this._isShallow = _isShallow; + } + get(target, key, receiver) { + if (key === "__v_skip") return target["__v_skip"]; + const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return isShallow2; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the receiver is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + let fn; + if (targetIsArray && (fn = arrayInstrumentations[key])) { + return fn; + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get( + target, + key, + // if this is a proxy wrapping a ref, return methods using the raw ref + // as receiver so that we don't have to call `toRaw` on the ref in all + // its class methods + isRef(target) ? target : receiver + ); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (isShallow2) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } + } + class MutableReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(false, isShallow2); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._isShallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set( + target, + key, + value, + isRef(target) ? target : receiver + ); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { + const hadKey = hasOwn(target, key); + const oldValue = target[key]; + const result = Reflect.deleteProperty(target, key); + if (result && hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + } + has(target, key) { + const result = Reflect.has(target, key); + if (!isSymbol(key) || !builtInSymbols.has(key)) { + track(target, "has", key); + } + return result; + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); + return Reflect.ownKeys(target); + } + } + class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(true, isShallow2); + } + set(target, key) { + { + warn$2( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + deleteProperty(target, key) { + { + warn$2( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + } + const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); + const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); + const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); + const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); + + const toShallow = (value) => value; + const getProto = (v) => Reflect.getPrototypeOf(v); + function createIterableMethod(method, isReadonly2, isShallow2) { + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done + }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } + }; + }; + } + function createReadonlyMethod(type) { + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + warn$2( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; + } + function createInstrumentations(readonly, shallow) { + const instrumentations = { + get(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); + } + track(rawTarget, "get", rawKey); + } + const { has } = getProto(rawTarget); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + if (has.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } + }, + get size() { + const target = this["__v_raw"]; + !readonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); + }, + has(key) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!readonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); + } + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); + }, + forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive; + !readonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + } + }; + extend( + instrumentations, + readonly ? { + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear") + } : { + add(value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; + }, + set(key, value) { + if (!shallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; + }, + delete(key) { + const target = toRaw(this); + const { has, get } = getProto(target); + let hadKey = has.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has.call(target, key); + } else { + checkIdentityKeys(target, has, key); + } + const oldValue = get ? get.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + }, + clear() { + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger( + target, + "clear", + void 0, + void 0, + oldTarget + ); + } + return result; + } + } + ); + const iteratorMethods = [ + "keys", + "values", + "entries", + Symbol.iterator + ]; + iteratorMethods.forEach((method) => { + instrumentations[method] = createIterableMethod(method, readonly, shallow); + }); + return instrumentations; + } + function createInstrumentationGetter(isReadonly2, shallow) { + const instrumentations = createInstrumentations(isReadonly2, shallow); + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; + } + const mutableCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, false) + }; + const shallowCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, true) + }; + const readonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, false) + }; + const shallowReadonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, true) + }; + function checkIdentityKeys(target, has, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has.call(target, rawKey)) { + const type = toRawType(target); + warn$2( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } + } + + const reactiveMap = /* @__PURE__ */ new WeakMap(); + const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); + const readonlyMap = /* @__PURE__ */ new WeakMap(); + const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); + function targetTypeMap(rawType) { + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } + } + function getTargetType(value) { + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); + } + function reactive(target) { + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); + } + function shallowReactive(target) { + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); + } + function readonly(target) { + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); + } + function shallowReadonly(target) { + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); + } + function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + { + warn$2( + `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( + target + )}` + ); + } + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; + } + function isReactive(value) { + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); + } + function isReadonly(value) { + return !!(value && value["__v_isReadonly"]); + } + function isShallow(value) { + return !!(value && value["__v_isShallow"]); + } + function isProxy(value) { + return value ? !!value["__v_raw"] : false; + } + function toRaw(observed) { + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; + } + function markRaw(value) { + if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { + def(value, "__v_skip", true); + } + return value; + } + const toReactive = (value) => isObject(value) ? reactive(value) : value; + const toReadonly = (value) => isObject(value) ? readonly(value) : value; + + function isRef(r) { + return r ? r["__v_isRef"] === true : false; + } + function ref(value) { + return createRef(value, false); + } + function shallowRef(value) { + return createRef(value, true); + } + function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); + } + class RefImpl { + constructor(value, isShallow2) { + this.dep = new Dep(); + this["__v_isRef"] = true; + this["__v_isShallow"] = false; + this._rawValue = isShallow2 ? value : toRaw(value); + this._value = isShallow2 ? value : toReactive(value); + this["__v_isShallow"] = isShallow2; + } + get value() { + { + this.dep.track({ + target: this, + type: "get", + key: "value" + }); + } + return this._value; + } + set value(newValue) { + const oldValue = this._rawValue; + const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); + newValue = useDirectValue ? newValue : toRaw(newValue); + if (hasChanged(newValue, oldValue)) { + this._rawValue = newValue; + this._value = useDirectValue ? newValue : toReactive(newValue); + { + this.dep.trigger({ + target: this, + type: "set", + key: "value", + newValue, + oldValue + }); + } + } + } + } + function triggerRef(ref2) { + if (ref2.dep) { + { + ref2.dep.trigger({ + target: ref2, + type: "set", + key: "value", + newValue: ref2._value + }); + } + } + } + function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; + } + function toValue(source) { + return isFunction(source) ? source() : unref(source); + } + const shallowUnwrapHandlers = { + get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } + }; + function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); + } + class CustomRefImpl { + constructor(factory) { + this["__v_isRef"] = true; + this._value = void 0; + const dep = this.dep = new Dep(); + const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); + this._get = get; + this._set = set; + } + get value() { + return this._value = this._get(); + } + set value(newVal) { + this._set(newVal); + } + } + function customRef(factory) { + return new CustomRefImpl(factory); + } + function toRefs(object) { + if (!isProxy(object)) { + warn$2(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; + } + class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this["__v_isRef"] = true; + this._value = void 0; + } + get value() { + const val = this._object[this._key]; + return this._value = val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } + } + class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this["__v_isRef"] = true; + this["__v_isReadonly"] = true; + this._value = void 0; + } + get value() { + return this._value = this._getter(); + } + } + function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } + } + function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); + } + + class ComputedRefImpl { + constructor(fn, setter, isSSR) { + this.fn = fn; + this.setter = setter; + /** + * @internal + */ + this._value = void 0; + /** + * @internal + */ + this.dep = new Dep(this); + /** + * @internal + */ + this.__v_isRef = true; + // TODO isolatedDeclarations "__v_isReadonly" + // A computed is also a subscriber that tracks other deps + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 16; + /** + * @internal + */ + this.globalVersion = globalVersion - 1; + /** + * @internal + */ + this.next = void 0; + // for backwards compat + this.effect = this; + this["__v_isReadonly"] = !setter; + this.isSSR = isSSR; + } + /** + * @internal + */ + notify() { + this.flags |= 16; + if (!(this.flags & 8) && // avoid infinite self recursion + activeSub !== this) { + batch(this, true); + return true; + } + } + get value() { + const link = this.dep.track({ + target: this, + type: "get", + key: "value" + }) ; + refreshComputed(this); + if (link) { + link.version = this.dep.version; + } + return this._value; + } + set value(newValue) { + if (this.setter) { + this.setter(newValue); + } else { + warn$2("Write operation failed: computed value is readonly"); + } + } + } + function computed$1(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + if (isFunction(getterOrOptions)) { + getter = getterOrOptions; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, isSSR); + if (debugOptions && !isSSR) { + cRef.onTrack = debugOptions.onTrack; + cRef.onTrigger = debugOptions.onTrigger; + } + return cRef; + } + + const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" + }; + const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" + }; + + const INITIAL_WATCHER_VALUE = {}; + const cleanupMap = /* @__PURE__ */ new WeakMap(); + let activeWatcher = void 0; + function getCurrentWatcher() { + return activeWatcher; + } + function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { + if (owner) { + let cleanups = cleanupMap.get(owner); + if (!cleanups) cleanupMap.set(owner, cleanups = []); + cleanups.push(cleanupFn); + } else if (!failSilently) { + warn$2( + `onWatcherCleanup() was called when there was no active watcher to associate with.` + ); + } + } + function watch$1(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, once, scheduler, augmentJob, call } = options; + const warnInvalidSource = (s) => { + (options.onWarn || warn$2)( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const reactiveGetter = (source2) => { + if (deep) return source2; + if (isShallow(source2) || deep === false || deep === 0) + return traverse(source2, 1); + return traverse(source2); + }; + let effect; + let getter; + let cleanup; + let boundCleanup; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return call ? call(s, 2) : s(); + } else { + warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { + if (cb) { + getter = call ? () => call(source, 2) : source; + } else { + getter = () => { + if (cleanup) { + pauseTracking(); + try { + cleanup(); + } finally { + resetTracking(); + } + } + const currentEffect = activeWatcher; + activeWatcher = effect; + try { + return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); + } finally { + activeWatcher = currentEffect; + } + }; + } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + const depth = deep === true ? Infinity : deep; + getter = () => traverse(baseGetter(), depth); + } + const scope = getCurrentScope(); + const watchHandle = () => { + effect.stop(); + if (scope && scope.active) { + remove(scope.effects, effect); + } + }; + if (once && cb) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + watchHandle(); + }; + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = (immediateFirstRun) => { + if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { + if (cleanup) { + cleanup(); + } + const currentWatcher = activeWatcher; + activeWatcher = effect; + try { + const args = [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + boundCleanup + ]; + call ? call(cb, 3, args) : ( + // @ts-expect-error + cb(...args) + ); + oldValue = newValue; + } finally { + activeWatcher = currentWatcher; + } + } + } else { + effect.run(); + } + }; + if (augmentJob) { + augmentJob(job); + } + effect = new ReactiveEffect(getter); + effect.scheduler = scheduler ? () => scheduler(job, false) : job; + boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); + cleanup = effect.onStop = () => { + const cleanups = cleanupMap.get(effect); + if (cleanups) { + if (call) { + call(cleanups, 4); + } else { + for (const cleanup2 of cleanups) cleanup2(); + } + cleanupMap.delete(effect); + } + }; + { + effect.onTrack = options.onTrack; + effect.onTrigger = options.onTrigger; + } + if (cb) { + if (immediate) { + job(true); + } else { + oldValue = effect.run(); + } + } else if (scheduler) { + scheduler(job.bind(null, true), true); + } else { + effect.run(); + } + watchHandle.pause = effect.pause.bind(effect); + watchHandle.resume = effect.resume.bind(effect); + watchHandle.stop = watchHandle; + return watchHandle; + } + function traverse(value, depth = Infinity, seen) { + if (depth <= 0 || !isObject(value) || value["__v_skip"]) { + return value; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + depth--; + if (isRef(value)) { + traverse(value.value, depth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, seen); + } + for (const key of Object.getOwnPropertySymbols(value)) { + if (Object.prototype.propertyIsEnumerable.call(value, key)) { + traverse(value[key], depth, seen); + } + } + } + return value; + } + + const stack = []; + function pushWarningContext(vnode) { + stack.push(vnode); + } + function popWarningContext() { + stack.pop(); + } + let isWarning = false; + function warn$1(msg, ...args) { + if (isWarning) return; + isWarning = true; + pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + // eslint-disable-next-line no-restricted-syntax + msg + args.map((a) => { + var _a, _b; + return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); + }).join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); + } + console.warn(...warnArgs); + } + resetTracking(); + isWarning = false; + } + function getComponentTrace() { + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); + } + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; + } + function formatTrace(trace) { + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; + } + function formatTraceEntry({ vnode, recurseCount }) { + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; + } + function formatProps(props) { + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; + } + function formatProp(key, value, raw) { + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } + } + function assertNumber(val, type) { + if (val === void 0) { + return; + } else if (typeof val !== "number") { + warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + } else if (isNaN(val)) { + warn$1(`${type} is NaN - the duration expression might be incorrect.`); + } + } + + const ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER", + "COMPONENT_UPDATE": 15, + "15": "COMPONENT_UPDATE", + "APP_UNMOUNT_CLEANUP": 16, + "16": "APP_UNMOUNT_CLEANUP" + }; + const ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush", + [15]: "component update", + [16]: "app unmount cleanup function" + }; + function callWithErrorHandling(fn, instance, type, args) { + try { + return args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } + } + function callWithAsyncErrorHandling(fn, instance, type, args) { + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); + } + return res; + } + if (isArray(fn)) { + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; + } else { + warn$1( + `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` + ); + } + } + function handleError(err, instance, type, throwInDev = true) { + const contextVNode = instance ? instance.vnode : null; + const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = ErrorTypeStrings$1[type] ; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + return; + } + } + } + cur = cur.parent; + } + if (errorHandler) { + pauseTracking(); + callWithErrorHandling(errorHandler, null, 10, [ + err, + exposedInstance, + errorInfo + ]); + resetTracking(); + return; + } + } + logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); + } + function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { + { + const info = ErrorTypeStrings$1[type]; + if (contextVNode) { + pushWarningContext(contextVNode); + } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } + } + + const queue = []; + let flushIndex = -1; + const pendingPostFlushCbs = []; + let activePostFlushCbs = null; + let postFlushIndex = 0; + const resolvedPromise = /* @__PURE__ */ Promise.resolve(); + let currentFlushPromise = null; + const RECURSION_LIMIT = 100; + function nextTick(fn) { + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; + } + function findInsertionIndex(id) { + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { + start = middle + 1; + } else { + end = middle; + } + } + return start; + } + function queueJob(job) { + if (!(job.flags & 1)) { + const jobId = getId(job); + const lastJob = queue[queue.length - 1]; + if (!lastJob || // fast path when the job id is larger than the tail + !(job.flags & 2) && jobId >= getId(lastJob)) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(jobId), 0, job); + } + job.flags |= 1; + queueFlush(); + } + } + function queueFlush() { + if (!currentFlushPromise) { + currentFlushPromise = resolvedPromise.then(flushJobs); + } + } + function queuePostFlushCb(cb) { + if (!isArray(cb)) { + if (activePostFlushCbs && cb.id === -1) { + activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); + } else if (!(cb.flags & 1)) { + pendingPostFlushCbs.push(cb); + cb.flags |= 1; + } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); + } + function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.flags & 2) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + if (cb.flags & 4) { + cb.flags &= ~1; + } + cb(); + if (!(cb.flags & 4)) { + cb.flags &= ~1; + } + } + } + } + function flushPostFlushCbs(seen) { + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; + } + activePostFlushCbs = deduped; + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + const cb = activePostFlushCbs[postFlushIndex]; + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + if (cb.flags & 4) { + cb.flags &= ~1; + } + if (!(cb.flags & 8)) cb(); + cb.flags &= ~1; + } + activePostFlushCbs = null; + postFlushIndex = 0; + } + } + const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; + function flushJobs(seen) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + const check = (job) => checkRecursiveUpdates(seen, job) ; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && !(job.flags & 8)) { + if (check(job)) { + continue; + } + if (job.flags & 4) { + job.flags &= ~1; + } + callWithErrorHandling( + job, + job.i, + job.i ? 15 : 14 + ); + if (!(job.flags & 4)) { + job.flags &= ~1; + } + } + } + } finally { + for (; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job) { + job.flags &= ~1; + } + } + flushIndex = -1; + queue.length = 0; + flushPostFlushCbs(seen); + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); + } + } + } + function checkRecursiveUpdates(seen, fn) { + const count = seen.get(fn) || 0; + if (count > RECURSION_LIMIT) { + const instance = fn.i; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } + seen.set(fn, count + 1); + return false; + } + + let isHmrUpdating = false; + const hmrDirtyComponents = /* @__PURE__ */ new Map(); + { + getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; + } + const map = /* @__PURE__ */ new Map(); + function registerHMR(instance) { + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); + } + function unregisterHMR(instance) { + map.get(instance.type.__hmrId).instances.delete(instance); + } + function createRecord(id, initialDef) { + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; + } + function normalizeClassComponent(component) { + return isClassComponent(component) ? component.__vccOpts : component; + } + function rerender(id, newRender) { + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; + } + instance.renderCache = []; + isHmrUpdating = true; + instance.update(); + isHmrUpdating = false; + }); + } + function reload(id, newComp) { + const record = map.get(id); + if (!record) return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (let i = 0; i < instances.length; i++) { + const instance = instances[i]; + const oldComp = normalizeClassComponent(instance.type); + let dirtyInstances = hmrDirtyComponents.get(oldComp); + if (!dirtyInstances) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set()); + } + dirtyInstances.add(instance); + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + dirtyInstances.add(instance); + instance.ceReload(newComp.styles); + dirtyInstances.delete(instance); + } else if (instance.parent) { + queueJob(() => { + isHmrUpdating = true; + instance.parent.update(); + isHmrUpdating = false; + dirtyInstances.delete(instance); + }); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + if (instance.root.ce && instance !== instance.root) { + instance.root.ce._removeChildStyle(oldComp); + } + } + queuePostFlushCb(() => { + hmrDirtyComponents.clear(); + }); + } + function updateComponentDef(oldComp, newComp) { + extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; + } + } + } + function tryWrap(fn) { + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; + } + + let devtools$1; + let buffer = []; + let devtoolsNotInstalled = false; + function emit$1(event, ...args) { + if (devtools$1) { + devtools$1.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } + } + function setDevtoolsHook$1(hook, target) { + var _a, _b; + devtools$1 = hook; + if (devtools$1) { + devtools$1.enabled = true; + buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); + buffer = []; + } else if ( + // handle late devtools injection - only do this if we are in an actual + // browser environment to avoid the timer handle stalling test runner exit + // (#4815) + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + // eslint-disable-next-line no-restricted-syntax + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook$1(newHook, target); + }); + setTimeout(() => { + if (!devtools$1) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; + devtoolsNotInstalled = true; + buffer = []; + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } + } + function devtoolsInitApp(app, version) { + emit$1("app:init" /* APP_INIT */, app, version, { + Fragment, + Text, + Comment, + Static + }); + } + function devtoolsUnmountApp(app) { + emit$1("app:unmount" /* APP_UNMOUNT */, app); + } + const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); + const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); + const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( + "component:removed" /* COMPONENT_REMOVED */ + ); + const devtoolsComponentRemoved = (component) => { + if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools$1.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } + }; + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function createDevtoolsComponentHook(hook) { + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; + } + const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); + const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); + function createDevtoolsPerformanceHook(hook) { + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; + } + function devtoolsComponentEmit(component, event, params) { + emit$1( + "component:emit" /* COMPONENT_EMIT */, + component.appContext.app, + component, + event, + params + ); + } + + let currentRenderingInstance = null; + let currentScopeId = null; + function setCurrentRenderingInstance(instance) { + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; + } + function pushScopeId(id) { + currentScopeId = id; + } + function popScopeId() { + currentScopeId = null; + } + const withScopeId = (_id) => withCtx; + function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); + } + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; + } + + function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } + } + function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + warn$1(`withDirectives can only be used inside render functions.`); + return vnode; + } + const instance = getComponentPublicInstance(currentRenderingInstance); + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; + if (dir) { + if (isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; + } + function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); + } + } + } + + const TeleportEndKey = Symbol("_vte"); + const isTeleport = (type) => type.__isTeleport; + const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); + const isTeleportDeferred = (props) => props && (props.defer || props.defer === ""); + const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; + const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; + const resolveTarget = (props, select) => { + const targetSelector = props && props.to; + if (isString(targetSelector)) { + if (!select) { + warn$1( + `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` + ); + return null; + } else { + const target = select(targetSelector); + if (!target && !isTeleportDisabled(props)) { + warn$1( + `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` + ); + } + return target; + } + } else { + if (!targetSelector && !isTeleportDisabled(props)) { + warn$1(`Invalid Teleport target: ${targetSelector}`); + } + return targetSelector; + } + }; + const TeleportImpl = { + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (isHmrUpdating) { + optimized = false; + dynamicChildren = null; + } + if (n1 == null) { + const placeholder = n2.el = createComment("teleport start") ; + const mainAnchor = n2.anchor = createComment("teleport end") ; + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + if (parentComponent && parentComponent.isCE) { + parentComponent.ce._teleportTarget = container2; + } + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountToTarget = () => { + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = prepareAnchor(target, n2, createText, insert); + if (target) { + if (namespace !== "svg" && isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace !== "mathml" && isTargetMathML(target)) { + namespace = "mathml"; + } + if (!disabled) { + mount(target, targetAnchor); + updateCssVars(n2, false); + } + } else if (!disabled) { + warn$1( + "Invalid Teleport target on mount:", + target, + `(${typeof target})` + ); + } + }; + if (disabled) { + mount(container, mainAnchor); + updateCssVars(n2, true); + } + if (isTeleportDeferred(n2.props)) { + queuePostRenderEffect(() => { + mountToTarget(); + n2.el.__isMounted = true; + }, parentSuspense); + } else { + mountToTarget(); + } + } else { + if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) { + queuePostRenderEffect(() => { + TeleportImpl.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + delete n1.el.__isMounted; + }, parentSuspense); + return; + } + n2.el = n1.el; + n2.targetStart = n1.targetStart; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } else { + warn$1( + "Invalid Teleport target on update:", + target, + `(${typeof target})` + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); + } + } + updateCssVars(n2, disabled); + } + }, + remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { + shapeFlag, + children, + anchor, + targetStart, + targetAnchor, + target, + props + } = vnode; + if (target) { + hostRemove(targetStart); + hostRemove(targetAnchor); + } + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport + }; + function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } + } + function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector, insert, createText } + }, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const disabled = isTeleportDisabled(vnode.props); + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (disabled) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetStart = targetNode; + vnode.targetAnchor = targetNode && nextSibling(targetNode); + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + if (targetAnchor && targetAnchor.nodeType === 8) { + if (targetAnchor.data === "teleport start anchor") { + vnode.targetStart = targetAnchor; + } else if (targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + targetAnchor = nextSibling(targetAnchor); + } + if (!vnode.targetAnchor) { + prepareAnchor(target, vnode, createText, insert); + } + hydrateChildren( + targetNode && nextSibling(targetNode), + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode, disabled); + } + return vnode.anchor && nextSibling(vnode.anchor); + } + const Teleport = TeleportImpl; + function updateCssVars(vnode, isDisabled) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node, anchor; + if (isDisabled) { + node = vnode.el; + anchor = vnode.anchor; + } else { + node = vnode.targetStart; + anchor = vnode.targetAnchor; + } + while (node && node !== anchor) { + if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } + } + function prepareAnchor(target, vnode, createText, insert) { + const targetStart = vnode.targetStart = createText(""); + const targetAnchor = vnode.targetAnchor = createText(""); + targetStart[TeleportEndKey] = targetAnchor; + if (target) { + insert(targetStart, target); + insert(targetAnchor, target); + } + return targetAnchor; + } + + const leaveCbKey = Symbol("_leaveCb"); + const enterCbKey$1 = Symbol("_enterCb"); + function useTransitionState() { + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; + } + const TransitionHookValidator = [Function, Array]; + const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator + }; + const recursiveGetSubtree = (instance) => { + const subTree = instance.subTree; + return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; + }; + const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + const child = findNonCommentChild(children); + const rawProps = toRaw(props); + const { mode } = rawProps; + if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { + warn$1(`invalid <transition> mode: ${mode}`); + } + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getInnerChild$1(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + let enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance, + // #11061, ensure enterHooks is fresh after clone + (hooks) => enterHooks = hooks + ); + if (innerChild.type !== Comment) { + setTransitionHooks(innerChild, enterHooks); + } + let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree); + if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { + let leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in" && innerChild.type !== Comment) { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (!(instance.job.flags & 8)) { + instance.update(); + } + delete leavingHooks.afterLeave; + oldInnerChild = void 0; + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + enterHooks.delayedLeave = () => { + delayedLeave(); + delete enterHooks.delayedLeave; + oldInnerChild = void 0; + }; + }; + } else { + oldInnerChild = void 0; + } + } else if (oldInnerChild) { + oldInnerChild = void 0; + } + return child; + }; + } + }; + function findNonCommentChild(children) { + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c of children) { + if (c.type !== Comment) { + if (hasFound) { + warn$1( + "<transition> can only be used on a single element or component. Use <transition-group> for lists." + ); + break; + } + child = c; + hasFound = true; + } + } + } + return child; + } + const BaseTransition = BaseTransitionImpl; + function getLeavingNodesForType(state, vnode) { + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; + } + function resolveTransitionHooks(vnode, props, state, instance, postClone) { + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook(hook, args); + if (isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) done(); + } else if (hook.length <= 1) { + done(); + } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey$1] = (cancelled) => { + if (called) return; + called = true; + if (cancelled) { + callHook(cancelHook, [el]); + } else { + callHook(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey$1] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove) { + const key2 = String(vnode.key); + if (el[enterCbKey$1]) { + el[enterCbKey$1]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove(); + } + callHook(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) return; + called = true; + remove(); + if (cancelled) { + callHook(onLeaveCancelled, [el]); + } else { + callHook(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + const hooks2 = resolveTransitionHooks( + vnode2, + props, + state, + instance, + postClone + ); + if (postClone) postClone(hooks2); + return hooks2; + } + }; + return hooks; + } + function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } + } + function getInnerChild$1(vnode) { + if (!isKeepAlive(vnode)) { + if (isTeleport(vnode.type) && vnode.children) { + return findNonCommentChild(vnode.children); + } + return vnode; + } + if (vnode.component) { + return vnode.component.subTree; + } + const { shapeFlag, children } = vnode; + if (children) { + if (shapeFlag & 16) { + return children[0]; + } + if (shapeFlag & 32 && isFunction(children.default)) { + return children.default(); + } + } + } + function setTransitionHooks(vnode, hooks) { + if (vnode.shapeFlag & 6 && vnode.component) { + vnode.transition = hooks; + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } + } + function getTransitionRawChildren(children, keepComment = false, parentKey) { + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); + } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; + } + } + return ret; + } + + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function defineComponent(options, extraOptions) { + return isFunction(options) ? ( + // #8236: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; + } + + function useId() { + const i = getCurrentInstance(); + if (i) { + return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++; + } else { + warn$1( + `useId() is called when there is no active component instance to be associated with.` + ); + } + return ""; + } + function markAsyncBoundary(instance) { + instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; + } + + const knownTemplateRefs = /* @__PURE__ */ new WeakSet(); + function useTemplateRef(key) { + const i = getCurrentInstance(); + const r = shallowRef(null); + if (i) { + const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs; + let desc; + if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) { + warn$1(`useTemplateRef('${key}') already exists.`); + } else { + Object.defineProperty(refs, key, { + enumerable: true, + get: () => r.value, + set: (val) => r.value = val + }); + } + } else { + warn$1( + `useTemplateRef() is called when there is no active component instance to be associated with.` + ); + } + const ret = readonly(r) ; + { + knownTemplateRefs.add(ret); + } + return ret; + } + + function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { + if (isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) { + setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree); + } + return; + } + const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + const rawSetupState = toRaw(setupState); + const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => { + { + if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) { + warn$1( + `Template ref "${key}" used on a non-ref value. It will not work in the production build.` + ); + } + if (knownTemplateRefs.has(rawSetupState[key])) { + return false; + } + } + return hasOwn(rawSetupState, key); + }; + if (oldRef != null && oldRef !== ref) { + if (isString(oldRef)) { + refs[oldRef] = null; + if (canSetSetupRef(oldRef)) { + setupState[oldRef] = null; + } + } else if (isRef(oldRef)) { + oldRef.value = null; + } + } + if (isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = isString(ref); + const _isRef = isRef(ref); + if (_isString || _isRef) { + const doSet = () => { + if (rawRef.f) { + const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + isArray(existing) && remove(existing, refValue); + } else { + if (!isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (canSetSetupRef(ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); + } + } + } else if (_isString) { + refs[ref] = value; + if (canSetSetupRef(ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) refs[rawRef.k] = value; + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + }; + if (value) { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } else { + doSet(); + } + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + } + } + + let hasLoggedMismatchError = false; + const logMismatchError = () => { + if (hasLoggedMismatchError) { + return; + } + console.error("Hydration completed but contains mismatches."); + hasLoggedMismatchError = true; + }; + const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; + const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); + const getContainerType = (container) => { + if (container.nodeType !== 1) return void 0; + if (isSVGContainer(container)) return "svg"; + if (isMathMLContainer(container)) return "mathml"; + return void 0; + }; + const isComment = (node) => node.nodeType === 8; + function createHydrationFunctions(rendererInternals) { + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment + } + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + warn$1( + `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` + ); + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; + } + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; + }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + optimized = optimized || !!vnode.dynamicChildren; + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + { + def(node, "__vnode", vnode, true); + def(node, "__vueParentComponent", parentComponent, true); + } + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { + warn$1( + `Hydration text mismatch in`, + node.parentNode, + ` + - rendered on server: ${JSON.stringify( + node.data + )} + - expected on client: ${JSON.stringify(vnode.children)}` + ); + logMismatchError(); + node.data = vnode.children; + } + nextNode = nextSibling(node); + } + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 || domType === 3) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else { + warn$1("Invalid HostVNode type:", type, `(${typeof type})`); + } + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; + }; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition( + null, + // no need check parentSuspense in hydration + transition + ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + let hasWarned = false; + while (next) { + if (!isMismatchAllowed(el, 1 /* CHILDREN */)) { + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + el, + ` +Server rendered element contains more child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + let clientText = vnode.children; + if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) { + clientText = clientText.slice(1); + } + if (el.textContent !== clientText) { + if (!isMismatchAllowed(el, 0 /* TEXT */)) { + warn$1( + `Hydration text content mismatch on`, + el, + ` + - rendered on server: ${el.textContent} + - expected on client: ${vnode.children}` + ); + logMismatchError(); + } + el.textContent = vnode.children; + } + } + if (props) { + { + const isCustomElement = el.tagName.includes("-"); + for (const key in props) { + if (// #11189 skip if this node has directives that have created hooks + // as it could have mutated the DOM in any possible way + !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) { + logMismatchError(); + } + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === "." || isCustomElement) { + patchProp(el, key, null, props[key], void 0, parentComponent); + } + } + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + } + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + let hasWarned = false; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + const isText = vnode.type === Text; + if (node) { + if (isText && !optimized) { + if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) { + insert( + createText( + node.data.slice(vnode.children.length) + ), + container, + nextSibling(node) + ); + node.data = vnode.children; + } + } + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (isText && !vnode.children) { + insert(vnode.el = createText(""), container); + } else { + if (!isMismatchAllowed(container, 1 /* CHILDREN */)) { + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + container, + ` +Server rendered element contains fewer child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + } + } + return node; + }; + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); + } else { + logMismatchError(); + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) { + warn$1( + `Hydration node mismatch: +- rendered on server:`, + node, + node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, + ` +- expected on client:`, + vnode.type + ); + logMismatchError(); + } + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; + } + } + } + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + if (parentComponent) { + parentComponent.vnode.el = vnode.el; + updateHOCHostEl(parentComponent, vnode.el); + } + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } + } + } + } + return node; + }; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 && node.tagName === "TEMPLATE"; + }; + return [hydrate, hydrateNode]; + } + function propHasMismatch(el, key, clientValue, vnode, instance) { + let mismatchType; + let mismatchKey; + let actual; + let expected; + if (key === "class") { + actual = el.getAttribute("class"); + expected = normalizeClass(clientValue); + if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { + mismatchType = 2 /* CLASS */; + mismatchKey = `class`; + } + } else if (key === "style") { + actual = el.getAttribute("style") || ""; + expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); + const actualMap = toStyleMap(actual); + const expectedMap = toStyleMap(expected); + if (vnode.dirs) { + for (const { dir, value } of vnode.dirs) { + if (dir.name === "show" && !value) { + expectedMap.set("display", "none"); + } + } + } + if (instance) { + resolveCssVars(instance, vnode, expectedMap); + } + if (!isMapEqual(actualMap, expectedMap)) { + mismatchType = 3 /* STYLE */; + mismatchKey = "style"; + } + } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { + if (isBooleanAttr(key)) { + actual = el.hasAttribute(key); + expected = includeBooleanAttr(clientValue); + } else if (clientValue == null) { + actual = el.hasAttribute(key); + expected = false; + } else { + if (el.hasAttribute(key)) { + actual = el.getAttribute(key); + } else if (key === "value" && el.tagName === "TEXTAREA") { + actual = el.value; + } else { + actual = false; + } + expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; + } + if (actual !== expected) { + mismatchType = 4 /* ATTRIBUTE */; + mismatchKey = key; + } + } + if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) { + const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; + const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`; + const postSegment = ` + - rendered on server: ${format(actual)} + - expected on client: ${format(expected)} + Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. + You should fix the source of the mismatch.`; + { + warn$1(preSegment, el, postSegment); + } + return true; + } + return false; + } + function toClassSet(str) { + return new Set(str.trim().split(/\s+/)); + } + function isSetEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const s of a) { + if (!b.has(s)) { + return false; + } + } + return true; + } + function toStyleMap(str) { + const styleMap = /* @__PURE__ */ new Map(); + for (const item of str.split(";")) { + let [key, value] = item.split(":"); + key = key.trim(); + value = value && value.trim(); + if (key && value) { + styleMap.set(key, value); + } + } + return styleMap; + } + function isMapEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const [key, value] of a) { + if (value !== b.get(key)) { + return false; + } + } + return true; + } + function resolveCssVars(instance, vnode, expectedMap) { + const root = instance.subTree; + if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) { + const cssVars = instance.getCssVars(); + for (const key in cssVars) { + expectedMap.set( + `--${getEscapedCssVarName(key)}`, + String(cssVars[key]) + ); + } + } + if (vnode === root && instance.parent) { + resolveCssVars(instance.parent, instance.vnode, expectedMap); + } + } + const allowMismatchAttr = "data-allow-mismatch"; + const MismatchTypeString = { + [0 /* TEXT */]: "text", + [1 /* CHILDREN */]: "children", + [2 /* CLASS */]: "class", + [3 /* STYLE */]: "style", + [4 /* ATTRIBUTE */]: "attribute" + }; + function isMismatchAllowed(el, allowedType) { + if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) { + while (el && !el.hasAttribute(allowMismatchAttr)) { + el = el.parentElement; + } + } + const allowedAttr = el && el.getAttribute(allowMismatchAttr); + if (allowedAttr == null) { + return false; + } else if (allowedAttr === "") { + return true; + } else { + const list = allowedAttr.split(","); + if (allowedType === 0 /* TEXT */ && list.includes("children")) { + return true; + } + return allowedAttr.split(",").includes(MismatchTypeString[allowedType]); + } + } + + const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1)); + const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id)); + const hydrateOnIdle = (timeout = 1e4) => (hydrate) => { + const id = requestIdleCallback(hydrate, { timeout }); + return () => cancelIdleCallback(id); + }; + function elementIsVisibleInViewport(el) { + const { top, left, bottom, right } = el.getBoundingClientRect(); + const { innerHeight, innerWidth } = window; + return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth); + } + const hydrateOnVisible = (opts) => (hydrate, forEach) => { + const ob = new IntersectionObserver((entries) => { + for (const e of entries) { + if (!e.isIntersecting) continue; + ob.disconnect(); + hydrate(); + break; + } + }, opts); + forEach((el) => { + if (!(el instanceof Element)) return; + if (elementIsVisibleInViewport(el)) { + hydrate(); + ob.disconnect(); + return false; + } + ob.observe(el); + }); + return () => ob.disconnect(); + }; + const hydrateOnMediaQuery = (query) => (hydrate) => { + if (query) { + const mql = matchMedia(query); + if (mql.matches) { + hydrate(); + } else { + mql.addEventListener("change", hydrate, { once: true }); + return () => mql.removeEventListener("change", hydrate); + } + } + }; + const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => { + if (isString(interactions)) interactions = [interactions]; + let hasHydrated = false; + const doHydrate = (e) => { + if (!hasHydrated) { + hasHydrated = true; + teardown(); + hydrate(); + e.target.dispatchEvent(new e.constructor(e.type, e)); + } + }; + const teardown = () => { + forEach((el) => { + for (const i of interactions) { + el.removeEventListener(i, doHydrate); + } + }); + }; + forEach((el) => { + for (const i of interactions) { + el.addEventListener(i, doHydrate, { once: true }); + } + }); + return teardown; + }; + function forEachElement(node, cb) { + if (isComment(node) && node.data === "[") { + let depth = 1; + let next = node.nextSibling; + while (next) { + if (next.nodeType === 1) { + const result = cb(next); + if (result === false) { + break; + } + } else if (isComment(next)) { + if (next.data === "]") { + if (--depth === 0) break; + } else if (next.data === "[") { + depth++; + } + } + next = next.nextSibling; + } + } else { + cb(node); + } + } + + const isAsyncWrapper = (i) => !!i.type.__asyncLoader; + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function defineAsyncComponent(source) { + if (isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + hydrate: hydrateStrategy, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve, reject) => { + const userRetry = () => resolve(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (!comp) { + warn$1( + `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` + ); + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + if (comp && !isObject(comp) && !isFunction(comp)) { + throw new Error(`Invalid async component load result: ${comp}`); + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + __asyncHydrate(el, instance, hydrate) { + const doHydrate = hydrateStrategy ? () => { + const teardown = hydrateStrategy( + hydrate, + (cb) => forEachElement(el, cb) + ); + if (teardown) { + (instance.bum || (instance.bum = [])).push(teardown); + } + } : hydrate; + if (resolvedComp) { + doHydrate(); + } else { + load().then(() => !instance.isUnmounted && doHydrate()); + } + }, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + markAsyncBoundary(instance); + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { + pendingRequest = null; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || false) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = ref(false); + const error = ref(); + const delayed = ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.update(); + } + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); + } + function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; + } + + const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; + const KeepAliveImpl = { + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + { + instance.__v_cache = cache; + } + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + invalidateMount(instance2.m); + invalidateMount(instance2.a); + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && !filter(name)) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (cached && (!current || !isSameVNodeType(cached, current))) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + if (isSuspense(instance.subTree.type)) { + queuePostRenderEffect(() => { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + }, instance.subTree.suspense); + } else { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return current = null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + { + warn$1(`KeepAlive should contain exactly one component child.`); + } + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + if (vnode.type === Comment) { + current = null; + return vnode; + } + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + vnode.shapeFlag &= ~256; + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } + }; + const KeepAlive = KeepAliveImpl; + function matches(pattern, name) { + if (isArray(pattern)) { + return pattern.some((p) => matches(p, name)); + } else if (isString(pattern)) { + return pattern.split(",").includes(name); + } else if (isRegExp(pattern)) { + pattern.lastIndex = 0; + return pattern.test(name); + } + return false; + } + function onActivated(hook, target) { + registerKeepAliveHook(hook, "a", target); + } + function onDeactivated(hook, target) { + registerKeepAliveHook(hook, "da", target); + } + function registerKeepAliveHook(hook, type, target = currentInstance) { + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; + } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } + } + function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + remove(keepAliveRoot[type], injected); + }, target); + } + function resetShapeFlag(vnode) { + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; + } + function getInnerChild(vnode) { + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; + } + + function injectHook(type, hook, target = currentInstance, prepend = false) { + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); + } + return wrappedHook; + } else { + const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) + ); + } + } + const createHook = (lifecycle) => (hook, target = currentInstance) => { + if (!isInSSRComponentSetup || lifecycle === "sp") { + injectHook(lifecycle, (...args) => hook(...args), target); + } + }; + const onBeforeMount = createHook("bm"); + const onMounted = createHook("m"); + const onBeforeUpdate = createHook( + "bu" + ); + const onUpdated = createHook("u"); + const onBeforeUnmount = createHook( + "bum" + ); + const onUnmounted = createHook("um"); + const onServerPrefetch = createHook( + "sp" + ); + const onRenderTriggered = createHook("rtg"); + const onRenderTracked = createHook("rtc"); + function onErrorCaptured(hook, target = currentInstance) { + injectHook("ec", hook, target); + } + + const COMPONENTS = "components"; + const DIRECTIVES = "directives"; + function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; + } + const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); + function resolveDynamicComponent(component) { + if (isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } + } + function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); + } + function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else { + warn$1( + `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } + } + function resolve(registry, name) { + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); + } + + function renderList(source, renderItem, cache, index) { + let ret; + const cached = cache && cache[index]; + const sourceIsArray = isArray(source); + if (sourceIsArray || isString(source)) { + const sourceIsReactiveArray = sourceIsArray && isReactive(source); + let needsWrap = false; + if (sourceIsReactiveArray) { + needsWrap = !isShallow(source); + source = shallowReadArray(source); + } + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem( + needsWrap ? toReactive(source[i]) : source[i], + i, + void 0, + cached && cached[i] + ); + } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn$1(`The v-for range expect an integer value but got ${source}.`); + } + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); + } + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } + } + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; + } + + function createSlots(slots, dynamicSlots) { + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) res.key = slot.key; + return res; + } : slot.fn; + } + } + return slots; + } + + function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) { + if (name !== "default") props.name = name; + return openBlock(), createBlock( + Fragment, + null, + [createVNode("slot", props, fallback && fallback())], + 64 + ); + } + let slot = slots[name]; + if (slot && slot.length > 1) { + warn$1( + `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` + ); + slot = () => []; + } + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key; + const rendered = createBlock( + Fragment, + { + key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content + (!validSlotContent && fallback ? "_fb" : "") + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; + } + function ensureValidVNode(vnodes) { + return vnodes.some((child) => { + if (!isVNode(child)) return true; + if (child.type === Comment) return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; + } + + function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + if (!isObject(obj)) { + warn$1(`v-on with no argument expects an object value.`); + return ret; + } + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; + } + return ret; + } + + const getPublicInstance = (i) => { + if (!i) return null; + if (isStatefulComponent(i)) return getComponentPublicInstance(i); + return getPublicInstance(i.parent); + }; + const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => shallowReadonly(i.props) , + $attrs: (i) => shallowReadonly(i.attrs) , + $slots: (i) => shallowReadonly(i.slots) , + $refs: (i) => shallowReadonly(i.refs) , + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $host: (i) => i.ce, + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i) , + $forceUpdate: (i) => i.f || (i.f = () => { + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) + ); + const isReservedPrefix = (key) => key === "_" || key === "$"; + const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); + const PublicInstanceProxyHandlers = { + get({ _: instance }, key) { + if (key === "__v_skip") { + return true; + } + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (key === "__isVue") { + return true; + } + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance.attrs, "get", ""); + markAttrsAccessed(); + } else if (key === "$slots") { + track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); + return false; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + data[key] = value; + return true; + } else if (hasOwn(instance.props, key)) { + warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + warn$1( + `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` + ); + return false; + } else { + if (key in instance.appContext.config.globalProperties) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + value + }); + } else { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } + }; + { + PublicInstanceProxyHandlers.ownKeys = (target) => { + warn$1( + `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` + ); + return Reflect.ownKeys(target); + }; + } + const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, { + get(target, key) { + if (key === Symbol.unscopables) { + return; + } + return PublicInstanceProxyHandlers.get(target, key, target); + }, + has(_, key) { + const has = key[0] !== "_" && !isGloballyAllowed(key); + if (!has && PublicInstanceProxyHandlers.has(_, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} should not start with _ which is a reserved prefix for Vue internals.` + ); + } + return has; + } + }); + function createDevRenderContext(instance) { + const target = {}; + Object.defineProperty(target, `_`, { + configurable: true, + enumerable: false, + get: () => instance + }); + Object.keys(publicPropertiesMap).forEach((key) => { + Object.defineProperty(target, key, { + configurable: true, + enumerable: false, + get: () => publicPropertiesMap[key](instance), + // intercepted by the proxy so no need for implementation, + // but needed to prevent set errors + set: NOOP + }); + }); + return target; + } + function exposePropsOnRenderContext(instance) { + const { + ctx, + propsOptions: [propsOptions] + } = instance; + if (propsOptions) { + Object.keys(propsOptions).forEach((key) => { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => instance.props[key], + set: NOOP + }); + }); + } + } + function exposeSetupStateOnRenderContext(instance) { + const { ctx, setupState } = instance; + Object.keys(toRaw(setupState)).forEach((key) => { + if (!setupState.__isScriptSetup) { + if (isReservedPrefix(key[0])) { + warn$1( + `setup() return property ${JSON.stringify( + key + )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` + ); + return; + } + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => setupState[key], + set: NOOP + }); + } + }); + } + + const warnRuntimeUsage = (method) => warn$1( + `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` + ); + function defineProps() { + { + warnRuntimeUsage(`defineProps`); + } + return null; + } + function defineEmits() { + { + warnRuntimeUsage(`defineEmits`); + } + return null; + } + function defineExpose(exposed) { + { + warnRuntimeUsage(`defineExpose`); + } + } + function defineOptions(options) { + { + warnRuntimeUsage(`defineOptions`); + } + } + function defineSlots() { + { + warnRuntimeUsage(`defineSlots`); + } + return null; + } + function defineModel() { + { + warnRuntimeUsage("defineModel"); + } + } + function withDefaults(props, defaults) { + { + warnRuntimeUsage(`withDefaults`); + } + return null; + } + function useSlots() { + return getContext().slots; + } + function useAttrs() { + return getContext().attrs; + } + function getContext() { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useContext() called without active instance.`); + } + return i.setupContext || (i.setupContext = createSetupContext(i)); + } + function normalizePropsOrEmits(props) { + return isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; + } + function mergeDefaults(raw, defaults) { + const props = normalizePropsOrEmits(raw); + for (const key in defaults) { + if (key.startsWith("__skip")) continue; + let opt = props[key]; + if (opt) { + if (isArray(opt) || isFunction(opt)) { + opt = props[key] = { type: opt, default: defaults[key] }; + } else { + opt.default = defaults[key]; + } + } else if (opt === null) { + opt = props[key] = { default: defaults[key] }; + } else { + warn$1(`props default key "${key}" has no corresponding declaration.`); + } + if (opt && defaults[`__skip_${key}`]) { + opt.skipFactory = true; + } + } + return props; + } + function mergeModels(a, b) { + if (!a || !b) return a || b; + if (isArray(a) && isArray(b)) return a.concat(b); + return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); + } + function createPropsRestProxy(props, excludedKeys) { + const ret = {}; + for (const key in props) { + if (!excludedKeys.includes(key)) { + Object.defineProperty(ret, key, { + enumerable: true, + get: () => props[key] + }); + } + } + return ret; + } + function withAsyncContext(getAwaitable) { + const ctx = getCurrentInstance(); + if (!ctx) { + warn$1( + `withAsyncContext called without active current instance. This is likely a bug.` + ); + } + let awaitable = getAwaitable(); + unsetCurrentInstance(); + if (isPromise(awaitable)) { + awaitable = awaitable.catch((e) => { + setCurrentInstance(ctx); + throw e; + }); + } + return [awaitable, () => setCurrentInstance(ctx)]; + } + + function createDuplicateChecker() { + const cache = /* @__PURE__ */ Object.create(null); + return (type, key) => { + if (cache[key]) { + warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); + } else { + cache[key] = type; + } + }; + } + let shouldCacheAccess = true; + function applyOptions(instance) { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook$1(options.beforeCreate, instance, "bc"); + } + const { + // state + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, + // lifecycle + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, + // public API + expose, + inheritAttrs, + // assets + components, + directives, + filters + } = options; + const checkDuplicateProperties = createDuplicateChecker() ; + { + const [propsOptions] = instance.propsOptions; + if (propsOptions) { + for (const key in propsOptions) { + checkDuplicateProperties("Props" /* PROPS */, key); + } + } + } + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (isFunction(methodHandler)) { + { + Object.defineProperty(ctx, key, { + value: methodHandler.bind(publicThis), + configurable: true, + enumerable: true, + writable: true + }); + } + { + checkDuplicateProperties("Methods" /* METHODS */, key); + } + } else { + warn$1( + `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` + ); + } + } + } + if (dataOptions) { + if (!isFunction(dataOptions)) { + warn$1( + `The data option must be a function. Plain object usage is no longer supported.` + ); + } + const data = dataOptions.call(publicThis, publicThis); + if (isPromise(data)) { + warn$1( + `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` + ); + } + if (!isObject(data)) { + warn$1(`data() should return an object.`); + } else { + instance.data = reactive(data); + { + for (const key in data) { + checkDuplicateProperties("Data" /* DATA */, key); + if (!isReservedPrefix(key[0])) { + Object.defineProperty(ctx, key, { + configurable: true, + enumerable: true, + get: () => data[key], + set: NOOP + }); + } + } + } + } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + if (get === NOOP) { + warn$1(`Computed property "${key}" has no getter.`); + } + const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => { + warn$1( + `Write operation failed: computed property "${key}" is readonly.` + ); + } ; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + { + checkDuplicateProperties("Computed" /* COMPUTED */, key); + } + } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook$1(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val + }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; + } + } + if (render && instance.render === NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) instance.components = components; + if (directives) instance.directives = directives; + } + function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { + if (isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); + } + if (isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; + } + { + checkDuplicateProperties("Inject" /* INJECT */, key); + } + } + } + function callHook$1(hook, instance, type) { + callWithAsyncErrorHandling( + isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); + } + function createWatcher(raw, ctx, publicThis, key) { + let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (isString(raw)) { + const handler = ctx[raw]; + if (isFunction(handler)) { + { + watch(getter, handler); + } + } else { + warn$1(`Invalid watch handler specified by key "${raw}"`, handler); + } + } else if (isFunction(raw)) { + { + watch(getter, raw.bind(publicThis)); + } + } else if (isObject(raw)) { + if (isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (isFunction(handler)) { + watch(getter, handler, raw); + } else { + warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); + } + } + } else { + warn$1(`Invalid watch option: "${key}"`, raw); + } + } + function resolveMergedOptions(instance) { + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; + } + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); + } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (isObject(base)) { + cache.set(base, resolved); + } + return resolved; + } + function mergeOptions(to, from, strats, asMixin = false) { + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") { + warn$1( + `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` + ); + } else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; + } + } + return to; + } + const internalOptionMergeStrats = { + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray, + created: mergeAsArray, + beforeMount: mergeAsArray, + mounted: mergeAsArray, + beforeUpdate: mergeAsArray, + updated: mergeAsArray, + beforeDestroy: mergeAsArray, + beforeUnmount: mergeAsArray, + destroyed: mergeAsArray, + unmounted: mergeAsArray, + activated: mergeAsArray, + deactivated: mergeAsArray, + errorCaptured: mergeAsArray, + serverPrefetch: mergeAsArray, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject + }; + function mergeDataFn(to, from) { + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (extend)( + isFunction(to) ? to.call(this, this) : to, + isFunction(from) ? from.call(this, this) : from + ); + }; + } + function mergeInject(to, from) { + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); + } + function normalizeInject(raw) { + if (isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; + } + return res; + } + return raw; + } + function mergeAsArray(to, from) { + return to ? [...new Set([].concat(to, from))] : from; + } + function mergeObjectOptions(to, from) { + return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; + } + function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (isArray(to) && isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } + } + function mergeWatchOptions(to, from) { + if (!to) return from; + if (!from) return to; + const merged = extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray(to[key], from[key]); + } + return merged; + } + + function createAppContext() { + return { + app: null, + config: { + isNativeTag: NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; + } + let uid$1 = 0; + function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!isFunction(rootComponent)) { + rootComponent = extend({}, rootComponent); + } + if (rootProps != null && !isObject(rootProps)) { + warn$1(`root props passed to app.mount() must be an object.`); + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + const pluginCleanupFns = []; + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + { + warn$1( + `app.config cannot be replaced. Modify individual options instead.` + ); + } + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) { + warn$1(`Plugin has already been applied to target app.`); + } else if (plugin && isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else { + warn$1( + `A plugin must either be a function or an object with an "install" function.` + ); + } + return app; + }, + mixin(mixin) { + { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } else { + warn$1( + "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") + ); + } + } + return app; + }, + component(name, component) { + { + validateComponentName(name, context.config); + } + if (!component) { + return context.components[name]; + } + if (context.components[name]) { + warn$1(`Component "${name}" has already been registered in target app.`); + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + { + validateDirectiveName(name); + } + if (!directive) { + return context.directives[name]; + } + if (context.directives[name]) { + warn$1(`Directive "${name}" has already been registered in target app.`); + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + if (rootContainer.__vue_app__) { + warn$1( + `There is already an app instance mounted on the host container. + If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` + ); + } + const vnode = app._ceVNode || createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + { + context.reload = () => { + render( + cloneVNode(vnode), + rootContainer, + namespace + ); + }; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + { + app._instance = vnode.component; + devtoolsInitApp(app, version); + } + return getComponentPublicInstance(vnode.component); + } else { + warn$1( + `App has already been mounted. +If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` + ); + } + }, + onUnmount(cleanupFn) { + if (typeof cleanupFn !== "function") { + warn$1( + `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}` + ); + } + pluginCleanupFns.push(cleanupFn); + }, + unmount() { + if (isMounted) { + callWithAsyncErrorHandling( + pluginCleanupFns, + app._instance, + 16 + ); + render(null, app._container); + { + app._instance = null; + devtoolsUnmountApp(app); + } + delete app._container.__vue_app__; + } else { + warn$1(`Cannot unmount an app that is not mounted.`); + } + }, + provide(key, value) { + if (key in context.provides) { + warn$1( + `App already provides property with key "${String(key)}". It will be overwritten with the new value.` + ); + } + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + const lastApp = currentApp; + currentApp = app; + try { + return fn(); + } finally { + currentApp = lastApp; + } + } + }; + return app; + }; + } + let currentApp = null; + + function provide(key, value) { + if (!currentInstance) { + { + warn$1(`provide() can only be used inside setup().`); + } + } else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); + } + provides[key] = value; + } + } + function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else { + warn$1(`injection "${String(key)}" not found.`); + } + } else { + warn$1(`inject() can only be used inside setup() or functional components.`); + } + } + function hasInjectionContext() { + return !!(currentInstance || currentRenderingInstance || currentApp); + } + + const internalObjectProto = {}; + const createInternalObject = () => Object.create(internalObjectProto); + const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; + + function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = createInternalObject(); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + { + validateProps(rawProps || {}, props, instance); + } + if (isStateful) { + instance.props = isSSR ? props : shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; + } + function isInHmrContext(instance) { + while (instance) { + if (instance.type.__hmrId) return true; + instance = instance.parent; + } + } + function updateProps(instance, rawProps, rawPrevProps, optimized) { + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( + // always force full diff in dev + // - #1942 if hmr is enabled with sfc component + // - vite#872 non-sfc component used by sfc component + !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; + } + const value = rawProps[key]; + if (options) { + if (hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; + } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; + } + } + } + } + if (hasAttrsChanged) { + trigger(instance.attrs, "set", ""); + } + { + validateProps(rawProps || {}, props, instance); + } + } + function setFullProps(instance, rawProps, props, attrs) { + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && hasOwn(options, camelKey = camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; + } + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + if (needCastKeys) { + const rawCurrentProps = toRaw(props); + const castValues = rawCastValues || EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; + } + function resolvePropValue(options, props, key, value, instance, isAbsent) { + const opt = options[key]; + if (opt != null) { + const hasDefault = hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); + } + } else { + value = defaultValue; + } + if (instance.ce) { + instance.ce._setProp(key, value); + } + } + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { + value = true; + } + } + } + return value; + } + const mixinPropsCache = /* @__PURE__ */ new WeakMap(); + function normalizePropsOptions(comp, appContext, asMixin = false) { + const cache = asMixin ? mixinPropsCache : appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (!isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + extend(normalized, props); + if (keys) needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); + } + if (comp.extends) { + extendProps(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendProps); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, EMPTY_ARR); + } + return EMPTY_ARR; + } + if (isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + if (!isString(raw[i])) { + warn$1(`props must be strings when using array syntax.`, raw[i]); + } + const normalizedKey = camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = EMPTY_OBJ; + } + } + } else if (raw) { + if (!isObject(raw)) { + warn$1(`invalid props options`, raw); + } + for (const key in raw) { + const normalizedKey = camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); + const propType = prop.type; + let shouldCast = false; + let shouldCastTrue = true; + if (isArray(propType)) { + for (let index = 0; index < propType.length; ++index) { + const type = propType[index]; + const typeName = isFunction(type) && type.name; + if (typeName === "Boolean") { + shouldCast = true; + break; + } else if (typeName === "String") { + shouldCastTrue = false; + } + } + } else { + shouldCast = isFunction(propType) && propType.name === "Boolean"; + } + prop[0 /* shouldCast */] = shouldCast; + prop[1 /* shouldCastTrue */] = shouldCastTrue; + if (shouldCast || hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + const res = [normalized, needCastKeys]; + if (isObject(comp)) { + cache.set(comp, res); + } + return res; + } + function validatePropName(key) { + if (key[0] !== "$" && !isReservedProp(key)) { + return true; + } else { + warn$1(`Invalid prop name: "${key}" is a reserved property.`); + } + return false; + } + function getType(ctor) { + if (ctor === null) { + return "null"; + } + if (typeof ctor === "function") { + return ctor.name || ""; + } else if (typeof ctor === "object") { + const name = ctor.constructor && ctor.constructor.name; + return name || ""; + } + return ""; + } + function validateProps(rawProps, props, instance) { + const resolvedValues = toRaw(props); + const options = instance.propsOptions[0]; + const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key)); + for (const key in options) { + let opt = options[key]; + if (opt == null) continue; + validateProp( + key, + resolvedValues[key], + opt, + shallowReadonly(resolvedValues) , + !camelizePropsKey.includes(key) + ); + } + } + function validateProp(name, value, prop, props, isAbsent) { + const { type, required, validator, skipCheck } = prop; + if (required && isAbsent) { + warn$1('Missing required prop: "' + name + '"'); + return; + } + if (value == null && !required) { + return; + } + if (type != null && type !== true && !skipCheck) { + let isValid = false; + const types = isArray(type) ? type : [type]; + const expectedTypes = []; + for (let i = 0; i < types.length && !isValid; i++) { + const { valid, expectedType } = assertType(value, types[i]); + expectedTypes.push(expectedType || ""); + isValid = valid; + } + if (!isValid) { + warn$1(getInvalidTypeMessage(name, value, expectedTypes)); + return; + } + } + if (validator && !validator(value, props)) { + warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + } + } + const isSimpleType = /* @__PURE__ */ makeMap( + "String,Number,Boolean,Function,Symbol,BigInt" + ); + function assertType(value, type) { + let valid; + const expectedType = getType(type); + if (expectedType === "null") { + valid = value === null; + } else if (isSimpleType(expectedType)) { + const t = typeof value; + valid = t === expectedType.toLowerCase(); + if (!valid && t === "object") { + valid = value instanceof type; + } + } else if (expectedType === "Object") { + valid = isObject(value); + } else if (expectedType === "Array") { + valid = isArray(value); + } else { + valid = value instanceof type; + } + return { + valid, + expectedType + }; + } + function getInvalidTypeMessage(name, value, expectedTypes) { + if (expectedTypes.length === 0) { + return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; + } + let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; + const expectedType = expectedTypes[0]; + const receivedType = toRawType(value); + const expectedValue = styleValue(value, expectedType); + const receivedValue = styleValue(value, receivedType); + if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { + message += ` with value ${expectedValue}`; + } + message += `, got ${receivedType} `; + if (isExplicable(receivedType)) { + message += `with value ${receivedValue}.`; + } + return message; + } + function styleValue(value, type) { + if (type === "String") { + return `"${value}"`; + } else if (type === "Number") { + return `${Number(value)}`; + } else { + return `${value}`; + } + } + function isExplicable(type) { + const explicitTypes = ["string", "number", "boolean"]; + return explicitTypes.some((elem) => type.toLowerCase() === elem); + } + function isBoolean(...args) { + return args.some((elem) => elem.toLowerCase() === "boolean"); + } + + const isInternalKey = (key) => key[0] === "_" || key === "$stable"; + const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; + const normalizeSlot = (key, rawSlot, ctx) => { + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { + warn$1( + `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` + ); + } + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; + }; + const normalizeObjectSlots = (rawSlots, slots, instance) => { + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) continue; + const value = rawSlots[key]; + if (isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + { + warn$1( + `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; + } + } + }; + const normalizeVNodeSlots = (instance, children) => { + if (!isKeepAlive(instance.vnode) && true) { + warn$1( + `Non-function value encountered for default slot. Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; + }; + const assignSlots = (slots, children, optimized) => { + for (const key in children) { + if (optimized || key !== "_") { + slots[key] = children[key]; + } + } + }; + const initSlots = (instance, children, optimized) => { + const slots = instance.slots = createInternalObject(); + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + assignSlots(slots, children, optimized); + if (optimized) { + def(slots, "_", type, true); + } + } else { + normalizeObjectSlots(children, slots); + } + } else if (children) { + normalizeVNodeSlots(instance, children); + } + }; + const updateSlots = (instance, children, optimized) => { + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (isHmrUpdating) { + assignSlots(slots, children, optimized); + trigger(instance, "set", "$slots"); + } else if (optimized && type === 1) { + needDeletionCheck = false; + } else { + assignSlots(slots, children, optimized); + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); + } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } + } + } + }; + + let supported; + let perf; + function startMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + perf.mark(`vue-${type}-${instance.uid}`); + } + { + devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); + } + } + function endMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + const startTag = `vue-${type}-${instance.uid}`; + const endTag = startTag + `:end`; + perf.mark(endTag); + perf.measure( + `<${formatComponentName(instance, instance.type)}> ${type}`, + startTag, + endTag + ); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + } + { + devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); + } + } + function isSupported() { + if (supported !== void 0) { + return supported; + } + if (typeof window !== "undefined" && window.performance) { + supported = true; + perf = window.performance; + } else { + supported = false; + } + return supported; + } + + const queuePostRenderEffect = queueEffectWithSuspense ; + function createRenderer(options) { + return baseCreateRenderer(options); + } + function createHydrationRenderer(options) { + return baseCreateRenderer(options, createHydrationFunctions); + } + function baseCreateRenderer(options, createHydrationFns) { + const target = getGlobalThis(); + target.__VUE__ = true; + { + setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + } + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { + if (n1 === n2) { + return; + } + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: + if (n1 == null) { + mountStaticNode(n2, container, anchor, namespace); + } else { + patchStaticNode(n1, n2, container, namespace); + } + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else { + warn$1("Invalid VNode type:", type, `(${typeof type})`); + } + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const patchStaticNode = (n1, n2, container, namespace) => { + if (n2.children !== n1.children) { + const anchor = hostNextSibling(n1.anchor); + removeStaticNode(n1); + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace + ); + } else { + n2.el = n1.el; + n2.anchor = n1.anchor; + } + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !isReservedProp(key)) { + hostPatchProp(el, key, null, props[key], namespace, parentComponent); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + { + def(el, "__vnode", vnode, true); + def(el, "__vueParentComponent", parentComponent, true); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { + subTree = filterSingleRoot(subTree.children) || subTree; + } + if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + { + el.__vnode = n2; + } + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || EMPTY_OBJ; + const newProps = n2.props || EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (isHmrUpdating) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { + hostSetElementText(el, ""); + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + } + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); + } + } + } else if (!optimized && dynamicChildren == null) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== EMPTY_OBJ) { + for (const key in oldProps) { + if (!isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + parentComponent + ); + } + } + } + for (const key in newProps) { + if (isReservedProp(key)) continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if ( + // #5523 dev root fragment may inherit directives + isHmrUpdating || patchFlag & 2048 + ) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance( + initialVNode, + parentComponent, + parentSuspense + )); + if (instance.type.__hmrId) { + registerHMR(instance); + } + { + pushWarningContext(initialVNode); + startMeasure(instance, `mount`); + } + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } + { + { + startMeasure(instance, `init`); + } + setupComponent(instance, false, optimized); + { + endMeasure(instance, `init`); + } + } + if (instance.asyncDep) { + if (isHmrUpdating) initialVNode.el = null; + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); + } + { + popWarningContext(); + endMeasure(instance, `mount`); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + { + pushWarningContext(n2); + } + updateComponentPreRender(instance, n2, optimized); + { + popWarningContext(); + } + return; + } else { + instance.next = n2; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { + let vnodeHook; + const { el, props } = initialVNode; + const { bm, m, parent, root, type } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + invokeArrayFns(bm); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); + } + toggleRecurse(instance, true); + if (el && hydrateNode) { + const hydrateSubTree = () => { + { + startMeasure(instance, `render`); + } + instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `hydrate`); + } + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + { + endMeasure(instance, `hydrate`); + } + }; + if (isAsyncWrapperVNode && type.__asyncHydrate) { + type.__asyncHydrate( + el, + instance, + hydrateSubTree + ); + } else { + hydrateSubTree(); + } + } else { + if (root.ce) { + root.ce._injectChildStyle(type); + } + { + startMeasure(instance, `render`); + } + const subTree = instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `patch`); + } + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + initialVNode.el = subTree.el; + } + if (m) { + queuePostRenderEffect(m, parentSuspense); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); + } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); + } + instance.isMounted = true; + { + devtoolsComponentAdded(instance); + } + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); + return; + } + } + let originNext = next; + let vnodeHook; + { + pushWarningContext(next || instance.vnode); + } + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; + } + if (bu) { + invokeArrayFns(bu); + } + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); + } + toggleRecurse(instance, true); + { + startMeasure(instance, `render`); + } + const nextTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + const prevTree = instance.subTree; + instance.subTree = nextTree; + { + startMeasure(instance, `patch`); + } + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); + } + if (u) { + queuePostRenderEffect(u, parentSuspense); + } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); + } + { + devtoolsComponentUpdated(instance); + } + { + popWarningContext(); + } + } + }; + instance.scope.on(); + const effect = instance.effect = new ReactiveEffect(componentUpdateFn); + instance.scope.off(); + const update = instance.update = effect.run.bind(effect); + const job = instance.job = effect.runIfDirty.bind(effect); + job.i = instance; + job.id = instance.uid; + effect.scheduler = () => queueJob(job); + toggleRecurse(instance, true); + { + effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; + effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; + } + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + pauseTracking(); + flushPreFlushCbs(instance); + resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || EMPTY_ARR; + c2 = c2 || EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (nextChild.key != null) { + if (keyToNewIndexMap.has(nextChild.key)) { + warn$1( + `Duplicate keys found during update:`, + JSON.stringify(nextChild.key), + `Make sure keys are unique.` + ); + } + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs, + cacheIndex + } = vnode; + if (patchFlag === -2) { + optimized = false; + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (cacheIndex != null) { + parentComponent.renderCache[cacheIndex] = void 0; + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + internals, + doRemove + ); + } else if (dynamicChildren && // #5154 + // when v-once is used inside a block, setBlockTracking(-1) marks the + // parent block with hasOnce: true + // so that it doesn't take the fast path during unmount - otherwise + // components nested in v-once are never unmounted. + !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { + vnode.children.forEach((child) => { + if (child.type === Comment) { + hostRemove(child.el); + } else { + remove(child); + } + }); + } else { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } + }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + if (instance.type.__hmrId) { + unregisterHMR(instance); + } + const { bum, scope, job, subTree, um, m, a } = instance; + invalidateMount(m); + invalidateMount(a); + if (bum) { + invokeArrayFns(bum); + } + scope.stop(); + if (job) { + job.flags |= 8; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + { + devtoolsComponentRemoved(instance); + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + const el = hostNextSibling(vnode.anchor || vnode.el); + const teleportEnd = el && el[TeleportEndKey]; + return teleportEnd ? hostNextSibling(teleportEnd) : el; + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + container._vnode = vnode; + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + if (createHydrationFns) { + [hydrate, hydrateNode] = createHydrationFns( + internals + ); + } + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; + } + function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; + } + function toggleRecurse({ effect, job }, allowed) { + if (allowed) { + effect.flags |= 32; + job.flags |= 4; + } else { + effect.flags &= ~32; + job.flags &= ~4; + } + } + function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; + } + function traverseStaticChildren(n1, n2, shallow = false) { + const ch1 = n1.children; + const ch2 = n2.children; + if (isArray(ch1) && isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; + } + if (!shallow && c2.patchFlag !== -2) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } + if (c2.type === Comment && !c2.el) { + c2.el = c1.el; + } + } + } + } + function getSequence(arr) { + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; + } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } + } + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; + } + function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); + } + } + } + function invalidateMount(hooks) { + if (hooks) { + for (let i = 0; i < hooks.length; i++) + hooks[i].flags |= 8; + } + } + + const ssrContextKey = Symbol.for("v-scx"); + const useSSRContext = () => { + { + warn$1(`useSSRContext() is not supported in the global build.`); + } + }; + + function watchEffect(effect, options) { + return doWatch(effect, null, options); + } + function watchPostEffect(effect, options) { + return doWatch( + effect, + null, + extend({}, options, { flush: "post" }) + ); + } + function watchSyncEffect(effect, options) { + return doWatch( + effect, + null, + extend({}, options, { flush: "sync" }) + ); + } + function watch(source, cb, options) { + if (!isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); + } + function doWatch(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, flush, once } = options; + if (!cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + } + const baseWatchOptions = extend({}, options); + baseWatchOptions.onWarn = warn$1; + const instance = currentInstance; + baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args); + let isPre = false; + if (flush === "post") { + baseWatchOptions.scheduler = (job) => { + queuePostRenderEffect(job, instance && instance.suspense); + }; + } else if (flush !== "sync") { + isPre = true; + baseWatchOptions.scheduler = (job, isFirstRun) => { + if (isFirstRun) { + job(); + } else { + queueJob(job); + } + }; + } + baseWatchOptions.augmentJob = (job) => { + if (cb) { + job.flags |= 4; + } + if (isPre) { + job.flags |= 2; + if (instance) { + job.id = instance.uid; + job.i = instance; + } + } + }; + const watchHandle = watch$1(source, cb, baseWatchOptions); + return watchHandle; + } + function instanceWatch(source, value, options) { + const publicThis = this.proxy; + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; + } + function createPathGetter(ctx, path) { + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; + } + + function useModel(props, name, options = EMPTY_OBJ) { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useModel() called without active instance.`); + return ref(); + } + const camelizedName = camelize(name); + if (!i.propsOptions[0][camelizedName]) { + warn$1(`useModel() called with prop "${name}" which is not declared.`); + return ref(); + } + const hyphenatedName = hyphenate(name); + const modifiers = getModelModifiers(props, camelizedName); + const res = customRef((track, trigger) => { + let localValue; + let prevSetValue = EMPTY_OBJ; + let prevEmittedValue; + watchSyncEffect(() => { + const propValue = props[camelizedName]; + if (hasChanged(localValue, propValue)) { + localValue = propValue; + trigger(); + } + }); + return { + get() { + track(); + return options.get ? options.get(localValue) : localValue; + }, + set(value) { + const emittedValue = options.set ? options.set(value) : value; + if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) { + return; + } + const rawProps = i.vnode.props; + if (!(rawProps && // check if parent has passed v-model + (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) { + localValue = value; + trigger(); + } + i.emit(`update:${name}`, emittedValue); + if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) { + trigger(); + } + prevSetValue = value; + prevEmittedValue = emittedValue; + } + }; + }); + res[Symbol.iterator] = () => { + let i2 = 0; + return { + next() { + if (i2 < 2) { + return { value: i2++ ? modifiers || EMPTY_OBJ : res, done: false }; + } else { + return { done: true }; + } + } + }; + }; + return res; + } + const getModelModifiers = (props, modelName) => { + return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`]; + }; + + function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) return; + const props = instance.vnode.props || EMPTY_OBJ; + { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.` + ); + } + } else { + const validator = emitsOptions[event]; + if (isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } + } + } + } + } + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modifiers = isModelListener && getModelModifiers(props, event.slice(7)); + if (modifiers) { + if (modifiers.trim) { + args = rawArgs.map((a) => isString(a) ? a.trim() : a); + } + if (modifiers.number) { + args = rawArgs.map(looseToNumber); + } + } + { + devtoolsComponentEmit(instance, event, args); + } + { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( + event + )}" instead of "${event}".` + ); + } + } + let handlerName; + let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; + } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } + } + function normalizeEmitsOptions(comp, appContext, asMixin = false) { + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (!isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); + } + if (comp.extends) { + extendEmits(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendEmits); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); + } + return null; + } + if (isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { + cache.set(comp, normalized); + } + return normalized; + } + function isEmitListener(options, key) { + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); + } + + let accessedAttrs = false; + function markAttrsAccessed() { + accessedAttrs = true; + } + function renderComponentRoot(instance) { + const { + type: Component, + vnode, + proxy, + withProxy, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + props, + data, + setupState, + ctx, + inheritAttrs + } = instance; + const prev = setCurrentRenderingInstance(instance); + let result; + let fallthroughAttrs; + { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); + } + }) : proxyToUse; + result = normalizeVNode( + render.call( + thisProxy, + proxyToUse, + renderCache, + true ? shallowReadonly(props) : props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode( + render2.length > 1 ? render2( + true ? shallowReadonly(props) : props, + true ? { + get attrs() { + markAttrsAccessed(); + return shallowReadonly(attrs); + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + true ? shallowReadonly(props) : props, + null + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs, false, true); + } else if (!accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (isOn(key)) { + if (!isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); + } + } else { + extraAttrs.push(key); + } + } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.` + ); + } + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); + } + } + } + } + if (vnode.dirs) { + if (!isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); + } + root = cloneVNode(root, null, false, true); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!isElementRoot(root)) { + warn$1( + `Component inside <Transition> renders non-element root node that cannot be animated.` + ); + } + setTransitionHooks(root, vnode.transition); + } + if (setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance(prev); + return result; + } + const getChildRoot = (vnode) => { + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } + } + }; + return [normalizeVNode(childRoot), setRoot]; + }; + function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } + } + } + } else { + return; + } + } + return singleRoot; + } + const getFunctionalFallthrough = (attrs) => { + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || isOn(key)) { + (res || (res = {}))[key] = attrs[key]; + } + } + return res; + }; + const filterModelListeners = (attrs, props) => { + const res = {}; + for (const key in attrs) { + if (!isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; + } + } + return res; + }; + const isElementRoot = (vnode) => { + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; + }; + function shouldUpdateComponent(prevVNode, nextVNode, optimized) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if ((prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { + return true; + } + } + if (prevProps === nextProps) { + return false; + } + if (!prevProps) { + return !!nextProps; + } + if (!nextProps) { + return true; + } + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; + } + function hasPropsChanged(prevProps, nextProps, emitsOptions) { + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; + } + } + return false; + } + function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; + } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } + } + + const isSuspense = (type) => type.__isSuspense; + let suspenseId = 0; + const SuspenseImpl = { + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { + n2.suspense = n1.suspense; + n2.suspense.vnode = n2; + n2.el = n1.el; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + normalize: normalizeSuspenseChildren + }; + const Suspense = SuspenseImpl ; + function triggerEvent(vnode, name) { + const eventListener = vnode.props && vnode.props[name]; + if (isFunction(eventListener)) { + eventListener(); + } + } + function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } + } + function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } + } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); + } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); + } + } + } + } + } + let hasWarned = false; + function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + if (!hasWarned) { + hasWarned = true; + console[console.info ? "info" : "log"]( + `<Suspense> is an experimental feature and its API will likely change.` + ); + } + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; + } + } + const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; + { + assertNumber(timeout, `Suspense timeout`); + } + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + { + if (!resume && !suspense.pendingBranch) { + throw new Error( + `suspense.resolve() is called without a pending branch.` + ); + } + if (suspense.isUnmounted) { + throw new Error( + `suspense.resolve() is called on an already unmounted suspense boundary.` + ); + } + } + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) === container2) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect, optimized2) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + { + pushWarningContext(vnode2); + } + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized2 + ); + if (placeholder) { + remove(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + { + popWarningContext(); + } + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + } + }; + return suspense; + } + function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; + } + function normalizeSuspenseChildren(vnode) { + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); + } + function normalizeSuspenseSlot(s) { + let block; + if (isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); + } + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); + } + } + if (isArray(s)) { + const singleChild = filterSingleRoot(s); + if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { + warn$1(`<Suspense> slots expect a single root node.`); + } + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; + } + function queueEffectWithSuspense(fn, suspense) { + if (suspense && suspense.pendingBranch) { + if (isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); + } + } else { + queuePostFlushCb(fn); + } + } + function setActiveBranch(suspense, branch) { + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } + } + function isVNodeSuspensible(vnode) { + const suspensible = vnode.props && vnode.props.suspensible; + return suspensible != null && suspensible !== false; + } + + const Fragment = Symbol.for("v-fgt"); + const Text = Symbol.for("v-txt"); + const Comment = Symbol.for("v-cmt"); + const Static = Symbol.for("v-stc"); + const blockStack = []; + let currentBlock = null; + function openBlock(disableTracking = false) { + blockStack.push(currentBlock = disableTracking ? null : []); + } + function closeBlock() { + blockStack.pop(); + currentBlock = blockStack[blockStack.length - 1] || null; + } + let isBlockTreeEnabled = 1; + function setBlockTracking(value, inVOnce = false) { + isBlockTreeEnabled += value; + if (value < 0 && currentBlock && inVOnce) { + currentBlock.hasOnce = true; + } + } + function setupBlock(vnode) { + vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; + closeBlock(); + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(vnode); + } + return vnode; + } + function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { + return setupBlock( + createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + true + ) + ); + } + function createBlock(type, props, children, patchFlag, dynamicProps) { + return setupBlock( + createVNode( + type, + props, + children, + patchFlag, + dynamicProps, + true + ) + ); + } + function isVNode(value) { + return value ? value.__v_isVNode === true : false; + } + function isSameVNodeType(n1, n2) { + if (n2.shapeFlag & 6 && n1.component) { + const dirtyInstances = hmrDirtyComponents.get(n2.type); + if (dirtyInstances && dirtyInstances.has(n1.component)) { + n1.shapeFlag &= ~256; + n2.shapeFlag &= ~512; + return false; + } + } + return n1.type === n2.type && n1.key === n2.key; + } + let vnodeArgsTransformer; + function transformVNodeArgs(transformer) { + vnodeArgsTransformer = transformer; + } + const createVNodeWithArgsTransform = (...args) => { + return _createVNode( + ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args + ); + }; + const normalizeKey = ({ key }) => key != null ? key : null; + const normalizeRef = ({ + ref, + ref_key, + ref_for + }) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; + }; + function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetStart: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); + } + } else if (children) { + vnode.shapeFlag |= isString(children) ? 8 : 16; + } + if (vnode.key !== vnode.key) { + warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; + } + const createVNode = createVNodeWithArgsTransform ; + function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { + if (!type || type === NULL_DYNAMIC_COMPONENT) { + if (!type) { + warn$1(`Invalid vnode type when creating vnode: ${type}.`); + } + type = Comment; + } + if (isVNode(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); + } + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } + } + cloned.patchFlag = -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (isObject(style)) { + if (isProxy(style) && !isArray(style)) { + style = extend({}, style); + } + props.style = normalizeStyle(style); + } + } + const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; + if (shapeFlag & 4 && isProxy(type)) { + type = toRaw(type); + warn$1( + `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, + ` +Component that was made reactive: `, + type + ); + } + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); + } + function guardReactiveProps(props) { + if (!props) return null; + return isProxy(props) || isInternalObject(props) ? extend({}, props) : props; + } + function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) { + const { props, ref, patchFlag, children, transition } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, + target: vnode.target, + targetStart: vnode.targetStart, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + if (transition && cloneTransition) { + setTransitionHooks( + cloned, + transition.clone(cloned) + ); + } + return cloned; + } + function deepCloneVNode(vnode) { + const cloned = cloneVNode(vnode); + if (isArray(vnode.children)) { + cloned.children = vnode.children.map(deepCloneVNode); + } + return cloned; + } + function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); + } + function createStaticVNode(content, numberOfNodes) { + const vnode = createVNode(Static, null, content); + vnode.staticCount = numberOfNodes; + return vnode; + } + function createCommentVNode(text = "", asBlock = false) { + return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); + } + function normalizeVNode(child) { + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (isVNode(child)) { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } + } + function cloneIfMounted(child) { + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); + } + function normalizeChildren(vnode, children) { + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !isInternalObject(children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; + } + } + } + } else if (isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; + } + } + vnode.children = children; + vnode.shapeFlag |= type; + } + function mergeProps(...args) { + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = normalizeClass([ret.class, toMerge.class]); + } + } else if (key === "style") { + ret.style = normalizeStyle([ret.style, toMerge.style]); + } else if (isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } + } + } + return ret; + } + function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); + } + + const emptyAppContext = createAppContext(); + let uid = 0; + function createComponentInstance(vnode, parent, suspense) { + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + job: null, + scope: new EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + ids: parent ? parent.ids : ["", 0, 0], + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: EMPTY_OBJ, + data: EMPTY_OBJ, + props: EMPTY_OBJ, + attrs: EMPTY_OBJ, + slots: EMPTY_OBJ, + refs: EMPTY_OBJ, + setupState: EMPTY_OBJ, + setupContext: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + { + instance.ctx = createDevRenderContext(instance); + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; + } + let currentInstance = null; + const getCurrentInstance = () => currentInstance || currentRenderingInstance; + let internalSetCurrentInstance; + let setInSSRSetupState; + { + internalSetCurrentInstance = (i) => { + currentInstance = i; + }; + setInSSRSetupState = (v) => { + isInSSRComponentSetup = v; + }; + } + const setCurrentInstance = (instance) => { + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; + }; + const unsetCurrentInstance = () => { + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); + }; + const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); + function validateComponentName(name, { isNativeTag }) { + if (isBuiltInTag(name) || isNativeTag(name)) { + warn$1( + "Do not use built-in or reserved HTML elements as component id: " + name + ); + } + } + function isStatefulComponent(instance) { + return instance.vnode.shapeFlag & 4; + } + let isInSSRComponentSetup = false; + function setupComponent(instance, isSSR = false, optimized = false) { + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children, optimized); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; + } + function setupStatefulComponent(instance, isSSR) { + var _a; + const Component = instance.type; + { + if (Component.name) { + validateComponentName(Component.name, instance.appContext.config); + } + if (Component.components) { + const names = Object.keys(Component.components); + for (let i = 0; i < names.length; i++) { + validateComponentName(names[i], instance.appContext.config); + } + } + if (Component.directives) { + const names = Object.keys(Component.directives); + for (let i = 0; i < names.length; i++) { + validateDirectiveName(names[i]); + } + } + if (Component.compilerOptions && isRuntimeOnly()) { + warn$1( + `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` + ); + } + } + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers); + { + exposePropsOnRenderContext(instance); + } + const { setup } = Component; + if (setup) { + pauseTracking(); + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + shallowReadonly(instance.props) , + setupContext + ] + ); + const isAsyncSetup = isPromise(setupResult); + resetTracking(); + reset(); + if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) { + markAsyncBoundary(instance); + } + if (isAsyncSetup) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + if (!instance.suspense) { + const name = (_a = Component.name) != null ? _a : "Anonymous"; + warn$1( + `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` + ); + } + } + } else { + handleSetupResult(instance, setupResult, isSSR); + } + } else { + finishComponentSetup(instance, isSSR); + } + } + function handleSetupResult(instance, setupResult, isSSR) { + if (isFunction(setupResult)) { + { + instance.render = setupResult; + } + } else if (isObject(setupResult)) { + if (isVNode(setupResult)) { + warn$1( + `setup() should not return VNodes directly - return a render function instead.` + ); + } + { + instance.devtoolsRawSetupState = setupResult; + } + instance.setupState = proxyRefs(setupResult); + { + exposeSetupStateOnRenderContext(instance); + } + } else if (setupResult !== void 0) { + warn$1( + `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` + ); + } + finishComponentSetup(instance, isSSR); + } + let compile$1; + let installWithProxy; + function registerRuntimeCompiler(_compile) { + compile$1 = _compile; + installWithProxy = (i) => { + if (i.render._rc) { + i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); + } + }; + } + const isRuntimeOnly = () => !compile$1; + function finishComponentSetup(instance, isSSR, skipOptions) { + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile$1 && !Component.render) { + const template = Component.template || resolveMergedOptions(instance).template; + if (template) { + { + startMeasure(instance, `compile`); + } + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = extend( + extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions + ); + Component.render = compile$1(template, finalCompilerOptions); + { + endMeasure(instance, `compile`); + } + } + } + instance.render = Component.render || NOOP; + if (installWithProxy) { + installWithProxy(instance); + } + } + { + const reset = setCurrentInstance(instance); + pauseTracking(); + try { + applyOptions(instance); + } finally { + resetTracking(); + reset(); + } + } + if (!Component.render && instance.render === NOOP && !isSSR) { + if (!compile$1 && Component.template) { + warn$1( + `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.global.js" instead.` ) + ); + } else { + warn$1(`Component is missing template or render function: `, Component); + } + } + } + const attrsProxyHandlers = { + get(target, key) { + markAttrsAccessed(); + track(target, "get", ""); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } + } ; + function getSlotsProxy(instance) { + return new Proxy(instance.slots, { + get(target, key) { + track(instance, "get", "$slots"); + return target[key]; + } + }); + } + function createSetupContext(instance) { + const expose = (exposed) => { + { + if (instance.exposed) { + warn$1(`expose() should be called only once per setup().`); + } + if (exposed != null) { + let exposedType = typeof exposed; + if (exposedType === "object") { + if (isArray(exposed)) { + exposedType = "array"; + } else if (isRef(exposed)) { + exposedType = "ref"; + } + } + if (exposedType !== "object") { + warn$1( + `expose() should be passed a plain object, received ${exposedType}.` + ); + } + } + } + instance.exposed = exposed || {}; + }; + { + let attrsProxy; + let slotsProxy; + return Object.freeze({ + get attrs() { + return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers)); + }, + get slots() { + return slotsProxy || (slotsProxy = getSlotsProxy(instance)); + }, + get emit() { + return (event, ...args) => instance.emit(event, ...args); + }, + expose + }); + } + } + function getComponentPublicInstance(instance) { + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); + } + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } else { + return instance.proxy; + } + } + const classifyRE = /(?:^|[-_])(\w)/g; + const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); + function getComponentName(Component, includeInferred = true) { + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; + } + function formatComponentName(instance, Component, isRoot = false) { + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; + } + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; + } + function isClassComponent(value) { + return isFunction(value) && "__vccOpts" in value; + } + + const computed = (getterOrOptions, debugOptions) => { + const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); + { + const i = getCurrentInstance(); + if (i && i.appContext.config.warnRecursiveComputed) { + c._warnRecursive = true; + } + } + return c; + }; + + function h(type, propsOrChildren, children) { + const l = arguments.length; + if (l === 2) { + if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { + if (isVNode(propsOrChildren)) { + return createVNode(type, null, [propsOrChildren]); + } + return createVNode(type, propsOrChildren); + } else { + return createVNode(type, null, propsOrChildren); + } + } else { + if (l > 3) { + children = Array.prototype.slice.call(arguments, 2); + } else if (l === 3 && isVNode(children)) { + children = [children]; + } + return createVNode(type, propsOrChildren, children); + } + } + + function initCustomFormatter() { + if (typeof window === "undefined") { + return; + } + const vueStyle = { style: "color:#3ba776" }; + const numberStyle = { style: "color:#1677ff" }; + const stringStyle = { style: "color:#f5222d" }; + const keywordStyle = { style: "color:#eb2f96" }; + const formatter = { + __vue_custom_formatter: true, + header(obj) { + if (!isObject(obj)) { + return null; + } + if (obj.__isVue) { + return ["div", vueStyle, `VueInstance`]; + } else if (isRef(obj)) { + return [ + "div", + {}, + ["span", vueStyle, genRefFlag(obj)], + "<", + // avoid debugger accessing value affecting behavior + formatValue("_value" in obj ? obj._value : obj), + `>` + ]; + } else if (isReactive(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"], + "<", + formatValue(obj), + `>${isReadonly(obj) ? ` (readonly)` : ``}` + ]; + } else if (isReadonly(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"], + "<", + formatValue(obj), + ">" + ]; + } + return null; + }, + hasBody(obj) { + return obj && obj.__isVue; + }, + body(obj) { + if (obj && obj.__isVue) { + return [ + "div", + {}, + ...formatInstance(obj.$) + ]; + } + } + }; + function formatInstance(instance) { + const blocks = []; + if (instance.type.props && instance.props) { + blocks.push(createInstanceBlock("props", toRaw(instance.props))); + } + if (instance.setupState !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("setup", instance.setupState)); + } + if (instance.data !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("data", toRaw(instance.data))); + } + const computed = extractKeys(instance, "computed"); + if (computed) { + blocks.push(createInstanceBlock("computed", computed)); + } + const injected = extractKeys(instance, "inject"); + if (injected) { + blocks.push(createInstanceBlock("injected", injected)); + } + blocks.push([ + "div", + {}, + [ + "span", + { + style: keywordStyle.style + ";opacity:0.66" + }, + "$ (internal): " + ], + ["object", { object: instance }] + ]); + return blocks; + } + function createInstanceBlock(type, target) { + target = extend({}, target); + if (!Object.keys(target).length) { + return ["span", {}]; + } + return [ + "div", + { style: "line-height:1.25em;margin-bottom:0.6em" }, + [ + "div", + { + style: "color:#476582" + }, + type + ], + [ + "div", + { + style: "padding-left:1.25em" + }, + ...Object.keys(target).map((key) => { + return [ + "div", + {}, + ["span", keywordStyle, key + ": "], + formatValue(target[key], false) + ]; + }) + ] + ]; + } + function formatValue(v, asRaw = true) { + if (typeof v === "number") { + return ["span", numberStyle, v]; + } else if (typeof v === "string") { + return ["span", stringStyle, JSON.stringify(v)]; + } else if (typeof v === "boolean") { + return ["span", keywordStyle, v]; + } else if (isObject(v)) { + return ["object", { object: asRaw ? toRaw(v) : v }]; + } else { + return ["span", stringStyle, String(v)]; + } + } + function extractKeys(instance, type) { + const Comp = instance.type; + if (isFunction(Comp)) { + return; + } + const extracted = {}; + for (const key in instance.ctx) { + if (isKeyOfType(Comp, key, type)) { + extracted[key] = instance.ctx[key]; + } + } + return extracted; + } + function isKeyOfType(Comp, key, type) { + const opts = Comp[type]; + if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) { + return true; + } + if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { + return true; + } + if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { + return true; + } + } + function genRefFlag(v) { + if (isShallow(v)) { + return `ShallowRef`; + } + if (v.effect) { + return `ComputedRef`; + } + return `Ref`; + } + if (window.devtoolsFormatters) { + window.devtoolsFormatters.push(formatter); + } else { + window.devtoolsFormatters = [formatter]; + } + } + + function withMemo(memo, render, cache, index) { + const cached = cache[index]; + if (cached && isMemoSame(cached, memo)) { + return cached; + } + const ret = render(); + ret.memo = memo.slice(); + ret.cacheIndex = index; + return cache[index] = ret; + } + function isMemoSame(cached, memo) { + const prev = cached.memo; + if (prev.length != memo.length) { + return false; + } + for (let i = 0; i < prev.length; i++) { + if (hasChanged(prev[i], memo[i])) { + return false; + } + } + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(cached); + } + return true; + } + + const version = "3.5.13"; + const warn = warn$1 ; + const ErrorTypeStrings = ErrorTypeStrings$1 ; + const devtools = devtools$1 ; + const setDevtoolsHook = setDevtoolsHook$1 ; + const ssrUtils = null; + const resolveFilter = null; + const compatUtils = null; + const DeprecationTypes = null; + + let policy = void 0; + const tt = typeof window !== "undefined" && window.trustedTypes; + if (tt) { + try { + policy = /* @__PURE__ */ tt.createPolicy("vue", { + createHTML: (val) => val + }); + } catch (e) { + warn(`Error creating trusted types policy: ${e}`); + } + } + const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val; + const svgNS = "http://www.w3.org/2000/svg"; + const mathmlNS = "http://www.w3.org/1998/Math/MathML"; + const doc = typeof document !== "undefined" ? document : null; + const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); + const nodeOps = { + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); + } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) break; + } + } else { + templateContainer.innerHTML = unsafeToTrustedHTML( + namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content + ); + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } + }; + + const TRANSITION = "transition"; + const ANIMATION = "animation"; + const vtcKey = Symbol("_vtc"); + const DOMTransitionPropsValidators = { + name: String, + type: String, + css: { + type: Boolean, + default: true + }, + duration: [String, Number, Object], + enterFromClass: String, + enterActiveClass: String, + enterToClass: String, + appearFromClass: String, + appearActiveClass: String, + appearToClass: String, + leaveFromClass: String, + leaveActiveClass: String, + leaveToClass: String + }; + const TransitionPropsValidators = /* @__PURE__ */ extend( + {}, + BaseTransitionPropsValidators, + DOMTransitionPropsValidators + ); + const decorate$1 = (t) => { + t.displayName = "Transition"; + t.props = TransitionPropsValidators; + return t; + }; + const Transition = /* @__PURE__ */ decorate$1( + (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots) + ); + const callHook = (hook, args = []) => { + if (isArray(hook)) { + hook.forEach((h2) => h2(...args)); + } else if (hook) { + hook(...args); + } + }; + const hasExplicitCallback = (hook) => { + return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; + }; + function resolveTransitionProps(rawProps) { + const baseProps = {}; + for (const key in rawProps) { + if (!(key in DOMTransitionPropsValidators)) { + baseProps[key] = rawProps[key]; + } + } + if (rawProps.css === false) { + return baseProps; + } + const { + name = "v", + type, + duration, + enterFromClass = `${name}-enter-from`, + enterActiveClass = `${name}-enter-active`, + enterToClass = `${name}-enter-to`, + appearFromClass = enterFromClass, + appearActiveClass = enterActiveClass, + appearToClass = enterToClass, + leaveFromClass = `${name}-leave-from`, + leaveActiveClass = `${name}-leave-active`, + leaveToClass = `${name}-leave-to` + } = rawProps; + const durations = normalizeDuration(duration); + const enterDuration = durations && durations[0]; + const leaveDuration = durations && durations[1]; + const { + onBeforeEnter, + onEnter, + onEnterCancelled, + onLeave, + onLeaveCancelled, + onBeforeAppear = onBeforeEnter, + onAppear = onEnter, + onAppearCancelled = onEnterCancelled + } = baseProps; + const finishEnter = (el, isAppear, done, isCancelled) => { + el._enterCancelled = isCancelled; + removeTransitionClass(el, isAppear ? appearToClass : enterToClass); + removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); + done && done(); + }; + const finishLeave = (el, done) => { + el._isLeaving = false; + removeTransitionClass(el, leaveFromClass); + removeTransitionClass(el, leaveToClass); + removeTransitionClass(el, leaveActiveClass); + done && done(); + }; + const makeEnterHook = (isAppear) => { + return (el, done) => { + const hook = isAppear ? onAppear : onEnter; + const resolve = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve]); + nextFrame(() => { + removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); + addTransitionClass(el, isAppear ? appearToClass : enterToClass); + if (!hasExplicitCallback(hook)) { + whenTransitionEnds(el, type, enterDuration, resolve); + } + }); + }; + }; + return extend(baseProps, { + onBeforeEnter(el) { + callHook(onBeforeEnter, [el]); + addTransitionClass(el, enterFromClass); + addTransitionClass(el, enterActiveClass); + }, + onBeforeAppear(el) { + callHook(onBeforeAppear, [el]); + addTransitionClass(el, appearFromClass); + addTransitionClass(el, appearActiveClass); + }, + onEnter: makeEnterHook(false), + onAppear: makeEnterHook(true), + onLeave(el, done) { + el._isLeaving = true; + const resolve = () => finishLeave(el, done); + addTransitionClass(el, leaveFromClass); + if (!el._enterCancelled) { + forceReflow(); + addTransitionClass(el, leaveActiveClass); + } else { + addTransitionClass(el, leaveActiveClass); + forceReflow(); + } + nextFrame(() => { + if (!el._isLeaving) { + return; + } + removeTransitionClass(el, leaveFromClass); + addTransitionClass(el, leaveToClass); + if (!hasExplicitCallback(onLeave)) { + whenTransitionEnds(el, type, leaveDuration, resolve); + } + }); + callHook(onLeave, [el, resolve]); + }, + onEnterCancelled(el) { + finishEnter(el, false, void 0, true); + callHook(onEnterCancelled, [el]); + }, + onAppearCancelled(el) { + finishEnter(el, true, void 0, true); + callHook(onAppearCancelled, [el]); + }, + onLeaveCancelled(el) { + finishLeave(el); + callHook(onLeaveCancelled, [el]); + } + }); + } + function normalizeDuration(duration) { + if (duration == null) { + return null; + } else if (isObject(duration)) { + return [NumberOf(duration.enter), NumberOf(duration.leave)]; + } else { + const n = NumberOf(duration); + return [n, n]; + } + } + function NumberOf(val) { + const res = toNumber(val); + { + assertNumber(res, "<transition> explicit duration"); + } + return res; + } + function addTransitionClass(el, cls) { + cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); + (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); + } + function removeTransitionClass(el, cls) { + cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.delete(cls); + if (!_vtc.size) { + el[vtcKey] = void 0; + } + } + } + function nextFrame(cb) { + requestAnimationFrame(() => { + requestAnimationFrame(cb); + }); + } + let endId = 0; + function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { + const id = el._endId = ++endId; + const resolveIfNotStale = () => { + if (id === el._endId) { + resolve(); + } + }; + if (explicitTimeout != null) { + return setTimeout(resolveIfNotStale, explicitTimeout); + } + const { type, timeout, propCount } = getTransitionInfo(el, expectedType); + if (!type) { + return resolve(); + } + const endEvent = type + "end"; + let ended = 0; + const end = () => { + el.removeEventListener(endEvent, onEnd); + resolveIfNotStale(); + }; + const onEnd = (e) => { + if (e.target === el && ++ended >= propCount) { + end(); + } + }; + setTimeout(() => { + if (ended < propCount) { + end(); + } + }, timeout + 1); + el.addEventListener(endEvent, onEnd); + } + function getTransitionInfo(el, expectedType) { + const styles = window.getComputedStyle(el); + const getStyleProperties = (key) => (styles[key] || "").split(", "); + const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); + const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); + const transitionTimeout = getTimeout(transitionDelays, transitionDurations); + const animationDelays = getStyleProperties(`${ANIMATION}Delay`); + const animationDurations = getStyleProperties(`${ANIMATION}Duration`); + const animationTimeout = getTimeout(animationDelays, animationDurations); + let type = null; + let timeout = 0; + let propCount = 0; + if (expectedType === TRANSITION) { + if (transitionTimeout > 0) { + type = TRANSITION; + timeout = transitionTimeout; + propCount = transitionDurations.length; + } + } else if (expectedType === ANIMATION) { + if (animationTimeout > 0) { + type = ANIMATION; + timeout = animationTimeout; + propCount = animationDurations.length; + } + } else { + timeout = Math.max(transitionTimeout, animationTimeout); + type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; + propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; + } + const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( + getStyleProperties(`${TRANSITION}Property`).toString() + ); + return { + type, + timeout, + propCount, + hasTransform + }; + } + function getTimeout(delays, durations) { + while (delays.length < durations.length) { + delays = delays.concat(delays); + } + return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); + } + function toMs(s) { + if (s === "auto") return 0; + return Number(s.slice(0, -1).replace(",", ".")) * 1e3; + } + function forceReflow() { + return document.body.offsetHeight; + } + + function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } + } + + const vShowOriginalDisplay = Symbol("_vod"); + const vShowHidden = Symbol("_vsh"); + const vShow = { + beforeMount(el, { value }, { transition }) { + el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display; + if (transition && value) { + transition.beforeEnter(el); + } else { + setDisplay(el, value); + } + }, + mounted(el, { value }, { transition }) { + if (transition && value) { + transition.enter(el); + } + }, + updated(el, { value, oldValue }, { transition }) { + if (!value === !oldValue) return; + if (transition) { + if (value) { + transition.beforeEnter(el); + setDisplay(el, true); + transition.enter(el); + } else { + transition.leave(el, () => { + setDisplay(el, false); + }); + } + } else { + setDisplay(el, value); + } + }, + beforeUnmount(el, { value }) { + setDisplay(el, value); + } + }; + { + vShow.name = "show"; + } + function setDisplay(el, value) { + el.style.display = value ? el[vShowOriginalDisplay] : "none"; + el[vShowHidden] = !value; + } + + const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); + function useCssVars(getter) { + const instance = getCurrentInstance(); + if (!instance) { + warn(`useCssVars is called without current active component instance.`); + return; + } + const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { + Array.from( + document.querySelectorAll(`[data-v-owner="${instance.uid}"]`) + ).forEach((node) => setVarsOnNode(node, vars)); + }; + { + instance.getCssVars = () => getter(instance.proxy); + } + const setVars = () => { + const vars = getter(instance.proxy); + if (instance.ce) { + setVarsOnNode(instance.ce, vars); + } else { + setVarsOnVNode(instance.subTree, vars); + } + updateTeleports(vars); + }; + onBeforeUpdate(() => { + queuePostFlushCb(setVars); + }); + onMounted(() => { + watch(setVars, NOOP, { flush: "post" }); + const ob = new MutationObserver(setVars); + ob.observe(instance.subTree.el.parentNode, { childList: true }); + onUnmounted(() => ob.disconnect()); + }); + } + function setVarsOnVNode(vnode, vars) { + if (vnode.shapeFlag & 128) { + const suspense = vnode.suspense; + vnode = suspense.activeBranch; + if (suspense.pendingBranch && !suspense.isHydrating) { + suspense.effects.push(() => { + setVarsOnVNode(suspense.activeBranch, vars); + }); + } + } + while (vnode.component) { + vnode = vnode.component.subTree; + } + if (vnode.shapeFlag & 1 && vnode.el) { + setVarsOnNode(vnode.el, vars); + } else if (vnode.type === Fragment) { + vnode.children.forEach((c) => setVarsOnVNode(c, vars)); + } else if (vnode.type === Static) { + let { el, anchor } = vnode; + while (el) { + setVarsOnNode(el, vars); + if (el === anchor) break; + el = el.nextSibling; + } + } + } + function setVarsOnNode(el, vars) { + if (el.nodeType === 1) { + const style = el.style; + let cssText = ""; + for (const key in vars) { + style.setProperty(`--${key}`, vars[key]); + cssText += `--${key}: ${vars[key]};`; + } + style[CSS_VAR_TEXT] = cssText; + } + } + + const displayRE = /(^|;)\s*display\s*:/; + function patchStyle(el, prev, next) { + const style = el.style; + const isCssString = isString(next); + let hasControlledDisplay = false; + if (next && !isCssString) { + if (prev) { + if (!isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } else { + for (const prevStyle of prev.split(";")) { + const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim(); + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + } + for (const key in next) { + if (key === "display") { + hasControlledDisplay = true; + } + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + hasControlledDisplay = displayRE.test(next); + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOriginalDisplay in el) { + el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : ""; + if (el[vShowHidden]) { + style.display = "none"; + } + } + } + const semicolonRE = /[^\\];\s*$/; + const importantRE = /\s*!important$/; + function setStyle(style, name, val) { + if (isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) val = ""; + { + if (semicolonRE.test(val)) { + warn( + `Unexpected semicolon at the end of '${name}' style value: '${val}'` + ); + } + } + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } + } + const prefixes = ["Webkit", "Moz", "ms"]; + const prefixCache = {}; + function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; + } + + const xlinkNS = "http://www.w3.org/1999/xlink"; + function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + if (value == null || isBoolean && !includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute( + key, + isBoolean ? "" : isSymbol(value) ? String(value) : value + ); + } + } + } + + function patchDOMProp(el, key, value, parentComponent, attrName) { + if (key === "innerHTML" || key === "textContent") { + if (value != null) { + el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value; + } + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; + const newValue = value == null ? ( + // #11647: value should be set as empty string for null and undefined, + // but <input type="checkbox"> should be set as 'on'. + el.type === "checkbox" ? "on" : "" + ) : String(value); + if (oldValue !== newValue || !("_value" in el)) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + el._value = value; + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + if (!needRemove) { + warn( + `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, + e + ); + } + } + needRemove && el.removeAttribute(attrName || key); + } + + function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); + } + function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); + } + const veiKey = Symbol("_vei"); + function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = sanitizeEventValue(nextValue, rawName) ; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker( + sanitizeEventValue(nextValue, rawName) , + instance + ); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } + } + const optionsModifierRE = /(?:Once|Passive|Capture)$/; + function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); + return [event, options]; + } + let cachedNow = 0; + const p = /* @__PURE__ */ Promise.resolve(); + const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); + function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; + } + function sanitizeEventValue(value, propName) { + if (isFunction(value) || isArray(value)) { + return value; + } + warn( + `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop? +Expected function or array of functions, received type ${typeof value}.` + ); + return NOOP; + } + function patchStopImmediatePropagation(e, value) { + if (isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map( + (fn) => (e2) => !e2._stopped && fn && fn(e2) + ); + } else { + return value; + } + } + + const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter + key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; + const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (isOn(key)) { + if (!isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp(el, key, nextValue); + if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { + patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); + } + } else if ( + // #11081 force set props for possible async custom element + el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue)) + ) { + patchDOMProp(el, camelize(key), nextValue, parentComponent, key); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } + }; + function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && isString(value)) { + return false; + } + return key in el; + } + + const REMOVAL = {}; + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function defineCustomElement(options, extraOptions, _createApp) { + const Comp = defineComponent(options, extraOptions); + if (isPlainObject(Comp)) extend(Comp, extraOptions); + class VueCustomElement extends VueElement { + constructor(initialProps) { + super(Comp, initialProps, _createApp); + } + } + VueCustomElement.def = Comp; + return VueCustomElement; + } + /*! #__NO_SIDE_EFFECTS__ */ + const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => { + return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp); + }; + const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { + }; + class VueElement extends BaseClass { + constructor(_def, _props = {}, _createApp = createApp) { + super(); + this._def = _def; + this._props = _props; + this._createApp = _createApp; + this._isVueCE = true; + /** + * @internal + */ + this._instance = null; + /** + * @internal + */ + this._app = null; + /** + * @internal + */ + this._nonce = this._def.nonce; + this._connected = false; + this._resolved = false; + this._numberProps = null; + this._styleChildren = /* @__PURE__ */ new WeakSet(); + this._ob = null; + if (this.shadowRoot && _createApp !== createApp) { + this._root = this.shadowRoot; + } else { + if (this.shadowRoot) { + warn( + `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` + ); + } + if (_def.shadowRoot !== false) { + this.attachShadow({ mode: "open" }); + this._root = this.shadowRoot; + } else { + this._root = this; + } + } + if (!this._def.__asyncLoader) { + this._resolveProps(this._def); + } + } + connectedCallback() { + if (!this.isConnected) return; + if (!this.shadowRoot) { + this._parseSlots(); + } + this._connected = true; + let parent = this; + while (parent = parent && (parent.parentNode || parent.host)) { + if (parent instanceof VueElement) { + this._parent = parent; + break; + } + } + if (!this._instance) { + if (this._resolved) { + this._setParent(); + this._update(); + } else { + if (parent && parent._pendingResolve) { + this._pendingResolve = parent._pendingResolve.then(() => { + this._pendingResolve = void 0; + this._resolveDef(); + }); + } else { + this._resolveDef(); + } + } + } + } + _setParent(parent = this._parent) { + if (parent) { + this._instance.parent = parent._instance; + this._instance.provides = parent._instance.provides; + } + } + disconnectedCallback() { + this._connected = false; + nextTick(() => { + if (!this._connected) { + if (this._ob) { + this._ob.disconnect(); + this._ob = null; + } + this._app && this._app.unmount(); + if (this._instance) this._instance.ce = void 0; + this._app = this._instance = null; + } + }); + } + /** + * resolve inner component definition (handle possible async component) + */ + _resolveDef() { + if (this._pendingResolve) { + return; + } + for (let i = 0; i < this.attributes.length; i++) { + this._setAttr(this.attributes[i].name); + } + this._ob = new MutationObserver((mutations) => { + for (const m of mutations) { + this._setAttr(m.attributeName); + } + }); + this._ob.observe(this, { attributes: true }); + const resolve = (def, isAsync = false) => { + this._resolved = true; + this._pendingResolve = void 0; + const { props, styles } = def; + let numberProps; + if (props && !isArray(props)) { + for (const key in props) { + const opt = props[key]; + if (opt === Number || opt && opt.type === Number) { + if (key in this._props) { + this._props[key] = toNumber(this._props[key]); + } + (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true; + } + } + } + this._numberProps = numberProps; + if (isAsync) { + this._resolveProps(def); + } + if (this.shadowRoot) { + this._applyStyles(styles); + } else if (styles) { + warn( + "Custom element style injection is not supported when using shadowRoot: false" + ); + } + this._mount(def); + }; + const asyncDef = this._def.__asyncLoader; + if (asyncDef) { + this._pendingResolve = asyncDef().then( + (def) => resolve(this._def = def, true) + ); + } else { + resolve(this._def); + } + } + _mount(def) { + if (!def.name) { + def.name = "VueElement"; + } + this._app = this._createApp(def); + if (def.configureApp) { + def.configureApp(this._app); + } + this._app._ceVNode = this._createVNode(); + this._app.mount(this._root); + const exposed = this._instance && this._instance.exposed; + if (!exposed) return; + for (const key in exposed) { + if (!hasOwn(this, key)) { + Object.defineProperty(this, key, { + // unwrap ref to be consistent with public instance behavior + get: () => unref(exposed[key]) + }); + } else { + warn(`Exposed property "${key}" already exists on custom element.`); + } + } + } + _resolveProps(def) { + const { props } = def; + const declaredPropKeys = isArray(props) ? props : Object.keys(props || {}); + for (const key of Object.keys(this)) { + if (key[0] !== "_" && declaredPropKeys.includes(key)) { + this._setProp(key, this[key]); + } + } + for (const key of declaredPropKeys.map(camelize)) { + Object.defineProperty(this, key, { + get() { + return this._getProp(key); + }, + set(val) { + this._setProp(key, val, true, true); + } + }); + } + } + _setAttr(key) { + if (key.startsWith("data-v-")) return; + const has = this.hasAttribute(key); + let value = has ? this.getAttribute(key) : REMOVAL; + const camelKey = camelize(key); + if (has && this._numberProps && this._numberProps[camelKey]) { + value = toNumber(value); + } + this._setProp(camelKey, value, false, true); + } + /** + * @internal + */ + _getProp(key) { + return this._props[key]; + } + /** + * @internal + */ + _setProp(key, val, shouldReflect = true, shouldUpdate = false) { + if (val !== this._props[key]) { + if (val === REMOVAL) { + delete this._props[key]; + } else { + this._props[key] = val; + if (key === "key" && this._app) { + this._app._ceVNode.key = val; + } + } + if (shouldUpdate && this._instance) { + this._update(); + } + if (shouldReflect) { + const ob = this._ob; + ob && ob.disconnect(); + if (val === true) { + this.setAttribute(hyphenate(key), ""); + } else if (typeof val === "string" || typeof val === "number") { + this.setAttribute(hyphenate(key), val + ""); + } else if (!val) { + this.removeAttribute(hyphenate(key)); + } + ob && ob.observe(this, { attributes: true }); + } + } + } + _update() { + render(this._createVNode(), this._root); + } + _createVNode() { + const baseProps = {}; + if (!this.shadowRoot) { + baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this); + } + const vnode = createVNode(this._def, extend(baseProps, this._props)); + if (!this._instance) { + vnode.ce = (instance) => { + this._instance = instance; + instance.ce = this; + instance.isCE = true; + { + instance.ceReload = (newStyles) => { + if (this._styles) { + this._styles.forEach((s) => this._root.removeChild(s)); + this._styles.length = 0; + } + this._applyStyles(newStyles); + this._instance = null; + this._update(); + }; + } + const dispatch = (event, args) => { + this.dispatchEvent( + new CustomEvent( + event, + isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args } + ) + ); + }; + instance.emit = (event, ...args) => { + dispatch(event, args); + if (hyphenate(event) !== event) { + dispatch(hyphenate(event), args); + } + }; + this._setParent(); + }; + } + return vnode; + } + _applyStyles(styles, owner) { + if (!styles) return; + if (owner) { + if (owner === this._def || this._styleChildren.has(owner)) { + return; + } + this._styleChildren.add(owner); + } + const nonce = this._nonce; + for (let i = styles.length - 1; i >= 0; i--) { + const s = document.createElement("style"); + if (nonce) s.setAttribute("nonce", nonce); + s.textContent = styles[i]; + this.shadowRoot.prepend(s); + { + if (owner) { + if (owner.__hmrId) { + if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map(); + let entry = this._childStyles.get(owner.__hmrId); + if (!entry) { + this._childStyles.set(owner.__hmrId, entry = []); + } + entry.push(s); + } + } else { + (this._styles || (this._styles = [])).push(s); + } + } + } + } + /** + * Only called when shadowRoot is false + */ + _parseSlots() { + const slots = this._slots = {}; + let n; + while (n = this.firstChild) { + const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default"; + (slots[slotName] || (slots[slotName] = [])).push(n); + this.removeChild(n); + } + } + /** + * Only called when shadowRoot is false + */ + _renderSlots() { + const outlets = (this._teleportTarget || this).querySelectorAll("slot"); + const scopeId = this._instance.type.__scopeId; + for (let i = 0; i < outlets.length; i++) { + const o = outlets[i]; + const slotName = o.getAttribute("name") || "default"; + const content = this._slots[slotName]; + const parent = o.parentNode; + if (content) { + for (const n of content) { + if (scopeId && n.nodeType === 1) { + const id = scopeId + "-s"; + const walker = document.createTreeWalker(n, 1); + n.setAttribute(id, ""); + let child; + while (child = walker.nextNode()) { + child.setAttribute(id, ""); + } + } + parent.insertBefore(n, o); + } + } else { + while (o.firstChild) parent.insertBefore(o.firstChild, o); + } + parent.removeChild(o); + } + } + /** + * @internal + */ + _injectChildStyle(comp) { + this._applyStyles(comp.styles, comp); + } + /** + * @internal + */ + _removeChildStyle(comp) { + { + this._styleChildren.delete(comp); + if (this._childStyles && comp.__hmrId) { + const oldStyles = this._childStyles.get(comp.__hmrId); + if (oldStyles) { + oldStyles.forEach((s) => this._root.removeChild(s)); + oldStyles.length = 0; + } + } + } + } + } + function useHost(caller) { + const instance = getCurrentInstance(); + const el = instance && instance.ce; + if (el) { + return el; + } else { + if (!instance) { + warn( + `${caller || "useHost"} called without an active component instance.` + ); + } else { + warn( + `${caller || "useHost"} can only be used in components defined via defineCustomElement.` + ); + } + } + return null; + } + function useShadowRoot() { + const el = useHost("useShadowRoot") ; + return el && el.shadowRoot; + } + + function useCssModule(name = "$style") { + { + { + warn(`useCssModule() is not supported in the global build.`); + } + return EMPTY_OBJ; + } + } + + const positionMap = /* @__PURE__ */ new WeakMap(); + const newPositionMap = /* @__PURE__ */ new WeakMap(); + const moveCbKey = Symbol("_moveCb"); + const enterCbKey = Symbol("_enterCb"); + const decorate = (t) => { + delete t.props.mode; + return t; + }; + const TransitionGroupImpl = /* @__PURE__ */ decorate({ + name: "TransitionGroup", + props: /* @__PURE__ */ extend({}, TransitionPropsValidators, { + tag: String, + moveClass: String + }), + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevChildren; + let children; + onUpdated(() => { + if (!prevChildren.length) { + return; + } + const moveClass = props.moveClass || `${props.name || "v"}-move`; + if (!hasCSSTransform( + prevChildren[0].el, + instance.vnode.el, + moveClass + )) { + return; + } + prevChildren.forEach(callPendingCbs); + prevChildren.forEach(recordPosition); + const movedChildren = prevChildren.filter(applyTranslation); + forceReflow(); + movedChildren.forEach((c) => { + const el = c.el; + const style = el.style; + addTransitionClass(el, moveClass); + style.transform = style.webkitTransform = style.transitionDuration = ""; + const cb = el[moveCbKey] = (e) => { + if (e && e.target !== el) { + return; + } + if (!e || /transform$/.test(e.propertyName)) { + el.removeEventListener("transitionend", cb); + el[moveCbKey] = null; + removeTransitionClass(el, moveClass); + } + }; + el.addEventListener("transitionend", cb); + }); + }); + return () => { + const rawProps = toRaw(props); + const cssTransitionProps = resolveTransitionProps(rawProps); + let tag = rawProps.tag || Fragment; + prevChildren = []; + if (children) { + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.el && child.el instanceof Element) { + prevChildren.push(child); + setTransitionHooks( + child, + resolveTransitionHooks( + child, + cssTransitionProps, + state, + instance + ) + ); + positionMap.set( + child, + child.el.getBoundingClientRect() + ); + } + } + } + children = slots.default ? getTransitionRawChildren(slots.default()) : []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.key != null) { + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + } else if (child.type !== Text) { + warn(`<TransitionGroup> children must be keyed.`); + } + } + return createVNode(tag, null, children); + }; + } + }); + const TransitionGroup = TransitionGroupImpl; + function callPendingCbs(c) { + const el = c.el; + if (el[moveCbKey]) { + el[moveCbKey](); + } + if (el[enterCbKey]) { + el[enterCbKey](); + } + } + function recordPosition(c) { + newPositionMap.set(c, c.el.getBoundingClientRect()); + } + function applyTranslation(c) { + const oldPos = positionMap.get(c); + const newPos = newPositionMap.get(c); + const dx = oldPos.left - newPos.left; + const dy = oldPos.top - newPos.top; + if (dx || dy) { + const s = c.el.style; + s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; + s.transitionDuration = "0s"; + return c; + } + } + function hasCSSTransform(el, root, moveClass) { + const clone = el.cloneNode(); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.forEach((cls) => { + cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); + }); + } + moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); + clone.style.display = "none"; + const container = root.nodeType === 1 ? root : root.parentNode; + container.appendChild(clone); + const { hasTransform } = getTransitionInfo(clone); + container.removeChild(clone); + return hasTransform; + } + + const getModelAssigner = (vnode) => { + const fn = vnode.props["onUpdate:modelValue"] || false; + return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; + }; + function onCompositionStart(e) { + e.target.composing = true; + } + function onCompositionEnd(e) { + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } + } + const assignKey = Symbol("_assign"); + const vModelText = { + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); + } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) return; + const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy && value === oldValue) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } + }; + const vModelCheckbox = { + // #4096 array checkboxes need to be deep traversed + deep: true, + created(el, _, vnode) { + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + const modelValue = el._modelValue; + const elementValue = getValue(el); + const checked = el.checked; + const assign = el[assignKey]; + if (isArray(modelValue)) { + const index = looseIndexOf(modelValue, elementValue); + const found = index !== -1; + if (checked && !found) { + assign(modelValue.concat(elementValue)); + } else if (!checked && found) { + const filtered = [...modelValue]; + filtered.splice(index, 1); + assign(filtered); + } + } else if (isSet(modelValue)) { + const cloned = new Set(modelValue); + if (checked) { + cloned.add(elementValue); + } else { + cloned.delete(elementValue); + } + assign(cloned); + } else { + assign(getCheckboxValue(el, checked)); + } + }); + }, + // set initial checked on mount to wait for true-value/false-value + mounted: setChecked, + beforeUpdate(el, binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + setChecked(el, binding, vnode); + } + }; + function setChecked(el, { value, oldValue }, vnode) { + el._modelValue = value; + let checked; + if (isArray(value)) { + checked = looseIndexOf(value, vnode.props.value) > -1; + } else if (isSet(value)) { + checked = value.has(vnode.props.value); + } else { + if (value === oldValue) return; + checked = looseEqual(value, getCheckboxValue(el, true)); + } + if (el.checked !== checked) { + el.checked = checked; + } + } + const vModelRadio = { + created(el, { value }, vnode) { + el.checked = looseEqual(value, vnode.props.value); + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + el[assignKey](getValue(el)); + }); + }, + beforeUpdate(el, { value, oldValue }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (value !== oldValue) { + el.checked = looseEqual(value, vnode.props.value); + } + } + }; + const vModelSelect = { + // <select multiple> value need to be deep traversed + deep: true, + created(el, { value, modifiers: { number } }, vnode) { + const isSetModel = isSet(value); + addEventListener(el, "change", () => { + const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( + (o) => number ? looseToNumber(getValue(o)) : getValue(o) + ); + el[assignKey]( + el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] + ); + el._assigning = true; + nextTick(() => { + el._assigning = false; + }); + }); + el[assignKey] = getModelAssigner(vnode); + }, + // set value in mounted & updated because <select> relies on its children + // <option>s. + mounted(el, { value }) { + setSelected(el, value); + }, + beforeUpdate(el, _binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + }, + updated(el, { value }) { + if (!el._assigning) { + setSelected(el, value); + } + } + }; + function setSelected(el, value) { + const isMultiple = el.multiple; + const isArrayValue = isArray(value); + if (isMultiple && !isArrayValue && !isSet(value)) { + warn( + `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` + ); + return; + } + for (let i = 0, l = el.options.length; i < l; i++) { + const option = el.options[i]; + const optionValue = getValue(option); + if (isMultiple) { + if (isArrayValue) { + const optionType = typeof optionValue; + if (optionType === "string" || optionType === "number") { + option.selected = value.some((v) => String(v) === String(optionValue)); + } else { + option.selected = looseIndexOf(value, optionValue) > -1; + } + } else { + option.selected = value.has(optionValue); + } + } else if (looseEqual(getValue(option), value)) { + if (el.selectedIndex !== i) el.selectedIndex = i; + return; + } + } + if (!isMultiple && el.selectedIndex !== -1) { + el.selectedIndex = -1; + } + } + function getValue(el) { + return "_value" in el ? el._value : el.value; + } + function getCheckboxValue(el, checked) { + const key = checked ? "_trueValue" : "_falseValue"; + return key in el ? el[key] : checked; + } + const vModelDynamic = { + created(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "created"); + }, + mounted(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "mounted"); + }, + beforeUpdate(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); + }, + updated(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "updated"); + } + }; + function resolveDynamicModel(tagName, type) { + switch (tagName) { + case "SELECT": + return vModelSelect; + case "TEXTAREA": + return vModelText; + default: + switch (type) { + case "checkbox": + return vModelCheckbox; + case "radio": + return vModelRadio; + default: + return vModelText; + } + } + } + function callModelHook(el, binding, vnode, prevVNode, hook) { + const modelToUse = resolveDynamicModel( + el.tagName, + vnode.props && vnode.props.type + ); + const fn = modelToUse[hook]; + fn && fn(el, binding, vnode, prevVNode); + } + + const systemModifiers = ["ctrl", "shift", "alt", "meta"]; + const modifierGuards = { + stop: (e) => e.stopPropagation(), + prevent: (e) => e.preventDefault(), + self: (e) => e.target !== e.currentTarget, + ctrl: (e) => !e.ctrlKey, + shift: (e) => !e.shiftKey, + alt: (e) => !e.altKey, + meta: (e) => !e.metaKey, + left: (e) => "button" in e && e.button !== 0, + middle: (e) => "button" in e && e.button !== 1, + right: (e) => "button" in e && e.button !== 2, + exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) + }; + const withModifiers = (fn, modifiers) => { + const cache = fn._withMods || (fn._withMods = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { + for (let i = 0; i < modifiers.length; i++) { + const guard = modifierGuards[modifiers[i]]; + if (guard && guard(event, modifiers)) return; + } + return fn(event, ...args); + }); + }; + const keyNames = { + esc: "escape", + space: " ", + up: "arrow-up", + left: "arrow-left", + right: "arrow-right", + down: "arrow-down", + delete: "backspace" + }; + const withKeys = (fn, modifiers) => { + const cache = fn._withKeys || (fn._withKeys = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event) => { + if (!("key" in event)) { + return; + } + const eventKey = hyphenate(event.key); + if (modifiers.some( + (k) => k === eventKey || keyNames[k] === eventKey + )) { + return fn(event); + } + }); + }; + + const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); + let renderer; + let enabledHydration = false; + function ensureRenderer() { + return renderer || (renderer = createRenderer(rendererOptions)); + } + function ensureHydrationRenderer() { + renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions); + enabledHydration = true; + return renderer; + } + const render = (...args) => { + ensureRenderer().render(...args); + }; + const hydrate = (...args) => { + ensureHydrationRenderer().hydrate(...args); + }; + const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) return; + const component = app._component; + if (!isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; + } + if (container.nodeType === 1) { + container.textContent = ""; + } + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); + } + return proxy; + }; + return app; + }; + const createSSRApp = (...args) => { + const app = ensureHydrationRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (container) { + return mount(container, true, resolveRootNamespace(container)); + } + }; + return app; + }; + function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } + } + function injectNativeTagCheck(app) { + Object.defineProperty(app.config, "isNativeTag", { + value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + writable: false + }); + } + function injectCompilerOptionsCheck(app) { + if (isRuntimeOnly()) { + const isCustomElement = app.config.isCustomElement; + Object.defineProperty(app.config, "isCustomElement", { + get() { + return isCustomElement; + }, + set() { + warn( + `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` + ); + } + }); + const compilerOptions = app.config.compilerOptions; + const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. +- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. +- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader +- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; + Object.defineProperty(app.config, "compilerOptions", { + get() { + warn(msg); + return compilerOptions; + }, + set() { + warn(msg); + } + }); + } + } + function normalizeContainer(container) { + if (isString(container)) { + const res = document.querySelector(container); + if (!res) { + warn( + `Failed to mount app: mount target selector "${container}" returned null.` + ); + } + return res; + } + if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { + warn( + `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` + ); + } + return container; + } + const initDirectivesForSSR = NOOP; + + function initDev() { + { + { + console.info( + `You are running a development build of Vue. +Make sure to use the production build (*.prod.js) when deploying for production.` + ); + } + initCustomFormatter(); + } + } + + { + initDev(); + } + const compile = () => { + { + warn( + `Runtime compilation is not supported in this build of Vue.` + (` Use "vue.global.js" instead.` ) + ); + } + }; + + exports.BaseTransition = BaseTransition; + exports.BaseTransitionPropsValidators = BaseTransitionPropsValidators; + exports.Comment = Comment; + exports.DeprecationTypes = DeprecationTypes; + exports.EffectScope = EffectScope; + exports.ErrorCodes = ErrorCodes; + exports.ErrorTypeStrings = ErrorTypeStrings; + exports.Fragment = Fragment; + exports.KeepAlive = KeepAlive; + exports.ReactiveEffect = ReactiveEffect; + exports.Static = Static; + exports.Suspense = Suspense; + exports.Teleport = Teleport; + exports.Text = Text; + exports.TrackOpTypes = TrackOpTypes; + exports.Transition = Transition; + exports.TransitionGroup = TransitionGroup; + exports.TriggerOpTypes = TriggerOpTypes; + exports.VueElement = VueElement; + exports.assertNumber = assertNumber; + exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling; + exports.callWithErrorHandling = callWithErrorHandling; + exports.camelize = camelize; + exports.capitalize = capitalize; + exports.cloneVNode = cloneVNode; + exports.compatUtils = compatUtils; + exports.compile = compile; + exports.computed = computed; + exports.createApp = createApp; + exports.createBlock = createBlock; + exports.createCommentVNode = createCommentVNode; + exports.createElementBlock = createElementBlock; + exports.createElementVNode = createBaseVNode; + exports.createHydrationRenderer = createHydrationRenderer; + exports.createPropsRestProxy = createPropsRestProxy; + exports.createRenderer = createRenderer; + exports.createSSRApp = createSSRApp; + exports.createSlots = createSlots; + exports.createStaticVNode = createStaticVNode; + exports.createTextVNode = createTextVNode; + exports.createVNode = createVNode; + exports.customRef = customRef; + exports.defineAsyncComponent = defineAsyncComponent; + exports.defineComponent = defineComponent; + exports.defineCustomElement = defineCustomElement; + exports.defineEmits = defineEmits; + exports.defineExpose = defineExpose; + exports.defineModel = defineModel; + exports.defineOptions = defineOptions; + exports.defineProps = defineProps; + exports.defineSSRCustomElement = defineSSRCustomElement; + exports.defineSlots = defineSlots; + exports.devtools = devtools; + exports.effect = effect; + exports.effectScope = effectScope; + exports.getCurrentInstance = getCurrentInstance; + exports.getCurrentScope = getCurrentScope; + exports.getCurrentWatcher = getCurrentWatcher; + exports.getTransitionRawChildren = getTransitionRawChildren; + exports.guardReactiveProps = guardReactiveProps; + exports.h = h; + exports.handleError = handleError; + exports.hasInjectionContext = hasInjectionContext; + exports.hydrate = hydrate; + exports.hydrateOnIdle = hydrateOnIdle; + exports.hydrateOnInteraction = hydrateOnInteraction; + exports.hydrateOnMediaQuery = hydrateOnMediaQuery; + exports.hydrateOnVisible = hydrateOnVisible; + exports.initCustomFormatter = initCustomFormatter; + exports.initDirectivesForSSR = initDirectivesForSSR; + exports.inject = inject; + exports.isMemoSame = isMemoSame; + exports.isProxy = isProxy; + exports.isReactive = isReactive; + exports.isReadonly = isReadonly; + exports.isRef = isRef; + exports.isRuntimeOnly = isRuntimeOnly; + exports.isShallow = isShallow; + exports.isVNode = isVNode; + exports.markRaw = markRaw; + exports.mergeDefaults = mergeDefaults; + exports.mergeModels = mergeModels; + exports.mergeProps = mergeProps; + exports.nextTick = nextTick; + exports.normalizeClass = normalizeClass; + exports.normalizeProps = normalizeProps; + exports.normalizeStyle = normalizeStyle; + exports.onActivated = onActivated; + exports.onBeforeMount = onBeforeMount; + exports.onBeforeUnmount = onBeforeUnmount; + exports.onBeforeUpdate = onBeforeUpdate; + exports.onDeactivated = onDeactivated; + exports.onErrorCaptured = onErrorCaptured; + exports.onMounted = onMounted; + exports.onRenderTracked = onRenderTracked; + exports.onRenderTriggered = onRenderTriggered; + exports.onScopeDispose = onScopeDispose; + exports.onServerPrefetch = onServerPrefetch; + exports.onUnmounted = onUnmounted; + exports.onUpdated = onUpdated; + exports.onWatcherCleanup = onWatcherCleanup; + exports.openBlock = openBlock; + exports.popScopeId = popScopeId; + exports.provide = provide; + exports.proxyRefs = proxyRefs; + exports.pushScopeId = pushScopeId; + exports.queuePostFlushCb = queuePostFlushCb; + exports.reactive = reactive; + exports.readonly = readonly; + exports.ref = ref; + exports.registerRuntimeCompiler = registerRuntimeCompiler; + exports.render = render; + exports.renderList = renderList; + exports.renderSlot = renderSlot; + exports.resolveComponent = resolveComponent; + exports.resolveDirective = resolveDirective; + exports.resolveDynamicComponent = resolveDynamicComponent; + exports.resolveFilter = resolveFilter; + exports.resolveTransitionHooks = resolveTransitionHooks; + exports.setBlockTracking = setBlockTracking; + exports.setDevtoolsHook = setDevtoolsHook; + exports.setTransitionHooks = setTransitionHooks; + exports.shallowReactive = shallowReactive; + exports.shallowReadonly = shallowReadonly; + exports.shallowRef = shallowRef; + exports.ssrContextKey = ssrContextKey; + exports.ssrUtils = ssrUtils; + exports.stop = stop; + exports.toDisplayString = toDisplayString; + exports.toHandlerKey = toHandlerKey; + exports.toHandlers = toHandlers; + exports.toRaw = toRaw; + exports.toRef = toRef; + exports.toRefs = toRefs; + exports.toValue = toValue; + exports.transformVNodeArgs = transformVNodeArgs; + exports.triggerRef = triggerRef; + exports.unref = unref; + exports.useAttrs = useAttrs; + exports.useCssModule = useCssModule; + exports.useCssVars = useCssVars; + exports.useHost = useHost; + exports.useId = useId; + exports.useModel = useModel; + exports.useSSRContext = useSSRContext; + exports.useShadowRoot = useShadowRoot; + exports.useSlots = useSlots; + exports.useTemplateRef = useTemplateRef; + exports.useTransitionState = useTransitionState; + exports.vModelCheckbox = vModelCheckbox; + exports.vModelDynamic = vModelDynamic; + exports.vModelRadio = vModelRadio; + exports.vModelSelect = vModelSelect; + exports.vModelText = vModelText; + exports.vShow = vShow; + exports.version = version; + exports.warn = warn; + exports.watch = watch; + exports.watchEffect = watchEffect; + exports.watchPostEffect = watchPostEffect; + exports.watchSyncEffect = watchSyncEffect; + exports.withAsyncContext = withAsyncContext; + exports.withCtx = withCtx; + exports.withDefaults = withDefaults; + exports.withDirectives = withDirectives; + exports.withKeys = withKeys; + exports.withMemo = withMemo; + exports.withModifiers = withModifiers; + exports.withScopeId = withScopeId; + + return exports; + +})({}); diff --git a/vuetest/node_modules/vue/dist/vue.runtime.global.prod.js b/vuetest/node_modules/vue/dist/vue.runtime.global.prod.js new file mode 100644 index 0000000..ca71a3b --- /dev/null +++ b/vuetest/node_modules/vue/dist/vue.runtime.global.prod.js @@ -0,0 +1,5 @@ +/** +* vue v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/var Vue=function(e){"use strict";var t,n;let l,r,i,s,o,a,u,c,f,p,d,h;function g(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return e=>e in t}let m={},_=[],y=()=>{},b=()=>!1,S=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||97>e.charCodeAt(2)),C=e=>e.startsWith("onUpdate:"),x=Object.assign,w=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},E=Object.prototype.hasOwnProperty,k=(e,t)=>E.call(e,t),T=Array.isArray,A=e=>"[object Map]"===V(e),R=e=>"[object Set]"===V(e),O=e=>"[object Date]"===V(e),N=e=>"[object RegExp]"===V(e),P=e=>"function"==typeof e,M=e=>"string"==typeof e,I=e=>"symbol"==typeof e,L=e=>null!==e&&"object"==typeof e,D=e=>(L(e)||P(e))&&P(e.then)&&P(e.catch),F=Object.prototype.toString,V=e=>F.call(e),U=e=>V(e).slice(8,-1),j=e=>"[object Object]"===V(e),B=e=>M(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,$=g(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),H=e=>{let t=Object.create(null);return n=>t[n]||(t[n]=e(n))},W=/-(\w)/g,K=H(e=>e.replace(W,(e,t)=>t?t.toUpperCase():"")),z=/\B([A-Z])/g,q=H(e=>e.replace(z,"-$1").toLowerCase()),G=H(e=>e.charAt(0).toUpperCase()+e.slice(1)),J=H(e=>e?`on${G(e)}`:""),X=(e,t)=>!Object.is(e,t),Z=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Y=(e,t,n,l=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:l,value:n})},Q=e=>{let t=parseFloat(e);return isNaN(t)?e:t},ee=e=>{let t=M(e)?Number(e):NaN;return isNaN(t)?e:t},et=()=>l||(l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),en=g("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function el(e){if(T(e)){let t={};for(let n=0;n<e.length;n++){let l=e[n],r=M(l)?function(e){let t={};return e.replace(es,"").split(er).forEach(e=>{if(e){let n=e.split(ei);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}(l):el(l);if(r)for(let e in r)t[e]=r[e]}return t}if(M(e)||L(e))return e}let er=/;(?![^(]*\))/g,ei=/:([^]+)/,es=/\/\*[^]*?\*\//g;function eo(e){let t="";if(M(e))t=e;else if(T(e))for(let n=0;n<e.length;n++){let l=eo(e[n]);l&&(t+=l+" ")}else if(L(e))for(let n in e)e[n]&&(t+=n+" ");return t.trim()}let ea=g("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function eu(e,t){if(e===t)return!0;let n=O(e),l=O(t);if(n||l)return!!n&&!!l&&e.getTime()===t.getTime();if(n=I(e),l=I(t),n||l)return e===t;if(n=T(e),l=T(t),n||l)return!!n&&!!l&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let l=0;n&&l<e.length;l++)n=eu(e[l],t[l]);return n}(e,t);if(n=L(e),l=L(t),n||l){if(!n||!l||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){let l=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(l&&!r||!l&&r||!eu(e[n],t[n]))return!1}}return String(e)===String(t)}function ec(e,t){return e.findIndex(e=>eu(e,t))}let ef=e=>!!(e&&!0===e.__v_isRef),ep=e=>M(e)?e:null==e?"":T(e)||L(e)&&(e.toString===F||!P(e.toString))?ef(e)?ep(e.value):JSON.stringify(e,ed,2):String(e),ed=(e,t)=>ef(t)?ed(e,t.value):A(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],l)=>(e[eh(t,l)+" =>"]=n,e),{})}:R(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>eh(e))}:I(t)?eh(t):!L(t)||T(t)||j(t)?t:String(t),eh=(e,t="")=>{var n;return I(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};class eg{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=r,!e&&r&&(this.index=(r.scopes||(r.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let t=r;try{return r=this,e()}finally{r=t}}}on(){r=this}off(){r=this.parent}stop(e){if(this._active){let t,n;for(t=0,this._active=!1,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,this.effects.length=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}let ev=new WeakSet;class em{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,r&&r.active&&r.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,ev.has(this)&&(ev.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||ey(this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,eO(this),eS(this);let e=i,t=ek;i=this,ek=!0;try{return this.fn()}finally{eC(this),i=e,ek=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)eE(e);this.deps=this.depsTail=void 0,eO(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?ev.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ex(this)&&this.run()}get dirty(){return ex(this)}}let e_=0;function ey(e,t=!1){if(e.flags|=8,t){e.next=o,o=e;return}e.next=s,s=e}function eb(){let e;if(!(--e_>0)){if(o){let e=o;for(o=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}for(;s;){let t=s;for(s=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}}function eS(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function eC(e){let t;let n=e.depsTail,l=n;for(;l;){let e=l.prevDep;-1===l.version?(l===n&&(n=e),eE(l),function(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}(l)):t=l,l.dep.activeLink=l.prevActiveLink,l.prevActiveLink=void 0,l=e}e.deps=t,e.depsTail=n}function ex(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ew(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ew(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===eN))return;e.globalVersion=eN;let t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!ex(e)){e.flags&=-3;return}let n=i,l=ek;i=e,ek=!0;try{eS(e);let n=e.fn(e._value);(0===t.version||X(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{i=n,ek=l,eC(e),e.flags&=-3}}function eE(e,t=!1){let{dep:n,prevSub:l,nextSub:r}=e;if(l&&(l.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=l,e.nextSub=void 0),n.subs===e&&(n.subs=l,!l&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)eE(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}let ek=!0,eT=[];function eA(){eT.push(ek),ek=!1}function eR(){let e=eT.pop();ek=void 0===e||e}function eO(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=i;i=void 0;try{t()}finally{i=e}}}let eN=0;class eP{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class eM{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!i||!ek||i===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==i)t=this.activeLink=new eP(i,this),i.deps?(t.prevDep=i.depsTail,i.depsTail.nextDep=t,i.depsTail=t):i.deps=i.depsTail=t,function e(t){if(t.dep.sc++,4&t.sub.flags){let n=t.dep.computed;if(n&&!t.dep.subs){n.flags|=20;for(let t=n.deps;t;t=t.nextDep)e(t)}let l=t.dep.subs;l!==t&&(t.prevSub=l,l&&(l.nextSub=t)),t.dep.subs=t}}(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=i.depsTail,t.nextDep=void 0,i.depsTail.nextDep=t,i.depsTail=t,i.deps===t&&(i.deps=e)}return t}trigger(e){this.version++,eN++,this.notify(e)}notify(e){e_++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{eb()}}}let eI=new WeakMap,eL=Symbol(""),eD=Symbol(""),eF=Symbol("");function eV(e,t,n){if(ek&&i){let t=eI.get(e);t||eI.set(e,t=new Map);let l=t.get(n);l||(t.set(n,l=new eM),l.map=t,l.key=n),l.track()}}function eU(e,t,n,l,r,i){let s=eI.get(e);if(!s){eN++;return}let o=e=>{e&&e.trigger()};if(e_++,"clear"===t)s.forEach(o);else{let r=T(e),i=r&&B(n);if(r&&"length"===n){let e=Number(l);s.forEach((t,n)=>{("length"===n||n===eF||!I(n)&&n>=e)&&o(t)})}else switch((void 0!==n||s.has(void 0))&&o(s.get(n)),i&&o(s.get(eF)),t){case"add":r?i&&o(s.get("length")):(o(s.get(eL)),A(e)&&o(s.get(eD)));break;case"delete":!r&&(o(s.get(eL)),A(e)&&o(s.get(eD)));break;case"set":A(e)&&o(s.get(eL))}}eb()}function ej(e){let t=tg(e);return t===e?t:(eV(t,"iterate",eF),td(e)?t:t.map(tm))}function eB(e){return eV(e=tg(e),"iterate",eF),e}let e$={__proto__:null,[Symbol.iterator](){return eH(this,Symbol.iterator,tm)},concat(...e){return ej(this).concat(...e.map(e=>T(e)?ej(e):e))},entries(){return eH(this,"entries",e=>(e[1]=tm(e[1]),e))},every(e,t){return eK(this,"every",e,t,void 0,arguments)},filter(e,t){return eK(this,"filter",e,t,e=>e.map(tm),arguments)},find(e,t){return eK(this,"find",e,t,tm,arguments)},findIndex(e,t){return eK(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return eK(this,"findLast",e,t,tm,arguments)},findLastIndex(e,t){return eK(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return eK(this,"forEach",e,t,void 0,arguments)},includes(...e){return eq(this,"includes",e)},indexOf(...e){return eq(this,"indexOf",e)},join(e){return ej(this).join(e)},lastIndexOf(...e){return eq(this,"lastIndexOf",e)},map(e,t){return eK(this,"map",e,t,void 0,arguments)},pop(){return eG(this,"pop")},push(...e){return eG(this,"push",e)},reduce(e,...t){return ez(this,"reduce",e,t)},reduceRight(e,...t){return ez(this,"reduceRight",e,t)},shift(){return eG(this,"shift")},some(e,t){return eK(this,"some",e,t,void 0,arguments)},splice(...e){return eG(this,"splice",e)},toReversed(){return ej(this).toReversed()},toSorted(e){return ej(this).toSorted(e)},toSpliced(...e){return ej(this).toSpliced(...e)},unshift(...e){return eG(this,"unshift",e)},values(){return eH(this,"values",tm)}};function eH(e,t,n){let l=eB(e),r=l[t]();return l===e||td(e)||(r._next=r.next,r.next=()=>{let e=r._next();return e.value&&(e.value=n(e.value)),e}),r}let eW=Array.prototype;function eK(e,t,n,l,r,i){let s=eB(e),o=s!==e&&!td(e),a=s[t];if(a!==eW[t]){let t=a.apply(e,i);return o?tm(t):t}let u=n;s!==e&&(o?u=function(t,l){return n.call(this,tm(t),l,e)}:n.length>2&&(u=function(t,l){return n.call(this,t,l,e)}));let c=a.call(s,u,l);return o&&r?r(c):c}function ez(e,t,n,l){let r=eB(e),i=n;return r!==e&&(td(e)?n.length>3&&(i=function(t,l,r){return n.call(this,t,l,r,e)}):i=function(t,l,r){return n.call(this,t,tm(l),r,e)}),r[t](i,...l)}function eq(e,t,n){let l=tg(e);eV(l,"iterate",eF);let r=l[t](...n);return(-1===r||!1===r)&&th(n[0])?(n[0]=tg(n[0]),l[t](...n)):r}function eG(e,t,n=[]){eA(),e_++;let l=tg(e)[t].apply(e,n);return eb(),eR(),l}let eJ=g("__proto__,__v_isRef,__isVue"),eX=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(I));function eZ(e){I(e)||(e=String(e));let t=tg(this);return eV(t,"has",e),t.hasOwnProperty(e)}class eY{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if("__v_skip"===t)return e.__v_skip;let l=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!l;if("__v_isReadonly"===t)return l;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(l?r?ts:ti:r?tr:tl).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let i=T(e);if(!l){let e;if(i&&(e=e$[t]))return e;if("hasOwnProperty"===t)return eZ}let s=Reflect.get(e,t,ty(e)?e:n);return(I(t)?eX.has(t):eJ(t))?s:(l||eV(e,"get",t),r)?s:ty(s)?i&&B(t)?s:s.value:L(s)?l?tu(s):to(s):s}}class eQ extends eY{constructor(e=!1){super(!1,e)}set(e,t,n,l){let r=e[t];if(!this._isShallow){let t=tp(r);if(td(n)||tp(n)||(r=tg(r),n=tg(n)),!T(e)&&ty(r)&&!ty(n))return!t&&(r.value=n,!0)}let i=T(e)&&B(t)?Number(t)<e.length:k(e,t),s=Reflect.set(e,t,n,ty(e)?e:l);return e===tg(l)&&(i?X(n,r)&&eU(e,"set",t,n):eU(e,"add",t,n)),s}deleteProperty(e,t){let n=k(e,t);e[t];let l=Reflect.deleteProperty(e,t);return l&&n&&eU(e,"delete",t,void 0),l}has(e,t){let n=Reflect.has(e,t);return I(t)&&eX.has(t)||eV(e,"has",t),n}ownKeys(e){return eV(e,"iterate",T(e)?"length":eL),Reflect.ownKeys(e)}}class e0 extends eY{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}let e1=new eQ,e2=new e0,e6=new eQ(!0),e4=new e0(!0),e8=e=>e,e3=e=>Reflect.getPrototypeOf(e);function e5(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function e9(e,t){let n=function(e,t){let n={get(n){let l=this.__v_raw,r=tg(l),i=tg(n);e||(X(n,i)&&eV(r,"get",n),eV(r,"get",i));let{has:s}=e3(r),o=t?e8:e?t_:tm;return s.call(r,n)?o(l.get(n)):s.call(r,i)?o(l.get(i)):void(l!==r&&l.get(n))},get size(){let t=this.__v_raw;return e||eV(tg(t),"iterate",eL),Reflect.get(t,"size",t)},has(t){let n=this.__v_raw,l=tg(n),r=tg(t);return e||(X(t,r)&&eV(l,"has",t),eV(l,"has",r)),t===r?n.has(t):n.has(t)||n.has(r)},forEach(n,l){let r=this,i=r.__v_raw,s=tg(i),o=t?e8:e?t_:tm;return e||eV(s,"iterate",eL),i.forEach((e,t)=>n.call(l,o(e),o(t),r))}};return x(n,e?{add:e5("add"),set:e5("set"),delete:e5("delete"),clear:e5("clear")}:{add(e){t||td(e)||tp(e)||(e=tg(e));let n=tg(this);return e3(n).has.call(n,e)||(n.add(e),eU(n,"add",e,e)),this},set(e,n){t||td(n)||tp(n)||(n=tg(n));let l=tg(this),{has:r,get:i}=e3(l),s=r.call(l,e);s||(e=tg(e),s=r.call(l,e));let o=i.call(l,e);return l.set(e,n),s?X(n,o)&&eU(l,"set",e,n):eU(l,"add",e,n),this},delete(e){let t=tg(this),{has:n,get:l}=e3(t),r=n.call(t,e);r||(e=tg(e),r=n.call(t,e)),l&&l.call(t,e);let i=t.delete(e);return r&&eU(t,"delete",e,void 0),i},clear(){let e=tg(this),t=0!==e.size,n=e.clear();return t&&eU(e,"clear",void 0,void 0),n}}),["keys","values","entries",Symbol.iterator].forEach(l=>{n[l]=function(...n){let r=this.__v_raw,i=tg(r),s=A(i),o="entries"===l||l===Symbol.iterator&&s,a=r[l](...n),u=t?e8:e?t_:tm;return e||eV(i,"iterate","keys"===l&&s?eD:eL),{next(){let{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:o?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}),n}(e,t);return(t,l,r)=>"__v_isReactive"===l?!e:"__v_isReadonly"===l?e:"__v_raw"===l?t:Reflect.get(k(n,l)&&l in t?n:t,l,r)}let e7={get:e9(!1,!1)},te={get:e9(!1,!0)},tt={get:e9(!0,!1)},tn={get:e9(!0,!0)},tl=new WeakMap,tr=new WeakMap,ti=new WeakMap,ts=new WeakMap;function to(e){return tp(e)?e:tc(e,!1,e1,e7,tl)}function ta(e){return tc(e,!1,e6,te,tr)}function tu(e){return tc(e,!0,e2,tt,ti)}function tc(e,t,n,l,r){if(!L(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let i=r.get(e);if(i)return i;let s=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(U(e));if(0===s)return e;let o=new Proxy(e,2===s?l:n);return r.set(e,o),o}function tf(e){return tp(e)?tf(e.__v_raw):!!(e&&e.__v_isReactive)}function tp(e){return!!(e&&e.__v_isReadonly)}function td(e){return!!(e&&e.__v_isShallow)}function th(e){return!!e&&!!e.__v_raw}function tg(e){let t=e&&e.__v_raw;return t?tg(t):e}function tv(e){return!k(e,"__v_skip")&&Object.isExtensible(e)&&Y(e,"__v_skip",!0),e}let tm=e=>L(e)?to(e):e,t_=e=>L(e)?tu(e):e;function ty(e){return!!e&&!0===e.__v_isRef}function tb(e){return tC(e,!1)}function tS(e){return tC(e,!0)}function tC(e,t){return ty(e)?e:new tx(e,t)}class tx{constructor(e,t){this.dep=new eM,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:tg(e),this._value=t?e:tm(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||td(e)||tp(e);X(e=n?e:tg(e),t)&&(this._rawValue=e,this._value=n?e:tm(e),this.dep.trigger())}}function tw(e){return ty(e)?e.value:e}let tE={get:(e,t,n)=>"__v_raw"===t?e:tw(Reflect.get(e,t,n)),set:(e,t,n,l)=>{let r=e[t];return ty(r)&&!ty(n)?(r.value=n,!0):Reflect.set(e,t,n,l)}};function tk(e){return tf(e)?e:new Proxy(e,tE)}class tT{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new eM,{get:n,set:l}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=l}get value(){return this._value=this._get()}set value(e){this._set(e)}}function tA(e){return new tT(e)}class tR{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){let n=eI.get(e);return n&&n.get(t)}(tg(this._object),this._key)}}class tO{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function tN(e,t,n){let l=e[t];return ty(l)?l:new tR(e,t,n)}class tP{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new eM(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=eN-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags)&&i!==this)return ey(this,!0),!0}get value(){let e=this.dep.track();return ew(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}let tM={},tI=new WeakMap;function tL(e,t=!1,n=d){if(n){let t=tI.get(n);t||tI.set(n,t=[]),t.push(e)}}function tD(e,t=1/0,n){if(t<=0||!L(e)||e.__v_skip||(n=n||new Set).has(e))return e;if(n.add(e),t--,ty(e))tD(e.value,t,n);else if(T(e))for(let l=0;l<e.length;l++)tD(e[l],t,n);else if(R(e)||A(e))e.forEach(e=>{tD(e,t,n)});else if(j(e)){for(let l in e)tD(e[l],t,n);for(let l of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,l)&&tD(e[l],t,n)}return e}function tF(e,t,n,l){try{return l?e(...l):e()}catch(e){tU(e,t,n)}}function tV(e,t,n,l){if(P(e)){let r=tF(e,t,n,l);return r&&D(r)&&r.catch(e=>{tU(e,t,n)}),r}if(T(e)){let r=[];for(let i=0;i<e.length;i++)r.push(tV(e[i],t,n,l));return r}}function tU(e,t,n,l=!0){t&&t.vnode;let{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||m;if(t){let l=t.parent,i=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){let t=l.ec;if(t){for(let n=0;n<t.length;n++)if(!1===t[n](e,i,s))return}l=l.parent}if(r){eA(),tF(r,null,10,[e,i,s]),eR();return}}!function(e,t,n,l=!0,r=!1){if(r)throw e;console.error(e)}(e,0,0,l,i)}let tj=[],tB=-1,t$=[],tH=null,tW=0,tK=Promise.resolve(),tz=null;function tq(e){let t=tz||tK;return e?t.then(this?e.bind(this):e):t}function tG(e){if(!(1&e.flags)){let t=tQ(e),n=tj[tj.length-1];!n||!(2&e.flags)&&t>=tQ(n)?tj.push(e):tj.splice(function(e){let t=tB+1,n=tj.length;for(;t<n;){let l=t+n>>>1,r=tj[l],i=tQ(r);i<e||i===e&&2&r.flags?t=l+1:n=l}return t}(t),0,e),e.flags|=1,tJ()}}function tJ(){tz||(tz=tK.then(function e(t){try{for(tB=0;tB<tj.length;tB++){let e=tj[tB];!e||8&e.flags||(4&e.flags&&(e.flags&=-2),tF(e,e.i,e.i?15:14),4&e.flags||(e.flags&=-2))}}finally{for(;tB<tj.length;tB++){let e=tj[tB];e&&(e.flags&=-2)}tB=-1,tj.length=0,tY(),tz=null,(tj.length||t$.length)&&e()}}))}function tX(e){T(e)?t$.push(...e):tH&&-1===e.id?tH.splice(tW+1,0,e):1&e.flags||(t$.push(e),e.flags|=1),tJ()}function tZ(e,t,n=tB+1){for(;n<tj.length;n++){let t=tj[n];if(t&&2&t.flags){if(e&&t.id!==e.uid)continue;tj.splice(n,1),n--,4&t.flags&&(t.flags&=-2),t(),4&t.flags||(t.flags&=-2)}}}function tY(e){if(t$.length){let e=[...new Set(t$)].sort((e,t)=>tQ(e)-tQ(t));if(t$.length=0,tH){tH.push(...e);return}for(tW=0,tH=e;tW<tH.length;tW++){let e=tH[tW];4&e.flags&&(e.flags&=-2),8&e.flags||e(),e.flags&=-2}tH=null,tW=0}}let tQ=e=>null==e.id?2&e.flags?-1:1/0:e.id,t0=null,t1=null;function t2(e){let t=t0;return t0=e,t1=e&&e.type.__scopeId||null,t}function t6(e,t=t0,n){if(!t||e._n)return e;let l=(...n)=>{let r;l._d&&rs(-1);let i=t2(t);try{r=e(...n)}finally{t2(i),l._d&&rs(1)}return r};return l._n=!0,l._c=!0,l._d=!0,l}function t4(e,t,n,l){let r=e.dirs,i=t&&t.dirs;for(let s=0;s<r.length;s++){let o=r[s];i&&(o.oldValue=i[s].value);let a=o.dir[l];a&&(eA(),tV(a,n,8,[e.el,o,e,t]),eR())}}let t8=Symbol("_vte"),t3=e=>e.__isTeleport,t5=e=>e&&(e.disabled||""===e.disabled),t9=e=>e&&(e.defer||""===e.defer),t7=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,ne=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,nt=(e,t)=>{let n=e&&e.to;return M(n)?t?t(n):null:n},nn={name:"Teleport",__isTeleport:!0,process(e,t,n,l,r,i,s,o,a,u){let{mc:c,pc:f,pbc:p,o:{insert:d,querySelector:h,createText:g,createComment:m}}=u,_=t5(t.props),{shapeFlag:y,children:b,dynamicChildren:S}=t;if(null==e){let e=t.el=g(""),u=t.anchor=g("");d(e,n,l),d(u,n,l);let f=(e,t)=>{16&y&&(r&&r.isCE&&(r.ce._teleportTarget=e),c(b,e,t,r,i,s,o,a))},p=()=>{let e=t.target=nt(t.props,h),n=ni(e,t,g,d);e&&("svg"!==s&&t7(e)?s="svg":"mathml"!==s&&ne(e)&&(s="mathml"),_||(f(e,n),nr(t,!1)))};_&&(f(n,u),nr(t,!0)),t9(t.props)?lM(()=>{p(),t.el.__isMounted=!0},i):p()}else{if(t9(t.props)&&!e.el.__isMounted){lM(()=>{nn.process(e,t,n,l,r,i,s,o,a,u),delete e.el.__isMounted},i);return}t.el=e.el,t.targetStart=e.targetStart;let c=t.anchor=e.anchor,d=t.target=e.target,g=t.targetAnchor=e.targetAnchor,m=t5(e.props),y=m?n:d;if("svg"===s||t7(d)?s="svg":("mathml"===s||ne(d))&&(s="mathml"),S?(p(e.dynamicChildren,S,y,r,i,s,o),lU(e,t,!0)):a||f(e,t,y,m?c:g,r,i,s,o,!1),_)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):nl(t,n,c,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=nt(t.props,h);e&&nl(t,e,null,u,0)}else m&&nl(t,d,g,u,1);nr(t,_)}},remove(e,t,n,{um:l,o:{remove:r}},i){let{shapeFlag:s,children:o,anchor:a,targetStart:u,targetAnchor:c,target:f,props:p}=e;if(f&&(r(u),r(c)),i&&r(a),16&s){let e=i||!t5(p);for(let r=0;r<o.length;r++){let i=o[r];l(i,t,n,e,!!i.dynamicChildren)}}},move:nl,hydrate:function(e,t,n,l,r,i,{o:{nextSibling:s,parentNode:o,querySelector:a,insert:u,createText:c}},f){let p=t.target=nt(t.props,a);if(p){let a=t5(t.props),d=p._lpa||p.firstChild;if(16&t.shapeFlag){if(a)t.anchor=f(s(e),t,o(e),n,l,r,i),t.targetStart=d,t.targetAnchor=d&&s(d);else{t.anchor=s(e);let o=d;for(;o;){if(o&&8===o.nodeType){if("teleport start anchor"===o.data)t.targetStart=o;else if("teleport anchor"===o.data){t.targetAnchor=o,p._lpa=t.targetAnchor&&s(t.targetAnchor);break}}o=s(o)}t.targetAnchor||ni(p,t,c,u),f(d&&s(d),t,p,n,l,r,i)}}nr(t,a)}return t.anchor&&s(t.anchor)}};function nl(e,t,n,{o:{insert:l},m:r},i=2){0===i&&l(e.targetAnchor,t,n);let{el:s,anchor:o,shapeFlag:a,children:u,props:c}=e,f=2===i;if(f&&l(s,t,n),(!f||t5(c))&&16&a)for(let e=0;e<u.length;e++)r(u[e],t,n,2);f&&l(o,t,n)}function nr(e,t){let n=e.ctx;if(n&&n.ut){let l,r;for(t?(l=e.el,r=e.anchor):(l=e.targetStart,r=e.targetAnchor);l&&l!==r;)1===l.nodeType&&l.setAttribute("data-v-owner",n.uid),l=l.nextSibling;n.ut()}}function ni(e,t,n,l){let r=t.targetStart=n(""),i=t.targetAnchor=n("");return r[t8]=i,e&&(l(r,e),l(i,e)),i}let ns=Symbol("_leaveCb"),no=Symbol("_enterCb");function na(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return nq(()=>{e.isMounted=!0}),nX(()=>{e.isUnmounting=!0}),e}let nu=[Function,Array],nc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:nu,onEnter:nu,onAfterEnter:nu,onEnterCancelled:nu,onBeforeLeave:nu,onLeave:nu,onAfterLeave:nu,onLeaveCancelled:nu,onBeforeAppear:nu,onAppear:nu,onAfterAppear:nu,onAppearCancelled:nu},nf=e=>{let t=e.subTree;return t.component?nf(t.component):t};function np(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==l7){t=n;break}}return t}let nd={name:"BaseTransition",props:nc,setup(e,{slots:t}){let n=rk(),l=na();return()=>{let r=t.default&&ny(t.default(),!0);if(!r||!r.length)return;let i=np(r),s=tg(e),{mode:o}=s;if(l.isLeaving)return nv(i);let a=nm(i);if(!a)return nv(i);let u=ng(a,s,l,n,e=>u=e);a.type!==l7&&n_(a,u);let c=n.subTree&&nm(n.subTree);if(c&&c.type!==l7&&!rc(a,c)&&nf(n).type!==l7){let e=ng(c,s,l,n);if(n_(c,e),"out-in"===o&&a.type!==l7)return l.isLeaving=!0,e.afterLeave=()=>{l.isLeaving=!1,8&n.job.flags||n.update(),delete e.afterLeave,c=void 0},nv(i);"in-out"===o&&a.type!==l7?e.delayLeave=(e,t,n)=>{nh(l,c)[String(c.key)]=c,e[ns]=()=>{t(),e[ns]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{n(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function nh(e,t){let{leavingVNodes:n}=e,l=n.get(t.type);return l||(l=Object.create(null),n.set(t.type,l)),l}function ng(e,t,n,l,r){let{appear:i,mode:s,persisted:o=!1,onBeforeEnter:a,onEnter:u,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:p,onLeave:d,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:m,onAppear:_,onAfterAppear:y,onAppearCancelled:b}=t,S=String(e.key),C=nh(n,e),x=(e,t)=>{e&&tV(e,l,9,t)},w=(e,t)=>{let n=t[1];x(e,t),T(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},E={mode:s,persisted:o,beforeEnter(t){let l=a;if(!n.isMounted){if(!i)return;l=m||a}t[ns]&&t[ns](!0);let r=C[S];r&&rc(e,r)&&r.el[ns]&&r.el[ns](),x(l,[t])},enter(e){let t=u,l=c,r=f;if(!n.isMounted){if(!i)return;t=_||u,l=y||c,r=b||f}let s=!1,o=e[no]=t=>{s||(s=!0,t?x(r,[e]):x(l,[e]),E.delayedLeave&&E.delayedLeave(),e[no]=void 0)};t?w(t,[e,o]):o()},leave(t,l){let r=String(e.key);if(t[no]&&t[no](!0),n.isUnmounting)return l();x(p,[t]);let i=!1,s=t[ns]=n=>{i||(i=!0,l(),n?x(g,[t]):x(h,[t]),t[ns]=void 0,C[r]!==e||delete C[r])};C[r]=e,d?w(d,[t,s]):s()},clone(e){let i=ng(e,t,n,l,r);return r&&r(i),i}};return E}function nv(e){if(nF(e))return(e=rv(e)).children=null,e}function nm(e){if(!nF(e))return t3(e.type)&&e.children?np(e.children):e;let{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&P(n.default))return n.default()}}function n_(e,t){6&e.shapeFlag&&e.component?(e.transition=t,n_(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ny(e,t=!1,n){let l=[],r=0;for(let i=0;i<e.length;i++){let s=e[i],o=null==n?s.key:String(n)+String(null!=s.key?s.key:i);s.type===l5?(128&s.patchFlag&&r++,l=l.concat(ny(s.children,t,o))):(t||s.type!==l7)&&l.push(null!=o?rv(s,{key:o}):s)}if(r>1)for(let e=0;e<l.length;e++)l[e].patchFlag=-2;return l}function nb(e,t){return P(e)?x({name:e.name},t,{setup:e}):e}function nS(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function nC(e,t,n,l,r=!1){if(T(e)){e.forEach((e,i)=>nC(e,t&&(T(t)?t[i]:t),n,l,r));return}if(nL(l)&&!r){512&l.shapeFlag&&l.type.__asyncResolved&&l.component.subTree.component&&nC(e,t,n,l.component.subTree);return}let i=4&l.shapeFlag?rL(l.component):l.el,s=r?null:i,{i:o,r:a}=e,u=t&&t.r,c=o.refs===m?o.refs={}:o.refs,f=o.setupState,p=tg(f),d=f===m?()=>!1:e=>k(p,e);if(null!=u&&u!==a&&(M(u)?(c[u]=null,d(u)&&(f[u]=null)):ty(u)&&(u.value=null)),P(a))tF(a,o,12,[s,c]);else{let t=M(a),l=ty(a);if(t||l){let o=()=>{if(e.f){let n=t?d(a)?f[a]:c[a]:a.value;r?T(n)&&w(n,i):T(n)?n.includes(i)||n.push(i):t?(c[a]=[i],d(a)&&(f[a]=c[a])):(a.value=[i],e.k&&(c[e.k]=a.value))}else t?(c[a]=s,d(a)&&(f[a]=s)):l&&(a.value=s,e.k&&(c[e.k]=s))};s?(o.id=-1,lM(o,n)):o()}}}let nx=!1,nw=()=>{nx||(console.error("Hydration completed but contains mismatches."),nx=!0)},nE=e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName,nk=e=>e.namespaceURI.includes("MathML"),nT=e=>{if(1===e.nodeType){if(nE(e))return"svg";if(nk(e))return"mathml"}},nA=e=>8===e.nodeType;function nR(e){let{mt:t,p:n,o:{patchProp:l,createText:r,nextSibling:i,parentNode:s,remove:o,insert:a,createComment:u}}=e,c=(n,l,o,u,y,b=!1)=>{b=b||!!l.dynamicChildren;let S=nA(n)&&"["===n.data,C=()=>h(n,l,o,u,y,S),{type:x,ref:w,shapeFlag:E,patchFlag:k}=l,T=n.nodeType;l.el=n,-2===k&&(b=!1,l.dynamicChildren=null);let A=null;switch(x){case l9:3!==T?""===l.children?(a(l.el=r(""),s(n),n),A=n):A=C():(n.data!==l.children&&(nw(),n.data=l.children),A=i(n));break;case l7:_(n)?(A=i(n),m(l.el=n.content.firstChild,n,o)):A=8!==T||S?C():i(n);break;case re:if(S&&(T=(n=i(n)).nodeType),1===T||3===T){A=n;let e=!l.children.length;for(let t=0;t<l.staticCount;t++)e&&(l.children+=1===A.nodeType?A.outerHTML:A.data),t===l.staticCount-1&&(l.anchor=A),A=i(A);return S?i(A):A}C();break;case l5:A=S?d(n,l,o,u,y,b):C();break;default:if(1&E)A=1===T&&l.type.toLowerCase()===n.tagName.toLowerCase()||_(n)?f(n,l,o,u,y,b):C();else if(6&E){l.slotScopeIds=y;let e=s(n);if(A=S?g(n):nA(n)&&"teleport start"===n.data?g(n,n.data,"teleport end"):i(n),t(l,e,null,o,u,nT(e),b),nL(l)&&!l.type.__asyncResolved){let t;S?(t=rh(l5)).anchor=A?A.previousSibling:e.lastChild:t=3===n.nodeType?rm(""):rh("div"),t.el=n,l.component.subTree=t}}else 64&E?A=8!==T?C():l.type.hydrate(n,l,o,u,y,b,e,p):128&E&&(A=l.type.hydrate(n,l,o,u,nT(s(n)),y,b,e,c))}return null!=w&&nC(w,null,u,l),A},f=(e,t,n,r,i,s)=>{s=s||!!t.dynamicChildren;let{type:a,props:u,patchFlag:c,shapeFlag:f,dirs:d,transition:h}=t,g="input"===a||"option"===a;if(g||-1!==c){let a;d&&t4(t,null,n,"created");let y=!1;if(_(e)){y=lV(null,h)&&n&&n.vnode.props&&n.vnode.props.appear;let l=e.content.firstChild;y&&h.beforeEnter(l),m(l,e,n),t.el=e=l}if(16&f&&!(u&&(u.innerHTML||u.textContent))){let l=p(e.firstChild,t,e,n,r,i,s);for(;l;){nP(e,1)||nw();let t=l;l=l.nextSibling,o(t)}}else if(8&f){let n=t.children;"\n"===n[0]&&("PRE"===e.tagName||"TEXTAREA"===e.tagName)&&(n=n.slice(1)),e.textContent!==n&&(nP(e,0)||nw(),e.textContent=t.children)}if(u){if(g||!s||48&c){let t=e.tagName.includes("-");for(let r in u)(g&&(r.endsWith("value")||"indeterminate"===r)||S(r)&&!$(r)||"."===r[0]||t)&&l(e,r,null,u[r],void 0,n)}else if(u.onClick)l(e,"onClick",null,u.onClick,void 0,n);else if(4&c&&tf(u.style))for(let e in u.style)u.style[e]}(a=u&&u.onVnodeBeforeMount)&&rC(a,n,t),d&&t4(t,null,n,"beforeMount"),((a=u&&u.onVnodeMounted)||d||y)&&l8(()=>{a&&rC(a,n,t),y&&h.enter(e),d&&t4(t,null,n,"mounted")},r)}return e.nextSibling},p=(e,t,l,s,o,u,f)=>{f=f||!!t.dynamicChildren;let p=t.children,d=p.length;for(let t=0;t<d;t++){let h=f?p[t]:p[t]=r_(p[t]),g=h.type===l9;e?(g&&!f&&t+1<d&&r_(p[t+1]).type===l9&&(a(r(e.data.slice(h.children.length)),l,i(e)),e.data=h.children),e=c(e,h,s,o,u,f)):g&&!h.children?a(h.el=r(""),l):(nP(l,1)||nw(),n(null,h,l,null,s,o,nT(l),u))}return e},d=(e,t,n,l,r,o)=>{let{slotScopeIds:c}=t;c&&(r=r?r.concat(c):c);let f=s(e),d=p(i(e),t,f,n,l,r,o);return d&&nA(d)&&"]"===d.data?i(t.anchor=d):(nw(),a(t.anchor=u("]"),f,d),d)},h=(e,t,l,r,a,u)=>{if(nP(e.parentElement,1)||nw(),t.el=null,u){let t=g(e);for(;;){let n=i(e);if(n&&n!==t)o(n);else break}}let c=i(e),f=s(e);return o(e),n(null,t,f,c,l,r,nT(f),a),l&&(l.vnode.el=t.el,lQ(l,t.el)),c},g=(e,t="[",n="]")=>{let l=0;for(;e;)if((e=i(e))&&nA(e)&&(e.data===t&&l++,e.data===n)){if(0===l)return i(e);l--}return e},m=(e,t,n)=>{let l=t.parentNode;l&&l.replaceChild(e,t);let r=n;for(;r;)r.vnode.el===t&&(r.vnode.el=r.subTree.el=e),r=r.parent},_=e=>1===e.nodeType&&"TEMPLATE"===e.tagName;return[(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),tY(),t._vnode=e;return}c(t.firstChild,e,null,null,null),tY(),t._vnode=e},c]}let nO="data-allow-mismatch",nN={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function nP(e,t){if(0===t||1===t)for(;e&&!e.hasAttribute(nO);)e=e.parentElement;let n=e&&e.getAttribute(nO);if(null==n)return!1;if(""===n)return!0;{let e=n.split(",");return!!(0===t&&e.includes("children"))||n.split(",").includes(nN[t])}}let nM=et().requestIdleCallback||(e=>setTimeout(e,1)),nI=et().cancelIdleCallback||(e=>clearTimeout(e)),nL=e=>!!e.type.__asyncLoader;function nD(e,t){let{ref:n,props:l,children:r,ce:i}=t.vnode,s=rh(e,l,r);return s.ref=n,s.ce=i,delete t.vnode.ce,s}let nF=e=>e.type.__isKeepAlive;function nV(e,t){return T(e)?e.some(e=>nV(e,t)):M(e)?e.split(",").includes(t):!!N(e)&&(e.lastIndex=0,e.test(t))}function nU(e,t){nB(e,"a",t)}function nj(e,t){nB(e,"da",t)}function nB(e,t,n=rE){let l=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(nW(t,l,n),n){let e=n.parent;for(;e&&e.parent;)nF(e.parent.vnode)&&function(e,t,n,l){let r=nW(t,e,l,!0);nZ(()=>{w(l[t],r)},n)}(l,t,n,e),e=e.parent}}function n$(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function nH(e){return 128&e.shapeFlag?e.ssContent:e}function nW(e,t,n=rE,l=!1){if(n){let r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...l)=>{eA();let r=rT(n),i=tV(t,n,e,l);return r(),eR(),i});return l?r.unshift(i):r.push(i),i}}let nK=e=>(t,n=rE)=>{rO&&"sp"!==e||nW(e,(...e)=>t(...e),n)},nz=nK("bm"),nq=nK("m"),nG=nK("bu"),nJ=nK("u"),nX=nK("bum"),nZ=nK("um"),nY=nK("sp"),nQ=nK("rtg"),n0=nK("rtc");function n1(e,t=rE){nW("ec",e,t)}let n2="components",n6=Symbol.for("v-ndc");function n4(e,t,n=!0,l=!1){let r=t0||rE;if(r){let n=r.type;if(e===n2){let e=rD(n,!1);if(e&&(e===t||e===K(t)||e===G(K(t))))return n}let i=n8(r[e]||n[e],t)||n8(r.appContext[e],t);return!i&&l?n:i}}function n8(e,t){return e&&(e[t]||e[K(t)]||e[G(K(t))])}let n3=e=>e?rR(e)?rL(e):n3(e.parent):null,n5=x(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>n3(e.parent),$root:e=>n3(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>li(e),$forceUpdate:e=>e.f||(e.f=()=>{tG(e.update)}),$nextTick:e=>e.n||(e.n=tq.bind(e.proxy)),$watch:e=>lW.bind(e)}),n9=(e,t)=>e!==m&&!e.__isScriptSetup&&k(e,t),n7={get({_:e},t){let n,l,r;if("__v_skip"===t)return!0;let{ctx:i,setupState:s,data:o,props:a,accessCache:u,type:c,appContext:f}=e;if("$"!==t[0]){let l=u[t];if(void 0!==l)switch(l){case 1:return s[t];case 2:return o[t];case 4:return i[t];case 3:return a[t]}else{if(n9(s,t))return u[t]=1,s[t];if(o!==m&&k(o,t))return u[t]=2,o[t];if((n=e.propsOptions[0])&&k(n,t))return u[t]=3,a[t];if(i!==m&&k(i,t))return u[t]=4,i[t];ll&&(u[t]=0)}}let p=n5[t];return p?("$attrs"===t&&eV(e.attrs,"get",""),p(e)):(l=c.__cssModules)&&(l=l[t])?l:i!==m&&k(i,t)?(u[t]=4,i[t]):k(r=f.config.globalProperties,t)?r[t]:void 0},set({_:e},t,n){let{data:l,setupState:r,ctx:i}=e;return n9(r,t)?(r[t]=n,!0):l!==m&&k(l,t)?(l[t]=n,!0):!k(e.props,t)&&!("$"===t[0]&&t.slice(1)in e)&&(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:l,appContext:r,propsOptions:i}},s){let o;return!!n[s]||e!==m&&k(e,s)||n9(t,s)||(o=i[0])&&k(o,s)||k(l,s)||k(n5,s)||k(r.config.globalProperties,s)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:k(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},le=x({},n7,{get(e,t){if(t!==Symbol.unscopables)return n7.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!en(t)});function lt(){let e=rk();return e.setupContext||(e.setupContext=rI(e))}function ln(e){return T(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}let ll=!0;function lr(e,t,n){tV(T(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function li(e){let t;let n=e.type,{mixins:l,extends:r}=n,{mixins:i,optionsCache:s,config:{optionMergeStrategies:o}}=e.appContext,a=s.get(n);return a?t=a:i.length||l||r?(t={},i.length&&i.forEach(e=>ls(t,e,o,!0)),ls(t,n,o)):t=n,L(n)&&s.set(n,t),t}function ls(e,t,n,l=!1){let{mixins:r,extends:i}=t;for(let s in i&&ls(e,i,n,!0),r&&r.forEach(t=>ls(e,t,n,!0)),t)if(l&&"expose"===s);else{let l=lo[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}let lo={data:la,props:lp,emits:lp,methods:lf,computed:lf,beforeCreate:lc,created:lc,beforeMount:lc,mounted:lc,beforeUpdate:lc,updated:lc,beforeDestroy:lc,beforeUnmount:lc,destroyed:lc,unmounted:lc,activated:lc,deactivated:lc,errorCaptured:lc,serverPrefetch:lc,components:lf,directives:lf,watch:function(e,t){if(!e)return t;if(!t)return e;let n=x(Object.create(null),e);for(let l in t)n[l]=lc(e[l],t[l]);return n},provide:la,inject:function(e,t){return lf(lu(e),lu(t))}};function la(e,t){return t?e?function(){return x(P(e)?e.call(this,this):e,P(t)?t.call(this,this):t)}:t:e}function lu(e){if(T(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function lc(e,t){return e?[...new Set([].concat(e,t))]:t}function lf(e,t){return e?x(Object.create(null),e,t):t}function lp(e,t){return e?T(e)&&T(t)?[...new Set([...e,...t])]:x(Object.create(null),ln(e),ln(null!=t?t:{})):t}function ld(){return{app:null,config:{isNativeTag:b,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let lh=0,lg=null;function lv(e,t){if(rE){let n=rE.provides,l=rE.parent&&rE.parent.provides;l===n&&(n=rE.provides=Object.create(l)),n[e]=t}}function lm(e,t,n=!1){let l=rE||t0;if(l||lg){let r=lg?lg._context.provides:l?null==l.parent?l.vnode.appContext&&l.vnode.appContext.provides:l.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&P(t)?t.call(l&&l.proxy):t}}let l_={},ly=()=>Object.create(l_),lb=e=>Object.getPrototypeOf(e)===l_;function lS(e,t,n,l){let r;let[i,s]=e.propsOptions,o=!1;if(t)for(let a in t){let u;if($(a))continue;let c=t[a];i&&k(i,u=K(a))?s&&s.includes(u)?(r||(r={}))[u]=c:n[u]=c:lG(e.emitsOptions,a)||a in l&&c===l[a]||(l[a]=c,o=!0)}if(s){let t=tg(n),l=r||m;for(let r=0;r<s.length;r++){let o=s[r];n[o]=lC(i,t,o,l[o],e,!k(l,o))}}return o}function lC(e,t,n,l,r,i){let s=e[n];if(null!=s){let e=k(s,"default");if(e&&void 0===l){let e=s.default;if(s.type!==Function&&!s.skipFactory&&P(e)){let{propsDefaults:i}=r;if(n in i)l=i[n];else{let s=rT(r);l=i[n]=e.call(null,t),s()}}else l=e;r.ce&&r.ce._setProp(n,l)}s[0]&&(i&&!e?l=!1:s[1]&&(""===l||l===q(n))&&(l=!0))}return l}let lx=new WeakMap;function lw(e){return!("$"===e[0]||$(e))}let lE=e=>"_"===e[0]||"$stable"===e,lk=e=>T(e)?e.map(r_):[r_(e)],lT=(e,t,n)=>{if(t._n)return t;let l=t6((...e)=>lk(t(...e)),n);return l._c=!1,l},lA=(e,t,n)=>{let l=e._ctx;for(let n in e){if(lE(n))continue;let r=e[n];if(P(r))t[n]=lT(n,r,l);else if(null!=r){let e=lk(r);t[n]=()=>e}}},lR=(e,t)=>{let n=lk(t);e.slots.default=()=>n},lO=(e,t,n)=>{for(let l in t)(n||"_"!==l)&&(e[l]=t[l])},lN=(e,t,n)=>{let l=e.slots=ly();if(32&e.vnode.shapeFlag){let e=t._;e?(lO(l,t,n),n&&Y(l,"_",e,!0)):lA(t,l)}else t&&lR(e,t)},lP=(e,t,n)=>{let{vnode:l,slots:r}=e,i=!0,s=m;if(32&l.shapeFlag){let e=t._;e?n&&1===e?i=!1:lO(r,t,n):(i=!t.$stable,lA(t,r)),s=t}else t&&(lR(e,t),s={default:1});if(i)for(let e in r)lE(e)||null!=s[e]||delete r[e]},lM=l8;function lI(e){return lL(e,nR)}function lL(e,t){var n;let l,r;et().__VUE__=!0;let{insert:i,remove:s,patchProp:o,createElement:a,createText:c,createComment:f,setText:p,setElementText:d,parentNode:h,nextSibling:g,setScopeId:b=y,insertStaticContent:S}=e,C=(e,t,n,l=null,r=null,i=null,s,o=null,a=!!t.dynamicChildren)=>{if(e===t)return;e&&!rc(e,t)&&(l=eo(e),en(e,r,i,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);let{type:u,ref:c,shapeFlag:f}=t;switch(u){case l9:w(e,t,n,l);break;case l7:E(e,t,n,l);break;case re:null==e&&A(t,n,l,s);break;case l5:B(e,t,n,l,r,i,s,o,a);break;default:1&f?N(e,t,n,l,r,i,s,o,a):6&f?H(e,t,n,l,r,i,s,o,a):64&f?u.process(e,t,n,l,r,i,s,o,a,ec):128&f&&u.process(e,t,n,l,r,i,s,o,a,ec)}null!=c&&r&&nC(c,e&&e.ref,i,t||e,!t)},w=(e,t,n,l)=>{if(null==e)i(t.el=c(t.children),n,l);else{let n=t.el=e.el;t.children!==e.children&&p(n,t.children)}},E=(e,t,n,l)=>{null==e?i(t.el=f(t.children||""),n,l):t.el=e.el},A=(e,t,n,l)=>{[e.el,e.anchor]=S(e.children,t,n,l,e.el,e.anchor)},R=({el:e,anchor:t},n,l)=>{let r;for(;e&&e!==t;)r=g(e),i(e,n,l),e=r;i(t,n,l)},O=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=g(e),s(e),e=n;s(t)},N=(e,t,n,l,r,i,s,o,a)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?M(t,n,l,r,i,s,o,a):V(e,t,r,i,s,o,a)},M=(e,t,n,l,r,s,u,c)=>{let f,p;let{props:h,shapeFlag:g,transition:m,dirs:_}=e;if(f=e.el=a(e.type,s,h&&h.is,h),8&g?d(f,e.children):16&g&&F(e.children,f,null,l,r,lD(e,s),u,c),_&&t4(e,null,l,"created"),I(f,e,e.scopeId,u,l),h){for(let e in h)"value"===e||$(e)||o(f,e,null,h[e],s,l);"value"in h&&o(f,"value",null,h.value,s),(p=h.onVnodeBeforeMount)&&rC(p,l,e)}_&&t4(e,null,l,"beforeMount");let y=lV(r,m);y&&m.beforeEnter(f),i(f,t,n),((p=h&&h.onVnodeMounted)||y||_)&&lM(()=>{p&&rC(p,l,e),y&&m.enter(f),_&&t4(e,null,l,"mounted")},r)},I=(e,t,n,l,r)=>{if(n&&b(e,n),l)for(let t=0;t<l.length;t++)b(e,l[t]);if(r){let n=r.subTree;if(t===n||l0(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=r.vnode;I(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},F=(e,t,n,l,r,i,s,o,a=0)=>{for(let u=a;u<e.length;u++)C(null,e[u]=o?ry(e[u]):r_(e[u]),t,n,l,r,i,s,o)},V=(e,t,n,l,r,i,s)=>{let a;let u=t.el=e.el,{patchFlag:c,dynamicChildren:f,dirs:p}=t;c|=16&e.patchFlag;let h=e.props||m,g=t.props||m;if(n&&lF(n,!1),(a=g.onVnodeBeforeUpdate)&&rC(a,n,t,e),p&&t4(t,e,n,"beforeUpdate"),n&&lF(n,!0),(h.innerHTML&&null==g.innerHTML||h.textContent&&null==g.textContent)&&d(u,""),f?U(e.dynamicChildren,f,u,n,l,lD(t,r),i):s||X(e,t,u,null,n,l,lD(t,r),i,!1),c>0){if(16&c)j(u,h,g,n,r);else if(2&c&&h.class!==g.class&&o(u,"class",null,g.class,r),4&c&&o(u,"style",h.style,g.style,r),8&c){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let l=e[t],i=h[l],s=g[l];(s!==i||"value"===l)&&o(u,l,i,s,r,n)}}1&c&&e.children!==t.children&&d(u,t.children)}else s||null!=f||j(u,h,g,n,r);((a=g.onVnodeUpdated)||p)&&lM(()=>{a&&rC(a,n,t,e),p&&t4(t,e,n,"updated")},l)},U=(e,t,n,l,r,i,s)=>{for(let o=0;o<t.length;o++){let a=e[o],u=t[o],c=a.el&&(a.type===l5||!rc(a,u)||70&a.shapeFlag)?h(a.el):n;C(a,u,c,null,l,r,i,s,!0)}},j=(e,t,n,l,r)=>{if(t!==n){if(t!==m)for(let i in t)$(i)||i in n||o(e,i,t[i],null,r,l);for(let i in n){if($(i))continue;let s=n[i],a=t[i];s!==a&&"value"!==i&&o(e,i,a,s,r,l)}"value"in n&&o(e,"value",t.value,n.value,r)}},B=(e,t,n,l,r,s,o,a,u)=>{let f=t.el=e?e.el:c(""),p=t.anchor=e?e.anchor:c(""),{patchFlag:d,dynamicChildren:h,slotScopeIds:g}=t;g&&(a=a?a.concat(g):g),null==e?(i(f,n,l),i(p,n,l),F(t.children||[],n,p,r,s,o,a,u)):d>0&&64&d&&h&&e.dynamicChildren?(U(e.dynamicChildren,h,n,r,s,o,a),(null!=t.key||r&&t===r.subTree)&&lU(e,t,!0)):X(e,t,n,p,r,s,o,a,u)},H=(e,t,n,l,r,i,s,o,a)=>{t.slotScopeIds=o,null==e?512&t.shapeFlag?r.ctx.activate(t,n,l,s,a):W(t,n,l,r,i,s,a):z(e,t,a)},W=(e,t,n,l,r,i,s)=>{let o=e.component=function(e,t,n){let l=e.type,r=(t?t.appContext:e.appContext)||rx,i={uid:rw++,vnode:e,type:l,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new eg(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:function e(t,n,l=!1){let r=l?lx:n.propsCache,i=r.get(t);if(i)return i;let s=t.props,o={},a=[],u=!1;if(!P(t)){let r=t=>{u=!0;let[l,r]=e(t,n,!0);x(o,l),r&&a.push(...r)};!l&&n.mixins.length&&n.mixins.forEach(r),t.extends&&r(t.extends),t.mixins&&t.mixins.forEach(r)}if(!s&&!u)return L(t)&&r.set(t,_),_;if(T(s))for(let e=0;e<s.length;e++){let t=K(s[e]);lw(t)&&(o[t]=m)}else if(s)for(let e in s){let t=K(e);if(lw(t)){let n=s[e],l=o[t]=T(n)||P(n)?{type:n}:x({},n),r=l.type,i=!1,u=!0;if(T(r))for(let e=0;e<r.length;++e){let t=r[e],n=P(t)&&t.name;if("Boolean"===n){i=!0;break}"String"===n&&(u=!1)}else i=P(r)&&"Boolean"===r.name;l[0]=i,l[1]=u,(i||k(l,"default"))&&a.push(t)}}let c=[o,a];return L(t)&&r.set(t,c),c}(l,r),emitsOptions:function e(t,n,l=!1){let r=n.emitsCache,i=r.get(t);if(void 0!==i)return i;let s=t.emits,o={},a=!1;if(!P(t)){let r=t=>{let l=e(t,n,!0);l&&(a=!0,x(o,l))};!l&&n.mixins.length&&n.mixins.forEach(r),t.extends&&r(t.extends),t.mixins&&t.mixins.forEach(r)}return s||a?(T(s)?s.forEach(e=>o[e]=null):x(o,s),L(t)&&r.set(t,o),o):(L(t)&&r.set(t,null),null)}(l,r),emit:null,emitted:null,propsDefaults:m,inheritAttrs:l.inheritAttrs,ctx:m,data:m,props:m,attrs:m,slots:m,refs:m,setupState:m,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=lq.bind(null,i),e.ce&&e.ce(i),i}(e,l,r);nF(e)&&(o.ctx.renderer=ec),function(e,t=!1,n=!1){t&&u(t);let{props:l,children:r}=e.vnode,i=rR(e);(function(e,t,n,l=!1){let r={},i=ly();for(let n in e.propsDefaults=Object.create(null),lS(e,t,r,i),e.propsOptions[0])n in r||(r[n]=void 0);n?e.props=l?r:ta(r):e.type.props?e.props=r:e.props=i,e.attrs=i})(e,l,i,t),lN(e,r,n),i&&function(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,n7);let{setup:l}=n;if(l){eA();let n=e.setupContext=l.length>1?rI(e):null,r=rT(e),i=tF(l,e,0,[e.props,n]),s=D(i);if(eR(),r(),(s||e.sp)&&!nL(e)&&nS(e),s){if(i.then(rA,rA),t)return i.then(n=>{rN(e,n,t)}).catch(t=>{tU(t,e,0)});e.asyncDep=i}else rN(e,i,t)}else rP(e,t)}(e,t),t&&u(!1)}(o,!1,s),o.asyncDep?(r&&r.registerDep(o,G,s),e.el||E(null,o.subTree=rh(l7),t,n)):G(o,e,t,n,r,i,s)},z=(e,t,n)=>{let l=t.component=e.component;if(function(e,t,n){let{props:l,children:r,component:i}=e,{props:s,children:o,patchFlag:a}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(!n||!(a>=0))return(!!r||!!o)&&(!o||!o.$stable)||l!==s&&(l?!s||lY(l,s,u):!!s);if(1024&a)return!0;if(16&a)return l?lY(l,s,u):!!s;if(8&a){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(s[n]!==l[n]&&!lG(u,n))return!0}}return!1}(e,t,n)){if(l.asyncDep&&!l.asyncResolved){J(l,t,n);return}l.next=t,l.update()}else t.el=e.el,l.vnode=t},G=(e,t,n,l,i,s,o)=>{let a=()=>{if(e.isMounted){let t,{next:n,bu:l,u:r,parent:u,vnode:c}=e;{let t=function e(t){let n=t.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:e(n)}(e);if(t){n&&(n.el=c.el,J(e,n,o)),t.asyncDep.then(()=>{e.isUnmounted||a()});return}}let f=n;lF(e,!1),n?(n.el=c.el,J(e,n,o)):n=c,l&&Z(l),(t=n.props&&n.props.onVnodeBeforeUpdate)&&rC(t,u,n,c),lF(e,!0);let p=lJ(e),d=e.subTree;e.subTree=p,C(d,p,h(d.el),eo(d),e,i,s),n.el=p.el,null===f&&lQ(e,p.el),r&&lM(r,i),(t=n.props&&n.props.onVnodeUpdated)&&lM(()=>rC(t,u,n,c),i)}else{let o;let{el:a,props:u}=t,{bm:c,m:f,parent:p,root:d,type:h}=e,g=nL(t);if(lF(e,!1),c&&Z(c),!g&&(o=u&&u.onVnodeBeforeMount)&&rC(o,p,t),lF(e,!0),a&&r){let t=()=>{e.subTree=lJ(e),r(a,e.subTree,e,i,null)};g&&h.__asyncHydrate?h.__asyncHydrate(a,e,t):t()}else{d.ce&&d.ce._injectChildStyle(h);let r=e.subTree=lJ(e);C(null,r,n,l,e,i,s),t.el=r.el}if(f&&lM(f,i),!g&&(o=u&&u.onVnodeMounted)){let e=t;lM(()=>rC(o,p,e),i)}(256&t.shapeFlag||p&&nL(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&lM(e.a,i),e.isMounted=!0,t=n=l=null}};e.scope.on();let u=e.effect=new em(a);e.scope.off();let c=e.update=u.run.bind(u),f=e.job=u.runIfDirty.bind(u);f.i=e,f.id=e.uid,u.scheduler=()=>tG(f),lF(e,!0),c()},J=(e,t,n)=>{t.component=e;let l=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,l){let{props:r,attrs:i,vnode:{patchFlag:s}}=e,o=tg(r),[a]=e.propsOptions,u=!1;if((l||s>0)&&!(16&s)){if(8&s){let n=e.vnode.dynamicProps;for(let l=0;l<n.length;l++){let s=n[l];if(lG(e.emitsOptions,s))continue;let c=t[s];if(a){if(k(i,s))c!==i[s]&&(i[s]=c,u=!0);else{let t=K(s);r[t]=lC(a,o,t,c,e,!1)}}else c!==i[s]&&(i[s]=c,u=!0)}}}else{let l;for(let s in lS(e,t,r,i)&&(u=!0),o)t&&(k(t,s)||(l=q(s))!==s&&k(t,l))||(a?n&&(void 0!==n[s]||void 0!==n[l])&&(r[s]=lC(a,o,s,void 0,e,!0)):delete r[s]);if(i!==o)for(let e in i)t&&k(t,e)||(delete i[e],u=!0)}u&&eU(e.attrs,"set","")}(e,t.props,l,n),lP(e,t.children,n),eA(),tZ(e),eR()},X=(e,t,n,l,r,i,s,o,a=!1)=>{let u=e&&e.children,c=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:h}=t;if(p>0){if(128&p){Q(u,f,n,l,r,i,s,o,a);return}if(256&p){Y(u,f,n,l,r,i,s,o,a);return}}8&h?(16&c&&es(u,r,i),f!==u&&d(n,f)):16&c?16&h?Q(u,f,n,l,r,i,s,o,a):es(u,r,i,!0):(8&c&&d(n,""),16&h&&F(f,n,l,r,i,s,o,a))},Y=(e,t,n,l,r,i,s,o,a)=>{let u;e=e||_,t=t||_;let c=e.length,f=t.length,p=Math.min(c,f);for(u=0;u<p;u++){let l=t[u]=a?ry(t[u]):r_(t[u]);C(e[u],l,n,null,r,i,s,o,a)}c>f?es(e,r,i,!0,!1,p):F(t,n,l,r,i,s,o,a,p)},Q=(e,t,n,l,r,i,s,o,a)=>{let u=0,c=t.length,f=e.length-1,p=c-1;for(;u<=f&&u<=p;){let l=e[u],c=t[u]=a?ry(t[u]):r_(t[u]);if(rc(l,c))C(l,c,n,null,r,i,s,o,a);else break;u++}for(;u<=f&&u<=p;){let l=e[f],u=t[p]=a?ry(t[p]):r_(t[p]);if(rc(l,u))C(l,u,n,null,r,i,s,o,a);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,f=e<c?t[e].el:l;for(;u<=p;)C(null,t[u]=a?ry(t[u]):r_(t[u]),n,f,r,i,s,o,a),u++}}else if(u>p)for(;u<=f;)en(e[u],r,i,!0),u++;else{let d;let h=u,g=u,m=new Map;for(u=g;u<=p;u++){let e=t[u]=a?ry(t[u]):r_(t[u]);null!=e.key&&m.set(e.key,u)}let y=0,b=p-g+1,S=!1,x=0,w=Array(b);for(u=0;u<b;u++)w[u]=0;for(u=h;u<=f;u++){let l;let c=e[u];if(y>=b){en(c,r,i,!0);continue}if(null!=c.key)l=m.get(c.key);else for(d=g;d<=p;d++)if(0===w[d-g]&&rc(c,t[d])){l=d;break}void 0===l?en(c,r,i,!0):(w[l-g]=u+1,l>=x?x=l:S=!0,C(c,t[l],n,null,r,i,s,o,a),y++)}let E=S?function(e){let t,n,l,r,i;let s=e.slice(),o=[0],a=e.length;for(t=0;t<a;t++){let a=e[t];if(0!==a){if(e[n=o[o.length-1]]<a){s[t]=n,o.push(t);continue}for(l=0,r=o.length-1;l<r;)e[o[i=l+r>>1]]<a?l=i+1:r=i;a<e[o[l]]&&(l>0&&(s[t]=o[l-1]),o[l]=t)}}for(l=o.length,r=o[l-1];l-- >0;)o[l]=r,r=s[r];return o}(w):_;for(d=E.length-1,u=b-1;u>=0;u--){let e=g+u,f=t[e],p=e+1<c?t[e+1].el:l;0===w[u]?C(null,f,n,p,r,i,s,o,a):S&&(d<0||u!==E[d]?ee(f,n,p,2):d--)}}},ee=(e,t,n,l,r=null)=>{let{el:s,type:o,transition:a,children:u,shapeFlag:c}=e;if(6&c){ee(e.component.subTree,t,n,l);return}if(128&c){e.suspense.move(t,n,l);return}if(64&c){o.move(e,t,n,ec);return}if(o===l5){i(s,t,n);for(let e=0;e<u.length;e++)ee(u[e],t,n,l);i(e.anchor,t,n);return}if(o===re){R(e,t,n);return}if(2!==l&&1&c&&a){if(0===l)a.beforeEnter(s),i(s,t,n),lM(()=>a.enter(s),r);else{let{leave:e,delayLeave:l,afterLeave:r}=a,o=()=>i(s,t,n),u=()=>{e(s,()=>{o(),r&&r()})};l?l(s,o,u):u()}}else i(s,t,n)},en=(e,t,n,l=!1,r=!1)=>{let i;let{type:s,props:o,ref:a,children:u,dynamicChildren:c,shapeFlag:f,patchFlag:p,dirs:d,cacheIndex:h}=e;if(-2===p&&(r=!1),null!=a&&nC(a,null,n,e,!0),null!=h&&(t.renderCache[h]=void 0),256&f){t.ctx.deactivate(e);return}let g=1&f&&d,m=!nL(e);if(m&&(i=o&&o.onVnodeBeforeUnmount)&&rC(i,t,e),6&f)ei(e.component,n,l);else{if(128&f){e.suspense.unmount(n,l);return}g&&t4(e,null,t,"beforeUnmount"),64&f?e.type.remove(e,t,n,ec,l):c&&!c.hasOnce&&(s!==l5||p>0&&64&p)?es(c,t,n,!1,!0):(s===l5&&384&p||!r&&16&f)&&es(u,t,n),l&&el(e)}(m&&(i=o&&o.onVnodeUnmounted)||g)&&lM(()=>{i&&rC(i,t,e),g&&t4(e,null,t,"unmounted")},n)},el=e=>{let{type:t,el:n,anchor:l,transition:r}=e;if(t===l5){er(n,l);return}if(t===re){O(e);return}let i=()=>{s(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){let{leave:t,delayLeave:l}=r,s=()=>t(n,i);l?l(e.el,i,s):s()}else i()},er=(e,t)=>{let n;for(;e!==t;)n=g(e),s(e),e=n;s(t)},ei=(e,t,n)=>{let{bum:l,scope:r,job:i,subTree:s,um:o,m:a,a:u}=e;lj(a),lj(u),l&&Z(l),r.stop(),i&&(i.flags|=8,en(s,e,t,n)),o&&lM(o,t),lM(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},es=(e,t,n,l=!1,r=!1,i=0)=>{for(let s=i;s<e.length;s++)en(e[s],t,n,l,r)},eo=e=>{if(6&e.shapeFlag)return eo(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();let t=g(e.anchor||e.el),n=t&&t[t8];return n?g(n):t},ea=!1,eu=(e,t,n)=>{null==e?t._vnode&&en(t._vnode,null,null,!0):C(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ea||(ea=!0,tZ(),tY(),ea=!1)},ec={p:C,um:en,m:ee,r:el,mt:W,mc:F,pc:X,pbc:U,n:eo,o:e};return t&&([l,r]=t(ec)),{render:eu,hydrate:l,createApp:(n=l,function(e,t=null){P(e)||(e=x({},e)),null==t||L(t)||(t=null);let l=ld(),r=new WeakSet,i=[],s=!1,o=l.app={_uid:lh++,_component:e,_props:t,_container:null,_context:l,_instance:null,version:rj,get config(){return l.config},set config(v){},use:(e,...t)=>(r.has(e)||(e&&P(e.install)?(r.add(e),e.install(o,...t)):P(e)&&(r.add(e),e(o,...t))),o),mixin:e=>(l.mixins.includes(e)||l.mixins.push(e),o),component:(e,t)=>t?(l.components[e]=t,o):l.components[e],directive:(e,t)=>t?(l.directives[e]=t,o):l.directives[e],mount(r,i,a){if(!s){let u=o._ceVNode||rh(e,t);return u.appContext=l,!0===a?a="svg":!1===a&&(a=void 0),i&&n?n(u,r):eu(u,r,a),s=!0,o._container=r,r.__vue_app__=o,rL(u.component)}},onUnmount(e){i.push(e)},unmount(){s&&(tV(i,o._instance,16),eu(null,o._container),delete o._container.__vue_app__)},provide:(e,t)=>(l.provides[e]=t,o),runWithContext(e){let t=lg;lg=o;try{return e()}finally{lg=t}}};return o})}}function lD({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function lF({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function lV(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function lU(e,t,n=!1){let l=e.children,r=t.children;if(T(l)&&T(r))for(let e=0;e<l.length;e++){let t=l[e],i=r[e];!(1&i.shapeFlag)||i.dynamicChildren||((i.patchFlag<=0||32===i.patchFlag)&&((i=r[e]=ry(r[e])).el=t.el),n||-2===i.patchFlag||lU(t,i)),i.type===l9&&(i.el=t.el)}}function lj(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}let lB=Symbol.for("v-scx");function l$(e,t){return lH(e,null,{flush:"sync"})}function lH(e,t,n=m){let{immediate:l,deep:i,flush:s,once:o}=n,a=x({},n),u=rE;a.call=(e,t,n)=>tV(e,u,t,n);let c=!1;return"post"===s?a.scheduler=e=>{lM(e,u&&u.suspense)}:"sync"!==s&&(c=!0,a.scheduler=(e,t)=>{t?e():tG(e)}),a.augmentJob=e=>{t&&(e.flags|=4),c&&(e.flags|=2,u&&(e.id=u.uid,e.i=u))},function(e,t,n=m){let l,i,s,o;let{immediate:a,deep:u,once:c,scheduler:f,augmentJob:p,call:h}=n,g=e=>u?e:td(e)||!1===u||0===u?tD(e,1):tD(e),_=!1,b=!1;if(ty(e)?(i=()=>e.value,_=td(e)):tf(e)?(i=()=>g(e),_=!0):T(e)?(b=!0,_=e.some(e=>tf(e)||td(e)),i=()=>e.map(e=>ty(e)?e.value:tf(e)?g(e):P(e)?h?h(e,2):e():void 0)):i=P(e)?t?h?()=>h(e,2):e:()=>{if(s){eA();try{s()}finally{eR()}}let t=d;d=l;try{return h?h(e,3,[o]):e(o)}finally{d=t}}:y,t&&u){let e=i,t=!0===u?1/0:u;i=()=>tD(e(),t)}let S=r,C=()=>{l.stop(),S&&S.active&&w(S.effects,l)};if(c&&t){let e=t;t=(...t)=>{e(...t),C()}}let x=b?Array(e.length).fill(tM):tM,E=e=>{if(1&l.flags&&(l.dirty||e)){if(t){let e=l.run();if(u||_||(b?e.some((e,t)=>X(e,x[t])):X(e,x))){s&&s();let n=d;d=l;try{let n=[e,x===tM?void 0:b&&x[0]===tM?[]:x,o];h?h(t,3,n):t(...n),x=e}finally{d=n}}}else l.run()}};return p&&p(E),(l=new em(i)).scheduler=f?()=>f(E,!1):E,o=e=>tL(e,!1,l),s=l.onStop=()=>{let e=tI.get(l);if(e){if(h)h(e,4);else for(let t of e)t();tI.delete(l)}},t?a?E(!0):x=l.run():f?f(E.bind(null,!0),!0):l.run(),C.pause=l.pause.bind(l),C.resume=l.resume.bind(l),C.stop=C,C}(e,t,a)}function lW(e,t,n){let l;let r=this.proxy,i=M(e)?e.includes(".")?lK(r,e):()=>r[e]:e.bind(r,r);P(t)?l=t:(l=t.handler,n=t);let s=rT(this),o=lH(i,l.bind(r),n);return s(),o}function lK(e,t){let n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}let lz=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${K(t)}Modifiers`]||e[`${q(t)}Modifiers`];function lq(e,t,...n){let l;if(e.isUnmounted)return;let r=e.vnode.props||m,i=n,s=t.startsWith("update:"),o=s&&lz(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>M(e)?e.trim():e)),o.number&&(i=n.map(Q)));let a=r[l=J(t)]||r[l=J(K(t))];!a&&s&&(a=r[l=J(q(t))]),a&&tV(a,e,6,i);let u=r[l+"Once"];if(u){if(e.emitted){if(e.emitted[l])return}else e.emitted={};e.emitted[l]=!0,tV(u,e,6,i)}}function lG(e,t){return!!(e&&S(t))&&(k(e,(t=t.slice(2).replace(/Once$/,""))[0].toLowerCase()+t.slice(1))||k(e,q(t))||k(e,t))}function lJ(e){let t,n;let{type:l,vnode:r,proxy:i,withProxy:s,propsOptions:[o],slots:a,attrs:u,emit:c,render:f,renderCache:p,props:d,data:h,setupState:g,ctx:m,inheritAttrs:_}=e,y=t2(e);try{if(4&r.shapeFlag){let e=s||i;t=r_(f.call(e,e,p,d,g,h,m)),n=u}else t=r_(l.length>1?l(d,{attrs:u,slots:a,emit:c}):l(d,null)),n=l.props?u:lX(u)}catch(n){rt.length=0,tU(n,e,1),t=rh(l7)}let b=t;if(n&&!1!==_){let e=Object.keys(n),{shapeFlag:t}=b;e.length&&7&t&&(o&&e.some(C)&&(n=lZ(n,o)),b=rv(b,n,!1,!0))}return r.dirs&&((b=rv(b,null,!1,!0)).dirs=b.dirs?b.dirs.concat(r.dirs):r.dirs),r.transition&&n_(b,r.transition),t=b,t2(y),t}let lX=e=>{let t;for(let n in e)("class"===n||"style"===n||S(n))&&((t||(t={}))[n]=e[n]);return t},lZ=(e,t)=>{let n={};for(let l in e)C(l)&&l.slice(9)in t||(n[l]=e[l]);return n};function lY(e,t,n){let l=Object.keys(t);if(l.length!==Object.keys(e).length)return!0;for(let r=0;r<l.length;r++){let i=l[r];if(t[i]!==e[i]&&!lG(n,i))return!0}return!1}function lQ({vnode:e,parent:t},n){for(;t;){let l=t.subTree;if(l.suspense&&l.suspense.activeBranch===e&&(l.el=e.el),l===e)(e=t.vnode).el=n,t=t.parent;else break}}let l0=e=>e.__isSuspense,l1=0;function l2(e,t){let n=e.props&&e.props[t];P(n)&&n()}function l6(e,t,n,l,r,i,s,o,a,u,c=!1){let f;let{p:p,m:d,um:h,n:g,o:{parentNode:m,remove:_}}=u,y=function(e){let t=e.props&&e.props.suspensible;return null!=t&&!1!==t}(e);y&&t&&t.pendingBranch&&(f=t.pendingId,t.deps++);let b=e.props?ee(e.props.timeout):void 0,S=i,C={vnode:e,parent:t,parentComponent:n,namespace:s,container:l,hiddenContainer:r,deps:0,pendingId:l1++,timeout:"number"==typeof b?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:l,activeBranch:r,pendingBranch:s,pendingId:o,effects:a,parentComponent:u,container:c}=C,p=!1;C.isHydrating?C.isHydrating=!1:e||((p=r&&s.transition&&"out-in"===s.transition.mode)&&(r.transition.afterLeave=()=>{o===C.pendingId&&(d(s,c,i===S?g(r):i,0),tX(a))}),r&&(m(r.el)===c&&(i=g(r)),h(r,u,C,!0)),p||d(s,c,i,0)),l3(C,s),C.pendingBranch=null,C.isInFallback=!1;let _=C.parent,b=!1;for(;_;){if(_.pendingBranch){_.effects.push(...a),b=!0;break}_=_.parent}b||p||tX(a),C.effects=[],y&&t&&t.pendingBranch&&f===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),l2(l,"onResolve")},fallback(e){if(!C.pendingBranch)return;let{vnode:t,activeBranch:n,parentComponent:l,container:r,namespace:i}=C;l2(t,"onFallback");let s=g(n),u=()=>{C.isInFallback&&(p(null,e,r,s,l,null,i,o,a),l3(C,e))},c=e.transition&&"out-in"===e.transition.mode;c&&(n.transition.afterLeave=u),C.isInFallback=!0,h(n,l,null,!0),c||u()},move(e,t,n){C.activeBranch&&d(C.activeBranch,e,t,n),C.container=e},next:()=>C.activeBranch&&g(C.activeBranch),registerDep(e,t,n){let l=!!C.pendingBranch;l&&C.deps++;let r=e.vnode.el;e.asyncDep.catch(t=>{tU(t,e,0)}).then(i=>{if(e.isUnmounted||C.isUnmounted||C.pendingId!==e.suspenseId)return;e.asyncResolved=!0;let{vnode:o}=e;rN(e,i,!1),r&&(o.el=r);let a=!r&&e.subTree.el;t(e,o,m(r||e.subTree.el),r?null:g(e.subTree),C,s,n),a&&_(a),lQ(e,o.el),l&&0==--C.deps&&C.resolve()})},unmount(e,t){C.isUnmounted=!0,C.activeBranch&&h(C.activeBranch,n,e,t),C.pendingBranch&&h(C.pendingBranch,n,e,t)}};return C}function l4(e){let t;if(P(e)){let n=ri&&e._c;n&&(e._d=!1,rl()),e=e(),n&&(e._d=!0,t=rn,rr())}return T(e)&&(e=function(e,t=!0){let n;for(let t=0;t<e.length;t++){let l=e[t];if(!ru(l))return;if(l.type!==l7||"v-if"===l.children){if(n)return;n=l}}return n}(e)),e=r_(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(t=>t!==e)),e}function l8(e,t){t&&t.pendingBranch?T(e)?t.effects.push(...e):t.effects.push(e):tX(e)}function l3(e,t){e.activeBranch=t;let{vnode:n,parentComponent:l}=e,r=t.el;for(;!r&&t.component;)r=(t=t.component.subTree).el;n.el=r,l&&l.subTree===n&&(l.vnode.el=r,lQ(l,r))}let l5=Symbol.for("v-fgt"),l9=Symbol.for("v-txt"),l7=Symbol.for("v-cmt"),re=Symbol.for("v-stc"),rt=[],rn=null;function rl(e=!1){rt.push(rn=e?null:[])}function rr(){rt.pop(),rn=rt[rt.length-1]||null}let ri=1;function rs(e,t=!1){ri+=e,e<0&&rn&&t&&(rn.hasOnce=!0)}function ro(e){return e.dynamicChildren=ri>0?rn||_:null,rr(),ri>0&&rn&&rn.push(e),e}function ra(e,t,n,l,r){return ro(rh(e,t,n,l,r,!0))}function ru(e){return!!e&&!0===e.__v_isVNode}function rc(e,t){return e.type===t.type&&e.key===t.key}let rf=({key:e})=>null!=e?e:null,rp=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?M(e)||ty(e)||P(e)?{i:t0,r:e,k:t,f:!!n}:e:null);function rd(e,t=null,n=null,l=0,r=null,i=e===l5?0:1,s=!1,o=!1){let a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&rf(t),ref:t&&rp(t),scopeId:t1,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:l,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:t0};return o?(rb(a,n),128&i&&e.normalize(a)):n&&(a.shapeFlag|=M(n)?8:16),ri>0&&!s&&rn&&(a.patchFlag>0||6&i)&&32!==a.patchFlag&&rn.push(a),a}let rh=function(e,t=null,n=null,l=0,r=null,i=!1){var s;if(e&&e!==n6||(e=l7),ru(e)){let l=rv(e,t,!0);return n&&rb(l,n),ri>0&&!i&&rn&&(6&l.shapeFlag?rn[rn.indexOf(e)]=l:rn.push(l)),l.patchFlag=-2,l}if(P(s=e)&&"__vccOpts"in s&&(e=e.__vccOpts),t){let{class:e,style:n}=t=rg(t);e&&!M(e)&&(t.class=eo(e)),L(n)&&(th(n)&&!T(n)&&(n=x({},n)),t.style=el(n))}let o=M(e)?1:l0(e)?128:t3(e)?64:L(e)?4:P(e)?2:0;return rd(e,t,n,l,r,o,i,!0)};function rg(e){return e?th(e)||lb(e)?x({},e):e:null}function rv(e,t,n=!1,l=!1){let{props:r,ref:i,patchFlag:s,children:o,transition:a}=e,u=t?rS(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&rf(u),ref:t&&t.ref?n&&i?T(i)?i.concat(rp(t)):[i,rp(t)]:rp(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==l5?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&rv(e.ssContent),ssFallback:e.ssFallback&&rv(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&l&&n_(c,a.clone(c)),c}function rm(e=" ",t=0){return rh(l9,null,e,t)}function r_(e){return null==e||"boolean"==typeof e?rh(l7):T(e)?rh(l5,null,e.slice()):ru(e)?ry(e):rh(l9,null,String(e))}function ry(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:rv(e)}function rb(e,t){let n=0,{shapeFlag:l}=e;if(null==t)t=null;else if(T(t))n=16;else if("object"==typeof t){if(65&l){let n=t.default;n&&(n._c&&(n._d=!1),rb(e,n()),n._c&&(n._d=!0));return}{n=32;let l=t._;l||lb(t)?3===l&&t0&&(1===t0.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=t0}}else P(t)?(t={default:t,_ctx:t0},n=32):(t=String(t),64&l?(n=16,t=[rm(t)]):n=8);e.children=t,e.shapeFlag|=n}function rS(...e){let t={};for(let n=0;n<e.length;n++){let l=e[n];for(let e in l)if("class"===e)t.class!==l.class&&(t.class=eo([t.class,l.class]));else if("style"===e)t.style=el([t.style,l.style]);else if(S(e)){let n=t[e],r=l[e];r&&n!==r&&!(T(n)&&n.includes(r))&&(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=l[e])}return t}function rC(e,t,n,l=null){tV(e,t,7,[n,l])}let rx=ld(),rw=0,rE=null,rk=()=>rE||t0;a=e=>{rE=e},u=e=>{rO=e};let rT=e=>{let t=rE;return a(e),e.scope.on(),()=>{e.scope.off(),a(t)}},rA=()=>{rE&&rE.scope.off(),a(null)};function rR(e){return 4&e.vnode.shapeFlag}let rO=!1;function rN(e,t,n){P(t)?e.render=t:L(t)&&(e.setupState=tk(t)),rP(e,n)}function rP(e,t,n){let l=e.type;if(!e.render){if(!t&&c&&!l.render){let t=l.template||li(e).template;if(t){let{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:i,compilerOptions:s}=l,o=x(x({isCustomElement:n,delimiters:i},r),s);l.render=c(t,o)}}e.render=l.render||y,f&&f(e)}{let t=rT(e);eA();try{!function(e){let t=li(e),n=e.proxy,l=e.ctx;ll=!1,t.beforeCreate&&lr(t.beforeCreate,e,"bc");let{data:r,computed:i,methods:s,watch:o,provide:a,inject:u,created:c,beforeMount:f,mounted:p,beforeUpdate:d,updated:h,activated:g,deactivated:m,beforeDestroy:_,beforeUnmount:b,destroyed:S,unmounted:C,render:x,renderTracked:w,renderTriggered:E,errorCaptured:k,serverPrefetch:A,expose:R,inheritAttrs:O,components:N,directives:I,filters:D}=t;if(u&&function(e,t,n=y){for(let n in T(e)&&(e=lu(e)),e){let l;let r=e[n];ty(l=L(r)?"default"in r?lm(r.from||n,r.default,!0):lm(r.from||n):lm(r))?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e}):t[n]=l}}(u,l,null),s)for(let e in s){let t=s[e];P(t)&&(l[e]=t.bind(n))}if(r){let t=r.call(n,n);L(t)&&(e.data=to(t))}if(ll=!0,i)for(let e in i){let t=i[e],r=P(t)?t.bind(n,n):P(t.get)?t.get.bind(n,n):y,s=rF({get:r,set:!P(t)&&P(t.set)?t.set.bind(n):y});Object.defineProperty(l,e,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e})}if(o)for(let e in o)!function e(t,n,l,r){let i=r.includes(".")?lK(l,r):()=>l[r];if(M(t)){let e=n[t];P(e)&&lH(i,e,void 0)}else if(P(t)){var s;s=t.bind(l),lH(i,s,void 0)}else if(L(t)){if(T(t))t.forEach(t=>e(t,n,l,r));else{let e=P(t.handler)?t.handler.bind(l):n[t.handler];P(e)&&lH(i,e,t)}}}(o[e],l,n,e);if(a){let e=P(a)?a.call(n):a;Reflect.ownKeys(e).forEach(t=>{lv(t,e[t])})}function F(e,t){T(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(c&&lr(c,e,"c"),F(nz,f),F(nq,p),F(nG,d),F(nJ,h),F(nU,g),F(nj,m),F(n1,k),F(n0,w),F(nQ,E),F(nX,b),F(nZ,C),F(nY,A),T(R)){if(R.length){let t=e.exposed||(e.exposed={});R.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})})}else e.exposed||(e.exposed={})}x&&e.render===y&&(e.render=x),null!=O&&(e.inheritAttrs=O),N&&(e.components=N),I&&(e.directives=I)}(e)}finally{eR(),t()}}}let rM={get:(e,t)=>(eV(e,"get",""),e[t])};function rI(e){return{attrs:new Proxy(e.attrs,rM),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function rL(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tk(tv(e.exposed)),{get:(t,n)=>n in t?t[n]:n in n5?n5[n](e):void 0,has:(e,t)=>t in e||t in n5})):e.proxy}function rD(e,t=!0){return P(e)?e.displayName||e.name:e.name||t&&e.__name}let rF=(e,t)=>(function(e,t,n=!1){let l,r;return P(e)?l=e:(l=e.get,r=e.set),new tP(l,r,n)})(e,0,rO);function rV(e,t,n){let l=arguments.length;return 2!==l?(l>3?n=Array.prototype.slice.call(arguments,2):3===l&&ru(n)&&(n=[n]),rh(e,t,n)):!L(t)||T(t)?rh(e,null,t):ru(t)?rh(e,null,[t]):rh(e,t)}function rU(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e<n.length;e++)if(X(n[e],t[e]))return!1;return ri>0&&rn&&rn.push(e),!0}let rj="3.5.13",rB="undefined"!=typeof window&&window.trustedTypes;if(rB)try{h=rB.createPolicy("vue",{createHTML:e=>e})}catch(e){}let r$=h?e=>h.createHTML(e):e=>e,rH="undefined"!=typeof document?document:null,rW=rH&&rH.createElement("template"),rK="transition",rz="animation",rq=Symbol("_vtc"),rG={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},rJ=x({},nc,rG),rX=((t=(e,{slots:t})=>rV(nd,rQ(e),t)).displayName="Transition",t.props=rJ,t),rZ=(e,t=[])=>{T(e)?e.forEach(e=>e(...t)):e&&e(...t)},rY=e=>!!e&&(T(e)?e.some(e=>e.length>1):e.length>1);function rQ(e){let t={};for(let n in e)n in rG||(t[n]=e[n]);if(!1===e.css)return t;let{name:n="v",type:l,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:o=`${n}-enter-to`,appearFromClass:a=i,appearActiveClass:u=s,appearToClass:c=o,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(L(e))return[ee(e.enter),ee(e.leave)];{let t=ee(e);return[t,t]}}(r),g=h&&h[0],m=h&&h[1],{onBeforeEnter:_,onEnter:y,onEnterCancelled:b,onLeave:S,onLeaveCancelled:C,onBeforeAppear:w=_,onAppear:E=y,onAppearCancelled:k=b}=t,T=(e,t,n,l)=>{e._enterCancelled=l,r1(e,t?c:o),r1(e,t?u:s),n&&n()},A=(e,t)=>{e._isLeaving=!1,r1(e,f),r1(e,d),r1(e,p),t&&t()},R=e=>(t,n)=>{let r=e?E:y,s=()=>T(t,e,n);rZ(r,[t,s]),r2(()=>{r1(t,e?a:i),r0(t,e?c:o),rY(r)||r4(t,l,g,s)})};return x(t,{onBeforeEnter(e){rZ(_,[e]),r0(e,i),r0(e,s)},onBeforeAppear(e){rZ(w,[e]),r0(e,a),r0(e,u)},onEnter:R(!1),onAppear:R(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>A(e,t);r0(e,f),e._enterCancelled?(r0(e,p),r9()):(r9(),r0(e,p)),r2(()=>{e._isLeaving&&(r1(e,f),r0(e,d),rY(S)||r4(e,l,m,n))}),rZ(S,[e,n])},onEnterCancelled(e){T(e,!1,void 0,!0),rZ(b,[e])},onAppearCancelled(e){T(e,!0,void 0,!0),rZ(k,[e])},onLeaveCancelled(e){A(e),rZ(C,[e])}})}function r0(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[rq]||(e[rq]=new Set)).add(t)}function r1(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[rq];n&&(n.delete(t),n.size||(e[rq]=void 0))}function r2(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let r6=0;function r4(e,t,n,l){let r=e._endId=++r6,i=()=>{r===e._endId&&l()};if(null!=n)return setTimeout(i,n);let{type:s,timeout:o,propCount:a}=r8(e,t);if(!s)return l();let u=s+"end",c=0,f=()=>{e.removeEventListener(u,p),i()},p=t=>{t.target===e&&++c>=a&&f()};setTimeout(()=>{c<a&&f()},o+1),e.addEventListener(u,p)}function r8(e,t){let n=window.getComputedStyle(e),l=e=>(n[e]||"").split(", "),r=l(`${rK}Delay`),i=l(`${rK}Duration`),s=r3(r,i),o=l(`${rz}Delay`),a=l(`${rz}Duration`),u=r3(o,a),c=null,f=0,p=0;t===rK?s>0&&(c=rK,f=s,p=i.length):t===rz?u>0&&(c=rz,f=u,p=a.length):p=(c=(f=Math.max(s,u))>0?s>u?rK:rz:null)?c===rK?i.length:a.length:0;let d=c===rK&&/\b(transform|all)(,|$)/.test(l(`${rK}Property`).toString());return{type:c,timeout:f,propCount:p,hasTransform:d}}function r3(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>r5(t)+r5(e[n])))}function r5(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function r9(){return document.body.offsetHeight}let r7=Symbol("_vod"),ie=Symbol("_vsh");function it(e,t){e.style.display=t?e[r7]:"none",e[ie]=!t}let il=Symbol("");function ir(e,t){if(1===e.nodeType){let n=e.style,l="";for(let e in t)n.setProperty(`--${e}`,t[e]),l+=`--${e}: ${t[e]};`;n[il]=l}}let ii=/(^|;)\s*display\s*:/,is=/\s*!important$/;function io(e,t,n){if(T(n))n.forEach(n=>io(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{let l=function(e,t){let n=iu[t];if(n)return n;let l=K(t);if("filter"!==l&&l in e)return iu[t]=l;l=G(l);for(let n=0;n<ia.length;n++){let r=ia[n]+l;if(r in e)return iu[t]=r}return t}(e,t);is.test(n)?e.setProperty(q(l),n.replace(is,""),"important"):e[l]=n}}let ia=["Webkit","Moz","ms"],iu={},ic="http://www.w3.org/1999/xlink";function ip(e,t,n,l,r,i=ea(t)){l&&t.startsWith("xlink:")?null==n?e.removeAttributeNS(ic,t.slice(6,t.length)):e.setAttributeNS(ic,t,n):null==n||i&&!(n||""===n)?e.removeAttribute(t):e.setAttribute(t,i?"":I(n)?String(n):n)}function id(e,t,n,l,r){if("innerHTML"===t||"textContent"===t){null!=n&&(e[t]="innerHTML"===t?r$(n):n);return}let i=e.tagName;if("value"===t&&"PROGRESS"!==i&&!i.includes("-")){let l="OPTION"===i?e.getAttribute("value")||"":e.value,r=null==n?"checkbox"===e.type?"on":"":String(n);l===r&&"_value"in e||(e.value=r),null==n&&e.removeAttribute(t),e._value=n;return}let s=!1;if(""===n||null==n){let l=typeof e[t];if("boolean"===l){var o;n=!!(o=n)||""===o}else null==n&&"string"===l?(n="",s=!0):"number"===l&&(n=0,s=!0)}try{e[t]=n}catch(e){}s&&e.removeAttribute(r||t)}function ih(e,t,n,l){e.addEventListener(t,n,l)}let ig=Symbol("_vei"),iv=/(?:Once|Passive|Capture)$/,im=0,i_=Promise.resolve(),iy=()=>im||(i_.then(()=>im=0),im=Date.now()),ib=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&123>e.charCodeAt(2),iS={};function iC(e,t,n){let l=nb(e,t);j(l)&&x(l,t);class r extends iw{constructor(e){super(l,e,n)}}return r.def=l,r}let ix="undefined"!=typeof HTMLElement?HTMLElement:class{};class iw extends ix{constructor(e,t={},n=i0){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==i0?this._root=this.shadowRoot:!1!==e.shadowRoot?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof iw){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,tq(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e<this.attributes.length;e++)this._setAttr(this.attributes[e].name);this._ob=new MutationObserver(e=>{for(let t of e)this._setAttr(t.attributeName)}),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{let n;this._resolved=!0,this._pendingResolve=void 0;let{props:l,styles:r}=e;if(l&&!T(l))for(let e in l){let t=l[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=ee(this._props[e])),(n||(n=Object.create(null)))[K(e)]=!0)}this._numberProps=n,t&&this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then(t=>e(this._def=t,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)k(this,e)||Object.defineProperty(this,e,{get:()=>tw(t[e])})}_resolveProps(e){let{props:t}=e,n=T(t)?t:Object.keys(t||{});for(let e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(K))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):iS,l=K(e);t&&this._numberProps&&this._numberProps[l]&&(n=ee(n)),this._setProp(l,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,l=!1){if(t!==this._props[e]&&(t===iS?delete this._props[e]:(this._props[e]=t,"key"===e&&this._app&&(this._app._ceVNode.key=t)),l&&this._instance&&this._update(),n)){let n=this._ob;n&&n.disconnect(),!0===t?this.setAttribute(q(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(q(e),t+""):t||this.removeAttribute(q(e)),n&&n.observe(this,{attributes:!0})}}_update(){iQ(this._createVNode(),this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=rh(this._def,x(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,j(t[0])?x({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),q(e)!==e&&t(q(e),n)},this._setParent()}),t}_applyStyles(e,t){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let n=this._nonce;for(let t=e.length-1;t>=0;t--){let l=document.createElement("style");n&&l.setAttribute("nonce",n),l.textContent=e[t],this.shadowRoot.prepend(l)}}_parseSlots(){let e;let t=this._slots={};for(;e=this.firstChild;){let n=1===e.nodeType&&e.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(e),this.removeChild(e)}}_renderSlots(){let e=(this._teleportTarget||this).querySelectorAll("slot"),t=this._instance.type.__scopeId;for(let n=0;n<e.length;n++){let l=e[n],r=l.getAttribute("name")||"default",i=this._slots[r],s=l.parentNode;if(i)for(let e of i){if(t&&1===e.nodeType){let n;let l=t+"-s",r=document.createTreeWalker(e,1);for(e.setAttribute(l,"");n=r.nextNode();)n.setAttribute(l,"")}s.insertBefore(e,l)}else for(;l.firstChild;)s.insertBefore(l.firstChild,l);s.removeChild(l)}}_injectChildStyle(e){this._applyStyles(e.styles,e)}_removeChildStyle(e){}}function iE(e){let t=rk();return t&&t.ce||null}let ik=new WeakMap,iT=new WeakMap,iA=Symbol("_moveCb"),iR=Symbol("_enterCb"),iO=(n={name:"TransitionGroup",props:x({},rJ,{tag:String,moveClass:String}),setup(e,{slots:t}){let n,l;let r=rk(),i=na();return nJ(()=>{if(!n.length)return;let t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){let l=e.cloneNode(),r=e[rq];r&&r.forEach(e=>{e.split(/\s+/).forEach(e=>e&&l.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&l.classList.add(e)),l.style.display="none";let i=1===t.nodeType?t:t.parentNode;i.appendChild(l);let{hasTransform:s}=r8(l);return i.removeChild(l),s}(n[0].el,r.vnode.el,t))return;n.forEach(iN),n.forEach(iP);let l=n.filter(iM);r9(),l.forEach(e=>{let n=e.el,l=n.style;r0(n,t),l.transform=l.webkitTransform=l.transitionDuration="";let r=n[iA]=e=>{(!e||e.target===n)&&(!e||/transform$/.test(e.propertyName))&&(n.removeEventListener("transitionend",r),n[iA]=null,r1(n,t))};n.addEventListener("transitionend",r)})}),()=>{let s=tg(e),o=rQ(s),a=s.tag||l5;if(n=[],l)for(let e=0;e<l.length;e++){let t=l[e];t.el&&t.el instanceof Element&&(n.push(t),n_(t,ng(t,o,i,r)),ik.set(t,t.el.getBoundingClientRect()))}l=t.default?ny(t.default()):[];for(let e=0;e<l.length;e++){let t=l[e];null!=t.key&&n_(t,ng(t,o,i,r))}return rh(a,null,l)}}},delete n.props.mode,n);function iN(e){let t=e.el;t[iA]&&t[iA](),t[iR]&&t[iR]()}function iP(e){iT.set(e,e.el.getBoundingClientRect())}function iM(e){let t=ik.get(e),n=iT.get(e),l=t.left-n.left,r=t.top-n.top;if(l||r){let t=e.el.style;return t.transform=t.webkitTransform=`translate(${l}px,${r}px)`,t.transitionDuration="0s",e}}let iI=e=>{let t=e.props["onUpdate:modelValue"]||!1;return T(t)?e=>Z(t,e):t};function iL(e){e.target.composing=!0}function iD(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}let iF=Symbol("_assign"),iV={created(e,{modifiers:{lazy:t,trim:n,number:l}},r){e[iF]=iI(r);let i=l||r.props&&"number"===r.props.type;ih(e,t?"change":"input",t=>{if(t.target.composing)return;let l=e.value;n&&(l=l.trim()),i&&(l=Q(l)),e[iF](l)}),n&&ih(e,"change",()=>{e.value=e.value.trim()}),t||(ih(e,"compositionstart",iL),ih(e,"compositionend",iD),ih(e,"change",iD))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:l,trim:r,number:i}},s){if(e[iF]=iI(s),e.composing)return;let o=(i||"number"===e.type)&&!/^0\d/.test(e.value)?Q(e.value):e.value,a=null==t?"":t;o===a||document.activeElement===e&&"range"!==e.type&&(l&&t===n||r&&e.value.trim()===a)||(e.value=a)}},iU={deep:!0,created(e,t,n){e[iF]=iI(n),ih(e,"change",()=>{let t=e._modelValue,n=iW(e),l=e.checked,r=e[iF];if(T(t)){let e=ec(t,n),i=-1!==e;if(l&&!i)r(t.concat(n));else if(!l&&i){let n=[...t];n.splice(e,1),r(n)}}else if(R(t)){let e=new Set(t);l?e.add(n):e.delete(n),r(e)}else r(iK(e,l))})},mounted:ij,beforeUpdate(e,t,n){e[iF]=iI(n),ij(e,t,n)}};function ij(e,{value:t,oldValue:n},l){let r;if(e._modelValue=t,T(t))r=ec(t,l.props.value)>-1;else if(R(t))r=t.has(l.props.value);else{if(t===n)return;r=eu(t,iK(e,!0))}e.checked!==r&&(e.checked=r)}let iB={created(e,{value:t},n){e.checked=eu(t,n.props.value),e[iF]=iI(n),ih(e,"change",()=>{e[iF](iW(e))})},beforeUpdate(e,{value:t,oldValue:n},l){e[iF]=iI(l),t!==n&&(e.checked=eu(t,l.props.value))}},i$={deep:!0,created(e,{value:t,modifiers:{number:n}},l){let r=R(t);ih(e,"change",()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?Q(iW(e)):iW(e));e[iF](e.multiple?r?new Set(t):t:t[0]),e._assigning=!0,tq(()=>{e._assigning=!1})}),e[iF]=iI(l)},mounted(e,{value:t}){iH(e,t)},beforeUpdate(e,t,n){e[iF]=iI(n)},updated(e,{value:t}){e._assigning||iH(e,t)}};function iH(e,t){let n=e.multiple,l=T(t);if(!n||l||R(t)){for(let r=0,i=e.options.length;r<i;r++){let i=e.options[r],s=iW(i);if(n){if(l){let e=typeof s;"string"===e||"number"===e?i.selected=t.some(e=>String(e)===String(s)):i.selected=ec(t,s)>-1}else i.selected=t.has(s)}else if(eu(iW(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function iW(e){return"_value"in e?e._value:e.value}function iK(e,t){let n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}function iz(e,t,n,l,r){let i=function(e,t){switch(e){case"SELECT":return i$;case"TEXTAREA":return iV;default:switch(t){case"checkbox":return iU;case"radio":return iB;default:return iV}}}(e.tagName,n.props&&n.props.type)[r];i&&i(e,t,n,l)}let iq=["ctrl","shift","alt","meta"],iG={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>iq.some(n=>e[`${n}Key`]&&!t.includes(n))},iJ={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},iX=x({patchProp:(e,t,n,l,r,i)=>{let s="svg"===r;"class"===t?function(e,t,n){let l=e[rq];l&&(t=(t?[t,...l]:[...l]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,l,s):"style"===t?function(e,t,n){let l=e.style,r=M(n),i=!1;if(n&&!r){if(t){if(M(t))for(let e of t.split(";")){let t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&io(l,t,"")}else for(let e in t)null==n[e]&&io(l,e,"")}for(let e in n)"display"===e&&(i=!0),io(l,e,n[e])}else if(r){if(t!==n){let e=l[il];e&&(n+=";"+e),l.cssText=n,i=ii.test(n)}}else t&&e.removeAttribute("style");r7 in e&&(e[r7]=i?l.display:"",e[ie]&&(l.display="none"))}(e,n,l):S(t)?C(t)||function(e,t,n,l,r=null){let i=e[ig]||(e[ig]={}),s=i[t];if(l&&s)s.value=l;else{let[n,o]=function(e){let t;if(iv.test(e)){let n;for(t={};n=e.match(iv);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):q(e.slice(2)),t]}(t);l?ih(e,n,i[t]=function(e,t){let n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();tV(function(e,t){if(!T(t))return t;{let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}}(e,n.value),t,5,[e])};return n.value=e,n.attached=iy(),n}(l,r),o):s&&(!function(e,t,n,l){e.removeEventListener(t,n,l)}(e,n,s,o),i[t]=void 0)}}(e,t,0,l,i):("."===t[0]?(t=t.slice(1),0):"^"===t[0]?(t=t.slice(1),1):!function(e,t,n,l){if(l)return!!("innerHTML"===t||"textContent"===t||t in e&&ib(t)&&P(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"form"===t||"list"===t&&"INPUT"===e.tagName||"type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){let t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return!(ib(t)&&M(n))&&t in e}(e,t,l,s))?e._isVueCE&&(/[A-Z]/.test(t)||!M(l))?id(e,K(t),l,i,t):("true-value"===t?e._trueValue=l:"false-value"===t&&(e._falseValue=l),ip(e,t,l,s)):(id(e,t,l),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||ip(e,t,l,s,i,"value"!==t))}},{insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,l)=>{let r="svg"===t?rH.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?rH.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?rH.createElement(e,{is:n}):rH.createElement(e);return"select"===e&&l&&null!=l.multiple&&r.setAttribute("multiple",l.multiple),r},createText:e=>rH.createTextNode(e),createComment:e=>rH.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>rH.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,l,r,i){let s=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==i&&(r=r.nextSibling););else{rW.innerHTML=r$("svg"===l?`<svg>${e}</svg>`:"mathml"===l?`<math>${e}</math>`:e);let r=rW.content;if("svg"===l||"mathml"===l){let e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}}),iZ=!1;function iY(){return p=iZ?p:lI(iX),iZ=!0,p}let iQ=(...e)=>{(p||(p=lL(iX))).render(...e)},i0=(...e)=>{let t=(p||(p=lL(iX))).createApp(...e),{mount:n}=t;return t.mount=e=>{let l=i6(e);if(!l)return;let r=t._component;P(r)||r.render||r.template||(r.template=l.innerHTML),1===l.nodeType&&(l.textContent="");let i=n(l,!1,i2(l));return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),i},t},i1=(...e)=>{let t=iY().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=i6(e);if(t)return n(t,!0,i2(t))},t};function i2(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function i6(e){return M(e)?document.querySelector(e):e}return e.BaseTransition=nd,e.BaseTransitionPropsValidators=nc,e.Comment=l7,e.DeprecationTypes=null,e.EffectScope=eg,e.ErrorCodes={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},e.ErrorTypeStrings=null,e.Fragment=l5,e.KeepAlive={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=rk(),l=n.ctx,r=new Map,i=new Set,s=null,o=n.suspense,{renderer:{p:a,m:u,um:c,o:{createElement:f}}}=l,p=f("div");function d(e){n$(e),c(e,n,o,!0)}function h(e){r.forEach((t,n)=>{let l=rD(t.type);l&&!e(l)&&g(n)})}function g(e){let t=r.get(e);!t||s&&rc(t,s)?s&&n$(s):d(t),r.delete(e),i.delete(e)}l.activate=(e,t,n,l,r)=>{let i=e.component;u(e,t,n,0,o),a(i.vnode,e,t,n,i,o,l,e.slotScopeIds,r),lM(()=>{i.isDeactivated=!1,i.a&&Z(i.a);let t=e.props&&e.props.onVnodeMounted;t&&rC(t,i.parent,e)},o)},l.deactivate=e=>{let t=e.component;lj(t.m),lj(t.a),u(e,p,null,1,o),lM(()=>{t.da&&Z(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&rC(n,t.parent,e),t.isDeactivated=!0},o)},lH(()=>[e.include,e.exclude],([e,t])=>{e&&h(t=>nV(e,t)),t&&h(e=>!nV(t,e))},{flush:"post",deep:!0});let m=null,_=()=>{null!=m&&(l0(n.subTree.type)?lM(()=>{r.set(m,nH(n.subTree))},n.subTree.suspense):r.set(m,nH(n.subTree)))};return nq(_),nJ(_),nX(()=>{r.forEach(e=>{let{subTree:t,suspense:l}=n,r=nH(t);if(e.type===r.type&&e.key===r.key){n$(r);let e=r.component.da;e&&lM(e,l);return}d(e)})}),()=>{if(m=null,!t.default)return s=null;let n=t.default(),l=n[0];if(n.length>1)return s=null,n;if(!ru(l)||!(4&l.shapeFlag)&&!(128&l.shapeFlag))return s=null,l;let o=nH(l);if(o.type===l7)return s=null,o;let a=o.type,u=rD(nL(o)?o.type.__asyncResolved||{}:a),{include:c,exclude:f,max:p}=e;if(c&&(!u||!nV(c,u))||f&&u&&nV(f,u))return o.shapeFlag&=-257,s=o,l;let d=null==o.key?a:o.key,h=r.get(d);return o.el&&(o=rv(o),128&l.shapeFlag&&(l.ssContent=o)),m=d,h?(o.el=h.el,o.component=h.component,o.transition&&n_(o,o.transition),o.shapeFlag|=512,i.delete(d),i.add(d)):(i.add(d),p&&i.size>parseInt(p,10)&&g(i.values().next().value)),o.shapeFlag|=256,s=o,l0(l.type)?l:o}}},e.ReactiveEffect=em,e.Static=re,e.Suspense={name:"Suspense",__isSuspense:!0,process(e,t,n,l,r,i,s,o,a,u){if(null==e)(function(e,t,n,l,r,i,s,o,a){let{p:u,o:{createElement:c}}=a,f=c("div"),p=e.suspense=l6(e,r,l,t,f,n,i,s,o,a);u(null,p.pendingBranch=e.ssContent,f,null,l,p,i,s),p.deps>0?(l2(e,"onPending"),l2(e,"onFallback"),u(null,e.ssFallback,t,n,l,null,i,s),l3(p,e.ssFallback)):p.resolve(!1,!0)})(t,n,l,r,i,s,o,a,u);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}(function(e,t,n,l,r,i,s,o,{p:a,um:u,o:{createElement:c}}){let f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;let p=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:g,isInFallback:m,isHydrating:_}=f;if(g)f.pendingBranch=p,rc(p,g)?(a(g,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0?f.resolve():m&&!_&&(a(h,d,n,l,r,null,i,s,o),l3(f,d))):(f.pendingId=l1++,_?(f.isHydrating=!1,f.activeBranch=g):u(g,r,f),f.deps=0,f.effects.length=0,f.hiddenContainer=c("div"),m?(a(null,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0?f.resolve():(a(h,d,n,l,r,null,i,s,o),l3(f,d))):h&&rc(p,h)?(a(h,p,n,l,r,f,i,s,o),f.resolve(!0)):(a(null,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0&&f.resolve()));else if(h&&rc(p,h))a(h,p,n,l,r,f,i,s,o),l3(f,p);else if(l2(t,"onPending"),f.pendingBranch=p,512&p.shapeFlag?f.pendingId=p.component.suspenseId:f.pendingId=l1++,a(null,p,f.hiddenContainer,null,r,f,i,s,o),f.deps<=0)f.resolve();else{let{timeout:e,pendingId:t}=f;e>0?setTimeout(()=>{f.pendingId===t&&f.fallback(d)},e):0===e&&f.fallback(d)}})(e,t,n,l,r,s,o,a,u)}},hydrate:function(e,t,n,l,r,i,s,o,a){let u=t.suspense=l6(t,l,n,e.parentNode,document.createElement("div"),null,r,i,s,o,!0),c=a(e,u.pendingBranch=t.ssContent,n,u,i,s);return 0===u.deps&&u.resolve(!1,!0),c},normalize:function(e){let{shapeFlag:t,children:n}=e,l=32&t;e.ssContent=l4(l?n.default:n),e.ssFallback=l?l4(n.fallback):rh(l7)}},e.Teleport=nn,e.Text=l9,e.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},e.Transition=rX,e.TransitionGroup=iO,e.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},e.VueElement=iw,e.assertNumber=function(e,t){},e.callWithAsyncErrorHandling=tV,e.callWithErrorHandling=tF,e.camelize=K,e.capitalize=G,e.cloneVNode=rv,e.compatUtils=null,e.compile=()=>{},e.computed=rF,e.createApp=i0,e.createBlock=ra,e.createCommentVNode=function(e="",t=!1){return t?(rl(),ra(l7,null,e)):rh(l7,null,e)},e.createElementBlock=function(e,t,n,l,r,i){return ro(rd(e,t,n,l,r,i,!0))},e.createElementVNode=rd,e.createHydrationRenderer=lI,e.createPropsRestProxy=function(e,t){let n={};for(let l in e)t.includes(l)||Object.defineProperty(n,l,{enumerable:!0,get:()=>e[l]});return n},e.createRenderer=function(e){return lL(e)},e.createSSRApp=i1,e.createSlots=function(e,t){for(let n=0;n<t.length;n++){let l=t[n];if(T(l))for(let t=0;t<l.length;t++)e[l[t].name]=l[t].fn;else l&&(e[l.name]=l.key?(...e)=>{let t=l.fn(...e);return t&&(t.key=l.key),t}:l.fn)}return e},e.createStaticVNode=function(e,t){let n=rh(re,null,e);return n.staticCount=t,n},e.createTextVNode=rm,e.createVNode=rh,e.customRef=tA,e.defineAsyncComponent=function(e){let t;P(e)&&(e={loader:e});let{loader:n,loadingComponent:l,errorComponent:r,delay:i=200,hydrate:s,timeout:o,suspensible:a=!0,onError:u}=e,c=null,f=0,p=()=>(f++,c=null,d()),d=()=>{let e;return c||(e=c=n().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),u)return new Promise((t,n)=>{u(e,()=>t(p()),()=>n(e),f+1)});throw e}).then(n=>e!==c&&c?c:(n&&(n.__esModule||"Module"===n[Symbol.toStringTag])&&(n=n.default),t=n,n)))};return nb({name:"AsyncComponentWrapper",__asyncLoader:d,__asyncHydrate(e,n,l){let r=s?()=>{let t=s(l,t=>(function(e,t){if(nA(e)&&"["===e.data){let n=1,l=e.nextSibling;for(;l;){if(1===l.nodeType){if(!1===t(l))break}else if(nA(l)){if("]"===l.data){if(0==--n)break}else"["===l.data&&n++}l=l.nextSibling}}else t(e)})(e,t));t&&(n.bum||(n.bum=[])).push(t)}:l;t?r():d().then(()=>!n.isUnmounted&&r())},get __asyncResolved(){return t},setup(){let e=rE;if(nS(e),t)return()=>nD(t,e);let n=t=>{c=null,tU(t,e,13,!r)};if(a&&e.suspense)return d().then(t=>()=>nD(t,e)).catch(e=>(n(e),()=>r?rh(r,{error:e}):null));let s=tb(!1),u=tb(),f=tb(!!i);return i&&setTimeout(()=>{f.value=!1},i),null!=o&&setTimeout(()=>{if(!s.value&&!u.value){let e=Error(`Async component timed out after ${o}ms.`);n(e),u.value=e}},o),d().then(()=>{s.value=!0,e.parent&&nF(e.parent.vnode)&&e.parent.update()}).catch(e=>{n(e),u.value=e}),()=>s.value&&t?nD(t,e):u.value&&r?rh(r,{error:u.value}):l&&!f.value?rh(l):void 0}})},e.defineComponent=nb,e.defineCustomElement=iC,e.defineEmits=function(){return null},e.defineExpose=function(e){},e.defineModel=function(){},e.defineOptions=function(e){},e.defineProps=function(){return null},e.defineSSRCustomElement=(e,t)=>iC(e,t,i1),e.defineSlots=function(){return null},e.devtools=void 0,e.effect=function(e,t){e.effect instanceof em&&(e=e.effect.fn);let n=new em(e);t&&x(n,t);try{n.run()}catch(e){throw n.stop(),e}let l=n.run.bind(n);return l.effect=n,l},e.effectScope=function(e){return new eg(e)},e.getCurrentInstance=rk,e.getCurrentScope=function(){return r},e.getCurrentWatcher=function(){return d},e.getTransitionRawChildren=ny,e.guardReactiveProps=rg,e.h=rV,e.handleError=tU,e.hasInjectionContext=function(){return!!(rE||t0||lg)},e.hydrate=(...e)=>{iY().hydrate(...e)},e.hydrateOnIdle=(e=1e4)=>t=>{let n=nM(t,{timeout:e});return()=>nI(n)},e.hydrateOnInteraction=(e=[])=>(t,n)=>{M(e)&&(e=[e]);let l=!1,r=e=>{l||(l=!0,i(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},i=()=>{n(t=>{for(let n of e)t.removeEventListener(n,r)})};return n(t=>{for(let n of e)t.addEventListener(n,r,{once:!0})}),i},e.hydrateOnMediaQuery=e=>t=>{if(e){let n=matchMedia(e);if(!n.matches)return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t);t()}},e.hydrateOnVisible=e=>(t,n)=>{let l=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){l.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(function(e){let{top:t,left:n,bottom:l,right:r}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:s}=window;return(t>0&&t<i||l>0&&l<i)&&(n>0&&n<s||r>0&&r<s)}(e))return t(),l.disconnect(),!1;l.observe(e)}}),()=>l.disconnect()},e.initCustomFormatter=function(){},e.initDirectivesForSSR=y,e.inject=lm,e.isMemoSame=rU,e.isProxy=th,e.isReactive=tf,e.isReadonly=tp,e.isRef=ty,e.isRuntimeOnly=()=>!c,e.isShallow=td,e.isVNode=ru,e.markRaw=tv,e.mergeDefaults=function(e,t){let n=ln(e);for(let e in t){if(e.startsWith("__skip"))continue;let l=n[e];l?T(l)||P(l)?l=n[e]={type:l,default:t[e]}:l.default=t[e]:null===l&&(l=n[e]={default:t[e]}),l&&t[`__skip_${e}`]&&(l.skipFactory=!0)}return n},e.mergeModels=function(e,t){return e&&t?T(e)&&T(t)?e.concat(t):x({},ln(e),ln(t)):e||t},e.mergeProps=rS,e.nextTick=tq,e.normalizeClass=eo,e.normalizeProps=function(e){if(!e)return null;let{class:t,style:n}=e;return t&&!M(t)&&(e.class=eo(t)),n&&(e.style=el(n)),e},e.normalizeStyle=el,e.onActivated=nU,e.onBeforeMount=nz,e.onBeforeUnmount=nX,e.onBeforeUpdate=nG,e.onDeactivated=nj,e.onErrorCaptured=n1,e.onMounted=nq,e.onRenderTracked=n0,e.onRenderTriggered=nQ,e.onScopeDispose=function(e,t=!1){r&&r.cleanups.push(e)},e.onServerPrefetch=nY,e.onUnmounted=nZ,e.onUpdated=nJ,e.onWatcherCleanup=tL,e.openBlock=rl,e.popScopeId=function(){t1=null},e.provide=lv,e.proxyRefs=tk,e.pushScopeId=function(e){t1=e},e.queuePostFlushCb=tX,e.reactive=to,e.readonly=tu,e.ref=tb,e.registerRuntimeCompiler=function(e){c=e,f=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,le))}},e.render=iQ,e.renderList=function(e,t,n,l){let r;let i=n&&n[l],s=T(e);if(s||M(e)){let n=s&&tf(e),l=!1;n&&(l=!td(e),e=eB(e)),r=Array(e.length);for(let n=0,s=e.length;n<s;n++)r[n]=t(l?tm(e[n]):e[n],n,void 0,i&&i[n])}else if("number"==typeof e){r=Array(e);for(let n=0;n<e;n++)r[n]=t(n+1,n,void 0,i&&i[n])}else if(L(e)){if(e[Symbol.iterator])r=Array.from(e,(e,n)=>t(e,n,void 0,i&&i[n]));else{let n=Object.keys(e);r=Array(n.length);for(let l=0,s=n.length;l<s;l++){let s=n[l];r[l]=t(e[s],s,l,i&&i[l])}}}else r=[];return n&&(n[l]=r),r},e.renderSlot=function(e,t,n={},l,r){if(t0.ce||t0.parent&&nL(t0.parent)&&t0.parent.ce)return"default"!==t&&(n.name=t),rl(),ra(l5,null,[rh("slot",n,l&&l())],64);let i=e[t];i&&i._c&&(i._d=!1),rl();let s=i&&function e(t){return t.some(t=>!ru(t)||!!(t.type!==l7&&(t.type!==l5||e(t.children))))?t:null}(i(n)),o=n.key||s&&s.key,a=ra(l5,{key:(o&&!I(o)?o:`_${t}`)+(!s&&l?"_fb":"")},s||(l?l():[]),s&&1===e._?64:-2);return!r&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),i&&i._c&&(i._d=!0),a},e.resolveComponent=function(e,t){return n4(n2,e,!0,t)||e},e.resolveDirective=function(e){return n4("directives",e)},e.resolveDynamicComponent=function(e){return M(e)?n4(n2,e,!1)||e:e||n6},e.resolveFilter=null,e.resolveTransitionHooks=ng,e.setBlockTracking=rs,e.setDevtoolsHook=y,e.setTransitionHooks=n_,e.shallowReactive=ta,e.shallowReadonly=function(e){return tc(e,!0,e4,tn,ts)},e.shallowRef=tS,e.ssrContextKey=lB,e.ssrUtils=null,e.stop=function(e){e.effect.stop()},e.toDisplayString=ep,e.toHandlerKey=J,e.toHandlers=function(e,t){let n={};for(let l in e)n[t&&/[A-Z]/.test(l)?`on:${l}`:J(l)]=e[l];return n},e.toRaw=tg,e.toRef=function(e,t,n){return ty(e)?e:P(e)?new tO(e):L(e)&&arguments.length>1?tN(e,t,n):tb(e)},e.toRefs=function(e){let t=T(e)?Array(e.length):{};for(let n in e)t[n]=tN(e,n);return t},e.toValue=function(e){return P(e)?e():tw(e)},e.transformVNodeArgs=function(e){},e.triggerRef=function(e){e.dep&&e.dep.trigger()},e.unref=tw,e.useAttrs=function(){return lt().attrs},e.useCssModule=function(e="$style"){return m},e.useCssVars=function(e){let t=rk();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>ir(e,n))},l=()=>{let l=e(t.proxy);t.ce?ir(t.ce,l):function e(t,n){if(128&t.shapeFlag){let l=t.suspense;t=l.activeBranch,l.pendingBranch&&!l.isHydrating&&l.effects.push(()=>{e(l.activeBranch,n)})}for(;t.component;)t=t.component.subTree;if(1&t.shapeFlag&&t.el)ir(t.el,n);else if(t.type===l5)t.children.forEach(t=>e(t,n));else if(t.type===re){let{el:e,anchor:l}=t;for(;e&&(ir(e,n),e!==l);)e=e.nextSibling}}(t.subTree,l),n(l)};nG(()=>{tX(l)}),nq(()=>{lH(l,y,{flush:"post"});let e=new MutationObserver(l);e.observe(t.subTree.el.parentNode,{childList:!0}),nZ(()=>e.disconnect())})},e.useHost=iE,e.useId=function(){let e=rk();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""},e.useModel=function(e,t,n=m){let l=rk(),r=K(t),i=q(t),s=lz(e,r),o=tA((s,o)=>{let a,u;let c=m;return l$(()=>{let t=e[r];X(a,t)&&(a=t,o())}),{get:()=>(s(),n.get?n.get(a):a),set(e){let s=n.set?n.set(e):e;if(!X(s,a)&&!(c!==m&&X(e,c)))return;let f=l.vnode.props;f&&(t in f||r in f||i in f)&&(`onUpdate:${t}`in f||`onUpdate:${r}`in f||`onUpdate:${i}`in f)||(a=e,o()),l.emit(`update:${t}`,s),X(e,s)&&X(e,c)&&!X(s,u)&&o(),c=e,u=s}}});return o[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?s||m:o,done:!1}:{done:!0}}},o},e.useSSRContext=()=>{},e.useShadowRoot=function(){let e=iE();return e&&e.shadowRoot},e.useSlots=function(){return lt().slots},e.useTemplateRef=function(e){let t=rk(),n=tS(null);return t&&Object.defineProperty(t.refs===m?t.refs={}:t.refs,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e}),n},e.useTransitionState=na,e.vModelCheckbox=iU,e.vModelDynamic={created(e,t,n){iz(e,t,n,null,"created")},mounted(e,t,n){iz(e,t,n,null,"mounted")},beforeUpdate(e,t,n,l){iz(e,t,n,l,"beforeUpdate")},updated(e,t,n,l){iz(e,t,n,l,"updated")}},e.vModelRadio=iB,e.vModelSelect=i$,e.vModelText=iV,e.vShow={beforeMount(e,{value:t},{transition:n}){e[r7]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):it(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:l}){!t!=!n&&(l?t?(l.beforeEnter(e),it(e,!0),l.enter(e)):l.leave(e,()=>{it(e,!1)}):it(e,t))},beforeUnmount(e,{value:t}){it(e,t)}},e.version=rj,e.warn=y,e.watch=function(e,t,n){return lH(e,t,n)},e.watchEffect=function(e,t){return lH(e,null,t)},e.watchPostEffect=function(e,t){return lH(e,null,{flush:"post"})},e.watchSyncEffect=l$,e.withAsyncContext=function(e){let t=rk(),n=e();return rA(),D(n)&&(n=n.catch(e=>{throw rT(t),e})),[n,()=>rT(t)]},e.withCtx=t6,e.withDefaults=function(e,t){return null},e.withDirectives=function(e,t){if(null===t0)return e;let n=rL(t0),l=e.dirs||(e.dirs=[]);for(let e=0;e<t.length;e++){let[r,i,s,o=m]=t[e];r&&(P(r)&&(r={mounted:r,updated:r}),r.deep&&tD(i),l.push({dir:r,instance:n,value:i,oldValue:void 0,arg:s,modifiers:o}))}return e},e.withKeys=(e,t)=>{let n=e._withKeys||(e._withKeys={}),l=t.join(".");return n[l]||(n[l]=n=>{if(!("key"in n))return;let l=q(n.key);if(t.some(e=>e===l||iJ[e]===l))return e(n)})},e.withMemo=function(e,t,n,l){let r=n[l];if(r&&rU(r,e))return r;let i=t();return i.memo=e.slice(),i.cacheIndex=l,n[l]=i},e.withModifiers=(e,t)=>{let n=e._withMods||(e._withMods={}),l=t.join(".");return n[l]||(n[l]=(n,...l)=>{for(let e=0;e<t.length;e++){let l=iG[t[e]];if(l&&l(n,t))return}return e(n,...l)})},e.withScopeId=e=>t6,e}({}); diff --git a/vuetest/node_modules/vue/index.js b/vuetest/node_modules/vue/index.js new file mode 100644 index 0000000..7a3dc2d --- /dev/null +++ b/vuetest/node_modules/vue/index.js @@ -0,0 +1,7 @@ +'use strict' + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/vue.cjs.prod.js') +} else { + module.exports = require('./dist/vue.cjs.js') +} diff --git a/vuetest/node_modules/vue/index.mjs b/vuetest/node_modules/vue/index.mjs new file mode 100644 index 0000000..fcb9204 --- /dev/null +++ b/vuetest/node_modules/vue/index.mjs @@ -0,0 +1 @@ +export * from './index.js' diff --git a/vuetest/node_modules/vue/jsx-runtime/index.d.ts b/vuetest/node_modules/vue/jsx-runtime/index.d.ts new file mode 100644 index 0000000..a52ac66 --- /dev/null +++ b/vuetest/node_modules/vue/jsx-runtime/index.d.ts @@ -0,0 +1,25 @@ +/* eslint-disable @typescript-eslint/prefer-ts-expect-error */ +import type { NativeElements, ReservedProps, VNode } from '@vue/runtime-dom' + +/** + * JSX namespace for usage with @jsxImportsSource directive + * when ts compilerOptions.jsx is 'react-jsx' or 'react-jsxdev' + * https://www.typescriptlang.org/tsconfig#jsxImportSource + */ +export { h as jsx, h as jsxDEV, Fragment } from '@vue/runtime-dom' + +export namespace JSX { + export interface Element extends VNode {} + export interface ElementClass { + $props: {} + } + export interface ElementAttributesProperty { + $props: {} + } + export interface IntrinsicElements extends NativeElements { + // allow arbitrary elements + // @ts-ignore suppress ts:2374 = Duplicate string index signature. + [name: string]: any + } + export interface IntrinsicAttributes extends ReservedProps {} +} diff --git a/vuetest/node_modules/vue/jsx-runtime/index.js b/vuetest/node_modules/vue/jsx-runtime/index.js new file mode 100644 index 0000000..73b137d --- /dev/null +++ b/vuetest/node_modules/vue/jsx-runtime/index.js @@ -0,0 +1,15 @@ +const { h, Fragment } = require('vue') + +function jsx(type, props, key) { + const { children } = props + delete props.children + if (arguments.length > 2) { + props.key = key + } + return h(type, props, children) +} + +exports.jsx = jsx +exports.jsxs = jsx +exports.jsxDEV = jsx +exports.Fragment = Fragment diff --git a/vuetest/node_modules/vue/jsx-runtime/index.mjs b/vuetest/node_modules/vue/jsx-runtime/index.mjs new file mode 100644 index 0000000..e2528cb --- /dev/null +++ b/vuetest/node_modules/vue/jsx-runtime/index.mjs @@ -0,0 +1,12 @@ +import { h, Fragment } from 'vue' + +function jsx(type, props, key) { + const { children } = props + delete props.children + if (arguments.length > 2) { + props.key = key + } + return h(type, props, children) +} + +export { Fragment, jsx, jsx as jsxs, jsx as jsxDEV } diff --git a/vuetest/node_modules/vue/jsx-runtime/package.json b/vuetest/node_modules/vue/jsx-runtime/package.json new file mode 100644 index 0000000..778c7eb --- /dev/null +++ b/vuetest/node_modules/vue/jsx-runtime/package.json @@ -0,0 +1,5 @@ +{ + "main": "index.js", + "module": "index.mjs", + "types": "index.d.ts" +} diff --git a/vuetest/node_modules/vue/jsx.d.ts b/vuetest/node_modules/vue/jsx.d.ts new file mode 100644 index 0000000..1fa1e32 --- /dev/null +++ b/vuetest/node_modules/vue/jsx.d.ts @@ -0,0 +1,22 @@ +/* eslint-disable @typescript-eslint/prefer-ts-expect-error */ +// global JSX namespace registration +// somehow we have to copy=pase the jsx-runtime types here to make TypeScript happy +import type { NativeElements, ReservedProps, VNode } from '@vue/runtime-dom' + +declare global { + namespace JSX { + export interface Element extends VNode {} + export interface ElementClass { + $props: {} + } + export interface ElementAttributesProperty { + $props: {} + } + export interface IntrinsicElements extends NativeElements { + // allow arbitrary elements + // @ts-ignore suppress ts:2374 = Duplicate string index signature. + [name: string]: any + } + export interface IntrinsicAttributes extends ReservedProps {} + } +} diff --git a/vuetest/node_modules/vue/package.json b/vuetest/node_modules/vue/package.json new file mode 100644 index 0000000..8ccab75 --- /dev/null +++ b/vuetest/node_modules/vue/package.json @@ -0,0 +1,112 @@ +{ + "name": "vue", + "version": "3.5.13", + "description": "The progressive JavaScript framework for building modern web UI.", + "main": "index.js", + "module": "dist/vue.runtime.esm-bundler.js", + "types": "dist/vue.d.ts", + "unpkg": "dist/vue.global.js", + "jsdelivr": "dist/vue.global.js", + "files": [ + "index.js", + "index.mjs", + "dist", + "compiler-sfc", + "server-renderer", + "jsx-runtime", + "jsx.d.ts" + ], + "exports": { + ".": { + "import": { + "types": "./dist/vue.d.mts", + "node": "./index.mjs", + "default": "./dist/vue.runtime.esm-bundler.js" + }, + "require": { + "types": "./dist/vue.d.ts", + "node": { + "production": "./dist/vue.cjs.prod.js", + "development": "./dist/vue.cjs.js", + "default": "./index.js" + }, + "default": "./index.js" + } + }, + "./server-renderer": { + "import": { + "types": "./server-renderer/index.d.mts", + "default": "./server-renderer/index.mjs" + }, + "require": { + "types": "./server-renderer/index.d.ts", + "default": "./server-renderer/index.js" + } + }, + "./compiler-sfc": { + "import": { + "types": "./compiler-sfc/index.d.mts", + "browser": "./compiler-sfc/index.browser.mjs", + "default": "./compiler-sfc/index.mjs" + }, + "require": { + "types": "./compiler-sfc/index.d.ts", + "browser": "./compiler-sfc/index.browser.js", + "default": "./compiler-sfc/index.js" + } + }, + "./jsx-runtime": { + "types": "./jsx-runtime/index.d.ts", + "import": "./jsx-runtime/index.mjs", + "require": "./jsx-runtime/index.js" + }, + "./jsx-dev-runtime": { + "types": "./jsx-runtime/index.d.ts", + "import": "./jsx-runtime/index.mjs", + "require": "./jsx-runtime/index.js" + }, + "./jsx": "./jsx.d.ts", + "./dist/*": "./dist/*", + "./package.json": "./package.json" + }, + "buildOptions": { + "name": "Vue", + "formats": [ + "esm-bundler", + "esm-bundler-runtime", + "cjs", + "global", + "global-runtime", + "esm-browser", + "esm-browser-runtime" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/vuejs/core.git" + }, + "keywords": [ + "vue" + ], + "author": "Evan You", + "license": "MIT", + "bugs": { + "url": "https://github.com/vuejs/core/issues" + }, + "homepage": "https://github.com/vuejs/core/tree/main/packages/vue#readme", + "dependencies": { + "@vue/shared": "3.5.13", + "@vue/compiler-dom": "3.5.13", + "@vue/runtime-dom": "3.5.13", + "@vue/server-renderer": "3.5.13", + "@vue/compiler-sfc": "3.5.13" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } +} \ No newline at end of file diff --git a/vuetest/node_modules/vue/server-renderer/index.d.mts b/vuetest/node_modules/vue/server-renderer/index.d.mts new file mode 100644 index 0000000..ac61472 --- /dev/null +++ b/vuetest/node_modules/vue/server-renderer/index.d.mts @@ -0,0 +1 @@ +export * from '@vue/server-renderer' diff --git a/vuetest/node_modules/vue/server-renderer/index.d.ts b/vuetest/node_modules/vue/server-renderer/index.d.ts new file mode 100644 index 0000000..ac61472 --- /dev/null +++ b/vuetest/node_modules/vue/server-renderer/index.d.ts @@ -0,0 +1 @@ +export * from '@vue/server-renderer' diff --git a/vuetest/node_modules/vue/server-renderer/index.js b/vuetest/node_modules/vue/server-renderer/index.js new file mode 100644 index 0000000..1761ed9 --- /dev/null +++ b/vuetest/node_modules/vue/server-renderer/index.js @@ -0,0 +1 @@ +module.exports = require('@vue/server-renderer') diff --git a/vuetest/node_modules/vue/server-renderer/index.mjs b/vuetest/node_modules/vue/server-renderer/index.mjs new file mode 100644 index 0000000..ac61472 --- /dev/null +++ b/vuetest/node_modules/vue/server-renderer/index.mjs @@ -0,0 +1 @@ +export * from '@vue/server-renderer' diff --git a/vuetest/node_modules/vue/server-renderer/package.json b/vuetest/node_modules/vue/server-renderer/package.json new file mode 100644 index 0000000..4cf44a4 --- /dev/null +++ b/vuetest/node_modules/vue/server-renderer/package.json @@ -0,0 +1,4 @@ +{ + "main": "index.js", + "module": "index.mjs" +} diff --git a/vuetest/package-lock.json b/vuetest/package-lock.json new file mode 100644 index 0000000..d4bb187 --- /dev/null +++ b/vuetest/package-lock.json @@ -0,0 +1,311 @@ +{ + "name": "vuetest", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "@element-plus/icons-vue": "^2.3.1" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.25.9", + "resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.25.9", + "resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.26.8", + "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.26.8.tgz", + "integrity": "sha512-TZIQ25pkSoaKEYYaHbbxkfL36GNsQ6iFiBbeuzAkLnXayKR1yP1zFe+NxuZWWsUyvt8icPU9CCq0sgWGXR1GEw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/types": "^7.26.8" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.26.8", + "resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.26.8.tgz", + "integrity": "sha512-eUuWapzEGWFEpHFxgEaBG8e3n6S8L3MSu0oda755rOfabWPnh0Our1AozNFVUxGFIhbKgd1ksprsoDGMinTOTA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@element-plus/icons-vue": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz", + "integrity": "sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==", + "license": "MIT", + "peerDependencies": { + "vue": "^3.2.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "license": "MIT", + "peer": true + }, + "node_modules/@vue/compiler-core": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.5.13.tgz", + "integrity": "sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/parser": "^7.25.3", + "@vue/shared": "3.5.13", + "entities": "^4.5.0", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.0" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.5.13.tgz", + "integrity": "sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@vue/compiler-core": "3.5.13", + "@vue/shared": "3.5.13" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.5.13.tgz", + "integrity": "sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/parser": "^7.25.3", + "@vue/compiler-core": "3.5.13", + "@vue/compiler-dom": "3.5.13", + "@vue/compiler-ssr": "3.5.13", + "@vue/shared": "3.5.13", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.11", + "postcss": "^8.4.48", + "source-map-js": "^1.2.0" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.5.13.tgz", + "integrity": "sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@vue/compiler-dom": "3.5.13", + "@vue/shared": "3.5.13" + } + }, + "node_modules/@vue/reactivity": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.5.13.tgz", + "integrity": "sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@vue/shared": "3.5.13" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.5.13.tgz", + "integrity": "sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@vue/reactivity": "3.5.13", + "@vue/shared": "3.5.13" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.5.13.tgz", + "integrity": "sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==", + "license": "MIT", + "peer": true, + "dependencies": { + "@vue/reactivity": "3.5.13", + "@vue/runtime-core": "3.5.13", + "@vue/shared": "3.5.13", + "csstype": "^3.1.3" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.5.13.tgz", + "integrity": "sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@vue/compiler-ssr": "3.5.13", + "@vue/shared": "3.5.13" + }, + "peerDependencies": { + "vue": "3.5.13" + } + }, + "node_modules/@vue/shared": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.5.13.tgz", + "integrity": "sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==", + "license": "MIT", + "peer": true + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "license": "MIT", + "peer": true + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "license": "MIT", + "peer": true + }, + "node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.8", + "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC", + "peer": true + }, + "node_modules/postcss": { + "version": "8.5.1", + "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.1.tgz", + "integrity": "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "nanoid": "^3.3.8", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/vue": { + "version": "3.5.13", + "resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.13.tgz", + "integrity": "sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@vue/compiler-dom": "3.5.13", + "@vue/compiler-sfc": "3.5.13", + "@vue/runtime-dom": "3.5.13", + "@vue/server-renderer": "3.5.13", + "@vue/shared": "3.5.13" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + } + } +} diff --git a/vuetest/package.json b/vuetest/package.json new file mode 100644 index 0000000..3b033f3 --- /dev/null +++ b/vuetest/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@element-plus/icons-vue": "^2.3.1" + } +} diff --git a/vuetest/springboot/.gitattributes b/vuetest/springboot/.gitattributes new file mode 100644 index 0000000..3b41682 --- /dev/null +++ b/vuetest/springboot/.gitattributes @@ -0,0 +1,2 @@ +/mvnw text eol=lf +*.cmd text eol=crlf diff --git a/vuetest/springboot/.gitignore b/vuetest/springboot/.gitignore new file mode 100644 index 0000000..549e00a --- /dev/null +++ b/vuetest/springboot/.gitignore @@ -0,0 +1,33 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/vuetest/springboot/pom.xml b/vuetest/springboot/pom.xml new file mode 100644 index 0000000..a40b96c --- /dev/null +++ b/vuetest/springboot/pom.xml @@ -0,0 +1,154 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-parent</artifactId> + <version>3.0.5</version> + <relativePath/> <!-- lookup parent from repository --> + </parent> + <groupId>com.example</groupId> + <artifactId>springboot</artifactId> + <version>0.0.1-SNAPSHOT</version> + <name>springboot</name> + <description>springboot</description> + <url/> + <licenses> + <license/> + </licenses> + <developers> + <developer/> + </developers> + <scm> + <connection/> + <developerConnection/> + <tag/> + <url/> + </scm> + <properties> + <java.version>21</java.version> + </properties> + + <!-- 配置阿里云 Maven 仓库 --> + <repositories> + <repository> + <id>aliyun-central</id> + <url>https://maven.aliyun.com/repository/public</url> + </repository> + </repositories> + + <!-- 配置阿里云插件仓库 --> + <pluginRepositories> + <pluginRepository> + <id>aliyun-central</id> + <url>https://maven.aliyun.com/repository/public</url> + </pluginRepository> + </pluginRepositories> + + <dependencies> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web</artifactId> + </dependency> + <dependency> + <groupId>org.mybatis.spring.boot</groupId> + <artifactId>mybatis-spring-boot-starter</artifactId> + <version>3.0.3</version> + </dependency> + <!--引入mybatisplus--> + <dependency> + <groupId>com.baomidou</groupId> + <artifactId>mybatis-plus-boot-starter</artifactId> + <version>3.5.3.1</version> + </dependency> + + <dependency> + <groupId>com.baomidou</groupId> + <artifactId>mybatis-plus-generator</artifactId> + <version>3.5.3.1</version> + </dependency> + + <!-- 引入velocity模板引擎 --> + <dependency> + <groupId>org.apache.velocity</groupId> + <artifactId>velocity-engine-core</artifactId> + <version>2.3</version> + </dependency> + + <!-- 添加 freemarker 模板引擎依赖 --> + <dependency> + <groupId>org.freemarker</groupId> + <artifactId>freemarker</artifactId> + <version>2.3.32</version> + </dependency> + + <dependency> + <groupId>com.mysql</groupId> + <artifactId>mysql-connector-j</artifactId> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mybatis.spring.boot</groupId> + <artifactId>mybatis-spring-boot-starter-test</artifactId> + <version>3.0.3</version> + <scope>test</scope> + </dependency> + <!-- SpringDoc OpenAPI UI --> + <dependency> + <groupId>org.springdoc</groupId> + <artifactId>springdoc-openapi-starter-webmvc-api</artifactId> + <version>2.0.2</version> + </dependency> + <dependency> + <groupId>org.springdoc</groupId> + <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId> + <version>2.0.2</version> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-jdbc</artifactId> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <annotationProcessorPaths> + <path> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + </path> + </annotationProcessorPaths> + </configuration> + </plugin> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <configuration> + <excludes> + <exclude> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + </exclude> + </excludes> + </configuration> + </plugin> + </plugins> + </build> + +</project> + diff --git a/vuetest/springboot/src/main/java/com/example/springboot/SpringbootApplication.java b/vuetest/springboot/src/main/java/com/example/springboot/SpringbootApplication.java new file mode 100644 index 0000000..799177f --- /dev/null +++ b/vuetest/springboot/src/main/java/com/example/springboot/SpringbootApplication.java @@ -0,0 +1,13 @@ +package com.example.springboot; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class SpringbootApplication { + public static void main(String[] args) { + SpringApplication.run(SpringbootApplication.class, args); + } +} + + diff --git a/vuetest/springboot/src/main/java/com/example/springboot/config/CorsConfig.java b/vuetest/springboot/src/main/java/com/example/springboot/config/CorsConfig.java new file mode 100644 index 0000000..b4a5911 --- /dev/null +++ b/vuetest/springboot/src/main/java/com/example/springboot/config/CorsConfig.java @@ -0,0 +1,31 @@ +package com.example.springboot.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import org.springframework.web.filter.CorsFilter; + +@Configuration +public class CorsConfig { + + @Bean + public CorsFilter corsFilter() { + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + CorsConfiguration config = new CorsConfiguration(); + + // 允许跨域的源 + config.addAllowedOriginPattern("*"); + // 允许跨域的请求头 + config.addAllowedHeader("*"); + // 允许跨域的请求方法 + config.addAllowedMethod("*"); + // 允许携带cookie + config.setAllowCredentials(true); + // 暴露响应头 + config.addExposedHeader("*"); + + source.registerCorsConfiguration("/**", config); + return new CorsFilter(source); + } +} diff --git a/vuetest/springboot/src/main/java/com/example/springboot/config/MybatisPlusConfig.java b/vuetest/springboot/src/main/java/com/example/springboot/config/MybatisPlusConfig.java new file mode 100644 index 0000000..41a07fd --- /dev/null +++ b/vuetest/springboot/src/main/java/com/example/springboot/config/MybatisPlusConfig.java @@ -0,0 +1,24 @@ +package com.example.springboot.config; + +import com.baomidou.mybatisplus.annotation.DbType; +import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; +import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +@MapperScan("com.example.springboot.mapper") +public class MybatisPlusConfig { + + /** + * 添加分页插件 + */ + @Bean + public MybatisPlusInterceptor mybatisPlusInterceptor() { + MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); + interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); // 如果配置多个插件, 切记分页最后添加 + // 如果有多数据源可以不配具体类型, 否则都建议配上具体的 DbType + return interceptor; + } +} diff --git a/vuetest/springboot/src/main/java/com/example/springboot/config/SpringDocConfig.java b/vuetest/springboot/src/main/java/com/example/springboot/config/SpringDocConfig.java new file mode 100644 index 0000000..b47fce2 --- /dev/null +++ b/vuetest/springboot/src/main/java/com/example/springboot/config/SpringDocConfig.java @@ -0,0 +1,18 @@ +package com.example.springboot.config; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Info; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class SpringDocConfig { + + @Bean + public OpenAPI springShopOpenAPI() { + return new OpenAPI() + .info(new Info().title("SpringBoot API") + .description("Spring shop sample application") + .version("v1.0.0")); + } +} \ No newline at end of file diff --git a/vuetest/springboot/src/main/java/com/example/springboot/controller/UserController.java b/vuetest/springboot/src/main/java/com/example/springboot/controller/UserController.java new file mode 100644 index 0000000..299511b --- /dev/null +++ b/vuetest/springboot/src/main/java/com/example/springboot/controller/UserController.java @@ -0,0 +1,84 @@ +package com.example.springboot.controller; + + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import java.util.List; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; + +import com.example.springboot.service.IUserService; +import com.example.springboot.entity.User; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; + +/** + * <p> + * 前端控制器 + * </p> + * + * @author hzk + * @since 2025-02-10 + */ +@Tag(name = "用户管理", description = "用户管理相关接口") +@RestController +@RequestMapping("/user") +public class UserController { + + @Resource + private IUserService userService; + + // 新增或者更新 + @PostMapping + public boolean save(@RequestBody User user) { + return userService.saveOrUpdate(user); + } + + //删除 + @DeleteMapping("/{id}") + public Boolean delete(@PathVariable Integer id) { + return userService.removeById(id); + } + //多项删除 + @PostMapping("/del/batch") + public boolean deleteBatch(@RequestBody List<Integer> ids) { + return userService.removeByIds(ids); + } + //查询所有数据 + @GetMapping + public List<User> findAll() { + return userService.list(); + } + //根据id查询 + @GetMapping("/{id}") + public User findOne(@PathVariable Integer id) { + return userService.getById(id); + } + //分页查询 + @Operation(summary = "分页查询") + @GetMapping("/page") + public Page<User> findPage(@RequestParam Integer pageNum, + @RequestParam Integer pageSize, + @RequestParam(defaultValue = "") String username, + @RequestParam(defaultValue = "") String email, + @RequestParam(defaultValue = "") String address) { + QueryWrapper<User> queryWrapper = new QueryWrapper<>(); + if (!"".equals(username)) { + queryWrapper.like("username", username); + } + if (!"".equals(email)) { + queryWrapper.like("email", email); + } + if (!"".equals(address)) { + queryWrapper.like("address", address); + } + queryWrapper.orderByDesc("id"); + return userService.page(new Page<>(pageNum, pageSize), queryWrapper); + } +} + + diff --git a/vuetest/springboot/src/main/java/com/example/springboot/entity/User.java b/vuetest/springboot/src/main/java/com/example/springboot/entity/User.java new file mode 100644 index 0000000..c85fe76 --- /dev/null +++ b/vuetest/springboot/src/main/java/com/example/springboot/entity/User.java @@ -0,0 +1,126 @@ +package com.example.springboot.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.time.LocalDateTime; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * <p> + * + * </p> + * + * @author hzk + * @since 2025-02-10 + */ +@TableName("sys_user") +@Schema(description = "User对象") +public class User implements Serializable { + + private static final long serialVersionUID = 1L; + + @Schema(description = "id") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @Schema(description = "用户名") + private String username; + + @Schema(description = "密码") + private String password; + + @Schema(description = "邮箱") + private String email; + + @Schema(description = "电话") + private String phone; + + @Schema(description = "地址") + private String address; + + @Schema(description = "昵称") + private String nickname; + + @Schema(description = "创建时间") + private LocalDateTime createTime; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getNickname() { + return nickname; + } + + public void setNickname(String nickname) { + this.nickname = nickname; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + @Override + public String toString() { + return "User{" + + "id = " + id + + ", username = " + username + + ", password = " + password + + ", email = " + email + + ", phone = " + phone + + ", address = " + address + + ", nickname = " + nickname + + ", createTime = " + createTime + + "}"; + } +} diff --git a/vuetest/springboot/src/main/java/com/example/springboot/mapper/UserMapper.java b/vuetest/springboot/src/main/java/com/example/springboot/mapper/UserMapper.java new file mode 100644 index 0000000..089103f --- /dev/null +++ b/vuetest/springboot/src/main/java/com/example/springboot/mapper/UserMapper.java @@ -0,0 +1,16 @@ +package com.example.springboot.mapper; + +import com.example.springboot.entity.User; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * <p> + * Mapper 接口 + * </p> + * + * @author hzk + * @since 2025-02-10 + */ +public interface UserMapper extends BaseMapper<User> { + +} diff --git a/vuetest/springboot/src/main/java/com/example/springboot/service/IUserService.java b/vuetest/springboot/src/main/java/com/example/springboot/service/IUserService.java new file mode 100644 index 0000000..9be7e54 --- /dev/null +++ b/vuetest/springboot/src/main/java/com/example/springboot/service/IUserService.java @@ -0,0 +1,16 @@ +package com.example.springboot.service; + +import com.example.springboot.entity.User; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * <p> + * 服务类 + * </p> + * + * @author hzk + * @since 2025-02-10 + */ +public interface IUserService extends IService<User> { + +} diff --git a/vuetest/springboot/src/main/java/com/example/springboot/service/impl/UserServiceImpl.java b/vuetest/springboot/src/main/java/com/example/springboot/service/impl/UserServiceImpl.java new file mode 100644 index 0000000..bafedeb --- /dev/null +++ b/vuetest/springboot/src/main/java/com/example/springboot/service/impl/UserServiceImpl.java @@ -0,0 +1,20 @@ +package com.example.springboot.service.impl; + +import com.example.springboot.entity.User; +import com.example.springboot.mapper.UserMapper; +import com.example.springboot.service.IUserService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + * <p> + * 服务实现类 + * </p> + * + * @author hzk + * @since 2025-02-10 + */ +@Service +public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService { + +} diff --git a/vuetest/springboot/src/main/java/com/example/springboot/utils/CodeGenerator.java b/vuetest/springboot/src/main/java/com/example/springboot/utils/CodeGenerator.java new file mode 100644 index 0000000..5bdaaaf --- /dev/null +++ b/vuetest/springboot/src/main/java/com/example/springboot/utils/CodeGenerator.java @@ -0,0 +1,39 @@ +package com.example.springboot.utils; + +import com.baomidou.mybatisplus.generator.FastAutoGenerator; +import com.baomidou.mybatisplus.generator.config.OutputFile; +import com.baomidou.mybatisplus.generator.engine.VelocityTemplateEngine; + +import java.util.Collections; + +/** + * MyBatis-Plus 代码生成器 + */ +public class CodeGenerator { + public static void main(String[] args) { + generate(); + } + + private static void generate() { + FastAutoGenerator.create("jdbc:mysql://localhost:3306/hzk?serverTimezone=GMT%2B8", "root", "123456") + .globalConfig(builder -> { + builder.author("hzk") // 设置作者 + .enableSwagger() // 开启 swagger 模式 + .outputDir("E:\\desktop\\vite-projects\\vuetest\\springboot\\src\\main\\java"); // 指定输出目录 + }) + .packageConfig(builder -> { + builder.parent("com.example.springboot") // 设置父包名 + .moduleName("") // 设置父包模块名 + .pathInfo(Collections.singletonMap(OutputFile.xml, + "E:\\desktop\\vite-projects\\vuetest\\springboot\\src\\main\\resources\\mapper")); // 设置mapperXml生成路径 + }) + .strategyConfig(builder -> { + builder.addInclude("sys_user") // 设置需要生成的表名 + .addTablePrefix("t_", "sys_"); // 设置过滤表前缀 + }) + .templateEngine(new VelocityTemplateEngine()) // 使用 Velocity 引擎 + .execute(); + } +} + + diff --git a/vuetest/springboot/src/main/resources/application.yml b/vuetest/springboot/src/main/resources/application.yml new file mode 100644 index 0000000..ed85a60 --- /dev/null +++ b/vuetest/springboot/src/main/resources/application.yml @@ -0,0 +1,26 @@ +spring: + application: + name: springboot + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://localhost:3306/hzk?serverTimezone=GMT%2B8 + username: root + password: 123456 + jackson: + serialization: + fail-on-empty-beans: false + +server: + port: 9090 + +mybatis-plus: + configuration: + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + mapper-locations: classpath:mapper/*.xml + +springdoc: + api-docs: + enabled: true + swagger-ui: + path: /swagger-ui.html + enabled: true \ No newline at end of file diff --git a/vuetest/springboot/src/main/resources/mapper/UserMapper.xml b/vuetest/springboot/src/main/resources/mapper/UserMapper.xml new file mode 100644 index 0000000..d4d8dc0 --- /dev/null +++ b/vuetest/springboot/src/main/resources/mapper/UserMapper.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.example.springboot.mapper.UserMapper"> + +</mapper> diff --git a/vuetest/springboot/src/main/resources/templates/controller.java.vm b/vuetest/springboot/src/main/resources/templates/controller.java.vm new file mode 100644 index 0000000..80d4954 --- /dev/null +++ b/vuetest/springboot/src/main/resources/templates/controller.java.vm @@ -0,0 +1,87 @@ +package ${package.Controller}; + + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import java.util.List; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; + +import ${package.Service}.${table.serviceName}; +import ${package.Entity}.${entity}; + +#if(${restControllerStyle}) +import org.springframework.web.bind.annotation.RestController; +#else +import org.springframework.stereotype.Controller; +#end +#if(${superControllerClassPackage}) +import ${superControllerClassPackage}; +#end + +/** + * <p> + * $!{table.comment} 前端控制器 + * </p> + * + * @author ${author} + * @since ${date} + */ +#if(${restControllerStyle}) +@RestController +#else +@Controller +#end +@RequestMapping("#if(${package.ModuleName})/${package.ModuleName}#end/#if(${controllerMappingHyphenStyle})${controllerMappingHyphen}#else${table.entityPath}#end") +#if(${kotlin}) +class ${table.controllerName}#if(${superControllerClass}) : ${superControllerClass}()#end + +#else +#if(${superControllerClass}) +public class ${table.controllerName} extends ${superControllerClass} { +#else +public class ${table.controllerName} { +#end + + @Resource + private ${table.serviceName} ${table.entityPath}Service; + + // 新增或者更新 + @PostMapping + public boolean save(@RequestBody ${entity} ${table.entityPath}) { + return ${table.entityPath}Service.saveOrUpdate(${table.entityPath}); + } + + //删除 + @DeleteMapping("/{id}") + public Boolean delete(@PathVariable Integer id) { + return ${table.entityPath}Service.removeById(id); + } + //多项删除 + @PostMapping("/del/batch") + public boolean deleteBatch(@RequestBody List<Integer> ids) { + return ${table.entityPath}Service.removeByIds(ids); + } + //查询所有数据 + @GetMapping + public List<${entity}> findAll() { + return ${table.entityPath}Service.list(); + } + //根据id查询 + @GetMapping("/{id}") + public ${entity} findOne(@PathVariable Integer id) { + return ${table.entityPath}Service.getById(id); + } + //分页查询 + @GetMapping("/page") + public Page<${entity}> findPage(@RequestParam Integer pageNum, + @RequestParam Integer pageSize) { + QueryWrapper<User> queryWrapper = new QueryWrapper<>(); + queryWrapper.orderByDesc("id"); + return ${table.entityPath}Service.page(new Page<>(pageNum, pageSize), queryWrapper); + } + + } + +#end + diff --git a/vuetest/springboot/src/test/java/com/example/springboot/SpringbootApplicationTests.java b/vuetest/springboot/src/test/java/com/example/springboot/SpringbootApplicationTests.java new file mode 100644 index 0000000..1c8cd44 --- /dev/null +++ b/vuetest/springboot/src/test/java/com/example/springboot/SpringbootApplicationTests.java @@ -0,0 +1,13 @@ +package com.example.springboot; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class SpringbootApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/vuetest/vue1 b/vuetest/vue1 new file mode 160000 index 0000000..4d53429 --- /dev/null +++ b/vuetest/vue1 @@ -0,0 +1 @@ +Subproject commit 4d53429c7f22b90bf8b07d20cbdbf947049e9df0